hanami-utils 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/hanami/interactor.rb +15 -1
- data/lib/hanami/logger.rb +1 -1
- data/lib/hanami/utils/inflector.rb +0 -6
- data/lib/hanami/utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fed837067b96edc2d9f3b4e3a571e8fb9220dde
|
4
|
+
data.tar.gz: 69075fd83da706506ead576f6040384ab2c75a98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aae813a308bc47f00c68cbeccde7bbe60c797a5c179c1e5e8637ed20dcdb20700b3888cc3901ade12125438960af64edd30779f1af6483347ae100316d91bd8
|
7
|
+
data.tar.gz: e9b15c795ed49e894014b58d7c32ee55259a80a665726658fc72d1f4fdff1183061b3136fcc2231fdf2daf9e10065e54b734ec2d3edc5cac0d6204a33655b5f2
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
# Hanami::Utils
|
2
2
|
Ruby core extentions and class utilities for Hanami
|
3
3
|
|
4
|
+
## v0.9.2 - 2016-12-19
|
5
|
+
## Added
|
6
|
+
- [Grachev Mikhail] Introduced `Hanami::Interactor::Result#failure?`
|
7
|
+
|
8
|
+
## Fixed
|
9
|
+
- [Paweł Świątkowski] `Utils::Inflector.pluralize` Pluralize -en to -ens instead of -ina
|
10
|
+
|
11
|
+
## Changed
|
12
|
+
- [Grachev Mikhail] Deprecate `Hanami::Interactor::Result#failing?` in favor of `#failure?`
|
13
|
+
|
4
14
|
## v0.9.1 - 2016-11-18
|
5
15
|
### Added
|
6
16
|
- [Luca Guidi] Introduced `Utils::Json.parse` and `.generate`
|
data/lib/hanami/interactor.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'hanami/utils/basic_object'
|
2
2
|
require 'hanami/utils/class_attribute'
|
3
3
|
require 'hanami/utils/hash'
|
4
|
+
require 'hanami/utils/deprecation'
|
4
5
|
|
5
6
|
module Hanami
|
6
7
|
# Hanami Interactor
|
@@ -20,6 +21,7 @@ module Hanami
|
|
20
21
|
METHODS = ::Hash[initialize: true,
|
21
22
|
success?: true,
|
22
23
|
successful?: true,
|
24
|
+
failure?: true,
|
23
25
|
failing?: true,
|
24
26
|
fail!: true,
|
25
27
|
prepare!: true,
|
@@ -56,8 +58,20 @@ module Hanami
|
|
56
58
|
#
|
57
59
|
# @return [TrueClass,FalseClass] the result of the check
|
58
60
|
#
|
59
|
-
# @since 0.
|
61
|
+
# @since 0.9.2
|
62
|
+
#
|
63
|
+
# @deprecated Use {#failure?} instead
|
60
64
|
def failing?
|
65
|
+
Utils::Deprecation.new("`Hanami::Interactor::Result#failing?' is deprecated, please use `Hanami::Interactor::Result#failure?'")
|
66
|
+
failure?
|
67
|
+
end
|
68
|
+
|
69
|
+
# Check if the current status is not successful
|
70
|
+
#
|
71
|
+
# @return [TrueClass,FalseClass] the result of the check
|
72
|
+
#
|
73
|
+
# @since 0.9.2
|
74
|
+
def failure?
|
61
75
|
!successful?
|
62
76
|
end
|
63
77
|
|
data/lib/hanami/logger.rb
CHANGED
@@ -266,7 +266,7 @@ module Hanami
|
|
266
266
|
class_name = self.class.name
|
267
267
|
namespace = Utils::String.new(class_name).namespace
|
268
268
|
|
269
|
-
class_name != namespace and return namespace
|
269
|
+
class_name != namespace and return namespace
|
270
270
|
end
|
271
271
|
|
272
272
|
# @since 0.5.0
|
@@ -91,10 +91,6 @@ module Hanami
|
|
91
91
|
# @api private
|
92
92
|
IFE = 'ife'.freeze
|
93
93
|
|
94
|
-
# @since 0.4.1
|
95
|
-
# @api private
|
96
|
-
INA = 'ina'.freeze
|
97
|
-
|
98
94
|
# @since 0.4.1
|
99
95
|
# @api private
|
100
96
|
IS = 'is'.freeze
|
@@ -373,8 +369,6 @@ module Hanami
|
|
373
369
|
$1 + A
|
374
370
|
when /\A(buffal|domin|ech|embarg|her|mosquit|potat|tomat)#{ O }\z/i
|
375
371
|
$1 + OES
|
376
|
-
when /\A(.*)(en|#{ INA })\z/
|
377
|
-
$1 + INA
|
378
372
|
when /\A(.*)(?:([^f]))f[e]*\z/
|
379
373
|
$1 + $2 + VES
|
380
374
|
when /\A(.*)us\z/
|
data/lib/hanami/utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-12-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|