cloudspin-stack 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c99dae60e8a47326028b008d91b9da077ea0859
4
- data.tar.gz: 6f57facf4f429c9544a5ab86a330bcc27e5112b9
3
+ metadata.gz: 8ca15eb2f2ce62233b6845d2742fdc44665a474c
4
+ data.tar.gz: c75883399d4b188edd8eb437d148279d5ff918e7
5
5
  SHA512:
6
- metadata.gz: 8a296b870b6f2a0dc28229568689c2600836dc1c522b2768b9ac1c3758924e12fde8cc89ffbbbcaea25fdc991ef75ef7e8b687a05d4171ed5843c91cf8d43063
7
- data.tar.gz: 1ddcc1e10f512e408ca6746bb399cfd2bec8606895ddbb10bbc10223f7a2ece75c6c7aecb1bdaba51cfe40536a0b542ae11ebb09e4904cec6ebbbdb2ba02b766
6
+ metadata.gz: c072155221f78a4f38c7eb4736b2e1b11e4419ed7103bc24c7845e62750595ef243f49c6254918ce1b3a2e14b228ea9fb25d7b9ca25725d9db74bb52b8c2d4c3
7
+ data.tar.gz: 3ed7a75f7ac680a0ec9f3f93445ebc57d986b1b7ca995e1111ef30db0cb994ca526897962b7c94282ae7f98a46d0289fabb5abcc5ffac8aefc931dfc2dde553f
data/lib/cloudspin/cli.rb CHANGED
@@ -4,12 +4,26 @@ require 'cloudspin/stack'
4
4
  module Cloudspin
5
5
  class CLI < Thor
6
6
 
7
- class_option :file
7
+ class_option :file, :banner => 'YAML-CONFIG-FILE', :type => :array
8
8
 
9
9
  desc 'plan', 'Print the changes that will by applied when the \'stack up\' command is run'
10
10
  def plan
11
11
  puts "Get configuration from #{options[:file]}" if options[:file]
12
- instance.plan
12
+ stack = instance
13
+ options[:file].each { |config_file|
14
+ stack.add_config_from_yaml(config_file)
15
+ }
16
+ stack.plan
17
+ end
18
+
19
+ desc 'version', 'Print the version number'
20
+ def version
21
+ puts "cloudspin-stack: #{Cloudspin::Stack::VERSION}"
22
+ end
23
+
24
+ desc 'info', 'Print some info about arguments, for debugging'
25
+ def info
26
+ puts "Configuration file: #{options[:file]}"
13
27
  end
14
28
 
15
29
  no_commands do
@@ -21,8 +35,6 @@ module Cloudspin
21
35
  working_folder: working_folder,
22
36
  statefile_folder: statefile_folder
23
37
  )
24
- # parameter_values: parameter_values
25
- # resource_values: resource_values
26
38
  end
27
39
 
28
40
  def stack_definition
@@ -45,41 +57,6 @@ module Cloudspin
45
57
  Pathname.new(stack_project_folder + '/state').realpath.to_s
46
58
  end
47
59
 
48
- def parameter_values
49
- {
50
- 'deployment_identifier' => 'my_env',
51
- 'component' => 'my_component',
52
- 'estate' => 'my_estate',
53
- 'base_dns_domain' => 'my_domain'
54
- }
55
- end
56
-
57
- def resource_values
58
- {
59
- 'assume_role_arn' => assume_role_arn
60
- }
61
- end
62
-
63
- def assume_role_arn
64
- configuration['assume_role_arn']
65
- end
66
-
67
- def configuration
68
- @config ||= load_config
69
- end
70
-
71
- def load_config
72
- default_config.merge(local_config)
73
- end
74
-
75
- def local_config
76
- YAML.load_file(stack_project_folder + '/spin-local.yaml') || {}
77
- end
78
-
79
- def default_config
80
- YAML.load_file(stack_project_folder + '/spin-default.yaml') || {}
81
- end
82
-
83
60
  end
84
61
 
85
62
  def self.exit_on_failure?
@@ -1,5 +1,5 @@
1
1
  module Cloudspin
2
2
  module Stack
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudspin-stack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 'kief '