refinements 12.4.0 → 12.5.0

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: c057c78518a7f1565f3f74b8e21cb5fc3296962d78c5a1d8fbc918190f38ade3
4
- data.tar.gz: 412c9e3dab2f66b7865a26514cf14049655d2192ff8a8d65b4b8ce284c8defb4
3
+ metadata.gz: 4820c08dee6ea3a2f4a521ebe6ee9cfd778879b35f997c1cb9a82c4c4f56eb67
4
+ data.tar.gz: 15b35014f7462130864f3b35c7aab5908bd2bef21b75d25be70ec456b5065e38
5
5
  SHA512:
6
- metadata.gz: 268fff03b14061cdd04cb211eca4cf6b6af4479efde7ad112a9ede05d72bf37971e3f5eb9044824c55aa4c6f7bc28e0a6aff714c6fe88cad23ea1328d46c83ae
7
- data.tar.gz: 598d5f3187a960438d2e5532b24f203023026a81f8ad9bb91d97af0ac5323779ca58e5f63e2c0916643e62c1e78e30d608da6dacf13bc46d3a6f061c4727603b
6
+ metadata.gz: 53b1fda6b7ca55389d305c8e99d5a095405d50490cefe246ea77a56ea0daee8f46237afa3bafced988ef65e3b6f4f095dbf9e038e9aaafe55fdc6e67288ed89c
7
+ data.tar.gz: 882417652e5925b6c9c8d1a24ed8f756dae15f6b5a65692e159ccc147fb686cf530ada3c5b93f33a98afc5a3ef852c7e9ef34db6d07680910ac7bfd93ca30ea8
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,4 @@
1
- aI� ���N�̙{t.~#�9�æaC��qs�ѧ�B~W s.��!%<8����� �����光n�/G��y�/h 8DjN��h���J���A��H��=&�:E>II'E����#�f77[�I0_��Q� �GZ ^?�l1/+�M@�� �2�c����Yc͵���4�C��Vfk,>�AE͏�)PD,�Z/Bsi^hT�?">��q'�}t='O@����ayEl�n)]<�!4�.�i��>�S���RH�X�@�G@�k����DD���۳y�5eA��<�����9��}����s���](j�Ń�zuD��`�4w'�*&��P���r`�Jx �_w�`���s\^K�d��K����{���Դ
2
- me�����e��
1
+ AϺ�������%����T7-{#}�;�� dY\b��������{)$�$@h4h��;O>�kGY��%�� R��
2
+ �٬���ou!�"7ͪ�)��6<�T�?ߠ=T��1JF%�W|�+9z�d(y6 ��e
3
+ c덺������,��Qg���|�23 )6l�dH�gE'^p�q&D����PUNז�˰h������N�m9vE���6P�B�izc^��1�s���V�P���j? ��5�4�R{�C�r����f�V>��C��L���Pm���1��%��7 JҤ3A� <d�;G���mw�]g�
4
+  ɕ���$��$���;K�SP>�>�pF�'�!����_�΅�V�J��8bD`��z�d��4Y
data/README.adoc CHANGED
@@ -1128,6 +1128,19 @@ Answers file name without extension.
1128
1128
  Pathname("example.txt").name # Pathname("example")
1129
1129
  ----
1130
1130
 
1131
+ ===== #puts
1132
+
1133
+ Wraps `#write` by writing content to file with new line and answering itself. Allows you to more easily swap out a `Pathname` object with similar IO objects who support `#puts`: `IO`, `StringIO`, `File`, `Kernel`, and so forth.
1134
+
1135
+ [source,ruby]
1136
+ ----
1137
+ path = Pathname("test.txt").touch
1138
+ path.puts "Test."
1139
+ path.read # "Test.\n"
1140
+
1141
+ Pathname("text.txt").touch.puts("Test.").read # "Test.\n"
1142
+ ----
1143
+
1131
1144
  ===== #relative_parent
1132
1145
 
1133
1146
  Answers relative path from parent directory. This complements: `#relative_path_from`.
@@ -78,6 +78,8 @@ module Refinements
78
78
 
79
79
  def name = basename extname
80
80
 
81
+ def puts(content) = write "#{content}\n"
82
+
81
83
  def relative_parent(root_dir) = relative_path_from(root_dir).parent
82
84
 
83
85
  def remove_dir = exist? ? (rmdir and self) : self
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 = "12.4.0"
5
+ spec.version = "12.5.0"
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
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: 12.4.0
4
+ version: 12.5.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-06-01 00:00:00.000000000 Z
38
+ date: 2024-06-22 00:00:00.000000000 Z
39
39
  dependencies: []
40
40
  description:
41
41
  email:
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubygems_version: 3.5.11
94
+ rubygems_version: 3.5.14
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: A collection of core object refinements.
metadata.gz.sig CHANGED
Binary file