rehearsal 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Rehearsal
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -1,16 +1,20 @@
1
1
  module Rehearsal
2
2
  module ViewHelpers
3
- def rehearsal_banner(options = {})
3
+ def rehearsal_banner(message = nil)
4
4
  return unless rehearsing?
5
5
 
6
6
  content_tag :div, :id => 'rehearsal-banner' do
7
- options[:message] || default_message
7
+ if block_given?
8
+ yield
9
+ else
10
+ message || default_message
11
+ end
8
12
  end
9
13
  end
10
14
 
11
15
  private
12
16
  def default_message
13
- 'This is your rehearsal banner. Override this text with the :message option.'
17
+ 'Override this message by passing in a string or a block.'
14
18
  end
15
19
  end
16
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rehearsal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-13 00:00:00.000000000 Z
12
+ date: 2013-01-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails