breadcrumbs 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ pkg
2
+ doc
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source :rubygems
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,61 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ breadcrumbs (0.1.6)
5
+ i18n
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ abstract (1.0.0)
11
+ actionpack (3.0.5)
12
+ activemodel (= 3.0.5)
13
+ activesupport (= 3.0.5)
14
+ builder (~> 2.1.2)
15
+ erubis (~> 2.6.6)
16
+ i18n (~> 0.4)
17
+ rack (~> 1.2.1)
18
+ rack-mount (~> 0.6.13)
19
+ rack-test (~> 0.5.7)
20
+ tzinfo (~> 0.3.23)
21
+ activemodel (3.0.5)
22
+ activesupport (= 3.0.5)
23
+ builder (~> 2.1.2)
24
+ i18n (~> 0.4)
25
+ activesupport (3.0.5)
26
+ archive-tar-minitar (0.5.2)
27
+ builder (2.1.2)
28
+ columnize (0.3.2)
29
+ erubis (2.6.6)
30
+ abstract (>= 1.0.0)
31
+ i18n (0.5.0)
32
+ linecache19 (0.5.11)
33
+ ruby_core_source (>= 0.1.4)
34
+ mocha (0.9.12)
35
+ nokogiri (1.4.4)
36
+ rack (1.2.1)
37
+ rack-mount (0.6.13)
38
+ rack (>= 1.0.0)
39
+ rack-test (0.5.7)
40
+ rack (>= 1.0)
41
+ ruby-debug-base19 (0.11.24)
42
+ columnize (>= 0.3.1)
43
+ linecache19 (>= 0.5.11)
44
+ ruby_core_source (>= 0.1.4)
45
+ ruby-debug19 (0.11.6)
46
+ columnize (>= 0.3.1)
47
+ linecache19 (>= 0.5.11)
48
+ ruby-debug-base19 (>= 0.11.19)
49
+ ruby_core_source (0.1.4)
50
+ archive-tar-minitar (>= 0.5.2)
51
+ tzinfo (0.3.24)
52
+
53
+ PLATFORMS
54
+ ruby
55
+
56
+ DEPENDENCIES
57
+ actionpack
58
+ breadcrumbs!
59
+ mocha
60
+ nokogiri
61
+ ruby-debug19
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler"
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require "rake/testtask"
5
+ Rake::TestTask.new do |t|
6
+ t.libs << "test"
7
+ t.libs << "lib"
8
+ t.test_files = FileList["test/**/*_test.rb"]
9
+ t.verbose = true
10
+ end
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "breadcrumbs/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "breadcrumbs"
7
+ s.version = Breadcrumbs::Version::STRING
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Nando Vieira"]
10
+ s.email = ["fnando.vieira@gmail.com"]
11
+ s.homepage = "http://rubygems.org/gems/breadcrumbs"
12
+ s.summary = "Breadcrumbs is a simple plugin that adds a `breadcrumbs` object to controllers and views."
13
+ s.description = s.summary
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ s.add_dependency "i18n"
21
+
22
+ s.add_development_dependency "nokogiri"
23
+ s.add_development_dependency "actionpack"
24
+ s.add_development_dependency "mocha"
25
+ s.add_development_dependency "ruby-debug19" if RUBY_VERSION >= "1.9"
26
+ end
@@ -2,7 +2,7 @@ class Breadcrumbs
2
2
  module Version # :nodoc: all
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 5
5
+ PATCH = 6
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
data/lib/breadcrumbs.rb CHANGED
@@ -54,7 +54,7 @@ class Breadcrumbs
54
54
  def render(options = {})
55
55
  options[:format] ||= :list
56
56
 
57
- klass_name = options[:format].to_s.classify
57
+ klass_name = options.delete(:format).to_s.classify
58
58
  klass = Breadcrumbs::Render.const_get(klass_name)
59
59
  html = klass.new(self, options).render
60
60
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require "test_helper"
2
3
 
3
4
  class BreadcrumbsTest < Test::Unit::TestCase
@@ -50,6 +51,7 @@ class BreadcrumbsTest < Test::Unit::TestCase
50
51
  html = Nokogiri::HTML(@breadcrumbs.render)
51
52
 
52
53
  assert_not_nil html.at("ul.breadcrumbs")
54
+ assert_nil html.at("ul.breadcrumbs[format=list]")
53
55
  end
54
56
 
55
57
  def test_render_as_ordered_list
data/test/test_helper.rb CHANGED
@@ -1,5 +1,3 @@
1
- require "rubygems"
2
- gem "test-unit"
3
1
  require "test/unit"
4
2
  require "cgi"
5
3
  require "nokogiri"
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: breadcrumbs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 1
9
- - 5
10
- version: 0.1.5
4
+ prerelease:
5
+ version: 0.1.6
11
6
  platform: ruby
12
7
  authors:
13
8
  - Nando Vieira
@@ -15,20 +10,80 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2010-08-26 00:00:00 -03:00
13
+ date: 2011-03-03 00:00:00 -03:00
19
14
  default_executable:
20
- dependencies: []
21
-
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: i18n
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: nokogiri
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
36
+ type: :development
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: actionpack
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: mocha
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ type: :development
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: ruby-debug19
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
69
+ type: :development
70
+ version_requirements: *id005
22
71
  description: Breadcrumbs is a simple plugin that adds a `breadcrumbs` object to controllers and views.
23
- email: fnando.vieira@gmail.com
72
+ email:
73
+ - fnando.vieira@gmail.com
24
74
  executables: []
25
75
 
26
76
  extensions: []
27
77
 
28
- extra_rdoc_files:
29
- - README.rdoc
78
+ extra_rdoc_files: []
79
+
30
80
  files:
81
+ - .gitignore
82
+ - Gemfile
83
+ - Gemfile.lock
31
84
  - README.rdoc
85
+ - Rakefile
86
+ - breadcrumbs.gemspec
32
87
  - lib/breadcrumbs.rb
33
88
  - lib/breadcrumbs/action_controller_ext.rb
34
89
  - lib/breadcrumbs/render.rb
@@ -41,12 +96,12 @@ files:
41
96
  - test/resources/pt.yml
42
97
  - test/test_helper.rb
43
98
  has_rdoc: true
44
- homepage: http://github.com/fnando/breadcrumbs
99
+ homepage: http://rubygems.org/gems/breadcrumbs
45
100
  licenses: []
46
101
 
47
102
  post_install_message:
48
- rdoc_options:
49
- - --charset=UTF-8
103
+ rdoc_options: []
104
+
50
105
  require_paths:
51
106
  - lib
52
107
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -54,26 +109,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
54
109
  requirements:
55
110
  - - ">="
56
111
  - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
112
  version: "0"
61
113
  required_rubygems_version: !ruby/object:Gem::Requirement
62
114
  none: false
63
115
  requirements:
64
116
  - - ">="
65
117
  - !ruby/object:Gem::Version
66
- hash: 3
67
- segments:
68
- - 0
69
118
  version: "0"
70
119
  requirements: []
71
120
 
72
121
  rubyforge_project:
73
- rubygems_version: 1.3.7
122
+ rubygems_version: 1.6.0
74
123
  signing_key:
75
124
  specification_version: 3
76
125
  summary: Breadcrumbs is a simple plugin that adds a `breadcrumbs` object to controllers and views.
77
126
  test_files:
78
127
  - test/breadcrumbs_test.rb
128
+ - test/resources/pt.yml
79
129
  - test/test_helper.rb