sncf 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: 543bad488723801d92911a47e70904a3d63b0fa1
4
- data.tar.gz: 68db2da4c6a30470aa09128fcc27c348a18ae659
3
+ metadata.gz: a026f1bfe24c4ced4665a384074384d182d5517f
4
+ data.tar.gz: c7aa7f84fe05f301775fffdc25e0a9d72cdb9781
5
5
  SHA512:
6
- metadata.gz: 0290f41f58c8a1c97e19bff538e6436f66f8371dd407e32c0df22eff59755ed6759d67b65c6d445cd1ad42ba6ed3df87e938cfa724a716332ec145cd82d2f9c5
7
- data.tar.gz: 3bc2960d5ffc40813b9ceb4aa68de1b18f6087f67ad5292aeea1900f3c26b98db0b7df941ebcc931da914514e36fbf7f01017ca639597a63d33e2269a2a90af5
6
+ metadata.gz: 3cd58abdb81144af7542fbb382897b533efb87c6b521f22e3a03240947e4387fd1544b6fcfe138463f7a4a77139c6b887761974f268904c6fb90183eaa170ff1
7
+ data.tar.gz: f1be502d88ca5583b585ee9dff93899e895d858a96a3199cc76da123cf68d383b89d1b69f84f142ac79bf63ca296e0f9e80265f7f2d4cfa940c867e73a35e7d7
@@ -55,10 +55,10 @@ module Sncf
55
55
  protected
56
56
 
57
57
  def construct_formated_url(path, additional_params)
58
- if additional_params.nil?
58
+ if additional_params.nil? || additional_params.empty?
59
59
  "#{BASE_URL}/#{VERSION_PATH}/#{path}"
60
60
  else
61
- "#{BASE_URL}/#{VERSION_PATH}/#{path}?#{URI.encode_www_form(additional_params)}"
61
+ "#{BASE_URL}/#{VERSION_PATH}/#{path}?#{additional_params.map{|k,v| "#{k}=#{v}"}.join('&')}"
62
62
  end
63
63
  end
64
64
  end
data/lib/sncf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sncf
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sncf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rémi Delhaye