paginative 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/paginative/test_model.rb +0 -3
- data/lib/paginative/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +13545 -58851
- data/spec/models/paginative/test_model_spec.rb +9 -0
- metadata +3 -8
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -136
@@ -2,6 +2,15 @@ require_relative '../../spec_helper'
|
|
2
2
|
|
3
3
|
describe TestModel do
|
4
4
|
|
5
|
+
before :each do
|
6
|
+
TestModel.class_eval do
|
7
|
+
include Paginative::ModelExtension
|
8
|
+
|
9
|
+
reverse_geocoded_by :latitude, :longitude
|
10
|
+
after_validation :reverse_geocode # auto-fetch coordinates
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
5
14
|
def create_models
|
6
15
|
@model1 = FactoryGirl.create(:test_model, address: "Lorem", created_at: Time.now.ago(2.days))
|
7
16
|
@model2 = FactoryGirl.create(:test_model, address: "Ipsum", created_at: Time.now.ago(1.days))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paginative
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Norman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -192,11 +192,9 @@ files:
|
|
192
192
|
- spec/dummy/config/locales/en.yml
|
193
193
|
- spec/dummy/config/routes.rb
|
194
194
|
- spec/dummy/config/secrets.yml
|
195
|
-
- spec/dummy/db/development.sqlite3
|
196
195
|
- spec/dummy/db/migrate/20140416035443_create_test_models.rb
|
197
196
|
- spec/dummy/db/schema.rb
|
198
197
|
- spec/dummy/db/test.sqlite3
|
199
|
-
- spec/dummy/log/development.log
|
200
198
|
- spec/dummy/log/test.log
|
201
199
|
- spec/dummy/public/404.html
|
202
200
|
- spec/dummy/public/422.html
|
@@ -225,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
223
|
version: '0'
|
226
224
|
requirements: []
|
227
225
|
rubyforge_project:
|
228
|
-
rubygems_version: 2.4.
|
226
|
+
rubygems_version: 2.4.5
|
229
227
|
signing_key:
|
230
228
|
specification_version: 4
|
231
229
|
summary: A new way to paginate your Rails API
|
@@ -257,11 +255,9 @@ test_files:
|
|
257
255
|
- spec/dummy/config/routes.rb
|
258
256
|
- spec/dummy/config/secrets.yml
|
259
257
|
- spec/dummy/config.ru
|
260
|
-
- spec/dummy/db/development.sqlite3
|
261
258
|
- spec/dummy/db/migrate/20140416035443_create_test_models.rb
|
262
259
|
- spec/dummy/db/schema.rb
|
263
260
|
- spec/dummy/db/test.sqlite3
|
264
|
-
- spec/dummy/log/development.log
|
265
261
|
- spec/dummy/log/test.log
|
266
262
|
- spec/dummy/public/404.html
|
267
263
|
- spec/dummy/public/422.html
|
@@ -272,4 +268,3 @@ test_files:
|
|
272
268
|
- spec/factories/paginative_test_models.rb
|
273
269
|
- spec/models/paginative/test_model_spec.rb
|
274
270
|
- spec/spec_helper.rb
|
275
|
-
has_rdoc:
|
Binary file
|
@@ -1,136 +0,0 @@
|
|
1
|
-
[1m[36m (2.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
2
|
-
[1m[35m (0.4ms)[0m select sqlite_version(*)
|
3
|
-
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
-
Migrating to CreatePaginativeTestModels (20140415060518)
|
6
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
-
[1m[35m (0.6ms)[0m CREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime)
|
8
|
-
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20140415060518"]]
|
9
|
-
[1m[35m (0.8ms)[0m commit transaction
|
10
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
11
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
12
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
13
|
-
[1m[36m (1.1ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime) [0m
|
14
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
15
|
-
[1m[36m (0.4ms)[0m [1mselect sqlite_version(*)[0m
|
16
|
-
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
17
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
18
|
-
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140415060518')
|
19
|
-
[1m[36m (1.2ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime) [0m
|
20
|
-
[1m[35m (2.8ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
21
|
-
[1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
|
22
|
-
[1m[35m (1.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
23
|
-
[1m[36m (0.2ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
24
|
-
[1m[35m (2.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140415060518')
|
25
|
-
[1m[36m (1.0ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime) [0m
|
26
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
27
|
-
[1m[36m (0.4ms)[0m [1mselect sqlite_version(*)[0m
|
28
|
-
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
29
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
30
|
-
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140415060518')
|
31
|
-
[1m[36mActiveRecord::SchemaMigration Load (1.9ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
32
|
-
Migrating to AddAddressToTestModels (20140416020706)
|
33
|
-
[1m[35m (0.1ms)[0m begin transaction
|
34
|
-
[1m[36m (0.2ms)[0m [1mALTER TABLE "test_models" ADD "address" varchar(255)[0m
|
35
|
-
SQLite3::SQLException: no such table: test_models: ALTER TABLE "test_models" ADD "address" varchar(255)
|
36
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
37
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
38
|
-
Migrating to AddAddressToTestModels (20140416020706)
|
39
|
-
[1m[35m (0.1ms)[0m begin transaction
|
40
|
-
[1m[36m (3.0ms)[0m [1mALTER TABLE "paginative_test_models" ADD "address" varchar(255)[0m
|
41
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140416020706"]]
|
42
|
-
[1m[36m (0.5ms)[0m [1mcommit transaction[0m
|
43
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
44
|
-
[1m[36m (1.3ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255)) [0m
|
45
|
-
[1m[36m (1.1ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255)) [0m
|
46
|
-
[1m[35m (0.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
47
|
-
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
48
|
-
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
49
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
50
|
-
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140416020706')
|
51
|
-
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140415060518')[0m
|
52
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
53
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
54
|
-
[1m[36m (0.9ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255)) [0m
|
55
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
56
|
-
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
57
|
-
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
58
|
-
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
59
|
-
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140416020706')
|
60
|
-
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140415060518')[0m
|
61
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
62
|
-
Migrating to CreateTestModels (20140416035443)
|
63
|
-
[1m[35m (0.1ms)[0m begin transaction
|
64
|
-
[1m[36m (1.0ms)[0m [1mCREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "address" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime) [0m
|
65
|
-
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140416035443"]]
|
66
|
-
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
67
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
68
|
-
[1m[36m (1.2ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255)) [0m
|
69
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "address" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime)
|
70
|
-
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
71
|
-
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
72
|
-
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
73
|
-
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
74
|
-
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140416035443')[0m
|
75
|
-
[1m[36m (1.6ms)[0m [1mCREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255)) [0m
|
76
|
-
[1m[35m (0.9ms)[0m CREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "address" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime)
|
77
|
-
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
78
|
-
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
79
|
-
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
80
|
-
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
81
|
-
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140416035443')[0m
|
82
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
83
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
84
|
-
Connecting to database specified by database.yml
|
85
|
-
[1m[36m (0.3ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
86
|
-
Migrating to CreatePaginativeTestModels (20140415060518)
|
87
|
-
Migrating to AddAddressToTestModels (20140416020706)
|
88
|
-
Migrating to CreateTestModels (20140416035443)
|
89
|
-
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
90
|
-
[1m[36m (0.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
91
|
-
Connecting to database specified by database.yml
|
92
|
-
[1m[36m (0.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
93
|
-
Migrating to CreatePaginativeTestModels (20140415060518)
|
94
|
-
Migrating to AddAddressToTestModels (20140416020706)
|
95
|
-
Migrating to CreateTestModels (20140416035443)
|
96
|
-
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
97
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
98
|
-
Connecting to database specified by database.yml
|
99
|
-
[1m[36m (1.6ms)[0m [1mselect sqlite_version(*)[0m
|
100
|
-
[1m[35m (3.6ms)[0m CREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255))
|
101
|
-
[1m[36m (1.1ms)[0m [1mCREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "address" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime) [0m
|
102
|
-
[1m[35m (1.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
103
|
-
[1m[36m (1.0ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
104
|
-
[1m[35m (0.3ms)[0m SELECT version FROM "schema_migrations"
|
105
|
-
[1m[36m (1.2ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140416035443')[0m
|
106
|
-
[1m[35m (1.2ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140415060518')
|
107
|
-
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140416020706')[0m
|
108
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
109
|
-
Connecting to database specified by database.yml
|
110
|
-
[1m[36m (1.4ms)[0m [1mselect sqlite_version(*)[0m
|
111
|
-
[1m[35m (1.1ms)[0m CREATE TABLE "paginative_test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "address" varchar(255))
|
112
|
-
[1m[36m (1.6ms)[0m [1mCREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "address" varchar(255), "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime) [0m
|
113
|
-
[1m[35m (1.3ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
114
|
-
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
115
|
-
[1m[35m (0.2ms)[0m SELECT version FROM "schema_migrations"
|
116
|
-
[1m[36m (2.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140416035443')[0m
|
117
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
118
|
-
Connecting to database specified by database.yml
|
119
|
-
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
120
|
-
[1m[35m (1.4ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
121
|
-
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
122
|
-
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
123
|
-
Migrating to CreateTestModels (20140416035443)
|
124
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
125
|
-
[1m[35m (0.6ms)[0m CREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "address" varchar(255), "latitude" float, "longitude" float, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
126
|
-
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20140416035443')[0m
|
127
|
-
[1m[35m (0.8ms)[0m commit transaction
|
128
|
-
[1m[36m (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
129
|
-
[1m[35m (0.2ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
130
|
-
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
131
|
-
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
132
|
-
[1m[36m (1.0ms)[0m [1mCREATE TABLE "test_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "address" varchar(255), "latitude" float, "longitude" float, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
133
|
-
[1m[35m (0.8ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
134
|
-
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
135
|
-
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
136
|
-
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140416035443')[0m
|