picasa 0.6.2 → 0.6.3
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/.travis.yml +1 -0
- data/Gemfile +1 -1
- data/README.md +2 -2
- data/lib/picasa/client.rb +2 -1
- data/lib/picasa/version.rb +1 -1
- data/picasa.gemspec +7 -6
- data/test/client_test.rb +14 -0
- data/test/helper.rb +1 -1
- metadata +10 -9
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -34,10 +34,10 @@ You can authenticate by specifing password:
|
|
34
34
|
client = Picasa::Client.new(user_id: "some.user@gmail.com", password: "secret")
|
35
35
|
```
|
36
36
|
|
37
|
-
Or by setting custom authorization header, i.e. taken from OAuth authentication:
|
37
|
+
Or by setting custom authorization header, i.e. taken from [OAuth](https://developers.google.com/accounts/docs/OAuth2) authentication (your secret access token after "Bearer" or "OAuth" words):
|
38
38
|
|
39
39
|
```ruby
|
40
|
-
client = Picasa::Client.new(user_id: "some.user@gmail.com", authorization_header: "Bearer access-token")
|
40
|
+
client = Picasa::Client.new(user_id: "some.user@gmail.com", authorization_header: "Bearer <access-token>")
|
41
41
|
```
|
42
42
|
|
43
43
|
### Proxy
|
data/lib/picasa/client.rb
CHANGED
data/lib/picasa/version.rb
CHANGED
data/picasa.gemspec
CHANGED
@@ -2,13 +2,14 @@
|
|
2
2
|
require File.expand_path('../lib/picasa/version', __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
|
-
gem.
|
6
|
-
gem.email =
|
7
|
-
gem.description = %q{
|
8
|
-
gem.summary = %q{
|
5
|
+
gem.author = "Wojciech Wnętrzak"
|
6
|
+
gem.email = "w.wnetrzak@gmail.com"
|
7
|
+
gem.description = %q{Ruby client for Google Picasa API}
|
8
|
+
gem.summary = %q{Simple Google Picasa managment}
|
9
9
|
gem.homepage = "https://github.com/morgoth/picasa"
|
10
|
+
gem.license = "MIT"
|
10
11
|
|
11
|
-
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
12
13
|
gem.files = `git ls-files`.split("\n")
|
13
14
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
15
|
gem.name = "picasa"
|
@@ -19,5 +20,5 @@ Gem::Specification.new do |gem|
|
|
19
20
|
|
20
21
|
gem.add_development_dependency "webmock"
|
21
22
|
gem.add_development_dependency "mocha", ">= 0.13.0"
|
22
|
-
gem.add_development_dependency "vcr"
|
23
|
+
gem.add_development_dependency "vcr", ">= 2.4.0"
|
23
24
|
end
|
data/test/client_test.rb
CHANGED
@@ -12,6 +12,20 @@ describe Picasa::Client do
|
|
12
12
|
assert_equal "OAuth token", client.authorization_header
|
13
13
|
end
|
14
14
|
|
15
|
+
it "allows to set password on instance" do
|
16
|
+
client = Picasa::Client.new(:user_id => "john.doe", :password => "unknown")
|
17
|
+
client.password = "secret"
|
18
|
+
|
19
|
+
assert_equal "secret", client.password
|
20
|
+
end
|
21
|
+
|
22
|
+
it "allows to set authorization_header on instance" do
|
23
|
+
client = Picasa::Client.new(:user_id => "john.doe")
|
24
|
+
client.authorization_header = "Bearer some-token"
|
25
|
+
|
26
|
+
assert_equal "Bearer some-token", client.authorization_header
|
27
|
+
end
|
28
|
+
|
15
29
|
describe "#authenticate" do
|
16
30
|
it "successfully authenticates" do
|
17
31
|
VCR.use_cassette("auth-success") do
|
data/test/helper.rb
CHANGED
@@ -16,7 +16,7 @@ MultiJson.adapter = ENV["JSON_PARSER"] || "oj"
|
|
16
16
|
VCR.configure do |c|
|
17
17
|
c.cassette_library_dir = "test/cassettes"
|
18
18
|
c.hook_into :webmock
|
19
|
-
c.default_cassette_options = {:preserve_exact_body_bytes => true}
|
19
|
+
c.default_cassette_options = {:preserve_exact_body_bytes => true}
|
20
20
|
c.filter_sensitive_data("<FILTERED>") { AuthHeader }
|
21
21
|
c.filter_sensitive_data("<FILTERED>") { Password }
|
22
22
|
end
|
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.6.
|
4
|
+
version: 0.6.3
|
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:
|
12
|
+
date: 2013-01-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ! '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 2.4.0
|
70
70
|
type: :development
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,10 +74,9 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
78
|
-
description:
|
79
|
-
email:
|
80
|
-
- w.wnetrzak@gmail.com
|
77
|
+
version: 2.4.0
|
78
|
+
description: Ruby client for Google Picasa API
|
79
|
+
email: w.wnetrzak@gmail.com
|
81
80
|
executables: []
|
82
81
|
extensions: []
|
83
82
|
extra_rdoc_files: []
|
@@ -158,7 +157,8 @@ files:
|
|
158
157
|
- test/template_test.rb
|
159
158
|
- test/utils_test.rb
|
160
159
|
homepage: https://github.com/morgoth/picasa
|
161
|
-
licenses:
|
160
|
+
licenses:
|
161
|
+
- MIT
|
162
162
|
post_install_message:
|
163
163
|
rdoc_options: []
|
164
164
|
require_paths:
|
@@ -180,5 +180,6 @@ rubyforge_project:
|
|
180
180
|
rubygems_version: 1.8.24
|
181
181
|
signing_key:
|
182
182
|
specification_version: 3
|
183
|
-
summary:
|
183
|
+
summary: Simple Google Picasa managment
|
184
184
|
test_files: []
|
185
|
+
has_rdoc:
|