refinements 10.0.0 → 10.1.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +27 -13
- data/lib/refinements/loggers.rb +2 -0
- data/refinements.gemspec +4 -4
- data.tar.gz.sig +0 -0
- metadata +30 -23
- 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: acd50ef5bb4db84f4db8c509c2deab9203e0e7c036e880d43ed047d540c961cf
|
4
|
+
data.tar.gz: df6ebf181b200aeb38f14f3f691f844735e1e352741bc6e7cd667970c5b81b6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53703faa9a8b2941e562561a1f9edf22920fdd3934e7d6b55ec3e4290ad18d3e6282e96733c658accf58d475e6f0f78a6687c4777cb7fe2bc49edfdb9707b17b
|
7
|
+
data.tar.gz: 0ddb2f12bb1fcd7aefc06f6c9f2ce891c9929828a79162610824a8a5cf3ffa991d476118f9c5a106fb681c9603a6b8c1ba0dbeaf80004317c990b4673152f8ff
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
= Refinements
|
6
6
|
|
7
7
|
Refinements are a collection primitive Ruby objects enhancements without needing to resort to hard
|
8
|
-
to debug link:https://
|
8
|
+
to debug link:https://alchemists.io/articles/ruby_antipatterns/#_monkey_patches[monkey patches].
|
9
9
|
These refinements give you additional syntactic sugar to develop clean and concise implementations
|
10
10
|
while using less code. By refining our code we can acquire the functionality we wish the core
|
11
11
|
primitives had!
|
@@ -31,7 +31,7 @@ Enhances the following objects:
|
|
31
31
|
== Requirements
|
32
32
|
|
33
33
|
. https://www.ruby-lang.org[Ruby].
|
34
|
-
. A solid understanding of link:https://
|
34
|
+
. A solid understanding of link:https://alchemists.io/articles/ruby_refinements[Ruby refinements
|
35
35
|
and lexical scope].
|
36
36
|
|
37
37
|
== Setup
|
@@ -760,6 +760,20 @@ logger.write "Test."
|
|
760
760
|
logger.reread # ""
|
761
761
|
----
|
762
762
|
|
763
|
+
===== #any
|
764
|
+
|
765
|
+
Allows you to log _any_ message which is identical in behavior and functionality to the `Logger#unknown` method only this requires less typing and better matches the terminology used by the `#unknown` method.
|
766
|
+
|
767
|
+
``` ruby
|
768
|
+
logger = Logger.new STDOUT
|
769
|
+
|
770
|
+
logger.any "Test."
|
771
|
+
# A, [2000-01-10T09:00:00.847428 #44925] ANY -- : Test.
|
772
|
+
|
773
|
+
logger.any { "Test." }
|
774
|
+
A, [2000-01-10T09:00:00.330719 #44925] ANY -- : Test.
|
775
|
+
```
|
776
|
+
|
763
777
|
==== Pathname
|
764
778
|
|
765
779
|
===== Pathname
|
@@ -817,7 +831,7 @@ before being required to ensure consistent behavior. Example:
|
|
817
831
|
Dir[File.join(__dir__, "support/shared_contexts/**/*.rb")].sort.each { |path| require path }
|
818
832
|
|
819
833
|
# After
|
820
|
-
Pathname.require_tree __dir__
|
834
|
+
Pathname.require_tree "#{__dir__}/support/shared_contexts"
|
821
835
|
----
|
822
836
|
|
823
837
|
The following are further examples of potential usage:
|
@@ -831,7 +845,7 @@ Pathname.require_tree __dir__
|
|
831
845
|
Pathname.require_tree "/test"
|
832
846
|
|
833
847
|
# Requires all files in RSpec shared examples directory structure.
|
834
|
-
Pathname.require_tree
|
848
|
+
Pathname.require_tree SPEC_ROOT.join("support/shared_examples")
|
835
849
|
----
|
836
850
|
|
837
851
|
===== .root
|
@@ -1436,22 +1450,22 @@ To test, run:
|
|
1436
1450
|
|
1437
1451
|
[source,bash]
|
1438
1452
|
----
|
1439
|
-
|
1453
|
+
bin/rake
|
1440
1454
|
----
|
1441
1455
|
|
1442
|
-
== link:https://
|
1456
|
+
== link:https://alchemists.io/policies/license[License]
|
1443
1457
|
|
1444
|
-
== link:https://
|
1458
|
+
== link:https://alchemists.io/policies/security[Security]
|
1445
1459
|
|
1446
|
-
== link:https://
|
1460
|
+
== link:https://alchemists.io/policies/code_of_conduct[Code of Conduct]
|
1447
1461
|
|
1448
|
-
== link:https://
|
1462
|
+
== link:https://alchemists.io/policies/contributions[Contributions]
|
1449
1463
|
|
1450
|
-
== link:https://
|
1464
|
+
== link:https://alchemists.io/projects/refinements/versions[Versions]
|
1451
1465
|
|
1452
|
-
== link:https://
|
1466
|
+
== link:https://alchemists.io/community[Community]
|
1453
1467
|
|
1454
1468
|
== Credits
|
1455
1469
|
|
1456
|
-
* Built with link:https://
|
1457
|
-
* Engineered by link:https://
|
1470
|
+
* Built with link:https://alchemists.io/projects/gemsmith[Gemsmith].
|
1471
|
+
* Engineered by link:https://alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
|
data/lib/refinements/loggers.rb
CHANGED
data/refinements.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "refinements"
|
5
|
-
spec.version = "10.
|
5
|
+
spec.version = "10.1.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
|
-
spec.homepage = "https://
|
8
|
+
spec.homepage = "https://alchemists.io/projects/refinements"
|
9
9
|
spec.summary = "A collection of refinements to core Ruby objects."
|
10
10
|
spec.license = "Hippocratic-2.1"
|
11
11
|
|
12
12
|
spec.metadata = {
|
13
13
|
"bug_tracker_uri" => "https://github.com/bkuhlmann/refinements/issues",
|
14
|
-
"changelog_uri" => "https://
|
15
|
-
"documentation_uri" => "https://
|
14
|
+
"changelog_uri" => "https://alchemists.io/projects/refinements/versions",
|
15
|
+
"documentation_uri" => "https://alchemists.io/projects/refinements",
|
16
16
|
"funding_uri" => "https://github.com/sponsors/bkuhlmann",
|
17
17
|
"label" => "Refinements",
|
18
18
|
"rubygems_mfa_required" => "true",
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.
|
4
|
+
version: 10.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -10,25 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
+
|
27
|
-
|
28
|
-
|
29
|
-
|
13
|
+
MIIEZDCCAsygAwIBAgIBATANBgkqhkiG9w0BAQsFADA8MQwwCgYDVQQDDAN5b3Ux
|
14
|
+
FzAVBgoJkiaJk/IsZAEZFgdleGFtcGxlMRMwEQYKCZImiZPyLGQBGRYDY29tMB4X
|
15
|
+
DTIzMDMyMjE1NTAzNloXDTI1MDMyMTE1NTAzNlowPDEMMAoGA1UEAwwDeW91MRcw
|
16
|
+
FQYKCZImiZPyLGQBGRYHZXhhbXBsZTETMBEGCgmSJomT8ixkARkWA2NvbTCCAaIw
|
17
|
+
DQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAMD1xmCyBRDIgMr9h+bXYgckAJwj
|
18
|
+
EE8d49cWc4IgxXLEz7E/r3+DVWfbviErgQEjqZztso/5jormLpS2LC3VNjRXWdSN
|
19
|
+
3QoD51J3/OnAsW340sXTVvj5M9KD5ZkDo+QIoQO1Dp8QZKI5Ney8gTUxCj5857sX
|
20
|
+
XqWmBjgOK3lFnPOMWRtbVaBh7059eiCu3+LYhVgBgMgcTtYSCluHffzAVt9j8lAE
|
21
|
+
NwCxK8TSZqIQVBQOZg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4CamkVQmlULd2d2GKQHap
|
36
|
+
9xhcE6ZO5JU1gPGPIxJ383ce1NoNTP7e
|
30
37
|
-----END CERTIFICATE-----
|
31
|
-
date:
|
38
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
32
39
|
dependencies: []
|
33
40
|
description:
|
34
41
|
email:
|
@@ -57,13 +64,13 @@ files:
|
|
57
64
|
- lib/refinements/structs.rb
|
58
65
|
- lib/refinements/symbols.rb
|
59
66
|
- refinements.gemspec
|
60
|
-
homepage: https://
|
67
|
+
homepage: https://alchemists.io/projects/refinements
|
61
68
|
licenses:
|
62
69
|
- Hippocratic-2.1
|
63
70
|
metadata:
|
64
71
|
bug_tracker_uri: https://github.com/bkuhlmann/refinements/issues
|
65
|
-
changelog_uri: https://
|
66
|
-
documentation_uri: https://
|
72
|
+
changelog_uri: https://alchemists.io/projects/refinements/versions
|
73
|
+
documentation_uri: https://alchemists.io/projects/refinements
|
67
74
|
funding_uri: https://github.com/sponsors/bkuhlmann
|
68
75
|
label: Refinements
|
69
76
|
rubygems_mfa_required: 'true'
|
@@ -83,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
90
|
- !ruby/object:Gem::Version
|
84
91
|
version: '0'
|
85
92
|
requirements: []
|
86
|
-
rubygems_version: 3.
|
93
|
+
rubygems_version: 3.4.9
|
87
94
|
signing_key:
|
88
95
|
specification_version: 4
|
89
96
|
summary: A collection of refinements to core Ruby objects.
|
metadata.gz.sig
CHANGED
Binary file
|