gazer 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +1 -1
- data/lib/gzr/commands/dashboard/import_lookml.rb +8 -1
- data/lib/gzr/commands/dashboard.rb +2 -0
- data/lib/gzr/modules/connection.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: 2ee219afcd17f3191d17c1f87ed6b6683beecc7210736fa9da4e5190bc9cab07
|
4
|
+
data.tar.gz: 6982e0ee5cb893d2ef81e23987e7fe26f729f8c33bd417195c0d226dff01e4a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e28feecde59cbe5d3dc3b0f0da26162bd057828d2e6c615cb0598ed834e2729770fa6d4fb1a2a2ffb7e4e80624adba886a1ef17aa7990df41f05baef8d84f5b
|
7
|
+
data.tar.gz: d5688042b3437473cec0caed7e3521e1b38f10d22fee304cabfb01052c36a03a88269c16bb7b4338f74e401b2cc7470e4e169fa4c346d6efcd487893f36fc015
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.3.7](https://github.com/looker-open-source/gzr/compare/v0.3.6...v0.3.7) (2023-05-10)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* option to sync lookml dashboard on import_lookml if it exists already ([#196](https://github.com/looker-open-source/gzr/issues/196)) ([c8ec619](https://github.com/looker-open-source/gzr/commit/c8ec619186c6a0ce81633d701f78444f4e488a5b))
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* Update connection calling wrong API method ([#197](https://github.com/looker-open-source/gzr/issues/197)) ([e122b47](https://github.com/looker-open-source/gzr/commit/e122b47fca9f2ff218cff0904c147cf94d54fe69))
|
14
|
+
|
3
15
|
## [0.3.6](https://github.com/looker-open-source/gzr/compare/v0.3.5...v0.3.6) (2023-05-09)
|
4
16
|
|
5
17
|
|
data/Gemfile.lock
CHANGED
@@ -49,12 +49,19 @@ module Gzr
|
|
49
49
|
matching_title = false
|
50
50
|
end
|
51
51
|
|
52
|
-
if matching_title
|
52
|
+
if matching_title && !(matching_title.first[:lookml_link_id] == @dashboard_id)
|
53
53
|
raise Gzr::CLI::Error, "Dashboard #{dash[:title]} already exists in folder #{@target_folder_id}\nUse --force if you want to overwrite it" unless @options[:force]
|
54
54
|
say_ok "Deleting existing dashboard #{matching_title.first[:id]} #{matching_title.first[:title]} in folder #{@target_folder_id}", output: output
|
55
55
|
update_dashboard(matching_title.first[:id],{:deleted=>true})
|
56
56
|
end
|
57
57
|
|
58
|
+
if matching_title && (matching_title.first[:lookml_link_id] == @dashboard_id)
|
59
|
+
raise Gzr::CLI::Error, "Linked Dashboard #{dash[:title]} already exists in folder #{@target_folder_id}\nUse --sync if you want to synchronize it" unless @options[:sync]
|
60
|
+
say_ok "Syncing existing dashboard #{matching_title.first[:id]} #{matching_title.first[:title]} in folder #{@target_folder_id}", output: output
|
61
|
+
output.puts sync_lookml_dashboard(@dashboard_id)
|
62
|
+
return
|
63
|
+
end
|
64
|
+
|
58
65
|
new_dash = import_lookml_dashboard(@dashboard_id,@target_folder_id)
|
59
66
|
|
60
67
|
if @options[:unlink]
|
@@ -104,6 +104,8 @@ module Gzr
|
|
104
104
|
desc: 'Unlink the new user defined dashboard from the LookML dashboard'
|
105
105
|
method_option :force, type: :boolean,
|
106
106
|
desc: 'Overwrite a dashboard with the same name in the target folder'
|
107
|
+
method_option :sync, type: :boolean,
|
108
|
+
desc: 'If linked dashboard already exists, sync it with LookML dashboard'
|
107
109
|
def import_lookml(dashboard_id, target_folder_id)
|
108
110
|
if options[:help]
|
109
111
|
invoke :help, ['import_lookml']
|
@@ -98,7 +98,7 @@ module Gzr
|
|
98
98
|
def update_connection(name,body)
|
99
99
|
data = nil
|
100
100
|
begin
|
101
|
-
data = @sdk.
|
101
|
+
data = @sdk.update_connection(name,body).to_attrs
|
102
102
|
rescue LookerSDK::NotFound => e
|
103
103
|
say_warning "Connection #{name} not found"
|
104
104
|
rescue LookerSDK::Error => e
|
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.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike DeAngelo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-reader
|