Cesidio Di Landa
12 years ago
commit
cee2bd02da
40 changed files with 1067 additions and 0 deletions
@ -0,0 +1,69 @@ |
|||||
|
# Linux.gitignore |
||||
|
.* |
||||
|
!.coveralls.yml |
||||
|
!.gitignore |
||||
|
!.rspec |
||||
|
!.slugignore |
||||
|
!.travis.yml |
||||
|
*~ |
||||
|
|
||||
|
|
||||
|
|
||||
|
# OSX.gitignore |
||||
|
.DS_Store |
||||
|
.AppleDouble |
||||
|
.LSOverride |
||||
|
Icon |
||||
|
|
||||
|
|
||||
|
# Thumbnails |
||||
|
._* |
||||
|
|
||||
|
# Files that might appear on external disk |
||||
|
.Spotlight-V100 |
||||
|
.Trashes |
||||
|
|
||||
|
|
||||
|
|
||||
|
# Rails.gitignore |
||||
|
*.rbc |
||||
|
*.sassc |
||||
|
.sass-cache |
||||
|
capybara-*.html |
||||
|
.rspec |
||||
|
.rvmrc |
||||
|
/.bundle |
||||
|
/vendor/bundle |
||||
|
/log/* |
||||
|
/tmp/* |
||||
|
/db/*.sqlite3 |
||||
|
/public/system/* |
||||
|
/coverage/ |
||||
|
/spec/tmp/* |
||||
|
**.orig |
||||
|
rerun.txt |
||||
|
pickle-email-*.html |
||||
|
.project |
||||
|
|
||||
|
|
||||
|
|
||||
|
# Ignore Redis' dataset snapshot |
||||
|
dump.rdb |
||||
|
|
||||
|
# Ignore chrome driver log |
||||
|
chromedriver.log |
||||
|
|
||||
|
# Ignore rails_best_practices report |
||||
|
rails_best_practices_output.html |
||||
|
|
||||
|
# Ignore brakeman report |
||||
|
brakeman.html |
||||
|
|
||||
|
# Ignore file uploads |
||||
|
/public/uploads |
||||
|
|
||||
|
# Ignore precompiled assets |
||||
|
/public/assets |
||||
|
|
||||
|
# Ignore sensitive data |
||||
|
/config/settings/local.rb |
@ -0,0 +1,77 @@ |
|||||
|
source 'https://rubygems.org' |
||||
|
|
||||
|
ruby '2.0.0' |
||||
|
gem 'rails', '4.0.0.beta1' |
||||
|
|
||||
|
# Servers |
||||
|
gem 'thin' |
||||
|
gem 'unicorn' |
||||
|
|
||||
|
# Multi-environment configuration |
||||
|
gem 'simpleconfig' |
||||
|
|
||||
|
# API |
||||
|
gem 'rabl' |
||||
|
|
||||
|
# ORM |
||||
|
gem 'pg' |
||||
|
|
||||
|
# Performance and Exception management |
||||
|
gem 'airbrake' |
||||
|
gem 'newrelic_rpm' |
||||
|
gem 'newrelic_moped' |
||||
|
|
||||
|
# Security |
||||
|
gem 'secure_headers' |
||||
|
|
||||
|
# Miscellanea |
||||
|
gem 'google-analytics-rails' |
||||
|
gem 'haml' |
||||
|
gem 'http_accept_language' |
||||
|
gem 'jquery-rails' |
||||
|
gem 'nokogiri' |
||||
|
gem 'resque', require: 'resque/server' # Resque web interface |
||||
|
gem 'rest-client' |
||||
|
|
||||
|
group :development, :test do |
||||
|
gem 'debugger' |
||||
|
gem 'delorean' |
||||
|
gem 'factory_girl_rails' |
||||
|
gem 'faker' |
||||
|
gem 'pry' |
||||
|
gem 'pry-rails' |
||||
|
end |
||||
|
|
||||
|
group :development do |
||||
|
gem 'bullet' |
||||
|
gem 'better_errors' |
||||
|
gem 'binding_of_caller' |
||||
|
gem 'meta_request' |
||||
|
end |
||||
|
|
||||
|
group :test do |
||||
|
gem 'capybara' |
||||
|
gem 'coveralls', require: false |
||||
|
gem 'database_cleaner' |
||||
|
gem 'email_spec' |
||||
|
gem 'launchy' |
||||
|
gem 'rspec' |
||||
|
gem 'rspec-rails' |
||||
|
gem 'selenium-webdriver' |
||||
|
gem 'simplecov', require: false |
||||
|
gem 'webmock', require: false |
||||
|
end |
||||
|
|
||||
|
group :assets do |
||||
|
gem 'coffee-rails', '~> 4.0.0.beta1' |
||||
|
gem 'haml_assets' |
||||
|
gem 'handlebars_assets' |
||||
|
gem 'i18n-js' |
||||
|
gem 'jquery-turbolinks' |
||||
|
gem 'less-rails' |
||||
|
gem 'sass-rails', '~> 4.0.0.beta1' |
||||
|
gem 'therubyracer' |
||||
|
gem 'turbolinks' |
||||
|
gem 'twitter-bootstrap-rails' |
||||
|
gem 'uglifier', '>= 1.0.3' |
||||
|
end |
@ -0,0 +1,331 @@ |
|||||
|
GEM |
||||
|
remote: https://rubygems.org/ |
||||
|
specs: |
||||
|
actionmailer (4.0.0.beta1) |
||||
|
actionpack (= 4.0.0.beta1) |
||||
|
mail (~> 2.5.3) |
||||
|
actionpack (4.0.0.beta1) |
||||
|
activesupport (= 4.0.0.beta1) |
||||
|
builder (~> 3.1.0) |
||||
|
erubis (~> 2.7.0) |
||||
|
rack (~> 1.5.2) |
||||
|
rack-test (~> 0.6.2) |
||||
|
activemodel (4.0.0.beta1) |
||||
|
activesupport (= 4.0.0.beta1) |
||||
|
builder (~> 3.1.0) |
||||
|
activerecord (4.0.0.beta1) |
||||
|
activemodel (= 4.0.0.beta1) |
||||
|
activerecord-deprecated_finders (~> 0.0.3) |
||||
|
activesupport (= 4.0.0.beta1) |
||||
|
arel (~> 4.0.0.beta1) |
||||
|
activerecord-deprecated_finders (0.0.3) |
||||
|
activesupport (4.0.0.beta1) |
||||
|
i18n (~> 0.6.2) |
||||
|
minitest (~> 4.2) |
||||
|
multi_json (~> 1.3) |
||||
|
thread_safe (~> 0.1) |
||||
|
tzinfo (~> 0.3.33) |
||||
|
addressable (2.3.4) |
||||
|
airbrake (3.1.11) |
||||
|
activesupport |
||||
|
builder |
||||
|
json |
||||
|
arel (4.0.0) |
||||
|
atomic (1.1.8) |
||||
|
better_errors (0.8.0) |
||||
|
coderay (>= 1.0.0) |
||||
|
erubis (>= 2.6.6) |
||||
|
binding_of_caller (0.7.1) |
||||
|
debug_inspector (>= 0.0.1) |
||||
|
brwsr (1.1.1) |
||||
|
builder (3.1.4) |
||||
|
bullet (4.6.0) |
||||
|
uniform_notifier |
||||
|
capybara (2.1.0) |
||||
|
mime-types (>= 1.16) |
||||
|
nokogiri (>= 1.3.3) |
||||
|
rack (>= 1.0.0) |
||||
|
rack-test (>= 0.5.4) |
||||
|
xpath (~> 2.0) |
||||
|
childprocess (0.3.9) |
||||
|
ffi (~> 1.0, >= 1.0.11) |
||||
|
chronic (0.9.1) |
||||
|
coderay (1.0.9) |
||||
|
coffee-rails (4.0.0) |
||||
|
coffee-script (>= 2.2.0) |
||||
|
railties (>= 4.0.0.beta, < 5.0) |
||||
|
coffee-script (2.2.0) |
||||
|
coffee-script-source |
||||
|
execjs |
||||
|
coffee-script-source (1.6.2) |
||||
|
colorize (0.5.8) |
||||
|
columnize (0.3.6) |
||||
|
commonjs (0.2.6) |
||||
|
coveralls (0.6.6) |
||||
|
colorize |
||||
|
multi_json (~> 1.3) |
||||
|
rest-client |
||||
|
simplecov (>= 0.7) |
||||
|
thor |
||||
|
crack (0.3.2) |
||||
|
daemons (1.1.9) |
||||
|
database_cleaner (0.9.1) |
||||
|
debug_inspector (0.0.2) |
||||
|
debugger (1.5.0) |
||||
|
columnize (>= 0.3.1) |
||||
|
debugger-linecache (~> 1.2.0) |
||||
|
debugger-ruby_core_source (~> 1.2.0) |
||||
|
debugger-linecache (1.2.0) |
||||
|
debugger-ruby_core_source (1.2.0) |
||||
|
delorean (2.1.0) |
||||
|
chronic |
||||
|
diff-lcs (1.2.3) |
||||
|
email_spec (1.4.0) |
||||
|
launchy (~> 2.1) |
||||
|
mail (~> 2.2) |
||||
|
erubis (2.7.0) |
||||
|
eventmachine (1.0.3) |
||||
|
execjs (1.4.0) |
||||
|
multi_json (~> 1.0) |
||||
|
factory_girl (4.2.0) |
||||
|
activesupport (>= 3.0.0) |
||||
|
factory_girl_rails (4.2.1) |
||||
|
factory_girl (~> 4.2.0) |
||||
|
railties (>= 3.0.0) |
||||
|
faker (1.1.2) |
||||
|
i18n (~> 0.5) |
||||
|
ffi (1.7.0) |
||||
|
google-analytics-rails (0.0.4) |
||||
|
haml (4.0.2) |
||||
|
tilt |
||||
|
haml_assets (0.2.1) |
||||
|
haml |
||||
|
tilt |
||||
|
handlebars_assets (0.12.0) |
||||
|
execjs (>= 1.2.9) |
||||
|
sprockets (>= 2.0.3) |
||||
|
tilt |
||||
|
hike (1.2.2) |
||||
|
http_accept_language (1.0.2) |
||||
|
i18n (0.6.4) |
||||
|
i18n-js (2.1.2) |
||||
|
i18n |
||||
|
jquery-rails (2.2.1) |
||||
|
railties (>= 3.0, < 5.0) |
||||
|
thor (>= 0.14, < 2.0) |
||||
|
jquery-turbolinks (1.0.0) |
||||
|
railties (>= 3.1.0) |
||||
|
turbolinks |
||||
|
json (1.7.7) |
||||
|
kgio (2.8.0) |
||||
|
launchy (2.3.0) |
||||
|
addressable (~> 2.3) |
||||
|
less (2.3.2) |
||||
|
commonjs (~> 0.2.6) |
||||
|
less-rails (2.3.3) |
||||
|
actionpack (>= 3.1) |
||||
|
less (~> 2.3.1) |
||||
|
libv8 (3.11.8.17) |
||||
|
mail (2.5.3) |
||||
|
i18n (>= 0.4.0) |
||||
|
mime-types (~> 1.16) |
||||
|
treetop (~> 1.4.8) |
||||
|
meta_request (0.2.3) |
||||
|
rack-contrib |
||||
|
railties |
||||
|
method_source (0.8.1) |
||||
|
mime-types (1.22) |
||||
|
minitest (4.7.2) |
||||
|
mono_logger (1.0.1) |
||||
|
moped (1.4.5) |
||||
|
multi_json (1.7.2) |
||||
|
newrelic_moped (0.0.6) |
||||
|
moped |
||||
|
newrelic_rpm (~> 3.6.0) |
||||
|
newrelic_rpm (3.6.0.83) |
||||
|
nokogiri (1.5.9) |
||||
|
pg (0.15.1) |
||||
|
polyglot (0.3.3) |
||||
|
pry (0.9.12) |
||||
|
coderay (~> 1.0.5) |
||||
|
method_source (~> 0.8) |
||||
|
slop (~> 3.4) |
||||
|
pry-rails (0.2.2) |
||||
|
pry (>= 0.9.10) |
||||
|
rabl (0.8.3) |
||||
|
activesupport (>= 2.3.14) |
||||
|
rack (1.5.2) |
||||
|
rack-contrib (1.1.0) |
||||
|
rack (>= 0.9.1) |
||||
|
rack-protection (1.5.0) |
||||
|
rack |
||||
|
rack-test (0.6.2) |
||||
|
rack (>= 1.0) |
||||
|
rails (4.0.0.beta1) |
||||
|
actionmailer (= 4.0.0.beta1) |
||||
|
actionpack (= 4.0.0.beta1) |
||||
|
activerecord (= 4.0.0.beta1) |
||||
|
activesupport (= 4.0.0.beta1) |
||||
|
bundler (>= 1.3.0, < 2.0) |
||||
|
railties (= 4.0.0.beta1) |
||||
|
sprockets-rails (~> 2.0.0.rc3) |
||||
|
railties (4.0.0.beta1) |
||||
|
actionpack (= 4.0.0.beta1) |
||||
|
activesupport (= 4.0.0.beta1) |
||||
|
rake (>= 0.8.7) |
||||
|
rdoc (~> 3.4) |
||||
|
thor (>= 0.17.0, < 2.0) |
||||
|
raindrops (0.10.0) |
||||
|
rake (10.0.4) |
||||
|
rdoc (3.12.2) |
||||
|
json (~> 1.4) |
||||
|
redis (3.0.3) |
||||
|
redis-namespace (1.2.1) |
||||
|
redis (~> 3.0.0) |
||||
|
ref (1.0.4) |
||||
|
resque (1.24.1) |
||||
|
mono_logger (~> 1.0) |
||||
|
multi_json (~> 1.0) |
||||
|
redis-namespace (~> 1.2) |
||||
|
sinatra (>= 0.9.2) |
||||
|
vegas (~> 0.1.2) |
||||
|
rest-client (1.6.7) |
||||
|
mime-types (>= 1.16) |
||||
|
rspec (2.13.0) |
||||
|
rspec-core (~> 2.13.0) |
||||
|
rspec-expectations (~> 2.13.0) |
||||
|
rspec-mocks (~> 2.13.0) |
||||
|
rspec-core (2.13.1) |
||||
|
rspec-expectations (2.13.0) |
||||
|
diff-lcs (>= 1.1.3, < 2.0) |
||||
|
rspec-mocks (2.13.1) |
||||
|
rspec-rails (2.13.0) |
||||
|
actionpack (>= 3.0) |
||||
|
activesupport (>= 3.0) |
||||
|
railties (>= 3.0) |
||||
|
rspec-core (~> 2.13.0) |
||||
|
rspec-expectations (~> 2.13.0) |
||||
|
rspec-mocks (~> 2.13.0) |
||||
|
rubyzip (0.9.9) |
||||
|
sass (3.2.7) |
||||
|
sass-rails (4.0.0.rc1) |
||||
|
railties (>= 4.0.0.beta, < 5.0) |
||||
|
sass (>= 3.1.10) |
||||
|
sprockets-rails (~> 2.0.0.rc0) |
||||
|
tilt (~> 1.3) |
||||
|
secure_headers (0.4.1) |
||||
|
brwsr (>= 1.1.1) |
||||
|
selenium-webdriver (2.32.1) |
||||
|
childprocess (>= 0.2.5) |
||||
|
multi_json (~> 1.0) |
||||
|
rubyzip |
||||
|
websocket (~> 1.0.4) |
||||
|
simpleconfig (2.0.0) |
||||
|
simplecov (0.7.1) |
||||
|
multi_json (~> 1.0) |
||||
|
simplecov-html (~> 0.7.1) |
||||
|
simplecov-html (0.7.1) |
||||
|
sinatra (1.4.2) |
||||
|
rack (~> 1.5, >= 1.5.2) |
||||
|
rack-protection (~> 1.4) |
||||
|
tilt (~> 1.3, >= 1.3.4) |
||||
|
slop (3.4.4) |
||||
|
sprockets (2.9.2) |
||||
|
hike (~> 1.2) |
||||
|
multi_json (~> 1.0) |
||||
|
rack (~> 1.0) |
||||
|
tilt (~> 1.1, != 1.3.0) |
||||
|
sprockets-rails (2.0.0.rc4) |
||||
|
actionpack (>= 3.0) |
||||
|
activesupport (>= 3.0) |
||||
|
sprockets (~> 2.8) |
||||
|
therubyracer (0.11.4) |
||||
|
libv8 (~> 3.11.8.12) |
||||
|
ref |
||||
|
thin (1.5.1) |
||||
|
daemons (>= 1.0.9) |
||||
|
eventmachine (>= 0.12.6) |
||||
|
rack (>= 1.0.0) |
||||
|
thor (0.18.1) |
||||
|
thread_safe (0.1.0) |
||||
|
atomic |
||||
|
tilt (1.3.7) |
||||
|
treetop (1.4.12) |
||||
|
polyglot |
||||
|
polyglot (>= 0.3.1) |
||||
|
turbolinks (1.1.1) |
||||
|
coffee-rails |
||||
|
twitter-bootstrap-rails (2.2.6) |
||||
|
actionpack (>= 3.1) |
||||
|
execjs |
||||
|
railties (>= 3.1) |
||||
|
tzinfo (0.3.37) |
||||
|
uglifier (2.0.1) |
||||
|
execjs (>= 0.3.0) |
||||
|
multi_json (~> 1.0, >= 1.0.2) |
||||
|
unicorn (4.6.2) |
||||
|
kgio (~> 2.6) |
||||
|
rack |
||||
|
raindrops (~> 0.7) |
||||
|
uniform_notifier (1.2.0) |
||||
|
vegas (0.1.11) |
||||
|
rack (>= 1.0.0) |
||||
|
webmock (1.11.0) |
||||
|
addressable (>= 2.2.7) |
||||
|
crack (>= 0.3.2) |
||||
|
websocket (1.0.7) |
||||
|
xpath (2.0.0) |
||||
|
nokogiri (~> 1.3) |
||||
|
|
||||
|
PLATFORMS |
||||
|
ruby |
||||
|
|
||||
|
DEPENDENCIES |
||||
|
airbrake |
||||
|
better_errors |
||||
|
binding_of_caller |
||||
|
bullet |
||||
|
capybara |
||||
|
coffee-rails (~> 4.0.0.beta1) |
||||
|
coveralls |
||||
|
database_cleaner |
||||
|
debugger |
||||
|
delorean |
||||
|
email_spec |
||||
|
factory_girl_rails |
||||
|
faker |
||||
|
google-analytics-rails |
||||
|
haml |
||||
|
haml_assets |
||||
|
handlebars_assets |
||||
|
http_accept_language |
||||
|
i18n-js |
||||
|
jquery-rails |
||||
|
jquery-turbolinks |
||||
|
launchy |
||||
|
less-rails |
||||
|
meta_request |
||||
|
newrelic_moped |
||||
|
newrelic_rpm |
||||
|
nokogiri |
||||
|
pg |
||||
|
pry |
||||
|
pry-rails |
||||
|
rabl |
||||
|
rails (= 4.0.0.beta1) |
||||
|
resque |
||||
|
rest-client |
||||
|
rspec |
||||
|
rspec-rails |
||||
|
sass-rails (~> 4.0.0.beta1) |
||||
|
secure_headers |
||||
|
selenium-webdriver |
||||
|
simpleconfig |
||||
|
simplecov |
||||
|
therubyracer |
||||
|
thin |
||||
|
turbolinks |
||||
|
twitter-bootstrap-rails |
||||
|
uglifier (>= 1.0.3) |
||||
|
unicorn |
||||
|
webmock |
@ -0,0 +1,28 @@ |
|||||
|
== README |
||||
|
|
||||
|
This README would normally document whatever steps are necessary to get the |
||||
|
application up and running. |
||||
|
|
||||
|
Things you may want to cover: |
||||
|
|
||||
|
* Ruby version |
||||
|
|
||||
|
* System dependencies |
||||
|
|
||||
|
* Configuration |
||||
|
|
||||
|
* Database creation |
||||
|
|
||||
|
* Database initialization |
||||
|
|
||||
|
* How to run the test suite |
||||
|
|
||||
|
* Services (job queues, cache servers, search engines, etc.) |
||||
|
|
||||
|
* Deployment instructions |
||||
|
|
||||
|
* ... |
||||
|
|
||||
|
|
||||
|
Please feel free to use a different markup language if you do not plan to run |
||||
|
<tt>rake doc:app</tt>. |
@ -0,0 +1,6 @@ |
|||||
|
# 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__) |
||||
|
|
||||
|
Starterapp::Application.load_tasks |
After Width: | Height: | Size: 6.5 KiB |
@ -0,0 +1,16 @@ |
|||||
|
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
||||
|
// listed below.
|
||||
|
//
|
||||
|
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
||||
|
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
||||
|
//
|
||||
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
|
// compiled file.
|
||||
|
//
|
||||
|
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
||||
|
// GO AFTER THE REQUIRES BELOW.
|
||||
|
//
|
||||
|
//= require jquery
|
||||
|
//= require jquery_ujs
|
||||
|
//= require turbolinks
|
||||
|
//= require_tree .
|
@ -0,0 +1,13 @@ |
|||||
|
/* |
||||
|
* This is a manifest file that'll be compiled into application.css, which will include all the files |
||||
|
* listed below. |
||||
|
* |
||||
|
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, |
||||
|
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. |
||||
|
* |
||||
|
* You're free to add application-wide styles to this file and they'll appear at the top of the |
||||
|
* compiled file, but it's generally better to create a new file per style scope. |
||||
|
* |
||||
|
*= require_self |
||||
|
*= require_tree . |
||||
|
*/ |
@ -0,0 +1,5 @@ |
|||||
|
class ApplicationController < ActionController::Base |
||||
|
# Prevent CSRF attacks by raising an exception. |
||||
|
# For APIs, you may want to use :null_session instead. |
||||
|
protect_from_forgery with: :exception |
||||
|
end |
@ -0,0 +1,2 @@ |
|||||
|
module ApplicationHelper |
||||
|
end |
@ -0,0 +1,14 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html> |
||||
|
<head> |
||||
|
<title>Starterapp</title> |
||||
|
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> |
||||
|
<%= javascript_include_tag "application", "data-turbolinks-track" => true %> |
||||
|
<%= csrf_meta_tags %> |
||||
|
</head> |
||||
|
<body> |
||||
|
|
||||
|
<%= yield %> |
||||
|
|
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,3 @@ |
|||||
|
#!/usr/bin/env ruby |
||||
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) |
||||
|
load Gem.bin_path('bundler', 'bundle') |
@ -0,0 +1,4 @@ |
|||||
|
#!/usr/bin/env ruby |
||||
|
APP_PATH = File.expand_path('../../config/application', __FILE__) |
||||
|
require_relative '../config/boot' |
||||
|
require 'rails/commands' |
@ -0,0 +1,4 @@ |
|||||
|
#!/usr/bin/env ruby |
||||
|
require_relative '../config/boot' |
||||
|
require 'rake' |
||||
|
Rake.application.run |
@ -0,0 +1,4 @@ |
|||||
|
# This file is used by Rack-based servers to start the application. |
||||
|
|
||||
|
require ::File.expand_path('../config/environment', __FILE__) |
||||
|
run Starterapp::Application |
@ -0,0 +1,22 @@ |
|||||
|
require File.expand_path('../boot', __FILE__) |
||||
|
|
||||
|
require 'rails/all' |
||||
|
|
||||
|
# Assets should be precompiled for production (so we don't need the gems loaded then) |
||||
|
Bundler.require(*Rails.groups(assets: %w(development test))) |
||||
|
|
||||
|
module Starterapp |
||||
|
class Application < Rails::Application |
||||
|
# Settings in config/environments/* take precedence over those specified here. |
||||
|
# Application configuration should go into files in config/initializers |
||||
|
# -- all .rb files in that directory are automatically loaded. |
||||
|
|
||||
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. |
||||
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. |
||||
|
# config.time_zone = 'Central Time (US & Canada)' |
||||
|
|
||||
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. |
||||
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] |
||||
|
# config.i18n.default_locale = :de |
||||
|
end |
||||
|
end |
@ -0,0 +1,4 @@ |
|||||
|
# Set up gems listed in the Gemfile. |
||||
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) |
||||
|
|
||||
|
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) |
@ -0,0 +1,60 @@ |
|||||
|
# PostgreSQL. Versions 8.2 and up are supported. |
||||
|
# |
||||
|
# Install the pg driver: |
||||
|
# gem install pg |
||||
|
# On OS X with Homebrew: |
||||
|
# gem install pg -- --with-pg-config=/usr/local/bin/pg_config |
||||
|
# On OS X with MacPorts: |
||||
|
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config |
||||
|
# On Windows: |
||||
|
# gem install pg |
||||
|
# Choose the win32 build. |
||||
|
# Install PostgreSQL and put its /bin directory on your path. |
||||
|
# |
||||
|
# Configure Using Gemfile |
||||
|
# gem 'pg' |
||||
|
# |
||||
|
development: |
||||
|
adapter: postgresql |
||||
|
encoding: unicode |
||||
|
database: starterapp_development |
||||
|
pool: 5 |
||||
|
username: starterapp |
||||
|
password: |
||||
|
|
||||
|
# Connect on a TCP socket. Omitted by default since the client uses a |
||||
|
# domain socket that doesn't need configuration. Windows does not have |
||||
|
# domain sockets, so uncomment these lines. |
||||
|
#host: localhost |
||||
|
|
||||
|
# The TCP port the server listens on. Defaults to 5432. |
||||
|
# If your server runs on a different port number, change accordingly. |
||||
|
#port: 5432 |
||||
|
|
||||
|
# Schema search path. The server defaults to $user,public |
||||
|
#schema_search_path: myapp,sharedapp,public |
||||
|
|
||||
|
# Minimum log levels, in increasing order: |
||||
|
# debug5, debug4, debug3, debug2, debug1, |
||||
|
# log, notice, warning, error, fatal, and panic |
||||
|
# Defaults to warning. |
||||
|
#min_messages: notice |
||||
|
|
||||
|
# Warning: The database defined as "test" will be erased and |
||||
|
# re-generated from your development database when you run "rake". |
||||
|
# Do not set this db to the same as development or production. |
||||
|
test: |
||||
|
adapter: postgresql |
||||
|
encoding: unicode |
||||
|
database: starterapp_test |
||||
|
pool: 5 |
||||
|
username: starterapp |
||||
|
password: |
||||
|
|
||||
|
production: |
||||
|
adapter: postgresql |
||||
|
encoding: unicode |
||||
|
database: starterapp_production |
||||
|
pool: 5 |
||||
|
username: starterapp |
||||
|
password: |
@ -0,0 +1,5 @@ |
|||||
|
# Load the rails application. |
||||
|
require File.expand_path('../application', __FILE__) |
||||
|
|
||||
|
# Initialize the rails application. |
||||
|
Starterapp::Application.initialize! |
@ -0,0 +1,27 @@ |
|||||
|
Starterapp::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 |
||||
|
# 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 |
||||
|
|
||||
|
# Don't care if the mailer can't send. |
||||
|
config.action_mailer.raise_delivery_errors = false |
||||
|
|
||||
|
# Print deprecation notices to the Rails logger. |
||||
|
config.active_support.deprecation = :log |
||||
|
|
||||
|
# Raise an error on page load if there are pending migrations |
||||
|
config.active_record.migration_error = :page_load |
||||
|
|
||||
|
# Debug mode disables concatenation and preprocessing of assets. |
||||
|
config.assets.debug = true |
||||
|
end |
@ -0,0 +1,80 @@ |
|||||
|
Starterapp::Application.configure do |
||||
|
# Settings specified here will take precedence over those in config/application.rb. |
||||
|
|
||||
|
# Code is not reloaded between requests. |
||||
|
config.cache_classes = true |
||||
|
|
||||
|
# 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.action_controller.perform_caching = true |
||||
|
|
||||
|
# 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 |
||||
|
|
||||
|
# Compress JavaScripts and CSS. |
||||
|
config.assets.js_compressor = :uglifier |
||||
|
# config.assets.css_compressor = :sass |
||||
|
|
||||
|
# Whether to fallback to assets pipeline if a precompiled asset is missed. |
||||
|
config.assets.compile = false |
||||
|
|
||||
|
# Generate digests for assets URLs. |
||||
|
config.assets.digest = true |
||||
|
|
||||
|
# Version of your assets, change this if you want to expire all your assets. |
||||
|
config.assets.version = '1.0' |
||||
|
|
||||
|
# 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-Accel-Redirect' # for nginx |
||||
|
|
||||
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
||||
|
# config.force_ssl = true |
||||
|
|
||||
|
# Set to :debug to see everything in the log. |
||||
|
config.log_level = :info |
||||
|
|
||||
|
# Prepend all log lines with the following tags. |
||||
|
# config.log_tags = [ :subdomain, :uuid ] |
||||
|
|
||||
|
# Use a different logger for distributed setups. |
||||
|
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) |
||||
|
|
||||
|
# Use a different cache store in production. |
||||
|
# config.cache_store = :mem_cache_store |
||||
|
|
||||
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server. |
||||
|
# config.action_controller.asset_host = "http://assets.example.com" |
||||
|
|
||||
|
# 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 ) |
||||
|
|
||||
|
# 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 |
||||
|
|
||||
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to |
||||
|
# the I18n.default_locale when a translation can not be found). |
||||
|
config.i18n.fallbacks = true |
||||
|
|
||||
|
# Send deprecation notices to registered listeners. |
||||
|
config.active_support.deprecation = :notify |
||||
|
|
||||
|
# Disable automatic flushing of the log to improve performance. |
||||
|
# config.autoflush_log = false |
||||
|
|
||||
|
# Use default logging formatter so that PID and timestamp are not suppressed. |
||||
|
config.log_formatter = ::Logger::Formatter.new |
||||
|
end |
@ -0,0 +1,36 @@ |
|||||
|
Starterapp::Application.configure do |
||||
|
# Settings specified here will take precedence over those in config/application.rb. |
||||
|
|
||||
|
# The test environment is used exclusively to run your application's |
||||
|
# test suite. You never need to work with it otherwise. Remember that |
||||
|
# your test database is "scratch space" for the test suite and is wiped |
||||
|
# and recreated between test runs. Don't rely on the data there! |
||||
|
config.cache_classes = true |
||||
|
|
||||
|
# Do not eager load code on boot. This avoids loading your whole application |
||||
|
# 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" |
||||
|
|
||||
|
# Show full error reports and disable caching. |
||||
|
config.consider_all_requests_local = true |
||||
|
config.action_controller.perform_caching = false |
||||
|
|
||||
|
# Raise exceptions instead of rendering exception templates. |
||||
|
config.action_dispatch.show_exceptions = false |
||||
|
|
||||
|
# Disable request forgery protection in test environment. |
||||
|
config.action_controller.allow_forgery_protection = false |
||||
|
|
||||
|
# Tell Action Mailer not to deliver emails to the real world. |
||||
|
# The :test delivery method accumulates sent emails in the |
||||
|
# ActionMailer::Base.deliveries array. |
||||
|
config.action_mailer.delivery_method = :test |
||||
|
|
||||
|
# Print deprecation notices to the stderr. |
||||
|
config.active_support.deprecation = :stderr |
||||
|
end |
@ -0,0 +1,7 @@ |
|||||
|
# Be sure to restart your server when you modify this file. |
||||
|
|
||||
|
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. |
||||
|
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } |
||||
|
|
||||
|
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. |
||||
|
# Rails.backtrace_cleaner.remove_silencers! |
@ -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] |
@ -0,0 +1,16 @@ |
|||||
|
# Be sure to restart your server when you modify this file. |
||||
|
|
||||
|
# Add new inflection rules using the following format. Inflections |
||||
|
# are locale specific, and you may define rules for as many different |
||||
|
# locales as you wish. All of these examples are active by default: |
||||
|
# ActiveSupport::Inflector.inflections(:en) do |inflect| |
||||
|
# inflect.plural /^(ox)$/i, '\1en' |
||||
|
# inflect.singular /^(ox)en/i, '\1' |
||||
|
# inflect.irregular 'person', 'people' |
||||
|
# inflect.uncountable %w( fish sheep ) |
||||
|
# end |
||||
|
|
||||
|
# These inflection rules are supported but not enabled by default: |
||||
|
# ActiveSupport::Inflector.inflections(:en) do |inflect| |
||||
|
# inflect.acronym 'RESTful' |
||||
|
# end |
@ -0,0 +1,5 @@ |
|||||
|
# Be sure to restart your server when you modify this file. |
||||
|
|
||||
|
# Add new mime types for use in respond_to blocks: |
||||
|
# Mime::Type.register "text/richtext", :rtf |
||||
|
# Mime::Type.register_alias "text/html", :iphone |
@ -0,0 +1,12 @@ |
|||||
|
# Be sure to restart your server when you modify this file. |
||||
|
|
||||
|
# Your secret key for verifying the integrity of signed cookies. |
||||
|
# If you change this key, all old signed cookies will become invalid! |
||||
|
|
||||
|
# Make sure the secret is at least 30 characters and all random, |
||||
|
# no regular words or you'll be exposed to dictionary attacks. |
||||
|
# 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. |
||||
|
Starterapp::Application.config.secret_key_base = '3f1afc86622ac2ad0b6807f8c39f54eac579b9c430adae6f49ed02bb68d9b2615a082bf0037397f9342f995b71b73ba9167476697e0e5ec0d40173969b5fecfc' |
@ -0,0 +1,3 @@ |
|||||
|
# Be sure to restart your server when you modify this file. |
||||
|
|
||||
|
Starterapp::Application.config.session_store :encrypted_cookie_store, key: '_starterapp_session' |
@ -0,0 +1,14 @@ |
|||||
|
# Be sure to restart your server when you modify this file. |
||||
|
|
||||
|
# This file contains settings for ActionController::ParamsWrapper which |
||||
|
# is enabled by default. |
||||
|
|
||||
|
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. |
||||
|
ActiveSupport.on_load(:action_controller) do |
||||
|
wrap_parameters format: [:json] if respond_to?(:wrap_parameters) |
||||
|
end |
||||
|
|
||||
|
# To enable root element in JSON for ActiveRecord objects. |
||||
|
# ActiveSupport.on_load(:active_record) do |
||||
|
# self.include_root_in_json = true |
||||
|
# end |
@ -0,0 +1,23 @@ |
|||||
|
# Files in the config/locales directory are used for internationalization |
||||
|
# and are automatically loaded by Rails. If you want to use locales other |
||||
|
# than English, add the necessary files in this directory. |
||||
|
# |
||||
|
# To use the locales, use `I18n.t`: |
||||
|
# |
||||
|
# I18n.t 'hello' |
||||
|
# |
||||
|
# In views, this is aliased to just `t`: |
||||
|
# |
||||
|
# <%= t('hello') %> |
||||
|
# |
||||
|
# To use a different locale, set it with `I18n.locale`: |
||||
|
# |
||||
|
# I18n.locale = :es |
||||
|
# |
||||
|
# This would use the information in config/locales/es.yml. |
||||
|
# |
||||
|
# To learn more, please read the Rails Internationalization guide |
||||
|
# available at http://guides.rubyonrails.org/i18n.html. |
||||
|
|
||||
|
en: |
||||
|
hello: "Hello world" |
@ -0,0 +1,49 @@ |
|||||
|
Starterapp::Application.routes.draw do |
||||
|
# The priority is based upon order of creation: first created -> highest priority. |
||||
|
# See how all your routes lay out with "rake routes". |
||||
|
|
||||
|
# You can have the root of your site routed with "root" |
||||
|
# root to: 'welcome#index' |
||||
|
|
||||
|
# Example of regular route: |
||||
|
# get 'products/:id' => 'catalog#view' |
||||
|
|
||||
|
# Example of named route that can be invoked with purchase_url(id: product.id) |
||||
|
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase |
||||
|
|
||||
|
# Example resource route (maps HTTP verbs to controller actions automatically): |
||||
|
# resources :products |
||||
|
|
||||
|
# Example resource route with options: |
||||
|
# resources :products do |
||||
|
# member do |
||||
|
# get 'short' |
||||
|
# post 'toggle' |
||||
|
# end |
||||
|
# |
||||
|
# collection do |
||||
|
# get 'sold' |
||||
|
# end |
||||
|
# end |
||||
|
|
||||
|
# Example resource route with sub-resources: |
||||
|
# resources :products do |
||||
|
# resources :comments, :sales |
||||
|
# resource :seller |
||||
|
# end |
||||
|
|
||||
|
# Example resource route with more complex sub-resources: |
||||
|
# resources :products do |
||||
|
# resources :comments |
||||
|
# resources :sales do |
||||
|
# get 'recent', on: :collection |
||||
|
# end |
||||
|
# end |
||||
|
|
||||
|
# Example resource route within a namespace: |
||||
|
# namespace :admin do |
||||
|
# # Directs /admin/products/* to Admin::ProductsController |
||||
|
# # (app/controllers/admin/products_controller.rb) |
||||
|
# resources :products |
||||
|
# end |
||||
|
end |
@ -0,0 +1,16 @@ |
|||||
|
# encoding: UTF-8 |
||||
|
# This file is auto-generated from the current state of the database. Instead |
||||
|
# of editing this file, please use the migrations feature of Active Record to |
||||
|
# incrementally modify your database, and then regenerate this schema definition. |
||||
|
# |
||||
|
# Note that this schema.rb definition is the authoritative source for your |
||||
|
# database schema. If you need to create the application database on another |
||||
|
# system, you should be using db:schema:load, not running all the migrations |
||||
|
# from scratch. The latter is a flawed and unsustainable approach (the more migrations |
||||
|
# you'll amass, the slower it'll run and the greater likelihood for issues). |
||||
|
# |
||||
|
# It's strongly recommended that you check this file into your version control system. |
||||
|
|
||||
|
ActiveRecord::Schema.define(version: 0) do |
||||
|
|
||||
|
end |
@ -0,0 +1,7 @@ |
|||||
|
# This file should contain all the record creation needed to seed the database with its default values. |
||||
|
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). |
||||
|
# |
||||
|
# Examples: |
||||
|
# |
||||
|
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) |
||||
|
# Mayor.create(name: 'Emanuel', city: cities.first) |
@ -0,0 +1,27 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html> |
||||
|
<head> |
||||
|
<title>The page you were looking for doesn't exist (404)</title> |
||||
|
<style> |
||||
|
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } |
||||
|
div.dialog { |
||||
|
width: 25em; |
||||
|
padding: 0 4em; |
||||
|
margin: 4em auto 0 auto; |
||||
|
border: 1px solid #ccc; |
||||
|
border-right-color: #999; |
||||
|
border-bottom-color: #999; |
||||
|
} |
||||
|
h1 { font-size: 100%; color: #f00; line-height: 1.5em; } |
||||
|
</style> |
||||
|
</head> |
||||
|
|
||||
|
<body> |
||||
|
<!-- This file lives in public/404.html --> |
||||
|
<div class="dialog"> |
||||
|
<h1>The page you were looking for doesn't exist.</h1> |
||||
|
<p>You may have mistyped the address or the page may have moved.</p> |
||||
|
</div> |
||||
|
<p>If you are the application owner check the logs for more information.</p> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,26 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html> |
||||
|
<head> |
||||
|
<title>The change you wanted was rejected (422)</title> |
||||
|
<style> |
||||
|
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } |
||||
|
div.dialog { |
||||
|
width: 25em; |
||||
|
padding: 0 4em; |
||||
|
margin: 4em auto 0 auto; |
||||
|
border: 1px solid #ccc; |
||||
|
border-right-color: #999; |
||||
|
border-bottom-color: #999; |
||||
|
} |
||||
|
h1 { font-size: 100%; color: #f00; line-height: 1.5em; } |
||||
|
</style> |
||||
|
</head> |
||||
|
|
||||
|
<body> |
||||
|
<!-- This file lives in public/422.html --> |
||||
|
<div class="dialog"> |
||||
|
<h1>The change you wanted was rejected.</h1> |
||||
|
<p>Maybe you tried to change something you didn't have access to.</p> |
||||
|
</div> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,26 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html> |
||||
|
<head> |
||||
|
<title>We're sorry, but something went wrong (500)</title> |
||||
|
<style> |
||||
|
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } |
||||
|
div.dialog { |
||||
|
width: 25em; |
||||
|
padding: 0 4em; |
||||
|
margin: 4em auto 0 auto; |
||||
|
border: 1px solid #ccc; |
||||
|
border-right-color: #999; |
||||
|
border-bottom-color: #999; |
||||
|
} |
||||
|
h1 { font-size: 100%; color: #f00; line-height: 1.5em; } |
||||
|
</style> |
||||
|
</head> |
||||
|
|
||||
|
<body> |
||||
|
<!-- This file lives in public/500.html --> |
||||
|
<div class="dialog"> |
||||
|
<h1>We're sorry, but something went wrong.</h1> |
||||
|
</div> |
||||
|
<p>If you are the application owner check the logs for more information.</p> |
||||
|
</body> |
||||
|
</html> |
File diff suppressed because one or more lines are too long
@ -0,0 +1,5 @@ |
|||||
|
# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file |
||||
|
# |
||||
|
# To ban all spiders from the entire site uncomment the next two lines: |
||||
|
# User-agent: * |
||||
|
# Disallow: / |
@ -0,0 +1,15 @@ |
|||||
|
ENV["RAILS_ENV"] = "test" |
||||
|
require File.expand_path('../../config/environment', __FILE__) |
||||
|
require 'rails/test_help' |
||||
|
|
||||
|
class ActiveSupport::TestCase |
||||
|
ActiveRecord::Migration.check_pending! |
||||
|
|
||||
|
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. |
||||
|
# |
||||
|
# Note: You'll currently still have to declare fixtures explicitly in integration tests |
||||
|
# -- they do not yet inherit this setting |
||||
|
fixtures :all |
||||
|
|
||||
|
# Add more helper methods to be used by all tests here... |
||||
|
end |
Loading…
Reference in new issue