rail-locator-api 1.0.10 → 1.0.11

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: fa780b0bdf76961e9942cb732dd9b8c3f3adc76e6886d1054306f5b6e44b0bfc
4
+ data.tar.gz: 5df1ba1e341d87f2c1a93e414c5eb9a2fec22da89588c7e50a7a96fc99187543
5
5
  SHA512:
6
- metadata.gz: 230d7a53891909a97314b5a708c0d2e702013cd8e78faedbd1e5e3b04c9b658abdaff83239bb8883079a0c7b99f3284f7ab09fc2a8a0c029f8351eb415af7099
7
- data.tar.gz: d768ac7908a79afd4bee6571a060fec929711e4e96a4bd59aa6045a48269e6e4b0613bb0da5644bfd0db583440d12efa49a93d6798d2b47de3966be5300340b5
6
+ metadata.gz: 48cc9c072fe704d9bd3427895b0c3160a865594685ff68b04f291b056c036a6511b441f3e507eedfd57af47abee40e6ddb73be59323b7cc18b786fc2008ac2ae
7
+ data.tar.gz: 22c44abda89283ed7bdfd267c7fe769f65f4992a2fe0c13bdbf683865b59ba9b7b2c9e69de2a5360e415d46b8d9ee36862feda95213773bfad49d0db48b0622e
@@ -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
@@ -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.11"
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.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Osetrov