feeder 0.3.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +119 -2
  3. data/app/controllers/feeder/application_controller.rb +1 -1
  4. data/app/controllers/feeder/items_controller.rb +7 -0
  5. data/app/models/feeder/feedable_observer.rb +43 -7
  6. data/app/models/feeder/item.rb +2 -6
  7. data/app/views/feeder/items/_item.html.erb +1 -1
  8. data/app/views/feeder/items/_item.json.jbuilder +1 -0
  9. data/app/views/feeder/{feeds → items}/index.html.erb +1 -1
  10. data/app/views/feeder/items/index.json.jbuilder +1 -0
  11. data/config/routes.rb +1 -1
  12. data/db/migrate/20140321085409_add_sticky_to_feeder_items.rb +5 -0
  13. data/db/migrate/20140401131911_prohibit_null_on_feeder_item_stickies.rb +13 -0
  14. data/db/migrate/20140526110451_add_blocked_to_feeder_items.rb +5 -0
  15. data/db/migrate/20140526110501_add_reported_to_feeder_items.rb +5 -0
  16. data/lib/feeder.rb +18 -2
  17. data/lib/feeder/active_record.rb +9 -0
  18. data/lib/feeder/concerns.rb +6 -0
  19. data/lib/feeder/concerns/controllers.rb +5 -0
  20. data/lib/feeder/concerns/controllers/items_controller.rb +22 -0
  21. data/lib/feeder/concerns/feedable.rb +27 -0
  22. data/lib/feeder/concerns/helpers.rb +5 -0
  23. data/lib/feeder/concerns/helpers/filter.rb +20 -0
  24. data/lib/feeder/concerns/models.rb +5 -0
  25. data/lib/feeder/concerns/models/item.rb +31 -0
  26. data/lib/feeder/configuration.rb +19 -5
  27. data/lib/feeder/engine.rb +3 -2
  28. data/lib/feeder/version.rb +1 -1
  29. data/spec/controllers/feeder/items_controller_spec.rb +36 -0
  30. data/spec/dummy/app/models/message.rb +2 -0
  31. data/spec/dummy/config/initializers/feeder.rb +1 -1
  32. data/spec/dummy/db/development.sqlite3 +0 -0
  33. data/spec/dummy/db/schema.rb +4 -1
  34. data/spec/dummy/db/test.sqlite3 +0 -0
  35. data/spec/dummy/log/development.log +359 -0
  36. data/spec/dummy/log/test.log +53050 -0
  37. data/spec/factories/feeder/items.rb +10 -0
  38. data/spec/lib/feeder/concerns/feedable_spec.rb +33 -0
  39. data/spec/lib/feeder/configuration_spec.rb +6 -6
  40. data/spec/lib/feeder_spec.rb +14 -2
  41. data/spec/models/feeder/feedable_observer_spec.rb +95 -0
  42. data/spec/models/feeder/item_spec.rb +38 -0
  43. data/spec/spec_helper.rb +4 -0
  44. data/spec/support/shared_examples/filterable.rb +48 -0
  45. metadata +97 -39
  46. data/app/controllers/feeder/feeds_controller.rb +0 -9
  47. data/app/views/layouts/feeder/application.html.erb +0 -14
  48. data/spec/controllers/feeder/feeds_controller_spec.rb +0 -27
@@ -1,15 +1,29 @@
1
1
  module Feeder
2
2
  class Configuration
3
- attr_accessor :sort_order
4
- attr_reader :observables
3
+ attr_accessor :scopes
4
+ attr_accessor :observables
5
5
 
6
6
  def initialize
7
- @sort_order = { created_at: :desc }
8
- @observables = []
7
+ @scopes = [
8
+ proc { order created_at: :desc }
9
+ ]
10
+
11
+ @observables = {}
9
12
  end
10
13
 
11
14
  def add_observable(observable)
12
- @observables << observable
15
+ warn "[DEPRECATION] Feeder::Configuration.add_observable is deprecated. Please use Feeder::Configuration.observe instead."
16
+
17
+ observe observable
18
+ end
19
+
20
+ # Add an observable.
21
+ #
22
+ # observable - A model to observe.
23
+ # options - A Hash of options:
24
+ # :if - A lambda returning a boolean whether to create a feed item.
25
+ def observe(observable, options = {})
26
+ @observables[observable] = options
13
27
  end
14
28
  end
15
29
  end
@@ -4,7 +4,8 @@ module Feeder
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace Feeder
6
6
 
7
- config.active_record.observers ||= []
8
- config.active_record.observers << 'Feeder::FeedableObserver'
7
+ initializer 'tasks.factories', after: 'factory_girl.set_factory_paths' do
8
+ FactoryGirl.definition_file_paths << File.expand_path('../../../spec/factories', __FILE__) if defined?(FactoryGirl)
9
+ end
9
10
  end
10
11
  end
@@ -1,3 +1,3 @@
1
1
  module Feeder
2
- VERSION = "0.3.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+
3
+ module Feeder
4
+ describe ItemsController do
5
+ routes { Feeder::Engine.routes }
6
+
7
+ describe "GET 'index'" do
8
+ let!(:items) do
9
+ create_list :feeder_item, 50
10
+ end
11
+
12
+ it "returns http success" do
13
+ get :index
14
+ expect(response).to be_successful
15
+ end
16
+
17
+ context 'with a limit' do
18
+ it 'loads the given amount of items' do
19
+ get :index, limit: 5
20
+ expect(assigns(:items).count).to eq 5
21
+ end
22
+ end
23
+
24
+ context 'with stickies' do
25
+ let!(:sticky) { create :feeder_item, :sticky, published_at: 2.day.ago }
26
+ let!(:other) { create :feeder_item, published_at: 1.day.ago }
27
+
28
+ it 'places stickies first' do
29
+ get :index
30
+ expect(assigns(:items).first).to eq sticky
31
+ end
32
+ end
33
+ end
34
+
35
+ end
36
+ end
@@ -1,3 +1,5 @@
1
1
  class Message < ActiveRecord::Base
2
2
  has_one :feeder_item, as: :feedable, class_name: 'Feeder::Item'
3
+
4
+ feedable
3
5
  end
@@ -1,3 +1,3 @@
1
1
  Feeder.configure do |config|
2
- config.add_observable "Message"
2
+ config.observe "Message"
3
3
  end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20140317152438) do
14
+ ActiveRecord::Schema.define(version: 20140526110501) do
15
15
 
16
16
  create_table "feeder_items", force: true do |t|
17
17
  t.datetime "published_at"
@@ -19,6 +19,9 @@ ActiveRecord::Schema.define(version: 20140317152438) do
19
19
  t.datetime "updated_at"
20
20
  t.integer "feedable_id"
21
21
  t.string "feedable_type"
22
+ t.boolean "sticky", default: false, null: false
23
+ t.boolean "blocked", default: false, null: false
24
+ t.boolean "reported", default: false, null: false
22
25
  end
23
26
 
24
27
  add_index "feeder_items", ["feedable_id", "feedable_type"], name: "index_feeder_items_on_feedable_id_and_feedable_type"
@@ -0,0 +1,359 @@
1
+  (1.3ms) CREATE TABLE "feeder_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "published_at" datetime, "created_at" datetime, "updated_at" datetime, "feedable_id" integer, "feedable_type" varchar(255), "sticky" boolean DEFAULT 'f' NOT NULL) 
2
+  (0.9ms) CREATE INDEX "index_feeder_items_on_feedable_id_and_feedable_type" ON "feeder_items" ("feedable_id", "feedable_type")
3
+  (0.9ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "header" varchar(255), "body" text, "created_at" datetime, "updated_at" datetime) 
4
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
5
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6
+  (0.1ms) SELECT version FROM "schema_migrations"
7
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140401131911')
8
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152438')
9
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317150822')
10
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152137')
11
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140321085409')
12
+  (2.9ms) CREATE TABLE "feeder_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "published_at" datetime, "created_at" datetime, "updated_at" datetime, "feedable_id" integer, "feedable_type" varchar(255), "sticky" boolean DEFAULT 'f' NOT NULL) 
13
+  (1.0ms) CREATE INDEX "index_feeder_items_on_feedable_id_and_feedable_type" ON "feeder_items" ("feedable_id", "feedable_type")
14
+  (0.9ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "header" varchar(255), "body" text, "created_at" datetime, "updated_at" datetime) 
15
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
16
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
17
+  (0.1ms) SELECT version FROM "schema_migrations"
18
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140401131911')
19
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152438')
20
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317150822')
21
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152137')
22
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140321085409')
23
+  (1.1ms) CREATE TABLE "feeder_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "published_at" datetime, "created_at" datetime, "updated_at" datetime, "feedable_id" integer, "feedable_type" varchar(255), "sticky" boolean DEFAULT 'f' NOT NULL) 
24
+  (1.0ms) CREATE INDEX "index_feeder_items_on_feedable_id_and_feedable_type" ON "feeder_items" ("feedable_id", "feedable_type")
25
+  (0.9ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "header" varchar(255), "body" text, "created_at" datetime, "updated_at" datetime) 
26
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
27
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
28
+  (0.1ms) SELECT version FROM "schema_migrations"
29
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140401131911')
30
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152438')
31
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317150822')
32
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152137')
33
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140321085409')
34
+  (2.9ms) CREATE TABLE "feeder_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "published_at" datetime, "created_at" datetime, "updated_at" datetime, "feedable_id" integer, "feedable_type" varchar(255), "sticky" boolean DEFAULT 'f' NOT NULL) 
35
+  (1.0ms) CREATE INDEX "index_feeder_items_on_feedable_id_and_feedable_type" ON "feeder_items" ("feedable_id", "feedable_type")
36
+  (0.8ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "header" varchar(255), "body" text, "created_at" datetime, "updated_at" datetime) 
37
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
38
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
39
+  (0.1ms) SELECT version FROM "schema_migrations"
40
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140401131911')
41
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152438')
42
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317150822')
43
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152137')
44
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140321085409')
45
+  (1.1ms) CREATE TABLE "feeder_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "published_at" datetime, "created_at" datetime, "updated_at" datetime, "feedable_id" integer, "feedable_type" varchar(255), "sticky" boolean DEFAULT 'f' NOT NULL) 
46
+  (0.7ms) CREATE INDEX "index_feeder_items_on_feedable_id_and_feedable_type" ON "feeder_items" ("feedable_id", "feedable_type")
47
+  (0.8ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "header" varchar(255), "body" text, "created_at" datetime, "updated_at" datetime) 
48
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
49
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
50
+  (0.1ms) SELECT version FROM "schema_migrations"
51
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140401131911')
52
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152438')
53
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317150822')
54
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152137')
55
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140321085409')
56
+  (1.3ms) CREATE TABLE "feeder_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "published_at" datetime, "created_at" datetime, "updated_at" datetime, "feedable_id" integer, "feedable_type" varchar(255), "sticky" boolean DEFAULT 'f' NOT NULL) 
57
+  (1.0ms) CREATE INDEX "index_feeder_items_on_feedable_id_and_feedable_type" ON "feeder_items" ("feedable_id", "feedable_type")
58
+  (1.0ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "header" varchar(255), "body" text, "created_at" datetime, "updated_at" datetime) 
59
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
60
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
61
+  (0.1ms) SELECT version FROM "schema_migrations"
62
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140401131911')
63
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152438')
64
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317150822')
65
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140317152137')
66
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140321085409')
67
+ Feeder::Item Load (0.4ms) SELECT "feeder_items".* FROM "feeder_items"
68
+ SQLite3::SQLException: no such table: feeder_items: SELECT "feeder_items".* FROM "feeder_items"
69
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
70
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
71
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
72
+ Migrating to CreateFeederItems (20140317150822)
73
+  (0.1ms) begin transaction
74
+  (0.5ms) CREATE TABLE "feeder_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "published_at" datetime, "created_at" datetime, "updated_at" datetime) 
75
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140317150822"]]
76
+  (0.8ms) commit transaction
77
+ Migrating to AddPolymorphicFeedableReferenceToFeederItems (20140317152137)
78
+  (0.1ms) begin transaction
79
+  (0.4ms) ALTER TABLE "feeder_items" ADD "feedable_id" integer
80
+  (0.1ms) ALTER TABLE "feeder_items" ADD "feedable_type" varchar(255)
81
+  (0.2ms) CREATE INDEX "index_feeder_items_on_feedable_id_and_feedable_type" ON "feeder_items" ("feedable_id", "feedable_type")
82
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140317152137"]]
83
+  (0.8ms) commit transaction
84
+ Migrating to CreateMessages (20140317152438)
85
+  (0.1ms) begin transaction
86
+  (0.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "header" varchar(255), "body" text, "created_at" datetime, "updated_at" datetime) 
87
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140317152438"]]
88
+  (0.8ms) commit transaction
89
+ Migrating to AddStickyToFeederItems (20140321085409)
90
+  (0.1ms) begin transaction
91
+  (0.5ms) ALTER TABLE "feeder_items" ADD "sticky" boolean DEFAULT 'f'
92
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140321085409"]]
93
+  (0.8ms) commit transaction
94
+ Migrating to ProhibitNullOnFeederItemStickies (20140401131911)
95
+  (0.1ms) begin transaction
96
+ SQL (0.1ms) UPDATE "feeder_items" SET "sticky" = 'f' WHERE "feeder_items"."sticky" IS NULL
97
+  (1.0ms) CREATE TEMPORARY TABLE "afeeder_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "published_at" datetime, "created_at" datetime, "updated_at" datetime, "feedable_id" integer, "feedable_type" varchar(255), "sticky" boolean DEFAULT 'f')
98
+  (0.1ms) CREATE INDEX "tindex_afeeder_items_on_feedable_id_and_feedable_type" ON "afeeder_items" ("feedable_id", "feedable_type")
99
+  (0.1ms) SELECT * FROM "feeder_items"
100
+  (0.3ms) DROP TABLE "feeder_items"
101
+  (0.1ms) CREATE TABLE "feeder_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "published_at" datetime, "created_at" datetime, "updated_at" datetime, "feedable_id" integer, "feedable_type" varchar(255), "sticky" boolean DEFAULT 'f' NOT NULL)
102
+  (0.1ms) CREATE INDEX "index_feeder_items_on_feedable_id_and_feedable_type" ON "feeder_items" ("feedable_id", "feedable_type")
103
+  (0.0ms) SELECT * FROM "afeeder_items"
104
+  (0.3ms) DROP TABLE "afeeder_items"
105
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140401131911"]]
106
+  (0.9ms) commit transaction
107
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
108
+ Feeder::Item Load (1.1ms) SELECT "feeder_items".* FROM "feeder_items"
109
+  (0.1ms) begin transaction
110
+ SQL (5.9ms) INSERT INTO "feeder_items" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Tue, 08 Apr 2014 13:05:11 UTC +00:00], ["updated_at", Tue, 08 Apr 2014 13:05:11 UTC +00:00]]
111
+  (0.8ms) commit transaction
112
+  (0.1ms) begin transaction
113
+ SQL (0.4ms) INSERT INTO "feeder_items" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Tue, 08 Apr 2014 13:05:13 UTC +00:00], ["updated_at", Tue, 08 Apr 2014 13:05:13 UTC +00:00]]
114
+  (2.4ms) commit transaction
115
+  (0.1ms) begin transaction
116
+ SQL (0.4ms) INSERT INTO "feeder_items" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Tue, 08 Apr 2014 13:05:14 UTC +00:00], ["updated_at", Tue, 08 Apr 2014 13:05:14 UTC +00:00]]
117
+  (2.2ms) commit transaction
118
+  (0.1ms) begin transaction
119
+ SQL (0.4ms) INSERT INTO "feeder_items" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Tue, 08 Apr 2014 13:05:14 UTC +00:00], ["updated_at", Tue, 08 Apr 2014 13:05:14 UTC +00:00]]
120
+  (2.3ms) commit transaction
121
+ Feeder::Item Load (0.2ms) SELECT "feeder_items".* FROM "feeder_items"
122
+
123
+
124
+ Started GET "/" for 127.0.0.1 at 2014-04-08 15:07:03 +0200
125
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
126
+ Processing by Rails::WelcomeController#index as HTML
127
+ Rendered /Users/sindrenm/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.0.3/lib/rails/templates/rails/welcome/index.html.erb (2.0ms)
128
+ Completed 200 OK in 12ms (Views: 11.3ms | ActiveRecord: 0.0ms)
129
+
130
+
131
+ Started GET "/feeder" for 127.0.0.1 at 2014-04-08 15:07:20 +0200
132
+ Processing by Feeder::ItemsController#index as HTML
133
+ Feeder::Item Load (0.3ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
134
+ Rendered /Users/sindrenm/Code/hyper/public/feeder/app/views/feeder/items/_item.html.erb (4.2ms)
135
+ Rendered /Users/sindrenm/Code/hyper/public/feeder/app/views/feeder/items/index.html.erb within layouts/application (15.2ms)
136
+ Completed 500 Internal Server Error in 24ms
137
+
138
+ ActionView::Template::Error (undefined method `underscore' for nil:NilClass):
139
+ 1: <div class="feed-item <%= item.type.parameterize %>">
140
+ 2: <%= render "feeder/types/#{item.type}", feedable: item.feedable %>
141
+ 3: </div>
142
+ /Users/sindrenm/Code/hyper/public/feeder/app/models/feeder/item.rb:6:in `type'
143
+ /Users/sindrenm/Code/hyper/public/feeder/app/views/feeder/items/_item.html.erb:1:in `___sers_sindrenm__ode_hyper_public_feeder_app_views_feeder_items__item_html_erb___587630370184849658_70317869072600'
144
+ actionpack (4.0.3) lib/action_view/template.rb:143:in `block in render'
145
+ activesupport (4.0.3) lib/active_support/notifications.rb:161:in `instrument'
146
+ actionpack (4.0.3) lib/action_view/template.rb:141:in `render'
147
+ actionpack (4.0.3) lib/action_view/renderer/partial_renderer.rb:399:in `block in collection_with_template'
148
+ actionpack (4.0.3) lib/action_view/renderer/partial_renderer.rb:395:in `map'
149
+ actionpack (4.0.3) lib/action_view/renderer/partial_renderer.rb:395:in `collection_with_template'
150
+ actionpack (4.0.3) lib/action_view/renderer/partial_renderer.rb:291:in `render_collection'
151
+ actionpack (4.0.3) lib/action_view/renderer/partial_renderer.rb:275:in `block in render'
152
+ actionpack (4.0.3) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
153
+ activesupport (4.0.3) lib/active_support/notifications.rb:159:in `block in instrument'
154
+ activesupport (4.0.3) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
155
+ activesupport (4.0.3) lib/active_support/notifications.rb:159:in `instrument'
156
+ actionpack (4.0.3) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
157
+ actionpack (4.0.3) lib/action_view/renderer/partial_renderer.rb:274:in `render'
158
+ actionpack (4.0.3) lib/action_view/renderer/renderer.rb:47:in `render_partial'
159
+ actionpack (4.0.3) lib/action_view/helpers/rendering_helper.rb:27:in `render'
160
+ /Users/sindrenm/Code/hyper/public/feeder/app/views/feeder/items/index.html.erb:2:in `___sers_sindrenm__ode_hyper_public_feeder_app_views_feeder_items_index_html_erb__2358395137681251250_70317869406220'
161
+ actionpack (4.0.3) lib/action_view/template.rb:143:in `block in render'
162
+ activesupport (4.0.3) lib/active_support/notifications.rb:161:in `instrument'
163
+ actionpack (4.0.3) lib/action_view/template.rb:141:in `render'
164
+ actionpack (4.0.3) lib/action_view/renderer/template_renderer.rb:49:in `block (2 levels) in render_template'
165
+ actionpack (4.0.3) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
166
+ activesupport (4.0.3) lib/active_support/notifications.rb:159:in `block in instrument'
167
+ activesupport (4.0.3) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
168
+ activesupport (4.0.3) lib/active_support/notifications.rb:159:in `instrument'
169
+ actionpack (4.0.3) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
170
+ actionpack (4.0.3) lib/action_view/renderer/template_renderer.rb:48:in `block in render_template'
171
+ actionpack (4.0.3) lib/action_view/renderer/template_renderer.rb:56:in `render_with_layout'
172
+ actionpack (4.0.3) lib/action_view/renderer/template_renderer.rb:47:in `render_template'
173
+ actionpack (4.0.3) lib/action_view/renderer/template_renderer.rb:17:in `render'
174
+ actionpack (4.0.3) lib/action_view/renderer/renderer.rb:42:in `render_template'
175
+ actionpack (4.0.3) lib/action_view/renderer/renderer.rb:23:in `render'
176
+ actionpack (4.0.3) lib/abstract_controller/rendering.rb:127:in `_render_template'
177
+ actionpack (4.0.3) lib/action_controller/metal/streaming.rb:219:in `_render_template'
178
+ actionpack (4.0.3) lib/abstract_controller/rendering.rb:120:in `render_to_body'
179
+ actionpack (4.0.3) lib/action_controller/metal/rendering.rb:33:in `render_to_body'
180
+ actionpack (4.0.3) lib/action_controller/metal/renderers.rb:26:in `render_to_body'
181
+ actionpack (4.0.3) lib/abstract_controller/rendering.rb:97:in `render'
182
+ actionpack (4.0.3) lib/action_controller/metal/rendering.rb:16:in `render'
183
+ actionpack (4.0.3) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
184
+ activesupport (4.0.3) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
185
+ /Users/sindrenm/.rbenv/versions/2.1.0/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
186
+ activesupport (4.0.3) lib/active_support/core_ext/benchmark.rb:12:in `ms'
187
+ actionpack (4.0.3) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
188
+ actionpack (4.0.3) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
189
+ activerecord (4.0.3) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
190
+ actionpack (4.0.3) lib/action_controller/metal/instrumentation.rb:40:in `render'
191
+ actionpack (4.0.3) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
192
+ actionpack (4.0.3) lib/action_controller/metal/responder.rb:233:in `default_render'
193
+ actionpack (4.0.3) lib/action_controller/metal/responder.rb:161:in `to_html'
194
+ actionpack (4.0.3) lib/action_controller/metal/responder.rb:154:in `respond'
195
+ actionpack (4.0.3) lib/action_controller/metal/responder.rb:147:in `call'
196
+ actionpack (4.0.3) lib/action_controller/metal/mime_responds.rb:330:in `respond_with'
197
+ /Users/sindrenm/Code/hyper/public/feeder/app/controllers/feeder/items_controller.rb:17:in `index'
198
+ actionpack (4.0.3) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
199
+ actionpack (4.0.3) lib/abstract_controller/base.rb:189:in `process_action'
200
+ actionpack (4.0.3) lib/action_controller/metal/rendering.rb:10:in `process_action'
201
+ actionpack (4.0.3) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
202
+ activesupport (4.0.3) lib/active_support/callbacks.rb:383:in `_run__1680170343178990362__process_action__callbacks'
203
+ activesupport (4.0.3) lib/active_support/callbacks.rb:80:in `run_callbacks'
204
+ actionpack (4.0.3) lib/abstract_controller/callbacks.rb:17:in `process_action'
205
+ actionpack (4.0.3) lib/action_controller/metal/rescue.rb:29:in `process_action'
206
+ actionpack (4.0.3) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
207
+ activesupport (4.0.3) lib/active_support/notifications.rb:159:in `block in instrument'
208
+ activesupport (4.0.3) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
209
+ activesupport (4.0.3) lib/active_support/notifications.rb:159:in `instrument'
210
+ actionpack (4.0.3) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
211
+ actionpack (4.0.3) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
212
+ activerecord (4.0.3) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
213
+ actionpack (4.0.3) lib/abstract_controller/base.rb:136:in `process'
214
+ actionpack (4.0.3) lib/abstract_controller/rendering.rb:44:in `process'
215
+ actionpack (4.0.3) lib/action_controller/metal.rb:195:in `dispatch'
216
+ actionpack (4.0.3) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
217
+ actionpack (4.0.3) lib/action_controller/metal.rb:231:in `block in action'
218
+ actionpack (4.0.3) lib/action_dispatch/routing/route_set.rb:80:in `call'
219
+ actionpack (4.0.3) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
220
+ actionpack (4.0.3) lib/action_dispatch/routing/route_set.rb:48:in `call'
221
+ actionpack (4.0.3) lib/action_dispatch/journey/router.rb:71:in `block in call'
222
+ actionpack (4.0.3) lib/action_dispatch/journey/router.rb:59:in `each'
223
+ actionpack (4.0.3) lib/action_dispatch/journey/router.rb:59:in `call'
224
+ actionpack (4.0.3) lib/action_dispatch/routing/route_set.rb:680:in `call'
225
+ railties (4.0.3) lib/rails/engine.rb:511:in `call'
226
+ railties (4.0.3) lib/rails/railtie/configurable.rb:30:in `method_missing'
227
+ actionpack (4.0.3) lib/action_dispatch/journey/router.rb:71:in `block in call'
228
+ actionpack (4.0.3) lib/action_dispatch/journey/router.rb:59:in `each'
229
+ actionpack (4.0.3) lib/action_dispatch/journey/router.rb:59:in `call'
230
+ actionpack (4.0.3) lib/action_dispatch/routing/route_set.rb:680:in `call'
231
+ rack (1.5.2) lib/rack/etag.rb:23:in `call'
232
+ rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
233
+ rack (1.5.2) lib/rack/head.rb:11:in `call'
234
+ actionpack (4.0.3) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
235
+ actionpack (4.0.3) lib/action_dispatch/middleware/flash.rb:241:in `call'
236
+ rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
237
+ rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
238
+ actionpack (4.0.3) lib/action_dispatch/middleware/cookies.rb:486:in `call'
239
+ activerecord (4.0.3) lib/active_record/query_cache.rb:36:in `call'
240
+ activerecord (4.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
241
+ activerecord (4.0.3) lib/active_record/migration.rb:369:in `call'
242
+ actionpack (4.0.3) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
243
+ activesupport (4.0.3) lib/active_support/callbacks.rb:373:in `_run__2194998276147177808__call__callbacks'
244
+ activesupport (4.0.3) lib/active_support/callbacks.rb:80:in `run_callbacks'
245
+ actionpack (4.0.3) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
246
+ actionpack (4.0.3) lib/action_dispatch/middleware/reloader.rb:64:in `call'
247
+ actionpack (4.0.3) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
248
+ actionpack (4.0.3) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
249
+ actionpack (4.0.3) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
250
+ railties (4.0.3) lib/rails/rack/logger.rb:38:in `call_app'
251
+ railties (4.0.3) lib/rails/rack/logger.rb:20:in `block in call'
252
+ activesupport (4.0.3) lib/active_support/tagged_logging.rb:67:in `block in tagged'
253
+ activesupport (4.0.3) lib/active_support/tagged_logging.rb:25:in `tagged'
254
+ activesupport (4.0.3) lib/active_support/tagged_logging.rb:67:in `tagged'
255
+ railties (4.0.3) lib/rails/rack/logger.rb:20:in `call'
256
+ actionpack (4.0.3) lib/action_dispatch/middleware/request_id.rb:21:in `call'
257
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
258
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
259
+ activesupport (4.0.3) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
260
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
261
+ actionpack (4.0.3) lib/action_dispatch/middleware/static.rb:64:in `call'
262
+ rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
263
+ railties (4.0.3) lib/rails/engine.rb:511:in `call'
264
+ railties (4.0.3) lib/rails/application.rb:97:in `call'
265
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
266
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
267
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
268
+ /Users/sindrenm/.rbenv/versions/2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
269
+ /Users/sindrenm/.rbenv/versions/2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
270
+ /Users/sindrenm/.rbenv/versions/2.1.0/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
271
+
272
+
273
+ Rendered /Users/sindrenm/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.7ms)
274
+ Rendered /Users/sindrenm/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (10.2ms)
275
+ Rendered /Users/sindrenm/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (22.5ms)
276
+
277
+
278
+ Started GET "/feeder.json" for 127.0.0.1 at 2014-04-08 15:07:27 +0200
279
+ Processing by Feeder::ItemsController#index as JSON
280
+ Feeder::Item Load (0.3ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
281
+ Completed 200 OK in 7ms (Views: 3.6ms | ActiveRecord: 0.3ms)
282
+
283
+
284
+ Started GET "/feeder.json" for 127.0.0.1 at 2014-04-08 15:08:43 +0200
285
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
286
+ Processing by Feeder::ItemsController#index as JSON
287
+ Feeder::Item Load (0.3ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
288
+ Completed 200 OK in 21ms (Views: 9.4ms | ActiveRecord: 0.7ms)
289
+
290
+
291
+ Started GET "/feeder.json" for 127.0.0.1 at 2014-04-08 15:08:44 +0200
292
+ Processing by Feeder::ItemsController#index as JSON
293
+ Feeder::Item Load (0.3ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
294
+ Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 0.3ms)
295
+
296
+
297
+ Started GET "/feeder.json" for 127.0.0.1 at 2014-04-08 15:08:59 +0200
298
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
299
+ Processing by Feeder::ItemsController#index as JSON
300
+ Feeder::Item Load (0.3ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
301
+ Completed 200 OK in 22ms (Views: 8.6ms | ActiveRecord: 0.5ms)
302
+
303
+
304
+ Started GET "/feeder.json" for 127.0.0.1 at 2014-04-08 15:09:40 +0200
305
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
306
+ Processing by Feeder::ItemsController#index as JSON
307
+ Feeder::Item Load (0.3ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
308
+ Completed 200 OK in 13ms (Views: 8.3ms | ActiveRecord: 0.5ms)
309
+
310
+
311
+ Started GET "/feeder.json" for 127.0.0.1 at 2014-04-08 15:10:00 +0200
312
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
313
+ Processing by Feeder::ItemsController#index as JSON
314
+ Feeder::Item Load (0.3ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
315
+ Completed 200 OK in 15ms (Views: 10.2ms | ActiveRecord: 0.6ms)
316
+
317
+
318
+ Started GET "/feeder.json" for 127.0.0.1 at 2014-04-08 15:10:15 +0200
319
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
320
+ Processing by Feeder::ItemsController#index as JSON
321
+ Feeder::Item Load (0.3ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
322
+ Completed 200 OK in 13ms (Views: 8.5ms | ActiveRecord: 0.6ms)
323
+
324
+
325
+ Started GET "/feeder.json" for 127.0.0.1 at 2014-04-08 15:18:50 +0200
326
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
327
+ Processing by Feeder::ItemsController#index as JSON
328
+ Feeder::Item Load (0.3ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
329
+ Completed 200 OK in 15ms (Views: 10.7ms | ActiveRecord: 0.7ms)
330
+
331
+
332
+ Started GET "/feeder.json" for 127.0.0.1 at 2014-04-08 15:18:51 +0200
333
+ Processing by Feeder::ItemsController#index as JSON
334
+ Feeder::Item Load (0.4ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
335
+ Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.4ms)
336
+
337
+
338
+ Started GET "/feeder.json" for 127.0.0.1 at 2014-04-08 15:18:52 +0200
339
+ Processing by Feeder::ItemsController#index as JSON
340
+ Feeder::Item Load (0.3ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
341
+ Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.3ms)
342
+
343
+
344
+ Started GET "/feeder.json" for 127.0.0.1 at 2014-04-08 15:19:49 +0200
345
+ Processing by Feeder::ItemsController#index as JSON
346
+ Feeder::Item Load (0.4ms) SELECT "feeder_items".* FROM "feeder_items" ORDER BY "feeder_items"."sticky" DESC, "feeder_items"."created_at" DESC LIMIT 25 OFFSET 0
347
+ Completed 200 OK in 15ms (Views: 6.1ms | ActiveRecord: 0.6ms)
348
+ ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations"
349
+ Migrating to AddBlockedToFeederItems (20140526110451)
350
+  (0.1ms) begin transaction
351
+  (1.2ms) ALTER TABLE "feeder_items" ADD "blocked" boolean DEFAULT 'f' NOT NULL
352
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140526110451"]]
353
+  (0.8ms) commit transaction
354
+ Migrating to AddReportedToFeederItems (20140526110501)
355
+  (0.1ms) begin transaction
356
+  (0.4ms) ALTER TABLE "feeder_items" ADD "reported" boolean DEFAULT 'f' NOT NULL
357
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140526110501"]]
358
+  (0.9ms) commit transaction
359
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"