organization_license_audit 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/organization_license_audit.rb +22 -2
- data/lib/organization_license_audit/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b35157b61295f403ab5fde9070fc04cc6d43189
|
4
|
+
data.tar.gz: ce1ee9355f04f87417f78481e818ff44168981cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55a08621a75fb4be0394bdec8d100cd3de29ba357b5b23a6d080f01ef372091d58a50f56421e53477a915e2f1fe488129d3cd49f39b798c06b82664f6ce6ab2a
|
7
|
+
data.tar.gz: 1a0b60c00ba891147ddbaed6db8f29fab5dbfd5aa145fc5d445d80fe0630658108d442616877d69bc4b61439bed220ee31629894ab593563b99ad2561f4e6123
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -2,6 +2,7 @@ require "organization_license_audit/version"
|
|
2
2
|
require "tmpdir"
|
3
3
|
require "organization_audit"
|
4
4
|
require "shellwords"
|
5
|
+
require "open3"
|
5
6
|
|
6
7
|
module OrganizationLicenseAudit
|
7
8
|
BUNDLE_PATH = "vendor/bundle"
|
@@ -78,7 +79,13 @@ module OrganizationLicenseAudit
|
|
78
79
|
end
|
79
80
|
|
80
81
|
def download_file(repo, file)
|
81
|
-
|
82
|
+
begin
|
83
|
+
content = repo.content(file)
|
84
|
+
rescue StandardError => e
|
85
|
+
puts "Error downloading #{file}: #{e.to_s}"
|
86
|
+
content = repo.content(file)
|
87
|
+
end
|
88
|
+
return unless content
|
82
89
|
FileUtils.mkdir_p(File.dirname(file))
|
83
90
|
File.write(file, content)
|
84
91
|
end
|
@@ -172,7 +179,7 @@ module OrganizationLicenseAudit
|
|
172
179
|
def prepare_bundler(bundle_cache_dir, options)
|
173
180
|
with_or_without :bundler, options do
|
174
181
|
use_cache_dir_to_bundle(bundle_cache_dir)
|
175
|
-
raise "Failed to bundle" unless
|
182
|
+
raise "Failed to bundle" unless sh_with_retry("bundle --path #{BUNDLE_PATH} --quiet 2>&1", "Gem::RemoteFetcher::FetchError").first
|
176
183
|
true
|
177
184
|
end
|
178
185
|
end
|
@@ -234,6 +241,19 @@ module OrganizationLicenseAudit
|
|
234
241
|
[$?.success?, output]
|
235
242
|
end
|
236
243
|
|
244
|
+
def sh_with_retry(cmd, retry_on)
|
245
|
+
status = false
|
246
|
+
result = ""
|
247
|
+
3.times do |i|
|
248
|
+
$stderr.puts "Retrying failed command" if i > 0
|
249
|
+
status, current = sh(cmd)
|
250
|
+
result << current
|
251
|
+
return status, result if status
|
252
|
+
break unless current.include?(retry_on)
|
253
|
+
end
|
254
|
+
return status, result
|
255
|
+
end
|
256
|
+
|
237
257
|
def select_parallel_group!(repos)
|
238
258
|
return unless group = ENV["OLA_GROUP"]
|
239
259
|
group, groups = group.split("/").map(&:to_i)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: organization_license_audit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
F5etKHZg0j3eHO31/i2HnswY04lqGImUu6aM5EnijFTB7PPW2KwKKM4+kKDYFdlw
|
31
31
|
/0WV1Ng2/Y6qsHwmqGg2VlYj2h4=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2014-
|
33
|
+
date: 2014-08-29 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: organization_audit
|
metadata.gz.sig
CHANGED
Binary file
|