mofa 0.5.10 → 0.5.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.ruby-version +1 -0
- data/lib/mofa/attributes_map.rb +8 -2
- data/lib/mofa/cmd_line_args.rb +25 -0
- data/lib/mofa/version.rb +1 -1
- data/mofa.gemspec +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53a589ffb32931662ca28a41fbd8081a4471db52287d6b792a1033b64221803e
|
4
|
+
data.tar.gz: 50920386da52fabe51ce55bf1dd4144ad49d9f7d26679d9d592da3ca1e9dca36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0aea4b5658276cfdae1bd83f72bbc705ea80b43bc87a15168d08f553912d1629c2a533bfb99895ef6d917420b728c5dfefa6ce391a7882627c5d0c373f7cd3d
|
7
|
+
data.tar.gz: ed15e04c4eabebfc08c66e303bb112f8757543ea3c5ec8c3cd5f9184a9b5715d6a1607205a8a5b172462b967da9be51b0b4211f71a52709ce8ec5ff4c650f225
|
data/.gitignore
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.6.6
|
data/lib/mofa/attributes_map.rb
CHANGED
@@ -47,10 +47,16 @@ class AttributesMap
|
|
47
47
|
elsif value.is_a?(Array)
|
48
48
|
new_attr_hash[key] = []
|
49
49
|
value.each do |value_item|
|
50
|
-
|
50
|
+
if value_item.is_a?(Hash)
|
51
|
+
new_attr_hash[key] = deep_parse(value, placeholder, content)
|
52
|
+
else
|
53
|
+
new_attr_hash[key].push(value_item.gsub(Regexp.new(Regexp.escape(placeholder)), content))
|
54
|
+
end
|
51
55
|
end
|
52
56
|
else
|
53
|
-
|
57
|
+
if value
|
58
|
+
new_attr_hash[key] = value.gsub(Regexp.new(Regexp.escape(placeholder)), content)
|
59
|
+
end
|
54
60
|
end
|
55
61
|
end
|
56
62
|
new_attr_hash
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Mofa
|
2
|
+
class CmdLineArgs
|
3
|
+
def self.instance
|
4
|
+
@__instance__ ||= new
|
5
|
+
end
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
@cmd_line_args = {}
|
9
|
+
end
|
10
|
+
|
11
|
+
def register(cmd_line_args)
|
12
|
+
@cmd_line_args = cmd_line_args
|
13
|
+
end
|
14
|
+
|
15
|
+
def get(key)
|
16
|
+
raise "Cmd Line Arg with key #{key} does not exist!" unless @cmd_line_args.key?(key)
|
17
|
+
@cmd_line_args[key]
|
18
|
+
end
|
19
|
+
|
20
|
+
def list
|
21
|
+
puts 'Comman Line Args:'
|
22
|
+
@cmd_line_args.inspect
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/mofa/version.rb
CHANGED
data/mofa.gemspec
CHANGED
@@ -19,6 +19,8 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_development_dependency "guard-minitest"
|
20
20
|
s.add_development_dependency "rake"
|
21
21
|
s.add_runtime_dependency "thor"
|
22
|
+
# s.add_runtime_dependency "ed25519"
|
23
|
+
# s.add_runtime_dependency "bcrypt_pbkdf"
|
22
24
|
s.add_runtime_dependency "json"
|
23
25
|
s.add_runtime_dependency "rest-client"
|
24
26
|
s.add_runtime_dependency "net-ssh"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mofa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Birk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -202,6 +202,7 @@ extra_rdoc_files: []
|
|
202
202
|
files:
|
203
203
|
- ".gitignore"
|
204
204
|
- ".rubocop.yml"
|
205
|
+
- ".ruby-version"
|
205
206
|
- ".travis.yml"
|
206
207
|
- Gemfile
|
207
208
|
- Guardfile
|
@@ -213,6 +214,7 @@ files:
|
|
213
214
|
- lib/mofa.rb
|
214
215
|
- lib/mofa/attributes_map.rb
|
215
216
|
- lib/mofa/cli.rb
|
217
|
+
- lib/mofa/cmd_line_args.rb
|
216
218
|
- lib/mofa/config.rb
|
217
219
|
- lib/mofa/cookbook.rb
|
218
220
|
- lib/mofa/hostlist.rb
|