rangops 1.0.0.rc1 → 1.0.0

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: 38a8f10cb6a5c045a2f06e1184724bc1c19ba47f25c16bf822a8f76bbd23cabe
4
- data.tar.gz: f31fa31f633ee641fb295ec162b43c7cd43a1d5f83145f037f61dfcd97528c31
3
+ metadata.gz: 5710c3163c9b9098afe8d67062eff72e52018d102c4d2eeb322038a73692b52c
4
+ data.tar.gz: 3a832f5d480caf10ec7dc687363d602134b3749d51531f9bc8b1967b32c2b18f
5
5
  SHA512:
6
- metadata.gz: bdbc3a6e057d03dece38ffd6145425b818ea8787344c098308a6d108b662ec524bf366970318706b83c5d77ecafb8d5a81a06d5c54d8b1c13fa391171f03f61b
7
- data.tar.gz: 3ad54954874d3f78972ca63710b9ca90d26e3b6667dffcfc4db8c8a238f6967c972a432589cc56edddca33ec7d52b07cb39f89b910b4d7a909c06cf747a8b757
6
+ metadata.gz: d9afee6c9742f6903f5cea072e9061aa3eb5f16600a500fdd48b9c68642fe4c21d376acf64b021b19bea0a1e5e402f36cff23aae690181d295bde7774b0f1931
7
+ data.tar.gz: 0f06c047dd654d539c2aa93869dab696e8e32184cba8f4b30a37671d33b09159c62b11b0354b948e49b11b3ba6525afa78736e40cd82e2b2c42073503e1a29b0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rangops (1.0.0.beta1)
4
+ rangops (1.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -37,8 +37,16 @@ Relative complement:
37
37
  (1..10).complement(5..15)
38
38
  => 10..15
39
39
 
40
+ Checking for subsets/supersets:
40
41
 
41
- Check [API docs](https://bartpiet.github.io/rangops/) for full list of aliases
42
+ (2..3).subset?(0..10)
43
+ => true
44
+
45
+ (0..10).superset?(2..3)
46
+ => true
47
+
48
+
49
+ Check [API docs](https://bartpiet.github.io/rangops/Rangops/Set.html) for full list of aliases
42
50
  and predicates.
43
51
 
44
52
  There is no mapping to arrays nor iteratons under the hood,
@@ -57,6 +65,11 @@ Beginless and endless ranges are supported.
57
65
  (nil..10).union(5..nil)
58
66
  => nil..nil
59
67
 
68
+ End exclusion is supported too.
69
+
70
+ (1...3).intersect?(3..10)
71
+ => false
72
+
60
73
  It works well on string and date ranges too.
61
74
 
62
75
  ('2025-01-01'..'2026-12-31') & ('2026-01-01'..'2027-12-31')
@@ -68,7 +81,7 @@ It works well on string and date ranges too.
68
81
 
69
82
  Operations are supposed to return a `Range` result, so they only work on
70
83
  arguments delimited with values of the same type.
71
- `(1..5) & ('c'..'g')` will just return `nil`
84
+ `(1..5) & ('c'..'g')` will just return `nil`.
72
85
 
73
86
 
74
87
  ## License
data/docs/README_md.html CHANGED
@@ -141,7 +141,15 @@
141
141
  <pre>(1..10).complement(5..15)
142
142
  =&gt; 10..15</pre>
143
143
 
144
- <p>Check <a href="https://bartpiet.github.io/rangops/">API docs</a> for full list of aliases and predicates.</p>
144
+ <p>Checking for subsets/supersets:</p>
145
+
146
+ <pre>(2..3).subset?(0..10)
147
+ =&gt; true
148
+
149
+ (0..10).superset?(2..3)
150
+ =&gt; true</pre>
151
+
152
+ <p>Check <a href="https://bartpiet.github.io/rangops/Rangops/Set.html">API docs</a> for full list of aliases and predicates.</p>
145
153
 
146
154
  <p>There is no mapping to arrays nor iteratons under the hood, just begin/end values comparison - so operations on ranges of any size are possible, with no penalty on speed or memory usage. Ranges delimited with any type of Numerics can be used.</p>
147
155
 
@@ -156,6 +164,11 @@
156
164
  (nil..10).union(5..nil)
157
165
  =&gt; nil..nil</pre>
158
166
 
167
+ <p>End exclusion is supported too.</p>
168
+
169
+ <pre>(1...3).intersect?(3..10)
170
+ =&gt; false</pre>
171
+
159
172
  <p>It works well on string and date ranges too.</p>
160
173
 
161
174
  <pre>(&#39;2025-01-01&#39;..&#39;2026-12-31&#39;) &amp; (&#39;2026-01-01&#39;..&#39;2027-12-31&#39;)
@@ -164,7 +177,7 @@
164
177
  (&#39;a&#39;..&#39;e&#39;) &amp; (&#39;c&#39;..&#39;g&#39;)
165
178
  =&gt; &quot;c&quot;..&quot;e&quot;</pre>
166
179
 
167
- <p>Operations are supposed to return a <code>Range</code> result, so they only work on arguments delimited with values of the same type. <code>(1..5) &amp; (&#39;c&#39;..&#39;g&#39;)</code> will just return <code>nil</code></p>
180
+ <p>Operations are supposed to return a <code>Range</code> result, so they only work on arguments delimited with values of the same type. <code>(1..5) &amp; (&#39;c&#39;..&#39;g&#39;)</code> will just return <code>nil</code>.</p>
168
181
 
169
182
  <h2 id="label-License">License<span><a href="#label-License">&para;</a> <a href="#top">&uarr;</a></span></h2>
170
183
 
data/docs/created.rid CHANGED
@@ -1,3 +1,3 @@
1
- Wed, 13 Aug 2025 22:14:30 +0200
2
- README.md Wed, 13 Aug 2025 22:13:55 +0200
1
+ Thu, 14 Aug 2025 19:37:19 +0200
2
+ README.md Thu, 14 Aug 2025 19:34:50 +0200
3
3
  lib/rangops/set.rb Wed, 13 Aug 2025 22:04:18 +0200
data/docs/index.html CHANGED
@@ -150,7 +150,15 @@
150
150
  <pre>(1..10).complement(5..15)
151
151
  =&gt; 10..15</pre>
152
152
 
153
- <p>Check <a href="https://bartpiet.github.io/rangops/">API docs</a> for full list of aliases and predicates.</p>
153
+ <p>Checking for subsets/supersets:</p>
154
+
155
+ <pre>(2..3).subset?(0..10)
156
+ =&gt; true
157
+
158
+ (0..10).superset?(2..3)
159
+ =&gt; true</pre>
160
+
161
+ <p>Check <a href="https://bartpiet.github.io/rangops/Rangops/Set.html">API docs</a> for full list of aliases and predicates.</p>
154
162
 
155
163
  <p>There is no mapping to arrays nor iteratons under the hood, just begin/end values comparison - so operations on ranges of any size are possible, with no penalty on speed or memory usage. Ranges delimited with any type of Numerics can be used.</p>
156
164
 
@@ -165,6 +173,11 @@
165
173
  (nil..10).union(5..nil)
166
174
  =&gt; nil..nil</pre>
167
175
 
176
+ <p>End exclusion is supported too.</p>
177
+
178
+ <pre>(1...3).intersect?(3..10)
179
+ =&gt; false</pre>
180
+
168
181
  <p>It works well on string and date ranges too.</p>
169
182
 
170
183
  <pre>(&#39;2025-01-01&#39;..&#39;2026-12-31&#39;) &amp; (&#39;2026-01-01&#39;..&#39;2027-12-31&#39;)
@@ -173,7 +186,7 @@
173
186
  (&#39;a&#39;..&#39;e&#39;) &amp; (&#39;c&#39;..&#39;g&#39;)
174
187
  =&gt; &quot;c&quot;..&quot;e&quot;</pre>
175
188
 
176
- <p>Operations are supposed to return a <code>Range</code> result, so they only work on arguments delimited with values of the same type. <code>(1..5) &amp; (&#39;c&#39;..&#39;g&#39;)</code> will just return <code>nil</code></p>
189
+ <p>Operations are supposed to return a <code>Range</code> result, so they only work on arguments delimited with values of the same type. <code>(1..5) &amp; (&#39;c&#39;..&#39;g&#39;)</code> will just return <code>nil</code>.</p>
177
190
 
178
191
  <h2 id="label-License">License<span><a href="#label-License">&para;</a> <a href="#top">&uarr;</a></span></h2>
179
192
 
Binary file
@@ -1,3 +1,3 @@
1
1
  module Rangops
2
- VERSION = "1.0.0.rc1"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rangops
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartosz Pietraszko
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-08-13 00:00:00.000000000 Z
10
+ date: 2025-08-14 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler