fine_print 1.0.0 → 1.1.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.
- checksums.yaml +4 -4
- data/README.md +18 -7
- data/lib/fine_print/controller_additions.rb +7 -5
- data/lib/fine_print/controller_additions.rb~ +6 -6
- data/lib/fine_print/version.rb +1 -1
- data/lib/fine_print/version.rb~ +3 -0
- data/lib/fine_print.rb +31 -27
- data/lib/fine_print.rb~ +12 -28
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +71 -0
- data/spec/dummy/log/test.log +4185 -0
- data/spec/lib/fine_print_spec.rb +16 -16
- data/spec/lib/fine_print_spec.rb~ +15 -15
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5872d7ae6a8abfb926c3eb5c3203e086937ee70c
|
4
|
+
data.tar.gz: c685f59d91186586a78bd74eafaf16e2c02c2b65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96ee62c1e276077980ff95575e896ada2e679d9663a4bd84c55208434e86c37452b84ed1b83142b6051b07a217d520cc5ab336810c9e0dcbe1b93bdc20699e23
|
7
|
+
data.tar.gz: b4da61298157efa7fb336d8b88b8a4c2011b6373995b27e67d7cbff1bcaeaa5dfc6571095d7020d65ea95226d47ef0f4aa4be4b15609f685ef6d4c75728d87e9
|
data/README.md
CHANGED
@@ -60,11 +60,22 @@ Pay particular attention to `user_admin_proc`, as you will be unable to manage y
|
|
60
60
|
|
61
61
|
## Usage
|
62
62
|
|
63
|
-
FinePrint
|
63
|
+
The FinePrint module contains several methods that help you find contracts and mark them as signed:
|
64
64
|
|
65
|
-
`
|
65
|
+
`get_contract(contract_object_or_id_or_name)`
|
66
|
+
`sign_contract(user, contract_object_or_id_or_name)`
|
67
|
+
`signed_contract?(user, contract_object_or_id_or_name)`
|
68
|
+
`signed_any_contract_version?(user, contract_object_or_id_or_name)`
|
69
|
+
`get_unsigned_contract_names(user, contract_names...)`
|
66
70
|
|
67
|
-
Additionally,
|
71
|
+
Additionally, FinePrint adds 2 class methods to all of your controllers:
|
72
|
+
|
73
|
+
`fine_print_get_signatures(contract_names..., options_hash)`
|
74
|
+
`fine_print_skip_signatures(contract_names..., options_hash)`
|
75
|
+
|
76
|
+
And 1 instance method, also to all of your controllers:
|
77
|
+
|
78
|
+
`fine_print_return`
|
68
79
|
|
69
80
|
To require that your users sign the most recent version of a contract, call
|
70
81
|
`fine_print_get_signatures` in your controllers, just as you would a
|
@@ -114,10 +125,10 @@ the names of the unsigned contracts passed along in a `terms` array in the URL p
|
|
114
125
|
|
115
126
|
Your job as the site developer is to present the terms to the user and ask them to sign them.
|
116
127
|
This normally involves the user clicking an "I have read the above terms" checkbox which enables an "I Agree" button.
|
117
|
-
When the "Agree" button is clicked (and you should verify that the checkbox is actually clicked in the params passed to the server),
|
118
|
-
method that can call `FinePrint.sign_contract` which takes
|
119
|
-
object. On success, this controller method can send the user back to where
|
120
|
-
go by calling the `fine_print_return` controller method (only works for GET requests).
|
128
|
+
When the "Agree" button is clicked (and you should verify that the checkbox is actually clicked in the params passed to the server),
|
129
|
+
you need to send the information off to a controller method that can call `FinePrint.sign_contract` which takes
|
130
|
+
a user and a contract name, ID, or object. On success, this controller method can send the user back to where
|
131
|
+
they were trying to go by calling the `fine_print_return` controller method (only works for GET requests).
|
121
132
|
|
122
133
|
If there are multiple unsigned contracts, you are not required to get the user to sign
|
123
134
|
them all in one page. One strategy is to present only the first unsigned contract to them
|
@@ -26,20 +26,20 @@ module FinePrint
|
|
26
26
|
fine_print_options = options.slice(*FinePrint::SIGNATURE_OPTIONS)
|
27
27
|
|
28
28
|
# Convert all names to string
|
29
|
-
names = args.collect{|n| n.to_s}
|
29
|
+
names = args.flatten.collect{|n| n.to_s}
|
30
30
|
|
31
31
|
class_eval do
|
32
32
|
before_filter(filter_options) do |controller|
|
33
|
-
|
33
|
+
contract_names = names - fine_print_skipped_contract_names
|
34
34
|
|
35
35
|
# Bail if nothing to do
|
36
|
-
return true if
|
36
|
+
return true if contract_names.blank?
|
37
37
|
|
38
38
|
user = send FinePrint.current_user_method
|
39
39
|
FinePrint.raise_unless_signed_in(user)
|
40
40
|
|
41
41
|
unsigned_contract_names =
|
42
|
-
FinePrint.get_unsigned_contract_names(
|
42
|
+
FinePrint.get_unsigned_contract_names(user, contract_names)
|
43
43
|
return true if unsigned_contract_names.empty?
|
44
44
|
|
45
45
|
# http://stackoverflow.com/a/2165727/1664216
|
@@ -54,7 +54,9 @@ module FinePrint
|
|
54
54
|
# See the README
|
55
55
|
def fine_print_skip_signatures(*args)
|
56
56
|
options = args.last.is_a?(Hash) ? args.pop : {}
|
57
|
-
|
57
|
+
|
58
|
+
# Convert all names to string
|
59
|
+
names = args.flatten.collect{|n| n.to_s}
|
58
60
|
|
59
61
|
class_eval do
|
60
62
|
prepend_before_filter(options) do |controller|
|
@@ -14,7 +14,7 @@ module FinePrint
|
|
14
14
|
|
15
15
|
# See the README
|
16
16
|
def fine_print_return
|
17
|
-
redirect_to root_path
|
17
|
+
redirect_to session.delete(:fine_print_return_to) || root_path
|
18
18
|
end
|
19
19
|
|
20
20
|
module ClassMethods
|
@@ -26,20 +26,20 @@ module FinePrint
|
|
26
26
|
fine_print_options = options.slice(*FinePrint::SIGNATURE_OPTIONS)
|
27
27
|
|
28
28
|
# Convert all names to string
|
29
|
-
names = args.collect{|n| n.to_s}
|
29
|
+
names = args.flatten.collect{|n| n.to_s}
|
30
30
|
|
31
31
|
class_eval do
|
32
32
|
before_filter(filter_options) do |controller|
|
33
|
-
|
33
|
+
contract_names = names - fine_print_skipped_contract_names
|
34
34
|
|
35
35
|
# Bail if nothing to do
|
36
|
-
return true if
|
36
|
+
return true if contract_names.blank?
|
37
37
|
|
38
38
|
user = send FinePrint.current_user_method
|
39
39
|
FinePrint.raise_unless_signed_in(user)
|
40
40
|
|
41
41
|
unsigned_contract_names =
|
42
|
-
FinePrint.get_unsigned_contract_names(
|
42
|
+
FinePrint.get_unsigned_contract_names(user, contract_names)
|
43
43
|
return true if unsigned_contract_names.empty?
|
44
44
|
|
45
45
|
# http://stackoverflow.com/a/2165727/1664216
|
@@ -54,7 +54,7 @@ module FinePrint
|
|
54
54
|
# See the README
|
55
55
|
def fine_print_skip_signatures(*args)
|
56
56
|
options = args.last.is_a?(Hash) ? args.pop : {}
|
57
|
-
names = args.collect{|
|
57
|
+
names = args.flatten.collect{|n| n.to_s}
|
58
58
|
|
59
59
|
class_eval do
|
60
60
|
prepend_before_filter(options) do |controller|
|
data/lib/fine_print/version.rb
CHANGED
data/lib/fine_print.rb
CHANGED
@@ -29,6 +29,7 @@ module FinePrint
|
|
29
29
|
|
30
30
|
# Gets a contract given either the contract's object, ID or name
|
31
31
|
# If given a name, it returns the latest published version of that contract
|
32
|
+
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
32
33
|
#
|
33
34
|
def self.get_contract(reference)
|
34
35
|
ref = Integer(reference) rescue reference
|
@@ -42,30 +43,11 @@ module FinePrint
|
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
45
|
-
#
|
46
|
-
# version the given user has not signed.
|
47
|
-
# - names -- an array of contract names
|
46
|
+
# Records that the given user has signed the given contract
|
48
47
|
# - user -- the user in question
|
48
|
+
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
49
49
|
#
|
50
|
-
def self.
|
51
|
-
raise_unless_signed_in(user)
|
52
|
-
return [] if names.blank?
|
53
|
-
names_array = names.is_a?(Array) ? names.collect{|name| name.to_s} : [names.to_s]
|
54
|
-
|
55
|
-
signed_contracts = Contract
|
56
|
-
.joins(:signatures)
|
57
|
-
.where({:name => names_array,
|
58
|
-
:fine_print_signatures => {:user_id => user.id,
|
59
|
-
:user_type => user.class.name}}).latest
|
60
|
-
signed_contract_names = signed_contracts.collect{|c| c.name}
|
61
|
-
|
62
|
-
return names - signed_contract_names
|
63
|
-
end
|
64
|
-
|
65
|
-
# Records that the given user has signed the given contract; the contract
|
66
|
-
# can be a Contract object, a contract ID, or a contract name (string)
|
67
|
-
#
|
68
|
-
def self.sign_contract(contract, user)
|
50
|
+
def self.sign_contract(user, contract)
|
69
51
|
raise_unless_signed_in(user)
|
70
52
|
contract = get_contract(contract)
|
71
53
|
raise IllegalState, 'Contract not found' if contract.nil?
|
@@ -76,10 +58,11 @@ module FinePrint
|
|
76
58
|
end
|
77
59
|
end
|
78
60
|
|
79
|
-
# Returns true iff the given user has signed the given contract
|
80
|
-
#
|
61
|
+
# Returns true iff the given user has signed the given contract
|
62
|
+
# - user -- the user in question
|
63
|
+
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
81
64
|
#
|
82
|
-
def self.signed_contract?(
|
65
|
+
def self.signed_contract?(user, contract)
|
83
66
|
raise_unless_signed_in(user)
|
84
67
|
contract = get_contract(contract)
|
85
68
|
|
@@ -87,9 +70,10 @@ module FinePrint
|
|
87
70
|
:user_type => user.class.name).first.nil?
|
88
71
|
end
|
89
72
|
|
90
|
-
# Returns true iff the given user has signed any version of the given contract
|
73
|
+
# Returns true iff the given user has signed any version of the given contract
|
74
|
+
# - user -- the user in question
|
91
75
|
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
92
|
-
def self.signed_any_contract_version?(
|
76
|
+
def self.signed_any_contract_version?(user, contract)
|
93
77
|
raise_unless_signed_in(user)
|
94
78
|
contract = get_contract(contract)
|
95
79
|
!Signature.joins(:contract)
|
@@ -98,6 +82,26 @@ module FinePrint
|
|
98
82
|
:user_id => user.id).first.nil?
|
99
83
|
end
|
100
84
|
|
85
|
+
# Returns an array of names for the contracts whose latest published
|
86
|
+
# version the given user has not signed.
|
87
|
+
# - user -- the user in question
|
88
|
+
# - names -- contract names to check
|
89
|
+
#
|
90
|
+
def self.get_unsigned_contract_names(user, *names)
|
91
|
+
raise_unless_signed_in(user)
|
92
|
+
names = names.flatten.collect{|name| name.to_s}
|
93
|
+
return [] if names.blank?
|
94
|
+
|
95
|
+
signed_contracts = Contract
|
96
|
+
.joins(:signatures)
|
97
|
+
.where({:name => names,
|
98
|
+
:fine_print_signatures => {:user_id => user.id,
|
99
|
+
:user_type => user.class.name}}).latest
|
100
|
+
signed_contract_names = signed_contracts.collect{|c| c.name}
|
101
|
+
|
102
|
+
return names - signed_contract_names
|
103
|
+
end
|
104
|
+
|
101
105
|
def self.is_signed_in?(user)
|
102
106
|
user_signed_in_proc.call(user)
|
103
107
|
end
|
data/lib/fine_print.rb~
CHANGED
@@ -29,6 +29,7 @@ module FinePrint
|
|
29
29
|
|
30
30
|
# Gets a contract given either the contract's object, ID or name
|
31
31
|
# If given a name, it returns the latest published version of that contract
|
32
|
+
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
32
33
|
#
|
33
34
|
def self.get_contract(reference)
|
34
35
|
ref = Integer(reference) rescue reference
|
@@ -42,44 +43,26 @@ module FinePrint
|
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
45
|
-
#
|
46
|
-
# version the given user has not signed.
|
47
|
-
# - names -- an array of contract names
|
46
|
+
# Records that the given user has signed the given contract
|
48
47
|
# - user -- the user in question
|
48
|
+
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
49
49
|
#
|
50
|
-
def self.
|
51
|
-
raise_unless_signed_in(user)
|
52
|
-
return [] if names.blank?
|
53
|
-
names_array = names.is_a?(Array) ? names.collect{|name| name.to_s} : [names.to_s]
|
54
|
-
|
55
|
-
signed_contracts = Contract
|
56
|
-
.joins(:signatures)
|
57
|
-
.where({:name => names_array,
|
58
|
-
:fine_print_signatures => {:user_id => user.id,
|
59
|
-
:user_type => user.class.name}}).latest
|
60
|
-
signed_contract_names = signed_contracts.collect{|c| c.name}
|
61
|
-
|
62
|
-
return names - signed_contract_names
|
63
|
-
end
|
64
|
-
|
65
|
-
# Records that the given user has signed the given contract; the contract
|
66
|
-
# can be a Contract object, a contract ID, or a contract name (string)
|
67
|
-
#
|
68
|
-
def self.sign_contract(contract, user)
|
50
|
+
def self.sign_contract(user, contract)
|
69
51
|
raise_unless_signed_in(user)
|
70
52
|
contract = get_contract(contract)
|
71
53
|
raise IllegalState, 'Contract not found' if contract.nil?
|
72
54
|
|
73
|
-
|
55
|
+
Signature.create do |signature|
|
74
56
|
signature.user = user
|
75
57
|
signature.contract = contract
|
76
58
|
end
|
77
59
|
end
|
78
60
|
|
79
|
-
# Returns true iff the given user has signed the given contract
|
80
|
-
#
|
61
|
+
# Returns true iff the given user has signed the given contract
|
62
|
+
# - user -- the user in question
|
63
|
+
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
81
64
|
#
|
82
|
-
def self.signed_contract?(
|
65
|
+
def self.signed_contract?(user, contract)
|
83
66
|
raise_unless_signed_in(user)
|
84
67
|
contract = get_contract(contract)
|
85
68
|
|
@@ -87,9 +70,10 @@ module FinePrint
|
|
87
70
|
:user_type => user.class.name).first.nil?
|
88
71
|
end
|
89
72
|
|
90
|
-
# Returns true iff the given user has signed any version of the given contract
|
73
|
+
# Returns true iff the given user has signed any version of the given contract
|
74
|
+
# - user -- the user in question
|
91
75
|
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
92
|
-
def self.signed_any_contract_version?(
|
76
|
+
def self.signed_any_contract_version?(user, contract)
|
93
77
|
raise_unless_signed_in(user)
|
94
78
|
contract = get_contract(contract)
|
95
79
|
!Signature.joins(:contract)
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -1674,3 +1674,74 @@ Connecting to database specified by database.yml
|
|
1674
1674
|
[1m[35m (4.2ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1675
1675
|
[1m[36m (4.6ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")[0m
|
1676
1676
|
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1677
|
+
Connecting to database specified by database.yml
|
1678
|
+
Connecting to database specified by database.yml
|
1679
|
+
Connecting to database specified by database.yml
|
1680
|
+
Connecting to database specified by database.yml
|
1681
|
+
Connecting to database specified by database.yml
|
1682
|
+
Connecting to database specified by database.yml
|
1683
|
+
Connecting to database specified by database.yml
|
1684
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1685
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
1686
|
+
[1m[36m (22.6ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1687
|
+
[1m[35m (5.2ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 'f' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1688
|
+
[1m[36m (5.5ms)[0m [1mDROP TABLE "fine_print_contracts"[0m
|
1689
|
+
[1m[35m (4.5ms)[0m CREATE TABLE "fine_print_contracts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "version" integer, "title" varchar(255) NOT NULL, "content" text NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1690
|
+
[1m[36m (4.5ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
1691
|
+
[1m[35m (5.6ms)[0m DROP TABLE "fine_print_signatures"
|
1692
|
+
[1m[36m (5.1ms)[0m [1mCREATE TABLE "fine_print_signatures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255) NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1693
|
+
[1m[35m (5.0ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1694
|
+
[1m[36m (4.6ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")[0m
|
1695
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1696
|
+
Connecting to database specified by database.yml
|
1697
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1698
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
1699
|
+
[1m[36m (16.3ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1700
|
+
[1m[35m (5.9ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 'f' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1701
|
+
[1m[36m (4.6ms)[0m [1mDROP TABLE "fine_print_contracts"[0m
|
1702
|
+
[1m[35m (4.4ms)[0m CREATE TABLE "fine_print_contracts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "version" integer, "title" varchar(255) NOT NULL, "content" text NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1703
|
+
[1m[36m (4.6ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
1704
|
+
[1m[35m (4.8ms)[0m DROP TABLE "fine_print_signatures"
|
1705
|
+
[1m[36m (4.7ms)[0m [1mCREATE TABLE "fine_print_signatures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255) NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1706
|
+
[1m[35m (4.5ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1707
|
+
[1m[36m (4.4ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")[0m
|
1708
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1709
|
+
Connecting to database specified by database.yml
|
1710
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1711
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
1712
|
+
[1m[36m (14.4ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1713
|
+
[1m[35m (5.8ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 'f' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1714
|
+
[1m[36m (5.2ms)[0m [1mDROP TABLE "fine_print_contracts"[0m
|
1715
|
+
[1m[35m (5.4ms)[0m CREATE TABLE "fine_print_contracts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "version" integer, "title" varchar(255) NOT NULL, "content" text NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1716
|
+
[1m[36m (4.9ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
1717
|
+
[1m[35m (5.5ms)[0m DROP TABLE "fine_print_signatures"
|
1718
|
+
[1m[36m (5.1ms)[0m [1mCREATE TABLE "fine_print_signatures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255) NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1719
|
+
[1m[35m (5.4ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1720
|
+
[1m[36m (4.9ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")[0m
|
1721
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1722
|
+
Connecting to database specified by database.yml
|
1723
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1724
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
1725
|
+
[1m[36m (13.7ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1726
|
+
[1m[35m (5.2ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 'f' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1727
|
+
[1m[36m (5.2ms)[0m [1mDROP TABLE "fine_print_contracts"[0m
|
1728
|
+
[1m[35m (5.2ms)[0m CREATE TABLE "fine_print_contracts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "version" integer, "title" varchar(255) NOT NULL, "content" text NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1729
|
+
[1m[36m (5.3ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
1730
|
+
[1m[35m (5.5ms)[0m DROP TABLE "fine_print_signatures"
|
1731
|
+
[1m[36m (5.8ms)[0m [1mCREATE TABLE "fine_print_signatures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255) NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1732
|
+
[1m[35m (5.3ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1733
|
+
[1m[36m (4.8ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")[0m
|
1734
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1735
|
+
Connecting to database specified by database.yml
|
1736
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1737
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
1738
|
+
[1m[36m (11.9ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1739
|
+
[1m[35m (4.6ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 'f' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1740
|
+
[1m[36m (5.2ms)[0m [1mDROP TABLE "fine_print_contracts"[0m
|
1741
|
+
[1m[35m (4.6ms)[0m CREATE TABLE "fine_print_contracts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "version" integer, "title" varchar(255) NOT NULL, "content" text NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
1742
|
+
[1m[36m (4.4ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
1743
|
+
[1m[35m (5.2ms)[0m DROP TABLE "fine_print_signatures"
|
1744
|
+
[1m[36m (4.7ms)[0m [1mCREATE TABLE "fine_print_signatures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255) NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1745
|
+
[1m[35m (4.4ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1746
|
+
[1m[36m (4.5ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")[0m
|
1747
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|