berkshelf-api 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 971e1180855e205e466cb354e752fe0c0c94c2dc
4
+ data.tar.gz: 5bbc0b19b1cb8b57e86014010a3b1d2690c87ded
5
+ SHA512:
6
+ metadata.gz: 6a3a6d8aa8afae5b117264e45752abfbbf835461d5db735c4e4a47a66b08d317b6dbb6bc6ef6ad6b8d2c7ffcff5cafa0fdd9ed62bfbef9d9671bae8278eebadc
7
+ data.tar.gz: 2f3961d35ffa57970fe463174631d414d0b9fa706ea789f8907a43eeefcf29338e16706599a224d4544811124772ef12095bdbced01b4e3e824a99f0983cede5
@@ -1,3 +1,11 @@
1
+ # 2.1.1
2
+
3
+ * Bug Fixes
4
+ * Calling berks_dependency/2 rspec support function no longer results in a runtime crash
5
+ * Failures when calling Supermarket.universe/0 will now return a hash instead of a boolean
6
+ * Cookbook name, not repo name, will be used when caching Github cookbooks
7
+ * Group/User will be created in proper order during cookbook converge
8
+
1
9
  # 2.1.0
2
10
 
3
11
  * Enhancements
data/README.md CHANGED
@@ -26,7 +26,7 @@ Create an environment
26
26
 
27
27
  Bootstrap a server into that environment
28
28
 
29
- $ knife ec2 server create -I ami-22e08b12 -f t1.micro -E berks-api-production -r "recipe[organization-base::default]" -G ssh-admin,http-https --ssh-user ubuntu
29
+ $ knife ec2 server create -I ami-23f78e13 -f t1.micro -E berks-api-production -r "recipe[organization-base::default]" -G ssh-admin,http-https --ssh-user ubuntu
30
30
 
31
31
  Install the cookbooks into your environment
32
32
 
@@ -51,7 +51,7 @@ module Berkshelf::API
51
51
  next unless cookbook_metadata = load_metadata(repo.name, tag.name)
52
52
 
53
53
  if cookbook_metadata.version.to_s == match[:version].to_s
54
- cookbook_versions << RemoteCookbook.new(repo.name, cookbook_metadata.version,
54
+ cookbook_versions << RemoteCookbook.new(cookbook_metadata.name, cookbook_metadata.version,
55
55
  self.class.worker_type, repo.html_url, priority)
56
56
  else
57
57
  log.warn "Version found in metadata for #{repo.name} (#{tag.name}) does not " +
@@ -8,12 +8,12 @@ module Berkshelf::API
8
8
  attr_accessor :info
9
9
 
10
10
  def initialize(name, version, location_type, location_path, priority, info = {})
11
- @name = name
12
- @version = version
11
+ @name = name
12
+ @version = version
13
13
  @location_type = location_type
14
14
  @location_path = location_path
15
- @priority = priority
16
- @info = info
15
+ @priority = priority
16
+ @info = info
17
17
  end
18
18
 
19
19
  def hash
@@ -10,7 +10,7 @@ module Berkshelf::API
10
10
  options[:platforms] ||= Hash.new
11
11
  options[:dependencies] ||= Hash.new
12
12
  cookbook = RemoteCookbook.new(name, version,
13
- CacheBuilder::Worker::Supermarket.worker_type, SiteConnector::Supermarket::V1_API)
13
+ CacheBuilder::Worker::Supermarket.worker_type, SiteConnector::Supermarket::V1_API, 0)
14
14
  metadata = Ridley::Chef::Cookbook::Metadata.new
15
15
  options[:platforms].each { |name, version| metadata.supports(name, version) }
16
16
  options[:dependencies].each { |name, constraint| metadata.depends(name, constraint) }
@@ -1,5 +1,4 @@
1
1
  require 'open-uri'
2
- require 'retryable'
3
2
  require 'archive'
4
3
  require 'tempfile'
5
4
 
@@ -32,6 +31,8 @@ module Berkshelf::API
32
31
  # The timeout for the HTTP request
33
32
  TIMEOUT = 15
34
33
 
34
+ EMPTY_UNIVERSE = {}.freeze
35
+
35
36
  # @return [String]
36
37
  attr_reader :api_url
37
38
 
@@ -53,14 +54,17 @@ module Berkshelf::API
53
54
  end
54
55
  rescue JSON::ParserError => e
55
56
  log.error "Failed to parse JSON: #{e}"
57
+ EMPTY_UNIVERSE
56
58
  rescue Timeout::Error
57
59
  log.error "Failed to get `#{universe_url}' in #{TIMEOUT} seconds!"
60
+ EMPTY_UNIVERSE
58
61
  rescue SocketError,
59
62
  Errno::ECONNREFUSED,
60
63
  Errno::ECONNRESET,
61
64
  Errno::ENETUNREACH,
62
65
  OpenURI::HTTPError => e
63
66
  log.error "Failed to get `#{universe_url}': #{e}"
67
+ EMPTY_UNIVERSE
64
68
  end
65
69
  end
66
70
  end
@@ -1,5 +1,5 @@
1
1
  module Berkshelf
2
2
  module API
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: berkshelf-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
5
- prerelease:
4
+ version: 2.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Jamie Winsor
@@ -10,146 +9,115 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2014-08-01 00:00:00.000000000 Z
12
+ date: 2015-01-14 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: ridley
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ~>
18
+ - - "~>"
21
19
  - !ruby/object:Gem::Version
22
20
  version: '4.0'
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ~>
25
+ - - "~>"
29
26
  - !ruby/object:Gem::Version
30
27
  version: '4.0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: celluloid
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ~>
32
+ - - "~>"
37
33
  - !ruby/object:Gem::Version
38
34
  version: 0.16.0.pre
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ~>
39
+ - - "~>"
45
40
  - !ruby/object:Gem::Version
46
41
  version: 0.16.0.pre
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: celluloid-io
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ~>
46
+ - - "~>"
53
47
  - !ruby/object:Gem::Version
54
48
  version: 0.16.0.pre
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ~>
53
+ - - "~>"
61
54
  - !ruby/object:Gem::Version
62
55
  version: 0.16.0.pre
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: reel
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
- - - ~>
60
+ - - "~>"
69
61
  - !ruby/object:Gem::Version
70
62
  version: 0.5.0
71
63
  type: :runtime
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
- - - ~>
67
+ - - "~>"
77
68
  - !ruby/object:Gem::Version
78
69
  version: 0.5.0
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: grape
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ~>
74
+ - - "~>"
85
75
  - !ruby/object:Gem::Version
86
76
  version: '0.6'
87
77
  type: :runtime
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ~>
81
+ - - "~>"
93
82
  - !ruby/object:Gem::Version
94
83
  version: '0.6'
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: grape-msgpack
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ~>
88
+ - - "~>"
101
89
  - !ruby/object:Gem::Version
102
90
  version: '0.1'
103
91
  type: :runtime
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ~>
95
+ - - "~>"
109
96
  - !ruby/object:Gem::Version
110
97
  version: '0.1'
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: hashie
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
- - - ! '>='
102
+ - - ">="
117
103
  - !ruby/object:Gem::Version
118
104
  version: 2.0.4
119
- - - <
105
+ - - "<"
120
106
  - !ruby/object:Gem::Version
121
107
  version: 3.0.0
122
108
  type: :runtime
123
109
  prerelease: false
124
110
  version_requirements: !ruby/object:Gem::Requirement
125
- none: false
126
111
  requirements:
127
- - - ! '>='
112
+ - - ">="
128
113
  - !ruby/object:Gem::Version
129
114
  version: 2.0.4
130
- - - <
115
+ - - "<"
131
116
  - !ruby/object:Gem::Version
132
117
  version: 3.0.0
133
- - !ruby/object:Gem::Dependency
134
- name: retryable
135
- requirement: !ruby/object:Gem::Requirement
136
- none: false
137
- requirements:
138
- - - ~>
139
- - !ruby/object:Gem::Version
140
- version: 1.3.3
141
- type: :runtime
142
- prerelease: false
143
- version_requirements: !ruby/object:Gem::Requirement
144
- none: false
145
- requirements:
146
- - - ~>
147
- - !ruby/object:Gem::Version
148
- version: 1.3.3
149
118
  - !ruby/object:Gem::Dependency
150
119
  name: archive
151
120
  requirement: !ruby/object:Gem::Requirement
152
- none: false
153
121
  requirements:
154
122
  - - '='
155
123
  - !ruby/object:Gem::Version
@@ -157,7 +125,6 @@ dependencies:
157
125
  type: :runtime
158
126
  prerelease: false
159
127
  version_requirements: !ruby/object:Gem::Requirement
160
- none: false
161
128
  requirements:
162
129
  - - '='
163
130
  - !ruby/object:Gem::Version
@@ -165,49 +132,43 @@ dependencies:
165
132
  - !ruby/object:Gem::Dependency
166
133
  name: buff-config
167
134
  requirement: !ruby/object:Gem::Requirement
168
- none: false
169
135
  requirements:
170
- - - ~>
136
+ - - "~>"
171
137
  - !ruby/object:Gem::Version
172
138
  version: '1.0'
173
139
  type: :runtime
174
140
  prerelease: false
175
141
  version_requirements: !ruby/object:Gem::Requirement
176
- none: false
177
142
  requirements:
178
- - - ~>
143
+ - - "~>"
179
144
  - !ruby/object:Gem::Version
180
145
  version: '1.0'
181
146
  - !ruby/object:Gem::Dependency
182
147
  name: octokit
183
148
  requirement: !ruby/object:Gem::Requirement
184
- none: false
185
149
  requirements:
186
- - - ~>
150
+ - - "~>"
187
151
  - !ruby/object:Gem::Version
188
152
  version: '3.0'
189
153
  type: :runtime
190
154
  prerelease: false
191
155
  version_requirements: !ruby/object:Gem::Requirement
192
- none: false
193
156
  requirements:
194
- - - ~>
157
+ - - "~>"
195
158
  - !ruby/object:Gem::Version
196
159
  version: '3.0'
197
160
  - !ruby/object:Gem::Dependency
198
161
  name: semverse
199
162
  requirement: !ruby/object:Gem::Requirement
200
- none: false
201
163
  requirements:
202
- - - ~>
164
+ - - "~>"
203
165
  - !ruby/object:Gem::Version
204
166
  version: '1.0'
205
167
  type: :runtime
206
168
  prerelease: false
207
169
  version_requirements: !ruby/object:Gem::Requirement
208
- none: false
209
170
  requirements:
210
- - - ~>
171
+ - - "~>"
211
172
  - !ruby/object:Gem::Version
212
173
  version: '1.0'
213
174
  description: Berkshelf dependency API server
@@ -220,39 +181,40 @@ extensions: []
220
181
  extra_rdoc_files: []
221
182
  files:
222
183
  - CHANGELOG.md
223
- - README.md
224
184
  - LICENSE
185
+ - README.md
186
+ - bin/berks-api
187
+ - lib/berkshelf-api.rb
188
+ - lib/berkshelf/api.rb
225
189
  - lib/berkshelf/api/application.rb
190
+ - lib/berkshelf/api/cache_builder.rb
191
+ - lib/berkshelf/api/cache_builder/worker.rb
226
192
  - lib/berkshelf/api/cache_builder/worker/chef_server.rb
227
193
  - lib/berkshelf/api/cache_builder/worker/file_store.rb
228
194
  - lib/berkshelf/api/cache_builder/worker/github.rb
229
195
  - lib/berkshelf/api/cache_builder/worker/supermarket.rb
230
- - lib/berkshelf/api/cache_builder/worker.rb
231
- - lib/berkshelf/api/cache_builder.rb
232
196
  - lib/berkshelf/api/cache_manager.rb
233
197
  - lib/berkshelf/api/config.rb
234
- - lib/berkshelf/api/core_ext/pathname.rb
235
198
  - lib/berkshelf/api/core_ext.rb
199
+ - lib/berkshelf/api/core_ext/pathname.rb
236
200
  - lib/berkshelf/api/cucumber.rb
237
201
  - lib/berkshelf/api/dependency_cache.rb
238
- - lib/berkshelf/api/endpoint/v1.rb
239
202
  - lib/berkshelf/api/endpoint.rb
203
+ - lib/berkshelf/api/endpoint/v1.rb
240
204
  - lib/berkshelf/api/errors.rb
241
205
  - lib/berkshelf/api/generic_server.rb
242
206
  - lib/berkshelf/api/logging.rb
243
- - lib/berkshelf/api/mixin/services.rb
244
207
  - lib/berkshelf/api/mixin.rb
208
+ - lib/berkshelf/api/mixin/services.rb
245
209
  - lib/berkshelf/api/rack_app.rb
246
210
  - lib/berkshelf/api/remote_cookbook.rb
247
211
  - lib/berkshelf/api/rest_gateway.rb
248
- - lib/berkshelf/api/rspec/server.rb
249
212
  - lib/berkshelf/api/rspec.rb
250
- - lib/berkshelf/api/site_connector/supermarket.rb
213
+ - lib/berkshelf/api/rspec/server.rb
251
214
  - lib/berkshelf/api/site_connector.rb
215
+ - lib/berkshelf/api/site_connector/supermarket.rb
252
216
  - lib/berkshelf/api/srv_ctl.rb
253
217
  - lib/berkshelf/api/version.rb
254
- - lib/berkshelf/api.rb
255
- - lib/berkshelf-api.rb
256
218
  - spec/fixtures/cookbooks/example_cookbook/metadata.rb
257
219
  - spec/spec_helper.rb
258
220
  - spec/support/actor_mocking.rb
@@ -275,34 +237,29 @@ files:
275
237
  - spec/unit/berkshelf/api/rest_gateway_spec.rb
276
238
  - spec/unit/berkshelf/api/site_connector/supermarket_spec.rb
277
239
  - spec/unit/berkshelf/api/srv_ctl_spec.rb
278
- - bin/berks-api
279
240
  homepage: https://github.com/berkshelf/berkshelf-api
280
241
  licenses:
281
242
  - Apache 2.0
243
+ metadata: {}
282
244
  post_install_message:
283
245
  rdoc_options: []
284
246
  require_paths:
285
247
  - lib
286
248
  required_ruby_version: !ruby/object:Gem::Requirement
287
- none: false
288
249
  requirements:
289
- - - ! '>='
250
+ - - ">="
290
251
  - !ruby/object:Gem::Version
291
252
  version: 1.9.3
292
253
  required_rubygems_version: !ruby/object:Gem::Requirement
293
- none: false
294
254
  requirements:
295
- - - ! '>='
255
+ - - ">="
296
256
  - !ruby/object:Gem::Version
297
257
  version: '0'
298
- segments:
299
- - 0
300
- hash: 186690400328134402
301
258
  requirements: []
302
259
  rubyforge_project:
303
- rubygems_version: 1.8.23
260
+ rubygems_version: 2.2.2
304
261
  signing_key:
305
- specification_version: 3
262
+ specification_version: 4
306
263
  summary: A server which indexes cookbooks from various sources and hosts it over a
307
264
  REST API
308
265
  test_files: