rail-locator-api 1.0.20 → 1.0.22

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: a20fbfff3ee17bbb4c78e6e5b736d9d26ce9600681b7420ed45dcbe5dd406bbc
4
- data.tar.gz: 18693f2ca6182901a1555d5ac740cda4bf2854a3dbd253eb4f4f3ac3ec386d67
3
+ metadata.gz: a89affa906350df328eda936e774ca59ec04face936911a7882ea171f1d7e08c
4
+ data.tar.gz: cddc9e9f8e4401be3881d2729393f7281bacd83adacf509007801d31983cd165
5
5
  SHA512:
6
- metadata.gz: 259e5dc17f9073102223fb1ba6517560df3e6d71809546b700d554cd08336c52f7c8ee89fbbe91397ddea8671a36686df9b028a282c45fe9b05f67819aa327fd
7
- data.tar.gz: '08e4fa15ec8829284ab5c366c96cecc166b4007824915002e688d6e54fae27a64995668ead4f7ae622c94de05d565fbd2feac0fa617f4928e77b89ab672c7ea4'
6
+ metadata.gz: 71218635555f286fceaad6790fb0ebf0e547d92f4161154043e411f471235f5bda18aeee32faaf85cf550f4db1d725044bb6ad8df83613914274a113f5d78de5
7
+ data.tar.gz: 59f18698cfa2a5f00594fcec92e31f56c0c52ed25fd241b1fb7a5dde08754cecc276abb4e6ba5bb22a27978ef3e6cfe1154012cba4eac565e86fceb0b943c70b
@@ -1,7 +1,8 @@
1
1
  defaults: &defaults
2
2
  API_ENDPOINT: "https://rail-scan.com"
3
3
  UNION_ENDPOINT: "http://192.168.88.38:8000"
4
-
4
+ NOTIFY_ENDPOINT: "http://192.168.1.153:3003"
5
+
5
6
  API_AUTH_METHOD: "api_key"
6
7
  API_KEY: "***"
7
8
 
@@ -16,6 +17,7 @@ defaults: &defaults
16
17
  production:
17
18
  <<: *defaults
18
19
  UNION_ENDPOINT: "http://192.168.1.88:3500"
20
+ NOTIFY_ENDPOINT: "http://192.168.1.153:3003"
19
21
  development:
20
22
  <<: *defaults
21
23
  test:
@@ -126,6 +126,10 @@ module RailLocatorApi
126
126
  @request_builder.union_endpoint
127
127
  end
128
128
 
129
+ def notify_endpoint
130
+ @request_builder.notify_endpoint
131
+ end
132
+
129
133
  def timeout
130
134
  @request_builder.timeout
131
135
  end
@@ -287,7 +291,7 @@ module RailLocatorApi
287
291
  else
288
292
  base_api_url
289
293
  end
290
- @request_builder.path_parts.shift if first_path == "union"
294
+ @request_builder.path_parts.shift if %w[union notify].include?(first_path)
291
295
  url + @request_builder.path
292
296
  end
293
297
 
@@ -308,7 +312,7 @@ module RailLocatorApi
308
312
  end
309
313
 
310
314
  def notify_api_url
311
- "http://192.168.1.153:3003/"
315
+ "#{RailLocatorApi.notify_endpoint}/"
312
316
  end
313
317
  end
314
318
  end
@@ -1,7 +1,7 @@
1
1
  module RailLocatorApi
2
2
  class Request
3
3
  attr_accessor :access_token, :refresh_token, :api_user_id, :api_key, :api_user_email, :api_user_password,
4
- :api_auth_method, :api_endpoint, :union_endpoint,
4
+ :api_auth_method, :api_endpoint, :union_endpoint, :notify_endpoint,
5
5
  :timeout, :open_timeout, :proxy, :ssl_options, :faraday_adapter, :symbolize_keys, :debug, :debug_options,
6
6
  :without_ratelimit, :is_allow_access_to_coordinates, :logger, :test, :language
7
7
 
@@ -135,7 +135,8 @@ module RailLocatorApi
135
135
 
136
136
  class << self
137
137
  attr_accessor :access_token, :refresh_token, :api_user_id, :api_key, :api_user_email, :api_user_password, :api_auth_method,
138
- :timeout, :open_timeout, :api_endpoint, :union_endpoint, :proxy, :ssl_options, :faraday_adapter, :symbolize_keys,
138
+ :timeout, :open_timeout, :api_endpoint, :union_endpoint, :notify_endpoint,
139
+ :proxy, :ssl_options, :faraday_adapter, :symbolize_keys,
139
140
  :debug, :debug_options, :without_ratelimit, :is_allow_access_to_coordinates, :logger, :test, :language
140
141
 
141
142
  def method_missing(sym, *args, &block)
@@ -1,3 +1,3 @@
1
1
  module RailLocatorApi
2
- VERSION = "1.0.20"
2
+ VERSION = "1.0.22"
3
3
  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: 1.0.20
4
+ version: 1.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Osetrov