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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 251a634b14b510bd82968c48565ae7a8141b24493420a179ca3f9c77286dd580
4
- data.tar.gz: c7cb15e3e79de88d14e63cd96532a690e2238682354473cb95537af0e2d29b57
3
+ metadata.gz: 53a589ffb32931662ca28a41fbd8081a4471db52287d6b792a1033b64221803e
4
+ data.tar.gz: 50920386da52fabe51ce55bf1dd4144ad49d9f7d26679d9d592da3ca1e9dca36
5
5
  SHA512:
6
- metadata.gz: ead33bbc0b4347cf748b841c0882cdc3ff232bb9149cb49567105e33b177ea2bc3505c4ecca2c22da890452809926f1ade2ff56c4b07e59ae493241b3c10919a
7
- data.tar.gz: 894920014cf4622571fd32b5a56edb21f7b64776f00d3e88c7864b71e7d7309918bb2be7e1a6ec8159884e5b531b5a2f7e8ca9c0a9362c5a8ce92f8768f95210
6
+ metadata.gz: d0aea4b5658276cfdae1bd83f72bbc705ea80b43bc87a15168d08f553912d1629c2a533bfb99895ef6d917420b728c5dfefa6ce391a7882627c5d0c373f7cd3d
7
+ data.tar.gz: ed15e04c4eabebfc08c66e303bb112f8757543ea3c5ec8c3cd5f9184a9b5715d6a1607205a8a5b172462b967da9be51b0b4211f71a52709ce8ec5ff4c650f225
data/.gitignore CHANGED
@@ -7,4 +7,6 @@ pkg/*
7
7
 
8
8
  example_hostlist.json
9
9
 
10
+ vendor/bundle
11
+
10
12
 
@@ -0,0 +1 @@
1
+ ruby-2.6.6
@@ -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
- new_attr_hash[key].push(value_item.gsub(Regexp.new(Regexp.escape(placeholder)), content))
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
- new_attr_hash[key] = value.gsub(Regexp.new(Regexp.escape(placeholder)), content)
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
@@ -1,3 +1,3 @@
1
1
  module Mofa
2
- VERSION = '0.5.10'
2
+ VERSION = '0.5.11'
3
3
  end
@@ -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.10
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-22 00:00:00.000000000 Z
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