This repository has been archived by the owner on Jul 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update gem to the latest version of solidus_dev_support
- Loading branch information
1 parent
27ae4ba
commit 2140c2b
Showing
26 changed files
with
180 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,7 @@ pkg | |
*.swp | ||
spec/dummy | ||
spec/examples.txt | ||
/sandbox | ||
.rvmrc | ||
.ruby-version | ||
.ruby-gemset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env ruby | ||
# This command will automatically be run when you run "rails" with Rails gems | ||
# installed from the root of your application. | ||
|
||
ENGINE_ROOT = File.expand_path('..', __dir__) | ||
ENGINE_PATH = File.expand_path('../lib/solidus_product_feed/engine', __dir__) | ||
|
||
# Set up gems listed in the Gemfile. | ||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) | ||
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) | ||
|
||
require 'rails/all' | ||
require 'rails/engine/commands' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require "rubygems" | ||
require "bundler/setup" | ||
|
||
load Gem.bin_path("rake", "rake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
case "$DB" in | ||
postgres|postgresql) | ||
RAILSDB="postgresql" | ||
;; | ||
mysql) | ||
RAILSDB="mysql" | ||
;; | ||
sqlite|'') | ||
RAILSDB="sqlite3" | ||
;; | ||
*) | ||
echo "Invalid DB specified: $DB" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
if [ ! -z $SOLIDUS_BRANCH ] | ||
then | ||
BRANCH=$SOLIDUS_BRANCH | ||
else | ||
BRANCH="master" | ||
fi | ||
|
||
extension_name="solidus_product_feed" | ||
|
||
# Stay away from the bundler env of the containing extension. | ||
function unbundled { | ||
ruby -rbundler -e'b = proc {system *ARGV}; Bundler.respond_to?(:with_unbundled_env) ? Bundler.with_unbundled_env(&b) : Bundler.with_clean_env(&b)' -- $@ | ||
} | ||
|
||
rm -rf ./sandbox | ||
unbundled bundle exec rails new sandbox --database="$RAILSDB" \ | ||
--skip-bundle \ | ||
--skip-git \ | ||
--skip-keeps \ | ||
--skip-rc \ | ||
--skip-spring \ | ||
--skip-test \ | ||
--skip-javascript | ||
|
||
if [ ! -d "sandbox" ]; then | ||
echo 'sandbox rails application failed' | ||
exit 1 | ||
fi | ||
|
||
cd ./sandbox | ||
cat <<RUBY >> Gemfile | ||
gem 'solidus', github: 'solidusio/solidus', branch: '$BRANCH' | ||
gem 'solidus_auth_devise', '>= 2.1.0' | ||
gem 'rails-i18n' | ||
gem 'solidus_i18n' | ||
gem '$extension_name', path: '..' | ||
group :test, :development do | ||
platforms :mri do | ||
gem 'pry-byebug' | ||
end | ||
end | ||
RUBY | ||
|
||
unbundled bundle install --gemfile Gemfile | ||
|
||
unbundled bundle exec rake db:drop db:create | ||
|
||
unbundled bundle exec rails generate spree:install \ | ||
--auto-accept \ | ||
--user_class=Spree::User \ | ||
--enforce_available_locales=true \ | ||
--with-authentication=false \ | ||
$@ | ||
|
||
unbundled bundle exec rails generate solidus:auth:install | ||
|
||
echo | ||
echo "🚀 Sandbox app successfully created for $extension_name!" | ||
echo "🚀 Using $RAILSDB and Solidus $BRANCH" | ||
echo "🚀 Use 'export DB=[postgres|mysql|sqlite]' to control the DB adapter" | ||
echo "🚀 Use 'export SOLIDUS_BRANCH=<BRANCH-NAME>' to control the Solidus version" | ||
echo "🚀 This app is intended for test purposes." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# frozen_string_literal: true | ||
|
||
app_root = 'sandbox' | ||
|
||
unless File.exist? "#{app_root}/bin/rails" | ||
warn 'Creating the sandbox app...' | ||
Dir.chdir "#{__dir__}/.." do | ||
system "#{__dir__}/sandbox" or begin # rubocop:disable Style/AndOr | ||
warn 'Automatic creation of the sandbox app failed' | ||
exit 1 | ||
end | ||
end | ||
end | ||
|
||
Dir.chdir app_root | ||
exec 'bin/rails', *ARGV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ set -vx | |
|
||
gem install bundler --conservative | ||
bundle update | ||
bundle exec rake clobber | ||
bin/rake clobber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Sample localization file for English. Add more files in this directory for other locales. | ||
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. | ||
|
||
en: | ||
hello: Hello world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
$:.push File.expand_path('lib', __dir__) | ||
require 'solidus_product_feed/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.platform = Gem::Platform::RUBY | ||
s.name = 'solidus_product_feed' | ||
s.version = SolidusProductFeed::VERSION | ||
s.summary = 'Spree extension that provides an RSS feed for products' | ||
s.description = 'A Spree extension that provides an RSS feed for products, with Google Shopper extensions' # rubocop:disable Metrics/LineLength | ||
|
||
s.required_ruby_version = '~> 2.4' | ||
|
||
s.author = 'Joshua Nussbaum' | ||
s.email = 'joshnuss@gmail.com' | ||
s.homepage = 'https://github.com/solidusio-contrib/solidus_product_feed' | ||
s.license = 'BSD-3-Clause' | ||
|
||
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"] | ||
|
||
if s.respond_to?(:metadata) | ||
s.metadata["homepage_uri"] = s.homepage if s.homepage | ||
s.metadata["source_code_uri"] = s.homepage if s.homepage | ||
end | ||
|
||
s.add_runtime_dependency 'deface' | ||
s.add_runtime_dependency 'solidus_backend', [">= 1.0", "< 3"] | ||
s.add_runtime_dependency 'solidus_core', ['>= 1.0', '< 3'] | ||
s.add_runtime_dependency 'solidus_support', '~> 0.5' | ||
|
||
s.add_development_dependency 'solidus_dev_support' | ||
require_relative 'lib/solidus_product_feed/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'solidus_product_feed' | ||
spec.version = SolidusProductFeed::VERSION | ||
spec.authors = ['Joshua Nussbaum'] | ||
spec.email = 'joshnuss@gmail.com' | ||
|
||
spec.summary = 'Solidus extension that provides an RSS feed for products.' | ||
spec.description = 'A Solidus extension that provides an RSS feed for products, with support for Google Merchant Feed.' | ||
spec.homepage = 'https://github.com/solidusio-contrib/solidus_product_feed' | ||
spec.license = 'BSD-3-Clause' | ||
|
||
spec.metadata['homepage_uri'] = spec.homepage | ||
spec.metadata['source_code_uri'] = 'https://github.com/solidusio-contrib/solidus_product_feed' | ||
spec.metadata['changelog_uri'] = '' | ||
|
||
spec.required_ruby_version = Gem::Requirement.new('~> 2.5') | ||
|
||
# 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. | ||
files = Dir.chdir(__dir__) { `git ls-files -z`.split("\x0") } | ||
|
||
spec.files = files.grep_v(%r{^(test|spec|features)/}) | ||
spec.test_files = files.grep(%r{^(test|spec|features)/}) | ||
spec.bindir = "exe" | ||
spec.executables = files.grep(%r{^exe/}) { |f| File.basename(f) } | ||
spec.require_paths = ["lib"] | ||
|
||
spec.add_dependency 'solidus_core', ['>= 2.0.0', '< 3'] | ||
spec.add_dependency 'solidus_support', '~> 0.5' | ||
|
||
spec.add_development_dependency 'solidus_dev_support' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters