rails-services 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +20 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +63 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/lib/rails-services.rb +92 -0
- data/rails-services.gemspec +278 -0
- data/test/helper.rb +18 -0
- data/test/rails_app_v2/README +243 -0
- data/test/rails_app_v2/Rakefile +10 -0
- data/test/rails_app_v2/app/controllers/application_controller.rb +10 -0
- data/test/rails_app_v2/app/controllers/authors_controller.rb +83 -0
- data/test/rails_app_v2/app/controllers/posts_controller.rb +83 -0
- data/test/rails_app_v2/app/helpers/application_helper.rb +3 -0
- data/test/rails_app_v2/app/helpers/authors_helper.rb +2 -0
- data/test/rails_app_v2/app/helpers/posts_helper.rb +2 -0
- data/test/rails_app_v2/app/models/author.rb +3 -0
- data/test/rails_app_v2/app/models/post.rb +3 -0
- data/test/rails_app_v2/app/views/authors/edit.html.erb +16 -0
- data/test/rails_app_v2/app/views/authors/index.html.erb +20 -0
- data/test/rails_app_v2/app/views/authors/new.html.erb +15 -0
- data/test/rails_app_v2/app/views/authors/show.html.erb +8 -0
- data/test/rails_app_v2/app/views/layouts/authors.html.erb +17 -0
- data/test/rails_app_v2/app/views/layouts/posts.html.erb +17 -0
- data/test/rails_app_v2/app/views/posts/edit.html.erb +20 -0
- data/test/rails_app_v2/app/views/posts/index.html.erb +22 -0
- data/test/rails_app_v2/app/views/posts/new.html.erb +19 -0
- data/test/rails_app_v2/app/views/posts/show.html.erb +13 -0
- data/test/rails_app_v2/config/boot.rb +110 -0
- data/test/rails_app_v2/config/database.yml +22 -0
- data/test/rails_app_v2/config/environment.rb +52 -0
- data/test/rails_app_v2/config/environments/development.rb +17 -0
- data/test/rails_app_v2/config/environments/production.rb +28 -0
- data/test/rails_app_v2/config/environments/test.rb +28 -0
- data/test/rails_app_v2/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails_app_v2/config/initializers/cookie_verification_secret.rb +7 -0
- data/test/rails_app_v2/config/initializers/inflections.rb +10 -0
- data/test/rails_app_v2/config/initializers/jdbc.rb +7 -0
- data/test/rails_app_v2/config/initializers/mime_types.rb +5 -0
- data/test/rails_app_v2/config/initializers/new_rails_defaults.rb +21 -0
- data/test/rails_app_v2/config/initializers/session_store.rb +15 -0
- data/test/rails_app_v2/config/locales/en.yml +5 -0
- data/test/rails_app_v2/config/routes.rb +52 -0
- data/test/rails_app_v2/db/development.sqlite3 +0 -0
- data/test/rails_app_v2/db/migrate/20110128215001_create_authors.rb +13 -0
- data/test/rails_app_v2/db/migrate/20110128215003_create_posts.rb +14 -0
- data/test/rails_app_v2/db/schema.rb +27 -0
- data/test/rails_app_v2/db/seeds.rb +7 -0
- data/test/rails_app_v2/lib/tasks/jdbc.rake +8 -0
- data/test/rails_app_v2/log/development.log +64 -0
- data/test/rails_app_v2/log/production.log +0 -0
- data/test/rails_app_v2/log/server.log +0 -0
- data/test/rails_app_v2/log/test.log +0 -0
- data/test/rails_app_v2/public/404.html +30 -0
- data/test/rails_app_v2/public/422.html +30 -0
- data/test/rails_app_v2/public/500.html +30 -0
- data/test/rails_app_v2/public/favicon.ico +0 -0
- data/test/rails_app_v2/public/images/rails.png +0 -0
- data/test/rails_app_v2/public/index.html +275 -0
- data/test/rails_app_v2/public/javascripts/application.js +2 -0
- data/test/rails_app_v2/public/javascripts/controls.js +963 -0
- data/test/rails_app_v2/public/javascripts/dragdrop.js +973 -0
- data/test/rails_app_v2/public/javascripts/effects.js +1128 -0
- data/test/rails_app_v2/public/javascripts/prototype.js +4320 -0
- data/test/rails_app_v2/public/robots.txt +5 -0
- data/test/rails_app_v2/public/stylesheets/scaffold.css +54 -0
- data/test/rails_app_v2/script/about +4 -0
- data/test/rails_app_v2/script/console +3 -0
- data/test/rails_app_v2/script/dbconsole +3 -0
- data/test/rails_app_v2/script/destroy +3 -0
- data/test/rails_app_v2/script/generate +3 -0
- data/test/rails_app_v2/script/performance/benchmarker +3 -0
- data/test/rails_app_v2/script/performance/profiler +3 -0
- data/test/rails_app_v2/script/plugin +3 -0
- data/test/rails_app_v2/script/runner +3 -0
- data/test/rails_app_v2/script/server +3 -0
- data/test/rails_app_v2/test/fixtures/authors.yml +7 -0
- data/test/rails_app_v2/test/fixtures/posts.yml +9 -0
- data/test/rails_app_v2/test/functional/authors_controller_test.rb +45 -0
- data/test/rails_app_v2/test/functional/posts_controller_test.rb +45 -0
- data/test/rails_app_v2/test/performance/browsing_test.rb +9 -0
- data/test/rails_app_v2/test/test_helper.rb +38 -0
- data/test/rails_app_v2/test/unit/author_test.rb +8 -0
- data/test/rails_app_v2/test/unit/helpers/authors_helper_test.rb +4 -0
- data/test/rails_app_v2/test/unit/helpers/posts_helper_test.rb +4 -0
- data/test/rails_app_v2/test/unit/post_test.rb +8 -0
- data/test/rails_app_v3/.gitignore +4 -0
- data/test/rails_app_v3/Gemfile +40 -0
- data/test/rails_app_v3/Gemfile.lock +77 -0
- data/test/rails_app_v3/README +256 -0
- data/test/rails_app_v3/Rakefile +7 -0
- data/test/rails_app_v3/app/controllers/application_controller.rb +3 -0
- data/test/rails_app_v3/app/controllers/authors_controller.rb +83 -0
- data/test/rails_app_v3/app/controllers/posts_controller.rb +83 -0
- data/test/rails_app_v3/app/helpers/application_helper.rb +2 -0
- data/test/rails_app_v3/app/helpers/authors_helper.rb +2 -0
- data/test/rails_app_v3/app/helpers/posts_helper.rb +2 -0
- data/test/rails_app_v3/app/models/author.rb +3 -0
- data/test/rails_app_v3/app/models/post.rb +3 -0
- data/test/rails_app_v3/app/views/authors/_form.html.erb +21 -0
- data/test/rails_app_v3/app/views/authors/edit.html.erb +6 -0
- data/test/rails_app_v3/app/views/authors/index.html.erb +23 -0
- data/test/rails_app_v3/app/views/authors/new.html.erb +5 -0
- data/test/rails_app_v3/app/views/authors/show.html.erb +10 -0
- data/test/rails_app_v3/app/views/layouts/application.html.erb +14 -0
- data/test/rails_app_v3/app/views/posts/_form.html.erb +25 -0
- data/test/rails_app_v3/app/views/posts/edit.html.erb +6 -0
- data/test/rails_app_v3/app/views/posts/index.html.erb +25 -0
- data/test/rails_app_v3/app/views/posts/new.html.erb +5 -0
- data/test/rails_app_v3/app/views/posts/show.html.erb +15 -0
- data/test/rails_app_v3/config.ru +4 -0
- data/test/rails_app_v3/config/application.rb +42 -0
- data/test/rails_app_v3/config/boot.rb +13 -0
- data/test/rails_app_v3/config/database.yml +22 -0
- data/test/rails_app_v3/config/environment.rb +5 -0
- data/test/rails_app_v3/config/environments/development.rb +26 -0
- data/test/rails_app_v3/config/environments/production.rb +49 -0
- data/test/rails_app_v3/config/environments/test.rb +35 -0
- data/test/rails_app_v3/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails_app_v3/config/initializers/inflections.rb +10 -0
- data/test/rails_app_v3/config/initializers/mime_types.rb +5 -0
- data/test/rails_app_v3/config/initializers/secret_token.rb +7 -0
- data/test/rails_app_v3/config/initializers/session_store.rb +8 -0
- data/test/rails_app_v3/config/locales/en.yml +5 -0
- data/test/rails_app_v3/config/routes.rb +67 -0
- data/test/rails_app_v3/db/migrate/20110128215656_create_posts.rb +14 -0
- data/test/rails_app_v3/db/migrate/20110128215713_create_authors.rb +13 -0
- data/test/rails_app_v3/db/schema.rb +28 -0
- data/test/rails_app_v3/db/seeds.rb +7 -0
- data/test/rails_app_v3/lib/tasks/.gitkeep +0 -0
- data/test/rails_app_v3/public/404.html +26 -0
- data/test/rails_app_v3/public/422.html +26 -0
- data/test/rails_app_v3/public/500.html +26 -0
- data/test/rails_app_v3/public/favicon.ico +0 -0
- data/test/rails_app_v3/public/images/rails.png +0 -0
- data/test/rails_app_v3/public/index.html +239 -0
- data/test/rails_app_v3/public/javascripts/application.js +2 -0
- data/test/rails_app_v3/public/javascripts/controls.js +965 -0
- data/test/rails_app_v3/public/javascripts/dragdrop.js +974 -0
- data/test/rails_app_v3/public/javascripts/effects.js +1123 -0
- data/test/rails_app_v3/public/javascripts/prototype.js +6001 -0
- data/test/rails_app_v3/public/javascripts/rails.js +175 -0
- data/test/rails_app_v3/public/robots.txt +5 -0
- data/test/rails_app_v3/public/stylesheets/.gitkeep +0 -0
- data/test/rails_app_v3/public/stylesheets/scaffold.css +56 -0
- data/test/rails_app_v3/script/rails +6 -0
- data/test/rails_app_v3/test/fixtures/authors.yml +7 -0
- data/test/rails_app_v3/test/fixtures/posts.yml +9 -0
- data/test/rails_app_v3/test/functional/authors_controller_test.rb +49 -0
- data/test/rails_app_v3/test/functional/posts_controller_test.rb +49 -0
- data/test/rails_app_v3/test/performance/browsing_test.rb +9 -0
- data/test/rails_app_v3/test/test_helper.rb +13 -0
- data/test/rails_app_v3/test/unit/author_test.rb +8 -0
- data/test/rails_app_v3/test/unit/helpers/authors_helper_test.rb +4 -0
- data/test/rails_app_v3/test/unit/helpers/posts_helper_test.rb +4 -0
- data/test/rails_app_v3/test/unit/post_test.rb +8 -0
- data/test/rails_app_v3/vendor/plugins/.gitkeep +0 -0
- data/test/test_rails-services.rb +7 -0
- metadata +346 -0
@@ -0,0 +1,7 @@
|
|
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
|
+
require 'rake'
|
6
|
+
|
7
|
+
RailsAppV3::Application.load_tasks
|
@@ -0,0 +1,83 @@
|
|
1
|
+
class AuthorsController < ApplicationController
|
2
|
+
# GET /authors
|
3
|
+
# GET /authors.xml
|
4
|
+
def index
|
5
|
+
@authors = Author.all
|
6
|
+
|
7
|
+
respond_to do |format|
|
8
|
+
format.html # index.html.erb
|
9
|
+
format.xml { render :xml => @authors }
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
# GET /authors/1
|
14
|
+
# GET /authors/1.xml
|
15
|
+
def show
|
16
|
+
@author = Author.find(params[:id])
|
17
|
+
|
18
|
+
respond_to do |format|
|
19
|
+
format.html # show.html.erb
|
20
|
+
format.xml { render :xml => @author }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# GET /authors/new
|
25
|
+
# GET /authors/new.xml
|
26
|
+
def new
|
27
|
+
@author = Author.new
|
28
|
+
|
29
|
+
respond_to do |format|
|
30
|
+
format.html # new.html.erb
|
31
|
+
format.xml { render :xml => @author }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# GET /authors/1/edit
|
36
|
+
def edit
|
37
|
+
@author = Author.find(params[:id])
|
38
|
+
end
|
39
|
+
|
40
|
+
# POST /authors
|
41
|
+
# POST /authors.xml
|
42
|
+
def create
|
43
|
+
@author = Author.new(params[:author])
|
44
|
+
|
45
|
+
respond_to do |format|
|
46
|
+
if @author.save
|
47
|
+
format.html { redirect_to(@author, :notice => 'Author was successfully created.') }
|
48
|
+
format.xml { render :xml => @author, :status => :created, :location => @author }
|
49
|
+
else
|
50
|
+
format.html { render :action => "new" }
|
51
|
+
format.xml { render :xml => @author.errors, :status => :unprocessable_entity }
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# PUT /authors/1
|
57
|
+
# PUT /authors/1.xml
|
58
|
+
def update
|
59
|
+
@author = Author.find(params[:id])
|
60
|
+
|
61
|
+
respond_to do |format|
|
62
|
+
if @author.update_attributes(params[:author])
|
63
|
+
format.html { redirect_to(@author, :notice => 'Author was successfully updated.') }
|
64
|
+
format.xml { head :ok }
|
65
|
+
else
|
66
|
+
format.html { render :action => "edit" }
|
67
|
+
format.xml { render :xml => @author.errors, :status => :unprocessable_entity }
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# DELETE /authors/1
|
73
|
+
# DELETE /authors/1.xml
|
74
|
+
def destroy
|
75
|
+
@author = Author.find(params[:id])
|
76
|
+
@author.destroy
|
77
|
+
|
78
|
+
respond_to do |format|
|
79
|
+
format.html { redirect_to(authors_url) }
|
80
|
+
format.xml { head :ok }
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
class PostsController < ApplicationController
|
2
|
+
# GET /posts
|
3
|
+
# GET /posts.xml
|
4
|
+
def index
|
5
|
+
@posts = Post.all
|
6
|
+
|
7
|
+
respond_to do |format|
|
8
|
+
format.html # index.html.erb
|
9
|
+
format.xml { render :xml => @posts }
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
# GET /posts/1
|
14
|
+
# GET /posts/1.xml
|
15
|
+
def show
|
16
|
+
@post = Post.find(params[:id])
|
17
|
+
|
18
|
+
respond_to do |format|
|
19
|
+
format.html # show.html.erb
|
20
|
+
format.xml { render :xml => @post }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# GET /posts/new
|
25
|
+
# GET /posts/new.xml
|
26
|
+
def new
|
27
|
+
@post = Post.new
|
28
|
+
|
29
|
+
respond_to do |format|
|
30
|
+
format.html # new.html.erb
|
31
|
+
format.xml { render :xml => @post }
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# GET /posts/1/edit
|
36
|
+
def edit
|
37
|
+
@post = Post.find(params[:id])
|
38
|
+
end
|
39
|
+
|
40
|
+
# POST /posts
|
41
|
+
# POST /posts.xml
|
42
|
+
def create
|
43
|
+
@post = Post.new(params[:post])
|
44
|
+
|
45
|
+
respond_to do |format|
|
46
|
+
if @post.save
|
47
|
+
format.html { redirect_to(@post, :notice => 'Post was successfully created.') }
|
48
|
+
format.xml { render :xml => @post, :status => :created, :location => @post }
|
49
|
+
else
|
50
|
+
format.html { render :action => "new" }
|
51
|
+
format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# PUT /posts/1
|
57
|
+
# PUT /posts/1.xml
|
58
|
+
def update
|
59
|
+
@post = Post.find(params[:id])
|
60
|
+
|
61
|
+
respond_to do |format|
|
62
|
+
if @post.update_attributes(params[:post])
|
63
|
+
format.html { redirect_to(@post, :notice => 'Post was successfully updated.') }
|
64
|
+
format.xml { head :ok }
|
65
|
+
else
|
66
|
+
format.html { render :action => "edit" }
|
67
|
+
format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# DELETE /posts/1
|
73
|
+
# DELETE /posts/1.xml
|
74
|
+
def destroy
|
75
|
+
@post = Post.find(params[:id])
|
76
|
+
@post.destroy
|
77
|
+
|
78
|
+
respond_to do |format|
|
79
|
+
format.html { redirect_to(posts_url) }
|
80
|
+
format.xml { head :ok }
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<%= form_for(@author) do |f| %>
|
2
|
+
<% if @author.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@author.errors.count, "error") %> prohibited this author from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @author.errors.full_messages.each do |msg| %>
|
8
|
+
<li><%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :name %><br />
|
16
|
+
<%= f.text_field :name %>
|
17
|
+
</div>
|
18
|
+
<div class="actions">
|
19
|
+
<%= f.submit %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<h1>Listing authors</h1>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<tr>
|
5
|
+
<th>Name</th>
|
6
|
+
<th></th>
|
7
|
+
<th></th>
|
8
|
+
<th></th>
|
9
|
+
</tr>
|
10
|
+
|
11
|
+
<% @authors.each do |author| %>
|
12
|
+
<tr>
|
13
|
+
<td><%= author.name %></td>
|
14
|
+
<td><%= link_to 'Show', author %></td>
|
15
|
+
<td><%= link_to 'Edit', edit_author_path(author) %></td>
|
16
|
+
<td><%= link_to 'Destroy', author, :confirm => 'Are you sure?', :method => :delete %></td>
|
17
|
+
</tr>
|
18
|
+
<% end %>
|
19
|
+
</table>
|
20
|
+
|
21
|
+
<br />
|
22
|
+
|
23
|
+
<%= link_to 'New Author', new_author_path %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%= form_for(@post) do |f| %>
|
2
|
+
<% if @post.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% @post.errors.full_messages.each do |msg| %>
|
8
|
+
<li><%= msg %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :author_id %><br />
|
16
|
+
<%= f.text_field :author_id %>
|
17
|
+
</div>
|
18
|
+
<div class="field">
|
19
|
+
<%= f.label :text %><br />
|
20
|
+
<%= f.text_field :text %>
|
21
|
+
</div>
|
22
|
+
<div class="actions">
|
23
|
+
<%= f.submit %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<h1>Listing posts</h1>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<tr>
|
5
|
+
<th>Author</th>
|
6
|
+
<th>Text</th>
|
7
|
+
<th></th>
|
8
|
+
<th></th>
|
9
|
+
<th></th>
|
10
|
+
</tr>
|
11
|
+
|
12
|
+
<% @posts.each do |post| %>
|
13
|
+
<tr>
|
14
|
+
<td><%= post.author_id %></td>
|
15
|
+
<td><%= post.text %></td>
|
16
|
+
<td><%= link_to 'Show', post %></td>
|
17
|
+
<td><%= link_to 'Edit', edit_post_path(post) %></td>
|
18
|
+
<td><%= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete %></td>
|
19
|
+
</tr>
|
20
|
+
<% end %>
|
21
|
+
</table>
|
22
|
+
|
23
|
+
<br />
|
24
|
+
|
25
|
+
<%= link_to 'New Post', new_post_path %>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# If you have a Gemfile, require the gems listed there, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
8
|
+
|
9
|
+
module RailsAppV3
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
16
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
17
|
+
|
18
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
19
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
20
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
21
|
+
|
22
|
+
# Activate observers that should always be running.
|
23
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
24
|
+
|
25
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
26
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
27
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
28
|
+
|
29
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
30
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
31
|
+
# config.i18n.default_locale = :de
|
32
|
+
|
33
|
+
# JavaScript files you want as :defaults (application.js is always included).
|
34
|
+
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
35
|
+
|
36
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
+
config.encoding = "utf-8"
|
38
|
+
|
39
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
+
config.filter_parameters += [:password]
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
# Set up gems listed in the Gemfile.
|
4
|
+
gemfile = File.expand_path('../../Gemfile', __FILE__)
|
5
|
+
begin
|
6
|
+
ENV['BUNDLE_GEMFILE'] = gemfile
|
7
|
+
require 'bundler'
|
8
|
+
Bundler.setup
|
9
|
+
rescue Bundler::GemNotFound => e
|
10
|
+
STDERR.puts e.message
|
11
|
+
STDERR.puts "Try running `bundle install`."
|
12
|
+
exit!
|
13
|
+
end if File.exist?(gemfile)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3-ruby (not necessary on OS X Leopard)
|
3
|
+
development:
|
4
|
+
adapter: sqlite3
|
5
|
+
database: db/development.sqlite3
|
6
|
+
pool: 5
|
7
|
+
timeout: 5000
|
8
|
+
|
9
|
+
# Warning: The database defined as "test" will be erased and
|
10
|
+
# re-generated from your development database when you run "rake".
|
11
|
+
# Do not set this db to the same as development or production.
|
12
|
+
test:
|
13
|
+
adapter: sqlite3
|
14
|
+
database: db/test.sqlite3
|
15
|
+
pool: 5
|
16
|
+
timeout: 5000
|
17
|
+
|
18
|
+
production:
|
19
|
+
adapter: sqlite3
|
20
|
+
database: db/production.sqlite3
|
21
|
+
pool: 5
|
22
|
+
timeout: 5000
|