knife-essentials 1.5.5 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fe966441665a2b2fa2a31a35d70e9b6d5dc5cca
4
- data.tar.gz: 666a81d4689d4d14f07a929130462b842ffaef2a
3
+ metadata.gz: 9f5e9601c1d93e545374c8a77e63a54237f0efc0
4
+ data.tar.gz: ab0ad4412f37f9d92a2456d559594f695176d834
5
5
  SHA512:
6
- metadata.gz: cae74146ec9c20df098fe8e4f7f6b310932074eb34990f175dca28fca343bb54579ee5275afac36725d6c59e4c140b13af6c27bd92cf37136b723f26f4ed9561
7
- data.tar.gz: 24be30a2b86cd6d2c80744712457c9d2acc57daa0b7e82c9cdb128a5783832c9c433281ed705d0661c27576208123307677df073b8d994e790a35bfbffbb2f93
6
+ metadata.gz: 1cab9aa9bd63648ec2103235ed360434d6add3ad45641253ac24d78e0be5663b1795af2b48c9d3a5e09f253308078d173190eb0b25e94e57e36fec9f81681bb3
7
+ data.tar.gz: f76e225cd377bbf0f7d4e947bae99c2a9893d8efae40d50a6cbe2df6b8bff6dc3479cb176b9b0af67c1de300ada27fa63557e614784e710a8e9a095406ad3187
@@ -1,29 +1,33 @@
1
- == Knife Essentials
1
+ ## Knife Essentials
2
2
 
3
- = DESCRIPTION:
3
+ # MERGED TO CORE CHEF!
4
+
5
+ knife-essentials has been merged to Core [Chef](https://github.com/opscode/chef) as of Chef 11 and active development is going on there (though bugfixes are still accepted here, they will need to get into chef too).
6
+
7
+ # DESCRIPTION:
4
8
 
5
9
  knife-essentials provides a number of useful knife commands that allow you
6
10
  to manipulate Chef using a common set of verbs that work on *everything*
7
11
  that is stored in the Chef server.
8
12
 
9
- knife diff cookbooks/*apache*
10
- knife download roles data_bags cookbooks/emacs
11
- knife upload apache*
12
- knife list data_bags/users
13
- knife deps roles/base.json
14
- cd cookbooks && knife show *base*
13
+ knife diff cookbooks/*apache*
14
+ knife download roles data_bags cookbooks/emacs
15
+ knife upload apache*
16
+ knife list data_bags/users
17
+ knife deps roles/base.json
18
+ cd cookbooks && knife show *base*
15
19
 
16
20
  More verbs will be added as time goes by.
17
21
 
18
- = INSTALLATION:
22
+ # INSTALLATION:
19
23
 
20
24
  This plugin can be installed as a Ruby Gem.
21
25
 
22
26
  gem install knife-essentials
23
27
 
24
- You can also copy the source repository and install it using +rake install+.
28
+ You can also copy the source repository and install it using `rake install`.
25
29
 
26
- = PRINCIPLES
30
+ # PRINCIPLES
27
31
 
28
32
  * Unified commands that work on everything
29
33
 
@@ -31,15 +35,15 @@ knife-essentials thinks verbs come first. There are only a few things you need
31
35
  pretty much everything in the system: you upload them, download them, look at
32
36
  them, edit them, list them, diff them, and delete then.
33
37
 
34
- knife-essentials provides a number of verb commands: +knife diff roles+ and +knife list roles+
38
+ knife-essentials provides a number of verb commands: `knife diff roles` and `knife list roles`
35
39
  among them. These commands work on all types of objects, as well. You can type
36
- +knife diff roles+, or +knife diff data_bags/users/jkeiser.json+.
40
+ `knife diff roles`, or `knife diff data_bags/users/jkeiser.json`.
37
41
 
38
42
  * Treat the Chef server is like your filesystem
39
43
 
40
44
  knife-essentials treats the Chef server like a mirror of a Chef repository. Most of the
41
45
  stuff you do with the Chef Server is based on your local repository--a set of files
42
- in directories like +roles+, +data_bags+, +cookbooks+, etc. The Chef Server has
46
+ in directories like `roles`, `data_bags`, `cookbooks`, etc. The Chef Server has
43
47
  objects that match them--in fact, you can upload and download the files on your
44
48
  filesystem to change the file server.
45
49
 
@@ -48,11 +52,11 @@ diff, upload and download extremely simple to do and easy to understand.
48
52
 
49
53
  * Take context into account
50
54
 
51
- When you're in the +roles+ directory, the system knows that's what you are
52
- working with. Just type +knife show base.json+ and it will show you the base
53
- role from the server. knife-essentials knows.
55
+ When you're in the `roles` directory, the system knows that's what you are
56
+ working with. Just type `knife show base.json` and it will show you the base
57
+ role from the server. knife-essentials knows.
54
58
 
55
- = KNIFE PLUGINS
59
+ # KNIFE PLUGINS
56
60
 
57
61
  chef_fs installs a number of useful knife verbs, including:
58
62
 
@@ -62,77 +66,77 @@ chef_fs installs a number of useful knife verbs, including:
62
66
  knife show [pattern2 pattern2 ...]
63
67
 
64
68
  These commands will list data on the server, exactly mirroring
65
- the data in a local Chef repository. So if you type +knife diff data_bags/*s+,
66
- it will diff all data bags that end with +s+.
69
+ the data in a local Chef repository. So if you type `knife diff data_bags/*s`,
70
+ it will diff all data bags that end with `s`.
67
71
 
68
- The commands are also context-sensitive. If you are in the ++roles++ directory
69
- and type +knife show *base*+, you will get the current Chef server contents of all
70
- roles that contain the word +base+ in them.
72
+ The commands are also context-sensitive. If you are in the ``roles`` directory
73
+ and type `knife show *base*`, you will get the current Chef server contents of all
74
+ roles that contain the word `base` in them.
71
75
 
72
76
  The Knife commands generally run off file patterns (globs you can type on the
73
77
  command line). Patterns can include *, ?, ** and character matchers like
74
78
  [a-z045].
75
79
 
76
- == Prerequisites
80
+ ## Prerequisites
77
81
 
78
82
  To run the knife plugin functionality, install a version of Chef > 0.10.10:
79
83
 
80
84
  gem install chef
81
85
 
82
- == knife diff
86
+ ## knife diff
83
87
 
84
88
  knife diff [pattern1 pattern2 ...]
85
89
 
86
90
  Diffs objects on the server against files in the local repository. Output is similar to
87
- +git diff+.
91
+ `git diff`.
88
92
 
89
- == knife download
93
+ ## knife download
90
94
 
91
95
  knife download [pattern1 pattern2 ...]
92
96
 
93
97
  Downloads objects from the server to your local repository. Pass --purge to delete local
94
98
  files and directories which do not exist on the server.
95
99
 
96
- == knife list
100
+ ## knife list
97
101
 
98
102
  knife list [pattern1 pattern2 ...]
99
103
 
100
104
  Works just like 'ls', except it lists files on the server.
101
105
 
102
- == knife show
106
+ ## knife show
103
107
 
104
108
  knife show [pattern1 pattern2 ...]
105
109
 
106
- Works just like +knife node show+, +knife role show+, etc. except there is One Verb To Rule
110
+ Works just like `knife node show`, `knife role show`, etc. except there is One Verb To Rule
107
111
  Them All.
108
112
 
109
- == knife deps
113
+ ## knife deps
110
114
 
111
115
  knife deps [pattern1 pattern2 ...]
112
116
 
113
117
  Given a set of nodes, roles, or cookbooks, will traverse dependencies and show
114
118
  other roles, cookbooks, and environments that need to be loaded for them to
115
- work. Use +--tree+ parameter to show this in a tree structure. Use +--remote+
119
+ work. Use `--tree` parameter to show this in a tree structure. Use `--remote`
116
120
  to perform this operation against the data on the server rather than the local
117
121
  Chef repository.
118
122
 
119
- = CONFIGURATION
123
+ # CONFIGURATION
120
124
 
121
- There are several variables you can set in your +knife.rb+ file to alter the
125
+ There are several variables you can set in your `knife.rb` file to alter the
122
126
  behavior of knife-essentials
123
127
 
124
- == chef_repo_path
128
+ ## chef_repo_path
125
129
 
126
130
  chef_repo_path PATH|[PATH1, PATH2, ...]
127
131
 
128
132
  This is the path to the top of your chef repository. Multiple paths are
129
- supported. If you do not specify this, it defaults to +cookbook_path/..+ (for
130
- historical reasons, many knife.rb files contain +cookbook_path+.)
133
+ supported. If you do not specify this, it defaults to `cookbook_path/..` (for
134
+ historical reasons, many knife.rb files contain `cookbook_path`.)
131
135
 
132
- If you specify this or +cookbook_path+, it is not necessary to specify the other paths (+client_path+,
133
- +data_bag_path+, etc.). They will be assumed to be under the chef_repo_path(s).
136
+ If you specify this or `cookbook_path`, it is not necessary to specify the other paths (`client_path`,
137
+ `data_bag_path`, etc.). They will be assumed to be under the chef_repo_path(s).
134
138
 
135
- == *_path
139
+ ## *_path
136
140
 
137
141
  client_path PATH|[PATH1, PATH2, ...]
138
142
  cookbook_path PATH|[PATH1, PATH2, ...]
@@ -144,7 +148,7 @@ If you specify this or +cookbook_path+, it is not necessary to specify the other
144
148
 
145
149
  The local path where client json files, cookbook directories, etc. are stored.
146
150
  Each supports multiple paths, in which case all files/subdirectories from each
147
- path are merged into one virtual path (i.e. when you +knife list cookbooks+ it
151
+ path are merged into one virtual path (i.e. when you `knife list cookbooks` it
148
152
  will show you a list including all cookbooks from all cookbook_paths).
149
153
 
150
154
  You generally do NOT need to specify these. If you do not specify an _path
@@ -153,20 +157,20 @@ Each of these supports multiple paths. If multiple paths are supported, and a
153
157
  new object is downloaded (say, a new cookbook), the object is downloaded into
154
158
  the *first* path in the list. Updated objects stay where they are.
155
159
 
156
- == versioned_cookbooks
160
+ ## versioned_cookbooks
157
161
 
158
162
  versioned_cookbooks true
159
163
 
160
- This option, when set to +true+, will cause knife-essentials to work with
164
+ This option, when set to `true`, will cause knife-essentials to work with
161
165
  multiple versions of cookbooks. In this case, your /cookbooks directory will
162
- have cookbook directory names of the form: +apache2-1.0.0+, +apache2-1.0.1+,
163
- +mysql-1.1.2+, etc. A full download of /cookbooks will download all versions,
166
+ have cookbook directory names of the form: `apache2-1.0.0`, `apache2-1.0.1`,
167
+ `mysql-1.1.2`, etc. A full download of /cookbooks will download all versions,
164
168
  And a diff of a specific version will diff exactly that version and no other.
165
169
 
166
170
  This is super handy, especially combined with repo_mode "everything," as it will
167
171
  allow you to back up or restore a full copy of your Chef server.
168
172
 
169
- == repo_mode
173
+ ## repo_mode
170
174
 
171
175
  repo_mode "everything"
172
176
 
@@ -176,19 +180,19 @@ including users, clients and nodes.
176
180
  The author is not particularly happy about the necessity for this, and will try
177
181
  to get rid of it as soon as a way is found to avoid violating the Principle of
178
182
  Least Surprise. The reason things are split this way is that most people don't
179
- store users, clients and nodes in source control. +knife deps+ fares very
180
- poorly due to the way things are; but +knife diff+ gets surprising if it shows
183
+ store users, clients and nodes in source control. `knife deps` fares very
184
+ poorly due to the way things are; but `knife diff` gets surprising if it shows
181
185
  nodes, which aren't usually in your repo.
182
186
 
183
- == NOTE ABOUT WILDCARDS
187
+ ## NOTE ABOUT WILDCARDS
184
188
 
185
189
  knife-essentials supports wildcards internally, and will use them to sift through objects
186
190
  on the server. This can be very useful. However, since it uses the same wildcard
187
- characters as the Unix command line (+*+, +?+, etc.), you need to backslash them so that
188
- the +*+ actually reaches the server. If you don't, the shell will expand the * into
189
- actual filenames and knife will never know you typed +*+ in the first place. For example,
190
- if the Chef server has data bags +aardvarks+, +anagrams+ and +arp_tables+, but your local
191
- filesystem only has +aardvarks+ and +anagrams+, backslashing vs. not backslashing will
191
+ characters as the Unix command line (`*`, `?`, etc.), you need to backslash them so that
192
+ the `*` actually reaches the server. If you don't, the shell will expand the * into
193
+ actual filenames and knife will never know you typed `*` in the first place. For example,
194
+ if the Chef server has data bags `aardvarks`, `anagrams` and `arp_tables`, but your local
195
+ filesystem only has `aardvarks` and `anagrams`, backslashing vs. not backslashing will
192
196
  yield slightly different results:
193
197
 
194
198
  # This actually asks the server for everything starting with a
@@ -35,6 +35,10 @@ module ChefFS
35
35
  result
36
36
  end
37
37
 
38
+ def normalize_for_post(group, entry)
39
+ normalize_for_put(group, entry)
40
+ end
41
+
38
42
  def preserve_key(key)
39
43
  return key == 'name'
40
44
  end
@@ -1,3 +1,3 @@
1
1
  module ChefFS
2
- VERSION = "1.5.5"
2
+ VERSION = "1.5.6"
3
3
  end
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-essentials
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-03 00:00:00.000000000 Z
11
+ date: 2014-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: chef-zero
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rdoc
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: puma
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.6'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.6'
97
97
  description: Universal knife verbs that work with your Chef repository
@@ -99,11 +99,11 @@ email: jkeiser@opscode.com
99
99
  executables: []
100
100
  extensions: []
101
101
  extra_rdoc_files:
102
- - README.rdoc
102
+ - README.md
103
103
  - LICENSE
104
104
  files:
105
105
  - LICENSE
106
- - README.rdoc
106
+ - README.md
107
107
  - Rakefile
108
108
  - lib/chef/knife/converge_essentials.rb
109
109
  - lib/chef/knife/delete_essentials.rb
@@ -117,6 +117,7 @@ files:
117
117
  - lib/chef/knife/show_essentials.rb
118
118
  - lib/chef/knife/upload_essentials.rb
119
119
  - lib/chef/knife/xargs_essentials.rb
120
+ - lib/chef_fs.rb
120
121
  - lib/chef_fs/chef_fs_data_store.rb
121
122
  - lib/chef_fs/command_line.rb
122
123
  - lib/chef_fs/config.rb
@@ -132,6 +133,7 @@ files:
132
133
  - lib/chef_fs/data_handler/role_data_handler.rb
133
134
  - lib/chef_fs/data_handler/user_data_handler.rb
134
135
  - lib/chef_fs/file_pattern.rb
136
+ - lib/chef_fs/file_system.rb
135
137
  - lib/chef_fs/file_system/acl_dir.rb
136
138
  - lib/chef_fs/file_system/acl_entry.rb
137
139
  - lib/chef_fs/file_system/acls_dir.rb
@@ -171,13 +173,11 @@ files:
171
173
  - lib/chef_fs/file_system/operation_not_allowed_error.rb
172
174
  - lib/chef_fs/file_system/rest_list_dir.rb
173
175
  - lib/chef_fs/file_system/rest_list_entry.rb
174
- - lib/chef_fs/file_system.rb
175
176
  - lib/chef_fs/knife.rb
176
177
  - lib/chef_fs/parallelizer.rb
177
178
  - lib/chef_fs/path_utils.rb
178
179
  - lib/chef_fs/raw_request.rb
179
180
  - lib/chef_fs/version.rb
180
- - lib/chef_fs.rb
181
181
  - spec/chef_fs/diff_spec.rb
182
182
  - spec/chef_fs/file_pattern_spec.rb
183
183
  - spec/chef_fs/file_system/operation_failed_error_spec.rb
@@ -210,17 +210,17 @@ require_paths:
210
210
  - lib
211
211
  required_ruby_version: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - '>='
213
+ - - ">="
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0'
216
216
  required_rubygems_version: !ruby/object:Gem::Requirement
217
217
  requirements:
218
- - - '>='
218
+ - - ">="
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  requirements: []
222
222
  rubyforge_project:
223
- rubygems_version: 2.0.3
223
+ rubygems_version: 2.2.2
224
224
  signing_key:
225
225
  specification_version: 4
226
226
  summary: Universal knife verbs that work with your Chef repository