pleme 0.0.13 → 0.0.14

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
  SHA256:
3
- metadata.gz: 3aa34c687cbb042f96d2da6a998cc8a78e9aea4d331c0dc8475b669f9c7f50a3
4
- data.tar.gz: 498ff439fd7a1861209f2c57c15f5017156466e7ce3294e872e87628447359e6
3
+ metadata.gz: 5cc10779a985a7a62ff7f57233212473988a76275b341138c99c733a03640f59
4
+ data.tar.gz: 59c8dbbf601c86df7a1d62af54b0f608172d127083e89be6d4c117f8deff3fc7
5
5
  SHA512:
6
- metadata.gz: 946508e84d1466b1374858076f3e520642d43ac176128d0d53105be2b10906abd1d9198efdb36e42850cd833e81698543b0a43606dc4c7363667bf6274a32470
7
- data.tar.gz: ee9305835a9683c8e922a806a3353fccaad2f3f9e077636078e2a4aaaee269a7209ba4bb1d57875e5d39ee2503d1ae121fa6eb2cc384ee9d4f3944c026e08738
6
+ metadata.gz: c2c4286ba39d96159eeb926c05747dfeaac3a2509349f0fb56f8cc807799f5d94806fed2e2879b9dc56835268edb188693ae128da984ed4a06530c25db3abd8e
7
+ data.tar.gz: 660bd24ead2916720f9204e4d3d911f8bac0d01766abef3bcf4d09551cac88fb89303a71fe7c8b0f2f5451d9346ad12ee5b671520ad3ffc1922c04db82bbebd1
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Pleme
4
4
  module Gem
5
- VERSION = '0.0.13'
5
+ VERSION = '0.0.14'
6
6
  end
7
7
  end
@@ -51,20 +51,8 @@ class Runner
51
51
 
52
52
  # shell interface for docker-compose
53
53
  def dc(cmd, cwd = :cache)
54
- sh "mkdir -p #{cwd}" unless Dir.exist?(cwd)
55
- @translator.eval_in_context(File.read(@config_path))
56
54
  cmd = "cd #{cwd} && docker-compose #{cmd}"
57
- @translator.inspect[:pleme].keys.each do |pkey|
58
- pkey = pkey.to_sym if pkey.instance_of?(String)
59
- next unless pkey.eql? :compose
60
-
61
- @translator.inspect[:pleme][:environment].keys.each do |env|
62
- File.write(
63
- yamilify(inspect[:pleme][:environment][env][:compose]),
64
- File.join(cwd, 'docker-compose.yml')
65
- )
66
- end
67
- end
55
+ sh "mkdir -p #{cwd}" unless Dir.exist?(cwd)
68
56
  sh cmd
69
57
  end
70
58
 
@@ -78,7 +66,20 @@ class Runner
78
66
  end
79
67
 
80
68
  def apply(_spec)
81
- tf 'apply'
69
+ config = read_config
70
+ config[:pleme].keys.each do |pkey|
71
+ pkey = pkey.to_sym if pkey.instance_of?(String)
72
+ case pkey
73
+ when :compose
74
+ @translator.inspect[:pleme][:environment].keys.each do |env|
75
+ File.write(
76
+ yamilify(config[:pleme][:environment][env][:compose]),
77
+ File.join(cwd, 'docker-compose.yml')
78
+ )
79
+ dc 'up'
80
+ end
81
+ end
82
+ end
82
83
  end
83
84
 
84
85
  def plan(_spec)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pleme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''