rail-locator-api 1.0.10 → 1.0.12

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: 5ad8eb20790a5683007906ec6e12336b735e02ba8f8c21001002741c30af168a
4
- data.tar.gz: b760d9b7833e224221bb7fdb85c52b014d3a369e32681ea1d1465d3a192ef7f6
3
+ metadata.gz: 1db47939ffbe75e3324c58e1ab8edc312f74f13ccb877ed4525924022410704c
4
+ data.tar.gz: e73d04269a7b07c7dda89a0bd637b39090b3a5913ecbd18bd051604f7c25ece0
5
5
  SHA512:
6
- metadata.gz: 230d7a53891909a97314b5a708c0d2e702013cd8e78faedbd1e5e3b04c9b658abdaff83239bb8883079a0c7b99f3284f7ab09fc2a8a0c029f8351eb415af7099
7
- data.tar.gz: d768ac7908a79afd4bee6571a060fec929711e4e96a4bd59aa6045a48269e6e4b0613bb0da5644bfd0db583440d12efa49a93d6798d2b47de3966be5300340b5
6
+ metadata.gz: fe658bb79c6e569a5d877793bfc8c3bc04e01a4ff710b37254a61352914aa986f88393e5f9e04a9c74e9fe9cacdf6c5e145917c0e21b65382f6ba91ad1a919b7
7
+ data.tar.gz: f9873e7eac52d2456812d3826e70663c6080386c9e524af42816431cce7f780c9d2ec728890f65abc705dcda8ea40ca03e574279d80c23a3776b84f029ce5e63
@@ -222,17 +222,19 @@ module RailLocatorApi
222
222
  end
223
223
 
224
224
  def api_url
225
- case @request_builder.path_parts.first
226
- when "lk"
227
- lk_api_url
228
- when "app"
229
- app_api_url
230
- when "union"
231
- @request_builder.path_parts_shift
232
- union_api_url
233
- else
234
- base_api_url
235
- end + @request_builder.path
225
+ first_path = @request_builder.path_parts.first
226
+ url = case @request_builder.path_parts.first
227
+ when "lk"
228
+ lk_api_url
229
+ when "app"
230
+ app_api_url
231
+ when "union"
232
+ union_api_url
233
+ else
234
+ base_api_url
235
+ end
236
+ @request_builder.path_parts.shift if first_path == "union"
237
+ url + @request_builder.path
236
238
  end
237
239
 
238
240
  def base_api_url
@@ -248,7 +250,7 @@ module RailLocatorApi
248
250
  end
249
251
 
250
252
  def union_api_url
251
- "http://192.168.88.174:8000/api/v1.0/"
253
+ "http://192.168.88.38:8000/api/v1.0/"
252
254
  end
253
255
  end
254
256
  end
@@ -76,10 +76,6 @@ module RailLocatorApi
76
76
  @path_parts
77
77
  end
78
78
 
79
- def path_parts_shift
80
- @path_parts.shift
81
- end
82
-
83
79
  def path
84
80
  @path_parts.join('/')
85
81
  end
@@ -1,3 +1,3 @@
1
1
  module RailLocatorApi
2
- VERSION = "1.0.10"
2
+ VERSION = "1.0.12"
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.10
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Osetrov