activemodel-with_conditions 1.0.0 → 1.1.0

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
  SHA256:
3
- metadata.gz: b87e3feb3afd222ced22ffd2c5ffb9dc027bba52afe73404e2517fb7f037378f
4
- data.tar.gz: d934a506e31218f30a2b702bc729ee81ffeb78130640360d6856136df6148fc3
3
+ metadata.gz: c48803d503015712fde2d1f5978346a3b9efd642c63331797f6ea09c4a20defc
4
+ data.tar.gz: 83e926861a8ade0f3b8bbabe43f556d9908b427f810de3fefd834cb90647e125
5
5
  SHA512:
6
- metadata.gz: 637afd30d18d47428c7c29023ceea2d50f1102f2ff6c6a01243012f0122f81c7aa4a2c914f7f59d321b0e3bba4ca1125115bb3b5e2203d789b05d487d5879b79
7
- data.tar.gz: 15a68276fd2e44b78a5a68495c77c028b220bdde08e29ba8635ededbba4e34d9398944105c38830ea7837ca6921f652ba656e8dea7d21063dafcba64e3cb4fe0
6
+ metadata.gz: 7d8e9142d686975dac5c6ed6575e30dfdac112d1a55c2282e40a5c56f8bcf4a474113ebf47e31c657d1b31eee0d48c98100f326a76e453e7dd9a68da184ea7e5
7
+ data.tar.gz: f91d1a1a3ec3eed199dc994f7afe5f5275d38cb554753cb278e1bf205d287cbe932d5f7ed7a15c468917424e023a0367bbfa64325c003084ee8bbe8a0e5b0cc5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [1.1.0] - 2024-12-22
2
+
3
+ - Support Active Record prior to 8.0.1
4
+
1
5
  ## [1.0.0] - 2024-12-22
2
6
 
3
7
  - Initial release
data/Gemfile.lock CHANGED
@@ -1,8 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activemodel-with_conditions (1.0.0)
5
- activemodel
4
+ activemodel-with_conditions (1.1.0)
6
5
 
7
6
  GEM
8
7
  remote: https://rubygems.org/
@@ -53,7 +52,7 @@ GEM
53
52
  uri (1.0.2)
54
53
 
55
54
  PLATFORMS
56
- arm64-darwin-22
55
+ ruby
57
56
 
58
57
  DEPENDENCIES
59
58
  activemodel
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WithConditions
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "active_model"
4
3
  require_relative "with_conditions/options_merger"
5
4
  require_relative "with_conditions/version"
6
5
 
@@ -16,13 +15,7 @@ module WithConditions
16
15
  end
17
16
  end
18
17
 
19
- module ActiveModel
20
- module API
21
- singleton_class.prepend(Module.new do
22
- def included(klass)
23
- super
24
- klass.extend WithConditions
25
- end
26
- end)
27
- end
28
- end
18
+ # To keep things simple, we include this in all objects, like `with_options`.
19
+ #
20
+ # Otherwise we would want specs that include Active Record, and we'd want to consider that different versions of Rails use Active Model in different ways (e.g. only recent Rails per 2024-12-22 include ActiveModel::API in ActiveRecord::Base`).
21
+ Object.extend WithConditions
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel-with_conditions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Nyh
@@ -9,21 +9,7 @@ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2024-12-22 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: activemodel
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
12
+ dependencies: []
27
13
  description: Like with_options but merges :if and :unless conditions. Convenient for
28
14
  Active Model or Active Record validations and callbacks.
29
15
  email: