simple_audit_trail 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fa8e4d0975eee5bcb2bc05e6c840405c1adbd4b
4
- data.tar.gz: 39c3a43bd7db88e8df38ad476a194c12e85653fc
3
+ metadata.gz: 4284f8cd899c49664d1b250746e24e556cfdaa1f
4
+ data.tar.gz: 1edaf593fdf7726b766c3b3b59050e579393b8d4
5
5
  SHA512:
6
- metadata.gz: 559958f329973359b60f17c0b7badf2365fffcbf37e51557242ed02e38b0c88b18e49795b4f5070a91ed86f3df643961ddac2a6a60a267f868146e8deb00c963
7
- data.tar.gz: 94c4def73184f0f56240f906f85603965f0c6bf5bf691f0551eb6ff66136ecd0e98cd28f9ede266833d35b3fa4eff55f477d0198cce5782a8f5b21b337e3e84d
6
+ metadata.gz: 9a05221b99b7dbd3d99e69da02c9cd7bec4485b8626388bd9c1f80733090832f064f67e065b6544cf35a207e564940a72945850b23c32496c0f32dc1a8e4fc47
7
+ data.tar.gz: 4e90c730ece12b9c87fdc3d6cc22490e2aa335f6107c700239d0ae42ea80dbaf82bc6b8ab2ae2c0cb7a1d8e76c34cec38e4500841b9413044d4379c8f07284be
@@ -1,3 +1,3 @@
1
1
  module SimpleAuditTrail
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -22,19 +22,22 @@ module SimpleAuditTrail
22
22
 
23
23
  before_update :save_audits
24
24
  define_method :save_audits do
25
- if self.audited_user_id.nil? && self.audit_options[:require_audited_user_id]
26
- raise "audited setter method called without setting audited_user_id"
25
+ changed_audited_fields = audited_fields.select do |f|
26
+ send "#{f}_changed?"
27
27
  end
28
- if (self.changed & self.audited_fields).any?
29
- to = Hash[self.audited_fields.map{|k| [k,self[k]]}]
30
- from = to.clone.merge! Hash[
31
- self.changes.slice(*self.audited_fields).map{|k,v| [k,v[0]]}
32
- ]
33
28
 
34
- self.simple_audits.create(
29
+ if changed_audited_fields.present?
30
+ if audited_user_id.nil? && audit_options[:require_audited_user_id]
31
+ raise "audited setter method called without setting audited_user_id"
32
+ end
33
+
34
+ to = Hash[audited_fields.map { |f| [f, send(f)] }]
35
+ from = Hash[audited_fields.map { |f| [f, send("#{f}_was")] }]
36
+
37
+ simple_audits.create(
35
38
  :from => from.to_json,
36
39
  :to => to.to_json,
37
- :who_id => self.audited_user_id)
40
+ :who_id => audited_user_id)
38
41
  end
39
42
  end
40
43
  end
Binary file
Binary file
@@ -0,0 +1,36 @@
1
+ Connecting to database specified by database.yml
2
+  (0.0ms) select sqlite_version(*)
3
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
4
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
6
+ Connecting to database specified by database.yml
7
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
8
+ Migrating to CreateSimpleAuditTrailAudits (20150512224022)
9
+  (0.0ms) select sqlite_version(*)
10
+  (0.0ms) begin transaction
11
+  (0.4ms) CREATE TABLE "simple_audit_trail_audits" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "simple_audit_trailable_id" integer, "simple_audit_trailable_type" varchar(255), "who_id" integer, "from" text, "to" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
12
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20150512224022')
13
+  (0.7ms) commit transaction
14
+ Migrating to CreateTinas (20150513181325)
15
+  (0.0ms) begin transaction
16
+  (0.3ms) CREATE TABLE "tinas" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "ladies" integer, "badonkadonks" integer, "mushy_snugglebites" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
17
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20150513181325')
18
+  (0.7ms) commit transaction
19
+ Migrating to CreateMrTorques (20150513221356)
20
+  (0.0ms) begin transaction
21
+  (0.3ms) CREATE TABLE "mr_torques" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "todays_quote" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
22
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20150513221356')
23
+  (0.7ms) commit transaction
24
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
25
+ Connecting to database specified by database.yml
26
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
27
+  (0.1ms) select sqlite_version(*)
28
+  (1.1ms) CREATE TABLE "mr_torques" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "todays_quote" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
29
+  (0.8ms) CREATE TABLE "simple_audit_trail_audits" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "simple_audit_trailable_id" integer, "simple_audit_trailable_type" varchar(255), "who_id" integer, "from" text, "to" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
30
+  (0.8ms) CREATE TABLE "tinas" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "ladies" integer, "badonkadonks" integer, "mushy_snugglebites" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
31
+  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
32
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
33
+  (0.1ms) SELECT version FROM "schema_migrations"
34
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150513221356')
35
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150513181325')
36
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150512224022')
@@ -0,0 +1,280 @@
1
+ Connecting to database specified by database.yml
2
+ Connecting to database specified by database.yml
3
+  (0.8ms) DELETE FROM "mr_torques";
4
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
5
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
6
+  (0.7ms) DELETE FROM "simple_audit_trail_audits";
7
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
8
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
9
+  (0.7ms) DELETE FROM "tinas";
10
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
11
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'tinas';
12
+  (0.8ms) DELETE FROM "mr_torques";
13
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
14
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
15
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
16
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
17
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
18
+  (0.7ms) DELETE FROM "tinas";
19
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
20
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'tinas';
21
+  (0.0ms) begin transaction
22
+ SQL (3.1ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 2], ["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["ladies", 1], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00]]
23
+  (0.6ms) commit transaction
24
+  (0.7ms) DELETE FROM "mr_torques";
25
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
26
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
27
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
28
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
29
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
30
+  (0.5ms) DELETE FROM "tinas";
31
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
32
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'tinas';
33
+  (0.0ms) begin transaction
34
+ SQL (0.3ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 2], ["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["ladies", 1], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00]]
35
+  (0.7ms) commit transaction
36
+  (0.6ms) DELETE FROM "mr_torques";
37
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
38
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
39
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
40
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
41
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
42
+  (0.6ms) DELETE FROM "tinas";
43
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
44
+  (0.8ms) DELETE FROM sqlite_sequence where name = 'tinas';
45
+  (0.0ms) begin transaction
46
+ SQL (0.2ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00]]
47
+  (0.5ms) commit transaction
48
+ Tina Load (0.1ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
49
+  (0.0ms) begin transaction
50
+ SQL (0.2ms) INSERT INTO "mr_torques" ("created_at", "todays_quote", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["todays_quote", "THAT SENTENCE HAD TOO MANY SYLLABLES! APOLOGIZE!"], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00]]
51
+  (0.8ms) commit transaction
52
+ MrTorque Load (0.1ms) SELECT "mr_torques".* FROM "mr_torques" WHERE "mr_torques"."id" = ? LIMIT 1 [["id", 1]]
53
+  (0.1ms) SELECT COUNT(*) FROM "simple_audit_trail_audits" 
54
+  (0.0ms) begin transaction
55
+ SQL (0.4ms) INSERT INTO "simple_audit_trail_audits" ("created_at", "from", "simple_audit_trailable_id", "simple_audit_trailable_type", "to", "updated_at", "who_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["from", "{\"todays_quote\":\"THAT SENTENCE HAD TOO MANY SYLLABLES! APOLOGIZE!\"}"], ["simple_audit_trailable_id", 1], ["simple_audit_trailable_type", "MrTorque"], ["to", "{\"todays_quote\":\"If you're still alive, grab some ammo. If you're not,\\n THIS MESSAGE IS IRRELEVANT!\"}"], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["who_id", 345]]
56
+  (0.1ms) UPDATE "mr_torques" SET "todays_quote" = 'If you''re still alive, grab some ammo. If you''re not,
57
+ THIS MESSAGE IS IRRELEVANT!', "updated_at" = '2015-07-01 00:35:26.925770' WHERE "mr_torques"."id" = 1
58
+  (0.6ms) commit transaction
59
+  (0.1ms) SELECT COUNT(*) FROM "simple_audit_trail_audits"
60
+  (0.6ms) DELETE FROM "mr_torques";
61
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
62
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
63
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
64
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
65
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
66
+  (0.5ms) DELETE FROM "tinas";
67
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
68
+  (0.7ms) DELETE FROM sqlite_sequence where name = 'tinas';
69
+  (0.0ms) begin transaction
70
+ SQL (0.3ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00]]
71
+  (0.7ms) commit transaction
72
+ Tina Load (0.0ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
73
+  (0.0ms) begin transaction
74
+ SQL (0.2ms) INSERT INTO "mr_torques" ("created_at", "todays_quote", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["todays_quote", "THAT SENTENCE HAD TOO MANY SYLLABLES! APOLOGIZE!"], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00]]
75
+  (0.6ms) commit transaction
76
+ MrTorque Load (0.0ms) SELECT "mr_torques".* FROM "mr_torques" WHERE "mr_torques"."id" = ? LIMIT 1 [["id", 1]]
77
+  (0.0ms) begin transaction
78
+ SQL (0.2ms) INSERT INTO "simple_audit_trail_audits" ("created_at", "from", "simple_audit_trailable_id", "simple_audit_trailable_type", "to", "updated_at", "who_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["from", "{\"todays_quote\":\"THAT SENTENCE HAD TOO MANY SYLLABLES! APOLOGIZE!\"}"], ["simple_audit_trailable_id", 1], ["simple_audit_trailable_type", "MrTorque"], ["to", "{\"todays_quote\":\"If you're still alive, grab some ammo. If you're not,\\n THIS MESSAGE IS IRRELEVANT!\"}"], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["who_id", 345]]
79
+  (0.1ms) UPDATE "mr_torques" SET "todays_quote" = 'If you''re still alive, grab some ammo. If you''re not,
80
+ THIS MESSAGE IS IRRELEVANT!', "updated_at" = '2015-07-01 00:35:26.961186' WHERE "mr_torques"."id" = 1
81
+  (0.6ms) commit transaction
82
+  (0.6ms) DELETE FROM "mr_torques";
83
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
84
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
85
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
86
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
87
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
88
+  (0.5ms) DELETE FROM "tinas";
89
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
90
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'tinas';
91
+  (0.0ms) begin transaction
92
+ SQL (0.3ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00]]
93
+  (0.6ms) commit transaction
94
+ Tina Load (0.1ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
95
+  (0.0ms) begin transaction
96
+ SQL (0.2ms) INSERT INTO "mr_torques" ("created_at", "todays_quote", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["todays_quote", "THAT SENTENCE HAD TOO MANY SYLLABLES! APOLOGIZE!"], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00]]
97
+  (0.5ms) commit transaction
98
+ MrTorque Load (0.1ms) SELECT "mr_torques".* FROM "mr_torques" WHERE "mr_torques"."id" = ? LIMIT 1 [["id", 1]]
99
+  (0.0ms) begin transaction
100
+ SQL (0.2ms) INSERT INTO "simple_audit_trail_audits" ("created_at", "from", "simple_audit_trailable_id", "simple_audit_trailable_type", "to", "updated_at", "who_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["from", "{\"todays_quote\":\"THAT SENTENCE HAD TOO MANY SYLLABLES! APOLOGIZE!\"}"], ["simple_audit_trailable_id", 1], ["simple_audit_trailable_type", "MrTorque"], ["to", "{\"todays_quote\":\"Right now, you're ranked fifty in the badass leaderboards,\\n which puts you behind my grandma but ahead of a guy she gummed to\\n death. IT TOOK SEVERAL HOURS.\"}"], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["who_id", nil]]
101
+  (0.1ms) UPDATE "mr_torques" SET "todays_quote" = 'Right now, you''re ranked fifty in the badass leaderboards,
102
+ which puts you behind my grandma but ahead of a guy she gummed to
103
+ death. IT TOOK SEVERAL HOURS.', "updated_at" = '2015-07-01 00:35:26.972114' WHERE "mr_torques"."id" = 1
104
+  (0.5ms) commit transaction
105
+  (0.8ms) DELETE FROM "mr_torques";
106
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
107
+  (0.7ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
108
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
109
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
110
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
111
+  (0.6ms) DELETE FROM "tinas";
112
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
113
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'tinas';
114
+  (0.0ms) begin transaction
115
+ SQL (0.2ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00]]
116
+  (0.5ms) commit transaction
117
+ Tina Load (0.1ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
118
+  (0.1ms) SELECT COUNT(*) FROM "simple_audit_trail_audits"
119
+  (0.0ms) begin transaction
120
+  (0.1ms) UPDATE "tinas" SET "mushy_snugglebites" = '
121
+ That''s Mushy Snugglebites'' badonkadonk. She''s my main squeeze.
122
+ Lady''s got a gut fulla'' dynamite and a booty like POOOW!
123
+ ', "updated_at" = '2015-07-01 00:35:26.981186' WHERE "tinas"."id" = 1
124
+  (0.5ms) commit transaction
125
+  (0.1ms) SELECT COUNT(*) FROM "simple_audit_trail_audits"
126
+  (0.6ms) DELETE FROM "mr_torques";
127
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
128
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
129
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
130
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
131
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
132
+  (0.6ms) DELETE FROM "tinas";
133
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
134
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'tinas';
135
+  (0.0ms) begin transaction
136
+ SQL (0.2ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00]]
137
+  (0.5ms) commit transaction
138
+ Tina Load (0.0ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
139
+  (0.0ms) begin transaction
140
+  (0.1ms) UPDATE "tinas" SET "mushy_snugglebites" = '
141
+ That''s Mushy Snugglebites'' badonkadonk. She''s my main squeeze.
142
+ Lady''s got a gut fulla'' dynamite and a booty like POOOW!
143
+ ', "updated_at" = '2015-07-01 00:35:26.988643' WHERE "tinas"."id" = 1
144
+  (0.5ms) commit transaction
145
+  (0.6ms) DELETE FROM "mr_torques";
146
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
147
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
148
+  (0.5ms) DELETE FROM "simple_audit_trail_audits";
149
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
150
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
151
+  (0.6ms) DELETE FROM "tinas";
152
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
153
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'tinas';
154
+  (0.0ms) begin transaction
155
+ SQL (0.2ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00]]
156
+  (0.5ms) commit transaction
157
+ Tina Load (0.1ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
158
+  (0.0ms) begin transaction
159
+ SQL (0.2ms) INSERT INTO "simple_audit_trail_audits" ("created_at", "from", "simple_audit_trailable_id", "simple_audit_trailable_type", "to", "updated_at", "who_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["from", "{\"ladies\":0,\"badonkadonks\":0}"], ["simple_audit_trailable_id", 1], ["simple_audit_trailable_type", "Tina"], ["to", "{\"ladies\":0,\"badonkadonks\":1}"], ["updated_at", Wed, 01 Jul 2015 00:35:26 UTC +00:00], ["who_id", 123]]
160
+  (0.1ms) UPDATE "tinas" SET "badonkadonks" = 1, "updated_at" = '2015-07-01 00:35:26.996637' WHERE "tinas"."id" = 1
161
+  (0.6ms) commit transaction
162
+ SimpleAuditTrail::Audit Load (0.1ms) SELECT "simple_audit_trail_audits".* FROM "simple_audit_trail_audits" WHERE "simple_audit_trail_audits"."simple_audit_trailable_id" = 1 AND "simple_audit_trail_audits"."simple_audit_trailable_type" = 'Tina' ORDER BY "simple_audit_trail_audits"."id" DESC LIMIT 1
163
+  (0.6ms) DELETE FROM "mr_torques";
164
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
165
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
166
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
167
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
168
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
169
+  (0.6ms) DELETE FROM "tinas";
170
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
171
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'tinas';
172
+  (0.0ms) begin transaction
173
+ SQL (0.2ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00]]
174
+  (0.6ms) commit transaction
175
+ Tina Load (0.1ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
176
+  (0.0ms) begin transaction
177
+ SQL (0.2ms) INSERT INTO "simple_audit_trail_audits" ("created_at", "from", "simple_audit_trailable_id", "simple_audit_trailable_type", "to", "updated_at", "who_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["from", "{\"ladies\":0,\"badonkadonks\":0}"], ["simple_audit_trailable_id", 1], ["simple_audit_trailable_type", "Tina"], ["to", "{\"ladies\":0,\"badonkadonks\":1}"], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["who_id", 123]]
178
+  (0.1ms) UPDATE "tinas" SET "badonkadonks" = 1, "updated_at" = '2015-07-01 00:35:27.007030' WHERE "tinas"."id" = 1
179
+  (0.6ms) commit transaction
180
+ SimpleAuditTrail::Audit Load (0.1ms) SELECT "simple_audit_trail_audits".* FROM "simple_audit_trail_audits" WHERE "simple_audit_trail_audits"."simple_audit_trailable_id" = 1 AND "simple_audit_trail_audits"."simple_audit_trailable_type" = 'Tina' ORDER BY "simple_audit_trail_audits"."id" DESC LIMIT 1
181
+  (0.6ms) DELETE FROM "mr_torques";
182
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
183
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
184
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
185
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
186
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
187
+  (0.6ms) DELETE FROM "tinas";
188
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
189
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'tinas';
190
+  (0.0ms) begin transaction
191
+ SQL (0.3ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00]]
192
+  (0.5ms) commit transaction
193
+ Tina Load (0.1ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
194
+  (0.1ms) SELECT COUNT(*) FROM "simple_audit_trail_audits"
195
+  (0.0ms) begin transaction
196
+ SQL (0.3ms) INSERT INTO "simple_audit_trail_audits" ("created_at", "from", "simple_audit_trailable_id", "simple_audit_trailable_type", "to", "updated_at", "who_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["from", "{\"ladies\":0,\"badonkadonks\":0}"], ["simple_audit_trailable_id", 1], ["simple_audit_trailable_type", "Tina"], ["to", "{\"ladies\":1,\"badonkadonks\":1}"], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["who_id", 123]]
197
+  (0.1ms) UPDATE "tinas" SET "badonkadonks" = 1, "ladies" = 1, "updated_at" = '2015-07-01 00:35:27.016838' WHERE "tinas"."id" = 1
198
+  (0.6ms) commit transaction
199
+  (0.1ms) SELECT COUNT(*) FROM "simple_audit_trail_audits" 
200
+  (0.6ms) DELETE FROM "mr_torques";
201
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
202
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
203
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
204
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
205
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
206
+  (0.5ms) DELETE FROM "tinas";
207
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
208
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'tinas';
209
+  (0.0ms) begin transaction
210
+ SQL (0.2ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00]]
211
+  (0.6ms) commit transaction
212
+ Tina Load (0.0ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
213
+  (0.0ms) begin transaction
214
+ SQL (0.2ms) INSERT INTO "simple_audit_trail_audits" ("created_at", "from", "simple_audit_trailable_id", "simple_audit_trailable_type", "to", "updated_at", "who_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["from", "{\"ladies\":0,\"badonkadonks\":0}"], ["simple_audit_trailable_id", 1], ["simple_audit_trailable_type", "Tina"], ["to", "{\"ladies\":1,\"badonkadonks\":1}"], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["who_id", 123]]
215
+  (0.1ms) UPDATE "tinas" SET "badonkadonks" = 1, "ladies" = 1, "updated_at" = '2015-07-01 00:35:27.025394' WHERE "tinas"."id" = 1
216
+  (0.4ms) commit transaction
217
+ SimpleAuditTrail::Audit Load (0.1ms) SELECT "simple_audit_trail_audits".* FROM "simple_audit_trail_audits" WHERE "simple_audit_trail_audits"."simple_audit_trailable_id" = 1 AND "simple_audit_trail_audits"."simple_audit_trailable_type" = 'Tina' ORDER BY "simple_audit_trail_audits"."id" DESC LIMIT 1
218
+  (0.5ms) DELETE FROM "mr_torques";
219
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
220
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
221
+  (0.5ms) DELETE FROM "simple_audit_trail_audits";
222
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
223
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
224
+  (0.5ms) DELETE FROM "tinas";
225
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
226
+  (0.4ms) DELETE FROM sqlite_sequence where name = 'tinas';
227
+  (0.0ms) begin transaction
228
+ SQL (0.2ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00]]
229
+  (0.4ms) commit transaction
230
+ Tina Load (0.0ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
231
+  (0.0ms) begin transaction
232
+ SQL (0.2ms) INSERT INTO "simple_audit_trail_audits" ("created_at", "from", "simple_audit_trailable_id", "simple_audit_trailable_type", "to", "updated_at", "who_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["from", "{\"ladies\":0,\"badonkadonks\":0}"], ["simple_audit_trailable_id", 1], ["simple_audit_trailable_type", "Tina"], ["to", "{\"ladies\":1,\"badonkadonks\":1}"], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["who_id", 123]]
233
+  (0.1ms) UPDATE "tinas" SET "badonkadonks" = 1, "ladies" = 1, "updated_at" = '2015-07-01 00:35:27.032917' WHERE "tinas"."id" = 1
234
+  (0.5ms) commit transaction
235
+ SimpleAuditTrail::Audit Load (0.1ms) SELECT "simple_audit_trail_audits".* FROM "simple_audit_trail_audits" WHERE "simple_audit_trail_audits"."simple_audit_trailable_id" = 1 AND "simple_audit_trail_audits"."simple_audit_trailable_type" = 'Tina' ORDER BY "simple_audit_trail_audits"."id" DESC LIMIT 1
236
+  (0.6ms) DELETE FROM "mr_torques";
237
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
238
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
239
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
240
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
241
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
242
+  (0.5ms) DELETE FROM "tinas";
243
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
244
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'tinas';
245
+  (0.0ms) begin transaction
246
+ SQL (0.2ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00]]
247
+  (0.6ms) commit transaction
248
+ Tina Load (0.1ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
249
+  (0.0ms) begin transaction
250
+ SQL (0.2ms) INSERT INTO "simple_audit_trail_audits" ("created_at", "from", "simple_audit_trailable_id", "simple_audit_trailable_type", "to", "updated_at", "who_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["from", "{\"ladies\":0,\"badonkadonks\":0}"], ["simple_audit_trailable_id", 1], ["simple_audit_trailable_type", "Tina"], ["to", "{\"ladies\":1,\"badonkadonks\":1}"], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["who_id", 123]]
251
+  (0.1ms) UPDATE "tinas" SET "badonkadonks" = 1, "ladies" = 1, "updated_at" = '2015-07-01 00:35:27.041280' WHERE "tinas"."id" = 1
252
+  (0.5ms) commit transaction
253
+ SimpleAuditTrail::Audit Load (0.1ms) SELECT "simple_audit_trail_audits".* FROM "simple_audit_trail_audits" WHERE "simple_audit_trail_audits"."simple_audit_trailable_id" = 1 AND "simple_audit_trail_audits"."simple_audit_trailable_type" = 'Tina' ORDER BY "simple_audit_trail_audits"."id" DESC LIMIT 1
254
+  (0.5ms) DELETE FROM "mr_torques";
255
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
256
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
257
+  (0.5ms) DELETE FROM "simple_audit_trail_audits";
258
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
259
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
260
+  (0.7ms) DELETE FROM "tinas";
261
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
262
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'tinas';
263
+  (0.0ms) begin transaction
264
+ SQL (0.2ms) INSERT INTO "tinas" ("badonkadonks", "created_at", "ladies", "mushy_snugglebites", "updated_at") VALUES (?, ?, ?, ?, ?) [["badonkadonks", 0], ["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["ladies", 0], ["mushy_snugglebites", nil], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00]]
265
+  (0.5ms) commit transaction
266
+ Tina Load (0.1ms) SELECT "tinas".* FROM "tinas" WHERE "tinas"."id" = ? LIMIT 1 [["id", 1]]
267
+  (0.0ms) begin transaction
268
+ SQL (0.2ms) INSERT INTO "simple_audit_trail_audits" ("created_at", "from", "simple_audit_trailable_id", "simple_audit_trailable_type", "to", "updated_at", "who_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["from", "{\"ladies\":0,\"badonkadonks\":0}"], ["simple_audit_trailable_id", 1], ["simple_audit_trailable_type", "Tina"], ["to", "{\"ladies\":1,\"badonkadonks\":1}"], ["updated_at", Wed, 01 Jul 2015 00:35:27 UTC +00:00], ["who_id", 123]]
269
+  (0.0ms) UPDATE "tinas" SET "badonkadonks" = 1, "ladies" = 1, "updated_at" = '2015-07-01 00:35:27.049864' WHERE "tinas"."id" = 1
270
+  (0.7ms) commit transaction
271
+ SimpleAuditTrail::Audit Load (0.1ms) SELECT "simple_audit_trail_audits".* FROM "simple_audit_trail_audits" WHERE "simple_audit_trail_audits"."simple_audit_trailable_id" = 1 AND "simple_audit_trail_audits"."simple_audit_trailable_type" = 'Tina' ORDER BY "simple_audit_trail_audits"."id" DESC LIMIT 1
272
+  (0.6ms) DELETE FROM "mr_torques";
273
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
274
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'mr_torques';
275
+  (0.6ms) DELETE FROM "simple_audit_trail_audits";
276
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
277
+  (0.5ms) DELETE FROM sqlite_sequence where name = 'simple_audit_trail_audits';
278
+  (0.7ms) DELETE FROM "tinas";
279
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
280
+  (0.6ms) DELETE FROM sqlite_sequence where name = 'tinas';
@@ -26,10 +26,12 @@ describe SimpleAuditTrail::Auditor do
26
26
  )
27
27
  @tina.reload
28
28
  end
29
+
29
30
  context "when not configured to ignore user" do
30
- context "when audited fields have changed" do
31
+ context "when all audited fields have changed" do
31
32
  before do
32
33
  @tina.badonkadonks = 1
34
+ @tina.ladies = 1
33
35
 
34
36
  # requires an audited_user_id
35
37
  @tina.audited_user_id = 123
@@ -43,7 +45,7 @@ describe SimpleAuditTrail::Auditor do
43
45
 
44
46
  context "the newly created simple_audits record" do
45
47
  before do
46
- @tina.save!
48
+ @tina.save
47
49
  end
48
50
 
49
51
  it "is an instance of SimpleAuditTrail::Audit" do
@@ -54,24 +56,51 @@ describe SimpleAuditTrail::Auditor do
54
56
  expect(JSON.parse(@tina.simple_audits.last.from)).
55
57
  to eq JSON.parse("{\"ladies\":0,\"badonkadonks\":0}")
56
58
  end
59
+
57
60
  it "has a json hash for what the audited values are" do
58
61
  expect(JSON.parse(@tina.simple_audits.last.to)).
59
- to eq JSON.parse("{\"ladies\":0,\"badonkadonks\":1}")
62
+ to eq JSON.parse("{\"ladies\":1,\"badonkadonks\":1}")
60
63
  end
64
+
61
65
  it "has a who_id for the user who made the change" do
62
66
  expect(@tina.simple_audits.last.who_id).to eq 123
63
67
  end
64
68
  end
65
69
  end
66
70
 
71
+ context "when some but not all audited fields have changed then" do
72
+ before do
73
+ @tina.badonkadonks = 1
74
+
75
+ # requires an audited_user_id
76
+ @tina.audited_user_id = 123
77
+ @tina.save
78
+ end
79
+
80
+ it "has a json hash for what all the audited values were" do
81
+ expect(JSON.parse(@tina.simple_audits.last.from)).
82
+ to eq JSON.parse("{\"ladies\":0,\"badonkadonks\":0}")
83
+ end
84
+
85
+ it "has a json hash for what all the audited values are" do
86
+ expect(JSON.parse(@tina.simple_audits.last.to)).
87
+ to eq JSON.parse("{\"ladies\":0,\"badonkadonks\":1}")
88
+ end
89
+ end
90
+
67
91
  context "when audited fields have not changed" do
68
92
  before do
69
93
  @tina.mushy_snugglebites = "
70
94
  That's Mushy Snugglebites' badonkadonk. She's my main squeeze.
71
95
  Lady's got a gut fulla' dynamite and a booty like POOOW!
72
96
  "
73
- @tina.audited_user_id = 123
74
97
  end
98
+
99
+ it "does not raise an Exception even if no auditor is set" do
100
+ expect(@tina.audited_user_id).to be_blank
101
+ expect { @tina.save }.to_not raise_error
102
+ end
103
+
75
104
  it "does not create a SimpleAuditTrail::Audit record" do
76
105
  expect{
77
106
  @tina.save
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_audit_trail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Maujean
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-14 00:00:00.000000000 Z
11
+ date: 2015-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -194,9 +194,13 @@ files:
194
194
  - spec/dummy/config/initializers/wrap_parameters.rb
195
195
  - spec/dummy/config/locales/en.yml
196
196
  - spec/dummy/config/routes.rb
197
+ - spec/dummy/db/development.sqlite3
197
198
  - spec/dummy/db/migrate/20150513181325_create_tinas.rb
198
199
  - spec/dummy/db/migrate/20150513221356_create_mr_torques.rb
199
200
  - spec/dummy/db/schema.rb
201
+ - spec/dummy/db/test.sqlite3
202
+ - spec/dummy/log/development.log
203
+ - spec/dummy/log/test.log
200
204
  - spec/dummy/public/404.html
201
205
  - spec/dummy/public/422.html
202
206
  - spec/dummy/public/500.html
@@ -254,9 +258,13 @@ test_files:
254
258
  - spec/dummy/config/locales/en.yml
255
259
  - spec/dummy/config/routes.rb
256
260
  - spec/dummy/config.ru
261
+ - spec/dummy/db/development.sqlite3
257
262
  - spec/dummy/db/migrate/20150513181325_create_tinas.rb
258
263
  - spec/dummy/db/migrate/20150513221356_create_mr_torques.rb
259
264
  - spec/dummy/db/schema.rb
265
+ - spec/dummy/db/test.sqlite3
266
+ - spec/dummy/log/development.log
267
+ - spec/dummy/log/test.log
260
268
  - spec/dummy/public/404.html
261
269
  - spec/dummy/public/422.html
262
270
  - spec/dummy/public/500.html