baarkerlounger
3 years ago
5 changed files with 76 additions and 68 deletions
@ -1,31 +1,34 @@
|
||||
# frozen_string_literal: true |
||||
|
||||
source 'https://rubygems.org' |
||||
|
||||
# Specify your gem's dependencies in devise_ip_filter.gemspec |
||||
gemspec |
||||
|
||||
rails_version = ENV["RAILS_VERSION"] || "default" |
||||
rails_version = ENV['RAILS_VERSION'] || 'default' |
||||
|
||||
rails = case rails_version |
||||
when "master" |
||||
{github: "rails/rails"} |
||||
when "default" |
||||
"~> 7.0.1" |
||||
when 'master' |
||||
{ github: 'rails/rails' } |
||||
when 'default' |
||||
'~> 7.0.1' |
||||
else |
||||
"~> #{rails_version}" |
||||
end |
||||
|
||||
gem "rails", rails |
||||
gem 'rails', rails |
||||
|
||||
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.2.0') |
||||
gem "test-unit", "~> 3.0" |
||||
gem 'test-unit', '~> 3.0' |
||||
end |
||||
|
||||
group :test, :development do |
||||
gem 'sqlite3' |
||||
gem 'pry' |
||||
gem 'sprockets-rails' |
||||
gem 'sqlite3' |
||||
end |
||||
|
||||
group :test do |
||||
gem 'rack_session_access' |
||||
gem 'ammeter' |
||||
gem 'rack_session_access' |
||||
end |
||||
|
@ -1,14 +1,16 @@
|
||||
require "bundler/gem_tasks" |
||||
# frozen_string_literal: true |
||||
|
||||
APP_RAKEFILE = File.expand_path("../spec/rails_app/Rakefile", __FILE__) |
||||
require 'bundler/gem_tasks' |
||||
|
||||
APP_RAKEFILE = File.expand_path('spec/rails_app/Rakefile', __dir__) |
||||
load 'rails/tasks/engine.rake' |
||||
|
||||
require 'rspec/core/rake_task' |
||||
|
||||
desc "Run all specs in spec directory (excluding plugin specs)" |
||||
RSpec::Core::RakeTask.new(:spec => 'app:db:test:prepare') |
||||
desc 'Run all specs in spec directory (excluding plugin specs)' |
||||
RSpec::Core::RakeTask.new(spec: 'app:db:test:prepare') |
||||
|
||||
task :default => :spec |
||||
task default: :spec |
||||
|
||||
# To test against a specific version of Rails |
||||
# export RAILS_VERSION=3.2.0; bundle update; rake |
||||
|
@ -1,7 +1,9 @@
|
||||
#!/usr/bin/env rake |
||||
# frozen_string_literal: true |
||||
|
||||
# Add your own tasks in files placed in lib/tasks ending in .rake, |
||||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. |
||||
|
||||
require File.expand_path('../config/application', __FILE__) |
||||
require File.expand_path('config/application', __dir__) |
||||
|
||||
Dummy::Application.load_tasks |
||||
|
@ -1,6 +1,9 @@
|
||||
#!/usr/bin/env ruby |
||||
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. |
||||
# frozen_string_literal: true |
||||
|
||||
APP_PATH = File.expand_path('../../config/application', __FILE__) |
||||
require File.expand_path('../../config/boot', __FILE__) |
||||
# This command will automatically be run when you run "rails" with Rails 3 |
||||
# gems installed from the root of your application. |
||||
|
||||
APP_PATH = File.expand_path('../config/application', __dir__) |
||||
require File.expand_path('../config/boot', __dir__) |
||||
require 'rails/commands' |
||||
|
Loading…
Reference in new issue