inkwell 0.0.3 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/models/inkwell/comment.rb +23 -3
- data/lib/acts_as_inkwell_post/base.rb +23 -3
- data/lib/acts_as_inkwell_user/base.rb +26 -15
- data/lib/inkwell/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +5 -0
- data/test/dummy/log/test.log +28689 -0
- data/test/dummy/spec/functional/blogline_spec.rb +1 -1
- data/test/dummy/spec/functional/comments_spec.rb +34 -13
- data/test/dummy/spec/functional/favorite_spec.rb +26 -3
- data/test/dummy/spec/functional/reblog_spec.rb +27 -1
- data/test/dummy/spec/functional/timeline_spec.rb +2 -2
- data/test/dummy_without_community/Rakefile +7 -0
- data/test/dummy_without_community/app/assets/javascripts/application.js +9 -0
- data/test/dummy_without_community/app/assets/stylesheets/application.css +7 -0
- data/test/dummy_without_community/app/controllers/application_controller.rb +3 -0
- data/test/dummy_without_community/app/helpers/application_helper.rb +2 -0
- data/test/dummy_without_community/app/models/post.rb +6 -0
- data/test/dummy_without_community/app/models/user.rb +7 -0
- data/test/dummy_without_community/app/views/layouts/application.html.erb +14 -0
- data/test/dummy_without_community/config.ru +4 -0
- data/test/dummy_without_community/config/application.rb +51 -0
- data/test/dummy_without_community/config/boot.rb +10 -0
- data/test/dummy_without_community/config/database.yml +25 -0
- data/test/dummy_without_community/config/environment.rb +5 -0
- data/test/dummy_without_community/config/environments/development.rb +30 -0
- data/test/dummy_without_community/config/environments/production.rb +60 -0
- data/test/dummy_without_community/config/environments/test.rb +42 -0
- data/test/dummy_without_community/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy_without_community/config/initializers/inflections.rb +10 -0
- data/test/dummy_without_community/config/initializers/inkwell.rb +6 -0
- data/test/dummy_without_community/config/initializers/mime_types.rb +5 -0
- data/test/dummy_without_community/config/initializers/secret_token.rb +7 -0
- data/test/dummy_without_community/config/initializers/session_store.rb +8 -0
- data/test/dummy_without_community/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy_without_community/config/locales/en.yml +5 -0
- data/test/dummy_without_community/config/routes.rb +4 -0
- data/test/dummy_without_community/db/migrate/20121202111750_create_posts.rb +11 -0
- data/test/dummy_without_community/db/migrate/20121202112556_create_users.rb +9 -0
- data/test/dummy_without_community/db/migrate/20130120124010_create_inkwell_timeline_items.rb +13 -0
- data/test/dummy_without_community/db/migrate/20130120124011_add_columns_to_posts.rb +7 -0
- data/test/dummy_without_community/db/migrate/20130120124012_create_inkwell_blog_items.rb +12 -0
- data/test/dummy_without_community/db/migrate/20130120124013_create_inkwell_favorite_items.rb +11 -0
- data/test/dummy_without_community/db/migrate/20130120124014_add_columns_to_users.rb +6 -0
- data/test/dummy_without_community/db/migrate/20130120124015_create_inkwell_comments.rb +16 -0
- data/test/dummy_without_community/db/schema.rb +75 -0
- data/test/dummy_without_community/db/seeds.rb +7 -0
- data/test/dummy_without_community/public/404.html +26 -0
- data/test/dummy_without_community/public/422.html +26 -0
- data/test/dummy_without_community/public/500.html +26 -0
- data/test/dummy_without_community/public/favicon.ico +0 -0
- data/test/dummy_without_community/script/rails +6 -0
- data/test/dummy_without_community/spec/functional/blogline_spec.rb +70 -0
- data/test/dummy_without_community/spec/functional/comments_spec.rb +416 -0
- data/test/dummy_without_community/spec/functional/favorite_spec.rb +259 -0
- data/test/dummy_without_community/spec/functional/following_spec.rb +120 -0
- data/test/dummy_without_community/spec/functional/reblog_spec.rb +179 -0
- data/test/dummy_without_community/spec/functional/timeline_spec.rb +68 -0
- data/test/dummy_without_community/spec/spec_helper.rb +52 -0
- metadata +96 -2
@@ -47,7 +47,7 @@ describe "BlogLine" do
|
|
47
47
|
@morozovm.reblog @salkar_post9
|
48
48
|
@morozovm.favorite @salkar_post9
|
49
49
|
|
50
|
-
bline = @salkar.blogline
|
50
|
+
bline = @salkar.blogline :for_user => @morozovm
|
51
51
|
bline.size.should == 10
|
52
52
|
bline[0].should == @morozovm_post2
|
53
53
|
bline[0].is_reblog_in_blogline.should == true
|
@@ -59,7 +59,7 @@ describe "Comments" do
|
|
59
59
|
commentline[0].id.should == @comment2.id
|
60
60
|
commentline[9].id.should == @comment11.id
|
61
61
|
|
62
|
-
commentline = @salkar_post.commentline @comment10.id
|
62
|
+
commentline = @salkar_post.commentline :last_shown_comment_id => @comment10.id
|
63
63
|
commentline.size.should == 10
|
64
64
|
commentline[0].id.should == @comment.id
|
65
65
|
commentline[9].id.should == @comment9.id
|
@@ -80,17 +80,17 @@ describe "Comments" do
|
|
80
80
|
@comment10 = @salkar.comments.create(:body => 'Lets You Party Like a Facebook User', :post_id => @salkar_post.id)
|
81
81
|
@comment11 = @morozovm.comments.create(:body => 'Lets You Party Like a Facebook User', :post_id => @salkar_post.id)
|
82
82
|
|
83
|
-
commentline = @salkar_post.commentline
|
83
|
+
commentline = @salkar_post.commentline :limit => 5
|
84
84
|
commentline.size.should == 5
|
85
85
|
commentline[0].id.should == @comment7.id
|
86
86
|
commentline[4].id.should == @comment11.id
|
87
87
|
|
88
|
-
commentline = @salkar_post.commentline @comment10.id, 5
|
88
|
+
commentline = @salkar_post.commentline :last_shown_comment_id => @comment10.id, :limit => 5
|
89
89
|
commentline.size.should == 5
|
90
90
|
commentline[0].id.should == @comment5.id
|
91
91
|
commentline[4].id.should == @comment9.id
|
92
92
|
|
93
|
-
commentline = @salkar_post.commentline @comment5.id, 7
|
93
|
+
commentline = @salkar_post.commentline :last_shown_comment_id => @comment5.id, :limit => 7
|
94
94
|
commentline.size.should == 5
|
95
95
|
commentline[0].id.should == @comment.id
|
96
96
|
commentline[4].id.should == @comment4.id
|
@@ -284,7 +284,7 @@ describe "Comments" do
|
|
284
284
|
commentline[0].id.should == @comment2.id
|
285
285
|
commentline[9].id.should == @comment11.id
|
286
286
|
|
287
|
-
commentline = @salkar_post.commentline @comment10.id
|
287
|
+
commentline = @salkar_post.commentline :last_shown_comment_id => @comment10.id
|
288
288
|
commentline.size.should == 10
|
289
289
|
commentline[0].id.should == @comment.id
|
290
290
|
commentline[9].id.should == @comment9.id
|
@@ -310,7 +310,7 @@ describe "Comments" do
|
|
310
310
|
commentline[0].id.should == @comment2.id
|
311
311
|
commentline[9].id.should == @comment11.id
|
312
312
|
|
313
|
-
commentline = @salkar_post.commentline @comment10.id
|
313
|
+
commentline = @salkar_post.commentline :last_shown_comment_id => @comment10.id
|
314
314
|
commentline.size.should == 10
|
315
315
|
commentline[0].id.should == @comment.id
|
316
316
|
commentline[9].id.should == @comment9.id
|
@@ -331,19 +331,19 @@ describe "Comments" do
|
|
331
331
|
@comment11 = @morozovm.comments.create(:body => 'Lets You Party Like a Facebook User', :post_id => @salkar_post.id, :parent_id => @comment.id)
|
332
332
|
|
333
333
|
@comment.reload
|
334
|
-
commentline = @comment.commentline
|
334
|
+
commentline = @comment.commentline :limit => 5
|
335
335
|
commentline.size.should == 5
|
336
336
|
commentline[0].id.should == @comment7.id
|
337
337
|
commentline[4].id.should == @comment11.id
|
338
338
|
|
339
339
|
@comment.reload
|
340
|
-
commentline = @comment.commentline @comment10.id, 5
|
340
|
+
commentline = @comment.commentline :last_shown_comment_id => @comment10.id, :limit => 5
|
341
341
|
commentline.size.should == 5
|
342
342
|
commentline[0].id.should == @comment5.id
|
343
343
|
commentline[4].id.should == @comment9.id
|
344
344
|
|
345
345
|
@comment.reload
|
346
|
-
commentline = @comment.commentline @comment5.id, 7
|
346
|
+
commentline = @comment.commentline :last_shown_comment_id => @comment5.id, :limit => 7
|
347
347
|
commentline.size.should == 4
|
348
348
|
commentline[0].id.should == @comment1.id
|
349
349
|
commentline[3].id.should == @comment4.id
|
@@ -357,13 +357,13 @@ describe "Comments" do
|
|
357
357
|
@morozovm.favorite @comment2
|
358
358
|
|
359
359
|
@comment.reload
|
360
|
-
commentline = @comment.commentline
|
360
|
+
commentline = @comment.commentline :for_user => @salkar
|
361
361
|
commentline[0].id.should == @comment1.id
|
362
362
|
commentline[0].is_favorited.should == true
|
363
363
|
commentline[1].id.should == @comment2.id
|
364
364
|
commentline[1].is_favorited.should == false
|
365
365
|
|
366
|
-
commentline = @comment.commentline
|
366
|
+
commentline = @comment.commentline :for_user => @morozovm
|
367
367
|
commentline[0].id.should == @comment1.id
|
368
368
|
commentline[0].is_favorited.should == false
|
369
369
|
commentline[1].id.should == @comment2.id
|
@@ -378,18 +378,39 @@ describe "Comments" do
|
|
378
378
|
@morozovm.favorite @comment2
|
379
379
|
|
380
380
|
@salkar_post.reload
|
381
|
-
commentline = @salkar_post.commentline
|
381
|
+
commentline = @salkar_post.commentline :for_user => @salkar
|
382
382
|
commentline[1].id.should == @comment1.id
|
383
383
|
commentline[1].is_favorited.should == true
|
384
384
|
commentline[2].id.should == @comment2.id
|
385
385
|
commentline[2].is_favorited.should == false
|
386
386
|
|
387
|
-
commentline = @salkar_post.commentline
|
387
|
+
commentline = @salkar_post.commentline :for_user => @morozovm
|
388
388
|
commentline[1].id.should == @comment1.id
|
389
389
|
commentline[1].is_favorited.should == false
|
390
390
|
commentline[2].id.should == @comment2.id
|
391
391
|
commentline[2].is_favorited.should == true
|
392
392
|
end
|
393
393
|
|
394
|
+
it "comment count for post should been received" do
|
395
|
+
@salkar_post.comments.size.should == 0
|
396
|
+
@salkar_post.comment_count.should == 0
|
397
|
+
@comment = @salkar.comments.create(:body => 'Lets You Party Like a Facebook User', :post_id => @salkar_post.id)
|
398
|
+
@comment1 = @morozovm.comments.create(:body => 'Lets You Party Like a Facebook User', :post_id => @salkar_post.id, :parent_id => @comment.id)
|
399
|
+
@comment2 = @salkar.comments.create(:body => 'Lets You Party Like a Facebook User', :post_id => @salkar_post.id, :parent_id => @comment.id)
|
400
|
+
@salkar_post.reload
|
401
|
+
@salkar_post.comments.size.should == 3
|
402
|
+
@salkar_post.comment_count.should == 3
|
403
|
+
end
|
404
|
+
|
405
|
+
it "comment count for comment should been received" do
|
406
|
+
@comment = @salkar.comments.create(:body => 'Lets You Party Like a Facebook User', :post_id => @salkar_post.id)
|
407
|
+
@comment.reload
|
408
|
+
@comment.comment_count.should == 0
|
409
|
+
@comment1 = @morozovm.comments.create(:body => 'Lets You Party Like a Facebook User', :post_id => @salkar_post.id, :parent_id => @comment.id)
|
410
|
+
@comment2 = @salkar.comments.create(:body => 'Lets You Party Like a Facebook User', :post_id => @salkar_post.id, :parent_id => @comment.id)
|
411
|
+
@comment.reload
|
412
|
+
@comment.comment_count.should == 2
|
413
|
+
end
|
414
|
+
|
394
415
|
|
395
416
|
end
|
@@ -159,8 +159,11 @@ describe "Favorites" do
|
|
159
159
|
fline[9].class.to_s.should == 'Inkwell::Comment'
|
160
160
|
fline[9].item_id_in_line.should == ::Inkwell::FavoriteItem.find_by_item_id_and_is_comment(@morozovm_comment.id, true).id
|
161
161
|
|
162
|
+
fline_same = @salkar.favoriteline :last_shown_obj_id => nil, :limit => 10, :for_user => nil
|
163
|
+
fline_same.should == fline
|
164
|
+
|
162
165
|
from_favorite_item_id = ::Inkwell::FavoriteItem.find_by_item_id_and_is_comment(@morozovm_comment2.id, true).id
|
163
|
-
fline = @salkar.favoriteline(from_favorite_item_id)
|
166
|
+
fline = @salkar.favoriteline(:last_shown_obj_id => from_favorite_item_id)
|
164
167
|
fline.size.should == 10
|
165
168
|
fline[0].id.should == @salkar_comment4.id
|
166
169
|
fline[0].class.to_s.should == 'Inkwell::Comment'
|
@@ -170,7 +173,7 @@ describe "Favorites" do
|
|
170
173
|
fline[9].item_id_in_line.should == ::Inkwell::FavoriteItem.find_by_item_id_and_is_comment(@salkar_comment.id, true).id
|
171
174
|
|
172
175
|
from_favorite_item_id = ::Inkwell::FavoriteItem.find_by_item_id_and_is_comment(@morozovm_comment2.id, true).id
|
173
|
-
fline = @salkar.favoriteline(from_favorite_item_id, 5)
|
176
|
+
fline = @salkar.favoriteline(:last_shown_obj_id => from_favorite_item_id, :limit => 5)
|
174
177
|
fline.size.should == 5
|
175
178
|
fline[0].id.should == @salkar_comment4.id
|
176
179
|
fline[0].class.to_s.should == 'Inkwell::Comment'
|
@@ -214,7 +217,7 @@ describe "Favorites" do
|
|
214
217
|
@morozovm.reblog @salkar_post1
|
215
218
|
|
216
219
|
|
217
|
-
fline = @salkar.favoriteline(
|
220
|
+
fline = @salkar.favoriteline(:for_user => @morozovm)
|
218
221
|
fline.size.should == 10
|
219
222
|
fline[0].id.should == @salkar_post1.id
|
220
223
|
fline[0].class.to_s.should == 'Post'
|
@@ -233,4 +236,24 @@ describe "Favorites" do
|
|
233
236
|
end
|
234
237
|
end
|
235
238
|
|
239
|
+
it "favorite count should been received for post" do
|
240
|
+
@talisman = User.create :nick => "Talisman"
|
241
|
+
@salkar_post.reload
|
242
|
+
@salkar_post.favorite_count.should == 0
|
243
|
+
@morozovm.favorite @salkar_post
|
244
|
+
@talisman.favorite @salkar_post
|
245
|
+
@salkar_post.reload
|
246
|
+
@salkar_post.favorite_count.should == 2
|
247
|
+
end
|
248
|
+
|
249
|
+
it "favorite count should been received for post" do
|
250
|
+
@talisman = User.create :nick => "Talisman"
|
251
|
+
@salkar_comment.reload
|
252
|
+
@salkar_comment.favorite_count.should == 0
|
253
|
+
@morozovm.favorite @salkar_comment
|
254
|
+
@talisman.favorite @salkar_comment
|
255
|
+
@salkar_comment.reload
|
256
|
+
@salkar_comment.favorite_count.should == 2
|
257
|
+
end
|
258
|
+
|
236
259
|
end
|
@@ -108,15 +108,18 @@ describe "Reblog" do
|
|
108
108
|
it "timeline items should delete for followers when user unreblog post" do
|
109
109
|
@talisman = User.create :nick => "Talisman"
|
110
110
|
@talisman.follow @morozovm
|
111
|
+
@morozovm_post = @morozovm.posts.create :body => "morozovm_post_test_body"
|
111
112
|
@morozovm.reblog @salkar_post
|
112
113
|
|
114
|
+
@talisman.timeline_items.size.should == 2
|
113
115
|
@talisman.timeline_items.where(:item_id => @salkar_post, :is_comment => false).size.should == 1
|
114
|
-
item = @talisman.timeline_items.first
|
116
|
+
item = @talisman.timeline_items.where(:item_id => @salkar_post, :is_comment => false).first
|
115
117
|
item.has_many_sources.should == false
|
116
118
|
item.from_source.should == ActiveSupport::JSON.encode([{'user_id' => @morozovm.id, 'type' => 'reblog'}])
|
117
119
|
|
118
120
|
@morozovm.unreblog @salkar_post
|
119
121
|
@talisman.timeline_items.where(:item_id => @salkar_post, :is_comment => false).size.should == 0
|
122
|
+
@talisman.timeline_items.size.should == 1
|
120
123
|
end
|
121
124
|
|
122
125
|
it "timeline items should delete for followers when user unreblog comment" do
|
@@ -138,6 +141,8 @@ describe "Reblog" do
|
|
138
141
|
@talisman.reblog @salkar_post
|
139
142
|
@morozovm.follow @talisman
|
140
143
|
@morozovm.follow @salkar
|
144
|
+
@talisman_post = @talisman.posts.create :body => "talisman_post_test_body"
|
145
|
+
@morozovm.timeline_items.size == 2
|
141
146
|
@morozovm.timeline_items.where(:item_id => @salkar_post, :is_comment => false).size.should == 1
|
142
147
|
item = @morozovm.timeline_items.where(:item_id => @salkar_post, :is_comment => false).first
|
143
148
|
item.from_source.should == ActiveSupport::JSON.encode([{'user_id' => @talisman.id, 'type' => 'reblog'}, {'user_id' => @salkar.id, 'type' => 'following'}])
|
@@ -148,6 +153,27 @@ describe "Reblog" do
|
|
148
153
|
item = @morozovm.timeline_items.where(:item_id => @salkar_post, :is_comment => false).first
|
149
154
|
item.from_source.should == ActiveSupport::JSON.encode([{'user_id' => @salkar.id, 'type' => 'following'}])
|
150
155
|
item.has_many_sources.should == false
|
156
|
+
@morozovm.timeline_items.size == 2
|
157
|
+
end
|
158
|
+
|
159
|
+
it "reblog count should been received for post" do
|
160
|
+
@talisman = User.create :nick => "Talisman"
|
161
|
+
@salkar_post.reload
|
162
|
+
@salkar_post.reblog_count.should == 0
|
163
|
+
@morozovm.reblog @salkar_post
|
164
|
+
@talisman.reblog @salkar_post
|
165
|
+
@salkar_post.reload
|
166
|
+
@salkar_post.reblog_count.should == 2
|
167
|
+
end
|
168
|
+
|
169
|
+
it "reblog count should been received for post" do
|
170
|
+
@talisman = User.create :nick => "Talisman"
|
171
|
+
@salkar_comment.reload
|
172
|
+
@salkar_comment.reblog_count.should == 0
|
173
|
+
@morozovm.reblog @salkar_comment
|
174
|
+
@talisman.reblog @salkar_comment
|
175
|
+
@salkar_comment.reload
|
176
|
+
@salkar_comment.reblog_count.should == 2
|
151
177
|
end
|
152
178
|
|
153
179
|
end
|
@@ -32,7 +32,7 @@ describe "Timeline" do
|
|
32
32
|
@talisman.follow @morozovm
|
33
33
|
@talisman.reload
|
34
34
|
|
35
|
-
tline = @talisman.timeline(
|
35
|
+
tline = @talisman.timeline(:for_user => @salkar)
|
36
36
|
tline.size.should == 10
|
37
37
|
tline[0].should == @morozovm_post2
|
38
38
|
tline[1].should == @morozovm_post1
|
@@ -58,7 +58,7 @@ describe "Timeline" do
|
|
58
58
|
@morozovm.reblog @salkar_comment
|
59
59
|
@morozovm.favorite @salkar_comment
|
60
60
|
@talisman.reload
|
61
|
-
tline = @talisman.timeline(nil, 10
|
61
|
+
tline = @talisman.timeline(:last_shown_obj_id => nil, :limit => 10,:for_user => @morozovm)
|
62
62
|
tline.size.should == 1
|
63
63
|
tline[0].should == @salkar_comment
|
64
64
|
tline[0].is_reblogged.should == true
|
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
+
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
+
// the compiled file.
|
6
|
+
//
|
7
|
+
//= require jquery
|
8
|
+
//= require jquery_ujs
|
9
|
+
//= require_tree .
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*= require_self
|
6
|
+
*= require_tree .
|
7
|
+
*/
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require
|
6
|
+
require "inkwell"
|
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
|
+
# Enable the asset pipeline
|
39
|
+
config.assets.enabled = true
|
40
|
+
|
41
|
+
# Version of your assets, change this if you want to expire all your assets
|
42
|
+
config.assets.version = '1.0'
|
43
|
+
|
44
|
+
# Enforce whitelist mode for mass assignment.
|
45
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
46
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
47
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
48
|
+
config.active_record.whitelist_attributes = true
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
@@ -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,30 @@
|
|
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
|
+
# Do not compress assets
|
26
|
+
config.assets.compress = false
|
27
|
+
|
28
|
+
# Expands the lines which load the assets
|
29
|
+
config.assets.debug = true
|
30
|
+
end
|