puffer 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/.rspec +1 -0
  2. data/.rvmrc +1 -0
  3. data/Gemfile +17 -0
  4. data/Gemfile.lock +130 -0
  5. data/Rakefile +3 -2
  6. data/VERSION +1 -0
  7. data/app/views/layouts/puffer.html.erb +38 -0
  8. data/app/views/puffer/_form.html.erb +19 -0
  9. data/app/views/puffer/associated/_many.html.erb +56 -0
  10. data/app/views/puffer/associated/_one.html.erb +47 -0
  11. data/app/views/puffer/associated/many.rjs +1 -0
  12. data/app/views/puffer/associated/one.rjs +1 -0
  13. data/app/views/puffer/association/_many.html.erb +7 -0
  14. data/app/views/puffer/association/_one.html.erb +16 -0
  15. data/app/views/puffer/edit.html.erb +20 -0
  16. data/app/views/puffer/index.html.erb +83 -0
  17. data/app/views/puffer/new.html.erb +18 -0
  18. data/app/views/puffer/show.html.erb +29 -0
  19. data/app/views/puffer/toggle.rjs +1 -0
  20. data/autotest/discover.rb +2 -0
  21. data/puffer.gemspec +217 -0
  22. data/spec/dummy/Rakefile +7 -0
  23. data/spec/dummy/app/controllers/admin/categories_controller.rb +3 -0
  24. data/spec/dummy/app/controllers/admin/posts_controller.rb +3 -0
  25. data/spec/dummy/app/controllers/admin/profiles_controller.rb +3 -0
  26. data/spec/dummy/app/controllers/admin/tags_controller.rb +3 -0
  27. data/spec/dummy/app/controllers/admin/users_controller.rb +13 -0
  28. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  29. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  30. data/spec/dummy/app/models/category.rb +4 -0
  31. data/spec/dummy/app/models/post.rb +7 -0
  32. data/spec/dummy/app/models/post_category.rb +4 -0
  33. data/spec/dummy/app/models/profile.rb +5 -0
  34. data/spec/dummy/app/models/tag.rb +3 -0
  35. data/spec/dummy/app/models/tagging.rb +4 -0
  36. data/spec/dummy/app/models/user.rb +4 -0
  37. data/spec/dummy/app/views/admin/users/index.html.erb +0 -0
  38. data/spec/dummy/config.ru +4 -0
  39. data/spec/dummy/config/application.rb +45 -0
  40. data/spec/dummy/config/boot.rb +10 -0
  41. data/spec/dummy/config/database.yml +22 -0
  42. data/spec/dummy/config/environment.rb +5 -0
  43. data/spec/dummy/config/environments/development.rb +26 -0
  44. data/spec/dummy/config/environments/production.rb +49 -0
  45. data/spec/dummy/config/environments/test.rb +35 -0
  46. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  47. data/spec/dummy/config/initializers/inflections.rb +10 -0
  48. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  49. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  50. data/spec/dummy/config/initializers/session_store.rb +8 -0
  51. data/spec/dummy/config/locales/en.yml +5 -0
  52. data/spec/dummy/config/routes.rb +81 -0
  53. data/spec/dummy/db/migrate/20100930132559_create_admin_users.rb +14 -0
  54. data/spec/dummy/db/migrate/20100930132656_create_admin_posts.rb +15 -0
  55. data/spec/dummy/db/migrate/20100930132726_create_admin_categories.rb +13 -0
  56. data/spec/dummy/db/migrate/20100930132837_create_post_categories.rb +14 -0
  57. data/spec/dummy/db/migrate/20100930133425_create_admin_profiles.rb +16 -0
  58. data/spec/dummy/db/migrate/20101011155830_create_tags.rb +13 -0
  59. data/spec/dummy/db/migrate/20101011160326_create_taggings.rb +16 -0
  60. data/spec/dummy/db/schema.rb +68 -0
  61. data/spec/dummy/public/404.html +26 -0
  62. data/spec/dummy/public/422.html +26 -0
  63. data/spec/dummy/public/500.html +26 -0
  64. data/spec/dummy/public/favicon.ico +0 -0
  65. data/spec/dummy/public/javascripts/application.js +2 -0
  66. data/spec/dummy/public/javascripts/controls.js +965 -0
  67. data/spec/dummy/public/javascripts/dragdrop.js +974 -0
  68. data/spec/dummy/public/javascripts/effects.js +1123 -0
  69. data/spec/dummy/public/javascripts/prototype.js +6001 -0
  70. data/spec/dummy/public/javascripts/rails.js +175 -0
  71. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  72. data/spec/dummy/script/rails +6 -0
  73. data/spec/fabricators/categories_fabricator.rb +3 -0
  74. data/spec/fabricators/posts_fabricator.rb +8 -0
  75. data/spec/fabricators/profiles_fabricator.rb +9 -0
  76. data/spec/fabricators/tags_fabricator.rb +3 -0
  77. data/spec/fabricators/users_fabricator.rb +12 -0
  78. data/spec/integration/navigation_spec.rb +9 -0
  79. data/spec/lib/params_spec.rb +119 -0
  80. data/spec/lib/render_fallback_spec.rb +17 -0
  81. data/spec/lib/resource/routing_spec.rb +67 -0
  82. data/spec/lib/resource_spec.rb +198 -0
  83. data/spec/puffer_spec.rb +7 -0
  84. data/spec/spec_helper.rb +34 -0
  85. metadata +283 -26
@@ -0,0 +1,18 @@
1
+ <% @title = "New #{controller.model_name.humanize.downcase}" %>
2
+ <h1><%= @title %></h1>
3
+ <% form_for record, :url => resource_path, :html => {:multipart => true} do |f| %>
4
+ <%= render :partial => 'terbium/form', :locals => { :f => f, :action => 'new' } %>
5
+ <% end %>
6
+ <% content_for :additional_navigation do %>
7
+ <ul class="buttons">
8
+ <% 0.upto(resource_ancestors_records.length - 1) do |i| %>
9
+ <li><%= link_to resource_ancestors[i].to_s.pluralize.humanize, polymorphic_path([route_prefix] + resource_ancestors_records[0..i-3] + [resource_ancestors[i].to_s.pluralize]) %></li>
10
+ <li><%= link_to resource_ancestors_records[i].to_title, polymorphic_path([route_prefix] + resource_ancestors_records[0..i]) %></li>
11
+ <% end %>
12
+ <% if plural? %>
13
+ <li><%= link_to controller.model_name.pluralize.humanize, resources_path %></li>
14
+ <% else %>
15
+ <li><%= link_to resource.humanize, resource_path %></li>
16
+ <% end %>
17
+ </ul>
18
+ <% end %>
@@ -0,0 +1,29 @@
1
+ <% @title = "Show #{current_resource.human_name}" %>
2
+ <h1><%= @title %></h1>
3
+ <ul class="show_entry">
4
+ <% if current_resource.children.present? %>
5
+ <li>
6
+ <h2>Associations</h2>
7
+ <% current_resource.children.each do |child| %>
8
+ <%= link_to child.human_name, child.index_path %>
9
+ <% end %>
10
+ </li>
11
+ <% end %>
12
+
13
+ <% show_fields.each do |field| -%>
14
+ <li>
15
+ <h2><%= field.label %></h2>
16
+ <div>
17
+ <%= render_field record, field %>
18
+ </div>
19
+ </li>
20
+ <% end if show_fields && record -%>
21
+ </ul>
22
+ <% content_for :additional_navigation do %>
23
+ <ul class="buttons">
24
+ <% (current_resource.ancestors + [current_resource]).each do |resource| %>
25
+ <%= link_to resource.plural? ? resource.human_name : resource.member.to_title, resource.index_path %>
26
+ <%= link_to resource.member.to_title, resource.path unless resource.plural? %>
27
+ <% end %>
28
+ </ul>
29
+ <% end %>
@@ -0,0 +1 @@
1
+ page["#{model_name}_#{@field}_#{record.id}"].checked = record.send @field.name.to_sym
@@ -0,0 +1,2 @@
1
+ Autotest.add_discovery { "rails" }
2
+ Autotest.add_discovery { "rspec2" }
@@ -0,0 +1,217 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{puffer}
8
+ s.version = "0.0.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["pyromaniac"]
12
+ s.date = %q{2010-12-30}
13
+ s.description = %q{In Soviet Russia puffer admins you}
14
+ s.email = %q{kinwizard@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "README.rdoc"
17
+ ]
18
+ s.files = [
19
+ ".rspec",
20
+ ".rvmrc",
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "MIT-LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "app/views/layouts/puffer.html.erb",
28
+ "app/views/puffer/_form.html.erb",
29
+ "app/views/puffer/associated/_many.html.erb",
30
+ "app/views/puffer/associated/_one.html.erb",
31
+ "app/views/puffer/associated/many.rjs",
32
+ "app/views/puffer/associated/one.rjs",
33
+ "app/views/puffer/association/_many.html.erb",
34
+ "app/views/puffer/association/_one.html.erb",
35
+ "app/views/puffer/edit.html.erb",
36
+ "app/views/puffer/index.html.erb",
37
+ "app/views/puffer/new.html.erb",
38
+ "app/views/puffer/show.html.erb",
39
+ "app/views/puffer/toggle.rjs",
40
+ "autotest/discover.rb",
41
+ "lib/generators/puffer/controller/USAGE",
42
+ "lib/generators/puffer/controller/controller_generator.rb",
43
+ "lib/generators/puffer/controller/templates/controller.rb",
44
+ "lib/generators/puffer/install/USAGE",
45
+ "lib/generators/puffer/install/install_generator.rb",
46
+ "lib/puffer.rb",
47
+ "lib/puffer/base.rb",
48
+ "lib/puffer/controller/actions.rb",
49
+ "lib/puffer/controller/config.rb",
50
+ "lib/puffer/controller/dsl.rb",
51
+ "lib/puffer/controller/helpers.rb",
52
+ "lib/puffer/controller/mutate.rb",
53
+ "lib/puffer/extensions/activerecord.rb",
54
+ "lib/puffer/extensions/controller.rb",
55
+ "lib/puffer/extensions/core.rb",
56
+ "lib/puffer/extensions/mapper.rb",
57
+ "lib/puffer/field.rb",
58
+ "lib/puffer/railtie.rb",
59
+ "lib/puffer/resource.rb",
60
+ "lib/puffer/resource/routing.rb",
61
+ "lib/puffer/resource/scoping.rb",
62
+ "puffer.gemspec",
63
+ "spec/dummy/Rakefile",
64
+ "spec/dummy/app/controllers/admin/categories_controller.rb",
65
+ "spec/dummy/app/controllers/admin/posts_controller.rb",
66
+ "spec/dummy/app/controllers/admin/profiles_controller.rb",
67
+ "spec/dummy/app/controllers/admin/tags_controller.rb",
68
+ "spec/dummy/app/controllers/admin/users_controller.rb",
69
+ "spec/dummy/app/controllers/application_controller.rb",
70
+ "spec/dummy/app/helpers/application_helper.rb",
71
+ "spec/dummy/app/models/category.rb",
72
+ "spec/dummy/app/models/post.rb",
73
+ "spec/dummy/app/models/post_category.rb",
74
+ "spec/dummy/app/models/profile.rb",
75
+ "spec/dummy/app/models/tag.rb",
76
+ "spec/dummy/app/models/tagging.rb",
77
+ "spec/dummy/app/models/user.rb",
78
+ "spec/dummy/app/views/admin/users/index.html.erb",
79
+ "spec/dummy/config.ru",
80
+ "spec/dummy/config/application.rb",
81
+ "spec/dummy/config/boot.rb",
82
+ "spec/dummy/config/database.yml",
83
+ "spec/dummy/config/environment.rb",
84
+ "spec/dummy/config/environments/development.rb",
85
+ "spec/dummy/config/environments/production.rb",
86
+ "spec/dummy/config/environments/test.rb",
87
+ "spec/dummy/config/initializers/backtrace_silencers.rb",
88
+ "spec/dummy/config/initializers/inflections.rb",
89
+ "spec/dummy/config/initializers/mime_types.rb",
90
+ "spec/dummy/config/initializers/secret_token.rb",
91
+ "spec/dummy/config/initializers/session_store.rb",
92
+ "spec/dummy/config/locales/en.yml",
93
+ "spec/dummy/config/routes.rb",
94
+ "spec/dummy/db/migrate/20100930132559_create_admin_users.rb",
95
+ "spec/dummy/db/migrate/20100930132656_create_admin_posts.rb",
96
+ "spec/dummy/db/migrate/20100930132726_create_admin_categories.rb",
97
+ "spec/dummy/db/migrate/20100930132837_create_post_categories.rb",
98
+ "spec/dummy/db/migrate/20100930133425_create_admin_profiles.rb",
99
+ "spec/dummy/db/migrate/20101011155830_create_tags.rb",
100
+ "spec/dummy/db/migrate/20101011160326_create_taggings.rb",
101
+ "spec/dummy/db/schema.rb",
102
+ "spec/dummy/public/404.html",
103
+ "spec/dummy/public/422.html",
104
+ "spec/dummy/public/500.html",
105
+ "spec/dummy/public/favicon.ico",
106
+ "spec/dummy/public/javascripts/application.js",
107
+ "spec/dummy/public/javascripts/controls.js",
108
+ "spec/dummy/public/javascripts/dragdrop.js",
109
+ "spec/dummy/public/javascripts/effects.js",
110
+ "spec/dummy/public/javascripts/prototype.js",
111
+ "spec/dummy/public/javascripts/rails.js",
112
+ "spec/dummy/public/stylesheets/.gitkeep",
113
+ "spec/dummy/script/rails",
114
+ "spec/fabricators/categories_fabricator.rb",
115
+ "spec/fabricators/posts_fabricator.rb",
116
+ "spec/fabricators/profiles_fabricator.rb",
117
+ "spec/fabricators/tags_fabricator.rb",
118
+ "spec/fabricators/users_fabricator.rb",
119
+ "spec/integration/navigation_spec.rb",
120
+ "spec/lib/params_spec.rb",
121
+ "spec/lib/render_fallback_spec.rb",
122
+ "spec/lib/resource/routing_spec.rb",
123
+ "spec/lib/resource_spec.rb",
124
+ "spec/puffer_spec.rb",
125
+ "spec/spec_helper.rb"
126
+ ]
127
+ s.homepage = %q{http://github.com/puffer/puffer}
128
+ s.require_paths = ["lib"]
129
+ s.rubygems_version = %q{1.3.7}
130
+ s.summary = %q{Admin interface builder}
131
+ s.test_files = [
132
+ "spec/dummy/app/controllers/admin/categories_controller.rb",
133
+ "spec/dummy/app/controllers/admin/posts_controller.rb",
134
+ "spec/dummy/app/controllers/admin/profiles_controller.rb",
135
+ "spec/dummy/app/controllers/admin/tags_controller.rb",
136
+ "spec/dummy/app/controllers/admin/users_controller.rb",
137
+ "spec/dummy/app/controllers/application_controller.rb",
138
+ "spec/dummy/app/helpers/application_helper.rb",
139
+ "spec/dummy/app/models/category.rb",
140
+ "spec/dummy/app/models/post.rb",
141
+ "spec/dummy/app/models/post_category.rb",
142
+ "spec/dummy/app/models/profile.rb",
143
+ "spec/dummy/app/models/tag.rb",
144
+ "spec/dummy/app/models/tagging.rb",
145
+ "spec/dummy/app/models/user.rb",
146
+ "spec/dummy/config/application.rb",
147
+ "spec/dummy/config/boot.rb",
148
+ "spec/dummy/config/environment.rb",
149
+ "spec/dummy/config/environments/development.rb",
150
+ "spec/dummy/config/environments/production.rb",
151
+ "spec/dummy/config/environments/test.rb",
152
+ "spec/dummy/config/initializers/backtrace_silencers.rb",
153
+ "spec/dummy/config/initializers/inflections.rb",
154
+ "spec/dummy/config/initializers/mime_types.rb",
155
+ "spec/dummy/config/initializers/secret_token.rb",
156
+ "spec/dummy/config/initializers/session_store.rb",
157
+ "spec/dummy/config/routes.rb",
158
+ "spec/dummy/db/migrate/20100930132559_create_admin_users.rb",
159
+ "spec/dummy/db/migrate/20100930132656_create_admin_posts.rb",
160
+ "spec/dummy/db/migrate/20100930132726_create_admin_categories.rb",
161
+ "spec/dummy/db/migrate/20100930132837_create_post_categories.rb",
162
+ "spec/dummy/db/migrate/20100930133425_create_admin_profiles.rb",
163
+ "spec/dummy/db/migrate/20101011155830_create_tags.rb",
164
+ "spec/dummy/db/migrate/20101011160326_create_taggings.rb",
165
+ "spec/dummy/db/schema.rb",
166
+ "spec/fabricators/categories_fabricator.rb",
167
+ "spec/fabricators/posts_fabricator.rb",
168
+ "spec/fabricators/profiles_fabricator.rb",
169
+ "spec/fabricators/tags_fabricator.rb",
170
+ "spec/fabricators/users_fabricator.rb",
171
+ "spec/integration/navigation_spec.rb",
172
+ "spec/lib/params_spec.rb",
173
+ "spec/lib/render_fallback_spec.rb",
174
+ "spec/lib/resource/routing_spec.rb",
175
+ "spec/lib/resource_spec.rb",
176
+ "spec/puffer_spec.rb",
177
+ "spec/spec_helper.rb"
178
+ ]
179
+
180
+ if s.respond_to? :specification_version then
181
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
182
+ s.specification_version = 3
183
+
184
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
185
+ s.add_runtime_dependency(%q<rails>, [">= 0"])
186
+ s.add_runtime_dependency(%q<capybara>, [">= 0.4.0"])
187
+ s.add_runtime_dependency(%q<sqlite3-ruby>, [">= 0"])
188
+ s.add_runtime_dependency(%q<will_paginate>, ["~> 3.0.beta"])
189
+ s.add_runtime_dependency(%q<rspec-rails>, [">= 0"])
190
+ s.add_runtime_dependency(%q<autotest>, [">= 0"])
191
+ s.add_runtime_dependency(%q<forgery>, [">= 0"])
192
+ s.add_runtime_dependency(%q<fabrication>, [">= 0"])
193
+ s.add_runtime_dependency(%q<jeweler>, [">= 0"])
194
+ else
195
+ s.add_dependency(%q<rails>, [">= 0"])
196
+ s.add_dependency(%q<capybara>, [">= 0.4.0"])
197
+ s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
198
+ s.add_dependency(%q<will_paginate>, ["~> 3.0.beta"])
199
+ s.add_dependency(%q<rspec-rails>, [">= 0"])
200
+ s.add_dependency(%q<autotest>, [">= 0"])
201
+ s.add_dependency(%q<forgery>, [">= 0"])
202
+ s.add_dependency(%q<fabrication>, [">= 0"])
203
+ s.add_dependency(%q<jeweler>, [">= 0"])
204
+ end
205
+ else
206
+ s.add_dependency(%q<rails>, [">= 0"])
207
+ s.add_dependency(%q<capybara>, [">= 0.4.0"])
208
+ s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
209
+ s.add_dependency(%q<will_paginate>, ["~> 3.0.beta"])
210
+ s.add_dependency(%q<rspec-rails>, [">= 0"])
211
+ s.add_dependency(%q<autotest>, [">= 0"])
212
+ s.add_dependency(%q<forgery>, [">= 0"])
213
+ s.add_dependency(%q<fabrication>, [">= 0"])
214
+ s.add_dependency(%q<jeweler>, [">= 0"])
215
+ end
216
+ end
217
+
@@ -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
+ Dummy::Application.load_tasks
@@ -0,0 +1,3 @@
1
+ class Admin::CategoriesController < Puffer::Base
2
+
3
+ end
@@ -0,0 +1,3 @@
1
+ class Admin::PostsController < Puffer::Base
2
+
3
+ end
@@ -0,0 +1,3 @@
1
+ class Admin::ProfilesController < Puffer::Base
2
+
3
+ end
@@ -0,0 +1,3 @@
1
+ class Admin::TagsController < Puffer::Base
2
+
3
+ end
@@ -0,0 +1,13 @@
1
+ class Admin::UsersController < Puffer::Base
2
+
3
+ index do
4
+ field :email
5
+ field :password
6
+ end
7
+
8
+ form do
9
+ field :email
10
+ field :password
11
+ end
12
+
13
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,4 @@
1
+ class Category < ActiveRecord::Base
2
+ has_many :post_categories
3
+ has_many :posts, :through => :post_categories
4
+ end
@@ -0,0 +1,7 @@
1
+ class Post < ActiveRecord::Base
2
+ has_many :post_categories
3
+ has_many :categories, :through => :post_categories
4
+ has_many :taggings, :as => :taggable
5
+ has_many :tags, :through => :taggings
6
+ belongs_to :user
7
+ end
@@ -0,0 +1,4 @@
1
+ class PostCategory < ActiveRecord::Base
2
+ belongs_to :post
3
+ belongs_to :category
4
+ end
@@ -0,0 +1,5 @@
1
+ class Profile < ActiveRecord::Base
2
+ belongs_to :user
3
+ has_many :taggings, :as => :taggable
4
+ has_many :tags, :through => :taggings
5
+ end
@@ -0,0 +1,3 @@
1
+ class Tag < ActiveRecord::Base
2
+ has_many :taggings
3
+ end
@@ -0,0 +1,4 @@
1
+ class Tagging < ActiveRecord::Base
2
+ belongs_to :tag
3
+ belongs_to :taggable, :polymorphic => true
4
+ end
@@ -0,0 +1,4 @@
1
+ class User < ActiveRecord::Base
2
+ has_one :profile
3
+ has_many :posts
4
+ 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,45 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require "active_model/railtie"
4
+ require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ require "action_view/railtie"
7
+ require "action_mailer/railtie"
8
+
9
+ Bundler.require
10
+ require "puffer"
11
+
12
+ module Dummy
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
+ # JavaScript files you want as :defaults (application.js is always included).
37
+ # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
38
+
39
+ # Configure the default encoding used in templates for Ruby 1.9.
40
+ config.encoding = "utf-8"
41
+
42
+ # Configure sensitive parameters which will be filtered from the log file.
43
+ config.filter_parameters += [:password]
44
+ end
45
+ end
@@ -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,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