-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dummy app to current Rails conventions (#110)
* Update test app * Remove testing branch * Update changelog
- Loading branch information
Showing
30 changed files
with
204 additions
and
164 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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
//= link_directory ../stylesheets/grape_swagger_rails .css | ||
//= link_directory ../javascripts/grape_swagger_rails .js |
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,5 +1,6 @@ | ||
#!/usr/bin/env rake | ||
# 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_relative 'config/application' | ||
|
||
Dummy::Application.load_tasks | ||
Rails.application.load_tasks |
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,4 +1,3 @@ | ||
//= link application.js | ||
//= link application.css | ||
//= link grape_swagger_rails/application.css | ||
//= link grape_swagger_rails/application.js | ||
//= link_directory ../stylesheets .css | ||
//= link_directory ../javascripts .js | ||
//= link grape_swagger_rails_manifest.js |
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,3 +1 @@ | ||
//= require jquery | ||
//= require jquery_ujs | ||
//= require_tree . |
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.
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,8 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
begin | ||
load File.expand_path('../spring', __FILE__) | ||
rescue LoadError | ||
end | ||
APP_PATH = File.expand_path('../../config/application', __FILE__) | ||
APP_PATH = File.expand_path('../config/application', __dir__) | ||
require_relative '../config/boot' | ||
require 'rails/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 |
---|---|---|
@@ -1,8 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
begin | ||
load File.expand_path('../spring', __FILE__) | ||
rescue LoadError | ||
end | ||
require_relative '../config/boot' | ||
require 'rake' | ||
Rake.application.run |
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,25 @@ | ||
#!/usr/bin/env ruby | ||
require 'fileutils' | ||
|
||
# path to your application root. | ||
APP_ROOT = File.expand_path('..', __dir__) | ||
|
||
def system!(*args) | ||
system(*args) || abort("\n== Command #{args} failed ==") | ||
end | ||
|
||
FileUtils.chdir APP_ROOT do | ||
# This script is a way to set up or update your development environment automatically. | ||
# This script is idempotent, so that you can run it at any time and get an expectable outcome. | ||
# Add necessary setup steps to this file. | ||
|
||
puts '== Installing dependencies ==' | ||
system! 'gem install bundler --conservative' | ||
system('bundle check') || system!('bundle install') | ||
|
||
puts "\n== Removing old logs and tempfiles ==" | ||
system! 'bin/rails log:clear tmp:clear' | ||
|
||
puts "\n== Restarting application server ==" | ||
system! 'bin/rails restart' | ||
end |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# This file is used by Rack-based servers to start the application. | ||
|
||
require ::File.expand_path('../config/environment', __FILE__) | ||
run Dummy::Application | ||
require_relative 'config/environment' | ||
|
||
run Rails.application | ||
Rails.application.load_server |
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,10 +1,5 @@ | ||
require 'rubygems' | ||
|
||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__) | ||
# 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 'sass' | ||
require 'grape' | ||
require 'grape-swagger' | ||
require 'coffee_script' | ||
$LOAD_PATH.unshift File.expand_path('../../../lib', __dir__) |
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,3 +1,5 @@ | ||
require File.expand_path('../application', __FILE__) | ||
# Load the Rails application. | ||
require_relative 'application' | ||
|
||
Dummy::Application.initialize! | ||
# Initialize the Rails application. | ||
Rails.application.initialize! |
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,37 +1,56 @@ | ||
require 'active_support/core_ext/integer/time' | ||
|
||
Rails.application.configure do | ||
# Settings specified here will take precedence over those in config/application.rb. | ||
|
||
# In the development environment your application's code is reloaded on | ||
# every request. This slows down response time but is perfect for development | ||
# In the development environment your application's code is reloaded any time | ||
# it changes. This slows down response time but is perfect for development | ||
# since you don't have to restart the web server when you make code changes. | ||
config.cache_classes = false | ||
|
||
# Do not eager load code on boot. | ||
config.eager_load = false | ||
|
||
# Show full error reports and disable caching. | ||
config.consider_all_requests_local = true | ||
config.action_controller.perform_caching = false | ||
# Show full error reports. | ||
config.consider_all_requests_local = true | ||
|
||
# Enable server timing | ||
config.server_timing = true | ||
|
||
# Enable/disable caching. By default caching is disabled. | ||
# Run rails dev:cache to toggle caching. | ||
if Rails.root.join('tmp/caching-dev.txt').exist? | ||
config.action_controller.perform_caching = true | ||
config.action_controller.enable_fragment_cache_logging = true | ||
|
||
# Don't care if the mailer can't send. | ||
# config.action_mailer.raise_delivery_errors = false | ||
config.cache_store = :memory_store | ||
config.public_file_server.headers = { | ||
'Cache-Control' => "public, max-age=#{2.days.to_i}" | ||
} | ||
else | ||
config.action_controller.perform_caching = false | ||
|
||
config.cache_store = :null_store | ||
end | ||
|
||
# Print deprecation notices to the Rails logger. | ||
config.active_support.deprecation = :log | ||
|
||
# Debug mode disables concatenation and preprocessing of assets. | ||
# This option may cause significant delays in view rendering with a large | ||
# number of complex assets. | ||
config.assets.debug = true | ||
# Raise exceptions for disallowed deprecations. | ||
config.active_support.disallowed_deprecation = :raise | ||
|
||
# Tell Active Support which deprecation messages to disallow. | ||
config.active_support.disallowed_deprecation_warnings = [] | ||
|
||
# Suppress logger output for asset requests. | ||
config.assets.quiet = true | ||
|
||
# Adds additional error checking when serving assets at runtime. | ||
# Checks for improperly declared sprockets dependencies. | ||
# Raises helpful error messages. | ||
config.assets.raise_runtime_errors = true | ||
# Raises error for missing translations. | ||
# config.i18n.raise_on_missing_translations = true | ||
|
||
# Raises error for missing translations | ||
# config.action_view.raise_on_missing_translations = true | ||
# Annotate rendered view with file names. | ||
# config.action_view.annotate_rendered_view_with_filenames = true | ||
|
||
# Disable animations | ||
config.middleware.use Rack::NoAnimations | ||
# Uncomment if you wish to allow Action Cable access from any origin. | ||
# config.action_cable.disable_request_forgery_protection = true | ||
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
Oops, something went wrong.