liverails_api 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/api/live_rail.rb +2 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eaef7bf5a496a41ae1af74094e6776d4ba080b0a
|
|
4
|
+
data.tar.gz: 1989829eb110be76fa28508667008ad3271205db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 130a863154516ac4226434ce134e01735fd1a92e7a7b12f693aa004def19d273bfc016521dc363d2666ca4b7ca386a23bfe3b61c19ad7e6f9acf09ef6099b4a4
|
|
7
|
+
data.tar.gz: 26447f3ca680782325158e26ae65c37b37ba0babae68893cea3d18800db3e31a9d7004ee213d11327c625391680edfce991a03bc1166f743e166ee61b19c56db
|
data/lib/api/live_rail.rb
CHANGED
|
@@ -1746,8 +1746,7 @@ class LiveRail
|
|
|
1746
1746
|
path="/login/"
|
|
1747
1747
|
password = Digest::MD5.hexdigest(@password)
|
|
1748
1748
|
response = request path, { username:@username,
|
|
1749
|
-
password:password
|
|
1750
|
-
}
|
|
1749
|
+
password:password }
|
|
1751
1750
|
|
|
1752
1751
|
if(response['liverailapi']['status'] == 'success')
|
|
1753
1752
|
@auth_token = response['liverailapi']['auth']['token']
|
|
@@ -1775,11 +1774,9 @@ class LiveRail
|
|
|
1775
1774
|
def request(path, body)
|
|
1776
1775
|
|
|
1777
1776
|
body[:token] = @auth_token if @auth_token
|
|
1778
|
-
resource = RestClient::Resource.new @url
|
|
1777
|
+
resource = RestClient::Resource.new @url, :timeout => 120, :open_timeout => 120
|
|
1779
1778
|
response = resource[path].post body.to_query
|
|
1780
1779
|
|
|
1781
|
-
p response
|
|
1782
|
-
|
|
1783
1780
|
response = Crack::XML.parse(response)
|
|
1784
1781
|
response = JSON.parse(response.to_json)
|
|
1785
1782
|
|