Skip to content

Commit

Permalink
Merge branch '0.10.6-rc'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
btm committed Jan 17, 2012
2 parents c75210a + 4ae2e38 commit ba48a30
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 20 deletions.
9 changes: 9 additions & 0 deletions chef-expander/lib/chef/expander/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ def self.configurable(setting, default=nil, &validation)

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
Expand Down
2 changes: 1 addition & 1 deletion chef-expander/lib/chef/expander/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
module Chef
module Expander

VERSION = "0.10.7"
VERSION = "0.10.8"

def self.version
@rev ||= begin
Expand Down
4 changes: 4 additions & 0 deletions chef-expander/spec/unit/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,8 @@
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
2 changes: 1 addition & 1 deletion chef-server-api/lib/chef-server-api/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ChefServerApi
VERSION = '0.10.7'
VERSION = '0.10.8'
end
2 changes: 1 addition & 1 deletion chef-server-webui/lib/chef-server-webui/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ChefServerWebui
VERSION = '0.10.7'
VERSION = '0.10.8'
end
2 changes: 1 addition & 1 deletion chef-server/lib/chef-server/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
#

module ChefServer
VERSION = '0.10.7'
VERSION = '0.10.8'
end
2 changes: 1 addition & 1 deletion chef-solr/lib/chef/solr/version.rb
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion chef/chef.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
5 changes: 0 additions & 5 deletions chef/lib/chef/knife/role_from_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ def loader
@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)
Expand Down
1 change: 0 additions & 1 deletion chef/lib/chef/provider/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ def link_tempfiles_to_current_release

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
Expand Down
4 changes: 2 additions & 2 deletions chef/lib/chef/provider/package/freebsd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def port_path
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

Expand Down Expand Up @@ -97,7 +97,7 @@ def install_package(name, version)
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}")
Expand Down
2 changes: 1 addition & 1 deletion chef/lib/chef/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 6 additions & 5 deletions chef/spec/unit/provider/package/freebsd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@
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
Expand All @@ -120,6 +120,7 @@
@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
Expand All @@ -129,8 +130,8 @@

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
Expand Down Expand Up @@ -187,7 +188,7 @@

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
Expand Down

0 comments on commit ba48a30

Please sign in to comment.