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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81947b24215954962cc0a753f2f021ab1b2bc23c59be970f48ba3f756b893521
4
- data.tar.gz: 5b7017d8e67c99e807f6cf2efb93cc6e02371b37b4db00b7467e1afc8cef6fe6
3
+ metadata.gz: 2ee219afcd17f3191d17c1f87ed6b6683beecc7210736fa9da4e5190bc9cab07
4
+ data.tar.gz: 6982e0ee5cb893d2ef81e23987e7fe26f729f8c33bd417195c0d226dff01e4a4
5
5
  SHA512:
6
- metadata.gz: 589e1fd671e6b81f21c65817bef12ab70527818516712689b541700718ebe59a142f172e3a79c1d412597d999ccbbd5f72b9e64c884a41e8aa3b7854847ba2d1
7
- data.tar.gz: 12cf46f870a08ecc57e005843fa6fa6c5fb29c16c5713c20c28a0e3a05be326ca3147cf03d62846f80abb4a81b798a40f27bb3afbc1fc8b0dfabeaa636eb57ad
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gazer (0.3.6)
4
+ gazer (0.3.7)
5
5
  faraday (~> 1.10.3)
6
6
  looker-sdk (~> 0.1.1)
7
7
  net-http-persistent (~> 4.0, >= 4.0.1)
@@ -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.connection(name,body).to_attrs
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
@@ -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.3.6'.freeze
23
+ VERSION = '0.3.7'.freeze
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.3.6
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-09 00:00:00.000000000 Z
11
+ date: 2023-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-reader