bsm-breadcrumbs 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bsm-breadcrumbs.gemspec +1 -1
- data/lib/breadcrumbs/version.rb +1 -1
- data/lib/breadcrumbs.rb +3 -4
- data/test/breadcrumbs_test.rb +5 -0
- metadata +3 -3
data/bsm-breadcrumbs.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{bsm-breadcrumbs}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nando Vieira", "Dimitrij Denissenko"]
|
data/lib/breadcrumbs/version.rb
CHANGED
data/lib/breadcrumbs.rb
CHANGED
@@ -96,10 +96,9 @@ class Breadcrumbs < Array
|
|
96
96
|
html.respond_to?(:html_safe) ? html.html_safe : html
|
97
97
|
end
|
98
98
|
|
99
|
-
def translate(
|
100
|
-
|
101
|
-
|
102
|
-
text
|
99
|
+
def translate(key) # :nodoc:
|
100
|
+
return "" if key.blank?
|
101
|
+
I18n.t "breadcrumbs.#{key}", :default => [key.to_sym, key.to_s]
|
103
102
|
end
|
104
103
|
|
105
104
|
private
|
data/test/breadcrumbs_test.rb
CHANGED
@@ -28,6 +28,11 @@ class BreadcrumbsTest < Test::Unit::TestCase
|
|
28
28
|
assert_equal 2, @breadcrumbs.count
|
29
29
|
end
|
30
30
|
|
31
|
+
def test_add_empty_item # Just in case, we generate the label
|
32
|
+
@breadcrumbs.add ""
|
33
|
+
assert_equal 1, @breadcrumbs.count
|
34
|
+
end
|
35
|
+
|
31
36
|
def test_tag
|
32
37
|
assert_equal "<span>Hi!</span>", @inline.tag(:span, "Hi!")
|
33
38
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bsm-breadcrumbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nando Vieira
|