gemlist 0.3.0 → 0.4.0

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
  SHA1:
3
- metadata.gz: 264c212ec8ff089324641d17b96c67040d2622ec
4
- data.tar.gz: 3f83087f303792f5e5a8f7710b1df7d1e6e8fa4b
3
+ metadata.gz: 2efc06e39983c3d89c6fd0d95ee01ab9804d92fa
4
+ data.tar.gz: 618a99be9ace4992cd77ebe881555cc47c8413d5
5
5
  SHA512:
6
- metadata.gz: 7ddff71153ab79b99ade0c7eb50cddfa95445b262f2eb42725e69c2ca99a5f8bd7e04e2d3330c669e234e5a879a1aca2471a0383daf055167b89e84426fee9d8
7
- data.tar.gz: 0dc9761a23143309184bac6047064518ae68133a3633d6793cd55363de2e43d7d5382d5d77636d1efc733761350404e8330212c848d438dd7471c964e3f405c7
6
+ metadata.gz: 6e4b9819a79ddad661d46cbbd3c8f7314593b9b32604f91f58153069c3c0c2d3aef8b5415e33665c6977c1bff86397a711f6cfeb893164988ec7a05cda71f41a
7
+ data.tar.gz: aa47efe7abc65336f336869769e8591d365ae86a6aab5a2510faf6ad3b3e6527f3d60803ef16dfd2590ed772600c011fb2f76ab65a6e3225b618141770bcbfca
@@ -9,6 +9,10 @@ class Gemlist
9
9
  @options = options
10
10
  end
11
11
 
12
+ def sources
13
+ lockfile_parser.sources.flat_map(&:remotes).map(&:to_s)
14
+ end
15
+
12
16
  def gems
13
17
  cached_specs = specs
14
18
 
@@ -22,7 +26,7 @@ class Gemlist
22
26
  private
23
27
 
24
28
  def specs
25
- spec_tree = SpecTree.new(path/"Gemfile.lock")
29
+ spec_tree = SpecTree.new(lockfile_parser)
26
30
 
27
31
  spec_tree
28
32
  .depth_first_children_first
@@ -46,6 +50,10 @@ class Gemlist
46
50
  @bundle_definition = builder.to_definition(path/"Gemfile.lock", {})
47
51
  end
48
52
 
53
+ def lockfile_parser
54
+ @lockfile_parser = Bundler::LockfileParser.new((path/"Gemfile.lock").read)
55
+ end
56
+
49
57
  def groups
50
58
  excluded_groups = options.fetch(:without) { [] }
51
59
  included_groups = options.fetch(:with) { [] }
@@ -3,9 +3,7 @@ require 'gemlist/spec_node'
3
3
 
4
4
  class Gemlist
5
5
  class SpecTree < SpecNode
6
- def initialize(lockfile)
7
- lockfile_parser = Bundler::LockfileParser.new(lockfile.read)
8
-
6
+ def initialize(lockfile_parser)
9
7
  super("root", lockfile_parser)
10
8
 
11
9
  specs_to_place = lockfile_parser.specs.to_set
@@ -1,3 +1,3 @@
1
1
  class Gemlist
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemlist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Hoffman