berkshelf 1.2.1 → 1.3.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/.gitignore +1 -0
  2. data/{.rbenv-version → .ruby-version} +0 -0
  3. data/.travis.yml +5 -5
  4. data/berkshelf.gemspec +3 -7
  5. data/features/help.feature +20 -0
  6. data/features/install_command.feature +2 -0
  7. data/features/list_command.feature +1 -0
  8. data/features/step_definitions/filesystem_steps.rb +7 -8
  9. data/features/step_definitions/utility_steps.rb +6 -0
  10. data/features/upload_command.feature +2 -0
  11. data/generator_files/Gemfile.erb +1 -1
  12. data/generator_files/Vagrantfile.erb +51 -45
  13. data/lib/berkshelf/cli.rb +18 -8
  14. data/lib/berkshelf/community_rest.rb +2 -2
  15. data/lib/berkshelf/git.rb +1 -1
  16. data/lib/berkshelf/locations/git_location.rb +1 -1
  17. data/lib/berkshelf/version.rb +1 -1
  18. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_download/unpacks_the_archive.json +1 -0
  19. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +1 -0
  20. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_cookbook.json +1 -0
  21. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_version.json +1 -0
  22. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/returns_the_cookbook_and_version_information.json +1 -0
  23. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +1 -0
  24. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CookbookNotFound_error_on_a_404_response.json +1 -0
  25. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/returns_the_version_number_of_the_latest_version_of_the_cookbook.json +1 -0
  26. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_satisfy/returns_the_version_number_of_the_best_solution.json +1 -0
  27. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +1 -0
  28. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CookbookNotFound_error_on_a_404_response.json +1 -0
  29. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/returns_an_array_containing_an_item_for_each_version.json +1 -0
  30. data/spec/fixtures/cassettes/Berkshelf_Resolver/ClassMethods/_initialize/adds_the_dependencies_of_the_source_as_sources.yml +3829 -0
  31. data/spec/spec_helper.rb +10 -3
  32. data/spec/support/matchers/file_system_matchers.rb +4 -2
  33. data/spec/unit/berkshelf/community_rest_spec.rb +108 -67
  34. data/spec/unit/berkshelf/config_spec.rb +1 -1
  35. data/spec/unit/berkshelf/errors_spec.rb +1 -10
  36. data/spec/unit/berkshelf/init_generator_spec.rb +2 -3
  37. data/spec/unit/berkshelf/location_spec.rb +2 -0
  38. data/spec/unit/berkshelf/resolver_spec.rb +10 -40
  39. metadata +43 -60
  40. data/.rvmrc +0 -1
  41. data/lib/berkshelf/vagrant.rb +0 -74
  42. data/lib/berkshelf/vagrant/action/clean.rb +0 -26
  43. data/lib/berkshelf/vagrant/action/install.rb +0 -49
  44. data/lib/berkshelf/vagrant/action/set_ui.rb +0 -17
  45. data/lib/berkshelf/vagrant/action/upload.rb +0 -41
  46. data/lib/berkshelf/vagrant/action/validate.rb +0 -30
  47. data/lib/berkshelf/vagrant/config.rb +0 -53
  48. data/lib/berkshelf/vagrant/errors.rb +0 -31
  49. data/lib/berkshelf/vagrant/middleware.rb +0 -52
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  *.rbc
3
3
  .bundle
4
4
  .config
5
+ .rvmrc
5
6
  .yardoc
6
7
  /Gemfile.lock
7
8
  _yardoc
File without changes
data/.travis.yml CHANGED
@@ -1,15 +1,15 @@
1
+ language: ruby
1
2
  rvm:
2
3
  - 1.9.2
3
4
  - 1.9.3
4
- - ruby-head
5
- matrix:
6
- allow_failures:
7
- - rvm: 1.9.2
8
- - rvm: ruby-head
5
+ - 2.0.0
9
6
  notifications:
10
7
  irc:
11
8
  channels:
12
9
  - "irc.freenode.org#berkshelf"
13
10
  skip_join: true
14
11
  use_notice: true
12
+ before_script:
13
+ - git config --global user.email "ci@berkshelf.com"
14
+ - git config --global user.name "Berkshelf"
15
15
  script: 'bundle exec thor spec:ci'
data/berkshelf.gemspec CHANGED
@@ -28,11 +28,11 @@ Gem::Specification.new do |s|
28
28
  s.required_ruby_version = ">= 1.9.1"
29
29
 
30
30
  s.add_dependency 'yajl-ruby'
31
- s.add_dependency 'activesupport'
31
+ s.add_dependency 'activesupport', '~> 3.2'
32
32
  s.add_dependency 'mixlib-shellout'
33
33
  s.add_dependency 'mixlib-config'
34
34
  s.add_dependency 'faraday', '>= 0.8.5'
35
- s.add_dependency 'ridley', '>= 0.8.3'
35
+ s.add_dependency 'ridley', '>= 0.8.5'
36
36
  s.add_dependency 'chozo', '>= 0.6.1'
37
37
  s.add_dependency 'hashie', '>= 2.0.2'
38
38
  s.add_dependency 'minitar'
@@ -42,10 +42,6 @@ Gem::Specification.new do |s|
42
42
  s.add_dependency 'thor', '~> 0.16.0'
43
43
  s.add_dependency 'retryable'
44
44
 
45
- # Vagrant 1-0-stable compatability locks
46
- s.add_dependency 'moneta', '~> 0.6.0'
47
- s.add_dependency 'net-ssh-gateway', '= 1.1.0'
48
-
49
45
  s.add_development_dependency 'aruba'
50
46
  s.add_development_dependency 'cane'
51
47
  s.add_development_dependency 'json_spec'
@@ -55,5 +51,5 @@ Gem::Specification.new do |s|
55
51
  s.add_development_dependency 'spork'
56
52
  s.add_development_dependency 'thor'
57
53
  s.add_development_dependency 'webmock'
58
- s.add_development_dependency 'vagrant', '~> 1.0.6'
54
+ s.add_development_dependency 'vcr', '~> 2.4.0'
59
55
  end
@@ -0,0 +1,20 @@
1
+ Feature: Appending -h or --help to a command
2
+ As a user
3
+ I want to be able to run berkshelf like my existing Unix CLI tools
4
+ So that I don't have remember thor's stupid argument ordering
5
+
6
+ Scenario: Specifying the --help option
7
+ Given I successfully run `berks --help`
8
+ Then the output should be the same as `berks help`
9
+
10
+ Scenario: Specifying the -h option
11
+ Given I successfully run `berks -h`
12
+ Then the output should be the same as `berks help`
13
+
14
+ Scenario: Specifying the --help option to a sub-command
15
+ Given I successfully run `berks cookbook --help`
16
+ Then the output should be the same as `berks help cookbook`
17
+
18
+ Scenario: Specifying the -h option to a sub-command
19
+ Given I successfully run `berks cookbook -h`
20
+ Then the output should be the same as `berks help cookbook`
@@ -7,6 +7,7 @@ Feature: install cookbooks from a Berksfile
7
7
  Given I write to "Berksfile" with:
8
8
  """
9
9
  cookbook "mysql", "1.2.4"
10
+ cookbook "openssl", "1.0.0"
10
11
  """
11
12
  When I successfully run `berks install`
12
13
  Then the cookbook store should have the cookbooks:
@@ -161,6 +162,7 @@ Feature: install cookbooks from a Berksfile
161
162
  Given I write to "Berksfile" with:
162
163
  """
163
164
  cookbook "mysql", "1.2.4", site: "http://cookbooks.opscode.com/api/v1/cookbooks"
165
+ cookbook "openssl", "1.0.0", site: "http://cookbooks.opscode.com/api/v1/cookbooks"
164
166
  """
165
167
  When I successfully run `berks install`
166
168
  Then the cookbook store should have the cookbooks:
@@ -10,6 +10,7 @@ Feature: list command
10
10
  cookbook "build-essential", "1.2.0"
11
11
  cookbook "chef-client", "1.2.0"
12
12
  cookbook "mysql", "1.2.4"
13
+ cookbook "openssl", "1.0.0"
13
14
  """
14
15
  And I successfully run `berks install`
15
16
  When I run `berks list`
@@ -23,17 +23,17 @@ Given /^I have a default Berkshelf config file$/ do
23
23
  end
24
24
 
25
25
  Given /^I have a Berkshelf config file containing:$/ do |contents|
26
- File.open(Berkshelf::Config.path, 'w+') do |f|
26
+ ::File.open(Berkshelf::Config.path, 'w+') do |f|
27
27
  f.write(contents)
28
28
  end
29
29
  end
30
30
 
31
31
  Given /^I do not have a Berkshelf config file$/ do
32
- remove_file Berkshelf::Config.path if File.exists? Berkshelf::Config.path
32
+ remove_file Berkshelf::Config.path if ::File.exists? Berkshelf::Config.path
33
33
  end
34
34
 
35
35
  Given /^the cookbook "(.*?)" has the file "(.*?)" with:$/ do |cookbook_name, file_name, content|
36
- write_file(File.join(cookbook_name, file_name), content)
36
+ write_file(::File.join(cookbook_name, file_name), content)
37
37
  end
38
38
 
39
39
  Given /^the cookbook store has the cookbooks:$/ do |cookbooks|
@@ -110,7 +110,6 @@ Then /^I should have a new cookbook skeleton "(.*?)"$/ do |name|
110
110
  file "metadata.rb"
111
111
  file "README.md"
112
112
  file "Vagrantfile" do
113
- contains "require 'berkshelf/vagrant'"
114
113
  contains "recipe[#{name}::default]"
115
114
  end
116
115
  }
@@ -188,11 +187,11 @@ Then /^I should have a new cookbook skeleton "(.*?)" with no Vagrant support$/ d
188
187
  end
189
188
 
190
189
  Then /^the cookbook "(.*?)" should have the following files:$/ do |name, files|
191
- check_file_presence(files.raw.map{|file_row| File.join(name, file_row[0])}, true)
190
+ check_file_presence(files.raw.map{|file_row| ::File.join(name, file_row[0])}, true)
192
191
  end
193
192
 
194
193
  Then /^the cookbook "(.*?)" should not have the following files:$/ do |name, files|
195
- check_file_presence(files.raw.map{|file_row| File.join(name, file_row[0])}, false)
194
+ check_file_presence(files.raw.map{|file_row| ::File.join(name, file_row[0])}, false)
196
195
  end
197
196
 
198
197
  Then /^the file "(.*?)" in the cookbook "(.*?)" should contain:$/ do |file_name, cookbook_name, content|
@@ -215,11 +214,11 @@ Then /^the resulting "(.+)" Vagrantfile should contain:$/ do |cookbook_name, con
215
214
  end
216
215
 
217
216
  Then /^the directory "(.*?)" should have the following files:$/ do |name, files|
218
- check_file_presence(files.raw.map{|file_row| File.join(name, file_row[0])}, true)
217
+ check_file_presence(files.raw.map{|file_row| ::File.join(name, file_row[0])}, true)
219
218
  end
220
219
 
221
220
  Then /^the directory "(.*?)" should not have the following files:$/ do |name, files|
222
- check_file_presence(files.raw.map{|file_row| File.join(name, file_row[0])}, false)
221
+ check_file_presence(files.raw.map{|file_row| ::File.join(name, file_row[0])}, false)
223
222
  end
224
223
 
225
224
  Then /^the file "(.*?)" in the directory "(.*?)" should not contain:$/ do |file_name, directory_name, content|
@@ -9,3 +9,9 @@ end
9
9
  Given /^the environment variable (.+) is "(.+)"$/ do |variable, value|
10
10
  set_env variable, value
11
11
  end
12
+
13
+ Then /^the output should be the same as \`(.+)\`$/ do |command|
14
+ run_simple(command)
15
+ output = output_from(command)
16
+ expect(all_output).to include(output)
17
+ end
@@ -28,6 +28,7 @@ Feature: upload command
28
28
  Given I write to "Berksfile" with:
29
29
  """
30
30
  cookbook "mysql", "1.2.4"
31
+ cookbook "openssl", "= 1.0.0"
31
32
  """
32
33
  And the Chef server does not have the cookbooks:
33
34
  | mysql | 1.2.4 |
@@ -76,6 +77,7 @@ Feature: upload command
76
77
  """
77
78
  cookbook "build-essential", "1.2.0"
78
79
  cookbook "mysql", "1.2.4"
80
+ cookbook "openssl", "= 1.0.0"
79
81
  """
80
82
  And I successfully run `berks install`
81
83
  And the Chef server does not have the cookbooks:
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gem 'berkshelf'
4
4
  <% if options[:foodcritic] -%>
@@ -1,80 +1,86 @@
1
- begin
2
- require 'berkshelf/vagrant'
3
- rescue LoadError
4
- puts "[WARNING] Berkshelf not found in your Vagrant's RubyGems but your Vagrantfile is attempting"
5
- puts "[WARNING] to require the Berkshelf Vagrant plugin! Install the Berkshelf Vagrant plugin or"
6
- puts "[WARNING] remove the 'require \"berkshelf/vagrant\"' line from the top of your Vagrantfile."
7
- puts ""
8
- puts "If you installed Vagrant by RubyGems:"
9
- puts " Install Berkshelf by running: \"gem install berkshelf\""
10
- puts "If you installed Vagrant by one of the pre-packaged installers:"
11
- puts " Install Berkshelf by running: \"vagrant gem install berkshelf\""
12
- puts ""
13
- end
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
14
3
 
15
- Vagrant::Config.run do |config|
4
+ Vagrant.configure("2") do |config|
16
5
  # All Vagrant configuration is done here. The most common configuration
17
6
  # options are documented and commented below. For a complete reference,
18
7
  # please see the online documentation at vagrantup.com.
19
8
 
20
- # The path to the Berksfile to use with Vagrant Berkshelf
21
- # config.berkshelf.berksfile_path = "./Berksfile"
22
-
23
- # An array of symbols representing groups of cookbook described in the Vagrantfile
24
- # to exclusively install and copy to Vagrant's shelf.
25
- # config.berkshelf.only = []
26
-
27
- # An array of symbols representing groups of cookbook described in the Vagrantfile
28
- # to skip installing and copying to Vagrant's shelf.
29
- # config.berkshelf.except = []
30
-
31
- config.vm.host_name = "<%= "#{cookbook_name}-berkshelf" %>"
9
+ config.vm.hostname = "<%= "#{cookbook_name.gsub('_','-')}-berkshelf" %>"
32
10
 
11
+ # Every Vagrant virtual environment requires a box to build off of.
33
12
  config.vm.box = "<%= options[:berkshelf_config].vagrant.vm.box %>"
34
- config.vm.box_url = "<%= options[:berkshelf_config].vagrant.vm.box_url %>"
35
13
 
36
- # Boot with a GUI so you can see the screen. (Default is headless)
37
- # config.vm.boot_mode = :gui
14
+ # The url from where the 'config.vm.box' box will be fetched if it
15
+ # doesn't already exist on the user's system.
16
+ config.vm.box_url = "<%= options[:berkshelf_config].vagrant.vm.box_url %>"
38
17
 
39
18
  # Assign this VM to a host-only network IP, allowing you to access it
40
19
  # via the IP. Host-only networks can talk to the host machine as well as
41
20
  # any other machines on the same network, but cannot be accessed (through this
42
21
  # network interface) by any external networks.
43
22
  <% if options[:berkshelf_config].vagrant.vm.network.hostonly.present? -%>
44
- config.vm.network :hostonly, "<%= options[:berkshelf_config].vagrant.vm.network.hostonly %>"
23
+ config.vm.network :private_network, ip: "<%= options[:berkshelf_config].vagrant.vm.network.hostonly %>"
45
24
  <% else %>
46
- # config.vm.network :hostonly, "33.33.33.10"
25
+ config.vm.network :private_network, ip: "192.168.33.10"
47
26
  <% end -%>
48
27
 
49
- # Assign this VM to a bridged network, allowing you to connect directly to a
50
- # network using the host's network device. This makes the VM appear as another
51
- # physical device on your network.
28
+ # Create a public network, which generally matched to bridged network.
29
+ # Bridged networks make the machine appear as another physical device on
30
+ # your network.
52
31
  <% if options[:berkshelf_config].vagrant.vm.network.bridged -%>
53
- config.vm.network :bridged
32
+ config.vm.network :public_network
54
33
  <% else %>
55
- # config.vm.network :bridged
34
+ # config.vm.network :public_network
56
35
  <% end -%>
57
36
 
58
- # Forward a port from the guest to the host, which allows for outside
59
- # computers to access the VM, whereas host only networking does not.
60
- # config.vm.forward_port 80, 8080
37
+ # Create a forwarded port mapping which allows access to a specific port
38
+ # within the machine from a port on the host machine. In the example below,
39
+ # accessing "localhost:8080" will access port 80 on the guest machine.
61
40
  <% options[:berkshelf_config].vagrant.vm.forward_port.each do |guest, host| %>
62
- config.vm.forward_port <%= guest %>, <%= host %>
41
+ config.vm.network :forwarded_port, guest: <%= guest %>, host: <%= host %>
63
42
  <% end -%>
64
43
 
65
44
  # Share an additional folder to the guest VM. The first argument is
66
- # an identifier, the second is the path on the guest to mount the
67
- # folder, and the third is the path on the host to the actual folder.
68
- # config.vm.share_folder "v-data", "/vagrant_data", "../data"
45
+ # the path on the host to the actual folder. The second argument is
46
+ # the path on the guest to mount the folder. And the optional third
47
+ # argument is a set of non-required options.
48
+ # config.vm.synced_folder "../data", "/vagrant_data"
49
+
50
+ # Provider-specific configuration so you can fine-tune various
51
+ # backing providers for Vagrant. These expose provider-specific options.
52
+ # Example for VirtualBox:
53
+ #
54
+ # config.vm.provider :virtualbox do |vb|
55
+ # # Don't boot with headless mode
56
+ # vb.gui = true
57
+ #
58
+ # # Use VBoxManage to customize the VM. For example to change memory:
59
+ # vb.customize ["modifyvm", :id, "--memory", "1024"]
60
+ # end
61
+ #
62
+ # View the documentation for the provider you're using for more
63
+ # information on available options.
69
64
 
70
65
  config.ssh.max_tries = 40
71
66
  config.ssh.timeout = 120
72
67
 
68
+ # The path to the Berksfile to use with Vagrant Berkshelf
69
+ # config.berkshelf.berksfile_path = "./Berksfile"
70
+
71
+ # An array of symbols representing groups of cookbook described in the Vagrantfile
72
+ # to exclusively install and copy to Vagrant's shelf.
73
+ # config.berkshelf.only = []
74
+
75
+ # An array of symbols representing groups of cookbook described in the Vagrantfile
76
+ # to skip installing and copying to Vagrant's shelf.
77
+ # config.berkshelf.except = []
78
+
73
79
  <% if options[:berkshelf_config].vagrant.vm.provision == "chef_client" -%>
74
80
  config.vm.provision :chef_client do |chef|
75
- chef.chef_server_url = "<%= options[:berkshelf_config].chef.chef_server_url %>"
81
+ chef.chef_server_url = "<%= options[:berkshelf_config].chef.chef_server_url %>"
76
82
  chef.validation_client_name = "<%= options[:berkshelf_config].chef.validation_client_name %>"
77
- chef.validation_key_path = "<%= options[:berkshelf_config].chef.validation_key_path %>"
83
+ chef.validation_key_path = "<%= options[:berkshelf_config].chef.validation_key_path %>"
78
84
 
79
85
  chef.run_list = [
80
86
  "recipe[<%= cookbook_name %>::default]"
data/lib/berkshelf/cli.rb CHANGED
@@ -5,8 +5,18 @@ module Berkshelf
5
5
  class Cli < Thor
6
6
  class << self
7
7
  def dispatch(meth, given_args, given_opts, config)
8
- super
9
- Berkshelf.formatter.cleanup_hook unless config[:current_task].name == "help"
8
+ unless (given_args & ['-h', '--help']).empty?
9
+ if given_args.length == 1
10
+ # berks --help
11
+ super
12
+ else
13
+ command = given_args.first
14
+ super(meth, ['help', command].compact, nil, config)
15
+ end
16
+ else
17
+ super
18
+ Berkshelf.formatter.cleanup_hook unless config[:current_task].name == "help"
19
+ end
10
20
  end
11
21
  end
12
22
 
@@ -30,12 +40,12 @@ module Berkshelf
30
40
 
31
41
  namespace "berkshelf"
32
42
 
33
- map 'in' => :install
34
- map 'up' => :upload
35
- map 'ud' => :update
36
- map 'ls' => :list
37
- map 'ver' => :version
38
- map 'book' => :cookbook
43
+ map 'in' => :install
44
+ map 'up' => :upload
45
+ map 'ud' => :update
46
+ map 'ls' => :list
47
+ map 'book' => :cookbook
48
+ map ['ver', '-v', '--version'] => :version
39
49
 
40
50
  default_task :install
41
51
 
@@ -20,14 +20,14 @@ module Berkshelf
20
20
  #
21
21
  # @return [String]
22
22
  def uri_escape_version(version)
23
- version.gsub('.', '_')
23
+ version.to_s.gsub('.', '_')
24
24
  end
25
25
 
26
26
  # @param [String] uri
27
27
  #
28
28
  # @return [String]
29
29
  def version_from_uri(uri)
30
- File.basename(uri).gsub('_', '.')
30
+ File.basename(uri.to_s).gsub('_', '.')
31
31
  end
32
32
  end
33
33
 
data/lib/berkshelf/git.rb CHANGED
@@ -121,7 +121,7 @@ module Berkshelf
121
121
  # @raise [GitNotFound] if executable is not found in system path
122
122
  def find_git
123
123
  git_path = nil
124
- ENV["PATH"].split(File::PATH_SEPARATOR).each do |path|
124
+ ENV["PATH"].split(::File::PATH_SEPARATOR).each do |path|
125
125
  git_path = detect_git_path(path)
126
126
  break if git_path
127
127
  end
@@ -8,7 +8,7 @@ module Berkshelf
8
8
  # @return [String]
9
9
  # the path to the created temporary directory
10
10
  def tmpdir
11
- @tmpdir ||= Dir.mktmpdir(Berkshelf.mktmpdir)
11
+ @tmpdir ||= Berkshelf.mktmpdir
12
12
  end
13
13
  end
14
14
 
@@ -1,3 +1,3 @@
1
1
  module Berkshelf
2
- VERSION = "1.2.1"
2
+ VERSION = "1.3.0.rc1"
3
3
  end
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/1_4_0","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Faraday v0.8.6"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],"Accept":["*/*"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx/1.0.5"],"Date":["Sat, 16 Mar 2013 02:51:33 GMT"],"Content-Type":["application/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"Status":["200 OK"],"Set-Cookie":["_sandbox_session=eyJzZXNzaW9uX2lkIjoiNmIxMTBmOWQ1NTk0OWIyZGQ0ZmRhNzc4MDQxOWNmM2QiLCJsb2NhdGlvbiI6eyJjb29rYm9va19pZCI6Im5naW54IiwiaWQiOiIxXzRfMCIsImFjdGlvbiI6InNob3ciLCJjb250cm9sbGVyIjoiYXBpL3YxL2Nvb2tib29rX3ZlcnNpb25zIn19--3d8cc052947105778a8dce87ffc6a7caaffc3afe; domain=.opscode.com; path=/; HttpOnly","logged-in-username=; domain=.opscode.com; path=/"],"Cache-Control":["private, max-age=0, must-revalidate"],"Etag":["\"ec01f78a7dec930ee88383d3698b959a\""],"X-Runtime":["11"]},"body":{"encoding":"UTF-8","string":"{\"file\":\"http://s3.amazonaws.com/community-files.opscode.com/cookbook_versions/tarballs/3151/original/nginx.tgz?1361684940\",\"created_at\":\"2013-02-24T05:49:02Z\",\"tarball_file_size\":32275,\"updated_at\":\"2013-02-24T05:49:02Z\",\"cookbook\":\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx\",\"version\":\"1.4.0\",\"license\":\"Apache 2.0\",\"average_rating\":null}"},"http_version":null},"recorded_at":"Sat, 16 Mar 2013 02:51:35 GMT"}],"recorded_with":"VCR 2.4.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"http://cookbooks.opscode.com/api/v1/cookbooks/not_a_real_cookbook_that_anyone_should_ever_make/versions/0_0_0","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Faraday v0.8.6"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],"Accept":["*/*"]}},"response":{"status":{"code":500,"message":"Server Error"},"headers":{"Server":["nginx/1.0.5"],"Date":["Sat, 16 Mar 2013 02:51:34 GMT"],"Content-Type":["text/html; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"Status":["404 Not Found"],"Cache-Control":["no-cache"]},"body":{"encoding":"UTF-8","string":"{\"error_messages\":[\"Resource does not exist\"],\"error_code\":\"NOT_FOUND\"}"},"http_version":null},"recorded_at":"Sat, 16 Mar 2013 02:51:36 GMT"}],"recorded_with":"VCR 2.4.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"http://cookbooks.opscode.com/api/v1/cookbooks/not_a_real_cookbook_that_anyone_should_ever_make/versions/0_1_0","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Faraday v0.8.6"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],"Accept":["*/*"]}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Server":["nginx/1.0.5"],"Date":["Sat, 16 Mar 2013 02:51:34 GMT"],"Content-Type":["text/html; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"Status":["404 Not Found"],"Cache-Control":["no-cache"]},"body":{"encoding":"UTF-8","string":"{\"error_messages\":[\"Resource does not exist\"],\"error_code\":\"NOT_FOUND\"}"},"http_version":null},"recorded_at":"Sat, 16 Mar 2013 02:51:36 GMT"}],"recorded_with":"VCR 2.4.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_0_0","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Faraday v0.8.6"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],"Accept":["*/*"]}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Server":["nginx/1.0.5"],"Date":["Sat, 16 Mar 2013 02:51:34 GMT"],"Content-Type":["text/html; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"Status":["404 Not Found"],"Cache-Control":["no-cache"]},"body":{"encoding":"UTF-8","string":"{\"error_messages\":[\"Resource does not exist\"],\"error_code\":\"NOT_FOUND\"}"},"http_version":null},"recorded_at":"Sat, 16 Mar 2013 02:51:36 GMT"}],"recorded_with":"VCR 2.4.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/1_4_0","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Faraday v0.8.6"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],"Accept":["*/*"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx/1.0.5"],"Date":["Sat, 16 Mar 2013 02:51:34 GMT"],"Content-Type":["application/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"Status":["200 OK"],"Set-Cookie":["_sandbox_session=eyJzZXNzaW9uX2lkIjoiOTNkNjcwZjgxNzI1YjcwMGM5YjBkYThkNDVkYTFiYTYiLCJsb2NhdGlvbiI6eyJjb250cm9sbGVyIjoiYXBpL3YxL2Nvb2tib29rX3ZlcnNpb25zIiwiYWN0aW9uIjoic2hvdyIsImNvb2tib29rX2lkIjoibmdpbngiLCJpZCI6IjFfNF8wIn19--a38b0e89af6b55dd5be3d1824097539db5d2b7ee; domain=.opscode.com; path=/; HttpOnly","logged-in-username=; domain=.opscode.com; path=/"],"Etag":["\"18edfb68b13a7fc2b72e4545e9fda301\""],"X-Runtime":["10"],"Cache-Control":["private, max-age=0, must-revalidate"]},"body":{"encoding":"UTF-8","string":"{\"average_rating\":null,\"version\":\"1.4.0\",\"tarball_file_size\":32275,\"updated_at\":\"2013-02-24T05:49:02Z\",\"file\":\"http://s3.amazonaws.com/community-files.opscode.com/cookbook_versions/tarballs/3151/original/nginx.tgz?1361684940\",\"cookbook\":\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx\",\"created_at\":\"2013-02-24T05:49:02Z\",\"license\":\"Apache 2.0\"}"},"http_version":null},"recorded_at":"Sat, 16 Mar 2013 02:51:36 GMT"}],"recorded_with":"VCR 2.4.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"http://cookbooks.opscode.com/api/v1/cookbooks/not_a_real_cookbook_that_anyone_should_ever_make","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Faraday v0.8.6"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],"Accept":["*/*"]}},"response":{"status":{"code":500,"message":"Server Error"},"headers":{"Server":["nginx/1.0.5"],"Date":["Sat, 16 Mar 2013 02:51:35 GMT"],"Content-Type":["text/html; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"Status":["404 Not Found"],"Cache-Control":["no-cache"]},"body":{"encoding":"UTF-8","string":"{\"error_messages\":[\"Resource does not exist\"],\"error_code\":\"NOT_FOUND\"}"},"http_version":null},"recorded_at":"Sat, 16 Mar 2013 02:51:37 GMT"}],"recorded_with":"VCR 2.4.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"http://cookbooks.opscode.com/api/v1/cookbooks/not_a_real_cookbook_that_anyone_should_ever_make","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Faraday v0.8.6"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],"Accept":["*/*"]}},"response":{"status":{"code":404,"message":"Not Found"},"headers":{"Server":["nginx/1.0.5"],"Date":["Sat, 16 Mar 2013 02:51:34 GMT"],"Content-Type":["text/html; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"Status":["404 Not Found"],"Cache-Control":["no-cache"]},"body":{"encoding":"UTF-8","string":"{\"error_messages\":[\"Resource does not exist\"],\"error_code\":\"NOT_FOUND\"}"},"http_version":null},"recorded_at":"Sat, 16 Mar 2013 02:51:36 GMT"}],"recorded_with":"VCR 2.4.0"}
@@ -0,0 +1 @@
1
+ {"http_interactions":[{"request":{"method":"get","uri":"http://cookbooks.opscode.com/api/v1/cookbooks/nginx","body":{"encoding":"US-ASCII","string":""},"headers":{"User-Agent":["Faraday v0.8.6"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],"Accept":["*/*"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["nginx/1.0.5"],"Date":["Sat, 16 Mar 2013 02:51:34 GMT"],"Content-Type":["application/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"Status":["200 OK"],"Set-Cookie":["_sandbox_session=eyJzZXNzaW9uX2lkIjoiOGY0ODYyMDFjMWU0NDBlNDY3N2ViY2YxNDg4NTgzZTMiLCJsb2NhdGlvbiI6eyJjb250cm9sbGVyIjoiYXBpL3YxL2Nvb2tib29rcyIsImFjdGlvbiI6InNob3ciLCJpZCI6Im5naW54In19--a965926c4c2fe19cd23878bc6a66d57b17fa92a1; domain=.opscode.com; path=/; HttpOnly","logged-in-username=; domain=.opscode.com; path=/"],"Etag":["\"6329d2675f7744bced8ce2d39af3b7fb\""],"X-Runtime":["17"],"Cache-Control":["private, max-age=0, must-revalidate"]},"body":{"encoding":"UTF-8","string":"{\"average_rating\":3.875,\"maintainer\":\"opscode\",\"versions\":[\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/1_4_0\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/1_3_0\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/1_2_0\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/1_1_4\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/1_1_2\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/1_1_0\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/1_0_2\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/1_0_0\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_101_6\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_101_4\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_101_2\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_101_0\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_100_2\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_100_0\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_99_2\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_99_0\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_14_4\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_14_3\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_14_2\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_14_1\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_14_0\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_12_1\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_10_0\",\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/0_8_0\"],\"category\":\"Web Servers\",\"external_url\":\"github.com/opscode-cookbooks/nginx\",\"description\":\"Installs and configures nginx\",\"latest_version\":\"http://cookbooks.opscode.com/api/v1/cookbooks/nginx/versions/1_4_0\",\"updated_at\":\"2013-02-24T05:49:20Z\",\"name\":\"nginx\",\"created_at\":\"2009-10-25T23:52:41Z\"}"},"http_version":null},"recorded_at":"Sat, 16 Mar 2013 02:51:36 GMT"}],"recorded_with":"VCR 2.4.0"}