diff --git a/app/queries/product_scope_query.rb b/app/queries/product_scope_query.rb index bdadbc3401..e900f60769 100644 --- a/app/queries/product_scope_query.rb +++ b/app/queries/product_scope_query.rb @@ -60,8 +60,8 @@ class ProductScopeQuery def product_query_includes [ - image: { attachment_attachment: :blob }, - variants: [:default_price, :stock_items, :variant_overrides] + { image: { attachment_attachment: :blob }, + variants: [:default_price, :stock_items, :variant_overrides] } ] end diff --git a/app/services/permitted_attributes/enterprise.rb b/app/services/permitted_attributes/enterprise.rb index 391377ba49..b7c8fa92e4 100644 --- a/app/services/permitted_attributes/enterprise.rb +++ b/app/services/permitted_attributes/enterprise.rb @@ -14,12 +14,12 @@ module PermittedAttributes def self.attributes basic_permitted_attributes + [ - group_ids: [], user_ids: [], - shipping_method_ids: [], payment_method_ids: [], - address_attributes: PermittedAttributes::Address.attributes, - business_address_attributes: PermittedAttributes::BusinessAddress.attributes, - producer_properties_attributes: [:id, :property_name, :value, :_destroy], - custom_tab_attributes: PermittedAttributes::CustomTab.attributes, + { group_ids: [], user_ids: [], + shipping_method_ids: [], payment_method_ids: [], + address_attributes: PermittedAttributes::Address.attributes, + business_address_attributes: PermittedAttributes::BusinessAddress.attributes, + producer_properties_attributes: [:id, :property_name, :value, :_destroy], + custom_tab_attributes: PermittedAttributes::CustomTab.attributes }, ] end diff --git a/app/services/permitted_attributes/order_cycle.rb b/app/services/permitted_attributes/order_cycle.rb index dc23c8e5c3..b0351e0901 100644 --- a/app/services/permitted_attributes/order_cycle.rb +++ b/app/services/permitted_attributes/order_cycle.rb @@ -25,8 +25,8 @@ module PermittedAttributes private def attributes - self.class.basic_attributes + [incoming_exchanges: permitted_exchange_attributes, - outgoing_exchanges: permitted_exchange_attributes] + self.class.basic_attributes + [{ incoming_exchanges: permitted_exchange_attributes, + outgoing_exchanges: permitted_exchange_attributes }] end def permitted_exchange_attributes diff --git a/app/services/permitted_attributes/subscription.rb b/app/services/permitted_attributes/subscription.rb index e80469767f..a8b34e85d9 100644 --- a/app/services/permitted_attributes/subscription.rb +++ b/app/services/permitted_attributes/subscription.rb @@ -26,11 +26,11 @@ module PermittedAttributes def other_permitted_attributes [ - subscription_line_items_attributes: [ - :id, :quantity, :variant_id, :price_estimate, :_destroy - ], - bill_address_attributes: PermittedAttributes::Address.attributes, - ship_address_attributes: PermittedAttributes::Address.attributes + { subscription_line_items_attributes: [ + :id, :quantity, :variant_id, :price_estimate, :_destroy + ], + bill_address_attributes: PermittedAttributes::Address.attributes, + ship_address_attributes: PermittedAttributes::Address.attributes } ] end end diff --git a/engines/dfc_provider/spec/requests/catalog_items_spec.rb b/engines/dfc_provider/spec/requests/catalog_items_spec.rb index 1b69192310..1d3854b072 100644 --- a/engines/dfc_provider/spec/requests/catalog_items_spec.rb +++ b/engines/dfc_provider/spec/requests/catalog_items_spec.rb @@ -36,7 +36,7 @@ RSpec.describe "CatalogItems", swagger_doc: "dfc.yaml" do get "List CatalogItems" do produces "application/json" - security [oidc_token: []] + security [{ oidc_token: [] }] response "404", "not found" do context "as platform user" do diff --git a/engines/dfc_provider/spec/requests/product_groups_spec.rb b/engines/dfc_provider/spec/requests/product_groups_spec.rb index 9520acab2c..cea6ed0182 100644 --- a/engines/dfc_provider/spec/requests/product_groups_spec.rb +++ b/engines/dfc_provider/spec/requests/product_groups_spec.rb @@ -35,7 +35,7 @@ RSpec.describe "ProductGroups", swagger_doc: "dfc.yaml" do get "Show ProductGroup" do produces "application/json" - security [oidc_token: []] + security [{ oidc_token: [] }] response "200", "success" do let(:id) { product.id } diff --git a/lib/reporting/line_items.rb b/lib/reporting/line_items.rb index 1fa5cb56c5..8a709aa8e1 100644 --- a/lib/reporting/line_items.rb +++ b/lib/reporting/line_items.rb @@ -15,7 +15,7 @@ module Reporting @orders ||= search_orders end - def list(line_item_includes = [variant: [:supplier, :product]]) + def list(line_item_includes = [{ variant: [:supplier, :product] }]) line_items = order_permissions.visible_line_items.in_orders(orders.result) .order( "supplier.name", diff --git a/spec/support/request/stripe_stubs.rb b/spec/support/request/stripe_stubs.rb index 524233cffc..8132d8751e 100644 --- a/spec/support/request/stripe_stubs.rb +++ b/spec/support/request/stripe_stubs.rb @@ -144,7 +144,7 @@ module StripeStubs customer_id = options[:customer_id] || "cus_A123" { status: 200, body: JSON.generate(id: customer_id, - sources: { data: [id: customer_id] }) } + sources: { data: [{ id: customer_id }] }) } end def payment_successful_refund_mock