gemsurance 0.5.0 → 0.6.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: 21ea60308499e8aa4d571df3b7da44849bb6ca3a
4
- data.tar.gz: 2709cf96a02232493c2f7d953df14b034ce95bea
3
+ metadata.gz: 7db1c20742bfd7ed1bd02ee4b6f133ecc4263495
4
+ data.tar.gz: 555984b1d7104d4a69370a02386361b202b9d826
5
5
  SHA512:
6
- metadata.gz: e5c871657448ffceac6e0df83675051757b7e0398bf560293e34fced2ddee1575b3ce7e80e2f4e940b66b5c950c2e10bb4f832815bd488ead78ef750b0d24bd6
7
- data.tar.gz: 7f683726ad934c169d40836879e08af1e4059290e8c6f77c2c153c2e2877fe02d39d14b4ef692cfe8682290568b72cebbd6e8fb4986f44560466390a5dfbfc79
6
+ metadata.gz: 9c93b75179a7299f9bd3691e92532f345f983a681097a2ac3b40159809122fe6dab69474a1d670953135d804f015d813fa7ff23433ad6d8723b5b282774112e8
7
+ data.tar.gz: cfa0e0193351b1ab688c9f8446d93e684d2bc3aa8fb1bedf383e0ffdd0132da181f272557dd5c9bd640e7c0785f605618b88a23316fe6cb749fa54d4327152d3
@@ -38,10 +38,8 @@ module Gemsurance
38
38
  bundler = Bundler.load
39
39
  current_specs = bundler.specs
40
40
  dependencies = bundler.dependencies
41
- definition = Bundler.definition(true)
42
- definition.resolve_remotely!
43
41
 
44
- GemInfoRetriever.new(current_specs, dependencies, definition).retrieve(:pre => @options[:pre])
42
+ GemInfoRetriever.new(current_specs, dependencies, resolved_definition).retrieve(:pre => @options[:pre])
45
43
  end
46
44
 
47
45
  def retrieve_vulnerability_data
@@ -91,5 +89,20 @@ module Gemsurance
91
89
  end
92
90
  puts "Generated report #{@output_file}."
93
91
  end
92
+
93
+ def resolved_definition
94
+ # Need to temporarily unfrozen Bundler (when the gems have been installed with --deployment option e.g.)
95
+ if Bundler.settings[:frozen]
96
+ unfrozen_bundler = true
97
+ Bundler.settings.set_local(:frozen, "0")
98
+ end
99
+
100
+ Bundler.definition(true).tap do |definition|
101
+ definition.resolve_remotely!
102
+ end
103
+
104
+ ensure
105
+ Bundler.settings.set_local(:frozen, "1") if unfrozen_bundler
106
+ end
94
107
  end
95
108
  end
@@ -1,3 +1,3 @@
1
1
  module Gemsurance
2
- VERSION = '0.5.0'
2
+ VERSION = '0.6.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemsurance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Kessler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-24 00:00:00.000000000 Z
11
+ date: 2015-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler