refinements 7.13.0 → 7.17.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.tar.gz.sig +0 -0
- data/README.adoc +171 -47
- data/lib/refinements.rb +1 -0
- data/lib/refinements/arrays.rb +10 -0
- data/lib/refinements/hashes.rb +2 -2
- data/lib/refinements/identity.rb +1 -1
- data/lib/refinements/pathnames.rb +24 -3
- data/lib/refinements/structs.rb +16 -0
- metadata +5 -214
- 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: a24d8f2e7c34e994169a0c99ee15bfd30a8ed20d3aed61b567190d76c82cb23c
|
4
|
+
data.tar.gz: cbf64daa1b7e41296ccb4ed1dd3e288fa958fc7a1df64f5661464c5d350cea3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73e908dc60bb232b21f8a5a670a42d803d8a69cf74034be74a65885761868f139db5e61362c4de33d08f0541d2716880e3b20f6772ddb6445c1ff545459fffec
|
7
|
+
data.tar.gz: 3843e65221606fc7671e2bf8696086de50be0561b2cde91f7e3d6e5b5ebdf604f018f2cb6bf132723ef68fa7079cfcdbf7dbae070574fb6e5f3144629f0a967d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -28,6 +28,7 @@ Enhances the following objects:
|
|
28
28
|
* Pathname
|
29
29
|
* String
|
30
30
|
* StringIO
|
31
|
+
* Structs
|
31
32
|
|
32
33
|
== Requirements
|
33
34
|
|
@@ -75,6 +76,7 @@ require "refinements/ios"
|
|
75
76
|
require "refinements/pathnames"
|
76
77
|
require "refinements/strings"
|
77
78
|
require "refinements/string_ios"
|
79
|
+
require "refinements/structs"
|
78
80
|
----
|
79
81
|
|
80
82
|
=== Using
|
@@ -94,6 +96,7 @@ class Example
|
|
94
96
|
using Refinements::Pathnames
|
95
97
|
using Refinements::Strings
|
96
98
|
using Refinements::StringIOs
|
99
|
+
using Refinements::Structs
|
97
100
|
end
|
98
101
|
----
|
99
102
|
|
@@ -125,24 +128,24 @@ example.compress! # => ["An", "Example"]
|
|
125
128
|
example # => ["An", "Example"]
|
126
129
|
----
|
127
130
|
|
128
|
-
===== #
|
131
|
+
===== #excluding
|
129
132
|
|
130
133
|
Removes given array or elements without mutating itself.
|
131
134
|
|
132
135
|
[source,ruby]
|
133
136
|
----
|
134
|
-
[1, 2, 3, 4, 5].
|
135
|
-
[1, 2, 3, 4, 5].
|
137
|
+
[1, 2, 3, 4, 5].excluding [4, 5] # => [1, 2, 3]
|
138
|
+
[1, 2, 3, 4, 5].excluding 4, 5 # => [1, 2, 3]
|
136
139
|
----
|
137
140
|
|
138
|
-
===== #
|
141
|
+
===== #including
|
139
142
|
|
140
143
|
Adds given array or elements without mutating itself.
|
141
144
|
|
142
145
|
[source,ruby]
|
143
146
|
----
|
144
|
-
[1, 2, 3].
|
145
|
-
[1, 2, 3].
|
147
|
+
[1, 2, 3].including [4, 5] # => [1, 2, 3, 4, 5]
|
148
|
+
[1, 2, 3].including 4, 5 # => [1, 2, 3, 4, 5]
|
146
149
|
----
|
147
150
|
|
148
151
|
===== #intersperse
|
@@ -237,10 +240,10 @@ Answers new hash where every top-level missing key has the same default value.
|
|
237
240
|
[source,ruby]
|
238
241
|
----
|
239
242
|
example = Hash.with_default ""
|
240
|
-
example[:a]
|
243
|
+
example[:a] # => ""
|
241
244
|
|
242
245
|
example = Hash.with_default []
|
243
|
-
example[:b]
|
246
|
+
example[:b] # => []
|
244
247
|
----
|
245
248
|
|
246
249
|
===== #deep_merge
|
@@ -468,7 +471,7 @@ Passes each hash value as a block argument for further processing.
|
|
468
471
|
[source,ruby]
|
469
472
|
----
|
470
473
|
example = {unit: "221B", street: "Baker Street", city: "London", country: "UK"}
|
471
|
-
example.use { |unit, street| "#{unit} #{street}" }
|
474
|
+
example.use { |unit, street| "#{unit} #{street}" } # => "221B Baker Street"
|
472
475
|
----
|
473
476
|
|
474
477
|
==== IO
|
@@ -481,11 +484,8 @@ block, you'll need to close the stream manually.
|
|
481
484
|
|
482
485
|
[source,ruby]
|
483
486
|
----
|
484
|
-
io = IO.void
|
485
|
-
io.
|
486
|
-
|
487
|
-
io = IO.void { |void| void.write "nevermore" }
|
488
|
-
io.closed? # => true
|
487
|
+
io = IO.void # => #<IO:fd 20>
|
488
|
+
io = IO.void { |void| void.write "nevermore" } # => #<IO:(closed)>
|
489
489
|
----
|
490
490
|
|
491
491
|
===== #redirect
|
@@ -498,11 +498,8 @@ answered instead.
|
|
498
498
|
io = IO.new IO.sysopen(Pathname("test.txt").to_s, "w+")
|
499
499
|
other = IO.new IO.sysopen(Pathname("other.txt").to_s, "w+")
|
500
500
|
|
501
|
-
io.redirect other
|
502
|
-
|
503
|
-
io.redirect(other) { |stream| stream.write "test" }
|
504
|
-
.close # => ""
|
505
|
-
other.close # => "test"
|
501
|
+
io.redirect other # => #<IO:fd 20>
|
502
|
+
io.redirect(other) { |stream| stream.write "test" } # => #<IO:fd 21>
|
506
503
|
----
|
507
504
|
|
508
505
|
===== #reread
|
@@ -518,40 +515,110 @@ io.reread # => "This is a test."
|
|
518
515
|
io.reread 4 # => "This"
|
519
516
|
|
520
517
|
buffer = "".dup
|
521
|
-
io.reread(buffer: buffer)
|
522
|
-
buffer
|
518
|
+
io.reread(buffer: buffer) # => "This is a test."
|
519
|
+
buffer # => "This is a test."
|
523
520
|
----
|
524
521
|
|
525
522
|
===== #squelch
|
526
523
|
|
527
|
-
Temporarily ignores any reads/writes for
|
528
|
-
|
524
|
+
Temporarily ignores any reads/writes for code executed within a block. Answers itself without any
|
525
|
+
arguments or when given a block.
|
529
526
|
|
530
527
|
[source,ruby]
|
531
528
|
----
|
532
529
|
io = IO.new IO.sysopen(Pathname("test.txt").to_s, "w+")
|
533
|
-
io.squelch
|
534
|
-
io.
|
530
|
+
io.squelch # => #<IO:fd 20>
|
531
|
+
io.squelch { io.write "Test" } # => #<IO:fd 20>
|
532
|
+
io.reread # => ""
|
535
533
|
----
|
536
534
|
|
537
535
|
==== Pathname
|
538
536
|
|
539
537
|
===== Pathname
|
540
538
|
|
541
|
-
Enhances the
|
542
|
-
|
543
|
-
|
544
|
-
|
539
|
+
Enhances the `Kernel` conversion function which casts `nil` into a pathname in order to avoid:
|
540
|
+
`TypeError (no implicit conversion of nil into String)`. The pathname remains invalid but at least
|
541
|
+
you have an instance of `Pathname`, which behaves like a _Null Object_, that can be used to
|
542
|
+
construct a valid path.
|
545
543
|
|
546
544
|
[source,ruby]
|
547
545
|
----
|
548
546
|
Pathname(nil) # => Pathname("")
|
549
547
|
----
|
550
548
|
|
549
|
+
===== .home
|
550
|
+
|
551
|
+
Answers user home directory.
|
552
|
+
|
553
|
+
[source,ruby]
|
554
|
+
----
|
555
|
+
Pathname.home # => Pathname "/Users/bkuhlmann"
|
556
|
+
----
|
557
|
+
|
558
|
+
===== .make_temp_dir
|
559
|
+
|
560
|
+
Wraps `Dir.mktmpdir` with the following behavior (see
|
561
|
+
link:https://rubyapi.org/o/Dir.mktmpdir#method-c-mktmpdir[Dir.mktmpdir] for details):
|
562
|
+
|
563
|
+
* *Without Block* - Answers a newly created Pathname instance which is not automatically cleaned up.
|
564
|
+
* *With Block* Yields a Pathname instance, answers result of given block, and automatidally cleans
|
565
|
+
up temporary directory after block exits.
|
566
|
+
|
567
|
+
The following examples use truncated temporary directories for illustration purposes only. In
|
568
|
+
reality, these paths will be longer depending on which operating system you are using.
|
569
|
+
|
570
|
+
[source,ruby]
|
571
|
+
----
|
572
|
+
Pathname.make_temp_dir # => Pathname:/var/folders/T/temp-20200101-16940-r8
|
573
|
+
Pathname.make_temp_dir prefix: "prefix-" # => Pathname:/var/folders/T/prefix-20200101-16940-r8
|
574
|
+
Pathname.make_temp_dir suffix: "-suffix" # => Pathname:/var/folders/T/temp-20200101-16940-r8-suffix
|
575
|
+
Pathname.make_temp_dir prefix: "prefix-", suffix: "-suffix" # => Pathname:/var/folders/T/prefix-20200101-16940-r8-suffix
|
576
|
+
Pathname.make_temp_dir root: "/example" # => Pathname:/example/temp-20200101-16940-r8
|
577
|
+
Pathname.make_temp_dir { "I am a block result" } # => "I am a block result"
|
578
|
+
Pathname.make_temp_dir { |path| path.join "sub_dir" } # => Pathname:/var/folders/T/temp-20200101-16940-r8/sub_dir
|
579
|
+
----
|
580
|
+
|
581
|
+
===== .require_tree
|
582
|
+
|
583
|
+
Requires all files in given root path and corresponding nested tree structure. All files are sorted
|
584
|
+
before being required to ensure consistent behavior. Example:
|
585
|
+
|
586
|
+
[source,ruby]
|
587
|
+
----
|
588
|
+
# Before
|
589
|
+
Dir[File.join(__dir__, "support/shared_contexts/**/*.rb")].sort.each { |path| require path }
|
590
|
+
|
591
|
+
# After
|
592
|
+
Pathname.require_tree __dir__, "support/shared_contexts/**/*.rb"
|
593
|
+
----
|
594
|
+
|
595
|
+
The following are further examples of potential usage:
|
596
|
+
|
597
|
+
[source,ruby]
|
598
|
+
----
|
599
|
+
# Requires all files in root directory and below.
|
600
|
+
Pathname.require_tree __dir__
|
601
|
+
|
602
|
+
# Requires all files in `/test/**/*.rb` and below.
|
603
|
+
Pathname.require_tree "/test"
|
604
|
+
|
605
|
+
# Requires all files in RSpec shared examples directory structure.
|
606
|
+
Pathname.require_tree Bundler.root.join("spec"), "support/shared_examples/**/*.rb"
|
607
|
+
----
|
608
|
+
|
609
|
+
===== .root
|
610
|
+
|
611
|
+
Answers operating system root path.
|
612
|
+
|
613
|
+
[source,ruby]
|
614
|
+
----
|
615
|
+
Pathname.root # => Pathname "/"
|
616
|
+
----
|
617
|
+
|
551
618
|
===== #change_dir
|
552
619
|
|
553
|
-
|
554
|
-
link:https://rubyapi.org/
|
620
|
+
Wraps `Dir.chdir` behavior by changing to directory of current path. See
|
621
|
+
link:https://rubyapi.org/o/Dir.chdir#method-c-chdir[Dir.chdir] for details.
|
555
622
|
|
556
623
|
[source,ruby]
|
557
624
|
----
|
@@ -559,23 +626,23 @@ Pathname.pwd # => "/"
|
|
559
626
|
Pathname("/test").make_dir.change_dir # => Pathname "/test"
|
560
627
|
Pathname.pwd # => "/test"
|
561
628
|
|
562
|
-
Pathname.pwd
|
563
|
-
Pathname("/test").make_dir.change_dir {
|
564
|
-
Pathname.pwd
|
629
|
+
Pathname.pwd # => "/"
|
630
|
+
Pathname("/test").make_dir.change_dir { "example" } # => "example"
|
631
|
+
Pathname.pwd # => "/"
|
565
632
|
----
|
566
633
|
|
567
634
|
===== #copy
|
568
635
|
|
569
|
-
Copies file from current location to new location.
|
636
|
+
Copies file from current location to new location while answering itself so it can be chained.
|
570
637
|
|
571
638
|
[source,ruby]
|
572
639
|
----
|
573
|
-
Pathname("input.txt").copy Pathname("output.txt")
|
640
|
+
Pathname("input.txt").copy Pathname("output.txt") # => Pathname("input.txt")
|
574
641
|
----
|
575
642
|
|
576
643
|
===== #directories
|
577
644
|
|
578
|
-
Answers all or filtered directories for current path.
|
645
|
+
Answers all directories or filtered directories for current path.
|
579
646
|
|
580
647
|
[source,ruby]
|
581
648
|
----
|
@@ -590,12 +657,12 @@ Answers file extensions as an array.
|
|
590
657
|
|
591
658
|
[source,ruby]
|
592
659
|
----
|
593
|
-
Pathname("example.txt.erb").extensions
|
660
|
+
Pathname("example.txt.erb").extensions # => [".txt", ".erb"]
|
594
661
|
----
|
595
662
|
|
596
663
|
===== #files
|
597
664
|
|
598
|
-
Answers all or filtered files for current path.
|
665
|
+
Answers all files or filtered files for current path.
|
599
666
|
|
600
667
|
[source,ruby]
|
601
668
|
----
|
@@ -623,9 +690,9 @@ Ensures all ancestor directories are created for a path.
|
|
623
690
|
|
624
691
|
[source,ruby]
|
625
692
|
----
|
626
|
-
Pathname("/one/two").make_ancestors
|
627
|
-
Pathname("/one").exist?
|
628
|
-
Pathname("/one/two").exist?
|
693
|
+
Pathname("/one/two").make_ancestors # => Pathname("/one/two")
|
694
|
+
Pathname("/one").exist? # => true
|
695
|
+
Pathname("/one/two").exist? # => false
|
629
696
|
----
|
630
697
|
|
631
698
|
===== #make_dir
|
@@ -708,7 +775,8 @@ immediate writing back to the same file.
|
|
708
775
|
|
709
776
|
[source,ruby]
|
710
777
|
----
|
711
|
-
Pathname("/test.txt").rewrite
|
778
|
+
Pathname("/test.txt").rewrite # => Pathname("/test.txt")
|
779
|
+
Pathname("/test.txt").rewrite { |body| body.sub "[token]", "example" } # => Pathname("/test.txt")
|
712
780
|
----
|
713
781
|
|
714
782
|
===== #touch
|
@@ -717,8 +785,20 @@ Updates access and modification times for path. Defaults to current time.
|
|
717
785
|
|
718
786
|
[source,ruby]
|
719
787
|
----
|
720
|
-
Pathname("example.txt").touch
|
721
|
-
Pathname("example.txt").touch at: Time.now - 1
|
788
|
+
Pathname("example.txt").touch # => Pathname("example.txt")
|
789
|
+
Pathname("example.txt").touch at: Time.now - 1 # => Pathname("example.txt")
|
790
|
+
----
|
791
|
+
|
792
|
+
===== #write
|
793
|
+
|
794
|
+
Writes to file and answers itself so it can be chained. See `IO.write` for details on additional
|
795
|
+
options.
|
796
|
+
|
797
|
+
[source,ruby]
|
798
|
+
----
|
799
|
+
Pathname("example.txt").write "test" # => Pathname("example.txt")
|
800
|
+
Pathname("example.txt").write "test", offset: 1 # => Pathname("example.txt")
|
801
|
+
Pathname("example.txt").write "test", mode: "a" # => Pathname("example.txt")
|
722
802
|
----
|
723
803
|
|
724
804
|
==== String
|
@@ -838,8 +918,52 @@ io.reread # => "This is a test."
|
|
838
918
|
io.reread 4 # => "This"
|
839
919
|
|
840
920
|
buffer = "".dup
|
841
|
-
io.reread(buffer: buffer)
|
842
|
-
buffer
|
921
|
+
io.reread(buffer: buffer) # => "This is a test."
|
922
|
+
buffer # => "This is a test."
|
923
|
+
----
|
924
|
+
|
925
|
+
==== Struct
|
926
|
+
|
927
|
+
===== #merge
|
928
|
+
|
929
|
+
Merges multiple attributes without mutating itself.
|
930
|
+
|
931
|
+
[source,ruby]
|
932
|
+
----
|
933
|
+
Example = Struct.new :a, :b, :c
|
934
|
+
example = Example[1, 2, 3]
|
935
|
+
example.merge a: 10 # => #<struct a=10, b=2, c=3>
|
936
|
+
example.merge a: 10, c: 30 # => #<struct a=10, b=2, c=30>
|
937
|
+
example.merge a: 10, b: 20, c: 30 # => #<struct a=10, b=20, c=30>
|
938
|
+
example # => #<struct a=1, b=2, c=3>
|
939
|
+
|
940
|
+
Example = Struct.new :a, :b, :c, keyword_init: true
|
941
|
+
example = Example[a: 1, b: 2, c: 3]
|
942
|
+
example.merge a: 10 # => #<struct a=10, b=2, c=3>
|
943
|
+
example.merge a: 10, c: 30 # => #<struct a=10, b=2, c=30>
|
944
|
+
example.merge a: 10, b: 20, c: 30 # => #<struct a=10, b=20, c=30>
|
945
|
+
example # => #<struct a=1, b=2, c=3>
|
946
|
+
----
|
947
|
+
|
948
|
+
===== #merge!
|
949
|
+
|
950
|
+
Merges multiple attributes while mutating itself.
|
951
|
+
|
952
|
+
[source,ruby]
|
953
|
+
----
|
954
|
+
Example = Struct.new :a, :b, :c
|
955
|
+
example = Example[1, 2, 3]
|
956
|
+
example.merge! a: 10 # => #<struct a=10, b=2, c=3>
|
957
|
+
example.merge! a: 10, c: 30 # => #<struct a=10, b=2, c=30>
|
958
|
+
example.merge! a: 10, b: 20, c: 30 # => #<struct a=10, b=20, c=30>
|
959
|
+
example # => #<struct a=10, b=20, c=30>
|
960
|
+
|
961
|
+
Example = Struct.new :a, :b, :c, keyword_init: true
|
962
|
+
example = Example[a: 1, b: 2, c: 3]
|
963
|
+
example.merge! a: 10 # => #<struct a=10, b=2, c=3>
|
964
|
+
example.merge! a: 10, c: 30 # => #<struct a=10, b=2, c=30>
|
965
|
+
example.merge! a: 10, b: 20, c: 30 # => #<struct a=10, b=20, c=30>
|
966
|
+
example # => #<struct a=10, b=20, c=30>
|
843
967
|
----
|
844
968
|
|
845
969
|
== Development
|
data/lib/refinements.rb
CHANGED
data/lib/refinements/arrays.rb
CHANGED
@@ -12,10 +12,20 @@ module Refinements
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def exclude *elements
|
15
|
+
warn "[DEPRECATION]: #exclude is deprecated, use #excluding instead."
|
16
|
+
excluding(*elements)
|
17
|
+
end
|
18
|
+
|
19
|
+
def excluding *elements
|
15
20
|
self - elements.flatten
|
16
21
|
end
|
17
22
|
|
18
23
|
def include *elements
|
24
|
+
warn "[DEPRECATION]: #include is deprecated, use #including instead."
|
25
|
+
including(*elements)
|
26
|
+
end
|
27
|
+
|
28
|
+
def including *elements
|
19
29
|
self + elements.flatten
|
20
30
|
end
|
21
31
|
|
data/lib/refinements/hashes.rb
CHANGED
@@ -73,7 +73,7 @@ module Refinements
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def recurse &block
|
76
|
-
return self unless
|
76
|
+
return self unless block
|
77
77
|
|
78
78
|
transform = yield self
|
79
79
|
|
@@ -119,7 +119,7 @@ module Refinements
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def use &block
|
122
|
-
return [] unless
|
122
|
+
return [] unless block
|
123
123
|
|
124
124
|
block.parameters
|
125
125
|
.map { |(_type, key)| self[key] }
|
data/lib/refinements/identity.rb
CHANGED
@@ -12,10 +12,27 @@ module Refinements
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
+
refine Pathname.singleton_class do
|
16
|
+
def home
|
17
|
+
new ENV["HOME"]
|
18
|
+
end
|
19
|
+
|
20
|
+
def make_temp_dir prefix: "temp-", suffix: nil, root: nil
|
21
|
+
Dir.mktmpdir([prefix, suffix], root) { |path| block_given? ? yield(new path) : new(path) }
|
22
|
+
end
|
23
|
+
|
24
|
+
def require_tree root, pattern = "**/*.rb"
|
25
|
+
new(root).files(pattern).each { |path| require path.to_s }
|
26
|
+
end
|
27
|
+
|
28
|
+
def root
|
29
|
+
new "/"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
15
33
|
refine Pathname do
|
16
34
|
def change_dir &block
|
17
|
-
Dir.chdir(self, &block)
|
18
|
-
self
|
35
|
+
block ? Dir.chdir(self, &block) : (Dir.chdir self and self)
|
19
36
|
end
|
20
37
|
|
21
38
|
def copy to
|
@@ -83,13 +100,17 @@ module Refinements
|
|
83
100
|
|
84
101
|
def rewrite
|
85
102
|
read.then { |content| write yield(content) if block_given? }
|
86
|
-
self
|
87
103
|
end
|
88
104
|
|
89
105
|
def touch at: Time.now
|
90
106
|
exist? ? utime(at, at) : write("")
|
91
107
|
self
|
92
108
|
end
|
109
|
+
|
110
|
+
def write content, offset: nil, **options
|
111
|
+
super content, offset, **options
|
112
|
+
self
|
113
|
+
end
|
93
114
|
end
|
94
115
|
end
|
95
116
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Refinements
|
4
|
+
module Structs
|
5
|
+
refine Struct do
|
6
|
+
def merge **attributes
|
7
|
+
dup.merge! attributes
|
8
|
+
end
|
9
|
+
|
10
|
+
def merge! **attributes
|
11
|
+
to_h.merge(attributes).each { |key, value| self[key] = value }
|
12
|
+
self
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
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: 7.
|
4
|
+
version: 7.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -28,218 +28,8 @@ cert_chain:
|
|
28
28
|
2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
|
29
29
|
QWc=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2020-
|
32
|
-
dependencies:
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: bundler-audit
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '0.6'
|
40
|
-
type: :development
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - "~>"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '0.6'
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: bundler-leak
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0.2'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '0.2'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: gemsmith
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '14.2'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '14.2'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: git-lint
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '1.0'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '1.0'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: guard-rspec
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - "~>"
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '4.7'
|
96
|
-
type: :development
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - "~>"
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '4.7'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: pry
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0.13'
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '0.13'
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: pry-byebug
|
119
|
-
requirement: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - "~>"
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '3.9'
|
124
|
-
type: :development
|
125
|
-
prerelease: false
|
126
|
-
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - "~>"
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '3.9'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: rake
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - "~>"
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '13.0'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - "~>"
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '13.0'
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: reek
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - "~>"
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '6.0'
|
152
|
-
type: :development
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - "~>"
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '6.0'
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: rspec
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - "~>"
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '3.9'
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - "~>"
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '3.9'
|
173
|
-
- !ruby/object:Gem::Dependency
|
174
|
-
name: rubocop
|
175
|
-
requirement: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - "~>"
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: '0.89'
|
180
|
-
type: :development
|
181
|
-
prerelease: false
|
182
|
-
version_requirements: !ruby/object:Gem::Requirement
|
183
|
-
requirements:
|
184
|
-
- - "~>"
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: '0.89'
|
187
|
-
- !ruby/object:Gem::Dependency
|
188
|
-
name: rubocop-performance
|
189
|
-
requirement: !ruby/object:Gem::Requirement
|
190
|
-
requirements:
|
191
|
-
- - "~>"
|
192
|
-
- !ruby/object:Gem::Version
|
193
|
-
version: '1.5'
|
194
|
-
type: :development
|
195
|
-
prerelease: false
|
196
|
-
version_requirements: !ruby/object:Gem::Requirement
|
197
|
-
requirements:
|
198
|
-
- - "~>"
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
version: '1.5'
|
201
|
-
- !ruby/object:Gem::Dependency
|
202
|
-
name: rubocop-rake
|
203
|
-
requirement: !ruby/object:Gem::Requirement
|
204
|
-
requirements:
|
205
|
-
- - "~>"
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
version: '0.5'
|
208
|
-
type: :development
|
209
|
-
prerelease: false
|
210
|
-
version_requirements: !ruby/object:Gem::Requirement
|
211
|
-
requirements:
|
212
|
-
- - "~>"
|
213
|
-
- !ruby/object:Gem::Version
|
214
|
-
version: '0.5'
|
215
|
-
- !ruby/object:Gem::Dependency
|
216
|
-
name: rubocop-rspec
|
217
|
-
requirement: !ruby/object:Gem::Requirement
|
218
|
-
requirements:
|
219
|
-
- - "~>"
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '1.39'
|
222
|
-
type: :development
|
223
|
-
prerelease: false
|
224
|
-
version_requirements: !ruby/object:Gem::Requirement
|
225
|
-
requirements:
|
226
|
-
- - "~>"
|
227
|
-
- !ruby/object:Gem::Version
|
228
|
-
version: '1.39'
|
229
|
-
- !ruby/object:Gem::Dependency
|
230
|
-
name: simplecov
|
231
|
-
requirement: !ruby/object:Gem::Requirement
|
232
|
-
requirements:
|
233
|
-
- - "~>"
|
234
|
-
- !ruby/object:Gem::Version
|
235
|
-
version: '0.19'
|
236
|
-
type: :development
|
237
|
-
prerelease: false
|
238
|
-
version_requirements: !ruby/object:Gem::Requirement
|
239
|
-
requirements:
|
240
|
-
- - "~>"
|
241
|
-
- !ruby/object:Gem::Version
|
242
|
-
version: '0.19'
|
31
|
+
date: 2020-12-13 00:00:00.000000000 Z
|
32
|
+
dependencies: []
|
243
33
|
description:
|
244
34
|
email:
|
245
35
|
- brooke@alchemists.io
|
@@ -262,6 +52,7 @@ files:
|
|
262
52
|
- lib/refinements/pathnames.rb
|
263
53
|
- lib/refinements/string_ios.rb
|
264
54
|
- lib/refinements/strings.rb
|
55
|
+
- lib/refinements/structs.rb
|
265
56
|
homepage: https://www.alchemists.io/projects/refinements
|
266
57
|
licenses:
|
267
58
|
- Apache-2.0
|
@@ -285,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
76
|
- !ruby/object:Gem::Version
|
286
77
|
version: '0'
|
287
78
|
requirements: []
|
288
|
-
rubygems_version: 3.
|
79
|
+
rubygems_version: 3.2.0
|
289
80
|
signing_key:
|
290
81
|
specification_version: 4
|
291
82
|
summary: A collection of refinements to core Ruby objects.
|
metadata.gz.sig
CHANGED
Binary file
|