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