solidus_backend 4.6.2 → 4.7.1

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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +17 -17
  3. data/app/assets/images/spree/backend/themes/solidus_admin/remixicon.license.txt +222 -0
  4. data/app/assets/javascripts/spree/backend/components/tabs.js +0 -2
  5. data/app/assets/javascripts/spree/backend/views/tables/selectable_table/sum_return_item_amount.js +1 -1
  6. data/app/controllers/spree/admin/adjustments_controller.rb +1 -1
  7. data/app/controllers/spree/admin/base_controller.rb +9 -9
  8. data/app/controllers/spree/admin/cancellations_controller.rb +3 -3
  9. data/app/controllers/spree/admin/customer_returns_controller.rb +6 -6
  10. data/app/controllers/spree/admin/images_controller.rb +2 -2
  11. data/app/controllers/spree/admin/locale_controller.rb +4 -4
  12. data/app/controllers/spree/admin/option_types_controller.rb +1 -1
  13. data/app/controllers/spree/admin/orders/customer_details_controller.rb +2 -2
  14. data/app/controllers/spree/admin/orders_controller.rb +29 -29
  15. data/app/controllers/spree/admin/payment_methods_controller.rb +3 -3
  16. data/app/controllers/spree/admin/payments_controller.rb +12 -10
  17. data/app/controllers/spree/admin/prices_controller.rb +1 -1
  18. data/app/controllers/spree/admin/product_properties_controller.rb +1 -1
  19. data/app/controllers/spree/admin/products_controller.rb +14 -14
  20. data/app/controllers/spree/admin/properties_controller.rb +3 -3
  21. data/app/controllers/spree/admin/refunds_controller.rb +2 -2
  22. data/app/controllers/spree/admin/reimbursements_controller.rb +4 -8
  23. data/app/controllers/spree/admin/resource_controller.rb +10 -10
  24. data/app/controllers/spree/admin/return_authorizations_controller.rb +14 -11
  25. data/app/controllers/spree/admin/return_items_controller.rb +1 -1
  26. data/app/controllers/spree/admin/search_controller.rb +8 -8
  27. data/app/controllers/spree/admin/stock_items_controller.rb +5 -5
  28. data/app/controllers/spree/admin/stock_locations_controller.rb +1 -1
  29. data/app/controllers/spree/admin/stock_movements_controller.rb +5 -5
  30. data/app/controllers/spree/admin/store_credits_controller.rb +10 -10
  31. data/app/controllers/spree/admin/style_guide_controller.rb +19 -19
  32. data/app/controllers/spree/admin/taxons/attachment_controller.rb +2 -2
  33. data/app/controllers/spree/admin/taxons_controller.rb +5 -5
  34. data/app/controllers/spree/admin/theme_controller.rb +3 -3
  35. data/app/controllers/spree/admin/users/api_key_controller.rb +2 -2
  36. data/app/controllers/spree/admin/users_controller.rb +6 -6
  37. data/app/controllers/spree/admin/variant_property_rule_values_controller.rb +1 -1
  38. data/app/controllers/spree/admin/variants_controller.rb +8 -8
  39. data/app/helpers/spree/admin/adjustments_helper.rb +7 -7
  40. data/app/helpers/spree/admin/base_helper.rb +10 -10
  41. data/app/helpers/spree/admin/navigation_helper.rb +37 -37
  42. data/app/helpers/spree/admin/orders_helper.rb +2 -2
  43. data/app/helpers/spree/admin/reimbursement_type_helper.rb +1 -1
  44. data/app/helpers/spree/admin/stock_locations_helper.rb +1 -1
  45. data/app/helpers/spree/admin/store_credit_events_helper.rb +9 -9
  46. data/app/views/spree/admin/orders/_shipment.html.erb +1 -0
  47. data/app/views/spree/admin/search/users.json.jbuilder +2 -2
  48. data/config/initializers/assets.rb +1 -1
  49. data/config/initializers/form_builder.rb +1 -1
  50. data/config/routes.rb +9 -9
  51. data/lib/solidus_backend.rb +1 -1
  52. data/lib/spree/backend/callbacks.rb +2 -2
  53. data/lib/spree/backend/config.rb +1 -1
  54. data/lib/spree/backend/engine.rb +3 -3
  55. data/lib/spree/backend.rb +12 -12
  56. data/lib/spree/backend_configuration/deprecated_tab_constants.rb +2 -0
  57. data/lib/spree/backend_configuration.rb +46 -46
  58. data/lib/spree_backend.rb +1 -1
  59. data/solidus_backend.gemspec +22 -21
  60. data/vendor/assets/fonts/inter/inter.license.txt +97 -0
  61. data/vendor/assets/javascripts/solidus_admin/backbone-nested-models.license.txt +29 -0
  62. data/vendor/assets/javascripts/solidus_admin/bind-polyfill.license.txt +9 -0
  63. data/vendor/assets/javascripts/solidus_admin/flatpickr/flatpickr.license.txt +244 -0
  64. data/vendor/assets/javascripts/solidus_admin/select2.license.txt +226 -0
  65. metadata +32 -12
@@ -6,18 +6,18 @@ module Spree::Admin::StoreCreditEventsHelper
6
6
  Spree::Payment.to_s => {
7
7
  new_tab: true,
8
8
  href_type: :payment,
9
- translation_key: 'admin.store_credits.payment_originator'
9
+ translation_key: "admin.store_credits.payment_originator"
10
10
  },
11
11
  Spree::Refund.to_s => {
12
12
  new_tab: true,
13
13
  href_type: :payments,
14
- translation_key: 'admin.store_credits.refund_originator'
14
+ translation_key: "admin.store_credits.refund_originator"
15
15
  }
16
16
  }
17
17
 
18
18
  def store_credit_event_admin_action_name(store_credit_event)
19
19
  if Spree::StoreCreditEvent::NON_EXPOSED_ACTIONS.include?(store_credit_event.action) ||
20
- store_credit_event.action == Spree::StoreCredit::VOID_ACTION
20
+ store_credit_event.action == Spree::StoreCredit::VOID_ACTION
21
21
  t("spree.store_credit.display_action.admin.#{store_credit_event.action}")
22
22
  else
23
23
  store_credit_event.display_action
@@ -35,35 +35,35 @@ module Spree::Admin::StoreCreditEventsHelper
35
35
 
36
36
  options = {}
37
37
  link_options = originator_links[store_credit_event.originator.class.to_s]
38
- options[:target] = '_blank' if link_options[:new_tab]
38
+ options[:target] = "_blank" if link_options[:new_tab]
39
39
 
40
40
  # Although not all href_types are used in originator_links
41
41
  # they are necessary because they may be used within extensions
42
42
  case link_options[:href_type]
43
43
  when :user
44
44
  link_to(
45
- t(link_options[:translation_key], email: originator.email, scope: 'spree'),
45
+ t(link_options[:translation_key], email: originator.email, scope: "spree"),
46
46
  spree.edit_admin_user_path(originator),
47
47
  options
48
48
  )
49
49
  when :line_item
50
50
  order = originator.line_item.order
51
51
  link_to(
52
- t(link_options[:translation_key], order_number: order.number, scope: 'spree'),
52
+ t(link_options[:translation_key], order_number: order.number, scope: "spree"),
53
53
  spree.edit_admin_order_path(order),
54
54
  options
55
55
  )
56
56
  when :payment
57
57
  order = originator.order
58
58
  link_to(
59
- t(link_options[:translation_key], order_number: order.number, scope: 'spree'),
59
+ t(link_options[:translation_key], order_number: order.number, scope: "spree"),
60
60
  spree.admin_order_payment_path(order, originator),
61
61
  options
62
62
  )
63
63
  when :payments
64
64
  order = originator.payment.order
65
65
  link_to(
66
- t(link_options[:translation_key], order_number: order.number, scope: 'spree'),
66
+ t(link_options[:translation_key], order_number: order.number, scope: "spree"),
67
67
  spree.admin_order_payments_path(order),
68
68
  options
69
69
  )
@@ -80,7 +80,7 @@ module Spree::Admin::StoreCreditEventsHelper
80
80
  originator_links[Spree.user_class.to_s] = {
81
81
  new_tab: true,
82
82
  href_type: :user,
83
- translation_key: 'admin.store_credits.user_originator'
83
+ translation_key: "admin.store_credits.user_originator"
84
84
  }
85
85
  end
86
86
  end
@@ -1,6 +1,7 @@
1
1
  <%
2
2
  manifest_items = Spree::ShippingManifest.new(
3
3
  inventory_units: shipment.inventory_units.where(carton_id: nil),
4
+ order: order
4
5
  ).items.sort_by { |item| item.line_item.created_at }
5
6
  %>
6
7
 
@@ -21,7 +21,7 @@ json.array!(@users) do |user|
21
21
  ]
22
22
  json.ship_address do
23
23
  if user.ship_address
24
- json.(user.ship_address, *address_fields)
24
+ json.call(user.ship_address, *address_fields)
25
25
  if user.ship_address.state
26
26
  json.state do
27
27
  json.name user.ship_address.state.name
@@ -37,7 +37,7 @@ json.array!(@users) do |user|
37
37
 
38
38
  json.bill_address do
39
39
  if user.bill_address
40
- json.(user.bill_address, *address_fields)
40
+ json.call(user.bill_address, *address_fields)
41
41
  if user.bill_address.state
42
42
  json.state do
43
43
  json.name user.bill_address.state.name
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- Rails.application.config.assets.precompile << 'solidus_backend_manifest.js'
3
+ Rails.application.config.assets.precompile << "solidus_backend_manifest.js"
@@ -19,4 +19,4 @@ class ActionView::Helpers::FormBuilder
19
19
  end
20
20
  end
21
21
 
22
- ActionView::Base.field_error_proc = proc{ |html_tag, _instance| "<span class=\"field_with_errors\">#{html_tag}</span>".html_safe }
22
+ ActionView::Base.field_error_proc = proc { |html_tag, _instance| "<span class=\"field_with_errors\">#{html_tag}</span>".html_safe }
data/config/routes.rb CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Spree::Core::Engine.routes.draw do
4
4
  namespace :admin do
5
- get '/search/users', to: "search#users", as: :search_users
6
- get '/search/products', to: "search#products", as: :search_products
5
+ get "/search/users", to: "search#users", as: :search_users
6
+ get "/search/products", to: "search#products", as: :search_products
7
7
 
8
- put '/locale/set', to: 'locale#set', defaults: { format: :json }, as: :set_locale
9
- put '/theme/set', to: 'theme#set', defaults: { format: :json }, as: :set_theme
8
+ put "/locale/set", to: "locale#set", defaults: {format: :json}, as: :set_locale
9
+ put "/theme/set", to: "theme#set", defaults: {format: :json}, as: :set_theme
10
10
 
11
11
  resources :dashboards, only: [] do
12
12
  collection do
@@ -45,7 +45,7 @@ Spree::Core::Engine.routes.draw do
45
45
  resources :variants_including_master, only: [:update]
46
46
  resources :prices, only: [:destroy, :index, :edit, :update, :new, :create]
47
47
  end
48
- get '/products/:product_slug/stock', to: "stock_items#index", as: :product_stock
48
+ get "/products/:product_slug/stock", to: "stock_items#index", as: :product_stock
49
49
 
50
50
  resources :option_types do
51
51
  collection do
@@ -54,11 +54,11 @@ Spree::Core::Engine.routes.draw do
54
54
  end
55
55
  end
56
56
 
57
- delete '/option_values/:id', to: "option_values#destroy", as: :option_value
57
+ delete "/option_values/:id", to: "option_values#destroy", as: :option_value
58
58
 
59
59
  resources :properties
60
60
 
61
- delete '/product_properties/:id', to: "product_properties#destroy", as: :product_property
61
+ delete "/product_properties/:id", to: "product_properties#destroy", as: :product_property
62
62
 
63
63
  resources :orders do
64
64
  member do
@@ -118,7 +118,7 @@ Spree::Core::Engine.routes.draw do
118
118
  post :update_positions
119
119
  end
120
120
  resources :taxons do
121
- resource :attachment, controller: 'taxons/attachment', only: [:destroy]
121
+ resource :attachment, controller: "taxons/attachment", only: [:destroy]
122
122
  end
123
123
  end
124
124
 
@@ -174,5 +174,5 @@ Spree::Core::Engine.routes.draw do
174
174
  resources :style_guide, only: [:index]
175
175
  end
176
176
 
177
- get '/admin', to: 'admin/root#index', as: :admin
177
+ get "/admin", to: "admin/root#index", as: :admin
178
178
  end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spree_backend'
3
+ require "spree_backend"
@@ -43,8 +43,8 @@ module Spree
43
43
  return if callbacks[action].nil?
44
44
  case callback_type.to_sym
45
45
  when :before then callbacks[action].before_methods.each { |method| send method }
46
- when :after then callbacks[action].after_methods.each { |method| send method }
47
- when :fails then callbacks[action].fails_methods.each { |method| send method }
46
+ when :after then callbacks[action].after_methods.each { |method| send method }
47
+ when :fails then callbacks[action].fails_methods.each { |method| send method }
48
48
  end
49
49
  end
50
50
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spree/backend_configuration'
3
+ require "spree/backend_configuration"
4
4
 
5
5
  module Spree
6
6
  module Backend
@@ -1,16 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spree/backend/config'
3
+ require "spree/backend/config"
4
4
 
5
5
  module Spree
6
6
  module Backend
7
7
  class Engine < ::Rails::Engine
8
8
  # Leave initializer empty for backwards-compatability. Other apps
9
9
  # might still rely on this event.
10
- initializer "spree.backend.environment", before: :load_config_initializers do; end
10
+ initializer("spree.backend.environment", before: :load_config_initializers) {}
11
11
 
12
12
  config.after_initialize do
13
- Spree::Backend::Config.check_load_defaults_called('Spree::Backend::Config')
13
+ Spree::Backend::Config.check_load_defaults_called("Spree::Backend::Config")
14
14
  end
15
15
  end
16
16
  end
data/lib/spree/backend.rb CHANGED
@@ -1,16 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spree_core'
4
- require 'spree_api'
3
+ require "spree_core"
4
+ require "spree_api"
5
5
 
6
- require 'jquery-rails'
7
- require 'sassc-rails'
8
- require 'handlebars_assets'
9
- require 'font-awesome-rails'
10
- require 'jbuilder'
11
- require 'kaminari'
12
- require 'responders'
6
+ require "jquery-rails"
7
+ require "sassc-rails"
8
+ require "handlebars_assets"
9
+ require "font-awesome-rails"
10
+ require "jbuilder"
11
+ require "kaminari"
12
+ require "responders"
13
13
 
14
- require 'spree/backend/action_callbacks'
15
- require 'spree/backend/callbacks'
16
- require 'spree/backend/engine'
14
+ require "spree/backend/action_callbacks"
15
+ require "spree/backend/callbacks"
16
+ require "spree/backend/engine"
@@ -4,6 +4,7 @@ Spree.deprecator.warn(
4
4
  "Spree::BackendConfiguration::*_TABS is deprecated. Please use Spree::BackendConfiguration::MenuItem(match_path:) instead."
5
5
  )
6
6
 
7
+ # rubocop:disable Lint/OrAssignmentToConstant
7
8
  Spree::BackendConfiguration::ORDER_TABS ||= [
8
9
  :orders, :payments, :creditcard_payments,
9
10
  :shipments, :credit_cards, :return_authorizations,
@@ -32,3 +33,4 @@ Spree::BackendConfiguration::CONFIGURATION_TABS ||= [
32
33
  :return_reasons, :adjustment_reasons,
33
34
  :store_credit_reasons
34
35
  ]
36
+ # rubocop:enable Lint/OrAssignmentToConstant
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spree/preferences/configuration'
4
- require 'spree/backend_configuration/menu_item'
3
+ require "spree/preferences/configuration"
4
+ require "spree/backend_configuration/menu_item"
5
5
 
6
6
  module Spree
7
7
  class BackendConfiguration < Preferences::Configuration
@@ -10,13 +10,13 @@ module Spree
10
10
  # @!attribute [rw] themes
11
11
  # @return [Hash] A hash containing the themes that are available for the admin panel
12
12
  preference :themes, :hash, default: {
13
- classic: 'spree/backend/all',
14
- classic_dark: 'spree/backend/themes/classic_dark',
15
- classic_dark_dimmed: 'spree/backend/themes/classic_dimmed',
16
- solidus: 'spree/backend/themes/solidus_admin',
17
- solidus_dark: 'spree/backend/themes/solidus_admin_dark',
18
- solidus_dimmed: 'spree/backend/themes/solidus_admin_dimmed',
19
- solidus_admin: 'spree/backend/themes/solidus_admin'
13
+ classic: "spree/backend/all",
14
+ classic_dark: "spree/backend/themes/classic_dark",
15
+ classic_dark_dimmed: "spree/backend/themes/classic_dimmed",
16
+ solidus: "spree/backend/themes/solidus_admin",
17
+ solidus_dark: "spree/backend/themes/solidus_admin_dark",
18
+ solidus_dimmed: "spree/backend/themes/solidus_admin_dimmed",
19
+ solidus_admin: "spree/backend/themes/solidus_admin"
20
20
  }
21
21
 
22
22
  # @!attribute [rw] show_reverse_charge_fields
@@ -38,7 +38,7 @@ module Spree
38
38
  ransack: :state_eq,
39
39
  label: -> { I18n.t(:status, scope: :spree) },
40
40
  options: -> {
41
- Spree::Order.state_machines[:state].states.collect { |s| [I18n.t(s.name, scope: 'spree.order_state'), s.value] }
41
+ Spree::Order.state_machines[:state].states.collect { |s| [I18n.t(s.name, scope: "spree.order_state"), s.value] }
42
42
  }
43
43
  }
44
44
  },
@@ -92,7 +92,7 @@ module Spree
92
92
  locals: {
93
93
  ransack: :store_id_eq,
94
94
  label: -> { I18n.t(:store, scope: :spree) },
95
- options: -> { Spree::Store.all.map { |store| [store.name, store.id] } },
95
+ options: -> { Spree::Store.all.map { |store| [store.name, store.id] } }
96
96
  },
97
97
  if: -> { Spree::Store.many? }
98
98
  },
@@ -108,11 +108,11 @@ module Spree
108
108
 
109
109
  # @!attribute [rw] theme
110
110
  # @return [String] Default admin theme name
111
- versioned_preference :theme, :string, initial_value: 'classic', boundaries: { "4.2.0" => "solidus_admin", "4.4.0" => "solidus" }
111
+ versioned_preference :theme, :string, initial_value: "classic", boundaries: {"4.2.0" => "solidus_admin", "4.4.0" => "solidus"}
112
112
 
113
113
  # @!attribute [rw] dark_theme
114
114
  # @return [String] Dark admin theme name
115
- versioned_preference :dark_theme, :string, initial_value: 'classic', boundaries: { "4.2.0" => "solidus_admin", "4.4.0" => 'solidus_dark' }
115
+ versioned_preference :dark_theme, :string, initial_value: "classic", boundaries: {"4.2.0" => "solidus_admin", "4.4.0" => "solidus_dark"}
116
116
 
117
117
  def theme_path(user_theme)
118
118
  themes.fetch(user_theme&.to_sym, themes.fetch(theme.to_sym))
@@ -121,7 +121,7 @@ module Spree
121
121
  # @!attribute [rw] admin_updated_navbar
122
122
  # @return [Boolean] Should the updated navbar be used in admin (default: +false+)
123
123
  #
124
- versioned_preference :admin_updated_navbar, :boolean, initial_value: false, boundaries: { "4.2.0" => true }
124
+ versioned_preference :admin_updated_navbar, :boolean, initial_value: false, boundaries: {"4.2.0" => true}
125
125
 
126
126
  preference :frontend_product_path,
127
127
  :proc,
@@ -135,14 +135,14 @@ module Spree
135
135
 
136
136
  # @!attribute [rw] prefer_menu_item_partials
137
137
  # @return [Boolean] Whether or not to prefer menu item partials when both a partial and children are present.
138
- versioned_preference :prefer_menu_item_partials, :boolean, initial_value: true, boundaries: { "4.2.0" => false }
138
+ versioned_preference :prefer_menu_item_partials, :boolean, initial_value: true, boundaries: {"4.2.0" => false}
139
139
 
140
- autoload :ORDER_TABS, 'spree/backend_configuration/deprecated_tab_constants'
141
- autoload :PRODUCT_TABS, 'spree/backend_configuration/deprecated_tab_constants'
142
- autoload :CONFIGURATION_TABS, 'spree/backend_configuration/deprecated_tab_constants'
143
- autoload :PROMOTION_TABS, 'spree/backend_configuration/deprecated_tab_constants'
144
- autoload :STOCK_TABS, 'spree/backend_configuration/deprecated_tab_constants'
145
- autoload :USER_TABS, 'spree/backend_configuration/deprecated_tab_constants'
140
+ autoload :ORDER_TABS, "spree/backend_configuration/deprecated_tab_constants"
141
+ autoload :PRODUCT_TABS, "spree/backend_configuration/deprecated_tab_constants"
142
+ autoload :CONFIGURATION_TABS, "spree/backend_configuration/deprecated_tab_constants"
143
+ autoload :PROMOTION_TABS, "spree/backend_configuration/deprecated_tab_constants"
144
+ autoload :STOCK_TABS, "spree/backend_configuration/deprecated_tab_constants"
145
+ autoload :USER_TABS, "spree/backend_configuration/deprecated_tab_constants"
146
146
 
147
147
  # By default, this is set to +Spree::UnauthorizedRedirectHandler+. If you need your admin to behave
148
148
  # differently when a user is unauthorized, you can create your own class that respects the same interface.
@@ -176,7 +176,7 @@ module Spree
176
176
  @menu_items ||= [
177
177
  MenuItem.new(
178
178
  label: :orders,
179
- icon: admin_updated_navbar ? 'ri-inbox-line' : 'shopping-cart',
179
+ icon: admin_updated_navbar ? "ri-inbox-line" : "shopping-cart",
180
180
  condition: -> { can?(:admin, Spree::Order) },
181
181
  match_path: %r{/(
182
182
  adjustments|
@@ -188,79 +188,79 @@ module Spree
188
188
  payments|
189
189
  return_authorizations|
190
190
  shipments
191
- )}x,
191
+ )}x
192
192
  ),
193
193
  MenuItem.new(
194
194
  label: :products,
195
- icon: admin_updated_navbar ? 'ri-price-tag-3-line' : 'th-large',
195
+ icon: admin_updated_navbar ? "ri-price-tag-3-line" : "th-large",
196
196
  condition: -> { can?(:admin, Spree::Product) },
197
- partial: 'spree/admin/shared/product_sub_menu',
197
+ partial: "spree/admin/shared/product_sub_menu",
198
198
  data_hook: :admin_product_sub_tabs,
199
199
  children: [
200
200
  MenuItem.new(
201
201
  label: :products,
202
202
  condition: -> { can? :admin, Spree::Product },
203
- match_path: '/products',
203
+ match_path: "/products"
204
204
  ),
205
205
  MenuItem.new(
206
206
  label: :option_types,
207
207
  condition: -> { can? :admin, Spree::OptionType },
208
- match_path: '/option_types',
208
+ match_path: "/option_types"
209
209
  ),
210
210
  MenuItem.new(
211
211
  label: :properties,
212
- condition: -> { can? :admin, Spree::Property },
212
+ condition: -> { can? :admin, Spree::Property }
213
213
  ),
214
214
  MenuItem.new(
215
215
  label: :taxonomies,
216
- condition: -> { can? :admin, Spree::Taxonomy },
216
+ condition: -> { can? :admin, Spree::Taxonomy }
217
217
  ),
218
218
  MenuItem.new(
219
219
  url: :admin_taxons_path,
220
220
  condition: -> { can? :admin, Spree::Taxon },
221
221
  label: :display_order,
222
- match_path: '/taxons',
223
- ),
224
- ],
222
+ match_path: "/taxons"
223
+ )
224
+ ]
225
225
  ),
226
226
  MenuItem.new(
227
227
  label: :stock,
228
- icon: admin_updated_navbar ? 'ri-stack-line' : 'cubes',
228
+ icon: admin_updated_navbar ? "ri-stack-line" : "cubes",
229
229
  match_path: %r{/(stock_items)},
230
230
  condition: -> { can?(:admin, Spree::StockItem) },
231
- url: :admin_stock_items_path,
231
+ url: :admin_stock_items_path
232
232
  ),
233
233
  MenuItem.new(
234
234
  label: :users,
235
- icon: admin_updated_navbar ? 'ri-user-line' : 'user',
235
+ icon: admin_updated_navbar ? "ri-user-line" : "user",
236
236
  match_path: %r{/(users|store_credits)},
237
237
  condition: -> { Spree.user_class && can?(:admin, Spree.user_class) },
238
- url: :admin_users_path,
238
+ url: :admin_users_path
239
239
  ),
240
240
  MenuItem.new(
241
241
  label: :settings,
242
- icon: admin_updated_navbar ? 'ri-settings-line' : 'wrench',
242
+ icon: admin_updated_navbar ? "ri-settings-line" : "wrench",
243
243
  data_hook: :admin_settings_sub_tabs,
244
- partial: 'spree/admin/shared/settings_sub_menu',
244
+ partial: "spree/admin/shared/settings_sub_menu",
245
245
  condition: -> { can? :admin, Spree::Store },
246
246
  url: :admin_stores_path,
247
247
  children: [
248
248
  MenuItem.new(
249
249
  label: :stores,
250
250
  condition: -> { can? :admin, Spree::Store },
251
- url: :admin_stores_path,
251
+ url: :admin_stores_path
252
252
  ),
253
253
  MenuItem.new(
254
254
  label: :payments,
255
255
  condition: -> { can? :admin, Spree::PaymentMethod },
256
- url: :admin_payment_methods_path,
256
+ url: :admin_payment_methods_path
257
257
  ),
258
258
 
259
259
  MenuItem.new(
260
260
  label: :taxes,
261
261
  condition: -> { can?(:admin, Spree::TaxCategory) || can?(:admin, Spree::TaxRate) },
262
262
  url: :admin_tax_categories_path,
263
- match_path: %r(tax_categories|tax_rates),
263
+ match_path: %r{tax_categories|tax_rates}
264
264
  ),
265
265
  MenuItem.new(
266
266
  label: :checkout,
@@ -271,7 +271,7 @@ module Spree
271
271
  can?(:show, Spree::AdjustmentReason)
272
272
  },
273
273
  url: :admin_refund_reasons_path,
274
- match_path: %r(refund_reasons|reimbursement_types|return_reasons|adjustment_reasons|store_credit_reasons)
274
+ match_path: %r{refund_reasons|reimbursement_types|return_reasons|adjustment_reasons|store_credit_reasons}
275
275
  ),
276
276
  MenuItem.new(
277
277
  label: :shipping,
@@ -281,14 +281,14 @@ module Spree
281
281
  can?(:admin, Spree::StockLocation)
282
282
  },
283
283
  url: :admin_shipping_methods_path,
284
- match_path: %r(shipping_methods|shipping_categories|stock_locations),
284
+ match_path: %r{shipping_methods|shipping_categories|stock_locations}
285
285
  ),
286
286
  MenuItem.new(
287
287
  label: :zones,
288
288
  condition: -> { can?(:admin, Spree::Zone) },
289
- url: :admin_zones_path,
290
- ),
291
- ],
289
+ url: :admin_zones_path
290
+ )
291
+ ]
292
292
  )
293
293
  ]
294
294
  end
data/lib/spree_backend.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'spree/backend'
3
+ require "spree/backend"
@@ -1,37 +1,38 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../core/lib/spree/core/version.rb'
3
+ require_relative "../core/lib/spree/core/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.platform = Gem::Platform::RUBY
7
- s.name = 'solidus_backend'
8
- s.version = Spree.solidus_version
9
- s.summary = 'Admin interface for the Solidus e-commerce framework.'
6
+ s.platform = Gem::Platform::RUBY
7
+ s.name = "solidus_backend"
8
+ s.version = Spree.solidus_version
9
+ s.summary = "Admin interface for the Solidus e-commerce framework."
10
10
  s.description = s.summary
11
11
 
12
- s.author = 'Solidus Team'
13
- s.email = 'contact@solidus.io'
14
- s.homepage = 'http://solidus.io'
15
- s.license = 'BSD-3-Clause'
12
+ s.author = "Solidus Team"
13
+ s.email = "contact@solidus.io"
14
+ s.homepage = "http://solidus.io"
15
+ s.license = "BSD-3-Clause"
16
16
 
17
- s.metadata['rubygems_mfa_required'] = 'true'
17
+ s.metadata["rubygems_mfa_required"] = "true"
18
18
 
19
19
  s.files = `git ls-files -z`.split("\x0").reject do |f|
20
20
  f.match(%r{^(spec|bin)/})
21
21
  end
22
22
 
23
- s.required_ruby_version = '>= 3.1.0'
24
- s.required_rubygems_version = '>= 1.8.23'
23
+ s.required_ruby_version = ">= 3.2.0"
24
+ s.required_rubygems_version = ">= 1.8.23"
25
25
 
26
- s.add_dependency 'solidus_api', s.version
27
- s.add_dependency 'solidus_core', s.version
26
+ s.add_dependency "solidus_api", s.version
27
+ s.add_dependency "solidus_core", s.version
28
28
 
29
- s.add_dependency 'font-awesome-rails', '~> 4.0'
30
- s.add_dependency 'jbuilder', '~> 2.8'
31
- s.add_dependency 'jquery-rails'
32
- s.add_dependency 'kaminari', '~> 1.1'
33
- s.add_dependency 'responders'
34
- s.add_dependency 'sassc-rails'
29
+ s.add_dependency "font-awesome-rails", "~> 4.0"
30
+ s.add_dependency "jbuilder", "~> 2.8"
31
+ s.add_dependency "jquery-rails"
32
+ s.add_dependency "kaminari", "~> 1.1"
33
+ s.add_dependency "responders"
35
34
 
36
- s.add_dependency 'handlebars_assets', '~> 0.23'
35
+ s.add_dependency "handlebars_assets", "~> 0.23"
36
+ s.add_dependency "sassc-rails"
37
+ s.add_dependency "sprockets-rails", "!= 3.5.0"
37
38
  end
@@ -0,0 +1,97 @@
1
+ This directory contains web font builds of the Inter font family,
2
+ from https://github.com/rsms/inter. The font's license follows.
3
+
4
+ --------------------------------------------------------------------------------
5
+
6
+ Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
7
+
8
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
9
+ This license is copied below, and is also available with a FAQ at:
10
+ http://scripts.sil.org/OFL
11
+
12
+ -----------------------------------------------------------
13
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
14
+ -----------------------------------------------------------
15
+
16
+ PREAMBLE
17
+ The goals of the Open Font License (OFL) are to stimulate worldwide
18
+ development of collaborative font projects, to support the font creation
19
+ efforts of academic and linguistic communities, and to provide a free and
20
+ open framework in which fonts may be shared and improved in partnership
21
+ with others.
22
+
23
+ The OFL allows the licensed fonts to be used, studied, modified and
24
+ redistributed freely as long as they are not sold by themselves. The
25
+ fonts, including any derivative works, can be bundled, embedded,
26
+ redistributed and/or sold with any software provided that any reserved
27
+ names are not used by derivative works. The fonts and derivatives,
28
+ however, cannot be released under any other type of license. The
29
+ requirement for fonts to remain under this license does not apply
30
+ to any document created using the fonts or their derivatives.
31
+
32
+ DEFINITIONS
33
+ "Font Software" refers to the set of files released by the Copyright
34
+ Holder(s) under this license and clearly marked as such. This may
35
+ include source files, build scripts and documentation.
36
+
37
+ "Reserved Font Name" refers to any names specified as such after the
38
+ copyright statement(s).
39
+
40
+ "Original Version" refers to the collection of Font Software components as
41
+ distributed by the Copyright Holder(s).
42
+
43
+ "Modified Version" refers to any derivative made by adding to, deleting,
44
+ or substituting -- in part or in whole -- any of the components of the
45
+ Original Version, by changing formats or by porting the Font Software to a
46
+ new environment.
47
+
48
+ "Author" refers to any designer, engineer, programmer, technical
49
+ writer or other person who contributed to the Font Software.
50
+
51
+ PERMISSION AND CONDITIONS
52
+ Permission is hereby granted, free of charge, to any person obtaining
53
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
54
+ redistribute, and sell modified and unmodified copies of the Font
55
+ Software, subject to the following conditions:
56
+
57
+ 1) Neither the Font Software nor any of its individual components,
58
+ in Original or Modified Versions, may be sold by itself.
59
+
60
+ 2) Original or Modified Versions of the Font Software may be bundled,
61
+ redistributed and/or sold with any software, provided that each copy
62
+ contains the above copyright notice and this license. These can be
63
+ included either as stand-alone text files, human-readable headers or
64
+ in the appropriate machine-readable metadata fields within text or
65
+ binary files as long as those fields can be easily viewed by the user.
66
+
67
+ 3) No Modified Version of the Font Software may use the Reserved Font
68
+ Name(s) unless explicit written permission is granted by the corresponding
69
+ Copyright Holder. This restriction only applies to the primary font name as
70
+ presented to the users.
71
+
72
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
73
+ Software shall not be used to promote, endorse or advertise any
74
+ Modified Version, except to acknowledge the contribution(s) of the
75
+ Copyright Holder(s) and the Author(s) or with their explicit written
76
+ permission.
77
+
78
+ 5) The Font Software, modified or unmodified, in part or in whole,
79
+ must be distributed entirely under this license, and must not be
80
+ distributed under any other license. The requirement for fonts to
81
+ remain under this license does not apply to any document created
82
+ using the Font Software.
83
+
84
+ TERMINATION
85
+ This license becomes null and void if any of the above conditions are
86
+ not met.
87
+
88
+ DISCLAIMER
89
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
90
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
91
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
92
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
93
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
94
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
95
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
96
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
97
+ OTHER DEALINGS IN THE FONT SOFTWARE.