manageiq-cross_repo 1.0.1 → 1.0.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ff6896410d55e14769981d4ee061c8557c409743968d191944476ea861c35d6
|
4
|
+
data.tar.gz: 78a605b9ea4cfe657219b957cd3ef9444c026209aa4e62ce5d5598664a5760f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98dcd86001183007093fef2b42335af5975672dc8a3bda97eb16bb6d8daa89f9d6b9e0e610bb0795098a202c3ffbb3e00d4fb6420932b26065413322820dedd6
|
7
|
+
data.tar.gz: 6745a6f57b19d966f43b5684cc23a03c631f771f7610c8fe41da018b0acb1b65dc34f43e71dbadc483806b89256684e074b54beb968f006ff3fb959e4003b591
|
@@ -34,7 +34,7 @@ module ManageIQ::CrossRepo
|
|
34
34
|
puts "Fetching #{tarball_url}"
|
35
35
|
|
36
36
|
Dir.mktmpdir do |dir|
|
37
|
-
Mixlib::Archive.new(
|
37
|
+
Mixlib::Archive.new(open_tarball_url(tarball_url)).extract(dir)
|
38
38
|
|
39
39
|
content_dir = Pathname.new(dir).children.detect(&:directory?)
|
40
40
|
FileUtils.mkdir_p(path.dirname)
|
@@ -147,6 +147,19 @@ module ManageIQ::CrossRepo
|
|
147
147
|
url && File.join(url, "tarball", sha)
|
148
148
|
end
|
149
149
|
|
150
|
+
def open_tarball_url(url)
|
151
|
+
archive = open(tarball_url, "rb")
|
152
|
+
|
153
|
+
if archive.kind_of?(StringIO)
|
154
|
+
archive = Tempfile.new('cross_repo').tap do |f|
|
155
|
+
f.write(archive.string)
|
156
|
+
f.fsync
|
157
|
+
end.path
|
158
|
+
end
|
159
|
+
|
160
|
+
archive
|
161
|
+
end
|
162
|
+
|
150
163
|
def git_branch_to_sha(url, branch)
|
151
164
|
`git ls-remote #{url} #{branch}`.split("\t").first
|
152
165
|
end
|
@@ -73,7 +73,11 @@ module ManageIQ::CrossRepo
|
|
73
73
|
if gem_repos.empty?
|
74
74
|
FileUtils.rm_f override_path
|
75
75
|
else
|
76
|
-
content = gem_repos.map
|
76
|
+
content = gem_repos.map do |gem|
|
77
|
+
# If there is a gemspec get the name of the gem from that instead of the repository
|
78
|
+
gem_name = gem.path.glob("*.gemspec")&.first&.basename(".gemspec") || gem.repo
|
79
|
+
"ensure_gem \"#{gem_name}\", :path => \"#{gem.path}\""
|
80
|
+
end.join("\n")
|
77
81
|
FileUtils.mkdir_p(bundler_d_path)
|
78
82
|
|
79
83
|
File.write(override_path, content)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manageiq-cross_repo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ManageIQ Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: '0'
|
154
154
|
requirements: []
|
155
|
-
rubygems_version: 3.
|
155
|
+
rubygems_version: 3.1.2
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: ManageIQ CrossRepo testing library
|