tft_rails 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/generators/chapter08_09/begin/USAGE +4 -4
- data/lib/generators/chapter08_09/begin/begin_generator.rb +1 -1
- data/lib/generators/chapter08_09/begin/instructions.md +1 -1
- data/lib/generators/chapter08_09/begin/templates/spec/requests/users_signup_08_spec.rb +2 -2
- data/lib/generators/chapter08_09/solutions/USAGE +4 -4
- data/lib/generators/chapter10/begin/USAGE +24 -0
- data/lib/generators/chapter10/begin/begin_generator.rb +41 -0
- data/lib/generators/chapter10/begin/instructions.md +37 -0
- data/lib/generators/chapter10/begin/snippets/custom.css +12 -0
- data/lib/generators/chapter10/begin/snippets/factories.rb +8 -0
- data/lib/generators/chapter10/begin/templates/app/views/layouts/application.html.erb +21 -0
- data/lib/generators/chapter10/begin/templates/lib/tasks/same_data.rake +24 -0
- data/lib/generators/chapter10/begin/templates/spec/controllers/users_controller_10_spec.rb +101 -0
- data/lib/generators/chapter10/begin/templates/spec/models/user_10_spec.rb +24 -0
- data/lib/generators/chapter10/solutions/USAGE +18 -0
- data/lib/generators/chapter10/solutions/snippets/migration_add_admin_to_users.rb +9 -0
- data/lib/generators/chapter10/solutions/solutions_generator.rb +32 -0
- data/lib/generators/chapter10/solutions/templates/app/controllers/users_controller.rb +28 -0
- data/lib/generators/chapter10/solutions/templates/app/views/users/_user.html.erb +8 -0
- data/lib/generators/chapter10/solutions/templates/app/views/users/index.html.erb +9 -0
- data/lib/generators/chapter11/begin/USAGE +24 -0
- data/lib/generators/chapter11/begin/begin_generator.rb +20 -0
- data/lib/generators/chapter11/begin/instructions.md +2 -0
- data/lib/generators/chapter11/solutions/USAGE +18 -0
- data/lib/generators/chapter11/solutions/solutions_generator.rb +6 -0
- metadata +22 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
Description:
|
2
|
-
Begins Test-First Teaching exercises adapted from
|
2
|
+
Begins Test-First Teaching exercises adapted from Chapters 08, 09 of the RailsTutorial by Michael Hartl.
|
3
3
|
|
4
4
|
It is assumed that this generator is run after the exercises for Chapter 07 have been completed, and the solutions are implemented.
|
5
5
|
|
@@ -8,15 +8,15 @@ Description:
|
|
8
8
|
If all tests pass, the "finish" phase is optional.
|
9
9
|
|
10
10
|
Example:
|
11
|
-
rails generate
|
11
|
+
rails generate chapter08_09:begin
|
12
12
|
|
13
13
|
This copies new tests into the project, which are failing.
|
14
14
|
The student's task is to write code to make the test pass. The material covered by the tests is consistent
|
15
|
-
with
|
15
|
+
with Chapters 08, 09 of the RailsTutorial, however adapted for Devise as authentication solution.
|
16
16
|
|
17
17
|
When you're done, and all tests pass, or you just want to skip ahead, run:
|
18
18
|
|
19
|
-
rails generate
|
19
|
+
rails generate chapter08_09:solutions
|
20
20
|
|
21
21
|
This will copy solutions files into the application tree. If you already have a solution file,
|
22
22
|
you'll be prompted whether you want to overwrite your file, see the difference, or keep your file.
|
@@ -17,7 +17,7 @@ module Chapter08_09
|
|
17
17
|
require 'rdiscount'
|
18
18
|
|
19
19
|
instr_md = File.expand_path('../instructions.md',self.class.source_root)
|
20
|
-
dest = File.join(Rails.root,'doc','
|
20
|
+
dest = File.join(Rails.root,'doc','chapter08_09.html')
|
21
21
|
copy_file(instr_md, dest, :force => true) do |content|
|
22
22
|
RDiscount.new(content).to_html
|
23
23
|
end
|
@@ -7,7 +7,7 @@ describe "Users" do
|
|
7
7
|
describe "success" do
|
8
8
|
|
9
9
|
it "should make a new user" do
|
10
|
-
|
10
|
+
expect {
|
11
11
|
visit signup_path
|
12
12
|
fill_in "Name", :with => "Example User"
|
13
13
|
fill_in "Email", :with => "user@example.com"
|
@@ -15,7 +15,7 @@ describe "Users" do
|
|
15
15
|
fill_in "Confirmation", :with => "foobar"
|
16
16
|
click_button
|
17
17
|
response.should render_template('users/show')
|
18
|
-
|
18
|
+
}.to change(User, :count).by(1)
|
19
19
|
end
|
20
20
|
|
21
21
|
it "should print a welcome message" do
|
@@ -1,12 +1,12 @@
|
|
1
1
|
Description:
|
2
|
-
Wraps up Test-First Teaching exercises adapted from
|
2
|
+
Wraps up Test-First Teaching exercises adapted from Chapters 08, 09 of the RailsTutorial by Michael Hartl.
|
3
3
|
|
4
4
|
Example:
|
5
|
-
rails generate
|
5
|
+
rails generate chapter08_09:solutions
|
6
6
|
|
7
7
|
This copies the solutions and other necessary files (e.g. images, assets, helpers, etc.) into the project
|
8
|
-
to conclude
|
9
|
-
the end of
|
8
|
+
to conclude Chapters 08, 09. This should make all tests pass and bring you in sync to the application at
|
9
|
+
the end of Chapters 08, 09.
|
10
10
|
|
11
11
|
If you already have a solution file, you'll be prompted whether you want to overwrite your file,
|
12
12
|
see the difference, or keep your file.
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Description:
|
2
|
+
Begins Test-First Teaching exercises adapted from Chapter 10 of the RailsTutorial by Michael Hartl.
|
3
|
+
|
4
|
+
It is assumed that this generator is run after the exercises for Chapter 08, 09 have been completed, and the solutions are implemented.
|
5
|
+
|
6
|
+
Successive chapters are expected to be run sequentially. Each chapter's generators comes with a delta
|
7
|
+
to the next chapter, in two phase, the "begin" one will create tests, the "finish" one includes the solution files.
|
8
|
+
If all tests pass, the "finish" phase is optional.
|
9
|
+
|
10
|
+
Example:
|
11
|
+
rails generate chapter10:begin
|
12
|
+
|
13
|
+
This copies new tests into the project, which are failing.
|
14
|
+
The student's task is to write code to make the test pass. The material covered by the tests is consistent
|
15
|
+
with Chapter 10 of the RailsTutorial, however adapted for Devise as authentication solution.
|
16
|
+
|
17
|
+
When you're done, and all tests pass, or you just want to skip ahead, run:
|
18
|
+
|
19
|
+
rails generate chapter10:solutions
|
20
|
+
|
21
|
+
This will copy solutions files into the application tree. If you already have a solution file,
|
22
|
+
you'll be prompted whether you want to overwrite your file, see the difference, or keep your file.
|
23
|
+
|
24
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Chapter10
|
2
|
+
module Generators
|
3
|
+
class BeginGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path("../templates", __FILE__)
|
5
|
+
|
6
|
+
def copy_app_tree
|
7
|
+
directory(self.class.source_root, Rails.root)
|
8
|
+
end
|
9
|
+
|
10
|
+
def augment_gemfile
|
11
|
+
gem 'faker', '~> 0.9.5'
|
12
|
+
gem 'will_paginate', '~> 3.0.pre2'
|
13
|
+
end
|
14
|
+
|
15
|
+
def insert_css
|
16
|
+
src = File.expand_path("../snippets/custom.css", __FILE__)
|
17
|
+
dest = File.join(Rails.root,'public','stylesheets','custom.css')
|
18
|
+
insert_into_file(dest, File.binread(src), :before => /\Z/) # insert before end
|
19
|
+
end
|
20
|
+
|
21
|
+
def insert_factories
|
22
|
+
src = File.expand_path("../snippets/factories.rb", __FILE__)
|
23
|
+
dest = File.join(Rails.root,'spec','factories.rb')
|
24
|
+
insert_into_file(dest, File.binread(src), :before => /\Z/) # insert before end
|
25
|
+
end
|
26
|
+
|
27
|
+
def generate_instructions
|
28
|
+
require 'rdiscount'
|
29
|
+
|
30
|
+
instr_md = File.expand_path('../instructions.md',self.class.source_root)
|
31
|
+
return unless File.exists?(instr_md)
|
32
|
+
dest = File.join(Rails.root,'doc','chapter10.html')
|
33
|
+
copy_file(instr_md, dest, :force => true) do |content|
|
34
|
+
RDiscount.new(content).to_html
|
35
|
+
end
|
36
|
+
say_status('Note',"Now open file://#{dest} in your web browser for instructions", :cyan)
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
RailsTutorial Chapter 10 Test-First Teaching Instructions
|
2
|
+
=========================================================
|
3
|
+
|
4
|
+
These exercises are based on RailsTutorial but have been adapted
|
5
|
+
to the user of [Devise](devise) as authentication solution. Among
|
6
|
+
other things, Devise also provides controllers and views to edit
|
7
|
+
the user, so that Chapter 10.1 of RailsTutorial (editing users) is being
|
8
|
+
already taken care of. Similarly for 10.2 (access protecting of the edit
|
9
|
+
page).
|
10
|
+
|
11
|
+
Showing Users
|
12
|
+
-------------
|
13
|
+
|
14
|
+
Chapter 10.3 covers implementing an index view of users with
|
15
|
+
pagination and using partials.
|
16
|
+
|
17
|
+
It also covers restricting access to the index page to signed-in users.
|
18
|
+
|
19
|
+
Devise offers a facility similar to what RailsTutorials implements.
|
20
|
+
|
21
|
+
RailsTutorial implements an `authenticate` method, while Devise's
|
22
|
+
version is `authenticate_user!`. Either method redirects to the sign-in
|
23
|
+
page if a given user isn't logged in.
|
24
|
+
|
25
|
+
Destroying users with admin privilege
|
26
|
+
-------------------------------------
|
27
|
+
|
28
|
+
Chapter 10.4 covers adding an admin flag to the users table, to
|
29
|
+
identify privileged administrative users.
|
30
|
+
|
31
|
+
Having such admin privileges, we go on to implement a `destroy` action
|
32
|
+
for users which, however, is only available to admin users.
|
33
|
+
|
34
|
+
What are the two things we have to protect?
|
35
|
+
|
36
|
+
|
37
|
+
[devise]: https://github.com/plataformatec/devise "Devise on github"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title><%= title %></title>
|
5
|
+
<%= csrf_meta_tag %>
|
6
|
+
<%= render 'layouts/stylesheets' %>
|
7
|
+
<%= javascript_include_tag :defaults %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<div class="container">
|
11
|
+
<%= render 'layouts/header' %>
|
12
|
+
<section class="round">
|
13
|
+
<% flash.each do |key, value| %>
|
14
|
+
<div class="flash <%= key %>"><%= value %></div>
|
15
|
+
<% end %>
|
16
|
+
<%= yield %>
|
17
|
+
</section>
|
18
|
+
<%= render 'layouts/footer' %>
|
19
|
+
</div>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
namespace :db do
|
2
|
+
desc "Fill database with sample data"
|
3
|
+
task :populate => :environment do
|
4
|
+
Rake::Task['db:reset'].invoke
|
5
|
+
make_users
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
def make_users
|
10
|
+
admin = User.create!(:name => "Example User",
|
11
|
+
:email => "example@railstutorial.org",
|
12
|
+
:password => "password",
|
13
|
+
:password_confirmation => "password")
|
14
|
+
# admin.toggle!(:admin)
|
15
|
+
99.times do |n|
|
16
|
+
name = Faker::Name.name
|
17
|
+
email = "example-#{n+1}@railstutorial.org"
|
18
|
+
password = "password"
|
19
|
+
User.create!(:name => name,
|
20
|
+
:email => email,
|
21
|
+
:password => password,
|
22
|
+
:password_confirmation => password)
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe UsersController do
|
4
|
+
render_views
|
5
|
+
|
6
|
+
describe "GET 'index'" do
|
7
|
+
|
8
|
+
describe "for non-signed-in users" do
|
9
|
+
it "should deny access" do
|
10
|
+
get :index
|
11
|
+
response.should redirect_to(new_user_session_path)
|
12
|
+
flash[:alert].should =~ /sign in/i
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "for signed-in users" do
|
17
|
+
|
18
|
+
before(:each) do
|
19
|
+
@user = Factory(:user)
|
20
|
+
sign_in(@user)
|
21
|
+
|
22
|
+
second = Factory(:user, :name => "Bob", :email => "another@example.com")
|
23
|
+
third = Factory(:user, :name => "Ben", :email => "another@example.net")
|
24
|
+
|
25
|
+
@users = [@user, second, third]
|
26
|
+
@users = [@user, second, third]
|
27
|
+
30.times do
|
28
|
+
@users << Factory(:user, :email => Factory.next(:email))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should be successful" do
|
33
|
+
get :index
|
34
|
+
response.should be_success
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should have the right title" do
|
38
|
+
get :index
|
39
|
+
response.should render_template('index')
|
40
|
+
end
|
41
|
+
|
42
|
+
it "should have an element for each user" do
|
43
|
+
get :index
|
44
|
+
@users[0..2].each do |user|
|
45
|
+
response.should have_selector("li", :content => user.name)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should paginate users" do
|
50
|
+
get :index
|
51
|
+
response.should have_selector("div.pagination")
|
52
|
+
response.should have_selector("span.disabled", :content => "Previous")
|
53
|
+
response.should have_selector("a", :href => "/users?page=2",
|
54
|
+
:content => "2")
|
55
|
+
response.should have_selector("a", :href => "/users?page=2",
|
56
|
+
:content => "Next")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
describe "DELETE 'destroy'" do
|
62
|
+
|
63
|
+
before(:each) do
|
64
|
+
@user = Factory(:user)
|
65
|
+
end
|
66
|
+
|
67
|
+
describe "as a non-signed-in user" do
|
68
|
+
it "should deny access" do
|
69
|
+
delete :destroy, :id => @user
|
70
|
+
response.should redirect_to(new_user_session_path)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
describe "as a non-admin user" do
|
75
|
+
it "should protect the page" do
|
76
|
+
sign_in(@user)
|
77
|
+
delete :destroy, :id => @user
|
78
|
+
response.should redirect_to(root_path)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
describe "as an admin user" do
|
83
|
+
|
84
|
+
before(:each) do
|
85
|
+
admin = Factory(:user, :email => "admin@example.com", :admin => true)
|
86
|
+
sign_in(admin)
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should destroy the user" do
|
90
|
+
expect {
|
91
|
+
delete :destroy, :id => @user
|
92
|
+
}.to change(User, :count).by(-1)
|
93
|
+
end
|
94
|
+
|
95
|
+
it "should redirect to the users page" do
|
96
|
+
delete :destroy, :id => @user
|
97
|
+
response.should redirect_to(users_path)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe User do
|
4
|
+
|
5
|
+
describe "admin attribute" do
|
6
|
+
|
7
|
+
before(:each) do
|
8
|
+
@user = Factory(:user)
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should respond to admin" do
|
12
|
+
@user.should respond_to(:admin)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should not be an admin by default" do
|
16
|
+
@user.should_not be_admin
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should be convertible to an admin" do
|
20
|
+
@user.toggle!(:admin)
|
21
|
+
@user.should be_admin
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Description:
|
2
|
+
Wraps up Test-First Teaching exercises adapted from Chapter 10 of the RailsTutorial by Michael Hartl.
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate chapter10:solutions
|
6
|
+
|
7
|
+
This copies the solutions and other necessary files (e.g. images, assets, helpers, etc.) into the project
|
8
|
+
to conclude Chapter 10. This should make all tests pass and bring you in sync to the application at
|
9
|
+
the end of Chapter 10.
|
10
|
+
|
11
|
+
If you already have a solution file, you'll be prompted whether you want to overwrite your file,
|
12
|
+
see the difference, or keep your file.
|
13
|
+
|
14
|
+
It's a good idea to commit your changes to git, prior to running finish, in case you accidentally choose to
|
15
|
+
overwrite files you wanted to keep. Assuming your project is already git-controlled, you can commit changes with:
|
16
|
+
|
17
|
+
git add .
|
18
|
+
git commit -m "comment here explaining WHY you made the changes"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Chapter10
|
2
|
+
module Generators
|
3
|
+
class SolutionsGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path("../templates", __FILE__)
|
5
|
+
|
6
|
+
def copy_app_tree
|
7
|
+
directory(self.class.source_root, Rails.root)
|
8
|
+
end
|
9
|
+
|
10
|
+
def add_destroy_action_to_users_resource
|
11
|
+
dest = File.join(Rails.root,'config','routes.rb')
|
12
|
+
insert_into_file(dest, :after => %r{:index,\s*:show}) do
|
13
|
+
", :destroy"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def add_migration
|
18
|
+
found_candidate = Dir.glob(File.join(Rails.root,'db','migrate','*_admin_*')).present?
|
19
|
+
|
20
|
+
if (found_candidate &&
|
21
|
+
yes?("We found a migration file containing the word '_admin_'. We think you have the correct migration. Do you still way to copy the solution anyway? (yes/no)", :yellow)) \
|
22
|
+
or !found_candidate
|
23
|
+
|
24
|
+
src = File.expand_path("../snippets/migration_add_admin_to_users.rb", __FILE__)
|
25
|
+
dest = File.join(Rails.root,'db','migrate',Time.now.strftime("%Y%m%d%H%M%S")+'_add_admin_to_users.rb')
|
26
|
+
copy_file(src,dest)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class UsersController < ApplicationController
|
2
|
+
|
3
|
+
before_filter :authenticate_user!, :only => [:index, :destroy]
|
4
|
+
before_filter :admin_user, :only => :destroy
|
5
|
+
|
6
|
+
def show
|
7
|
+
@user = User.find(params[:id])
|
8
|
+
@title = @user.name
|
9
|
+
end
|
10
|
+
|
11
|
+
def index
|
12
|
+
@title = "All users"
|
13
|
+
@users = User.paginate(:page => params[:page])
|
14
|
+
end
|
15
|
+
|
16
|
+
def destroy
|
17
|
+
User.find(params[:id]).destroy
|
18
|
+
flash[:notice] = "User destroyed."
|
19
|
+
redirect_to users_path
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def admin_user
|
25
|
+
redirect_to(root_path) unless current_user.admin?
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Description:
|
2
|
+
Begins Test-First Teaching exercises adapted from Chapter 11 of the RailsTutorial by Michael Hartl.
|
3
|
+
|
4
|
+
It is assumed that this generator is run after the exercises for Chapter 10 and all prior ones have been completed, and the solutions are implemented.
|
5
|
+
|
6
|
+
Successive chapters are expected to be run sequentially. Each chapter's generators comes with a delta
|
7
|
+
to the next chapter, in two phase, the "begin" one will create tests, the "finish" one includes the solution files.
|
8
|
+
If all tests pass, the "finish" phase is optional.
|
9
|
+
|
10
|
+
Example:
|
11
|
+
rails generate chapter11:begin
|
12
|
+
|
13
|
+
This copies new tests into the project, which are failing.
|
14
|
+
The student's task is to write code to make the test pass. The material covered by the tests is consistent
|
15
|
+
with Chapter 11 of the RailsTutorial, however adapted for Devise as authentication solution.
|
16
|
+
|
17
|
+
When you're done, and all tests pass, or you just want to skip ahead, run:
|
18
|
+
|
19
|
+
rails generate chapter10:solutions
|
20
|
+
|
21
|
+
This will copy solutions files into the application tree. If you already have a solution file,
|
22
|
+
you'll be prompted whether you want to overwrite your file, see the difference, or keep your file.
|
23
|
+
|
24
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Chapter11
|
2
|
+
module Generators
|
3
|
+
class BeginGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path("../templates", __FILE__)
|
5
|
+
|
6
|
+
def generate_instructions
|
7
|
+
require 'rdiscount'
|
8
|
+
|
9
|
+
instr_md = File.expand_path('../instructions.md',self.class.source_root)
|
10
|
+
return unless File.exists?(instr_md)
|
11
|
+
dest = File.join(Rails.root,'doc','chapter10.html')
|
12
|
+
copy_file(instr_md, dest, :force => true) do |content|
|
13
|
+
RDiscount.new(content).to_html
|
14
|
+
end
|
15
|
+
say_status('Note',"Now open file://#{dest} in your web browser for instructions", :cyan)
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Description:
|
2
|
+
Wraps up Test-First Teaching exercises adapted from Chapter 10 of the RailsTutorial by Michael Hartl.
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate chapter11:solutions
|
6
|
+
|
7
|
+
This copies the solutions and other necessary files (e.g. images, assets, helpers, etc.) into the project
|
8
|
+
to conclude Chapter 11. This should make all tests pass and bring you in sync to the application at
|
9
|
+
the end of Chapter 11.
|
10
|
+
|
11
|
+
If you already have a solution file, you'll be prompted whether you want to overwrite your file,
|
12
|
+
see the difference, or keep your file.
|
13
|
+
|
14
|
+
It's a good idea to commit your changes to git, prior to running finish, in case you accidentally choose to
|
15
|
+
overwrite files you wanted to keep. Assuming your project is already git-controlled, you can commit changes with:
|
16
|
+
|
17
|
+
git add .
|
18
|
+
git commit -m "comment here explaining WHY you made the changes"
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: tft_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.6.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Wolfram Arnold
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-21 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rdiscount
|
@@ -104,6 +104,21 @@ files:
|
|
104
104
|
- lib/generators/chapter07/solutions/templates/app/views/layouts/_header.html.erb
|
105
105
|
- lib/generators/chapter07/solutions/templates/app/views/layouts/_footer.html.erb
|
106
106
|
- lib/generators/chapter07/solutions/templates/app/views/users/show.html.erb
|
107
|
+
- lib/generators/chapter10/begin/USAGE
|
108
|
+
- lib/generators/chapter10/begin/begin_generator.rb
|
109
|
+
- lib/generators/chapter10/begin/instructions.md
|
110
|
+
- lib/generators/chapter10/begin/snippets/custom.css
|
111
|
+
- lib/generators/chapter10/begin/snippets/factories.rb
|
112
|
+
- lib/generators/chapter10/begin/templates/lib/tasks/same_data.rake
|
113
|
+
- lib/generators/chapter10/begin/templates/spec/controllers/users_controller_10_spec.rb
|
114
|
+
- lib/generators/chapter10/begin/templates/spec/models/user_10_spec.rb
|
115
|
+
- lib/generators/chapter10/begin/templates/app/views/layouts/application.html.erb
|
116
|
+
- lib/generators/chapter10/solutions/USAGE
|
117
|
+
- lib/generators/chapter10/solutions/solutions_generator.rb
|
118
|
+
- lib/generators/chapter10/solutions/snippets/migration_add_admin_to_users.rb
|
119
|
+
- lib/generators/chapter10/solutions/templates/app/controllers/users_controller.rb
|
120
|
+
- lib/generators/chapter10/solutions/templates/app/views/users/_user.html.erb
|
121
|
+
- lib/generators/chapter10/solutions/templates/app/views/users/index.html.erb
|
107
122
|
- lib/generators/chapter08_09/begin/USAGE
|
108
123
|
- lib/generators/chapter08_09/begin/begin_generator.rb
|
109
124
|
- lib/generators/chapter08_09/begin/instructions.md
|
@@ -123,6 +138,11 @@ files:
|
|
123
138
|
- lib/generators/chapter08_09/solutions/templates/app/views/devise/passwords/new.html.erb
|
124
139
|
- lib/generators/chapter08_09/solutions/templates/app/views/devise/passwords/edit.html.erb
|
125
140
|
- lib/generators/chapter08_09/solutions/templates/app/views/devise/sessions/new.html.erb
|
141
|
+
- lib/generators/chapter11/begin/USAGE
|
142
|
+
- lib/generators/chapter11/begin/begin_generator.rb
|
143
|
+
- lib/generators/chapter11/begin/instructions.md
|
144
|
+
- lib/generators/chapter11/solutions/USAGE
|
145
|
+
- lib/generators/chapter11/solutions/solutions_generator.rb
|
126
146
|
- LICENSE
|
127
147
|
- Rakefile
|
128
148
|
- Gemfile
|