refinements 11.0.0 → 11.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 252744b620f3c79a0c38b635157f62fc9e48527701145e871de885c547b44b61
4
- data.tar.gz: 411b88c5cf6b9b95c59c43055b8a2402c95d9954b612837fce70a106c4c4a5f1
3
+ metadata.gz: efdcd2042bcfde5031fad3d0049e01fc4e1ad23a9d4841ee601fdcb02a96d3af
4
+ data.tar.gz: 55fac5447439c53705870a9409268e96aaf633e7a420f9d4678257f9b68f078d
5
5
  SHA512:
6
- metadata.gz: 0c12fb201556e5949190657cd591b126115ba7efb9f14aec4aeb107455d7cd04676b0dd1cc05f84e9bdd8b7c61e2fbadbabe377b739ffd14a643c3d98d717068
7
- data.tar.gz: db75e0359afed8603daba0bae481b8e839b9d9ede700ef22bbcde22116e2a75b221b5d56d0381500ccf992f73c11cb7a4555823c4294b131077972800a03f3c1
6
+ metadata.gz: 81949b0fb95b4aca53d6fd88f51d8cb4f0c8738bbb3eac83816880ff6b479ac86228847dd6660d8a99a861c5e3aee6e6985a0628764af037b328db55422cc7fb
7
+ data.tar.gz: 6b40c6be0c5cc6304366fe60c8df54bca9e3ab366338f45308b2267f9a81f6adb123002740feb933af3313a0349a9a5035c39525c0b90d48f875842fefd0c3cf
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -289,7 +289,7 @@ array = [{name: "a", label: "A"}, {name: "b", label: "B"}, {name: "c", label: "C
289
289
  array.pick :name # "a"
290
290
  array.pick :name, :label # ["a", "A"]
291
291
  array.pick # nil
292
- [].pick(:test) # nil
292
+ [].pick(:other) # nil
293
293
  ----
294
294
 
295
295
  ===== #pluck
@@ -303,7 +303,7 @@ array = [{name: "a", label: "A"}, {name: "b", label: "B"}, {name: "c", label: "C
303
303
  array.pluck :name # ["a", "b", "c"]
304
304
  array.pluck :name, :label # [["a", "A"], ["b", "B"], ["c", "C"]]
305
305
  array.pluck # []
306
- [].pluck :test # []
306
+ [].pluck :other # []
307
307
  ----
308
308
 
309
309
  ===== #replace_at
@@ -365,25 +365,25 @@ Useful when building documentation, answering human readable error messages, etc
365
365
  [source,ruby]
366
366
  ----
367
367
  [].to_sentence # ""
368
- ["test"].to_sentence # "test"
368
+ ["demo"].to_sentence # "demo"
369
369
  ["a", :b].to_sentence # "a and b"
370
- [1, "a", :b, 2.0, /\w+/].map(&:inspect).to_sentence # 1, "a", :b, 2.0, and /\w+/
370
+ [1, "a", :b, 2.0, /\w+/].to_sentence # "1, a, b, 2.0, and (?-mix:\\w+)"
371
371
  %w[one two three].to_sentence # "one, two, and three"
372
372
  %w[eins zwei drei].to_sentence "und", delimiter: " " # "eins zwei und drei"
373
373
  ----
374
374
 
375
375
  ===== #to_usage
376
376
 
377
- Builds upon and enhances `#to_sentence` further by answering a sentence which all elements are inspected -- where each element of the array is called with `#inspect` -- before turned into a sentence using `"and"` as the default conjunction and `", "` as the default delimiter. This is useful when providing detailed error messages _and_ you need to show the element types used.
377
+ Builds upon and enhances `#to_sentence` further by answering a sentence which all elements are inspected -- where each element of the array is called with `#inspect` -- before turned into a sentence using `"and"` as the default conjunction and `", "` as the default delimiter. This is useful when providing detailed error messages _and_ you need to detail the types of element used.
378
378
 
379
379
  [source,ruby]
380
380
  ----
381
381
  [].to_usage # ""
382
- ["test"].to_usage # "test"
383
- ["a", :b].to_usage # "a and b"
384
- [1, "a", :b, 2.0, /\w+/].map(&:inspect).to_usage # 1, "a", :b, 2.0, and /\w+/
385
- %w[one two three].to_usage # "one, two, and three"
386
- %w[eins zwei drei].to_usage "und", delimiter: " " # "eins zwei und drei"
382
+ ["demo"].to_usage # "\"demo\""
383
+ ["a", :b].to_usage # "\"a\" and :b"
384
+ [1, "a", :b, 2.0, /\w+/].to_usage # "1, \"a\", :b, 2.0, and /\\w+/"
385
+ %w[one two three].to_usage # "\"one\", \"two\", and \"three\""
386
+ %w[eins zwei drei].to_usage "und", delimiter: " " # "\"eins\" \"zwei\" und \"drei\""
387
387
  ----
388
388
 
389
389
  ==== Big Decimal
@@ -540,12 +540,12 @@ expression `example.fetch(:desired_key) || "default_value"`.
540
540
 
541
541
  [source,ruby]
542
542
  ----
543
- {a: "test"}.fetch_value :a, "default" # "test"
544
- {a: "test"}.fetch_value :a # "test"
543
+ {a: "demo"}.fetch_value :a, "default" # "demo"
544
+ {a: "demo"}.fetch_value :a # "demo"
545
545
  {a: nil}.fetch_value :a, "default" # "default"
546
546
  {}.fetch_value(:a) { "default" } # "default"
547
547
  {}.fetch_value :a # KeyError
548
- {a: "test"}.fetch_value # ArgumentError
548
+ {a: "demo"}.fetch_value # ArgumentError
549
549
  ----
550
550
 
551
551
  ===== #flatten_keys
@@ -555,7 +555,7 @@ though.
555
555
 
556
556
  [source,ruby]
557
557
  ----
558
- {a: {b: 1}}.flatten_keys prefix: :test # {test_a_b: 1}
558
+ {a: {b: 1}}.flatten_keys prefix: :demo # {demo_a_b: 1}
559
559
  {a: {b: 1}}.flatten_keys delimiter: :| # {:"a|b" => 1}
560
560
 
561
561
  example = {a: {b: 1}}
@@ -570,7 +570,7 @@ though.
570
570
 
571
571
  [source,ruby]
572
572
  ----
573
- {a: {b: 1}}.flatten_keys! prefix: :test # {test_a_b: 1}
573
+ {a: {b: 1}}.flatten_keys! prefix: :demo # {demo_a_b: 1}
574
574
  {a: {b: 1}}.flatten_keys! delimiter: :| # {:"a|b" => 1}
575
575
 
576
576
  example = {a: {b: 1}}
@@ -735,11 +735,11 @@ answered instead.
735
735
 
736
736
  [source,ruby]
737
737
  ----
738
- io = IO.new IO.sysopen(Pathname("test.txt").to_s, "w+")
738
+ io = IO.new IO.sysopen(Pathname("demo.txt").to_s, "w+")
739
739
  other = IO.new IO.sysopen(Pathname("other.txt").to_s, "w+")
740
740
 
741
741
  io.redirect other # "#<IO:fd 20>"
742
- io.redirect(other) { |stream| stream.write "test" } # "#<IO:fd 21>"
742
+ io.redirect(other) { |stream| stream.write "demo" } # "#<IO:fd 21>"
743
743
  ----
744
744
 
745
745
  ===== #reread
@@ -748,15 +748,15 @@ Answers full stream by rewinding to beginning of stream and reading all content.
748
748
 
749
749
  [source,ruby]
750
750
  ----
751
- io = IO.new IO.sysopen(Pathname("test.txt").to_s, "w+")
752
- io.write "This is a test."
751
+ io = IO.new IO.sysopen(Pathname("demo.txt").to_s, "w+")
752
+ io.write "This is a demo."
753
753
 
754
- io.reread # "This is a test."
754
+ io.reread # "This is a demo."
755
755
  io.reread 4 # "This"
756
756
 
757
757
  buffer = "".dup
758
- io.reread(buffer: buffer) # "This is a test."
759
- buffer # "This is a test."
758
+ io.reread(buffer: buffer) # "This is a demo."
759
+ buffer # "This is a demo."
760
760
  ----
761
761
 
762
762
  ===== #squelch
data/refinements.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "refinements"
5
- spec.version = "11.0.0"
5
+ spec.version = "11.0.1"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/refinements"
data.tar.gz.sig CHANGED
@@ -1,3 +1,3 @@
1
- ��ã?_���۶5Πu#=��i;��w �7�����K׮<�`I����0������$*)JvKƩ p|#��2��Zd��2�Tlӆ�H��*�#ݠ�m�B�&�+��V Jx��;Zo��N
2
- 'j|�6L�dSF��A}���SJQJ���U�ӻ�q��UB�ʕ-��Z{]�q���?0�HG��ʕ#�T���t�y��ޙB7�ѻ���oہo 9`��c��
3
- ']fPE����
1
+ s'()���!��q0������z\�.��ئ����Iu#|���~��$ߕ���
2
+ �=�4���6�$b��r>��*��
3
+ f���u*��Z��>u7�Ğ�ɍ��+z~x�6 J��-<��1��ƋFԱV
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: 11.0.0
4
+ version: 11.0.1
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: 2023-06-13 00:00:00.000000000 Z
38
+ date: 2023-06-19 00:00:00.000000000 Z
39
39
  dependencies: []
40
40
  description:
41
41
  email:
metadata.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- B���04�jnh���!x������L4���hg9I5-�V l9rc�7�րkz�Z/�J��K〞wnv�i�sͬ��i�I8t��}��T���ɣ���D�S�,��[9⤳��N��_Ѷ�~�_Q��8uyI���d\�F]�l}Lr����h�
2
- q��g�w=�!����F@2�N��h_7��&m��� ��V��Y��;�_n�^q5)'�/ǝXojB#K༾ƤE2���:;PxH~�k���RO���
1
+ #�],�Gi�ָ7G��ͣDw�>�' ���1D4z���+Ph(Y��&i�?���[N)��3��b Gca0��OW��g+gV܈9e⍋dD��uG��y��"ʥ��OBkl�a2m z���˗���Qx�
2
+ _8��� ��&�e�������KiEYm�ꏪgH[��?��I� a��üw�h!P��Nx{�bo��qk]+8��}���֎)4�>���o�̂K�*�"���en�T��Q�e�W!2��C�~�zt+���� o.(o���+�en:����T�