Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spree Upgrade] Merging master into 2-0-stable (4th run in Mar2019) #3668

Merged
merged 57 commits into from
Apr 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
09655b9
Fix nil values in on_hand column
Matt-Yorkley Feb 16, 2019
ee79f97
Bump stripe from 4.9.0 to 4.10.0
dependabot-support Mar 20, 2019
6b01eba
Bump oj from 3.7.10 to 3.7.11
dependabot-support Mar 20, 2019
310b4a0
Updating translations for config/locales/fr.yml
Transifex-Openfoodnetwork Mar 21, 2019
f0d9857
Updating translations for config/locales/fr.yml
Transifex-Openfoodnetwork Mar 21, 2019
2ba10c4
Updating translations for config/locales/nb.yml
Transifex-Openfoodnetwork Mar 21, 2019
fbc3fc6
Test spree/admin/variants_controller #destroy
sauloperez Mar 22, 2019
b293e00
Test that we refresh the cache on variant destroy
sauloperez Mar 22, 2019
96b8c8a
Refresh products cache also on Variant#delete
sauloperez Mar 22, 2019
698c71f
Fixed producer profile translation bug
Mar 22, 2019
dc198b7
Updating translations for config/locales/pt.yml
Transifex-Openfoodnetwork Mar 23, 2019
f050086
Updating translations for config/locales/pt.yml
Transifex-Openfoodnetwork Mar 23, 2019
b979a09
Updating translations for config/locales/en_US.yml
Transifex-Openfoodnetwork Mar 23, 2019
2c97eaa
Add missing translation key for order shipment state canceled
luisramos0 Mar 24, 2019
dac4d4f
DRY report spec
mkllnk Mar 22, 2019
6ee27cd
Fix spec to test the right report
mkllnk Mar 22, 2019
0a243ac
Give spec vars proper names
mkllnk Mar 22, 2019
856603c
Convert specs to RSpec 3.8.0 syntax with Transpec
mkllnk Mar 22, 2019
fdd8c06
Style reports spec
mkllnk Mar 22, 2019
7bc735e
Cover report content with specs
mkllnk Mar 22, 2019
46e7090
Group report by variant and use variant SKU
kristinalim Mar 23, 2019
c088fb9
Use shorter syntax for Customer Totals report
kristinalim Mar 24, 2019
7c7d61f
Simplify some logic for Customer Totals report
kristinalim Mar 24, 2019
79d0b63
Add Spree::Address#full_name_reverse
kristinalim Mar 24, 2019
4a95578
Use name helpers in Customer Totals report
kristinalim Mar 24, 2019
807cdb4
Code style changes for Customer Totals report
kristinalim Mar 24, 2019
a4bc739
Updating translations for config/locales/de_DE.yml
Transifex-Openfoodnetwork Mar 25, 2019
e504783
Updating translations for config/locales/fr_CA.yml
Transifex-Openfoodnetwork Mar 25, 2019
a2f3110
Updating translations for config/locales/en_CA.yml
Transifex-Openfoodnetwork Mar 25, 2019
9e3734f
Merge pull request #3646 from kristinalim/fix/3528-product_sku_in_report
mkllnk Mar 26, 2019
9d45896
Test inventory report to use variant overrides
mkllnk Mar 26, 2019
6ad42fc
Merge pull request #3636 from openfoodfoundation/transifex
mkllnk Mar 26, 2019
84246fe
Merge pull request #3631 from openfoodfoundation/dependabot/bundler/s…
mkllnk Mar 26, 2019
d963df2
Merge pull request #3632 from openfoodfoundation/dependabot/bundler/o…
mkllnk Mar 26, 2019
6c97bb6
Bump stripe from 4.10.0 to 4.11.0
dependabot-support Mar 26, 2019
4455073
Merge pull request #3647 from luisramos0/fix-shipment-state-translation
luisramos0 Mar 27, 2019
fed2b60
Merge pull request #3644 from kevinchristianson/master
mkllnk Mar 28, 2019
0f7ef26
Add shipping method name to orders detail report
SDBowen Mar 28, 2019
973ae3d
Merge pull request #3656 from openfoodfoundation/dependabot/bundler/s…
mkllnk Mar 29, 2019
29f3260
Relax stripe version requirement
mkllnk Mar 29, 2019
6e31f00
Merge pull request #3639 from coopdevs/fix-variant-cache-refreshing-o…
mkllnk Mar 29, 2019
527cfc1
Merge branch 'master' into 2-0-stable-Mar29
luisramos0 Mar 29, 2019
d866fad
Persist variants in customer totals specs
kristinalim Mar 31, 2019
d48d2a7
Merge pull request #3662 from SDBowen/add_shipping_method
luisramos0 Apr 1, 2019
8b6561a
Add missing translation for order form in v2
mkllnk Apr 2, 2019
b288cb0
Merge pull request #3654 from mkllnk/3237-spec-overrides-in-inventory…
sauloperez Apr 3, 2019
c515a8f
Merge pull request #3537 from Matt-Yorkley/pi/on_demand_error
sauloperez Apr 3, 2019
ec00544
Merge pull request #3665 from mkllnk/stripe-version
sauloperez Apr 3, 2019
7522594
Fix outdated db2fog initializer
Matt-Yorkley Apr 4, 2019
9b45269
Fix name of Spree::Config preference
Matt-Yorkley Apr 4, 2019
07888b3
Merge pull request #3679 from mkllnk/3477-missing-v2-translation
sauloperez Apr 4, 2019
67376a2
Merge pull request #3694 from Matt-Yorkley/db2fog
sauloperez Apr 5, 2019
3e7e24d
Make VariantController specs aware of destroy call
sauloperez Apr 5, 2019
ecc60f3
Merge branch 'master' into 2-0-stable-Mar29
luisramos0 Apr 5, 2019
bb4cec1
Fix order_and_distributor_report_spec by setting ofn shipping method …
luisramos0 Apr 5, 2019
258a9ef
Adapt product_importer_spec to ofn v2 where there’s no product.count_…
luisramos0 Apr 5, 2019
e9491ce
Fix flaky spec by having only one variant with display name small bag
luisramos0 Apr 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public/images
public/spree
config/abr.yml
config/initializers/feature_toggle.rb
config/initializers/db2fog.rb
NERD_tree*
coverage
libpeerconnection.log
Expand Down
1 change: 0 additions & 1 deletion .rubocop_manual_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ Metrics/LineLength:
- spec/lib/open_food_network/order_cycle_form_applicator_spec.rb
- spec/lib/open_food_network/order_cycle_permissions_spec.rb
- spec/lib/open_food_network/order_grouper_spec.rb
- spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb
- spec/lib/open_food_network/packing_report_spec.rb
- spec/lib/open_food_network/permissions_spec.rb
- spec/lib/open_food_network/products_and_inventory_report_spec.rb
Expand Down
4 changes: 0 additions & 4 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Layout/AlignArray:
Exclude:
- 'lib/open_food_network/bulk_coop_report.rb'
- 'lib/open_food_network/customers_report.rb'
- 'lib/open_food_network/order_and_distributor_report.rb'
- 'lib/open_food_network/orders_and_fulfillments_report.rb'
- 'lib/open_food_network/packing_report.rb'
- 'spec/lib/open_food_network/order_grouper_spec.rb'
Expand Down Expand Up @@ -703,7 +702,6 @@ Layout/SpaceInsideBlockBraces:
- 'spec/helpers/spree/orders_helper_spec.rb'
- 'spec/lib/open_food_network/order_cycle_form_applicator_spec.rb'
- 'spec/lib/open_food_network/order_grouper_spec.rb'
- 'spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb'
- 'spec/lib/open_food_network/products_renderer_spec.rb'
- 'spec/lib/open_food_network/tag_rule_applicator_spec.rb'
- 'spec/models/column_preference_spec.rb'
Expand Down Expand Up @@ -1033,7 +1031,6 @@ Lint/Void:
- 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb'
- 'spec/lib/open_food_network/enterprise_issue_validator_spec.rb'
- 'spec/lib/open_food_network/group_buy_report_spec.rb'
- 'spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb'
- 'spec/lib/open_food_network/packing_report_spec.rb'
- 'spec/lib/open_food_network/reports/report_spec.rb'
- 'spec/lib/open_food_network/reports/rule_spec.rb'
Expand Down Expand Up @@ -1923,7 +1920,6 @@ Style/MixinUsage:
- 'spec/features/admin/orders_spec.rb'
- 'spec/lib/open_food_network/bulk_coop_report_spec.rb'
- 'spec/lib/open_food_network/order_cycle_management_report_spec.rb'
- 'spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb'
- 'spec/lib/open_food_network/packing_report_spec.rb'

# Offense count: 4
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-0-stable'
# - Pass customer email and phone number to PayPal (merged to upstream master)
# - Change type of password from string to password to hide it in the form
gem 'spree_paypal_express', github: "openfoodfoundation/better_spree_paypal_express", branch: "2-0-stable"
gem 'stripe', '~> 4.9.0'
gem 'stripe'

# We need at least this version to have Digicert's root certificate
# which is needed for Pin Payments (and possibly others).
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ GEM
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
oj (3.7.10)
oj (3.7.11)
orm_adapter (0.5.0)
paper_trail (5.2.3)
activerecord (>= 3.0, < 6.0)
Expand Down Expand Up @@ -721,7 +721,7 @@ GEM
tilt (~> 1.1, != 1.3.0)
state_machine (1.2.0)
stringex (1.5.1)
stripe (4.9.0)
stripe (4.11.0)
faraday (~> 0.13)
net-http-persistent (~> 3.0)
therubyracer (0.12.0)
Expand Down Expand Up @@ -860,7 +860,7 @@ DEPENDENCIES
spree_paypal_express!
spring (= 1.7.2)
spring-commands-rspec
stripe (~> 4.9.0)
stripe
therubyracer (= 0.12.0)
timecop
truncate_html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def destroy

respond_with(@variant) do |format|
format.html { redirect_to admin_product_variants_url(params[:product_id]) }
format.js { render_js_for_destroy }
format.js { render_js_for_destroy }
end
end

Expand Down
5 changes: 5 additions & 0 deletions app/models/concerns/address_display.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module AddressDisplay
def full_name_reverse
[lastname, firstname].reject(&:blank?).join(" ")
end
end
1 change: 1 addition & 0 deletions app/models/product_import/entry_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def mark_as_new_product(entry)
new_product = Spree::Product.new
new_product.assign_attributes(entry.attributes.except('id'))
new_product.supplier_id = entry.producer_id
entry.on_hand = 0 if entry.on_hand.nil?

if new_product.valid?
entry.validates_as = 'new_product' unless entry.errors?
Expand Down
2 changes: 2 additions & 0 deletions app/models/spree/address_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Spree::Address.class_eval do
include AddressDisplay

has_one :enterprise, dependent: :restrict
belongs_to :country, class_name: "Spree::Country"

Expand Down
3 changes: 2 additions & 1 deletion app/views/admin/enterprises/welcome.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
%p
= t('.welcome_text')
%strong
= "#{"producer " if @enterprise.is_primary_producer}profile"
- profile_translation_key = @enterprise.is_primary_producer ? '.producer_profile' : '.profile'
= t(profile_translation_key)

%section
%h2= t('.next_step')
Expand Down
15 changes: 0 additions & 15 deletions config/initializers/0_depricated_db2fog.rb

This file was deleted.

7 changes: 7 additions & 0 deletions config/initializers/db2fog.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See: https://github.com/yob/db2fog
DB2Fog.config = {
:aws_access_key_id => Spree::Config[:s3_access_key],
:aws_secret_access_key => Spree::Config[:s3_secret],
:directory => Spree::Config[:s3_bucket],
:provider => 'AWS'
}
Loading