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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2bba098cd001ef4cca2d2553c7d9ec3f78ba00bf
4
- data.tar.gz: 43d7e517ec926f55f1598fafa95da8d7d2945b13
3
+ metadata.gz: 0885907780f128af4d460a41f43fb559ff237a51
4
+ data.tar.gz: 595fc80a4f702614c90b1b8ccb1b807651e125b2
5
5
  SHA512:
6
- metadata.gz: ee2b6248f9bc9c63ab5c758d3a5c9ac57c8a327350a475a554c4df25d2c60c18b7c52268afe3b7db6ce854652776597b23cf528b7091d0604fc4fc64fd425806
7
- data.tar.gz: 6cbfd21ec66bf571119b27be42c401c55b613763742b993aa32b86a933e1d9176f20b08c5f2d6d30039c2ffa35afcfad32d2f3f17618efed8c10fa52b1317e29
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
@@ -8,6 +8,8 @@ require_relative 'api/core_ext'
8
8
 
9
9
  module Berkshelf
10
10
  module API
11
+ Encoding.default_external = Encoding::UTF_8
12
+
11
13
  USER_AGENT = "Berkshelf API v#{Berkshelf::API::VERSION}".freeze
12
14
 
13
15
  require_relative 'api/errors'
@@ -1,5 +1,5 @@
1
1
  module Berkshelf
2
2
  module API
3
- VERSION = "2.1.3"
3
+ VERSION = "2.2.0"
4
4
  end
5
5
  end
@@ -17,7 +17,6 @@ Spork.prefork do
17
17
  end
18
18
 
19
19
  config.mock_with :rspec
20
- config.treat_symbols_as_metadata_keys_with_true_values = true
21
20
  config.filter_run focus: true
22
21
  config.run_all_when_everything_filtered = true
23
22
 
@@ -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) { connection }
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.stub(:endpoints).and_return(endpoint_array)
71
- Berkshelf::API::CacheBuilder::Worker.stub(:[]).and_return(dummy_endpoint_klass, dummy_endpoint_klass)
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.stub(:cache_file) { @tempfile.path }
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.any_instance.should_receive(:load_save)
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 { described_class.stub(cache_file: tmp_path.join('does_not_exist').to_s) }
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.any_instance.should_not_receive(:load_save)
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.stub(:start_time) { Time.at(0) }
78
- Time.stub(:now) { Time.at(100) }
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.1.3
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-02-20 00:00:00.000000000 Z
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.6'
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.6'
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.0
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.5.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: 0.4.0
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: 0.5.0
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.9.3
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.5.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: