magnum-pi 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.rdoc +4 -0
- data/VERSION +1 -1
- data/lib/magnum-pi/api/consumer.rb +7 -1
- data/lib/magnum-pi/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWE5Y2ZlZmRhNGRiZDA0YjllZDYxNTRjOTVkYWY5YWM1MWY1NDdiYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2EyZmFmYjc1NTZkNjcwNTBjNDYwNDg2MGFiYmIyZThmODAwYjg0Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmQ4NWIzNTFjYzhiYmJkN2NmNDc4MGNiZjZlZjk2ODMxZGNjYWNjMjJkZTE4
|
10
|
+
ODIwZDcyMjU1NDVjMjNmNWQyNWYwYzdjMzY1MGQwZjMwZjM5OGUwYzY2ZTQw
|
11
|
+
ZDgxNGZlMDljYzgxNGJhNTMwNzA0ODIxMjk5M2Q1YTE0MTA4MWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTg1NTM2ODU3NzY2NjBiNjFmYjI5NTA3Mzc2ODkzNjlhOGI0OWJiNTIzOTc2
|
14
|
+
YmFjNGY4ZWI2NGQxZDVjN2I3MWJjNjEyYTg2ZTg0NzVlOGZkMmFkMzIzNDNl
|
15
|
+
NTE1MzlkZDc1NjNmNTRmZjBjYTljNjc3MDIzZGIxNjM0ZmRhOWE=
|
data/CHANGELOG.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.8
|
@@ -19,7 +19,13 @@ module MagnumPI
|
|
19
19
|
FileUtils.mkdir_p File.dirname(target)
|
20
20
|
file = File.open target, "w"
|
21
21
|
begin
|
22
|
-
|
22
|
+
options = {:method => method, :headers => {"User-Agent" => agent.user_agent}}
|
23
|
+
if method.to_s.downcase == "get"
|
24
|
+
options[:params] = params
|
25
|
+
else
|
26
|
+
options[:body] = params
|
27
|
+
end
|
28
|
+
request = Typhoeus::Request.new url, options
|
23
29
|
request.on_headers {|response| raise "Failed to download #{target}" unless (response.response_code / 200) == 1}
|
24
30
|
request.on_body {|chunk| file.write chunk.force_encoding("UTF-8")}
|
25
31
|
request.run
|
data/lib/magnum-pi/version.rb
CHANGED