twitter-photos 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/twitter-photos.rb +3 -8
  3. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -33,13 +33,8 @@ class TwitterPhoto
33
33
  found.sort_by {|x| x.date}
34
34
  end
35
35
 
36
- # Delete all TwitterPhoto objects with the username of the given value.
37
- # @example Delete all TwitterPhoto objects where the username == 'bookis'
38
- # TwitterPhoto.delete('bookis')
39
- # @param [String] username
40
-
41
- def delete(username)
42
- TwitterPhoto.find_by_username(username).each{|x| x=nil}
36
+ def self.delete_all
37
+ ObjectSpace.each_object(TwitterPhoto) {|o| o = nil}
43
38
  end
44
39
 
45
40
  # Fetch photos from Twitpic, yFrog, Twitgoo, and TweetPhoto.
@@ -58,7 +53,7 @@ class TwitterPhoto
58
53
  # @param [Hash] options
59
54
  # exclude photo services (optional)
60
55
  def self.get_photos_by(username, options={:twitpic => true, :yfrog => true, :tweetphoto => true, :twitgoo => true})
61
- TwitterPhoto.delete(username)
56
+ TwitterPhoto.delete_all
62
57
  hydra = Typhoeus::Hydra.new
63
58
 
64
59
  twitpic_request = Typhoeus::Request.new("#{TWITPIC_URL}/photos/#{username}", :timeout => 5000)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 4
9
- version: 0.1.4
8
+ - 5
9
+ version: 0.1.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - bookis