hanami-utils 2.0.0.alpha2 → 2.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
@@ -91,7 +91,7 @@ module Hanami
91
91
  #
92
92
  # @since 1.3.0
93
93
  # @api private
94
- TOKENIZE_REGEXP = /\((.*)\)/.freeze
94
+ TOKENIZE_REGEXP = /\((.*)\)/
95
95
 
96
96
  # Separator for .tokenize
97
97
  #
@@ -75,13 +75,13 @@ module Hanami
75
75
  def class_attribute(*attributes)
76
76
  attributes.each do |attr|
77
77
  singleton_class.class_eval %(
78
- def #{attr}
79
- class_attributes[:#{attr}]
80
- end
81
-
82
- def #{attr}=(value)
83
- class_attributes[:#{attr}] = value
84
- end
78
+ def #{attr} # def foo
79
+ class_attributes[:#{attr}] # class_attributes[:foo]
80
+ end # end
81
+ #
82
+ def #{attr}=(value) # def foo=(value)
83
+ class_attributes[:#{attr}] = value # class_attributes[:foo] = value
84
+ end # end
85
85
  ), __FILE__, __LINE__ - 8
86
86
  end
87
87
  end
@@ -28,7 +28,7 @@ module Hanami
28
28
  # @api private
29
29
  #
30
30
  # @see Hanami::Utils::Kernel.Integer
31
- NUMERIC_MATCHER = %r{\A([\d/.+iE]+|NaN|Infinity)\z}.freeze
31
+ NUMERIC_MATCHER = %r{\A([\d/.+iE]+|NaN|Infinity)\z}
32
32
 
33
33
  # @since 0.8.0
34
34
  # @api private
@@ -1015,7 +1015,7 @@ module Hanami
1015
1015
  case arg
1016
1016
  when "" then raise TypeError.new "can't convert #{inspect_type_error(arg)}into Symbol"
1017
1017
  when ->(a) { a.respond_to?(:to_sym) } then arg.to_sym
1018
- else
1018
+ else # rubocop:disable Lint/DuplicateBranch
1019
1019
  raise TypeError.new "can't convert #{inspect_type_error(arg)}into Symbol"
1020
1020
  end
1021
1021
  rescue NoMethodError
@@ -1043,7 +1043,7 @@ module Hanami
1043
1043
  # @since 0.4.3
1044
1044
  # @api private
1045
1045
  def self.inspect_type_error(arg)
1046
- "#{(arg.respond_to?(:inspect) ? arg.inspect : arg.to_s)} "
1046
+ "#{arg.respond_to?(:inspect) ? arg.inspect : arg.to_s} "
1047
1047
  rescue NoMethodError
1048
1048
  # missing the #respond_to? method, fall back to returning the class' name
1049
1049
  begin
@@ -61,7 +61,7 @@ module Hanami
61
61
  #
62
62
  # @since 0.3.4
63
63
  # @api private
64
- CLASSIFY_WORD_SEPARATOR = /#{CLASSIFY_SEPARATOR}|#{NAMESPACE_SEPARATOR}|#{UNDERSCORE_SEPARATOR}|#{DASHERIZE_SEPARATOR}/.freeze # rubocop:disable Layout/LineLength
64
+ CLASSIFY_WORD_SEPARATOR = /#{CLASSIFY_SEPARATOR}|#{NAMESPACE_SEPARATOR}|#{UNDERSCORE_SEPARATOR}|#{DASHERIZE_SEPARATOR}/ # rubocop:disable Layout/LineLength
65
65
 
66
66
  @__transformations__ = Concurrent::Map.new
67
67
 
@@ -5,6 +5,6 @@ module Hanami
5
5
  # Defines the version
6
6
  #
7
7
  # @since 0.1.0
8
- VERSION = "2.0.0.alpha2"
8
+ VERSION = "2.0.0.beta1"
9
9
  end
10
10
  end
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.alpha2
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: 2021-05-04 00:00:00.000000000 Z
11
+ date: 2022-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-transformer
@@ -90,16 +90,16 @@ dependencies:
90
90
  name: rubocop
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - '='
93
+ - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '0.91'
95
+ version: '1.0'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - '='
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '0.91'
102
+ version: '1.0'
103
103
  description: Hanami utilities
104
104
  email:
105
105
  - me@lucaguidi.com
@@ -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
@@ -142,7 +140,8 @@ files:
142
140
  homepage: http://hanamirb.org
143
141
  licenses:
144
142
  - MIT
145
- metadata: {}
143
+ metadata:
144
+ rubygems_mfa_required: 'true'
146
145
  post_install_message:
147
146
  rdoc_options: []
148
147
  require_paths:
@@ -151,14 +150,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
151
150
  requirements:
152
151
  - - ">="
153
152
  - !ruby/object:Gem::Version
154
- version: 2.6.0
153
+ version: '3.0'
155
154
  required_rubygems_version: !ruby/object:Gem::Requirement
156
155
  requirements:
157
156
  - - ">"
158
157
  - !ruby/object:Gem::Version
159
158
  version: 1.3.1
160
159
  requirements: []
161
- rubygems_version: 3.2.4
160
+ rubygems_version: 3.3.3
162
161
  signing_key:
163
162
  specification_version: 4
164
163
  summary: Ruby core extentions and Hanami utilities