gazer 0.2.46 → 0.2.47

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1111e80913b3cdb2b0649e59b963a0d656f19b84e6ccb523f20609f70d9dd068
4
- data.tar.gz: 4733f9a2ac19d708b91e5729e3b7a588344f63a8726dfb776444ac3ec297d9ad
3
+ metadata.gz: 5a9c980a1d02c9b7ce81438cdc4144e5abcb87e3a5744064df289a2883265e35
4
+ data.tar.gz: 68e52dd8c3d5b17be2b42dfff4c9b13d9c3ca4fb887d088c563df64146760392
5
5
  SHA512:
6
- metadata.gz: b296ce9ecb25983851508cda708c8ad2ded39834a63d2d4f1c00ce924311268fb6ce990ee9c4c2fd37d715dbe208472ceb1866539d456a585a09720305d584c2
7
- data.tar.gz: cb29a1df8bf6e02bc061c99ba33cb1746805b66d46edc777589c2112a5d7db837b953033c53a5547605216063aa3b0119a23f644b2f4e38ce1fc66452ffb48af
6
+ metadata.gz: 42859e3f3a753bbdd3f038ed51ba121ab3bd2c1113dac0d8e6ff5e3e9866a503565b4da3399896f424869fdc4af6a93afcc73596e467448af5bbd614bce3ffcd
7
+ data.tar.gz: 0b60f0f41277a7d67003f84f215c460e995a08f6b768f1c40ae53c111a474961fe83deee2ca2d9fbed7621da7cb1d045b67bc578a3bcc93ecb848977657ca3bf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gazer (0.2.46)
4
+ gazer (0.2.47)
5
5
  looker-sdk (~> 0.1.1)
6
6
  net-http-persistent (~> 4.0.1)
7
7
  netrc (~> 0.11.0)
data/lib/gzr/command.rb CHANGED
@@ -281,7 +281,7 @@ module Gzr
281
281
  # end
282
282
 
283
283
  def keys_to_keep(operation)
284
- o = @sdk.operations[operation]
284
+ o = @sdk.operations[operation] || @sdk.operations[operation.to_sym]
285
285
  begin
286
286
  say_error "Operation #{operation} not found"
287
287
  return []
@@ -117,7 +117,12 @@ module Gzr
117
117
  outputJSON.gsub! k,v
118
118
  end
119
119
 
120
- write_file(@options[:dir] ? "Dashboard_#{data[:id]}_#{data[:title]}.json" : nil, @options[:dir], nil, output) do |f|
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
- write_file(@options[:dir] ? "Look_#{data[:id]}_#{data[:title]}.json" : nil, @options[:dir],nil, output) do |f|
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
@@ -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']
@@ -38,7 +38,7 @@ module Gzr
38
38
  def execute(input: $stdin, output: $stdout)
39
39
  say_warning("options: #{@options.inspect}") if @options[:debug]
40
40
  with_session do
41
- delete_role(@plan_id)
41
+ delete_role(@role_id)
42
42
  end
43
43
  end
44
44
  end
data/lib/gzr/version.rb CHANGED
@@ -20,5 +20,5 @@
20
20
  # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
 
22
22
  module Gzr
23
- VERSION = "0.2.46"
23
+ VERSION = "0.2.47"
24
24
  end
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.46
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-04 00:00:00.000000000 Z
11
+ date: 2021-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-reader