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

Update support to latest requirements for extensions #177

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Gemspec/DeprecatedAttributeAssignment:
Enabled: false

AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 2.6
Exclude:
- tmp/**/*
- "vendor/**/*"
Expand All @@ -55,4 +55,3 @@ Style/FrozenStringLiteralComment:
- "**/bin/*"
- "**/exe/*"
- "spec/**/*"

3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ gemspec
branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
gem 'solidus', github: 'solidusio/solidus', branch: branch

# A workaround for https://github.com/bundler/bundler/issues/6677
gem 'rails', '>0.a'

Comment on lines -13 to -15
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing we've noticed on solidus_taxjar when we removed Rails from the Gemfile is that it exposed an issue upstream with active_storage. It is explicitly required here however it isn't listed as one of the Rials gems that are dependencies of core here. I still think this change is good, however if you see failures booting the dummy app, this could be the culprit. I believe this should be fixed upstream in core however.

# These gems will be used by the temporary extensions generated by tests
group :test do
gem 'mysql2'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If you have an existing extension and want to update it to use the latest standa
you can run the following in the extension's directory:

```console
$ solidus extension .
$ bundle exec solidus extension .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying this!

I think we may want to also clarify in the section above on generating a new extension, that this gem needs to be installed globally (i.e. gem install solidus_dev_support in order for the the solidus executable to be added to the path. The installation instructions only focus on adding this as a dependency of an existing extension, which I think is causing some of the confusion.

```

In case of conflicting files, you will be prompted for an action. You can overwrite the files with
Expand Down
2 changes: 1 addition & 1 deletion lib/solidus_dev_support/rubocop/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require: ["rubocop-rspec", "rubocop-rails", "rubocop-performance"]

AllCops: {TargetRubyVersion: 2.5, Exclude: ["spec/dummy/**/*", "sandbox/**/*", "vendor/**/*"]}
AllCops: {TargetRubyVersion: 2.6, Exclude: ["spec/dummy/**/*", "sandbox/**/*", "vendor/**/*"]}

Layout/ArgumentAlignment: {EnforcedStyle: with_fixed_indentation}
Layout/DotPosition: {Enabled: false, StyleGuide: "https://relaxed.ruby.style/#layoutdotposition"}
Expand Down
5 changes: 0 additions & 5 deletions lib/solidus_dev_support/templates/extension/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ gem 'solidus', github: 'solidusio/solidus', branch: branch
gem 'solidus_frontend', github: 'solidusio/solidus_frontend' if branch == 'master'
gem 'solidus_frontend' if branch >= 'v3.2' # rubocop:disable Bundler/DuplicatedGem

# Needed to help Bundler figure out how to resolve dependencies,
# otherwise it takes forever to resolve them.
# See https://github.com/bundler/bundler/issues/6677
gem 'rails', '>0.a'

# Provides basic authentication functionality for testing parts of your engine
gem 'solidus_auth_devise'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
spec.metadata['source_code_uri'] = '<%= gemspec.metadata["source_code_uri"] %>'
spec.metadata['changelog_uri'] = '<%= gemspec.metadata["changelog_uri"] %>'

spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 4')
spec.required_ruby_version = Gem::Requirement.new('>= 2.6', '< 4')

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
Expand Down
2 changes: 1 addition & 1 deletion solidus_dev_support.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
spec.metadata['changelog_uri'] = 'https://github.com/solidusio/solidus_dev_support/blob/master/CHANGELOG.md'
spec.metadata['rubygems_mfa_required'] = 'true'

spec.required_ruby_version = '>= 2.5.0'
spec.required_ruby_version = '>= 2.6'

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
Expand Down