Skip to content

Commit f65ff86

Browse files
author
Mattia Roccoberton
committed
Minor changes to the dummy app
To make it work with: `bin/appraisal rails61-activeadmin rails s`
1 parent d40c550 commit f65ff86

7 files changed

Lines changed: 18 additions & 27 deletions

File tree

bin/rails

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,18 @@
11
#!/usr/bin/env ruby
22
# frozen_string_literal: true
33

4-
#
5-
# This file was generated by Bundler.
6-
#
7-
# The application 'rails' is installed as part of a gem, and
8-
# this file is here to facilitate running it.
9-
#
4+
# This command will automatically be run when you run "rails" with Rails gems
5+
# installed from the root of your application.
106

11-
require "pathname"
12-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13-
Pathname.new(__FILE__).realpath)
7+
ENV['RAILS_ENV'] ||= 'test'
148

15-
bundle_binstub = File.expand_path("../bundle", __FILE__)
9+
ENGINE_ROOT = File.expand_path('..', __dir__)
10+
ENGINE_PATH = File.expand_path('../lib/activeadmin/dynamic_fields/engine', __dir__)
11+
APP_PATH = File.expand_path('../spec/dummy/config/application', __dir__)
1612

17-
if File.file?(bundle_binstub)
18-
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19-
load(bundle_binstub)
20-
else
21-
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23-
end
24-
end
13+
# Set up gems listed in the Gemfile.
14+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
15+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
2516

26-
require "rubygems"
27-
require "bundler/setup"
28-
29-
load Gem.bin_path("railties", "rails")
17+
require 'rails/all'
18+
require 'rails/engine/commands'

spec/dummy/.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/dummy/.tool-versions

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/dummy/app/assets/stylesheets/active_admin.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@
1515
// For example, to change the default status-tag color:
1616
//
1717
// .status_tag { background: #6090DB; }
18+
19+
.red { color: #a00; }

spec/dummy/config/initializers/assets.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Be sure to restart your server when you modify this file.
22

33
# Version of your assets, change this if you want to expire all your assets.
4-
Rails.application.config.assets.version = '1.0'
4+
# Rails.application.config.assets.version = '1.0'
55

66
# Add additional assets to the asset load path.
77
# Rails.application.config.assets.paths << Emoji.images_path

spec/dummy/config/routes.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
Rails.application.routes.draw do
22
ActiveAdmin.routes(self)
3+
4+
root to: redirect('/admin')
35
end

spec/support/capybara_cuprite.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
# See additional options for Dockerized environment in the respective section of this article
1515
browser_options: browser_options,
1616
# Increase Chrome startup wait time (required for stable CI builds)
17-
process_timeout: 10,
17+
process_timeout: 15,
1818
# The number of seconds we'll wait for a response when communicating with browser. Default is 5
19-
timeout: 10,
19+
timeout: 15,
2020
# Enable debugging capabilities
2121
inspector: true,
2222
# Allow running Chrome in a headful mode by setting HEADLESS env var to a falsey value

0 commit comments

Comments
 (0)