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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -3
- data/lib/with_conditions/version.rb +1 -1
- data/lib/with_conditions.rb +4 -11
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c48803d503015712fde2d1f5978346a3b9efd642c63331797f6ea09c4a20defc
|
4
|
+
data.tar.gz: 83e926861a8ade0f3b8bbabe43f556d9908b427f810de3fefd834cb90647e125
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d8e9142d686975dac5c6ed6575e30dfdac112d1a55c2282e40a5c56f8bcf4a474113ebf47e31c657d1b31eee0d48c98100f326a76e453e7dd9a68da184ea7e5
|
7
|
+
data.tar.gz: f91d1a1a3ec3eed199dc994f7afe5f5275d38cb554753cb278e1bf205d287cbe932d5f7ed7a15c468917424e023a0367bbfa64325c003084ee8bbe8a0e5b0cc5
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
activemodel-with_conditions (1.
|
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
|
-
|
55
|
+
ruby
|
57
56
|
|
58
57
|
DEPENDENCIES
|
59
58
|
activemodel
|
data/lib/with_conditions.rb
CHANGED
@@ -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
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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.
|
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:
|