eac_cli 0.41.0 → 0.42.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eac_cli/runner_with/output_list/base_formatter.rb +11 -0
- data/lib/eac_cli/runner_with/output_list/csv_formatter.rb +1 -1
- data/lib/eac_cli/runner_with/output_list/tty_formatter.rb +1 -1
- data/lib/eac_cli/runner_with/output_list/yaml_formatter.rb +1 -1
- data/lib/eac_cli/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37dc288478a862aec6a0c885cdc8a36a61b25c706ee3da6b448985a3bcbf1286
|
4
|
+
data.tar.gz: 66c5be70d7e1ef6ee34c35e308f5d7356b0551289301a506675e61f1048bf279
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 347342aa9fe0242a27aaf02fc209709e924a62fea1dcb452ddaae22ed186c01f59c0ec7b4bc0d9ad112b95618d563e5e4b636b4460385716ec8100ae3e72fd72
|
7
|
+
data.tar.gz: 5290b28584f6e1d139a89a5be84180877cf3356b0726593bf7e858192840ae494370a3b8fde58a7ca99a4984dec5df85564072a409fb2f1d84177b1a8d36f2b2
|
@@ -30,6 +30,17 @@ module EacCli
|
|
30
30
|
def build_rows
|
31
31
|
rows.map { |row| build_row(row) }
|
32
32
|
end
|
33
|
+
|
34
|
+
# @param row [Object]
|
35
|
+
# @param column [String]
|
36
|
+
# @return [Object]
|
37
|
+
def build_value(row, column)
|
38
|
+
return row.send(column) if row.respond_to?(column)
|
39
|
+
return row.with_indifferent_access.fetch(column) if row.is_a?(::Hash)
|
40
|
+
|
41
|
+
raise ::ArgumentError, "Row \"#{row}\" do not respond to column \"#{column}\" neither " \
|
42
|
+
"is a Hash (Row: #{row}, Column: #{column})"
|
43
|
+
end
|
33
44
|
end
|
34
45
|
end
|
35
46
|
end
|
@@ -10,7 +10,7 @@ module EacCli
|
|
10
10
|
class YamlFormatter < ::EacCli::RunnerWith::OutputList::BaseFormatter
|
11
11
|
# @return [Hash<String, String>]
|
12
12
|
def build_row(row)
|
13
|
-
build_columns.inject({}) { |a, e| a.merge(e => row
|
13
|
+
build_columns.inject({}) { |a, e| a.merge(e => build_value(row, e).to_s) }
|
14
14
|
end
|
15
15
|
|
16
16
|
# @return [String]
|
data/lib/eac_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.42.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: 2024-
|
11
|
+
date: 2024-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -56,14 +56,14 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: '0.
|
59
|
+
version: '0.122'
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
64
|
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '0.
|
66
|
+
version: '0.122'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: tty-table
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|