capistrano-chef 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ module Capistrano::Chef
8
8
  def self.configure_chef
9
9
  knife = Chef::Knife.new
10
10
  # If you don't do this it gets thrown into debug mode
11
- knife.config = { :verbosity => 1 }
11
+ Chef::Config[:verbosity] = 1 # :info
12
12
  knife.configure_chef
13
13
  end
14
14
 
@@ -48,7 +48,12 @@ module Capistrano::Chef
48
48
  configuration.load do
49
49
  def chef_role(name, query = '*:*', options = {})
50
50
  options = {:attribute => :ipaddress, :limit => 1000}.merge(options)
51
- role name, *(capistrano_chef.search_chef_nodes(query, options.delete(:attribute), options.delete(:limit)) + [options])
51
+ # Don't do the lookup if HOSTS is used.
52
+ # Allows deployment from knifeless machine
53
+ # to specific hosts (ie. developent, staging)
54
+ unless ENV['HOSTS']
55
+ role name, *(capistrano_chef.search_chef_nodes(query, options.delete(:attribute), options.delete(:limit)) + [options])
56
+ end
52
57
  end
53
58
 
54
59
  def set_from_data_bag(data_bag = :apps)
@@ -1,3 +1,3 @@
1
1
  module CapistranoChef
2
- VERSION = '0.0.5'.freeze
2
+ VERSION = '0.0.6'.freeze
3
3
  end
@@ -38,7 +38,6 @@ describe Capistrano::Chef do
38
38
  @knife = mock('Chef::Knife')
39
39
  Chef::Knife.stub!(:new).and_return(@knife)
40
40
  @knife.stub!(:configure_chef)
41
- @knife.stub!(:config=)
42
41
 
43
42
  # Load into capistrano configuration
44
43
  @configuration = Capistrano::Configuration.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
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: 2012-10-09 00:00:00.000000000 Z
12
+ date: 2013-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -77,7 +77,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  segments:
79
79
  - 0
80
- hash: -2495257063042549359
80
+ hash: -1809424377071996865
81
81
  required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  none: false
83
83
  requirements:
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: '0'
87
87
  segments:
88
88
  - 0
89
- hash: -2495257063042549359
89
+ hash: -1809424377071996865
90
90
  requirements: []
91
91
  rubyforge_project: capistrano-chef
92
92
  rubygems_version: 1.8.24