loaf 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile +1 -0
- data/README.md +105 -18
- data/config/locales/loaf.en.yml +6 -0
- data/gemfiles/rails3.2.gemfile +2 -1
- data/gemfiles/rails4.0.gemfile +2 -1
- data/gemfiles/rails4.1.gemfile +2 -1
- data/gemfiles/rails4.2.gemfile +2 -1
- data/lib/generators/loaf/install_generator.rb +17 -0
- data/lib/loaf.rb +0 -3
- data/lib/loaf/controller_extensions.rb +10 -7
- data/lib/loaf/crumb_formatter.rb +2 -1
- data/lib/loaf/errors.rb +1 -1
- data/lib/loaf/translation.rb +7 -9
- data/lib/loaf/version.rb +1 -1
- data/spec/integration/crumbs_routing_spec.rb +8 -1
- data/spec/rails_app/app/controllers/comments_controller.rb +13 -0
- data/spec/rails_app/app/controllers/posts_controller.rb +1 -1
- data/spec/rails_app/app/views/comments/index.html.erb +1 -0
- data/spec/rails_app/config/locales/loaf.en.yml +6 -0
- data/spec/spec_helper.rb +1 -2
- data/spec/support/capybara.rb +1 -3
- data/spec/support/load_routes.rb +1 -3
- data/spec/unit/generators/install_generator_spec.rb +16 -0
- data/spec/unit/translation_spec.rb +7 -5
- metadata +10 -3
- data/lib/config/locales/en.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd80cf0439e9736d7c29811f8465ac55b161e3ec
|
4
|
+
data.tar.gz: b42620aee3caec07147186d72fbd24eeec24102e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe8ffab119f314dd4cc95905e0e6b0f70dbf58145740e2c07670adeb9cde9f5570fce875e3c5248b30e9c181b16a7b5b761425138f15154c2f4c55b1cc283783
|
7
|
+
data.tar.gz: 1df8f9471b34d22ca69fb606dba529ba05dc65903329461aea28a1044c11bb1b10f655c1bbc9279062723513ad36b8a5c74673b85e6670f8c9c12bb4e8bb18db
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
0.5.0 (January 31, 2015)
|
2
|
+
|
3
|
+
* Add generator for locales file
|
4
|
+
* Add breadcrumbs scope for translations
|
5
|
+
* Change breadcrumb formatter to use translations for title formatting
|
6
|
+
* Add ability to pass proc as title and/or url for breadcrumb helper inside controller
|
7
|
+
|
1
8
|
0.4.0 (January 10, 2015)
|
2
9
|
|
3
10
|
* Change breadcrumbs view method to return enumerator without block
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -18,8 +18,9 @@
|
|
18
18
|
## Features
|
19
19
|
|
20
20
|
* Uses controllers or views to specify breadcrumb trails
|
21
|
+
* Specify urls using Rails conventions
|
21
22
|
* No markup assumptions for breadcrumbs rendering
|
22
|
-
* Use locales file for names
|
23
|
+
* Use locales file for breadcrumb names
|
23
24
|
* Tested with Rails 3.2, 4.0, 4.1, 4.2
|
24
25
|
|
25
26
|
## Installation
|
@@ -42,11 +43,17 @@ Or install it yourself as:
|
|
42
43
|
gem install loaf
|
43
44
|
```
|
44
45
|
|
46
|
+
Then run the generator:
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
rails generate loaf:install
|
50
|
+
```
|
51
|
+
|
45
52
|
## 1. Usage
|
46
53
|
|
47
54
|
**Loaf** allows you to add breadcrumbs in controllers and views.
|
48
55
|
|
49
|
-
In order to add breadcrumbs in controller use `breadcrumb` method. Outside of controller actions the `breadcrumb` helper behaviour is similar to filters and as such you can limit breadcrumb scope with familiar options `:only`, `:except`. Any breadcrumb specified inside actions creates another level in breadcrumbs trail.
|
56
|
+
In order to add breadcrumbs in controller use `breadcrumb` method ([see 1.1](#11-breadcrumb)). Outside of controller actions the `breadcrumb` helper behaviour is similar to filters and as such you can limit breadcrumb scope with familiar options `:only`, `:except`. Any breadcrumb specified inside actions creates another level in breadcrumbs trail.
|
50
57
|
|
51
58
|
```ruby
|
52
59
|
class Blog::CategoriesController < ApplicationController
|
@@ -54,15 +61,15 @@ class Blog::CategoriesController < ApplicationController
|
|
54
61
|
breadcrumb 'Article Categories', :blog_categories_path, only: [:show]
|
55
62
|
|
56
63
|
def show
|
57
|
-
breadcrumb
|
64
|
+
breadcrumb @category.title, blog_category_path(@category)
|
58
65
|
end
|
59
66
|
end
|
60
67
|
```
|
61
68
|
|
62
|
-
**Loaf** adds `breadcrumb` helper also to the views. Together with controller breadcrumbs, the view breadcrumbs are appended as the last. For instance, to specify view breadcrumb do:
|
69
|
+
**Loaf** adds `breadcrumb` helper also to the views. Together with controller breadcrumbs, the view breadcrumbs are appended as the last in breadcrumb trail. For instance, to specify view breadcrumb do:
|
63
70
|
|
64
71
|
```ruby
|
65
|
-
<% breadcrumb
|
72
|
+
<% breadcrumb @category.title, blog_category_path(@category) %>
|
66
73
|
```
|
67
74
|
|
68
75
|
Finally, in your view layout add semantic markup to show breadcrumbs:
|
@@ -80,6 +87,85 @@ Finally, in your view layout add semantic markup to show breadcrumbs:
|
|
80
87
|
|
81
88
|
Usually best practice is to put such snippet inside its own partial.
|
82
89
|
|
90
|
+
### 1.1 breadcrumb
|
91
|
+
|
92
|
+
Creation of breadcrumb in Rails is achieved by the `breadcrumb` helper.
|
93
|
+
|
94
|
+
The `breadcrumb` method takes at minimum two arguments: the first is a name for the crumb that will be displayed and the second is a url that the name points to. The url parameter uses the familiar Rails conventions.
|
95
|
+
|
96
|
+
When using path variable `blog_categories_path`:
|
97
|
+
|
98
|
+
```ruby
|
99
|
+
breadcrumb 'Categories', blog_categories_path
|
100
|
+
```
|
101
|
+
|
102
|
+
When using an instance `@category`:
|
103
|
+
|
104
|
+
```ruby
|
105
|
+
breadcrumb @category.title, blog_category_path(@category)
|
106
|
+
```
|
107
|
+
|
108
|
+
You can also use set of objects:
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
breadcrumb @category.title, [:blog, @category]
|
112
|
+
```
|
113
|
+
|
114
|
+
You can specify segments of the url:
|
115
|
+
|
116
|
+
```ruby
|
117
|
+
breadcrumb @category.title, {controller: 'categories', action: 'show', id: @category.id}
|
118
|
+
```
|
119
|
+
|
120
|
+
#### 1.1.1 breadcrumb in controller
|
121
|
+
|
122
|
+
Breadcrumbs are inherited, so if you set a breadcrumb in `ApplicationController`, it will be inserted as a first element inside every breadcrumb trail. It is customary to set root breadcrumb like so:
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
class ApplicationController < ActionController::Base
|
126
|
+
breadcrumb 'Home', :root_path
|
127
|
+
end
|
128
|
+
```
|
129
|
+
|
130
|
+
In controller outside of any action the `breadcrumb` acts as filter.
|
131
|
+
|
132
|
+
```ruby
|
133
|
+
class ArticlesController < ApplicationController
|
134
|
+
breadcrumb 'All Articles', :articles_path, only: [:new, :create]
|
135
|
+
end
|
136
|
+
```
|
137
|
+
|
138
|
+
**Loaf** allows you to call controller instance methods inside the `breadcrumb` helper outside of any action. This is useful if your breadcrumb has parameterized behaviour. For example, to dynamically evaluate parameters for breadcrumb title do:
|
139
|
+
|
140
|
+
```ruby
|
141
|
+
class CommentsController < ApplicationController
|
142
|
+
breadcrumb ->(c) { c.find_article(c.params[:post_id]).title }, :articles_path
|
143
|
+
end
|
144
|
+
```
|
145
|
+
|
146
|
+
Also, to dynamically evalute parameters inside the url argument do:
|
147
|
+
|
148
|
+
```ruby
|
149
|
+
class CommentsController < ApplicationController
|
150
|
+
breadcrumb 'All Comments', ->(c) { c.post_comments_path(c.params[:post_id]) }
|
151
|
+
end
|
152
|
+
```
|
153
|
+
|
154
|
+
### 1.2 force
|
155
|
+
|
156
|
+
**Loaf** allows you to force a breadcrumb to be current.
|
157
|
+
|
158
|
+
For example, on the create action as you are likely want the breadcrumb to be similar as for new action.
|
159
|
+
|
160
|
+
```ruby
|
161
|
+
class PostsController < ApplicationController
|
162
|
+
def create
|
163
|
+
breadcrumb 'New Post', new_post_path, force: true
|
164
|
+
render action: :new
|
165
|
+
end
|
166
|
+
end
|
167
|
+
```
|
168
|
+
|
83
169
|
## 2. Configuration
|
84
170
|
|
85
171
|
There is a small set of custom opinionated defaults. The following options are valid parameters:
|
@@ -108,32 +194,33 @@ Loaf.configure do |config|
|
|
108
194
|
end
|
109
195
|
```
|
110
196
|
|
111
|
-
## 3.
|
197
|
+
## 3. Translation
|
112
198
|
|
113
|
-
|
199
|
+
You can use locales files for breadcrumbs' titles. **Loaf** assumes that all breadcrumb names are scoped inside `breadcrumbs` namespace inside `loaf` scope. However, this can be easily changed by passing `scope: 'new_scope_name'` configuration option.
|
114
200
|
|
115
201
|
```ruby
|
116
202
|
en:
|
117
|
-
|
118
|
-
|
119
|
-
|
203
|
+
loaf:
|
204
|
+
breadcrumbs:
|
205
|
+
name: 'my-breadcrumb-name'
|
120
206
|
```
|
121
207
|
|
122
|
-
Therefore in your controller/view
|
208
|
+
Therefore, in your controller/view you would do:
|
123
209
|
|
124
210
|
```ruby
|
125
211
|
class Blog::CategoriesController < ApplicationController
|
126
|
-
|
127
|
-
breadcrumb 'blog.categories', 'blog_categories_path'
|
128
|
-
|
212
|
+
breadcrumb 'blog.categories', :blog_categories_path
|
129
213
|
end
|
214
|
+
```
|
130
215
|
|
131
|
-
And corresponding entry in locale:
|
216
|
+
And corresponding entry in locale would be:
|
132
217
|
|
218
|
+
```ruby
|
133
219
|
en:
|
134
|
-
|
135
|
-
|
136
|
-
|
220
|
+
loaf:
|
221
|
+
breadcrumbs:
|
222
|
+
blog:
|
223
|
+
categories: 'Article Categories'
|
137
224
|
```
|
138
225
|
|
139
226
|
## Contributing
|
data/gemfiles/rails3.2.gemfile
CHANGED
@@ -2,9 +2,10 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
+
gem "ammeter"
|
5
6
|
gem "bundler", "~> 1.3"
|
6
7
|
gem "appraisal", "~> 1.0.2"
|
7
|
-
gem "rake", "~> 10.
|
8
|
+
gem "rake", "~> 10.4.2"
|
8
9
|
gem "yard", "~> 0.8.7"
|
9
10
|
gem "sqlite3", "~> 1.3.10", :platforms => :ruby
|
10
11
|
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.10", :platforms => :jruby
|
data/gemfiles/rails4.0.gemfile
CHANGED
@@ -2,9 +2,10 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
+
gem "ammeter"
|
5
6
|
gem "bundler", "~> 1.3"
|
6
7
|
gem "appraisal", "~> 1.0.2"
|
7
|
-
gem "rake", "~> 10.
|
8
|
+
gem "rake", "~> 10.4.2"
|
8
9
|
gem "yard", "~> 0.8.7"
|
9
10
|
gem "sqlite3", "~> 1.3.10", :platforms => :ruby
|
10
11
|
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.10", :platforms => :jruby
|
data/gemfiles/rails4.1.gemfile
CHANGED
@@ -2,9 +2,10 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
+
gem "ammeter"
|
5
6
|
gem "bundler", "~> 1.3"
|
6
7
|
gem "appraisal", "~> 1.0.2"
|
7
|
-
gem "rake", "~> 10.
|
8
|
+
gem "rake", "~> 10.4.2"
|
8
9
|
gem "yard", "~> 0.8.7"
|
9
10
|
gem "sqlite3", "~> 1.3.10", :platforms => :ruby
|
10
11
|
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.10", :platforms => :jruby
|
data/gemfiles/rails4.2.gemfile
CHANGED
@@ -2,9 +2,10 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
+
gem "ammeter"
|
5
6
|
gem "bundler", "~> 1.3"
|
6
7
|
gem "appraisal", "~> 1.0.2"
|
7
|
-
gem "rake", "~> 10.
|
8
|
+
gem "rake", "~> 10.4.2"
|
8
9
|
gem "yard", "~> 0.8.7"
|
9
10
|
gem "sqlite3", "~> 1.3.10", :platforms => :ruby
|
10
11
|
gem "activerecord-jdbcsqlite3-adapter", "~> 1.3.10", :platforms => :jruby
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rails/generators'
|
4
|
+
|
5
|
+
module Loaf
|
6
|
+
module Generators
|
7
|
+
class InstallGenerator < Rails::Generators::Base
|
8
|
+
source_root File.expand_path("../../../..", __FILE__)
|
9
|
+
|
10
|
+
desc 'Copy locale file to your application'
|
11
|
+
|
12
|
+
def copy_locale
|
13
|
+
copy_file "#{self.class.source_root}/config/locales/loaf.en.yml", "config/locales/loaf.en.yml"
|
14
|
+
end
|
15
|
+
end # InstallGenerator
|
16
|
+
end # Generators
|
17
|
+
end # Loaf
|
data/lib/loaf.rb
CHANGED
@@ -11,9 +11,6 @@ require 'loaf/view_extensions'
|
|
11
11
|
require 'loaf/crumb_formatter'
|
12
12
|
require 'loaf/options_validator'
|
13
13
|
|
14
|
-
# Add English load path by default
|
15
|
-
I18n.load_path << File.join(File.dirname(__FILE__), 'config', 'locales', 'en.yml')
|
16
|
-
|
17
14
|
module Loaf
|
18
15
|
# Set global configuration
|
19
16
|
#
|
@@ -12,26 +12,29 @@ module Loaf
|
|
12
12
|
end
|
13
13
|
|
14
14
|
module ClassMethods
|
15
|
+
# Add breacrumb to the trail in controller as class method
|
16
|
+
#
|
15
17
|
# @param [String]
|
16
18
|
#
|
17
19
|
# @api public
|
18
20
|
def breadcrumb(name, url, options = {})
|
21
|
+
normalizer = method(:_normalize_name)
|
19
22
|
before_filter(options) do |instance|
|
20
|
-
|
21
|
-
|
23
|
+
normalized_name = normalizer.call(name, instance)
|
24
|
+
normalized_url = normalizer.call(url, instance)
|
25
|
+
instance.send(:breadcrumb, normalized_name, normalized_url, options)
|
22
26
|
end
|
23
27
|
end
|
24
28
|
alias_method :add_breadcrumb, :breadcrumb
|
25
29
|
|
26
30
|
private
|
27
31
|
|
28
|
-
|
32
|
+
# @api private
|
33
|
+
def _normalize_name(name, instance)
|
29
34
|
case name
|
30
35
|
when NilClass
|
31
36
|
when Proc
|
32
|
-
name.call
|
33
|
-
when Symbol
|
34
|
-
name.to_s
|
37
|
+
name.call(instance)
|
35
38
|
else
|
36
39
|
name
|
37
40
|
end
|
@@ -57,7 +60,7 @@ module Loaf
|
|
57
60
|
end
|
58
61
|
end
|
59
62
|
|
60
|
-
# Add breadcrumb
|
63
|
+
# Add breadcrumb in controller as instance method
|
61
64
|
#
|
62
65
|
# @param [String] name
|
63
66
|
#
|
data/lib/loaf/crumb_formatter.rb
CHANGED
@@ -8,9 +8,10 @@ module Loaf
|
|
8
8
|
#
|
9
9
|
# @api public
|
10
10
|
def format_name(name, options = {})
|
11
|
-
return if name.nil?
|
11
|
+
return name if name.nil? || name.empty?
|
12
12
|
|
13
13
|
formatted = name.to_s.dup
|
14
|
+
formatted = Loaf::Translation.find_title(formatted)
|
14
15
|
formatted = formatted.capitalize if options[:capitalize]
|
15
16
|
if options[:crumb_length]
|
16
17
|
formatted = truncate(formatted, length: options[:crumb_length])
|
data/lib/loaf/errors.rb
CHANGED
data/lib/loaf/translation.rb
CHANGED
@@ -5,8 +5,8 @@ module Loaf
|
|
5
5
|
extend self
|
6
6
|
|
7
7
|
# Returns translation lookup
|
8
|
-
def
|
9
|
-
|
8
|
+
def translation_scope
|
9
|
+
"loaf.breadcrumbs"
|
10
10
|
end
|
11
11
|
|
12
12
|
# Translate breadcrumb title
|
@@ -19,13 +19,11 @@ module Loaf
|
|
19
19
|
# The default translation
|
20
20
|
#
|
21
21
|
# @api public
|
22
|
-
def
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
options.reverse_merge! count: 1, default: defaults
|
28
|
-
I18n.t(title, options)
|
22
|
+
def find_title(title, options = {})
|
23
|
+
options[:scope] ||= translation_scope
|
24
|
+
options[:default] = Array(options[:default])
|
25
|
+
options[:default] << title if options[:default].empty?
|
26
|
+
I18n.t("#{title}", options)
|
29
27
|
end
|
30
28
|
end # Translation
|
31
29
|
end # Loaf
|
data/lib/loaf/version.rb
CHANGED
@@ -33,7 +33,7 @@ RSpec.describe "crumbs routing" do
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
it '
|
36
|
+
it 'is current when forced' do
|
37
37
|
visit new_post_path
|
38
38
|
click_button "Create"
|
39
39
|
|
@@ -43,4 +43,11 @@ RSpec.describe "crumbs routing" do
|
|
43
43
|
expect(page).to have_selector('.selected')
|
44
44
|
end
|
45
45
|
end
|
46
|
+
|
47
|
+
it "allows for procs in name and url" do
|
48
|
+
visit post_comments_path(1)
|
49
|
+
within '#breadcrumbs' do
|
50
|
+
expect(page.html).to include('<a href="/posts/1/comments">Post comments</a>')
|
51
|
+
end
|
52
|
+
end
|
46
53
|
end
|
@@ -1,4 +1,17 @@
|
|
1
|
+
class Article < Struct.new(:id, :title); end
|
2
|
+
|
1
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
|
+
|
2
8
|
def index
|
3
9
|
end
|
10
|
+
|
11
|
+
def show
|
12
|
+
end
|
13
|
+
|
14
|
+
def find_article(id)
|
15
|
+
::Article.new(id, 'Post comments')
|
16
|
+
end
|
4
17
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Post comments index</h1>
|
data/spec/spec_helper.rb
CHANGED
@@ -18,9 +18,8 @@ end
|
|
18
18
|
# Configure Rails Environment
|
19
19
|
ENV["RAILS_ENV"] = "test"
|
20
20
|
|
21
|
-
require
|
21
|
+
require 'rails_app/config/environment.rb'
|
22
22
|
require 'rspec/rails'
|
23
|
-
|
24
23
|
require 'loaf'
|
25
24
|
|
26
25
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
data/spec/support/capybara.rb
CHANGED
@@ -2,9 +2,7 @@ require 'capybara/rails'
|
|
2
2
|
require 'capybara/dsl'
|
3
3
|
|
4
4
|
RSpec.configure do |c|
|
5
|
-
c.include Capybara::DSL, :
|
6
|
-
:file_path => /\bspec\/integration\//
|
7
|
-
}
|
5
|
+
c.include Capybara::DSL, :file_path => /\bspec\/integration\//
|
8
6
|
end
|
9
7
|
Capybara.default_driver = :rack_test
|
10
8
|
Capybara.default_selector = :css
|
data/spec/support/load_routes.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
require 'generators/loaf/install_generator'
|
5
|
+
|
6
|
+
RSpec.describe Loaf::Generators::InstallGenerator, type: :generator do
|
7
|
+
destination File.expand_path("../../../tmp", __FILE__)
|
8
|
+
|
9
|
+
before { prepare_destination }
|
10
|
+
|
11
|
+
it "copies loaf locales to the host application" do
|
12
|
+
run_generator
|
13
|
+
locale = file("config/locales/loaf.en.yml")
|
14
|
+
expect(locale).to exist
|
15
|
+
end
|
16
|
+
end
|
@@ -6,17 +6,19 @@ RSpec.describe Loaf::Translation do
|
|
6
6
|
|
7
7
|
before { I18n.backend = I18n::Backend::Simple.new }
|
8
8
|
|
9
|
+
after { I18n.backend.reload! }
|
10
|
+
|
9
11
|
it 'translates breadcrumb title' do
|
10
|
-
I18n.backend.store_translations 'en', breadcrumbs: { home: 'Home'}
|
11
|
-
expect(described_class.
|
12
|
+
I18n.backend.store_translations 'en', loaf: { breadcrumbs: { home: 'Home'}}
|
13
|
+
expect(described_class.find_title('home')).to eql('Home')
|
12
14
|
end
|
13
15
|
|
14
|
-
it 'translates breadcrumb name with
|
16
|
+
it 'does not translates breadcrumb name with missing scope' do
|
15
17
|
I18n.backend.store_translations 'en', breadcrumbs: {home: 'Home'}
|
16
|
-
expect(described_class.
|
18
|
+
expect(described_class.find_title('home')).to eql('home')
|
17
19
|
end
|
18
20
|
|
19
21
|
it 'translates breadcrumb name using default option' do
|
20
|
-
expect(described_class.
|
22
|
+
expect(described_class.find_title('home', default: 'breadcrumb default name')).to eql('breadcrumb default name')
|
21
23
|
end
|
22
24
|
end
|
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.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Murach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -46,12 +46,13 @@ files:
|
|
46
46
|
- README.md
|
47
47
|
- Rakefile
|
48
48
|
- bin/setup
|
49
|
+
- config/locales/loaf.en.yml
|
49
50
|
- gemfiles/rails3.2.gemfile
|
50
51
|
- gemfiles/rails4.0.gemfile
|
51
52
|
- gemfiles/rails4.1.gemfile
|
52
53
|
- gemfiles/rails4.2.gemfile
|
53
54
|
- init.rb
|
54
|
-
- lib/
|
55
|
+
- lib/generators/loaf/install_generator.rb
|
55
56
|
- lib/loaf.rb
|
56
57
|
- lib/loaf/builder.rb
|
57
58
|
- lib/loaf/configuration.rb
|
@@ -73,6 +74,7 @@ files:
|
|
73
74
|
- spec/rails_app/app/controllers/comments_controller.rb
|
74
75
|
- spec/rails_app/app/controllers/home_controller.rb
|
75
76
|
- spec/rails_app/app/controllers/posts_controller.rb
|
77
|
+
- spec/rails_app/app/views/comments/index.html.erb
|
76
78
|
- spec/rails_app/app/views/home/index.html.erb
|
77
79
|
- spec/rails_app/app/views/layouts/_breadcrumbs.html.erb
|
78
80
|
- spec/rails_app/app/views/layouts/application.html.erb
|
@@ -94,6 +96,7 @@ files:
|
|
94
96
|
- spec/rails_app/config/initializers/session_store.rb
|
95
97
|
- spec/rails_app/config/initializers/wrap_parameters.rb
|
96
98
|
- spec/rails_app/config/locales/en.yml
|
99
|
+
- spec/rails_app/config/locales/loaf.en.yml
|
97
100
|
- spec/rails_app/config/routes.rb
|
98
101
|
- spec/rails_app/db/seeds.rb
|
99
102
|
- spec/rails_app/lib/assets/.gitkeep
|
@@ -111,6 +114,7 @@ files:
|
|
111
114
|
- spec/support/load_routes.rb
|
112
115
|
- spec/unit/controller_extensions_spec.rb
|
113
116
|
- spec/unit/crumb_formatter_spec.rb
|
117
|
+
- spec/unit/generators/install_generator_spec.rb
|
114
118
|
- spec/unit/options_validator_spec.rb
|
115
119
|
- spec/unit/translation_spec.rb
|
116
120
|
- spec/unit/view_extensions/breadcrumb_spec.rb
|
@@ -151,6 +155,7 @@ test_files:
|
|
151
155
|
- spec/rails_app/app/controllers/comments_controller.rb
|
152
156
|
- spec/rails_app/app/controllers/home_controller.rb
|
153
157
|
- spec/rails_app/app/controllers/posts_controller.rb
|
158
|
+
- spec/rails_app/app/views/comments/index.html.erb
|
154
159
|
- spec/rails_app/app/views/home/index.html.erb
|
155
160
|
- spec/rails_app/app/views/layouts/_breadcrumbs.html.erb
|
156
161
|
- spec/rails_app/app/views/layouts/application.html.erb
|
@@ -172,6 +177,7 @@ test_files:
|
|
172
177
|
- spec/rails_app/config/initializers/session_store.rb
|
173
178
|
- spec/rails_app/config/initializers/wrap_parameters.rb
|
174
179
|
- spec/rails_app/config/locales/en.yml
|
180
|
+
- spec/rails_app/config/locales/loaf.en.yml
|
175
181
|
- spec/rails_app/config/routes.rb
|
176
182
|
- spec/rails_app/db/seeds.rb
|
177
183
|
- spec/rails_app/lib/assets/.gitkeep
|
@@ -189,6 +195,7 @@ test_files:
|
|
189
195
|
- spec/support/load_routes.rb
|
190
196
|
- spec/unit/controller_extensions_spec.rb
|
191
197
|
- spec/unit/crumb_formatter_spec.rb
|
198
|
+
- spec/unit/generators/install_generator_spec.rb
|
192
199
|
- spec/unit/options_validator_spec.rb
|
193
200
|
- spec/unit/translation_spec.rb
|
194
201
|
- spec/unit/view_extensions/breadcrumb_spec.rb
|