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.
Files changed (161) hide show
  1. data/.document +5 -0
  2. data/Gemfile +13 -0
  3. data/Gemfile.lock +20 -0
  4. data/LICENSE.txt +20 -0
  5. data/README.rdoc +63 -0
  6. data/Rakefile +53 -0
  7. data/VERSION +1 -0
  8. data/lib/rails-services.rb +92 -0
  9. data/rails-services.gemspec +278 -0
  10. data/test/helper.rb +18 -0
  11. data/test/rails_app_v2/README +243 -0
  12. data/test/rails_app_v2/Rakefile +10 -0
  13. data/test/rails_app_v2/app/controllers/application_controller.rb +10 -0
  14. data/test/rails_app_v2/app/controllers/authors_controller.rb +83 -0
  15. data/test/rails_app_v2/app/controllers/posts_controller.rb +83 -0
  16. data/test/rails_app_v2/app/helpers/application_helper.rb +3 -0
  17. data/test/rails_app_v2/app/helpers/authors_helper.rb +2 -0
  18. data/test/rails_app_v2/app/helpers/posts_helper.rb +2 -0
  19. data/test/rails_app_v2/app/models/author.rb +3 -0
  20. data/test/rails_app_v2/app/models/post.rb +3 -0
  21. data/test/rails_app_v2/app/views/authors/edit.html.erb +16 -0
  22. data/test/rails_app_v2/app/views/authors/index.html.erb +20 -0
  23. data/test/rails_app_v2/app/views/authors/new.html.erb +15 -0
  24. data/test/rails_app_v2/app/views/authors/show.html.erb +8 -0
  25. data/test/rails_app_v2/app/views/layouts/authors.html.erb +17 -0
  26. data/test/rails_app_v2/app/views/layouts/posts.html.erb +17 -0
  27. data/test/rails_app_v2/app/views/posts/edit.html.erb +20 -0
  28. data/test/rails_app_v2/app/views/posts/index.html.erb +22 -0
  29. data/test/rails_app_v2/app/views/posts/new.html.erb +19 -0
  30. data/test/rails_app_v2/app/views/posts/show.html.erb +13 -0
  31. data/test/rails_app_v2/config/boot.rb +110 -0
  32. data/test/rails_app_v2/config/database.yml +22 -0
  33. data/test/rails_app_v2/config/environment.rb +52 -0
  34. data/test/rails_app_v2/config/environments/development.rb +17 -0
  35. data/test/rails_app_v2/config/environments/production.rb +28 -0
  36. data/test/rails_app_v2/config/environments/test.rb +28 -0
  37. data/test/rails_app_v2/config/initializers/backtrace_silencers.rb +7 -0
  38. data/test/rails_app_v2/config/initializers/cookie_verification_secret.rb +7 -0
  39. data/test/rails_app_v2/config/initializers/inflections.rb +10 -0
  40. data/test/rails_app_v2/config/initializers/jdbc.rb +7 -0
  41. data/test/rails_app_v2/config/initializers/mime_types.rb +5 -0
  42. data/test/rails_app_v2/config/initializers/new_rails_defaults.rb +21 -0
  43. data/test/rails_app_v2/config/initializers/session_store.rb +15 -0
  44. data/test/rails_app_v2/config/locales/en.yml +5 -0
  45. data/test/rails_app_v2/config/routes.rb +52 -0
  46. data/test/rails_app_v2/db/development.sqlite3 +0 -0
  47. data/test/rails_app_v2/db/migrate/20110128215001_create_authors.rb +13 -0
  48. data/test/rails_app_v2/db/migrate/20110128215003_create_posts.rb +14 -0
  49. data/test/rails_app_v2/db/schema.rb +27 -0
  50. data/test/rails_app_v2/db/seeds.rb +7 -0
  51. data/test/rails_app_v2/lib/tasks/jdbc.rake +8 -0
  52. data/test/rails_app_v2/log/development.log +64 -0
  53. data/test/rails_app_v2/log/production.log +0 -0
  54. data/test/rails_app_v2/log/server.log +0 -0
  55. data/test/rails_app_v2/log/test.log +0 -0
  56. data/test/rails_app_v2/public/404.html +30 -0
  57. data/test/rails_app_v2/public/422.html +30 -0
  58. data/test/rails_app_v2/public/500.html +30 -0
  59. data/test/rails_app_v2/public/favicon.ico +0 -0
  60. data/test/rails_app_v2/public/images/rails.png +0 -0
  61. data/test/rails_app_v2/public/index.html +275 -0
  62. data/test/rails_app_v2/public/javascripts/application.js +2 -0
  63. data/test/rails_app_v2/public/javascripts/controls.js +963 -0
  64. data/test/rails_app_v2/public/javascripts/dragdrop.js +973 -0
  65. data/test/rails_app_v2/public/javascripts/effects.js +1128 -0
  66. data/test/rails_app_v2/public/javascripts/prototype.js +4320 -0
  67. data/test/rails_app_v2/public/robots.txt +5 -0
  68. data/test/rails_app_v2/public/stylesheets/scaffold.css +54 -0
  69. data/test/rails_app_v2/script/about +4 -0
  70. data/test/rails_app_v2/script/console +3 -0
  71. data/test/rails_app_v2/script/dbconsole +3 -0
  72. data/test/rails_app_v2/script/destroy +3 -0
  73. data/test/rails_app_v2/script/generate +3 -0
  74. data/test/rails_app_v2/script/performance/benchmarker +3 -0
  75. data/test/rails_app_v2/script/performance/profiler +3 -0
  76. data/test/rails_app_v2/script/plugin +3 -0
  77. data/test/rails_app_v2/script/runner +3 -0
  78. data/test/rails_app_v2/script/server +3 -0
  79. data/test/rails_app_v2/test/fixtures/authors.yml +7 -0
  80. data/test/rails_app_v2/test/fixtures/posts.yml +9 -0
  81. data/test/rails_app_v2/test/functional/authors_controller_test.rb +45 -0
  82. data/test/rails_app_v2/test/functional/posts_controller_test.rb +45 -0
  83. data/test/rails_app_v2/test/performance/browsing_test.rb +9 -0
  84. data/test/rails_app_v2/test/test_helper.rb +38 -0
  85. data/test/rails_app_v2/test/unit/author_test.rb +8 -0
  86. data/test/rails_app_v2/test/unit/helpers/authors_helper_test.rb +4 -0
  87. data/test/rails_app_v2/test/unit/helpers/posts_helper_test.rb +4 -0
  88. data/test/rails_app_v2/test/unit/post_test.rb +8 -0
  89. data/test/rails_app_v3/.gitignore +4 -0
  90. data/test/rails_app_v3/Gemfile +40 -0
  91. data/test/rails_app_v3/Gemfile.lock +77 -0
  92. data/test/rails_app_v3/README +256 -0
  93. data/test/rails_app_v3/Rakefile +7 -0
  94. data/test/rails_app_v3/app/controllers/application_controller.rb +3 -0
  95. data/test/rails_app_v3/app/controllers/authors_controller.rb +83 -0
  96. data/test/rails_app_v3/app/controllers/posts_controller.rb +83 -0
  97. data/test/rails_app_v3/app/helpers/application_helper.rb +2 -0
  98. data/test/rails_app_v3/app/helpers/authors_helper.rb +2 -0
  99. data/test/rails_app_v3/app/helpers/posts_helper.rb +2 -0
  100. data/test/rails_app_v3/app/models/author.rb +3 -0
  101. data/test/rails_app_v3/app/models/post.rb +3 -0
  102. data/test/rails_app_v3/app/views/authors/_form.html.erb +21 -0
  103. data/test/rails_app_v3/app/views/authors/edit.html.erb +6 -0
  104. data/test/rails_app_v3/app/views/authors/index.html.erb +23 -0
  105. data/test/rails_app_v3/app/views/authors/new.html.erb +5 -0
  106. data/test/rails_app_v3/app/views/authors/show.html.erb +10 -0
  107. data/test/rails_app_v3/app/views/layouts/application.html.erb +14 -0
  108. data/test/rails_app_v3/app/views/posts/_form.html.erb +25 -0
  109. data/test/rails_app_v3/app/views/posts/edit.html.erb +6 -0
  110. data/test/rails_app_v3/app/views/posts/index.html.erb +25 -0
  111. data/test/rails_app_v3/app/views/posts/new.html.erb +5 -0
  112. data/test/rails_app_v3/app/views/posts/show.html.erb +15 -0
  113. data/test/rails_app_v3/config.ru +4 -0
  114. data/test/rails_app_v3/config/application.rb +42 -0
  115. data/test/rails_app_v3/config/boot.rb +13 -0
  116. data/test/rails_app_v3/config/database.yml +22 -0
  117. data/test/rails_app_v3/config/environment.rb +5 -0
  118. data/test/rails_app_v3/config/environments/development.rb +26 -0
  119. data/test/rails_app_v3/config/environments/production.rb +49 -0
  120. data/test/rails_app_v3/config/environments/test.rb +35 -0
  121. data/test/rails_app_v3/config/initializers/backtrace_silencers.rb +7 -0
  122. data/test/rails_app_v3/config/initializers/inflections.rb +10 -0
  123. data/test/rails_app_v3/config/initializers/mime_types.rb +5 -0
  124. data/test/rails_app_v3/config/initializers/secret_token.rb +7 -0
  125. data/test/rails_app_v3/config/initializers/session_store.rb +8 -0
  126. data/test/rails_app_v3/config/locales/en.yml +5 -0
  127. data/test/rails_app_v3/config/routes.rb +67 -0
  128. data/test/rails_app_v3/db/migrate/20110128215656_create_posts.rb +14 -0
  129. data/test/rails_app_v3/db/migrate/20110128215713_create_authors.rb +13 -0
  130. data/test/rails_app_v3/db/schema.rb +28 -0
  131. data/test/rails_app_v3/db/seeds.rb +7 -0
  132. data/test/rails_app_v3/lib/tasks/.gitkeep +0 -0
  133. data/test/rails_app_v3/public/404.html +26 -0
  134. data/test/rails_app_v3/public/422.html +26 -0
  135. data/test/rails_app_v3/public/500.html +26 -0
  136. data/test/rails_app_v3/public/favicon.ico +0 -0
  137. data/test/rails_app_v3/public/images/rails.png +0 -0
  138. data/test/rails_app_v3/public/index.html +239 -0
  139. data/test/rails_app_v3/public/javascripts/application.js +2 -0
  140. data/test/rails_app_v3/public/javascripts/controls.js +965 -0
  141. data/test/rails_app_v3/public/javascripts/dragdrop.js +974 -0
  142. data/test/rails_app_v3/public/javascripts/effects.js +1123 -0
  143. data/test/rails_app_v3/public/javascripts/prototype.js +6001 -0
  144. data/test/rails_app_v3/public/javascripts/rails.js +175 -0
  145. data/test/rails_app_v3/public/robots.txt +5 -0
  146. data/test/rails_app_v3/public/stylesheets/.gitkeep +0 -0
  147. data/test/rails_app_v3/public/stylesheets/scaffold.css +56 -0
  148. data/test/rails_app_v3/script/rails +6 -0
  149. data/test/rails_app_v3/test/fixtures/authors.yml +7 -0
  150. data/test/rails_app_v3/test/fixtures/posts.yml +9 -0
  151. data/test/rails_app_v3/test/functional/authors_controller_test.rb +49 -0
  152. data/test/rails_app_v3/test/functional/posts_controller_test.rb +49 -0
  153. data/test/rails_app_v3/test/performance/browsing_test.rb +9 -0
  154. data/test/rails_app_v3/test/test_helper.rb +13 -0
  155. data/test/rails_app_v3/test/unit/author_test.rb +8 -0
  156. data/test/rails_app_v3/test/unit/helpers/authors_helper_test.rb +4 -0
  157. data/test/rails_app_v3/test/unit/helpers/posts_helper_test.rb +4 -0
  158. data/test/rails_app_v3/test/unit/post_test.rb +8 -0
  159. data/test/rails_app_v3/vendor/plugins/.gitkeep +0 -0
  160. data/test/test_rails-services.rb +7 -0
  161. 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,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -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,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module AuthorsHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module PostsHelper
2
+ end
@@ -0,0 +1,3 @@
1
+ class Author < ActiveRecord::Base
2
+ has_many :posts
3
+ end
@@ -0,0 +1,3 @@
1
+ class Post < ActiveRecord::Base
2
+ belongs_to :author
3
+ 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,6 @@
1
+ <h1>Editing author</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @author %> |
6
+ <%= link_to 'Back', authors_path %>
@@ -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,5 @@
1
+ <h1>New author</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', authors_path %>
@@ -0,0 +1,10 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <b>Name:</b>
5
+ <%= @author.name %>
6
+ </p>
7
+
8
+
9
+ <%= link_to 'Edit', edit_author_path(@author) %> |
10
+ <%= link_to 'Back', authors_path %>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>RailsAppV3</title>
5
+ <%= stylesheet_link_tag :all %>
6
+ <%= javascript_include_tag :defaults %>
7
+ <%= csrf_meta_tag %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -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,6 @@
1
+ <h1>Editing post</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @post %> |
6
+ <%= link_to 'Back', posts_path %>
@@ -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,5 @@
1
+ <h1>New post</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', posts_path %>
@@ -0,0 +1,15 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <b>Author:</b>
5
+ <%= @post.author_id %>
6
+ </p>
7
+
8
+ <p>
9
+ <b>Text:</b>
10
+ <%= @post.text %>
11
+ </p>
12
+
13
+
14
+ <%= link_to 'Edit', edit_post_path(@post) %> |
15
+ <%= link_to 'Back', posts_path %>
@@ -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 RailsAppV3::Application
@@ -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