fine_print 1.2.0 → 1.3.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 +3 -4
- data/config/initializers/fine_print.rb +6 -5
- data/config/initializers/fine_print.rb~ +4 -4
- data/lib/fine_print/controller_additions.rb +12 -3
- data/lib/fine_print/controller_additions.rb~ +17 -2
- data/lib/fine_print/version.rb +1 -1
- data/lib/fine_print/version.rb~ +1 -1
- data/lib/fine_print.rb +10 -10
- data/lib/fine_print.rb~ +11 -11
- data/spec/dummy/config/initializers/fine_print.rb +6 -5
- data/spec/dummy/config/initializers/fine_print.rb~ +7 -7
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +65 -0
- data/spec/dummy/log/test.log +4149 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b2e32a76793d71e6cf6ac6971ba125269c52658
|
4
|
+
data.tar.gz: a95a87faf71c9aefb4bc80d7a7516dfc47c18c49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4362c6e678e9ce7eeeebf1f5553e6267b1c7a3a6285ac4663966763a58bca44ec0652b06af57c271c4ac81f654c6fa469e15d220c5780da92f133fb8df422cbe
|
7
|
+
data.tar.gz: b11890e37902d3e00c403ed3b4a6459cb76ff8827f54a99634e7086180124ab3db85d3f66176bc43f4f9f7fe96149bd8370d76f33db75955b274f2032670ea75
|
data/README.md
CHANGED
@@ -97,10 +97,9 @@ class MyController < ApplicationController
|
|
97
97
|
```
|
98
98
|
|
99
99
|
You should only try to get signatures when you have a user who is logged in
|
100
|
-
(FinePrint will
|
101
|
-
|
102
|
-
|
103
|
-
gets a user to login.
|
100
|
+
(FinePrint will allow non-logged in users to pass right through without signing
|
101
|
+
anything). This normally means that before the call to `fine_print_get_signatures`
|
102
|
+
you should call whatever `before_filter` gets a user to login.
|
104
103
|
|
105
104
|
Just like how rails provides a `skip_before_filter` method to offset `before_filter` calls,
|
106
105
|
FinePrint provides a `fine_print_skip_signatures` method. This method takes the same
|
@@ -12,13 +12,14 @@ FinePrint.configure do |config|
|
|
12
12
|
# Default: lambda { |user| false } (no admins)
|
13
13
|
config.user_admin_proc = lambda { |user| false }
|
14
14
|
|
15
|
-
# Proc called with user as argument that returns true iif the
|
16
|
-
# In many systems, a non-logged-in user is represented by nil.
|
15
|
+
# Proc called with user as argument that returns true iif the argument is a user
|
16
|
+
# who can sign a contract. In many systems, a non-logged-in user is represented by nil.
|
17
17
|
# However, some systems use something like an AnonymousUser class to represent this state.
|
18
|
-
#
|
19
|
-
#
|
18
|
+
# If this proc returns false, FinePrint will not ask for signatures and will allow access
|
19
|
+
# to any page, so it's up to the developer to make sure that unsigned users can't access
|
20
|
+
# pages that require a contract signature to use.
|
20
21
|
# Default: lambda { |user| user }
|
21
|
-
config.
|
22
|
+
config.can_sign_contracts_proc = lambda { |user| user }
|
22
23
|
|
23
24
|
# Path to redirect users to when an error occurs (e.g. permission denied on admin pages).
|
24
25
|
# Default: '/'
|
@@ -4,7 +4,7 @@ FinePrint.configure do |config|
|
|
4
4
|
# Engine Configuration
|
5
5
|
|
6
6
|
# Proc called with controller as argument that returns the current user.
|
7
|
-
# Default:
|
7
|
+
# Default: lambda { |controller| controller.current_user }
|
8
8
|
config.current_user_proc = lambda { |controller| controller.current_user }
|
9
9
|
|
10
10
|
# Proc called with user as argument that returns true iif the user is an admin.
|
@@ -12,13 +12,13 @@ FinePrint.configure do |config|
|
|
12
12
|
# Default: lambda { |user| false } (no admins)
|
13
13
|
config.user_admin_proc = lambda { |user| false }
|
14
14
|
|
15
|
-
# Proc called with user as argument that returns true iif the
|
16
|
-
# In many systems, a non-logged-in user is represented by nil.
|
15
|
+
# Proc called with user as argument that returns true iif the argument is a user
|
16
|
+
# who can sign a contract. In many systems, a non-logged-in user is represented by nil.
|
17
17
|
# However, some systems use something like an AnonymousUser class to represent this state.
|
18
18
|
# This proc is mostly used to help the developer realize that they should only be asking
|
19
19
|
# signed in users to sign contracts; without this, developers would get a cryptic SQL error.
|
20
20
|
# Default: lambda { |user| user }
|
21
|
-
config.
|
21
|
+
config.can_sign_contracts_proc = lambda { |user| user }
|
22
22
|
|
23
23
|
# Path to redirect users to when an error occurs (e.g. permission denied on admin pages).
|
24
24
|
# Default: '/'
|
@@ -30,16 +30,25 @@ module FinePrint
|
|
30
30
|
|
31
31
|
class_eval do
|
32
32
|
before_filter(filter_options) do |controller|
|
33
|
+
# If the user isn't signed in, they can't sign a contract. Since there
|
34
|
+
# may be some pages that logged in and non-logged in users can visit,
|
35
|
+
# just return quietly instead of raising an exception.
|
36
|
+
user = FinePrint.current_user_proc.call(self)
|
37
|
+
return true unless FinePrint.can_sign?(user)
|
38
|
+
|
33
39
|
contract_names = names - fine_print_skipped_contract_names
|
34
40
|
|
35
41
|
# Bail if nothing to do
|
36
42
|
return true if contract_names.blank?
|
37
43
|
|
38
|
-
user = FinePrint.current_user_proc.call(self)
|
39
|
-
FinePrint.raise_unless_signed_in(user)
|
40
|
-
|
41
44
|
unsigned_contract_names =
|
42
45
|
FinePrint.get_unsigned_contract_names(user, contract_names)
|
46
|
+
|
47
|
+
# Ignore contracts that don't yet exist or aren't yet published (happens
|
48
|
+
# when adding code that requires a new contract but before that contract
|
49
|
+
# has been added and published)
|
50
|
+
unsigned_contract_names.reject!{|name| FinePrint.get_contract(name).blank?}
|
51
|
+
|
43
52
|
return true if unsigned_contract_names.empty?
|
44
53
|
|
45
54
|
# http://stackoverflow.com/a/2165727/1664216
|
@@ -30,16 +30,31 @@ module FinePrint
|
|
30
30
|
|
31
31
|
class_eval do
|
32
32
|
before_filter(filter_options) do |controller|
|
33
|
+
# If the user isn't signed in, they can't sign a contract. Since there
|
34
|
+
# may be some pages that logged in and non-logged in users can visit,
|
35
|
+
# just return quietly instead of raising an exception.
|
36
|
+
user = FinePrint.current_user_proc.call(self)
|
37
|
+
return true unless FinePrint.can_sign?(user)
|
38
|
+
|
33
39
|
contract_names = names - fine_print_skipped_contract_names
|
34
40
|
|
35
41
|
# Bail if nothing to do
|
36
42
|
return true if contract_names.blank?
|
37
43
|
|
38
|
-
|
39
|
-
|
44
|
+
<<<<<<< HEAD
|
45
|
+
=======
|
46
|
+
user = FinePrint.current_user_proc.call(self)
|
47
|
+
FinePrint.raise_unless_can_sign(user)
|
40
48
|
|
49
|
+
>>>>>>> a0cf8254c527fa9f44b9dae47c2a157221aa14ab
|
41
50
|
unsigned_contract_names =
|
42
51
|
FinePrint.get_unsigned_contract_names(user, contract_names)
|
52
|
+
|
53
|
+
# Ignore contracts that don't yet exist or aren't yet published (happens
|
54
|
+
# when adding code that requires a new contract but before that contract
|
55
|
+
# has been added and published)
|
56
|
+
unsigned_contract_names.reject!{|name| FinePrint.get_contract(name).blank?}
|
57
|
+
|
43
58
|
return true if unsigned_contract_names.empty?
|
44
59
|
|
45
60
|
# http://stackoverflow.com/a/2165727/1664216
|
data/lib/fine_print/version.rb
CHANGED
data/lib/fine_print/version.rb~
CHANGED
data/lib/fine_print.rb
CHANGED
@@ -9,7 +9,7 @@ module FinePrint
|
|
9
9
|
ENGINE_OPTIONS = [
|
10
10
|
:current_user_proc,
|
11
11
|
:user_admin_proc,
|
12
|
-
:
|
12
|
+
:can_sign_contracts_proc,
|
13
13
|
:pose_contracts_path,
|
14
14
|
:redirect_path
|
15
15
|
]
|
@@ -48,7 +48,7 @@ module FinePrint
|
|
48
48
|
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
49
49
|
#
|
50
50
|
def self.sign_contract(user, contract)
|
51
|
-
|
51
|
+
raise_unless_can_sign(user)
|
52
52
|
contract = get_contract(contract)
|
53
53
|
raise IllegalState, 'Contract not found' if contract.nil?
|
54
54
|
|
@@ -63,7 +63,7 @@ module FinePrint
|
|
63
63
|
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
64
64
|
#
|
65
65
|
def self.signed_contract?(user, contract)
|
66
|
-
|
66
|
+
raise_unless_can_sign(user)
|
67
67
|
contract = get_contract(contract)
|
68
68
|
|
69
69
|
!contract.signatures.where(:user_id => user.id,
|
@@ -74,7 +74,7 @@ module FinePrint
|
|
74
74
|
# - user -- the user in question
|
75
75
|
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
76
76
|
def self.signed_any_contract_version?(user, contract)
|
77
|
-
|
77
|
+
raise_unless_can_sign(user)
|
78
78
|
contract = get_contract(contract)
|
79
79
|
!Signature.joins(:contract)
|
80
80
|
.where(:fine_print_contracts => {:name => contract.name},
|
@@ -88,7 +88,7 @@ module FinePrint
|
|
88
88
|
# - names -- contract names to check
|
89
89
|
#
|
90
90
|
def self.get_unsigned_contract_names(user, *names)
|
91
|
-
|
91
|
+
raise_unless_can_sign(user)
|
92
92
|
names = names.flatten.collect{|name| name.to_s}
|
93
93
|
return [] if names.blank?
|
94
94
|
|
@@ -102,16 +102,16 @@ module FinePrint
|
|
102
102
|
return names - signed_contract_names
|
103
103
|
end
|
104
104
|
|
105
|
-
def self.
|
106
|
-
|
105
|
+
def self.can_sign?(user)
|
106
|
+
can_sign_contracts_proc.call(user)
|
107
107
|
end
|
108
108
|
|
109
109
|
def self.is_admin?(user)
|
110
|
-
|
110
|
+
!user.nil? && user_admin_proc.call(user)
|
111
111
|
end
|
112
112
|
|
113
|
-
def self.
|
114
|
-
raise IllegalState, 'User
|
113
|
+
def self.raise_unless_can_sign(user)
|
114
|
+
raise IllegalState, 'User cannot sign contracts' unless can_sign?(user)
|
115
115
|
end
|
116
116
|
|
117
117
|
def self.raise_unless_admin(user)
|
data/lib/fine_print.rb~
CHANGED
@@ -7,9 +7,9 @@ module FinePrint
|
|
7
7
|
|
8
8
|
# Can be set in initializer only
|
9
9
|
ENGINE_OPTIONS = [
|
10
|
-
:
|
10
|
+
:current_user_proc,
|
11
11
|
:user_admin_proc,
|
12
|
-
:
|
12
|
+
:can_sign_contracts_proc,
|
13
13
|
:pose_contracts_path,
|
14
14
|
:redirect_path
|
15
15
|
]
|
@@ -48,7 +48,7 @@ module FinePrint
|
|
48
48
|
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
49
49
|
#
|
50
50
|
def self.sign_contract(user, contract)
|
51
|
-
|
51
|
+
raise_unless_can_sign(user)
|
52
52
|
contract = get_contract(contract)
|
53
53
|
raise IllegalState, 'Contract not found' if contract.nil?
|
54
54
|
|
@@ -63,7 +63,7 @@ module FinePrint
|
|
63
63
|
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
64
64
|
#
|
65
65
|
def self.signed_contract?(user, contract)
|
66
|
-
|
66
|
+
raise_unless_can_sign(user)
|
67
67
|
contract = get_contract(contract)
|
68
68
|
|
69
69
|
!contract.signatures.where(:user_id => user.id,
|
@@ -74,7 +74,7 @@ module FinePrint
|
|
74
74
|
# - user -- the user in question
|
75
75
|
# - contract -- can be a Contract object, its ID, or its name as a String or Symbol
|
76
76
|
def self.signed_any_contract_version?(user, contract)
|
77
|
-
|
77
|
+
raise_unless_can_sign(user)
|
78
78
|
contract = get_contract(contract)
|
79
79
|
!Signature.joins(:contract)
|
80
80
|
.where(:fine_print_contracts => {:name => contract.name},
|
@@ -88,7 +88,7 @@ module FinePrint
|
|
88
88
|
# - names -- contract names to check
|
89
89
|
#
|
90
90
|
def self.get_unsigned_contract_names(user, *names)
|
91
|
-
|
91
|
+
raise_unless_can_sign(user)
|
92
92
|
names = names.flatten.collect{|name| name.to_s}
|
93
93
|
return [] if names.blank?
|
94
94
|
|
@@ -102,16 +102,16 @@ module FinePrint
|
|
102
102
|
return names - signed_contract_names
|
103
103
|
end
|
104
104
|
|
105
|
-
def self.
|
106
|
-
|
105
|
+
def self.can_sign?(user)
|
106
|
+
can_sign_contracts_proc.call(user)
|
107
107
|
end
|
108
108
|
|
109
109
|
def self.is_admin?(user)
|
110
|
-
|
110
|
+
!user.nil? && user_admin_proc.call(user)
|
111
111
|
end
|
112
112
|
|
113
|
-
def self.
|
114
|
-
raise IllegalState, 'User not signed in' unless
|
113
|
+
def self.raise_unless_can_sign(user)
|
114
|
+
raise IllegalState, 'User not signed in' unless can_sign?(user)
|
115
115
|
end
|
116
116
|
|
117
117
|
def self.raise_unless_admin(user)
|
@@ -12,13 +12,14 @@ FinePrint.configure do |config|
|
|
12
12
|
# Default: lambda { |user| false } (no admins)
|
13
13
|
config.user_admin_proc = lambda { |user| user.is_admin }
|
14
14
|
|
15
|
-
# Proc called with user as argument that returns true iif the
|
16
|
-
# In many systems, a non-logged-in user is represented by nil.
|
15
|
+
# Proc called with user as argument that returns true iif the argument is a user
|
16
|
+
# who can sign a contract. In many systems, a non-logged-in user is represented by nil.
|
17
17
|
# However, some systems use something like an AnonymousUser class to represent this state.
|
18
|
-
#
|
19
|
-
#
|
18
|
+
# If this proc returns false, FinePrint will not ask for signatures and will allow access
|
19
|
+
# to any page, so it's up to the developer to make sure that unsigned users can't access
|
20
|
+
# pages that require a contract signature to use.
|
20
21
|
# Default: lambda { |user| user }
|
21
|
-
config.
|
22
|
+
config.can_sign_contracts_proc = lambda { |user| user }
|
22
23
|
|
23
24
|
# Path to redirect users to when an error occurs (e.g. permission denied on admin pages).
|
24
25
|
# Default: '/'
|
@@ -3,22 +3,22 @@
|
|
3
3
|
FinePrint.configure do |config|
|
4
4
|
# Engine Configuration
|
5
5
|
|
6
|
-
#
|
7
|
-
# Default:
|
8
|
-
config.
|
6
|
+
# Proc called with controller as argument that returns the current user.
|
7
|
+
# Default: lambda { |controller| controller.current_user }
|
8
|
+
config.current_user_proc = lambda { |controller| controller.current_user }
|
9
9
|
|
10
|
-
# Proc called with user as argument that
|
10
|
+
# Proc called with user as argument that returns true iif the user is an admin.
|
11
11
|
# Admins can create and edit agreements and terminate accepted agreements.
|
12
12
|
# Default: lambda { |user| false } (no admins)
|
13
13
|
config.user_admin_proc = lambda { |user| user.is_admin }
|
14
14
|
|
15
|
-
# Proc that returns true
|
15
|
+
# Proc called with user as argument that returns true iif the user is logged in.
|
16
16
|
# In many systems, a non-logged-in user is represented by nil.
|
17
17
|
# However, some systems use something like an AnonymousUser class to represent this state.
|
18
18
|
# This proc is mostly used to help the developer realize that they should only be asking
|
19
19
|
# signed in users to sign contracts; without this, developers would get a cryptic SQL error.
|
20
|
-
# Default: lambda { |user|
|
21
|
-
config.
|
20
|
+
# Default: lambda { |user| user }
|
21
|
+
config.can_sign_contracts_proc = lambda { |user| user }
|
22
22
|
|
23
23
|
# Path to redirect users to when an error occurs (e.g. permission denied on admin pages).
|
24
24
|
# Default: '/'
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -1785,3 +1785,68 @@ Connecting to database specified by database.yml
|
|
1785
1785
|
[1m[35m (4.4ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1786
1786
|
[1m[36m (3.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
|
1787
1787
|
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1788
|
+
Connecting to database specified by database.yml
|
1789
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1790
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
1791
|
+
[1m[36m (12.6ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1792
|
+
[1m[35m (5.0ms)[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)
|
1793
|
+
[1m[36m (5.1ms)[0m [1mDROP TABLE "fine_print_contracts"[0m
|
1794
|
+
[1m[35m (4.7ms)[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)
|
1795
|
+
[1m[36m (4.5ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
1796
|
+
[1m[35m (5.2ms)[0m DROP TABLE "fine_print_signatures"
|
1797
|
+
[1m[36m (4.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
|
1798
|
+
[1m[35m (4.6ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1799
|
+
[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
|
1800
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1801
|
+
Connecting to database specified by database.yml
|
1802
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1803
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
1804
|
+
[1m[36m (30.5ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1805
|
+
[1m[35m (6.0ms)[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)
|
1806
|
+
[1m[36m (5.5ms)[0m [1mDROP TABLE "fine_print_contracts"[0m
|
1807
|
+
[1m[35m (5.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)
|
1808
|
+
[1m[36m (6.2ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
1809
|
+
[1m[35m (5.1ms)[0m DROP TABLE "fine_print_signatures"
|
1810
|
+
[1m[36m (4.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
|
1811
|
+
[1m[35m (4.6ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1812
|
+
[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
|
1813
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1814
|
+
Connecting to database specified by database.yml
|
1815
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1816
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
1817
|
+
[1m[36m (14.4ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1818
|
+
[1m[35m (6.0ms)[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)
|
1819
|
+
[1m[36m (5.0ms)[0m [1mDROP TABLE "fine_print_contracts"[0m
|
1820
|
+
[1m[35m (5.1ms)[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)
|
1821
|
+
[1m[36m (4.7ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
1822
|
+
[1m[35m (5.3ms)[0m DROP TABLE "fine_print_signatures"
|
1823
|
+
[1m[36m (6.6ms)[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
|
1824
|
+
[1m[35m (5.0ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1825
|
+
[1m[36m (4.7ms)[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
|
1826
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1827
|
+
Connecting to database specified by database.yml
|
1828
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1829
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
1830
|
+
[1m[36m (14.8ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1831
|
+
[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)
|
1832
|
+
[1m[36m (5.3ms)[0m [1mDROP TABLE "fine_print_contracts"[0m
|
1833
|
+
[1m[35m (5.0ms)[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)
|
1834
|
+
[1m[36m (5.1ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
1835
|
+
[1m[35m (5.0ms)[0m DROP TABLE "fine_print_signatures"
|
1836
|
+
[1m[36m (4.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
|
1837
|
+
[1m[35m (4.9ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1838
|
+
[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
|
1839
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
1840
|
+
Connecting to database specified by database.yml
|
1841
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
1842
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
1843
|
+
[1m[36m (14.2ms)[0m [1mDROP TABLE "dummy_users"[0m
|
1844
|
+
[1m[35m (5.0ms)[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)
|
1845
|
+
[1m[36m (5.0ms)[0m [1mDROP TABLE "fine_print_contracts"[0m
|
1846
|
+
[1m[35m (4.8ms)[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)
|
1847
|
+
[1m[36m (4.7ms)[0m [1mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
1848
|
+
[1m[35m (4.1ms)[0m DROP TABLE "fine_print_signatures"
|
1849
|
+
[1m[36m (4.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
|
1850
|
+
[1m[35m (4.2ms)[0m CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
|
1851
|
+
[1m[36m (4.2ms)[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
|
1852
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|