picasa 0.5.3 → 0.5.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.
- data/README.md +5 -0
- data/lib/picasa/connection.rb +14 -1
- data/lib/picasa/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -40,6 +40,10 @@ Or by setting custom authorization header, i.e. taken from OAuth authentication:
|
|
40
40
|
client = Picasa::Client.new(user_id: "some.user@gmail.com", authorization_header: "OAuth token")
|
41
41
|
```
|
42
42
|
|
43
|
+
### Proxy
|
44
|
+
|
45
|
+
You can connect via proxy server setting `https_proxy` or `HTTPS_PROXY` environment variable to valid URL.
|
46
|
+
|
43
47
|
## Extra
|
44
48
|
|
45
49
|
You can install thor script for uploading all photos from given directory:
|
@@ -97,6 +101,7 @@ MultiXml.parser = :libxml
|
|
97
101
|
* [jsaak](https://github.com/jsaak)
|
98
102
|
* [Javier Guerra](https://github.com/javierg)
|
99
103
|
* [Eiichi Takebuchi](https://github.com/GRGSIBERIA)
|
104
|
+
* [TADA Tadashi](https://github.com/tdtds)
|
100
105
|
|
101
106
|
## Copyright
|
102
107
|
|
data/lib/picasa/connection.rb
CHANGED
@@ -55,7 +55,12 @@ module Picasa
|
|
55
55
|
|
56
56
|
def http(url = API_URL)
|
57
57
|
uri = URI.parse(url)
|
58
|
-
|
58
|
+
|
59
|
+
if proxy?
|
60
|
+
http = Net::HTTP::Proxy(proxy_uri.host, proxy_uri.port, proxy_uri.user, proxy_uri.password).new(uri.host, uri.port)
|
61
|
+
else
|
62
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
63
|
+
end
|
59
64
|
http.use_ssl = true
|
60
65
|
http
|
61
66
|
end
|
@@ -82,5 +87,13 @@ module Picasa
|
|
82
87
|
"Content-Type" => "application/atom+xml"
|
83
88
|
}
|
84
89
|
end
|
90
|
+
|
91
|
+
def proxy_uri
|
92
|
+
@proxy_uri ||= URI.parse(ENV["https_proxy"] || ENV["HTTPS_PROXY"])
|
93
|
+
end
|
94
|
+
|
95
|
+
def proxy?
|
96
|
+
ENV.has_key?("https_proxy") || ENV.has_key?("HTTPS_PROXY")
|
97
|
+
end
|
85
98
|
end
|
86
99
|
end
|
data/lib/picasa/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: picasa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_xml
|