breadcrumble 3.0.5 → 3.0.6

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/README.md CHANGED
@@ -1,7 +1,16 @@
1
1
  # Breadcrumble [![Build Status](https://secure.travis-ci.org/ma2gedev/breadcrumble.png?branch=master)](http://travis-ci.org/ma2gedev/breadcrumble)
2
2
 
3
+ ![Breadcrumble Logo](http://ma2gedev.github.io/breadcrumble/images/logo_s.png)
4
+ created by [@524shoutz_nika](https://twitter.com/524shoutz_nika)
5
+
3
6
  Breadcrumble is a simple breadcrumb navigation plugin for Ruby on Rails 3 and Rails 4.0.
4
7
 
8
+ Support rich snippets mark up using microdata format as default.
9
+
10
+ And also support multiple breadcrumb trails.
11
+
12
+ See also about rich snippets -> <http://support.google.com/webmasters/bin/answer.py?hl=en&answer=185417>
13
+
5
14
  ## Installation
6
15
 
7
16
  Add this line to your application's Gemfile:
@@ -76,6 +85,11 @@ then edit the partials in your app's `app/views/breadcrumble/` directory.
76
85
 
77
86
  ## Contributing
78
87
 
88
+ ### Easy way
89
+ It's easy to contribute. You only push the star button!
90
+
91
+ ### The other way
92
+
79
93
  1. Fork it
80
94
  2. Create your feature branch (`git checkout -b my-new-feature`)
81
95
  3. Commit your changes (`git commit -am 'Added some feature'`)
@@ -35,7 +35,7 @@ module Breadcrumble
35
35
  end
36
36
 
37
37
  def add_breadcrumb_to name, url, trail_index
38
- @breadcrumb_trails ||= [[]]
38
+ self.breadcrumb_trails
39
39
  @breadcrumb_trails[trail_index] ||= []
40
40
  @breadcrumb_trails[trail_index] << {
41
41
  name: case name
@@ -56,11 +56,11 @@ module Breadcrumble
56
56
  end
57
57
 
58
58
  def breadcrumb_trails
59
- @breadcrumb_trails
59
+ @breadcrumb_trails ||= []
60
60
  end
61
61
 
62
62
  def breadcrumbs
63
- @breadcrumb_trails.first
63
+ self.breadcrumb_trails.first || []
64
64
  end
65
65
  end
66
66
  end
@@ -1,3 +1,3 @@
1
1
  module Breadcrumble
2
- VERSION = "3.0.5"
2
+ VERSION = "3.0.6"
3
3
  end
@@ -0,0 +1,19 @@
1
+ require "spec_helper"
2
+
3
+ describe ExamplesController do
4
+ describe '#index' do
5
+ subject do
6
+ get :index
7
+ end
8
+
9
+ it 'breadcrumbs' do
10
+ should be_success
11
+ controller.send(:breadcrumbs).should eq([])
12
+ end
13
+
14
+ it 'breadcrumb_trails' do
15
+ should be_success
16
+ controller.send(:breadcrumb_trails).should eq([])
17
+ end
18
+ end
19
+ end
@@ -2,8 +2,10 @@ class ExamplesController < ApplicationController
2
2
  protect_from_forgery
3
3
 
4
4
  def index
5
+ render text: 'test'
5
6
  end
6
7
 
7
8
  def show
9
+ render text: 'test'
8
10
  end
9
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: breadcrumble
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
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-05-30 00:00:00.000000000 Z
12
+ date: 2013-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -84,6 +84,7 @@ files:
84
84
  - lib/breadcrumble/version.rb
85
85
  - lib/generators/breadcrumble/views_generator.rb
86
86
  - spec/controllers/application_controller_spec.rb
87
+ - spec/controllers/examples_controller_spec.rb
87
88
  - spec/dummy/Rakefile
88
89
  - spec/dummy/app/controllers/application_controller.rb
89
90
  - spec/dummy/app/controllers/concerns/.keep
@@ -127,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
128
  version: '0'
128
129
  segments:
129
130
  - 0
130
- hash: 2253553604662320325
131
+ hash: 1540112929019016709
131
132
  required_rubygems_version: !ruby/object:Gem::Requirement
132
133
  none: false
133
134
  requirements:
@@ -136,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
137
  version: '0'
137
138
  segments:
138
139
  - 0
139
- hash: 2253553604662320325
140
+ hash: 1540112929019016709
140
141
  requirements: []
141
142
  rubyforge_project:
142
143
  rubygems_version: 1.8.23
@@ -146,6 +147,7 @@ summary: Breadcrumble is a simple breadcrumb navigation plugin for Ruby on Rails
146
147
  and Rails 4.0.
147
148
  test_files:
148
149
  - spec/controllers/application_controller_spec.rb
150
+ - spec/controllers/examples_controller_spec.rb
149
151
  - spec/dummy/Rakefile
150
152
  - spec/dummy/app/controllers/application_controller.rb
151
153
  - spec/dummy/app/controllers/concerns/.keep