aggkit 0.4.8.16040 → 0.4.8.19389
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/bin/aggexec +1 -0
- data/lib/aggkit/consul.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e05fab4034523d27a1f4f391ba270cc7ae32ab4b03f0ec3ef0bb5cda97aa9fb
|
4
|
+
data.tar.gz: 0dcadea42472126b0ae32c3a59a8f06bb03f02e13d9a5583b7f72efeb6e091de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f0b421bc88b03ba308478bcb254bedeca5e05dec63cfaac6b0c0639ebc02ec83bf65137270099ca7f01adc1ddc9c92b841cc833ec30a4943faa331246b13ef9
|
7
|
+
data.tar.gz: 23d995a369826fe9dcc05a94eb32eeb437cebc9597d2af176df15693dab6211bde50f5d98c17e5660355322846e75419172d6e8dd6974907a94fda855ecedb1f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
aggkit (0.4.8.
|
4
|
+
aggkit (0.4.8.19389)
|
5
5
|
diplomat
|
6
6
|
dotenv
|
7
7
|
json
|
@@ -19,7 +19,7 @@ GEM
|
|
19
19
|
faraday (~> 0.9)
|
20
20
|
docile (1.3.1)
|
21
21
|
dotenv (2.7.5)
|
22
|
-
faraday (0.
|
22
|
+
faraday (0.17.0)
|
23
23
|
multipart-post (>= 1.2, < 3)
|
24
24
|
json (2.2.0)
|
25
25
|
multipart-post (2.1.1)
|
data/bin/aggexec
CHANGED
data/lib/aggkit/consul.rb
CHANGED
@@ -72,6 +72,22 @@ module Aggkit
|
|
72
72
|
Aggkit::Exec.execute!(cmd, "envsubst failed: #{cmd}")
|
73
73
|
end
|
74
74
|
|
75
|
+
def erb(*paths)
|
76
|
+
paths = paths.flatten.map{|c| c.to_s.strip }.reject(&:empty?)
|
77
|
+
paths.each do |path|
|
78
|
+
Dir.glob("#{path}/**/*.erb") do |templ|
|
79
|
+
erb_file(templ, templ.sub(/\.erb$/, ''))
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def erb_file(templ, output=nil)
|
85
|
+
output ||= templ.sub(/\.erb$/, '')
|
86
|
+
Aggkit::Exec.die('filename must ends with .erb or output must be provided') if output.strip == templ.strip
|
87
|
+
cmd = "erb '#{templ}' > '#{output}'"
|
88
|
+
Aggkit::Exec.execute!(cmd, "erb failed: #{cmd}")
|
89
|
+
end
|
90
|
+
|
75
91
|
extend ::Aggkit::Consul
|
76
92
|
|
77
93
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aggkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.8.
|
4
|
+
version: 0.4.8.19389
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Godko Ivan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diplomat
|