twitphoto 0.1.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/Gemfile.lock +23 -0
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/lib/adaptors.rb +2 -0
- data/lib/twitphoto.rb +82 -0
- data/test/test_twitphoto.rb +53 -26
- data/twitphoto.gemspec +10 -4
- metadata +41 -13
data/Gemfile
CHANGED
@@ -6,6 +6,8 @@ source "http://rubygems.org"
|
|
6
6
|
# Add dependencies to develop your gem here.
|
7
7
|
# Include everything needed to run rake, tests, features, etc.
|
8
8
|
group :development do
|
9
|
+
gem "yajl-ruby"
|
10
|
+
gem "twitter"
|
9
11
|
gem "shoulda", ">= 0"
|
10
12
|
gem "bundler", "~> 1.0.0"
|
11
13
|
gem "jeweler", "~> 1.6.2"
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,35 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
+
addressable (2.2.4)
|
5
|
+
faraday (0.5.7)
|
6
|
+
addressable (~> 2.2.4)
|
7
|
+
multipart-post (~> 1.1.0)
|
8
|
+
rack (< 2, >= 1.1.0)
|
9
|
+
faraday_middleware (0.3.2)
|
10
|
+
faraday (~> 0.5.4)
|
4
11
|
git (1.2.5)
|
12
|
+
hashie (1.0.0)
|
5
13
|
jeweler (1.6.2)
|
6
14
|
bundler (~> 1.0)
|
7
15
|
git (>= 1.2.5)
|
8
16
|
rake
|
17
|
+
multi_json (0.0.5)
|
18
|
+
multi_xml (0.2.1)
|
19
|
+
multipart-post (1.1.0)
|
20
|
+
rack (1.3.0)
|
9
21
|
rake (0.9.2)
|
10
22
|
rcov (0.9.9)
|
11
23
|
shoulda (2.11.3)
|
24
|
+
simple_oauth (0.1.4)
|
25
|
+
twitter (1.1.2)
|
26
|
+
faraday (~> 0.5.4)
|
27
|
+
faraday_middleware (~> 0.3.1)
|
28
|
+
hashie (~> 1.0.0)
|
29
|
+
multi_json (~> 0.0.5)
|
30
|
+
multi_xml (~> 0.2.0)
|
31
|
+
simple_oauth (~> 0.1.3)
|
32
|
+
yajl-ruby (0.8.2)
|
12
33
|
|
13
34
|
PLATFORMS
|
14
35
|
ruby
|
@@ -18,3 +39,5 @@ DEPENDENCIES
|
|
18
39
|
jeweler (~> 1.6.2)
|
19
40
|
rcov
|
20
41
|
shoulda
|
42
|
+
twitter
|
43
|
+
yajl-ruby
|
data/Rakefile
CHANGED
@@ -16,8 +16,8 @@ Jeweler::Tasks.new do |gem|
|
|
16
16
|
gem.name = "twitphoto"
|
17
17
|
gem.homepage = "http://github.com/scosman/twitphoto"
|
18
18
|
gem.license = "MIT"
|
19
|
-
gem.summary = "a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitpic, yfrog, instagram
|
20
|
-
gem.description = "a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitpic, yfrog, instagram
|
19
|
+
gem.summary = "a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitter/photobucket, twitpic, yfrog, instagram and twitphoto/plixi/lockerz"
|
20
|
+
gem.description = "a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitter/photobucket, twitpic, yfrog, instagram and tweetphoto/plixi/lockerz. It also includes support for the twitter gem, which helps with expanding t.co and bit.ly shortened URLs. Flickr is not supported as it would require a service call."
|
21
21
|
gem.email = "delrox@live.com"
|
22
22
|
gem.authors = ["Steve Cosman"]
|
23
23
|
# dependencies defined in Gemfile
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.0
|
data/lib/adaptors.rb
CHANGED
data/lib/twitphoto.rb
CHANGED
@@ -1,8 +1,23 @@
|
|
1
1
|
require 'adaptors'
|
2
2
|
|
3
|
+
module TwitPhoto
|
3
4
|
class TwitPhoto
|
4
5
|
|
5
6
|
public
|
7
|
+
|
8
|
+
# gets all of the photo URLs from a blog of text
|
9
|
+
#
|
10
|
+
# == Parameters:
|
11
|
+
# text::
|
12
|
+
# the text you want to extract media from
|
13
|
+
#
|
14
|
+
# == Returns:
|
15
|
+
# return::
|
16
|
+
# an array of URLs as strings (not URI objects)
|
17
|
+
#
|
18
|
+
# == Example:
|
19
|
+
# Get photo URLs from a block of text
|
20
|
+
# TwitPhoto::TwitPhoto.getPhotoUrlsFromText "Hello http://yfrog.com/kfx6gdj http://yfrog.com/klmjxyej"
|
6
21
|
def self.getPhotoUrlsFromText(text)
|
7
22
|
urlStrings = URI.extract text
|
8
23
|
results = []
|
@@ -17,6 +32,18 @@ class TwitPhoto
|
|
17
32
|
return results
|
18
33
|
end
|
19
34
|
|
35
|
+
# extracts the media url from a shortened url (if possible)
|
36
|
+
#
|
37
|
+
# == Parameters:
|
38
|
+
# url::
|
39
|
+
# The URL as a string (not URI)
|
40
|
+
#
|
41
|
+
# == Returns:
|
42
|
+
# return::
|
43
|
+
# A media URL as a string, or nil
|
44
|
+
#
|
45
|
+
# == Example:
|
46
|
+
# TwitPhoto::TwitPhoto.getPhotoUrlFromUrl "http://yfrog.com/kfx6gdj"
|
20
47
|
def self.getPhotoUrlFromUrl url
|
21
48
|
adaptors = [Adaptors::YFrogAdaptor, Adaptors::TwitPicAdaptor, Adaptors::LockerzAdaptor, Adaptors::InstagramAdaptor]
|
22
49
|
|
@@ -30,4 +57,59 @@ class TwitPhoto
|
|
30
57
|
return nil
|
31
58
|
end
|
32
59
|
|
60
|
+
# returns all of the photo URLs from a tweet object from the "twitter" gem (http://twitter.rubyforge.org/)
|
61
|
+
#
|
62
|
+
# IMPORTANT: this expects detailed entities from the twitter API, so request with :include_entities => 't'
|
63
|
+
#
|
64
|
+
# IMPORTANT: this will yield better results than the other methods, since Twitter now has native media support
|
65
|
+
#
|
66
|
+
# == Paramaters
|
67
|
+
# tweet::
|
68
|
+
# the tweet object from the twitter gem
|
69
|
+
#
|
70
|
+
# == Returns:
|
71
|
+
# returns::
|
72
|
+
# the array of media URLs in this tweet
|
73
|
+
def self.getPhotoUrlsFromTweet tweet
|
74
|
+
results = []
|
75
|
+
|
76
|
+
if !tweet.retweeted_status.nil?
|
77
|
+
tweet = tweet.retweeted_status
|
78
|
+
end
|
79
|
+
|
80
|
+
# ensure the user included entites
|
81
|
+
if !defined? tweet.entites || tweet.entities.nil?
|
82
|
+
raise ArgumentError, 'not a valid tweet object, make sure you :include_entities => \'t\' in the request'
|
83
|
+
end
|
84
|
+
|
85
|
+
# process URLs from third party photos
|
86
|
+
urls = tweet.entities.urls || []
|
87
|
+
urls.each do |url|
|
88
|
+
# sometimes its in expanded, sometimes URL
|
89
|
+
actualUrl = url.expanded_url
|
90
|
+
if actualUrl.nil?
|
91
|
+
actualUrl = url.url
|
92
|
+
end
|
93
|
+
if !actualUrl.nil?
|
94
|
+
photoUrl = TwitPhoto.getPhotoUrlFromUrl actualUrl
|
95
|
+
if !photoUrl.nil?
|
96
|
+
results << photoUrl
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# find any media from twitter itself (photobucket)
|
102
|
+
medias = tweet.entities.media || []
|
103
|
+
medias.each do |media|
|
104
|
+
#only photos
|
105
|
+
if 'photo'.eql? media[:type]
|
106
|
+
results << media.media_url
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
return results
|
111
|
+
end
|
112
|
+
|
113
|
+
|
114
|
+
end
|
33
115
|
end
|
data/test/test_twitphoto.rb
CHANGED
@@ -2,51 +2,78 @@ require 'helper'
|
|
2
2
|
require 'test/unit'
|
3
3
|
require 'twitphoto'
|
4
4
|
require 'adaptors'
|
5
|
+
require 'twitter'
|
5
6
|
|
6
7
|
class TestTwitphoto < Test::Unit::TestCase
|
7
8
|
|
9
|
+
should "test usage with Twitter gem" do
|
10
|
+
|
11
|
+
tweetWithTwitterMedia = Twitter.status(82472660038197249, :include_entities => 't')
|
12
|
+
results = TwitPhoto::TwitPhoto.getPhotoUrlsFromTweet(tweetWithTwitterMedia)
|
13
|
+
assert_equal 1, results.length
|
14
|
+
assert_equal "http://p.twimg.com/ASUAcoWCIAIsmIA.png", results[0]
|
15
|
+
|
16
|
+
RTtweetWithTwitterMedia = Twitter.status(82486891202621440, :include_entities => 't')
|
17
|
+
results = TwitPhoto::TwitPhoto.getPhotoUrlsFromTweet(RTtweetWithTwitterMedia)
|
18
|
+
assert_equal 1, results.length
|
19
|
+
assert_equal "http://p.twimg.com/ASUAcoWCIAIsmIA.png", results[0]
|
20
|
+
|
21
|
+
tweetWithThirdPartyMedia = Twitter.status(82480106379026433, :include_entities => 't')
|
22
|
+
results = TwitPhoto::TwitPhoto.getPhotoUrlsFromTweet tweetWithThirdPartyMedia
|
23
|
+
assert_equal 1, results.length
|
24
|
+
assert_equal "http://yfrog.com/kea33tj:medium", results[0]
|
25
|
+
|
26
|
+
tweetWithThirdPartyMediaMulti = Twitter.status(82513016645623808, :include_entities => 't')
|
27
|
+
results = TwitPhoto::TwitPhoto.getPhotoUrlsFromTweet tweetWithThirdPartyMediaMulti
|
28
|
+
assert_equal 3, results.length
|
29
|
+
|
30
|
+
tweetWithNoMedia = Twitter.status(82153561638699008, :include_entities => 't')
|
31
|
+
results = TwitPhoto::TwitPhoto.getPhotoUrlsFromTweet tweetWithNoMedia
|
32
|
+
assert_equal 0, results.length
|
33
|
+
end
|
34
|
+
|
8
35
|
should "test getPhotoFromUrl" do
|
9
|
-
assert_equal TwitPhoto.getPhotoUrlFromUrl("http://tweetphoto.com/28103398"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://tweetphoto.com/28103398"
|
10
|
-
assert_equal TwitPhoto.getPhotoUrlFromUrl("http://lockerz.com/s/110826629"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://lockerz.com/s/110826629"
|
11
|
-
assert_equal TwitPhoto.getPhotoUrlFromUrl("http://plixi.com/p/89511189"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://plixi.com/p/89511189"
|
12
|
-
assert_equal TwitPhoto.getPhotoUrlFromUrl("http://yfrog.com/gzozrllj"), "http://yfrog.com/gzozrllj:medium"
|
13
|
-
assert_equal TwitPhoto.getPhotoUrlFromUrl("http://instagr.am/p/Fv3t0"), "http://instagr.am/p/Fv3t0/media/?size=m"
|
14
|
-
assert_equal TwitPhoto.getPhotoUrlFromUrl("http://twitpic.com/5bpgp0"), "http://twitpic.com/show/thumb/5bpgp0"
|
15
|
-
assert TwitPhoto.getPhotoUrlFromUrl("http://google.ca").nil?
|
36
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlFromUrl("http://tweetphoto.com/28103398"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://tweetphoto.com/28103398"
|
37
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlFromUrl("http://lockerz.com/s/110826629"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://lockerz.com/s/110826629"
|
38
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlFromUrl("http://plixi.com/p/89511189"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://plixi.com/p/89511189"
|
39
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlFromUrl("http://yfrog.com/gzozrllj"), "http://yfrog.com/gzozrllj:medium"
|
40
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlFromUrl("http://instagr.am/p/Fv3t0"), "http://instagr.am/p/Fv3t0/media/?size=m"
|
41
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlFromUrl("http://twitpic.com/5bpgp0"), "http://twitpic.com/show/thumb/5bpgp0"
|
42
|
+
assert TwitPhoto::TwitPhoto.getPhotoUrlFromUrl("http://google.ca").nil?
|
16
43
|
end
|
17
44
|
|
18
45
|
should "test getPhotoUrlsFromText" do
|
19
|
-
assert_equal TwitPhoto.getPhotoUrlsFromText("http:www.google.com").length, 0
|
20
|
-
assert_equal TwitPhoto.getPhotoUrlsFromText("http:www.google.com http://tweetphoto.com/28103398").length, 1
|
21
|
-
assert_equal TwitPhoto.getPhotoUrlsFromText("http:www.google.com http://tweetphoto.com/28103398 http://instagr.am/p/Fv3t0").length, 2
|
22
|
-
assert_equal TwitPhoto.getPhotoUrlsFromText("http://lockerz.com/s/110826629").length, 1
|
23
|
-
assert_equal TwitPhoto.getPhotoUrlsFromText("Content http://twitpic.com/5bpgp0 content").length, 1
|
24
|
-
assert_equal TwitPhoto.getPhotoUrlsFromText("Content http://yfrog.com/gzozrllj http://plixi.com/p/89511189 content").length, 2
|
46
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlsFromText("http:www.google.com").length, 0
|
47
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlsFromText("http:www.google.com http://tweetphoto.com/28103398").length, 1
|
48
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlsFromText("http:www.google.com http://tweetphoto.com/28103398 http://instagr.am/p/Fv3t0").length, 2
|
49
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlsFromText("http://lockerz.com/s/110826629").length, 1
|
50
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlsFromText("Content http://twitpic.com/5bpgp0 content").length, 1
|
51
|
+
assert_equal TwitPhoto::TwitPhoto.getPhotoUrlsFromText("Content http://yfrog.com/gzozrllj http://plixi.com/p/89511189 content").length, 2
|
25
52
|
end
|
26
53
|
|
27
54
|
should "test TweetPhot/Lockerz/Plixi" do
|
28
|
-
assert_equal Adaptors::LockerzAdaptor.getImageUrl("http://tweetphoto.com/28103398"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://tweetphoto.com/28103398"
|
29
|
-
assert_equal Adaptors::LockerzAdaptor.getImageUrl("http://lockerz.com/s/110826629"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://lockerz.com/s/110826629"
|
30
|
-
assert_equal Adaptors::LockerzAdaptor.getImageUrl("http://plixi.com/p/89511189"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://plixi.com/p/89511189"
|
31
|
-
assert Adaptors::YFrogAdaptor.getImageUrl("http://notyfrog.com/gzozrllj").nil?
|
55
|
+
assert_equal TwitPhoto::Adaptors::LockerzAdaptor.getImageUrl("http://tweetphoto.com/28103398"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://tweetphoto.com/28103398"
|
56
|
+
assert_equal TwitPhoto::Adaptors::LockerzAdaptor.getImageUrl("http://lockerz.com/s/110826629"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://lockerz.com/s/110826629"
|
57
|
+
assert_equal TwitPhoto::Adaptors::LockerzAdaptor.getImageUrl("http://plixi.com/p/89511189"), "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=medium&url=http://plixi.com/p/89511189"
|
58
|
+
assert TwitPhoto::Adaptors::YFrogAdaptor.getImageUrl("http://notyfrog.com/gzozrllj").nil?
|
32
59
|
end
|
33
60
|
|
34
61
|
should "test Yfrog" do
|
35
|
-
assert_equal Adaptors::YFrogAdaptor.getImageUrl("http://yfrog.com/gzozrllj"), "http://yfrog.com/gzozrllj:medium"
|
36
|
-
assert Adaptors::YFrogAdaptor.getImageUrl("http://notyfrog.com/gzozrllj").nil?
|
37
|
-
assert_equal Adaptors::YFrogAdaptor.getImageUrl("http://yfrog.com/gz23uqdj"), "http://yfrog.com/gz23uqdj:medium"
|
62
|
+
assert_equal TwitPhoto::Adaptors::YFrogAdaptor.getImageUrl("http://yfrog.com/gzozrllj"), "http://yfrog.com/gzozrllj:medium"
|
63
|
+
assert TwitPhoto::Adaptors::YFrogAdaptor.getImageUrl("http://notyfrog.com/gzozrllj").nil?
|
64
|
+
assert_equal TwitPhoto::Adaptors::YFrogAdaptor.getImageUrl("http://yfrog.com/gz23uqdj"), "http://yfrog.com/gz23uqdj:medium"
|
38
65
|
end
|
39
66
|
|
40
67
|
should "test Instagram" do
|
41
|
-
assert_equal Adaptors::InstagramAdaptor.getImageUrl("http://instagr.am/p/Fv3t0"), "http://instagr.am/p/Fv3t0/media/?size=m"
|
42
|
-
assert Adaptors::InstagramAdaptor.getImageUrl("http://instagr.aam/p/Fv3t0").nil?
|
43
|
-
assert_equal Adaptors::InstagramAdaptor.getImageUrl("http://instagr.am/p/Fv3t0/"), "http://instagr.am/p/Fv3t0/media/?size=m"
|
68
|
+
assert_equal TwitPhoto::Adaptors::InstagramAdaptor.getImageUrl("http://instagr.am/p/Fv3t0"), "http://instagr.am/p/Fv3t0/media/?size=m"
|
69
|
+
assert TwitPhoto::Adaptors::InstagramAdaptor.getImageUrl("http://instagr.aam/p/Fv3t0").nil?
|
70
|
+
assert_equal TwitPhoto::Adaptors::InstagramAdaptor.getImageUrl("http://instagr.am/p/Fv3t0/"), "http://instagr.am/p/Fv3t0/media/?size=m"
|
44
71
|
end
|
45
72
|
|
46
73
|
should "test TwitPic" do
|
47
|
-
assert_equal Adaptors::TwitPicAdaptor.getImageUrl("http://twitpic.com/5bpgp0"), "http://twitpic.com/show/thumb/5bpgp0"
|
48
|
-
assert Adaptors::TwitPicAdaptor.getImageUrl("http://nottwitpic.com/5bpgp0").nil?
|
49
|
-
assert_equal Adaptors::TwitPicAdaptor.getImageUrl("http://twitpic.com/5b3rhe"), "http://twitpic.com/show/thumb/5b3rhe"
|
74
|
+
assert_equal TwitPhoto::Adaptors::TwitPicAdaptor.getImageUrl("http://twitpic.com/5bpgp0"), "http://twitpic.com/show/thumb/5bpgp0"
|
75
|
+
assert TwitPhoto::Adaptors::TwitPicAdaptor.getImageUrl("http://nottwitpic.com/5bpgp0").nil?
|
76
|
+
assert_equal TwitPhoto::Adaptors::TwitPicAdaptor.getImageUrl("http://twitpic.com/5b3rhe"), "http://twitpic.com/show/thumb/5b3rhe"
|
50
77
|
end
|
51
78
|
|
52
79
|
end
|
data/twitphoto.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{twitphoto}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.9.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Steve Cosman}]
|
12
|
-
s.date = %q{2011-06-
|
13
|
-
s.description = %q{a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitpic, yfrog, instagram
|
12
|
+
s.date = %q{2011-06-19}
|
13
|
+
s.description = %q{a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitter/photobucket, twitpic, yfrog, instagram and tweetphoto/plixi/lockerz. It also includes support for the twitter gem, which helps with expanding t.co and bit.ly shortened URLs. Flickr is not supported as it would require a service call.}
|
14
14
|
s.email = %q{delrox@live.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
@@ -34,23 +34,29 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.licenses = [%q{MIT}]
|
35
35
|
s.require_paths = [%q{lib}]
|
36
36
|
s.rubygems_version = %q{1.8.2}
|
37
|
-
s.summary = %q{a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitpic, yfrog, instagram
|
37
|
+
s.summary = %q{a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitter/photobucket, twitpic, yfrog, instagram and twitphoto/plixi/lockerz}
|
38
38
|
|
39
39
|
if s.respond_to? :specification_version then
|
40
40
|
s.specification_version = 3
|
41
41
|
|
42
42
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
43
|
+
s.add_development_dependency(%q<yajl-ruby>, [">= 0"])
|
44
|
+
s.add_development_dependency(%q<twitter>, [">= 0"])
|
43
45
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
44
46
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
45
47
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.2"])
|
46
48
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
47
49
|
else
|
50
|
+
s.add_dependency(%q<yajl-ruby>, [">= 0"])
|
51
|
+
s.add_dependency(%q<twitter>, [">= 0"])
|
48
52
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
49
53
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
50
54
|
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
51
55
|
s.add_dependency(%q<rcov>, [">= 0"])
|
52
56
|
end
|
53
57
|
else
|
58
|
+
s.add_dependency(%q<yajl-ruby>, [">= 0"])
|
59
|
+
s.add_dependency(%q<twitter>, [">= 0"])
|
54
60
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
55
61
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
56
62
|
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitphoto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 59
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 9
|
9
|
+
- 0
|
10
|
+
version: 0.9.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Steve Cosman
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-19 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -30,9 +30,37 @@ dependencies:
|
|
30
30
|
type: :development
|
31
31
|
requirement: *id001
|
32
32
|
prerelease: false
|
33
|
-
name:
|
33
|
+
name: yajl-ruby
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
36
|
+
none: false
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
hash: 3
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
version: "0"
|
44
|
+
type: :development
|
45
|
+
requirement: *id002
|
46
|
+
prerelease: false
|
47
|
+
name: twitter
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
hash: 3
|
55
|
+
segments:
|
56
|
+
- 0
|
57
|
+
version: "0"
|
58
|
+
type: :development
|
59
|
+
requirement: *id003
|
60
|
+
prerelease: false
|
61
|
+
name: shoulda
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
36
64
|
none: false
|
37
65
|
requirements:
|
38
66
|
- - ~>
|
@@ -44,11 +72,11 @@ dependencies:
|
|
44
72
|
- 0
|
45
73
|
version: 1.0.0
|
46
74
|
type: :development
|
47
|
-
requirement: *
|
75
|
+
requirement: *id004
|
48
76
|
prerelease: false
|
49
77
|
name: bundler
|
50
78
|
- !ruby/object:Gem::Dependency
|
51
|
-
version_requirements: &
|
79
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
52
80
|
none: false
|
53
81
|
requirements:
|
54
82
|
- - ~>
|
@@ -60,11 +88,11 @@ dependencies:
|
|
60
88
|
- 2
|
61
89
|
version: 1.6.2
|
62
90
|
type: :development
|
63
|
-
requirement: *
|
91
|
+
requirement: *id005
|
64
92
|
prerelease: false
|
65
93
|
name: jeweler
|
66
94
|
- !ruby/object:Gem::Dependency
|
67
|
-
version_requirements: &
|
95
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
68
96
|
none: false
|
69
97
|
requirements:
|
70
98
|
- - ">="
|
@@ -74,10 +102,10 @@ dependencies:
|
|
74
102
|
- 0
|
75
103
|
version: "0"
|
76
104
|
type: :development
|
77
|
-
requirement: *
|
105
|
+
requirement: *id006
|
78
106
|
prerelease: false
|
79
107
|
name: rcov
|
80
|
-
description: a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitpic, yfrog, instagram
|
108
|
+
description: a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitter/photobucket, twitpic, yfrog, instagram and tweetphoto/plixi/lockerz. It also includes support for the twitter gem, which helps with expanding t.co and bit.ly shortened URLs. Flickr is not supported as it would require a service call.
|
81
109
|
email: delrox@live.com
|
82
110
|
executables: []
|
83
111
|
|
@@ -131,6 +159,6 @@ rubyforge_project:
|
|
131
159
|
rubygems_version: 1.8.2
|
132
160
|
signing_key:
|
133
161
|
specification_version: 3
|
134
|
-
summary: a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitpic, yfrog, instagram
|
162
|
+
summary: a gem to generate an image URL from shortened URLs from common photo sharing tools. Supports twitter/photobucket, twitpic, yfrog, instagram and twitphoto/plixi/lockerz
|
135
163
|
test_files: []
|
136
164
|
|