gretel 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/gretel.rb CHANGED
@@ -2,4 +2,6 @@ require 'gretel/crumb'
2
2
  require 'gretel/crumbs'
3
3
  require 'gretel/helper_methods'
4
4
  require 'gretel/link'
5
- require 'gretel/parent'
5
+ require 'gretel/parent'
6
+
7
+ ActionController::Base.send :include, Gretel::HelperMethods
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gretel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 3
10
+ version: 1.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lasse Bunk
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-10 00:00:00 Z
18
+ date: 2011-09-20 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Gretel is a Ruby on Rails plugin that makes it easy yet flexible to create breadcrumbs.
@@ -27,24 +27,14 @@ extensions: []
27
27
  extra_rdoc_files: []
28
28
 
29
29
  files:
30
- - gretel-1.0.0.gem
31
- - gretel.gemspec
32
- - init.rb
33
- - initializers/breadcrumbs.rb
34
30
  - lib/generators/gretel/gretel_generator.rb
35
31
  - lib/generators/gretel/templates/initializer.rb
36
- - lib/generators/gretel/USAGE
37
32
  - lib/gretel/crumb.rb
38
33
  - lib/gretel/crumbs.rb
39
34
  - lib/gretel/helper_methods.rb
40
35
  - lib/gretel/link.rb
41
36
  - lib/gretel/parent.rb
42
37
  - lib/gretel.rb
43
- - MIT-LICENSE
44
- - Rakefile
45
- - README.rdoc
46
- - test/gretel_test.rb
47
- - test/test_helper.rb
48
38
  homepage: http://github.com/lassebunk/gretel
49
39
  licenses: []
50
40
 
data/MIT-LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2010 Lasse Bunk
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc DELETED
@@ -1,73 +0,0 @@
1
- Gretel is a Ruby on Rails plugin that makes it easy yet flexible to create breadcrumbs.
2
-
3
-
4
- == Installation
5
-
6
- In Rails 3, in your Gemfile:
7
-
8
- gem 'gretel'
9
-
10
-
11
- == Example
12
-
13
- Start by generating initializer:
14
-
15
- $ rails generate gretel breadcrumbs
16
-
17
- In <code>config/initializers/breadcrumbs.rb</code>:
18
-
19
- Gretel::Crumbs.layout do
20
-
21
- crumb :root do
22
- link "Home", root_path
23
- end
24
-
25
- crumb :projects do
26
- link "Projects", projects_path
27
- end
28
-
29
- crumb :project do |project|
30
- link lambda { |project| "#{project.name} (#{project.id.to_s})" }, project_path(project)
31
- parent :projects
32
- end
33
-
34
- crumb :project_issues do |project|
35
- link "Issues", project_issues_path(project)
36
- parent :project, project
37
- end
38
-
39
- crumb :issue do |issue|
40
- link issue.name, issue_path(issue)
41
- parent :project_issues, issue.project
42
- end
43
-
44
- end
45
-
46
- In <code>app/views/layouts/application.html.erb</code>:
47
-
48
- <%= breadcrumb :pretext => "You are here:",
49
- :separator => ">",
50
- :autoroot => true,
51
- :show_root_alone => true,
52
- :link_last => false %>
53
-
54
- In <code>app/views/xx/xx.html.erb</code>:
55
-
56
- <% breadcrumb :issue, @issue %>
57
-
58
- This could also be done in the controller, if you prefer:
59
-
60
- def show
61
- @project = Project.find(params[:id])
62
- breadcrumb :project, @project
63
- end
64
-
65
- Options for <code><%= breadcrumb %></code>:
66
-
67
- :pretext Text to be rendered before breadcrumb, if any. Default: none
68
- :separator Separator between links. Default: &gt;
69
- :autoroot Whether it should automatically link to :root if no root parent is given. Default: false
70
- :show_root_alone Whether it should show :root if this is the only link. Default: false
71
- :link_last Whether the last crumb should be linked to. Default: false
72
-
73
- Copyright (c) 2010 Lasse Bunk, released under the MIT license
data/Rakefile DELETED
@@ -1,23 +0,0 @@
1
- require 'rake'
2
- require 'rake/testtask'
3
- require 'rake/rdoctask'
4
-
5
- desc 'Default: run unit tests.'
6
- task :default => :test
7
-
8
- desc 'Test the gretel plugin.'
9
- Rake::TestTask.new(:test) do |t|
10
- t.libs << 'lib'
11
- t.libs << 'test'
12
- t.pattern = 'test/**/*_test.rb'
13
- t.verbose = true
14
- end
15
-
16
- desc 'Generate documentation for the gretel plugin.'
17
- Rake::RDocTask.new(:rdoc) do |rdoc|
18
- rdoc.rdoc_dir = 'rdoc'
19
- rdoc.title = 'Gretel'
20
- rdoc.options << '--line-numbers' << '--inline-source'
21
- rdoc.rdoc_files.include('README')
22
- rdoc.rdoc_files.include('lib/**/*.rb')
23
- end
data/gretel-1.0.0.gem DELETED
Binary file
data/gretel.gemspec DELETED
@@ -1,11 +0,0 @@
1
- Gem::Specification.new do |s|
2
- s.name = "gretel"
3
- s.version = "1.0.1"
4
-
5
- s.author = "Lasse Bunk"
6
- s.email = "lassebunk@gmail.com"
7
- s.description = "Gretel is a Ruby on Rails plugin that makes it easy yet flexible to create breadcrumbs."
8
- s.summary = "Flexible Ruby on Rails breadcrumbs plugin."
9
- s.homepage = "http://github.com/lassebunk/gretel"
10
- s.files = Dir['**/*']
11
- end
data/init.rb DELETED
@@ -1 +0,0 @@
1
- ActionController::Base.send :include, Gretel::HelperMethods
@@ -1,30 +0,0 @@
1
- Gretel::Crumbs.layout do
2
-
3
- # Remember to restart your application after editing this file.
4
-
5
- # Example crumbs:
6
-
7
- # crumb :root do
8
- # link "Home", root_path
9
- # end
10
-
11
- # crumb :projects do
12
- # link "Projects", projects_path
13
- # end
14
-
15
- # crumb :project do |project|
16
- # link lambda { |project| "#{project.name} (#{project.id.to_s})" }, project_path(project)
17
- # parent :projects
18
- # end
19
-
20
- # crumb :project_issues do |project|
21
- # link "Issues", project_issues_path(project)
22
- # parent :project, project
23
- # end
24
-
25
- # crumb :issue do |issue|
26
- # link issue.name, issue_path(issue)
27
- # parent :project_issues, issue.project
28
- # end
29
-
30
- end
@@ -1,8 +0,0 @@
1
- Description:
2
- Generates initializer for Gretel.
3
-
4
- Example:
5
- rails generate gretel breadcrumbs
6
-
7
- This will create:
8
- config/initializers/breadcrumbs.rb
data/test/gretel_test.rb DELETED
@@ -1,8 +0,0 @@
1
- require 'test_helper'
2
-
3
- class GretelTest < ActiveSupport::TestCase
4
- # Replace this with your real tests.
5
- test "the truth" do
6
- assert true
7
- end
8
- end
data/test/test_helper.rb DELETED
@@ -1,3 +0,0 @@
1
- require 'rubygems'
2
- require 'test/unit'
3
- require 'active_support'