notes-structured-text-strip-bodies 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -4,6 +4,10 @@ A command-line tool for remove body text from Lotus Notes Structured Text Export
4
4
 
5
5
  notes_structured_text_strip_bodies <output_dir> <input_file> [<input_file>*]
6
6
 
7
+ = Dependencies
8
+ * Ruby 1.8.7
9
+ * RubyGems >= 1.5.2
10
+
7
11
  = Install
8
12
 
9
13
  gem install notes-structured-text-strip-bodies
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -48,7 +48,7 @@ module NotesStructuredTextStripBodies
48
48
  end
49
49
 
50
50
  def is_header_block?(block)
51
- !!block.find{|l| l =~ /^\$MessageID: /}
51
+ !!block.find{|l| l =~ /^\$MessageID: /i}
52
52
  end
53
53
 
54
54
  def strip(output, input)
@@ -52,8 +52,6 @@ describe NotesStructuredTextStripBodies do
52
52
  input_file = "baz/boo.txt"
53
53
  mock(File).file?("baz/boo.txt"){true}
54
54
 
55
- logdev = Object.new
56
- stub(NotesStructuredTextStripBodies).logdev{logdev}
57
55
  logger = Object.new
58
56
  stub(NotesStructuredTextStripBodies).logger{logger}
59
57
 
@@ -67,7 +65,7 @@ describe NotesStructuredTextStripBodies do
67
65
  block.call(input_stream)
68
66
  end
69
67
 
70
- mock(logger).debug(anything){|msg|
68
+ mock(logger).info(anything){|msg|
71
69
  msg.should =~ %r{/foo/bar/boo.txt}
72
70
  msg.should =~ %r{baz/boo.txt}
73
71
  }
@@ -106,6 +104,12 @@ EOF
106
104
  it "should return false if there are no lines starting with '$MessageID: ' in the block" do
107
105
  NotesStructuredTextStripBodies.is_header_block?( ["foo", "bar", "baz"] ).should == false
108
106
  end
107
+
108
+ it "should not be case-sensitive" do
109
+ NotesStructuredTextStripBodies.is_header_block?( ["foo", "$MESSAGEID: bar", "baz"] ).should == true
110
+ NotesStructuredTextStripBodies.is_header_block?( ["foo", "$messageID: bar", "baz"] ).should == true
111
+ NotesStructuredTextStripBodies.is_header_block?( ["foo", "$messageid: bar", "baz"] ).should == true
112
+ end
109
113
  end
110
114
 
111
115
  describe "strip" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notes-structured-text-strip-bodies
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - mccraigmccraig
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-18 00:00:00 +01:00
18
+ date: 2011-04-19 00:00:00 +01:00
19
19
  default_executable: notes_structured_text_strip_bodies
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency