fine_print 6.0.0 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/fine_print/contracts_controller.rb +9 -2
- data/app/views/fine_print/contracts/index.html.erb +3 -3
- data/lib/fine_print/version.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +95 -0
- data/spec/dummy/log/test.log +4946 -3228
- data/spec/dummy/tmp/development_secret.txt +1 -1
- metadata +65 -61
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36c354c7847e144c71413d80b85ff33cd0c8557c56e962f4e52f76633b4736e1
|
4
|
+
data.tar.gz: 8ed54d4e8fe86be2fbe20d9a135e56328ede04d377625edfe21ec8a1c9431c2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 119712381276c0e3b6d4980c35187dddfc730bbcd38af142b60a91136939f48aeb7d2d5c62bc057baa2b10702fe911ede772108818ca688fac2fcf501d096dc8
|
7
|
+
data.tar.gz: 5925eca798f95541aee4d54169155a69e30be2aa3ff026ad4dd6824ef79b7bb0ef3bc9f2a31094371a9285cead44d25087d254b58608ea79830ec62220c46d9d
|
@@ -5,7 +5,14 @@ module FinePrint
|
|
5
5
|
before_action :get_contract, except: [:index, :new, :create]
|
6
6
|
|
7
7
|
def index
|
8
|
-
@contracts = Contract.
|
8
|
+
@contracts = Contract.select(
|
9
|
+
<<~EOS
|
10
|
+
"fine_print_contracts".*, (
|
11
|
+
SELECT COUNT(*) FROM "fine_print_signatures"
|
12
|
+
WHERE "fine_print_signatures"."contract_id" = "fine_print_contracts"."id"
|
13
|
+
) AS "signatures_count"
|
14
|
+
EOS
|
15
|
+
).all.to_a.group_by(&:name)
|
9
16
|
end
|
10
17
|
|
11
18
|
def new
|
@@ -17,7 +24,7 @@ module FinePrint
|
|
17
24
|
@contract.name = params[:contract][:name]
|
18
25
|
@contract.title = params[:contract][:title]
|
19
26
|
@contract.content = params[:contract][:content]
|
20
|
-
|
27
|
+
|
21
28
|
if @contract.save
|
22
29
|
redirect_to @contract, notice: t('fine_print.contract.notices.created')
|
23
30
|
else
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
<ul class='fine_print'>
|
11
11
|
<li><%= name %></li>
|
12
|
-
|
12
|
+
|
13
13
|
<ul class='fine_print'>
|
14
14
|
<% contracts.each do |contract| %>
|
15
15
|
<li><%= link_to contract.title, contract, class: 'fine_print link' %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
t('fine_print.contract.status.draft') : \
|
18
18
|
t('fine_print.contract.status.version',
|
19
19
|
version: contract.version.to_s) %>)
|
20
|
-
<% if contract.
|
20
|
+
<% if contract.signatures_count == 0 %>
|
21
21
|
[<%= link_to t('fine_print.contract.actions.edit'),
|
22
22
|
edit_contract_path(contract),
|
23
23
|
class: 'fine_print link' %>]
|
@@ -63,7 +63,7 @@
|
|
63
63
|
</li>
|
64
64
|
<% end %>
|
65
65
|
</ul>
|
66
|
-
|
66
|
+
|
67
67
|
</ul>
|
68
68
|
|
69
69
|
<% end %>
|
data/lib/fine_print/version.rb
CHANGED
Binary file
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -0,0 +1,95 @@
|
|
1
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
2
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
3
|
+
[1m[35m (1.9ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
4
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
5
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
6
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
7
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
8
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
9
|
+
Migrating to InstallFinePrint (0)
|
10
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
11
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
12
|
+
[1m[35m (0.5ms)[0m [1m[35mCREATE TABLE "fine_print_contracts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "version" integer, "title" varchar NOT NULL, "content" text NOT NULL, "created_at" datetime, "updated_at" datetime)[0m
|
13
|
+
↳ /Users/dante/Desktop/fine_print/db/migrate/0_install_fine_print.rb:3
|
14
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
15
|
+
↳ /Users/dante/Desktop/fine_print/db/migrate/0_install_fine_print.rb:12
|
16
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE TABLE "fine_print_signatures" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_type" varchar NOT NULL, "user_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)[0m
|
17
|
+
↳ /Users/dante/Desktop/fine_print/db/migrate/0_install_fine_print.rb:14
|
18
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE 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
|
19
|
+
↳ /Users/dante/Desktop/fine_print/db/migrate/0_install_fine_print.rb:21
|
20
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")[0m
|
21
|
+
↳ /Users/dante/Desktop/fine_print/db/migrate/0_install_fine_print.rb:24
|
22
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "0"]]
|
23
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
24
|
+
[1m[35m (1.1ms)[0m [1m[36mcommit transaction[0m
|
25
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
26
|
+
Migrating to AddImplicitSignatures (1)
|
27
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
28
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
29
|
+
[1m[35m (0.6ms)[0m [1m[35mALTER TABLE "fine_print_signatures" ADD "is_implicit" boolean DEFAULT 0 NOT NULL[0m
|
30
|
+
↳ /Users/dante/Desktop/fine_print/db/migrate/1_add_implicit_signatures.rb:3
|
31
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "1"]]
|
32
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
33
|
+
[1m[35m (0.8ms)[0m [1m[36mcommit transaction[0m
|
34
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
35
|
+
Migrating to CreateDummyUsers (1000)
|
36
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
37
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
38
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "dummy_users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 0 NOT NULL, "created_at" datetime, "updated_at" datetime)[0m
|
39
|
+
↳ db/migrate/1000_create_dummy_users.rb:3
|
40
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "1000"]]
|
41
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
42
|
+
[1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
|
43
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
44
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
45
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
46
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
47
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
48
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.3ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2023-03-21 17:29:24.804592"], ["updated_at", "2023-03-21 17:29:24.804592"]]
|
49
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
50
|
+
[1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
|
51
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
52
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
53
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
54
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
55
|
+
↳ /Users/dante/.rbenv/versions/2.7.2/bin/rake:23
|
56
|
+
[1m[35m (1.2ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
57
|
+
[1m[35m (0.4ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
58
|
+
[1m[35m (1.0ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
59
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
60
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
61
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
62
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ?[0m [["key", "environment"]]
|
63
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
64
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
65
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
66
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
67
|
+
[1m[35m (1.5ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)[0m
|
68
|
+
[1m[35m (0.2ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
69
|
+
Migrating to InstallFinePrint (0)
|
70
|
+
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
71
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "fine_print_contracts" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "version" integer, "title" varchar NOT NULL, "content" text NOT NULL, "created_at" datetime, "updated_at" datetime)[0m
|
72
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")[0m
|
73
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE TABLE "fine_print_signatures" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_type" varchar NOT NULL, "user_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime)[0m
|
74
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE 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
|
75
|
+
[1m[35m (0.1ms)[0m [1m[35mCREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")[0m
|
76
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "0"]]
|
77
|
+
[1m[36mTRANSACTION (1.2ms)[0m [1m[36mcommit transaction[0m
|
78
|
+
Migrating to AddImplicitSignatures (1)
|
79
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
80
|
+
[1m[35m (0.6ms)[0m [1m[35mALTER TABLE "fine_print_signatures" ADD "is_implicit" boolean DEFAULT 0 NOT NULL[0m
|
81
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.2ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "1"]]
|
82
|
+
[1m[36mTRANSACTION (0.9ms)[0m [1m[36mcommit transaction[0m
|
83
|
+
Migrating to CreateDummyUsers (1000)
|
84
|
+
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
85
|
+
[1m[35m (0.4ms)[0m [1m[35mCREATE TABLE "dummy_users" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 0 NOT NULL, "created_at" datetime, "updated_at" datetime)[0m
|
86
|
+
[1m[36mActiveRecord::SchemaMigration Create (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "1000"]]
|
87
|
+
[1m[36mTRANSACTION (1.0ms)[0m [1m[36mcommit transaction[0m
|
88
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", "environment"], ["LIMIT", 1]]
|
89
|
+
[1m[36mTRANSACTION (0.1ms)[0m [1m[36mbegin transaction[0m
|
90
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.7ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "development"], ["created_at", "2023-03-21 17:38:35.575933"], ["updated_at", "2023-03-21 17:38:35.575933"]]
|
91
|
+
[1m[36mTRANSACTION (0.9ms)[0m [1m[36mcommit transaction[0m
|
92
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
93
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
94
|
+
[1m[35m (0.0ms)[0m [1m[34mSELECT sqlite_version(*)[0m
|
95
|
+
[1m[35m (0.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|