kapellmeister 0.5.2 → 0.6.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: 65df134d38610bef8c1c89f632803eef251d6046c1bfef73c25caf650b648f6d
4
- data.tar.gz: 62f579b1cd2352bb50d3d1caf95a10294df4722ca7023208b6a62db4569d95a8
3
+ metadata.gz: 4469ce7f200030e5215269a415737eeb448029bac1e0ea60f238ab9d68eefd6d
4
+ data.tar.gz: 4a9387ea59601ed6b2413cae95b4dd4b05690492c331a4ed2d7f18f191b04a32
5
5
  SHA512:
6
- metadata.gz: 838227f3ec1ba4cacb440b57cf54bb506fdeac42046bfa2b7e52884dc35e7f0f31cde3c2275af7e348f981ceb0aef65146bd37544056b1a0f71a1475445467c2
7
- data.tar.gz: 9cd3ca9fb50713c4991ab6044bd45258eaeb2179b8403f87ab87cbfa47a9bd9a5312dc59c9fd16e8129a83f3eb952a9ee9e61ae6bb1499071e61999553072596
6
+ metadata.gz: b3ed10ab1cf0c69d4e0a18aadb3f9b124d7b1f35040dfc67f89e96d931b1226f7aa2f81bd557998d3176912cd2a2a75ed0d9bd4b39cc18596c679b3bb14cc971
7
+ data.tar.gz: 3c3ad070259adcb1ba6ec7ac4bcc68a1faa9266bfb5ec50919bd93266698564d04849a43b2bea8afd0ce1ce13e35b30868d2fddce512617166e538cd71dbddb9
@@ -9,7 +9,9 @@ class <%= class_name %>::Configuration
9
9
  def url
10
10
  raise "No given host to #{self.class.name}" unless host
11
11
 
12
- https = ssl.presence || true
12
+ https = true
13
+ https = ssl unless ssl.nil?
14
+ https = <%= class_name %>.ssl unless <%= class_name %>.ssl.nil?
13
15
 
14
16
  "URI::HTTP#{https.to_b ? 'S' : ''}".constantize.build(host:, path: [path, version].join('/'))
15
17
  end
@@ -28,8 +28,8 @@ module Kapellmeister::Base
28
28
  def self.routes_scheme_parse(path)
29
29
  template = ERB.new(File.read(path)).result
30
30
  YAML.safe_load(template, aliases: true, permitted_classes: [Symbol, Date, Time]).deep_symbolize_keys
31
- rescue Errno::ENOENT => e
32
- warn "No such file or directory", path
31
+ rescue Errno::ENOENT
32
+ warn 'No such file or directory', path
33
33
  {}
34
34
  end
35
35
  end
@@ -10,14 +10,14 @@ class Kapellmeister::Dispatcher
10
10
 
11
11
  FailedResponse = Struct.new(:success?, :response, :payload)
12
12
 
13
- def connection_by(method_name, path, data = {}, query = {})
13
+ def connection_by(method_name, path, data = {})
14
14
  additional_headers = data.delete(:headers) || {}
15
15
  requests_data = data.delete(:request) || {}
16
16
 
17
- generated_connection = connection(additional_headers:, requests_data:)
17
+ generated_connection = connection(additional_headers: additional_headers, requests_data: requests_data) # rubocop:disable Style/HashSyntax (for support ruby 2.4+)
18
18
 
19
19
  process generated_connection.run_request(method_name.downcase.to_sym, path, data.to_json, additional_headers)
20
- rescue NoMethodError, NameError, RuntimeError
20
+ rescue NameError, RuntimeError
21
21
  raise "Library can't process method #{method_name} yet"
22
22
  rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e
23
23
  failed_response(details: e.message)
@@ -12,7 +12,7 @@ class Kapellmeister::Responder
12
12
  def result
13
13
  error = !/2\d{2}/.match?(status.to_s)
14
14
 
15
- Result.new(!error, parsed_body, { status: }.merge(payload))
15
+ Result.new(!error, parsed_body, { status: status }.merge(payload)) # rubocop:disable Style/HashSyntax (for support ruby 2.4+)
16
16
  rescue JSON::ParserError => e
17
17
  Result.new(false, e)
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module Kapellmeister
2
- VERSION = '0.5.2'.freeze
2
+ VERSION = '0.6.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kapellmeister
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DarkWater
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-14 00:00:00.000000000 Z
11
+ date: 2022-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-schema