picasa 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,24 +5,20 @@ Only for public albums so far.
5
5
 
6
6
  = Installation
7
7
 
8
- sudo gem install picasa --source http://gemcutter.org
9
-
10
- In RAILS_ROOT/config/environment.rb
11
-
12
- config.gem "picasa"
8
+ gem install picasa
13
9
 
14
10
  == Usage
15
11
 
16
12
  Picasa.albums(:google_user => 'google_username')
17
- #=> [ {:id => "666", :title => "satan-album", :photos_count => 6, :photo => "url",
18
- # :thumbnail => "url", :slideshow => "url"},
13
+ # => [ {:id => "666", :title => "satan-album", :photos_count => 6, :photo => "url",
14
+ # :thumbnail => "url", :slideshow => "url", :summary => "summary"},
19
15
  # {another one} ]
20
16
 
21
17
  Picasa.photos(:google_user => 'google_username', :album_id => 'album_id')
22
18
  #=> {:photos => [{ :title, :thumbnail_1, :thumbnail_2, :thumbnail_3, :photo },{}],
23
19
  # :slideshow => "link to picasa slideshow"}
24
20
 
25
- or you can set google user in initializer like this:
21
+ or you can set google user for all requests like this:
26
22
 
27
23
  Picasa.config do |c|
28
24
  c.google_user = 'google.user'
data/Rakefile CHANGED
@@ -25,7 +25,7 @@ end
25
25
  require 'rake/testtask'
26
26
  Rake::TestTask.new(:test) do |test|
27
27
  test.libs << 'lib' << 'test'
28
- test.pattern = 'test/**/*_test.rb'
28
+ test.pattern = 'test/**/test_*.rb'
29
29
  test.verbose = true
30
30
  end
31
31
 
@@ -33,7 +33,7 @@ begin
33
33
  require 'rcov/rcovtask'
34
34
  Rcov::RcovTask.new do |test|
35
35
  test.libs << 'test'
36
- test.pattern = 'test/**/*_test.rb'
36
+ test.pattern = 'test/**/test_*.rb'
37
37
  test.verbose = true
38
38
  end
39
39
  rescue LoadError
@@ -42,21 +42,16 @@ rescue LoadError
42
42
  end
43
43
  end
44
44
 
45
+ task :test => :check_dependencies
45
46
 
46
47
  task :default => :test
47
48
 
48
49
  require 'rake/rdoctask'
49
50
  Rake::RDocTask.new do |rdoc|
50
- if File.exist?('VERSION.yml')
51
- config = YAML.load(File.read('VERSION.yml'))
52
- version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
53
- else
54
- version = ""
55
- end
51
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
56
52
 
57
53
  rdoc.rdoc_dir = 'rdoc'
58
54
  rdoc.title = "picasa #{version}"
59
55
  rdoc.rdoc_files.include('README*')
60
56
  rdoc.rdoc_files.include('lib/**/*.rb')
61
57
  end
62
-
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 1
4
+ :patch: 2
5
5
  :build:
@@ -12,4 +12,4 @@ module Picasa
12
12
  end
13
13
  Config.instance
14
14
  end
15
- end
15
+ end
@@ -13,6 +13,7 @@ module Picasa
13
13
  attributes = {}
14
14
  attributes[:id] = album['id'][1]
15
15
  attributes[:title] = album['title'][0]['content']
16
+ attributes[:summary] = album['summary'][0]['content']
16
17
  attributes[:photos_count] = album['numphotos'][0].to_i
17
18
  attributes[:photo] = album['group'][0]['content']['url']
18
19
  attributes[:thumbnail] = album['group'][0]['thumbnail'][0]['url']
@@ -28,11 +29,10 @@ module Picasa
28
29
  photos = []
29
30
  xml['entry'].each do |photo|
30
31
  attributes = {}
31
- attributes[:title] = photo['group'][0]['description'][0]['content'] #returns nil if empty
32
+ attributes[:title] = photo['group'][0]['description'][0]['content']
32
33
  attributes[:thumbnail_1] = photo['group'][0]['thumbnail'][0]['url']
33
34
  attributes[:thumbnail_2] = photo['group'][0]['thumbnail'][1]['url']
34
35
  attributes[:thumbnail_3] = photo['group'][0]['thumbnail'][2]['url']
35
- #attributes[:photo] << photo['group'][0]['content']['url']
36
36
  attributes[:photo] = photo['content']['src']
37
37
  photos << attributes
38
38
  end if xml['entry']
@@ -46,4 +46,4 @@ module Picasa
46
46
  Net::HTTP.get(URI.parse(full_url))
47
47
  end
48
48
  end
49
- end
49
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{picasa}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Wojciech Wnętrzak"]
12
- s.date = %q{2010-01-27}
12
+ s.date = %q{2010-08-01}
13
13
  s.description = %q{Simple Google Picasa managment}
14
14
  s.email = %q{w.wnetrzak@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -27,28 +27,28 @@ Gem::Specification.new do |s|
27
27
  "lib/picasa/config.rb",
28
28
  "lib/picasa/web_albums.rb",
29
29
  "picasa.gemspec",
30
- "test/config_test.rb",
31
30
  "test/fixtures/albums",
32
31
  "test/fixtures/photos",
33
- "test/test_helper.rb",
34
- "test/web_albums_test.rb"
32
+ "test/helper.rb",
33
+ "test/test_config.rb",
34
+ "test/test_web_albums.rb"
35
35
  ]
36
36
  s.homepage = %q{http://github.com/morgoth/picasa}
37
37
  s.rdoc_options = ["--charset=UTF-8"]
38
38
  s.require_paths = ["lib"]
39
- s.rubygems_version = %q{1.3.5}
39
+ s.rubygems_version = %q{1.3.7}
40
40
  s.summary = %q{simple google picasa managment}
41
41
  s.test_files = [
42
- "test/web_albums_test.rb",
43
- "test/config_test.rb",
44
- "test/test_helper.rb"
42
+ "test/test_web_albums.rb",
43
+ "test/test_config.rb",
44
+ "test/helper.rb"
45
45
  ]
46
46
 
47
47
  if s.respond_to? :specification_version then
48
48
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
49
49
  s.specification_version = 3
50
50
 
51
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
51
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
52
  s.add_runtime_dependency(%q<xml-simple>, [">= 0"])
53
53
  s.add_development_dependency(%q<test-unit>, [">= 2.0.6"])
54
54
  s.add_development_dependency(%q<fakeweb>, [">= 0"])
File without changes
@@ -1,6 +1,6 @@
1
- require 'test_helper'
1
+ require 'helper'
2
2
 
3
- class ConfigTest < Test::Unit::TestCase
3
+ class TestConfig < Test::Unit::TestCase
4
4
  test "Not raise argument error if google user is set by configuration block" do
5
5
  Picasa.config do |c|
6
6
  c.google_user = 'some.user'
@@ -1,6 +1,6 @@
1
- require 'test_helper'
1
+ require 'helper'
2
2
 
3
- class WebAlbumsTest < Test::Unit::TestCase
3
+ class TestWebAlbums < Test::Unit::TestCase
4
4
  test 'Should parse albums page' do
5
5
  page = fixture_file('albums')
6
6
  FakeWeb.register_uri(:get, "picasaweb.google.com/data/feed/api/user/some.user", :response => page)
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picasa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 2
8
+ - 2
9
+ version: 0.2.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - "Wojciech Wn\xC4\x99trzak"
@@ -9,39 +14,50 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-01-27 00:00:00 +01:00
17
+ date: 2010-08-01 00:00:00 +02:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: xml-simple
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
20
25
  requirements:
21
26
  - - ">="
22
27
  - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
23
30
  version: "0"
24
- version:
31
+ type: :runtime
32
+ version_requirements: *id001
25
33
  - !ruby/object:Gem::Dependency
26
34
  name: test-unit
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
30
38
  requirements:
31
39
  - - ">="
32
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 2
43
+ - 0
44
+ - 6
33
45
  version: 2.0.6
34
- version:
46
+ type: :development
47
+ version_requirements: *id002
35
48
  - !ruby/object:Gem::Dependency
36
49
  name: fakeweb
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ none: false
40
53
  requirements:
41
54
  - - ">="
42
55
  - !ruby/object:Gem::Version
56
+ segments:
57
+ - 0
43
58
  version: "0"
44
- version:
59
+ type: :development
60
+ version_requirements: *id003
45
61
  description: Simple Google Picasa managment
46
62
  email: w.wnetrzak@gmail.com
47
63
  executables: []
@@ -62,11 +78,11 @@ files:
62
78
  - lib/picasa/config.rb
63
79
  - lib/picasa/web_albums.rb
64
80
  - picasa.gemspec
65
- - test/config_test.rb
66
81
  - test/fixtures/albums
67
82
  - test/fixtures/photos
68
- - test/test_helper.rb
69
- - test/web_albums_test.rb
83
+ - test/helper.rb
84
+ - test/test_config.rb
85
+ - test/test_web_albums.rb
70
86
  has_rdoc: true
71
87
  homepage: http://github.com/morgoth/picasa
72
88
  licenses: []
@@ -77,25 +93,29 @@ rdoc_options:
77
93
  require_paths:
78
94
  - lib
79
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
+ none: false
80
97
  requirements:
81
98
  - - ">="
82
99
  - !ruby/object:Gem::Version
100
+ segments:
101
+ - 0
83
102
  version: "0"
84
- version:
85
103
  required_rubygems_version: !ruby/object:Gem::Requirement
104
+ none: false
86
105
  requirements:
87
106
  - - ">="
88
107
  - !ruby/object:Gem::Version
108
+ segments:
109
+ - 0
89
110
  version: "0"
90
- version:
91
111
  requirements: []
92
112
 
93
113
  rubyforge_project:
94
- rubygems_version: 1.3.5
114
+ rubygems_version: 1.3.7
95
115
  signing_key:
96
116
  specification_version: 3
97
117
  summary: simple google picasa managment
98
118
  test_files:
99
- - test/web_albums_test.rb
100
- - test/config_test.rb
101
- - test/test_helper.rb
119
+ - test/test_web_albums.rb
120
+ - test/test_config.rb
121
+ - test/helper.rb