breadcrumbs_on_rails 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,7 +1,3 @@
1
- .DS_Store
2
- nbproject
3
- .idea
1
+ .bundle
4
2
  pkg
5
- doc
6
- coverage
7
- rdoc
3
+ yardoc
data/.travis.yml ADDED
@@ -0,0 +1,12 @@
1
+ rvm:
2
+ - 1.8.7
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - ree
6
+ gemfile:
7
+ - gemfiles/3.0.gemfile
8
+ - gemfiles/3.1.gemfile
9
+ - gemfiles/3.2.gemfile
10
+ notifications:
11
+ recipients:
12
+ - weppos@weppos.net
data/Appraisals ADDED
@@ -0,0 +1,11 @@
1
+ appraise "3.0" do
2
+ gem "activerecord", "~> 3.0"
3
+ end
4
+
5
+ appraise "3.1" do
6
+ gem "activerecord", "~> 3.1"
7
+ end
8
+
9
+ appraise "3.2" do
10
+ gem "activerecord", "~> 3.2"
11
+ end
@@ -1,30 +1,43 @@
1
- = Changelog
1
+ # Changelog
2
2
 
3
- == Release 2.1.0
3
+
4
+ ## Release 2.2.0
5
+
6
+ * NEW: Support for Rails 3.2.
7
+
8
+ * FIXED: Fixed Rails 3.2 ActiveSupport::Concern deprecation warning (GH-17, GH-20).
9
+
10
+
11
+ ## Release 2.1.0
4
12
 
5
13
  * NEW: Element now accepts a Hash of options. The options can be useful to customize the appearance of the element, for example to set a link title or class.
6
14
 
7
- == Release 2.0.0
15
+
16
+ ## Release 2.0.0
8
17
 
9
18
  * FIXED: Invalid documentation for Element target in the controller class context (closes #2)
10
19
 
11
20
  * CHANGED: Upgraded to Rails 3
12
21
 
13
- == Release 1.0.1
22
+
23
+ ## Release 1.0.1
14
24
 
15
25
  * FIXED: Since the removal of rails/init.rb in 7278376ab77651e540e39552384ad9677e32ff7e, Rails fails to load the helpers.
16
26
 
17
- == Release 1.0.0
27
+
28
+ ## Release 1.0.0
18
29
 
19
30
  * CHANGED: Removed empty install/uninstall hooks and tasks folder.
20
31
 
21
32
  * CHANGED: Removed rails/init hook because deprecated in Rails 3.
22
33
 
23
- == Release 0.2.0
34
+
35
+ ## Release 0.2.0
24
36
 
25
37
  * Releasing the library as open source project.
26
38
 
27
- == Release 0.1.1
39
+ ## Release 0.1.1
40
+
28
41
 
29
42
  * ADDED: documentation file.
30
43
 
@@ -32,6 +45,7 @@
32
45
 
33
46
  * CHANGED: Removed BUILD and STATUS constants. Added Version::ALPHA constant to be used when I need to package prereleases (see RubyGem --prerelease flag).
34
47
 
35
- == Release 0.1.0
48
+
49
+ ## Release 0.1.0
36
50
 
37
51
  * Initial version
data/Gemfile.lock CHANGED
@@ -1,81 +1,99 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- breadcrumbs_on_rails (2.1.0)
4
+ breadcrumbs_on_rails (2.2.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
8
8
  specs:
9
- abstract (1.0.0)
10
- actionmailer (3.0.7)
11
- actionpack (= 3.0.7)
12
- mail (~> 2.2.15)
13
- actionpack (3.0.7)
14
- activemodel (= 3.0.7)
15
- activesupport (= 3.0.7)
16
- builder (~> 2.1.2)
17
- erubis (~> 2.6.6)
18
- i18n (~> 0.5.0)
19
- rack (~> 1.2.1)
20
- rack-mount (~> 0.6.14)
21
- rack-test (~> 0.5.7)
22
- tzinfo (~> 0.3.23)
23
- activemodel (3.0.7)
24
- activesupport (= 3.0.7)
25
- builder (~> 2.1.2)
26
- i18n (~> 0.5.0)
27
- activerecord (3.0.7)
28
- activemodel (= 3.0.7)
29
- activesupport (= 3.0.7)
30
- arel (~> 2.0.2)
31
- tzinfo (~> 0.3.23)
32
- activeresource (3.0.7)
33
- activemodel (= 3.0.7)
34
- activesupport (= 3.0.7)
35
- activesupport (3.0.7)
36
- arel (2.0.9)
37
- builder (2.1.2)
38
- erubis (2.6.6)
39
- abstract (>= 1.0.0)
40
- i18n (0.5.0)
41
- mail (2.2.19)
42
- activesupport (>= 2.3.6)
9
+ actionmailer (3.2.1)
10
+ actionpack (= 3.2.1)
11
+ mail (~> 2.4.0)
12
+ actionpack (3.2.1)
13
+ activemodel (= 3.2.1)
14
+ activesupport (= 3.2.1)
15
+ builder (~> 3.0.0)
16
+ erubis (~> 2.7.0)
17
+ journey (~> 1.0.1)
18
+ rack (~> 1.4.0)
19
+ rack-cache (~> 1.1)
20
+ rack-test (~> 0.6.1)
21
+ sprockets (~> 2.1.2)
22
+ activemodel (3.2.1)
23
+ activesupport (= 3.2.1)
24
+ builder (~> 3.0.0)
25
+ activerecord (3.2.1)
26
+ activemodel (= 3.2.1)
27
+ activesupport (= 3.2.1)
28
+ arel (~> 3.0.0)
29
+ tzinfo (~> 0.3.29)
30
+ activeresource (3.2.1)
31
+ activemodel (= 3.2.1)
32
+ activesupport (= 3.2.1)
33
+ activesupport (3.2.1)
34
+ i18n (~> 0.6)
35
+ multi_json (~> 1.0)
36
+ appraisal (0.4.0)
37
+ bundler
38
+ rake
39
+ arel (3.0.0)
40
+ builder (3.0.0)
41
+ erubis (2.7.0)
42
+ hike (1.2.1)
43
+ i18n (0.6.0)
44
+ journey (1.0.1)
45
+ json (1.6.5)
46
+ mail (2.4.1)
43
47
  i18n (>= 0.4.0)
44
48
  mime-types (~> 1.16)
45
49
  treetop (~> 1.4.8)
46
- mime-types (1.16)
50
+ mime-types (1.17.2)
47
51
  mocha (0.9.12)
48
- polyglot (0.3.1)
49
- rack (1.2.2)
50
- rack-mount (0.6.14)
51
- rack (>= 1.0.0)
52
- rack-test (0.5.7)
52
+ multi_json (1.0.4)
53
+ polyglot (0.3.3)
54
+ rack (1.4.1)
55
+ rack-cache (1.1)
56
+ rack (>= 0.4)
57
+ rack-ssl (1.3.2)
58
+ rack
59
+ rack-test (0.6.1)
53
60
  rack (>= 1.0)
54
- rails (3.0.7)
55
- actionmailer (= 3.0.7)
56
- actionpack (= 3.0.7)
57
- activerecord (= 3.0.7)
58
- activeresource (= 3.0.7)
59
- activesupport (= 3.0.7)
61
+ rails (3.2.1)
62
+ actionmailer (= 3.2.1)
63
+ actionpack (= 3.2.1)
64
+ activerecord (= 3.2.1)
65
+ activeresource (= 3.2.1)
66
+ activesupport (= 3.2.1)
60
67
  bundler (~> 1.0)
61
- railties (= 3.0.7)
62
- railties (3.0.7)
63
- actionpack (= 3.0.7)
64
- activesupport (= 3.0.7)
68
+ railties (= 3.2.1)
69
+ railties (3.2.1)
70
+ actionpack (= 3.2.1)
71
+ activesupport (= 3.2.1)
72
+ rack-ssl (~> 1.3.2)
65
73
  rake (>= 0.8.7)
66
- thor (~> 0.14.4)
67
- rake (0.8.7)
74
+ rdoc (~> 3.4)
75
+ thor (~> 0.14.6)
76
+ rake (0.9.2.2)
77
+ rdoc (3.12)
78
+ json (~> 1.4)
79
+ sprockets (2.1.2)
80
+ hike (~> 1.2)
81
+ rack (~> 1.0)
82
+ tilt (~> 1.1, != 1.3.0)
68
83
  thor (0.14.6)
69
- treetop (1.4.9)
84
+ tilt (1.3.3)
85
+ treetop (1.4.10)
86
+ polyglot
70
87
  polyglot (>= 0.3.1)
71
- tzinfo (0.3.27)
88
+ tzinfo (0.3.31)
89
+ yard (0.7.5)
72
90
 
73
91
  PLATFORMS
74
92
  ruby
75
93
 
76
94
  DEPENDENCIES
95
+ appraisal
77
96
  breadcrumbs_on_rails!
78
- bundler
79
97
  mocha (~> 0.9.10)
80
- rails (~> 3.0.0)
81
- rake
98
+ rails (>= 3.0)
99
+ yard
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009-2011 Simone Carletti
1
+ Copyright (c) 2009-2012 Simone Carletti
2
2
 
3
3
  MIT License
4
4
 
data/README.md ADDED
@@ -0,0 +1,99 @@
1
+ # Breadcrumbs On Rails
2
+
3
+ *BreadcrumbsOnRails* is a simple Ruby on Rails plugin for creating and managing a breadcrumb navigation for a Rails project.
4
+ It provides helpers for creating navigation elements with a flexible interface.
5
+
6
+
7
+ ## Requirements
8
+
9
+ * Rails 3
10
+
11
+ Please note
12
+
13
+ * BreadcrumbsOnRails 2.x requires Rails 3. Use BreadcrumbsOnRails 1.x with Rails 2.
14
+ * BreadcrumbsOnRails doesn't work with Rails 2.1 or lower.
15
+
16
+
17
+ ## Installation
18
+
19
+ [RubyGems](http://rubygems.org) is the preferred way to install *BreadcrumbsOnRails* and the best way if you want install a stable version.
20
+
21
+ $ gem install breadcrumbs_on_rails
22
+
23
+ Specify the Gem dependency in the [Bundler](http://gembundler.com) `Gemfile`.
24
+
25
+ gem "breadcrumbs_on_rails"
26
+
27
+ Use [Bundler](http://gembundler.com) and the [:git option](http://gembundler.com/v1.0/git.html) if you want to grab the latest version from the Git repository.
28
+
29
+
30
+ ## Basic Usage
31
+
32
+ Creating a breadcrumb navigation menu in your Rails app using *BreadcrumbsOnRails* is really straightforward.
33
+
34
+ In your controller, call `add_breadcrumb` to push a new element on the breadcrumb stack. `add_breadcrumb` requires two arguments: the name of the breadcrumb and the target path.
35
+
36
+ class MyController
37
+
38
+ add_breadcrumb "home", :root_path
39
+ add_breadcrumb "my", :my_path
40
+
41
+ def index
42
+ # ...
43
+
44
+ add_breadcrumb "index", index_path
45
+ end
46
+
47
+ end
48
+
49
+ The third, optional argument is a Hash of options to customize the breadcrumb link.
50
+
51
+ class MyController
52
+ def index
53
+ add_breadcrumb "index", index_path, :title => "Back to the Index"
54
+ end
55
+ end
56
+
57
+ In your view, you can render the breadcrumb menu with the `render_breadcrumbs` helper.
58
+
59
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
60
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
61
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
62
+ <head>
63
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
64
+ <title>untitled</title>
65
+ </head>
66
+
67
+ <body>
68
+ <%= render_breadcrumbs %>
69
+ </body>
70
+ </html>
71
+
72
+ `render_breadcrumbs` understands a limited set of options. For example, you can pass change the default separator with the `:separator` option.
73
+
74
+ <body>
75
+ <%= render_breadcrumbs :separator => ' / ' %>
76
+ </body>
77
+
78
+ More complex customizations require a custom Builder.
79
+
80
+ Read the [documentation](http://www.simonecarletti.com/code/breadcrumbs_on_rails/docs/) to learn more about advanced usage and builders.
81
+
82
+
83
+ ## Credits
84
+
85
+ * [Simone Carletti](http://www.simonecarletti.com/) <weppos@weppos.net> - The Author
86
+
87
+
88
+ ## Resources
89
+
90
+ * [Homepage](http://www.simonecarletti.com/code/breadcrumbs_on_rails)
91
+ * [Documentation](http://www.simonecarletti.com/code/breadcrumbs_on_rails/docs/)
92
+ * [API](http://rubydoc.info/gems/breadcrumbs_on_rails)
93
+ * [Repository](https://github.com/weppos/breadcrumbs_on_rails)
94
+ * [Issue Tracker](http://github.com/weppos/breadcrumbs_on_rails/issues)
95
+
96
+
97
+ ## License
98
+
99
+ *BreadcrumbsOnRails* is Copyright (c) 2009-2012 Simone Carletti. This is Free Software distributed under the MIT license.
data/Rakefile CHANGED
@@ -1,9 +1,6 @@
1
1
  require 'rubygems'
2
- require 'rubygems/package_task'
3
2
  require 'bundler'
4
- require 'rake/testtask'
5
- require 'yard'
6
- require 'yard/rake/yardoc_task'
3
+ require 'appraisal'
7
4
 
8
5
  $:.unshift(File.dirname(__FILE__) + "/lib")
9
6
  require 'breadcrumbs_on_rails/version'
@@ -12,19 +9,10 @@ require 'breadcrumbs_on_rails/version'
12
9
  PKG_NAME = ENV['PKG_NAME'] || "breadcrumbs_on_rails"
13
10
  PKG_VERSION = ENV['PKG_VERSION'] || BreadcrumbsOnRails::VERSION
14
11
 
15
- if ENV['SNAPSHOT'].to_i == 1
16
- PKG_VERSION << "." << Time.now.utc.strftime("%Y%m%d%H%M%S")
17
- end
18
-
19
12
 
20
13
  # Run test by default.
21
14
  task :default => :test
22
15
 
23
- # This builds the actual gem. For details of what all these options
24
- # mean, and other ones you can add, check the documentation here:
25
- #
26
- # http://rubygems.org/read/chapter/20
27
- #
28
16
  spec = Gem::Specification.new do |s|
29
17
  s.name = PKG_NAME
30
18
  s.version = PKG_VERSION
@@ -35,17 +23,19 @@ spec = Gem::Specification.new do |s|
35
23
  s.email = "weppos@weppos.net"
36
24
  s.homepage = "http://www.simonecarletti.com/code/breadcrumbs_on_rails"
37
25
 
38
- # Add any extra files to include in the gem (like your README)
39
26
  s.files = `git ls-files`.split("\n")
40
27
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
41
28
  s.require_paths = %w( lib )
42
29
 
43
- s.add_development_dependency("rake")
44
- s.add_development_dependency("bundler")
45
- s.add_development_dependency("rails", "~> 3.0.0")
46
- s.add_development_dependency("mocha", "~> 0.9.10")
30
+ s.add_development_dependency "rails", ">= 3.0"
31
+ s.add_development_dependency "appraisal"
32
+ s.add_development_dependency "mocha", "~> 0.9.10"
33
+ s.add_development_dependency "yard"
47
34
  end
48
35
 
36
+
37
+ require 'rubygems/package_task'
38
+
49
39
  Gem::PackageTask.new(spec) do |pkg|
50
40
  pkg.gem_spec = spec
51
41
  end
@@ -68,7 +58,8 @@ desc "Package the library and generates the gemspec"
68
58
  task :package => [:gemspec]
69
59
 
70
60
 
71
- # Run all the tests in the /test folder
61
+ require 'rake/testtask'
62
+
72
63
  Rake::TestTask.new do |t|
73
64
  t.libs << "test"
74
65
  t.test_files = FileList["test/**/*_test.rb"]
@@ -77,7 +68,9 @@ Rake::TestTask.new do |t|
77
68
  end
78
69
 
79
70
 
80
- # Generate documentation
71
+ require 'yard'
72
+ require 'yard/rake/yardoc_task'
73
+
81
74
  YARD::Rake::YardocTask.new(:yardoc) do |y|
82
75
  y.options = ["--output-dir", "yardoc"]
83
76
  end
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "breadcrumbs_on_rails"
5
- s.version = "2.1.0"
5
+ s.version = "2.2.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Simone Carletti"]
9
- s.date = "2011-09-20"
9
+ s.date = "2012-02-03"
10
10
  s.description = "BreadcrumbsOnRails is a simple Ruby on Rails plugin for creating and managing a breadcrumb navigation for a Rails project."
11
11
  s.email = "weppos@weppos.net"
12
- s.files = [".gitignore", "CHANGELOG.rdoc", "Gemfile", "Gemfile.lock", "LICENSE", "README.rdoc", "Rakefile", "breadcrumbs_on_rails.gemspec", "init.rb", "lib/breadcrumbs_on_rails.rb", "lib/breadcrumbs_on_rails/breadcrumbs.rb", "lib/breadcrumbs_on_rails/controller_mixin.rb", "lib/breadcrumbs_on_rails/railtie.rb", "lib/breadcrumbs_on_rails/version.rb", "test/test_helper.rb", "test/unit/builder_test.rb", "test/unit/element_test.rb", "test/unit/simple_builder_test.rb"]
12
+ s.files = [".gitignore", ".travis.yml", "Appraisals", "CHANGELOG.md", "Gemfile", "Gemfile.lock", "LICENSE", "README.md", "Rakefile", "breadcrumbs_on_rails.gemspec", "gemfiles/3.0.gemfile", "gemfiles/3.0.gemfile.lock", "gemfiles/3.1.gemfile", "gemfiles/3.1.gemfile.lock", "gemfiles/3.2.gemfile", "gemfiles/3.2.gemfile.lock", "init.rb", "lib/breadcrumbs_on_rails.rb", "lib/breadcrumbs_on_rails/action_controller.rb", "lib/breadcrumbs_on_rails/breadcrumbs.rb", "lib/breadcrumbs_on_rails/railtie.rb", "lib/breadcrumbs_on_rails/version.rb", "test/test_helper.rb", "test/unit/builder_test.rb", "test/unit/element_test.rb", "test/unit/simple_builder_test.rb"]
13
13
  s.homepage = "http://www.simonecarletti.com/code/breadcrumbs_on_rails"
14
14
  s.require_paths = ["lib"]
15
- s.rubygems_version = "1.8.10"
15
+ s.rubygems_version = "1.8.11"
16
16
  s.summary = "A simple Ruby on Rails plugin for creating and managing a breadcrumb navigation."
17
17
  s.test_files = ["test/test_helper.rb", "test/unit/builder_test.rb", "test/unit/element_test.rb", "test/unit/simple_builder_test.rb"]
18
18
 
@@ -20,20 +20,20 @@ Gem::Specification.new do |s|
20
20
  s.specification_version = 3
21
21
 
22
22
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
23
- s.add_development_dependency(%q<rake>, [">= 0"])
24
- s.add_development_dependency(%q<bundler>, [">= 0"])
25
- s.add_development_dependency(%q<rails>, ["~> 3.0.0"])
23
+ s.add_development_dependency(%q<rails>, [">= 3.0"])
24
+ s.add_development_dependency(%q<appraisal>, [">= 0"])
26
25
  s.add_development_dependency(%q<mocha>, ["~> 0.9.10"])
26
+ s.add_development_dependency(%q<yard>, [">= 0"])
27
27
  else
28
- s.add_dependency(%q<rake>, [">= 0"])
29
- s.add_dependency(%q<bundler>, [">= 0"])
30
- s.add_dependency(%q<rails>, ["~> 3.0.0"])
28
+ s.add_dependency(%q<rails>, [">= 3.0"])
29
+ s.add_dependency(%q<appraisal>, [">= 0"])
31
30
  s.add_dependency(%q<mocha>, ["~> 0.9.10"])
31
+ s.add_dependency(%q<yard>, [">= 0"])
32
32
  end
33
33
  else
34
- s.add_dependency(%q<rake>, [">= 0"])
35
- s.add_dependency(%q<bundler>, [">= 0"])
36
- s.add_dependency(%q<rails>, ["~> 3.0.0"])
34
+ s.add_dependency(%q<rails>, [">= 3.0"])
35
+ s.add_dependency(%q<appraisal>, [">= 0"])
37
36
  s.add_dependency(%q<mocha>, ["~> 0.9.10"])
37
+ s.add_dependency(%q<yard>, [">= 0"])
38
38
  end
39
39
  end