ridley 0.8.3 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.md +4 -1
- data/lib/ridley.rb +1 -1
- data/lib/ridley/bootstrapper.rb +1 -1
- data/lib/ridley/bootstrapper/context.rb +1 -1
- data/lib/ridley/chain_link.rb +1 -1
- data/lib/ridley/chef.rb +1 -1
- data/lib/ridley/chef/cookbook.rb +1 -1
- data/lib/ridley/chef/cookbook/metadata.rb +1 -1
- data/lib/ridley/chef/cookbook/syntax_check.rb +1 -1
- data/lib/ridley/chef/digester.rb +1 -1
- data/lib/ridley/client.rb +1 -1
- data/lib/ridley/connection.rb +1 -1
- data/lib/ridley/errors.rb +1 -1
- data/lib/ridley/log.rb +1 -1
- data/lib/ridley/logging.rb +1 -1
- data/lib/ridley/middleware.rb +1 -1
- data/lib/ridley/middleware/chef_auth.rb +1 -1
- data/lib/ridley/middleware/chef_response.rb +1 -1
- data/lib/ridley/middleware/parse_json.rb +1 -1
- data/lib/ridley/middleware/retry.rb +1 -1
- data/lib/ridley/mixin/checksum.rb +1 -1
- data/lib/ridley/mixin/shell_out.rb +1 -1
- data/lib/ridley/resource.rb +1 -1
- data/lib/ridley/resources/client_resource.rb +1 -1
- data/lib/ridley/resources/cookbook_resource.rb +7 -7
- data/lib/ridley/resources/data_bag_item_resource.rb +2 -2
- data/lib/ridley/resources/data_bag_resource.rb +2 -2
- data/lib/ridley/resources/encrypted_data_bag_item_resource.rb +1 -1
- data/lib/ridley/resources/environment_resource.rb +1 -1
- data/lib/ridley/resources/node_resource.rb +2 -1
- data/lib/ridley/resources/role_resource.rb +1 -1
- data/lib/ridley/resources/sandbox_resource.rb +1 -1
- data/lib/ridley/sandbox_uploader.rb +2 -2
- data/lib/ridley/ssh.rb +1 -1
- data/lib/ridley/ssh/response.rb +1 -1
- data/lib/ridley/ssh/response_set.rb +1 -1
- data/lib/ridley/ssh/worker.rb +1 -1
- data/lib/ridley/version.rb +1 -1
- data/ridley.gemspec +1 -1
- data/spec/fixtures/example_cookbook/metadata.rb +1 -1
- data/spec/unit/ridley/resources/cookbook_resource_spec.rb +3 -3
- data/spec/unit/ridley/sandbox_uploader_spec.rb +10 -6
- metadata +4 -4
data/LICENSE
CHANGED
@@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
187
187
|
identification within third-party archives.
|
188
188
|
|
189
|
-
Copyright 2012,
|
189
|
+
Copyright 2012-2013, Riot Games
|
190
190
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
192
192
|
you may not use this file except in compliance with the License.
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# Ridley
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/ridley.png)](http://badge.fury.io/rb/ridley)
|
2
3
|
[![Build Status](https://secure.travis-ci.org/reset/ridley.png?branch=master)](http://travis-ci.org/reset/ridley)
|
3
4
|
[![Dependency Status](https://gemnasium.com/reset/ridley.png?travis)](https://gemnasium.com/reset/ridley)
|
4
5
|
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/reset/ridley)
|
@@ -349,4 +350,6 @@ And the same goes for setting an environment level override attribute
|
|
349
350
|
|
350
351
|
# Authors and Contributors
|
351
352
|
|
352
|
-
* Jamie Winsor (<
|
353
|
+
* Jamie Winsor (<reset@riotgames.com>)
|
354
|
+
|
355
|
+
Thank you to all of our [Contributors](https://github.com/RiotGames/ridley/graphs/contributors), testers, and users.
|
data/lib/ridley.rb
CHANGED
data/lib/ridley/bootstrapper.rb
CHANGED
data/lib/ridley/chain_link.rb
CHANGED
data/lib/ridley/chef.rb
CHANGED
data/lib/ridley/chef/cookbook.rb
CHANGED
data/lib/ridley/chef/digester.rb
CHANGED
data/lib/ridley/client.rb
CHANGED
data/lib/ridley/connection.rb
CHANGED
data/lib/ridley/errors.rb
CHANGED
data/lib/ridley/log.rb
CHANGED
data/lib/ridley/logging.rb
CHANGED
data/lib/ridley/middleware.rb
CHANGED
@@ -2,7 +2,7 @@ require 'mixlib/authentication/signedheaderauth'
|
|
2
2
|
|
3
3
|
module Ridley
|
4
4
|
module Middleware
|
5
|
-
# @author Jamie Winsor <
|
5
|
+
# @author Jamie Winsor <reset@riotgames.com>
|
6
6
|
class ChefAuth < Faraday::Middleware
|
7
7
|
class << self
|
8
8
|
include Mixlib::Authentication
|
data/lib/ridley/resource.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Ridley
|
2
|
-
# @author Jamie Winsor <
|
2
|
+
# @author Jamie Winsor <reset@riotgames.com>
|
3
3
|
class CookbookResource < Ridley::Resource
|
4
4
|
class << self
|
5
5
|
# List all of the cookbooks and their versions present on the remote
|
@@ -311,7 +311,7 @@ module Ridley
|
|
311
311
|
manifest[filetype].each do |file|
|
312
312
|
file_destination = File.join(destination, file[:path].gsub('/', File::SEPARATOR))
|
313
313
|
FileUtils.mkdir_p(File.dirname(file_destination))
|
314
|
-
download_file(filetype, file[:
|
314
|
+
download_file(filetype, file[:path], file_destination)
|
315
315
|
end
|
316
316
|
end
|
317
317
|
|
@@ -334,14 +334,14 @@ module Ridley
|
|
334
334
|
# these types are where the files are stored in your cookbook's structure. For example, a
|
335
335
|
# recipe would be stored in the recipes directory while a root_file is stored at the root
|
336
336
|
# of your cookbook
|
337
|
-
# @param [String]
|
338
|
-
#
|
337
|
+
# @param [String] path
|
338
|
+
# path of the file to download
|
339
339
|
# @param [String] destination
|
340
340
|
# where to download the file to
|
341
341
|
#
|
342
342
|
# @return [nil]
|
343
|
-
def download_file(filetype,
|
344
|
-
download_fun(filetype).call(
|
343
|
+
def download_file(filetype, path, destination)
|
344
|
+
download_fun(filetype).call(path, destination)
|
345
345
|
end
|
346
346
|
|
347
347
|
# A hash containing keys for all of the different cookbook filetypes with values
|
@@ -400,7 +400,7 @@ module Ridley
|
|
400
400
|
|
401
401
|
->(target, destination) {
|
402
402
|
files = collection.call # JW: always chaining .call.find results in a nil value. WHY?
|
403
|
-
file = files.find { |f| f[:
|
403
|
+
file = files.find { |f| f[:path] == target }
|
404
404
|
return nil if file.nil?
|
405
405
|
|
406
406
|
destination = File.expand_path(destination)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Ridley
|
2
|
-
# @author Jamie Winsor <
|
2
|
+
# @author Jamie Winsor <reset@riotgames.com>
|
3
3
|
class DataBagItemResource < Ridley::Resource
|
4
4
|
class << self
|
5
5
|
# @param [Ridley::Client] client
|
@@ -171,7 +171,7 @@ module Ridley
|
|
171
171
|
def update
|
172
172
|
raise Errors::InvalidResource.new(self.errors) unless valid?
|
173
173
|
|
174
|
-
mass_assign(
|
174
|
+
mass_assign(self.class.update(client, data_bag, self)._attributes_)
|
175
175
|
true
|
176
176
|
end
|
177
177
|
|
@@ -2,7 +2,7 @@ require 'ridley/resources/data_bag_item_resource'
|
|
2
2
|
require 'ridley/resources/encrypted_data_bag_item_resource'
|
3
3
|
|
4
4
|
module Ridley
|
5
|
-
# @author Jamie Winsor <
|
5
|
+
# @author Jamie Winsor <reset@riotgames.com>
|
6
6
|
# @api private
|
7
7
|
class DBIChainLink
|
8
8
|
attr_reader :data_bag
|
@@ -30,7 +30,7 @@ module Ridley
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
# @author Jamie Winsor <
|
33
|
+
# @author Jamie Winsor <reset@riotgames.com>
|
34
34
|
class DataBagResource < Ridley::Resource
|
35
35
|
class << self
|
36
36
|
# @param [Ridley::Client] client
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Ridley
|
2
|
-
# @author Jamie Winsor <
|
2
|
+
# @author Jamie Winsor <reset@riotgames.com>
|
3
3
|
class NodeResource < Ridley::Resource
|
4
4
|
class << self
|
5
5
|
# @overload bootstrap(client, nodes, options = {})
|
@@ -54,6 +54,7 @@ module Ridley
|
|
54
54
|
# @param [Ridley::Client] client
|
55
55
|
# @param [Ridley::NodeResource, String] target
|
56
56
|
# node or identifier of the node to merge
|
57
|
+
#
|
57
58
|
# @option options [Array] :run_list
|
58
59
|
# run list items to merge
|
59
60
|
# @option options [Hash] :attributes
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Ridley
|
2
|
-
# @author Jamie Winsor <
|
2
|
+
# @author Jamie Winsor <reset@riotgames.com>
|
3
3
|
# @api private
|
4
4
|
class SandboxUploader
|
5
5
|
class << self
|
@@ -32,7 +32,7 @@ module Ridley
|
|
32
32
|
File.open(path, 'rb') { |f| checksum_io(f, Digest::MD5.new) }
|
33
33
|
end
|
34
34
|
|
35
|
-
# Return a base64 encoded checksum of the contents of
|
35
|
+
# Return a base64 encoded checksum of the contents of the given file. This is the expected
|
36
36
|
# format of sandbox checksums given to the Chef Server.
|
37
37
|
#
|
38
38
|
# @param [String] path
|
data/lib/ridley/ssh.rb
CHANGED
data/lib/ridley/ssh/response.rb
CHANGED
data/lib/ridley/ssh/worker.rb
CHANGED
data/lib/ridley/version.rb
CHANGED
data/ridley.gemspec
CHANGED
@@ -3,7 +3,7 @@ require File.expand_path('../lib/ridley/version', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.authors = ["Jamie Winsor"]
|
6
|
-
s.email = ["
|
6
|
+
s.email = ["reset@riotgames.com"]
|
7
7
|
s.description = %q{A reliable Chef API client with a clean syntax}
|
8
8
|
s.summary = s.description
|
9
9
|
s.homepage = "https://github.com/reset/ridley"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
name "example_cookbook"
|
2
2
|
maintainer "Jamie Winsor"
|
3
|
-
maintainer_email "
|
3
|
+
maintainer_email "reset@riotgames.com"
|
4
4
|
license "Apache 2.0"
|
5
5
|
description "Installs/Configures example_cookbook"
|
6
6
|
long_description IO.read(File.join(File.dirname(__FILE__), "README.md"))
|
@@ -203,8 +203,8 @@ describe Ridley::CookbookResource do
|
|
203
203
|
}
|
204
204
|
end
|
205
205
|
|
206
|
-
subject.should_receive(:download_file).with(:recipes, "default.rb", anything)
|
207
|
-
subject.should_receive(:download_file).with(:files, "README", anything)
|
206
|
+
subject.should_receive(:download_file).with(:recipes, "recipes/default.rb", anything)
|
207
|
+
subject.should_receive(:download_file).with(:files, "files/default/plugins/README", anything)
|
208
208
|
|
209
209
|
subject.download
|
210
210
|
end
|
@@ -214,7 +214,7 @@ describe Ridley::CookbookResource do
|
|
214
214
|
let(:destination) { tmp_path.join('fake.file').to_s }
|
215
215
|
|
216
216
|
before(:each) do
|
217
|
-
subject.stub(:root_files) { [ {
|
217
|
+
subject.stub(:root_files) { [ { path: 'metadata.rb', url: "http://test.it/file" } ] }
|
218
218
|
end
|
219
219
|
|
220
220
|
it "downloads the file from the file's url" do
|
@@ -36,15 +36,19 @@ describe Ridley::SandboxUploader do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
describe "::checksum" do
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
subject { described_class.checksum(path) }
|
40
|
+
|
41
|
+
let(:path) { fixtures_path.join('reset.pem') }
|
42
|
+
|
43
|
+
it { should eq("a0608f1eb43ee4cca510bf95f8d209f7") }
|
42
44
|
end
|
43
45
|
|
44
46
|
describe "::checksum64" do
|
45
|
-
|
46
|
-
|
47
|
-
|
47
|
+
subject { described_class.checksum64(path) }
|
48
|
+
|
49
|
+
let(:path) { fixtures_path.join('reset.pem') }
|
50
|
+
|
51
|
+
it { should eq("oGCPHrQ+5MylEL+V+NIJ9w==") }
|
48
52
|
end
|
49
53
|
end
|
50
54
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ridley
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -269,7 +269,7 @@ dependencies:
|
|
269
269
|
version: '0'
|
270
270
|
description: A reliable Chef API client with a clean syntax
|
271
271
|
email:
|
272
|
-
-
|
272
|
+
- reset@riotgames.com
|
273
273
|
executables: []
|
274
274
|
extensions: []
|
275
275
|
extra_rdoc_files: []
|
@@ -401,7 +401,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
401
401
|
version: '0'
|
402
402
|
segments:
|
403
403
|
- 0
|
404
|
-
hash:
|
404
|
+
hash: -383872580603782424
|
405
405
|
requirements: []
|
406
406
|
rubyforge_project:
|
407
407
|
rubygems_version: 1.8.24
|