Skip to content

Commit f290b13

Browse files
committed
Improve the README
0 parents  commit f290b13

Some content is hidden

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

47 files changed

+920
-0
lines changed

.gitignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# See https://help.github.com/articles/ignoring-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
17+
18+
# Ignore other unneeded files.
19+
database.yml
20+
doc/
21+
*.swp
22+
*~
23+
.project
24+
.DS_Store
25+
.idea
26+
.secret

.rspec

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--color

Gemfile

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
source 'https://rubygems.org'
2+
3+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
4+
gem 'rails', '4.0.2'
5+
6+
group :development, :test do
7+
# Use sqlite3 as the database for Active Record
8+
gem 'sqlite3'
9+
gem 'rspec-rails'
10+
end
11+
12+
group :test do
13+
gem 'selenium-webdriver'
14+
gem 'capybara'
15+
end
16+
17+
# Use SCSS for stylesheets
18+
gem 'sass-rails', '~> 4.0.0'
19+
20+
# Use Uglifier as compressor for JavaScript assets
21+
gem 'uglifier', '>= 1.3.0'
22+
23+
# Use CoffeeScript for .js.coffee assets and views
24+
gem 'coffee-rails', '~> 4.0.0'
25+
26+
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
27+
# gem 'therubyracer', platforms: :ruby
28+
29+
# Use jquery as the JavaScript library
30+
gem 'jquery-rails'
31+
32+
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
33+
gem 'turbolinks'
34+
35+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
36+
gem 'jbuilder', '~> 1.2'
37+
38+
group :doc do
39+
# bundle exec rake doc:rails generates the API under doc/api.
40+
gem 'sdoc', require: false
41+
end
42+
43+
group :production do
44+
gem 'pg'
45+
gem 'rails_12factor'
46+
end
47+
48+
# Use ActiveModel has_secure_password
49+
# gem 'bcrypt-ruby', '~> 3.1.2'
50+
51+
# Use unicorn as the app server
52+
# gem 'unicorn'
53+
54+
# Use Capistrano for deployment
55+
# gem 'capistrano', group: :development
56+
57+
# Use debugger
58+
# gem 'debugger', group: [:development, :test]

Gemfile.lock

+164
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
actionmailer (4.0.2)
5+
actionpack (= 4.0.2)
6+
mail (~> 2.5.4)
7+
actionpack (4.0.2)
8+
activesupport (= 4.0.2)
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.2)
14+
activesupport (= 4.0.2)
15+
builder (~> 3.1.0)
16+
activerecord (4.0.2)
17+
activemodel (= 4.0.2)
18+
activerecord-deprecated_finders (~> 1.0.2)
19+
activesupport (= 4.0.2)
20+
arel (~> 4.0.0)
21+
activerecord-deprecated_finders (1.0.3)
22+
activesupport (4.0.2)
23+
i18n (~> 0.6, >= 0.6.4)
24+
minitest (~> 4.2)
25+
multi_json (~> 1.3)
26+
thread_safe (~> 0.1)
27+
tzinfo (~> 0.3.37)
28+
arel (4.0.1)
29+
atomic (1.1.14)
30+
builder (3.1.4)
31+
capybara (2.2.1)
32+
mime-types (>= 1.16)
33+
nokogiri (>= 1.3.3)
34+
rack (>= 1.0.0)
35+
rack-test (>= 0.5.4)
36+
xpath (~> 2.0)
37+
childprocess (0.4.0)
38+
ffi (~> 1.0, >= 1.0.11)
39+
coffee-rails (4.0.1)
40+
coffee-script (>= 2.2.0)
41+
railties (>= 4.0.0, < 5.0)
42+
coffee-script (2.2.0)
43+
coffee-script-source
44+
execjs
45+
coffee-script-source (1.6.3)
46+
diff-lcs (1.2.5)
47+
erubis (2.7.0)
48+
execjs (2.0.2)
49+
ffi (1.9.3)
50+
hike (1.2.3)
51+
i18n (0.6.9)
52+
jbuilder (1.5.3)
53+
activesupport (>= 3.0.0)
54+
multi_json (>= 1.2.0)
55+
jquery-rails (3.0.4)
56+
railties (>= 3.0, < 5.0)
57+
thor (>= 0.14, < 2.0)
58+
json (1.8.1)
59+
mail (2.5.4)
60+
mime-types (~> 1.16)
61+
treetop (~> 1.4.8)
62+
mime-types (1.25.1)
63+
mini_portile (0.5.2)
64+
minitest (4.7.5)
65+
multi_json (1.8.4)
66+
nokogiri (1.6.1)
67+
mini_portile (~> 0.5.0)
68+
pg (0.17.1)
69+
polyglot (0.3.3)
70+
rack (1.5.2)
71+
rack-test (0.6.2)
72+
rack (>= 1.0)
73+
rails (4.0.2)
74+
actionmailer (= 4.0.2)
75+
actionpack (= 4.0.2)
76+
activerecord (= 4.0.2)
77+
activesupport (= 4.0.2)
78+
bundler (>= 1.3.0, < 2.0)
79+
railties (= 4.0.2)
80+
sprockets-rails (~> 2.0.0)
81+
rails_12factor (0.0.2)
82+
rails_serve_static_assets
83+
rails_stdout_logging
84+
rails_serve_static_assets (0.0.2)
85+
rails_stdout_logging (0.0.3)
86+
railties (4.0.2)
87+
actionpack (= 4.0.2)
88+
activesupport (= 4.0.2)
89+
rake (>= 0.8.7)
90+
thor (>= 0.18.1, < 2.0)
91+
rake (10.1.1)
92+
rdoc (4.1.1)
93+
json (~> 1.4)
94+
rspec-core (2.14.7)
95+
rspec-expectations (2.14.4)
96+
diff-lcs (>= 1.1.3, < 2.0)
97+
rspec-mocks (2.14.4)
98+
rspec-rails (2.14.1)
99+
actionpack (>= 3.0)
100+
activemodel (>= 3.0)
101+
activesupport (>= 3.0)
102+
railties (>= 3.0)
103+
rspec-core (~> 2.14.0)
104+
rspec-expectations (~> 2.14.0)
105+
rspec-mocks (~> 2.14.0)
106+
rubyzip (1.1.0)
107+
sass (3.2.14)
108+
sass-rails (4.0.1)
109+
railties (>= 4.0.0, < 5.0)
110+
sass (>= 3.1.10)
111+
sprockets-rails (~> 2.0.0)
112+
sdoc (0.4.0)
113+
json (~> 1.8)
114+
rdoc (~> 4.0, < 5.0)
115+
selenium-webdriver (2.39.0)
116+
childprocess (>= 0.2.5)
117+
multi_json (~> 1.0)
118+
rubyzip (~> 1.0)
119+
websocket (~> 1.0.4)
120+
sprockets (2.10.1)
121+
hike (~> 1.2)
122+
multi_json (~> 1.0)
123+
rack (~> 1.0)
124+
tilt (~> 1.1, != 1.3.0)
125+
sprockets-rails (2.0.1)
126+
actionpack (>= 3.0)
127+
activesupport (>= 3.0)
128+
sprockets (~> 2.8)
129+
sqlite3 (1.3.8)
130+
thor (0.18.1)
131+
thread_safe (0.1.3)
132+
atomic
133+
tilt (1.4.1)
134+
treetop (1.4.15)
135+
polyglot
136+
polyglot (>= 0.3.1)
137+
turbolinks (2.2.0)
138+
coffee-rails
139+
tzinfo (0.3.38)
140+
uglifier (2.4.0)
141+
execjs (>= 0.3.0)
142+
json (>= 1.8.0)
143+
websocket (1.0.7)
144+
xpath (2.0.0)
145+
nokogiri (~> 1.3)
146+
147+
PLATFORMS
148+
ruby
149+
150+
DEPENDENCIES
151+
capybara
152+
coffee-rails (~> 4.0.0)
153+
jbuilder (~> 1.2)
154+
jquery-rails
155+
pg
156+
rails (= 4.0.2)
157+
rails_12factor
158+
rspec-rails
159+
sass-rails (~> 4.0.0)
160+
sdoc
161+
selenium-webdriver
162+
sqlite3
163+
turbolinks
164+
uglifier (>= 1.3.0)

README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
== README
2+
3+
# Ruby on Rails Tutorial: sample application
4+
5+
This is the sample application for
6+
the [*Ruby on Rails Tutorial*](http://railstutorial.org/)
7+
by [Michael Hartl](http://michaelhartl.com/).
8+
9+
10+
This README would normally document whatever steps are necessary to get the
11+
application up and running.
12+
13+
Things you may want to cover:
14+
15+
* Ruby version
16+
17+
* System dependencies
18+
19+
* Configuration
20+
21+
* Database creation
22+
23+
* Database initialization
24+
25+
* How to run the test suite
26+
27+
* Services (job queues, cache servers, search engines, etc.)
28+
29+
* Deployment instructions
30+
31+
* ...
32+
33+
34+
Please feel free to use a different markup language if you do not plan to run
35+
<tt>rake doc:app</tt>.

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+
RailsSampleApp::Application.load_tasks

app/assets/images/.keep

Whitespace-only changes.

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+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11+
// about supported directives.
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>RailsSampleApp</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 Rails.application

config/application.rb

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
require File.expand_path('../boot', __FILE__)
2+
3+
# Pick the frameworks you want:
4+
require "active_record/railtie"
5+
require "action_controller/railtie"
6+
require "action_mailer/railtie"
7+
require "sprockets/railtie"
8+
# require "rails/test_unit/railtie"
9+
10+
# Require the gems listed in Gemfile, including any gems
11+
# you've limited to :test, :development, or :production.
12+
Bundler.require(:default, Rails.env)
13+
14+
module RailsSampleApp
15+
class Application < Rails::Application
16+
# Settings in config/environments/* take precedence over those specified here.
17+
# Application configuration should go into files in config/initializers
18+
# -- all .rb files in that directory are automatically loaded.
19+
20+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
21+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
22+
# config.time_zone = 'Central Time (US & Canada)'
23+
24+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
25+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
26+
# config.i18n.default_locale = :de
27+
end
28+
end

0 commit comments

Comments
 (0)