railstrap 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +40 -0
  4. data/app/helpers/railstrap/application_helper.rb +260 -0
  5. data/config/routes.rb +2 -0
  6. data/lib/generators/railstrap/crud/USAGE +8 -0
  7. data/lib/generators/railstrap/crud/crud_generator.rb +160 -0
  8. data/lib/generators/railstrap/crud/templates/controller.rb +109 -0
  9. data/lib/generators/railstrap/crud/templates/view_edit.html.erb +12 -0
  10. data/lib/generators/railstrap/crud/templates/view_form.html.erb +18 -0
  11. data/lib/generators/railstrap/crud/templates/view_index.html.erb +11 -0
  12. data/lib/generators/railstrap/crud/templates/view_new.html.erb +12 -0
  13. data/lib/generators/railstrap/crud/templates/view_print.html.erb +13 -0
  14. data/lib/generators/railstrap/crud/templates/view_show.html.erb +14 -0
  15. data/lib/generators/railstrap/crud/templates/view_sidebar.html.erb +13 -0
  16. data/lib/generators/railstrap/crud/templates/view_signin.html.erb +36 -0
  17. data/lib/generators/railstrap/crud/templates/view_signup.html.erb +52 -0
  18. data/lib/generators/railstrap/crud/templates/view_text.html.erb +18 -0
  19. data/lib/generators/railstrap/install/install_generator.rb +74 -0
  20. data/lib/generators/railstrap/kaminari/templates/_first_page.html.erb +14 -0
  21. data/lib/generators/railstrap/kaminari/templates/_gap.html.erb +8 -0
  22. data/lib/generators/railstrap/kaminari/templates/_last_page.html.erb +14 -0
  23. data/lib/generators/railstrap/kaminari/templates/_next_page.html.erb +13 -0
  24. data/lib/generators/railstrap/kaminari/templates/_page.html.erb +12 -0
  25. data/lib/generators/railstrap/kaminari/templates/_paginator.html.erb +25 -0
  26. data/lib/generators/railstrap/kaminari/templates/_prev_page.html.erb +13 -0
  27. data/lib/generators/railstrap/layout/layout_generator.rb +30 -0
  28. data/lib/generators/railstrap/layout/templates/layout_railstrap.html.erb +134 -0
  29. data/lib/generators/railstrap/layout/templates/railstrap_painel.css.scss.erb +284 -0
  30. data/lib/generators/railstrap/layout/templates/railstrap_painel.js.erb +35 -0
  31. data/lib/railstrap.rb +9 -0
  32. data/lib/railstrap/action_controller.rb +29 -0
  33. data/lib/railstrap/active_record.rb +8 -0
  34. data/lib/railstrap/active_record/search.rb +52 -0
  35. data/lib/railstrap/engine.rb +29 -0
  36. data/lib/railstrap/version.rb +3 -0
  37. data/lib/tasks/railstrap_tasks.rake +4 -0
  38. data/test/dummy/README.rdoc +261 -0
  39. data/test/dummy/Rakefile +7 -0
  40. data/test/dummy/app/assets/javascripts/application.js +15 -0
  41. data/test/dummy/app/assets/javascripts/railstrap_painel.js +35 -0
  42. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  43. data/test/dummy/app/assets/stylesheets/railstrap_painel.css.scss +284 -0
  44. data/test/dummy/app/controllers/application_controller.rb +7 -0
  45. data/test/dummy/app/controllers/painel/authors_controller.rb +84 -0
  46. data/test/dummy/app/helpers/application_helper.rb +2 -0
  47. data/test/dummy/app/models/article.rb +3 -0
  48. data/test/dummy/app/models/author.rb +3 -0
  49. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  50. data/test/dummy/app/views/layouts/painel.html.erb +135 -0
  51. data/test/dummy/app/views/painel/authors/_form.html.erb +20 -0
  52. data/test/dummy/app/views/painel/authors/edit.html.erb +12 -0
  53. data/test/dummy/app/views/painel/authors/index.html.erb +12 -0
  54. data/test/dummy/app/views/painel/authors/new.html.erb +12 -0
  55. data/test/dummy/app/views/painel/authors/show.html.erb +14 -0
  56. data/test/dummy/config.ru +4 -0
  57. data/test/dummy/config/application.rb +56 -0
  58. data/test/dummy/config/boot.rb +10 -0
  59. data/test/dummy/config/database.yml +25 -0
  60. data/test/dummy/config/environment.rb +5 -0
  61. data/test/dummy/config/environments/development.rb +37 -0
  62. data/test/dummy/config/environments/production.rb +67 -0
  63. data/test/dummy/config/environments/test.rb +37 -0
  64. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  65. data/test/dummy/config/initializers/inflections.rb +15 -0
  66. data/test/dummy/config/initializers/mime_types.rb +5 -0
  67. data/test/dummy/config/initializers/secret_token.rb +7 -0
  68. data/test/dummy/config/initializers/session_store.rb +8 -0
  69. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  70. data/test/dummy/config/locales/en.yml +5 -0
  71. data/test/dummy/config/routes.rb +65 -0
  72. data/test/dummy/db/development.sqlite3 +0 -0
  73. data/test/dummy/db/migrate/20120604170000_create_articles.rb +12 -0
  74. data/test/dummy/db/migrate/20120604170057_create_authors.rb +10 -0
  75. data/test/dummy/db/schema.rb +31 -0
  76. data/test/dummy/log/development.log +3278 -0
  77. data/test/dummy/public/404.html +26 -0
  78. data/test/dummy/public/422.html +26 -0
  79. data/test/dummy/public/500.html +25 -0
  80. data/test/dummy/public/favicon.ico +0 -0
  81. data/test/dummy/script/rails +6 -0
  82. data/test/dummy/test/fixtures/articles.yml +13 -0
  83. data/test/dummy/test/fixtures/authors.yml +9 -0
  84. data/test/dummy/test/unit/article_test.rb +7 -0
  85. data/test/dummy/test/unit/author_test.rb +7 -0
  86. data/test/dummy/tmp/cache/assets/C86/B70/sprockets%2Fcd9a89973c62604382628d4b42365c1a +0 -0
  87. data/test/dummy/tmp/cache/assets/CB3/120/sprockets%2F0725460776a8a901aa58b85f4cce5456 +0 -0
  88. data/test/dummy/tmp/cache/assets/CDD/EE0/sprockets%2F7ab399ca754638905a70e366e1c1ab33 +0 -0
  89. data/test/dummy/tmp/cache/assets/CE2/EE0/sprockets%2Fd78ec4726951f44cb085d0db080960e3 +0 -0
  90. data/test/dummy/tmp/cache/assets/D09/2B0/sprockets%2F045947e6b2bba2ff33c67b51b63734a6 +0 -0
  91. data/test/dummy/tmp/cache/assets/D0B/A40/sprockets%2F241cecf5326c934ab0440a7c76ad7597 +0 -0
  92. data/test/dummy/tmp/cache/assets/D1D/870/sprockets%2Fa9e5ee43f30c1886f8d66c413395bd63 +0 -0
  93. data/test/dummy/tmp/cache/assets/D2B/DD0/sprockets%2Fddc372002f3306cc0d74fea616ed1138 +0 -0
  94. data/test/dummy/tmp/cache/assets/D46/920/sprockets%2F8f3c0c4bf52b27a6646e49751e4e8f0c +0 -0
  95. data/test/dummy/tmp/cache/assets/D72/0B0/sprockets%2F56e9ec06e41d1cf9d692d674b5ddb210 +0 -0
  96. data/test/dummy/tmp/cache/assets/D7C/A80/sprockets%2Fd2d9ec09fb9bc7f8a0758392420e5c7d +0 -0
  97. data/test/dummy/tmp/cache/assets/D7D/9D0/sprockets%2F28fea8457f4a95a2c2d34a6e77df509e +0 -0
  98. data/test/dummy/tmp/cache/assets/D98/3C0/sprockets%2F36f548ab10ebcf8badf47d2719bb8500 +0 -0
  99. data/test/dummy/tmp/cache/assets/DB6/7B0/sprockets%2F120aa322daea3a2aa3667ffd6931eb9b +0 -0
  100. data/test/dummy/tmp/cache/assets/DCB/E50/sprockets%2F89f6b8aeb7d09c0bad5151bab92e5f42 +0 -0
  101. data/test/dummy/tmp/cache/assets/DCF/B50/sprockets%2F5ef130bc93784a52897bbab7bbd4c8ea +0 -0
  102. data/test/dummy/tmp/cache/assets/DD4/B00/sprockets%2F518e3d3f425eccc9558a03f6ddd36ced +0 -0
  103. data/test/dummy/tmp/cache/assets/E53/040/sprockets%2Fb7edacfada15c14fe43ea3b5fc8e2463 +0 -0
  104. data/test/dummy/tmp/cache/sass/0c9acd3b93b1d41708045c7041c76bbf41b2e963/_bootstrap-responsive.scssc +997 -0
  105. data/test/dummy/tmp/cache/sass/0c9acd3b93b1d41708045c7041c76bbf41b2e963/_bootstrap.scssc +0 -0
  106. data/test/dummy/tmp/cache/sass/1ea5acef392f2f8c40312d480463a71d2049b360/railstrap_painel.css.scssc +0 -0
  107. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_accordion.scssc +0 -0
  108. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_alerts.scssc +0 -0
  109. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_breadcrumbs.scssc +0 -0
  110. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_button-groups.scssc +0 -0
  111. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_buttons.scssc +0 -0
  112. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_carousel.scssc +0 -0
  113. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_close.scssc +0 -0
  114. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_code.scssc +0 -0
  115. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_component-animations.scssc +0 -0
  116. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_dropdowns.scssc +0 -0
  117. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_forms.scssc +1494 -0
  118. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_grid.scssc +0 -0
  119. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_hero-unit.scssc +0 -0
  120. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_labels-badges.scssc +0 -0
  121. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_layouts.scssc +0 -0
  122. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_mixins.scssc +2620 -0
  123. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_modals.scssc +0 -0
  124. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_navbar.scssc +1209 -0
  125. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_navs.scssc +0 -0
  126. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_pager.scssc +0 -0
  127. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_pagination.scssc +0 -0
  128. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_popovers.scssc +0 -0
  129. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_progress-bars.scssc +0 -0
  130. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_reset.scssc +0 -0
  131. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_scaffolding.scssc +0 -0
  132. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_sprites.scssc +1064 -0
  133. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_tables.scssc +0 -0
  134. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_thumbnails.scssc +0 -0
  135. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_tooltip.scssc +0 -0
  136. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_type.scssc +0 -0
  137. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_utilities.scssc +0 -0
  138. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_variables.scssc +684 -0
  139. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_wells.scssc +0 -0
  140. data/test/integration/navigation_test.rb +10 -0
  141. data/test/railstrap_test.rb +7 -0
  142. data/test/test_helper.rb +15 -0
  143. metadata +420 -0
@@ -0,0 +1,3 @@
1
+ class Article < ActiveRecord::Base
2
+ attr_accessible :author_id, :content, :published, :title
3
+ end
@@ -0,0 +1,3 @@
1
+ class Author < ActiveRecord::Base
2
+ attr_accessible :name, :status
3
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application", :media => "all" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,135 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>RailsTrap - Railstrap Painel</title>
5
+ <!--<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>-->
6
+ <!--[if lt IE 9]>
7
+
8
+ <![endif]-->
9
+ <%= stylesheet_link_tag "railstrap_painel", :media => "all" %>
10
+ <%= javascript_include_tag "railstrap_painel" %>
11
+ <style type="text/css">
12
+ body {
13
+ / padding-top: 60px;
14
+ padding-bottom: 10px;
15
+ }
16
+ .sidebar-nav {
17
+ padding: 9px 0;
18
+ }
19
+ </style>
20
+ <%= csrf_meta_tags %>
21
+ <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
22
+
23
+ </head>
24
+ <body data-offset="50">
25
+
26
+ <!--[inicio] barra_fixa -->
27
+ <div class="navbar navbar-fixed-top">
28
+ <div class="navbar-inner">
29
+ <div class="container">
30
+
31
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
32
+ <span class="icon-bar"></span>
33
+ <span class="icon-bar"></span>
34
+ <span class="icon-bar"></span>
35
+ </a>
36
+ <a class="brand" href="#">
37
+ <span style="color:#ffe62f">Rails</span><span style="color:#fff">Trap</span>
38
+ <sup><span class="label label-warning">beta</span></sup>
39
+ </a>
40
+ <div class="nav-collapse">
41
+ <!-- <ul class="nav">
42
+
43
+ <li class="active"><a href="#siteRoot">Ir ao site</a></li>
44
+ <!- -<li class="divider-vertical"></li>- ->
45
+ </ul>
46
+ -->
47
+
48
+ <ul class="nav pull-right">
49
+
50
+ <li class="active"><a href="#">Ir ao site</a></li>
51
+ <!--<li class="divider-vertical"></li>-->
52
+ <li class="dropdown">
53
+ <a data-toggle="dropdown" class="dropdown-toggle " href="#">NameUser <b class="caret"></b></a>
54
+ <ul class="dropdown-menu">
55
+ <li>
56
+ <a href="#"><i class="icon-user"></i> My account </a>
57
+ </li>
58
+ <li>
59
+ <a href="#"><i class="icon-lock"></i> Change password</a>
60
+ </li>
61
+ <li class="divider"></li>
62
+ <li>
63
+ <%= link_to (raw('<i class="icon-off"></i> Logout'), '#',
64
+ :method => :delete, :style => 'font-weight:bold') %>
65
+ </li>
66
+ </ul>
67
+ </li>
68
+ </ul>
69
+
70
+ <!--<p class="navbar-text pull-right painel_logado active">Logado como
71
+ <a style='margin-right:10px;' href="#"><i class="icon-white icon-user"></i> #UserLoggedIN</a>
72
+ </p>-->
73
+
74
+ </div><!--/.nav-collapse -->
75
+ </div>
76
+ </div>
77
+ </div>
78
+ <!--[fim] barra_fixa -->
79
+
80
+
81
+ <!--[inicio] wrap -->
82
+ <div id="listaguarapari">
83
+
84
+ <div class="container">
85
+
86
+ <header id="header">
87
+ <div class="row">
88
+ <div class="span8"><!-- --></div>
89
+ <div class="span4"><!-- --></div>
90
+ </div>
91
+ <br /><br />
92
+ </header>
93
+
94
+ <section id="global_container">
95
+ <div class="row">
96
+ <div class="span2">
97
+ <div class="well sidebar-nav">
98
+ <ul class="nav nav-list">
99
+ <li class="active"><a href="#">Home</a></li>
100
+ <li class="nav-header">Cadastros</li>
101
+ <li><%=link_to "Pages", painel_pages_path%></li>
102
+ <li><%=link_to "Authors", painel_authors_path%></li>
103
+ <li><a href="#">Galerias</a></li>
104
+ <li><a href="#">Serviços</a></li>
105
+
106
+ <li class="nav-header">Configurações</li>
107
+ <li><a href="#">Slider</a></li>
108
+ <!-- DIVISOR -->
109
+ <li class="divider"></li>
110
+ <li><a href="#">Contatos via Site</a></li>
111
+ </ul>
112
+ </div><!--/.well -->
113
+ </div>
114
+
115
+ <div class="span10">
116
+ <%= yield %>
117
+ </div>
118
+
119
+ </div>
120
+ </section>
121
+
122
+
123
+ <footer class="footer container">
124
+ <hr>
125
+ <p class="pull-right"><a href="#">Voltar ao Topo</a></p>
126
+ <p><%=link_to 'Railstrap', 'http://github.com/allanfreitas/railstrap' %> <%=Time.now.year%>. Todos os direitos reservados.</p>
127
+ <p>Desenvolvido e mantido por <a href="http://www.allanfreitas.com.br">@allanfreitas</a>.</p>
128
+ <p>Licença <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
129
+ </footer>
130
+
131
+ </div><!--[fim] container -->
132
+
133
+ </div><!--[fim] listaguarapari -->
134
+ </body>
135
+ </html>
@@ -0,0 +1,20 @@
1
+ <% if f.error_notification %>
2
+ <div class="alert alert-error fade in">
3
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
4
+ <%= f.error_notification %>
5
+ </div>
6
+ <% end %>
7
+
8
+
9
+
10
+ <%= f.input :name, :input_html => { :readonly => @readonly, :disabled=>@readonly } %>
11
+
12
+ <%= f.input :status, :input_html => { :readonly => @readonly, :disabled=>@readonly } %>
13
+
14
+
15
+ <!--
16
+ <div class="form-actions">
17
+ <%= f.button :submit, :class => 'btn-primary' %>
18
+ <%= submit_tag 'Cancel', :type => :reset, :class => "btn btn-danger" %>
19
+ </div>
20
+ -->
@@ -0,0 +1,12 @@
1
+
2
+ <%= tb_fixed_toolbar("Authors", painel_authors_path) do %>
3
+ <%= tb_submit_button_to @author%>
4
+ <%= tb_cancel_button_to @author %>
5
+ <%= tb_delete_button_to @author %>
6
+ <% end %>
7
+
8
+ <%= simple_form_for @author, :url => painel_authors_path(@author),:html => { :class => 'form-vertical', :id => 'author' } do |f| %>
9
+
10
+ <%= render :partial=>'form', :locals=>{:f=>f} %>
11
+
12
+ <%end%>
@@ -0,0 +1,12 @@
1
+ <%= tb_fixed_toolbar("Authors", painel_authors_path) do %>
2
+ <%= tb_add_button_to Author %>
3
+ <%=tb_search_tool Author %>
4
+ <%= paginate @authors %>
5
+ <% end %>
6
+
7
+ <%= tb_table_for @authors, :actions=>[:show,:edit,:delete] do -%>
8
+ <% column :name, :title=>"Name" %>
9
+ <% column :status, :title=>"Status" %>
10
+
11
+ <%end%>
12
+ <%= paginate @authors %>
@@ -0,0 +1,12 @@
1
+
2
+ <%= tb_fixed_toolbar("Authors", painel_authors_path) do %>
3
+ <%= tb_submit_button_to @author%>
4
+ <%= tb_cancel_button_to @author %>
5
+ <% end %>
6
+
7
+
8
+ <%= simple_form_for @author, :url => painel_authors_path,:html => { :class => 'form-vertical', :id => 'author' } do |f| %>
9
+
10
+ <%= render :partial=>'form', :locals=>{:f=>f} %>
11
+
12
+ <%end%>
@@ -0,0 +1,14 @@
1
+
2
+ <%= tb_fixed_toolbar("Authors", painel_authors_path) do %>
3
+ <%= tb_cancel_button_to @author %>
4
+ <%= tb_edit_button_to @author %>
5
+ <%= tb_delete_button_to @author %>
6
+ <% end %>
7
+
8
+ <% @readonly = true %>
9
+
10
+ <%= simple_form_for @author, :url => '#',:html => { :class => 'form-vertical' } do |f| %>
11
+
12
+ <%= render :partial=>'form', :locals=>{:f=>f} %>
13
+
14
+ <%end%>
@@ -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 Dummy::Application
@@ -0,0 +1,56 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require
6
+ require "railstrap"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Custom directories with classes and modules you want to be autoloadable.
15
+ # config.autoload_paths += %W(#{config.root}/extras)
16
+
17
+ # Only load the plugins named here, in the order given (default is alphabetical).
18
+ # :all can be used as a placeholder for all plugins not explicitly named.
19
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
20
+
21
+ # Activate observers that should always be running.
22
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
23
+
24
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
26
+ # config.time_zone = 'Central Time (US & Canada)'
27
+
28
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
29
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30
+ # config.i18n.default_locale = :de
31
+
32
+ # Configure the default encoding used in templates for Ruby 1.9.
33
+ config.encoding = "utf-8"
34
+
35
+ # Configure sensitive parameters which will be filtered from the log file.
36
+ config.filter_parameters += [:password]
37
+
38
+ # Use SQL instead of Active Record's schema dumper when creating the database.
39
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
40
+ # like if you have constraints or database-specific column types
41
+ # config.active_record.schema_format = :sql
42
+
43
+ # Enforce whitelist mode for mass assignment.
44
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
45
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
46
+ # parameters by using an attr_accessible or attr_protected declaration.
47
+ config.active_record.whitelist_attributes = true
48
+
49
+ # Enable the asset pipeline
50
+ config.assets.enabled = true
51
+
52
+ # Version of your assets, change this if you want to expire all your assets
53
+ config.assets.version = '1.0'
54
+ end
55
+ end
56
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -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
+ Dummy::Application.initialize!
@@ -0,0 +1,37 @@
1
+ Dummy::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
+ Dummy::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