repo_dependency_graph 0.2.4 → 0.3.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: 0885a841f3292f9cd8c108d6f8a5c182aad4f0a9
4
- data.tar.gz: fb2f65de34f76899bcf4abe7a2f07dc9d1ff8e09
3
+ metadata.gz: c0f13055bac9eb92e4769cad0ffd580b4453dd5d
4
+ data.tar.gz: ff67277eb428b80fed67bf39ddd02b5b5596f07f
5
5
  SHA512:
6
- metadata.gz: fdd0a854a3193accc6e1e7e3ef5edb825819c9163206197319eefb633a52ca3017a42bf99fc42ba7e43ae5bfb1305425cd631eb98b70a043f08d245e61ec913f
7
- data.tar.gz: 52bada96648d0cc1e8c3ffaf76d5d6ddd6aa1b563c1ec652eb6d01bfff76cb71db8fbb466de38ea391ac80cac4554a559c6e29f6cd1bc15b2c2e30261decb8b1
6
+ metadata.gz: f55a8c3a84a558e768ef871c618d6261bcbd56e40bc0687c2b2931cd815ea0ff8af1e58f2bb494df11074492e8c3d669bf90087fc80a01c83e09167dc3e09b82
7
+ data.tar.gz: f1d52d9efc17d019d3c8b237642202bf4703bfebfbc070ad7567ca5dad7b66a9f69a98ddf85c02ab60c546a6a7ff8882301ffd220655e59f38d35d7585a585e9
@@ -1,3 +1,3 @@
1
1
  module RepoDependencyGraph
2
- VERSION = "0.2.4"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -45,9 +45,9 @@ module RepoDependencyGraph
45
45
  r = nil if r == ">= 0"
46
46
  [d.name, r].compact
47
47
  end
48
- elsif content = repo.content("Gemfile.lock")
48
+ elsif content = content_from_any(repo, ["gems.locked", "Gemfile.lock"])
49
49
  scan_gemfile_lock(repo.name, content)
50
- elsif content = repo.content("Gemfile")
50
+ elsif content = content_from_any(repo, ["gems.rb", "Gemfile"])
51
51
  scan_gemfile(repo.name, content)
52
52
  end
53
53
  repos.concat gems if gems
@@ -56,6 +56,10 @@ module RepoDependencyGraph
56
56
  repos
57
57
  end
58
58
 
59
+ def content_from_any(repo, files)
60
+ (file = (repo.file_list & files).first) && repo.content(file)
61
+ end
62
+
59
63
  def scan_chef_metadata(_, content)
60
64
  content.scan(/^\s*depends ['"](.*?)['"](?:,\s?['"](.*?)['"])?/).map(&:compact)
61
65
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repo_dependency_graph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-25 00:00:00.000000000 Z
11
+ date: 2017-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: organization_audit
@@ -48,7 +48,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
48
48
  requirements:
49
49
  - - ">="
50
50
  - !ruby/object:Gem::Version
51
- version: '0'
51
+ version: 2.1.0
52
52
  required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="