mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
update configs for rails 4
This commit is contained in:
parent
d1de2998de
commit
65859807ea
15 changed files with 226 additions and 239 deletions
35
Gemfile
35
Gemfile
|
|
@ -1,6 +1,19 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'rails', '~>3.2'
|
gem 'rails', '4.0.0.rc1'
|
||||||
|
gem 'sass-rails', '4.0.0.rc1'
|
||||||
|
gem 'coffee-rails', '~>4.0'
|
||||||
|
|
||||||
|
# add these gems to help with the transition:
|
||||||
|
gem 'protected_attributes'
|
||||||
|
gem 'rails-observers'
|
||||||
|
|
||||||
|
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||||
|
gem 'therubyracer'
|
||||||
|
|
||||||
|
gem 'uglifier', '>=1.3.0'
|
||||||
|
|
||||||
|
gem 'jquery-rails'
|
||||||
|
|
||||||
# you may comment out the database driver you will not be using.
|
# you may comment out the database driver you will not be using.
|
||||||
# This will prevent a native build of the driver. Building native drivers is not
|
# This will prevent a native build of the driver. Building native drivers is not
|
||||||
|
|
@ -19,23 +32,15 @@ gem "rails_autolink"
|
||||||
gem "cache_digests"
|
gem "cache_digests"
|
||||||
gem "rack-mini-profiler"
|
gem "rack-mini-profiler"
|
||||||
|
|
||||||
# Gems used only for assets and not required
|
|
||||||
# in production environments by default.
|
|
||||||
group :assets do
|
|
||||||
gem 'sass-rails'
|
|
||||||
gem 'coffee-rails'
|
|
||||||
|
|
||||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
|
||||||
gem 'therubyracer'
|
|
||||||
|
|
||||||
gem 'uglifier'
|
|
||||||
end
|
|
||||||
|
|
||||||
gem 'jquery-rails'
|
|
||||||
|
|
||||||
# To use ActiveModel has_secure_password
|
# To use ActiveModel has_secure_password
|
||||||
gem 'bcrypt-ruby'
|
gem 'bcrypt-ruby'
|
||||||
|
|
||||||
|
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
||||||
|
# gem 'turbolinks'
|
||||||
|
|
||||||
|
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
||||||
|
# gem 'jbuilder', '~> 1.0.1'
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem "yard"
|
gem "yard"
|
||||||
gem "tolk"
|
gem "tolk"
|
||||||
|
|
|
||||||
138
Gemfile.lock
138
Gemfile.lock
|
|
@ -3,43 +3,40 @@ GEM
|
||||||
specs:
|
specs:
|
||||||
RedCloth (4.2.9)
|
RedCloth (4.2.9)
|
||||||
aasm (3.0.17)
|
aasm (3.0.17)
|
||||||
actionmailer (3.2.13)
|
actionmailer (4.0.0.rc1)
|
||||||
actionpack (= 3.2.13)
|
actionpack (= 4.0.0.rc1)
|
||||||
mail (~> 2.5.3)
|
mail (~> 2.5.3)
|
||||||
actionpack (3.2.13)
|
actionpack (4.0.0.rc1)
|
||||||
activemodel (= 3.2.13)
|
activesupport (= 4.0.0.rc1)
|
||||||
activesupport (= 3.2.13)
|
builder (~> 3.1.0)
|
||||||
builder (~> 3.0.0)
|
|
||||||
erubis (~> 2.7.0)
|
erubis (~> 2.7.0)
|
||||||
journey (~> 1.0.4)
|
rack (~> 1.5.2)
|
||||||
rack (~> 1.4.5)
|
rack-test (~> 0.6.2)
|
||||||
rack-cache (~> 1.2)
|
activemodel (4.0.0.rc1)
|
||||||
rack-test (~> 0.6.1)
|
activesupport (= 4.0.0.rc1)
|
||||||
sprockets (~> 2.2.1)
|
builder (~> 3.1.0)
|
||||||
activemodel (3.2.13)
|
activerecord (4.0.0.rc1)
|
||||||
activesupport (= 3.2.13)
|
activemodel (= 4.0.0.rc1)
|
||||||
builder (~> 3.0.0)
|
activerecord-deprecated_finders (~> 1.0.2)
|
||||||
activerecord (3.2.13)
|
activesupport (= 4.0.0.rc1)
|
||||||
activemodel (= 3.2.13)
|
arel (~> 4.0.0)
|
||||||
activesupport (= 3.2.13)
|
activerecord-deprecated_finders (1.0.2)
|
||||||
arel (~> 3.0.2)
|
activesupport (4.0.0.rc1)
|
||||||
tzinfo (~> 0.3.29)
|
i18n (~> 0.6, >= 0.6.4)
|
||||||
activeresource (3.2.13)
|
minitest (~> 4.2)
|
||||||
activemodel (= 3.2.13)
|
multi_json (~> 1.3)
|
||||||
activesupport (= 3.2.13)
|
thread_safe (~> 0.1)
|
||||||
activesupport (3.2.13)
|
tzinfo (~> 0.3.37)
|
||||||
i18n (= 0.6.1)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
acts_as_list (0.2.0)
|
acts_as_list (0.2.0)
|
||||||
activerecord (>= 3.0)
|
activerecord (>= 3.0)
|
||||||
arel (3.0.2)
|
arel (4.0.0)
|
||||||
aruba (0.5.2)
|
aruba (0.5.2)
|
||||||
childprocess (~> 0.3.6)
|
childprocess (~> 0.3.6)
|
||||||
cucumber (>= 1.1.1)
|
cucumber (>= 1.1.1)
|
||||||
rspec-expectations (>= 2.7.0)
|
rspec-expectations (>= 2.7.0)
|
||||||
atomic (1.1.8)
|
atomic (1.1.9)
|
||||||
bcrypt-ruby (3.0.1)
|
bcrypt-ruby (3.0.1)
|
||||||
builder (3.0.4)
|
builder (3.1.4)
|
||||||
bullet (4.6.0)
|
bullet (4.6.0)
|
||||||
uniform_notifier
|
uniform_notifier
|
||||||
cache_digests (0.3.0)
|
cache_digests (0.3.0)
|
||||||
|
|
@ -53,9 +50,9 @@ GEM
|
||||||
xpath (~> 2.0)
|
xpath (~> 2.0)
|
||||||
childprocess (0.3.9)
|
childprocess (0.3.9)
|
||||||
ffi (~> 1.0, >= 1.0.11)
|
ffi (~> 1.0, >= 1.0.11)
|
||||||
coffee-rails (3.2.2)
|
coffee-rails (4.0.0)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
railties (~> 3.2.0)
|
railties (>= 4.0.0.beta, < 5.0)
|
||||||
coffee-script (2.2.0)
|
coffee-script (2.2.0)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
|
|
@ -65,11 +62,10 @@ GEM
|
||||||
diff-lcs (>= 1.1.3)
|
diff-lcs (>= 1.1.3)
|
||||||
gherkin (~> 2.12.0)
|
gherkin (~> 2.12.0)
|
||||||
multi_json (~> 1.3)
|
multi_json (~> 1.3)
|
||||||
cucumber-rails (1.3.1)
|
cucumber-rails (1.3.0)
|
||||||
capybara (>= 1.1.2)
|
capybara (>= 1.1.2)
|
||||||
cucumber (>= 1.2.0)
|
cucumber (>= 1.1.8)
|
||||||
nokogiri (>= 1.5.0)
|
nokogiri (>= 1.5.0)
|
||||||
rails (~> 3.0)
|
|
||||||
database_cleaner (0.9.1)
|
database_cleaner (0.9.1)
|
||||||
diff-lcs (1.2.4)
|
diff-lcs (1.2.4)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
|
|
@ -85,12 +81,10 @@ GEM
|
||||||
multi_json (~> 1.3)
|
multi_json (~> 1.3)
|
||||||
hike (1.2.2)
|
hike (1.2.2)
|
||||||
htmlentities (4.3.1)
|
htmlentities (4.3.1)
|
||||||
i18n (0.6.1)
|
i18n (0.6.4)
|
||||||
journey (1.0.4)
|
|
||||||
jquery-rails (2.2.1)
|
jquery-rails (2.2.1)
|
||||||
railties (>= 3.0, < 5.0)
|
railties (>= 3.0, < 5.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
json (1.7.7)
|
|
||||||
libv8 (3.11.8.17)
|
libv8 (3.11.8.17)
|
||||||
mail (2.5.3)
|
mail (2.5.3)
|
||||||
i18n (>= 0.4.0)
|
i18n (>= 0.4.0)
|
||||||
|
|
@ -98,41 +92,38 @@ GEM
|
||||||
treetop (~> 1.4.8)
|
treetop (~> 1.4.8)
|
||||||
metaclass (0.0.1)
|
metaclass (0.0.1)
|
||||||
mime-types (1.23)
|
mime-types (1.23)
|
||||||
|
minitest (4.7.4)
|
||||||
mocha (0.13.3)
|
mocha (0.13.3)
|
||||||
metaclass (~> 0.0.1)
|
metaclass (~> 0.0.1)
|
||||||
multi_json (1.7.2)
|
multi_json (1.7.3)
|
||||||
mysql2 (0.3.11)
|
mysql2 (0.3.11)
|
||||||
nokogiri (1.5.9)
|
nokogiri (1.5.9)
|
||||||
polyglot (0.3.3)
|
polyglot (0.3.3)
|
||||||
rack (1.4.5)
|
protected_attributes (1.0.1)
|
||||||
rack-cache (1.2)
|
activemodel (>= 4.0.0.beta, < 5.0)
|
||||||
rack (>= 0.4)
|
rack (1.5.2)
|
||||||
rack-mini-profiler (0.1.26)
|
rack-mini-profiler (0.1.26)
|
||||||
rack (>= 1.1.3)
|
rack (>= 1.1.3)
|
||||||
rack-ssl (1.3.3)
|
|
||||||
rack
|
|
||||||
rack-test (0.6.2)
|
rack-test (0.6.2)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rails (3.2.13)
|
rails (4.0.0.rc1)
|
||||||
actionmailer (= 3.2.13)
|
actionmailer (= 4.0.0.rc1)
|
||||||
actionpack (= 3.2.13)
|
actionpack (= 4.0.0.rc1)
|
||||||
activerecord (= 3.2.13)
|
activerecord (= 4.0.0.rc1)
|
||||||
activeresource (= 3.2.13)
|
activesupport (= 4.0.0.rc1)
|
||||||
activesupport (= 3.2.13)
|
bundler (>= 1.3.0, < 2.0)
|
||||||
bundler (~> 1.0)
|
railties (= 4.0.0.rc1)
|
||||||
railties (= 3.2.13)
|
sprockets-rails (~> 2.0.0.rc4)
|
||||||
rails_autolink (1.0.9)
|
rails-observers (0.1.1)
|
||||||
rails (~> 3.1)
|
railties (~> 4.0.0.beta)
|
||||||
railties (3.2.13)
|
rails_autolink (1.1.0)
|
||||||
actionpack (= 3.2.13)
|
rails (> 3.1)
|
||||||
activesupport (= 3.2.13)
|
railties (4.0.0.rc1)
|
||||||
rack-ssl (~> 1.3.2)
|
actionpack (= 4.0.0.rc1)
|
||||||
|
activesupport (= 4.0.0.rc1)
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
rdoc (~> 3.4)
|
thor (>= 0.18.1, < 2.0)
|
||||||
thor (>= 0.14.6, < 2.0)
|
|
||||||
rake (10.0.4)
|
rake (10.0.4)
|
||||||
rdoc (3.12.2)
|
|
||||||
json (~> 1.4)
|
|
||||||
ref (1.0.4)
|
ref (1.0.4)
|
||||||
rspec-expectations (2.13.0)
|
rspec-expectations (2.13.0)
|
||||||
diff-lcs (>= 1.1.3, < 2.0)
|
diff-lcs (>= 1.1.3, < 2.0)
|
||||||
|
|
@ -140,10 +131,11 @@ GEM
|
||||||
safe_yaml (0.9.1)
|
safe_yaml (0.9.1)
|
||||||
sanitize (2.0.3)
|
sanitize (2.0.3)
|
||||||
nokogiri (>= 1.4.4, < 1.6)
|
nokogiri (>= 1.4.4, < 1.6)
|
||||||
sass (3.2.8)
|
sass (3.2.9)
|
||||||
sass-rails (3.2.6)
|
sass-rails (4.0.0.rc1)
|
||||||
railties (~> 3.2.0)
|
railties (>= 4.0.0.beta, < 5.0)
|
||||||
sass (>= 3.1.10)
|
sass (>= 3.1.10)
|
||||||
|
sprockets-rails (~> 2.0.0.rc0)
|
||||||
tilt (~> 1.3)
|
tilt (~> 1.3)
|
||||||
selenium-webdriver (2.32.1)
|
selenium-webdriver (2.32.1)
|
||||||
childprocess (>= 0.2.5)
|
childprocess (>= 0.2.5)
|
||||||
|
|
@ -154,11 +146,15 @@ GEM
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
simplecov-html (~> 0.7.1)
|
simplecov-html (~> 0.7.1)
|
||||||
simplecov-html (0.7.1)
|
simplecov-html (0.7.1)
|
||||||
sprockets (2.2.2)
|
sprockets (2.9.3)
|
||||||
hike (~> 1.2)
|
hike (~> 1.2)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
rack (~> 1.0)
|
rack (~> 1.0)
|
||||||
tilt (~> 1.1, != 1.3.0)
|
tilt (~> 1.1, != 1.3.0)
|
||||||
|
sprockets-rails (2.0.0.rc4)
|
||||||
|
actionpack (>= 3.0)
|
||||||
|
activesupport (>= 3.0)
|
||||||
|
sprockets (~> 2.8)
|
||||||
sqlite3 (1.3.7)
|
sqlite3 (1.3.7)
|
||||||
swf_fu (2.0.4)
|
swf_fu (2.0.4)
|
||||||
coffee-script
|
coffee-script
|
||||||
|
|
@ -169,7 +165,7 @@ GEM
|
||||||
thor (0.18.1)
|
thor (0.18.1)
|
||||||
thread_safe (0.1.0)
|
thread_safe (0.1.0)
|
||||||
atomic
|
atomic
|
||||||
tilt (1.3.7)
|
tilt (1.4.1)
|
||||||
timecop (0.6.1)
|
timecop (0.6.1)
|
||||||
tolk (1.3.9)
|
tolk (1.3.9)
|
||||||
safe_yaml (~> 0.8)
|
safe_yaml (~> 0.8)
|
||||||
|
|
@ -178,7 +174,7 @@ GEM
|
||||||
polyglot
|
polyglot
|
||||||
polyglot (>= 0.3.1)
|
polyglot (>= 0.3.1)
|
||||||
tzinfo (0.3.37)
|
tzinfo (0.3.37)
|
||||||
uglifier (2.0.1)
|
uglifier (2.1.0)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
multi_json (~> 1.0, >= 1.0.2)
|
multi_json (~> 1.0, >= 1.0.2)
|
||||||
uniform_notifier (1.2.0)
|
uniform_notifier (1.2.0)
|
||||||
|
|
@ -200,7 +196,7 @@ DEPENDENCIES
|
||||||
bullet
|
bullet
|
||||||
cache_digests
|
cache_digests
|
||||||
capybara
|
capybara
|
||||||
coffee-rails
|
coffee-rails (~> 4.0)
|
||||||
cucumber-rails
|
cucumber-rails
|
||||||
database_cleaner
|
database_cleaner
|
||||||
factory_girl_rails
|
factory_girl_rails
|
||||||
|
|
@ -208,12 +204,14 @@ DEPENDENCIES
|
||||||
jquery-rails
|
jquery-rails
|
||||||
mocha
|
mocha
|
||||||
mysql2
|
mysql2
|
||||||
|
protected_attributes
|
||||||
rack-mini-profiler
|
rack-mini-profiler
|
||||||
rails (~> 3.2)
|
rails (= 4.0.0.rc1)
|
||||||
|
rails-observers
|
||||||
rails_autolink
|
rails_autolink
|
||||||
rspec-expectations
|
rspec-expectations
|
||||||
sanitize
|
sanitize
|
||||||
sass-rails
|
sass-rails (= 4.0.0.rc1)
|
||||||
selenium-webdriver
|
selenium-webdriver
|
||||||
simplecov
|
simplecov
|
||||||
sqlite3
|
sqlite3
|
||||||
|
|
@ -221,6 +219,6 @@ DEPENDENCIES
|
||||||
therubyracer
|
therubyracer
|
||||||
timecop
|
timecop
|
||||||
tolk
|
tolk
|
||||||
uglifier
|
uglifier (>= 1.3.0)
|
||||||
will_paginate
|
will_paginate
|
||||||
yard
|
yard
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,9 @@ require File.expand_path('../boot', __FILE__)
|
||||||
|
|
||||||
require 'rails/all'
|
require 'rails/all'
|
||||||
|
|
||||||
if defined?(Bundler)
|
# Require the gems listed in Gemfile, including any gems
|
||||||
# If you precompile assets before deploying to production, use this line
|
# you've limited to :test, :development, or :production.
|
||||||
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
Bundler.require(:default, Rails.env)
|
||||||
# If you want your assets lazily compiled in production, use this line
|
|
||||||
# Bundler.require(:default, :assets, Rails.env)
|
|
||||||
end
|
|
||||||
|
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
SITE_CONFIG = YAML.load_file(File.join(File.dirname(__FILE__), 'site.yml'))
|
SITE_CONFIG = YAML.load_file(File.join(File.dirname(__FILE__), 'site.yml'))
|
||||||
|
|
@ -48,19 +45,10 @@ module Tracksapp
|
||||||
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
||||||
# like if you have constraints or database-specific column types
|
# like if you have constraints or database-specific column types
|
||||||
# config.active_record.schema_format = :sql
|
# config.active_record.schema_format = :sql
|
||||||
|
|
||||||
# Enforce whitelist mode for mass assignment.
|
|
||||||
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
|
||||||
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
|
||||||
# parameters by using an attr_accessible or attr_protected declaration.
|
|
||||||
config.active_record.whitelist_attributes = true
|
|
||||||
|
|
||||||
# Set timezone of dates in database
|
# Set timezone of dates in database
|
||||||
config.active_record.default_timezone = :utc
|
config.active_record.default_timezone = :utc
|
||||||
|
|
||||||
# Enable the asset pipeline
|
|
||||||
config.assets.enabled = true
|
|
||||||
|
|
||||||
# Disable loading of the full environment when precompiling assets
|
# Disable loading of the full environment when precompiling assets
|
||||||
config.assets.initialize_on_precompile = false
|
config.assets.initialize_on_precompile = false
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
require 'rubygems'
|
|
||||||
|
|
||||||
# Set up gems listed in the Gemfile.
|
# Set up gems listed in the Gemfile.
|
||||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,5 @@
|
||||||
# Load the rails application
|
# Load the rails application.
|
||||||
require File.expand_path('../application', __FILE__)
|
require File.expand_path('../application', __FILE__)
|
||||||
|
|
||||||
if RUBY_VERSION.to_f >= 1.9
|
# Initialize the rails application.
|
||||||
Encoding.default_external = Encoding::UTF_8
|
Tracksapp::Application.initialize!
|
||||||
Encoding.default_internal = Encoding::UTF_8
|
|
||||||
end
|
|
||||||
|
|
||||||
# Initialize the rails application
|
|
||||||
Tracksapp::Application.initialize!
|
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ Tracksapp::Application.configure do
|
||||||
# since you don't have to restart the web server when you make code changes.
|
# since you don't have to restart the web server when you make code changes.
|
||||||
config.cache_classes = false
|
config.cache_classes = false
|
||||||
|
|
||||||
# Log error messages when you accidentally call methods on nil.
|
# Do not eager load code on boot.
|
||||||
config.whiny_nils = true
|
config.eager_load = false
|
||||||
|
|
||||||
# Show full error reports and disable caching
|
# Show full error reports and disable caching
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
|
|
@ -19,19 +19,6 @@ Tracksapp::Application.configure do
|
||||||
# Print deprecation notices to the Rails logger
|
# Print deprecation notices to the Rails logger
|
||||||
config.active_support.deprecation = :log
|
config.active_support.deprecation = :log
|
||||||
|
|
||||||
# Only use best-standards-support built into browsers
|
|
||||||
config.action_dispatch.best_standards_support = :builtin
|
|
||||||
|
|
||||||
# Raise exception on mass assignment protection for Active Record models
|
|
||||||
config.active_record.mass_assignment_sanitizer = :strict
|
|
||||||
|
|
||||||
# Log the query plan for queries taking more than this (works
|
|
||||||
# with SQLite, MySQL, and PostgreSQL)
|
|
||||||
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
||||||
|
|
||||||
# Do not compress assets
|
|
||||||
config.assets.compress = false
|
|
||||||
|
|
||||||
# Expands the lines which load the assets
|
# Expands the lines which load the assets
|
||||||
config.assets.debug = true
|
config.assets.debug = true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,67 +1,81 @@
|
||||||
Tracksapp::Application.configure do
|
Tracksapp::Application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# Code is not reloaded between requests
|
# Code is not reloaded between requests.
|
||||||
config.cache_classes = true
|
config.cache_classes = true
|
||||||
|
|
||||||
# Full error reports are disabled and caching is turned on
|
# Eager load code on boot. This eager loads most of Rails and
|
||||||
|
# your application in memory, allowing both thread web servers
|
||||||
|
# and those relying on copy on write to perform better.
|
||||||
|
# Rake tasks automatically ignore this option for performance.
|
||||||
|
config.eager_load = true
|
||||||
|
|
||||||
|
# Full error reports are disabled and caching is turned on.
|
||||||
config.consider_all_requests_local = false
|
config.consider_all_requests_local = false
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
|
|
||||||
# Disable Rails's static asset server (Apache or nginx will already do this)
|
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
||||||
|
# Add `rack-cache` to your Gemfile before enabling this.
|
||||||
|
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
||||||
|
# config.action_dispatch.rack_cache = true
|
||||||
|
|
||||||
|
# Disable Rails's static asset server (Apache or nginx will already do this).
|
||||||
config.serve_static_assets = false
|
config.serve_static_assets = false
|
||||||
|
|
||||||
# Compress JavaScripts and CSS
|
# Compress JavaScripts and CSS.
|
||||||
config.assets.compress = true
|
config.assets.js_compressor = :uglifier
|
||||||
|
# config.assets.css_compressor = :sass
|
||||||
|
|
||||||
# Don't fallback to assets pipeline if a precompiled asset is missed
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||||
config.assets.compile = false
|
config.assets.compile = false
|
||||||
|
|
||||||
# Generate digests for assets URLs
|
# Generate digests for assets URLs.
|
||||||
config.assets.digest = true
|
config.assets.digest = true
|
||||||
|
|
||||||
# Defaults to Rails.root.join("public/assets")
|
# Version of your assets, change this if you want to expire all your assets.
|
||||||
# config.assets.manifest = YOUR_PATH
|
config.assets.version = '1.0'
|
||||||
|
|
||||||
# Specifies the header that your server uses for sending files
|
# Specifies the header that your server uses for sending files.
|
||||||
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
||||||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
||||||
|
|
||||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||||
# config.force_ssl = true
|
# config.force_ssl = true
|
||||||
|
|
||||||
# See everything in the log (default is :info)
|
# Set to :debug to see everything in the log.
|
||||||
# config.log_level = :debug
|
config.log_level = :info
|
||||||
|
|
||||||
# Prepend all log lines with the following tags
|
# Prepend all log lines with the following tags.
|
||||||
# config.log_tags = [ :subdomain, :uuid ]
|
# config.log_tags = [ :subdomain, :uuid ]
|
||||||
|
|
||||||
# Use a different logger for distributed setups
|
# Use a different logger for distributed setups.
|
||||||
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
||||||
|
|
||||||
# Use a different cache store in production
|
# Use a different cache store in production.
|
||||||
# config.cache_store = :mem_cache_store
|
# config.cache_store = :mem_cache_store
|
||||||
|
|
||||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
||||||
# config.action_controller.asset_host = "http://assets.example.com"
|
# config.action_controller.asset_host = "http://assets.example.com"
|
||||||
|
|
||||||
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
# Precompile additional assets.
|
||||||
|
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||||
|
# config.assets.precompile += %w( search.js )
|
||||||
config.assets.precompile += %w( print.css login.css mobile.css )
|
config.assets.precompile += %w( print.css login.css mobile.css )
|
||||||
|
|
||||||
# Disable delivery errors, bad email addresses will be ignored
|
# Ignore bad email addresses and do not raise email delivery errors.
|
||||||
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||||
# config.action_mailer.raise_delivery_errors = false
|
# config.action_mailer.raise_delivery_errors = false
|
||||||
|
|
||||||
# Enable threaded mode
|
|
||||||
# config.threadsafe!
|
|
||||||
|
|
||||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||||
# the I18n.default_locale when a translation can not be found)
|
# the I18n.default_locale when a translation can not be found).
|
||||||
config.i18n.fallbacks = true
|
config.i18n.fallbacks = true
|
||||||
|
|
||||||
# Send deprecation notices to registered listeners
|
# Send deprecation notices to registered listeners.
|
||||||
config.active_support.deprecation = :notify
|
config.active_support.deprecation = :notify
|
||||||
|
|
||||||
# Log the query plan for queries taking more than this (works
|
# Disable automatic flushing of the log to improve performance.
|
||||||
# with SQLite, MySQL, and PostgreSQL)
|
# config.autoflush_log = false
|
||||||
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
||||||
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
||||||
|
config.log_formatter = ::Logger::Formatter.new
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
Tracksapp::Application.configure do
|
Tracksapp::Application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# The test environment is used exclusively to run your application's
|
# The test environment is used exclusively to run your application's
|
||||||
# test suite. You never need to work with it otherwise. Remember that
|
# test suite. You never need to work with it otherwise. Remember that
|
||||||
|
|
@ -7,32 +7,31 @@ Tracksapp::Application.configure do
|
||||||
# and recreated between test runs. Don't rely on the data there!
|
# and recreated between test runs. Don't rely on the data there!
|
||||||
config.cache_classes = true
|
config.cache_classes = true
|
||||||
|
|
||||||
# Configure static asset server for tests with Cache-Control for performance
|
# Do not eager load code on boot. This avoids loading your whole application
|
||||||
config.serve_static_assets = true
|
# just for the purpose of running a single test. If you are using a tool that
|
||||||
|
# preloads Rails for running tests, you may have to set it to true.
|
||||||
|
config.eager_load = false
|
||||||
|
|
||||||
|
# Configure static asset server for tests with Cache-Control for performance.
|
||||||
|
config.serve_static_assets = true
|
||||||
config.static_cache_control = "public, max-age=3600"
|
config.static_cache_control = "public, max-age=3600"
|
||||||
|
|
||||||
# Log error messages when you accidentally call methods on nil
|
# Show full error reports and disable caching.
|
||||||
config.whiny_nils = true
|
|
||||||
|
|
||||||
# Show full error reports and disable caching
|
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
# Raise exceptions instead of rendering exception templates
|
# Raise exceptions instead of rendering exception templates.
|
||||||
config.action_dispatch.show_exceptions = false
|
config.action_dispatch.show_exceptions = false
|
||||||
|
|
||||||
# Disable request forgery protection in test environment
|
# Disable request forgery protection in test environment.
|
||||||
config.action_controller.allow_forgery_protection = false
|
config.action_controller.allow_forgery_protection = false
|
||||||
|
|
||||||
# Tell Action Mailer not to deliver emails to the real world.
|
# Tell Action Mailer not to deliver emails to the real world.
|
||||||
# The :test delivery method accumulates sent emails in the
|
# The :test delivery method accumulates sent emails in the
|
||||||
# ActionMailer::Base.deliveries array.
|
# ActionMailer::Base.deliveries array.
|
||||||
config.action_mailer.delivery_method = :test
|
config.action_mailer.delivery_method = :test
|
||||||
|
|
||||||
# Raise exception on mass assignment protection for Active Record models
|
# Print deprecation notices to the stderr.
|
||||||
config.active_record.mass_assignment_sanitizer = :strict
|
|
||||||
|
|
||||||
# Print deprecation notices to the stderr
|
|
||||||
config.active_support.deprecation = :stderr
|
config.active_support.deprecation = :stderr
|
||||||
|
|
||||||
# Unique cookies and use cookies for session
|
# Unique cookies and use cookies for session
|
||||||
|
|
|
||||||
4
config/initializers/filter_parameter_logging.rb
Normal file
4
config/initializers/filter_parameter_logging.rb
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
# Configure sensitive parameters which will be filtered from the log file.
|
||||||
|
Rails.application.config.filter_parameters += [:password]
|
||||||
|
|
@ -1,15 +1,16 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Add new inflection rules using the following format
|
# Add new inflection rules using the following format. Inflections
|
||||||
# (all these examples are active by default):
|
# are locale specific, and you may define rules for as many different
|
||||||
# ActiveSupport::Inflector.inflections do |inflect|
|
# locales as you wish. All of these examples are active by default:
|
||||||
|
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||||
# inflect.plural /^(ox)$/i, '\1en'
|
# inflect.plural /^(ox)$/i, '\1en'
|
||||||
# inflect.singular /^(ox)en/i, '\1'
|
# inflect.singular /^(ox)en/i, '\1'
|
||||||
# inflect.irregular 'person', 'people'
|
# inflect.irregular 'person', 'people'
|
||||||
# inflect.uncountable %w( fish sheep )
|
# inflect.uncountable %w( fish sheep )
|
||||||
# end
|
# end
|
||||||
#
|
|
||||||
# These inflection rules are supported but not enabled by default:
|
# These inflection rules are supported but not enabled by default:
|
||||||
# ActiveSupport::Inflector.inflections do |inflect|
|
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||||
# inflect.acronym 'RESTful'
|
# inflect.acronym 'RESTful'
|
||||||
# end
|
# end
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Your secret key for verifying the integrity of signed cookies.
|
# Your secret key is used for verifying the integrity of signed cookies.
|
||||||
# If you change this key, all old signed cookies will become invalid!
|
# If you change this key, all old signed cookies will become invalid!
|
||||||
|
|
||||||
# Make sure the secret is at least 30 characters and all random,
|
# Make sure the secret is at least 30 characters and all random,
|
||||||
# no regular words or you'll be exposed to dictionary attacks.
|
# no regular words or you'll be exposed to dictionary attacks.
|
||||||
Tracksapp::Application.config.secret_token = SITE_CONFIG["secret_token"] || SecureRandom.hex(64)
|
# You can use `rake secret` to generate a secure secret key.
|
||||||
|
|
||||||
|
# Make sure your secret_key_base is kept private
|
||||||
|
# if you're sharing your code publicly.
|
||||||
|
Tracksapp::Application.config.secret_key_base = SITE_CONFIG["secret_token"] || SecureRandom.hex(64)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
#Tracksapp::Application.config.session_store :cookie_store, key: '_tracksapp_session'
|
Tracksapp::Application.config.session_store :cookie_store, key: '_tracksapp_session'
|
||||||
|
|
||||||
# Use the database for sessions instead of the cookie-based default,
|
|
||||||
# which shouldn't be used to store highly confidential information
|
|
||||||
# (create the session table with "rails generate session_migration")
|
|
||||||
# Tracksapp::Application.config.session_store :active_record_store
|
|
||||||
|
|
||||||
Tracksapp::Application.config.session_store :active_record_store, :key => '_tracks_session_id'
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
#
|
|
||||||
# This file contains settings for ActionController::ParamsWrapper which
|
# This file contains settings for ActionController::ParamsWrapper which
|
||||||
# is enabled by default.
|
# is enabled by default.
|
||||||
|
|
||||||
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
||||||
ActiveSupport.on_load(:action_controller) do
|
ActiveSupport.on_load(:action_controller) do
|
||||||
wrap_parameters(:format => [:json])
|
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Disable root element in JSON by default.
|
# To enable root element in JSON for ActiveRecord objects.
|
||||||
ActiveSupport.on_load(:active_record) do
|
# ActiveSupport.on_load(:active_record) do
|
||||||
self.include_root_in_json = false
|
# self.include_root_in_json = true
|
||||||
end
|
# end
|
||||||
|
|
|
||||||
104
config/routes.rb
104
config/routes.rb
|
|
@ -3,57 +3,57 @@ Tracksapp::Application.routes.draw do
|
||||||
|
|
||||||
root :to => 'todos#index'
|
root :to => 'todos#index'
|
||||||
|
|
||||||
match 'login' => 'login#login'
|
post 'login' => 'login#login'
|
||||||
match 'login/expire_session' => 'login#expire_session'
|
get 'login/expire_session' => 'login#expire_session'
|
||||||
match 'login/check_expiry' => 'login#check_expiry'
|
get 'login/check_expiry' => 'login#check_expiry'
|
||||||
match 'logout' => 'login#logout'
|
get 'logout' => 'login#logout'
|
||||||
|
|
||||||
match "tickler" => "todos#list_deferred"
|
get "tickler" => "todos#list_deferred"
|
||||||
match 'review' => "projects#review"
|
get 'review' => "projects#review"
|
||||||
match 'calendar' => "calendar#show"
|
get 'calendar' => "calendar#show"
|
||||||
match 'done' => "stats#done", :as => 'done_overview'
|
get 'done' => "stats#done", :as => 'done_overview'
|
||||||
|
|
||||||
match 'search' => 'search#index'
|
get 'search' => 'search#index'
|
||||||
match 'search/results' => 'search#results', :via => 'post'
|
get 'search/results' => 'search#results', :via => 'post'
|
||||||
|
|
||||||
match 'data' => "data#index"
|
get 'data' => "data#index"
|
||||||
match 'data/csv_notes' => 'data#csv_notes'
|
get 'data/csv_notes' => 'data#csv_notes'
|
||||||
match 'data/yaml_export' => 'data#yaml_export'
|
get 'data/yaml_export' => 'data#yaml_export'
|
||||||
match 'data/xml_export' => 'data#xml_export'
|
get 'data/xml_export' => 'data#xml_export'
|
||||||
match 'data/csv_actions' => 'data#csv_actions'
|
get 'data/csv_actions' => 'data#csv_actions'
|
||||||
|
|
||||||
match 'integrations' => "integrations#index"
|
get 'integrations' => "integrations#index"
|
||||||
match 'integrations/rest_api' => "integrations#rest_api", :as => 'rest_api_docs'
|
get 'integrations/rest_api' => "integrations#rest_api", :as => 'rest_api_docs'
|
||||||
match 'integrations/cloudmailin' => 'integrations#cloudmailin'
|
get 'integrations/cloudmailin' => 'integrations#cloudmailin'
|
||||||
match 'integrations/search_plugin' => "integrations#search_plugin", :as => 'search_plugin'
|
get 'integrations/search_plugin' => "integrations#search_plugin", :as => 'search_plugin'
|
||||||
match 'integrations/google_gadget.xml' => 'integrations#google_gadget', :as => 'google_gadget'
|
get 'integrations/google_gadget.xml' => 'integrations#google_gadget', :as => 'google_gadget'
|
||||||
match 'integrations/get_applescript1.js' => 'integrations#get_applescript1'
|
get 'integrations/get_applescript1.js' => 'integrations#get_applescript1'
|
||||||
match 'integrations/get_applescript2.js' => 'integrations#get_applescript2'
|
get 'integrations/get_applescript2.js' => 'integrations#get_applescript2'
|
||||||
match 'integrations/get_quicksilver_applescript.js' => 'integrations#get_quicksilver_applescript'
|
get 'integrations/get_quicksilver_applescript.js' => 'integrations#get_quicksilver_applescript'
|
||||||
|
|
||||||
match 'preferences' => "preferences#index"
|
get 'preferences' => "preferences#index"
|
||||||
match 'preferences/render_date_format' => "preferences#render_date_format"
|
get 'preferences/render_date_format' => "preferences#render_date_format"
|
||||||
|
|
||||||
match 'feeds' => "feedlist#index", :as => 'feeds'
|
get 'feeds' => "feedlist#index", :as => 'feeds'
|
||||||
match 'feedlist/get_feeds_for_context' => 'feedlist#get_feeds_for_context'
|
get 'feedlist/get_feeds_for_context' => 'feedlist#get_feeds_for_context'
|
||||||
match 'feedlist/get_feeds_for_project' => 'feedlist#get_feeds_for_project'
|
get 'feedlist/get_feeds_for_project' => 'feedlist#get_feeds_for_project'
|
||||||
|
|
||||||
match 'stats' => 'stats#index'
|
get 'stats' => 'stats#index'
|
||||||
match 'stats/actions_done_last12months_data' => 'stats#actions_done_last12months_data'
|
get 'stats/actions_done_last12months_data' => 'stats#actions_done_last12months_data'
|
||||||
match 'stats/actions_done_last_years' => 'stats#actions_done_last_years'
|
get 'stats/actions_done_last_years' => 'stats#actions_done_last_years'
|
||||||
match 'stats/actions_done_lastyears_data' => 'stats#actions_done_lastyears_data'
|
get 'stats/actions_done_lastyears_data' => 'stats#actions_done_lastyears_data'
|
||||||
match 'stats/actions_done_last30days_data' => 'stats#actions_done_last30days_data'
|
get 'stats/actions_done_last30days_data' => 'stats#actions_done_last30days_data'
|
||||||
match 'stats/actions_completion_time_data' => 'stats#actions_completion_time_data'
|
get 'stats/actions_completion_time_data' => 'stats#actions_completion_time_data'
|
||||||
match 'stats/actions_running_time_data' => 'stats#actions_running_time_data'
|
get 'stats/actions_running_time_data' => 'stats#actions_running_time_data'
|
||||||
match 'stats/actions_visible_running_time_data' => 'stats#actions_visible_running_time_data'
|
get 'stats/actions_visible_running_time_data' => 'stats#actions_visible_running_time_data'
|
||||||
match 'stats/actions_open_per_week_data' => 'stats#actions_open_per_week_data'
|
get 'stats/actions_open_per_week_data' => 'stats#actions_open_per_week_data'
|
||||||
match 'stats/context_total_actions_data' => 'stats#context_total_actions_data'
|
get 'stats/context_total_actions_data' => 'stats#context_total_actions_data'
|
||||||
match 'stats/context_running_actions_data' => 'stats#context_running_actions_data'
|
get 'stats/context_running_actions_data' => 'stats#context_running_actions_data'
|
||||||
match 'stats/actions_day_of_week_all_data' => 'stats#actions_day_of_week_all_data'
|
get 'stats/actions_day_of_week_all_data' => 'stats#actions_day_of_week_all_data'
|
||||||
match 'stats/actions_day_of_week_30days_data' => 'stats#actions_day_of_week_30days_data'
|
get 'stats/actions_day_of_week_30days_data' => 'stats#actions_day_of_week_30days_data'
|
||||||
match 'stats/actions_time_of_day_all_data' => 'stats#actions_time_of_day_all_data'
|
get 'stats/actions_time_of_day_all_data' => 'stats#actions_time_of_day_all_data'
|
||||||
match 'stats/actions_time_of_day_30days_data' => 'stats#actions_time_of_day_30days_data'
|
get 'stats/actions_time_of_day_30days_data' => 'stats#actions_time_of_day_30days_data'
|
||||||
match 'stats/show_selected_actions_from_chart/:id' => 'stats#show_selected_actions_from_chart', :as => 'show_actions_from_chart'
|
get 'stats/show_selected_actions_from_chart/:id' => 'stats#show_selected_actions_from_chart', :as => 'show_actions_from_chart'
|
||||||
|
|
||||||
resources :contexts do
|
resources :contexts do
|
||||||
member do
|
member do
|
||||||
|
|
@ -101,14 +101,14 @@ Tracksapp::Application.routes.draw do
|
||||||
post 'add_predecessor'
|
post 'add_predecessor'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
match 'todos/tag/:name' => 'todos#tag', :as => :tag
|
get 'todos/tag/:name' => 'todos#tag', :as => :tag
|
||||||
match 'tags.autocomplete' => "todos#tags", :format => 'autocomplete'
|
get 'tags.autocomplete' => "todos#tags", :format => 'autocomplete'
|
||||||
|
|
||||||
match 'todos/done/tag/:name' => "todos#done_tag", :as => :done_tag
|
get 'todos/done/tag/:name' => "todos#done_tag", :as => :done_tag
|
||||||
match 'todos/all_done/tag/:name' => "todos#all_done_tag", :as => :all_done_tag
|
get 'todos/all_done/tag/:name' => "todos#all_done_tag", :as => :all_done_tag
|
||||||
match 'auto_complete_for_predecessor' => 'todos#auto_complete_for_predecessor'
|
get 'auto_complete_for_predecessor' => 'todos#auto_complete_for_predecessor'
|
||||||
match 'mobile' => 'todos#index', :format => 'm'
|
get 'mobile' => 'todos#index', :format => 'm'
|
||||||
match 'm' => 'todos#index', :format => 'm'
|
get 'm' => 'todos#index', :format => 'm'
|
||||||
|
|
||||||
resources :recurring_todos do
|
resources :recurring_todos do
|
||||||
member do
|
member do
|
||||||
|
|
@ -130,7 +130,7 @@ Tracksapp::Application.routes.draw do
|
||||||
post 'refresh_token'
|
post 'refresh_token'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
match 'signup' => "users#new"
|
get 'signup' => "users#new"
|
||||||
|
|
||||||
resources :notes
|
resources :notes
|
||||||
resources :preferences
|
resources :preferences
|
||||||
|
|
|
||||||
0
vendor/plugins/.gitkeep
vendored
0
vendor/plugins/.gitkeep
vendored
Loading…
Add table
Add a link
Reference in a new issue