spree_backend 4.6.0 → 4.6.1

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: 6b658a0d5f11161bb88e49c2db87c4a50a2346b2f76bab36c286d93c89fbc171
4
- data.tar.gz: 5135287e5f65f52b088d9ecae613efbfb721533eb40f79dcb2a07b80553501c2
3
+ metadata.gz: ec893557adb0b4d906e3f5135e8d813586568e6849be2dafebd71f927023b133
4
+ data.tar.gz: fbedae8d3f6c7582727850b52cb282b5b06a7c1fff295957ba6d3294a966eebf
5
5
  SHA512:
6
- metadata.gz: ed586053b82dbf636a94436d7e960d592ac574fb98c55177a5424366dc34dd6fdd315c8ab24e5e32927f0749c697f206ba21452795aa002776b4188cbb012616
7
- data.tar.gz: 2e7b00634d3d7dd86fb4d8a2e65904289865d501789f4263993502753b5c62dd21020265ce2f4ea0931ebe4304dbe2bf0417aa26023c5e6f2b3151179c6499c0
6
+ metadata.gz: 0bad0854d98bdb6127f07ec478382c025d04568ef931285f6599d49c7bd75d4b6afb513538b9efe01a010b3adb5b08fd8ba046db1c99a53a6d9d986f6eea04b3
7
+ data.tar.gz: 37548d9f962033dfacb4f17e6b52631dc86ea2048e221536d07770f217b4856a22a2cdb66ccd7df24cbc0e7ac436909e95de57e184da93ec607b688c19a97b0a
data/Gemfile CHANGED
@@ -23,7 +23,7 @@ end
23
23
 
24
24
  group :test do
25
25
  gem 'tinymce-rails'
26
- gem 'capybara', '~> 3.24'
26
+ gem 'capybara', '~> 3.39'
27
27
  gem 'capybara-screenshot', '~> 1.0'
28
28
  gem 'capybara-select-2'
29
29
  gem 'database_cleaner', '~> 2.0'
@@ -50,7 +50,7 @@ group :test, :development do
50
50
  gem 'rubocop', '~> 1.48.1', require: false # bumped
51
51
  gem 'rubocop-rspec', require: false
52
52
  gem 'pry-byebug'
53
- gem 'webdrivers', '~> 4.1'
53
+ gem 'webdrivers', '~> 5.3'
54
54
  # Puma 6.0 causes issues in specs due to conflict with capybara version
55
55
  gem 'puma', '< 6.0'
56
56
  gem 'ffaker'
@@ -62,7 +62,7 @@ group :development do
62
62
  end
63
63
 
64
64
 
65
- spree_opts = { github: 'spree/spree', branch: 'main' }
65
+ spree_opts = { github: 'spree/spree', branch: '4-6-stable' }
66
66
  gem 'spree_core', spree_opts
67
67
  gem 'spree_api', spree_opts
68
68
  # Last version that supports Ruby 2.7
@@ -13,15 +13,18 @@ module Spree
13
13
  private
14
14
 
15
15
  def save_translation_values
16
- translation_params = params[:translation]
16
+ translation_params = params[:translation].permit!.to_h
17
17
 
18
- current_store.supported_locales_list.each do |locale|
19
- I18n.with_locale(locale) do
20
- translation_params.each do |attribute, translations|
21
- @object.public_send("#{attribute}=", translations[locale])
22
- end
23
- @object.save!
18
+ current_store_locales = current_store.supported_locales_list
19
+ params_locales = translation_params.flat_map { |_attribute, translations| translations.compact_blank.keys }
20
+ locales_to_update = current_store_locales & params_locales
21
+
22
+ locales_to_update.each do |locale|
23
+ translation = @object.translations.find_or_initialize_by(locale: locale)
24
+ translation_params.each do |attribute, translations|
25
+ translation.public_send("#{attribute}=", translations[locale])
24
26
  end
27
+ translation.save!
25
28
  end
26
29
  end
27
30
  end
@@ -45,6 +45,7 @@
45
45
  <% else %>
46
46
  <p>
47
47
  <%= Spree.t('admin.gettting_started.products_section.message_without_products') %>
48
+ <%= link_to(Spree.t('admin.gettting_started.products_section.import_message'), 'https://api.spreecommerce.org/docs/api-v2/27527143a4edf-create-a-product') %>
48
49
  </p>
49
50
  <%= link_to_with_icon 'add.svg', Spree.t('admin.gettting_started.add_products'), spree.admin_products_path, class: 'btn btn-success btn-sm mb-2' %>
50
51
  <% end %>
@@ -6,6 +6,13 @@
6
6
  <%= button_link_to Spree.t('admin.oauth_applications.new'), new_object_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_role_link' %>
7
7
  <% end if can? :create, Spree::OauthApplication %>
8
8
 
9
+ <div class="card bg-light">
10
+ <div class="card-body">
11
+ <%=Spree.t('admin.oauth_applications.documentation_message')%>
12
+ <%= link_to(Spree.t('admin.oauth_applications.documentation_cta'), 'https://dev-docs.spreecommerce.org/api/platform-api/authenticating-requests')%>
13
+ </div>
14
+ </div>
15
+
9
16
  <% if @oauth_applications.any? %>
10
17
  <div class="table-responsive rounded border mt-4">
11
18
  <table class="table">
@@ -167,6 +167,8 @@ en:
167
167
  new: New oAuth application
168
168
  uid: UID
169
169
  scopes: Scopes
170
+ documentation_message: 'To learn how to authenticate requests to the Platform API, '
171
+ documentation_cta: see the documentation
170
172
  reports:
171
173
  for: For %{store_name}
172
174
  return_authorization:
@@ -324,7 +326,8 @@ en:
324
326
  setup_taxes_calculation: Setup tax calculation
325
327
  products_section:
326
328
  message_with_products_html: You have added <strong> %{count} products</strong> so far - good job!</p>
327
- message_without_products: You can add products manually through API or import from a CSV file.
329
+ message_without_products: You can add products manually or
330
+ import_message: import them via the API.
328
331
  shipping_section:
329
332
  message_with_shipping: You have setup shipping for
330
333
  message_without_shipping: You can add multiple shipping methods, different for each country, continent or region.
@@ -1,6 +1,6 @@
1
1
  module Spree
2
2
  module Backend
3
- VERSION = '4.6.0'.freeze
3
+ VERSION = '4.6.1'.freeze
4
4
 
5
5
  def self.version
6
6
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.0
4
+ version: 4.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-05-31 00:00:00.000000000 Z
12
+ date: 2023-09-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree
@@ -2427,9 +2427,9 @@ licenses:
2427
2427
  - BSD-3-Clause
2428
2428
  metadata:
2429
2429
  bug_tracker_uri: https://github.com/spree/spree_backend/issues
2430
- changelog_uri: https://github.com/spree/spree_backend/releases/tag/v4.6.0
2430
+ changelog_uri: https://github.com/spree/spree_backend/releases/tag/v4.6.1
2431
2431
  documentation_uri: https://dev-docs.spreecommerce.org/
2432
- source_code_uri: https://github.com/spree/spree_backend/tree/v4.6.0
2432
+ source_code_uri: https://github.com/spree/spree_backend/tree/v4.6.1
2433
2433
  post_install_message:
2434
2434
  rdoc_options: []
2435
2435
  require_paths: