solidus_bolt 0.5.0 → 0.6.0

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: 85a81224dbf00b809093c50581fa790f56f6389a85753a002eff55ed149ddbff
4
- data.tar.gz: 84ee9afd0a6dd580df9d3ffcbe2550a3e957d5c43fafc209e42cd79965caf9c2
3
+ metadata.gz: 3d91d355d44749ba39444cd212cf3358af9d4fdc765c0aef0331fc0ea363066e
4
+ data.tar.gz: d0a97484c2dd27d7ab078480b3a57f979bb438ca714322bc3dd6ba8388dec066
5
5
  SHA512:
6
- metadata.gz: ed702363808663ef10223d943f670c2bc90b248be1f4953b9288b631b36ec9a40908d1c7d3b295bb6f5cbf27b92820845dbe49e8f51a3336a1da68372c247f18
7
- data.tar.gz: 2398a99717a2d8f76b1b20c790062b5543d0f7323d90dc55637814bbeadac6d55c3078008a0213f2c6461630dd51362316d5d1b2a2c987fe37acac41cd4e34e8
6
+ metadata.gz: 6499d04e3f47a046fbca944f1d7ad0f8a6181c299175fa5b1734960d912295f47b68596c2eb103651edf40147948a3cba211df1e69c9746d6367165b0bb176b1
7
+ data.tar.gz: c2d55795d7683a04debbe3d3d18f3a5f46a581759d12d990941af05204fd4281245e238667526ef4ce21d5cf1b54cccbe9c814359729818b285072e3c6467a98
@@ -3,11 +3,11 @@
3
3
  module Spree
4
4
  module Admin
5
5
  class BoltCallbackUrlsController < Spree::Admin::BaseController
6
- def new
6
+ def edit
7
7
  callback_urls = SolidusBolt::MerchantConfiguration::GetCallbackUrlsService.call
8
8
 
9
- @oauth_logout = callback_urls['callback_urls'].find { |c| c['type'] == 'oauth_logout' }['url']
10
- @oauth_redirect = callback_urls['callback_urls'].find { |c| c['type'] == 'oauth_redirect' }['url']
9
+ @oauth_logout = callback_urls['callback_urls'].find { |c| c['type'] == 'oauth_logout' }&.dig('url')
10
+ @oauth_redirect = callback_urls['callback_urls'].find { |c| c['type'] == 'oauth_redirect' }&.dig('url')
11
11
  end
12
12
 
13
13
  def update
@@ -17,7 +17,7 @@ module Spree
17
17
  )
18
18
  flash[:success] = "Successfully updated callback urls."
19
19
 
20
- redirect_to new_admin_bolt_callback_urls_path
20
+ redirect_to edit_admin_bolt_callback_urls_path
21
21
  rescue SolidusBolt::ServerError => e
22
22
  flash[:error] = e.message
23
23
 
@@ -12,7 +12,7 @@
12
12
  </li>
13
13
  <% else %>
14
14
  <li>
15
- <%= link_to 'Configure Callbacks URLs', new_admin_bolt_callback_urls_path, class: 'btn btn-primary' %>
15
+ <%= link_to 'Configure Callbacks URLs', edit_admin_bolt_callback_urls_path, class: 'btn btn-primary' %>
16
16
  </li>
17
17
  <li>
18
18
  <%= link_to 'Configure Webhooks', new_admin_bolt_webhook_path, class: 'btn btn-primary' %>
data/config/routes.rb CHANGED
@@ -4,7 +4,7 @@ Spree::Core::Engine.routes.draw do
4
4
  namespace :admin do
5
5
  resource :bolt, only: [:show, :edit, :update]
6
6
  resource :bolt_webhook, only: [:new, :create]
7
- resource :bolt_callback_urls, only: [:new, :update]
7
+ resource :bolt_callback_urls, only: [:edit, :update]
8
8
  end
9
9
 
10
10
  post '/webhooks/bolt', to: '/solidus_bolt/webhooks#update'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusBolt
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_bolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - piyushswain
@@ -283,7 +283,7 @@ files:
283
283
  - app/services/solidus_bolt/users/sync_addresses_service.rb
284
284
  - app/services/solidus_bolt/users/sync_payment_sources_service.rb
285
285
  - app/services/solidus_bolt/webhooks/create_service.rb
286
- - app/views/spree/admin/bolt_callback_urls/new.html.erb
286
+ - app/views/spree/admin/bolt_callback_urls/edit.html.erb
287
287
  - app/views/spree/admin/bolt_webhooks/new.html.erb
288
288
  - app/views/spree/admin/bolts/_configuration.html.erb
289
289
  - app/views/spree/admin/bolts/_form.html.erb