Skip to content

Commit

Permalink
Merge branch 'master' into 2-0-stable-sept
Browse files Browse the repository at this point in the history
  • Loading branch information
luisramos0 committed Sep 4, 2018
2 parents 1b6bb72 + 0d2fa3d commit 210ee8b
Show file tree
Hide file tree
Showing 164 changed files with 3,580 additions and 2,726 deletions.
5 changes: 5 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ plugins:
channel: "rubocop-0-55"
scss-lint:
enabled: true
checks:
ImportantRule:
enabled: false
VendorPrefix:
enabled: false
duplication:
enabled: true
exclude_patterns:
Expand Down
52 changes: 38 additions & 14 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
<!--- If what you want to file is not a bug, please use the [Feature
template](https://github.com/openfoodfoundation/openfoodnetwork/wiki/Feature-template)
instead -->
<!-- Provide a general summary of the issue in the Title above.
<!--- Provide a general summary of the issue in the Title above -->
If your issue is not a bug, please use the Feature template instead:
https://github.com/openfoodfoundation/openfoodnetwork/wiki/Feature-template
-->
## Description
<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->
<!-- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->



## Expected Behavior
<!--- Tell us what should happen -->
<!-- Tell us what should happen -->



## Actual Behavior
<!--- Tell us what happens instead -->
<!-- Tell us what happens instead -->



## Steps to Reproduce
<!--- Provide an unambiguous set of steps to reproduce this bug -->
<!--- Include code to reproduce, if relevant -->
<!-- Provide an unambiguous set of steps to reproduce this bug -->
<!-- Include code to reproduce if relevant -->

1.
2.
3.
Expand All @@ -25,18 +32,35 @@ instead -->
<!-- Provide a screenshot or brief animated gif reproducing the bug. Linux users can use
[Peek](https://github.com/phw/peek#ubuntu) while Mac users can use [Recordit](http://recordit.co/) -->



## Context
<!--- How has this bug affected you? What were you trying to accomplish? -->
<!-- How has this bug affected you? What were you trying to accomplish? -->



## Severity
<!--- Use the [Bug severity
guideline](https://github.com/openfoodfoundation/openfoodnetwork/wiki/Bug-severity) to assign one to this bug -->
<!-- Assign a label and explain the impact.
bug-s1: a critical feature is broken: checkout, payments, signup, login
bug-s2: a non-critical feature is broken, no workaround
bug-s3: a feature is broken but there is a workaround
bug-s4: it's annoying, but you can use it
bug-s5: we can live with it, only a few users impacted
https://github.com/openfoodfoundation/openfoodnetwork/wiki/Bug-severity
-->



## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
<!-- Include relevant details about the environment you experienced the bug in -->

* Version used:
* Browser name and version:
* Operating System and version (desktop or mobile):

## Possible Fix
<!--- Not obligatory, but suggest a fix or reason for the bug -->
<!-- Not obligatory, but suggest a fix or reason for the bug -->


38 changes: 24 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,46 @@

Closes #[the issue number this PR is related to]

[Explain why is this change needed and the solution you propose. Provide
context for others to understand it]
<!-- Explain why this change is needed and the solution you propose.
Provide context for others to understand it. -->



#### What should we test?
<!-- List which features should be tested and how. -->

[List which features should be tested and how]

[Should we test on mobile?]

#### Release notes
<!-- Write a line or two to be included in the release notes.
Everything is worth mentioning, because you did it for a reason. -->

[In case this should be present in the release notes, please write them or
remove this section otherwise]

[To streamline the release process, please designate your PR with ONE of the following
categories, based on the specification from keepachangelog.com (and delete the others):]

<!-- Please assign one category to your PR and delete the others.
The categories are based on https://keepachangelog.com/en/1.0.0/. -->

Changelog Category: Added | Changed | Deprecated | Removed | Fixed | Security

#### How is this related to the Spree upgrade?
<!-- Any known conflicts with the Spree Upgrade?
Explain them or remove this section. -->


[Any known conflicts with the Spree Upgrade? explain them or remove this section
otherwise]

#### Discourse thread
<!-- Is there a discussion about this in Discourse?
Add the link or remove this section. -->


[Is there a discussion about this in Discourse? add the link if so or remove
this section otherwise]

#### Dependencies
<!-- Does this PR depend on another one?
Add the link or remove this section. -->



#### Documentation updates
<!-- Are their any wiki pages that need updating after merging this PR?
List them here or remove this section. -->

[Does this PR depend on another one? add the link of so or remove this section
otherwise]
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ Rails/DynamicFindBy:
Rails/FindBy:
Enabled: false

# Same as above, #update! is not available until Rails 4
Rails/ActiveRecordAliases:
Enabled: false

# This should be the programmer's discretion, perhaps we should review all of
# the uses of it an make specific exceptions though.
Rails/SkipsModelValidations:
Expand Down
98 changes: 9 additions & 89 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 1400`
# on 2018-07-20 18:57:26 +0200 using RuboCop version 0.55.0.
# on 2018-08-06 18:22:59 +0800 using RuboCop version 0.55.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 36
# Offense count: 35
# Cop supports --auto-correct.
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
Expand Down Expand Up @@ -191,7 +191,6 @@ Layout/EmptyLines:
- 'lib/open_food_network/reports/bulk_coop_report.rb'
- 'lib/open_food_network/sales_tax_report.rb'
- 'lib/open_food_network/scope_product_to_hub.rb'
- 'lib/open_food_network/scope_variant_to_hub.rb'
- 'lib/open_food_network/xero_invoices_report.rb'
- 'lib/spree/core/controller_helpers/order_decorator.rb'
- 'lib/tasks/cache.rake'
Expand Down Expand Up @@ -263,7 +262,7 @@ Layout/EmptyLinesAroundArguments:
Exclude:
- 'spec/archive/features/consumer/checkout_spec.rb'

# Offense count: 65
# Offense count: 64
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty_lines, no_empty_lines
Expand Down Expand Up @@ -364,7 +363,7 @@ Layout/EndAlignment:
- 'app/serializers/api/admin/for_order_cycle/supplied_product_serializer.rb'
- 'app/serializers/api/admin/order_cycle_serializer.rb'

# Offense count: 49
# Offense count: 48
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Layout/ExtraSpacing:
Expand All @@ -387,7 +386,6 @@ Layout/ExtraSpacing:
- 'spec/features/admin/bulk_order_management_spec.rb'
- 'spec/features/admin/bulk_product_update_spec.rb'
- 'spec/features/admin/orders_spec.rb'
- 'spec/features/admin/product_import_spec.rb'
- 'spec/features/admin/reports_spec.rb'
- 'spec/features/consumer/groups_spec.rb'
- 'spec/features/consumer/shopping/shopping_spec.rb'
Expand Down Expand Up @@ -649,7 +647,6 @@ Layout/SpaceAroundEqualsInParameterDefault:
- 'lib/open_food_network/enterprise_issue_validator.rb'
- 'lib/open_food_network/order_cycle_form_applicator.rb'
- 'lib/open_food_network/permissions.rb'
- 'lib/open_food_network/scope_variant_to_hub.rb'
- 'lib/open_food_network/tag_rule_applicator.rb'
- 'lib/open_food_network/xero_invoices_report.rb'
- 'lib/spree/money_decorator.rb'
Expand Down Expand Up @@ -794,7 +791,7 @@ Layout/SpaceInsideBlockBraces:
- 'spec/spec_helper.rb'
- 'spec/support/cancan_helper.rb'

# Offense count: 798
# Offense count: 772
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
# SupportedStyles: space, no_space, compact
Expand Down Expand Up @@ -976,11 +973,6 @@ Lint/AmbiguousOperator:
Exclude:
- 'spec/controllers/spree/admin/payments_controller_spec.rb'

# Offense count: 2
Lint/BooleanSymbol:
Exclude:
- 'spec/features/consumer/shopping/embedded_groups_spec.rb'

# Offense count: 4
Lint/DuplicateMethods:
Exclude:
Expand Down Expand Up @@ -1030,7 +1022,7 @@ Lint/ShadowingOuterLocalVariable:
- 'app/models/spree/product_set.rb'
- 'spec/models/model_set_spec.rb'

# Offense count: 7
# Offense count: 6
# Cop supports --auto-correct.
Lint/StringConversionInInterpolation:
Exclude:
Expand All @@ -1040,7 +1032,6 @@ Lint/StringConversionInInterpolation:
- 'app/helpers/injection_helper.rb'
- 'app/helpers/spree/products_helper_decorator.rb'
- 'app/serializers/api/admin/tag_rule_serializer.rb'
- 'spec/features/admin/product_import_spec.rb'

# Offense count: 2
Lint/UnderscorePrefixedVariableName:
Expand Down Expand Up @@ -1171,7 +1162,7 @@ Lint/Void:
- 'spec/serializers/enterprise_serializer_spec.rb'
- 'spec/support/request/web_helper.rb'

# Offense count: 998
# Offense count: 993
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
Max: 776
Expand Down Expand Up @@ -1326,76 +1317,6 @@ Performance/UnneededSort:
- 'app/models/spree/product_decorator.rb'
- 'spec/features/admin/order_cycles_spec.rb'

# Offense count: 206
# Cop supports --auto-correct.
Rails/ActiveRecordAliases:
Exclude:
- 'app/controllers/admin/bulk_line_items_controller.rb'
- 'app/controllers/admin/enterprises_controller.rb'
- 'app/controllers/admin/subscriptions_controller.rb'
- 'app/controllers/api/customers_controller.rb'
- 'app/controllers/api/enterprises_controller.rb'
- 'app/controllers/api/product_images_controller.rb'
- 'app/controllers/checkout_controller.rb'
- 'app/controllers/spree/admin/line_items_controller_decorator.rb'
- 'app/controllers/spree/credit_cards_controller.rb'
- 'app/controllers/spree/orders_controller_decorator.rb'
- 'app/helpers/i18n_helper.rb'
- 'app/jobs/subscription_placement_job.rb'
- 'app/jobs/update_account_invoices.rb'
- 'app/jobs/update_billable_periods.rb'
- 'app/models/billable_period.rb'
- 'app/models/spree/adjustment_decorator.rb'
- 'app/models/spree/line_item_decorator.rb'
- 'app/models/spree/order_decorator.rb'
- 'app/models/spree/product_set.rb'
- 'app/services/create_mail_method.rb'
- 'app/services/line_item_syncer.rb'
- 'app/services/order_factory.rb'
- 'app/services/order_syncer.rb'
- 'lib/open_food_network/order_cycle_form_applicator.rb'
- 'lib/open_food_network/subscription_payment_updater.rb'
- 'lib/stripe/profile_storer.rb'
- 'spec/controllers/admin/proxy_orders_controller_spec.rb'
- 'spec/controllers/admin/subscriptions_controller_spec.rb'
- 'spec/controllers/line_items_controller_spec.rb'
- 'spec/controllers/spree/admin/payment_methods_controller_spec.rb'
- 'spec/controllers/spree/orders_controller_spec.rb'
- 'spec/features/admin/bulk_order_management_spec.rb'
- 'spec/features/admin/order_cycles_spec.rb'
- 'spec/features/admin/orders_spec.rb'
- 'spec/features/admin/subscriptions_spec.rb'
- 'spec/features/admin/variants_spec.rb'
- 'spec/features/consumer/account_spec.rb'
- 'spec/features/consumer/registration_spec.rb'
- 'spec/features/consumer/shopping/cart_spec.rb'
- 'spec/features/consumer/shopping/orders_spec.rb'
- 'spec/features/consumer/shopping/shopping_spec.rb'
- 'spec/jobs/subscription_confirm_job_spec.rb'
- 'spec/jobs/subscription_placement_job_spec.rb'
- 'spec/jobs/update_account_invoices_spec.rb'
- 'spec/jobs/update_billable_periods_spec.rb'
- 'spec/lib/open_food_network/products_cache_refreshment_spec.rb'
- 'spec/lib/open_food_network/products_cache_spec.rb'
- 'spec/lib/open_food_network/proxy_order_syncer_spec.rb'
- 'spec/models/customer_spec.rb'
- 'spec/models/enterprise_caching_spec.rb'
- 'spec/models/exchange_spec.rb'
- 'spec/models/order_cycle_spec.rb'
- 'spec/models/producer_property_spec.rb'
- 'spec/models/proxy_order_spec.rb'
- 'spec/models/spree/adjustment_spec.rb'
- 'spec/models/spree/credit_card_spec.rb'
- 'spec/models/spree/line_item_spec.rb'
- 'spec/models/spree/order_spec.rb'
- 'spec/models/spree/product_spec.rb'
- 'spec/models/spree/user_spec.rb'
- 'spec/models/spree/variant_spec.rb'
- 'spec/models/variant_override_spec.rb'
- 'spec/requests/checkout/stripe_connect_spec.rb'
- 'spec/services/order_syncer_spec.rb'
- 'spec/services/subscription_estimator_spec.rb'

# Offense count: 11
# Cop supports --auto-correct.
# Configuration parameters: NilOrEmpty, NotPresent, UnlessPresent.
Expand Down Expand Up @@ -1951,7 +1872,7 @@ Style/GuardClause:
- 'spec/support/request/distribution_helper.rb'
- 'spec/support/request/shop_workflow.rb'

# Offense count: 970
# Offense count: 968
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
Expand Down Expand Up @@ -2080,7 +2001,6 @@ Style/HashSyntax:
- 'spec/features/admin/subscriptions_spec.rb'
- 'spec/features/admin/variant_overrides_spec.rb'
- 'spec/features/consumer/account/cards_spec.rb'
- 'spec/features/consumer/shopping/embedded_groups_spec.rb'
- 'spec/features/consumer/shopping/products_spec.rb'
- 'spec/features/consumer/shopping/shopping_spec.rb'
- 'spec/jobs/subscription_placement_job_spec.rb'
Expand Down Expand Up @@ -2538,7 +2458,7 @@ Style/UnneededPercentQ:
- 'spec/features/consumer/producers_spec.rb'
- 'spec/support/request/web_helper.rb'

# Offense count: 6631
# Offense count: 6607
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Expand Down
Loading

0 comments on commit 210ee8b

Please sign in to comment.