imagize 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/imagize.gemspec +2 -2
- data/lib/imagize.rb +5 -0
- data/spec/imagize_spec.rb +12 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/imagize.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{imagize}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.4.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Raymond van Dongelen"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-05-26}
|
13
13
|
s.description = %q{Retrieve images from a tweet}
|
14
14
|
s.email = %q{dongelen@nhl.nl}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/imagize.rb
CHANGED
@@ -26,9 +26,14 @@ module Imagize
|
|
26
26
|
:convert => "http://tweetphotoapi.com/api/TPAPI.svc/imagefromurl?size=big&url=http://tweetphoto.com/§ID§"
|
27
27
|
},
|
28
28
|
:plixi => {
|
29
|
+
:url => "http://lockerz.com/s/",
|
30
|
+
:convert => "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=big&url=http://lockerz.com/s/§ID§"
|
31
|
+
},
|
32
|
+
:lockerz => {
|
29
33
|
:url => "http://plixi.com/p/",
|
30
34
|
:convert => "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=big&url=http://plixi.com/§ID§"
|
31
35
|
},
|
36
|
+
|
32
37
|
:twitgoo => {
|
33
38
|
:url => "http://twitgoo.com/",
|
34
39
|
:convert => "http://twitgoo.com/show/img/§ID§"
|
data/spec/imagize_spec.rb
CHANGED
@@ -59,6 +59,14 @@ describe "Imagize" do
|
|
59
59
|
urls.should include("http://api.plixi.com/api/tpapi.svc/imagefromurl?size=big&url=http://plixi.com/44815082")
|
60
60
|
end
|
61
61
|
|
62
|
+
it "should recognize lockerz" do
|
63
|
+
urls= @imagizer.imagize("Hallo bnfgjfdgbfd http://lockerz.com/s/104968649 Fiets")
|
64
|
+
|
65
|
+
urls.should include("http://api.plixi.com/api/tpapi.svc/imagefromurl?size=big&url=http://lockerz.com/s/104968649")
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
|
62
70
|
it "should recognize multiple images" do
|
63
71
|
urls= @imagizer.imagize("MitchBHavin @themdudez http://yfrog.com/16y0 @KarenWuvsYou http://twitpic.com/h5uhc - This is so cool:)! lol")
|
64
72
|
urls.size.should ==2
|
@@ -103,6 +111,10 @@ describe "Imagize" do
|
|
103
111
|
@imagizer.extract_shortener("http://is.gd/bSCVo").should == "http://www.nu.nl"
|
104
112
|
@imagizer.extract_shortener("http://goo.gl/VdHct").should == "http://www.nu.nl/"
|
105
113
|
# @imagizer.extract_shortener("http://lyt.sr/k5aub").should == "http://www.nu.nl"
|
114
|
+
|
115
|
+
|
116
|
+
urls = @imagizer.imagize("bla http://goo.gl/qs5Z6 bla", true)
|
117
|
+
urls[0].should == "http://twitpic.com/show/large/38aduk"
|
106
118
|
|
107
119
|
end
|
108
120
|
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
- 3
|
8
7
|
- 4
|
9
|
-
|
8
|
+
- 0
|
9
|
+
version: 0.4.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Raymond van Dongelen
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-05-26 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|