sblogistica 0.0.5 → 0.0.8

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: bc5149fe910a241513f66b45efb28ce0775d73225c9b96236a6c5e1aeee4550f
4
- data.tar.gz: b350ed36fa639115803c650591dfb8c2364d3b6233674970fe18c8c0791ecb2d
3
+ metadata.gz: babfe587c20865aeae89c7c943ebd2d208e68f429cbf9c7569e5e2871861fb4e
4
+ data.tar.gz: b83d16401ca1e9c6b33960140ccf2615bdfaf35d488a4d5126abb770d4dbca1a
5
5
  SHA512:
6
- metadata.gz: 948c74362b6cf771b4ec5b7535d92575293ef525503038c1a00769b99a6f27a985ae2c6ab05452aca54eb48326871263b5a2958912f7ff88e24471a5bdee2e71
7
- data.tar.gz: a7b04bc3fc50beb3885c7bae945cc66ea7cad30ffd0cad3eca3168dc04b7bab03fd7aaaabd95c4de984d18e8abdc3d1031c03c5f15b69d20d63e4be6964fa9b9
6
+ metadata.gz: 94d9326f0692e05f0be5b397fc90601a163d316a74f9747d4f969f7785105bd0d1473356e05fbe9ca3138e32842a31d733c13d41664092a5959518f8e418cf6c
7
+ data.tar.gz: 9a25f2432b0f3f21af73cea537e9efb876994e9c4bc5460417ae6230c87361fca5a945cd40d971293d5e6a24f10efb22ec41ba8300bd185e9bbaf35d6bddc4b1
@@ -23,7 +23,7 @@ module Sblogistica
23
23
  end
24
24
 
25
25
  def method_missing(method, *args)
26
- @path_parts << method.to_s
26
+ @path_parts << method.to_s.gsub('_', '-')
27
27
  @path_parts << args if args.length > 0
28
28
  @path_parts.flatten!
29
29
  self
@@ -1,3 +1,3 @@
1
1
  module Sblogistica
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.8"
3
3
  end
data/lib/sblogistica.rb CHANGED
@@ -19,13 +19,9 @@ module Sblogistica
19
19
  end
20
20
  end
21
21
  response = client.post do |request|
22
- request.body = MultiJson.dump({
23
- type: Sblogistica.api_grant_type,
24
- client_id: Sblogistica.api_client_id,
25
- client_secret: Sblogistica.api_client_secret,
26
- username: Sblogistica.api_username,
27
- password: Sblogistica.api_password
28
- })
22
+ request.headers['Content-Type'] = 'application/x-www-form-urlencoded'
23
+ request.headers['User-Agent'] = "Sblogistica/#{Sblogistica::VERSION} Ruby gem"
24
+ request.body = "grant_type=#{Sblogistica.api_grant_type}&client_id=#{Sblogistica.api_client_id}&client_secret=#{Sblogistica.api_client_secret}&username=#{Sblogistica.api_username}&password=#{Sblogistica.api_password}"
29
25
  end
30
26
  JSON.parse(response.body)
31
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sblogistica
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Osetrov