paginative 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +32 -0
- data/app/assets/javascripts/paginative/application.js +13 -0
- data/app/assets/stylesheets/paginative/application.css +15 -0
- data/app/controllers/paginative/application_controller.rb +4 -0
- data/app/helpers/paginative/application_helper.rb +4 -0
- data/app/models/paginative/test_model.rb +8 -0
- data/app/views/layouts/paginative/application.html.erb +14 -0
- data/config/routes.rb +2 -0
- data/db/migrate/20140415060518_create_paginative_test_models.rb +11 -0
- data/db/migrate/20140416020706_add_address_to_test_models.rb +5 -0
- data/lib/paginative/engine.rb +12 -0
- data/lib/paginative/models/model_extension.rb +19 -0
- data/lib/paginative/railtie.rb +7 -0
- data/lib/paginative/version.rb +3 -0
- data/lib/paginative.rb +20 -0
- data/lib/tasks/paginative_tasks.rake +4 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/test_model.rb +6 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config/application.rb +29 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +83 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20140416035443_create_test_models.rb +12 -0
- data/spec/dummy/db/schema.rb +34 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +83 -0
- data/spec/dummy/log/test.log +28375 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/spec/factories/test_models.rb +10 -0
- data/spec/dummy/spec/models/test_model_spec.rb +5 -0
- data/spec/factories/paginative_test_models.rb +9 -0
- data/spec/models/paginative/test_model_spec.rb +61 -0
- data/spec/spec_helper.rb +81 -0
- metadata +249 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: 575bdb6617efd5ec4b1da3eee951598de26014d5d82a63338d5ad1c3c1d440d853a02e6269b222dc426909130f4166e80f2cd1cf78809805ab2d2365344385ff
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: 607c1c57978ffce551fb2a6acf996e4bf0023c2b128f927fbe13b76d6e87def8a305a44a0196f823620e14d02f65cdc5636f65ca6ccba9ea868fcb8706d8bc52
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
Binary file
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20140416035443) do
|
15
|
+
|
16
|
+
create_table "paginative_test_models", force: true do |t|
|
17
|
+
t.string "name"
|
18
|
+
t.float "latitude"
|
19
|
+
t.float "longitude"
|
20
|
+
t.datetime "created_at"
|
21
|
+
t.datetime "updated_at"
|
22
|
+
t.string "address"
|
23
|
+
end
|
24
|
+
|
25
|
+
create_table "test_models", force: true do |t|
|
26
|
+
t.string "name"
|
27
|
+
t.string "address"
|
28
|
+
t.float "latitude"
|
29
|
+
t.float "longitude"
|
30
|
+
t.datetime "created_at"
|
31
|
+
t.datetime "updated_at"
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
Binary file
|
@@ -0,0 +1,83 @@
|
|
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"
|