rail-locator-api 0.1.6 → 0.1.11

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: fd9b0658d02439340c1357986bf4b74d8ba36ccf495e71cff5dbb81020e8c186
4
- data.tar.gz: 80fc9b7fc56d3fb8903d4aa187f984b52c24b8e173880b130848261068559e8b
3
+ metadata.gz: f4116acecc37e9c45d4555f0edfa0a976a7d9b371d68cfa251d7cc9070e1972e
4
+ data.tar.gz: e82ea4484f36be5cec4666543a9bd83b82f6253a842be94fe03fd1adabeed9be
5
5
  SHA512:
6
- metadata.gz: 429006dfda86fcc5645f22796fd4e9f2e5f81c00d4fb31748c6544a52050a9f3a105b82bb4edb8adf71879e51c1a7bb8b83774dd2a404f0af01a948c83be5f91
7
- data.tar.gz: 7e4700cb44aa1ae7b264538d61ecc8600ecd00c58968af6268bfd656081701d91f0e1d4ff7fdd11e8bfbaffd5151f374d8cd526104b098f763c324fb81b197d3
6
+ metadata.gz: 74d3391f55d3815fe5170a1e87521b1c133622c4d5ad9c8b75595e1f5dc92a1c9c1014f5db0e5866dbcabce0f8e7399d00d5b01f5127d84888de27c48c160d3b
7
+ data.tar.gz: 7006b7960aa5bb4ea79108d30b548039352c376eb534c4832bfbc309d5966c9b366bd81e0726e0b4f87a2e51311bcffccd430420f9f11ad5f32c9631cc51e7da
@@ -1,5 +1,5 @@
1
1
  defaults: &defaults
2
- API_ENDPOINT: "http://soap.ctm.ru:8112"
2
+ API_ENDPOINT: "https://soap.ctm.ru:8112"
3
3
 
4
4
  API_AUTH_METHOD: "api_key"
5
5
  API_KEY: "***"
@@ -143,8 +143,8 @@ module RailLocatorApi
143
143
 
144
144
  def rest_client(suffix=nil)
145
145
  client = Faraday.new("#{self.api_url}#{suffix.present? ? "/#{suffix}": ""}", proxy: self.proxy,
146
- ssl: { version: self.ssl_options }) do |faraday|
147
- faraday.use :gzip
146
+ ssl: self.ssl_options) do |faraday|
147
+ faraday.request :gzip
148
148
  faraday.response :raise_error
149
149
  faraday.adapter adapter
150
150
  if @request_builder.debug
@@ -42,7 +42,7 @@ module RailLocatorApi
42
42
  end
43
43
 
44
44
  def method_missing(method, *args)
45
- @path_parts << method.to_s.gsub("_", "-").downcase
45
+ @path_parts << method.to_s.downcase
46
46
  @path_parts << args if args.length > 0
47
47
  @path_parts.flatten!
48
48
  self
@@ -1,3 +1,3 @@
1
1
  module RailLocatorApi
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.11"
3
3
  end
@@ -16,7 +16,7 @@ module RailLocatorApi
16
16
  payload = "grant_type=#{RailLocatorApi.keycloak_grant_type}&client_id=#{RailLocatorApi.keycloak_client_id}&client_secret=#{RailLocatorApi.keycloak_client_secret}&code=#{RailLocatorApi::Request.api_key}&redirect_uri=#{RailLocatorApi.keycloak_redirect_uri}"
17
17
  end
18
18
  connection = Faraday.new(RailLocatorApi.keycloak_token_url, proxy: nil,
19
- ssl: { version: "TLSv1_2" }) do |faraday|
19
+ ssl: RailLocatorApi::Request.ssl_options || { version: "TLSv1_2" }) do |faraday|
20
20
  faraday.adapter Faraday.default_adapter
21
21
  faraday.response :logger, ::Logger.new(STDOUT), bodies: true
22
22
  end
@@ -31,7 +31,7 @@ module RailLocatorApi
31
31
  def refresh_access_token
32
32
  payload = "grant_type=refresh_token&client_id=#{RailLocatorApi.keycloak_client_id}&client_secret=#{RailLocatorApi.keycloak_client_secret}&refresh_token=#{RailLocatorApi::Request.refresh_token}&redirect_uri=#{RailLocatorApi.keycloak_redirect_uri}"
33
33
  connection = Faraday.new(RailLocatorApi.keycloak_token_url, proxy: nil,
34
- ssl: { version: "TLSv1_2" }) do |faraday|
34
+ ssl: RailLocatorApi::Request.ssl_options || { version: "TLSv1_2" }) do |faraday|
35
35
  faraday.adapter Faraday.default_adapter
36
36
  faraday.response :logger, ::Logger.new(STDOUT), bodies: true
37
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rail-locator-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Osetrov
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.16.0
19
+ version: 2.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.16.0
26
+ version: 2.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday-gzip
29
29
  requirement: !ruby/object:Gem::Requirement