Skip to content
This repository was archived by the owner on May 29, 2020. It is now read-only.

Commit c88386c

Browse files
committed
install rails4
1 parent 3962266 commit c88386c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+657
-0
lines changed

.gitignore

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
#
3+
# If you find yourself ignoring temporary files generated by your text editor
4+
# or operating system, you probably want to add a global ignore instead:
5+
# git config --global core.excludesfile '~/.gitignore_global'
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore the default SQLite database.
11+
/db/*.sqlite3
12+
/db/*.sqlite3-journal
13+
14+
# Ignore all logfiles and tempfiles.
15+
/log/*.log
16+
/tmp

.ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ruby-2.0.0-p0

Gemfile

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
source 'https://rubygems.org'
2+
3+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
4+
gem 'rails', '4.0.0.beta1'
5+
6+
gem 'pg'
7+
8+
# Gems used only for assets and not required
9+
# in production environments by default.
10+
group :assets do
11+
gem 'sass-rails', '~> 4.0.0.beta1'
12+
gem 'coffee-rails', '~> 4.0.0.beta1'
13+
14+
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
15+
# gem 'therubyracer', platforms: :ruby
16+
17+
gem 'uglifier', '>= 1.0.3'
18+
end
19+
20+
gem 'jquery-rails'
21+
22+
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
23+
gem 'turbolinks'
24+
25+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
26+
gem 'jbuilder', '~> 1.0.1'
27+
28+
# To use ActiveModel has_secure_password
29+
# gem 'bcrypt-ruby', '~> 3.0.0'
30+
31+
# Use unicorn as the app server
32+
# gem 'unicorn'
33+
34+
# Deploy with Capistrano
35+
# gem 'capistrano', group: :development
36+
37+
# To use debugger
38+
# gem 'debugger'

Gemfile.lock

+118
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
actionmailer (4.0.0.beta1)
5+
actionpack (= 4.0.0.beta1)
6+
mail (~> 2.5.3)
7+
actionpack (4.0.0.beta1)
8+
activesupport (= 4.0.0.beta1)
9+
builder (~> 3.1.0)
10+
erubis (~> 2.7.0)
11+
rack (~> 1.5.2)
12+
rack-test (~> 0.6.2)
13+
activemodel (4.0.0.beta1)
14+
activesupport (= 4.0.0.beta1)
15+
builder (~> 3.1.0)
16+
activerecord (4.0.0.beta1)
17+
activemodel (= 4.0.0.beta1)
18+
activerecord-deprecated_finders (~> 0.0.3)
19+
activesupport (= 4.0.0.beta1)
20+
arel (~> 4.0.0.beta1)
21+
activerecord-deprecated_finders (0.0.3)
22+
activesupport (4.0.0.beta1)
23+
i18n (~> 0.6.2)
24+
minitest (~> 4.2)
25+
multi_json (~> 1.3)
26+
thread_safe (~> 0.1)
27+
tzinfo (~> 0.3.33)
28+
arel (4.0.0)
29+
atomic (1.1.9)
30+
builder (3.1.4)
31+
coffee-rails (4.0.0)
32+
coffee-script (>= 2.2.0)
33+
railties (>= 4.0.0.beta, < 5.0)
34+
coffee-script (2.2.0)
35+
coffee-script-source
36+
execjs
37+
coffee-script-source (1.6.2)
38+
erubis (2.7.0)
39+
execjs (1.4.0)
40+
multi_json (~> 1.0)
41+
hike (1.2.2)
42+
i18n (0.6.4)
43+
jbuilder (1.0.2)
44+
activesupport (>= 3.0.0)
45+
jquery-rails (2.2.1)
46+
railties (>= 3.0, < 5.0)
47+
thor (>= 0.14, < 2.0)
48+
json (1.7.7)
49+
mail (2.5.3)
50+
i18n (>= 0.4.0)
51+
mime-types (~> 1.16)
52+
treetop (~> 1.4.8)
53+
mime-types (1.23)
54+
minitest (4.7.4)
55+
multi_json (1.7.3)
56+
pg (0.15.1)
57+
polyglot (0.3.3)
58+
rack (1.5.2)
59+
rack-test (0.6.2)
60+
rack (>= 1.0)
61+
rails (4.0.0.beta1)
62+
actionmailer (= 4.0.0.beta1)
63+
actionpack (= 4.0.0.beta1)
64+
activerecord (= 4.0.0.beta1)
65+
activesupport (= 4.0.0.beta1)
66+
bundler (>= 1.3.0, < 2.0)
67+
railties (= 4.0.0.beta1)
68+
sprockets-rails (~> 2.0.0.rc3)
69+
railties (4.0.0.beta1)
70+
actionpack (= 4.0.0.beta1)
71+
activesupport (= 4.0.0.beta1)
72+
rake (>= 0.8.7)
73+
rdoc (~> 3.4)
74+
thor (>= 0.17.0, < 2.0)
75+
rake (10.0.4)
76+
rdoc (3.12.2)
77+
json (~> 1.4)
78+
sass (3.2.8)
79+
sass-rails (4.0.0.rc1)
80+
railties (>= 4.0.0.beta, < 5.0)
81+
sass (>= 3.1.10)
82+
sprockets-rails (~> 2.0.0.rc0)
83+
tilt (~> 1.3)
84+
sprockets (2.9.3)
85+
hike (~> 1.2)
86+
multi_json (~> 1.0)
87+
rack (~> 1.0)
88+
tilt (~> 1.1, != 1.3.0)
89+
sprockets-rails (2.0.0.rc4)
90+
actionpack (>= 3.0)
91+
activesupport (>= 3.0)
92+
sprockets (~> 2.8)
93+
thor (0.18.1)
94+
thread_safe (0.1.0)
95+
atomic
96+
tilt (1.4.0)
97+
treetop (1.4.12)
98+
polyglot
99+
polyglot (>= 0.3.1)
100+
turbolinks (1.1.1)
101+
coffee-rails
102+
tzinfo (0.3.37)
103+
uglifier (2.0.1)
104+
execjs (>= 0.3.0)
105+
multi_json (~> 1.0, >= 1.0.2)
106+
107+
PLATFORMS
108+
ruby
109+
110+
DEPENDENCIES
111+
coffee-rails (~> 4.0.0.beta1)
112+
jbuilder (~> 1.0.1)
113+
jquery-rails
114+
pg
115+
rails (= 4.0.0.beta1)
116+
sass-rails (~> 4.0.0.beta1)
117+
turbolinks
118+
uglifier (>= 1.0.3)

Rakefile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Add your own tasks in files placed in lib/tasks ending in .rake,
2+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3+
4+
require File.expand_path('../config/application', __FILE__)
5+
6+
Example::Application.load_tasks

app/assets/images/rails.png

6.49 KB
Loading

app/assets/javascripts/application.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This is a manifest file that'll be compiled into application.js, which will include all the files
2+
// listed below.
3+
//
4+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6+
//
7+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8+
// compiled file.
9+
//
10+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11+
// GO AFTER THE REQUIRES BELOW.
12+
//
13+
//= require jquery
14+
//= require jquery_ujs
15+
//= require turbolinks
16+
//= require_tree .
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* This is a manifest file that'll be compiled into application.css, which will include all the files
3+
* listed below.
4+
*
5+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7+
*
8+
* You're free to add application-wide styles to this file and they'll appear at the top of the
9+
* compiled file, but it's generally better to create a new file per style scope.
10+
*
11+
*= require_self
12+
*= require_tree .
13+
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class ApplicationController < ActionController::Base
2+
# Prevent CSRF attacks by raising an exception.
3+
# For APIs, you may want to use :null_session instead.
4+
protect_from_forgery with: :exception
5+
end

app/controllers/concerns/.keep

Whitespace-only changes.

app/helpers/application_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module ApplicationHelper
2+
end

app/mailers/.keep

Whitespace-only changes.

app/models/.keep

Whitespace-only changes.

app/models/concerns/.keep

Whitespace-only changes.
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Example</title>
5+
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6+
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7+
<%= csrf_meta_tags %>
8+
</head>
9+
<body>
10+
11+
<%= yield %>
12+
13+
</body>
14+
</html>

bin/bundle

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env ruby
2+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3+
load Gem.bin_path('bundler', 'bundle')

bin/rails

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env ruby
2+
APP_PATH = File.expand_path('../../config/application', __FILE__)
3+
require_relative '../config/boot'
4+
require 'rails/commands'

bin/rake

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env ruby
2+
require_relative '../config/boot'
3+
require 'rake'
4+
Rake.application.run

config.ru

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This file is used by Rack-based servers to start the application.
2+
3+
require ::File.expand_path('../config/environment', __FILE__)
4+
run Example::Application

config/application.rb

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
require File.expand_path('../boot', __FILE__)
2+
3+
require 'rails/all'
4+
5+
# Assets should be precompiled for production (so we don't need the gems loaded then)
6+
Bundler.require(*Rails.groups(assets: %w(development test)))
7+
8+
module Example
9+
class Application < Rails::Application
10+
# Settings in config/environments/* take precedence over those specified here.
11+
# Application configuration should go into files in config/initializers
12+
# -- all .rb files in that directory are automatically loaded.
13+
14+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16+
# config.time_zone = 'Central Time (US & Canada)'
17+
18+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20+
# config.i18n.default_locale = :de
21+
end
22+
end

config/boot.rb

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Set up gems listed in the Gemfile.
2+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3+
4+
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])

config/environment.rb

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Load the rails application.
2+
require File.expand_path('../application', __FILE__)
3+
4+
# Initialize the rails application.
5+
Example::Application.initialize!

config/environments/development.rb

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Example::Application.configure do
2+
# Settings specified here will take precedence over those in config/application.rb.
3+
4+
# In the development environment your application's code is reloaded on
5+
# every request. This slows down response time but is perfect for development
6+
# since you don't have to restart the web server when you make code changes.
7+
config.cache_classes = false
8+
9+
# Do not eager load code on boot.
10+
config.eager_load = false
11+
12+
# Show full error reports and disable caching.
13+
config.consider_all_requests_local = true
14+
config.action_controller.perform_caching = false
15+
16+
# Don't care if the mailer can't send.
17+
config.action_mailer.raise_delivery_errors = false
18+
19+
# Print deprecation notices to the Rails logger.
20+
config.active_support.deprecation = :log
21+
22+
# Raise an error on page load if there are pending migrations
23+
config.active_record.migration_error = :page_load
24+
25+
# Debug mode disables concatenation and preprocessing of assets.
26+
config.assets.debug = true
27+
end

0 commit comments

Comments
 (0)