loaf 0.8.1 → 0.9.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +9 -1
- data/lib/loaf.rb +1 -0
- data/lib/loaf/errors.rb +1 -1
- data/lib/loaf/translation.rb +1 -1
- data/lib/loaf/version.rb +1 -1
- metadata +13 -70
- data/Appraisals +0 -31
- data/Rakefile +0 -13
- data/bin/console +0 -14
- data/bin/setup +0 -9
- data/loaf.gemspec +0 -35
- data/spec/integration/breadcrumb_trail_spec.rb +0 -71
- data/spec/integration/configuration_spec.rb +0 -12
- data/spec/rails_app/Rakefile +0 -8
- data/spec/rails_app/app/controllers/application_controller.rb +0 -5
- data/spec/rails_app/app/controllers/comments_controller.rb +0 -20
- data/spec/rails_app/app/controllers/home_controller.rb +0 -4
- data/spec/rails_app/app/controllers/posts_controller.rb +0 -20
- data/spec/rails_app/app/views/comments/index.html.erb +0 -1
- data/spec/rails_app/app/views/home/index.html.erb +0 -1
- data/spec/rails_app/app/views/layouts/_breadcrumbs.html.erb +0 -12
- data/spec/rails_app/app/views/layouts/application.html.erb +0 -14
- data/spec/rails_app/app/views/posts/index.html.erb +0 -1
- data/spec/rails_app/app/views/posts/new.html.erb +0 -4
- data/spec/rails_app/app/views/posts/show.html.erb +0 -1
- data/spec/rails_app/config.ru +0 -4
- data/spec/rails_app/config/application.rb +0 -48
- data/spec/rails_app/config/boot.rb +0 -10
- data/spec/rails_app/config/database.yml +0 -25
- data/spec/rails_app/config/environment.rb +0 -5
- data/spec/rails_app/config/environments/development.rb +0 -32
- data/spec/rails_app/config/environments/production.rb +0 -62
- data/spec/rails_app/config/environments/test.rb +0 -41
- data/spec/rails_app/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/rails_app/config/initializers/inflections.rb +0 -10
- data/spec/rails_app/config/initializers/mime_types.rb +0 -5
- data/spec/rails_app/config/initializers/secret_token.rb +0 -7
- data/spec/rails_app/config/initializers/session_store.rb +0 -8
- data/spec/rails_app/config/initializers/wrap_parameters.rb +0 -14
- data/spec/rails_app/config/locales/en.yml +0 -5
- data/spec/rails_app/config/locales/loaf.en.yml +0 -6
- data/spec/rails_app/config/routes.rb +0 -7
- data/spec/rails_app/config/secrets.yml +0 -22
- data/spec/rails_app/db/seeds.rb +0 -7
- data/spec/rails_app/public/404.html +0 -26
- data/spec/rails_app/public/422.html +0 -26
- data/spec/rails_app/public/500.html +0 -26
- data/spec/rails_app/public/favicon.ico +0 -0
- data/spec/rails_app/public/robots.txt +0 -5
- data/spec/spec_helper.rb +0 -52
- data/spec/support/capybara.rb +0 -8
- data/spec/support/dummy_controller.rb +0 -9
- data/spec/support/dummy_view.rb +0 -47
- data/spec/support/load_routes.rb +0 -4
- data/spec/unit/configuration_spec.rb +0 -33
- data/spec/unit/controller_extensions_spec.rb +0 -54
- data/spec/unit/crumb_spec.rb +0 -15
- data/spec/unit/generators/install_generator_spec.rb +0 -17
- data/spec/unit/options_validator_spec.rb +0 -15
- data/spec/unit/translation_spec.rb +0 -30
- data/spec/unit/view_extensions/breadcrumb_spec.rb +0 -22
- data/spec/unit/view_extensions/breadcrumb_trail_spec.rb +0 -244
- data/spec/unit/view_extensions/has_breadcrumbs_spec.rb +0 -10
- data/tasks/console.rake +0 -10
- data/tasks/coverage.rake +0 -11
- data/tasks/spec.rake +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f544810445fa9db426eb9d433df6bf0bd700d91a1f277f00ac22799805adced3
|
4
|
+
data.tar.gz: 0aa946e6a0f5ea4beb5eee018d9953ff2246d2da603b386627b4e36fe2d7f059
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db053ea3b9a1cb1681fad9370a2d2174fe249b5602367aab6d04ea3c7c04ebf9bb8b0bedef5a1326374c96c76c2c0d5593f62aba7273c00f981297f794934415
|
7
|
+
data.tar.gz: 4f3e32da25d4cd0b3abac19b82133769d7b25c61778ac476d0ae06ace6be2ee219526416ff398d917653d7762505eab1a467d1b1aeded3d3c1b90f362749f2e6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## [v0.9.0] - 2020-01-19
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
* Change gemspec to include metadata, license info and remove test artifacts
|
7
|
+
* Change to update testing to include Ruby 2.7
|
8
|
+
* Change to limit Ruby to 1.9.3 or greater
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
* Fix Ruby 2.7 warnings
|
12
|
+
|
3
13
|
## [v0.8.1] - 2019-02-04
|
4
14
|
|
5
15
|
### Added
|
@@ -121,6 +131,8 @@
|
|
121
131
|
|
122
132
|
* Initial implementation and release
|
123
133
|
|
134
|
+
[v0.9.0]: https://github.com/piotrmurach/loaf/compare/v0.8.1...v0.9.0
|
135
|
+
[v0.8.1]: https://github.com/piotrmurach/loaf/compare/v0.8.0...v0.8.1
|
124
136
|
[v0.8.0]: https://github.com/piotrmurach/loaf/compare/v0.7.0...v0.8.0
|
125
137
|
[v0.7.0]: https://github.com/piotrmurach/loaf/compare/v0.6.2...v0.7.0
|
126
138
|
[v0.6.2]: https://github.com/piotrmurach/loaf/compare/v0.6.1...v0.6.2
|
data/README.md
CHANGED
@@ -324,6 +324,14 @@ en:
|
|
324
324
|
|
325
325
|
Questions or problems? Please post them on the [issue tracker](https://github.com/piotrmurach/loaf/issues). You can contribute changes by forking the project and submitting a pull request. You can ensure the tests are passing by running `bundle` and `rake`.
|
326
326
|
|
327
|
+
## License
|
328
|
+
|
329
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
330
|
+
|
331
|
+
## Code of Conduct
|
332
|
+
|
333
|
+
Everyone interacting in the Loaf project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/piotrmurach/loaf/blob/master/CODE_OF_CONDUCT.md).
|
334
|
+
|
327
335
|
## Copyright
|
328
336
|
|
329
|
-
Copyright (c) 2011
|
337
|
+
Copyright (c) 2011 Piotr Murach. See LICENSE.txt for further details.
|
data/lib/loaf.rb
CHANGED
data/lib/loaf/errors.rb
CHANGED
data/lib/loaf/translation.rb
CHANGED
@@ -30,7 +30,7 @@ module Loaf
|
|
30
30
|
options[:scope] ||= translation_scope
|
31
31
|
options[:default] = Array(options[:default])
|
32
32
|
options[:default] << title if options[:default].empty?
|
33
|
-
I18n.t(title.to_s, options)
|
33
|
+
I18n.t(title.to_s, **options)
|
34
34
|
end
|
35
35
|
module_function :find_title
|
36
36
|
end # Translation
|
data/lib/loaf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loaf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Murach
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -56,18 +56,15 @@ description: Loaf manages and displays breadcrumb trails in your Rails app. It a
|
|
56
56
|
to handle breadcrumb data through easy dsl and expose it through view helpers without
|
57
57
|
any assumptions about markup.
|
58
58
|
email:
|
59
|
-
-
|
59
|
+
- piotr@piotrmurach.com
|
60
60
|
executables: []
|
61
61
|
extensions: []
|
62
|
-
extra_rdoc_files:
|
62
|
+
extra_rdoc_files:
|
63
|
+
- README.md
|
63
64
|
files:
|
64
|
-
- Appraisals
|
65
65
|
- CHANGELOG.md
|
66
66
|
- LICENSE.txt
|
67
67
|
- README.md
|
68
|
-
- Rakefile
|
69
|
-
- bin/console
|
70
|
-
- bin/setup
|
71
68
|
- config/locales/loaf.en.yml
|
72
69
|
- lib/generators/loaf/install_generator.rb
|
73
70
|
- lib/loaf.rb
|
@@ -81,69 +78,16 @@ files:
|
|
81
78
|
- lib/loaf/translation.rb
|
82
79
|
- lib/loaf/version.rb
|
83
80
|
- lib/loaf/view_extensions.rb
|
84
|
-
- loaf.gemspec
|
85
|
-
- spec/integration/breadcrumb_trail_spec.rb
|
86
|
-
- spec/integration/configuration_spec.rb
|
87
|
-
- spec/rails_app/Rakefile
|
88
|
-
- spec/rails_app/app/controllers/application_controller.rb
|
89
|
-
- spec/rails_app/app/controllers/comments_controller.rb
|
90
|
-
- spec/rails_app/app/controllers/home_controller.rb
|
91
|
-
- spec/rails_app/app/controllers/posts_controller.rb
|
92
|
-
- spec/rails_app/app/views/comments/index.html.erb
|
93
|
-
- spec/rails_app/app/views/home/index.html.erb
|
94
|
-
- spec/rails_app/app/views/layouts/_breadcrumbs.html.erb
|
95
|
-
- spec/rails_app/app/views/layouts/application.html.erb
|
96
|
-
- spec/rails_app/app/views/posts/index.html.erb
|
97
|
-
- spec/rails_app/app/views/posts/new.html.erb
|
98
|
-
- spec/rails_app/app/views/posts/show.html.erb
|
99
|
-
- spec/rails_app/config.ru
|
100
|
-
- spec/rails_app/config/application.rb
|
101
|
-
- spec/rails_app/config/boot.rb
|
102
|
-
- spec/rails_app/config/database.yml
|
103
|
-
- spec/rails_app/config/environment.rb
|
104
|
-
- spec/rails_app/config/environments/development.rb
|
105
|
-
- spec/rails_app/config/environments/production.rb
|
106
|
-
- spec/rails_app/config/environments/test.rb
|
107
|
-
- spec/rails_app/config/initializers/backtrace_silencers.rb
|
108
|
-
- spec/rails_app/config/initializers/inflections.rb
|
109
|
-
- spec/rails_app/config/initializers/mime_types.rb
|
110
|
-
- spec/rails_app/config/initializers/secret_token.rb
|
111
|
-
- spec/rails_app/config/initializers/session_store.rb
|
112
|
-
- spec/rails_app/config/initializers/wrap_parameters.rb
|
113
|
-
- spec/rails_app/config/locales/en.yml
|
114
|
-
- spec/rails_app/config/locales/loaf.en.yml
|
115
|
-
- spec/rails_app/config/routes.rb
|
116
|
-
- spec/rails_app/config/secrets.yml
|
117
|
-
- spec/rails_app/db/seeds.rb
|
118
|
-
- spec/rails_app/public/404.html
|
119
|
-
- spec/rails_app/public/422.html
|
120
|
-
- spec/rails_app/public/500.html
|
121
|
-
- spec/rails_app/public/favicon.ico
|
122
|
-
- spec/rails_app/public/robots.txt
|
123
|
-
- spec/spec_helper.rb
|
124
|
-
- spec/support/capybara.rb
|
125
|
-
- spec/support/dummy_controller.rb
|
126
|
-
- spec/support/dummy_view.rb
|
127
|
-
- spec/support/load_routes.rb
|
128
|
-
- spec/unit/configuration_spec.rb
|
129
|
-
- spec/unit/controller_extensions_spec.rb
|
130
|
-
- spec/unit/crumb_spec.rb
|
131
|
-
- spec/unit/generators/install_generator_spec.rb
|
132
|
-
- spec/unit/options_validator_spec.rb
|
133
|
-
- spec/unit/translation_spec.rb
|
134
|
-
- spec/unit/view_extensions/breadcrumb_spec.rb
|
135
|
-
- spec/unit/view_extensions/breadcrumb_trail_spec.rb
|
136
|
-
- spec/unit/view_extensions/has_breadcrumbs_spec.rb
|
137
|
-
- tasks/console.rake
|
138
|
-
- tasks/coverage.rake
|
139
|
-
- tasks/spec.rake
|
140
81
|
homepage: https://github.com/piotrmurach/loaf
|
141
|
-
licenses:
|
82
|
+
licenses:
|
83
|
+
- MIT
|
142
84
|
metadata:
|
143
85
|
allowed_push_host: https://rubygems.org
|
144
86
|
bug_tracker_uri: https://github.com/piotrmurach/loaf/issues
|
145
|
-
source_code_uri: https://github.com/piotrmurach/loaf
|
146
87
|
changelog_uri: https://github.com/piotrmurach/loaf/blob/master/CHANGELOG.md
|
88
|
+
documentation_uri: https://www.rubydoc.info/gems/loaf
|
89
|
+
homepage_uri: https://github.com/piotrmurach/loaf
|
90
|
+
source_code_uri: https://github.com/piotrmurach/loaf
|
147
91
|
post_install_message:
|
148
92
|
rdoc_options: []
|
149
93
|
require_paths:
|
@@ -152,15 +96,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
96
|
requirements:
|
153
97
|
- - ">="
|
154
98
|
- !ruby/object:Gem::Version
|
155
|
-
version:
|
99
|
+
version: 1.9.3
|
156
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
101
|
requirements:
|
158
102
|
- - ">="
|
159
103
|
- !ruby/object:Gem::Version
|
160
104
|
version: '0'
|
161
105
|
requirements: []
|
162
|
-
|
163
|
-
rubygems_version: 2.7.3
|
106
|
+
rubygems_version: 3.1.2
|
164
107
|
signing_key:
|
165
108
|
specification_version: 4
|
166
109
|
summary: Loaf manages and displays breadcrumb trails in your Rails application.
|
data/Appraisals
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
appraise 'rails3.2' do
|
2
|
-
gem 'rails', '~> 3.2.22.5'
|
3
|
-
gem 'test-unit', '~> 3.0'
|
4
|
-
end
|
5
|
-
|
6
|
-
appraise 'rails4.0' do
|
7
|
-
gem 'rails', '~> 4.0.13'
|
8
|
-
gem 'test-unit'
|
9
|
-
end
|
10
|
-
|
11
|
-
appraise 'rails4.1' do
|
12
|
-
gem 'rails', '~> 4.1.16'
|
13
|
-
end
|
14
|
-
|
15
|
-
appraise 'rails4.2' do
|
16
|
-
gem 'rails', '~> 4.2.10'
|
17
|
-
end
|
18
|
-
|
19
|
-
appraise 'rails5.0' do
|
20
|
-
gem 'rails', '~> 5.0.7'
|
21
|
-
gem 'activerecord-jdbcsqlite3-adapter', '~> 50.1', platforms: :jruby
|
22
|
-
end
|
23
|
-
|
24
|
-
appraise 'rails5.1' do
|
25
|
-
gem 'rails', '~> 5.1.6'
|
26
|
-
gem 'activerecord-jdbcsqlite3-adapter', '~> 51.1', platforms: :jruby
|
27
|
-
end
|
28
|
-
|
29
|
-
appraise 'rails5.2' do
|
30
|
-
gem 'rails', '~> 5.2.0'
|
31
|
-
end
|
data/Rakefile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'bundler/gem_tasks'
|
6
|
-
|
7
|
-
desc "Default: run loaf unit & integration tests."
|
8
|
-
task default: :spec
|
9
|
-
|
10
|
-
FileList['tasks/**/*.rake'].each(&method(:import))
|
11
|
-
|
12
|
-
desc 'Run all specs'
|
13
|
-
task ci: %w[ spec ]
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "loaf"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/loaf.gemspec
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'loaf/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = 'loaf'
|
8
|
-
spec.version = Loaf::VERSION.dup
|
9
|
-
spec.authors = ['Piotr Murach']
|
10
|
-
spec.email = [""]
|
11
|
-
spec.homepage = 'https://github.com/piotrmurach/loaf'
|
12
|
-
spec.summary = %q{Loaf manages and displays breadcrumb trails in your Rails application.}
|
13
|
-
spec.description = %q{Loaf manages and displays breadcrumb trails in your Rails app. It aims to handle breadcrumb data through easy dsl and expose it through view helpers without any assumptions about markup.}
|
14
|
-
|
15
|
-
spec.files = Dir['{lib,spec,config}/**/*'].reject { |f|
|
16
|
-
File.directory?(f) || f.include?('.sqlite3') || f.include?('.log')
|
17
|
-
}
|
18
|
-
spec.files += Dir['{bin,tasks}/*', 'loaf.gemspec']
|
19
|
-
spec.files += Dir['README.md', 'CHANGELOG.md', 'LICENSE.txt', 'Rakefile', 'Appraisals']
|
20
|
-
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
if spec.respond_to?(:metadata=)
|
23
|
-
spec.metadata = {
|
24
|
-
'allowed_push_host' => 'https://rubygems.org',
|
25
|
-
'bug_tracker_uri' => 'https://github.com/piotrmurach/loaf/issues',
|
26
|
-
'source_code_uri' => 'https://github.com/piotrmurach/loaf',
|
27
|
-
'changelog_uri' => 'https://github.com/piotrmurach/loaf/blob/master/CHANGELOG.md'
|
28
|
-
}
|
29
|
-
end
|
30
|
-
|
31
|
-
spec.add_dependency 'rails', '>= 3.2'
|
32
|
-
|
33
|
-
spec.add_development_dependency 'bundler', '>= 1.5'
|
34
|
-
spec.add_development_dependency 'rake'
|
35
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
RSpec.describe "breadcrumbs trail" do
|
4
|
-
include ActionView::TestCase::Behavior
|
5
|
-
|
6
|
-
it "shows root breadcrumb" do
|
7
|
-
visit root_path
|
8
|
-
|
9
|
-
within '#breadcrumbs .selected' do
|
10
|
-
expect(page.html).to include('<a href="/">Home</a>')
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
it "inherits controller breadcrumb and adds index action breadcrumb" do
|
15
|
-
visit posts_path
|
16
|
-
|
17
|
-
within '#breadcrumbs' do
|
18
|
-
expect(page.html).to include('<a href="/">Home</a>')
|
19
|
-
within '.selected' do
|
20
|
-
expect(page.html).to include('<a href="/posts">All Posts</a>')
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
it 'filters out controller breadcrumb and adds new action breadcrumb' do
|
26
|
-
visit new_post_path
|
27
|
-
|
28
|
-
within '#breadcrumbs' do
|
29
|
-
expect(page).to_not have_content('Home')
|
30
|
-
expect(page).to have_content('New Post')
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
it "adds breadcrumb in view with path variable" do
|
35
|
-
visit post_path(1)
|
36
|
-
|
37
|
-
within '#breadcrumbs .selected' do
|
38
|
-
expect(page.html).to include('<a href="/posts/1">Show Post in view</a>')
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
it 'is current when forced' do
|
43
|
-
visit new_post_path
|
44
|
-
|
45
|
-
expect(page.current_path).to eq(new_post_path)
|
46
|
-
within '#breadcrumbs' do
|
47
|
-
expect(page).to have_selector('li.selected', count: 2)
|
48
|
-
expect(page.html).to include('<a href="/posts">All</a>')
|
49
|
-
expect(page.html).to include('<a href="/posts/new">New Post</a>')
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
it "allows for procs in name and url" do
|
54
|
-
visit post_comments_path(1)
|
55
|
-
|
56
|
-
within '#breadcrumbs .selected' do
|
57
|
-
expect(page.html).to include('<a href="/posts/1/comments">Post comments</a>')
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
it "allows for procs in name and url without supplying the controller" do
|
62
|
-
visit post_comments_path(1)
|
63
|
-
|
64
|
-
within "#breadcrumbs .selected" do
|
65
|
-
expect(page.html).to include(
|
66
|
-
'<a href="/posts/1/comments?no_controller=true">'\
|
67
|
-
"Post comments No Controller</a>"
|
68
|
-
)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
RSpec.describe 'setting configuration options' do
|
6
|
-
it "contains 'selected' inside the breadcrumb markup" do
|
7
|
-
visit posts_path
|
8
|
-
within '#breadcrumbs' do
|
9
|
-
expect(page).to have_selector('.selected')
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
data/spec/rails_app/Rakefile
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
-
|
5
|
-
require File.expand_path('../config/application', __FILE__)
|
6
|
-
require 'rake'
|
7
|
-
|
8
|
-
RailsApp::Application.load_tasks
|
@@ -1,20 +0,0 @@
|
|
1
|
-
class Article < Struct.new(:id, :title); end
|
2
|
-
|
3
|
-
class CommentsController < ApplicationController
|
4
|
-
|
5
|
-
breadcrumb lambda { |c| c.find_article(c.params[:post_id]).title },
|
6
|
-
lambda { |c| c.post_comments_path(c.params[:post_id]) }
|
7
|
-
|
8
|
-
breadcrumb -> { find_article(params[:post_id]).title + " No Controller" },
|
9
|
-
-> { post_comments_path(params[:post_id], no_controller: true) }
|
10
|
-
|
11
|
-
def index
|
12
|
-
end
|
13
|
-
|
14
|
-
def show
|
15
|
-
end
|
16
|
-
|
17
|
-
def find_article(id)
|
18
|
-
::Article.new(id, 'Post comments')
|
19
|
-
end
|
20
|
-
end
|