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 +4 -4
- data/lib/gemlist.rb +9 -1
- data/lib/gemlist/spec_tree.rb +1 -3
- data/lib/gemlist/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2efc06e39983c3d89c6fd0d95ee01ab9804d92fa
|
4
|
+
data.tar.gz: 618a99be9ace4992cd77ebe881555cc47c8413d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e4b9819a79ddad661d46cbbd3c8f7314593b9b32604f91f58153069c3c0c2d3aef8b5415e33665c6977c1bff86397a711f6cfeb893164988ec7a05cda71f41a
|
7
|
+
data.tar.gz: aa47efe7abc65336f336869769e8591d365ae86a6aab5a2510faf6ad3b3e6527f3d60803ef16dfd2590ed772600c011fb2f76ab65a6e3225b618141770bcbfca
|
data/lib/gemlist.rb
CHANGED
@@ -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(
|
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) { [] }
|
data/lib/gemlist/spec_tree.rb
CHANGED
@@ -3,9 +3,7 @@ require 'gemlist/spec_node'
|
|
3
3
|
|
4
4
|
class Gemlist
|
5
5
|
class SpecTree < SpecNode
|
6
|
-
def initialize(
|
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
|
data/lib/gemlist/version.rb
CHANGED