sequel_paper_trail_safehub 0.0.4 → 0.0.5
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70e3d3871ff8d49da8d153775ad2c4722c3f2c33f5aca3e31d9a09fc3ba51ade
|
4
|
+
data.tar.gz: 102d33ca1ee204975db83b2803a6c62baf59bdac201124147b39fa901408f84c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f1427b5a851ef99a19ad545c6e76bd174bbfae4136a0af2cb014b5119fec8ac1d838f567f0f58a6c06a6ff93a058faf42f270973a125e3971c8b8c48f640480
|
7
|
+
data.tar.gz: 8d855f39e3424a781cdfd1aa7295451780bb1a5b5d65bf568b1c06d15664424f96f34a8f4b3dbf80abb1270377aa4123e37e1c2e1125eae7db222c5c84e7686f
|
@@ -65,7 +65,6 @@ describe Sequel::Plugins::HasPaperTrail do
|
|
65
65
|
info: '{"val":1}',
|
66
66
|
other_info: '{}'
|
67
67
|
}
|
68
|
-
binding.pry
|
69
68
|
expect(without_fields(record.versions, :id)).to be_include(expected)
|
70
69
|
end
|
71
70
|
|
@@ -111,16 +110,4 @@ describe Sequel::Plugins::HasPaperTrail do
|
|
111
110
|
record.update(name: '2')
|
112
111
|
expect(record.current_version_id).to eq(record.versions.first.id)
|
113
112
|
end
|
114
|
-
|
115
|
-
it 'saves join table rows' do
|
116
|
-
paper_db.create_test_join_table
|
117
|
-
test_join_model = paper_db.test_join_model
|
118
|
-
# class AlbumArtist;end;
|
119
|
-
test_join_model.plugin :has_paper_trail,
|
120
|
-
item_class_name: 'AlbumArtist',
|
121
|
-
class_name: version_class
|
122
|
-
|
123
|
-
joiner = test_join_model.create(artist_id: 1, album_id: 1)
|
124
|
-
expect(joiner.versions.count).to eq(1)
|
125
|
-
end
|
126
113
|
end
|
@@ -9,13 +9,6 @@ class SpecPaperDb
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
def create_test_join_table
|
13
|
-
@db.create_table!(:albums_artists) do
|
14
|
-
column :artist_id, :integer
|
15
|
-
column :album_id, :integer
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
12
|
def create_test_table
|
20
13
|
@db.create_table!(:test_table) do
|
21
14
|
primary_key :id
|
@@ -29,9 +22,6 @@ class SpecPaperDb
|
|
29
22
|
Class.new(Sequel::Model(@db[:test_table]))
|
30
23
|
end
|
31
24
|
|
32
|
-
def test_join_model
|
33
|
-
Class.new(Sequel::Model(@db[:albums_artists]))
|
34
|
-
end
|
35
25
|
# rubocop:disable Metrics/MethodLength
|
36
26
|
def create_versions_table
|
37
27
|
@db.create_table!(:versions) do
|