revector 0.1.1 → 0.1.2

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: 55552970c0c202e03b178d35afa19acb75e3f1350429f77068d7ea828d16617e
4
- data.tar.gz: 2c1cc807e1d503af911c6f04dce07d3e683820ca43cea6cd5350166e545c9dca
3
+ metadata.gz: 3346074e6247568f17b908f5472d120d2608c514c186bf2665053c867499439f
4
+ data.tar.gz: 6abde163bf710682bf19e88871b299cf8795f1aa31540e051f35da0d7ba302a3
5
5
  SHA512:
6
- metadata.gz: 917aa56974f1d057f1b621e0a26c53d38ac263db166a18e5fca44fc8363b524a4c431dfbfe5e49fc1d764f064279bd5589bd826161b690266813c893dac38f77
7
- data.tar.gz: da812d7d3128692f47446b37e2a7fe2ec9388972359b24f3d0f1e44c8f13e2ca3976f61af4ff9077db9444f6b56331c267f78be6446c14eccecc8dbc63b89641
6
+ metadata.gz: a7e44af11b5f08a366a5c5db1444b483f95c1b8f29a547593fac2cb24c7edc7460957380fc445e20e824f8ec93b37d5d67dd603faf10b4983353b883158bed05
7
+ data.tar.gz: 36c9ba17ae6a8bb54f0673dc2d54fa40a61db5a9656cc13df38fdf64e956734c513240a6972467e7f9c1ffdf5425c808fb9545d0dbb2f623a8e919c89ca34350
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## Changelog
2
2
 
3
+ ### [v0.1.1](https://github.com/thadeu/revector/compare/v0.1.0...v0.1.1) - 11 December 2024
4
+
5
+ #### General Changes
6
+
7
+ - added support to ex and not_ex @thadeu
8
+ - update CHANGELOG.md @thadeu
9
+ - update README.md @thadeu
10
+
3
11
  ### v0.1.0
4
12
 
5
13
  #### Chores And Housekeeping
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Revector
4
+ module Exists
5
+ def self.check!(item, iteratee)
6
+ compare(Utility::TryFetchOrBlank[item, iteratee])
7
+ end
8
+
9
+ def self.compare(value, other = false)
10
+ case value
11
+ in [*] | String
12
+ value.size.positive?.to_s == other.to_s
13
+ else
14
+ !!value.to_s == other.to_s
15
+ end
16
+ end
17
+ end
18
+
19
+ module NotExists
20
+ def self.check!(item, iteratee)
21
+ !Exists.check!(item, iteratee)
22
+ end
23
+
24
+ def self.compare(value, other = nil)
25
+ !Exists.compare(value, other)
26
+ end
27
+ end
28
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Revector
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thadeu Esteves
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-12 00:00:00.000000000 Z
11
+ date: 2024-12-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Filter collections using predicates like Ransack gem.
14
14
  email:
@@ -35,6 +35,7 @@ files:
35
35
  - lib/revector/predicate/contains.rb
36
36
  - lib/revector/predicate/endify.rb
37
37
  - lib/revector/predicate/equal.rb
38
+ - lib/revector/predicate/exists.rb
38
39
  - lib/revector/predicate/greater_than.rb
39
40
  - lib/revector/predicate/in.rb
40
41
  - lib/revector/predicate/less_than.rb