request_handler 2.2.0 → 2.3.0

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: 84a7da676c652eb23c13f36d57e89b8808909c404a6874fb76b2f7c56a72b8f7
4
- data.tar.gz: 8aeea4b06cfacba6ef4553974c07e705b6482753cd49bb3322d18c1a86faeb1b
3
+ metadata.gz: b88d675dc64b12fded56d60d939381a1d41fa888e96ea2110a656099fb0f4c8e
4
+ data.tar.gz: 4884507eced978bb57ebdd46595f7fabfde30b4d71b107c41926f0fb4de447c9
5
5
  SHA512:
6
- metadata.gz: f9ac556ccfe78a670a5733cae9cb1ca2b3030119150feab16b73953336621e25657f6f9598c8e50d93cd9fcae05c633d65a9c96f6002c6fd09d3789706a92b24
7
- data.tar.gz: f1d9f617c904954c7029d3d065ddeb2ab19f6a232b9f54bc2e03d528f0be02e77edec90971002c003bad1bfbd8fc4f01094c562526c3baa80c7bc54ea8fcb2f0
6
+ metadata.gz: 1c634f7d572ff681fb4e6576ce5a8e86105aa635591c0643eb7a42b8d71a9910d12b0bff33cf49b7b8fcd6be2a340b48491e326b7912e31753079ecada26e4cf
7
+ data.tar.gz: 6bedbe868de000a1e8981907d8341cfaccf4f028580fc5f9ee10ec4497c69101d1b18618e43cfb59eb5eaaf20fceeed62402a0e1671d7b9ffb1d6587568cad1c
data/.circleci/config.yml CHANGED
@@ -19,7 +19,7 @@ common_steps: &common_steps
19
19
  - vendor/bundle
20
20
 
21
21
  - run: ruby -v
22
- - run:
22
+ - run:
23
23
  name: run tests
24
24
  command: |
25
25
  mkdir /tmp/test-results
@@ -51,6 +51,11 @@ jobs:
51
51
  - image: circleci/ruby:2.7
52
52
  steps:
53
53
  *common_steps
54
+ ruby-3.0:
55
+ docker:
56
+ - image: circleci/ruby:3.0
57
+ steps:
58
+ *common_steps
54
59
  jruby-9.3:
55
60
  docker:
56
61
  - image: circleci/jruby:9.3
@@ -70,5 +75,6 @@ workflows:
70
75
  jobs:
71
76
  - ruby-2.6
72
77
  - ruby-2.7
78
+ - ruby-3.0
73
79
  - jruby-9.3
74
- - jruby-9.3-indy
80
+ - jruby-9.3-indy
data/CHANGELOG.md CHANGED
@@ -4,7 +4,9 @@ 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/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [Unreleased]
7
+ ## [2.3.0] - 2022-06-29
8
+ ### Changed
9
+ - Explicitly pass kwargs to support ruby 3.0
8
10
 
9
11
  ## [2.2.0] - 2022-02-25
10
12
  ### Changed
@@ -106,7 +106,7 @@ module RequestHandler
106
106
  end
107
107
 
108
108
  def parse_headers
109
- HeaderParser.new(header_parser_params).run
109
+ HeaderParser.new(**header_parser_params).run
110
110
  end
111
111
 
112
112
  def header_parser_params
@@ -12,7 +12,7 @@ module RequestHandler
12
12
  type = type.to_sym unless type.nil?
13
13
  PARSER_MAPPING
14
14
  .fetch(type) { raise InternalArgumentError.new(detail: "parser for type '#{type}' not found") }
15
- .new(args)
15
+ .new(**args)
16
16
  end
17
17
 
18
18
  PARSER_MAPPING = {
@@ -17,7 +17,7 @@ module RequestHandler
17
17
  end
18
18
 
19
19
  def self.validate!(value, schema, options: {})
20
- validate(value, schema, options).tap do |result|
20
+ validate(value, schema, options: options).tap do |result|
21
21
  valid = result.respond_to?(:valid?) ? result.valid? : result.success?
22
22
  raise Validation::Error unless valid
23
23
  end
@@ -21,7 +21,7 @@ module RequestHandler
21
21
  if options.empty?
22
22
  schema_instance?(schema) ? schema.call(value) : schema.new.call(value)
23
23
  else
24
- schema_instance?(schema) ? schema.with(options).call(value) : schema.new(options).call(value)
24
+ schema_instance?(schema) ? schema.with(**options).call(value) : schema.new(**options).call(value)
25
25
  end
26
26
  end
27
27
 
@@ -34,7 +34,7 @@ module RequestHandler
34
34
  end
35
35
 
36
36
  def self.validate!(value, schema, options: {})
37
- validate(value, schema, options).tap do |result|
37
+ validate(value, schema, options: options).tap do |result|
38
38
  valid = result.respond_to?(:valid?) ? result.valid? : result.success?
39
39
  raise Validation::Error unless valid
40
40
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RequestHandler
4
- VERSION = '2.2.0'.freeze
4
+ VERSION = '2.3.0'.freeze
5
5
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.description = 'shared base for request_handler using dry-* gems'
15
15
  spec.homepage = 'https://github.com/runtastic/request_handler'
16
16
  spec.license = 'MIT'
17
- spec.required_ruby_version = '~> 2.6'
17
+ spec.required_ruby_version = '>= 2.6'
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
20
20
  f.match(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: request_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Eger
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-03-11 00:00:00.000000000 Z
12
+ date: 2022-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: docile
@@ -325,7 +325,7 @@ require_paths:
325
325
  - lib
326
326
  required_ruby_version: !ruby/object:Gem::Requirement
327
327
  requirements:
328
- - - "~>"
328
+ - - ">="
329
329
  - !ruby/object:Gem::Version
330
330
  version: '2.6'
331
331
  required_rubygems_version: !ruby/object:Gem::Requirement