rinku 1.7.2 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -96,6 +96,14 @@ require 'rails_rinku'
96
96
  The `rails_rinku` package monkeypatches Rails with an `auto_link` method that
97
97
  mimics 100% the original one, parameter per parameter. It's just faster.
98
98
 
99
+ Developing
100
+ ----------
101
+ ```
102
+ $ gem install rake-compiler
103
+
104
+ $ rake
105
+ ```
106
+
99
107
  Rinku is written by me
100
108
  ----------------------
101
109
 
@@ -61,7 +61,7 @@ autolink_delim(uint8_t *data, size_t link_end, size_t max_rewind, size_t size)
61
61
  }
62
62
 
63
63
  while (link_end > 0) {
64
- if (strchr("?!.,", data[link_end - 1]) != NULL)
64
+ if (strchr("?!.,:", data[link_end - 1]) != NULL)
65
65
  link_end--;
66
66
 
67
67
  else if (data[link_end - 1] == ';') {
@@ -293,4 +293,3 @@ sd_autolink__url(
293
293
 
294
294
  return link_end;
295
295
  }
296
-
@@ -1,5 +1,5 @@
1
1
  module Rinku
2
- VERSION = "1.7.2"
2
+ VERSION = "1.7.3"
3
3
  attr_accessor :skip_tags
4
4
  extend self
5
5
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'rinku'
5
- s.version = '1.7.2'
5
+ s.version = '1.7.3'
6
6
  s.summary = "Mostly autolinking"
7
7
  s.description = <<-EOF
8
8
  A fast and very smart autolinking library that
@@ -36,12 +36,14 @@ class RedcarpetAutolinkTest < Test::Unit::TestCase
36
36
  Rinku.skip_tags = nil
37
37
  assert_not_equal Rinku.auto_link(url), url
38
38
  end
39
-
39
+
40
40
  def test_auto_link_with_single_trailing_punctuation_and_space
41
41
  url = "http://www.youtube.com"
42
42
  url_result = generate_result(url)
43
43
  assert_equal url_result, Rinku.auto_link(url)
44
- assert_equal "link: #{url_result}. foo?", Rinku.auto_link("link: #{url}. foo?")
44
+ ["?", "!", ".", ",", ":"].each do |punc|
45
+ assert_equal "link: #{url_result}#{punc} foo?", Rinku.auto_link("link: #{url}#{punc} foo?")
46
+ end
45
47
  end
46
48
 
47
49
  def test_does_not_segfault
@@ -142,7 +144,7 @@ This is just a test. <a href="http://www.pokemon.com">http://www.pokemon.com</a>
142
144
  url2 = "http://www.ruby-doc.org/core/Bar.html"
143
145
 
144
146
  assert_equal %(<p><a href="#{url1}">#{url1}</a><br /><a href="#{url2}">#{url2}</a><br /></p>), Rinku.auto_link("<p>#{url1}<br />#{url2}<br /></p>")
145
- end
147
+ end
146
148
 
147
149
  def test_block
148
150
  link = Rinku.auto_link("Find ur favorite pokeman @ http://www.pokemon.com") do |url|
metadata CHANGED
@@ -1,33 +1,25 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rinku
3
- version: !ruby/object:Gem::Version
4
- hash: 15
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.7.3
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 7
9
- - 2
10
- version: 1.7.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Vicent Marti
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-10-12 00:00:00 +02:00
19
- default_executable:
12
+ date: 2013-04-25 00:00:00.000000000 Z
20
13
  dependencies: []
21
-
22
- description: " A fast and very smart autolinking library that\n acts as a drop-in replacement for Rails `auto_link`\n"
14
+ description: ! " A fast and very smart autolinking library that\n acts as a
15
+ drop-in replacement for Rails `auto_link`\n"
23
16
  email: vicent@github.com
24
17
  executables: []
25
-
26
- extensions:
18
+ extensions:
27
19
  - ext/rinku/extconf.rb
28
- extra_rdoc_files:
20
+ extra_rdoc_files:
29
21
  - COPYING
30
- files:
22
+ files:
31
23
  - COPYING
32
24
  - README.markdown
33
25
  - Rakefile
@@ -42,39 +34,29 @@ files:
42
34
  - lib/rails_rinku.rb
43
35
  - rinku.gemspec
44
36
  - test/autolink_test.rb
45
- has_rdoc: true
46
37
  homepage: http://github.com/vmg/rinku
47
38
  licenses: []
48
-
49
39
  post_install_message:
50
40
  rdoc_options: []
51
-
52
- require_paths:
41
+ require_paths:
53
42
  - lib
54
- required_ruby_version: !ruby/object:Gem::Requirement
43
+ required_ruby_version: !ruby/object:Gem::Requirement
55
44
  none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
63
- required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
50
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- hash: 3
69
- segments:
70
- - 0
71
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
72
55
  requirements: []
73
-
74
56
  rubyforge_project:
75
- rubygems_version: 1.6.2
57
+ rubygems_version: 1.8.23
76
58
  signing_key:
77
59
  specification_version: 3
78
60
  summary: Mostly autolinking
79
- test_files:
61
+ test_files:
80
62
  - test/autolink_test.rb