kerby 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/kerby.gemspec +1 -1
- data/lib/kerby/cli.rb +23 -0
- data/lib/kerby/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38207e6b1e4cffa49440e9f0b230a0342904ef5b128dabf21801e54f52397b08
|
4
|
+
data.tar.gz: 5677eda9319e01c30d18cf5212564a1987d67f469a98d8d740a5379c726702d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82d0570971a2f823172986dced27d93f69789084c5d6ec6dfad0ec1515a403df65a7228b2c90d37172643a149c20dd55833243e84a8575656e367226997bf5ec
|
7
|
+
data.tar.gz: a150f396e636b8464715705ef771424f6c86d25be23fe78c6fdff24aa1c0808a34bb22d2ce4e7705fc49399ffce86e293918b5a11ef42bcdfca564d093d12344
|
data/README.md
CHANGED
data/kerby.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
|
9
9
|
spec.summary = %q{Kubernetes ERB support on Yaml manifest files.}
|
10
10
|
spec.description = %q{Kubernetes ERB support on Yaml manifest files.}
|
11
|
-
spec.homepage = "https://github.com/maedadev"
|
11
|
+
spec.homepage = "https://github.com/maedadev/kerby"
|
12
12
|
spec.license = "MIT"
|
13
13
|
|
14
14
|
# Specify which files should be added to the gem when it is released.
|
data/lib/kerby/cli.rb
CHANGED
@@ -42,6 +42,13 @@ module Kerby
|
|
42
42
|
private
|
43
43
|
|
44
44
|
# k8s include directive
|
45
|
+
#
|
46
|
+
# For example, <%= k8s_include('base/namespace') %> in manifest file will
|
47
|
+
# include 'base/namespace.yml' file.
|
48
|
+
#
|
49
|
+
# The path is relative to the current (sometimes partial) manifest file.
|
50
|
+
#
|
51
|
+
# @!visibility public
|
45
52
|
def k8s_include(path)
|
46
53
|
ERB.new(File.read(Pathname(@_curr_file).dirname + (path + '.yml'))).result(binding)
|
47
54
|
end
|
@@ -65,6 +72,20 @@ module Kerby
|
|
65
72
|
end
|
66
73
|
|
67
74
|
# return node_yaml value for the key.
|
75
|
+
#
|
76
|
+
# For example, command execution:
|
77
|
+
#
|
78
|
+
# $ kerby build --node_yaml staging-node.yml manifest.yml
|
79
|
+
#
|
80
|
+
# and stageing-node.yml contains:
|
81
|
+
#
|
82
|
+
# app:
|
83
|
+
# namespace: city-A
|
84
|
+
#
|
85
|
+
# Then, <%= k8s_node('app.namespace') %> in manifest.yml will be
|
86
|
+
# generated to 'city-A'.
|
87
|
+
#
|
88
|
+
# @!visibility public
|
68
89
|
def k8s_node(key)
|
69
90
|
k8s_node_sub(@_k8s_node, key, key)
|
70
91
|
end
|
@@ -83,6 +104,8 @@ module Kerby
|
|
83
104
|
end
|
84
105
|
|
85
106
|
# k8s_include with YAML indent
|
107
|
+
#
|
108
|
+
# @!visibility public
|
86
109
|
def k8s_config_map(path)
|
87
110
|
"|\n" +
|
88
111
|
ERB.new(File.read(Pathname(@_curr_file).dirname + path)).result(binding).split("\n").map do |line|
|
data/lib/kerby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kerby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ido
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -75,7 +75,7 @@ files:
|
|
75
75
|
- lib/kerby.rb
|
76
76
|
- lib/kerby/cli.rb
|
77
77
|
- lib/kerby/version.rb
|
78
|
-
homepage: https://github.com/maedadev
|
78
|
+
homepage: https://github.com/maedadev/kerby
|
79
79
|
licenses:
|
80
80
|
- MIT
|
81
81
|
metadata: {}
|