servitium 1.3.4 → 1.3.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: b82546d496da23556c3c50e86fdf51e62667ef8d20f53b69e2c44ef82bb5a41e
4
- data.tar.gz: 7869d137dadece63bd421e1b225c768aba7670a765101c71ac55923a0a55707b
3
+ metadata.gz: 8a0ef3ad8b27e23da12fb7e38523b6791067182326c4eb687ff783c04590a48b
4
+ data.tar.gz: 7db9f17e28035c835626d7a95b53566fcc970cee967753666ad6651ca5553005
5
5
  SHA512:
6
- metadata.gz: e8cf2868255f4e1537a61a653fe443b55e4c2ca5dc3cb311424a89b99435e68d8c60ccbb4fd15e940215368f7e1d409d4a6b9826f49e81581f969564ae0d1007
7
- data.tar.gz: b0bd04884a459a3f231a812f1932734dfa69f27c7e6c1f84890bba9afb281d6e63a797b3bcc9bafa2cada9ffa0112794be32bc07bd5cd54abad542cefe491710
6
+ metadata.gz: 21d99ac12c2a0b21d15c3344c1f25ccf01151a10516794485d7343e9d8b9940e7b555fc5fcd29c563c937d3810cd22cd747f551aca54d78db112a2dbc48c625e
7
+ data.tar.gz: d112f878db7d4f82e806d34805a80e5cd5cd28388d4e7a728f0c2b8d4e7af3cfb02fdbcf8b2a533977bc875d230b984ef1ef8151a4c904141c0656ccf3f8c4b7
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Rails 8 compatibility: ActiveModel::Dirty expects attribute values to respond to
4
+ # +changed_in_place?+. Value types (Integer, Float, Symbol, etc.) can't get
5
+ # singleton methods in Ruby, so we add the method at the class level here.
6
+ # Servitium/ActiveAttr context attributes use these types; without this, validations
7
+ # (e.g. NumericalityValidator) raise NoMethodError.
8
+
9
+ require "bigdecimal"
10
+ require "date"
11
+
12
+ [
13
+ String, Integer, Float, BigDecimal,
14
+ TrueClass, FalseClass, NilClass, Symbol,
15
+ Date, Time, Array, Hash
16
+ ].each do |klass|
17
+ next if klass.method_defined?(:changed_in_place?)
18
+
19
+ klass.define_method(:changed_in_place?) { false }
20
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Servitium
4
- VERSION = "1.3.4"
4
+ VERSION = "1.3.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: servitium
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt
@@ -281,6 +281,7 @@ files:
281
281
  - lib/servitium/i18n.rb
282
282
  - lib/servitium/rails.rb
283
283
  - lib/servitium/rails/railtie.rb
284
+ - lib/servitium/rails8_value_dirty_compat.rb
284
285
  - lib/servitium/scoped_attributes.rb
285
286
  - lib/servitium/service.rb
286
287
  - lib/servitium/service_active_job.rb