knife-table 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## v0.0.4
2
+ * Move configuration values within `knife`
3
+
1
4
  ## v0.0.3
2
5
  * Add foodcritic support
3
6
  * Add knife config support
data/README.md CHANGED
@@ -15,6 +15,7 @@ Currently, the supported workflow is as follows:
15
15
 
16
16
  `knife table order`
17
17
 
18
+
18
19
  and
19
20
 
20
21
  `knife table serve`
@@ -33,6 +34,23 @@ will be modified, you can provide them while setting:
33
34
 
34
35
  `knife table set -c iptables,mysql new feature`
35
36
 
37
+ Options
38
+ -------
39
+
40
+ * 'Automatically bump patch version on provided cookbooks'
41
+ * '-c [COOKBOOK,COOKBOOK,...]'
42
+ * '--cookbooks [COOKBOOK,COOKBOOK,...]'
43
+
44
+ * 'Set prefix for branch name'
45
+ * knife config: :table_set_branch_prefix
46
+ * '-p PREFIX'
47
+ * '--branch-prefix PREFIX'
48
+
49
+ * 'Type of version bump (major, minor, patch)'
50
+ * knife config: :table_set_bump_type
51
+ * '-b TYPE'
52
+ * '--bump-type TYPE'
53
+
36
54
  ### Order
37
55
 
38
56
  Once the code has been updated, tested and is ready for review, the order
@@ -43,6 +61,34 @@ can be placed which will create a new pull request:
43
61
  The order option will also optionally run foodcritic and require a passing
44
62
  result before proceeding with the pull request generation.
45
63
 
64
+ Options
65
+ -------
66
+
67
+ * 'Username for upstream github account'
68
+ * knife config: :table_order_upstream_user
69
+ * '-u USER'
70
+ * '--upstream-user USER'
71
+
72
+ * 'Upstream branch name'
73
+ * knife config: :table_order_upstream_branch
74
+ * '-b BRANCH'
75
+ * '--upstream-branch BRANCH'
76
+
77
+ * 'Title for pull request'
78
+ * knife config: :table_order_title
79
+ * '-t TITLE'
80
+ * '--title TITLE'
81
+
82
+ * 'Pass foodcritic before generating pull request'
83
+ * knife config: :table_order_foodcritic
84
+ * '-f'
85
+ * '--foodcritic'
86
+
87
+ * 'Set what foodcritic should fail on'
88
+ * knife config: :table_order_foodcritic_fail_on
89
+ * '-x correctness,any,~FC014'
90
+ * '--foodcritic-fail-on correctness,any,~FC014'
91
+
46
92
  ### Service
47
93
 
48
94
  Service works on the assumption that any new code into the stable branch (master
@@ -52,14 +98,50 @@ behavior of the `serve` command will upload and freeze any changed cookbooks. Op
52
98
  environments can be provided to have the cookbook versions automatically pegged. Also,
53
99
  roles and data bags can be automatically uploaded as well.
54
100
 
55
- Options for serve:
56
-
57
- * `--environments ENV[,ENV...]` 'Update versions in given environments'
58
- * `--git-autopush` 'Automatically commit and push any changes to master'
59
- * `--git-tag` 'Automatically create tag for frozen cookbook'
60
- * `--git-branch BRANCH` 'Set working branch'
61
- * `--git-remote-name NAME` 'Remote repo name'
62
- * `--git-autocommit` 'Automatically commit changes'
63
- * `--autoproceed` 'Answer yes to any prompts'
64
- * `--roles` 'Upload any changed roles'
65
- * `--data-bags` 'Upload any changed data bags'
101
+ Options
102
+ -------
103
+
104
+ * 'Update versions in given environments'
105
+ * knife config: :table_serve_environments
106
+ * '-e ENV[,ENV...]'
107
+ * '--environments ENV[,ENV...]'
108
+
109
+ * 'Automatically commit and push any changes to master'
110
+ * knife config: :table_serve_git_autopush
111
+ * '-g'
112
+ * '--git-autopush'
113
+
114
+ * 'Automatically create tag for frozen cookbook'
115
+ * knife config: :table_serve_git_tag
116
+ * '-t'
117
+ * '--git-tag'
118
+
119
+ * 'Set working branch'
120
+ * knife config: :table_serve_git_branch
121
+ * '-b BRANCH'
122
+ * '--git-branch BRANCH'
123
+
124
+ * 'Remote repo name'
125
+ * knife config: :table_serve_git_remote_name
126
+ * '-r NAME'
127
+ * '--git-remote-name NAME'
128
+
129
+ * 'Automatically commit changes'
130
+ * knife config: :table_serve_git_autocommit
131
+ * '-c'
132
+ * '--git-autocommit'
133
+
134
+ * 'Answer yes to any prompts'
135
+ * knife config: :table_serve_autoproceed
136
+ * '-a'
137
+ * '--autoproceed'
138
+
139
+ * 'Upload any changed roles'
140
+ * knife config: :table_serve_upload_roles
141
+ * '-r'
142
+ * '--roles'
143
+
144
+ * 'Upload any changed data bags'
145
+ * knife config: :table_serve_upload_data_bags
146
+ * '-d'
147
+ * '--data-bags'
@@ -140,7 +140,7 @@ module KnifeTable
140
140
 
141
141
  def check_config_options
142
142
  %w(upstream_user upstream_branch title foodcritic foodcritic_fail_on).each do |key|
143
- config[key.to_sym] ||= Chef::Config["table_set_#{key}".to_sym]
143
+ config[key.to_sym] ||= Chef::Config[:knife]["table_set_#{key}".to_sym]
144
144
  end
145
145
  @upstream = config[:upstream_user]
146
146
  unless(@upstream)
@@ -320,9 +320,9 @@ module KnifeTable
320
320
  def check_config_options
321
321
  %w(environments git_autopush git_tag git_branch git_remote_name
322
322
  git_autocommit autoproceed upload_roles upload_data_bags).each do |key|
323
- config[key.to_sym] ||= Chef::Config["table_set_#{key}".to_sym]
323
+ config[key.to_sym] ||= Chef::Config[:knife]["table_set_#{key}".to_sym]
324
324
  end
325
- @environments = config[:environments].to_s.split(",").map(&:strip)
325
+ @environments = config[:environments].is_a?(Array) ? config[:environments] : config[:environments].to_s.split(",").map(&:strip)
326
326
  config[:git_branch] ||= 'master'
327
327
  config[:git_remote_name] ||= 'origin'
328
328
  end
@@ -76,7 +76,7 @@ module KnifeTable
76
76
 
77
77
  def check_config_options
78
78
  %w(cookbooks branch_prefix bump_type).each do |key|
79
- config[key.to_sym] ||= Chef::Config["table_set_#{key}".to_sym]
79
+ config[key.to_sym] ||= Chef::Config[:knife]["table_set_#{key}".to_sym]
80
80
  end
81
81
  @cookbooks = config[:cookbooks].to_s.split(',').map(&:strip)
82
82
  config[:bump_type] ||= 'patch'
@@ -1,5 +1,5 @@
1
1
  module KnifeTable
2
2
  class Version < Gem::Version
3
3
  end
4
- VERSION = Version.new('0.0.3')
4
+ VERSION = Version.new('0.0.4')
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-table
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-19 00:00:00.000000000 Z
12
+ date: 2012-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: knife-spork
16
- requirement: &5700840 !ruby/object:Gem::Requirement
16
+ requirement: &21429500 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.1.11
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *5700840
24
+ version_requirements: *21429500
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: hub
27
- requirement: &5716660 !ruby/object:Gem::Requirement
27
+ requirement: &21445300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.10.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *5716660
35
+ version_requirements: *21445300
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: foodcritic
38
- requirement: &5716120 !ruby/object:Gem::Requirement
38
+ requirement: &21444760 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,14 +43,13 @@ dependencies:
43
43
  version: 1.4.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *5716120
46
+ version_requirements: *21444760
47
47
  description: Chef's table
48
48
  email: chrisroberts.code@gmail.com
49
49
  executables: []
50
50
  extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
- - knife-table-0.0.3.gem
54
53
  - CHANGELOG.md
55
54
  - README.md
56
55
  - knife-table.gemspec