librarian 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,8 +18,7 @@ module Librarian
18
18
 
19
19
  def manifest?(dependency, path)
20
20
  path = Pathname.new(path)
21
- manifest_path = manifest_path(path)
22
- manifest_path && check_manifest(dependency, manifest_path)
21
+ !!manifest_path(path)
23
22
  end
24
23
 
25
24
  def check_manifest(dependency, manifest_path)
@@ -1,11 +1,15 @@
1
1
  require 'rubygems'
2
2
 
3
+ require 'librarian/helpers/debug'
4
+
3
5
  module Librarian
4
6
  class Dependency
5
7
 
6
8
  class Requirement < Gem::Requirement
7
9
  end
8
10
 
11
+ include Helpers::Debug
12
+
9
13
  attr_reader :name, :requirement, :source
10
14
 
11
15
  def initialize(name, requirement, source)
@@ -40,5 +44,11 @@ module Librarian
40
44
  self.source == other.source
41
45
  end
42
46
 
47
+ private
48
+
49
+ def root_module
50
+ source.root_module
51
+ end
52
+
43
53
  end
44
54
  end
@@ -39,7 +39,7 @@ module Librarian
39
39
  end
40
40
 
41
41
  def to_s
42
- "#{uri}##{ref}"
42
+ path ? "#{uri}##{ref}(#{path})" : "#{uri}##{ref}"
43
43
  end
44
44
 
45
45
  def ==(other)
@@ -90,17 +90,7 @@ module Librarian
90
90
  end
91
91
 
92
92
  def filesystem_path
93
- @filesystem_path ||= repository.path
94
- end
95
-
96
- # Override Local#manifest_search_paths
97
- def manifest_search_paths(dependency)
98
- if path.nil?
99
- paths = [filesystem_path, filesystem_path.join(dependency.name)]
100
- paths.select{|s| s.exist?}
101
- else
102
- [filesystem_path.join(path)]
103
- end
93
+ @filesystem_path ||= path ? repository.path.join(path) : repository.path
104
94
  end
105
95
 
106
96
  end
@@ -1,3 +1,3 @@
1
1
  module Librarian
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: librarian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-06-23 00:00:00.000000000Z
12
+ date: 2011-06-25 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &11791400 !ruby/object:Gem::Requirement
16
+ requirement: &14553540 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *11791400
24
+ version_requirements: *14553540
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &11789160 !ruby/object:Gem::Requirement
27
+ requirement: &14551080 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *11789160
35
+ version_requirements: *14551080
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: cucumber
38
- requirement: &11462680 !ruby/object:Gem::Requirement
38
+ requirement: &14238840 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *11462680
46
+ version_requirements: *14238840
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: aruba
49
- requirement: &11460640 !ruby/object:Gem::Requirement
49
+ requirement: &14237000 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *11460640
57
+ version_requirements: *14237000
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: webmock
60
- requirement: &11459060 !ruby/object:Gem::Requirement
60
+ requirement: &14235300 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *11459060
68
+ version_requirements: *14235300
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: chef
71
- requirement: &11456440 !ruby/object:Gem::Requirement
71
+ requirement: &14233080 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0.10'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *11456440
79
+ version_requirements: *14233080
80
80
  description: Librarian
81
81
  email:
82
82
  - y_feldblum@yahoo.com
@@ -165,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  segments:
167
167
  - 0
168
- hash: 695538775137796306
168
+ hash: 434978619910249069
169
169
  required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  none: false
171
171
  requirements:
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  version: '0'
175
175
  segments:
176
176
  - 0
177
- hash: 695538775137796306
177
+ hash: 434978619910249069
178
178
  requirements: []
179
179
  rubyforge_project: librarian
180
180
  rubygems_version: 1.7.1