diff options
author | Bryan McLellan <btm@opscode.com> | 2012-01-17 13:13:36 -0800 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2012-01-17 13:13:36 -0800 |
commit | ba48a30239ae9e19707338bd184630d45d9601ce (patch) | |
tree | 4dc05bc178670f72800712cc9ef72bf11135733a | |
parent | c75210add6b865046d87b4f508c68e917d4acbe5 (diff) | |
parent | 4ae2e384e50858da7ce571e7e5ac3f974c81f0ec (diff) | |
download | chef-ba48a30239ae9e19707338bd184630d45d9601ce.tar.gz |
Merge branch '0.10.6-rc'
Conflicts:
chef-expander/lib/chef/expander/version.rb
chef-server-api/lib/chef-server-api/version.rb
chef-server-webui/lib/chef-server-webui/version.rb
chef-server/lib/chef-server/version.rb
chef-solr/lib/chef/solr/version.rb
chef/chef.gemspec
chef/lib/chef/resource.rb
chef/lib/chef/shell_out/windows.rb
chef/lib/chef/version.rb
chef/spec/unit/resource/conditional_spec.rb
chef/spec/unit/resource/execute_spec.rb
chef/spec/unit/resource_spec.rb
-rw-r--r-- | chef-expander/lib/chef/expander/configuration.rb | 9 | ||||
-rw-r--r-- | chef-expander/lib/chef/expander/version.rb | 2 | ||||
-rw-r--r-- | chef-expander/spec/unit/configuration_spec.rb | 4 | ||||
-rw-r--r-- | chef-server-api/lib/chef-server-api/version.rb | 2 | ||||
-rw-r--r-- | chef-server-webui/lib/chef-server-webui/version.rb | 2 | ||||
-rw-r--r-- | chef-server/lib/chef-server/version.rb | 2 | ||||
-rw-r--r-- | chef-solr/lib/chef/solr/version.rb | 2 | ||||
-rw-r--r-- | chef/chef.gemspec | 2 | ||||
-rw-r--r-- | chef/lib/chef/knife/role_from_file.rb | 5 | ||||
-rw-r--r-- | chef/lib/chef/provider/deploy.rb | 1 | ||||
-rw-r--r-- | chef/lib/chef/provider/package/freebsd.rb | 4 | ||||
-rw-r--r-- | chef/lib/chef/version.rb | 2 | ||||
-rw-r--r-- | chef/spec/unit/provider/package/freebsd_spec.rb | 11 |
13 files changed, 28 insertions, 20 deletions
diff --git a/chef-expander/lib/chef/expander/configuration.rb b/chef-expander/lib/chef/expander/configuration.rb index 58b29fc9cc..8fbaba762a 100644 --- a/chef-expander/lib/chef/expander/configuration.rb +++ b/chef-expander/lib/chef/expander/configuration.rb @@ -145,6 +145,15 @@ module Chef configurable :solr_url, "http://localhost:8983/solr" + # override the setter for solr_url for backward compatibilty + def solr_url=(url) + if url && url == "http://localhost:8983" + log.warn {"You seem to have a legacy setting for solr_url: did you mean #{url}/solr ?"} + url = "#{url}/solr" + end + @solr_url = url + end + configurable :amqp_host, '0.0.0.0' configurable :amqp_port, 5672 diff --git a/chef-expander/lib/chef/expander/version.rb b/chef-expander/lib/chef/expander/version.rb index 4e6596e82e..8d8a2a0651 100644 --- a/chef-expander/lib/chef/expander/version.rb +++ b/chef-expander/lib/chef/expander/version.rb @@ -23,7 +23,7 @@ require 'open3' module Chef module Expander - VERSION = "0.10.7" + VERSION = "0.10.8" def self.version @rev ||= begin diff --git a/chef-expander/spec/unit/configuration_spec.rb b/chef-expander/spec/unit/configuration_spec.rb index 30460ae69e..eed19c2b67 100644 --- a/chef-expander/spec/unit/configuration_spec.rb +++ b/chef-expander/spec/unit/configuration_spec.rb @@ -134,4 +134,8 @@ describe Expander::Configuration do Expander.config.node_count.should == 23 end + it "appends /solr to the legacy solr_url" do + Expander.config.solr_url = "http://localhost:8983" + @config.solr_url.should == "http://localhost:8983/solr" + end end
\ No newline at end of file diff --git a/chef-server-api/lib/chef-server-api/version.rb b/chef-server-api/lib/chef-server-api/version.rb index 709ef5535d..9cf5a794ef 100644 --- a/chef-server-api/lib/chef-server-api/version.rb +++ b/chef-server-api/lib/chef-server-api/version.rb @@ -1,3 +1,3 @@ module ChefServerApi - VERSION = '0.10.7' + VERSION = '0.10.8' end diff --git a/chef-server-webui/lib/chef-server-webui/version.rb b/chef-server-webui/lib/chef-server-webui/version.rb index 35588b3c85..e7d7535845 100644 --- a/chef-server-webui/lib/chef-server-webui/version.rb +++ b/chef-server-webui/lib/chef-server-webui/version.rb @@ -1,3 +1,3 @@ module ChefServerWebui - VERSION = '0.10.7' + VERSION = '0.10.8' end diff --git a/chef-server/lib/chef-server/version.rb b/chef-server/lib/chef-server/version.rb index 398856f466..8d2f99912a 100644 --- a/chef-server/lib/chef-server/version.rb +++ b/chef-server/lib/chef-server/version.rb @@ -17,5 +17,5 @@ # module ChefServer - VERSION = '0.10.7' + VERSION = '0.10.8' end diff --git a/chef-solr/lib/chef/solr/version.rb b/chef-solr/lib/chef/solr/version.rb index 3dfb6fcbc4..cee038311a 100644 --- a/chef-solr/lib/chef/solr/version.rb +++ b/chef-solr/lib/chef/solr/version.rb @@ -1,6 +1,6 @@ class Chef class Solr - VERSION = '0.10.7' + VERSION = '0.10.8' # Solr Schema. Used to detect incompatibilities between installed solr and # chef-solr versions. diff --git a/chef/chef.gemspec b/chef/chef.gemspec index b460c7549b..f8794cfce2 100644 --- a/chef/chef.gemspec +++ b/chef/chef.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |s| s.add_dependency "net-ssh-multi", "~> 1.1.0" %w{erubis moneta highline uuidtools}.each { |gem| s.add_dependency gem } - %w(rspec-core rspec-expectations rspec-mocks rspec_junit_formatter).each { |gem| s.add_development_dependency gem } + %w(rdoc sdoc ronn rake rspec-core rspec-expectations rspec-mocks rspec_junit_formatter).each { |gem| s.add_development_dependency gem } s.bindir = "bin" s.executables = %w( chef-client chef-solo knife shef ) diff --git a/chef/lib/chef/knife/role_from_file.rb b/chef/lib/chef/knife/role_from_file.rb index 8bc4a4102e..c80218b753 100644 --- a/chef/lib/chef/knife/role_from_file.rb +++ b/chef/lib/chef/knife/role_from_file.rb @@ -34,11 +34,6 @@ class Chef @loader ||= Knife::Core::ObjectLoader.new(Chef::Role, ui) end - option :all, - :short => "-a", - :long => "--all", - :description => "Upload all roles, rather than just a single role" - def run @name_args.each do |arg| updated = loader.load_from("roles", arg) diff --git a/chef/lib/chef/provider/deploy.rb b/chef/lib/chef/provider/deploy.rb index 8ede7d36c3..7e7ba5a8d2 100644 --- a/chef/lib/chef/provider/deploy.rb +++ b/chef/lib/chef/provider/deploy.rb @@ -273,7 +273,6 @@ class Chef links_info = @new_resource.symlinks.map { |src, dst| "#{src} => #{dst}" }.join(", ") @new_resource.symlinks.each do |src, dest| - create_dir_unless_exists(::File.join(@new_resource.shared_path, src)) begin FileUtils.ln_sf(::File.join(@new_resource.shared_path, src), ::File.join(release_path, dest)) rescue => e diff --git a/chef/lib/chef/provider/package/freebsd.rb b/chef/lib/chef/provider/package/freebsd.rb index 2de2596844..436c4b707d 100644 --- a/chef/lib/chef/provider/package/freebsd.rb +++ b/chef/lib/chef/provider/package/freebsd.rb @@ -60,7 +60,7 @@ class Chef end def ports_makefile_variable_value(variable) - make_v = shell_out!("make -V #{variable} -f #{port_path}/Makefile", :env => nil, :returns => [0,1]) + make_v = shell_out!("make -V #{variable}", :cwd => port_path, :env => nil, :returns => [0,1]) make_v.stdout.strip.split($\).first # $\ is the line separator, i.e., newline end @@ -97,7 +97,7 @@ class Chef unless @current_resource.version case @new_resource.source when /^ports$/ - shell_out!("make -DBATCH -f #{port_path}/Makefile install", :timeout => 1200, :env => nil).status + shell_out!("make -DBATCH install", :timeout => 1200, :env => nil, :cwd => port_path).status when /^http/, /^ftp/ shell_out!("pkg_add -r #{package_name}", :env => { "PACKAGESITE" => @new_resource.source, 'LC_ALL' => nil }).status Chef::Log.debug("#{@new_resource} installed from: #{@new_resource.source}") diff --git a/chef/lib/chef/version.rb b/chef/lib/chef/version.rb index 88180336ac..0fed662131 100644 --- a/chef/lib/chef/version.rb +++ b/chef/lib/chef/version.rb @@ -17,7 +17,7 @@ class Chef CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__))) - VERSION = '0.10.7' + VERSION = '0.10.8' end # NOTE: the Chef::Version class is defined in version_class.rb diff --git a/chef/spec/unit/provider/package/freebsd_spec.rb b/chef/spec/unit/provider/package/freebsd_spec.rb index 56dd9a6322..5b1662ba61 100644 --- a/chef/spec/unit/provider/package/freebsd_spec.rb +++ b/chef/spec/unit/provider/package/freebsd_spec.rb @@ -100,14 +100,14 @@ describe Chef::Provider::Package::Freebsd, "load_current_resource" do it "should return the ports candidate version when given a valid port path" do @provider.stub!(:port_path).and_return("/usr/ports/shells/zsh") make_v = OpenStruct.new(:stdout => "4.3.6\n") - @provider.should_receive(:shell_out!).with("make -V PORTVERSION -f /usr/ports/shells/zsh/Makefile", :env => nil, :returns=>[0,1]).and_return(make_v) + @provider.should_receive(:shell_out!).with("make -V PORTVERSION", {:cwd=>"/usr/ports/shells/zsh", :returns=>[0, 1], :env=>nil}).and_return(make_v) @provider.ports_candidate_version.should == "4.3.6" end it "should figure out the package name" do @provider.stub!(:port_path).and_return("/usr/ports/shells/zsh") make_v = OpenStruct.new(:stdout => "zsh-4.3.6_7\n") - @provider.should_receive(:shell_out!).with('make -V PKGNAME -f /usr/ports/shells/zsh/Makefile', :env => nil, :returns=>[0,1]).and_return(make_v) + @provider.should_receive(:shell_out!).with("make -V PKGNAME", {:cwd=>"/usr/ports/shells/zsh", :env=>nil, :returns=>[0, 1]}).and_return(make_v) #@provider.should_receive(:ports_makefile_variable_value).with("PKGNAME").and_return("zsh-4.3.6_7") @provider.package_name.should == "zsh" end @@ -120,6 +120,7 @@ describe Chef::Provider::Package::Freebsd, "load_current_resource" do @provider.current_resource = @current_resource @provider.stub!(:package_name).and_return("zsh") @provider.stub!(:latest_link_name).and_return("zsh") + @provider.stub!(:port_path).and_return("/usr/ports/shells/zsh") end it "should run pkg_add -r with the package name" do @@ -129,8 +130,8 @@ describe Chef::Provider::Package::Freebsd, "load_current_resource" do it "should run make install when installing from ports" do @new_resource.stub!(:source).and_return("ports") - @provider.should_receive(:port_path).and_return("/usr/ports/shells/zsh") - @provider.should_receive(:shell_out!).with("make -DBATCH -f /usr/ports/shells/zsh/Makefile install", :timeout => 1200, :env=>nil).and_return(@cmd_result) + @provider.should_not_receive(:shell_out!).with("make -DBATCH -f /usr/ports/shells/zsh/Makefile install", :timeout => 1200, :env=>nil) + @provider.should_receive(:shell_out!).with("make -DBATCH install", :timeout => 1200, :env=>nil, :cwd => @provider.port_path).and_return(@cmd_result) @provider.install_package("zsh", "4.3.6_7") end end @@ -187,7 +188,7 @@ describe Chef::Provider::Package::Freebsd, "load_current_resource" do it "should run make install when installing from ports" do @new_resource.stub!(:source).and_return("ports") - @provider.should_receive(:shell_out!).with("make -DBATCH -f /usr/ports/converters/ruby-iconv/Makefile install", :timeout => 1200, :env=>nil).and_return(@install_result) + @provider.should_receive(:shell_out!).with("make -DBATCH install", :timeout => 1200, :env=>nil, :cwd => @provider.port_path).and_return(@install_result) @provider.install_package("ruby-iconv", "1.0") end end |