knife-bulkchangeenvironment 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MzQwN2UyNmMxOTQwMDg2NzNmY2E4Mjk0NTYxMWI1MjM0NjkyMDZkZQ==
5
+ data.tar.gz: !binary |-
6
+ Yjc5YmUyNjc4OWMyNTI2YTAyMTY0ZjQxZGQwY2YyZDE5Nzc5NDg0NQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MDhjZjhlZjhlMzczMGU1YmQ2NzMxZmZmODdjMTBhOWU3ZTFlMmRhYzM2MmYy
10
+ NTFmZjcxYTlmYjA4OWVjZTYzZWU5ZTBiMzNmZWE2MjE2MzE3ZjA1NDFhZjFl
11
+ NjExMDQ5MWRjNzRiY2UzYTkzN2RkZjU0ZmYyNjRlN2JmOGY3Yzk=
12
+ data.tar.gz: !binary |-
13
+ YTE5YzJjMTAzOTExNTlkYTZhY2MzODMwZDJjZjU1NGYwYTdiYjdjNDk4ZGU3
14
+ ZjMwNzY1ZDg1MDA5YmI1MjA5ODU2ZGU2NDNlYjgwODMxOTJjMGIwZWExNTIw
15
+ NjEzZjJlMmU1ZjMyODc1MjQ4ODE3NWQxYzVlYTFlMDRiMzFkYWI=
data/README.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  A plugin for Chef::Knife which lets you move all nodes in one environment into another.
4
4
 
5
+ ## GEM INSTALL
6
+ knife-bulkchangeenvironment is available on rubygems.org - if you have that source in your gemrc, you can simply use:
7
+
8
+ ````
9
+ gem install knife-bulkchangeenvironment
10
+ ````
11
+
5
12
  ## Preface
6
13
 
7
14
  Searches for all nodes in a particular environment and moves them to another
@@ -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-bulkchangeenvironment'
16
- s.version = '0.1.0'
17
- s.date = '2012-01-28'
16
+ s.version = '0.1.1'
17
+ s.date = '2013-11-22'
18
18
  s.rubyforge_project = 'knife-bulkchangeenvironment'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
@@ -31,8 +31,7 @@ module KnifeBulkChangeEnv
31
31
 
32
32
  searcher = Chef::Search::Query.new
33
33
  result = searcher.search(:environment, "name:#{@old_env}")
34
-
35
- knife_search = Chef::Knife::Search.new
34
+
36
35
  env = result.first.first
37
36
  if env.nil?
38
37
  puts "Could not find an environment named #{@old_env}. Can't update nodes in a non-existant environment!"
@@ -46,8 +45,7 @@ module KnifeBulkChangeEnv
46
45
 
47
46
  searcher = Chef::Search::Query.new
48
47
  result = searcher.search(:environment, "name:#{@new_env}")
49
-
50
- knife_search = Chef::Knife::Search.new
48
+
51
49
  env = result.first.first
52
50
  if env.nil?
53
51
  puts "Could not find an environment named #{@new_env}. Please create it before trying to put nodes in it!"
@@ -55,10 +53,6 @@ module KnifeBulkChangeEnv
55
53
  else
56
54
  puts "Found!\n"
57
55
  end
58
-
59
- #puts "Setting environment to #{@environment}"
60
- #node.chef_environment(@environment)
61
- #node.save
62
56
 
63
57
  q_nodes = Chef::Search::Query.new
64
58
  node_query = "chef_environment:#{@old_env}"
@@ -77,7 +71,7 @@ module KnifeBulkChangeEnv
77
71
  node_item.save
78
72
  formatted_item_node = format_for_display(node_item)
79
73
  if formatted_item_node.respond_to?(:has_key?) && !formatted_item_node.has_key?('id')
80
- formatted_item_node['id'] = node_item.has_key?('id') ? node_item['id'] : node_item.name
74
+ formatted_item_node.normal['id'] = node_item.has_key?('id') ? node_item['id'] : node_item.name
81
75
  end
82
76
  ui.msg("Updated #{formatted_item_node.name}...")
83
77
  result_items << formatted_item_node
metadata CHANGED
@@ -1,82 +1,63 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: knife-bulkchangeenvironment
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 0
9
- version: 0.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Jon Cowie
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2012-01-28 00:00:00 +00:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2013-11-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: chef
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 10
31
- - 4
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
32
19
  version: 0.10.4
33
20
  type: :runtime
34
- version_requirements: *id001
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.10.4
35
27
  description: A knife plugin to move all nodes from one environment to another
36
28
  email: jonlives@gmail.com
37
29
  executables: []
38
-
39
30
  extensions: []
40
-
41
- extra_rdoc_files:
31
+ extra_rdoc_files:
42
32
  - README.md
43
- files:
33
+ files:
44
34
  - README.md
45
35
  - Rakefile
46
36
  - knife-bulkchangeenv.gemspec
47
37
  - lib/chef/knife/bulkchangeenv.rb
48
38
  - lib/knife-bulkchangeenv.rb
49
- has_rdoc: true
50
39
  homepage: https://github.com/jonlives/knife-bulkchangeenvironment
51
40
  licenses: []
52
-
41
+ metadata: {}
53
42
  post_install_message:
54
- rdoc_options:
43
+ rdoc_options:
55
44
  - --charset=UTF-8
56
- require_paths:
45
+ require_paths:
57
46
  - lib
58
- required_ruby_version: !ruby/object:Gem::Requirement
59
- none: false
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- segments:
64
- - 0
65
- version: "0"
66
- required_rubygems_version: !ruby/object:Gem::Requirement
67
- none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- segments:
72
- - 0
73
- version: "0"
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
74
57
  requirements: []
75
-
76
58
  rubyforge_project: knife-bulkchangeenvironment
77
- rubygems_version: 1.3.7
59
+ rubygems_version: 2.1.10
78
60
  signing_key:
79
61
  specification_version: 2
80
62
  summary: A knife plugin to move all nodes from one environment to another
81
63
  test_files: []
82
-