wombat-cli 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +23 -23
  3. data/.travis.yml +27 -27
  4. data/CHANGELOG.md +77 -70
  5. data/DESIGN.md +49 -49
  6. data/Gemfile +5 -5
  7. data/README.md +146 -146
  8. data/Rakefile +26 -26
  9. data/bin/wombat +24 -24
  10. data/generator_files/Vagrantfile +120 -120
  11. data/generator_files/cookbooks/automate/.gitignore +16 -16
  12. data/generator_files/cookbooks/automate/.kitchen.ec2.yml +34 -34
  13. data/generator_files/cookbooks/automate/.kitchen.yml +24 -24
  14. data/generator_files/cookbooks/automate/Berksfile +6 -6
  15. data/generator_files/cookbooks/automate/README.md +4 -4
  16. data/generator_files/cookbooks/automate/chefignore +102 -102
  17. data/generator_files/cookbooks/automate/libraries/_helper.rb +52 -52
  18. data/generator_files/cookbooks/automate/libraries/delivery_api.rb +204 -204
  19. data/generator_files/cookbooks/automate/libraries/delivery_project.rb +31 -31
  20. data/generator_files/cookbooks/automate/libraries/dsl.rb +4 -4
  21. data/generator_files/cookbooks/automate/metadata.rb +11 -11
  22. data/generator_files/cookbooks/automate/recipes/default.rb +112 -112
  23. data/generator_files/cookbooks/automate/recipes/update-users.rb +48 -48
  24. data/generator_files/cookbooks/automate/templates/delivery.erb +6 -6
  25. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  26. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  27. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
  28. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  29. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  30. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  31. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  32. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  33. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/metadata.rb +3 -3
  34. data/generator_files/cookbooks/automate/test/fixtures/cookbooks/mock_data/recipes/default.rb +27 -27
  35. data/generator_files/cookbooks/automate/test/integration/default/automate_spec.rb +56 -56
  36. data/generator_files/cookbooks/build_node/.gitignore +16 -16
  37. data/generator_files/cookbooks/build_node/.kitchen.ec2.yml +37 -37
  38. data/generator_files/cookbooks/build_node/.kitchen.yml +23 -23
  39. data/generator_files/cookbooks/build_node/Berksfile +8 -8
  40. data/generator_files/cookbooks/build_node/README.md +4 -4
  41. data/generator_files/cookbooks/build_node/chefignore +102 -102
  42. data/generator_files/cookbooks/build_node/metadata.rb +12 -12
  43. data/generator_files/cookbooks/build_node/recipes/default.rb +38 -38
  44. data/generator_files/cookbooks/build_node/templates/client.erb +2 -2
  45. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  46. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  47. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
  48. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  49. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  50. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  51. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  52. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  53. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/metadata.rb +2 -2
  54. data/generator_files/cookbooks/build_node/test/fixtures/cookbooks/mock_data/recipes/default.rb +18 -18
  55. data/generator_files/cookbooks/build_node/test/integration/default/build-node_spec.rb +40 -40
  56. data/generator_files/cookbooks/chef_server/.gitignore +16 -16
  57. data/generator_files/cookbooks/chef_server/.kitchen.ec2.yml +34 -34
  58. data/generator_files/cookbooks/chef_server/.kitchen.yml +24 -24
  59. data/generator_files/cookbooks/chef_server/Berksfile +6 -6
  60. data/generator_files/cookbooks/chef_server/README.md +4 -4
  61. data/generator_files/cookbooks/chef_server/chefignore +102 -102
  62. data/generator_files/cookbooks/chef_server/metadata.rb +11 -11
  63. data/generator_files/cookbooks/chef_server/recipes/bootstrap_users.rb +91 -91
  64. data/generator_files/cookbooks/chef_server/recipes/default.rb +113 -113
  65. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  66. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  67. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
  68. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  69. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  70. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  71. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  72. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  73. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/metadata.rb +2 -2
  74. data/generator_files/cookbooks/chef_server/test/fixtures/cookbooks/mock_data/recipes/default.rb +23 -23
  75. data/generator_files/cookbooks/chef_server/test/integration/default/chef_server_spec.rb +50 -50
  76. data/generator_files/cookbooks/compliance/.gitignore +16 -16
  77. data/generator_files/cookbooks/compliance/.kitchen.ec2.yml +34 -34
  78. data/generator_files/cookbooks/compliance/.kitchen.yml +24 -24
  79. data/generator_files/cookbooks/compliance/Berksfile +7 -7
  80. data/generator_files/cookbooks/compliance/README.md +4 -4
  81. data/generator_files/cookbooks/compliance/chefignore +102 -102
  82. data/generator_files/cookbooks/compliance/metadata.rb +11 -11
  83. data/generator_files/cookbooks/compliance/recipes/default.rb +57 -57
  84. data/generator_files/cookbooks/compliance/spec/spec_helper.rb +2 -2
  85. data/generator_files/cookbooks/compliance/spec/unit/recipes/default_spec.rb +20 -20
  86. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  87. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  88. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
  89. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  90. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  91. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  92. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  93. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  94. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/metadata.rb +4 -4
  95. data/generator_files/cookbooks/compliance/test/fixtures/cookbooks/mock_data/recipes/default.rb +21 -21
  96. data/generator_files/cookbooks/compliance/test/integration/default/compliance.rb +28 -28
  97. data/generator_files/cookbooks/infranodes/.gitignore +16 -16
  98. data/generator_files/cookbooks/infranodes/.kitchen.ec2.yml +48 -48
  99. data/generator_files/cookbooks/infranodes/.kitchen.yml +21 -21
  100. data/generator_files/cookbooks/infranodes/Berksfile +6 -6
  101. data/generator_files/cookbooks/infranodes/README.md +4 -4
  102. data/generator_files/cookbooks/infranodes/attributes/default.rb +2 -2
  103. data/generator_files/cookbooks/infranodes/chefignore +102 -102
  104. data/generator_files/cookbooks/infranodes/metadata.rb +13 -13
  105. data/generator_files/cookbooks/infranodes/recipes/default.rb +57 -57
  106. data/generator_files/cookbooks/infranodes/spec/spec_helper.rb +2 -2
  107. data/generator_files/cookbooks/infranodes/spec/unit/recipes/default_spec.rb +20 -20
  108. data/generator_files/cookbooks/infranodes/templates/default/client.rb.erb +5 -5
  109. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  110. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  111. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/chef.crt +25 -25
  112. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  113. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  114. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  115. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  116. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  117. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/metadata.rb +3 -3
  118. data/generator_files/cookbooks/infranodes/test/fixtures/cookbooks/mock_data/recipes/default.rb +27 -27
  119. data/generator_files/cookbooks/infranodes/test/integration/default/infranodes_spec.rb +22 -22
  120. data/generator_files/cookbooks/infranodes/test/integration/helpers/serverspec/spec_helper.rb +8 -8
  121. data/generator_files/cookbooks/wombat/.gitignore +16 -16
  122. data/generator_files/cookbooks/wombat/.kitchen.yml +43 -43
  123. data/generator_files/cookbooks/wombat/Berksfile +5 -5
  124. data/generator_files/cookbooks/wombat/README.md +4 -4
  125. data/generator_files/cookbooks/wombat/attributes/default.rb +74 -74
  126. data/generator_files/cookbooks/wombat/attributes/packer.rb +18 -18
  127. data/generator_files/cookbooks/wombat/chefignore +102 -102
  128. data/generator_files/cookbooks/wombat/metadata.rb +13 -13
  129. data/generator_files/cookbooks/wombat/recipes/authorized-keys.rb +20 -20
  130. data/generator_files/cookbooks/wombat/recipes/default.rb +111 -111
  131. data/generator_files/cookbooks/wombat/recipes/etc-hosts.rb +51 -51
  132. data/generator_files/cookbooks/workstation/.gitignore +16 -16
  133. data/generator_files/cookbooks/workstation/.kitchen.ec2.yml +30 -30
  134. data/generator_files/cookbooks/workstation/.kitchen.yml +22 -22
  135. data/generator_files/cookbooks/workstation/Berksfile +7 -7
  136. data/generator_files/cookbooks/workstation/README.md +3 -3
  137. data/generator_files/cookbooks/workstation/chefignore +102 -102
  138. data/generator_files/cookbooks/workstation/files/atom.apm.list +7 -7
  139. data/generator_files/cookbooks/workstation/files/atom.config.cson +3 -3
  140. data/generator_files/cookbooks/workstation/metadata.rb +14 -14
  141. data/generator_files/cookbooks/workstation/recipes/browser.rb +59 -59
  142. data/generator_files/cookbooks/workstation/recipes/certs-keys.rb +45 -45
  143. data/generator_files/cookbooks/workstation/recipes/chef.rb +29 -29
  144. data/generator_files/cookbooks/workstation/recipes/default.rb +20 -20
  145. data/generator_files/cookbooks/workstation/recipes/dotnet.rb +17 -17
  146. data/generator_files/cookbooks/workstation/recipes/editor.rb +19 -19
  147. data/generator_files/cookbooks/workstation/recipes/profile.rb +42 -42
  148. data/generator_files/cookbooks/workstation/recipes/terminal.rb +13 -13
  149. data/generator_files/cookbooks/workstation/templates/default/bookmarks.html.erb +23 -23
  150. data/generator_files/cookbooks/workstation/templates/default/data_collector.rb.erb +2 -2
  151. data/generator_files/cookbooks/workstation/templates/default/ise_profile.ps1.erb +11 -11
  152. data/generator_files/cookbooks/workstation/templates/default/knife.rb.erb +10 -10
  153. data/generator_files/cookbooks/workstation/templates/default/master_preferences.json.erb +28 -28
  154. data/generator_files/cookbooks/workstation/templates/default/ssh_config.erb +16 -16
  155. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/automate.crt +26 -26
  156. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/automate.key +27 -27
  157. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/chef.crt +26 -26
  158. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/chef.key +27 -27
  159. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/compliance.crt +26 -26
  160. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/compliance.key +27 -27
  161. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/private.pem +27 -27
  162. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/files/public.pub +1 -1
  163. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/metadata.rb +2 -2
  164. data/generator_files/cookbooks/workstation/test/fixtures/cookbooks/mock_data/recipes/default.rb +21 -21
  165. data/generator_files/cookbooks/workstation/test/integration/default/workstation_spec.rb +37 -37
  166. data/generator_files/packer/automate.json +131 -131
  167. data/generator_files/packer/build-node.json +137 -137
  168. data/generator_files/packer/chef-server.json +132 -132
  169. data/generator_files/packer/compliance.json +128 -128
  170. data/generator_files/packer/infranodes-windows.json +138 -138
  171. data/generator_files/packer/infranodes.json +129 -129
  172. data/generator_files/packer/workstation.json +136 -136
  173. data/generator_files/templates/arm.json.erb +575 -575
  174. data/generator_files/templates/arm.tidy.json.erb +31 -31
  175. data/generator_files/templates/bootstrap-aws.erb +36 -36
  176. data/generator_files/templates/cfn.json.erb +674 -674
  177. data/generator_files/wombat.yml +71 -71
  178. data/lib/wombat/aws.rb +67 -67
  179. data/lib/wombat/build.rb +338 -338
  180. data/lib/wombat/cli.rb +238 -238
  181. data/lib/wombat/common.rb +347 -347
  182. data/lib/wombat/crypto.rb +64 -64
  183. data/lib/wombat/delete.rb +94 -94
  184. data/lib/wombat/deploy.rb +101 -101
  185. data/lib/wombat/init.rb +32 -32
  186. data/lib/wombat/latest.rb +27 -27
  187. data/lib/wombat/output.rb +86 -86
  188. data/lib/wombat/update.rb +20 -20
  189. data/lib/wombat/version.rb +3 -3
  190. data/lib/wombat.rb +8 -8
  191. data/spec/functional/common_spec.rb +26 -26
  192. data/spec/spec_helper.rb +103 -103
  193. data/spec/unit/common_spec.rb +116 -116
  194. data/terraform/README.md +13 -13
  195. data/terraform/templates/terraform.tfvars.erb +12 -12
  196. data/terraform/wombat.tf +328 -328
  197. data/wombat-cli.gemspec +34 -34
  198. metadata +2 -2
data/lib/wombat/output.rb CHANGED
@@ -1,86 +1,86 @@
1
- require 'wombat/common'
2
- require 'aws-sdk'
3
- require 'azure_mgmt_network'
4
-
5
- module Wombat
6
- class OutputRunner
7
- include Wombat::Common
8
-
9
- attr_reader :stack, :cloud
10
- attr_accessor :network_management_client
11
-
12
- def initialize(opts)
13
- @stack = opts.stack
14
- @cloud = opts.cloud.nil? ? "aws" : opts.cloud
15
- end
16
-
17
- def start
18
-
19
- # Get the IP addresses for the workstations
20
- case cloud
21
- when "aws"
22
- cfn_workstation_ips(stack)
23
- when "azure"
24
- azure_workstation_ips(stack)
25
- end
26
- end
27
-
28
- private
29
-
30
- def cfn_workstation_ips(stack)
31
- ec2 = Aws::EC2::Resource.new
32
- instances = cfn_stack_instances(stack)
33
- instances.each do |name, id|
34
- instance = ec2.instance(id)
35
- if /Workstation/.match(name)
36
- puts "#{name} (#{id}) => #{instance.public_ip_address}"
37
- end
38
- end
39
- end
40
-
41
- def cfn_stack_instances(stack)
42
- cfn = Aws::CloudFormation::Client.new
43
- resp = cfn.describe_stack_resources({
44
- stack_name: stack,
45
- })
46
-
47
- instances = {}
48
- resp.stack_resources.map do |resource|
49
- if resource.resource_type == 'AWS::EC2::Instance'
50
- instances[resource.logical_resource_id] = resource.physical_resource_id
51
- end
52
- end
53
- instances
54
- end
55
-
56
- def azure_workstation_ips(stack)
57
-
58
- # Connect to Azure
59
- azure_conn = connect_azure()
60
-
61
- # Create a resource client so that the template can be deployed
62
- @network_management_client = Azure::ARM::Network::NetworkManagementClient.new(azure_conn)
63
- network_management_client.subscription_id = ENV['AZURE_SUBSCRIPTION_ID']
64
-
65
- # Obtain a list of all the Public IP addresses in the stack
66
- public_ip_addresses = network_management_client.public_ipaddresses.list(stack)
67
-
68
- banner(format("Public IP Addresses in '%s'", stack))
69
-
70
- # Check that there are IP addresses in the stack
71
- if public_ip_addresses.length == 0
72
-
73
- warn('No public IP addresses')
74
-
75
- else
76
-
77
- # Iterate around the public IP addresses and output each one
78
- public_ip_addresses.each do |public_ip_address|
79
-
80
- # Output the details about the IP address
81
- puts format("%s:\t%s (%s)", public_ip_address.name, public_ip_address.ip_address, public_ip_address.dns_settings.fqdn)
82
- end
83
- end
84
- end
85
- end
86
- end
1
+ require 'wombat/common'
2
+ require 'aws-sdk'
3
+ require 'azure_mgmt_network'
4
+
5
+ module Wombat
6
+ class OutputRunner
7
+ include Wombat::Common
8
+
9
+ attr_reader :stack, :cloud
10
+ attr_accessor :network_management_client
11
+
12
+ def initialize(opts)
13
+ @stack = opts.stack
14
+ @cloud = opts.cloud.nil? ? "aws" : opts.cloud
15
+ end
16
+
17
+ def start
18
+
19
+ # Get the IP addresses for the workstations
20
+ case cloud
21
+ when "aws"
22
+ cfn_workstation_ips(stack)
23
+ when "azure"
24
+ azure_workstation_ips(stack)
25
+ end
26
+ end
27
+
28
+ private
29
+
30
+ def cfn_workstation_ips(stack)
31
+ ec2 = Aws::EC2::Resource.new
32
+ instances = cfn_stack_instances(stack)
33
+ instances.each do |name, id|
34
+ instance = ec2.instance(id)
35
+ if /Workstation/.match(name)
36
+ puts "#{name} (#{id}) => #{instance.public_ip_address}"
37
+ end
38
+ end
39
+ end
40
+
41
+ def cfn_stack_instances(stack)
42
+ cfn = Aws::CloudFormation::Client.new
43
+ resp = cfn.describe_stack_resources({
44
+ stack_name: stack,
45
+ })
46
+
47
+ instances = {}
48
+ resp.stack_resources.map do |resource|
49
+ if resource.resource_type == 'AWS::EC2::Instance'
50
+ instances[resource.logical_resource_id] = resource.physical_resource_id
51
+ end
52
+ end
53
+ instances
54
+ end
55
+
56
+ def azure_workstation_ips(stack)
57
+
58
+ # Connect to Azure
59
+ azure_conn = connect_azure()
60
+
61
+ # Create a resource client so that the template can be deployed
62
+ @network_management_client = Azure::ARM::Network::NetworkManagementClient.new(azure_conn)
63
+ network_management_client.subscription_id = ENV['AZURE_SUBSCRIPTION_ID']
64
+
65
+ # Obtain a list of all the Public IP addresses in the stack
66
+ public_ip_addresses = network_management_client.public_ipaddresses.list(stack)
67
+
68
+ banner(format("Public IP Addresses in '%s'", stack))
69
+
70
+ # Check that there are IP addresses in the stack
71
+ if public_ip_addresses.length == 0
72
+
73
+ warn('No public IP addresses')
74
+
75
+ else
76
+
77
+ # Iterate around the public IP addresses and output each one
78
+ public_ip_addresses.each do |public_ip_address|
79
+
80
+ # Output the details about the IP address
81
+ puts format("%s:\t%s (%s)", public_ip_address.name, public_ip_address.ip_address, public_ip_address.dns_settings.fqdn)
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
data/lib/wombat/update.rb CHANGED
@@ -1,20 +1,20 @@
1
- require 'wombat/common'
2
-
3
- module Wombat
4
- class UpdateRunner
5
- include Wombat::Common
6
-
7
- attr_reader :cloud, :update_file
8
-
9
- def initialize(opts)
10
- @cloud = opts.cloud.nil? ? "aws" : opts.cloud
11
- @update_file = opts.file.nil? ? "all" : opts.file
12
- @wombat_yml = opts.wombat_yml
13
- end
14
-
15
- def start
16
- update_lock(cloud) if /(all|lock)/.match(update_file)
17
- update_template(cloud) if /(all|template)/.match(update_file)
18
- end
19
- end
20
- end
1
+ require 'wombat/common'
2
+
3
+ module Wombat
4
+ class UpdateRunner
5
+ include Wombat::Common
6
+
7
+ attr_reader :cloud, :update_file
8
+
9
+ def initialize(opts)
10
+ @cloud = opts.cloud.nil? ? "aws" : opts.cloud
11
+ @update_file = opts.file.nil? ? "all" : opts.file
12
+ @wombat_yml = opts.wombat_yml
13
+ end
14
+
15
+ def start
16
+ update_lock(cloud) if /(all|lock)/.match(update_file)
17
+ update_template(cloud) if /(all|template)/.match(update_file)
18
+ end
19
+ end
20
+ end
@@ -1,3 +1,3 @@
1
- module Wombat
2
- VERSION = "0.4.1"
3
- end
1
+ module Wombat
2
+ VERSION = "0.4.2"
3
+ end
data/lib/wombat.rb CHANGED
@@ -1,8 +1,8 @@
1
-
2
- require 'wombat/common'
3
- require 'wombat/cli'
4
- require 'wombat/delete'
5
- require 'wombat/build'
6
- require 'wombat/deploy'
7
- require 'wombat/output'
8
- require 'wombat/version'
1
+
2
+ require 'wombat/common'
3
+ require 'wombat/cli'
4
+ require 'wombat/delete'
5
+ require 'wombat/build'
6
+ require 'wombat/deploy'
7
+ require 'wombat/output'
8
+ require 'wombat/version'
@@ -1,26 +1,26 @@
1
- require "wombat/common"
2
- require "yaml"
3
-
4
- describe "Common" do
5
- let(:common) do
6
- klass = Class.new { include Wombat::Common }
7
-
8
- return klass.new
9
- end
10
-
11
- describe "#wombat" do
12
- it "reads a configuration file" do
13
- wombat_yml = File.join(
14
- File.expand_path("../..", File.dirname(__FILE__)),
15
- "generator_files",
16
- "wombat.yml"
17
- )
18
-
19
- stub_const("ENV", {"WOMBAT_YML" => wombat_yml})
20
-
21
- content = common.wombat
22
-
23
- expect(content["name"]).to eq("wombat")
24
- end
25
- end
26
- end
1
+ require "wombat/common"
2
+ require "yaml"
3
+
4
+ describe "Common" do
5
+ let(:common) do
6
+ klass = Class.new { include Wombat::Common }
7
+
8
+ return klass.new
9
+ end
10
+
11
+ describe "#wombat" do
12
+ it "reads a configuration file" do
13
+ wombat_yml = File.join(
14
+ File.expand_path("../..", File.dirname(__FILE__)),
15
+ "generator_files",
16
+ "wombat.yml"
17
+ )
18
+
19
+ stub_const("ENV", {"WOMBAT_YML" => wombat_yml})
20
+
21
+ content = common.wombat
22
+
23
+ expect(content["name"]).to eq("wombat")
24
+ end
25
+ end
26
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,103 +1,103 @@
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
- # The generated `.rspec` file contains `--require spec_helper` which will cause
4
- # this file to always be loaded, without a need to explicitly require it in any
5
- # files.
6
- #
7
- # Given that it is always loaded, you are encouraged to keep this file as
8
- # light-weight as possible. Requiring heavyweight dependencies from this file
9
- # will add to the boot time of your test suite on EVERY test run, even for an
10
- # individual file that may not need all of that loaded. Instead, consider making
11
- # a separate helper file that requires the additional dependencies and performs
12
- # the additional setup, and require it from the spec files that actually need
13
- # it.
14
- #
15
- # The `.rspec` file also contains a few flags that are not defaults but that
16
- # users commonly want.
17
- #
18
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
- RSpec.configure do |config|
20
- # rspec-expectations config goes here. You can use an alternate
21
- # assertion/expectation library such as wrong or the stdlib/minitest
22
- # assertions if you prefer.
23
- config.expect_with :rspec do |expectations|
24
- # This option will default to `true` in RSpec 4. It makes the `description`
25
- # and `failure_message` of custom matchers include text for helper methods
26
- # defined using `chain`, e.g.:
27
- # be_bigger_than(2).and_smaller_than(4).description
28
- # # => "be bigger than 2 and smaller than 4"
29
- # ...rather than:
30
- # # => "be bigger than 2"
31
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
- end
33
-
34
- # rspec-mocks config goes here. You can use an alternate test double
35
- # library (such as bogus or mocha) by changing the `mock_with` option here.
36
- config.mock_with :rspec do |mocks|
37
- # Prevents you from mocking or stubbing a method that does not exist on
38
- # a real object. This is generally recommended, and will default to
39
- # `true` in RSpec 4.
40
- mocks.verify_partial_doubles = true
41
- end
42
-
43
- # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
44
- # have no way to turn it off -- the option exists only for backwards
45
- # compatibility in RSpec 3). It causes shared context metadata to be
46
- # inherited by the metadata hash of host groups and examples, rather than
47
- # triggering implicit auto-inclusion in groups with matching metadata.
48
- config.shared_context_metadata_behavior = :apply_to_host_groups
49
-
50
- # The settings below are suggested to provide a good initial experience
51
- # with RSpec, but feel free to customize to your heart's content.
52
- =begin
53
- # This allows you to limit a spec run to individual examples or groups
54
- # you care about by tagging them with `:focus` metadata. When nothing
55
- # is tagged with `:focus`, all examples get run. RSpec also provides
56
- # aliases for `it`, `describe`, and `context` that include `:focus`
57
- # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
58
- config.filter_run_when_matching :focus
59
-
60
- # Allows RSpec to persist some state between runs in order to support
61
- # the `--only-failures` and `--next-failure` CLI options. We recommend
62
- # you configure your source control system to ignore this file.
63
- config.example_status_persistence_file_path = "spec/examples.txt"
64
-
65
- # Limits the available syntax to the non-monkey patched syntax that is
66
- # recommended. For more details, see:
67
- # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
68
- # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
69
- # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
70
- config.disable_monkey_patching!
71
-
72
- # This setting enables warnings. It's recommended, but in some cases may
73
- # be too noisy due to issues in dependencies.
74
- config.warnings = true
75
-
76
- # Many RSpec users commonly either run the entire suite or an individual
77
- # file, and it's useful to allow more verbose output when running an
78
- # individual spec file.
79
- if config.files_to_run.one?
80
- # Use the documentation formatter for detailed output,
81
- # unless a formatter has already been configured
82
- # (e.g. via a command-line flag).
83
- config.default_formatter = 'doc'
84
- end
85
-
86
- # Print the 10 slowest examples and example groups at the
87
- # end of the spec run, to help surface which specs are running
88
- # particularly slow.
89
- config.profile_examples = 10
90
-
91
- # Run specs in random order to surface order dependencies. If you find an
92
- # order dependency and want to debug it, you can fix the order by providing
93
- # the seed, which is printed after each run.
94
- # --seed 1234
95
- config.order = :random
96
-
97
- # Seed global randomization in this process using the `--seed` CLI option.
98
- # Setting this allows you to use `--seed` to deterministically reproduce
99
- # test failures related to randomization by passing the same `--seed` value
100
- # as the one that triggered the failure.
101
- Kernel.srand config.seed
102
- =end
103
- end
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
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ RSpec.configure do |config|
20
+ # rspec-expectations config goes here. You can use an alternate
21
+ # assertion/expectation library such as wrong or the stdlib/minitest
22
+ # assertions if you prefer.
23
+ config.expect_with :rspec do |expectations|
24
+ # This option will default to `true` in RSpec 4. It makes the `description`
25
+ # and `failure_message` of custom matchers include text for helper methods
26
+ # defined using `chain`, e.g.:
27
+ # be_bigger_than(2).and_smaller_than(4).description
28
+ # # => "be bigger than 2 and smaller than 4"
29
+ # ...rather than:
30
+ # # => "be bigger than 2"
31
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
+ end
33
+
34
+ # rspec-mocks config goes here. You can use an alternate test double
35
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
36
+ config.mock_with :rspec do |mocks|
37
+ # Prevents you from mocking or stubbing a method that does not exist on
38
+ # a real object. This is generally recommended, and will default to
39
+ # `true` in RSpec 4.
40
+ mocks.verify_partial_doubles = true
41
+ end
42
+
43
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
44
+ # have no way to turn it off -- the option exists only for backwards
45
+ # compatibility in RSpec 3). It causes shared context metadata to be
46
+ # inherited by the metadata hash of host groups and examples, rather than
47
+ # triggering implicit auto-inclusion in groups with matching metadata.
48
+ config.shared_context_metadata_behavior = :apply_to_host_groups
49
+
50
+ # The settings below are suggested to provide a good initial experience
51
+ # with RSpec, but feel free to customize to your heart's content.
52
+ =begin
53
+ # This allows you to limit a spec run to individual examples or groups
54
+ # you care about by tagging them with `:focus` metadata. When nothing
55
+ # is tagged with `:focus`, all examples get run. RSpec also provides
56
+ # aliases for `it`, `describe`, and `context` that include `:focus`
57
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
58
+ config.filter_run_when_matching :focus
59
+
60
+ # Allows RSpec to persist some state between runs in order to support
61
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
62
+ # you configure your source control system to ignore this file.
63
+ config.example_status_persistence_file_path = "spec/examples.txt"
64
+
65
+ # Limits the available syntax to the non-monkey patched syntax that is
66
+ # recommended. For more details, see:
67
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
68
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
69
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
70
+ config.disable_monkey_patching!
71
+
72
+ # This setting enables warnings. It's recommended, but in some cases may
73
+ # be too noisy due to issues in dependencies.
74
+ config.warnings = true
75
+
76
+ # Many RSpec users commonly either run the entire suite or an individual
77
+ # file, and it's useful to allow more verbose output when running an
78
+ # individual spec file.
79
+ if config.files_to_run.one?
80
+ # Use the documentation formatter for detailed output,
81
+ # unless a formatter has already been configured
82
+ # (e.g. via a command-line flag).
83
+ config.default_formatter = 'doc'
84
+ end
85
+
86
+ # Print the 10 slowest examples and example groups at the
87
+ # end of the spec run, to help surface which specs are running
88
+ # particularly slow.
89
+ config.profile_examples = 10
90
+
91
+ # Run specs in random order to surface order dependencies. If you find an
92
+ # order dependency and want to debug it, you can fix the order by providing
93
+ # the seed, which is printed after each run.
94
+ # --seed 1234
95
+ config.order = :random
96
+
97
+ # Seed global randomization in this process using the `--seed` CLI option.
98
+ # Setting this allows you to use `--seed` to deterministically reproduce
99
+ # test failures related to randomization by passing the same `--seed` value
100
+ # as the one that triggered the failure.
101
+ Kernel.srand config.seed
102
+ =end
103
+ end