sequenced 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +12 -0
- data/TODO.md +7 -0
- data/lib/sequenced/acts_as_sequenced.rb +4 -4
- data/lib/sequenced/version.rb +1 -1
- data/sequenced.gemspec +4 -4
- data/test/dummy/log/test.log +154 -0
- metadata +13 -11
data/CHANGELOG.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
1.0.0 (March 7, 2012)
|
2
|
+
---------------------
|
3
|
+
|
4
|
+
* Restrict dependencies on ActiveSupport and ActiveRecord to `~> 3.0`
|
5
|
+
* Make error messages more descriptive
|
6
|
+
* Update gem description
|
7
|
+
|
8
|
+
|
9
|
+
0.1.0 (February 19, 2012)
|
10
|
+
-------------------------
|
11
|
+
|
12
|
+
* Initial release
|
data/TODO.md
ADDED
@@ -61,14 +61,14 @@ module Sequenced
|
|
61
61
|
|
62
62
|
if scope.present?
|
63
63
|
if !self.respond_to?(scope)
|
64
|
-
raise Sequenced::InvalidAttributeError.new("
|
64
|
+
raise Sequenced::InvalidAttributeError.new(":scope method ##{scope.to_s} is undefined")
|
65
65
|
elsif self.send(scope).nil?
|
66
|
-
raise Sequenced::InvalidAttributeError.new("
|
66
|
+
raise Sequenced::InvalidAttributeError.new(":scope method ##{scope.to_s} returned nil unexpectedly")
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
70
|
unless self.respond_to?(column)
|
71
|
-
raise Sequenced::InvalidAttributeError.new("
|
71
|
+
raise Sequenced::InvalidAttributeError.new(":column method ##{column.to_s} is undefined")
|
72
72
|
end
|
73
73
|
|
74
74
|
# Fetch the next ID unless it is already defined
|
@@ -92,7 +92,7 @@ module Sequenced
|
|
92
92
|
last_id = last_record.send(column)
|
93
93
|
|
94
94
|
unless last_id.is_a?(Integer)
|
95
|
-
raise Sequenced::InvalidAttributeError("
|
95
|
+
raise Sequenced::InvalidAttributeError("The sequential ID column must contain Integer values")
|
96
96
|
end
|
97
97
|
|
98
98
|
last_id + 1 > start_at ? last_id + 1 : start_at
|
data/lib/sequenced/version.rb
CHANGED
data/sequenced.gemspec
CHANGED
@@ -8,13 +8,13 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.email = ["derrickreimer@gmail.com"]
|
9
9
|
s.homepage = "https://github.com/djreimer/sequenced"
|
10
10
|
s.summary = "Generate scoped sequential IDs for ActiveRecord models"
|
11
|
-
s.description = "Sequenced is a simple Rails 3
|
11
|
+
s.description = "Sequenced is a simple Rails 3 plugin that generates scoped sequential IDs for ActiveRecord models"
|
12
12
|
|
13
13
|
s.files = `git ls-files`.split("\n")
|
14
14
|
s.test_files = Dir["test/**/*"]
|
15
15
|
|
16
|
-
s.add_dependency "activesupport", "
|
17
|
-
s.add_dependency "activerecord", "
|
18
|
-
s.add_development_dependency "rails", "
|
16
|
+
s.add_dependency "activesupport", "~> 3.0"
|
17
|
+
s.add_dependency "activerecord", "~> 3.0"
|
18
|
+
s.add_development_dependency "rails", "~> 3.1"
|
19
19
|
s.add_development_dependency "sqlite3"
|
20
20
|
end
|
data/test/dummy/log/test.log
CHANGED
@@ -1624,3 +1624,157 @@ Migrating to CreateComments (20120220000804)
|
|
1624
1624
|
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1625
1625
|
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
1626
1626
|
[1m[36m (8.1ms)[0m [1mrollback transaction[0m
|
1627
|
+
[1m[36m (0.3ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1628
|
+
Migrating to CreateQuestions (20120219165346)
|
1629
|
+
Migrating to CreateAnswers (20120219165548)
|
1630
|
+
Migrating to CreateAccounts (20120219171957)
|
1631
|
+
Migrating to CreateInvoices (20120219172039)
|
1632
|
+
Migrating to CreateOrders (20120219172922)
|
1633
|
+
Migrating to CreateSubscriptions (20120219174931)
|
1634
|
+
Migrating to CreateUsers (20120219175744)
|
1635
|
+
Migrating to CreateAddresses (20120219232323)
|
1636
|
+
Migrating to CreateComments (20120220000804)
|
1637
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1638
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1639
|
+
[1m[35mSQL (19.5ms)[0m INSERT INTO "accounts" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["name", nil], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1640
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1641
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1642
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."account_id" = 1 AND (custom_sequential_id IS NOT NULL) ORDER BY custom_sequential_id DESC LIMIT 1[0m
|
1643
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "users" WHERE "users"."custom_sequential_id" = 1 AND "users"."account_id" = 1
|
1644
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("account_id", "created_at", "custom_sequential_id", "name", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["account_id", 1], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["custom_sequential_id", 1], ["name", nil], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1645
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1646
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
1647
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1648
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1649
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["name", nil], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1650
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1651
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1652
|
+
[1m[36mInvoice Load (1.0ms)[0m [1mSELECT "invoices".* FROM "invoices" WHERE "invoices"."account_id" = 1 AND (sequential_id IS NOT NULL) ORDER BY sequential_id DESC LIMIT 1[0m
|
1653
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "invoices" WHERE "invoices"."sequential_id" = 1000 AND "invoices"."account_id" = 1
|
1654
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "invoices" ("account_id", "amount", "created_at", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["account_id", 1], ["amount", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["sequential_id", 1000], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1655
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1656
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1657
|
+
[1m[35mInvoice Load (0.1ms)[0m SELECT "invoices".* FROM "invoices" WHERE "invoices"."account_id" = 1 AND (sequential_id IS NOT NULL) ORDER BY sequential_id DESC LIMIT 1
|
1658
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "invoices" WHERE "invoices"."sequential_id" = 1001 AND "invoices"."account_id" = 1[0m
|
1659
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "invoices" ("account_id", "amount", "created_at", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 1], ["amount", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["sequential_id", 1001], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1660
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1661
|
+
[1m[35m (7.7ms)[0m rollback transaction
|
1662
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1663
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1664
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["name", nil], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1665
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1666
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1667
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "invoices" WHERE "invoices"."sequential_id" = 1 AND "invoices"."account_id" = 1
|
1668
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "invoices" ("account_id", "amount", "created_at", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["account_id", 1], ["amount", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["sequential_id", 1], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1669
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1670
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1671
|
+
[1m[35mInvoice Load (0.1ms)[0m SELECT "invoices".* FROM "invoices" WHERE "invoices"."account_id" = 1 AND (sequential_id IS NOT NULL) ORDER BY sequential_id DESC LIMIT 1
|
1672
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "invoices" WHERE "invoices"."sequential_id" = 1000 AND "invoices"."account_id" = 1[0m
|
1673
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "invoices" ("account_id", "amount", "created_at", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["account_id", 1], ["amount", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["sequential_id", 1000], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1674
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1675
|
+
[1m[35m (3.5ms)[0m rollback transaction
|
1676
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1677
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1678
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "subscriptions" WHERE "subscriptions"."sequential_id" = 1[0m
|
1679
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "subscriptions" ("created_at", "plan", "sequential_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["plan", nil], ["sequential_id", 1], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1680
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1681
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1682
|
+
[1m[36mSubscription Load (0.1ms)[0m [1mSELECT "subscriptions".* FROM "subscriptions" WHERE (sequential_id IS NOT NULL) ORDER BY sequential_id DESC LIMIT 1[0m
|
1683
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "subscriptions" WHERE "subscriptions"."sequential_id" = 2
|
1684
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "subscriptions" ("created_at", "plan", "sequential_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["plan", nil], ["sequential_id", 2], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1685
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1686
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
1687
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1688
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1689
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "questions" ("body", "created_at", "summary", "updated_at") VALUES (?, ?, ?, ?) [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["summary", nil], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1690
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1691
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1692
|
+
[1m[36mAnswer Load (0.3ms)[0m [1mSELECT "answers".* FROM "answers" WHERE "answers"."question_id" = 1 AND (sequential_id IS NOT NULL) ORDER BY sequential_id DESC LIMIT 1[0m
|
1693
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "answers" WHERE "answers"."sequential_id" = 1 AND "answers"."question_id" = 1
|
1694
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "answers" ("body", "created_at", "question_id", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["question_id", 1], ["sequential_id", 1], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1695
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1696
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
1697
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1698
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1699
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "questions" ("body", "created_at", "summary", "updated_at") VALUES (?, ?, ?, ?) [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["summary", nil], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1700
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1701
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1702
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "answers" WHERE "answers"."sequential_id" = 10 AND "answers"."question_id" = 1[0m
|
1703
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "answers" ("body", "created_at", "question_id", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["question_id", 1], ["sequential_id", 10], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1704
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1705
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1706
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "answers" WHERE "answers"."sequential_id" = 10 AND "answers"."question_id" = 1[0m
|
1707
|
+
[1m[35mAnswer Load (0.1ms)[0m SELECT "answers".* FROM "answers" WHERE "answers"."question_id" = 1 AND (sequential_id IS NOT NULL) ORDER BY sequential_id DESC LIMIT 1
|
1708
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "answers" WHERE "answers"."sequential_id" = 11 AND "answers"."question_id" = 1[0m
|
1709
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "answers" ("body", "created_at", "question_id", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["question_id", 1], ["sequential_id", 11], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1710
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1711
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1712
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1713
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1714
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "questions" ("body", "created_at", "summary", "updated_at") VALUES (?, ?, ?, ?)[0m [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["summary", nil], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1715
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1716
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1717
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "comments" WHERE "comments"."sequential_id" = 1 AND "comments"."question_id" = 1
|
1718
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "comments" ("body", "created_at", "question_id", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["question_id", 1], ["sequential_id", 1], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1719
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1720
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1721
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "comments" WHERE "comments"."sequential_id" = 2 AND "comments"."question_id" = 1
|
1722
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "comments" ("body", "created_at", "question_id", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["question_id", 1], ["sequential_id", 2], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1723
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1724
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1725
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "comments" WHERE "comments"."sequential_id" = 3 AND "comments"."question_id" = 1
|
1726
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "comments" ("body", "created_at", "question_id", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["question_id", 1], ["sequential_id", 3], ["updated_at", Wed, 07 Mar 2012 06:55:26 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[35mComment Load (0.1ms)[0m SELECT "comments".* FROM "comments" WHERE "comments"."question_id" = 1 AND (sequential_id IS NOT NULL) ORDER BY sequential_id DESC LIMIT 1
|
1730
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "comments" WHERE "comments"."sequential_id" = 4 AND "comments"."question_id" = 1[0m
|
1731
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "comments" ("body", "created_at", "question_id", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["question_id", 1], ["sequential_id", 4], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1732
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1733
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1734
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1735
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1736
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
1737
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1738
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1739
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1740
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "questions" ("body", "created_at", "summary", "updated_at") VALUES (?, ?, ?, ?)[0m [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["summary", nil], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1741
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1742
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1743
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "answers" WHERE "answers"."sequential_id" = 10 AND "answers"."question_id" = 1
|
1744
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "answers" ("body", "created_at", "question_id", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["question_id", 1], ["sequential_id", 10], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1745
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1746
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1747
|
+
[1m[35mAnswer Load (0.1ms)[0m SELECT "answers".* FROM "answers" WHERE "answers"."question_id" = 1 AND (sequential_id IS NOT NULL) ORDER BY sequential_id DESC LIMIT 1
|
1748
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "answers" WHERE "answers"."sequential_id" = 11 AND "answers"."question_id" = 1[0m
|
1749
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "answers" ("body", "created_at", "question_id", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["question_id", 1], ["sequential_id", 11], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1750
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1751
|
+
[1m[35m (2.7ms)[0m rollback transaction
|
1752
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1753
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1754
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "questions" ("body", "created_at", "summary", "updated_at") VALUES (?, ?, ?, ?)[0m [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["summary", nil], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1755
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1756
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1757
|
+
[1m[35mAnswer Load (0.1ms)[0m SELECT "answers".* FROM "answers" WHERE "answers"."question_id" = 1 AND (sequential_id IS NOT NULL) ORDER BY sequential_id DESC LIMIT 1
|
1758
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "answers" WHERE "answers"."sequential_id" = 1 AND "answers"."question_id" = 1[0m
|
1759
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "answers" ("body", "created_at", "question_id", "sequential_id", "updated_at") VALUES (?, ?, ?, ?, ?) [["body", nil], ["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["question_id", 1], ["sequential_id", 1], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1760
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1761
|
+
[1m[35mAnswer Load (0.1ms)[0m SELECT "answers".* FROM "answers" WHERE "answers"."id" = ? LIMIT 1 [["id", 1]]
|
1762
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1763
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "answers" WHERE "answers"."sequential_id" = 1 AND "answers"."question_id" = 1 AND (NOT id = 1)
|
1764
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "answers" SET "body" = 'Updated body', "updated_at" = '2012-03-07 06:55:26.827040' WHERE "answers"."id" = 1[0m
|
1765
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1766
|
+
[1m[36m (2.7ms)[0m [1mrollback transaction[0m
|
1767
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1768
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1769
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["name", nil], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1770
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1771
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1772
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
1773
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1774
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1775
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1776
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00], ["name", nil], ["updated_at", Wed, 07 Mar 2012 06:55:26 UTC +00:00]]
|
1777
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1778
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1779
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
1780
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: sequenced
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version:
|
5
|
+
version: 1.0.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Derrick Reimer
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-03-07 00:00:00 -08:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -18,9 +18,9 @@ dependencies:
|
|
18
18
|
requirement: &id001 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
|
-
- -
|
21
|
+
- - ~>
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 3.0
|
23
|
+
version: "3.0"
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: *id001
|
@@ -29,9 +29,9 @@ dependencies:
|
|
29
29
|
requirement: &id002 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ~>
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 3.0
|
34
|
+
version: "3.0"
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: *id002
|
@@ -40,9 +40,9 @@ dependencies:
|
|
40
40
|
requirement: &id003 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 3.1
|
45
|
+
version: "3.1"
|
46
46
|
type: :development
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: *id003
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
type: :development
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: *id004
|
60
|
-
description: Sequenced is a simple Rails 3
|
60
|
+
description: Sequenced is a simple Rails 3 plugin that generates scoped sequential IDs for ActiveRecord models
|
61
61
|
email:
|
62
62
|
- derrickreimer@gmail.com
|
63
63
|
executables: []
|
@@ -68,10 +68,12 @@ extra_rdoc_files: []
|
|
68
68
|
|
69
69
|
files:
|
70
70
|
- .gitignore
|
71
|
+
- CHANGELOG.md
|
71
72
|
- Gemfile
|
72
73
|
- MIT-LICENSE
|
73
74
|
- README.md
|
74
75
|
- Rakefile
|
76
|
+
- TODO.md
|
75
77
|
- lib/sequenced.rb
|
76
78
|
- lib/sequenced/acts_as_sequenced.rb
|
77
79
|
- lib/sequenced/exceptions.rb
|
@@ -148,7 +150,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
148
150
|
requirements:
|
149
151
|
- - ">="
|
150
152
|
- !ruby/object:Gem::Version
|
151
|
-
hash:
|
153
|
+
hash: 2873144507435092407
|
152
154
|
segments:
|
153
155
|
- 0
|
154
156
|
version: "0"
|
@@ -157,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
159
|
requirements:
|
158
160
|
- - ">="
|
159
161
|
- !ruby/object:Gem::Version
|
160
|
-
hash:
|
162
|
+
hash: 2873144507435092407
|
161
163
|
segments:
|
162
164
|
- 0
|
163
165
|
version: "0"
|