callee 0.3.0 → 0.3.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
  SHA256:
3
- metadata.gz: 2cd3eb00898ba86ebe6cac2bdcfcfe9a38b3a9c6d1a11560e9059b0228e6a9d7
4
- data.tar.gz: 2d9da3e5362ef6396c0363c8705680afe1d790cb529398020e558112526cc320
3
+ metadata.gz: ba252c0758fffc65527412544e3249c7aaac3ca928669d7c0b181085fade9c2e
4
+ data.tar.gz: 2066d648cf31858f7062e3bac60ca1a0c9ea01ac204082878d58946781588b2a
5
5
  SHA512:
6
- metadata.gz: e0a17b8c9882e591bc6f4d65cff41ddc9e167df1fcde57526cd768cdc58cbc9ae0158eba17dcf5add6a5b3aa3150454ddc84223ca3fe83ab2ad65f7ce58506d1
7
- data.tar.gz: 8357f85f64715b32b591473d8dfeedcfcdb86eeabedd627168a3d179be5b63afa7e18598a0b92d8eb480cdb3946dbc95b3de09a17f736e5fd51aee84f6e85ffc
6
+ metadata.gz: 1a8905542c8cfca32309c5d5afa0b1594dce7e1cbc0f28c89da3bb70c494de459aa6a2f1b8aff9ab72d6c810ee5f0ef828ea1f9ace4d752eb4dca8a73917dc46
7
+ data.tar.gz: 494c7757fca739056cbefc6422e164ca6de39721a5dd7b6434c0b5230a28a4c2b8979c13a9df29257be730c32b6b81bd0a8167f0a98034789a2ca575cca07394
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.3.2] - 2019-12-24
8
+
9
+ - Simplify `#call` params propagation.
10
+
7
11
  ## [0.2.2] - 2019-08-07
8
12
 
9
13
  - Fix nil param value handling.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- callee (0.3.0)
4
+ callee (0.3.2)
5
5
  dry-initializer (>= 2.5, < 4.0)
6
6
 
7
7
  GEM
@@ -91,12 +91,12 @@ DEPENDENCIES
91
91
  guard-minitest (~> 2.4, >= 2.4.6)
92
92
  minitest (~> 5.0)
93
93
  minitest-reporters (~> 1.3, >= 1.3.6)
94
- pry (~> 0.12.2)
94
+ pry (~> 0.12)
95
95
  rake (~> 10.0)
96
- rb-readline (~> 0.5.5)
97
- rubocop (~> 0.72.0)
96
+ rb-readline (~> 0.5)
97
+ rubocop (~> 0.72)
98
98
  simplecov (~> 0.17)
99
- standard (~> 0.1.0)
99
+ standard (~> 0.1)
100
100
 
101
101
  BUNDLED WITH
102
102
  2.0.2
@@ -31,10 +31,10 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency "guard-minitest", "~> 2.4", ">= 2.4.6"
32
32
  spec.add_development_dependency "minitest", "~> 5.0"
33
33
  spec.add_development_dependency "minitest-reporters", "~> 1.3", ">= 1.3.6"
34
- spec.add_development_dependency "pry", "~> 0.12.2"
34
+ spec.add_development_dependency "pry", "~> 0.12"
35
35
  spec.add_development_dependency "rake", "~> 10.0"
36
- spec.add_development_dependency "rb-readline", "~> 0.5.5"
37
- spec.add_development_dependency "rubocop", "~> 0.72.0"
36
+ spec.add_development_dependency "rb-readline", "~> 0.5"
37
+ spec.add_development_dependency "rubocop", "~> 0.72"
38
38
  spec.add_development_dependency "simplecov", "~> 0.17"
39
- spec.add_development_dependency "standard", "~> 0.1.0"
39
+ spec.add_development_dependency "standard", "~> 0.1"
40
40
  end
@@ -9,26 +9,15 @@ module Callee
9
9
 
10
10
  module ClassMethods
11
11
  def call(*params, **options, &block)
12
- create_callable(params, options).call(&block)
12
+ new(*params, **options).call(&block)
13
13
  end
14
14
 
15
15
  def to_proc
16
16
  method(:call).to_proc
17
17
  end
18
-
19
- private
20
-
21
- def create_callable(params, options)
22
- has_params = !params.empty?
23
- has_options = !options.empty?
24
- return new(*params, **options) if has_params && has_options
25
- return new(*params) if has_params
26
- return new(**options) if has_options
27
- new
28
- end
29
18
  end
30
19
 
31
20
  def call
32
- raise NotImplementedError
21
+ raise "Not implemented"
33
22
  end
34
23
  end
@@ -1,3 +1,3 @@
1
1
  module Callee
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: callee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Musayev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-03 00:00:00.000000000 Z
11
+ date: 2019-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-initializer
@@ -118,14 +118,14 @@ dependencies:
118
118
  requirements:
119
119
  - - "~>"
120
120
  - !ruby/object:Gem::Version
121
- version: 0.12.2
121
+ version: '0.12'
122
122
  type: :development
123
123
  prerelease: false
124
124
  version_requirements: !ruby/object:Gem::Requirement
125
125
  requirements:
126
126
  - - "~>"
127
127
  - !ruby/object:Gem::Version
128
- version: 0.12.2
128
+ version: '0.12'
129
129
  - !ruby/object:Gem::Dependency
130
130
  name: rake
131
131
  requirement: !ruby/object:Gem::Requirement
@@ -146,28 +146,28 @@ dependencies:
146
146
  requirements:
147
147
  - - "~>"
148
148
  - !ruby/object:Gem::Version
149
- version: 0.5.5
149
+ version: '0.5'
150
150
  type: :development
151
151
  prerelease: false
152
152
  version_requirements: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - "~>"
155
155
  - !ruby/object:Gem::Version
156
- version: 0.5.5
156
+ version: '0.5'
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: rubocop
159
159
  requirement: !ruby/object:Gem::Requirement
160
160
  requirements:
161
161
  - - "~>"
162
162
  - !ruby/object:Gem::Version
163
- version: 0.72.0
163
+ version: '0.72'
164
164
  type: :development
165
165
  prerelease: false
166
166
  version_requirements: !ruby/object:Gem::Requirement
167
167
  requirements:
168
168
  - - "~>"
169
169
  - !ruby/object:Gem::Version
170
- version: 0.72.0
170
+ version: '0.72'
171
171
  - !ruby/object:Gem::Dependency
172
172
  name: simplecov
173
173
  requirement: !ruby/object:Gem::Requirement
@@ -188,14 +188,14 @@ dependencies:
188
188
  requirements:
189
189
  - - "~>"
190
190
  - !ruby/object:Gem::Version
191
- version: 0.1.0
191
+ version: '0.1'
192
192
  type: :development
193
193
  prerelease: false
194
194
  version_requirements: !ruby/object:Gem::Requirement
195
195
  requirements:
196
196
  - - "~>"
197
197
  - !ruby/object:Gem::Version
198
- version: 0.1.0
198
+ version: '0.1'
199
199
  description: Callee provides a standardized way to define callable classes with a
200
200
  strict params specification, based on dry-initializer
201
201
  email: