berkshelf-api 2.1.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/berkshelf/api.rb +2 -0
- data/lib/berkshelf/api/version.rb +1 -1
- data/spec/spec_helper.rb +0 -1
- data/spec/unit/berkshelf/api/cache_builder/worker/github_spec.rb +1 -1
- data/spec/unit/berkshelf/api/cache_builder_spec.rb +2 -2
- data/spec/unit/berkshelf/api/cache_manager_spec.rb +6 -4
- data/spec/unit/berkshelf/api/endpoint/v1_spec.rb +2 -2
- metadata +36 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0885907780f128af4d460a41f43fb559ff237a51
|
4
|
+
data.tar.gz: 595fc80a4f702614c90b1b8ccb1b807651e125b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a17a231d7327a0457c5838c81634d9e02dc791ddf5f1a7bfb85cd38f70876c5a4ebe3bd74cf9c2fe049cb697d7a1a6d9d06165aeb3ef0d77afe0132c45d8e722
|
7
|
+
data.tar.gz: a119e8d56782553d81d3775f921023d7261d202621f9426d4155e589b7e715b41f5d9f2115b60dc7acd76e239fdd8b5d00f74fb9f692e205355233690a54b662
|
data/README.md
CHANGED
@@ -8,6 +8,12 @@ A server which indexes cookbooks from various sources and hosts it over a REST A
|
|
8
8
|
|
9
9
|
The API server can be installed in two ways; from a Chef Cookbook (recommended) and from a Rubygem.
|
10
10
|
|
11
|
+
## Supports
|
12
|
+
|
13
|
+
Chef >= 12.2
|
14
|
+
Ubuntu 12.04/16.04
|
15
|
+
RHEL/CentOS 6.x/7.x
|
16
|
+
|
11
17
|
### Cookbook install
|
12
18
|
|
13
19
|
#### Basic
|
data/lib/berkshelf/api.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -44,7 +44,7 @@ describe Berkshelf::API::CacheBuilder::Worker::Github do
|
|
44
44
|
end
|
45
45
|
|
46
46
|
subject do
|
47
|
-
expect(Octokit::Client).to receive(:new)
|
47
|
+
expect(Octokit::Client).to receive(:new).and_return(connection)
|
48
48
|
described_class.new(organization: "opscode-cookbooks", access_token: "asdf")
|
49
49
|
end
|
50
50
|
|
@@ -67,8 +67,8 @@ describe Berkshelf::API::CacheBuilder do
|
|
67
67
|
end
|
68
68
|
|
69
69
|
before do
|
70
|
-
Berkshelf::API::Application.config.
|
71
|
-
Berkshelf::API::CacheBuilder::Worker.
|
70
|
+
allow(Berkshelf::API::Application.config).to receive(:endpoints).and_return(endpoint_array)
|
71
|
+
allow(Berkshelf::API::CacheBuilder::Worker).to receive(:[]).and_return(dummy_endpoint_klass, dummy_endpoint_klass)
|
72
72
|
end
|
73
73
|
|
74
74
|
it "has two workers" do
|
@@ -12,21 +12,23 @@ describe Berkshelf::API::CacheManager do
|
|
12
12
|
context "when a save file exists" do
|
13
13
|
before do
|
14
14
|
@tempfile = Tempfile.new('berkshelf-api-rspec')
|
15
|
-
described_class.
|
15
|
+
allow(described_class).to receive(:cache_file) { @tempfile.path }
|
16
16
|
end
|
17
17
|
after { @tempfile.close(true) }
|
18
18
|
|
19
19
|
it "loads the saved cache" do
|
20
|
-
described_class.
|
20
|
+
expect_any_instance_of(described_class).to receive(:load_save)
|
21
21
|
subject
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
context "when a save file does not exist" do
|
26
|
-
before
|
26
|
+
before do
|
27
|
+
allow(described_class).to receive(:cache_file).and_return(tmp_path.join('does_not_exist').to_s)
|
28
|
+
end
|
27
29
|
|
28
30
|
it "skips loading of the saved cache" do
|
29
|
-
described_class.
|
31
|
+
expect_any_instance_of(described_class).not_to receive(:load_save)
|
30
32
|
subject
|
31
33
|
end
|
32
34
|
end
|
@@ -74,8 +74,8 @@ describe Berkshelf::API::Endpoint::V1 do
|
|
74
74
|
|
75
75
|
describe "GET /status" do
|
76
76
|
before do
|
77
|
-
Berkshelf::API::Application.
|
78
|
-
Time.
|
77
|
+
allow(Berkshelf::API::Application).to receive(:start_time) { Time.at(0) }
|
78
|
+
allow(Time).to receive(:now) { Time.at(100) }
|
79
79
|
get '/status'
|
80
80
|
end
|
81
81
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: berkshelf-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Winsor
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-08-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ridley
|
@@ -73,14 +73,14 @@ dependencies:
|
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '0.
|
76
|
+
version: '0.14'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '0.
|
83
|
+
version: '0.14'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: grape-msgpack
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,22 +181,44 @@ dependencies:
|
|
181
181
|
name: varia_model
|
182
182
|
requirement: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
|
-
- - "
|
184
|
+
- - "~>"
|
185
185
|
- !ruby/object:Gem::Version
|
186
|
-
version: 0.4
|
187
|
-
|
186
|
+
version: '0.4'
|
187
|
+
type: :runtime
|
188
|
+
prerelease: false
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - "~>"
|
188
192
|
- !ruby/object:Gem::Version
|
189
|
-
version: 0.
|
193
|
+
version: '0.4'
|
194
|
+
- !ruby/object:Gem::Dependency
|
195
|
+
name: rack
|
196
|
+
requirement: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - "~>"
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '1.0'
|
190
201
|
type: :runtime
|
191
202
|
prerelease: false
|
192
203
|
version_requirements: !ruby/object:Gem::Requirement
|
193
204
|
requirements:
|
194
|
-
- - "
|
205
|
+
- - "~>"
|
195
206
|
- !ruby/object:Gem::Version
|
196
|
-
version:
|
197
|
-
|
207
|
+
version: '1.0'
|
208
|
+
- !ruby/object:Gem::Dependency
|
209
|
+
name: activesupport
|
210
|
+
requirement: !ruby/object:Gem::Requirement
|
211
|
+
requirements:
|
212
|
+
- - "~>"
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: '4.0'
|
215
|
+
type: :runtime
|
216
|
+
prerelease: false
|
217
|
+
version_requirements: !ruby/object:Gem::Requirement
|
218
|
+
requirements:
|
219
|
+
- - "~>"
|
198
220
|
- !ruby/object:Gem::Version
|
199
|
-
version:
|
221
|
+
version: '4.0'
|
200
222
|
description: Berkshelf dependency API server
|
201
223
|
email:
|
202
224
|
- jamie@vialstudios.com
|
@@ -275,7 +297,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
275
297
|
requirements:
|
276
298
|
- - ">="
|
277
299
|
- !ruby/object:Gem::Version
|
278
|
-
version: 1.
|
300
|
+
version: 2.1.0
|
279
301
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
280
302
|
requirements:
|
281
303
|
- - ">="
|
@@ -283,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
305
|
version: '0'
|
284
306
|
requirements: []
|
285
307
|
rubyforge_project:
|
286
|
-
rubygems_version: 2.
|
308
|
+
rubygems_version: 2.4.8
|
287
309
|
signing_key:
|
288
310
|
specification_version: 4
|
289
311
|
summary: A server which indexes cookbooks from various sources and hosts it over a
|
@@ -311,4 +333,3 @@ test_files:
|
|
311
333
|
- spec/unit/berkshelf/api/rest_gateway_spec.rb
|
312
334
|
- spec/unit/berkshelf/api/site_connector/supermarket_spec.rb
|
313
335
|
- spec/unit/berkshelf/api/srv_ctl_spec.rb
|
314
|
-
has_rdoc:
|