Skip to content

Commit

Permalink
Migrate to [email protected]
Browse files Browse the repository at this point in the history
Migrate all the gem files to use this template[1] as a guide.

Some of the new RuboCop rules introduced in solidus_dev_support have
been disabled to let the build pass but will be fixed in a new PR.

[1]
https://github.com/solidusio/solidus_dev_support/tree/v0.5.0/lib/solidus_dev_support/templates/extension
  • Loading branch information
ChristianRimondi committed Jan 17, 2020
1 parent 76189f7 commit 2f37be5
Show file tree
Hide file tree
Showing 18 changed files with 236 additions and 249 deletions.
5 changes: 5 additions & 0 deletions .gem_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bump:
recurse: false
file: 'lib/solidus_graphql_api/version.rb'
message: Bump SolidusGraphqlApi to %{version}
tag: true
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*~
.#*
.DS_Store
.Gemfile
.idea
.project
.sass-cache
Expand All @@ -12,5 +13,5 @@ coverage
nbproject
pkg
spec/dummy
spec/examples.txt
tmp
.Gemfile
3 changes: 2 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
--color
--color
--require spec_helper
174 changes: 0 additions & 174 deletions .rubocop-https---relaxed-ruby-style-rubocop-yml

This file was deleted.

76 changes: 62 additions & 14 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,62 @@
inherit_from:
- https://relaxed.ruby.style/rubocop.yml

AllCops:
Exclude:
- 'node_modules/**/*'
- 'vendor/**/*'
- '.git/**/*'
- 'bin/rake'
- 'spec/dummy/**/*'

Metrics/BlockLength:
Exclude:
- 'spec/**/*_spec.rb'
require:
- solidus_dev_support/rubocop

Style/ExpandPathArguments:
Enabled: false

Metrics/LineLength:
Enabled: false

Performance/RegexpMatch:
Enabled: false

RSpec/MessageSpies:
Enabled: false

RSpec/NotToNot:
Enabled: false

RSpec/NamedSubject:
Enabled: false

RSpec/VerifiedDoubles:
Enabled: false

RSpec/LeadingSubject:
Enabled: false

RSpec/ContextWording:
Enabled: false

RSpec/NestedGroups:
Enabled: false

RSpec/PredicateMatcher:
Enabled: false

RSpec/DescribeClass:
Enabled: false

RSpec/DescribedClass:
Enabled: false

RSpec/LeakyConstantDeclaration:
Enabled: false

RSpec/AnyInstance:
Enabled: false

RSpec/LetSetup:
Enabled: false

RSpec/HookArgument:
Enabled: false

Layout/AlignArguments:
Enabled: false

Rails/RakeEnvironment:
Enabled: false

Rails/HttpStatus:
Enabled: false
57 changes: 57 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# How to contribute

Third-party patches are essential to any great open source project. We want
to keep it as easy as possible to contribute changes that get things working
in your environment. There are a few guidelines that we need contributors to
follow so that we can have a chance of keeping on top of things.

## Getting Started

* Make sure you have a [GitHub account](https://github.com/signup/free)
* Submit a ticket for your issue, assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
* Make sure you fill in the earliest version that you know has the issue.
* Fork the repository on GitHub

## Making Changes

* Create a topic branch from where you want to base your work.
* This is usually the master branch.
* Only target release branches if you are certain your fix must be on that
branch.
* To quickly create a topic branch based on master; `git branch
fix/master/my_contribution master` then checkout the new branch with `git
checkout fix/master/my_contribution`. Please avoid working directly on the
`master` branch.
* Make commits of logical units.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Make sure your commit messages are in the proper format.

````
(#99999) Make the example in CONTRIBUTING imperative and concrete
Without this patch applied the example commit message in the CONTRIBUTING
document is not a concrete example. This is a problem because the
contributor is left to imagine what the commit message should look like
based on a description rather than an example. This patch fixes the
problem by making the example concrete and imperative.
The first line is a real life imperative statement with a ticket number
from our issue tracker. The body describes the behavior without the patch,
why this is a problem, and how the patch fixes the problem when applied.
````

* Make sure you have added the necessary tests for your changes.
* Run _all_ the tests to assure nothing else was accidentally broken.

## Submitting Changes

* Push your changes to a topic branch in your fork of the repository.
* Submit a pull request to the extensions repository.
* Update any Github issues to mark that you have submitted code and are ready for it to be reviewed.
* Include a link to the pull request in the ticket

# Additional Resources

* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
16 changes: 11 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
# frozen_string_literal: true

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

git_source(:github) { |name| "https://github.com/#{name}.git" }
branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
gem 'solidus', github: 'solidusio/solidus', branch: branch

solidus_branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
# 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'

gem 'solidus', github: 'solidusio/solidus', branch: solidus_branch
# Provides basic authentication functionality for testing parts of your engine
gem 'solidus_auth_devise'

case ENV['DB']
when 'mysql'
gem 'mysql2', '~> 0.4.10'
gem 'mysql2'
when 'postgresql'
gem 'pg', '~> 0.21'
gem 'pg'
else
gem 'sqlite3'
end

# Add your own local gems
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ are permitted provided that the following conditions are met:
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name Spree nor the names of its contributors may be used to
* Neither the name Solidus nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.

Expand Down
Loading

0 comments on commit 2f37be5

Please sign in to comment.