putio-cli 0.0.4 → 0.0.5
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 +8 -8
- data/lib/putio/client.rb +4 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2NhMTc3ZWEyNmQ0YmI4YTYzMjIyNjVmMmFkNzZjNWVmODIyOTVmZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWZlYWVhYTQ2YzhiZmIxNjg3OTFlMmZmMmI1ZDg1OWJjZjgyOTg0Nw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjdmZTU2ZDFlNmUzZTk5OTg5Yzg3NTgwMDcwMjk2OGNmZGU4NjJjNmU2YWQ4
|
10
|
+
NDQzNzI2YjYyZTkzOTIyNTAxMDEyMWQ2MzI4ZGViMzAxYTEwODMzYWEwZGMy
|
11
|
+
OGY1MWRkYjNhZDEwM2NmYTA1YzQzODU3OWNhY2I2NjIyOGQ0YjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDhkNWRkYjY1NjdlYmZhN2U1ZmJlMThlZTFhNWZjOGMzODNhYTZlMDEwYThm
|
14
|
+
NDlhYjI0NWYxYzFmMTJkMjAyNTkzMWMwNTVkYzJmY2FlMTZiMjNmNDZjMDI5
|
15
|
+
ZWRmOTZlMmVkMmY5MDZlMzEzZTU2ZGI1YTYzMDAxNjdjNzQ4MDg=
|
data/lib/putio/client.rb
CHANGED
@@ -479,7 +479,7 @@ module Putio
|
|
479
479
|
response = Curl.get(url) { |req| req.headers['Accept'] = 'application/json' }
|
480
480
|
end
|
481
481
|
|
482
|
-
#
|
482
|
+
# Natively parse the JSON
|
483
483
|
response = JSON::parse(response.body_str)
|
484
484
|
|
485
485
|
# And use Hashie to present it.
|
@@ -520,13 +520,9 @@ module Putio
|
|
520
520
|
response.headers['Accept'] = 'application/json'
|
521
521
|
response.http_post(Curl::PostField.file('file', file))
|
522
522
|
|
523
|
-
#
|
524
|
-
|
525
|
-
|
526
|
-
rescue Psych::SyntaxError
|
527
|
-
response = JSON::parse(response.body_str)
|
528
|
-
end
|
529
|
-
|
523
|
+
# Natively parse the JSON
|
524
|
+
response = JSON::parse(response.body_str)
|
525
|
+
|
530
526
|
# And use Hashie to present it.
|
531
527
|
response = Hashie::Mash.new(response)
|
532
528
|
end
|