semantictext 0.2.4 → 0.2.5

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.
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,7 @@
1
1
  == CHANGELOG
2
2
 
3
+ === 0.2.5
4
+ 2010-01-27: added fix for crasher when paragraph-based line starts with * followed by char other than space or tab
3
5
  === 0.2.4
4
6
  2010-01-27: added facility for adding new tag classes to a DefaultTagFactory
5
7
  === 0.2.3
data/TODO.rdoc CHANGED
@@ -1,5 +1,6 @@
1
1
  ==to do
2
2
  * simplify the way files are imported
3
+ * fix what happens when certain headers aren't present
3
4
  * tighten up error test cases on ftptag, httptag and mailtotag
4
5
  * improve testing by mocking out tag factory used in tests - consider how/whether to do this
5
6
  * fix path to testfiles so test can run on gem - tests only run on source at the moment
@@ -137,7 +137,7 @@ module SemanticText
137
137
  return
138
138
  end
139
139
 
140
- if (line.begins_with('*'))
140
+ if (line.match(/^(\*+)\s+(.*$)/))
141
141
  ensure_bulleted_list_active
142
142
  @bulleted_list_parser.parse_line(line)
143
143
  return
@@ -1,5 +1,8 @@
1
1
  require 'test/unit'
2
2
  require 'semantictext/document'
3
+ require 'semantictext/default_tag_factory'
4
+ require 'semantictext/httptag'
5
+
3
6
 
4
7
  class TestDocument < Test::Unit::TestCase
5
8
 
@@ -8,6 +11,13 @@ class TestDocument < Test::Unit::TestCase
8
11
  assert_equal text, actual.text
9
12
  end
10
13
 
14
+ def test_regression_doesnt_crash
15
+ factory = SemanticText::DefaultTagFactory.new
16
+ factory.register_tag('img',SemanticText::HTTPTag)
17
+ unit = SemanticText::Document.new(factory)
18
+ unit.parse_from(ENV['SANDBOX']+'/semantictext/testfiles/exploder.art')
19
+ end
20
+
11
21
  def test_end_to_end_loading
12
22
  unit = SemanticText::Document.new
13
23
  unit.parse_from(ENV['SANDBOX']+'/semantictext/testfiles/simple.art')
@@ -0,0 +1,21 @@
1
+ title: What I learned by giving an Ignite format talk
2
+ keywords: ignite, talk, presentation, pecha, kucha, pecha kucha, cardiff, slide, slides, howto
3
+ createdAt: 22 January 2010
4
+
5
+ You know that feeling you get when you're listening to a long boring speech. Maybe you're listening to a Welsh Assembly Member failing to get to any point, or perhaps it's a bureaucrat from the WDA trying to beat the audience into submission with statistics. You can't help noticing the hardness of the seat. You try to unobtrusively reposition your bottom so it hurts less. That's when you notice a few other people in the audience trying to do the same thing. In that moment you know you've been trapped by a "speech rambler".
6
+
7
+ [img:IgniteCardiff.jpg]
8
+ Ignite talks are the antidote to speech ramblers.
9
+
10
+ *Definition:* An ignite talk is a series of exactly twenty slides. Each slide is automatically advanced after 15 seconds - whether the speaker is ready or not. This means that each ignite talk takes exactly 5 minutes. (An Ignite format talk is like a Pecha Kucha talk, except that Pecha Kucha format means twenty-slides with twenty seconds each and a rather silly patent restriction.)
11
+
12
+ Why Ignite talks are good:
13
+ * The brutal limitations of the Ignite format force people to get to the point.
14
+ * You can get through many ignite talks in a short time.
15
+ * You can easily sample multiple viewpoints and subjects.
16
+ * There's no time to be bored - as speech ramblers either don't apply or are ruthlessly mown down by the clock.
17
+ * Ignite talks tend to be informal and work well in a social environment.
18
+
19
+ [img:PreparingForAnIgniteTalk.jpg]
20
+ The post-it notes I used to organise my talk. One note per slide, one talking point per note.
21
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semantictext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dafydd Rees
@@ -76,6 +76,7 @@ files:
76
76
  - test/test_keywordextractor.rb
77
77
  - testfiles/bold-and-emphasized-text.art
78
78
  - testfiles/complex.art
79
+ - testfiles/exploder.art
79
80
  - testfiles/jobs-I-dont-want.art
80
81
  - testfiles/regression-exportsample.txt
81
82
  - testfiles/semantic-tag-examples.art