hanami-utils 2.0.0.alpha2 → 2.0.0.beta1

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