Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

send to pangloss #3

Merged
merged 39 commits into from
Jun 15, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
628774e
- Access georss point information for photos
amuino Nov 30, 2009
280d98b
add initialization code to the plugin
amuino Dec 1, 2009
1d881bf
Properly name the initialization file.
amuino Dec 1, 2009
ee8a088
Updated installation instructions (install locally on a rails project)
amuino Dec 1, 2009
8593c75
Allows parsing some search results which do not have a <category> for…
amuino Dec 1, 2009
2ac8e40
Test two edge cases causing problems and add a fix (fix for one of th…
amuino Dec 1, 2009
73a938a
ignore .svn folders
amuino Dec 1, 2009
15c453a
fix dependency on objectify_xml so that rake gems:install does not fail
amuino Dec 3, 2009
7525196
Added gphoto:user element to the User object.
kueda Dec 21, 2009
e85ec5e
Added a License subclass to Photo.
kueda Dec 22, 2009
35de652
Added nickname, user + nickname to photo, and updated sizes.
kueda Dec 24, 2009
66336f3
Added user and nickname attributes to the Author object.
kueda Dec 28, 2009
5e21d6b
Added location attr to photo.
kueda Dec 28, 2009
c94e9f0
Added timestamp attr to Photo.
kueda Dec 28, 2009
87c8109
Fixed bug when Picasa photos had comments.
kueda Dec 29, 2009
25a82bf
update picture resolution values
Nov 11, 2010
1cab293
Merge branch 'master' of github.com:fjg/ruby_picasa
Nov 11, 2010
9f3cdeb
Revert "update picture resolution values"
Nov 11, 2010
7fb9ff2
add gemspec support and new thumbnail size
Nov 11, 2010
ef70e14
add new thumbnail sizes
Nov 11, 2010
e22343a
fix google AuthSubSessionToken url
Mar 5, 2011
e1ccbd5
Add token validation method
mfo Jan 22, 2013
119568c
on check authsubtoken - cast response.status to string for better com…
mfo Jan 22, 2013
0fd01ba
add PicasaTokenRevokedError
mfo Jan 22, 2013
3dbdd21
change valid_token from class method to instance method
mfo Jan 22, 2013
a435ed9
move method valid_token
mfo Jan 22, 2013
152f313
update signature
mfo Jan 22, 2013
bc0dfe9
rename method
mfo Jan 22, 2013
693859f
update code
mfo Jan 22, 2013
c4a3d53
feat(tech): bump to ruby 2.2.1
May 12, 2015
026e20c
fix(dependencies): add active support to dependencies list because ob…
May 12, 2015
9c27804
tech(spec): bump to rspec 3.2.3. Start fixing types_spec: User, Recen…
May 12, 2015
8b9f515
tech(spec): Fix Search, Class from XML [deprecated ruby starts_with]
May 12, 2015
ac0fdad
fix(spec): ruby_picasa_spec by updating matching
May 12, 2015
aebc65a
tech(rspec): use new convension for .rspec default opts
May 12, 2015
6bfab27
tech(devnotes): start specing
May 12, 2015
0afa288
feat(oauth2): switch authentication method from authsub to oauth2
May 18, 2015
e1b1e17
merge(US/oauth2): production rdy
May 18, 2015
87a8157
release(0.2.4): bump version
May 18, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tech(spec): bump to rspec 3.2.3. Start fixing types_spec: User, Recen…
…tPhotos, Album, Search
  • Loading branch information
mfo authored and mfo committed May 12, 2015
commit 9c278041a8c219e40aae3e03d8c67a79b99a35da
7 changes: 3 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

require 'rubygems'
require './lib/ruby_picasa.rb'
require 'spec/rake/spectask'
require 'rspec/core/rake_task'

desc "Run all specifications"
Spec::Rake::SpecTask.new(:spec) do |t|
t.libs = ['lib', 'spec']
t.spec_opts = ['--colour', '--format', 'specdoc']
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = ['--colour', '--format', 'documentation']
end

task :default => [:spec]
Expand Down
1 change: 1 addition & 0 deletions lib/ruby_picasa.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'active_support/inflector'
require 'objectify_xml'
require 'objectify_xml/atom'
require 'cgi'
Expand Down
8 changes: 4 additions & 4 deletions lib/ruby_picasa/types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ def private?

# The current page of photos in the album.
def photos(options = {})
if entries.blank? and !@photos_requested
if entries.empty? and !@photos_requested
@photos_requested = true
if session and data = feed
self.entries = data.entries
self.entries = data.entries
else
[]
end
Expand Down Expand Up @@ -324,14 +324,14 @@ class License < Objectify::ElementParser
attribute :exif_make, 'exif:make'
attribute :exif_model, 'exif:model'
attribute :exif_time, 'exif:time'

attribute :user, 'gphoto:user'
attribute :nickname, 'gphoto:nickname'
attribute :location, 'gphoto:location'
attribute :timestamp, 'gphoto:timestamp'

flatten 'georss:where'

has_one :point, RubyPicasa::Photo::Point, 'gml:Point'
has_one :author, Author, 'author'
has_one :license, RubyPicasa::Photo::License, 'gphoto:license'
Expand Down
8 changes: 4 additions & 4 deletions ruby-picasa.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Gem::Specification.new do |s|
s.version = "0.2.3"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["pangloss", "darrick@innatesoftware.com", "fjg@happycoders.org"]
s.date = %q{2010-11-11}
s.authors = ["pangloss", "darrick@innatesoftware.com", "fjg@happycoders.org", 'fourcade.m+ruby_picasa@gmail.com']
s.date = %q{2015-12-05}
s.description = %q{Provides a super easy to use object layer for authenticating and accessing Picasa through their API.}
s.email = %q{fjg@happycoders.org}
s.email = %q{fourcade.m+ruby_picasa@gmail.com}
s.extra_rdoc_files = [
"README.txt"
]
Expand Down Expand Up @@ -39,7 +39,7 @@ Gem::Specification.new do |s|
"spec/spec.opts",
"spec/spec_helper.rb"
]
s.homepage = %q{http://github.com/fjg/ruby_picasa}
s.homepage = %q{http://github.com/mfo/ruby_picasa}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.7}
Expand Down
29 changes: 14 additions & 15 deletions spec/ruby_picasa/types_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

include RubyPicasa

describe 'a RubyPicasa document', :shared => true do
shared_examples_for 'a RubyPicasa document' do
it 'should have a feed_id' do
@object.feed_id.should_not be_nil
end
Expand Down Expand Up @@ -59,15 +59,14 @@
end
end


describe User do
it_should_behave_like 'a RubyPicasa document'

before :all do
before(:all) do
@xml = open_file('user.atom').read
end

before do
before(:each) do
@parent = mock('parent')
@object = @user = User.new(@xml, @parent)
@user.session = mock('session')
Expand All @@ -77,13 +76,13 @@
@user.albums.length.should == 1
@user.albums.first.should be_an_instance_of(Album)
end

it 'should have a user' do
@user.user.should_not be_blank
@user.user.should_not be_empty
end

it 'should have a nickname' do
@user.nickname.should_not be_blank
@user.nickname.should_not be_empty
end
end

Expand Down Expand Up @@ -146,7 +145,7 @@
describe 'photos' do
it 'should use entries if available' do
@album.expects(:session).never
@album.photos.should == @album.entries
@album.photos.should eq(@album.entries)
end

it 'should request photos if needed' do
Expand All @@ -173,11 +172,11 @@
end

it 'should be public' do
@album.public?.should be_true
@album.public?.should be(true)
end

it 'should not be private' do
@album.private?.should be_false
@album.private?.should be(false)
end

describe 'first Photo' do
Expand All @@ -197,7 +196,7 @@
it 'should have a content' do
@photo.content.should be_an_instance_of(PhotoUrl)
end

it 'should have a license' do
@photo.license.should be_an_instance_of(Photo::License)
@photo.license.id.should == 0
Expand Down Expand Up @@ -270,9 +269,9 @@
{:thumbsize => '32c'}).returns(nil)
@photo.thumbnail('32c').should be_nil
end

it 'should have a timestamp' do
@photo.timestamp.should_not be_blank
@photo.timestamp.should_not be_nil
end
end
end
Expand Down Expand Up @@ -355,7 +354,7 @@
@search.entries.first.point.lat.should_not eql(0)
@search.entries.first.point.lng.should be_an_instance_of Float
@search.entries.first.point.lng.should_not eql(0)
@search.entries.first.location.should_not be_blank
@search.entries.first.location.should_not be_empty
end
end

2 changes: 1 addition & 1 deletion spec/spec.opts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--colour
--format specdoc
--format documentation
6 changes: 3 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
require 'rubygems'
require File.expand_path(File.join(File.dirname(__FILE__), '../lib/ruby_picasa'))
require 'spec'

require 'mocha'
require 'pp'

def open_file(name)
open(File.join(File.dirname(__FILE__), File.join('sample', name)))
end

Spec::Runner.configure do |config|
config.mock_with :mocha
RSpec.configure do |config|
config.mock_framework = :mocha
end