puppet-magnum 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.rspec +3 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +1 -0
  6. data/Gemfile +2 -0
  7. data/Gemfile.lock +73 -0
  8. data/LICENSE +13 -0
  9. data/README.md +247 -0
  10. data/Rakefile +20 -0
  11. data/VERSION +1 -0
  12. data/bin/puppet-magnum +6 -0
  13. data/generator_files/CHANGELOG.md.erb +0 -0
  14. data/generator_files/README.md.erb +11 -0
  15. data/generator_files/git/gitignore.erb +40 -0
  16. data/generator_files/licenses/apachev2.erb +13 -0
  17. data/generator_files/licenses/mit.erb +20 -0
  18. data/generator_files/licenses/reserved.erb +2 -0
  19. data/generator_files/puppet-magnum.init.erb +1 -0
  20. data/generator_files/puppet/init.pp.erb +47 -0
  21. data/generator_files/puppet/metadata.json.erb +26 -0
  22. data/generator_files/puppet/params.pp.erb +16 -0
  23. data/generator_files/spec/fixtures.yml.erb +9 -0
  24. data/generator_files/spec/rspec.erb +2 -0
  25. data/generator_files/spec/rspec/init_spec.rb.erb +6 -0
  26. data/generator_files/spec/rspec/spec_helper.rb.erb +10 -0
  27. data/generator_files/spec/serverspec/init_spec.rb.erb +5 -0
  28. data/generator_files/util/Gemfile.erb +10 -0
  29. data/generator_files/util/Rakefile.erb +35 -0
  30. data/generator_files/vagrant/Vagrantfile.erb +33 -0
  31. data/generator_files/vagrant/environment/environment.conf.erb +18 -0
  32. data/generator_files/vagrant/environment/manifests/init.pp.erb +1 -0
  33. data/generator_files/vagrant/init.sh.erb +23 -0
  34. data/lib/puppet-magnum.rb +13 -0
  35. data/lib/puppet-magnum/cli.rb +16 -0
  36. data/lib/puppet-magnum/cli/module.rb +32 -0
  37. data/lib/puppet-magnum/generators/base_generator.rb +23 -0
  38. data/lib/puppet-magnum/generators/create_generator.rb +188 -0
  39. data/lib/puppet-magnum/version.rb +3 -0
  40. data/puppet-magnum.gemspec +40 -0
  41. data/spec/lib/puppet-magnum/cli_spec.rb +18 -0
  42. data/spec/lib/puppet-magnum/generators/base_generator_spec.rb +11 -0
  43. data/spec/lib/puppet-magnum/generators/create_generator_spec.rb +4 -0
  44. data/spec/lib/puppet_magnum_spec.rb +20 -0
  45. data/spec/spec_helper.rb +35 -0
  46. metadata +264 -0
@@ -0,0 +1,3 @@
1
+ module PuppetMagnum
2
+ VERSION = File.open(File.expand_path('../../../VERSION', __FILE__)).read
3
+ end
@@ -0,0 +1,40 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ require 'puppet-magnum/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'puppet-magnum'
9
+ spec.version = PuppetMagnum::VERSION
10
+ spec.authors = ['Tehmasp Chaudhri']
11
+ spec.email = ['tehmasp@gmail.com']
12
+ spec.description = %q{puppet-magnum - a tool for rapid, consistent, and best practice Puppet module development.}
13
+ spec.summary = %q{puppet-magnum - a tool for rapid, consistent, and best practice Puppet module development.}
14
+ spec.homepage = 'https://github.com/tehmaspc/puppet-magnum'
15
+ spec.license = 'Apache License, Version 2.0'
16
+
17
+ spec.files = `git ls-files`.split($/)
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+
20
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
+ spec.require_paths = ['lib']
22
+
23
+ spec.required_ruby_version = '>= 2.3.0'
24
+
25
+ spec.add_development_dependency 'sem_ver', '>= 0.1.1'
26
+ spec.add_development_dependency 'rake', '>= 10.5.0'
27
+
28
+ spec.add_runtime_dependency 'bundler', '>= 1.11.2'
29
+ spec.add_runtime_dependency 'redcarpet', '>= 3.3.4'
30
+ spec.add_runtime_dependency 'thor', '>= 0.19.1'
31
+ spec.add_runtime_dependency 'colorize', '>= 0.7.7'
32
+ spec.add_runtime_dependency 'version', '>= 1.0.0'
33
+
34
+ spec.add_runtime_dependency 'puppet', '~> 4.4.1'
35
+ spec.add_runtime_dependency 'rspec', '~> 3.1.0'
36
+ spec.add_runtime_dependency 'puppet-lint', '~> 1.1.0'
37
+ spec.add_runtime_dependency 'rspec-puppet', '~> 2.4.0'
38
+ spec.add_runtime_dependency 'puppetlabs_spec_helper', '~> 1.1.1'
39
+
40
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+ require 'sem_ver'
3
+
4
+ describe PuppetMagnum::Cli do
5
+
6
+ context 'when requesting the version number' do
7
+ subject(:version) { PuppetMagnum::VERSION }
8
+ it { expect(version).to_not be_nil }
9
+ it { expect(SemVer.parse(version).valid?).to be_truthy }
10
+ end
11
+
12
+ context 'when printing version' do
13
+ subject(:cli) { PuppetMagnum::Cli.new }
14
+ it { expect(cli).to be }
15
+ it { expect(cli.version.to_s).to be }
16
+ end
17
+
18
+ end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe PuppetMagnum::BaseGenerator do
4
+
5
+ context 'when setting up the project template root' do
6
+ subject(:magnum_source_root) { PuppetMagnum::BaseGenerator.source_root }
7
+ it { expect(magnum_source_root).to_not be_nil }
8
+ it { expect(magnum_source_root.to_s).to match(/generator_files/) }
9
+ end
10
+
11
+ end
@@ -0,0 +1,4 @@
1
+ require 'spec_helper'
2
+
3
+ describe PuppetMagnum::CreateGenerator do
4
+ end
@@ -0,0 +1,20 @@
1
+ # Magnum rspec tests
2
+ #
3
+ # The following spec tests try to follow the best practices laid
4
+ # out on the following websites:
5
+ #
6
+ # See {http://www.relishapp.com/rspec/rspec-core/v/2-11/docs}
7
+ # See {http://betterspecs.org}
8
+ #
9
+ # @author Tehmasp Chaudhri {mailto:tehmasp@gmail.com}
10
+ require 'spec_helper'
11
+
12
+ describe PuppetMagnum do
13
+
14
+ context 'when setting up the project root' do
15
+ subject(:puppet_magnum_root) { PuppetMagnum::root }
16
+ it { expect(puppet_magnum_root).to_not be_nil }
17
+ it { expect(puppet_magnum_root.to_s).to match(/puppet-magnum/) }
18
+ end
19
+
20
+ end
@@ -0,0 +1,35 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+ RSpec.configure do |config|
8
+ config.run_all_when_everything_filtered = true
9
+ config.filter_run :focus
10
+
11
+ config.expect_with :rspec do |c|
12
+ c.syntax = :expect
13
+ end
14
+
15
+ # Run specs in random order to surface order dependencies. If you find an
16
+ # order dependency and want to debug it, you can fix the order by providing
17
+ # the seed, which is printed after each run.
18
+ # --seed 1234
19
+ config.order = 'random'
20
+
21
+ original_stderr = $stderr
22
+ original_stdout = $stdout
23
+ config.before(:all) do
24
+ # Redirect stderr and stdout
25
+ $stderr = File.new(File.join(File.dirname(__FILE__), 'spec_output.txt'), 'w')
26
+ $stdout = File.new(File.join(File.dirname(__FILE__), 'spec_output.txt'), 'w')
27
+ end
28
+ config.after(:all) do
29
+ $stderr = original_stderr
30
+ $stdout = original_stdout
31
+ end
32
+
33
+ end
34
+
35
+ require 'puppet-magnum'
metadata ADDED
@@ -0,0 +1,264 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: puppet-magnum
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Tehmasp Chaudhri
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-04-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sem_ver
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.1.1
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.1.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 10.5.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 10.5.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 1.11.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 1.11.2
55
+ - !ruby/object:Gem::Dependency
56
+ name: redcarpet
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 3.3.4
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 3.3.4
69
+ - !ruby/object:Gem::Dependency
70
+ name: thor
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 0.19.1
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 0.19.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: colorize
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 0.7.7
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 0.7.7
97
+ - !ruby/object:Gem::Dependency
98
+ name: version
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 1.0.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 1.0.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: puppet
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 4.4.1
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 4.4.1
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 3.1.0
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 3.1.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: puppet-lint
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 1.1.0
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 1.1.0
153
+ - !ruby/object:Gem::Dependency
154
+ name: rspec-puppet
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 2.4.0
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 2.4.0
167
+ - !ruby/object:Gem::Dependency
168
+ name: puppetlabs_spec_helper
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 1.1.1
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 1.1.1
181
+ description: puppet-magnum - a tool for rapid, consistent, and best practice Puppet
182
+ module development.
183
+ email:
184
+ - tehmasp@gmail.com
185
+ executables:
186
+ - puppet-magnum
187
+ extensions: []
188
+ extra_rdoc_files: []
189
+ files:
190
+ - ".gitignore"
191
+ - ".rspec"
192
+ - ".ruby-version"
193
+ - ".travis.yml"
194
+ - Gemfile
195
+ - Gemfile.lock
196
+ - LICENSE
197
+ - README.md
198
+ - Rakefile
199
+ - VERSION
200
+ - bin/puppet-magnum
201
+ - generator_files/CHANGELOG.md.erb
202
+ - generator_files/README.md.erb
203
+ - generator_files/git/gitignore.erb
204
+ - generator_files/licenses/apachev2.erb
205
+ - generator_files/licenses/mit.erb
206
+ - generator_files/licenses/reserved.erb
207
+ - generator_files/puppet-magnum.init.erb
208
+ - generator_files/puppet/init.pp.erb
209
+ - generator_files/puppet/metadata.json.erb
210
+ - generator_files/puppet/params.pp.erb
211
+ - generator_files/spec/fixtures.yml.erb
212
+ - generator_files/spec/rspec.erb
213
+ - generator_files/spec/rspec/init_spec.rb.erb
214
+ - generator_files/spec/rspec/spec_helper.rb.erb
215
+ - generator_files/spec/serverspec/init_spec.rb.erb
216
+ - generator_files/util/Gemfile.erb
217
+ - generator_files/util/Rakefile.erb
218
+ - generator_files/vagrant/Vagrantfile.erb
219
+ - generator_files/vagrant/environment/environment.conf.erb
220
+ - generator_files/vagrant/environment/manifests/init.pp.erb
221
+ - generator_files/vagrant/init.sh.erb
222
+ - lib/puppet-magnum.rb
223
+ - lib/puppet-magnum/cli.rb
224
+ - lib/puppet-magnum/cli/module.rb
225
+ - lib/puppet-magnum/generators/base_generator.rb
226
+ - lib/puppet-magnum/generators/create_generator.rb
227
+ - lib/puppet-magnum/version.rb
228
+ - puppet-magnum.gemspec
229
+ - spec/lib/puppet-magnum/cli_spec.rb
230
+ - spec/lib/puppet-magnum/generators/base_generator_spec.rb
231
+ - spec/lib/puppet-magnum/generators/create_generator_spec.rb
232
+ - spec/lib/puppet_magnum_spec.rb
233
+ - spec/spec_helper.rb
234
+ homepage: https://github.com/tehmaspc/puppet-magnum
235
+ licenses:
236
+ - Apache License, Version 2.0
237
+ metadata: {}
238
+ post_install_message:
239
+ rdoc_options: []
240
+ require_paths:
241
+ - lib
242
+ required_ruby_version: !ruby/object:Gem::Requirement
243
+ requirements:
244
+ - - ">="
245
+ - !ruby/object:Gem::Version
246
+ version: 2.3.0
247
+ required_rubygems_version: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: '0'
252
+ requirements: []
253
+ rubyforge_project:
254
+ rubygems_version: 2.5.1
255
+ signing_key:
256
+ specification_version: 4
257
+ summary: puppet-magnum - a tool for rapid, consistent, and best practice Puppet module
258
+ development.
259
+ test_files:
260
+ - spec/lib/puppet-magnum/cli_spec.rb
261
+ - spec/lib/puppet-magnum/generators/base_generator_spec.rb
262
+ - spec/lib/puppet-magnum/generators/create_generator_spec.rb
263
+ - spec/lib/puppet_magnum_spec.rb
264
+ - spec/spec_helper.rb