crummy 1.3 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +6 -3
- data/Rakefile +7 -6
- data/VERSION +1 -1
- data/lib/crummy/action_controller.rb +7 -5
- metadata +38 -19
data/README.textile
CHANGED
@@ -10,7 +10,7 @@ Simply add the dependency to your Gemfile:
|
|
10
10
|
|
11
11
|
<pre>
|
12
12
|
<code>
|
13
|
-
gem "crummy", "~> 1.3"
|
13
|
+
gem "crummy", "~> 1.3.5"
|
14
14
|
</code>
|
15
15
|
</pre>
|
16
16
|
|
@@ -82,7 +82,7 @@ Render links in the output. Defaults to +true+
|
|
82
82
|
|
83
83
|
<code>:skip_if_blank => true</code>
|
84
84
|
|
85
|
-
With this option, output will be blank if there are no
|
85
|
+
With this option, output will be blank if there are no breadcrumbs.
|
86
86
|
|
87
87
|
h3. Examples
|
88
88
|
|
@@ -100,11 +100,14 @@ With :format => :html_list you can specify additional params: :active_li_class,
|
|
100
100
|
|
101
101
|
h2. Notes
|
102
102
|
|
103
|
+
Test library is at "Crummy Test":https://github.com/zachinglis/crummy-test
|
104
|
+
|
103
105
|
h2. Todo
|
104
106
|
|
105
|
-
*
|
107
|
+
* Accept collections of models as a single argument
|
106
108
|
* Accept instances of models as a single argument
|
107
109
|
* Allow for variables in names. (The workaround is to do your own before_filter for that currently)
|
110
|
+
* Make a crumbs? type method
|
108
111
|
|
109
112
|
h2. Credits
|
110
113
|
|
data/Rakefile
CHANGED
@@ -28,12 +28,13 @@ Rake::TestTask.new(:test) do |t|
|
|
28
28
|
t.verbose = true
|
29
29
|
end
|
30
30
|
|
31
|
-
begin
|
32
|
-
|
33
|
-
|
34
|
-
rescue LoadError
|
35
|
-
require '
|
36
|
-
end
|
31
|
+
# begin
|
32
|
+
# gem 'hanna'
|
33
|
+
# require 'hanna/rdoctask'
|
34
|
+
# rescue LoadError
|
35
|
+
require 'rdoc/task'
|
36
|
+
# end
|
37
|
+
|
37
38
|
desc 'Generate documentation for the crummy plugin.'
|
38
39
|
Rake::RDocTask.new(:rdoc) do |rdoc|
|
39
40
|
rdoc.rdoc_dir = 'rdoc'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3
|
1
|
+
1.3.5
|
@@ -18,22 +18,24 @@ module Crummy
|
|
18
18
|
url = instance.send url if url.is_a? Symbol
|
19
19
|
|
20
20
|
if url.present?
|
21
|
-
if url.kind_of?
|
21
|
+
if url.kind_of? Array
|
22
22
|
url.map! do |name|
|
23
23
|
name.is_a?(Symbol) ? instance.instance_variable_get("@#{name}") : name
|
24
24
|
end
|
25
25
|
end
|
26
|
-
|
26
|
+
if not url.kind_of? String
|
27
|
+
url = instance.send :url_for, url
|
28
|
+
end
|
27
29
|
end
|
28
30
|
|
29
31
|
# Get the return value of the name if its a proc.
|
30
|
-
|
32
|
+
name = name.call(instance) if name.is_a?(Proc)
|
31
33
|
|
32
|
-
_record = instance.instance_variable_get("@#{
|
34
|
+
_record = instance.instance_variable_get("@#{name}") unless name.kind_of?(String)
|
33
35
|
if _record and _record.respond_to? :to_param
|
34
36
|
instance.add_crumb(_record.to_s, url || instance.url_for(_record))
|
35
37
|
else
|
36
|
-
instance.add_crumb(
|
38
|
+
instance.add_crumb(name, url)
|
37
39
|
end
|
38
40
|
|
39
41
|
# FIXME: url = instance.url_for(name) if name.respond_to?("to_param") && url.nil?
|
metadata
CHANGED
@@ -1,23 +1,32 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: crummy
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 3
|
9
|
+
- 5
|
10
|
+
version: 1.3.5
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Zach Inglis
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
17
|
+
|
18
|
+
date: 2011-11-04 00:00:00 Z
|
13
19
|
dependencies: []
|
20
|
+
|
14
21
|
description: Crummy is a simple and tasty way to add breadcrumbs to your Rails applications.
|
15
22
|
email: zach+crummy@londonmade.co.uk
|
16
23
|
executables: []
|
24
|
+
|
17
25
|
extensions: []
|
18
|
-
|
26
|
+
|
27
|
+
extra_rdoc_files:
|
19
28
|
- README.textile
|
20
|
-
files:
|
29
|
+
files:
|
21
30
|
- .gitignore
|
22
31
|
- MIT-LICENSE
|
23
32
|
- README.textile
|
@@ -32,26 +41,36 @@ files:
|
|
32
41
|
- tasks/crummy_tasks.rake
|
33
42
|
homepage: http://github.com/zachinglis/crummy
|
34
43
|
licenses: []
|
44
|
+
|
35
45
|
post_install_message:
|
36
46
|
rdoc_options: []
|
37
|
-
|
47
|
+
|
48
|
+
require_paths:
|
38
49
|
- lib
|
39
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
51
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
hash: 3
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
version: "0"
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
60
|
none: false
|
47
|
-
requirements:
|
48
|
-
- -
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
hash: 3
|
65
|
+
segments:
|
66
|
+
- 0
|
67
|
+
version: "0"
|
51
68
|
requirements: []
|
69
|
+
|
52
70
|
rubyforge_project:
|
53
|
-
rubygems_version: 1.8.
|
71
|
+
rubygems_version: 1.8.10
|
54
72
|
signing_key:
|
55
73
|
specification_version: 3
|
56
74
|
summary: Tasty breadcrumbs!
|
57
75
|
test_files: []
|
76
|
+
|