picasa 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,7 @@ notifications:
5
5
  rvm:
6
6
  - 1.8.7
7
7
  - 1.9.3
8
+ - 2.0.0
8
9
 
9
10
  env:
10
11
  - JSON_PARSER=oj
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem "vcr", :github => "myronmarston/vcr"
5
+ gem "multi_json", "1.3.7" # https://github.com/intridea/multi_json/pull/74
6
6
  gem "rake"
7
7
  gem "minitest", "3.5.0", :platform => :ruby_18
8
8
 
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
@@ -1,6 +1,7 @@
1
1
  module Picasa
2
2
  class Client
3
- attr_reader :user_id, :password, :authorization_header
3
+ attr_reader :user_id
4
+ attr_accessor :password, :authorization_header
4
5
 
5
6
  # @param [Hash] credentials
6
7
  # @option credentials [String] :user_id google username/email
@@ -1,3 +1,3 @@
1
1
  module Picasa
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
@@ -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.authors = ["Wojciech Wnętrzak"]
6
- gem.email = ["w.wnetrzak@gmail.com"]
7
- gem.description = %q{Simple Google Picasa managment}
8
- gem.summary = %q{simple google picasa managment}
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
@@ -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
@@ -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} # Avoid stroing headers as binary
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.2
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: 2012-11-27 00:00:00.000000000 Z
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: '0'
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: '0'
78
- description: Simple Google Picasa managment
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: simple google picasa managment
183
+ summary: Simple Google Picasa managment
184
184
  test_files: []
185
+ has_rdoc: