Navigation Menu

Skip to content
This repository has been archived by the owner on May 14, 2019. It is now read-only.

Commit

Permalink
Initial rails 3.1 app
Browse files Browse the repository at this point in the history
  • Loading branch information
froots committed Jun 8, 2011
0 parents commit 89c994f
Show file tree
Hide file tree
Showing 48 changed files with 870 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
@@ -0,0 +1,5 @@
.bundle
db/*.sqlite3
log/*.log
tmp/
.sass-cache/
29 changes: 29 additions & 0 deletions Gemfile
@@ -0,0 +1,29 @@
source 'http://rubygems.org'

gem 'rails', '3.1.0.rc2'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

# Asset template engines
gem 'sass-rails', "~> 3.1.0.rc"
gem 'coffee-script'
gem 'uglifier'

gem 'jquery-rails'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

group :test do
# Pretty printed test output
gem 'turn', :require => false
end
113 changes: 113 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,113 @@
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.0.rc2)
actionpack (= 3.1.0.rc2)
mail (~> 2.3.0)
actionpack (3.1.0.rc2)
activemodel (= 3.1.0.rc2)
activesupport (= 3.1.0.rc2)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.0)
rack-cache (~> 1.0.1)
rack-mount (~> 0.8.1)
rack-test (~> 0.6.0)
sprockets (~> 2.0.0.beta.10)
tzinfo (~> 0.3.27)
activemodel (3.1.0.rc2)
activesupport (= 3.1.0.rc2)
bcrypt-ruby (~> 2.1.4)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.0.rc2)
activemodel (= 3.1.0.rc2)
activesupport (= 3.1.0.rc2)
arel (~> 2.1.1)
tzinfo (~> 0.3.27)
activeresource (3.1.0.rc2)
activemodel (= 3.1.0.rc2)
activesupport (= 3.1.0.rc2)
activesupport (3.1.0.rc2)
multi_json (~> 1.0)
ansi (1.2.5)
arel (2.1.1)
bcrypt-ruby (2.1.4)
builder (3.0.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.1)
erubis (2.7.0)
execjs (1.1.1)
multi_json (~> 1.0)
hike (1.0.0)
i18n (0.6.0)
jquery-rails (1.0.9)
railties (~> 3.0)
thor (~> 0.14)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
multi_json (1.0.3)
polyglot (0.3.1)
rack (1.3.0)
rack-cache (1.0.2)
rack (>= 0.4)
rack-mount (0.8.1)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.0)
rack (>= 1.0)
rails (3.1.0.rc2)
actionmailer (= 3.1.0.rc2)
actionpack (= 3.1.0.rc2)
activerecord (= 3.1.0.rc2)
activeresource (= 3.1.0.rc2)
activesupport (= 3.1.0.rc2)
bundler (~> 1.0)
railties (= 3.1.0.rc2)
railties (3.1.0.rc2)
actionpack (= 3.1.0.rc2)
activesupport (= 3.1.0.rc2)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
thor (~> 0.14.6)
rake (0.9.2)
sass (3.1.2)
sass-rails (3.1.0.rc.2)
actionpack (~> 3.1.0.rc1)
railties (~> 3.1.0.rc1)
sass (>= 3.1.2)
sprockets (>= 2.0.0.beta.9)
sprockets (2.0.0.beta.10)
hike (~> 1.0)
rack (~> 1.0)
tilt (!= 1.3.0, ~> 1.1)
sqlite3 (1.3.3)
thor (0.14.6)
tilt (1.3.2)
treetop (1.4.9)
polyglot (>= 0.3.1)
turn (0.8.2)
ansi (>= 1.2.2)
tzinfo (0.3.27)
uglifier (0.5.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)

PLATFORMS
ruby

DEPENDENCIES
coffee-script
jquery-rails
rails (= 3.1.0.rc2)
sass-rails (~> 3.1.0.rc)
sqlite3
turn
uglifier
3 changes: 3 additions & 0 deletions README.md
@@ -0,0 +1,3 @@
# Edinburgh International Book Festival mobile website

This is the application behind the Edinburgh International Book Festival 2011 mobile website.
7 changes: 7 additions & 0 deletions Rakefile
@@ -0,0 +1,7 @@
#!/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__)

EdbookfestMobile::Application.load_tasks
Binary file added app/assets/images/rails.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions app/assets/javascripts/application.js
@@ -0,0 +1,9 @@
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
7 changes: 7 additions & 0 deletions app/assets/stylesheets/application.css
@@ -0,0 +1,7 @@
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. 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 .
*/
3 changes: 3 additions & 0 deletions app/controllers/application_controller.rb
@@ -0,0 +1,3 @@
class ApplicationController < ActionController::Base
protect_from_forgery
end
2 changes: 2 additions & 0 deletions app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
module ApplicationHelper
end
Empty file added app/mailers/.gitkeep
Empty file.
Empty file added app/models/.gitkeep
Empty file.
14 changes: 14 additions & 0 deletions app/views/layouts/application.html.erb
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>EdbookfestMobile</title>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>

<%= yield %>

</body>
</html>
4 changes: 4 additions & 0 deletions config.ru
@@ -0,0 +1,4 @@
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)
run EdbookfestMobile::Application
42 changes: 42 additions & 0 deletions config/application.rb
@@ -0,0 +1,42 @@
require File.expand_path('../boot', __FILE__)

require 'rails/all'

# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)

module EdbookfestMobile
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.

# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)

# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]

# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer

# 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

# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"

# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]

# Enable the asset pipeline
config.assets.enabled = true
end
end
6 changes: 6 additions & 0 deletions config/boot.rb
@@ -0,0 +1,6 @@
require 'rubygems'

# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)

require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
25 changes: 25 additions & 0 deletions config/database.yml
@@ -0,0 +1,25 @@
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000

# 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: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000

production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
5 changes: 5 additions & 0 deletions config/environment.rb
@@ -0,0 +1,5 @@
# Load the rails application
require File.expand_path('../application', __FILE__)

# Initialize the rails application
EdbookfestMobile::Application.initialize!
27 changes: 27 additions & 0 deletions config/environments/development.rb
@@ -0,0 +1,27 @@
EdbookfestMobile::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

# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true

# 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

# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin

# Do not compress assets
config.assets.compress = false
end
54 changes: 54 additions & 0 deletions config/environments/production.rb
@@ -0,0 +1,54 @@
EdbookfestMobile::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

# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = 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.compress = true

# Specify the default JavaScript compressor
config.assets.js_compressor = :uglifier

# Specifies the header that your server uses for sending files
# (comment out if your front-end server doesn't support this)
config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use '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

# See everything in the log (default is :info)
# config.log_level = :debug

# Use a different logger for distributed setups
# config.logger = 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 are already added)
# config.assets.precompile += %w( search.js )

# Disable delivery errors, bad email addresses will be ignored
# 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
# 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
end

0 comments on commit 89c994f

Please sign in to comment.