biosphere 0.2.6 → 0.2.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39c9987b17ef9850602f0d6e68c8002a8b64d842
4
- data.tar.gz: 4c463b3c39668f2329a9820d2645a6443a0ce38f
3
+ metadata.gz: 1530299d3641fe3b7c3c00f274ac44ccdd0b2d46
4
+ data.tar.gz: c0626adac909be4cfe32279f90ac919b071347ec
5
5
  SHA512:
6
- metadata.gz: 7959a09eb3d179d78ae78cc7319885decf77ae57fa31d512e446ff5d6c594abecef8a0e0eb5af6085c5bcf13001fbf80466ab0a7d21cee92bcc8ccd5fa09b8e1
7
- data.tar.gz: 4d507b41a170ed80f9a0a986144b2928991d87fe587f0c60fae3f9bd6c5ed739f1e79ef854cd42e4403097b9d89140b8157f660cfffca28ccde77cbca1d9db6d
6
+ metadata.gz: ce68248981778f66eef1de382bcd461777fdceb86c620e61516242df57a8c0a3a4309879604dbb61dc93af8d12c54ee5f11cb3a92c765cf5f25ad2954b3e8100
7
+ data.tar.gz: d5372077cd2448b4dbebd8d9e87a2a8b996fe84f2d9580934c8ca2d923e68c7c8af9796ff3445b5e17324799e59b5fef78d2579c7adf6e87349a3a0b0a1ecac6
data/bin/biosphere CHANGED
@@ -233,9 +233,12 @@ elsif ARGV[0] == "commit" && options.src
233
233
  end
234
234
 
235
235
  # Print the raw terraform output
236
+ puts "== TERRAFORM PLAN START ==".colorize(:green)
236
237
  puts "\n" + tf_plan_str
237
-
238
+ puts "== TERRAFORM PLAN END ==".colorize(:green)
239
+ puts "\n"
238
240
  # Print our pretty short plan
241
+ puts "Target group listing:"
239
242
  plan.print
240
243
 
241
244
  targets = plan.get_resources.collect { |x| "-target=#{x}" }.join(" ")
@@ -330,4 +333,3 @@ else
330
333
  STDERR.puts "\nERROR: Unknown command #{ARGV[0]}. Maybe you wanted to do: \"biosphere action #{ARGV[0]}\"?"
331
334
  exit -1
332
335
  end
333
-
@@ -39,6 +39,8 @@ class Biosphere
39
39
  out.write "(#{item[:reason]})".colorize(:red)
40
40
  elsif item[:action] == :change
41
41
  out.write "(#{item[:reason]})".colorize(:yellow)
42
+ elsif item[:action] == :not_picked
43
+ out.write "(#{item[:reason]})".colorize(:yellow)
42
44
  else
43
45
  out.write "(#{item[:reason]}) unknown action: #{item[:action]}".colorize(:red)
44
46
  end
@@ -124,7 +126,7 @@ class Biosphere
124
126
  resource_to_target_group_map = {}
125
127
 
126
128
  resources_not_in_any_target_group = {}
127
- deployment.resources.each do |resource|
129
+ deployment.all_resources.each do |resource|
128
130
  belong_to_target_group = false
129
131
  resource_name = resource[:type] + "." + resource[:name]
130
132
 
@@ -190,6 +192,7 @@ class Biosphere
190
192
  # Relaunches are more complex: we need to bucket resources based on group, so that we can later pick just one change from each group
191
193
  changes[:relaunches].each do |change|
192
194
  group = resource_to_target_group_map[change]
195
+ puts "group #{group} for change #{change}"
193
196
  if group
194
197
  group_changes_map[group] = (group_changes_map[group] ||= []) << change
195
198
  elsif resources_not_in_any_target_group[change]
@@ -5,7 +5,7 @@ class Biosphere
5
5
 
6
6
  class Deployment
7
7
 
8
- attr_reader :export, :name, :_settings, :feature_manifests, :target_groups, :resources
8
+ attr_reader :export, :name, :_settings, :feature_manifests, :target_groups, :resources, :all_resources
9
9
  attr_accessor :state, :node
10
10
 
11
11
  def initialize(parent, name, settings={})
@@ -44,11 +44,12 @@ class Biosphere
44
44
  if @parent.is_a?(::Biosphere::Suite)
45
45
  @parent.register(self)
46
46
  @target_groups = {}
47
-
47
+ @all_resources = []
48
48
  elsif @parent
49
49
  @node = @parent.node
50
50
  @state = @parent.state
51
51
  @export = @parent.export
52
+ @all_resources = @parent.all_resources
52
53
  @target_groups = @parent.target_groups
53
54
 
54
55
  @parent.register(self)
@@ -141,6 +142,7 @@ class Biosphere
141
142
  end
142
143
 
143
144
  @resources << resource
145
+ @all_resources << resource
144
146
 
145
147
  end
146
148
 
@@ -1,3 +1,3 @@
1
1
  class Biosphere
2
- Version = "0.2.6"
2
+ Version = "0.2.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biosphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juho Mäkinen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-29 00:00:00.000000000 Z
11
+ date: 2017-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec