eac_ruby_utils 0.42.0 → 0.43.0
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 +4 -4
- data/lib/eac_ruby_utils/console/docopt_runner/_class_methods.rb +1 -1
- data/lib/eac_ruby_utils/envs/ssh_env/identity_file.rb +2 -0
- data/lib/eac_ruby_utils/envs/ssh_env/quiet.rb +2 -0
- data/lib/eac_ruby_utils/envs/ssh_env/terminal.rb +2 -0
- data/lib/eac_ruby_utils/listable/list.rb +5 -0
- data/lib/eac_ruby_utils/require_sub.rb +8 -8
- data/lib/eac_ruby_utils/version.rb +1 -1
- 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: 17c2233b153a30506d6d62a3e8d89e35b9233d9ddb7043a4641a52ee214c2382
|
|
4
|
+
data.tar.gz: 7369e5d33ca13dd1827371d8fb257bf3ddab56bcd0a12b997eb6835349a94d61
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afc7ada9f7bd0f0c260d058db8d755d6778fa8d76e4dd549e8a0b7d6b6aac755ff18229da447bb2d8a6cac831b8d4a9c7585755fe16ed03ef6214653ee7b3f85
|
|
7
|
+
data.tar.gz: 4f227e60bcf60d4598a15cb4b8748696a602d3490d282e0ae2b4ca5546eb8161e4b011f22ab8647b39409a6bf5fb8055f78f4b6373c41e57c6351821274bfe1d
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'active_support/concern'
|
|
4
|
+
require 'eac_ruby_utils/envs/ssh_env/dasho_options'
|
|
4
5
|
require 'eac_ruby_utils/listable'
|
|
5
6
|
require 'eac_ruby_utils/patches/object/if_present'
|
|
6
7
|
|
|
@@ -11,6 +12,7 @@ module EacRubyUtils
|
|
|
11
12
|
extend ::ActiveSupport::Concern
|
|
12
13
|
|
|
13
14
|
included do
|
|
15
|
+
include ::EacRubyUtils::Envs::SshEnv::DashoOptions
|
|
14
16
|
add_nodasho_option('IdentityFile')
|
|
15
17
|
end
|
|
16
18
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require 'active_support/concern'
|
|
4
4
|
require 'eac_ruby_utils/boolean'
|
|
5
|
+
require 'eac_ruby_utils/envs/ssh_env/dasho_options'
|
|
5
6
|
|
|
6
7
|
module EacRubyUtils
|
|
7
8
|
module Envs
|
|
@@ -10,6 +11,7 @@ module EacRubyUtils
|
|
|
10
11
|
extend ::ActiveSupport::Concern
|
|
11
12
|
|
|
12
13
|
included do
|
|
14
|
+
include ::EacRubyUtils::Envs::SshEnv::DashoOptions
|
|
13
15
|
add_nodasho_option('Quiet')
|
|
14
16
|
end
|
|
15
17
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'active_support/concern'
|
|
4
|
+
require 'eac_ruby_utils/envs/ssh_env/dasho_options'
|
|
4
5
|
require 'eac_ruby_utils/listable'
|
|
5
6
|
require 'eac_ruby_utils/patches/object/if_present'
|
|
6
7
|
|
|
@@ -11,6 +12,7 @@ module EacRubyUtils
|
|
|
11
12
|
extend ::ActiveSupport::Concern
|
|
12
13
|
|
|
13
14
|
included do
|
|
15
|
+
include ::EacRubyUtils::Envs::SshEnv::DashoOptions
|
|
14
16
|
add_nodasho_option('Terminal')
|
|
15
17
|
include ::EacRubyUtils::Listable
|
|
16
18
|
lists.add_string :terminal_option, :auto, :disable, :enable, :force
|
|
@@ -33,6 +33,11 @@ module EacRubyUtils
|
|
|
33
33
|
find_list_by_method(name) || super
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
def hash_keys_validate!(hash, error_class = ::StandardError)
|
|
37
|
+
hash.keys.each { |key| value_validate!(key, error_class) }
|
|
38
|
+
hash
|
|
39
|
+
end
|
|
40
|
+
|
|
36
41
|
def i18n_key
|
|
37
42
|
"eac_ruby_utils.listable.#{class_i18n_key}.#{item}"
|
|
38
43
|
end
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'active_support/inflector'
|
|
4
|
+
require 'eac_ruby_utils/listable'
|
|
4
5
|
|
|
5
6
|
module EacRubyUtils
|
|
6
7
|
class << self
|
|
@@ -10,15 +11,14 @@ module EacRubyUtils
|
|
|
10
11
|
end
|
|
11
12
|
|
|
12
13
|
class RequireSub
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
REQUIRE_DEPENDENCY_OPTION_KEY = :require_dependency
|
|
14
|
+
include ::EacRubyUtils::Listable
|
|
15
|
+
lists.add_symbol :option, :base, :include_modules, :require_dependency
|
|
16
16
|
|
|
17
17
|
attr_reader :file, :options
|
|
18
18
|
|
|
19
19
|
def initialize(file, options = {})
|
|
20
20
|
@file = file
|
|
21
|
-
@options = options
|
|
21
|
+
@options = self.class.lists.option.hash_keys_validate!(options)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def apply
|
|
@@ -29,7 +29,7 @@ module EacRubyUtils
|
|
|
29
29
|
private
|
|
30
30
|
|
|
31
31
|
def active_support_require(path)
|
|
32
|
-
return false unless options[
|
|
32
|
+
return false unless options[OPTION_REQUIRE_DEPENDENCY]
|
|
33
33
|
|
|
34
34
|
::Kernel.require_dependency(path)
|
|
35
35
|
true
|
|
@@ -46,7 +46,7 @@ module EacRubyUtils
|
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def include_modules
|
|
49
|
-
return unless options[
|
|
49
|
+
return unless options[OPTION_INCLUDE_MODULES]
|
|
50
50
|
|
|
51
51
|
base.constants.each do |constant_name|
|
|
52
52
|
constant = base.const_get(constant_name)
|
|
@@ -57,11 +57,11 @@ module EacRubyUtils
|
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
def base
|
|
60
|
-
options[
|
|
60
|
+
options[OPTION_BASE] || raise('Option :base not setted')
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def base?
|
|
64
|
-
options[
|
|
64
|
+
options[OPTION_BASE] ? true : false
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
def kernel_require(path)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eac_ruby_utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.43.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Esquilo Azul Company
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-07-
|
|
11
|
+
date: 2020-07-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|