picasa 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +9 -5
- data/Rakefile +1 -0
- data/VERSION.yml +2 -1
- data/lib/picasa.rb +0 -2
- data/lib/picasa/web_albums.rb +8 -3
- data/picasa.gemspec +7 -5
- data/test/picasa_test.rb +8 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -5,11 +5,6 @@ Only for public albums so far.
|
|
5
5
|
|
6
6
|
= Installation
|
7
7
|
|
8
|
-
<b>deprecated!</b>
|
9
|
-
gem sources -a http://gems.github.com
|
10
|
-
sudo gem install morgoth-picasa
|
11
|
-
|
12
|
-
<b>actual</b>
|
13
8
|
sudo gem install picasa --source http://gemcutter.org
|
14
9
|
|
15
10
|
In RAILS_ROOT/config/environment.rb
|
@@ -25,6 +20,15 @@ In RAILS_ROOT/config/environment.rb
|
|
25
20
|
#=> {:photos => [{ :title, :thumbnail_1, :thumbnail_2, :thumbnail_3, :photo },{}],
|
26
21
|
# :slideshow => "link to picasa slideshow"}
|
27
22
|
|
23
|
+
or you can set google user in initializer like this:
|
24
|
+
|
25
|
+
Picasa::WebAlbums.google_user = "google_username"
|
26
|
+
|
27
|
+
and use it:
|
28
|
+
|
29
|
+
Picasa.albums
|
30
|
+
Picasa.photos(:album_id => 'album_id')
|
31
|
+
|
28
32
|
= Copyright
|
29
33
|
|
30
34
|
Copyright (c) 2009 Wojciech Wnętrzak, released under the MIT license.
|
data/Rakefile
CHANGED
@@ -7,6 +7,7 @@ begin
|
|
7
7
|
require 'jeweler'
|
8
8
|
Jeweler::Tasks.new do |gem|
|
9
9
|
gem.name = "picasa"
|
10
|
+
gem.description = %Q{Simple Google Picasa managment}
|
10
11
|
gem.summary = %Q{simple google picasa managment}
|
11
12
|
gem.email = "w.wnetrzak@gmail.com"
|
12
13
|
gem.homepage = "http://github.com/morgoth/picasa"
|
data/VERSION.yml
CHANGED
data/lib/picasa.rb
CHANGED
@@ -4,13 +4,11 @@ require 'picasa/web_albums'
|
|
4
4
|
|
5
5
|
module Picasa
|
6
6
|
def self.albums(options = {})
|
7
|
-
raise ArgumentError.new("You must specify google_user") unless options[:google_user]
|
8
7
|
web_albums = Picasa::WebAlbums.new(options[:google_user])
|
9
8
|
web_albums.albums
|
10
9
|
end
|
11
10
|
|
12
11
|
def self.photos(options = {})
|
13
|
-
raise ArgumentError.new("You must specify google_user") unless options[:google_user]
|
14
12
|
raise ArgumentError.new("You must specify album_id") unless options[:album_id]
|
15
13
|
web_albums = Picasa::WebAlbums.new(options[:google_user])
|
16
14
|
web_albums.photos(options[:album_id])
|
data/lib/picasa/web_albums.rb
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
module Picasa
|
2
2
|
class WebAlbums
|
3
|
-
|
3
|
+
attr_reader :google_user
|
4
4
|
|
5
|
-
def
|
6
|
-
|
5
|
+
def self.google_user=(user)
|
6
|
+
@@google_user = user
|
7
|
+
end
|
8
|
+
|
9
|
+
def initialize(user)
|
10
|
+
@google_user = user || @@google_user
|
11
|
+
raise ArgumentError.new("You must specify google_user") unless @google_user
|
7
12
|
end
|
8
13
|
|
9
14
|
def albums
|
data/picasa.gemspec
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{picasa}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Wojciech
|
12
|
-
s.date = %q{2009-
|
11
|
+
s.authors = ["Wojciech Wn\304\231trzak"]
|
12
|
+
s.date = %q{2009-11-29}
|
13
|
+
s.description = %q{Simple Google Picasa managment}
|
13
14
|
s.email = %q{w.wnetrzak@gmail.com}
|
14
15
|
s.extra_rdoc_files = [
|
15
16
|
"LICENSE",
|
@@ -53,3 +54,4 @@ Gem::Specification.new do |s|
|
|
53
54
|
s.add_dependency(%q<xml-simple>, [">= 0"])
|
54
55
|
end
|
55
56
|
end
|
57
|
+
|
data/test/picasa_test.rb
CHANGED
@@ -37,7 +37,7 @@ class PicasaTest < Test::Unit::TestCase
|
|
37
37
|
|
38
38
|
should "Raise argument error if google user is not present" do
|
39
39
|
assert_raise ArgumentError do
|
40
|
-
Picasa.
|
40
|
+
Picasa::WebAlbums.new
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
@@ -46,4 +46,11 @@ class PicasaTest < Test::Unit::TestCase
|
|
46
46
|
Picasa.photos :google_user => 'some.user'
|
47
47
|
end
|
48
48
|
end
|
49
|
+
|
50
|
+
should "Not raise argument error if google user is set by class variable" do
|
51
|
+
Picasa::WebAlbums.google_user = "some.user"
|
52
|
+
assert_nothing_raised do
|
53
|
+
Picasa::WebAlbums.new(nil)
|
54
|
+
end
|
55
|
+
end
|
49
56
|
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.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Wojciech Wn\xC4\x99trzak"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-29 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: "0"
|
24
24
|
version:
|
25
|
-
description:
|
25
|
+
description: Simple Google Picasa managment
|
26
26
|
email: w.wnetrzak@gmail.com
|
27
27
|
executables: []
|
28
28
|
|