control 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. data/Gemfile +3 -0
  2. data/README.md +87 -0
  3. data/Rakefile +18 -0
  4. data/control.gemspec +19 -0
  5. data/db/migrate/create_transitions.rb +18 -0
  6. data/db/schema.rb +14 -0
  7. data/lib/control/errors.rb +19 -0
  8. data/lib/control/state.rb +135 -0
  9. data/lib/control/transition.rb +53 -0
  10. data/lib/control/workflow.rb +52 -0
  11. data/lib/generators/control_install/USAGE +8 -0
  12. data/lib/generators/control_install/control_install_generator.rb +22 -0
  13. data/test/lib/control/state_test.rb +80 -0
  14. data/test/lib/control/transition_test.rb +84 -0
  15. data/test/lib/control/workflow_test.rb +107 -0
  16. data/test/rails_app/Gemfile +22 -0
  17. data/test/rails_app/Gemfile.lock +130 -0
  18. data/test/rails_app/README.rdoc +261 -0
  19. data/test/rails_app/Rakefile +7 -0
  20. data/test/rails_app/app/assets/images/rails.png +0 -0
  21. data/test/rails_app/app/assets/javascripts/application.js +15 -0
  22. data/test/rails_app/app/assets/javascripts/assemblies.js.coffee +3 -0
  23. data/test/rails_app/app/assets/javascripts/boxes.js.coffee +3 -0
  24. data/test/rails_app/app/assets/javascripts/products.js.coffee +3 -0
  25. data/test/rails_app/app/assets/javascripts/rejects.js.coffee +3 -0
  26. data/test/rails_app/app/assets/javascripts/validates.js.coffee +3 -0
  27. data/test/rails_app/app/assets/stylesheets/application.css +13 -0
  28. data/test/rails_app/app/assets/stylesheets/assemblies.css.scss +3 -0
  29. data/test/rails_app/app/assets/stylesheets/boxes.css.scss +3 -0
  30. data/test/rails_app/app/assets/stylesheets/products.css.scss +8 -0
  31. data/test/rails_app/app/assets/stylesheets/rejects.css.scss +3 -0
  32. data/test/rails_app/app/assets/stylesheets/scaffolds.css.scss +56 -0
  33. data/test/rails_app/app/assets/stylesheets/validates.css.scss +3 -0
  34. data/test/rails_app/app/controllers/application_controller.rb +3 -0
  35. data/test/rails_app/app/controllers/assemblies_controller.rb +88 -0
  36. data/test/rails_app/app/controllers/boxes_controller.rb +88 -0
  37. data/test/rails_app/app/controllers/products_controller.rb +83 -0
  38. data/test/rails_app/app/controllers/rejects_controller.rb +88 -0
  39. data/test/rails_app/app/controllers/validates_controller.rb +88 -0
  40. data/test/rails_app/app/helpers/application_helper.rb +2 -0
  41. data/test/rails_app/app/helpers/assemblies_helper.rb +2 -0
  42. data/test/rails_app/app/helpers/boxes_helper.rb +2 -0
  43. data/test/rails_app/app/helpers/products_helper.rb +14 -0
  44. data/test/rails_app/app/helpers/rejects_helper.rb +2 -0
  45. data/test/rails_app/app/helpers/validates_helper.rb +2 -0
  46. data/test/rails_app/app/models/assembly.rb +6 -0
  47. data/test/rails_app/app/models/box.rb +5 -0
  48. data/test/rails_app/app/models/product.rb +8 -0
  49. data/test/rails_app/app/models/reject.rb +6 -0
  50. data/test/rails_app/app/models/validate.rb +6 -0
  51. data/test/rails_app/app/views/assemblies/_form.html.erb +24 -0
  52. data/test/rails_app/app/views/assemblies/edit.html.erb +6 -0
  53. data/test/rails_app/app/views/assemblies/index.html.erb +25 -0
  54. data/test/rails_app/app/views/assemblies/new.html.erb +5 -0
  55. data/test/rails_app/app/views/assemblies/show.html.erb +14 -0
  56. data/test/rails_app/app/views/boxes/_form.html.erb +24 -0
  57. data/test/rails_app/app/views/boxes/edit.html.erb +6 -0
  58. data/test/rails_app/app/views/boxes/index.html.erb +25 -0
  59. data/test/rails_app/app/views/boxes/new.html.erb +5 -0
  60. data/test/rails_app/app/views/boxes/show.html.erb +14 -0
  61. data/test/rails_app/app/views/layouts/application.html.erb +14 -0
  62. data/test/rails_app/app/views/products/_form.html.erb +21 -0
  63. data/test/rails_app/app/views/products/edit.html.erb +6 -0
  64. data/test/rails_app/app/views/products/index.html.erb +23 -0
  65. data/test/rails_app/app/views/products/new.html.erb +5 -0
  66. data/test/rails_app/app/views/products/show.html.erb +34 -0
  67. data/test/rails_app/app/views/rejects/_form.html.erb +20 -0
  68. data/test/rails_app/app/views/rejects/edit.html.erb +6 -0
  69. data/test/rails_app/app/views/rejects/index.html.erb +23 -0
  70. data/test/rails_app/app/views/rejects/new.html.erb +5 -0
  71. data/test/rails_app/app/views/rejects/show.html.erb +9 -0
  72. data/test/rails_app/app/views/validates/_form.html.erb +40 -0
  73. data/test/rails_app/app/views/validates/edit.html.erb +6 -0
  74. data/test/rails_app/app/views/validates/index.html.erb +33 -0
  75. data/test/rails_app/app/views/validates/new.html.erb +5 -0
  76. data/test/rails_app/app/views/validates/show.html.erb +35 -0
  77. data/test/rails_app/config.ru +4 -0
  78. data/test/rails_app/config/application.rb +59 -0
  79. data/test/rails_app/config/boot.rb +6 -0
  80. data/test/rails_app/config/database.yml +25 -0
  81. data/test/rails_app/config/environment.rb +5 -0
  82. data/test/rails_app/config/environments/development.rb +37 -0
  83. data/test/rails_app/config/environments/production.rb +67 -0
  84. data/test/rails_app/config/environments/test.rb +37 -0
  85. data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
  86. data/test/rails_app/config/initializers/inflections.rb +15 -0
  87. data/test/rails_app/config/initializers/mime_types.rb +5 -0
  88. data/test/rails_app/config/initializers/secret_token.rb +7 -0
  89. data/test/rails_app/config/initializers/session_store.rb +8 -0
  90. data/test/rails_app/config/initializers/wrap_parameters.rb +14 -0
  91. data/test/rails_app/config/locales/en.yml +5 -0
  92. data/test/rails_app/config/routes.rb +68 -0
  93. data/test/rails_app/db/development.sqlite3 +0 -0
  94. data/test/rails_app/db/migrate/20120126165218_create_products.rb +8 -0
  95. data/test/rails_app/db/migrate/20120126165821_add_codename_to_products.rb +6 -0
  96. data/test/rails_app/db/migrate/20120126173019_create_validates.rb +14 -0
  97. data/test/rails_app/db/migrate/20120126173232_create_assemblies.rb +10 -0
  98. data/test/rails_app/db/migrate/20120126173516_create_boxes.rb +10 -0
  99. data/test/rails_app/db/migrate/20120126173539_create_rejects.rb +9 -0
  100. data/test/rails_app/db/migrate/20120126174101_create_transitions.rb +18 -0
  101. data/test/rails_app/db/schema.rb +64 -0
  102. data/test/rails_app/db/seeds.rb +7 -0
  103. data/test/rails_app/db/test.sqlite3 +0 -0
  104. data/test/rails_app/doc/README_FOR_APP +2 -0
  105. data/test/rails_app/log/development.log +8963 -0
  106. data/test/rails_app/log/test.log +321 -0
  107. data/test/rails_app/public/404.html +26 -0
  108. data/test/rails_app/public/422.html +26 -0
  109. data/test/rails_app/public/500.html +25 -0
  110. data/test/rails_app/public/favicon.ico +0 -0
  111. data/test/rails_app/public/index.html.old +241 -0
  112. data/test/rails_app/public/robots.txt +5 -0
  113. data/test/rails_app/script/rails +6 -0
  114. data/test/rails_app/test/fixtures/assemblies.yml +9 -0
  115. data/test/rails_app/test/fixtures/boxes.yml +9 -0
  116. data/test/rails_app/test/fixtures/products.yml +11 -0
  117. data/test/rails_app/test/fixtures/rejects.yml +7 -0
  118. data/test/rails_app/test/fixtures/validates.yml +17 -0
  119. data/test/rails_app/test/functional/assemblies_controller_test.rb +49 -0
  120. data/test/rails_app/test/functional/boxes_controller_test.rb +49 -0
  121. data/test/rails_app/test/functional/products_controller_test.rb +49 -0
  122. data/test/rails_app/test/functional/rejects_controller_test.rb +49 -0
  123. data/test/rails_app/test/functional/validates_controller_test.rb +49 -0
  124. data/test/rails_app/test/performance/browsing_test.rb +12 -0
  125. data/test/rails_app/test/test_helper.rb +13 -0
  126. data/test/rails_app/test/unit/assembly_test.rb +7 -0
  127. data/test/rails_app/test/unit/box_test.rb +7 -0
  128. data/test/rails_app/test/unit/helpers/assemblies_helper_test.rb +4 -0
  129. data/test/rails_app/test/unit/helpers/boxes_helper_test.rb +4 -0
  130. data/test/rails_app/test/unit/helpers/products_helper_test.rb +4 -0
  131. data/test/rails_app/test/unit/helpers/rejects_helper_test.rb +4 -0
  132. data/test/rails_app/test/unit/helpers/validates_helper_test.rb +4 -0
  133. data/test/rails_app/test/unit/product_test.rb +7 -0
  134. data/test/rails_app/test/unit/reject_test.rb +7 -0
  135. data/test/rails_app/test/unit/validate_test.rb +7 -0
  136. data/test/rails_app/tmp/cache/assets/CD7/6F0/sprockets%2Fbd3936370d0f952ada5774e2230046ed +0 -0
  137. data/test/rails_app/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  138. data/test/rails_app/tmp/cache/assets/CDF/890/sprockets%2F1380c8a9a90c9434c33ea3a2b759546f +0 -0
  139. data/test/rails_app/tmp/cache/assets/CF0/DA0/sprockets%2Fd7d5b37686831d37c4dd75e645f5e016 +0 -0
  140. data/test/rails_app/tmp/cache/assets/CF1/E50/sprockets%2F627ffd39f3642a2a236775d77839fac3 +0 -0
  141. data/test/rails_app/tmp/cache/assets/CFC/170/sprockets%2F80efc018414af123b11d0c6485e87b1b +0 -0
  142. data/test/rails_app/tmp/cache/assets/D0B/B40/sprockets%2F2eace11b521905c77d38470c975fa28a +0 -0
  143. data/test/rails_app/tmp/cache/assets/D13/8E0/sprockets%2F4476d1e237763ebe413a93e0ae559e6b +0 -0
  144. data/test/rails_app/tmp/cache/assets/D13/E20/sprockets%2F382583b312ba3d6f09b596f6bb63a98b +0 -0
  145. data/test/rails_app/tmp/cache/assets/D15/750/sprockets%2F4cc25a6e69224dc83fed65a4242479c5 +0 -0
  146. data/test/rails_app/tmp/cache/assets/D1B/3B0/sprockets%2F0098fc768cb8d9c834fcb13163c85b54 +0 -0
  147. data/test/rails_app/tmp/cache/assets/D20/C40/sprockets%2F46d84fd895a96b157269bd6b7bae2623 +0 -0
  148. data/test/rails_app/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  149. data/test/rails_app/tmp/cache/assets/D3F/4A0/sprockets%2Fba62c891c908a4219fb4d2005f886aee +0 -0
  150. data/test/rails_app/tmp/cache/assets/D45/C10/sprockets%2F29eede3408740d29d159a8367d1abe4e +0 -0
  151. data/test/rails_app/tmp/cache/assets/D4B/EC0/sprockets%2Fb261fa987a3e88f07b352eba69495e3b +0 -0
  152. data/test/rails_app/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  153. data/test/rails_app/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  154. data/test/rails_app/tmp/cache/assets/D65/620/sprockets%2Fc821c64ad244b34cd1c92ce6e4844f2a +0 -0
  155. data/test/rails_app/tmp/cache/assets/D78/F10/sprockets%2Fc81a77308c5e0c2b8efc69bece538149 +0 -0
  156. data/test/rails_app/tmp/cache/assets/D7B/040/sprockets%2F2ea981ebd7b7a34bd9d75f626f81c526 +0 -0
  157. data/test/rails_app/tmp/cache/assets/D9C/4A0/sprockets%2Fc15750bf0161f2878cf9da9bb1a84ecb +0 -0
  158. data/test/rails_app/tmp/cache/assets/DA2/120/sprockets%2Fdfd12e4fb8ce07a2d3c4856974a2f4e3 +0 -0
  159. data/test/rails_app/tmp/cache/assets/DA9/180/sprockets%2F1eca18f8334b5ce5f73e18d778bc7e3b +0 -0
  160. data/test/rails_app/tmp/cache/assets/DB4/120/sprockets%2Fc4ad185fad2acc8f1133bb2a80f400d7 +0 -0
  161. data/test/rails_app/tmp/cache/assets/DD2/B40/sprockets%2Ff8f229b2c6e61975aca38da7a1cb7b8c +0 -0
  162. data/test/rails_app/tmp/cache/assets/DD5/CF0/sprockets%2Fac6d0c5baedfe70588f57e99b0c4c722 +0 -0
  163. data/test/rails_app/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  164. data/test/rails_app/tmp/cache/assets/DDD/AE0/sprockets%2F524b597ade6bc1d79c9a4ffd6e3682bd +0 -0
  165. data/test/rails_app/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  166. data/test/rails_app/tmp/cache/assets/E06/E60/sprockets%2F1afcf29a4e0c835cb47d9bf28cf8a86b +0 -0
  167. data/test/rails_app/tmp/cache/assets/E19/2A0/sprockets%2F10fcfbe6ebae11a40c8eac41939a1b9a +0 -0
  168. data/test/rails_app/tmp/cache/assets/E25/4C0/sprockets%2Fde2fd9fd11c04a582cdbbe3d84a35ae6 +0 -0
  169. data/test/rails_app/tmp/cache/assets/E35/980/sprockets%2Fa5beac77f747ffbc71d32edecf38904a +0 -0
  170. data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/assemblies.css.scssc +0 -0
  171. data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/boxes.css.scssc +0 -0
  172. data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/products.css.scssc +0 -0
  173. data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/rejects.css.scssc +0 -0
  174. data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/scaffolds.css.scssc +0 -0
  175. data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/validates.css.scssc +0 -0
  176. data/test/test_helper.rb +67 -0
  177. data/test/test_schema.rb +32 -0
  178. metadata +210 -1
@@ -0,0 +1,20 @@
1
+ <%= form_for(@reject) do |f| %>
2
+ <% if @reject.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@reject.errors.count, "error") %> prohibited this reject from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @reject.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.hidden_field :product_id %>
16
+ </div>
17
+ <div class="actions">
18
+ <%= f.submit %>
19
+ </div>
20
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing reject</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @reject %> |
6
+ <%= link_to 'Back', rejects_path %>
@@ -0,0 +1,23 @@
1
+ <h1>Listing rejects</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th>Product</th>
6
+ <th></th>
7
+ <th></th>
8
+ <th></th>
9
+ </tr>
10
+
11
+ <% @rejects.each do |reject| %>
12
+ <tr>
13
+ <td><%= reject.product_id %></td>
14
+ <td><%= link_to 'Show', reject %></td>
15
+ <td><%= link_to 'Edit', edit_reject_path(reject) %></td>
16
+ <td><%= link_to 'Destroy', reject, confirm: 'Are you sure?', method: :delete %></td>
17
+ </tr>
18
+ <% end %>
19
+ </table>
20
+
21
+ <br />
22
+
23
+ <%= link_to 'New Reject', new_reject_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New reject</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', rejects_path %>
@@ -0,0 +1,9 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>
4
+ <b>Product:</b>
5
+ <%= link_to @reject.product.codename, @reject.product %>
6
+ </h1>
7
+
8
+ <%= breadcrumb @reject %>
9
+
@@ -0,0 +1,40 @@
1
+ <%= form_for(@validate) do |f| %>
2
+ <% if @validate.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@validate.errors.count, "error") %> prohibited this validate from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @validate.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 :standing_test %><br />
16
+ <%= f.check_box :standing_test %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :sitting_test %><br />
20
+ <%= f.check_box :sitting_test %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label :fat_guy_test %><br />
24
+ <%= f.check_box :fat_guy_test %>
25
+ </div>
26
+ <div class="field">
27
+ <%= f.label :evel_knievel_jumping_test %><br />
28
+ <%= f.check_box :evel_knievel_jumping_test %>
29
+ </div>
30
+ <div class="field">
31
+ <%= f.label :tester %><br />
32
+ <%= f.text_field :tester %>
33
+ </div>
34
+ <div class="field">
35
+ <%= f.hidden_field :product_id %>
36
+ </div>
37
+ <div class="actions">
38
+ <%= f.submit %>
39
+ </div>
40
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing validate</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @validate %> |
6
+ <%= link_to 'Back', validates_path %>
@@ -0,0 +1,33 @@
1
+ <h1>Listing validates</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th>Standing test</th>
6
+ <th>Sitting test</th>
7
+ <th>Fat guy test</th>
8
+ <th>Evel knievel jumping test</th>
9
+ <th>Tester</th>
10
+ <th>Product</th>
11
+ <th></th>
12
+ <th></th>
13
+ <th></th>
14
+ </tr>
15
+
16
+ <% @validates.each do |validate| %>
17
+ <tr>
18
+ <td><%= validate.standing_test %></td>
19
+ <td><%= validate.sitting_test %></td>
20
+ <td><%= validate.fat_guy_test %></td>
21
+ <td><%= validate.evel_knievel_jumping_test %></td>
22
+ <td><%= validate.tester %></td>
23
+ <td><%= validate.product_id %></td>
24
+ <td><%= link_to 'Show', validate %></td>
25
+ <td><%= link_to 'Edit', edit_validate_path(validate) %></td>
26
+ <td><%= link_to 'Destroy', validate, confirm: 'Are you sure?', method: :delete %></td>
27
+ </tr>
28
+ <% end %>
29
+ </table>
30
+
31
+ <br />
32
+
33
+ <%= link_to 'New Validate', new_validate_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New validate</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', validates_path %>
@@ -0,0 +1,35 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>
4
+ <b>Product:</b>
5
+ <%= link_to @validate.product.codename, @validate.product %>
6
+ </h1>
7
+
8
+ <%= breadcrumb @validate %>
9
+
10
+ <p>
11
+ <b>Standing test:</b>
12
+ <%= @validate.standing_test %>
13
+ </p>
14
+
15
+ <p>
16
+ <b>Sitting test:</b>
17
+ <%= @validate.sitting_test %>
18
+ </p>
19
+
20
+ <p>
21
+ <b>Fat guy test:</b>
22
+ <%= @validate.fat_guy_test %>
23
+ </p>
24
+
25
+ <p>
26
+ <b>Evel knievel jumping test:</b>
27
+ <%= @validate.evel_knievel_jumping_test %>
28
+ </p>
29
+
30
+ <p>
31
+ <b>Tester:</b>
32
+ <%= @validate.tester %>
33
+ </p>
34
+
35
+
@@ -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 RailsApp::Application
@@ -0,0 +1,59 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ if defined?(Bundler)
6
+ # If you precompile assets before deploying to production, use this line
7
+ Bundler.require(*Rails.groups(:assets => %w(development test)))
8
+ # If you want your assets lazily compiled in production, use this line
9
+ # Bundler.require(:default, :assets, Rails.env)
10
+ end
11
+
12
+ module RailsApp
13
+ class Application < Rails::Application
14
+ # Settings in config/environments/* take precedence over those specified here.
15
+ # Application configuration should go into files in config/initializers
16
+ # -- all .rb files in that directory are automatically loaded.
17
+
18
+ # Custom directories with classes and modules you want to be autoloadable.
19
+ # config.autoload_paths += %W(#{config.root}/extras)
20
+
21
+ # Only load the plugins named here, in the order given (default is alphabetical).
22
+ # :all can be used as a placeholder for all plugins not explicitly named.
23
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
24
+
25
+ # Activate observers that should always be running.
26
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
27
+
28
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
29
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
30
+ # config.time_zone = 'Central Time (US & Canada)'
31
+
32
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
33
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
34
+ # config.i18n.default_locale = :de
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
+
42
+ # Use SQL instead of Active Record's schema dumper when creating the database.
43
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
44
+ # like if you have constraints or database-specific column types
45
+ # config.active_record.schema_format = :sql
46
+
47
+ # Enforce whitelist mode for mass assignment.
48
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
49
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
50
+ # parameters by using an attr_accessible or attr_protected declaration.
51
+ # config.active_record.whitelist_attributes = true
52
+
53
+ # Enable the asset pipeline
54
+ config.assets.enabled = true
55
+
56
+ # Version of your assets, change this if you want to expire all your assets
57
+ config.assets.version = '1.0'
58
+ end
59
+ end
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ RailsApp::Application.initialize!
@@ -0,0 +1,37 @@
1
+ RailsApp::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
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
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
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+
25
+ # Raise exception on mass assignment protection for Active Record models
26
+ config.active_record.mass_assignment_sanitizer = :strict
27
+
28
+ # Log the query plan for queries taking more than this (works
29
+ # with SQLite, MySQL, and PostgreSQL)
30
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
31
+
32
+ # Do not compress assets
33
+ config.assets.compress = false
34
+
35
+ # Expands the lines which load the assets
36
+ config.assets.debug = true
37
+ end
@@ -0,0 +1,67 @@
1
+ RailsApp::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ config.serve_static_assets = false
13
+
14
+ # Compress JavaScripts and CSS
15
+ config.assets.compress = true
16
+
17
+ # Don't fallback to assets pipeline if a precompiled asset is missed
18
+ config.assets.compile = false
19
+
20
+ # Generate digests for assets URLs
21
+ config.assets.digest = true
22
+
23
+ # Defaults to Rails.root.join("public/assets")
24
+ # config.assets.manifest = YOUR_PATH
25
+
26
+ # Specifies the header that your server uses for sending files
27
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
+
30
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
+ # config.force_ssl = true
32
+
33
+ # See everything in the log (default is :info)
34
+ # config.log_level = :debug
35
+
36
+ # Prepend all log lines with the following tags
37
+ # config.log_tags = [ :subdomain, :uuid ]
38
+
39
+ # Use a different logger for distributed setups
40
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
+
42
+ # Use a different cache store in production
43
+ # config.cache_store = :mem_cache_store
44
+
45
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
+ # config.action_controller.asset_host = "http://assets.example.com"
47
+
48
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
+ # config.assets.precompile += %w( search.js )
50
+
51
+ # Disable delivery errors, bad email addresses will be ignored
52
+ # config.action_mailer.raise_delivery_errors = false
53
+
54
+ # Enable threaded mode
55
+ # config.threadsafe!
56
+
57
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
+ # the I18n.default_locale when a translation can not be found)
59
+ config.i18n.fallbacks = true
60
+
61
+ # Send deprecation notices to registered listeners
62
+ config.active_support.deprecation = :notify
63
+
64
+ # Log the query plan for queries taking more than this (works
65
+ # with SQLite, MySQL, and PostgreSQL)
66
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
67
+ end
@@ -0,0 +1,37 @@
1
+ RailsApp::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Configure static asset server for tests with Cache-Control for performance
11
+ config.serve_static_assets = true
12
+ config.static_cache_control = "public, max-age=3600"
13
+
14
+ # Log error messages when you accidentally call methods on nil
15
+ config.whiny_nils = true
16
+
17
+ # Show full error reports and disable caching
18
+ config.consider_all_requests_local = true
19
+ config.action_controller.perform_caching = false
20
+
21
+ # Raise exceptions instead of rendering exception templates
22
+ config.action_dispatch.show_exceptions = false
23
+
24
+ # Disable request forgery protection in test environment
25
+ config.action_controller.allow_forgery_protection = false
26
+
27
+ # Tell Action Mailer not to deliver emails to the real world.
28
+ # The :test delivery method accumulates sent emails in the
29
+ # ActionMailer::Base.deliveries array.
30
+ config.action_mailer.delivery_method = :test
31
+
32
+ # Raise exception on mass assignment protection for Active Record models
33
+ config.active_record.mass_assignment_sanitizer = :strict
34
+
35
+ # Print deprecation notices to the stderr
36
+ config.active_support.deprecation = :stderr
37
+ end