knife-flip 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'knife-flip'
16
- s.version = '0.1.5'
17
- s.date = '2013-03-12'
16
+ s.version = '0.1.6'
17
+ s.date = '2013-03-22'
18
18
  s.rubyforge_project = 'knife-flip'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
@@ -25,15 +25,15 @@ module KnifeFlip
25
25
  exit 1
26
26
  end
27
27
 
28
- puts "Looking for an fqdn of #{@node_name}"
28
+ puts "Looking for an fqdn of #{@node_name} or name of #{@node_name}"
29
29
 
30
30
  searcher = Chef::Search::Query.new
31
- result = searcher.search(:node, "fqdn:#{@node_name}")
31
+ result = searcher.search(:node, "fqdn:#{@node_name} OR name:#{@node_name}")
32
32
 
33
33
  knife_search = Chef::Knife::Search.new
34
34
  node = result.first.first
35
35
  if node.nil?
36
- puts "Could not find a node with the fqdn of #{@node_name}"
36
+ puts "Could not find a node with the fqdn of #{@node_name} or name of #{@node_name}"
37
37
  exit 1
38
38
  end
39
39
 
@@ -58,7 +58,7 @@ module KnifeFlip
58
58
  config[:start] = 0
59
59
  config[:rows] = 1000
60
60
  knife_search.config = config # without this, the +config+ hash is empty
61
- knife_search.name_args = ['node', "fqdn:#{@node_name}"]
61
+ knife_search.name_args = ['node', "fqdn:#{@node_name} OR name:#{@node_name}"]
62
62
  knife_search.run
63
63
 
64
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-flip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.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: 2013-03-12 00:00:00.000000000 Z
12
+ date: 2013-03-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef