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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 147943727aa2419fd62308b8e482f1386f9790f8
4
- data.tar.gz: 9a2db890e7da1a930a3adb14cffac52ff9affa33
3
+ metadata.gz: 9fed837067b96edc2d9f3b4e3a571e8fb9220dde
4
+ data.tar.gz: 69075fd83da706506ead576f6040384ab2c75a98
5
5
  SHA512:
6
- metadata.gz: 423676170211e4a123007b863e15393de3ca0e603113160a12d8e39143b08cd49a6d68a0089a20f100a83108a280ed466e1008cae601e0a2d99312e33b2487fa
7
- data.tar.gz: 1c81a606b3bfbee8d3426f36db95662563861c693d5075928a2c12eae1f736dba65bafdf27b441f8963d4ef3f195d157dd615a4a27aae750dccaf830b079d0d9
6
+ metadata.gz: 5aae813a308bc47f00c68cbeccde7bbe60c797a5c179c1e5e8637ed20dcdb20700b3888cc3901ade12125438960af64edd30779f1af6483347ae100316d91bd8
7
+ data.tar.gz: e9b15c795ed49e894014b58d7c32ee55259a80a665726658fc72d1f4fdff1183061b3136fcc2231fdf2daf9e10065e54b734ec2d3edc5cac0d6204a33655b5f2
@@ -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`
@@ -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.8.1
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
 
@@ -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 # rubocop:disable Style/AndOr
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/
@@ -3,6 +3,6 @@ module Hanami
3
3
  # Defines the version
4
4
  #
5
5
  # @since 0.1.0
6
- VERSION = '0.9.1'.freeze
6
+ VERSION = '0.9.2'.freeze
7
7
  end
8
8
  end
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.1
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-11-18 00:00:00.000000000 Z
13
+ date: 2016-12-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler