knife-spork 1.7.2 → 1.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +35 -35
  3. data/lib/chef/knife/spork-bump.rb +100 -100
  4. data/lib/chef/knife/spork-check.rb +165 -161
  5. data/lib/chef/knife/spork-databag-create.rb +54 -54
  6. data/lib/chef/knife/spork-databag-delete.rb +51 -51
  7. data/lib/chef/knife/spork-databag-edit.rb +54 -54
  8. data/lib/chef/knife/spork-databag-fromfile.rb +88 -88
  9. data/lib/chef/knife/spork-delete.rb +132 -132
  10. data/lib/chef/knife/spork-environment-check.rb +90 -90
  11. data/lib/chef/knife/spork-environment-create.rb +63 -63
  12. data/lib/chef/knife/spork-environment-delete.rb +38 -38
  13. data/lib/chef/knife/spork-environment-edit.rb +40 -40
  14. data/lib/chef/knife/spork-environment-fromfile.rb +46 -46
  15. data/lib/chef/knife/spork-info.rb +34 -34
  16. data/lib/chef/knife/spork-node-create.rb +41 -41
  17. data/lib/chef/knife/spork-node-delete.rb +41 -41
  18. data/lib/chef/knife/spork-node-edit.rb +48 -48
  19. data/lib/chef/knife/spork-node-fromfile.rb +46 -46
  20. data/lib/chef/knife/spork-node-runlistadd.rb +51 -51
  21. data/lib/chef/knife/spork-node-runlistremove.rb +44 -44
  22. data/lib/chef/knife/spork-node-runlistset.rb +44 -44
  23. data/lib/chef/knife/spork-omni.rb +112 -112
  24. data/lib/chef/knife/spork-promote.rb +197 -197
  25. data/lib/chef/knife/spork-role-create.rb +46 -46
  26. data/lib/chef/knife/spork-role-delete.rb +50 -50
  27. data/lib/chef/knife/spork-role-edit.rb +40 -40
  28. data/lib/chef/knife/spork-role-fromfile.rb +65 -65
  29. data/lib/chef/knife/spork-upload.rb +151 -151
  30. data/lib/chef/knife/spork-version.rb +12 -12
  31. data/lib/knife-spork.rb +3 -3
  32. data/lib/knife-spork/plugins.rb +27 -27
  33. data/lib/knife-spork/plugins/campfire.rb +219 -219
  34. data/lib/knife-spork/plugins/eventinator.rb +329 -329
  35. data/lib/knife-spork/plugins/foodcritic.rb +46 -46
  36. data/lib/knife-spork/plugins/git.rb +393 -399
  37. data/lib/knife-spork/plugins/graphite.rb +25 -25
  38. data/lib/knife-spork/plugins/grove.rb +167 -167
  39. data/lib/knife-spork/plugins/hipchat.rb +171 -171
  40. data/lib/knife-spork/plugins/influxdb.rb +28 -28
  41. data/lib/knife-spork/plugins/irccat.rb +332 -332
  42. data/lib/knife-spork/plugins/jabber.rb +133 -133
  43. data/lib/knife-spork/plugins/plugin.rb +117 -117
  44. data/lib/knife-spork/plugins/rubocop.rb +56 -56
  45. data/lib/knife-spork/plugins/slack.rb +125 -125
  46. data/lib/knife-spork/plugins/statusnet.rb +122 -122
  47. data/lib/knife-spork/runner.rb +342 -342
  48. data/lib/knife-spork/version.rb +5 -5
  49. metadata +4 -51
  50. data/.gitignore +0 -21
  51. data/.ruby-gemset +0 -1
  52. data/.ruby-version +0 -1
  53. data/.travis.yml +0 -3
  54. data/CHANGELOG.md +0 -445
  55. data/Gemfile +0 -3
  56. data/README.md +0 -544
  57. data/Rakefile +0 -35
  58. data/knife-spork.gemspec +0 -28
  59. data/plugins/Campfire.md +0 -43
  60. data/plugins/Eventinator.md +0 -30
  61. data/plugins/Foodcritic.md +0 -53
  62. data/plugins/Git.md +0 -53
  63. data/plugins/Graphite.md +0 -30
  64. data/plugins/Grove.md +0 -31
  65. data/plugins/HipChat.md +0 -69
  66. data/plugins/Influxdb.md +0 -25
  67. data/plugins/Irccat.md +0 -50
  68. data/plugins/Jabber.md +0 -61
  69. data/plugins/README.md +0 -70
  70. data/plugins/Rubocop.md +0 -110
  71. data/plugins/Slack.md +0 -48
  72. data/plugins/StatusNet.md +0 -41
  73. data/plugins/Template.md +0 -34
  74. data/spec/spec_helper.rb +0 -10
  75. data/spec/test_helpers.rb +0 -46
  76. data/spec/unit/fixtures/config/spork-config.yml +0 -1
  77. data/spec/unit/fixtures/cookbooks/example/metadata.rb +0 -8
  78. data/spec/unit/fixtures/environments/example.json +0 -12
  79. data/spec/unit/fixtures/knife.rb +0 -6
  80. data/spec/unit/fixtures/test_client.pem +0 -27
  81. data/spec/unit/spork_bump_spec.rb +0 -75
  82. data/spec/unit/spork_info_spec.rb +0 -40
  83. data/spec/unit/spork_promote_spec.rb +0 -77
  84. data/spec/unit/spork_upload_spec.rb +0 -46
data/Rakefile DELETED
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env rake
2
- require 'bundler/gem_tasks'
3
-
4
- require 'rspec/core/rake_task'
5
- require 'chef_zero/server'
6
-
7
- RSpec::Core::RakeTask.new(:spec) do |t|
8
- t.rspec_opts = [].tap do |a|
9
- a.push('--color')
10
- a.push('--format doc')
11
- end.join(' ')
12
- end
13
-
14
- desc 'Run all tests'
15
- task :test => [:spec]
16
-
17
- task :preseed_test_environment do
18
- puts "Creating checksums directory"
19
- `mkdir spec/unit/fixtures/checksums`
20
- puts "Starting chef-zero server"
21
- @server = ChefZero::Server.new(port: 4000)
22
- @server.start_background
23
- puts "Uploading test data"
24
- system("knife cookbook upload example -c spec/unit/fixtures/knife.rb")
25
- system("knife environment from file spec/unit/fixtures/environments/example.json -c spec/unit/fixtures/knife.rb")
26
- end
27
-
28
- task :cleanup_test_environment do
29
- puts "Stopping chef-zero server"
30
- @server.stop
31
- puts "Cleaning up checksums"
32
- `rm -rf spec/unit/fixtures/checksums`
33
- end
34
-
35
- task :default => [:preseed_test_environment, :test, :cleanup_test_environment]
@@ -1,28 +0,0 @@
1
- $:.push File.expand_path('../lib', __FILE__)
2
-
3
- require "knife-spork/version"
4
-
5
- Gem::Specification.new do |gem|
6
- gem.name = 'knife-spork'
7
- gem.version = KnifeSpork::Version::VERSION
8
- gem.authors = ["Jon Cowie", "Ryn Daniels"]
9
- gem.email = ['jonlives@gmail.com', 'code@ryn.works']
10
- gem.homepage = 'https://github.com/jonlives/knife-spork'
11
- gem.licenses = ['GPL']
12
- gem.summary = "A workflow plugin to help many devs work with the same chef repo/server"
13
- gem.description = "KnifeSpork is a workflow plugin for Chef::Knife which helps multiple developers work on the same Chef Server and repository without treading on each other's toes. This plugin was designed around the workflow used at Etsy, where several people are working on the Chef repository and Chef Server simultaneously."
14
-
15
- gem.files = `git ls-files`.split($\)
16
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.name = "knife-spork"
19
- gem.require_paths = ["lib"]
20
-
21
- gem.add_development_dependency 'rake'
22
- gem.add_development_dependency 'rspec', '>= 3.1.0'
23
- gem.add_development_dependency 'chef-zero', '>= 3.2'
24
- gem.add_runtime_dependency 'chef', '>= 11.0.0'
25
- gem.add_runtime_dependency 'git', '>= 1.2.5'
26
- gem.add_runtime_dependency 'app_conf', '>= 0.4.0'
27
- gem.add_runtime_dependency 'diffy', '>= 3.0.1'
28
- end
@@ -1,43 +0,0 @@
1
- Campfire
2
- ========
3
- Automatically posts informational messages to Campfire
4
-
5
- Gem Requirements
6
- ----------------
7
- This plugin requires the following gems:
8
-
9
- ```ruby
10
- gem 'campy'
11
- ```
12
-
13
- Hooks
14
- -----
15
- - `after_promote`
16
- - `after_upload`
17
-
18
- Configuration
19
- -------------
20
- ```yaml
21
- plugins:
22
- campfire:
23
- account: my_company
24
- token: ABC123
25
- rooms:
26
- - General
27
- - Web Operations
28
- ```
29
-
30
- #### account
31
- This is your campfire account name. It is the subdomain part of your account.
32
-
33
- - Type: `String`
34
-
35
- #### token
36
- This is the secure token you get from the Campfire configuration.
37
-
38
- - Type: `String`
39
-
40
- #### Rooms
41
- This is an array of room names to post messages to.
42
-
43
- - Type: `String`
@@ -1,30 +0,0 @@
1
- Eventinator
2
- ===========
3
-
4
- Gem Requirements
5
- ----------------
6
- This plugin has no gem requirements.
7
-
8
- Hooks
9
- -----
10
- - `after_upload`
11
-
12
- Configuration
13
- -------------
14
- ```yaml
15
- plugins:
16
- eventinator:
17
- url: www.example.com
18
- read_timeout: 5
19
- ```
20
-
21
- #### url
22
- The server to post to.
23
-
24
- - Type: `String`
25
-
26
- #### read_timeout
27
- The timeout, in seconds, for the request to return.
28
-
29
- - Type: `Integer`
30
- - Default: `5`
@@ -1,53 +0,0 @@
1
- Foodcritic
2
- ==========
3
- Automatically runs foodcritic against your cookbooks on check and upload.
4
-
5
- Gem Requirements
6
- ----------------
7
- This plugin requires the following gems:
8
-
9
- ```ruby
10
- gem 'foodcritic' >= 3.0.0
11
- ```
12
-
13
- Hooks
14
- -----
15
- - `after_check`
16
- - `before_upload`
17
-
18
- Configuration
19
- -------------
20
- ```yaml
21
- plugins:
22
- foodcritic:
23
- tags:
24
- - FC0023
25
- fail_tags:
26
- - any
27
- include_rules:
28
- - foodcritic/etsy
29
- epic_fail: true
30
- ```
31
-
32
- #### tags
33
- The tags to check against.
34
-
35
- - Type: `Array`
36
- - Default: '[any]'
37
-
38
- #### fail_tags
39
- The list of tags to fail on.
40
-
41
- - Type: 'Array'
42
- - Default: '[any]'
43
-
44
- #### include_rules
45
- An optional list of additional rules to run.
46
-
47
- - Type: `Array`
48
-
49
- #### epic_fail:
50
- If set to true, `epic_fail` will prevent you from uploading a cookbook until all foodcritic rules pass.
51
-
52
- - Type: `Boolean`
53
- - Default: `true`
@@ -1,53 +0,0 @@
1
- Git
2
- ===
3
- This plugin attempts to help manage your workflow by automatically pulling changes from your repo. **Do not use this plugin if you are not using Git.**
4
-
5
- Gem Requirements
6
- ----------------
7
- This plugin requires the following gems:
8
-
9
- ```ruby
10
- gem 'git'
11
- ```
12
-
13
- Hooks
14
- -----
15
- - `before_bump`
16
- - `after_bump`
17
- - `after_promote`
18
-
19
- Configuration
20
- -------------
21
- ```yaml
22
- plugins:
23
- git:
24
- remote: origin
25
- branch: master
26
- auto_push: true
27
- ```
28
-
29
- **Note** Due to the nature of the git plugin, it's possible that you accept all the defaults. In that case, you should make your configuration like this:
30
-
31
- ```yaml
32
- plugins:
33
- git:
34
- enabled: true
35
- ```
36
-
37
- #### remote
38
- The git remote to push/pull to/from.
39
-
40
- - Type: `String`
41
- - Default: `origin`
42
-
43
- #### branch
44
- The git branch to push/pull to/from.
45
-
46
- - Type: `String`
47
- - Default: `master`
48
-
49
- #### auto_push
50
- An optional true / false parameter indicating whether or not subcommands manipulating environment, role, node, databag files should be automatically comitted and pushed to Git
51
-
52
- - Type: `Boolean`
53
- - Default: `false`
@@ -1,30 +0,0 @@
1
- Graphite
2
- ========
3
- Graphite will automatically send a request to your Graphite server under the deploys.chef.[environment] for graphical analysis.
4
-
5
- Gem Requirements
6
- ----------------
7
- This plugin has no gem requirements.
8
-
9
- Hooks
10
- -----
11
- - `after_promote`
12
-
13
- Configuration
14
- -------------
15
- ```yaml
16
- plugins:
17
- graphite:
18
- server: graphite.example.com
19
- port: 12345
20
- ```
21
-
22
- #### server
23
- The url to the graphite server
24
-
25
- - Type: `String`
26
-
27
- #### port
28
- The port of the graphite server
29
-
30
- - Type: `Integer`
@@ -1,31 +0,0 @@
1
- Campfire
2
- ========
3
- Automatically posts informational messages to Grove.io
4
-
5
- Gem Requirements
6
- ----------------
7
- This plugin requires the following gems:
8
-
9
- ```ruby
10
- gem 'rest_client'
11
- ```
12
-
13
- Hooks
14
- -----
15
- - `after_promote`
16
- - `after_upload`
17
-
18
- Configuration
19
- -------------
20
- ```yaml
21
- plugins:
22
- grove:
23
- tokens:
24
- - ABC
25
- - XYZ
26
- ```
27
-
28
- #### Tokens
29
- This is an array of tokens (channels) to post messages to.
30
-
31
- - Type: `String`
@@ -1,69 +0,0 @@
1
- HipChat
2
- =======
3
- HipChat posts messages to your HipChat client.
4
-
5
- Gem Requirements
6
- ----------------
7
- This plugin requires the following gems:
8
-
9
- ```ruby
10
- gem 'hipchat'
11
- ```
12
-
13
- Hooks
14
- -----
15
- - `after_upload`
16
- - `after_promote`
17
-
18
- Configuration
19
- -------------
20
- ```yaml
21
- plugins:
22
- hipchat:
23
- server_url: https://api.hipchat.com
24
- api_token: ABC123
25
- api_version: v1
26
- rooms:
27
- - General
28
- - Web Operations
29
- notify: true
30
- color: yellow
31
- gist: /usr/bin/gist
32
- ```
33
-
34
- #### server_url
35
- The URL of the HipChat API server. Default: 'https://api.hipchat.com'
36
-
37
- - Type: `String`
38
-
39
- #### api_token
40
- Your HipChat API token.
41
-
42
- - Type: `String`
43
-
44
- #### api_version
45
- Which version of the HipChat API to use. Default: 'v1'
46
-
47
- - Type: `String`
48
-
49
- #### rooms
50
- The list of rooms to post to.
51
-
52
- - Type: `Array`
53
-
54
- #### notify
55
- Boolean value indicating whether the room should be notified.
56
-
57
- - Type: `Boolean`
58
-
59
- #### color
60
- The color of the message.
61
-
62
- - Type: `String`
63
- - Acceptable Values: `[yellow, red, green, purple, random]`
64
-
65
- #### gist
66
- Optional path to gist binary installed by https://rubygems.org/gems/gist
67
-
68
- - Type: `String`
69
-
@@ -1,25 +0,0 @@
1
- Influxdb
2
- ========
3
-
4
- Annouce influxdb about your chef deployments
5
-
6
- Gem Requirements
7
- ----------------
8
- `gem influxdb`
9
-
10
- Hooks
11
- -----
12
- - `after_upload`
13
-
14
- Configuration
15
- -------------
16
- ```yaml
17
- plugins:
18
- influxdb:
19
- database: deployments
20
- username: deploy
21
- password: deploy
22
- series: deployments
23
- host: influx.example.com
24
- port: 8086
25
- ```
@@ -1,50 +0,0 @@
1
- Plugin Name
2
- ===========
3
- This plugin interfaces with the irccat IRC bot (https://github.com/RJ/irccat)
4
-
5
- Gem Requirements
6
- ----------------
7
- This plugin has no gem requirements.`
8
-
9
- Hooks
10
- -----
11
- - `after_promote`
12
-
13
- Configuration
14
- -------------
15
- ```yaml
16
- plugins:
17
- irccat:
18
- server: irc.example.com
19
- port: 54
20
- channels:
21
- - #chef
22
- - #knife
23
- gist: "/usr/bin/gist"
24
- template:
25
- upload: "foo bar! #REDCHEF:#NORMAL %{organization}%{current_user} uploaded #GREEN%{cookbooks}#NORMAL"
26
- ```
27
-
28
- #### server
29
- The url of the IRC server.
30
-
31
- - Type: `String`
32
-
33
- #### port
34
- The port of the IRC server.
35
-
36
- - Type: `String`
37
-
38
- #### channels
39
- The channels to post to.
40
-
41
- - Type: `Array`
42
-
43
- #### gist
44
- Optional path to gist binary installed by https://rubygems.org/gems/gist
45
-
46
- - Type: `String`
47
-
48
-
49
- ### template
50
- Optional irccat message template if you want to change the formatting of irccat alerts. Supports overriding alerts for upload and promote