dc_tunnel 0.0.7 → 0.0.8
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/dc_tunnel.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 425fd14241af543d80b93019524dceb331d720d9f4ff41f9a9227325cbccb967
|
4
|
+
data.tar.gz: f1815dfad14be6208d829d75a05ae615dc6988ece8354b71c409cec50bb72448
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 735164e698903c298d1024a4957d9324729526990e9629b7e7c5a181dff1ce54362e6bb2571b4a5614f3d24ee774f9a95e094538b3a42d9e1754921c4cc44c17
|
7
|
+
data.tar.gz: 7e455ff8163296ac563f9b030a67aedcb740ea96281107a9170ee1c9cc9abbeaa94d79fd9dd31c629fa6aace0484152557e80de271492776770452c0e093681f
|
data/lib/dc_tunnel.rb
CHANGED
@@ -21,7 +21,7 @@ class DcTunnel
|
|
21
21
|
res
|
22
22
|
end
|
23
23
|
|
24
|
-
def http_post(url, postdata)
|
24
|
+
def http_post(url, postdata={})
|
25
25
|
puts "--- Tunnel : start get #{url} "
|
26
26
|
res = Net::HTTP.post_form(URI(url), postdata).body
|
27
27
|
res = JSON.parse(res).symbolize_keys(true)
|
@@ -59,11 +59,11 @@ class DcTunnel
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def login(phone,password)
|
62
|
-
self.http_post('/users/login',{phone:phone,password:password}
|
62
|
+
self.http_post self.sso_path('/users/login'),{phone:phone,password:password}
|
63
63
|
end
|
64
64
|
|
65
65
|
def logout(sso_id)
|
66
|
-
self.http_post("/users/#{sso_id}/logout",{})
|
66
|
+
self.http_post self.sso_path("/users/#{sso_id}/logout",{})
|
67
67
|
end
|
68
68
|
|
69
69
|
def synchronize_users
|