pleme 0.0.27 → 0.0.28

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: b41b0b123600076d03a61f6ada1d7d80be94b69e099137df9ff2b0dae6824d78
4
- data.tar.gz: 91673740cee7f32dca6175d2084937aa33b6a621dcdff77cb7b45a10d157bcc4
3
+ metadata.gz: ed3486742f359ccebe27c200b173b50785e1b9788f047923bc7569edc1ddde38
4
+ data.tar.gz: efdab6a5c78ba8aed53af100defd9165f8f4b9b930d2c902e5f9e31e651b366b
5
5
  SHA512:
6
- metadata.gz: c804bf3db7dc4aa718cfd4b9f8d7fe1298b450fb5b75140aa57dbf6a073845e2b80613e0442e489b5707b25e2a47ea2a4e86302f4beb1d5dbdf9690f420d2b7c
7
- data.tar.gz: a6e082a20a64bfa15aa60d26c4ec7f7d5d1857c2fa6e0a706661f1cea3eb88ec78193f32d8de6b0ae604ed68c5dad57bb66cfa7e46b9c4f34f47a96e8fe0d4f0
6
+ metadata.gz: 3673089ffaa70081cb3b9bc14cd6e0249380bd7bf7683c5ca650861a2eab0e73469f0ddfb505c3ee418b576e53666b4c6019044e2767edfa4b0b992061f3ca77
7
+ data.tar.gz: be6685acbe6366aef4d45a8e09c417a188612246491dfeca41ac439e00f98b36c1a6b1c109fa75dbee6699a01c4eb497a457a5db7dc8d72f6da30efa35d28bfd
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Pleme
4
4
  module Gem
5
- VERSION = '0.0.27'
5
+ VERSION = '0.0.28'
6
6
  end
7
7
  end
@@ -35,11 +35,11 @@ class Runner
35
35
 
36
36
  @spec = spec if @spec.nil?
37
37
  dotfiles(spec) if spec[:dotfiles]
38
- destroy(spec) if spec[:destroy]
39
- apply(spec) if spec[:apply]
40
- plan(spec) if spec[:plan]
41
38
 
42
- $logger.info spec if spec[:compose]
39
+ if spec[:compose]
40
+ compose(:up) if spec[:up]
41
+ compose(:down) if spec[:down]
42
+ end
43
43
  end
44
44
 
45
45
  def read_config
@@ -51,24 +51,7 @@ class Runner
51
51
  hax_portal
52
52
  end
53
53
 
54
- # shell interface for docker-compose
55
- def dc(cmd, cwd = :cache)
56
- cmd = "cd #{cwd} && docker-compose #{cmd}"
57
- sh "mkdir -p #{cwd}" unless Dir.exist?(cwd)
58
- sh cmd
59
- end
60
-
61
- # shell interface for terraform
62
- def tf(cmd, cwd = :cache)
63
- sh "mkdir -p #{cwd}" unless Dir.exist?(cwd.to_s)
64
- cmd = "cd #{cwd} && terraform #{cmd}"
65
- @translator.eval_in_context(File.read(@config_path))
66
- sh cmd
67
- sh "rm -rf #{File.join(cmd, 'template.json')}"
68
- end
69
-
70
- def apply(_spec)
71
- cwd = :cache
54
+ def compose(direction)
72
55
  config = read_config
73
56
  $logger.info config
74
57
  config[:pleme][:environment].keys.each do |env|
@@ -76,21 +59,13 @@ class Runner
76
59
  case param
77
60
  when :compose
78
61
  $logger.info env
79
- File.write(yamilify(config[:pleme][:environment][env][:compose]), File.join(cwd, 'docker-compose.yml'))
80
- sh 'cd cache && docker-compose up'
62
+ File.write(yamilify(config[:pleme][:environment][env][:compose]), 'docker-compose.yml')
63
+ sh "docker-compose #{direction}"
81
64
  end
82
65
  end
83
66
  end
84
67
  end
85
68
 
86
- # def plan(_spec)
87
- # tf 'plan'
88
- # end
89
-
90
- # def destroy(_spec)
91
- # tf 'destroy'
92
- # end
93
-
94
69
  # read a local file into this space
95
70
  # so you can test locally while importing
96
71
  # good code to this class
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.27
4
+ version: 0.0.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''