rtiss_acts_as_versioned 0.9.1 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d61d281b782f32c19f2d2d8320397df1c77fcee5
4
- data.tar.gz: eddf855f5f3745e383fda5951b1a35d7b909ece3
3
+ metadata.gz: 85c837eaad50a545769f14911ea26e8bd6d03344
4
+ data.tar.gz: d3dd30fd2e944aa691b4db979f9da20337f240fd
5
5
  SHA512:
6
- metadata.gz: 166c0b23761ac795d5a553fceea218d6a5da8babce39aec8b5ff82c6912715050b6f8d4fa4cd64920da93b3e3009139e84f947fd608473c0428556fc120f8e42
7
- data.tar.gz: 73a2284345a5a0ed47f96aa3f1b91d66254d81d55e56a693cb74f2ae02378cf03d47dd70993d2c6394637ace2f58bf6b824e8776cdfa72f069e22c6792a98150
6
+ metadata.gz: 43805ee66159f18b492621ae1b3ab7a90f8437e0b53c3c1b24c81abb6ec82685c2585c5f644fde0365746bfe4feb8e89fe224301a16b8164ef93e0e8ef36207e
7
+ data.tar.gz: c0c1fd0bcafa91533e72d12c71ffe66f366a1ef2089702d0b8bf422043447752bf308f79d1f942324481ab8db23078a800df4d7d470a8c2997d805684919f3b0
@@ -20,7 +20,7 @@
20
20
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
21
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
 
23
- VERSION = '0.9.1'
23
+ VERSION = '0.9.3'
24
24
 
25
25
  module ActiveRecord #:nodoc:
26
26
  module Acts #:nodoc:
@@ -205,7 +205,7 @@ module ActiveRecord #:nodoc:
205
205
  end
206
206
 
207
207
  class_eval <<-CLASS_METHODS, __FILE__, __LINE__ + 1
208
- has_many :versions, version_association_options do
208
+ has_many :versions, **version_association_options do
209
209
  # finds earliest version of this record
210
210
  def earliest
211
211
  @earliest ||= order('#{version_column}').first
@@ -550,10 +550,10 @@ module ActiveRecord #:nodoc:
550
550
  t.column record_restored_column, :integer, :default => nil
551
551
  end
552
552
 
553
- self.versioned_columns.each do |col|
553
+ self.versioned_columns.each do |col|
554
554
  self.connection.add_column versioned_table_name, col.name, col.type,
555
555
  :limit => col.limit,
556
- :default => col.cast_type.type_cast_from_database(col.default), # convert strings to ruby types
556
+ :default => col.default,
557
557
  :scale => col.scale,
558
558
  :precision => col.precision
559
559
  end
@@ -561,7 +561,7 @@ module ActiveRecord #:nodoc:
561
561
  if type_col = self.columns_hash[inheritance_column]
562
562
  self.connection.add_column versioned_table_name, versioned_inheritance_column, type_col.type,
563
563
  :limit => type_col.limit,
564
- :default => type_col.cast_type.type_cast_from_database(type_col.default), # convert strings to ruby types
564
+ :default => type_col.default,
565
565
  :scale => type_col.scale,
566
566
  :precision => type_col.precision
567
567
  end
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
12
12
  ## If your rubyforge_project name is different, then edit it and comment out
13
13
  ## the sub! line in the Rakefile
14
14
  s.name = 'rtiss_acts_as_versioned'
15
- s.version = '0.9.1'
16
- s.date = '2020-04-23'
15
+ s.version = '0.9.3'
16
+ s.date = '2024-08-26'
17
17
  s.rubyforge_project = 'rtiss_acts_as_versioned'
18
18
  s.summary = "Add simple versioning to ActiveRecord models (TISS version)."
19
19
  s.description = "Add simple versioning to ActiveRecord models (TISS version).
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtiss_acts_as_versioned
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Olson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-04-23 00:00:00.000000000 Z
13
+ date: 2024-08-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord