Skip to content

Commit

Permalink
Update to the latest solidus_dev_support configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aldesantis committed Jan 16, 2020
1 parent 6c658aa commit 00070f1
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 41 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_support/version.rb'
message: Bump SolidusSupport to %{version}
branch: 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
29 changes: 17 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/.bundle/
/.yardoc
/Gemfile.lock
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/
/log/
/spec/

*.gem
\#*
*~
.#*
.DS_Store
.idea
.project
.sass-cache
coverage
Gemfile.lock
tmp
nbproject
pkg
*.swp
spec/dummy
spec/examples.txt
log
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
--require spec_helper
--color
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require:
- solidus_extension_dev_tools/rubocop
- solidus_dev_support/rubocop
15 changes: 5 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
# frozen_string_literal: true

source 'https://rubygems.org'

git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

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

# Specify your gem's dependencies in solidus_support.gemspec
gemspec

gem 'sprockets', '~> 3'
gem 'sprockets-rails'

case ENV['DB']
when 'postgresql'
gem 'pg'
when 'mysql'
gem 'mysql2'
when 'postgresql'
gem 'pg'
else
gem 'sqlite3'
end

gemspec
17 changes: 17 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env ruby

# frozen_string_literal: true

require "bundler/setup"
require "solidus_support"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
$LOAD_PATH.unshift(*Dir["#{__dir__}/../app/*"])

# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require "irb"
IRB.start(__FILE__)
7 changes: 7 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx

gem install bundler --conservative
bundle update
41 changes: 23 additions & 18 deletions solidus_support.gemspec
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
$:.push File.expand_path('lib', __dir__)
require 'solidus_support/version'

Gem::Specification.new do |spec|
spec.name = 'solidus_support'
spec.version = SolidusSupport::VERSION
spec.authors = ['John Hawthorn']
spec.email = ['[email protected]']
Gem::Specification.new do |s|
s.name = 'solidus_support'
s.version = SolidusSupport::VERSION
s.summary = 'Common runtime helpers for Solidus extensions.'
s.license = 'BSD-3-Clause'

spec.summary = 'Common runtime helpers for Solidus extensions.'
spec.homepage = 'https://solidus.io'
s.author = 'John Hawthorn'
s.email = '[email protected]'
s.homepage = 'https://github.com/solidusio/solidus_support'

spec.files = `git ls-files -z`.split("\x0")
spec.require_paths = ['lib']
s.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
s.test_files = Dir['spec/**/*']
s.bindir = "exe"
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
s.require_paths = ["lib"]

spec.add_development_dependency 'bundler'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rspec-rails'
spec.add_development_dependency 'rubocop'
spec.add_development_dependency 'rubocop-rspec'
spec.add_development_dependency 'solidus_core'
spec.add_development_dependency 'solidus_dev_support'
s.add_development_dependency 'bundler'
s.add_development_dependency 'rake'
s.add_development_dependency 'rspec-rails'
s.add_development_dependency 'rubocop'
s.add_development_dependency 'rubocop-rspec'
s.add_development_dependency 'solidus_core'
s.add_development_dependency 'solidus_dev_support'
end
13 changes: 13 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# frozen_string_literal: true

# Configure Rails Environment
ENV['RAILS_ENV'] = 'test'

# Run Coverage report
require 'solidus_dev_support/rspec/coverage'

# Load dummy app
require_relative 'support/dummy_app'

# Requires factories and other useful helpers defined in spree_core.
require 'solidus_dev_support/rspec/spec_helper'

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }

0 comments on commit 00070f1

Please sign in to comment.