twitter-text 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ require 'digest'
9
9
 
10
10
  spec = Gem::Specification.new do |s|
11
11
  s.name = "twitter-text"
12
- s.version = "1.1.1"
12
+ s.version = "1.1.2"
13
13
  s.authors = ["Matt Sanford", "Patrick Ewing", "Ben Cherry", "Britt Selvitelle"]
14
14
  s.email = ["matt@twitter.com", "patrick.henry.ewing@gmail.com", "bcherry@gmail.com", "bs@brittspace.com"]
15
15
  s.homepage = "http://twitter.com"
data/TODO CHANGED
@@ -1,4 +1,3 @@
1
1
  TODO:
2
2
 
3
3
  * @mentions preceded by a dash should work. "I am great -@greatguy"
4
- * HitHighlighter tests should be moved to the conformance suite
@@ -63,6 +63,12 @@ module Twitter
63
63
  if index % 2 == 0
64
64
  start_in_chunk = true
65
65
  end
66
+ placed = true
67
+ end
68
+
69
+ # ultimate fallback, hits that run off the end get a closing tag
70
+ if !placed
71
+ result << tag
66
72
  end
67
73
  end
68
74
 
@@ -75,6 +75,10 @@ describe Twitter::HitHighlighter do
75
75
  it "should highlight around a link" do
76
76
  @highlighter.hit_highlight("test <a>test</a> test", [[3, 11]]).should == "tes<em>t <a>test</a> t</em>est"
77
77
  end
78
+
79
+ it "should fail gracefully with bad hits" do
80
+ @highlighter.hit_highlight("test test", [[5, 20]]).should == "test <em>test</em>"
81
+ end
78
82
 
79
83
  end
80
84
 
metadata CHANGED
@@ -1,12 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-text
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 1
8
- - 1
9
- version: 1.1.1
4
+ version: 1.1.2
10
5
  platform: ruby
11
6
  authors:
12
7
  - Matt Sanford
@@ -17,21 +12,19 @@ autorequire: ""
17
12
  bindir: bin
18
13
  cert_chain: []
19
14
 
20
- date: 2010-04-28 00:00:00 -07:00
15
+ date: 2010-05-11 00:00:00 -07:00
21
16
  default_executable:
22
17
  dependencies:
23
18
  - !ruby/object:Gem::Dependency
24
19
  name: actionpack
25
- prerelease: false
26
- requirement: &id001 !ruby/object:Gem::Requirement
20
+ type: :runtime
21
+ version_requirement:
22
+ version_requirements: !ruby/object:Gem::Requirement
27
23
  requirements:
28
24
  - - ">="
29
25
  - !ruby/object:Gem::Version
30
- segments:
31
- - 0
32
26
  version: "0"
33
- type: :runtime
34
- version_requirements: *id001
27
+ version:
35
28
  description: A gem that provides text handling for Twitter
36
29
  email:
37
30
  - matt@twitter.com
@@ -77,20 +70,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
70
  requirements:
78
71
  - - ">="
79
72
  - !ruby/object:Gem::Version
80
- segments:
81
- - 0
82
73
  version: "0"
74
+ version:
83
75
  required_rubygems_version: !ruby/object:Gem::Requirement
84
76
  requirements:
85
77
  - - ">="
86
78
  - !ruby/object:Gem::Version
87
- segments:
88
- - 0
89
79
  version: "0"
80
+ version:
90
81
  requirements: []
91
82
 
92
83
  rubyforge_project:
93
- rubygems_version: 1.3.6
84
+ rubygems_version: 1.3.5
94
85
  signing_key:
95
86
  specification_version: 3
96
87
  summary: Twitter text handling library