activator 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/activator.rb +2 -2
- data/lib/activator/railtie.rb +9 -0
- data/lib/activator/version.rb +1 -1
- data/test/dummy/log/development.log +9 -0
- data/test/dummy/log/test.log +294 -0
- metadata +4 -5
- data/lib/tasks/activator_tasks.rake +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0144188c149944e489bf8bf884a87076dee9f3d
|
4
|
+
data.tar.gz: 30cb7237b762860a06654aa483d98f1805adeb7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d13af8c4792d556bd7b92fdc3b6e019eeaba771bf9e19b469ec0c6fe6100de810c304f199a6f79341c2adee37e61485ef38a53a2bc9e3fcf697db73258f73ca
|
7
|
+
data.tar.gz: cb358f86dd945ef01d36cd9b1e35f8530ba4de27b15d31edf46587f2da07474439833108021a4e0a0c2ecb4effc1b6e927bfdabfc2586b40fd2ef939b13a7cae
|
data/lib/activator.rb
CHANGED
data/lib/activator/version.rb
CHANGED
@@ -50,3 +50,12 @@ Migrating to CreateUsers (20140425024510)
|
|
50
50
|
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
51
51
|
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140425024510')
|
52
52
|
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140424234705')[0m
|
53
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
54
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
55
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "active" boolean, "created_at" datetime, "updated_at" datetime) [0m
|
56
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
|
57
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
58
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
59
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
60
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140425024510')
|
61
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140424234705')[0m
|
data/test/dummy/log/test.log
CHANGED
@@ -1658,3 +1658,297 @@ ActivatorTest: test_it_shouldnt_have_deactivation_methods_if_not_an_activator
|
|
1658
1658
|
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 25 Apr 2014 03:04:24 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:04:24 UTC +00:00]]
|
1659
1659
|
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1660
1660
|
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
1661
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
1662
|
+
------------------------------------------------
|
1663
|
+
ActivatorTest: test_it_can_find_the_active_items
|
1664
|
+
------------------------------------------------
|
1665
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1666
|
+
[1m[36mSQL (1.8ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", false], ["created_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00]]
|
1667
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1668
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1669
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?) [["active", true], ["created_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00]]
|
1670
|
+
[1m[36mProject Load (0.2ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'[0m
|
1671
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1672
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."active" = 't' LIMIT 1[0m
|
1673
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
1674
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1675
|
+
--------------------------------------------------------------------------
|
1676
|
+
ActivatorTest: test_it_deactivates_old_items_when_creating_new_active_ones
|
1677
|
+
--------------------------------------------------------------------------
|
1678
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1679
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", true], ["created_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00]]
|
1680
|
+
[1m[35mProject Load (0.1ms)[0m SELECT "projects".* FROM "projects" WHERE (id <> 1) AND "projects"."active" = 't'
|
1681
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1682
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1683
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", true], ["created_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00]]
|
1684
|
+
[1m[35mProject Load (0.1ms)[0m SELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'
|
1685
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 1[0m [["active", false], ["updated_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00]]
|
1686
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1687
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1[0m [["id", 1]]
|
1688
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1689
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1690
|
+
----------------------------------------------------------------------------------
|
1691
|
+
ActivatorTest: test_it_deactivates_other_items_when_setting_another_item_to_active
|
1692
|
+
----------------------------------------------------------------------------------
|
1693
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1694
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", false], ["created_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00]]
|
1695
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1696
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1697
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?) [["active", true], ["created_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00]]
|
1698
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'[0m
|
1699
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1700
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1701
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 1 [["active", true], ["updated_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00]]
|
1702
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 1) AND "projects"."active" = 't'[0m
|
1703
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 2 [["active", false], ["updated_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00]]
|
1704
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1705
|
+
[1m[35mProject Load (0.1ms)[0m SELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1 [["id", 1]]
|
1706
|
+
[1m[36mProject Load (0.0ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1[0m [["id", 2]]
|
1707
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
1708
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1709
|
+
-----------------------------------------------------------------------------------
|
1710
|
+
ActivatorTest: test_it_shouldnt_have_an_active_class_method_if_its_not_an_activator
|
1711
|
+
-----------------------------------------------------------------------------------
|
1712
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1713
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1714
|
+
-----------------------------------------------------------------------------
|
1715
|
+
ActivatorTest: test_it_shouldnt_have_deactivation_methods_if_not_an_activator
|
1716
|
+
-----------------------------------------------------------------------------
|
1717
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1718
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:18:35 UTC +00:00]]
|
1719
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1720
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
1721
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
1722
|
+
------------------------------------------------
|
1723
|
+
ActivatorTest: test_it_can_find_the_active_items
|
1724
|
+
------------------------------------------------
|
1725
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1726
|
+
[1m[36mSQL (1.9ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", false], ["created_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00]]
|
1727
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1728
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1729
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?) [["active", true], ["created_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00]]
|
1730
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'[0m
|
1731
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1732
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."active" = 't' LIMIT 1[0m
|
1733
|
+
[1m[35m (1.1ms)[0m rollback transaction
|
1734
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1735
|
+
--------------------------------------------------------------------------
|
1736
|
+
ActivatorTest: test_it_deactivates_old_items_when_creating_new_active_ones
|
1737
|
+
--------------------------------------------------------------------------
|
1738
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1739
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", true], ["created_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00]]
|
1740
|
+
[1m[35mProject Load (0.2ms)[0m SELECT "projects".* FROM "projects" WHERE (id <> 1) AND "projects"."active" = 't'
|
1741
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1742
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1743
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", true], ["created_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00]]
|
1744
|
+
[1m[35mProject Load (0.1ms)[0m SELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'
|
1745
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 1[0m [["active", false], ["updated_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00]]
|
1746
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1747
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1[0m [["id", 1]]
|
1748
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1749
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1750
|
+
----------------------------------------------------------------------------------
|
1751
|
+
ActivatorTest: test_it_deactivates_other_items_when_setting_another_item_to_active
|
1752
|
+
----------------------------------------------------------------------------------
|
1753
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1754
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", false], ["created_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00]]
|
1755
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1756
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1757
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?) [["active", true], ["created_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00]]
|
1758
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'[0m
|
1759
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1760
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1761
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 1 [["active", true], ["updated_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00]]
|
1762
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 1) AND "projects"."active" = 't'[0m
|
1763
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 2 [["active", false], ["updated_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00]]
|
1764
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1765
|
+
[1m[35mProject Load (0.0ms)[0m SELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1 [["id", 1]]
|
1766
|
+
[1m[36mProject Load (0.0ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1[0m [["id", 2]]
|
1767
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
1768
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1769
|
+
-----------------------------------------------------------------------------------
|
1770
|
+
ActivatorTest: test_it_shouldnt_have_an_active_class_method_if_its_not_an_activator
|
1771
|
+
-----------------------------------------------------------------------------------
|
1772
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1773
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1774
|
+
-----------------------------------------------------------------------------
|
1775
|
+
ActivatorTest: test_it_shouldnt_have_deactivation_methods_if_not_an_activator
|
1776
|
+
-----------------------------------------------------------------------------
|
1777
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1778
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:31:19 UTC +00:00]]
|
1779
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1780
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
1781
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1782
|
+
------------------------------------------------
|
1783
|
+
ActivatorTest: test_it_can_find_the_active_items
|
1784
|
+
------------------------------------------------
|
1785
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1786
|
+
[1m[36mSQL (2.0ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", false], ["created_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00]]
|
1787
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1788
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1789
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?) [["active", true], ["created_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00]]
|
1790
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'[0m
|
1791
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1792
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."active" = 't' LIMIT 1[0m
|
1793
|
+
[1m[35m (1.2ms)[0m rollback transaction
|
1794
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1795
|
+
--------------------------------------------------------------------------
|
1796
|
+
ActivatorTest: test_it_deactivates_old_items_when_creating_new_active_ones
|
1797
|
+
--------------------------------------------------------------------------
|
1798
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1799
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", true], ["created_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00]]
|
1800
|
+
[1m[35mProject Load (0.1ms)[0m SELECT "projects".* FROM "projects" WHERE (id <> 1) AND "projects"."active" = 't'
|
1801
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1802
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1803
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", true], ["created_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00]]
|
1804
|
+
[1m[35mProject Load (0.1ms)[0m SELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'
|
1805
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 1[0m [["active", false], ["updated_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00]]
|
1806
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1807
|
+
[1m[36mProject Load (0.2ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1[0m [["id", 1]]
|
1808
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
1809
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1810
|
+
----------------------------------------------------------------------------------
|
1811
|
+
ActivatorTest: test_it_deactivates_other_items_when_setting_another_item_to_active
|
1812
|
+
----------------------------------------------------------------------------------
|
1813
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1814
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", false], ["created_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00]]
|
1815
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1816
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1817
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?) [["active", true], ["created_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00]]
|
1818
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'[0m
|
1819
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1820
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1821
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 1 [["active", true], ["updated_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00]]
|
1822
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 1) AND "projects"."active" = 't'[0m
|
1823
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 2 [["active", false], ["updated_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00]]
|
1824
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1825
|
+
[1m[35mProject Load (0.0ms)[0m SELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1 [["id", 1]]
|
1826
|
+
[1m[36mProject Load (0.0ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1[0m [["id", 2]]
|
1827
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
1828
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1829
|
+
-----------------------------------------------------------------------------------
|
1830
|
+
ActivatorTest: test_it_shouldnt_have_an_active_class_method_if_its_not_an_activator
|
1831
|
+
-----------------------------------------------------------------------------------
|
1832
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1833
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1834
|
+
-----------------------------------------------------------------------------
|
1835
|
+
ActivatorTest: test_it_shouldnt_have_deactivation_methods_if_not_an_activator
|
1836
|
+
-----------------------------------------------------------------------------
|
1837
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1838
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 03:39:03 UTC +00:00]]
|
1839
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1840
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
1841
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "projects" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "active" boolean, "created_at" datetime, "updated_at" datetime) [0m
|
1842
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
|
1843
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
1844
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
1845
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
1846
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140425024510')
|
1847
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140424234705')[0m
|
1848
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
1849
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1850
|
+
------------------------------------------------
|
1851
|
+
ActivatorTest: test_it_can_find_the_active_items
|
1852
|
+
------------------------------------------------
|
1853
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1854
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1855
|
+
--------------------------------------------------------------------------
|
1856
|
+
ActivatorTest: test_it_deactivates_old_items_when_creating_new_active_ones
|
1857
|
+
--------------------------------------------------------------------------
|
1858
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1859
|
+
[1m[36mSQL (4.1ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", true], ["created_at", Fri, 25 Apr 2014 11:41:33 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:41:33 UTC +00:00]]
|
1860
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1861
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1862
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?) [["active", true], ["created_at", Fri, 25 Apr 2014 11:41:33 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:41:33 UTC +00:00]]
|
1863
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1864
|
+
[1m[35mProject Load (0.2ms)[0m SELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1 [["id", 1]]
|
1865
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
1866
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1867
|
+
----------------------------------------------------------------------------------
|
1868
|
+
ActivatorTest: test_it_deactivates_other_items_when_setting_another_item_to_active
|
1869
|
+
----------------------------------------------------------------------------------
|
1870
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1871
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?) [["active", false], ["created_at", Fri, 25 Apr 2014 11:41:33 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:41:33 UTC +00:00]]
|
1872
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1873
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1874
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", true], ["created_at", Fri, 25 Apr 2014 11:41:33 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:41:33 UTC +00:00]]
|
1875
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1876
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1877
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 1 [["active", true], ["updated_at", Fri, 25 Apr 2014 11:41:33 UTC +00:00]]
|
1878
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1879
|
+
[1m[35mProject Load (0.0ms)[0m SELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1 [["id", 1]]
|
1880
|
+
[1m[36mProject Load (0.0ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1[0m [["id", 2]]
|
1881
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
1882
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1883
|
+
-----------------------------------------------------------------------------------
|
1884
|
+
ActivatorTest: test_it_shouldnt_have_an_active_class_method_if_its_not_an_activator
|
1885
|
+
-----------------------------------------------------------------------------------
|
1886
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1887
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1888
|
+
-----------------------------------------------------------------------------
|
1889
|
+
ActivatorTest: test_it_shouldnt_have_deactivation_methods_if_not_an_activator
|
1890
|
+
-----------------------------------------------------------------------------
|
1891
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1892
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 25 Apr 2014 11:41:33 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:41:33 UTC +00:00]]
|
1893
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1894
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
1895
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1896
|
+
------------------------------------------------
|
1897
|
+
ActivatorTest: test_it_can_find_the_active_items
|
1898
|
+
------------------------------------------------
|
1899
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1900
|
+
[1m[36mSQL (2.6ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", false], ["created_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00]]
|
1901
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1902
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1903
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?) [["active", true], ["created_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00]]
|
1904
|
+
[1m[36mProject Load (0.2ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'[0m
|
1905
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1906
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."active" = 't' LIMIT 1[0m
|
1907
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
1908
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1909
|
+
--------------------------------------------------------------------------
|
1910
|
+
ActivatorTest: test_it_deactivates_old_items_when_creating_new_active_ones
|
1911
|
+
--------------------------------------------------------------------------
|
1912
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1913
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", true], ["created_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00]]
|
1914
|
+
[1m[35mProject Load (0.1ms)[0m SELECT "projects".* FROM "projects" WHERE (id <> 1) AND "projects"."active" = 't'
|
1915
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1916
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1917
|
+
[1m[36mSQL (1.9ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", true], ["created_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00]]
|
1918
|
+
[1m[35mProject Load (0.1ms)[0m SELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'
|
1919
|
+
[1m[36mSQL (0.2ms)[0m [1mUPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 1[0m [["active", false], ["updated_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00]]
|
1920
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1921
|
+
[1m[36mProject Load (0.2ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1[0m [["id", 1]]
|
1922
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
1923
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1924
|
+
----------------------------------------------------------------------------------
|
1925
|
+
ActivatorTest: test_it_deactivates_other_items_when_setting_another_item_to_active
|
1926
|
+
----------------------------------------------------------------------------------
|
1927
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1928
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["active", false], ["created_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00]]
|
1929
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1930
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1931
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "projects" ("active", "created_at", "updated_at") VALUES (?, ?, ?) [["active", true], ["created_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00]]
|
1932
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 2) AND "projects"."active" = 't'[0m
|
1933
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1934
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1935
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 1 [["active", true], ["updated_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00]]
|
1936
|
+
[1m[36mProject Load (0.1ms)[0m [1mSELECT "projects".* FROM "projects" WHERE (id <> 1) AND "projects"."active" = 't'[0m
|
1937
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "projects" SET "active" = ?, "updated_at" = ? WHERE "projects"."id" = 2 [["active", false], ["updated_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00]]
|
1938
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1939
|
+
[1m[35mProject Load (0.1ms)[0m SELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1 [["id", 1]]
|
1940
|
+
[1m[36mProject Load (0.0ms)[0m [1mSELECT "projects".* FROM "projects" WHERE "projects"."id" = ? LIMIT 1[0m [["id", 2]]
|
1941
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
1942
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1943
|
+
-----------------------------------------------------------------------------------
|
1944
|
+
ActivatorTest: test_it_shouldnt_have_an_active_class_method_if_its_not_an_activator
|
1945
|
+
-----------------------------------------------------------------------------------
|
1946
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1947
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1948
|
+
-----------------------------------------------------------------------------
|
1949
|
+
ActivatorTest: test_it_shouldnt_have_deactivation_methods_if_not_an_activator
|
1950
|
+
-----------------------------------------------------------------------------
|
1951
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1952
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00], ["updated_at", Fri, 25 Apr 2014 11:42:59 UTC +00:00]]
|
1953
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1954
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jelmer Snoeck
|
@@ -45,9 +45,9 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
+
- lib/activator/railtie.rb
|
48
49
|
- lib/activator/version.rb
|
49
50
|
- lib/activator.rb
|
50
|
-
- lib/tasks/activator_tasks.rake
|
51
51
|
- MIT-LICENSE
|
52
52
|
- Rakefile
|
53
53
|
- test/activator_test.rb
|
@@ -96,7 +96,7 @@ files:
|
|
96
96
|
- test/dummy/test/models/project_test.rb
|
97
97
|
- test/dummy/test/models/user_test.rb
|
98
98
|
- test/test_helper.rb
|
99
|
-
homepage:
|
99
|
+
homepage: https://github.com/jelmersnoeck/activator
|
100
100
|
licenses: []
|
101
101
|
metadata: {}
|
102
102
|
post_install_message:
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
117
|
rubyforge_project:
|
118
|
-
rubygems_version: 2.
|
118
|
+
rubygems_version: 2.1.11
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: Mark one model as active
|
@@ -166,4 +166,3 @@ test_files:
|
|
166
166
|
- test/dummy/test/models/project_test.rb
|
167
167
|
- test/dummy/test/models/user_test.rb
|
168
168
|
- test/test_helper.rb
|
169
|
-
has_rdoc:
|