knife-community 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -19,3 +19,5 @@ doc/
19
19
 
20
20
  Gemfile.lock
21
21
  .rvmrc
22
+
23
+ bin/
data/.travis.yml CHANGED
@@ -2,7 +2,10 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
+ bundler_args: --without=localdev
5
6
  env:
6
- - CHEF_VERSION=0.10.8
7
- - CHEF_VERSION=10.12.0
8
- - CHEF_VERSION=10.14.2
7
+ - CHEF_VERSION=10.20.0
8
+ - CHEF_VERSION=10.22.0
9
+ - CHEF_VERSION=10.24.0
10
+ - CHEF_VERSION=11.2.0
11
+ - CHEF_VERSION=11.4.0
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+
2
+ # v0.1.0 - February 26, 2013
3
+
4
+ - BugFix: Dropped a bunch older Chef versions due to a JSON dependency nightmare, passes tests
5
+ - Enhancement: Moved to a better SemVer version number, to reflect features vs patches
6
+ - Enhancement: Added mods from @schisamo, user flags for git push and share, preserves default behavior
7
+ - **NOTE**: a user prompt has been added to the community release. Use `-y` to bypass
8
+
9
+ # v0.0.1 - September 17, 2012
10
+
11
+ - Initial version, does a lot of the "heavy lifting" and accomplishes the task
data/Gemfile CHANGED
@@ -1,4 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ # These will not be used in travis builds, as they are more human-developer oriented
4
+ group :localdev do
5
+ gem 'travis-lint', '~> 1.4'
6
+ gem 'guard-rspec', '~> 2.4'
7
+ gem 'guard-cucumber', '~> 1.2'
8
+ end
9
+
3
10
  # Specify your gem's dependencies in knife-community.gemspec
4
11
  gemspec
data/README.md CHANGED
@@ -70,12 +70,15 @@ Flags
70
70
 
71
71
  This is a flow that some adopt by having even-only numbered releases, utilizing the [odd numbered ones for development][wiki:oddver].
72
72
 
73
+ There are other flags, run `knife community release -h` to see their specifications.
73
74
 
74
75
  Some good ideas while working on a cookbook
75
76
  -------------------------------------------
76
77
 
77
78
  Creating a `CHANGELOG.md` that details a short message about any changes included in each release is really helpful to anyone looking at your updated cookbook and seeing if it addresses a problem they have, without delving deeper into the code.
78
79
 
80
+ See the CHANGELOG for this project to get an idea of how to write one.
81
+
79
82
  Updating a `TODO.md` file if there are outstanding known issues, planned work for the next version, etc. A TODO file also helps anyone else in the community try to tackle a problem you haven't figured out or gotten to yet, so they can issue a pull request for your cookbook.
80
83
 
81
84
  Follow [Semantic Versioning][semver] when choosing which version number to increment to. Start your cookbook at 0.1.0, and increment from there, until you are confident enough in a 1.0.0 version.
data/Rakefile CHANGED
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
3
 
4
- task :default => [:features]
4
+ task :default => [:features, :tailor]
5
5
 
6
6
  # https://github.com/turboladen/tailor
7
7
  require 'tailor/rake_task'
8
8
  Tailor::RakeTask.new do |task|
9
- task.file_set('lib/**/*.rb', 'code') do |style|
9
+ task.file_set 'lib/**/*.rb', :code do |style|
10
10
  style.max_line_length 160, level: :warn
11
+ style.max_code_lines_in_method 40, level: :warn
11
12
  end
12
13
  end
13
14
 
@@ -1,12 +1,11 @@
1
1
  # Set up the environment for testing
2
2
  require 'aruba/cucumber'
3
- # require 'aruba-doubles/cucumber'
4
3
 
5
- # Before do
6
- # @dirs = ["tmp/aruba"]
7
- # end
4
+ Before do
5
+ @aruba_timeout_seconds = 5
6
+ end
8
7
 
9
- After do |s|
8
+ After do |s|
10
9
  # Tell Cucumber to quit after this scenario is done - if it failed.
11
10
  # This is useful to inspect the 'tmp/aruba' directory before any other
12
11
  # steps are executed and clear it out.
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
- chef_version = ENV.key?('CHEF_VERSION') ? "= #{ENV['CHEF_VERSION']}" : ['~> 10']
2
+ chef_version = ENV.key?('CHEF_VERSION') ? "= #{ENV['CHEF_VERSION']}" : ['>= 10', '<= 12']
3
3
  require File.expand_path('../lib/knife-community/version', __FILE__)
4
4
 
5
5
  Gem::Specification.new do |gem|
@@ -27,15 +27,12 @@ Gem::Specification.new do |gem|
27
27
 
28
28
  gem.required_ruby_version = '>= 1.9.2'
29
29
 
30
- gem.add_development_dependency 'rake', '~> 0.9'
31
- gem.add_development_dependency 'rspec', '~> 2.11.0'
32
- gem.add_development_dependency 'cucumber', '~> 1'
33
30
  gem.add_development_dependency 'aruba', '~> 0.4'
34
- gem.add_development_dependency 'tailor', '~> 1.1'
35
- gem.add_development_dependency 'travis-lint', '~> 1.4'
36
- gem.add_development_dependency 'guard', '~> 1.3'
37
- gem.add_development_dependency 'guard-rspec', '~> 1.2'
38
- gem.add_development_dependency 'guard-cucumber', '~> 1.2'
31
+ gem.add_development_dependency 'cucumber', '~> 1'
32
+ gem.add_development_dependency 'guard', '~> 1.6'
33
+ gem.add_development_dependency 'rake', '~> 10'
34
+ gem.add_development_dependency 'rspec', '~> 2.11'
35
+ gem.add_development_dependency 'tailor', '= 1.1.3' # See https://github.com/turboladen/tailor/issues/129
39
36
 
40
37
  gem.authors = ["Mike Fiedler"]
41
38
  gem.email = ["miketheman@gmail.com"]
@@ -40,6 +40,18 @@ module KnifeCommunity
40
40
  :boolean => true,
41
41
  :description => "Odd-numbered development cycle. Bump minor version & commit for development"
42
42
 
43
+ option :git_push,
44
+ :long => "--[no-]git-push",
45
+ :boolean => true,
46
+ :default => true,
47
+ :description => "Indicates whether the commits and tags should be pushed to pushed to the default git remote."
48
+
49
+ option :site_share,
50
+ :long => "--[no-]site-share",
51
+ :boolean => true,
52
+ :default => true,
53
+ :description => "Indicates whether the cookbook should be pushed to the community site."
54
+
43
55
  def run
44
56
  self.config = Chef::Config.merge!(config)
45
57
  validate_args
@@ -59,13 +71,21 @@ module KnifeCommunity
59
71
  set_new_cb_version
60
72
  commit_new_cb_version
61
73
  tag_new_cb_version
62
- git_push_commits
63
- git_push_tags
64
74
 
65
- share_new_version
75
+ if config[:git_push]
76
+ git_push_commits
77
+ git_push_tags
78
+ end
66
79
 
67
- ui.msg "Version #{@version} of the #{@cb_name} has been released!"
68
- ui.msg "Check it out at http://ckbk.it/#{@cb_name}"
80
+ if config[:site_share]
81
+ confirm_share_msg = "Shall I release version #{@version} of the"
82
+ confirm_share_msg << " #{@cb_name} cookbook to the community site? (Y/N) "
83
+ if config[:yes] || (ask_question(confirm_share_msg).chomp.upcase == "Y")
84
+ share_new_version
85
+ ui.msg "Version #{@version} of the #{@cb_name} cookbook has been released!"
86
+ ui.msg "Check it out at http://ckbk.it/#{@cb_name}"
87
+ end
88
+ end
69
89
 
70
90
  # @TODO: Increment the current version to the next available odd number
71
91
  # algo = n + 1 + (n % 2)
@@ -1,3 +1,3 @@
1
1
  module KnifeCommunity
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-community
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,24 +9,30 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-17 00:00:00.000000000 Z
12
+ date: 2013-02-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '10'
22
+ - - <=
23
+ - !ruby/object:Gem::Version
24
+ version: '12'
22
25
  type: :runtime
23
26
  prerelease: false
24
27
  version_requirements: !ruby/object:Gem::Requirement
25
28
  none: false
26
29
  requirements:
27
- - - ~>
30
+ - - ! '>='
28
31
  - !ruby/object:Gem::Version
29
32
  version: '10'
33
+ - - <=
34
+ - !ruby/object:Gem::Version
35
+ version: '12'
30
36
  - !ruby/object:Gem::Dependency
31
37
  name: mixlib-shellout
32
38
  requirement: !ruby/object:Gem::Requirement
@@ -75,54 +81,6 @@ dependencies:
75
81
  - - ~>
76
82
  - !ruby/object:Gem::Version
77
83
  version: '0.4'
78
- - !ruby/object:Gem::Dependency
79
- name: rake
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ~>
84
- - !ruby/object:Gem::Version
85
- version: '0.9'
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: '0.9'
94
- - !ruby/object:Gem::Dependency
95
- name: rspec
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ~>
100
- - !ruby/object:Gem::Version
101
- version: 2.11.0
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ~>
108
- - !ruby/object:Gem::Version
109
- version: 2.11.0
110
- - !ruby/object:Gem::Dependency
111
- name: cucumber
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ~>
116
- - !ruby/object:Gem::Version
117
- version: '1'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ~>
124
- - !ruby/object:Gem::Version
125
- version: '1'
126
84
  - !ruby/object:Gem::Dependency
127
85
  name: aruba
128
86
  requirement: !ruby/object:Gem::Requirement
@@ -140,13 +98,13 @@ dependencies:
140
98
  - !ruby/object:Gem::Version
141
99
  version: '0.4'
142
100
  - !ruby/object:Gem::Dependency
143
- name: tailor
101
+ name: cucumber
144
102
  requirement: !ruby/object:Gem::Requirement
145
103
  none: false
146
104
  requirements:
147
105
  - - ~>
148
106
  - !ruby/object:Gem::Version
149
- version: '1.1'
107
+ version: '1'
150
108
  type: :development
151
109
  prerelease: false
152
110
  version_requirements: !ruby/object:Gem::Requirement
@@ -154,15 +112,15 @@ dependencies:
154
112
  requirements:
155
113
  - - ~>
156
114
  - !ruby/object:Gem::Version
157
- version: '1.1'
115
+ version: '1'
158
116
  - !ruby/object:Gem::Dependency
159
- name: travis-lint
117
+ name: guard
160
118
  requirement: !ruby/object:Gem::Requirement
161
119
  none: false
162
120
  requirements:
163
121
  - - ~>
164
122
  - !ruby/object:Gem::Version
165
- version: '1.4'
123
+ version: '1.6'
166
124
  type: :development
167
125
  prerelease: false
168
126
  version_requirements: !ruby/object:Gem::Requirement
@@ -170,15 +128,15 @@ dependencies:
170
128
  requirements:
171
129
  - - ~>
172
130
  - !ruby/object:Gem::Version
173
- version: '1.4'
131
+ version: '1.6'
174
132
  - !ruby/object:Gem::Dependency
175
- name: guard
133
+ name: rake
176
134
  requirement: !ruby/object:Gem::Requirement
177
135
  none: false
178
136
  requirements:
179
137
  - - ~>
180
138
  - !ruby/object:Gem::Version
181
- version: '1.3'
139
+ version: '10'
182
140
  type: :development
183
141
  prerelease: false
184
142
  version_requirements: !ruby/object:Gem::Requirement
@@ -186,15 +144,15 @@ dependencies:
186
144
  requirements:
187
145
  - - ~>
188
146
  - !ruby/object:Gem::Version
189
- version: '1.3'
147
+ version: '10'
190
148
  - !ruby/object:Gem::Dependency
191
- name: guard-rspec
149
+ name: rspec
192
150
  requirement: !ruby/object:Gem::Requirement
193
151
  none: false
194
152
  requirements:
195
153
  - - ~>
196
154
  - !ruby/object:Gem::Version
197
- version: '1.2'
155
+ version: '2.11'
198
156
  type: :development
199
157
  prerelease: false
200
158
  version_requirements: !ruby/object:Gem::Requirement
@@ -202,23 +160,23 @@ dependencies:
202
160
  requirements:
203
161
  - - ~>
204
162
  - !ruby/object:Gem::Version
205
- version: '1.2'
163
+ version: '2.11'
206
164
  - !ruby/object:Gem::Dependency
207
- name: guard-cucumber
165
+ name: tailor
208
166
  requirement: !ruby/object:Gem::Requirement
209
167
  none: false
210
168
  requirements:
211
- - - ~>
169
+ - - '='
212
170
  - !ruby/object:Gem::Version
213
- version: '1.2'
171
+ version: 1.1.3
214
172
  type: :development
215
173
  prerelease: false
216
174
  version_requirements: !ruby/object:Gem::Requirement
217
175
  none: false
218
176
  requirements:
219
- - - ~>
177
+ - - '='
220
178
  - !ruby/object:Gem::Version
221
- version: '1.2'
179
+ version: 1.1.3
222
180
  description: The centralized location for sharing cookbooks is the Community Site,
223
181
  this is a process helper to produce a repeatable method for releasing cookbooks.
224
182
  email:
@@ -229,6 +187,7 @@ extra_rdoc_files: []
229
187
  files:
230
188
  - .gitignore
231
189
  - .travis.yml
190
+ - CHANGELOG.md
232
191
  - Gemfile
233
192
  - Guardfile
234
193
  - LICENSE
@@ -260,10 +219,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
219
  version: '0'
261
220
  segments:
262
221
  - 0
263
- hash: -1152703589745345809
222
+ hash: -2662573135951615840
264
223
  requirements: []
265
224
  rubyforge_project:
266
- rubygems_version: 1.8.24
225
+ rubygems_version: 1.8.25
267
226
  signing_key:
268
227
  specification_version: 3
269
228
  summary: A Knife plugin to assist with deploying completed Chef cookbooks to the Community