prospectus_gems 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a505888040a2ac5c28e603339af085199cc8ca743d892d9cc73cdab1e9740a5
4
- data.tar.gz: 626f5ef9664559c92cf333ba61fbd96318ecb15f49aa047ecc54809640ed4be6
3
+ metadata.gz: 2ed87bf771a5970c7f4c10406dd6ad5bd8068504e25cdd55a7919d7d28237990
4
+ data.tar.gz: 4d729edd86a16ce21b7974d7815ff262975aea9bac0c0a59b8ff0fff42e6a9fd
5
5
  SHA512:
6
- metadata.gz: e82e8da05e103b38121681d8a176bbd73f8534cf065549f49b46df9a326601e07b7d98e7008b0df5ccb914a2760f4853aa628b1b0ebbf1e995878f1a04a5feb3
7
- data.tar.gz: c296dd4a4dfeb4cbd675bffcd077a76e064767c91e38b24f3207dde597471b32da01f58c33f4e0d2e4a695b45f632d51cbfd866698c974063fa267fe1bf7ed3e
6
+ metadata.gz: 4fb897ab0030b501d22c99493879171c5edf51d21a2666f523e6e906fe96f7577fcc665ddce762fe67393816737643b97e4ff3532e68a7a98f161ac463724cd3
7
+ data.tar.gz: 73a6b5420fa7097d890b19254bff2f029705879351a3859b674e308ac116a1bb13a0704e02aacf580d553251977d3b6dc65b4823fa66283d309d16009d1d1cf5
@@ -35,16 +35,30 @@ module ProspectusGems
35
35
  private
36
36
 
37
37
  def parse_deps
38
- bundle.resolve_remotely! unless bundle.instance_variable_get(:@specs)
39
- bundle.dependencies.map do |x|
38
+ dependencies.map do |x|
40
39
  latest = Gemspec.lookup_gem(x.name)
41
40
  current = x.match?(x.name, latest) ? latest : x.requirements_list
42
41
  [x.name, current, latest]
43
42
  end
44
43
  end
45
44
 
45
+ def dependencies
46
+ @dependencies ||= dep_obj.dependencies
47
+ end
48
+
49
+ def dep_obj
50
+ @dep_obj ||= if gemfile.read =~ /^gemspec$/
51
+ bundle.specs[bundle.dependencies.first.name].first
52
+ else
53
+ bundle
54
+ end
55
+ end
56
+
46
57
  def bundle
47
- @bundle ||= Bundler::Definition.build(gemfile, lockfile, nil)
58
+ return @bundle if @bundle
59
+ @bundle = Bundler::Definition.build(gemfile, lockfile, nil)
60
+ @bundle.resolve_remotely!
61
+ @bundle
48
62
  end
49
63
 
50
64
  def gemfile
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'prospectus_gems'
3
- s.version = '0.2.0'
3
+ s.version = '0.2.1'
4
4
  s.date = Time.now.strftime('%Y-%m-%d')
5
5
 
6
6
  s.summary = 'Prospectus helpers for gemspecs'
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.test_files = `git ls-files spec/*`.split
15
15
 
16
16
  s.add_dependency 'bundler', '~> 1.16.2'
17
- s.add_dependency 'prospectus', '~> 0.5.0'
17
+ s.add_dependency 'prospectus', '~> 0.6.0'
18
18
 
19
19
  s.add_development_dependency 'codecov', '~> 0.1.1'
20
20
  s.add_development_dependency 'fuubar', '~> 2.3.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prospectus_gems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.5.0
33
+ version: 0.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.5.0
40
+ version: 0.6.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: codecov
43
43
  requirement: !ruby/object:Gem::Requirement