rehearsal 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rehearsal/version.rb +1 -1
- data/lib/rehearsal/view_helpers.rb +7 -3
- metadata +2 -2
data/lib/rehearsal/version.rb
CHANGED
@@ -1,16 +1,20 @@
|
|
1
1
|
module Rehearsal
|
2
2
|
module ViewHelpers
|
3
|
-
def rehearsal_banner(
|
3
|
+
def rehearsal_banner(message = nil)
|
4
4
|
return unless rehearsing?
|
5
5
|
|
6
6
|
content_tag :div, :id => 'rehearsal-banner' do
|
7
|
-
|
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
|
-
'
|
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.
|
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-
|
12
|
+
date: 2013-01-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|