solidusio / rubocop-solidus Goto Github PK
View Code? Open in Web Editor NEWAutomatic Solidus code style checking tool.
License: MIT License
Automatic Solidus code style checking tool.
License: MIT License
Deprecation PR: solidusio/solidus#2001
solidus minimum version: 2.10
because of solidusio/solidus@d1082af
From solidus 2.2 the default_credit_card has been deprecated in favor of wallet.default_credit_card
minimum solidus version: 2.2
If possible support it and update the readme and documentation as well
Detect reimbursement_success_hooks and reimbursement_failed_hooks
solidus minimum version: 2.11
Deprecation Pr: solidusio/solidus#3541
Since solidus 2.4 order.update! has been deprecated in favor of order.recalculate. I think we can create a COP to detect and autocorrect it.
After this investigation we decided to restore some COps and set their priority to warning.
Add a feature that allows cops to check and decide whether to execute themselves against a solidus version mentioned in the configuration.
rubocop.yml can hold a solidus version. e.g. - TargetSolidusVersion in the configuration.
AllCops:
TargetSolidusVersion: 2.11
There should a module that holds methods that allow us to
assign a minimum solidus version to a cop
fetch the TargetSolidusVersion from the rubocop.yml file
check a cops minimum version against the targeted version and allow a cop to be skipped.
Note: Check minimum_target_rails_version method on rubocop-rails for an idea on the implementation
Issue will be closed when:
After upgrading to Solidus 2.6, you may encounter deprecation warnings. One of these could be about the button_link_to deprecated in favor of button_to or link_to (ref). To update all occurrences, you can use this simple regex:
Search for <%= button_link_to (.+) %>.
Replace with <%= link_to $1, class: 'btn btn-primary' %> or <%= button_to $1, class: 'btn btn-primary' %> depending on which one you need.
Minimum solidus version: from the beginning
Depending on #37
From Solidus v3.0 onwards, #perform! will need to be explicitly called when creating new refunds. Please, change your code from:
Spree::Refund.create(your: attributes)
to:
Spree::Refund.create(your: attributes, perform_after_creation: false).perform!
The perform_after_creation attribute will be removed in Solidus 3.x.
Stop calling perform! as Spree::Refund after_create callback #3641 (kennyadsl)
Look for:
For solidus 2.11 looks for Spree::Refund.create/new without perform_after_create
For Solidus < 2.11 we can consider patching the model by overriding the method as done here:
solidus_minimum_version: 2.11
Solidus 3.0 removes the usage of default_address in favor of ship_address in this commit.
Probably, it will be helpful to create a new cop to automatically replace all occurrences with the new value or at least raise a warning.
Different cases:
default_address
-> ship_address
default_addresses
-> ship_addresses
The new_cop
command is not working anymore because of an issue with the RuboCop::Cop::Generator
class in the Rakefile.
After adding the support to Ruby 2.4, we had to downgrade rubocop version. The old version of RuboCop::Cop::Generator
class used an additional github_user
parameter that is not present in our Rakefile. So when you run the new_cop
command results in this error:
ArgumentError: wrong number of arguments (given 1, expected 2)
rubocop-solidus/Rakefile:26:in `new'
After discussing with @abhishekgupta5 and @piyushswain, we thought the best way to solve this issue would be to create a separate branch with support for Ruby 2.4 but remove it from the main branch.
We could fix this issue in particular, but something else could not work properly because we used the latest version of the extension generator, but we are using an old version of rubocop, resulting in classes being misused.
@DanielePalombo, WDYT?
ref https://github.com/solidusio/solidus/pull/3863/commits
Deprecate Spree::Calculator::FreeShipping
Deprecate Spree::Calculator::PercentPerItem can be replaced with Spree::Calculator::PercentOnLineItem
Deprecate Spree::Calculator::PriceSack
Deprecation PR https://github.com/solidusio/solidus/pull/3/files#diff-7a584be87b5f41f2f52e42fbd63cd8ab80e772fc11ea4cd2a9815fcec7deecbaR4
The documentation is now auto-generated inside the repo using .md
files. We want to use GH pages instead.
In solidus 2.4 discounted_amount has been deprecated in favor of total_before_tax.
Solidus 3.0 removes the usage of existing_card_id
in favor of wallet_payment_source_id
in this commit.
Probably it will be helpful to create a new cop to automatically replace all occurrences with the new value, or at least raise a warning.
It would be nice to create a Solidus Rubocop presentation.
It should cover the problem and our proposed solution.
What are the benefits of this solution
How to use it.
Solidus PR: solidusio/solidus#2915
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.