historiographer 4.4.0 → 4.4.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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/historiographer.gemspec +2 -2
- data/lib/historiographer.rb +1 -2
- data/spec/historiographer_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9299cb62bdfd77ef8cec2c614a592166c67d489a1c36a77d83d78eb3dca48d1
|
4
|
+
data.tar.gz: 9e03988f85e756bbbc2789c86dc4df255df837aef07bdc718ee2774f5a5956cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70e7054198d9010c9d7cc01986e9d8d92b64f4f6a65d4ba2c96d66b7d903d07dd21ac2690407ff40d8bfd685c174e1f9c65b0c659e7d915d1398a637808435bb
|
7
|
+
data.tar.gz: b2ccf22179ec57e5cf045628eadd76b7e755ac3d9951b838030d72f132461f524752774e5d5baeefcb01bfdb6a47a430c8eaa08ed6382fa54dddb84ec5b1ec6d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.4.
|
1
|
+
4.4.1
|
data/historiographer.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: historiographer 4.4.
|
5
|
+
# stub: historiographer 4.4.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "historiographer".freeze
|
9
|
-
s.version = "4.4.
|
9
|
+
s.version = "4.4.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
data/lib/historiographer.rb
CHANGED
@@ -396,8 +396,7 @@ module Historiographer
|
|
396
396
|
current_history.update_columns(history_ended_at: now) if current_history.present?
|
397
397
|
return existing_history
|
398
398
|
else
|
399
|
-
#
|
400
|
-
raise HistoryInsertionError, "Failed to insert history record for #{self.class.name} ##{id}, and no existing history was found. This may indicate a database constraint preventing insertion."
|
399
|
+
history_class.create!(attrs) # This will raise the correct error since it will fail the unique constraint
|
401
400
|
end
|
402
401
|
end
|
403
402
|
|
@@ -562,7 +562,7 @@ describe Historiographer do
|
|
562
562
|
# This should raise a meaningful error
|
563
563
|
expect {
|
564
564
|
post.send(:record_history)
|
565
|
-
}.to raise_error
|
565
|
+
}.to raise_error
|
566
566
|
end
|
567
567
|
|
568
568
|
it 'provides meaningful error when insertion fails' do
|