biosphere 0.1.7 → 0.1.8

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: cdc111ae02adaf39cb2c1c0af5d37b0e575da7d4
4
- data.tar.gz: ec007c7457d7991a4e7c97984e5373cf9a79e568
3
+ metadata.gz: 88020767bf9108cca1476004ddf0341b5feafe88
4
+ data.tar.gz: 063cb05d2a0cba8246a49cccdf0d7c396e18ddcb
5
5
  SHA512:
6
- metadata.gz: 52a249f0af8c6e67059990fc0bfff70b6fa053e8fb479597a3aa8480d2fa5229b5eb4a26c4cb552afe556e0d663ef22d1f7718097a24b6b98eda1844b6de7f84
7
- data.tar.gz: 8094c19e30d6ca4b40ec9a4a7ef6eb0bc06cac54ca7e3a58a38b93be8fa6cde0b0bc6afccd68c5e3245259acd539c54de07090b4cba7fb801d32dbfc5e6939f7
6
+ metadata.gz: 97728c5ec497caa18604445a6bea2e2adb0cde5f0c906f98a24d97dd62eece20c28519acd4e7072dd8fbf9937594a43e970269e06d28e18b1a325e4a3f8348e9
7
+ data.tar.gz: e900d8d19297fe53e4d35d4b2c8b1135d99d4dd80b2174a0b1018e0b631693b8b77650965ac9878bdd4242e7ba12739357ca9939f7e6c672564ae20ad6ec971c
@@ -7,6 +7,7 @@ require 'pp'
7
7
  require "awesome_print"
8
8
  require 'colorize'
9
9
  require 'biosphere/s3.rb'
10
+ require 'pty'
10
11
 
11
12
  class BiosphereOpts
12
13
 
@@ -89,7 +90,7 @@ if options.src
89
90
  STDERR.puts "Loading suite from current directory (#{File.expand_path(options.src)}). Use --src to change the path"
90
91
  end
91
92
 
92
- if suite.load_all(options.src) == 0
93
+ if suite.load_all(options.src) == 0 || suite.deployments.size == 0
93
94
  STDERR.puts "No files found. Are you in the right directory where your biosphere .rb files are?"
94
95
  exit -1
95
96
  end
@@ -197,8 +198,19 @@ elsif ARGV[0] == "commit" && options.src
197
198
  elsif answer == "y"
198
199
  puts "\nApplying the changes (this may take several minutes)"
199
200
  state_file = "#{options.build_dir}/#{deployment}.tfstate"
200
- tf_apply = %x( terraform apply -state=#{state_file} #{options.build_dir})
201
- puts "\n" + tf_apply
201
+ #tf_apply = %x( terraform apply -state=#{state_file} #{options.build_dir})
202
+ #puts "\n" + tf_apply
203
+ begin
204
+ PTY.spawn("terraform apply -state=#{state_file} #{options.build_dir}") do |stdout, stdin, pid|
205
+ begin
206
+ stdout.each { |line| puts line }
207
+ rescue Errno::EIO
208
+ end
209
+ end
210
+ rescue PTY::ChildExited
211
+ puts "The child process exited!"
212
+ end
213
+
202
214
  puts "Loading outputs for #{deployment} from #{state_file}"
203
215
  suite.deployments[deployment].load_outputs(state_file)
204
216
  state.save()
@@ -32,6 +32,7 @@ class Biosphere
32
32
 
33
33
  @clients << ::Kubeclient::Client.new("#{hostname}/api" , "v1", ssl_options: ssl_options)
34
34
  @clients << ::Kubeclient::Client.new("#{hostname}/apis/extensions/" , "v1beta1", ssl_options: ssl_options)
35
+ @clients << ::Kubeclient::Client.new("#{hostname}/apis/batch/" , "v2alpha1", ssl_options: ssl_options)
35
36
 
36
37
  @clients.each { |c| c.discover }
37
38
  end
@@ -37,7 +37,7 @@ class Biosphere
37
37
  if settings
38
38
  c = @settings_hash ||= ::Hash.new
39
39
  c = DeepDup.deep_dup(c)
40
- c.deep_merge!(settings)
40
+ c.deep_merge!(settings, {:overwrite_arrays => true})
41
41
  @settings_hash = c
42
42
  end
43
43
  return @settings_hash
@@ -1,3 +1,3 @@
1
1
  class Biosphere
2
- Version = "0.1.7"
2
+ Version = "0.1.8"
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.1.7
4
+ version: 0.1.8
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-03-23 00:00:00.000000000 Z
11
+ date: 2017-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec