tram-policy 2.0.1 → 2.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62e24e677712a455503a6cdfb1a06105bfc715b6c10791f56297144e30e0cc47
4
- data.tar.gz: 213699c6edddeb75e92b27c6d5b71fa854aa07028e89ccaa40a4e3d75ff53d8d
3
+ metadata.gz: 3bf029c2eff265f0a29f13d7f1c44b8f8a1a9d5a336a61a9804c9740142eba17
4
+ data.tar.gz: ccee1509e523eeb4e55208b357e561f03100844d32ec3a14d879ad6991b8f538
5
5
  SHA512:
6
- metadata.gz: 7dab0ecbd390dd168fc73f06fc62a694f7f624aa2902d96993a5085ad8bb9700388c01aee4def9c44b01676923525a4472bbcf59d985f0c378a888c16c7de29f
7
- data.tar.gz: 7c67890830b6836b47ef93f242984b3bf18af94f276823793998f78ec29443dfafc0bd5c46dd5fa97e6692876cc123307379cd4a497f802ee909ae7160ed9c7a
6
+ metadata.gz: d193c0d20344f0ab8c2b015e7a5eee330ef4fec64182c298ad750b06081894d6d8f51d89c064bc8aa7561e7f8d68ccd3f03f55a4378677781ba0bdf4e8376cd0
7
+ data.tar.gz: 0b0214db5420f51dadb31028d1a75b2cb54b762ccf013d6948a6eb47fb2b6ca4825dfe747921b80aa732de0b27e89faf74a353a005a5c0237c0267df8681a421
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [2.1.0] - [2021-11-30]
8
+
9
+ ### Fixed
10
+ - Difference between last positional and keyword arguments in Ruby 3.0+ (mrexox)
11
+
7
12
  ## [2.0.1] - [2019-11-14]
8
13
 
9
14
  ### Fixed
@@ -218,3 +223,5 @@ This is a first public release (@nepalez, @charlie-wasp, @JewelSam, @sergey-chec
218
223
  [1.0.0]: https://github.com/tram-rb/tram-policy/compare/v0.4.0...v1.0.0
219
224
  [1.0.1]: https://github.com/tram-rb/tram-policy/compare/v1.0.0...v1.0.1
220
225
  [2.0.0]: https://github.com/tram-rb/tram-policy/compare/v1.0.1...v2.0.0
226
+ [2.0.1]: https://github.com/tram-rb/tram-policy/compare/v2.0.0...v2.0.1
227
+ [2.1.0]: https://github.com/tram-rb/tram-policy/compare/v2.0.1...v2.1.0
@@ -18,8 +18,8 @@ class Tram::Policy
18
18
  # @param [Object] *args
19
19
  # @return [Tram::Policy]
20
20
  #
21
- def [](*args)
22
- new(*args)
21
+ def [](*args, **kwargs)
22
+ new(*args, **kwargs)
23
23
  end
24
24
 
25
25
  # Sets the root scope of the policy and its subclasses
@@ -105,8 +105,8 @@ class Tram::Policy
105
105
  true
106
106
  end
107
107
 
108
- def method_missing(name, *args, &block)
109
- args.any? || block ? super : tags[name]
108
+ def method_missing(name, *args, **kwargs, &block)
109
+ args.any? || kwargs.any? || block ? super : tags[name]
110
110
  end
111
111
  end
112
112
  end
data/lib/tram/policy.rb CHANGED
@@ -101,7 +101,7 @@ module Tram
101
101
 
102
102
  private
103
103
 
104
- def initialize(*)
104
+ def initialize(*, **)
105
105
  super
106
106
 
107
107
  self.class.validators.each do |validator|
data/tram-policy.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "tram-policy"
3
- gem.version = "2.0.1"
3
+ gem.version = "2.1.0"
4
4
  gem.author = ["Viktor Sokolov (gzigzigzeo)", "Andrew Kozin (nepalez)"]
5
5
  gem.email = "andrew.kozin@gmail.com"
6
- gem.homepage = "https://github.com/tram/tram-policy"
6
+ gem.homepage = "https://github.com/tram-rb/tram-policy"
7
7
  gem.summary = "Policy Object Pattern"
8
8
  gem.license = "MIT"
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tram-policy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Viktor Sokolov (gzigzigzeo)
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-11-14 00:00:00.000000000 Z
12
+ date: 2021-11-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dry-initializer
@@ -160,7 +160,7 @@ files:
160
160
  - spec/tram/policy/validation_error_spec.rb
161
161
  - spec/tram/policy_spec.rb
162
162
  - tram-policy.gemspec
163
- homepage: https://github.com/tram/tram-policy
163
+ homepage: https://github.com/tram-rb/tram-policy
164
164
  licenses:
165
165
  - MIT
166
166
  metadata: {}
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  requirements: []
182
- rubygems_version: 3.0.6
182
+ rubygems_version: 3.1.6
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: Policy Object Pattern