chefdk-julia 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +15 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +2 -0
  5. data/.travis.yml +29 -0
  6. data/Berksfile +3 -0
  7. data/CHANGELOG.md +18 -0
  8. data/LICENSE +202 -0
  9. data/README.md +62 -0
  10. data/Rakefile +36 -0
  11. data/chefdk-julia.gemspec +41 -0
  12. data/files/default/.rspec +2 -0
  13. data/files/default/.rubocop.yml +2 -0
  14. data/files/default/Berksfile +3 -0
  15. data/files/default/Rakefile +21 -0
  16. data/files/default/chefignore +100 -0
  17. data/files/default/cookbook_readmes/README-policy.md +9 -0
  18. data/files/default/cookbook_readmes/README.md +54 -0
  19. data/files/default/gitignore +19 -0
  20. data/files/default/repo/README.md +28 -0
  21. data/files/default/repo/cookbooks/example/README.md +27 -0
  22. data/files/default/repo/cookbooks/example/attributes/default.rb +7 -0
  23. data/files/default/repo/cookbooks/example/metadata.rb +3 -0
  24. data/files/default/repo/cookbooks/example/recipes/default.rb +8 -0
  25. data/files/default/repo/data_bags/README.md +58 -0
  26. data/files/default/repo/data_bags/example/example_item.json +4 -0
  27. data/files/default/repo/dot-chef-repo.txt +6 -0
  28. data/files/default/repo/environments/README.md +9 -0
  29. data/files/default/repo/environments/example.json +13 -0
  30. data/files/default/repo/policies/README.md +24 -0
  31. data/files/default/repo/roles/README.md +9 -0
  32. data/files/default/repo/roles/example.json +13 -0
  33. data/files/default/serverspec_spec_helper.rb +8 -0
  34. data/lib/chefdk/julia.rb +22 -0
  35. data/lib/chefdk/julia/version.rb +20 -0
  36. data/metadata.rb +24 -0
  37. data/recipes/app.rb +109 -0
  38. data/recipes/attribute.rb +25 -0
  39. data/recipes/cookbook.rb +136 -0
  40. data/recipes/cookbook_file.rb +35 -0
  41. data/recipes/lwrp.rb +36 -0
  42. data/recipes/policyfile.rb +21 -0
  43. data/recipes/recipe.rb +42 -0
  44. data/recipes/repo.rb +81 -0
  45. data/recipes/template.rb +46 -0
  46. data/templates/default/LICENSE.all_rights.erb +3 -0
  47. data/templates/default/LICENSE.apache2.erb +201 -0
  48. data/templates/default/LICENSE.gplv2.erb +339 -0
  49. data/templates/default/LICENSE.gplv3.erb +674 -0
  50. data/templates/default/LICENSE.mit.erb +21 -0
  51. data/templates/default/Policyfile.rb.erb +25 -0
  52. data/templates/default/README.md.erb +4 -0
  53. data/templates/default/attribute.rb.erb +0 -0
  54. data/templates/default/cookbook_file.erb +0 -0
  55. data/templates/default/kitchen.yml.erb +21 -0
  56. data/templates/default/kitchen_policyfile.yml.erb +32 -0
  57. data/templates/default/metadata.rb.erb +7 -0
  58. data/templates/default/provider.rb.erb +0 -0
  59. data/templates/default/recipe.rb.erb +5 -0
  60. data/templates/default/recipe_spec.rb.erb +20 -0
  61. data/templates/default/repo/gitignore.erb +11 -0
  62. data/templates/default/resource.rb.erb +0 -0
  63. data/templates/default/serverspec_default_spec.rb.erb +9 -0
  64. data/templates/default/spec_spec_helper.rb.erb +94 -0
  65. data/templates/default/template.erb +0 -0
  66. metadata +111 -0
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) <%= year %> <%= copyright_holder %>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,25 @@
1
+ # Policyfile.rb - Describe how you want Chef to build your system.
2
+ #
3
+ # For more information on the Policyfile feature, visit
4
+ # https://github.com/opscode/chef-dk/blob/master/POLICYFILE_README.md
5
+
6
+ # A name that describes what the system you're building with Chef does.
7
+ name "<%= policy_name %>"
8
+
9
+ <% if include_chef_repo_source %>
10
+ # This lets you source cookbooks from your chef-repo.
11
+ default_source :chef_repo, "../"
12
+
13
+ <% end -%>
14
+ # Where to find external cookbooks:
15
+ default_source :supermarket
16
+
17
+ # run_list: chef-client will run these recipes in the order specified.
18
+ run_list "<%= policy_run_list %>"
19
+
20
+ # Specify a custom source for a single cookbook:
21
+ <% if policy_local_cookbook.nil? %>
22
+ # cookbook "example_cookbook", path: "../cookbooks/example_cookbook"
23
+ <% else %>
24
+ cookbook "<%= cookbook_name %>", path: "."
25
+ <% end %>
@@ -0,0 +1,4 @@
1
+ # <%= cookbook_name %>
2
+
3
+ TODO: Enter the cookbook description here.
4
+
File without changes
File without changes
@@ -0,0 +1,21 @@
1
+ ---
2
+ driver:
3
+ name: vagrant
4
+
5
+ provisioner:
6
+ name: chef_zero
7
+
8
+ # Uncomment the following verifier to leverage Inspec instead of Busser (the
9
+ # default verifier)
10
+ # verifier:
11
+ # name: inspec
12
+
13
+ platforms:
14
+ - name: ubuntu-14.04
15
+ - name: centos-7.1
16
+
17
+ suites:
18
+ - name: default
19
+ run_list:
20
+ - recipe[<%= cookbook_name %>::default]
21
+ attributes:
@@ -0,0 +1,32 @@
1
+ ---
2
+ driver:
3
+ name: vagrant
4
+
5
+ ## The forwarded_port port feature lets you connect to ports on the VM guest via
6
+ ## localhost on the host.
7
+ ## see also: https://docs.vagrantup.com/v2/networking/forwarded_ports.html
8
+
9
+ # network:
10
+ # - ["forwarded_port", {guest: 80, host: 8080}]
11
+
12
+ provisioner:
13
+ name: policyfile_zero
14
+
15
+ ## require_chef_omnibus specifies a specific chef version to install. You can
16
+ ## also set this to `true` to always use the latest version.
17
+ ## see also: https://docs.chef.io/config_yml_kitchen.html
18
+
19
+ # require_chef_omnibus: 12.5.0
20
+
21
+ # Uncomment the following verifier to leverage Inspec instead of Busser (the
22
+ # default verifier)
23
+ # verifier:
24
+ # name: inspec
25
+
26
+ platforms:
27
+ - name: ubuntu-14.04
28
+ - name: centos-7.1
29
+
30
+ suites:
31
+ - name: default
32
+ attributes:
@@ -0,0 +1,7 @@
1
+ name '<%= cookbook_name %>'
2
+ maintainer '<%= copyright_holder %>'
3
+ maintainer_email '<%= email %>'
4
+ license '<%= license %>'
5
+ description 'Installs/Configures <%= cookbook_name %>'
6
+ long_description 'Installs/Configures <%= cookbook_name %>'
7
+ version '0.1.0'
File without changes
@@ -0,0 +1,5 @@
1
+ #
2
+ # Cookbook Name:: <%= cookbook_name %>
3
+ # Recipe:: <%= recipe_name %>
4
+ #
5
+ <%= license_description('#') %>
@@ -0,0 +1,20 @@
1
+ #
2
+ # Cookbook Name:: <%= cookbook_name %>
3
+ # Spec:: default
4
+ #
5
+ <%= license_description('#') %>
6
+
7
+ require 'spec_helper'
8
+
9
+ RSpec.describe '<%= cookbook_name %>::<%= recipe_name %>' do
10
+ context 'When all attributes are default, on an unspecified platform' do
11
+ let(:chef_run) do
12
+ runner = ChefSpec::ServerRunner.new
13
+ runner.converge(described_recipe)
14
+ end
15
+
16
+ it 'converges successfully' do
17
+ expect { chef_run }.to_not raise_error
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,11 @@
1
+ .rake_test_cache
2
+
3
+ ###
4
+ # Ignore Chef key files and secrets
5
+ ###
6
+ .chef/*.pem
7
+ .chef/encrypted_data_bag_secret
8
+ <%- if policy_only -%>
9
+ cookbooks/**
10
+ !cookbooks/README.md
11
+ <%- end -%>
File without changes
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ describe '<%= cookbook_name %>::default' do
4
+ # Serverspec examples can be found at
5
+ # http://serverspec.org/resource_types.html
6
+ it 'does something' do
7
+ skip 'Replace this with meaningful tests'
8
+ end
9
+ end
@@ -0,0 +1,94 @@
1
+ require 'chefspec'
2
+ <% if @use_berkshelf -%>
3
+ require 'chefspec/berkshelf'
4
+ <% else -%>
5
+ require 'chefspec/policyfile'
6
+ <% end -%>
7
+
8
+ # This file was generated by the `rspec --init` command. Conventionally, all
9
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
10
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
11
+ # this file to always be loaded, without a need to explicitly require it in any
12
+ # files.
13
+ #
14
+ # Given that it is always loaded, you are encouraged to keep this file as
15
+ # light-weight as possible. Requiring heavyweight dependencies from this file
16
+ # will add to the boot time of your test suite on EVERY test run, even for an
17
+ # individual file that may not need all of that loaded. Instead, consider making
18
+ # a separate helper file that requires the additional dependencies and performs
19
+ # the additional setup, and require it from the spec files that actually need
20
+ # it.
21
+ #
22
+ # The `.rspec` file also contains a few flags that are not defaults but that
23
+ # users commonly want.
24
+ #
25
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
26
+ RSpec.configure do |config|
27
+ # rspec-expectations config goes here. You can use an alternate
28
+ # assertion/expectation library such as wrong or the stdlib/minitest
29
+ # assertions if you prefer.
30
+ config.expect_with :rspec do |expectations|
31
+ # This option will default to `true` in RSpec 4. It makes the `description`
32
+ # and `failure_message` of custom matchers include text for helper methods
33
+ # defined using `chain`, e.g.:
34
+ # be_bigger_than(2).and_smaller_than(4).description
35
+ # # => "be bigger than 2 and smaller than 4"
36
+ # ...rather than:
37
+ # # => "be bigger than 2"
38
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
39
+ end
40
+
41
+ # rspec-mocks config goes here. You can use an alternate test double
42
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
43
+ config.mock_with :rspec do |mocks|
44
+ # Prevents you from mocking or stubbing a method that does not exist on
45
+ # a real object. This is generally recommended, and will default to
46
+ # `true` in RSpec 4.
47
+ mocks.verify_partial_doubles = true
48
+ end
49
+
50
+ # These two settings work together to allow you to limit a spec run
51
+ # to individual examples or groups you care about by tagging them with
52
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
53
+ # get run.
54
+ config.filter_run :focus
55
+ config.run_all_when_everything_filtered = true
56
+
57
+ # Allows RSpec to persist some state between runs in order to support
58
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
59
+ # you configure your source control system to ignore this file.
60
+ config.example_status_persistence_file_path = 'spec/examples.txt'
61
+
62
+ # Limits the available syntax to the non-monkey patched syntax that is
63
+ # recommended. For more details, see:
64
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
65
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
66
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
67
+ config.disable_monkey_patching!
68
+
69
+ # This setting enables warnings. It's recommended, but in some cases may
70
+ # be too noisy due to issues in dependencies.
71
+ config.warnings = false
72
+
73
+ # Many RSpec users commonly either run the entire suite or an individual
74
+ # file, and it's useful to allow more verbose output when running an
75
+ # individual spec file.
76
+ if config.files_to_run.one?
77
+ # Use the documentation formatter for detailed output,
78
+ # unless a formatter has already been configured
79
+ # (e.g. via a command-line flag).
80
+ config.default_formatter = 'doc'
81
+ end
82
+
83
+ # Run specs in random order to surface order dependencies. If you find an
84
+ # order dependency and want to debug it, you can fix the order by providing
85
+ # the seed, which is printed after each run.
86
+ # --seed 1234
87
+ config.order = :random
88
+
89
+ # Seed global randomization in this process using the `--seed` CLI option.
90
+ # Setting this allows you to use `--seed` to deterministically reproduce
91
+ # test failures related to randomization by passing the same `--seed` value
92
+ # as the one that triggered the failure.
93
+ Kernel.srand config.seed
94
+ end
File without changes
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: chefdk-julia
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.1
5
+ platform: ruby
6
+ authors:
7
+ - Orion Ifland
8
+ - Doug Ireton
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-12-30 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: An Opinionated Cookbook creator, with spunk and a grin, by Nordstrom
15
+ email:
16
+ - orion.ifland@nordstrom.com
17
+ - doug.ireton@nordstrom.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - .gitignore
23
+ - .rspec
24
+ - .rubocop.yml
25
+ - .travis.yml
26
+ - Berksfile
27
+ - CHANGELOG.md
28
+ - LICENSE
29
+ - README.md
30
+ - Rakefile
31
+ - chefdk-julia.gemspec
32
+ - files/default/.rspec
33
+ - files/default/.rubocop.yml
34
+ - files/default/Berksfile
35
+ - files/default/Rakefile
36
+ - files/default/chefignore
37
+ - files/default/cookbook_readmes/README-policy.md
38
+ - files/default/cookbook_readmes/README.md
39
+ - files/default/gitignore
40
+ - files/default/repo/README.md
41
+ - files/default/repo/cookbooks/example/README.md
42
+ - files/default/repo/cookbooks/example/attributes/default.rb
43
+ - files/default/repo/cookbooks/example/metadata.rb
44
+ - files/default/repo/cookbooks/example/recipes/default.rb
45
+ - files/default/repo/data_bags/README.md
46
+ - files/default/repo/data_bags/example/example_item.json
47
+ - files/default/repo/dot-chef-repo.txt
48
+ - files/default/repo/environments/README.md
49
+ - files/default/repo/environments/example.json
50
+ - files/default/repo/policies/README.md
51
+ - files/default/repo/roles/README.md
52
+ - files/default/repo/roles/example.json
53
+ - files/default/serverspec_spec_helper.rb
54
+ - lib/chefdk/julia.rb
55
+ - lib/chefdk/julia/version.rb
56
+ - metadata.rb
57
+ - recipes/app.rb
58
+ - recipes/attribute.rb
59
+ - recipes/cookbook.rb
60
+ - recipes/cookbook_file.rb
61
+ - recipes/lwrp.rb
62
+ - recipes/policyfile.rb
63
+ - recipes/recipe.rb
64
+ - recipes/repo.rb
65
+ - recipes/template.rb
66
+ - templates/default/LICENSE.all_rights.erb
67
+ - templates/default/LICENSE.apache2.erb
68
+ - templates/default/LICENSE.gplv2.erb
69
+ - templates/default/LICENSE.gplv3.erb
70
+ - templates/default/LICENSE.mit.erb
71
+ - templates/default/Policyfile.rb.erb
72
+ - templates/default/README.md.erb
73
+ - templates/default/attribute.rb.erb
74
+ - templates/default/cookbook_file.erb
75
+ - templates/default/kitchen.yml.erb
76
+ - templates/default/kitchen_policyfile.yml.erb
77
+ - templates/default/metadata.rb.erb
78
+ - templates/default/provider.rb.erb
79
+ - templates/default/recipe.rb.erb
80
+ - templates/default/recipe_spec.rb.erb
81
+ - templates/default/repo/gitignore.erb
82
+ - templates/default/resource.rb.erb
83
+ - templates/default/serverspec_default_spec.rb.erb
84
+ - templates/default/spec_spec_helper.rb.erb
85
+ - templates/default/template.erb
86
+ homepage: https://github.com/Nordstrom/chefdk-julia
87
+ licenses:
88
+ - Apache-2.0
89
+ metadata: {}
90
+ post_install_message: ! " Paste lines below into your ~/.chef/config.rb or knife.rb\n\n
91
+ \ require 'chefdk-julia'\n chefdk.generator_cookbook Chefdk::Julia.path\n"
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ! '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ! '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubyforge_project:
107
+ rubygems_version: 2.4.5
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: Custom generator for ChefDK
111
+ test_files: []