partial_menu 0.3.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 +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +28 -0
- data/Rakefile +28 -0
- data/lib/generators/views/USAGE +20 -0
- data/lib/generators/views/templates/_item.html.erb +12 -0
- data/lib/generators/views/templates/_menu.html.erb +9 -0
- data/lib/generators/views/templates/_submenu.html.erb +12 -0
- data/lib/generators/views/templates/_submenu_item.html.erb +12 -0
- data/lib/generators/views/views_generator.rb +17 -0
- data/lib/generators/yaml/USAGE +15 -0
- data/lib/generators/yaml/templates/menu.yml +13 -0
- data/lib/generators/yaml/yaml_generator.rb +16 -0
- data/lib/partial_menu.rb +9 -0
- data/lib/partial_menu/menu.rb +37 -0
- data/lib/partial_menu/menu_item.rb +83 -0
- data/lib/partial_menu/railtie.rb +17 -0
- data/lib/partial_menu/version.rb +3 -0
- data/lib/partial_menu/view_helpers.rb +60 -0
- data/lib/tasks/partial_menu_tasks.rake +4 -0
- metadata +164 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 497fcb02fc093221933584484fc1bee9994a6117
|
4
|
+
data.tar.gz: 7ac39d10ef5207c92b7bc049619bcee9748abca9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7462b4e8009ec5acbbc8e94f36ef1d4e6b2bcda277eca8d92fd548e7668086db0c8230a85a7339a8879aaa9d3bfbdad12893513a3f115ca49d750d20d7813e35
|
7
|
+
data.tar.gz: 419e533d62c76d7d4fd87ca9964883fd0c65f91fce0cd6e6eeb8fc87e00bfbfcca1af7d0949ae87ecb4ac3ae4e0119a2b8b571d604de600d065517e8785ee716
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2018 Peter Nagy
|
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.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# PartialMenu
|
2
|
+
Short description and motivation.
|
3
|
+
|
4
|
+
## Usage
|
5
|
+
How to use my plugin.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'partial_menu'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
```bash
|
16
|
+
$ bundle
|
17
|
+
```
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
```bash
|
21
|
+
$ gem install partial_menu
|
22
|
+
```
|
23
|
+
|
24
|
+
## Contributing
|
25
|
+
Contribution directions go here.
|
26
|
+
|
27
|
+
## License
|
28
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'PartialMenu'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
require 'bundler/gem_tasks'
|
18
|
+
|
19
|
+
require 'rake/testtask'
|
20
|
+
|
21
|
+
Rake::TestTask.new(:test) do |t|
|
22
|
+
t.libs << 'test'
|
23
|
+
t.libs << 'lib'
|
24
|
+
t.pattern = 'test/**/*_test.rb'
|
25
|
+
t.verbose = false
|
26
|
+
end
|
27
|
+
|
28
|
+
task default: :test
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Description:
|
2
|
+
Generates the example partial erb templates in /app/views/main_menu/.
|
3
|
+
You can customize the folder by providing the '--partial_dir' or '-d' option
|
4
|
+
|
5
|
+
Examples:
|
6
|
+
rails generate partial_menu:views
|
7
|
+
|
8
|
+
This will create:
|
9
|
+
app/views/main_menu/_mneu.html.erb -- menu root template
|
10
|
+
app/views/main_menu/_item.html.erb -- menu items template
|
11
|
+
app/views/main_menu/_submenu_item.html.erb -- submenu root template
|
12
|
+
app/views/main_menu/_item.html.erb -- submenu items template
|
13
|
+
|
14
|
+
rails generate partial_menu:views -d side
|
15
|
+
|
16
|
+
This will create:
|
17
|
+
app/views/side_menu/_menu.html.erb -- menu root template
|
18
|
+
app/views/side_menu/_item.html.erb -- menu items template
|
19
|
+
app/views/side_menu/_submenu_item.html.erb -- submenu root template
|
20
|
+
app/views/side_menu/_item.html.erb -- submenu items template
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<li <%= 'class="active"' if current_menu?(item.uri)%>>
|
2
|
+
<% if item.try(:icon).present? %>
|
3
|
+
<i class="fa fa-fw <%= item.icon %>"></i>
|
4
|
+
<% end %>
|
5
|
+
<% if item.uri.present? %>
|
6
|
+
<%= link_to item.uri do -%>
|
7
|
+
<%= item.title %>
|
8
|
+
<% end -%>
|
9
|
+
<% else %>
|
10
|
+
<%= item.title %>
|
11
|
+
<% end -%>
|
12
|
+
</li>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<li class="nav-item" title="<%= menu.parent.title %>" data-original-title="<%= menu.parent.title %>">
|
2
|
+
<a class="nav-link nav-link-collapse collapsed" data-toggle="collapse"
|
3
|
+
href="#collapse<%= menu.id %>" data-parent="#<%= menu.type%>">
|
4
|
+
<% if menu.parent.try(:icon).present? %>
|
5
|
+
<i class="fa fa-fw <%= menu.parent.icon %>"></i>
|
6
|
+
<% end -%>
|
7
|
+
<span class="nav-link-text"><%= menu.parent.title %></span>
|
8
|
+
</a>
|
9
|
+
<% menu.items.each do |item| %>
|
10
|
+
<%= render "#{menu.type}_menu/submenu_item", item: item %>
|
11
|
+
<% end %>
|
12
|
+
</li>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<li <%= 'class="active"' if current_menu?(item.uri)%>>
|
2
|
+
<% if item.try(:icon).present? %>
|
3
|
+
<i class="fa fa-fw <%= item.icon %>"></i>
|
4
|
+
<% end %>
|
5
|
+
<% if item.uri.present? %>
|
6
|
+
<%= link_to item.uri do -%>
|
7
|
+
<%= item.title %>
|
8
|
+
<% end -%>
|
9
|
+
<% else %>
|
10
|
+
<%= item.title %>
|
11
|
+
<% end -%>
|
12
|
+
</li>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module PartialMenu
|
2
|
+
# Generates views on demand and puts them on app/views/partial_menu
|
3
|
+
class ViewsGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path('templates', __dir__)
|
5
|
+
# rubocop:disable Metrics/LineLength
|
6
|
+
class_option :partial_dir,
|
7
|
+
type: :string,
|
8
|
+
default: 'main',
|
9
|
+
aliases: '-d',
|
10
|
+
desc: 'The directory in the /app/views/ folder to put templates in.'
|
11
|
+
# rubocop:enable Metrics/LineLength
|
12
|
+
def copy_templates
|
13
|
+
@dir = options['partial_dir']
|
14
|
+
directory '.', "app/views/#{@dir}_menu"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Description:
|
2
|
+
Generates an example menu description yaml file for config/main_menu.yaml
|
3
|
+
You can have multiple menu definitiions in an app. For this you can use
|
4
|
+
the '--type' parameter to set the name of the file
|
5
|
+
|
6
|
+
Examples:
|
7
|
+
rails generate partial_menu:yaml
|
8
|
+
|
9
|
+
This will create:
|
10
|
+
config/main_menu.yaml
|
11
|
+
|
12
|
+
rails generate partial_menu:yaml -t side
|
13
|
+
|
14
|
+
This will create:
|
15
|
+
config/side_menu.yaml
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module PartialMenu
|
2
|
+
# Generates example menu.yml file in config/
|
3
|
+
class YamlGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path('templates', __dir__)
|
5
|
+
class_option :type,
|
6
|
+
type: :string,
|
7
|
+
default: 'main',
|
8
|
+
aliases: '-t',
|
9
|
+
desc: 'Creates the menu descriptor in /config/{type}_menu.yml'
|
10
|
+
|
11
|
+
def create_menu_yaml
|
12
|
+
@type = options['type']
|
13
|
+
copy_file 'menu.yml', "config/#{@type}_menu.yml"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/partial_menu.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'partial_menu/menu_item'
|
2
|
+
|
3
|
+
module PartialMenu
|
4
|
+
# Represents a menu with menu items
|
5
|
+
class Menu
|
6
|
+
attr_reader :type
|
7
|
+
attr_reader :items
|
8
|
+
attr_reader :parent
|
9
|
+
attr_reader :id
|
10
|
+
|
11
|
+
def initialize(props, type = 'main', parent = nil)
|
12
|
+
raise "Expected a array but got #{props.class}" unless props.is_a? Array
|
13
|
+
raise "Expected a string but got #{type.class}" unless type.is_a? String
|
14
|
+
@type = type
|
15
|
+
@items = []
|
16
|
+
@parent = parent
|
17
|
+
set_id
|
18
|
+
add_items(props)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def add_items(items)
|
24
|
+
items.each do |item|
|
25
|
+
@items << PartialMenu::MenuItem.new(item, self)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def set_id
|
30
|
+
@id = if @parent.try(:class) == 'PartialMenu::MenuItem'
|
31
|
+
@parent.id + '_submenu'
|
32
|
+
else
|
33
|
+
@type + '_menu'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module PartialMenu
|
2
|
+
# Represents menu item in a menu
|
3
|
+
class MenuItem
|
4
|
+
attr_reader :type
|
5
|
+
attr_reader :parent
|
6
|
+
attr_reader :uri
|
7
|
+
attr_reader :title
|
8
|
+
attr_reader :submenu
|
9
|
+
attr_reader :id
|
10
|
+
|
11
|
+
def initialize(props, parent)
|
12
|
+
raise 'Expected a hash as props' unless props.is_a?(Hash)
|
13
|
+
raise 'Expected a PartialMenu::Menu as parent' unless parent.is_a?(
|
14
|
+
PartialMenu::Menu
|
15
|
+
)
|
16
|
+
@parent = parent
|
17
|
+
@props = props
|
18
|
+
setup
|
19
|
+
end
|
20
|
+
|
21
|
+
def setup
|
22
|
+
set_type
|
23
|
+
set_title
|
24
|
+
set_id
|
25
|
+
set_uri
|
26
|
+
set_submenu
|
27
|
+
set_other_attr
|
28
|
+
end
|
29
|
+
|
30
|
+
def submenu?
|
31
|
+
@submenu != nil
|
32
|
+
end
|
33
|
+
|
34
|
+
def separator?
|
35
|
+
@type == :separator
|
36
|
+
end
|
37
|
+
|
38
|
+
def active?
|
39
|
+
false
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def set_submenu
|
45
|
+
@submenu = nil
|
46
|
+
return if @props.key?(:menu)
|
47
|
+
@submenu = PartialMenu::Menu.new(
|
48
|
+
@props[:menu],
|
49
|
+
@parent.type,
|
50
|
+
self
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
def set_type
|
55
|
+
@_first_entry = @props.shift
|
56
|
+
@type = :item
|
57
|
+
@type = @_first_entry[1].to_sym if @_first_entry[1] == 'separator'
|
58
|
+
end
|
59
|
+
|
60
|
+
def set_title
|
61
|
+
@title = ''
|
62
|
+
return unless @type != :separator
|
63
|
+
@title = @props[:title] if @props.key?(:title)
|
64
|
+
@title = @_first_entry[0].to_s.titleize
|
65
|
+
end
|
66
|
+
|
67
|
+
def set_id
|
68
|
+
@id = @_first_entry[0].to_s
|
69
|
+
end
|
70
|
+
|
71
|
+
def set_uri
|
72
|
+
@uri = nil
|
73
|
+
@uri = @props[:uri] if @type != :separator
|
74
|
+
end
|
75
|
+
|
76
|
+
def set_other_attr
|
77
|
+
@props.except(@id, :uri, :title, :menu).each do |name, value|
|
78
|
+
instance_variable_set('@' + name.to_s, value)
|
79
|
+
define_singleton_method(name) { instance_variable_get("@#{name}") }
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'partial_menu/view_helpers'
|
2
|
+
|
3
|
+
module PartialMenu
|
4
|
+
# Binding to Rails
|
5
|
+
class Railtie < ::Rails::Railtie
|
6
|
+
initializer 'partial_menu.view_helpers' do
|
7
|
+
ActiveSupport.on_load(:action_view) do
|
8
|
+
PartialMenu::ViewHelpers
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
generators do
|
13
|
+
require 'generators/yaml/yaml_generator'
|
14
|
+
require 'generators/views/views_generator'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'partial_menu/menu'
|
2
|
+
|
3
|
+
module PartialMenu
|
4
|
+
# = PartialMenu view helpers
|
5
|
+
#
|
6
|
+
# This module serves for availability in ActionView templates. It also adds a
|
7
|
+
# new view helper: +partial_menu+.
|
8
|
+
#
|
9
|
+
# == Using the helper without arguments
|
10
|
+
# If the helper is called without passing in the type, it will
|
11
|
+
# render the default menu using the default view partials.
|
12
|
+
#
|
13
|
+
# Example:
|
14
|
+
#
|
15
|
+
# <%= partial_menu %>
|
16
|
+
#
|
17
|
+
# ... will result in <tt>menu.yaml</tt> getting displayed using partials
|
18
|
+
# from +app/views/partial_menu+:
|
19
|
+
#
|
20
|
+
# <ul>
|
21
|
+
# <li><a href="/">First item</a></li>
|
22
|
+
# ...
|
23
|
+
# </ul>
|
24
|
+
#
|
25
|
+
# Any options defined in the call will be send to +render+ as local variables
|
26
|
+
#
|
27
|
+
# Example:
|
28
|
+
#
|
29
|
+
# <%= partial_menu 'menu', {menu_id:'sidemenu'} %>
|
30
|
+
#
|
31
|
+
# You can leave out menu type parameter:
|
32
|
+
#
|
33
|
+
# Example:
|
34
|
+
#
|
35
|
+
# <%= partial_menu {menu_id:'sidemenu'} %>
|
36
|
+
#
|
37
|
+
module ViewHelpers
|
38
|
+
def partial_menu(type = 'main', options = {}) #:nodoc:
|
39
|
+
if type.is_a? Hash
|
40
|
+
options = type
|
41
|
+
type = 'main'
|
42
|
+
end
|
43
|
+
options[:menu] = PartialMenu::Menu.new(load_menu_from_yaml(type))
|
44
|
+
options.symbolize_keys!
|
45
|
+
render partial: "#{type}_menu/menu", locals: options
|
46
|
+
end
|
47
|
+
|
48
|
+
def current_menu?(path)
|
49
|
+
request.path == URI(path).path unless path.blank?
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
def load_menu_from_yaml(type)
|
55
|
+
Psych.load_file(
|
56
|
+
Rails.root.join("config/#{type}_menu.yml")
|
57
|
+
).deep_symbolize_keys[:menu]
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
metadata
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: partial_menu
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Peter Nagy
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-08-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler-audit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.6'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest-byebug
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: overcommit
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.45'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.45'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rails_best_practices
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.19'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.19'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.58'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.58'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: sqlite3
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.3'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.3'
|
111
|
+
description: |-
|
112
|
+
Generating hierarchical meus in Rails should utilize Rails'
|
113
|
+
built-in partial views instead of using some kind on HTML code generators.
|
114
|
+
This gem just do that.
|
115
|
+
email:
|
116
|
+
- peter@meter-reader.com
|
117
|
+
executables: []
|
118
|
+
extensions: []
|
119
|
+
extra_rdoc_files: []
|
120
|
+
files:
|
121
|
+
- MIT-LICENSE
|
122
|
+
- README.md
|
123
|
+
- Rakefile
|
124
|
+
- lib/generators/views/USAGE
|
125
|
+
- lib/generators/views/templates/_item.html.erb
|
126
|
+
- lib/generators/views/templates/_menu.html.erb
|
127
|
+
- lib/generators/views/templates/_submenu.html.erb
|
128
|
+
- lib/generators/views/templates/_submenu_item.html.erb
|
129
|
+
- lib/generators/views/views_generator.rb
|
130
|
+
- lib/generators/yaml/USAGE
|
131
|
+
- lib/generators/yaml/templates/menu.yml
|
132
|
+
- lib/generators/yaml/yaml_generator.rb
|
133
|
+
- lib/partial_menu.rb
|
134
|
+
- lib/partial_menu/menu.rb
|
135
|
+
- lib/partial_menu/menu_item.rb
|
136
|
+
- lib/partial_menu/railtie.rb
|
137
|
+
- lib/partial_menu/version.rb
|
138
|
+
- lib/partial_menu/view_helpers.rb
|
139
|
+
- lib/tasks/partial_menu_tasks.rake
|
140
|
+
homepage: https://bitbucket.org/meterreader/partial_menu
|
141
|
+
licenses:
|
142
|
+
- MIT
|
143
|
+
metadata: {}
|
144
|
+
post_install_message:
|
145
|
+
rdoc_options: []
|
146
|
+
require_paths:
|
147
|
+
- lib
|
148
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
requirements: []
|
159
|
+
rubyforge_project:
|
160
|
+
rubygems_version: 2.6.8
|
161
|
+
signing_key:
|
162
|
+
specification_version: 4
|
163
|
+
summary: Navigation menu builder based on Rails partial views.
|
164
|
+
test_files: []
|