Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

no need to manage the LOAD_PATH, really

  • Loading branch information...
commit df4b3cd06a8fe5066968adc5a59b7a9259b70d2f 1 parent 066274d
Mislav Marohnić authored
6 Rakefile
... ... @@ -1,7 +1,3 @@
1   -lib_dir = File.expand_path(File.join(File.dirname(__FILE__), "lib"))
2   -$:.unshift(lib_dir)
3   -$:.uniq!
4   -
5 1 require 'rubygems'
6 2 require 'rake'
7 3 require 'rake/testtask'
@@ -10,7 +6,7 @@ require 'rake/packagetask'
10 6 require 'rake/gempackagetask'
11 7 require 'spec/rake/spectask'
12 8
13   -require File.join(File.dirname(__FILE__), 'lib/addressable', 'version')
  9 +require File.join(File.dirname(__FILE__), 'lib', 'addressable', 'version')
14 10
15 11 PKG_DISPLAY_NAME = 'Addressable'
16 12 PKG_NAME = PKG_DISPLAY_NAME.downcase
4 lib/addressable/template.rb
@@ -22,10 +22,6 @@
22 22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 23 #++
24 24
25   -$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '/..')))
26   -$:.uniq!
27   -
28   -require "addressable/version"
29 25 require "addressable/uri"
30 26
31 27 module Addressable
4 lib/addressable/uri.rb
@@ -22,10 +22,6 @@
22 22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 23 #++
24 24
25   -$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '/..')))
26   -$:.uniq!
27   -
28   -require "addressable/version"
29 25 require "addressable/idna"
30 26
31 27 module Addressable
3  spec/addressable/idna_spec.rb
@@ -22,9 +22,6 @@
22 22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 23 #++
24 24
25   -$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../../lib'))
26   -$:.uniq!
27   -
28 25 require "addressable/idna"
29 26
30 27 describe Addressable::IDNA, "when converting from unicode to ASCII" do
4 spec/addressable/template_spec.rb
@@ -22,10 +22,6 @@
22 22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 23 #++
24 24
25   -$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../../lib'))
26   -$:.uniq!
27   -
28   -require "addressable/uri"
29 25 require "addressable/template"
30 26
31 27 if !"".respond_to?("force_encoding")
3  spec/addressable/uri_spec.rb
@@ -22,9 +22,6 @@
22 22 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 23 #++
24 24
25   -$:.unshift(File.expand_path(File.dirname(__FILE__) + '/../../lib'))
26   -$:.uniq!
27   -
28 25 require "addressable/uri"
29 26
30 27 if !"".respond_to?("force_encoding")
13 tasks/spec.rake
... ... @@ -1,12 +1,10 @@
1 1 namespace :spec do
2 2 Spec::Rake::SpecTask.new(:rcov) do |t|
  3 + t.libs = %w[lib spec]
3 4 t.spec_files = FileList['spec/**/*_spec.rb']
4 5 t.spec_opts = ['--color', '--format', 'specdoc']
5   - if RCOV_ENABLED
6   - t.rcov = true
7   - else
8   - t.rcov = false
9   - end
  6 +
  7 + t.rcov = RCOV_ENABLED
10 8 t.rcov_opts = [
11 9 '--exclude', 'spec',
12 10 '--exclude', '1\\.8\\/gems',
@@ -16,6 +14,7 @@ namespace :spec do
16 14 end
17 15
18 16 Spec::Rake::SpecTask.new(:normal) do |t|
  17 + t.libs = %w[lib spec]
19 18 t.spec_files = FileList['spec/**/*_spec.rb']
20 19 t.spec_opts = ['--color', '--format', 'specdoc']
21 20 t.rcov = false
@@ -23,11 +22,11 @@ namespace :spec do
23 22
24 23 desc "Generate HTML Specdocs for all specs"
25 24 Spec::Rake::SpecTask.new(:specdoc) do |t|
26   - specdoc_path = File.expand_path(
27   - File.join(File.dirname(__FILE__), '../specdoc/'))
  25 + specdoc_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'specdoc'))
28 26 Dir.mkdir(specdoc_path) if !File.exist?(specdoc_path)
29 27
30 28 output_file = File.join(specdoc_path, 'index.html')
  29 + t.libs = %w[lib spec]
31 30 t.spec_files = FileList['spec/**/*_spec.rb']
32 31 t.spec_opts = ["--format", "\"html:#{output_file}\"", "--diff"]
33 32 t.fail_on_error = false

0 comments on commit df4b3cd

Please sign in to comment.
Something went wrong with that request. Please try again.