versionaire 13.0.0 → 13.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +12 -16
- data/versionaire.gemspec +1 -1
- data.tar.gz.sig +2 -1
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddea448c492c62a0bc45e8cda40984cf5695ae839e3f71cd66711b37f6de9cfd
|
4
|
+
data.tar.gz: 78f8baf838b4f6361d44dad88d81fab42f0f73c4e86abe4a1a5ee86fc801d5e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27a98bbc05db0abaacc9d15dbb164ef342449085882d7e4bf3ca55efd30c9e7dee2514fff942f0d01af7ca93046f642ffab6cb7be616f7bda8984950f05362de
|
7
|
+
data.tar.gz: e4ad9c4bf1d8359843620037c22d9f60e32054936fec48f44020b0520da86f84594fb686f2db9cff4e11cd7e7fc7d30e98051805b04f54da635fc80258136888
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -4,25 +4,21 @@
|
|
4
4
|
|
5
5
|
:option_parser_link: link:https://alchemists.io/articles/ruby_option_parser[OptionParser]
|
6
6
|
:semver_link: link:https://semver.org[Semantic Versioning]
|
7
|
+
:strict_semver_link: link:https://alchemists.io/articles/strict_semantic_versioning[Strict Semantic Versioning]
|
7
8
|
|
8
9
|
= Versionaire
|
9
10
|
|
10
|
-
Ruby doesn't provide a primitive version type by default so Versionaire fills this gap by providing immutable and thread-safe {
|
11
|
+
Ruby doesn't provide a primitive version type by default so Versionaire fills this gap by providing immutable and thread-safe {strict_semver_link} so you can leverage versions within your applications. This new `Version` type behaves and feels a lot like other primitives (i.e. `String`, `Array`, `Hash`, `Proc`, etc) and can be cast/converted from other primitives.
|
11
12
|
|
12
13
|
toc::[]
|
13
14
|
|
14
15
|
== Features
|
15
16
|
|
16
|
-
* Provides
|
17
|
+
* Provides {strict_semver_link} which means `<major>.<minor>.<patch>`.
|
17
18
|
* Provides immutable, thread-safe version instances.
|
18
|
-
* Converts (casts) from a `String`, `Array`, `Hash`, or `Version` to a `Version`.
|
19
|
-
* Disallows `<major>.<minor>.<patch>-<pre-release>` usage even though {semver_link} suggests
|
20
|
-
* Disallows `<major>.<minor>.<patch>+<build_metadata>` usage even though {semver_link} suggests
|
21
|
-
|
22
|
-
== Screencasts
|
23
|
-
|
24
|
-
[link=https://alchemists.io/screencasts/versionaire]
|
25
|
-
image::https://alchemists.io/images/screencasts/versionaire/cover.svg[Screencast,600,240,role=focal_point]
|
19
|
+
* Converts (casts) from a `String`, `Array`, `Hash`, `Proc`, or `Version` to a `Version`.
|
20
|
+
* Disallows `<major>.<minor>.<patch>-<pre-release>` usage even though {semver_link} suggests you _may_ use pre-release information.
|
21
|
+
* Disallows `<major>.<minor>.<patch>+<build_metadata>` usage even though {semver_link} suggests you _may_ use build metadata.
|
26
22
|
|
27
23
|
== Requirements
|
28
24
|
|
@@ -139,8 +135,9 @@ Versionaire::Version major: 1, minor: 0, patch: 0
|
|
139
135
|
Versionaire::Version version
|
140
136
|
----
|
141
137
|
|
142
|
-
Each of these conversions will result in a version object that represents "`1.0.0`".
|
143
|
-
|
138
|
+
Each of these conversions will result in a version object that represents "`1.0.0`".
|
139
|
+
|
140
|
+
When attempting to convert an unsupported type, a `Versionaire::Error` exception will be thrown.
|
144
141
|
|
145
142
|
==== Refinement
|
146
143
|
|
@@ -160,9 +157,8 @@ Version version
|
|
160
157
|
|
161
158
|
By adding `using Versionaire::Cast` to your implementation, this allows Versionaire to refine
|
162
159
|
`Kernel` so you have a top-level `Version` conversion function much like Kernel's native support for
|
163
|
-
`Integer`, `String`, `Array`, `Hash`, etc. The benefit to this approach is
|
164
|
-
typing
|
165
|
-
approach to casting like any other primitive.
|
160
|
+
`Integer`, `String`, `Array`, `Hash`, etc. The benefit to this approach is to reduce the amount of
|
161
|
+
typing so you don't pollute your entire object space, like a monkey patch, while providing an idiomatic approach to casting like any other primitive.
|
166
162
|
|
167
163
|
==== Implicit
|
168
164
|
|
@@ -187,7 +183,7 @@ version.to_h # {major: 0, minor: 0, patch: 0}
|
|
187
183
|
version.to_proc # #<Proc:0x000000010b015b88 (lambda)>
|
188
184
|
----
|
189
185
|
|
190
|
-
To elaborate on procs
|
186
|
+
To elaborate on procs, this means the following is possible where you might want to collect all minor verions values or make use of version information in other useful ways:
|
191
187
|
|
192
188
|
[source,ruby]
|
193
189
|
----
|
data/versionaire.gemspec
CHANGED
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
?PXdS�������G�r�&sǗ�J�.ג�PG�G��7��7�J���4P0�&� ���-w��C9��������-B߹߳��� 1�.
|
2
|
+
�@E����!<����d"<t9K���~"����Dz�7��)��N��Z��K`�ouʗ����ݯ��Rck�P��'�������u6�<̕��\Ё}Z��|8?������;tz�9��Ujv�l�����7�cJ��
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: versionaire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.
|
4
|
+
version: 13.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-
|
38
|
+
date: 2024-02-20 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: refinements
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
|
-
rubygems_version: 3.5.
|
98
|
+
rubygems_version: 3.5.6
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: An immutable, thread-safe, and semantic version type.
|
metadata.gz.sig
CHANGED
Binary file
|