subtrigger 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
@@ -123,9 +123,13 @@ module Subtrigger
123
123
  # Log message length
124
124
  # Log message
125
125
  #
126
+ # Note that the log messages might have multiple lines. Asking for line 3
127
+ # (actually 4, counting from 0) will give you that line and all lines
128
+ # after that.
126
129
  def get_line_from_info(n)
127
130
  @info ||= look_at('info')
128
- @info.split("\n")[n]
131
+ parts = @info.split("\n")
132
+ n = n >= 3 ? parts[3..parts.size].join("\n") : parts[n]
129
133
  end
130
134
  end
131
135
  end
data/subtrigger.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{subtrigger}
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Arjan van der Gaag"]
12
- s.date = %q{2010-02-24}
12
+ s.date = %q{2010-03-04}
13
13
  s.default_executable = %q{subtrigger}
14
14
  s.description = %q{This gem allows you to create simple Ruby triggers for Subversion commit messages, responding to keywords in your log messages to send e-mails, deploy sites or do whatever you need.}
15
15
  s.email = %q{arjan@arjanvandergaag.nl}
@@ -19,6 +19,11 @@ class TestRepository < Test::Unit::TestCase
19
19
  assert_equal('path/to/repo/foo', @r.path('foo'))
20
20
  end
21
21
 
22
+ should 'read all lines of message from info' do
23
+ @r.expects(:look_at).with('info').returns("Arjan\ndate\n100\nFoo\nBar\nBaz")
24
+ assert_equal("Foo\nBar\nBaz", @r.message)
25
+ end
26
+
22
27
  should 'use svnlook info' do
23
28
  @r.expects(:look_at).with('info').returns('Foo')
24
29
  assert_equal('Foo', @r.author)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 4
9
- version: 0.2.4
8
+ - 5
9
+ version: 0.2.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Arjan van der Gaag
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-02-24 00:00:00 +01:00
17
+ date: 2010-03-04 00:00:00 +01:00
18
18
  default_executable: subtrigger
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency