Skip to content
Merged
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: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# .git-blame-ignore-revs
# Convert to standardrb
e466db2b9cf9ae6f8b905bedb758228204ee80ab
153 changes: 0 additions & 153 deletions .rubocop-https---relaxed-ruby-style-rubocop-yml

This file was deleted.

59 changes: 4 additions & 55 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,8 @@
inherit_from:
- https://relaxed.ruby.style/rubocop.yml
require:
- standard

Gemspec/RequiredRubyVersion:
Enabled: false
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Lint/DeprecatedOpenSSLConstant:
Enabled: true
Lint/MixedRegexpCaptureTypes:
Enabled: true
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Style/AccessorGrouping:
Enabled: true
Style/BisectedAttrAccessor:
Enabled: true
Style/ExponentialNotation:
Enabled: true
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
Style/RedundantAssignment:
Enabled: true
Style/RedundantFetchBlock:
Enabled: true
Style/RedundantRegexpCharacterClass:
Enabled: true
Style/RedundantRegexpEscape:
Enabled: true
Style/SlicingWithRange:
Enabled: true

# Disable this cop until this isssue gets a clear answer:
# https://github.com/rubocop/rubocop/issues/10675
Gemspec/DeprecatedAttributeAssignment:
Enabled: false
inherit_gem:
standard: config/base.yml

AllCops:
TargetRubyVersion: 3.0
Exclude:
- tmp/**/*
- "vendor/**/*"
# Generated binstubs
- bin/rake
NewCops: enable

Style/FrozenStringLiteralComment:
Exclude:
- "**/bin/*"
- "**/exe/*"
- "spec/**/*"
2 changes: 2 additions & 0 deletions .standard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
parallel: true # default: false
format: progress # default: Standard::Formatter
22 changes: 11 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
# Specify your gem's dependencies in solidus_dev_support.gemspec
gemspec

branch = ENV.fetch('SOLIDUS_BRANCH', 'main')
gem 'solidus', github: 'solidusio/solidus', branch: branch
branch = ENV.fetch("SOLIDUS_BRANCH", "main")
gem "solidus", github: "solidusio/solidus", branch: branch

rails_version = ENV.fetch("RAILS_VERSION", "7.0")
gem 'rails', "~> #{rails_version}"
gem "rails", "~> #{rails_version}"

gem 'bundler'
gem 'rake'
gem "bundler"
gem "rake"

# These gems will be used by the temporary extensions generated by tests
group :test do
gem 'mysql2'
gem 'pg'
gem 'solidus_auth_devise'
gem 'sqlite3', rails_version < '7.2' ? '~> 1.4' : '~> 2.0'
gem "mysql2"
gem "pg"
gem "solidus_auth_devise"
gem "sqlite3", (rails_version < "7.2") ? "~> 1.4" : "~> 2.0"
end

# Use a local Gemfile to include development dependencies that might not be
# relevant for the project or for other contributors, e.g.: `gem 'pry-debug'`.
eval_gemfile 'Gemfile-local' if File.exist? 'Gemfile-local'
eval_gemfile "Gemfile-local" if File.exist? "Gemfile-local"

if rails_version == "7.0"
gem 'concurrent-ruby', '< 1.3.5'
gem "concurrent-ruby", "< 1.3.5"
end
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@ jobs:
### RuboCop configuration

solidus_dev_support includes a default [RuboCop](https://github.com/rubocop-hq/rubocop)
configuration for Solidus extensions. Currently, this is based on
[Relaxed Ruby Style](https://relaxed.ruby.style) with a few customizations, but in the future we
plan to provide custom cops to ensure your extension follows established Solidus best practices.
configuration for Solidus extensions. This configuration is based on the excellent [`standardrb`](https://github.com/standardrb/standard) gem.

We strongly recommend including the RuboCop configuration in your extension. All you have to do is
add this to your `.rubocop.yml`:
Expand Down
10 changes: 5 additions & 5 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env ruby
require 'fileutils'
require "fileutils"
include FileUtils # rubocop:disable Style/MixinUsage

GEM_ROOT = File.expand_path('..', __dir__)
GEM_ROOT = File.expand_path("..", __dir__)

def system(*args)
puts "$ #{args.size == 1 ? args.first : args.shelljoin}"
puts "$ #{(args.size == 1) ? args.first : args.shelljoin}"
super
end

Expand All @@ -16,5 +16,5 @@ end
cd GEM_ROOT

puts "\n== Installing Ruby dependencies =="
system! %{gem install bundler --conservative}
system! %{bundle check || bundle install}
system! %(gem install bundler --conservative)
system! %(bundle check || bundle install)
2 changes: 1 addition & 1 deletion bin/solidus
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby

require 'bundler/setup'
require "bundler/setup"
load "#{__dir__}/../exe/solidus"
2 changes: 1 addition & 1 deletion exe/solidus
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'solidus_dev_support/solidus_command'
require "solidus_dev_support/solidus_command"

SolidusDevSupport::SolidusCommand.start
2 changes: 1 addition & 1 deletion lib/solidus_dev_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Error < StandardError; end

class << self
def reset_spree_preferences_deprecated?
first_version_without_reset = Gem::Requirement.new('>= 2.9')
first_version_without_reset = Gem::Requirement.new(">= 2.9")
first_version_without_reset.satisfied_by?(Spree.solidus_gem_version)
end
end
Expand Down
Loading
Loading