imagize 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.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.1.0"
8
+ s.version = "0.2.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{2010-05-03}
12
+ s.date = %q{2010-09-13}
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
@@ -20,7 +20,12 @@ module Imagize
20
20
  :tweetphoto => {
21
21
  :url => "http://tweetphoto.com/",
22
22
  :convert => "http://tweetphotoapi.com/api/TPAPI.svc/imagefromurl?size=big&url=http://tweetphoto.com/§ID§"
23
+ },
24
+ :plixi => {
25
+ :url => "http://plixi.com/p/",
26
+ :convert => "http://api.plixi.com/api/tpapi.svc/imagefromurl?size=big&url=http://plixi.com/§ID§"
23
27
  }
28
+
24
29
  }
25
30
  SHORTENERS = {
26
31
  :bitly => {
@@ -61,7 +66,7 @@ module Imagize
61
66
  URL_DEFINITIONS.each do |service, details|
62
67
  currentService = details[:url]
63
68
  tweet.scan /#{currentService}\w*/ do |current|
64
- code = current.sub(currentService, "")
69
+ code = current.sub(currentService, "")
65
70
  images << make_url (service, code)
66
71
  end
67
72
  end
data/spec/imagize_spec.rb CHANGED
@@ -36,6 +36,12 @@ describe "Imagize" do
36
36
  urls= @imagizer.imagize("Hallo bnfgjfdgbfd http://tweetphoto.com/16793555 Fiets")
37
37
  urls.should include("http://tweetphotoapi.com/api/TPAPI.svc/imagefromurl?size=big&url=http://tweetphoto.com/16793555")
38
38
  end
39
+
40
+ it "should recognize plixi" do
41
+ urls= @imagizer.imagize("Hallo bnfgjfdgbfd http://plixi.com/p/44815082 Fiets")
42
+
43
+ urls.should include("http://api.plixi.com/api/tpapi.svc/imagefromurl?size=big&url=http://plixi.com/44815082")
44
+ end
39
45
 
40
46
  it "should recognize multiple images" do
41
47
  urls= @imagizer.imagize("MitchBHavin @themdudez http://yfrog.com/16y0 @KarenWuvsYou http://twitpic.com/h5uhc - This is so cool:)! lol")
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
7
+ - 2
8
8
  - 0
9
- version: 0.1.0
9
+ version: 0.2.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: 2010-05-03 00:00:00 +02:00
17
+ date: 2010-09-13 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency