omnibus 5.6.0 → 5.6.1
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
- data/CHANGELOG.md +5 -0
- data/lib/omnibus/s3_cache.rb +1 -1
- data/lib/omnibus/version.rb +1 -1
- data/spec/unit/fetchers/net_fetcher_spec.rb +6 -2
- data/spec/unit/s3_cacher_spec.rb +47 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d528e6f65a006c07fab5ba8eb1274a8f8960e19f
|
4
|
+
data.tar.gz: 6f434ffc471faddb0fda4a0ed5cf9520ae201115
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d37ccec9688a74a78dbd847a1096daa29e75a2d41f8fa57e7ba0e5fa2ffe1afc3ba72dde544c82a35d8c98a6da1220f2863ff12fe0656715ea80c0d0d53d2189
|
7
|
+
data.tar.gz: 2cd1aa5e70388fde16a4e600b69decbac1c1bd5184dcf54d9530cd088c1d885ab97ace3f090127a21531efdfc5d1d16ad3be6539fce5c05076b353f96b097a00
|
data/CHANGELOG.md
CHANGED
data/lib/omnibus/s3_cache.rb
CHANGED
@@ -149,7 +149,7 @@ module Omnibus
|
|
149
149
|
if Config.s3_profile
|
150
150
|
config[:profile] = Config.s3_profile
|
151
151
|
else
|
152
|
-
config[:access_key_id] = Config.s3_access_key
|
152
|
+
config[:access_key_id] = Config.s3_access_key
|
153
153
|
config[:secret_access_key] = Config.s3_secret_key
|
154
154
|
end
|
155
155
|
|
data/lib/omnibus/version.rb
CHANGED
@@ -448,6 +448,10 @@ module Omnibus
|
|
448
448
|
Config.cache_dir("/")
|
449
449
|
stub_ohai(platform: "ubuntu", version: "12.04")
|
450
450
|
stub_const("File::ALT_SEPARATOR", nil)
|
451
|
+
|
452
|
+
allow(Omnibus).to receive(:which)
|
453
|
+
.with("gtar")
|
454
|
+
.and_return(false)
|
451
455
|
end
|
452
456
|
|
453
457
|
context "when gtar is not present" do
|
@@ -479,8 +483,8 @@ module Omnibus
|
|
479
483
|
stub_const("File::ALT_SEPARATOR", nil)
|
480
484
|
|
481
485
|
allow(Omnibus).to receive(:which)
|
482
|
-
|
483
|
-
|
486
|
+
.with("gtar")
|
487
|
+
.and_return("/path/to/gtar")
|
484
488
|
end
|
485
489
|
|
486
490
|
it_behaves_like "an extractor", "7z", {},
|
data/spec/unit/s3_cacher_spec.rb
CHANGED
@@ -106,5 +106,52 @@ module Omnibus
|
|
106
106
|
expect(S3Cache.key_for(ruby_19)).to eq("ruby-1.9.3-abcd1234")
|
107
107
|
end
|
108
108
|
end
|
109
|
+
|
110
|
+
describe ".s3_configuration" do
|
111
|
+
let (:s3_bucket) { "omnibus-cache" }
|
112
|
+
let (:s3_region) { "eu-west-1" }
|
113
|
+
let (:s3_access_key) { nil }
|
114
|
+
let (:s3_secret_key) { nil }
|
115
|
+
let (:s3_profile) { nil }
|
116
|
+
|
117
|
+
before do
|
118
|
+
Config.s3_bucket s3_bucket
|
119
|
+
Config.s3_region s3_region
|
120
|
+
Config.s3_profile s3_profile
|
121
|
+
Config.s3_access_key s3_access_key
|
122
|
+
Config.s3_secret_key s3_secret_key
|
123
|
+
end
|
124
|
+
|
125
|
+
it "sets region and bucket" do
|
126
|
+
config = S3Cache.send(:s3_configuration)
|
127
|
+
expect(config[:region]).to eq(s3_region)
|
128
|
+
expect(config[:bucket_name]).to eq(s3_bucket)
|
129
|
+
end
|
130
|
+
|
131
|
+
context "s3_profile is not configured" do
|
132
|
+
let(:s3_access_key) { "ACCESS_KEY_ID" }
|
133
|
+
let(:s3_secret_key) { "SECRET_ACCESS_KEY" }
|
134
|
+
|
135
|
+
it "sets access_key_id and secret_access_key" do
|
136
|
+
config = S3Cache.send(:s3_configuration)
|
137
|
+
expect(config[:profile]).to eq(nil)
|
138
|
+
expect(config[:access_key_id]).to eq(s3_access_key)
|
139
|
+
expect(config[:secret_access_key]).to eq(s3_secret_key)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
context "s3_profile is configured" do
|
144
|
+
let(:s3_profile) { "SHAREDPROFILE" }
|
145
|
+
let(:s3_access_key) { "ACCESS_KEY_ID" }
|
146
|
+
let(:s3_secret_key) { "SECRET_ACCESS_KEY" }
|
147
|
+
|
148
|
+
it "sets s3_profile only" do
|
149
|
+
config = S3Cache.send(:s3_configuration)
|
150
|
+
expect(config[:profile]).to eq(s3_profile)
|
151
|
+
expect(config[:access_key_id]).to eq(nil)
|
152
|
+
expect(config[:secret_access_key]).to eq(nil)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
109
156
|
end
|
110
157
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnibus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.6.
|
4
|
+
version: 5.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -588,7 +588,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
588
588
|
version: '0'
|
589
589
|
requirements: []
|
590
590
|
rubyforge_project:
|
591
|
-
rubygems_version: 2.6.
|
591
|
+
rubygems_version: 2.6.10
|
592
592
|
signing_key:
|
593
593
|
specification_version: 4
|
594
594
|
summary: Omnibus is a framework for building self-installing, full-stack software
|