hanami-utils 2.0.0.alpha1 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d4523d52299280469a80451592c55d5771aeaf8e0f93644291f5e9d7a66237a
4
- data.tar.gz: 27c144da73fcbd992b4fefdddb9dc1b5be1e58b5abff3fd4078c67f8ec561d43
3
+ metadata.gz: 2575ff2a640a9ffcddf8a9930a887d536ec9da4b64bc4a2883849ed261f57b43
4
+ data.tar.gz: 70fbfe55f826d940c0f5decad39840990925e061de975e53d2b672fdae9873df
5
5
  SHA512:
6
- metadata.gz: e0e48686597a78927e05bff5da29e0ba0db65f8a03796b36046bb6f84cf35bf964662a87a73bad88bca47096b2b51e737bee0b0545f7341cbbd3579c4e74d4bf
7
- data.tar.gz: ebf2deed3ccf571a88ffd151d544254d483f65f26c5bf027c78cbe31220b22afc6b0c9f5b7a6223dd685c553b41fb80c2fe4a7b2a3629d4ab1cdfc5f9293e038
6
+ metadata.gz: 73d5a9fade1cb961ac4be22b8967507fceebde1a9d8edb33d71634b06ef6c06538c8d0ef2b1a32a33e8442c7609b675ae99bd63780c353c6db02485ddbfd3432
7
+ data.tar.gz: 368ffe941852e67432d9574b79220b1807b1529cbdf4289fb2fd2db92299888617bc3779bd6e0c3f03b81d5fbcb9725b8b36364733d262a3c5fa2cb257db91b1
data/CHANGELOG.md CHANGED
@@ -1,12 +1,60 @@
1
1
  # Hanami::Utils
2
- Ruby core extentions and class utilities for Hanami
2
+
3
+ Ruby core extensions and class utilities for Hanami
4
+
5
+ ## v2.0.0 - 2022-11-22
6
+
7
+ ## v2.0.0.rc1 - 2022-11-08
8
+
9
+ ### Fixed
10
+
11
+ - [Benjamin Klotz] Ensure `Hanami::Utils::String.underscore` to replace `"."` (dot character) into underscore
12
+
13
+ ### Changed
14
+
15
+ - [Luca Guidi] Removed `Hanami::Logger` in favor of `Dry::Logger`
16
+
17
+ ## v2.0.0.beta1 - 2022-07-20
18
+
19
+ ### Changed
20
+
21
+ - [Luca Guidi] Removed `Hanami::Utils::BasicObject` (moved to `dry-core` as `Dry::Core::BasicObject`)
22
+ - [Luca Guidi] Removed `Hanami::Interactor`
23
+
24
+ ## v2.0.0.alpha6 - 2022-02-10
25
+
26
+ ### Added
27
+
28
+ - [Luca Guidi] Official support for Ruby: MRI 3.0 and 3.1
29
+
30
+ ### Fixed
31
+
32
+ - [Rob Jacoby] Allow `Hanami::Logger#initialize` to accept `File::NULL` as `stream:` argument
33
+
34
+ ### Changed
35
+
36
+ - [Luca Guidi] Drop support for Ruby: MRI 2.6 and 2.7.
37
+
38
+ ## v2.0.0.alpha3 - 2021-11-09
39
+
40
+ No changes.
41
+
42
+ ## v2.0.0.alpha2 - 2021-05-04
43
+
44
+ ### Changed
45
+
46
+ - [Luca Guidi] Drop support for Ruby: MRI 2.5.
47
+ - [Luca Guidi] Transform `Utils::String` from class to module
3
48
 
4
49
  ## v2.0.0.alpha1 - 2019-01-30
50
+
5
51
  ### Added
52
+
6
53
  - [Gustavo Caso] Introduce `Hanami::Middleware` namespace
7
54
  - [Luca Guidi] Introduce `Callbacks::Chain#dup`
8
55
 
9
56
  ### Changed
57
+
10
58
  - [Luca Guidi] Drop support for Ruby: MRI 2.3, and 2.4.
11
59
  - [Luca Guidi] Remove `Utils::Duplicable`
12
60
  - [Luca Guidi] Remove `Utils::Inflector`
@@ -18,27 +66,86 @@ Ruby core extentions and class utilities for Hanami
18
66
  - [Gustavo Caso] Remove `Utils::File.rewrite`
19
67
  - [Vladimir Suvorov] Remove `Utils::Class.load_from_pattern!`
20
68
 
69
+ ## v1.3.8 - 2021-05-03
70
+
71
+ ### Fixed
72
+
73
+ - [Hiếu Nguyễn] Ensure `Hanami::Interactor#initialize` to accept keyword arguments while working with Ruby 3
74
+
75
+ ## v1.3.7 - 2021-01-04
76
+
77
+ ### Added
78
+
79
+ - [Luca Guidi] Official support for Ruby: MRI 3.0
80
+ - [Khai Le] Allow `Hanami::Logger` to filter sensitive data for an array of hashes
81
+
82
+ ### Fixed
83
+
84
+ - [Hiếu Nguyễn] Ensure `Hanami::Logger` to not mutate `Hash` input when filtering sensitive data
85
+
86
+ ## v1.3.6 - 2020-01-07
87
+
88
+ ### Added
89
+
90
+ - [Luca Guidi] Official support for Ruby: MRI 2.7
91
+
92
+ ### Fixed
93
+
94
+ - [ippachi] `Utils::Files.append`: don't check breakline if file is empty
95
+
96
+ ## v1.3.5 - 2019-10-25
97
+
98
+ ### Fixed
99
+
100
+ - [Ivan Kabluchkov] Ensure `Hanami::Logger` filters to not crash when logger stream is a closed tempfile
101
+ - [Luca Guidi] Ensure `Utils::Files.append` to append contents properly when existing file doesn't end with a newline
102
+
103
+ ## v1.3.4 - 2019-09-27
104
+
105
+ ### Added
106
+
107
+ - [Luca Guidi] Let `Utils::BasicObject` to lookup constants at the top-level namespace
108
+
109
+ ## v1.3.3 - 2019-09-13
110
+
111
+ ### Fixed
112
+
113
+ - [Mauro Morales] Ensure `Utils::Inflector.pluralize` and `.singularize` to work with words that contain an underscore (`_`)
114
+
115
+ ## v1.3.2 - 2019-06-21
116
+
117
+ ### Added
118
+
119
+ - [Vladislav Yashin & Luca Guidi] Added `Utils::BasicObject#instance_of?`, `#is_a?`, and `#kind_of`
120
+
21
121
  ## v1.3.1 - 2019-01-18
122
+
22
123
  ### Added
124
+
23
125
  - [Luca Guidi] Official support for Ruby: MRI 2.6
24
126
  - [Luca Guidi] Support `bundler` 2.0+
25
127
 
26
128
  ### Fixed
129
+
27
130
  - [Alfonso Uceda] Fix `Hash` serialization for `Utils::Logger`
28
131
  - [Jeff Dickey] Add missing `pathname` require in `lib/hanami/utils.rb`
29
132
 
30
133
  ## v1.3.0 - 2018-10-24
31
134
 
32
135
  ## v1.3.0.beta1 - 2018-08-08
136
+
33
137
  ### Added
138
+
34
139
  - [Luca Guidi] Official support for JRuby 9.2.0.0
35
140
  - [graywolf] Add `Utils::Files.inject_line_before_last` and `.inject_line_after_last`
36
141
 
37
142
  ### Fixed
143
+
38
144
  - [graywolf] Don't show `Fixnum` Ruby warning for 2.4+
39
145
  - [Luca Guidi] Fix pluralization of `"fee"`
40
146
 
41
147
  ### Deprecated
148
+
42
149
  - [Luca Guidi & Marion Schleifer] Deprecate `Utils::String` as Ruby type. Please use `Utils::String` class methods instead of `Utils::String.new("")`.
43
150
  - [Luca Guidi & Marion Schleifer] Deprecate `Utils::Hash` as Ruby type. Please use `Utils::Hash` class methods instead of `Utils::Hash.new({})`.
44
151
  - [Luca Guidi & Marion Schleifer] Deprecate `Utils::String.pluralize` and `.singularize`.
@@ -47,14 +154,19 @@ Ruby core extentions and class utilities for Hanami
47
154
  ## v1.2.0 - 2018-04-11
48
155
 
49
156
  ## v1.2.0.rc2 - 2018-04-06
157
+
50
158
  ### Added
159
+
51
160
  - [Luca Guidi] Use different colors for each `Hanami::Logger` level
52
161
 
53
162
  ## v1.2.0.rc1 - 2018-03-30
163
+
54
164
  ### Added
165
+
55
166
  - [Oana Sipos & Sean Collins & Luca Guidi] Colored logging
56
167
 
57
168
  ### Fixed
169
+
58
170
  - [Luca Guidi] Make `Hanami::Logger` to properly log hash messages
59
171
 
60
172
  ## v1.2.0.beta2 - 2018-03-23
@@ -62,25 +174,34 @@ Ruby core extentions and class utilities for Hanami
62
174
  ## v1.2.0.beta1 - 2018-02-28
63
175
 
64
176
  ## v1.1.2 - 2018-02-02
177
+
65
178
  ### Added
179
+
66
180
  - [Luca Guidi] Official support for Ruby: MRI 2.5
67
181
 
68
182
  ### Fixed
183
+
69
184
  - [Sean Collins & Luca Guidi] Make `Utils::Files.write` idempotent: ensure to truncate the file before to write
70
185
  - [Sean Collins & Luca Guidi] Don't erase file contents when invoking `Utils::Files.touch`
71
186
 
72
187
  ### Changed
188
+
73
189
  - [Sean Collins & Luca Guidi] Deprecate `Utils::Files.rewrite` in favor of `.write`
74
190
 
75
191
  ## v1.1.1 - 2017-11-22
192
+
76
193
  ### Added
194
+
77
195
  - [Luca Guidi] Introduce `Utils::Hash.deep_stringify` to recursively stringify a hash
78
196
 
79
197
  ### Fixed
198
+
80
199
  - [Yuta Tokitake] Ensure `Interactor#call` to accept non-keyword arguments
81
200
 
82
201
  ## v1.1.0 - 2017-10-25
202
+
83
203
  ### Added
204
+
84
205
  - [Luca Guidi] Introduce `Utils::Hash.deep_serialize` to recursively serialize input into `::Hash`
85
206
 
86
207
  ## v1.1.0.rc1 - 2017-10-16
@@ -88,11 +209,15 @@ Ruby core extentions and class utilities for Hanami
88
209
  ## v1.1.0.beta3 - 2017-10-04
89
210
 
90
211
  ## v1.1.0.beta2 - 2017-10-03
212
+
91
213
  ### Added
214
+
92
215
  - [Alfonso Uceda] Auto create directory for `Hanami::Logger`
93
216
 
94
217
  ## v1.1.0.beta1 - 2017-08-11
218
+
95
219
  ### Added
220
+
96
221
  - [Marion Duprey] Allow `Hanami::Interactor#call` to accept arguments. `#initialize` should be used for Dependency Injection, while `#call` should be used for input
97
222
  - [Marion Schleifer] Introduce `Utils::Hash.stringify`
98
223
  - [Marion Schleifer] Introduce `Utils::String.titleize`, `.capitalize`, `.classify`, `.underscore`, `.dasherize`, `.demodulize`, `.namespace`, `.pluralize`, `.singularize`, and `.rsub`
@@ -101,101 +226,136 @@ Ruby core extentions and class utilities for Hanami
101
226
  - [Marion Duprey & Gabriel Gizotti] Filter sensitive informations for `Hanami::Logger`
102
227
 
103
228
  ## v1.0.4 - 2017-10-02
229
+
104
230
  ### Fixed
231
+
105
232
  - [Luca Guidi] Make `Hanami::Utils::BasicObject` to be fully compatible with Ruby's `pp` and to be inspected by Pry.
106
233
  - [Thiago Kenji Okada] Fix pluralization/singularization for `"release" => "releases"`
107
234
 
108
235
  ## v1.0.3 - 2017-09-06
236
+
109
237
  ### Fixed
238
+
110
239
  - [Malina Sulca] Fix pluralization/singularization for `"exercise" => "exercises"`
111
240
  - [Xavier Barbosa] Fix pluralization/singularization for `"area" => "areas"`
112
241
 
113
242
  ## v1.0.2 - 2017-07-10
243
+
114
244
  ### Fixed
245
+
115
246
  - [Anton Davydov] Fix pluralization/singularization for `"phrase" => "phrases"`
116
247
 
117
248
  ## v1.0.1 - 2017-06-23
249
+
118
250
  ### Added
251
+
119
252
  - [Luca Guidi] Introduced `Utils::Hash.symbolize` and `.deep_symbolize`
120
253
  - [Luca Guidi] Introduced `Utils::Hash.deep_dup`
121
254
 
122
255
  ### Fixed
256
+
123
257
  - [choallin] Ensure `Utils::String#classify` to return output identical to the input for already classified strings.
124
258
  - [Marion Duprey & Jonas Amundsen] Ensure `Utils::Hash#initialize` to accept frozen `Hash` as argument.
125
259
 
126
260
  ## v1.0.0 - 2017-04-06
127
261
 
128
262
  ## v1.0.0.rc1 - 2017-03-31
263
+
129
264
  ### Added
265
+
130
266
  - [Luca Guidi] Allow `Hanami::Logger#initialize` to accept arguments to be compliant with Ruby's `Logger`
131
267
 
132
268
  ## v1.0.0.beta3 - 2017-03-17
269
+
133
270
  ### Fixed
271
+
134
272
  - [Luca Guidi] Use `$stdout` instead of `STDOUT` as default stream for `Hanami::Logger`
135
273
 
136
274
  ### Changed
275
+
137
276
  - [Luca Guidi] Removed `Utils::Attributes`
138
277
  - [Luca Guidi] Removed deprecated `Hanami::Interactor::Result#failing?`
139
278
  - [Luca Guidi] Removed deprecated `Utils::Json.load` and `.dump`
140
279
 
141
280
  ## v1.0.0.beta2 - 2017-03-02
281
+
142
282
  ### Changed
283
+
143
284
  - [Anton Davydov] Made `Utils::Blank` private API
144
285
 
145
286
  ## v1.0.0.beta1 - 2017-02-14
287
+
146
288
  ### Added
289
+
147
290
  - [Luca Guidi] Official support for Ruby: MRI 2.4
148
291
  - [alexd16] Introduced `Utils::Hash#deep_symbolize!` for deep symbolization
149
292
  - [Luca Guidi] Introduced `Hanami::Utils.reload!` as a mechanism to force code reloading in development
150
293
 
151
294
  ### Fixed
295
+
152
296
  - [alexd16 & Alfonso Uceda & Luca Guidi] Don't deeply symbolize `Hanami::Interactor::Result` payload
153
297
  - [Alfonso Uceda] `Hanami::Interactor::Result`: Don't transform objects that respond to `#to_hash` (like entities)
154
298
  - [Bhanu Prakash] Use `Utils::Json.generate` instead of the deprecated `.dump` for `Hanami::Logger` JSON formatter
155
299
  - [Luca Guidi] `Hanami::Logger`: when a `Hash` message is passed, don't nest it under `:message` key, but unwrap at the top level
156
300
 
157
301
  ### Changed
302
+
158
303
  - [alexd16] `Utils::Hash#symbolize!` no longer symbolizes deep structures
159
304
  - [Luca Guidi & Alfonso Uceda] Improve readability for default logger formatter
160
305
  - [Luca Guidi] Use ISO-8601 time format for JSON logger formatter
161
306
 
162
307
  ## v0.9.2 - 2016-12-19
308
+
163
309
  ### Added
310
+
164
311
  - [Grachev Mikhail] Introduced `Hanami::Interactor::Result#failure?`
165
312
 
166
313
  ### Fixed
167
- - [Paweł Świątkowski] `Utils::Inflector.pluralize` Pluralize -en to -ens instead of -ina
314
+
315
+ - [Paweł Świątkowski] `Utils::Inflector.pluralize` Pluralize -en to -ens instead of -ina
168
316
 
169
317
  ### Changed
318
+
170
319
  - [Grachev Mikhail] Deprecate `Hanami::Interactor::Result#failing?` in favor of `#failure?`
171
320
 
172
321
  ## v0.9.1 - 2016-11-18
322
+
173
323
  ### Added
324
+
174
325
  - [Luca Guidi] Introduced `Utils::Json.parse` and `.generate`
175
326
 
176
327
  ### Fixed
328
+
177
329
  - [Luca Guidi] Ensure `Utils::Json` parsing to not eval untrusted input
178
330
 
179
331
  ### Changed
332
+
180
333
  - [Luca Guidi] Deprecated `Utils::Json.load` in favor of `.parse`
181
334
  - [Luca Guidi] Deprecated `Utils::Json.dump` in favor of `.generate`
182
335
 
183
336
  ## v0.9.0 - 2016-11-15
337
+
184
338
  ### Added
339
+
185
340
  – [Luca Guidi] Introduced `Utils.require!` to recursively require Ruby files with an order that is consistent across platforms
186
341
  – [Luca Guidi] Introduced `Utils::FileList` as cross-platform ordered list of files, alternative to `Dir.glob`
187
- - [Luca Guidi] Make `Utils::BasicObject` pretty printable
342
+
343
+ - [Luca Guidi] Make `Utils::BasicObject` pretty printable
188
344
  - [Grachev Mikhail] Added `Interactor::Result#successful?` and `#failing?`
189
345
 
190
346
  ### Fixed
347
+
191
348
  - [Pascal Betz] Ensure `Utils::Class.load!` to lookup constant only within the given namespace
192
349
 
193
350
  ### Changed
351
+
194
352
  - [Luca Guidi] Make `Utils::Hash` only compatible with objects that respond to `#to_hash`
195
353
  - [Luca Guidi] Official support for Ruby: MRI 2.3+ and JRuby 9.1.5.0+
196
354
 
197
355
  ## v0.8.0 - 2016-07-22
356
+
198
357
  ### Added
358
+
199
359
  - [Andrey Morskov] Introduced `Hanami::Utils::Blank`
200
360
  - [Anton Davydov] Allow to specify a default log level for `Hanami::Logger`
201
361
  - [Anton Davydov] Introduced default and JSON formatters for `Hanami::Logger`
@@ -209,101 +369,139 @@ Ruby core extentions and class utilities for Hanami
209
369
  - [Rogério Ramos] Fix English pluralization for words ending with `"ice"`
210
370
 
211
371
  ### Changed
372
+
212
373
  - [Luca Guidi] Drop support for Ruby 2.0, 2.1 and Rubinius. Official support for JRuby 9.0.5.0+.
213
374
 
214
375
  ## v0.7.1 - 2016-02-05
376
+
215
377
  ### Fixed
378
+
216
379
  - [Yuuji Yaginuma] `Hanami::Utils::Escape`: fixed Ruby warning for `String#chars` with a block, which is deprecated. Using `String#each_char` now.
217
380
  - [Sean Collins] Allow non string objects to be escaped by `Hanami::Utils::Escape`.
218
381
 
219
382
  ## v0.7.0 - 2016-01-22
383
+
220
384
  ### Changed
385
+
221
386
  - [Luca Guidi] Renamed the project
222
387
 
223
388
  ## v0.6.1 - 2016-01-19
389
+
224
390
  ### Fixed
391
+
225
392
  - [Anton Davydov] Ensure `Lotus::Utils::String#classify` to work properly with dashes (eg. `"app-store" => "App::Store"`)
226
393
 
227
394
  ## v0.6.0 - 2016-01-12
395
+
228
396
  ### Added
397
+
229
398
  - [Luca Guidi] Official support for Ruby 2.3
230
399
  - [Luca Guidi] Custom inflections
231
400
  - [Luca Guidi] Introduced `Lotus::Utils::Duplicable` as a safe dup logic for Ruby types
232
401
  - [Luca Guidi] Added `Lotus::Utils::String#rsub` replace rightmost occurrence
233
402
 
234
403
  ### Fixed
404
+
235
405
  - [Luca Guidi] Fix `Lotus::Utils::PathPrefix#join` and `#relative_join` by rejecting arguments that are equal to the separator
236
406
  - [Karim Kiatlottiavi] Fix `Encoding::UndefinedConversionError` in `Lotus::Utils::Escape.encode`
237
407
 
238
408
  ### Changed
409
+
239
410
  - [Luca Guidi] Deprecate Ruby 2.0 and 2.1
240
411
  - [Luca Guidi] Removed `Lotus::Utils::Callbacks#add` in favor of `#append`
241
412
  - [Luca Guidi] Removed pattern support for `Utils::Class.load!` (eg. `Articles(Controller|::Controller)`)
242
413
 
243
414
  ## v0.5.2 - 2015-09-30
415
+
244
416
  ### Added
417
+
245
418
  - [Luca Guidi] Added `Lotus::Utils::String#capitalize`
246
419
  - [Trung Lê] Official support for JRuby 9k+
247
420
 
248
421
  ## v0.5.1 - 2015-07-10
422
+
249
423
  ### Fixed
424
+
250
425
  - [Thiago Felippe] Ensure `Lotus::Utils::PathPrefix#join` won't remote duplicate entries (eg `/admin/dashboard/admin`)
251
426
 
252
427
  ## v0.5.0 - 2015-06-23
428
+
253
429
  ### Added
430
+
254
431
  - [Luca Guidi] Extracted `Lotus::Logger` from `hanamirb`
255
432
 
256
433
  ### Changed
434
+
257
435
  - [Luca Guidi] `Lotus::Interactor::Result` contains only objects explicitly exposed via `Lotus::Interactor.expose`.
258
436
 
259
437
  ## v0.4.3 - 2015-05-22
438
+
260
439
  ### Added
440
+
261
441
  - [François Beausoleil] Improved `Lotus::Utils::Kernel` messages for `TypeError`.
262
442
 
263
443
  ## v0.4.2 - 2015-05-15
444
+
264
445
  ### Fixed
446
+
265
447
  - [Luca Guidi] Ensure `Lotus::Utils::Attributes#to_h` to return `::Hash`
266
448
 
267
449
  ## v0.4.1 - 2015-05-15
450
+
268
451
  ### Added
452
+
269
453
  - [Luca Guidi & Alfonso Uceda Pompa] Introduced `Lotus::Utils::Inflector`, `Lotus::Utils::String#pluralize` and `#singularize`
270
454
 
271
455
  ### Fixed
456
+
272
457
  - [Luca Guidi] Ensure `Lotus::Utils::Attributes#to_h` to safely return nested `::Hash` instances for complex data structures.
273
458
  - [Luca Guidi] Let `Lotus::Interactor#error` to return a falsey value for control flow. (eg. `check_permissions or error "You can't access"`)
274
459
 
275
460
  ## v0.4.0 - 2015-03-23
461
+
276
462
  ### Added
463
+
277
464
  - [Luca Guidi] Introduced `Lotus::Utils::Escape`. It implements OWASP/ESAPI suggestions for HTML, HTML attribute and URL escape utilities.
278
465
  - [Luca Guidi] Introduced `Lotus::Utils::String#dasherize`
279
466
  - [Luca Guidi] Introduced `Lotus::Utils::String#titleize`
280
467
 
281
468
  ## v0.3.5 - 2015-03-12
469
+
282
470
  ### Added
471
+
283
472
  - [Luca Guidi] Introduced `Lotus::Interactor`
284
473
  - [Luca Guidi] Introduced `Lotus::Utils::BasicObject`
285
474
 
286
475
  ## v0.3.4 - 2015-01-30
476
+
287
477
  ### Added
478
+
288
479
  - [Alfonso Uceda Pompa] Aliased `Lotus::Utils::Attributes#get` with `#[]`
289
480
  - [Simone Carletti] Introduced `Lotus::Utils::Callbacks::Chain#prepend` and `#append`
290
481
 
291
482
  ### Deprecated
483
+
292
484
  - [Luca Guidi] Deprecated `Lotus::Utils::Callbacks::Chain#add` in favor of `#append`
293
485
 
294
486
  ## v0.3.3 - 2015-01-08
487
+
295
488
  ### Fixed
489
+
296
490
  - [Luca Guidi] Ensure to return the right offending object if a missing method is called with Utils::String and Hash (eg. `Utils::Hash.new(a: 1).all? {|_, v| v.foo }` blame `v` instead of `Hash`)
297
491
  - [Luca Guidi] Raise an error if try to coerce non numeric strings into Integer, Float & BigDecimal (eg. `Utils::Kernel.Integer("hello") # => raise TypeError`)
298
492
 
299
493
  ## v0.3.2 - 2014-12-23
494
+
300
495
  ### Added
496
+
301
497
  - [Luca Guidi] Official support for Ruby 2.2
302
498
  - [Luca Guidi] Introduced `Utils::Attributes`
303
499
  - [Luca Guidi] Added `Utils::Hash#stringify!`
304
500
 
305
501
  ## v0.3.1 - 2014-11-23
502
+
306
503
  ### Added
504
+
307
505
  - [Luca Guidi] Allow `Utils::Class.load!` to accept any object that implements `#to_s`
308
506
  - [Trung Lê] Allow `Utils::Class.load!` to accept a class
309
507
  - [Luca Guidi] Introduced `Utils::Class.load_from_pattern!`
@@ -317,14 +515,18 @@ Ruby core extentions and class utilities for Hanami
317
515
  - [Luca Guidi] Made `Utils::PathPrefix#join` to accept multiple argument
318
516
 
319
517
  ### Fixed
518
+
320
519
  - [Luca Guidi] Made `Utils::PathPrefix#join` remove trailing occurrences for `@separator` from the output
321
520
  - [Luca Guidi] Made `Utils::PathPrefix#relative_join` to correctly replace all the instances of `@separator` from the output
322
521
 
323
522
  ### Deprecated
523
+
324
524
  - [Luca Guidi] Deprecated `Utils::Class.load!` with a pattern like `Articles(Controller|::Controller)`, use `Utils::Class.load_from_pattern!` instead
325
525
 
326
526
  ## v0.3.0 - 2014-10-23
527
+
327
528
  ### Added
529
+
328
530
  - [Celso Fernandes] Add BigDecimal coercion to Lotus::Utils::Kernel
329
531
  - [Luca Guidi] Define `Boolean` constant, if missing
330
532
  - [Luca Guidi] Use composition over inheritance for `Lotus::Utils::PathPrefix`
@@ -332,6 +534,7 @@ Ruby core extentions and class utilities for Hanami
332
534
  - [Luca Guidi] Use composition over inheritance for `Lotus::Utils::String`
333
535
 
334
536
  ### Fixed
537
+
335
538
  - [Luca Guidi] Improved error message for `Utils::Class.load!`
336
539
  - [Tom Kadwill] Improved error `NameError` message by passing in the whole constant name to `Utils::Class.load!`
337
540
  - [Luca Guidi] `Utils::Hash#to_h` return instances of `::Hash` in case of nested symbolized data structure
@@ -341,7 +544,9 @@ Ruby core extentions and class utilities for Hanami
341
544
  - [Luca Guidi] Ensure `Utils::Hash#inspect` output to be the same of `::Hash#inspect`
342
545
 
343
546
  ## v0.2.0 - 2014-06-23
547
+
344
548
  ### Added
549
+
345
550
  - [Luca Guidi] Implemented `Lotus::Utils::Kernel.Symbol`
346
551
  - [Luca Guidi] Made `Kernel.Pathname` to raise an error when `nil` is passed as argument
347
552
  - [Luca Guidi] Implemented `Lotus::Utils::LoadPaths#freeze` in order to prevent modification after the object has been frozen
@@ -352,9 +557,11 @@ Ruby core extentions and class utilities for Hanami
352
557
  - [Luca Guidi] Implemented `Lotus::Utils::Kernel.Pathname`
353
558
 
354
559
  ### Fixed
560
+
355
561
  - [Luca Guidi] Implemented `Lotus::Utils::LoadPaths#initialize_copy` in order to safely `#dup` and `#clone`
356
562
 
357
563
  ### Changed
564
+
358
565
  - [Luca Guidi] Implemented `Lotus::Utils::Callbacks::Chain#freeze` in order to prevent modification after the object has been frozen
359
566
  - [Luca Guidi] All the `Utils::Kernel` methods will raise `TypeError` in case of failed coercion.
360
567
  - [Luca Guidi] Made `Kernel.Time` to raise an error when `nil` is passed as argument
@@ -370,7 +577,9 @@ Ruby core extentions and class utilities for Hanami
370
577
  - [Luca Guidi] Use composition over inheritance for `Lotus::Utils::Callbacks::Chain`
371
578
 
372
579
  ## v0.1.1 - 2014-04-23
580
+
373
581
  ### Added
582
+
374
583
  - [Luca Guidi] Implemented `Lotus::Utils::Kernel.Time`
375
584
  - [Luca Guidi] Implemented `Lotus::Utils::Kernel.DateTime`
376
585
  - [Luca Guidi] Implemented `Lotus::Utils::Kernel.Date`
@@ -383,12 +592,15 @@ Ruby core extentions and class utilities for Hanami
383
592
  - [Luca Guidi] Implemented `Lotus::Utils::Kernel.Array`
384
593
 
385
594
  ### Fixed
595
+
386
596
  - [Christopher Keele] Add missing stdlib `Set` require to `Utils::ClassAttribute`
387
597
 
388
598
  ## v0.1.0 - 2014-01-23
599
+
389
600
  ### Added
601
+
390
602
  - [Luca Guidi] Introduced `Lotus::Utils::String#demodulize`
391
- - [Luca Guidi] Introduced `Lotus::Utils::IO.silence_warnings`
603
+ - [Luca Guidi] Introduced `Lotus::Utils::IO.silence_warnings`
392
604
  - [Luca Guidi] Introduced class loading mechanism from a string: `Utils::Class.load!`
393
605
  - [Luca Guidi] Introduced callbacks support for classes
394
606
  - [Luca Guidi] Introduced inheritable class level attributes
data/README.md CHANGED
@@ -5,24 +5,27 @@ Ruby core extensions and class utilities for [Hanami](http://hanamirb.org)
5
5
  ## Status
6
6
 
7
7
  [![Gem Version](https://badge.fury.io/rb/hanami-utils.svg)](https://badge.fury.io/rb/hanami-utils)
8
- [![TravisCI](https://travis-ci.org/hanami/utils.svg?branch=master)](https://travis-ci.org/hanami/utils)
9
- [![CircleCI](https://circleci.com/gh/hanami/utils/tree/master.svg?style=svg)](https://circleci.com/gh/hanami/utils/tree/master)
10
- [![Test Coverage](https://codecov.io/gh/hanami/utils/branch/master/graph/badge.svg)](https://codecov.io/gh/hanami/utils)
8
+ [![CI](https://github.com/hanami/utils/workflows/ci/badge.svg?branch=main)](https://github.com/hanami/utils/actions?query=workflow%3Aci+branch%3Amain)
9
+ [![Test Coverage](https://codecov.io/gh/hanami/utils/branch/main/graph/badge.svg)](https://codecov.io/gh/hanami/utils)
11
10
  [![Depfu](https://badges.depfu.com/badges/a8545fb67cf32a2c75b6227bc0821027/overview.svg)](https://depfu.com/github/hanami/utils?project=Bundler)
12
11
  [![Inline Docs](http://inch-ci.org/github/hanami/utils.svg)](http://inch-ci.org/github/hanami/utils)
13
12
 
13
+ ## Version
14
+
15
+ **This branch contains the code for `hanami-utils` 2.x.**
16
+
14
17
  ## Contact
15
18
 
16
- * Home page: http://hanamirb.org
17
- * Mailing List: http://hanamirb.org/mailing-list
18
- * API Doc: http://rdoc.info/gems/hanami-utils
19
- * Bugs/Issues: https://github.com/hanami/utils/issues
20
- * Support: http://stackoverflow.com/questions/tagged/hanami
21
- * Chat: http://chat.hanamirb.org
19
+ - Home page: http://hanamirb.org
20
+ - Mailing List: http://hanamirb.org/mailing-list
21
+ - API Doc: http://rdoc.info/gems/hanami-utils
22
+ - Bugs/Issues: https://github.com/hanami/utils/issues
23
+ - Support: http://stackoverflow.com/questions/tagged/hanami
24
+ - Chat: http://chat.hanamirb.org
22
25
 
23
26
  ## Rubies
24
27
 
25
- __Hanami::Utils__ supports Ruby (MRI) 2.5+
28
+ **Hanami::Utils** supports Ruby (MRI) 3.0+
26
29
 
27
30
  ## Installation
28
31
 
@@ -42,23 +45,15 @@ Or install it yourself as:
42
45
 
43
46
  ## Usage
44
47
 
45
- __Hanami::Utils__ is designed to enhance Ruby's code and stdlib.
48
+ **Hanami::Utils** is designed to enhance Ruby's code and stdlib.
46
49
  **By default this gem doesn't load any code, you must require what you need.**
47
50
 
48
51
  ## Features
49
52
 
50
- ### Hanami::Interactor
51
-
52
- Standardized Service Object with small interface and rich returning result. [[API doc](http://www.rubydoc.info/gems/hanami-utils/Hanami/Interactor)]
53
-
54
53
  ### Hanami::Logger
55
54
 
56
55
  Enhanced version of Ruby's `Logger`. [[API doc](http://www.rubydoc.info/gems/hanami-utils/Hanami/Logger)]
57
56
 
58
- ### Hanami::Utils::BasicObject
59
-
60
- Enhanced version of Ruby's `BasicObject`. [[API doc](http://www.rubydoc.info/gems/hanami-utils/Hanami/Utils/BasicObject)]
61
-
62
57
  ### Hanami::Utils::Blank
63
58
 
64
59
  Checks for blank. [[API doc](http://www.rubydoc.info/gems/hanami-utils/Hanami/Utils/Blank)]
@@ -129,7 +124,7 @@ Enhanced version of Ruby's `String`. [[API doc](http://www.rubydoc.info/gems/han
129
124
 
130
125
  ## Versioning
131
126
 
132
- __Hanami::Utils__ uses [Semantic Versioning 2.0.0](http://semver.org)
127
+ **Hanami::Utils** uses [Semantic Versioning 2.0.0](http://semver.org)
133
128
 
134
129
  ## Contributing
135
130
 
@@ -141,6 +136,4 @@ __Hanami::Utils__ uses [Semantic Versioning 2.0.0](http://semver.org)
141
136
 
142
137
  ## Copyright
143
138
 
144
- Copyright © 2014-2019 Luca Guidi – Released under MIT License
145
-
146
- This project was formerly known as Lotus (`lotus-utils`).
139
+ Copyright © 2014-2022 Hanami Team – Released under MIT License
data/hanami-utils.gemspec CHANGED
@@ -16,14 +16,15 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.files = `git ls-files -- lib/* CHANGELOG.md LICENSE.md README.md hanami-utils.gemspec`.split($/)
18
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
19
  spec.require_paths = ["lib"]
21
- spec.required_ruby_version = ">= 2.5.0"
20
+ spec.metadata["rubygems_mfa_required"] = "true"
21
+ spec.required_ruby_version = ">= 3.0"
22
22
 
23
- spec.add_dependency "transproc", "~> 1.0"
23
+ spec.add_dependency "dry-transformer", "~> 1.0", "< 2"
24
24
  spec.add_dependency "concurrent-ruby", "~> 1.0"
25
25
 
26
26
  spec.add_development_dependency "bundler", ">= 1.6", "< 3"
27
- spec.add_development_dependency "rake", "~> 12"
28
- spec.add_development_dependency "rspec", "~> 3.7"
27
+ spec.add_development_dependency "rake", "~> 13"
28
+ spec.add_development_dependency "rspec", "~> 3.9"
29
+ spec.add_development_dependency "rubocop", "~> 1.0"
29
30
  end