notifiable-rails 0.20.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/notifiable/{notifications_controller.rb → notification_statuses_controller.rb} +9 -13
- data/config/routes.rb +1 -1
- data/db/migrate/20131210115649_create_notifiable_device_tokens.rb +1 -0
- data/db/migrate/20131210115650_create_notifiable_notifications.rb +0 -10
- data/db/migrate/20131210115651_create_notifiable_localized_notifications.rb +22 -0
- data/db/migrate/{20131210115651_create_notifiable_statuses.rb → 20131210115652_create_notifiable_statuses.rb} +1 -1
- data/lib/generators/notifiable/install/templates/initializer.rb +1 -1
- data/lib/notifiable/device_token.rb +1 -0
- data/lib/notifiable/localized_notification.rb +14 -0
- data/lib/notifiable/notification.rb +12 -3
- data/lib/notifiable/notification_status.rb +6 -1
- data/lib/notifiable/notifier_base.rb +6 -2
- data/lib/notifiable/version.rb +1 -1
- data/lib/notifiable.rb +5 -1
- data/spec/controllers/device_tokens_controller_spec.rb +1 -1
- data/spec/controllers/{notifications_controller_spec.rb → notification_statuses_controller_spec.rb} +14 -14
- data/spec/model/device_token_spec.rb +16 -0
- data/spec/model/localized_notification_spec.rb +38 -0
- data/spec/model/notifiable_spec.rb +3 -3
- data/spec/model/notification_spec.rb +21 -30
- data/spec/spec_helper.rb +4 -0
- data/spec/support/factories.rb +17 -6
- data/spec/test_app/db/development.sqlite3 +0 -0
- data/spec/test_app/db/migrate/{20131210115652_create_users.rb → 20131210115660_create_users.rb} +0 -0
- data/spec/test_app/db/schema.rb +11 -3
- data/spec/test_app/db/test.sqlite3 +0 -0
- data/spec/test_app/log/development.log +57 -0
- data/spec/test_app/log/test.log +38505 -0
- metadata +14 -8
@@ -1646753,3 +1646753,60 @@ Migrating to CreateUsers (20131210115652)
|
|
1646753
1646753
|
FROM sqlite_temp_master
|
1646754
1646754
|
WHERE name='index_notifiable_device_tokens_on_token' AND type='index'
|
1646755
1646755
|
|
1646756
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
1646757
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
1646758
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
1646759
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
1646760
|
+
Migrating to CreateNotifiableApps (20131210115648)
|
1646761
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1646762
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "notifiable_apps" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "configuration" text, "created_at" datetime, "updated_at" datetime)
|
1646763
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20131210115648"]]
|
1646764
|
+
[1m[35m (0.6ms)[0m commit transaction
|
1646765
|
+
Migrating to CreateNotifiableDeviceTokens (20131210115649)
|
1646766
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1646767
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "notifiable_device_tokens" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "token" varchar(255), "provider" varchar(255), "locale" varchar(255), "is_valid" boolean DEFAULT 't', "user_id" integer, "app_id" integer, "created_at" datetime, "updated_at" datetime)
|
1646768
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "index_notifiable_device_tokens_on_token" ON "notifiable_device_tokens" ("token")[0m
|
1646769
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1646770
|
+
FROM sqlite_master
|
1646771
|
+
WHERE name='index_notifiable_device_tokens_on_token' AND type='index'
|
1646772
|
+
UNION ALL
|
1646773
|
+
SELECT sql
|
1646774
|
+
FROM sqlite_temp_master
|
1646775
|
+
WHERE name='index_notifiable_device_tokens_on_token' AND type='index'
|
1646776
|
+
|
1646777
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_notifiable_device_tokens_on_user_id" ON "notifiable_device_tokens" ("user_id")[0m
|
1646778
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115649"]]
|
1646779
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
1646780
|
+
Migrating to CreateNotifiableNotifications (20131210115650)
|
1646781
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1646782
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "notifiable_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "message" text, "params" text, "app_id" integer, "sent_count" integer DEFAULT 0, "gateway_accepted_count" integer DEFAULT 0, "opened_count" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) [0m
|
1646783
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115650"]]
|
1646784
|
+
[1m[36m (0.5ms)[0m [1mcommit transaction[0m
|
1646785
|
+
Migrating to CreateNotifiableStatuses (20131210115651)
|
1646786
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1646787
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "notifiable_statuses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "notification_id" integer, "device_token_id" integer, "status" integer, "created_at" datetime) [0m
|
1646788
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115651"]]
|
1646789
|
+
[1m[36m (0.5ms)[0m [1mcommit transaction[0m
|
1646790
|
+
Migrating to CreateUsers (20131210115652)
|
1646791
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1646792
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL) [0m
|
1646793
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115652"]]
|
1646794
|
+
[1m[36m (0.5ms)[0m [1mcommit transaction[0m
|
1646795
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
1646796
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
1646797
|
+
FROM sqlite_master
|
1646798
|
+
WHERE name='index_notifiable_device_tokens_on_user_id' AND type='index'
|
1646799
|
+
UNION ALL
|
1646800
|
+
SELECT sql
|
1646801
|
+
FROM sqlite_temp_master
|
1646802
|
+
WHERE name='index_notifiable_device_tokens_on_user_id' AND type='index'
|
1646803
|
+
[0m
|
1646804
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
1646805
|
+
FROM sqlite_master
|
1646806
|
+
WHERE name='index_notifiable_device_tokens_on_token' AND type='index'
|
1646807
|
+
UNION ALL
|
1646808
|
+
SELECT sql
|
1646809
|
+
FROM sqlite_temp_master
|
1646810
|
+
WHERE name='index_notifiable_device_tokens_on_token' AND type='index'
|
1646811
|
+
|
1646812
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|