pleme 0.0.15 → 0.0.16

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
  SHA256:
3
- metadata.gz: cf49db1f16a1e9cd8c73e8258c13219fee43c1e1e45013fb2cb30c0ed22624b0
4
- data.tar.gz: 7a34974af4eb35d01d27ef84b29266b252b0100ab2cd1d0111e5e450be249870
3
+ metadata.gz: b013cdf6c10af149e53aed54c879fe0ef7468593d9ac0ee7e91e7859966fdc43
4
+ data.tar.gz: '0613775845b7d3d923ebf1240384d31846eebe8d94df5b9ba3187c0598a99276'
5
5
  SHA512:
6
- metadata.gz: f0288fccc3f89e23dd78734f4db2a5e9bdbc6de4925a52f8111d83ebbcdf95dfa64fce7cfb75038a1c2d01b93ab7b0a7d3bef22236d116afefbe07dd4ab48418
7
- data.tar.gz: 23712c96d50c7eb84a595bfa1bc00baf179a74210c60951d227f0f0e0432eb68d75a47040d53b4d89b07dfb056f57f429556de9b068b2693ebbb82a95351068a
6
+ metadata.gz: d8eb802df52e817f28ef1ccb6a9f3974f6df96aa3d8735e0bfdda28c2d7409002adc7681d2c04a7163a5501c345fae3b1762628081e576e34fe9fff6124fdb3c
7
+ data.tar.gz: 8c5f21ffcf5f699b6d31580604173ba99cd3b649183c11f47a7919fa60394d6f666478f730ebb24c8558663e0cdbe4cbe4d91183688ab5dd563f502cd97e520b
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Pleme
4
4
  module Gem
5
- VERSION = '0.0.15'
5
+ VERSION = '0.0.16'
6
6
  end
7
7
  end
@@ -11,9 +11,9 @@ require 'json'
11
11
 
12
12
  class Runner
13
13
  def initialize
14
- @translator = PlemecTranslator.new
15
- @spec = nil
16
- @config_path = 'plemec.rb'
14
+ @config_path = 'plemec.rb'
15
+ @translator = PlemecTranslator.new
16
+ @spec = nil
17
17
  end
18
18
 
19
19
  # run a shell command
@@ -38,17 +38,13 @@ class Runner
38
38
 
39
39
  def read_config
40
40
  @translator.eval_in_context(File.read(@config_path))
41
- @translator.inspect
41
+ @translator.translation.inspect
42
42
  end
43
43
 
44
44
  def dotfiles(_spec)
45
45
  hax_portal
46
46
  end
47
47
 
48
- def docker_compose(cwd = :cache)
49
- sh "mkdir -p #{cwd}" unless Dir.exist?(cwd)
50
- end
51
-
52
48
  # shell interface for docker-compose
53
49
  def dc(cmd, cwd = :cache)
54
50
  cmd = "cd #{cwd} && docker-compose #{cmd}"
@@ -58,7 +54,7 @@ class Runner
58
54
 
59
55
  # shell interface for terraform
60
56
  def tf(cmd, cwd = :cache)
61
- sh "mkdir -p #{cwd}" unless Dir.exist?(cwd)
57
+ sh "mkdir -p #{cwd}" unless Dir.exist?(cwd.to_s)
62
58
  cmd = "cd #{cwd} && terraform #{cmd}"
63
59
  @translator.eval_in_context(File.read(@config_path))
64
60
  sh cmd
@@ -68,19 +64,19 @@ class Runner
68
64
  def apply(_spec)
69
65
  config = read_config
70
66
  puts config
71
- # config[:pleme].keys.each do |pkey|
72
- # pkey = pkey.to_sym if pkey.instance_of?(String)
73
- # case pkey
74
- # when :compose
75
- # @translator.inspect[:pleme][:environment].keys.each do |env|
76
- # File.write(
77
- # yamilify(config[:pleme][:environment][env][:compose]),
78
- # File.join(cwd, 'docker-compose.yml')
79
- # )
80
- # dc 'up'
81
- # end
82
- # end
83
- # end
67
+ config[:pleme].keys.each do |pkey|
68
+ pkey = pkey.to_sym if pkey.instance_of?(String)
69
+ case pkey
70
+ when :compose
71
+ @translator.inspect[:pleme][:environment].keys.each do |env|
72
+ File.write(
73
+ yamilify(config[:pleme][:environment][env][:compose]),
74
+ File.join(cwd, 'docker-compose.yml')
75
+ )
76
+ dc 'up'
77
+ end
78
+ end
79
+ end
84
80
  end
85
81
 
86
82
  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.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''