dependencies 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
1
  task :test do
2
- system "cd test && env GEM_HOME=#{File.expand_path("tmp")} ruby dependencies_test.rb"
2
+ binary = File.open($0) { |f| f.gets }[/#\s*!\s*(.*)/, 1]
3
+ puts "Running suite with #{binary}"
4
+ system "cd test && env GEM_HOME=#{File.expand_path("tmp")} #{binary} dependencies_test.rb"
3
5
  end
4
6
 
5
7
  task :default => :test
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "dependencies"
3
- s.version = "0.0.8"
3
+ s.version = "0.0.9"
4
4
  s.summary = "Specify your project's dependencies in one file."
5
5
  s.authors = ["Damian Janowski", "Michel Martens"]
6
6
  s.email = ["djanowski@dimaion.com", "michel@soveran.com"]
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
9
9
 
10
10
  s.executables << "dep"
11
11
 
12
- s.files = ["README.markdown", "Rakefile", "bin/dep", "dependencies.gemspec", "lib/dependencies/dep.rb", "lib/dependencies.rb", "test/dependencies_test.rb", "test/foobaz-0.3.gem", "test/vendor/bar/lib", "test/vendor/barz-2.0/lib", "test/vendor/baz-1.0/lib"]
12
+ s.files = ["README.markdown", "Rakefile", "bin/dep", "dependencies.gemspec", "lib/dependencies/dep.rb", "lib/dependencies.rb", "test/dependencies_test.rb", "test/foobaz-0.3.gem", "test/vendor/bar/lib", "test/vendor/bar-core-1.0/lib", "test/vendor/barz-2.0/lib", "test/vendor/baz-1.0/lib"]
13
13
 
14
14
  s.add_dependency("thor", "~> 0.11")
15
15
  end
@@ -25,7 +25,8 @@ class Dep
25
25
  end
26
26
 
27
27
  def vendor_path
28
- Dir[File.join("vendor", "#{vendor_name}*", "lib")].first ||
28
+ Dir[File.join("vendor", vendor_name, "lib")].first ||
29
+ Dir[File.join("vendor", "#{vendor_name}*", "lib")].first ||
29
30
  Dir[File.join("vendor", name, "lib")].first
30
31
  end
31
32
 
@@ -7,6 +7,11 @@ require "pp"
7
7
  require "stringio"
8
8
  require "fileutils"
9
9
 
10
+ begin
11
+ require "ruby-debug"
12
+ rescue LoadError
13
+ end
14
+
10
15
  $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
11
16
 
12
17
  class Dep
@@ -53,6 +58,14 @@ class DependenciesTest < Test::Unit::TestCase
53
58
  end
54
59
  end
55
60
 
61
+ test "does not conflict with similar names" do
62
+ with_dependencies "bar\nbar-core 1.0" do
63
+ do_require
64
+ assert_equal File.expand_path("vendor/bar/lib"), $:[2]
65
+ assert_equal File.expand_path("vendor/bar-core-1.0/lib"), $:[1]
66
+ end
67
+ end
68
+
56
69
  test "honors the version number for the vendor directory" do
57
70
  with_dependencies "foo 2.0" do
58
71
  do_require
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependencies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damian Janowski
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-02-05 00:00:00 -03:00
13
+ date: 2010-04-05 00:00:00 -03:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency