Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Add Codespell Github Workflow (#11450)

Matthew Kennedye7588717d55f
diff --git a/.github/workflows/spelling_lint.yml b/.github/workflows/spelling_lint.yml
new file mode 100644
index 0000000000..7793695c53
--- /dev/null
+++ b/.github/workflows/spelling_lint.yml
@@ -0,0 +1,34 @@
+---
+name: Lint Code Spelling
+
+on: [pull_request]
+
+jobs:
+ codespell:
+ name: Check spelling all files with codespell
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: [3.8]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install codespell
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+ - name: Check spelling with codespell
+ run: codespell --ignore-words=codespell.txt || exit 1
+ misspell:
+ name: Check spelling all files in commit with misspell
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install
+ run: wget -O - -q https://git.io/misspell | sh -s -- -b .
+ - name: Misspell
+ run: git ls-files --empty-directory | xargs ./misspell -i 'aircrafts,devels,invertions' -error
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e68a77334a..0a8f31411b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -126,7 +126,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Fix spec for the product sorting [#11135](https://github.com/spree/spree/pull/11135) ([Vegann](https://github.com/Vegann))
- [SD-1346] Adds admin panel stock menu for stock locations and transfers [#11134](https://github.com/spree/spree/pull/11134) ([aplegatt](https://github.com/aplegatt))
- Revert "SD-1354 Add pagination to the view of product's variants" [#11133](https://github.com/spree/spree/pull/11133) ([damianlegawiec](https://github.com/damianlegawiec))
-- SD-1356 remove overwritting default user addresses during checkout. [#11132](https://github.com/spree/spree/pull/11132) ([KacperMekarski](https://github.com/KacperMekarski))
+- SD-1356 remove overwriting default user addresses during checkout. [#11132](https://github.com/spree/spree/pull/11132) ([KacperMekarski](https://github.com/KacperMekarski))
- SD-1340 Add missing timestamps to join tables [#11130](https://github.com/spree/spree/pull/11130) ([tomurb](https://github.com/tomurb))
- SD-1354 Add pagination to the view of product's variants [#11129](https://github.com/spree/spree/pull/11129) ([tomurb](https://github.com/tomurb))
- SD-1349 Use dropdown for currency not text input in Promotion UI [#11128](https://github.com/spree/spree/pull/11128) ([tomurb](https://github.com/tomurb))
@@ -264,7 +264,7 @@ All notable, unreleased changes to this project will be documented in this file.
## [4.2.0] - 2021-02-25
-- Extract Storefront installer into a seperate Generator [#10802](https://github.com/spree/spree/pull/10802) ([damianlegawiec](https://github.com/damianlegawiec))
+- Extract Storefront installer into a separate Generator [#10802](https://github.com/spree/spree/pull/10802) ([damianlegawiec](https://github.com/damianlegawiec))
- Improve Spree installer [#10801](https://github.com/spree/spree/pull/10801) ([damianlegawiec](https://github.com/damianlegawiec))
- Add locales from the SpreeI18n to the routes [#10800](https://github.com/spree/spree/pull/10800) ([Vegann](https://github.com/Vegann))
- Support localized URLs [#10794](https://github.com/spree/spree/pull/10794) ([damianlegawiec](https://github.com/damianlegawiec))
@@ -522,7 +522,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Lower z-index on flatpickr, select2 & tooltips [#10356](https://github.com/spree/spree/pull/10356) ([MatthewKennedy](https://github.com/MatthewKennedy))
- ADMIN: Fix Bad ID on address form + Select2 styling. [#10355](https://github.com/spree/spree/pull/10355) ([MatthewKennedy](https://github.com/MatthewKennedy))
- ADMIN: Valid HTML [#10354](https://github.com/spree/spree/pull/10354) ([MatthewKennedy](https://github.com/MatthewKennedy))
-- Remove ID's & serif declerations from SVG's for valid HTML [#10353](https://github.com/spree/spree/pull/10353) ([MatthewKennedy](https://github.com/MatthewKennedy))
+- Remove ID's & serif declarations from SVG's for valid HTML [#10353](https://github.com/spree/spree/pull/10353) ([MatthewKennedy](https://github.com/MatthewKennedy))
- [SD-873] Fix additional scrollbar on Chrome/Windows [#10352](https://github.com/spree/spree/pull/10352) ([kaliszKrzysztof](https://github.com/kaliszKrzysztof))
- Align Product Buttons [#10351](https://github.com/spree/spree/pull/10351) ([MatthewKennedy](https://github.com/MatthewKennedy))
- Fix Appearance of Action Buttons in The Contextual Menu [#10350](https://github.com/spree/spree/pull/10350) ([MatthewKennedy](https://github.com/MatthewKennedy))
@@ -551,7 +551,7 @@ All notable, unreleased changes to this project will be documented in this file.
- irremovable-promotions [#10324](https://github.com/spree/spree/pull/10324) ([tomurb](https://github.com/tomurb))
- Use a single button in the content header to trigger the dropdown. [#10320](https://github.com/spree/spree/pull/10320) ([MatthewKennedy](https://github.com/MatthewKennedy))
- [SD-870] Change default orders count to 15 [#10318](https://github.com/spree/spree/pull/10318) ([kaliszKrzysztof](https://github.com/kaliszKrzysztof))
-- [SD-874] Change tooltip container so tooltip could disapear when its parent is deleted [#10317](https://github.com/spree/spree/pull/10317) ([kaliszKrzysztof](https://github.com/kaliszKrzysztof))
+- [SD-874] Change tooltip container so tooltip could disappear when its parent is deleted [#10317](https://github.com/spree/spree/pull/10317) ([kaliszKrzysztof](https://github.com/kaliszKrzysztof))
- [SD-869] Fix badge icon [#10316](https://github.com/spree/spree/pull/10316) ([kaliszKrzysztof](https://github.com/kaliszKrzysztof))
- [SD-868] Fix missing arrows in callendar [#10315](https://github.com/spree/spree/pull/10315) ([kaliszKrzysztof](https://github.com/kaliszKrzysztof))
- [SD-867] Increase sidebar width on large size [#10314](https://github.com/spree/spree/pull/10314) ([kaliszKrzysztof](https://github.com/kaliszKrzysztof))
@@ -589,7 +589,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Allow to use custom ability classes in testing environment [#10271](https://github.com/spree/spree/pull/10271) ([damianlegawiec](https://github.com/damianlegawiec))
- [WCAG-24] Add role navigation attribute [#10268](https://github.com/spree/spree/pull/10268) ([kaliszKrzysztof](https://github.com/kaliszKrzysztof))
- [WCAG-18] Fix main categories structure so user could see outline [#10267](https://github.com/spree/spree/pull/10267) ([kaliszKrzysztof](https://github.com/kaliszKrzysztof))
-- [SDP-343] Fixes multiple occurences of a product on admin products list search [#10265](https://github.com/spree/spree/pull/10265) ([aplegatt](https://github.com/aplegatt))
+- [SDP-343] Fixes multiple occurrences of a product on admin products list search [#10265](https://github.com/spree/spree/pull/10265) ([aplegatt](https://github.com/aplegatt))
- [SDP-250] Add vendor visibility on PDP with redirect to Vendor PLP [#10263](https://github.com/spree/spree/pull/10263) ([AleksandraKaminska](https://github.com/AleksandraKaminska))
- :building_construction: (backend) improve customer attribute editor. [#10262](https://github.com/spree/spree/pull/10262) ([imgarylai](https://github.com/imgarylai))
- [SDP-348] Filters are not highlighted after picking and refreshing modal [#10260](https://github.com/spree/spree/pull/10260) ([AleksandraKaminska](https://github.com/AleksandraKaminska))
diff --git a/api/app/controllers/spree/api/v1/checkouts_controller.rb b/api/app/controllers/spree/api/v1/checkouts_controller.rb
index 437f1396a1..e01d27c8f4 100644
--- a/api/app/controllers/spree/api/v1/checkouts_controller.rb
+++ b/api/app/controllers/spree/api/v1/checkouts_controller.rb
@@ -47,7 +47,7 @@ module Spree
params[:order][:user_id] if params[:order]
end
- # Should be overriden if you have areas of your checkout that don't match
+ # Should be overridden if you have areas of your checkout that don't match
# up to a step within checkout_steps, such as a registration step
def skip_state_validation?
false
diff --git a/api/app/controllers/spree/api/v2/base_controller.rb b/api/app/controllers/spree/api/v2/base_controller.rb
index 9e4615a68a..57f8abc1cb 100644
--- a/api/app/controllers/spree/api/v2/base_controller.rb
+++ b/api/app/controllers/spree/api/v2/base_controller.rb
@@ -89,13 +89,13 @@ module Spree
raise CanCan::AccessDenied if spree_current_user.nil?
end
- # Needs to be overriden so that we use Spree's Ability rather than anyone else's.
+ # Needs to be overridden so that we use Spree's Ability rather than anyone else's.
def current_ability
@current_ability ||= Spree::Dependencies.ability_class.constantize.new(spree_current_user)
end
def request_includes
- # if API user want's to receive only the bare-minimum
+ # if API user wants to receive only the bare-minimum
# the API will return only the main resource without any included
if params[:include]&.blank?
[]
diff --git a/api/app/controllers/spree/api/v2/resource_controller.rb b/api/app/controllers/spree/api/v2/resource_controller.rb
index bf512187e8..9992b2ee6a 100644
--- a/api/app/controllers/spree/api/v2/resource_controller.rb
+++ b/api/app/controllers/spree/api/v2/resource_controller.rb
@@ -24,10 +24,10 @@ module Spree
end
def allowed_sort_attributes
- default_sort_atributes
+ default_sort_attributes
end
- def default_sort_atributes
+ def default_sort_attributes
[:id, :name, :slug, :number, :position, :updated_at, :created_at, :deleted_at]
end
diff --git a/api/config/initializers/rabl.rb b/api/config/initializers/rabl.rb
index 85a562e386..080dd4ffea 100644
--- a/api/config/initializers/rabl.rb
+++ b/api/config/initializers/rabl.rb
@@ -3,7 +3,7 @@ Rabl.configure do |config|
config.include_child_root = false
# Motivation here it make it call as_json when rendering timestamps
- # and therefore display miliseconds. Otherwise it would fall to
- # JSON.dump which doesn't display the miliseconds
+ # and therefore display milliseconds. Otherwise it would fall to
+ # JSON.dump which doesn't display the milliseconds
config.json_engine = ActiveSupport::JSON
end
diff --git a/api/docs/v2/storefront/index.yaml b/api/docs/v2/storefront/index.yaml
index 95c9237ce3..ebb1ab3c71 100644
--- a/api/docs/v2/storefront/index.yaml
+++ b/api/docs/v2/storefront/index.yaml
@@ -146,7 +146,7 @@ paths:
lastname: Winterburn
company: Paper Street Soap Co.
address1: 775 Old Georgetown Road
- address2: 3nd Floor
+ address2: 3rd Floor
city: Qethesda
phone: '3488545445002'
zipcode: '90210'
@@ -199,7 +199,7 @@ paths:
lastname: Smith
company: Woodbank School
address1: 234 Old Georgetown Road
- address2: 1nd Floor
+ address2: 1st Floor
city: Aethesda
phone: '34885493845002'
zipcode: '90211'
@@ -848,7 +848,7 @@ paths:
description: |-
Completes the checkout by marking the order as complete.
- **Please be aware**; Once a checkout is marked as `complete` it is considered a completed order, the Cart and Checkout endpoints will no longer acces a completed order, and a new cart will need to be created.
+ **Please be aware**; Once a checkout is marked as `complete` it is considered a completed order, the Cart and Checkout endpoints will no longer access a completed order, and a new cart will need to be created.
If you want to access a completed order you will need to use the **Account / Orders** or **Order Status** endpoints.
operationId: complete-checkout
@@ -1447,7 +1447,7 @@ paths:
variant_id: '149'
quantity: 3
description: |-
- Passing a quantity value is optional for those wishlist systems that do not support quantities. In this scenario, the retuned quantity value will always be `1`, allowing the add-to-cart and pricing to reflect the single representation of the wished item accurately.
+ Passing a quantity value is optional for those wishlist systems that do not support quantities. In this scenario, the returned quantity value will always be `1`, allowing the add-to-cart and pricing to reflect the single representation of the wished item accurately.
If the wishlist system you are building allows for setting quantity, add the quantity attribute to the request body with an integer value greater than zero.
responses:
@@ -1684,7 +1684,7 @@ components:
state_code:
type: string
example: CA
- description: State abbrevation
+ description: State abbreviation
country_name:
type: string
example: United States of America
@@ -1744,7 +1744,7 @@ components:
description: 'Valid zipcode, will be validated against the selected Country'
state_name:
type: string
- description: State/region/province 2 letter abbrevation
+ description: State/region/province 2 letter abbreviation
country_iso:
type: string
description: 'Country ISO (2-chars) or ISO3 (3-chars) code. [List of all codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)'
@@ -2968,7 +2968,7 @@ components:
abbr:
type: string
example: NY
- description: State abbrevation
+ description: State abbreviation
name:
type: string
example: New York
@@ -3548,7 +3548,7 @@ components:
properties:
data:
$ref: '#/components/schemas/Relation'
- description: Digital links are accessable in the order includes line_items.digital_links
+ description: Digital links are accessible in the order includes line_items.digital_links
parameters:
Token:
name: token
@@ -4874,7 +4874,7 @@ components:
firstname: Emma
lastname: Carragher
address1: 775645 Old Georgetown Road
- address2: 3nd Floor
+ address2: 3rd Floor
city: Qethesda
zipcode: '90210'
phone: '3488545445002'
@@ -4914,7 +4914,7 @@ components:
firstname: Mark
lastname: Winterburn
address1: 775645 Old Georgetown Road
- address2: 3nd Floor
+ address2: 3rd Floor
city: Qethesda
zipcode: '90210'
phone: '3488545445002'
@@ -6734,14 +6734,14 @@ components:
- id: '106'
type: product
attributes:
- name: Leightweight Running Jacket
+ name: Lightweight Running Jacket
description: Ipsum dolorum quo fugit reiciendis quae cupiditate. Quas incidunt adipisci iure quasi quaerat in laborum animi. Quo molestiae aperiam officiis provident voluptates a nesciunt.
available_on: '2021-10-02T11:02:30.674Z'
- slug: leightweight-running-jacket
+ slug: Lightweight-running-jacket
meta_description: null
meta_keywords: null
updated_at: '2021-10-02T11:03:14.967Z'
- sku: Sweatshirts_leightweightrunningjacket_10.99
+ sku: Sweatshirts_Lightweightrunningjacket_10.99
purchasable: true
in_stock: true
backorderable: false
diff --git a/api/lib/spree/api/testing_support/helpers.rb b/api/lib/spree/api/testing_support/helpers.rb
index 0085aa7cfc..9c78e81fde 100644
--- a/api/lib/spree/api/testing_support/helpers.rb
+++ b/api/lib/spree/api/testing_support/helpers.rb
@@ -25,7 +25,7 @@ module Spree
allow(Spree.user_class).to receive(:find_by).with(hash_including(:spree_api_key)) { current_api_user }
end
- # This method can be overriden (with a let block) inside a context
+ # This method can be overridden (with a let block) inside a context
# For instance, if you wanted to have an admin user instead.
def current_api_user
@current_api_user ||= stub_model(Spree.user_class, email: '[email protected]')
diff --git a/api/spec/controllers/spree/api/v1/checkouts_controller_spec.rb b/api/spec/controllers/spree/api/v1/checkouts_controller_spec.rb
index c2b8fd8dc8..085f5323d5 100644
--- a/api/spec/controllers/spree/api/v1/checkouts_controller_spec.rb
+++ b/api/spec/controllers/spree/api/v1/checkouts_controller_spec.rb
@@ -251,7 +251,7 @@ module Spree
expect(response.status).to eq(200)
end
- it 'can transition from confirm to delivery wtih logging state changes' do
+ it 'can transition from confirm to delivery with logging state changes' do
order.update_columns(state: 'confirm')
allow_any_instance_of(Spree::Order).to receive_messages(payment_required?: false)
api_put :update, state: 'delivery', id: order.to_param, order_token: order.token
diff --git a/api/spec/controllers/spree/api/v1/countries_controller_spec.rb b/api/spec/controllers/spree/api/v1/countries_controller_spec.rb
index dd2d7336dc..d39ac38043 100644
--- a/api/spec/controllers/spree/api/v1/countries_controller_spec.rb
+++ b/api/spec/controllers/spree/api/v1/countries_controller_spec.rb
@@ -25,7 +25,7 @@ module Spree
expect(json_response['pages']).to eq(1)
end
- it 'can query the results through a paramter' do
+ it 'can query the results through a parameter' do
api_get :index, q: { name_cont: 'zam' }
expect(json_response['count']).to eq(1)
expect(json_response['countries'].first['name']).to eq @zambia.name
diff --git a/api/spec/controllers/spree/api/v1/orders_controller_spec.rb b/api/spec/controllers/spree/api/v1/orders_controller_spec.rb
index d04bdf4673..5b7b2890e2 100755
--- a/api/spec/controllers/spree/api/v1/orders_controller_spec.rb
+++ b/api/spec/controllers/spree/api/v1/orders_controller_spec.rb
@@ -558,7 +558,7 @@ module Spree
end
end
- it 'responds with orders updated_at with miliseconds precision' do
+ it 'responds with orders updated_at with milliseconds precision' do
if ApplicationRecord.connection.adapter_name == 'Mysql2'
skip 'MySQL does not support millisecond timestamps.'
else
@@ -566,9 +566,9 @@ module Spree
end
api_get :index
- milisecond = order.updated_at.strftime('%L')
+ millisecond = order.updated_at.strftime('%L')
updated_at = json_response['orders'].first['updated_at']
- expect(updated_at.split('T').last).to have_content(milisecond)
+ expect(updated_at.split('T').last).to have_content(millisecond)
end
context 'caching enabled' do
diff --git a/api/spec/controllers/spree/api/v1/return_authorizations_controller_spec.rb b/api/spec/controllers/spree/api/v1/return_authorizations_controller_spec.rb
index e5dda78a9d..e7ac814c31 100644
--- a/api/spec/controllers/spree/api/v1/return_authorizations_controller_spec.rb
+++ b/api/spec/controllers/spree/api/v1/return_authorizations_controller_spec.rb
@@ -81,7 +81,7 @@ module Spree
expect(json_response['pages']).to eq(2)
end
- it 'can query the results through a paramter' do
+ it 'can query the results through a parameter' do
FactoryBot.create(:return_authorization, order: order)
expected_result = create(:return_authorization, memo: 'damaged')
order.return_authorizations << expected_result
diff --git a/api/spec/controllers/spree/api/v1/states_controller_spec.rb b/api/spec/controllers/spree/api/v1/states_controller_spec.rb
index d323c3ba0d..df327752c2 100644
--- a/api/spec/controllers/spree/api/v1/states_controller_spec.rb
+++ b/api/spec/controllers/spree/api/v1/states_controller_spec.rb
@@ -71,7 +71,7 @@ module Spree
expect(json_response['states'].first).to have_attributes(attributes)
end
- it 'can query the results through a paramter' do
+ it 'can query the results through a parameter' do
api_get :index, q: { name_cont: 'Vic' }
expect(json_response['states'].first['name']).to eq('Victoria')
end
diff --git a/api/spec/controllers/spree/api/v1/stock_items_controller_spec.rb b/api/spec/controllers/spree/api/v1/stock_items_controller_spec.rb
index 458f6218ab..53e689e56e 100644
--- a/api/spec/controllers/spree/api/v1/stock_items_controller_spec.rb
+++ b/api/spec/controllers/spree/api/v1/stock_items_controller_spec.rb
@@ -72,14 +72,14 @@ module Spree
expect(json_response['current_page']).to eq(1)
end
- it 'can query the results through a paramter (count_on_hand)' do
+ it 'can query the results through a parameter (count_on_hand)' do
stock_item.update_column(:count_on_hand, 30)
api_get :index, stock_location_id: stock_location.to_param, q: { count_on_hand_eq: '30' }
expect(json_response['count']).to eq(1)
expect(json_response['stock_items'].first['count_on_hand']).to eq 30
end
- it 'can query the results through a paramter (variant_id)' do
+ it 'can query the results through a parameter (variant_id)' do
api_get :index, stock_location_id: stock_location.to_param, q: { variant_id_eq: 999_999 }
expect(json_response['count']).to eq(0)
api_get :index, stock_location_id: stock_location.to_param, q: { variant_id_eq: stock_item.variant_id }
diff --git a/api/spec/controllers/spree/api/v1/stock_locations_controller_spec.rb b/api/spec/controllers/spree/api/v1/stock_locations_controller_spec.rb
index 09d4a38364..59b9428711 100644
--- a/api/spec/controllers/spree/api/v1/stock_locations_controller_spec.rb
+++ b/api/spec/controllers/spree/api/v1/stock_locations_controller_spec.rb
@@ -63,7 +63,7 @@ module Spree
expect(json_response['pages']).to eq(2)
end
- it 'can query the results through a paramter' do
+ it 'can query the results through a parameter' do
expected_result = create(:stock_location, name: 'South America')
api_get :index, q: { name_cont: 'south' }
expect(json_response['count']).to eq(1)
diff --git a/api/spec/controllers/spree/api/v1/stock_movements_controller_spec.rb b/api/spec/controllers/spree/api/v1/stock_movements_controller_spec.rb
index cde9de26e2..c7651c0fe3 100644
--- a/api/spec/controllers/spree/api/v1/stock_movements_controller_spec.rb
+++ b/api/spec/controllers/spree/api/v1/stock_movements_controller_spec.rb
@@ -54,7 +54,7 @@ module Spree
expect(json_response['pages']).to eq(2)
end
- it 'can query the results through a paramter' do
+ it 'can query the results through a parameter' do
create(:stock_movement, :received, quantity: 10, stock_item: stock_item)
api_get :index, stock_location_id: stock_location.to_param, q: { quantity_eq: '10' }
expect(json_response['count']).to eq(1)
diff --git a/api/spec/controllers/spree/api/v1/taxonomies_controller_spec.rb b/api/spec/controllers/spree/api/v1/taxonomies_controller_spec.rb
index f08a1801b7..b78bc71903 100644
--- a/api/spec/controllers/spree/api/v1/taxonomies_controller_spec.rb
+++ b/api/spec/controllers/spree/api/v1/taxonomies_controller_spec.rb
@@ -32,7 +32,7 @@ module Spree
expect(json_response['pages']).to eq(2)
end
- it 'can query the results through a paramter' do
+ it 'can query the results through a parameter' do
expected_result = create(:taxonomy, name: 'Style')
api_get :index, q: { name_cont: 'style' }
expect(json_response['count']).to eq(1)
diff --git a/api/spec/controllers/spree/api/v1/users_controller_spec.rb b/api/spec/controllers/spree/api/v1/users_controller_spec.rb
index 588e67e1da..cc8af5ccf3 100644
--- a/api/spec/controllers/spree/api/v1/users_controller_spec.rb
+++ b/api/spec/controllers/spree/api/v1/users_controller_spec.rb
@@ -185,7 +185,7 @@ module Spree
expect(json_response['users'].size).to eq 0
end
- it 'existing email paramter' do
+ it 'existing email parameter' do
api_get :index, q: {
email_start: 'actor',
bill_address_firstname_start: 'actor',
diff --git a/api/spec/controllers/spree/api/v1/zones_controller_spec.rb b/api/spec/controllers/spree/api/v1/zones_controller_spec.rb
index 0ece66c196..6325a0150f 100644
--- a/api/spec/controllers/spree/api/v1/zones_controller_spec.rb
+++ b/api/spec/controllers/spree/api/v1/zones_controller_spec.rb
@@ -24,7 +24,7 @@ module Spree
expect(json_response['pages']).to eq(2)
end
- it 'can query the results through a paramter' do
+ it 'can query the results through a parameter' do
expected_result = create(:zone, name: 'South America')
api_get :index, q: { name_cont: 'south' }
expect(json_response['count']).to eq(1)
diff --git a/api/spec/requests/spree/api/v2/storefront/wishlists_spec.rb b/api/spec/requests/spree/api/v2/storefront/wishlists_spec.rb
index f1cb07a679..7490c4e3a4 100644
--- a/api/spec/requests/spree/api/v2/storefront/wishlists_spec.rb
+++ b/api/spec/requests/spree/api/v2/storefront/wishlists_spec.rb
@@ -196,7 +196,7 @@ RSpec.describe Spree::Api::V2::Storefront::WishlistsController, type: :request d
let!(:set_variant) { create(:variant) }
let!(:wi) { create(:wished_item, wishlist: user.wishlists.first, variant: set_variant, quantity: 1) }
- it 'return the existing wished_item - quantity atribute passed in' do
+ it 'return the existing wished_item - quantity attribute passed in' do
post "/api/v2/storefront/wishlists/#{user.wishlists.first.token}/add_item", headers: headers_bearer,
params: {
variant_id: set_variant.id.to_s,
@@ -210,7 +210,7 @@ RSpec.describe Spree::Api::V2::Storefront::WishlistsController, type: :request d
expect(json_response['data']['attributes']['quantity']).to eql (1)
end
- it 'return the existing wished_item - quantity atribute ommited' do
+ it 'return the existing wished_item - quantity attribute ommited' do
post "/api/v2/storefront/wishlists/#{user.wishlists.first.token}/add_item", headers: headers_bearer,
params: {
variant_id: set_variant.id.to_s
@@ -234,7 +234,7 @@ RSpec.describe Spree::Api::V2::Storefront::WishlistsController, type: :request d
expect(json_response['data']['attributes']['quantity']).to eql (1)
end
- it 'must not permit the creation of a new wished_item witout the variant_id attribute' do
+ it 'must not permit the creation of a new wished_item without the variant_id attribute' do
post "/api/v2/storefront/wishlists/#{user.wishlists.first.token}/add_item", headers: headers_bearer,
params: {
bad_variant_id: variant.id.to_s
diff --git a/cli/README.md b/cli/README.md
index ab3d6828c3..48437f07e0 100644
--- a/cli/README.md
+++ b/cli/README.md
@@ -8,4 +8,4 @@ To build a new Spree Extension, you can run
spree extension my_extension
```
-This wll create a brand new project with all the developer tools and gems needed to developer your extension.
+This will create a brand new project with all the developer tools and gems needed to developer your extension.
diff --git a/cli/lib/spree_cli/templates/extension/README.md b/cli/lib/spree_cli/templates/extension/README.md
index 8b01710dfa..789d13ef71 100644
--- a/cli/lib/spree_cli/templates/extension/README.md
+++ b/cli/lib/spree_cli/templates/extension/README.md
@@ -49,7 +49,7 @@ bundle exec gem bump -p -t
bundle exec gem release
```
-For more options please see [gem-release REAMDE](https://github.com/svenfuchs/gem-release)
+For more options please see [gem-release README](https://github.com/svenfuchs/gem-release)
## Contributing
diff --git a/codespell.txt b/codespell.txt
new file mode 100644
index 0000000000..effb801d0f
--- /dev/null
+++ b/codespell.txt
@@ -0,0 +1,19 @@
+cliente
+doesnt
+upto
+optio
+ba
+fo
+fro
+com
+sur
+som
+sie
+tha
+aircrafts
+devels
+invertions
+reenable
+xdescribe
+ot
+sur
diff --git a/core/app/helpers/spree/products_helper.rb b/core/app/helpers/spree/products_helper.rb
index a2e3c28074..de8bc8462c 100644
--- a/core/app/helpers/spree/products_helper.rb
+++ b/core/app/helpers/spree/products_helper.rb
@@ -68,7 +68,7 @@ module Spree
cache_key_elements.compact.join('/')
end
- def limit_descritpion(string)
+ def limit_description(string)
return string if string.length <= 450
string.slice(0..449) + '...'
diff --git a/core/app/models/concerns/spree/memoized_data.rb b/core/app/models/concerns/spree/memoized_data.rb
index 4dfd927a65..6c3d9b2246 100644
--- a/core/app/models/concerns/spree/memoized_data.rb
+++ b/core/app/models/concerns/spree/memoized_data.rb
@@ -3,7 +3,7 @@ module Spree
extend ActiveSupport::Concern
included do
- # reset cache on save inside trasaction and transaction commit
+ # reset cache on save inside transaction and transaction commit
after_save :reset_memoized_data
after_commit :reset_memoized_data
diff --git a/core/app/models/concerns/spree/multi_store_resource.rb b/core/app/models/concerns/spree/multi_store_resource.rb
index f791bc43c4..be074eba69 100644
--- a/core/app/models/concerns/spree/multi_store_resource.rb
+++ b/core/app/models/concerns/spree/multi_store_resource.rb
@@ -16,7 +16,7 @@ module Spree
errors.add(:stores, Spree.t(:must_have_one_store))
end
- # this can be overriden on model basis
+ # this can be overridden on model basis
def disable_store_presence_validation?
Spree::Config[:disable_store_presence_validation]
end
diff --git a/core/app/models/spree/address.rb b/core/app/models/spree/address.rb
index f3c2b2a016..a63d935953 100644
--- a/core/app/models/spree/address.rb
+++ b/core/app/models/spree/address.rb
@@ -23,7 +23,7 @@ module Spree
# we're not freezing this on purpose so developers can extend and manage
# those attributes depending of the logic of their applications
ADDRESS_FIELDS = %w(firstname lastname company address1 address2 city state zipcode country phone)
- EXCLUDED_KEYS_FOR_COMPARISION = %w(id updated_at created_at deleted_at label user_id)
+ EXCLUDED_KEYS_FOR_COMPARISON = %w(id updated_at created_at deleted_at label user_id)
scope :not_deleted, -> { where(deleted_at: nil) }
@@ -117,7 +117,7 @@ module Spree
end
def value_attributes
- attributes.except(*EXCLUDED_KEYS_FOR_COMPARISION)
+ attributes.except(*EXCLUDED_KEYS_FOR_COMPARISON)
end
def empty?
diff --git a/core/app/models/spree/calculator.rb b/core/app/models/spree/calculator.rb
index 5caca1810f..1c3eefaa42 100644
--- a/core/app/models/spree/calculator.rb
+++ b/core/app/models/spree/calculator.rb
@@ -4,7 +4,7 @@ module Spree
belongs_to :calculable, polymorphic: true, optional: true
- # This method calls a compute_<computable> method. must be overriden in concrete calculator.
+ # This method calls a compute_<computable> method. must be overridden in concrete calculator.
#
# It should return amount computed based on #calculable and the computable parameter
def compute(computable)
diff --git a/core/app/models/spree/order.rb b/core/app/models/spree/order.rb
index 3f5051f708..847b3f2270 100644
--- a/core/app/models/spree/order.rb
+++ b/core/app/models/spree/order.rb
@@ -188,7 +188,7 @@ module Spree
update_hooks.add(hook)
end
- # For compatiblity with Calculator::PriceSack
+ # For compatibility with Calculator::PriceSack
def amount
line_items.inject(0.0) { |sum, li| sum + li.amount }
end
diff --git a/core/app/models/spree/order/checkout.rb b/core/app/models/spree/order/checkout.rb
index 9efc8151f9..16cd449040 100644
--- a/core/app/models/spree/order/checkout.rb
+++ b/core/app/models/spree/order/checkout.rb
@@ -225,7 +225,7 @@ module Spree
@updating_params = params
run_callbacks :updating_from_params do
# Set existing card after setting permitted parameters because
- # rails would slice parameters containg ruby objects, apparently
+ # rails would slice parameters containing ruby objects, apparently
existing_card_id = @updating_params[:order] ? @updating_params[:order].delete(:existing_card) : nil
attributes = if @updating_params[:order]
diff --git a/core/app/models/spree/payment.rb b/core/app/models/spree/payment.rb
index b6502fc17e..4bf9a1fcd9 100644
--- a/core/app/models/spree/payment.rb
+++ b/core/app/models/spree/payment.rb
@@ -102,7 +102,7 @@ module Spree
transition from: [:pending, :processing, :completed, :checkout], to: :void
end
after_transition to: :void, do: :after_void
- # when the card brand isnt supported
+ # when the card brand isn't supported
event :invalidate do
transition from: [:checkout], to: :invalid
end
diff --git a/core/app/models/spree/preferences/configuration.rb b/core/app/models/spree/preferences/configuration.rb
index 5e33f6fce3..6cb22bf493 100644
--- a/core/app/models/spree/preferences/configuration.rb
+++ b/core/app/models/spree/preferences/configuration.rb
@@ -1,5 +1,5 @@
-# This takes the preferrable methods and adds some
-# syntatic sugar to access the preferences
+# This takes the preferable methods and adds some
+# syntactic sugar to access the preferences
#
# class App < Configuration
# preference :color, :string
diff --git a/core/app/models/spree/preferences/store.rb b/core/app/models/spree/preferences/store.rb
index af30cbd952..cd8e065fec 100644
--- a/core/app/models/spree/preferences/store.rb
+++ b/core/app/models/spree/preferences/store.rb
@@ -36,7 +36,7 @@ module Spree::Preferences
def get(key)
# return the retrieved value, if it's in the cache
- # use unless nil? incase the value is actually boolean false
+ # use unless nil? in case the value is actually boolean false
#
unless (val = @cache.read(key)).nil?
return val
diff --git a/core/app/models/spree/product.rb b/core/app/models/spree/product.rb
index c80beab7ac..f7c6d3f332 100644
--- a/core/app/models/spree/product.rb
+++ b/core/app/models/spree/product.rb
@@ -141,17 +141,17 @@ module Spree
alias master_images images
- # Cant use short form block syntax due to https://github.com/Netflix/fast_jsonapi/issues/259
+ # Can't use short form block syntax due to https://github.com/Netflix/fast_jsonapi/issues/259
def purchasable?
default_variant.purchasable? || variants.any?(&:purchasable?)
end
- # Cant use short form block syntax due to https://github.com/Netflix/fast_jsonapi/issues/259
+ # Can't use short form block syntax due to https://github.com/Netflix/fast_jsonapi/issues/259
def in_stock?
default_variant.in_stock? || variants.any?(&:in_stock?)
end
- # Cant use short form block syntax due to https://github.com/Netflix/fast_jsonapi/issues/259
+ # Can't use short form block syntax due to https://github.com/Netflix/fast_jsonapi/issues/259
def backorderable?
default_variant.backorderable? || variants.any?(&:backorderable?)
end
diff --git a/core/app/models/spree/promotion/rules/product.rb b/core/app/models/spree/promotion/rules/product.rb
index aac438e49f..8271dea27d 100644
--- a/core/app/models/spree/promotion/rules/product.rb
+++ b/core/app/models/spree/promotion/rules/product.rb
@@ -1,6 +1,6 @@
# A rule to limit a promotion based on products in the order.
# Can require all or any of the products to be present.
-# Valid products either come from assigned product group or are assingned directly to the rule.
+# Valid products either come from assigned product group or are assigned directly to the rule.
module Spree
class Promotion
module Rules
diff --git a/core/app/models/spree/promotion_action.rb b/core/app/models/spree/promotion_action.rb
index 7512ce2421..cb4a4c5981 100644
--- a/core/app/models/spree/promotion_action.rb
+++ b/core/app/models/spree/promotion_action.rb
@@ -8,7 +8,7 @@ module Spree
scope :of_type, ->(t) { where(type: t) }
- # This method should be overriden in subclass
+ # This method should be overridden in subclass
# Updates the state of the order or performs some other action depending on the subclass
# options will contain the payload from the event that activated the promotion. This will include
# the key :user which allows user based actions to be performed in addition to actions on the order
diff --git a/core/app/models/spree/shipment.rb b/core/app/models/spree/shipment.rb
index a99bbde8a2..b9d7d9fca6 100644
--- a/core/app/models/spree/shipment.rb
+++ b/core/app/models/spree/shipment.rb
@@ -215,7 +215,7 @@ module Spree
return shipping_rates if shipped?
return [] unless can_get_rates?
- # StockEstimator.new assigment below will replace the current shipping_method
+ # StockEstimator.new assignment below will replace the current shipping_method
original_shipping_method_id = shipping_method.try(:id)
self.shipping_rates = Stock::Estimator.new(order).
diff --git a/core/app/models/spree/stock_item.rb b/core/app/models/spree/stock_item.rb
index 9649271b86..ed0d04bdff 100644
--- a/core/app/models/spree/stock_item.rb
+++ b/core/app/models/spree/stock_item.rb
@@ -79,7 +79,7 @@ module Spree
if unit.quantity > number
# if required quantity is greater than available
- # split off and fullfill that
+ # split off and fulfill that
split = unit.split_inventory!(number)
split.fill_backorder
else
diff --git a/core/config/locales/en.yml b/core/config/locales/en.yml
index 51d7d21eea..200066dba9 100644
--- a/core/config/locales/en.yml
+++ b/core/config/locales/en.yml
@@ -623,7 +623,7 @@ en:
square_image: Please use an image with an aspect ratio of 18:13 (1080px x 780px).
tall_image: Please use an image with an aspect ratio of 27:40 (1080px x 1600px).
linkable:
- seach_for_a_page: Search for a page
+ search_for_a_page: Search for a page
tab:
configuration: Configuration
content: Content
@@ -710,8 +710,8 @@ en:
subtitle: Subtitle
url_info: 'The URL field can link to an external website using <b>https://example.com</b>, link to an otherwise unreachable internal path using <b>/policies/privacy</b>,
launch an email client using <b>mailto:[email protected]</b> or used to create a clickable phone number with <b>tel:123456789</b>'
- seach_for_a_product: Search for a Product
- seach_for_a_taxon: Search for a Taxon
+ search_for_a_product: Search for a Product
+ search_for_a_taxon: Search for a Taxon
settings: Settings
set_a_code: "Adding a code is optional but can be useful if you need to identify this menu item. When building
the Spree main menu use the code <b>category</b> or <b>promo</b> to create the containers that organize links and promotions appropriately. To learn more view the documentation by <a href='https://guides.spreecommerce.org/user/navigation/add_menu_items.html' target='_blank' class='alert-link'>clicking here</a>."
@@ -790,7 +790,7 @@ en:
cannot_set_shipping_method_without_address: Cannot set shipping method until customer details are provided.
capture: Capture
capture_events: Capture events
- card_code: Card Varification Code (CVC)
+ card_code: Card Verification Code (CVC)
card_number: Card Number
card_type: Brand
card_type_is: Card type is
@@ -1253,7 +1253,7 @@ en:
no_pending_payments: No pending payments
no_product_available:
for_this_quantity: Sorry, it looks like some products are not available in selected quantity.
- opps: Oops!
+ oops: Oops!
no_products_found: No products found
no_results: No results
no_rules_added: No rules added
diff --git a/core/lib/spree/core/app_dependencies.rb b/core/lib/spree/core/app_dependencies.rb
index 5c21d4a96d..918477cdbd 100644
--- a/core/lib/spree/core/app_dependencies.rb
+++ b/core/lib/spree/core/app_dependencies.rb
@@ -74,7 +74,7 @@ module Spree
@collection_paginator = 'Spree::Shared::Paginate'
# coupons
- # TODO: we should split this service into 2 seperate - Add and Remove
+ # TODO: we should split this service into 2 separate - Add and Remove
@coupon_handler = 'Spree::PromotionHandler::Coupon'
# account
diff --git a/core/lib/spree/core/controller_helpers/auth.rb b/core/lib/spree/core/controller_helpers/auth.rb
index 4d22f689b3..05f44f26ad 100644
--- a/core/lib/spree/core/controller_helpers/auth.rb
+++ b/core/lib/spree/core/controller_helpers/auth.rb
@@ -14,7 +14,7 @@ module Spree
end
end
- # Needs to be overriden so that we use Spree's Ability rather than anyone else's.
+ # Needs to be overridden so that we use Spree's Ability rather than anyone else's.
def current_ability
@current_ability ||= Spree::Dependencies.ability_class.constantize.new(try_spree_current_user)
end
diff --git a/core/lib/tasks/core.rake b/core/lib/tasks/core.rake
index 83df7d670c..50ba5a9962 100644
--- a/core/lib/tasks/core.rake
+++ b/core/lib/tasks/core.rake
@@ -22,7 +22,7 @@ use rake db:load_file[/absolute/path/to/sample/filename.rb]}
ruby_files[File.basename(fixture_file, '.*')] = fixture_file
end
ruby_files.sort.each do |fixture, ruby_file|
- # If file exists within application it takes precendence.
+ # If file exists within application it takes precedence.
if File.exist?(File.join(Rails.root, 'db/default/spree', "#{fixture}.rb"))
ruby_file = File.expand_path(File.join(Rails.root, 'db/default/spree', "#{fixture}.rb"))
end
@@ -55,7 +55,7 @@ use rake db:load_file[/absolute/path/to/sample/filename.rb]}
task :bootstrap do
require 'highline/import'
- # remigrate unless production mode (as saftey check)
+ # remigrate unless production mode (as safety check)
if %w[demo development test].include? Rails.env
if ENV['AUTO_ACCEPT'] || agree("This task will destroy any data in the database. Are you sure you want to \ncontinue? [y/n] ")
ENV['SKIP_NAG'] = 'yes'
@@ -109,7 +109,7 @@ use rake db:load_file[/absolute/path/to/sample/filename.rb]}
end
end
- puts 'WARNING: This task will re-associate any line_items associated with deleted variants to non-deleted variants with matching SKUs. Because other attributes and product associations may switch during the re-association, this may have unintended side-effects. If this task finishes successfully, line items for old order should no longer be orphaned from their varaints. You should run this task after you have already run the db migratoin AddDiscontinuedToProductsAndVariants. If the db migration did not warn you that it was leaving deleted records in place because of duplicate SKUs, then you do not need to run this rake task.'
+ puts 'WARNING: This task will re-associate any line_items associated with deleted variants to non-deleted variants with matching SKUs. Because other attributes and product associations may switch during the re-association, this may have unintended side-effects. If this task finishes successfully, line items for old order should no longer be orphaned from their variants. You should run this task after you have already run the db migratoin AddDiscontinuedToProductsAndVariants. If the db migration did not warn you that it was leaving deleted records in place because of duplicate SKUs, then you do not need to run this rake task.'
puts 'Are you sure you want to continue? (Y/n):'
if get_input
diff --git a/core/spec/helpers/base_helper_spec.rb b/core/spec/helpers/base_helper_spec.rb
index d5d904607e..93e71ef925 100644
--- a/core/spec/helpers/base_helper_spec.rb
+++ b/core/spec/helpers/base_helper_spec.rb
@@ -246,7 +246,7 @@ describe Spree::BaseHelper, type: :helper do
expect(pretty_time(time)).to eq "May 06, 2012 1:33 PM #{time.zone}"
end
- it 'return empty stirng when nil is supplied' do
+ it 'return empty string when nil is supplied' do
expect(pretty_time(nil)).to eq ''
end
end
@@ -256,7 +256,7 @@ describe Spree::BaseHelper, type: :helper do
expect(pretty_date(Time.new(2012, 5, 6, 13, 33))).to eq 'May 06, 2012'
end
- it 'return empty stirng when nil is supplied' do
+ it 'return empty string when nil is supplied' do
expect(pretty_date(nil)).to eq ''
end
end
diff --git a/core/spec/lib/search/base_spec.rb b/core/spec/lib/search/base_spec.rb
index 3719dd06e0..502aeb6a9d 100644
--- a/core/spec/lib/search/base_spec.rb
+++ b/core/spec/lib/search/base_spec.rb
@@ -18,7 +18,7 @@ describe Spree::Core::Search::Base do
expect(searcher.retrieve_products.count).to eq(2)
end
- context 'when include_images is included in the initalization params' do
+ context 'when include_images is included in the initialization params' do
subject { described_class.new(params).retrieve_products }
let(:params) { { include_images: true, keyword: product1.name, taxon: taxon } }
diff --git a/core/spec/lib/spree/core/importer/order_spec.rb b/core/spec/lib/spree/core/importer/order_spec.rb
index aef28bfc15..959335632f 100644
--- a/core/spec/lib/spree/core/importer/order_spec.rb
+++ b/core/spec/lib/spree/core/importer/order_spec.rb
@@ -233,7 +233,7 @@ module Spree
end
context 'variant was deleted' do
- it 'raise error as variant shouldnt be found' do
+ it "raise error as variant shouldn't be found" do
variant.product.destroy
hash = { sku: variant.sku }
expect { Importer::Order.ensure_variant_id_from_params(hash) }.to raise_error("Ensure order import variant: Variant w/SKU #{hash[:sku]} not found.")
@@ -248,7 +248,7 @@ module Spree
end
end
- it 'raises with proper message when cant find country' do
+ it "raises with proper message when can't find country" do
address = { country: { 'name' => 'NoNoCountry' } }
expect { Importer::Order.ensure_country_id_from_params(address) }.to raise_error(/NoNoCountry/)
end
@@ -320,7 +320,7 @@ module Spree
expect(shipment.stock_location).to eq stock_location
end
- it 'raises if cant find stock location' do
+ it "raises if can't find stock location" do
params[:shipments_attributes][0][:stock_location] = 'doesnt exist'
expect { Importer::Order.import(user, params) }.to raise_error(StandardError)
end
diff --git a/core/spec/models/spree/ability_spec.rb b/core/spec/models/spree/ability_spec.rb
index 501e8505c4..b52d3ac475 100644
--- a/core/spec/models/spree/ability_spec.rb
+++ b/core/spec/models/spree/ability_spec.rb
@@ -135,7 +135,7 @@ describe Spree::Ability, type: :model do
# It can create new users if is has access to the :admin, User!!
expect(ability).to be_able_to :create, user
- # TODO: change the Ability class so only users and customers get the extra premissions?
+ # TODO: change the Ability class so only users and customers get the extra permissions?
Spree::Ability.remove_ability(BarAbility)
end
@@ -201,7 +201,7 @@ describe Spree::Ability, type: :model do
it_behaves_like 'no index allowed'
end
- context 'requested with inproper token' do
+ context 'requested with improper token' do
let(:token) { 'FAIL' }
before { allow(resource).to receive_messages token: token }
diff --git a/core/spec/models/spree/adjustable/adjuster/promotion_spec.rb b/core/spec/models/spree/adjustable/adjuster/promotion_spec.rb
index fd502161bf..1034e556a5 100644
--- a/core/spec/models/spree/adjustable/adjuster/promotion_spec.rb
+++ b/core/spec/models/spree/adjustable/adjuster/promotion_spec.rb
@@ -124,7 +124,7 @@ describe Spree::Adjustable::Adjuster::Promotion, type: :model do
msg = "Expected two adjustments (using sequence #{promo_sequence})"
expect(order.all_adjustments.count).to eq(2), msg
- msg = "Expected one elegible adjustment (using sequence #{promo_sequence})"
+ msg = "Expected one eligible adjustment (using sequence #{promo_sequence})"
expect(order.all_adjustments.eligible.count).to eq(1), msg
msg = "Expected promo1 to be used (using sequence #{promo_sequence})"
@@ -137,7 +137,7 @@ describe Spree::Adjustable::Adjuster::Promotion, type: :model do
msg = "Expected two adjustments (using sequence #{promo_sequence})"
expect(order.all_adjustments.count).to eq(2), msg
- msg = "Expected one elegible adjustment (using sequence #{promo_sequence})"
+ msg = "Expected one eligible adjustment (using sequence #{promo_sequence})"
expect(order.all_adjustments.eligible.count).to eq(1), msg
msg = "Expected promo2 to be used (using sequence #{promo_sequence})"
@@ -155,7 +155,7 @@ describe Spree::Adjustable::Adjuster::Promotion, type: :model do
msg = "Expected one adjustment (using sequence #{promo_sequence})"
expect(order.all_adjustments.count).to eq(1), msg
- msg = "Expected one elegible adjustment (using sequence #{promo_sequence})"
+ msg = "Expected one eligible adjustment (using sequence #{promo_sequence})"
expect(order.all_adjustments.eligible.count).to eq(1), msg
# line_item_promo1 is the only one that has thus far met the order total threshold,
@@ -170,7 +170,7 @@ describe Spree::Adjustable::Adjuster::Promotion, type: :model do
msg = "Expected four adjustments (using sequence #{promo_sequence})"
expect(order.all_adjustments.count).to eq(4), msg
- msg = "Expected two elegible adjustments (using sequence #{promo_sequence})"
+ msg = "Expected two eligible adjustments (using sequence #{promo_sequence})"
expect(order.all_adjustments.eligible.count).to eq(2), msg
order.all_adjustments.eligible.each do |adjustment|
diff --git a/core/spec/models/spree/calculator_spec.rb b/core/spec/models/spree/calculator_spec.rb
index f008b16c97..ac6d8d149b 100644
--- a/core/spec/models/spree/calculator_spec.rb
+++ b/core/spec/models/spree/calculator_spec.rb
@@ -28,7 +28,7 @@ describe Spree::Calculator, type: :model do
end
end
- context 'with a arbitray object' do
+ context 'with a arbitrary object' do
it 'calls the correct compute' do
s = 'Calculator can all'
expect(subject).to receive(:compute_string).with(s)
@@ -56,7 +56,7 @@ describe Spree::Calculator, type: :model do
end
end
- context 'with a arbitray object' do
+ context 'with a arbitrary object' do
it 'raises NotImplementedError' do
s = 'Calculator can all'
expect { subject.compute(s) }.to raise_error NotImplementedError, /Please implement \'compute_string\(string\)\' in your calculator/
diff --git a/core/spec/models/spree/cms/sections/image_gallery_spec.rb b/core/spec/models/spree/cms/sections/image_gallery_spec.rb
index 21c1607963..ce0effa24b 100644
--- a/core/spec/models/spree/cms/sections/image_gallery_spec.rb
+++ b/core/spec/models/spree/cms/sections/image_gallery_spec.rb
@@ -77,7 +77,7 @@ describe Spree::Cms::Sections::ImageGallery, type: :model do
section.reload
end
- it 'link_one, link_two and save the initail values' do
+ it 'link_one, link_two and save the initial values' do
section = Spree::CmsSection.find(image_gallery_section.id)
expect(section.link_one).to eql 'Shirt 1'
diff --git a/core/spec/models/spree/cms_page_spec.rb b/core/spec/models/spree/cms_page_spec.rb
index e08c5cc82b..e8b04dc3f7 100644
--- a/core/spec/models/spree/cms_page_spec.rb
+++ b/core/spec/models/spree/cms_page_spec.rb
@@ -43,7 +43,7 @@ describe Spree::CmsPage, type: :model do
expect(described_class.find_by(id: homepage.id).sections?).to be true
end
- it 'homepage is visable by default' do
+ it 'homepage is visible by default' do
expect(homepage.visible?).to be true
end
@@ -71,7 +71,7 @@ describe Spree::CmsPage, type: :model do
expect(described_class.find_by(id: feature_page.id).sections?).to be true
end
- it 'feature_page is visable by default' do
+ it 'feature_page is visible by default' do
expect(feature_page.visible?).to be true
end
@@ -99,7 +99,7 @@ describe Spree::CmsPage, type: :model do
expect(described_class.find_by(id: standard_page.id).sections?).to be false
end
- it 'standard_page is visable by default' do
+ it 'standard_page is visible by default' do
expect(standard_page.visible?).to be true
end
diff --git a/core/spec/models/spree/concerns/single_store_spec.rb b/core/spec/models/spree/concerns/single_store_spec.rb
index 97ab5e538f..d1203b169b 100644
--- a/core/spec/models/spree/concerns/single_store_spec.rb
+++ b/core/spec/models/spree/concerns/single_store_spec.rb
@@ -9,7 +9,7 @@ module Spree
let(:menu) { create :menu }
let(:menu_b) { create :menu, location: 'footer' }
- it 'allows creation of a new instance, update the store then save witout triggering validation error' do
+ it 'allows creation of a new instance, update the store then save without triggering validation error' do
object = Spree::CmsPage.new(title: 'Got Name', locale: 'de')
object.update(store: store)
diff --git a/core/spec/models/spree/order/checkout_spec.rb b/core/spec/models/spree/order/checkout_spec.rb
index 16f3659e80..c3429e907d 100644
--- a/core/spec/models/spree/order/checkout_spec.rb
+++ b/core/spec/models/spree/order/checkout_spec.rb
@@ -642,7 +642,7 @@ describe Spree::Order, type: :model do
let(:permitted_params) { {} }
let(:params) { {} }
- it 'calls update_atributes without order params' do
+ it 'calls update_attributes without order params' do
expect(order).to receive(:update).with({})
order.update_from_params(params, permitted_params)
end
diff --git a/core/spec/models/spree/preference_spec.rb b/core/spec/models/spree/preference_spec.rb
index 1ca935e879..1f767c3795 100644
--- a/core/spec/models/spree/preference_spec.rb
+++ b/core/spec/models/spree/preference_spec.rb
@@ -8,7 +8,7 @@ describe Spree::Preference, type: :model do
expect(@preference).to be_valid
end
- describe 'type coversion for values' do
+ describe 'type conversion for values' do
def round_trip_preference(key, value)
p = Spree::Preference.new
p.value = value
diff --git a/core/spec/models/spree/preferences/store_spec.rb b/core/spec/models/spree/preferences/store_spec.rb
index 70f4dccab8..201cf61e3a 100644
--- a/core/spec/models/spree/preferences/store_spec.rb
+++ b/core/spec/models/spree/preferences/store_spec.rb
@@ -16,7 +16,7 @@ describe Spree::Preferences::Store, type: :model do
expect(@store.get(:test)).to be false
end
- it 'will return db value when cache is emtpy and cache the db value' do
+ it 'will return db value when cache is empty and cache the db value' do
preference = Spree::Preference.where(key: 'test').first_or_initialize
preference.value = '123'
preference.save
diff --git a/core/spec/models/spree/product_duplicator_spec.rb b/core/spec/models/spree/product_duplicator_spec.rb
index eefcce0e90..99e578c0ea 100644
--- a/core/spec/models/spree/product_duplicator_spec.rb
+++ b/core/spec/models/spree/product_duplicator_spec.rb
@@ -99,7 +99,7 @@ module Spree
let!(:variant1) { create(:variant, product: product, option_values: [option_value1]) }
let!(:variant2) { create(:variant, product: product, option_values: [option_value2]) }
- it 'will duplciate the variants' do
+ it 'will duplicate the variants' do
# will change the count by 3, since there will be a master variant as well
expect { duplicator.duplicate }.to change { Spree::Variant.count }.by(3)
end
diff --git a/core/spec/models/spree/promotion/rules/item_total_spec.rb b/core/spec/models/spree/promotion/rules/item_total_spec.rb
index f5bdab42e9..ee9e8fcb3b 100644
--- a/core/spec/models/spree/promotion/rules/item_total_spec.rb
+++ b/core/spec/models/spree/promotion/rules/item_total_spec.rb
@@ -16,15 +16,15 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
rule.preferred_operator_max = 'lt'
end
- context 'and item total is lower than prefered maximum amount' do
- context 'and item total is higher than prefered minimum amount' do
+ context 'and item total is lower than preferred maximum amount' do
+ context 'and item total is higher than preferred minimum amount' do
it 'is eligible' do
allow(order).to receive_messages item_total: 51
expect(rule).to be_eligible(order)
end
end
- context 'and item total is equal to the prefered minimum amount' do
+ context 'and item total is equal to the preferred minimum amount' do
before { allow(order).to receive_messages item_total: 50 }
it 'is not eligible' do
@@ -38,7 +38,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is lower to the prefered minimum amount' do
+ context 'and item total is lower to the preferred minimum amount' do
before { allow(order).to receive_messages item_total: 49 }
it 'is not eligible' do
@@ -53,7 +53,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is equal to the prefered maximum amount' do
+ context 'and item total is equal to the preferred maximum amount' do
before { allow(order).to receive_messages item_total: 60 }
it 'is not eligible' do
@@ -67,7 +67,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is higher than the prefered maximum amount' do
+ context 'and item total is higher than the preferred maximum amount' do
before { allow(order).to receive_messages item_total: 61 }
it 'is not eligible' do
@@ -88,15 +88,15 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
rule.preferred_operator_max = 'lte'
end
- context 'and item total is lower than prefered maximum amount' do
- context 'and item total is higher than prefered minimum amount' do
+ context 'and item total is lower than preferred maximum amount' do
+ context 'and item total is higher than preferred minimum amount' do
it 'is eligible' do
allow(order).to receive_messages item_total: 51
expect(rule).to be_eligible(order)
end
end
- context 'and item total is equal to the prefered minimum amount' do
+ context 'and item total is equal to the preferred minimum amount' do
before { allow(order).to receive_messages item_total: 50 }
it 'is not eligible' do
@@ -110,7 +110,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is lower to the prefered minimum amount' do
+ context 'and item total is lower to the preferred minimum amount' do
before { allow(order).to receive_messages item_total: 49 }
it 'is not eligible' do
@@ -125,7 +125,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is equal to the prefered maximum amount' do
+ context 'and item total is equal to the preferred maximum amount' do
before { allow(order).to receive_messages item_total: 60 }
it 'is not eligible' do
@@ -133,7 +133,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is higher than the prefered maximum amount' do
+ context 'and item total is higher than the preferred maximum amount' do
before { allow(order).to receive_messages item_total: 61 }
it 'is not eligible' do
@@ -154,15 +154,15 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
rule.preferred_operator_max = 'lt'
end
- context 'and item total is lower than prefered maximum amount' do
- context 'and item total is higher than prefered minimum amount' do
+ context 'and item total is lower than preferred maximum amount' do
+ context 'and item total is higher than preferred minimum amount' do
it 'is eligible' do
allow(order).to receive_messages item_total: 51
expect(rule).to be_eligible(order)
end
end
- context 'and item total is equal to the prefered minimum amount' do
+ context 'and item total is equal to the preferred minimum amount' do
before { allow(order).to receive_messages item_total: 50 }
it 'is not eligible' do
@@ -170,7 +170,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is lower to the prefered minimum amount' do
+ context 'and item total is lower to the preferred minimum amount' do
before { allow(order).to receive_messages item_total: 49 }
it 'is not eligible' do
@@ -185,7 +185,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is equal to the prefered maximum amount' do
+ context 'and item total is equal to the preferred maximum amount' do
before { allow(order).to receive_messages item_total: 60 }
it 'is not eligible' do
@@ -199,7 +199,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is higher than the prefered maximum amount' do
+ context 'and item total is higher than the preferred maximum amount' do
before { allow(order).to receive_messages item_total: 61 }
it 'is not eligible' do
@@ -220,15 +220,15 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
rule.preferred_operator_max = 'lte'
end
- context 'and item total is lower than prefered maximum amount' do
- context 'and item total is higher than prefered minimum amount' do
+ context 'and item total is lower than preferred maximum amount' do
+ context 'and item total is higher than preferred minimum amount' do
it 'is eligible' do
allow(order).to receive_messages item_total: 51
expect(rule).to be_eligible(order)
end
end
- context 'and item total is equal to the prefered minimum amount' do
+ context 'and item total is equal to the preferred minimum amount' do
before { allow(order).to receive_messages item_total: 50 }
it 'is not eligible' do
@@ -236,7 +236,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is lower to the prefered minimum amount' do
+ context 'and item total is lower to the preferred minimum amount' do
before { allow(order).to receive_messages item_total: 49 }
it 'is not eligible' do
@@ -251,7 +251,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is equal to the prefered maximum amount' do
+ context 'and item total is equal to the preferred maximum amount' do
before { allow(order).to receive_messages item_total: 60 }
it 'is not eligible' do
@@ -259,7 +259,7 @@ describe Spree::Promotion::Rules::ItemTotal, type: :model do
end
end
- context 'and item total is higher than the prefered maximum amount' do
+ context 'and item total is higher than the preferred maximum amount' do
before { allow(order).to receive_messages item_total: 61 }
it 'is not eligible' do
diff --git a/core/spec/models/spree/promotion/rules/taxon_spec.rb b/core/spec/models/spree/promotion/rules/taxon_spec.rb
index 3c63fdc45f..aa7b8c18c6 100644
--- a/core/spec/models/spree/promotion/rules/taxon_spec.rb
+++ b/core/spec/models/spree/promotion/rules/taxon_spec.rb
@@ -5,7 +5,7 @@ describe Spree::Promotion::Rules::Taxon, type: :model do
let(:store) { create(:store) }
- context '#elegible?(order)' do
+ context '#eligible?(order)' do
let(:taxonomy) { create(:taxonomy, store: store) }
let(:taxon) { create :taxon, name: 'first', taxonomy: taxonomy }
let(:taxon2) { create :taxon, name: 'second', taxonomy: taxonomy }
@@ -20,7 +20,7 @@ describe Spree::Promotion::Rules::Taxon, type: :model do
rule.preferred_match_policy = 'any'
end
- it 'is eligible if order does has any prefered taxon' do
+ it 'is eligible if order does has any preferred taxon' do
order.products.first.taxons << taxon
rule.taxons << taxon
expect(rule).to be_eligible(order)
@@ -42,7 +42,7 @@ describe Spree::Promotion::Rules::Taxon, type: :model do
end
end
- context 'when order does not have any prefered taxon' do
+ context 'when order does not have any preferred taxon' do
before { rule.taxons << taxon2 }
it { expect(rule).not_to be_eligible(order) }
@@ -69,7 +69,7 @@ describe Spree::Promotion::Rules::Taxon, type: :model do
rule.preferred_match_policy = 'all'
end
- it 'is eligible order has all prefered taxons' do
+ it 'is eligible order has all preferred taxons' do
order.products.first.taxons << taxon2
order.products.last.taxons << taxon
@@ -78,7 +78,7 @@ describe Spree::Promotion::Rules::Taxon, type: :model do
expect(rule).to be_eligible(order)
end
- context 'when order does not have all prefered taxons' do
+ context 'when order does not have all preferred taxons' do
before { rule.taxons << taxon }
it { expect(rule).not_to be_eligible(order) }
diff --git a/core/spec/models/spree/stock_item_spec.rb b/core/spec/models/spree/stock_item_spec.rb
index e596b244f8..38721f1aaa 100644
--- a/core/spec/models/spree/stock_item_spec.rb
+++ b/core/spec/models/spree/stock_item_spec.rb
@@ -70,7 +70,7 @@ describe Spree::StockItem, type: :model do
end
context 'item out of stock (by five items)' do
- context 'when stock received is insufficient to fullfill backorders' do
+ context 'when stock received is insufficient to fulfill backorders' do
let(:inventory_unit) { double('InventoryUnit') }
let(:inventory_unit_2) { double('InventoryUnit2') }
let(:split_inventory_unit) { double('SplitInventoryUnit') }
@@ -83,7 +83,7 @@ describe Spree::StockItem, type: :model do
subject.update_column(:count_on_hand, -5)
end
- it 'splits inventory to fullfill partial backorder' do
+ it 'splits inventory to fulfill partial backorder' do
expect(inventory_unit_2).not_to receive(:split_inventory!)
expect(split_inventory_unit).to receive(:fill_backorder)
diff --git a/core/spec/models/spree/store_credit_spec.rb b/core/spec/models/spree/store_credit_spec.rb
index 34d89588c9..b59db436ed 100644
--- a/core/spec/models/spree/store_credit_spec.rb
+++ b/core/spec/models/spree/store_credit_spec.rb
@@ -508,7 +508,7 @@ describe 'StoreCredit' do
@new_store_credit = Spree::StoreCredit.last
end
- it 'does not set the amount used on hte originating store credit' do
+ it 'does not set the amount used on the originating store credit' do
expect(store_credit.reload.amount_used).to eq amount_used
end
diff --git a/core/spec/models/spree/tax_rate_spec.rb b/core/spec/models/spree/tax_rate_spec.rb
index 148af9caef..68f4a6e99f 100644
--- a/core/spec/models/spree/tax_rate_spec.rb
+++ b/core/spec/models/spree/tax_rate_spec.rb
@@ -240,7 +240,7 @@ describe Spree::TaxRate, type: :model do
Spree::Cart::AddItem.call(order: order, variant: download.master)
end
- it 'without an adress costs 100 euros including tax' do
+ it 'without an address costs 100 euros including tax' do
Spree::TaxRate.adjust(order, order.line_items)
order.update_with_updater!
expect(order.display_total).to eq(Spree::Money.new(100))
diff --git a/core/spec/models/spree/wished_item_spec.rb b/core/spec/models/spree/wished_item_spec.rb
index b7b812424b..3173d5e0c5 100644
--- a/core/spec/models/spree/wished_item_spec.rb
+++ b/core/spec/models/spree/wished_item_spec.rb
@@ -30,7 +30,7 @@ RSpec.describe Spree::WishedItem, type: :model do
expect(described_class.new(quantity: -1, wishlist: wishlist, variant: variant)).not_to be_valid
end
- describe 'when wished_item is alread associated with the wishlist' do
+ describe 'when wished_item is already associated with the wishlist' do
let!(:existing_wished_item) { create(:wished_item, quantity: 3, wishlist: wishlist, variant: variant) }
it 'validates uniqueness of variant within scope of wishlist' do
diff --git a/core/spec/services/spree/cart/set_quantity_spec.rb b/core/spec/services/spree/cart/set_quantity_spec.rb
index a2d9cdf402..fdfdb653c3 100644
--- a/core/spec/services/spree/cart/set_quantity_spec.rb
+++ b/core/spec/services/spree/cart/set_quantity_spec.rb
@@ -36,7 +36,7 @@ module Spree
end
context 'with backorderable item' do
- it 'returns successfull result', :aggregate_failures do
+ it 'returns successful result', :aggregate_failures do
result = subject.call(order: order, line_item: line_item, quantity: 5)
expect(result.success).to eq(true)
diff --git a/sample/db/samples/menu_items.rb b/sample/db/samples/menu_items.rb
index 0e70b3e9d8..ef9ce4493c 100644
--- a/sample/db/samples/menu_items.rb
+++ b/sample/db/samples/menu_items.rb
@@ -14,7 +14,7 @@ MENUS.each do |menu|
root_name_b = 'Men'
root_name_c = 'Sportswear'
- catagories = 'Categories'
+ categories = 'Categories'
skirts = 'Skirts'
dresses = 'Dresses'
@@ -39,7 +39,7 @@ MENUS.each do |menu|
root_name_b = 'Hommes'
root_name_c = 'Tenue de sport'
- catagories = 'Catégories'
+ categories = 'Catégories'
skirts = 'Jupes'
dresses = 'Robes'
@@ -64,7 +64,7 @@ MENUS.each do |menu|
root_name_b = 'Männer'
root_name_c = 'Sportbekleidung'
- catagories = 'Kategorien'
+ categories = 'Kategorien'
skirts = 'die Röcke'
dresses = 'Kleider'
@@ -89,7 +89,7 @@ MENUS.each do |menu|
root_name_b = 'Mujeres'
root_name_c = 'Ropa de deporte'
- catagories = 'Categorías'
+ categories = 'Categorías'
skirts = 'Faldas'
dresses = 'Vestidos'
@@ -152,7 +152,7 @@ MENUS.each do |menu|
# Categories #
##############
menu_cat_women = Spree::MenuItem.where(
- name: catagories,
+ name: categories,
item_type: 'Container',
code: 'category',
menu_id: menu,
@@ -160,7 +160,7 @@ MENUS.each do |menu|
).first_or_create!
menu_cat_men = Spree::MenuItem.where(
- name: catagories,
+ name: categories,
item_type: 'Container',
code: 'category',
menu_id: menu,
@@ -168,7 +168,7 @@ MENUS.each do |menu|
).first_or_create!
menu_cat_sw = Spree::MenuItem.where(
- name: catagories,
+ name: categories,
item_type: 'Container',
code: 'category',
menu_id: menu,
@@ -239,7 +239,7 @@ MENUS.each do |menu|
end
#################################
- # Links For: WOMEN / CATAGORIES #
+ # Links For: WOMEN / CATEGORIES #
#################################
women_link_parent_id = if menu.location == 'header'
@@ -315,7 +315,7 @@ MENUS.each do |menu|
women_j_c.save!
###############################
- # Links For: MEN / CATAGORIES #
+ # Links For: MEN / CATEGORIES #
###############################
men_link_parent_id = if menu.location == 'header'
@@ -369,7 +369,7 @@ MENUS.each do |menu|
men_j_c.save!
######################################
- # Links For: SPORTSWARE / CATAGORIES #
+ # Links For: SPORTSWARE / CATEGORIES #
######################################
sw_link_parent_id = if menu.location == 'header'
diff --git a/sample/db/samples/variants.csv b/sample/db/samples/variants.csv
index b3978657aa..8750c2acc5 100644
--- a/sample/db/samples/variants.csv
+++ b/sample/db/samples/variants.csv
@@ -115,10 +115,10 @@ Women,Shirts and Blouses,semi-sheer shirt with pockets,white
Women,Shirts and Blouses,v-neck shirt,pink
Women,Shirts and Blouses,v-neck shirt,white
Women,Shirts and Blouses,printed shirt,green
-Women,Sweaters,asymetric sweater with wide sleeves,blue
-Women,Sweaters,asymetric sweater with wide sleeves,grey
-Women,Sweaters,asymetric sweater with wide sleeves,red
-Women,Sweaters,asymetric sweater with wide sleeves,white
+Women,Sweaters,asymmetric sweater with wide sleeves,blue
+Women,Sweaters,asymmetric sweater with wide sleeves,grey
+Women,Sweaters,asymmetric sweater with wide sleeves,red
+Women,Sweaters,asymmetric sweater with wide sleeves,white
Women,Sweaters,oversized knitted sweater,red
Women,Sweaters,oversized sweatshirt,brown
Women,Sweaters,knitted high neck sweater,blue
@@ -152,7 +152,7 @@ Women,Jackets and Coats,coat with pockets,burgundy
Women,Jackets and Coats,coat with pockets,black
Women,Jackets and Coats,long wool-blend coat with belt,dark_blue
Women,Jackets and Coats,long wool-blend coat with belt,beige
-Women,Jackets and Coats,asymetric coat,white
+Women,Jackets and Coats,asymmetric coat,white
Women,Jackets and Coats,long coat with belt,beige
Women,Jackets and Coats,down jacket,white
Women,Jackets and Coats,zipped jacket,blue
@@ -177,7 +177,7 @@ Sportswear,Tops,sports bra ,blue
Sportswear,Tops,sports bra ,burgundy
Sportswear,Tops,sport cropp top,burgundy
Sportswear,Sweatshirts,running sweatshirt,light_blue
-Sportswear,Sweatshirts,leightweight running jacket,grey
+Sportswear,Sweatshirts,lightweight running jacket,grey
Sportswear,Sweatshirts,oversize sweatshirt,pink
Sportswear,Sweatshirts,sport windproof jacket,blue
Sportswear,Sweatshirts,sport waistcoat,purple
diff --git a/sample/lib/spree/sample.rb b/sample/lib/spree/sample.rb
index 4301fc9da2..7012f5ddde 100644
--- a/sample/lib/spree/sample.rb
+++ b/sample/lib/spree/sample.rb
@@ -1,7 +1,7 @@
module Spree
module Sample
def self.load_sample(file)
- # If file exists within application it takes precendence.
+ # If file exists within application it takes precedence.
path = if File.exist?(File.join(Rails.root, 'db', 'samples', "#{file}.rb"))
File.expand_path(File.join(Rails.root, 'db', 'samples', "#{file}.rb"))
else