berkshelf-api 1.1.1 → 1.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +1 -0
- data/Gemfile +1 -2
- data/README.md +31 -5
- data/berkshelf-api.gemspec +5 -4
- data/lib/berkshelf/api/cache_builder/worker/chef_server.rb +10 -1
- data/lib/berkshelf/api/cache_builder/worker/file_store.rb +63 -0
- data/lib/berkshelf/api/cache_builder/worker/github.rb +8 -1
- data/lib/berkshelf/api/cache_builder/worker.rb +16 -0
- data/lib/berkshelf/api/cache_manager.rb +10 -5
- data/lib/berkshelf/api/config.rb +2 -2
- data/lib/berkshelf/api/core_ext/pathname.rb +9 -0
- data/lib/berkshelf/api/core_ext.rb +3 -0
- data/lib/berkshelf/api/dependency_cache.rb +9 -0
- data/lib/berkshelf/api/endpoint/v1.rb +1 -1
- data/lib/berkshelf/api/endpoint.rb +1 -0
- data/lib/berkshelf/api/site_connector/opscode.rb +2 -2
- data/lib/berkshelf/api/version.rb +1 -1
- data/lib/berkshelf/api.rb +2 -0
- data/spec/fixtures/cookbooks/example_cookbook/metadata.rb +6 -0
- data/spec/support/human_reaable.rb +9 -0
- data/spec/unit/berkshelf/api/cache_builder/worker/chef_server_spec.rb +2 -0
- data/spec/unit/berkshelf/api/cache_builder/worker/file_store_spec.rb +32 -0
- data/spec/unit/berkshelf/api/cache_builder/worker/github_spec.rb +2 -0
- data/spec/unit/berkshelf/api/cache_builder/worker/opscode_spec.rb +2 -0
- data/spec/unit/berkshelf/api/cache_manager_spec.rb +2 -0
- data/spec/unit/berkshelf/api/endpoint/v1_spec.rb +24 -3
- metadata +35 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34d85c7aab58658330e2d602a0e14b90f5fae361
|
4
|
+
data.tar.gz: 086aaca8e72f22a5929b0c387f7bcd764649f4f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b33d96269b99e1b66364a04c1f3b552c08060b04468a9936386acc169ffc4dd855668e810549c9426154739a9c9a85fa0c4e805ecad7d18def382d2e79ab35d2
|
7
|
+
data.tar.gz: 7b4a98ea88197847dd83f710e558df8446d2c11fe01954517faf8051ac311891627452a84174467b297370a69248f9eb2bfafef741997712a2437d902824b03a
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -6,7 +6,6 @@ group :development do
|
|
6
6
|
gem 'coolline'
|
7
7
|
gem 'fuubar'
|
8
8
|
gem 'redcarpet', platforms: :ruby
|
9
|
-
gem 'rspec'
|
10
9
|
gem 'yard'
|
11
10
|
|
12
11
|
gem 'guard'
|
@@ -33,7 +32,7 @@ group :development do
|
|
33
32
|
end
|
34
33
|
end
|
35
34
|
|
36
|
-
group :test do
|
35
|
+
group :development, :test do
|
37
36
|
gem 'rack-test'
|
38
37
|
gem 'rspec'
|
39
38
|
gem 'spork'
|
data/README.md
CHANGED
@@ -8,9 +8,14 @@ A server which indexes cookbooks from various sources and hosts it over a REST A
|
|
8
8
|
|
9
9
|
$ gem install berkshelf-api
|
10
10
|
|
11
|
-
##
|
11
|
+
## Running the server
|
12
12
|
|
13
|
-
|
13
|
+
$ berks-api
|
14
|
+
I, [2014-02-21T12:05:07.639699 #43671] INFO -- : Cache Manager starting...
|
15
|
+
I, [2014-02-21T12:05:07.639883 #43671] INFO -- : Loading save from /Users/reset/.berkshelf/api-server/cerch
|
16
|
+
I, [2014-02-21T12:05:07.640462 #43671] INFO -- : Cache contains 0 items
|
17
|
+
I, [2014-02-21T12:05:07.641021 #43671] INFO -- : Cache Builder starting...
|
18
|
+
I, [2014-02-21T12:05:07.723779 #43671] INFO -- : REST Gateway listening on 0.0.0.0:26200
|
14
19
|
|
15
20
|
## Supported Platforms
|
16
21
|
|
@@ -22,7 +27,7 @@ Ruby 1.9.1 and 1.9.2 are not officially supported. If you encounter problems, pl
|
|
22
27
|
|
23
28
|
## Configuring Endpoints
|
24
29
|
|
25
|
-
You may configure the endpoints to index by editing the JSON configuration file (default:
|
30
|
+
You may configure the endpoints to index by editing the JSON configuration file (default: `#{ENV['HOME']}/.berkshelf/api-server/config.json`).
|
26
31
|
|
27
32
|
### Opscode Community Site
|
28
33
|
|
@@ -59,7 +64,8 @@ You may configure the endpoints to index by editing the JSON configuration file
|
|
59
64
|
### Github Organization
|
60
65
|
|
61
66
|
Github limits the rate of requests to their API if not authenticated. For this reason the access_token option
|
62
|
-
is required.
|
67
|
+
is required. The api_endpoint, web_endpoint and ssl_verify options are only needed when you want to point to
|
68
|
+
a Github Enterprise server within your own organization
|
63
69
|
|
64
70
|
```json
|
65
71
|
{
|
@@ -68,7 +74,27 @@ is required.
|
|
68
74
|
"type": "github",
|
69
75
|
"options": {
|
70
76
|
"organization": "opscode-cookbooks",
|
71
|
-
"access_token": ""
|
77
|
+
"access_token": "",
|
78
|
+
"api_endpoint": "https://github.enterprise.local/api/v3",
|
79
|
+
"web_endpoint": "https://github.enterprise.local",
|
80
|
+
"ssl_verify": true
|
81
|
+
}
|
82
|
+
}
|
83
|
+
]
|
84
|
+
}
|
85
|
+
```
|
86
|
+
|
87
|
+
### FileStore directory
|
88
|
+
|
89
|
+
A local directory containing cookbooks.
|
90
|
+
|
91
|
+
```json
|
92
|
+
{
|
93
|
+
"endpoints": [
|
94
|
+
{
|
95
|
+
"type": "file_store",
|
96
|
+
"options": {
|
97
|
+
"path": "/Users/chef/code/cookbooks"
|
72
98
|
}
|
73
99
|
}
|
74
100
|
]
|
data/berkshelf-api.gemspec
CHANGED
@@ -19,14 +19,15 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
spec.required_ruby_version = ">= 1.9.3"
|
21
21
|
|
22
|
-
spec.add_dependency 'ridley', '~>
|
22
|
+
spec.add_dependency 'ridley', '~> 3.0.0.rc1'
|
23
23
|
spec.add_dependency 'celluloid', '~> 0.15'
|
24
24
|
spec.add_dependency 'reel', '>= 0.4.0'
|
25
|
-
spec.add_dependency 'grape', '~> 0.
|
25
|
+
spec.add_dependency 'grape', '~> 0.6'
|
26
|
+
spec.add_dependency 'grape-msgpack', '~> 0.1'
|
26
27
|
spec.add_dependency 'hashie', '>= 2.0.4'
|
27
|
-
spec.add_dependency 'faraday', '~> 0.
|
28
|
+
spec.add_dependency 'faraday', '~> 0.9.0'
|
28
29
|
spec.add_dependency 'retryable', '~> 1.3.3'
|
29
|
-
spec.add_dependency 'archive', '= 0.0.
|
30
|
+
spec.add_dependency 'archive', '= 0.0.5'
|
30
31
|
spec.add_dependency 'buff-config', '~> 0.1'
|
31
32
|
spec.add_dependency 'octokit', '~> 2.6'
|
32
33
|
spec.add_dependency 'solve'
|
@@ -6,6 +6,9 @@ module Berkshelf::API
|
|
6
6
|
|
7
7
|
finalizer :finalize_callback
|
8
8
|
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :url
|
11
|
+
|
9
12
|
# @option options [String] :url
|
10
13
|
# the URL of the target Chef Server
|
11
14
|
# @option options [String] :client_name
|
@@ -15,11 +18,17 @@ module Berkshelf::API
|
|
15
18
|
# @option options [Boolean] :ssl_verify
|
16
19
|
# turn ssl verification off if you have an unsigned SSL certificate
|
17
20
|
def initialize(options = {})
|
18
|
-
@
|
21
|
+
@url = options[:url]
|
22
|
+
@connection = Ridley::Client.new_link(server_url: url, client_key: options[:client_key],
|
19
23
|
client_name: options[:client_name], ssl: { verify: options[:ssl_verify] })
|
20
24
|
super
|
21
25
|
end
|
22
26
|
|
27
|
+
# @return [String]
|
28
|
+
def to_s
|
29
|
+
friendly_name(url)
|
30
|
+
end
|
31
|
+
|
23
32
|
# @return [Array<RemoteCookbook>]
|
24
33
|
# The list of cookbooks this builder can find
|
25
34
|
def cookbooks
|
@@ -0,0 +1,63 @@
|
|
1
|
+
module Berkshelf::API
|
2
|
+
class CacheBuilder
|
3
|
+
module Worker
|
4
|
+
class FileStore < Worker::Base
|
5
|
+
worker_type "file_store"
|
6
|
+
|
7
|
+
# @return [String]
|
8
|
+
attr_reader :path
|
9
|
+
|
10
|
+
# @option options [String] :path
|
11
|
+
# the directory to search for local cookbooks
|
12
|
+
def initialize(options = {})
|
13
|
+
@path = Pathname(options[:path])
|
14
|
+
super(options)
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [String]
|
18
|
+
def to_s
|
19
|
+
friendly_name(path)
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [Array<RemoteCookbook>]
|
23
|
+
# The list of cookbooks this builder can find
|
24
|
+
def cookbooks
|
25
|
+
[].tap do |cookbook_versions|
|
26
|
+
@path.each_child do |dir|
|
27
|
+
next unless dir.cookbook?
|
28
|
+
begin
|
29
|
+
cookbook = Ridley::Chef::Cookbook.from_path(dir)
|
30
|
+
cookbook_versions << RemoteCookbook.new(cookbook.cookbook_name, cookbook.version,
|
31
|
+
self.class.worker_type, cookbook.path, priority)
|
32
|
+
rescue => ex
|
33
|
+
log.debug ex.message
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# @param [RemoteCookbook] remote
|
40
|
+
#
|
41
|
+
# @return [Ridley::Chef::Cookbook::Metadata]
|
42
|
+
def metadata(remote)
|
43
|
+
load_metadata(remote.location_path)
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
# Helper function for loading metadata from a particular directory
|
49
|
+
#
|
50
|
+
# @param [String] path
|
51
|
+
# path of directory to load from
|
52
|
+
#
|
53
|
+
# @return [Ridley::Chef::Cookbook::Metadata, nil]
|
54
|
+
def load_metadata(path)
|
55
|
+
cookbook = Ridley::Chef::Cookbook.from_path(path)
|
56
|
+
cookbook.metadata
|
57
|
+
rescue => ex
|
58
|
+
nil
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -17,11 +17,18 @@ module Berkshelf::API
|
|
17
17
|
# authentication token for accessing the Github organization. This is necessary
|
18
18
|
# since Github throttles unauthenticated API requests
|
19
19
|
def initialize(options = {})
|
20
|
-
@connection = Octokit::Client.new(access_token: options[:access_token], auto_paginate: true
|
20
|
+
@connection = Octokit::Client.new(access_token: options[:access_token], auto_paginate: true,
|
21
|
+
api_endpoint: options[:api_endpoint], web_endpoint: options[:web_endpoint],
|
22
|
+
connection_options: {ssl: {verify: options[:ssl_verify].nil? ? true : options[:ssl_verify]}})
|
21
23
|
@organization = options[:organization]
|
22
24
|
super(options)
|
23
25
|
end
|
24
26
|
|
27
|
+
# @return [String]
|
28
|
+
def to_s
|
29
|
+
friendly_name(organization)
|
30
|
+
end
|
31
|
+
|
25
32
|
# @return [Array<RemoteCookbook>]
|
26
33
|
# The list of cookbooks this builder can find
|
27
34
|
def cookbooks
|
@@ -22,6 +22,11 @@ module Berkshelf::API
|
|
22
22
|
@priority = options[:priority]
|
23
23
|
end
|
24
24
|
|
25
|
+
# @return [String]
|
26
|
+
def to_s
|
27
|
+
friendly_name
|
28
|
+
end
|
29
|
+
|
25
30
|
# @abstract
|
26
31
|
#
|
27
32
|
# @param [RemoteCookbook] remote
|
@@ -38,6 +43,17 @@ module Berkshelf::API
|
|
38
43
|
def cookbooks
|
39
44
|
raise RuntimeError, "must be implemented"
|
40
45
|
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
# @param [String] data
|
50
|
+
# any string to append to the worker_type
|
51
|
+
# @return [String]
|
52
|
+
def friendly_name(data = nil)
|
53
|
+
string = self.class.worker_type.dup
|
54
|
+
string << ": #{data}" if data
|
55
|
+
string
|
56
|
+
end
|
41
57
|
end
|
42
58
|
|
43
59
|
class << self
|
@@ -23,7 +23,7 @@ module Berkshelf::API
|
|
23
23
|
attr_reader :cache
|
24
24
|
|
25
25
|
def initialize
|
26
|
-
log.info "
|
26
|
+
log.info "#{self} starting..."
|
27
27
|
@cache = DependencyCache.new
|
28
28
|
load_save if File.exist?(self.class.cache_file)
|
29
29
|
every(SAVE_INTERVAL) { save }
|
@@ -79,9 +79,9 @@ module Berkshelf::API
|
|
79
79
|
|
80
80
|
# @param [CacheBuilder::Worker::Base] worker
|
81
81
|
def process_worker(worker)
|
82
|
-
log.info "
|
82
|
+
log.info "Processing #{worker}"
|
83
83
|
remote_cookbooks = worker.cookbooks
|
84
|
-
log.info "
|
84
|
+
log.info "Found #{remote_cookbooks.size} cookbooks from #{worker}"
|
85
85
|
created_cookbooks, deleted_cookbooks = diff(remote_cookbooks, worker.priority)
|
86
86
|
log.debug "#{created_cookbooks.size} cookbooks to be added to the cache from #{worker}"
|
87
87
|
log.debug "#{deleted_cookbooks.size} cookbooks to be removed from the cache from #{worker}"
|
@@ -93,7 +93,7 @@ module Berkshelf::API
|
|
93
93
|
created_cookbooks_with_metadata = []
|
94
94
|
until created_cookbooks.empty?
|
95
95
|
work = created_cookbooks.slice!(0,500)
|
96
|
-
log.info "
|
96
|
+
log.info "Processing metadata for #{work.size} cookbooks with #{created_cookbooks.size} remaining on #{worker}"
|
97
97
|
work.map! do |remote|
|
98
98
|
[ remote, worker.future(:metadata, remote) ]
|
99
99
|
end.map! do |remote, metadata|
|
@@ -103,7 +103,7 @@ module Berkshelf::API
|
|
103
103
|
created_cookbooks_with_metadata += work.compact
|
104
104
|
end
|
105
105
|
|
106
|
-
log.info "
|
106
|
+
log.info "About to merge cookbooks"
|
107
107
|
merge(created_cookbooks_with_metadata, deleted_cookbooks)
|
108
108
|
log.info "#{self} cache updated."
|
109
109
|
end
|
@@ -124,6 +124,11 @@ module Berkshelf::API
|
|
124
124
|
log.info "Cache contains #{@cache.cookbooks.size} items"
|
125
125
|
end
|
126
126
|
|
127
|
+
# @return [String]
|
128
|
+
def to_s
|
129
|
+
"Cache manager"
|
130
|
+
end
|
131
|
+
|
127
132
|
private
|
128
133
|
|
129
134
|
def merge(created_cookbooks, deleted_cookbooks)
|
data/lib/berkshelf/api/config.rb
CHANGED
@@ -6,14 +6,14 @@ module Berkshelf::API
|
|
6
6
|
class << self
|
7
7
|
# @return [String]
|
8
8
|
def default_path
|
9
|
-
home_path = ENV['BERKSHELF_API_PATH'] || "
|
9
|
+
home_path = ENV['BERKSHELF_API_PATH'] || "#{ENV['HOME']}/.berkshelf/api-server"
|
10
10
|
File.expand_path(File.join(home_path, "config.json"))
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
attribute 'home_path',
|
15
15
|
type: String,
|
16
|
-
default: File.expand_path("
|
16
|
+
default: File.expand_path("#{ENV['HOME']}/.berkshelf/api-server")
|
17
17
|
|
18
18
|
attribute 'endpoints',
|
19
19
|
type: Array,
|
@@ -117,6 +117,15 @@ module Berkshelf::API
|
|
117
117
|
JSON.generate(output, options)
|
118
118
|
end
|
119
119
|
|
120
|
+
# @param [Hash] options
|
121
|
+
#
|
122
|
+
# @return [String]
|
123
|
+
def to_msgpack(options = {})
|
124
|
+
output = to_hash
|
125
|
+
output['endpoints_checksum'] = Application.config.endpoints_checksum if options[:saving]
|
126
|
+
MessagePack.pack(output)
|
127
|
+
end
|
128
|
+
|
120
129
|
# @return [Array<RemoteCookbook>]
|
121
130
|
def cookbooks
|
122
131
|
[].tap do |remote_cookbooks|
|
@@ -3,7 +3,7 @@ module Berkshelf::API
|
|
3
3
|
class V1 < Endpoint::Base
|
4
4
|
helpers Berkshelf::API::Mixin::Services
|
5
5
|
version 'v1', using: :header, vendor: 'berkshelf'
|
6
|
-
|
6
|
+
default_format :json
|
7
7
|
|
8
8
|
rescue_from Grape::Exceptions::Validation do |e|
|
9
9
|
body = JSON.generate({status: e.status, message: e.message, param: e.param})
|
@@ -99,14 +99,14 @@ module Berkshelf::API
|
|
99
99
|
#
|
100
100
|
# @return [String, nil]
|
101
101
|
def download(name, version, destination = Dir.mktmpdir)
|
102
|
-
log.debug "
|
102
|
+
log.debug "Downloading #{name}(#{version})"
|
103
103
|
if uri = download_uri(name, version)
|
104
104
|
begin
|
105
105
|
archive = stream(uri)
|
106
106
|
Archive.extract(archive.path, destination)
|
107
107
|
destination
|
108
108
|
rescue => ex
|
109
|
-
log.warn "
|
109
|
+
log.warn "Error downloading/extracting #{name} (#{version}): #{ex}"
|
110
110
|
nil
|
111
111
|
ensure
|
112
112
|
archive.unlink unless archive.nil?
|
data/lib/berkshelf/api.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Berkshelf::API::CacheBuilder::Worker::FileStore do
|
4
|
+
describe "ClassMethods" do
|
5
|
+
subject { described_class }
|
6
|
+
its(:worker_type) { should eql("file_store") }
|
7
|
+
end
|
8
|
+
|
9
|
+
subject do
|
10
|
+
described_class.new(path: fixtures_path.join("cookbooks"))
|
11
|
+
end
|
12
|
+
|
13
|
+
it_behaves_like "a human-readable string"
|
14
|
+
|
15
|
+
describe "#cookbooks" do
|
16
|
+
it "returns an array containing an item for each valid cookbook on the server" do
|
17
|
+
expect(subject.cookbooks).to have(1).items
|
18
|
+
end
|
19
|
+
|
20
|
+
it "returns an array of RemoteCookbooks" do
|
21
|
+
subject.cookbooks.each do |cookbook|
|
22
|
+
expect(cookbook).to be_a(Berkshelf::API::RemoteCookbook)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
it "each RemoteCookbook is tagged with a location_type matching the worker_type of the builder" do
|
27
|
+
subject.cookbooks.each do |cookbook|
|
28
|
+
expect(cookbook.location_type).to eql(described_class.worker_type)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -44,6 +44,8 @@ describe Berkshelf::API::CacheBuilder::Worker::Github do
|
|
44
44
|
described_class.new(organization: "opscode-cookbooks", access_token: "asdf")
|
45
45
|
end
|
46
46
|
|
47
|
+
it_behaves_like "a human-readable string"
|
48
|
+
|
47
49
|
describe "#cookbooks" do
|
48
50
|
before do
|
49
51
|
expect(connection).to receive(:organization_repositories) { repos }
|
@@ -20,6 +20,8 @@ describe Berkshelf::API::CacheBuilder::Worker::Opscode do
|
|
20
20
|
described_class.new
|
21
21
|
end
|
22
22
|
|
23
|
+
it_behaves_like "a human-readable string"
|
24
|
+
|
23
25
|
describe "#cookbooks" do
|
24
26
|
let(:location_type) { described_class.worker_type }
|
25
27
|
let(:location_path) { Berkshelf::API::SiteConnector::Opscode::V1_API}
|
@@ -6,6 +6,7 @@ describe Berkshelf::API::Endpoint::V1 do
|
|
6
6
|
|
7
7
|
let(:app) { described_class.new }
|
8
8
|
let(:cache_warm) { false }
|
9
|
+
let(:rack_env) { Hash.new }
|
9
10
|
|
10
11
|
before do
|
11
12
|
Berkshelf::API::CacheManager.start
|
@@ -15,14 +16,34 @@ describe Berkshelf::API::Endpoint::V1 do
|
|
15
16
|
subject { last_response }
|
16
17
|
|
17
18
|
describe "GET /universe" do
|
18
|
-
before { get '/universe' }
|
19
|
+
before { get '/universe', {}, rack_env }
|
19
20
|
let(:app_cache) { cache_manager.cache }
|
20
21
|
|
21
22
|
context "the cache has been warmed" do
|
22
23
|
let(:cache_warm) { true }
|
24
|
+
context "the default format is json" do
|
25
|
+
subject { last_response }
|
26
|
+
let(:app_cache) { cache_manager.cache }
|
23
27
|
|
24
|
-
|
25
|
-
|
28
|
+
its(:status) { should be(200) }
|
29
|
+
its(:body) { should eq(app_cache.to_json) }
|
30
|
+
end
|
31
|
+
context "the user requests json" do
|
32
|
+
subject { last_response }
|
33
|
+
let(:app_cache) { cache_manager.cache }
|
34
|
+
let(:rack_env) { { 'HTTP_ACCEPT' => 'application/json' } }
|
35
|
+
|
36
|
+
its(:status) { should be(200) }
|
37
|
+
its(:body) { should eq(app_cache.to_json) }
|
38
|
+
end
|
39
|
+
context "the user requests msgpack" do
|
40
|
+
subject { last_response }
|
41
|
+
let(:app_cache) { cache_manager.cache }
|
42
|
+
let(:rack_env) { { 'HTTP_ACCEPT' => 'application/x-msgpack' } }
|
43
|
+
|
44
|
+
its(:status) { should be(200) }
|
45
|
+
its(:body) { should eq(app_cache.to_msgpack) }
|
46
|
+
end
|
26
47
|
end
|
27
48
|
|
28
49
|
context "the cache is still warming" do
|
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: 1.
|
4
|
+
version: 1.2.0.rc1
|
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: 2014-
|
12
|
+
date: 2014-04-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ridley
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ~>
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 3.0.0.rc1
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: 3.0.0.rc1
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: celluloid
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,14 +59,28 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - ~>
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.
|
62
|
+
version: '0.6'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
69
|
+
version: '0.6'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: grape-msgpack
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0.1'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ~>
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0.1'
|
70
84
|
- !ruby/object:Gem::Dependency
|
71
85
|
name: hashie
|
72
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,14 +101,14 @@ dependencies:
|
|
87
101
|
requirements:
|
88
102
|
- - ~>
|
89
103
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0.
|
104
|
+
version: 0.9.0
|
91
105
|
type: :runtime
|
92
106
|
prerelease: false
|
93
107
|
version_requirements: !ruby/object:Gem::Requirement
|
94
108
|
requirements:
|
95
109
|
- - ~>
|
96
110
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0.
|
111
|
+
version: 0.9.0
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
113
|
name: retryable
|
100
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,14 +129,14 @@ dependencies:
|
|
115
129
|
requirements:
|
116
130
|
- - '='
|
117
131
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.0.
|
132
|
+
version: 0.0.5
|
119
133
|
type: :runtime
|
120
134
|
prerelease: false
|
121
135
|
version_requirements: !ruby/object:Gem::Requirement
|
122
136
|
requirements:
|
123
137
|
- - '='
|
124
138
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.0.
|
139
|
+
version: 0.0.5
|
126
140
|
- !ruby/object:Gem::Dependency
|
127
141
|
name: buff-config
|
128
142
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,10 +248,13 @@ files:
|
|
234
248
|
- lib/berkshelf/api/cache_builder.rb
|
235
249
|
- lib/berkshelf/api/cache_builder/worker.rb
|
236
250
|
- lib/berkshelf/api/cache_builder/worker/chef_server.rb
|
251
|
+
- lib/berkshelf/api/cache_builder/worker/file_store.rb
|
237
252
|
- lib/berkshelf/api/cache_builder/worker/github.rb
|
238
253
|
- lib/berkshelf/api/cache_builder/worker/opscode.rb
|
239
254
|
- lib/berkshelf/api/cache_manager.rb
|
240
255
|
- lib/berkshelf/api/config.rb
|
256
|
+
- lib/berkshelf/api/core_ext.rb
|
257
|
+
- lib/berkshelf/api/core_ext/pathname.rb
|
241
258
|
- lib/berkshelf/api/cucumber.rb
|
242
259
|
- lib/berkshelf/api/dependency_cache.rb
|
243
260
|
- lib/berkshelf/api/endpoint.rb
|
@@ -256,12 +273,15 @@ files:
|
|
256
273
|
- lib/berkshelf/api/site_connector/opscode.rb
|
257
274
|
- lib/berkshelf/api/srv_ctl.rb
|
258
275
|
- lib/berkshelf/api/version.rb
|
276
|
+
- spec/fixtures/cookbooks/example_cookbook/metadata.rb
|
259
277
|
- spec/fixtures/reset.pem
|
260
278
|
- spec/spec_helper.rb
|
261
279
|
- spec/support/actor_mocking.rb
|
262
280
|
- spec/support/chef_server.rb
|
281
|
+
- spec/support/human_reaable.rb
|
263
282
|
- spec/unit/berkshelf/api/application_spec.rb
|
264
283
|
- spec/unit/berkshelf/api/cache_builder/worker/chef_server_spec.rb
|
284
|
+
- spec/unit/berkshelf/api/cache_builder/worker/file_store_spec.rb
|
265
285
|
- spec/unit/berkshelf/api/cache_builder/worker/github_spec.rb
|
266
286
|
- spec/unit/berkshelf/api/cache_builder/worker/opscode_spec.rb
|
267
287
|
- spec/unit/berkshelf/api/cache_builder/worker_spec.rb
|
@@ -291,9 +311,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
291
311
|
version: 1.9.3
|
292
312
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
293
313
|
requirements:
|
294
|
-
- - '
|
314
|
+
- - '>'
|
295
315
|
- !ruby/object:Gem::Version
|
296
|
-
version:
|
316
|
+
version: 1.3.1
|
297
317
|
requirements: []
|
298
318
|
rubyforge_project:
|
299
319
|
rubygems_version: 2.0.14
|
@@ -302,12 +322,15 @@ specification_version: 4
|
|
302
322
|
summary: A server which indexes cookbooks from various sources and hosts it over a
|
303
323
|
REST API
|
304
324
|
test_files:
|
325
|
+
- spec/fixtures/cookbooks/example_cookbook/metadata.rb
|
305
326
|
- spec/fixtures/reset.pem
|
306
327
|
- spec/spec_helper.rb
|
307
328
|
- spec/support/actor_mocking.rb
|
308
329
|
- spec/support/chef_server.rb
|
330
|
+
- spec/support/human_reaable.rb
|
309
331
|
- spec/unit/berkshelf/api/application_spec.rb
|
310
332
|
- spec/unit/berkshelf/api/cache_builder/worker/chef_server_spec.rb
|
333
|
+
- spec/unit/berkshelf/api/cache_builder/worker/file_store_spec.rb
|
311
334
|
- spec/unit/berkshelf/api/cache_builder/worker/github_spec.rb
|
312
335
|
- spec/unit/berkshelf/api/cache_builder/worker/opscode_spec.rb
|
313
336
|
- spec/unit/berkshelf/api/cache_builder/worker_spec.rb
|