bsm-breadcrumbs 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -31,7 +31,6 @@ begin
31
31
  gem.version = Breadcrumbs::Version::STRING
32
32
  gem.summary = "Breadcrumbs is a simple plugin that adds a `breadcrumbs` object to controllers and views."
33
33
  gem.description = "Breadcrumbs is a simple plugin that adds a `breadcrumbs` object to controllers and views."
34
- gem.add_runtime_dependency "actionpack", ">= 3.0.0"
35
34
  end
36
35
  Jeweler::GemcutterTasks.new
37
36
  rescue LoadError
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bsm-breadcrumbs}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
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"]
12
- s.date = %q{2010-12-13}
12
+ s.date = %q{2011-02-16}
13
13
  s.description = %q{Breadcrumbs is a simple plugin that adds a `breadcrumbs` object to controllers and views.}
14
14
  s.email = %q{dimitrij@blacksquaremedia.com}
15
15
  s.extra_rdoc_files = [
@@ -17,45 +17,45 @@ Gem::Specification.new do |s|
17
17
  ]
18
18
  s.files = [
19
19
  ".bundle/config",
20
- ".gitignore",
21
- "Gemfile",
22
- "Gemfile.lock",
23
- "README.rdoc",
24
- "Rakefile",
25
- "bsm-breadcrumbs.gemspec",
26
- "lib/breadcrumbs.rb",
27
- "lib/breadcrumbs/action_controller_ext.rb",
28
- "lib/breadcrumbs/render.rb",
29
- "lib/breadcrumbs/render/base.rb",
30
- "lib/breadcrumbs/render/inline.rb",
31
- "lib/breadcrumbs/render/list.rb",
32
- "lib/breadcrumbs/render/ordered_list.rb",
33
- "lib/breadcrumbs/version.rb",
34
- "test/breadcrumbs_test.rb",
35
- "test/resources/en.yml",
36
- "test/test_helper.rb"
20
+ "Gemfile",
21
+ "Gemfile.lock",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "bsm-breadcrumbs.gemspec",
25
+ "lib/breadcrumbs.rb",
26
+ "lib/breadcrumbs/action_controller_ext.rb",
27
+ "lib/breadcrumbs/render.rb",
28
+ "lib/breadcrumbs/render/base.rb",
29
+ "lib/breadcrumbs/render/inline.rb",
30
+ "lib/breadcrumbs/render/list.rb",
31
+ "lib/breadcrumbs/render/ordered_list.rb",
32
+ "lib/breadcrumbs/version.rb",
33
+ "test/breadcrumbs_test.rb",
34
+ "test/resources/en.yml",
35
+ "test/test_helper.rb"
37
36
  ]
38
37
  s.homepage = %q{http://github.com/bsm/breadcrumbs}
39
- s.rdoc_options = ["--charset=UTF-8"]
40
38
  s.require_paths = ["lib"]
41
- s.rubygems_version = %q{1.3.7}
39
+ s.rubygems_version = %q{1.5.0}
42
40
  s.summary = %q{Breadcrumbs is a simple plugin that adds a `breadcrumbs` object to controllers and views.}
43
41
  s.test_files = [
44
42
  "test/breadcrumbs_test.rb",
45
- "test/test_helper.rb"
43
+ "test/test_helper.rb"
46
44
  ]
47
45
 
48
46
  if s.respond_to? :specification_version then
49
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
50
47
  s.specification_version = 3
51
48
 
52
49
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
53
- s.add_runtime_dependency(%q<actionpack>, [">= 3.0.0"])
50
+ s.add_runtime_dependency(%q<actionpack>, ["~> 3.0.0"])
51
+ s.add_runtime_dependency(%q<activemodel>, ["~> 3.0.0"])
54
52
  else
55
- s.add_dependency(%q<actionpack>, [">= 3.0.0"])
53
+ s.add_dependency(%q<actionpack>, ["~> 3.0.0"])
54
+ s.add_dependency(%q<activemodel>, ["~> 3.0.0"])
56
55
  end
57
56
  else
58
- s.add_dependency(%q<actionpack>, [">= 3.0.0"])
57
+ s.add_dependency(%q<actionpack>, ["~> 3.0.0"])
58
+ s.add_dependency(%q<activemodel>, ["~> 3.0.0"])
59
59
  end
60
60
  end
61
61
 
data/lib/breadcrumbs.rb CHANGED
@@ -97,8 +97,8 @@ class Breadcrumbs < Array
97
97
  end
98
98
 
99
99
  def translate(key) # :nodoc:
100
- return "" if key.blank?
101
- I18n.t "breadcrumbs.#{key}", :default => [key.to_sym, key.to_s]
100
+ return key unless key.is_a?(Symbol)
101
+ I18n.t "breadcrumbs.#{key}", :default => [key, key.to_s]
102
102
  end
103
103
 
104
104
  private
@@ -2,7 +2,7 @@ class Breadcrumbs
2
2
  module Version # :nodoc: all
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
- PATCH = 1
5
+ PATCH = 2
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
@@ -166,6 +166,12 @@ class BreadcrumbsTest < Test::Unit::TestCase
166
166
  assert_equal "<span>Our team</span>", items[1].children.join
167
167
  end
168
168
 
169
+ def test_render_with_string_is_not_translated
170
+ @breadcrumbs.add 'home'
171
+ items = parse_tag(@breadcrumbs.render).children
172
+ assert_equal "<span>home</span>", items[0].children.join
173
+ end
174
+
169
175
  def test_render_scope_as_text_for_missing_scope
170
176
  @breadcrumbs.add :contact
171
177
  @breadcrumbs.add "Help"
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: 17
5
- prerelease: false
4
+ hash: 23
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nando Vieira
@@ -16,16 +16,31 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-12-13 00:00:00 +00:00
19
+ date: 2011-02-16 00:00:00 +00:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: actionpack
24
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ hash: 7
30
+ segments:
31
+ - 3
32
+ - 0
33
+ - 0
34
+ version: 3.0.0
24
35
  prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
36
+ type: :runtime
37
+ requirement: *id001
38
+ - !ruby/object:Gem::Dependency
39
+ name: activemodel
40
+ version_requirements: &id002 !ruby/object:Gem::Requirement
26
41
  none: false
27
42
  requirements:
28
- - - ">="
43
+ - - ~>
29
44
  - !ruby/object:Gem::Version
30
45
  hash: 7
31
46
  segments:
@@ -33,8 +48,9 @@ dependencies:
33
48
  - 0
34
49
  - 0
35
50
  version: 3.0.0
51
+ prerelease: false
36
52
  type: :runtime
37
- version_requirements: *id001
53
+ requirement: *id002
38
54
  description: Breadcrumbs is a simple plugin that adds a `breadcrumbs` object to controllers and views.
39
55
  email: dimitrij@blacksquaremedia.com
40
56
  executables: []
@@ -45,7 +61,6 @@ extra_rdoc_files:
45
61
  - README.rdoc
46
62
  files:
47
63
  - .bundle/config
48
- - .gitignore
49
64
  - Gemfile
50
65
  - Gemfile.lock
51
66
  - README.rdoc
@@ -67,8 +82,8 @@ homepage: http://github.com/bsm/breadcrumbs
67
82
  licenses: []
68
83
 
69
84
  post_install_message:
70
- rdoc_options:
71
- - --charset=UTF-8
85
+ rdoc_options: []
86
+
72
87
  require_paths:
73
88
  - lib
74
89
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -92,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
107
  requirements: []
93
108
 
94
109
  rubyforge_project:
95
- rubygems_version: 1.3.7
110
+ rubygems_version: 1.5.0
96
111
  signing_key:
97
112
  specification_version: 3
98
113
  summary: Breadcrumbs is a simple plugin that adds a `breadcrumbs` object to controllers and views.
data/.gitignore DELETED
@@ -1,2 +0,0 @@
1
- pkg
2
- doc