gazer 0.2.46 → 0.2.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gzr/command.rb +1 -1
- data/lib/gzr/commands/dashboard/cat.rb +6 -1
- data/lib/gzr/commands/dashboard.rb +2 -0
- data/lib/gzr/commands/look/cat.rb +6 -1
- data/lib/gzr/commands/look.rb +2 -0
- data/lib/gzr/commands/role/rm.rb +1 -1
- data/lib/gzr/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: 5a9c980a1d02c9b7ce81438cdc4144e5abcb87e3a5744064df289a2883265e35
|
4
|
+
data.tar.gz: 68e52dd8c3d5b17be2b42dfff4c9b13d9c3ca4fb887d088c563df64146760392
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42859e3f3a753bbdd3f038ed51ba121ab3bd2c1113dac0d8e6ff5e3e9866a503565b4da3399896f424869fdc4af6a93afcc73596e467448af5bbd614bce3ffcd
|
7
|
+
data.tar.gz: 0b60f0f41277a7d67003f84f215c460e995a08f6b768f1c40ae53c111a474961fe83deee2ca2d9fbed7621da7cb1d045b67bc578a3bcc93ecb848977657ca3bf
|
data/Gemfile.lock
CHANGED
data/lib/gzr/command.rb
CHANGED
@@ -117,7 +117,12 @@ module Gzr
|
|
117
117
|
outputJSON.gsub! k,v
|
118
118
|
end
|
119
119
|
|
120
|
-
|
120
|
+
file_name = if @options[:dir]
|
121
|
+
@options[:simple_filename] ? "Dashboard_#{data[:id]}.json" : "Dashboard_#{data[:id]}_#{data[:title]}.json"
|
122
|
+
else
|
123
|
+
nil
|
124
|
+
end
|
125
|
+
write_file(file_name, @options[:dir], nil, output) do |f|
|
121
126
|
f.puts outputJSON
|
122
127
|
end
|
123
128
|
end
|
@@ -52,6 +52,8 @@ module Gzr
|
|
52
52
|
desc: 'Include scheduled plans'
|
53
53
|
method_option :transform, type: :string,
|
54
54
|
desc: 'Fully-qualified path to a JSON file describing the transformations to apply'
|
55
|
+
method_option :simple_filename, type: :boolean,
|
56
|
+
desc: 'Use simple filename for output (Dashboard_<id>.json)'
|
55
57
|
def cat(dashboard_id)
|
56
58
|
if options[:help]
|
57
59
|
invoke :help, ['cat']
|
@@ -50,7 +50,12 @@ module Gzr
|
|
50
50
|
end
|
51
51
|
|
52
52
|
data[:scheduled_plans] = query_scheduled_plans_for_look(@look_id,"all").to_attrs if @options[:plans]
|
53
|
-
|
53
|
+
file_name = if @options[:dir]
|
54
|
+
@options[:simple_filename] ? "Look_#{data[:id]}.json" : "Look_#{data[:id]}_#{data[:title]}.json"
|
55
|
+
else
|
56
|
+
nil
|
57
|
+
end
|
58
|
+
write_file(file_name, @options[:dir],nil, output) do |f|
|
54
59
|
f.puts JSON.pretty_generate(data)
|
55
60
|
end
|
56
61
|
end
|
data/lib/gzr/commands/look.rb
CHANGED
@@ -82,6 +82,8 @@ module Gzr
|
|
82
82
|
desc: 'Directory to store output file'
|
83
83
|
method_option :plans, type: :boolean,
|
84
84
|
desc: 'Include scheduled plans'
|
85
|
+
method_option :simple_filename, type: :boolean,
|
86
|
+
desc: 'Use simple filename for output (Look_<id>.json)'
|
85
87
|
def cat(look_id)
|
86
88
|
if options[:help]
|
87
89
|
invoke :help, ['cat']
|
data/lib/gzr/commands/role/rm.rb
CHANGED
data/lib/gzr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gazer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.47
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike DeAngelo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-reader
|