linkup 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
data/lib/linkup.rb CHANGED
@@ -1,3 +1,5 @@
1
+ #!ruby19
2
+ # encoding: utf-8
1
3
  module Linkup
2
4
 
3
5
  # for inclusion in String class
@@ -13,7 +15,7 @@ module Linkup
13
15
 
14
16
  attr_accessor :original
15
17
 
16
- LINK_REGEX = /\b(([\w-]+:\/\/?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/)))/u
18
+ LINK_REGEX = /\b(([\w-]+:\/\/?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s<]|\/)))/u
17
19
 
18
20
  def initialize(string)
19
21
  self.original = string
data/linkup.gemspec CHANGED
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{linkup}
8
- s.version = "1.0.0"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jim Lindley"]
12
- s.date = %q{2010-01-20}
12
+ s.date = %q{2010-02-06}
13
13
  s.description = %q{From: http://daringfireball.net/2009/11/liberal_regex_for_matching_urls}
14
14
  s.email = %q{jim@jimlindley.com}
15
15
  s.extra_rdoc_files = [
@@ -47,3 +47,4 @@ Gem::Specification.new do |s|
47
47
  else
48
48
  end
49
49
  end
50
+
data/test/test_helper.rb CHANGED
@@ -1,3 +1,6 @@
1
+ #!ruby19
2
+ # encoding: utf-8
3
+
1
4
  require 'test/unit'
2
5
  require 'shoulda'
3
6
  require 'lib/linkup'
data/test/test_linkup.rb CHANGED
@@ -1,3 +1,6 @@
1
+ #!ruby19
2
+ # encoding: utf-8
3
+
1
4
  require 'test/test_helper'
2
5
 
3
6
  class TestLinkup < Test::Unit::TestCase
@@ -46,15 +49,15 @@ class TestLinkup < Test::Unit::TestCase
46
49
  assert_equal expected, input.linkup
47
50
  end
48
51
 
49
- should "not link link-adjacent angle brackets" do
52
+ should_eventually "link urls surrounded by angle brackets" do
50
53
  input = '<http://foo.com/blah_blah>'
51
- expected = '<<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>>'
54
+ expected = '<a href="http://foo.com/blah_blah">http://foo.com/blah_blah</a>'
52
55
  assert_equal expected, input.linkup
53
56
  end
54
57
 
55
- should "handle link-adjacent angle brackets with trailing slash" do
58
+ should_eventually "link urls surrounded by angle brackets with trailing slash" do
56
59
  input = '<http://foo.com/blah_blah/>'
57
- expected = '<<a href="http://foo.com/blah_blah/">http://foo.com/blah_blah/</a>>'
60
+ expected = '<a href="http://foo.com/blah_blah/">http://foo.com/blah_blah/</a>'
58
61
  assert_equal expected, input.linkup
59
62
  end
60
63
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Lindley
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-20 00:00:00 -05:00
12
+ date: 2010-02-06 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15