knife-briefcase 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +17 -0
  3. data/.travis.yml +13 -0
  4. data/CHANGELOG.md +6 -0
  5. data/CONTRIBUTING.md +43 -0
  6. data/Gemfile +13 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +83 -0
  9. data/Thorfile +60 -0
  10. data/knife-briefcase.gemspec +32 -0
  11. data/lib/chef/knife/briefcase_delete.rb +14 -0
  12. data/lib/chef/knife/briefcase_get.rb +34 -0
  13. data/lib/chef/knife/briefcase_list.rb +10 -0
  14. data/lib/chef/knife/briefcase_put.rb +32 -0
  15. data/lib/chef/knife/briefcase_reload.rb +45 -0
  16. data/lib/knife-briefcase.rb +5 -0
  17. data/lib/knife-briefcase/knife.rb +69 -0
  18. data/lib/knife-briefcase/version.rb +3 -0
  19. data/spec/chef/knife/briefcase_delete_spec.rb +44 -0
  20. data/spec/chef/knife/briefcase_get_spec.rb +43 -0
  21. data/spec/chef/knife/briefcase_list_spec.rb +17 -0
  22. data/spec/chef/knife/briefcase_put_spec.rb +60 -0
  23. data/spec/chef/knife/briefcase_reload_spec.rb +32 -0
  24. data/spec/fixtures/.gitignore +1 -0
  25. data/spec/fixtures/briefcase.pem +27 -0
  26. data/spec/fixtures/gnupg.1/.gitignore +1 -0
  27. data/spec/fixtures/gnupg.1/pubring.gpg +0 -0
  28. data/spec/fixtures/gnupg.1/secring.gpg +0 -0
  29. data/spec/fixtures/gnupg.1/trustdb.gpg +0 -0
  30. data/spec/fixtures/gnupg.2/.gitignore +1 -0
  31. data/spec/fixtures/gnupg.2/pubring.gpg +0 -0
  32. data/spec/fixtures/gnupg.2/secring.gpg +0 -0
  33. data/spec/fixtures/gnupg.2/trustdb.gpg +0 -0
  34. data/spec/fixtures/gnupg.without-1/.gitignore +1 -0
  35. data/spec/fixtures/gnupg.without-1/pubring.gpg +0 -0
  36. data/spec/fixtures/gnupg.without-1/secring.gpg +0 -0
  37. data/spec/fixtures/gnupg.without-1/trustdb.gpg +0 -0
  38. data/spec/fixtures/gnupg/.gitignore +1 -0
  39. data/spec/fixtures/gnupg/pubring.gpg +0 -0
  40. data/spec/fixtures/gnupg/secring.gpg +0 -0
  41. data/spec/fixtures/gnupg/trustdb.gpg +0 -0
  42. data/spec/fixtures/knife.rb +4 -0
  43. data/spec/knife-briefcase/version_spec.rb +11 -0
  44. data/spec/knife_helper.rb +140 -0
  45. data/spec/smoke_spec.rb +9 -0
  46. data/spec/spec_helper.rb +62 -0
  47. metadata +271 -0
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ require 'chef/knife/status'
4
+
5
+ describe Chef::Knife::Status do
6
+ it 'can connect to chef-zero server' do
7
+ expect { knife('status').zero? }
8
+ end
9
+ end
@@ -0,0 +1,62 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ require 'pathname'
5
+
6
+ require 'minitest/autorun'
7
+ require 'minitest/spec'
8
+ require 'mocha/setup'
9
+ require 'wrong'
10
+
11
+ Wrong.config.alias_assert :expect, override: true
12
+
13
+ module KnifeBriefcase
14
+ module Spec
15
+ module WrongHelper
16
+ include Wrong::Assert
17
+ include Wrong::Helpers
18
+
19
+ def increment_assertion_count
20
+ self.assertions += 1
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ if ENV['COVERAGE']
27
+ require 'simplecov'
28
+ SimpleCov.start
29
+ SimpleCov.command_name 'rake spec'
30
+ end
31
+
32
+ FIXTURES = Pathname.new(__FILE__).dirname.join('fixtures')
33
+
34
+ ENV['GNUPGHOME'] = FIXTURES.join('gnupg').to_s
35
+
36
+ require 'knife_helper'
37
+
38
+ require 'gpgme'
39
+ require 'ridley'
40
+
41
+ class MiniTest::Spec
42
+ include KnifeBriefcase::Spec::KnifeHelper
43
+ include KnifeBriefcase::Spec::WrongHelper
44
+
45
+ let(:ridley) do
46
+ Ridley.new :server_url => chef_server_url,
47
+ :client_name => 'anything',
48
+ :client_key => FIXTURES.join('briefcase.pem').to_s
49
+ end
50
+
51
+ let(:crypto) { GPGME::Crypto.new }
52
+
53
+ def with_gnupg_home(variant)
54
+ orig_gnupg_home = ENV['GNUPGHOME']
55
+ ENV['GNUPGHOME'] = FIXTURES.join("gnupg.#{variant}").to_s
56
+ yield
57
+ ensure
58
+ ENV['GNUPGHOME'] = orig_gnupg_home
59
+ end
60
+ end
61
+
62
+ require "knife-briefcase"
metadata ADDED
@@ -0,0 +1,271 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: knife-briefcase
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Maciej Pasternacki
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-07-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: chef
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: gpgme
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: highline
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '1.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: chef-zero
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: mocha
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: ridley
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ! '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: thor
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ~>
144
+ - !ruby/object:Gem::Version
145
+ version: 0.18.1
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ~>
151
+ - !ruby/object:Gem::Version
152
+ version: 0.18.1
153
+ - !ruby/object:Gem::Dependency
154
+ name: wrong
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ! '>='
158
+ - !ruby/object:Gem::Version
159
+ version: 0.7.0
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: 0.7.0
167
+ description: Knife plugin to store GPG-encrypted data in Chef data bag
168
+ email:
169
+ - maciej@pasternacki.net
170
+ executables: []
171
+ extensions: []
172
+ extra_rdoc_files: []
173
+ files:
174
+ - .gitignore
175
+ - .travis.yml
176
+ - CHANGELOG.md
177
+ - CONTRIBUTING.md
178
+ - Gemfile
179
+ - LICENSE.txt
180
+ - README.md
181
+ - Thorfile
182
+ - knife-briefcase.gemspec
183
+ - lib/chef/knife/briefcase_delete.rb
184
+ - lib/chef/knife/briefcase_get.rb
185
+ - lib/chef/knife/briefcase_list.rb
186
+ - lib/chef/knife/briefcase_put.rb
187
+ - lib/chef/knife/briefcase_reload.rb
188
+ - lib/knife-briefcase.rb
189
+ - lib/knife-briefcase/knife.rb
190
+ - lib/knife-briefcase/version.rb
191
+ - spec/chef/knife/briefcase_delete_spec.rb
192
+ - spec/chef/knife/briefcase_get_spec.rb
193
+ - spec/chef/knife/briefcase_list_spec.rb
194
+ - spec/chef/knife/briefcase_put_spec.rb
195
+ - spec/chef/knife/briefcase_reload_spec.rb
196
+ - spec/fixtures/.gitignore
197
+ - spec/fixtures/briefcase.pem
198
+ - spec/fixtures/gnupg.1/.gitignore
199
+ - spec/fixtures/gnupg.1/pubring.gpg
200
+ - spec/fixtures/gnupg.1/secring.gpg
201
+ - spec/fixtures/gnupg.1/trustdb.gpg
202
+ - spec/fixtures/gnupg.2/.gitignore
203
+ - spec/fixtures/gnupg.2/pubring.gpg
204
+ - spec/fixtures/gnupg.2/secring.gpg
205
+ - spec/fixtures/gnupg.2/trustdb.gpg
206
+ - spec/fixtures/gnupg.without-1/.gitignore
207
+ - spec/fixtures/gnupg.without-1/pubring.gpg
208
+ - spec/fixtures/gnupg.without-1/secring.gpg
209
+ - spec/fixtures/gnupg.without-1/trustdb.gpg
210
+ - spec/fixtures/gnupg/.gitignore
211
+ - spec/fixtures/gnupg/pubring.gpg
212
+ - spec/fixtures/gnupg/secring.gpg
213
+ - spec/fixtures/gnupg/trustdb.gpg
214
+ - spec/fixtures/knife.rb
215
+ - spec/knife-briefcase/version_spec.rb
216
+ - spec/knife_helper.rb
217
+ - spec/smoke_spec.rb
218
+ - spec/spec_helper.rb
219
+ homepage: https://github.com/3ofcoins/knife-briefcase/
220
+ licenses:
221
+ - MIT
222
+ metadata: {}
223
+ post_install_message:
224
+ rdoc_options: []
225
+ require_paths:
226
+ - lib
227
+ required_ruby_version: !ruby/object:Gem::Requirement
228
+ requirements:
229
+ - - ! '>='
230
+ - !ruby/object:Gem::Version
231
+ version: '0'
232
+ required_rubygems_version: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ! '>='
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ requirements: []
238
+ rubyforge_project:
239
+ rubygems_version: 2.0.5
240
+ signing_key:
241
+ specification_version: 4
242
+ summary: Knife plugin to store GPG-encrypted data in Chef data bag
243
+ test_files:
244
+ - spec/chef/knife/briefcase_delete_spec.rb
245
+ - spec/chef/knife/briefcase_get_spec.rb
246
+ - spec/chef/knife/briefcase_list_spec.rb
247
+ - spec/chef/knife/briefcase_put_spec.rb
248
+ - spec/chef/knife/briefcase_reload_spec.rb
249
+ - spec/fixtures/.gitignore
250
+ - spec/fixtures/briefcase.pem
251
+ - spec/fixtures/gnupg.1/.gitignore
252
+ - spec/fixtures/gnupg.1/pubring.gpg
253
+ - spec/fixtures/gnupg.1/secring.gpg
254
+ - spec/fixtures/gnupg.1/trustdb.gpg
255
+ - spec/fixtures/gnupg.2/.gitignore
256
+ - spec/fixtures/gnupg.2/pubring.gpg
257
+ - spec/fixtures/gnupg.2/secring.gpg
258
+ - spec/fixtures/gnupg.2/trustdb.gpg
259
+ - spec/fixtures/gnupg.without-1/.gitignore
260
+ - spec/fixtures/gnupg.without-1/pubring.gpg
261
+ - spec/fixtures/gnupg.without-1/secring.gpg
262
+ - spec/fixtures/gnupg.without-1/trustdb.gpg
263
+ - spec/fixtures/gnupg/.gitignore
264
+ - spec/fixtures/gnupg/pubring.gpg
265
+ - spec/fixtures/gnupg/secring.gpg
266
+ - spec/fixtures/gnupg/trustdb.gpg
267
+ - spec/fixtures/knife.rb
268
+ - spec/knife-briefcase/version_spec.rb
269
+ - spec/knife_helper.rb
270
+ - spec/smoke_spec.rb
271
+ - spec/spec_helper.rb