pleme 0.0.31 → 0.0.39

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: 438e4c621a4b321634b9eae7a2e84479f8a32889
4
- data.tar.gz: 06ec46a86bfb328d5771c2237acb17b5ee19aa50
3
+ metadata.gz: fbf5e9bd2a833c570ce5db41806ae6d6bd823ae4
4
+ data.tar.gz: 54a9fd0bade6b9a6f360bfbeb6f1665403603137
5
5
  SHA512:
6
- metadata.gz: 8ecacb0cb977771403a04f103ac1d4bdf49862b2b134b943256a695a22d565c2d03a989290be162eb312a12f89f238fe8769b5cedc5f39348ee8702543b0223e
7
- data.tar.gz: ebc59954447ec9b1c6e416a833ba576c93e0da77d5e6e3234cf6a85add16027395f7deff81802a41d33733e2d8f4218c3502942700d4b30b80bb2725ac8b5dd0
6
+ metadata.gz: cd48b3fa3ad16023509ec462378da75c3313588eca0128bf4d007d142c0eb98a1336f1a931905c585c9a07251f39f5c8fa2ac33a8f860c1ec1c10d44093e1839
7
+ data.tar.gz: 11137276d371ce5ab4ed0679ff7a1519c83f41379fa75989f964ea4ac1cad140effa4d0327bc175fec705e85b408db02cf8dea027c58f806d73895b33caa6c63
@@ -0,0 +1,10 @@
1
+ ---
2
+ version: '3.7'
3
+ services:
4
+ mongo:
5
+ image: mongo
6
+ graphql:
7
+ build:
8
+ dockerfile: "../lilitu/Dockerfile"
9
+ context: "."
10
+ target: graphql
@@ -19,7 +19,7 @@ class Cli
19
19
  pleme plan
20
20
  pleme apply
21
21
  pleme destroy
22
- pleme compose up
22
+ pleme compose up [-d]
23
23
  pleme compose down
24
24
  pleme compose build
25
25
  DOCOPT
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Pleme
4
4
  module Gem
5
- VERSION = '0.0.31'
5
+ VERSION = '0.0.39'
6
6
  end
7
7
  end
@@ -27,7 +27,7 @@ class Runner
27
27
  # pipe hash to yaml without
28
28
  # weird symbol issues
29
29
  def yamilify(rhash)
30
- YAML.safe_load(rhash.to_json).to_yaml
30
+ JSON.parse(rhash.to_json).to_yaml
31
31
  end
32
32
 
33
33
  def run(spec)
@@ -36,11 +36,7 @@ class Runner
36
36
  @spec = spec if @spec.nil?
37
37
  dotfiles(spec) if spec[:dotfiles]
38
38
 
39
- if spec[:compose]
40
- compose(:up) if spec[:up]
41
- compose(:down) if spec[:down]
42
- compose(:build) if spec[:build]
43
- end
39
+ compose if spec[:compose]
44
40
  end
45
41
 
46
42
  def read_config
@@ -52,16 +48,15 @@ class Runner
52
48
  hax_portal
53
49
  end
54
50
 
55
- def compose(direction)
51
+ def compose
56
52
  config = read_config
57
53
  $logger.info config
58
54
  config[:pleme][:environment].keys.each do |env|
59
55
  config[:pleme][:environment][env].keys.each do |param|
60
56
  case param
61
57
  when :compose
62
- $logger.info env
63
58
  File.write('docker-compose.yml', yamilify(config[:pleme][:environment][env][:compose]))
64
- sh "docker-compose #{direction}"
59
+ sh "docker-compose #{ARGV[1..-1].join(' ')}"
65
60
  end
66
61
  end
67
62
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ ####################################################
4
+ # basic resource schema
5
+ ####################################################
6
+ # pleme :resource_type, :resource_virtual_name do
7
+ # params
8
+ # end
9
+ ####################################################
10
+
11
+ pleme :environment, :dev do
12
+ app :lilitu
13
+ infra resource: :new
14
+ compose version: '3.7',
15
+ services: {
16
+ mongo: { image: 'mongo' },
17
+ graphql: {
18
+ build: {
19
+ dockerfile: '../lilitu/Dockerfile',
20
+ context: '.',
21
+ target: 'graphql'
22
+ }
23
+ }
24
+ }
25
+ end
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.31
4
+ version: 0.0.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -99,6 +99,7 @@ files:
99
99
  - README.md
100
100
  - Rakefile
101
101
  - bin/pleme
102
+ - docker-compose.yml
102
103
  - init.sh
103
104
  - lib/pleme.rb
104
105
  - lib/pleme/abstract_translator.rb
@@ -110,6 +111,7 @@ files:
110
111
  - lib/pleme/runner.rb
111
112
  - pkg/ltk-gem-0.0.1.gem
112
113
  - pleme.gemspec
114
+ - plemec.rb
113
115
  - scripts/init.sh
114
116
  - spec/version_spec.rb
115
117
  homepage: https://github.com/luisfelipemourapereira/pleme