active_snapshot 0.1.0 → 0.1.1

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.
@@ -67,7 +67,7 @@ class SnapshotTest < ActiveSupport::TestCase
67
67
 
68
68
  @snapshot.metadata = {foo: :bar}
69
69
 
70
- assert_equal 'bar', @snapshot.metadata['foo']
70
+ assert_equal :bar, @snapshot.metadata['foo']
71
71
  end
72
72
 
73
73
  def test_build_snapshot_item
@@ -22,16 +22,12 @@ class ActiveSnapshotTest < ActiveSupport::TestCase
22
22
  child = parent.comments.create!(content: :foo)
23
23
  original_child_updated_at = child.updated_at
24
24
 
25
- orig_comments_size = parent.children_to_snapshot[:comments][:records].count
26
-
27
25
  assert_difference ->{ ActiveSnapshot::Snapshot.count }, 1 do
28
- assert_difference ->{ ActiveSnapshot::SnapshotItem.count }, (orig_comments_size+1) do
26
+ assert_difference ->{ ActiveSnapshot::SnapshotItem.count }, 2 do
29
27
  @snapshot = parent.create_snapshot!(identifier)
30
28
  end
31
29
  end
32
30
 
33
- assert_equal (orig_comments_size+1), @snapshot.snapshot_items.size
34
-
35
31
  parent.update_columns(updated_at: 1.day.from_now)
36
32
 
37
33
  parent.update_columns(updated_at: 1.day.from_now)
@@ -51,7 +47,7 @@ class ActiveSnapshotTest < ActiveSupport::TestCase
51
47
 
52
48
  parent.reload
53
49
 
54
- assert_equal orig_comments_size, parent.children_to_snapshot[:comments][:records].count
50
+ assert_equal 1, parent.children_to_snapshot[:comments][:records].count
55
51
 
56
52
  ### Test Data Chang
57
53
  assert_time_match original_parent_updated_at, parent.updated_at
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_snapshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Weston Ganger
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: appraisal
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: warning
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -155,8 +169,8 @@ files:
155
169
  - test/dummy_app/config/routes.rb
156
170
  - test/dummy_app/config/secrets.yml
157
171
  - test/dummy_app/db/migrate/20210128155312_set_up_test_tables.rb
158
- - test/dummy_app/db/migrate/20210306070749_create_snapshots_tables.rb
159
- - test/dummy_app/log/development.log
172
+ - test/dummy_app/db/migrate/20210306100122_create_snapshots_tables.rb
173
+ - test/dummy_app/db/test.sqlite3
160
174
  - test/dummy_app/log/test.log
161
175
  - test/generators/active_snapshot/install_generator_test.rb
162
176
  - test/models/snapshot_item_test.rb
@@ -207,7 +221,6 @@ test_files:
207
221
  - test/dummy_app/app/assets/javascripts/application.js
208
222
  - test/dummy_app/app/controllers/application_controller.rb
209
223
  - test/dummy_app/config.ru
210
- - test/dummy_app/log/development.log
211
224
  - test/dummy_app/log/test.log
212
225
  - test/dummy_app/config/database.yml
213
226
  - test/dummy_app/config/environments/production.rb
@@ -226,6 +239,7 @@ test_files:
226
239
  - test/dummy_app/config/secrets.yml
227
240
  - test/dummy_app/config/application.rb
228
241
  - test/dummy_app/Rakefile
242
+ - test/dummy_app/db/test.sqlite3
229
243
  - test/dummy_app/db/migrate/20210128155312_set_up_test_tables.rb
230
- - test/dummy_app/db/migrate/20210306070749_create_snapshots_tables.rb
244
+ - test/dummy_app/db/migrate/20210306100122_create_snapshots_tables.rb
231
245
  - test/generators/active_snapshot/install_generator_test.rb
@@ -1,9 +0,0 @@
1
-  (1.2ms) SELECT sqlite_version(*)
2
-  (4.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
3
-  (3.9ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL)
4
- ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
5
-  (0.1ms) begin transaction
6
- ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2020-10-18 23:26:12.753133"], ["updated_at", "2020-10-18 23:26:12.753133"]]
7
-  (2.1ms) commit transaction
8
-  (0.1ms) SELECT sqlite_version(*)
9
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC