dynamic_menus 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +19 -0
- data/Gemfile.lock +77 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +31 -0
- data/Rakefile +49 -0
- data/VERSION +1 -0
- data/app/controllers/dynamic_menus_controller.rb +90 -0
- data/app/models/dynamic_menu.rb +28 -0
- data/app/views/dynamic_menus/_form.html.haml +47 -0
- data/app/views/dynamic_menus/edit.html.haml +3 -0
- data/app/views/dynamic_menus/index.html.haml +29 -0
- data/app/views/dynamic_menus/new.html.haml +3 -0
- data/app/views/dynamic_menus/show.html.haml +19 -0
- data/app/views/error_no_access.html.haml +3 -0
- data/dynamic_menus.gemspec +105 -0
- data/lib/dynamic_menus.rb +153 -0
- data/lib/dynamic_menus/version.rb +3 -0
- data/lib/tasks/dynamic_menus_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +8 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/.gitkeep +0 -0
- data/test/dummy/app/models/user.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.haml +16 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +60 -0
- data/test/dummy/db/migrate/20130311085618_create_users.rb +10 -0
- data/test/dummy/db/migrate/20130311085700_create_dynamic_menus.rb +9 -0
- data/test/dummy/db/schema.rb +41 -0
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/log/.gitkeep +0 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/users.yml +9 -0
- data/test/dummy/test/unit/user_test.rb +7 -0
- data/test/dynamic_menus_test.rb +104 -0
- data/test/test_helper.rb +15 -0
- metadata +171 -0
data/Gemfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
# Declare your gem's dependencies in dynamic_menus.gemspec.
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
+
# development dependencies will be added by default to the :development group.
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem "jeweler"
|
9
|
+
|
10
|
+
# jquery-rails is used by the dummy application
|
11
|
+
gem "jquery-rails"
|
12
|
+
|
13
|
+
# Declare any dependencies that are still in development here instead of in
|
14
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
15
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
16
|
+
# your gem to rubygems.org.
|
17
|
+
|
18
|
+
# To use debugger
|
19
|
+
# gem 'debugger'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
dynamic_menus (0.0.2)
|
5
|
+
dynamic_menus
|
6
|
+
jeweler
|
7
|
+
jquery-rails
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actionpack (3.2.13)
|
13
|
+
activemodel (= 3.2.13)
|
14
|
+
activesupport (= 3.2.13)
|
15
|
+
builder (~> 3.0.0)
|
16
|
+
erubis (~> 2.7.0)
|
17
|
+
journey (~> 1.0.4)
|
18
|
+
rack (~> 1.4.5)
|
19
|
+
rack-cache (~> 1.2)
|
20
|
+
rack-test (~> 0.6.1)
|
21
|
+
sprockets (~> 2.2.1)
|
22
|
+
activemodel (3.2.13)
|
23
|
+
activesupport (= 3.2.13)
|
24
|
+
builder (~> 3.0.0)
|
25
|
+
activesupport (3.2.13)
|
26
|
+
i18n (= 0.6.1)
|
27
|
+
multi_json (~> 1.0)
|
28
|
+
builder (3.0.4)
|
29
|
+
erubis (2.7.0)
|
30
|
+
git (1.2.5)
|
31
|
+
hike (1.2.2)
|
32
|
+
i18n (0.6.1)
|
33
|
+
jeweler (1.8.4)
|
34
|
+
bundler (~> 1.0)
|
35
|
+
git (>= 1.2.5)
|
36
|
+
rake
|
37
|
+
rdoc
|
38
|
+
journey (1.0.4)
|
39
|
+
jquery-rails (2.2.1)
|
40
|
+
railties (>= 3.0, < 5.0)
|
41
|
+
thor (>= 0.14, < 2.0)
|
42
|
+
json (1.8.0)
|
43
|
+
multi_json (1.7.4)
|
44
|
+
rack (1.4.5)
|
45
|
+
rack-cache (1.2)
|
46
|
+
rack (>= 0.4)
|
47
|
+
rack-ssl (1.3.3)
|
48
|
+
rack
|
49
|
+
rack-test (0.6.2)
|
50
|
+
rack (>= 1.0)
|
51
|
+
railties (3.2.13)
|
52
|
+
actionpack (= 3.2.13)
|
53
|
+
activesupport (= 3.2.13)
|
54
|
+
rack-ssl (~> 1.3.2)
|
55
|
+
rake (>= 0.8.7)
|
56
|
+
rdoc (~> 3.4)
|
57
|
+
thor (>= 0.14.6, < 2.0)
|
58
|
+
rake (10.0.4)
|
59
|
+
rdoc (3.12.2)
|
60
|
+
json (~> 1.4)
|
61
|
+
sprockets (2.2.2)
|
62
|
+
hike (~> 1.2)
|
63
|
+
multi_json (~> 1.0)
|
64
|
+
rack (~> 1.0)
|
65
|
+
tilt (~> 1.1, != 1.3.0)
|
66
|
+
sqlite3 (1.3.7)
|
67
|
+
thor (0.18.1)
|
68
|
+
tilt (1.4.1)
|
69
|
+
|
70
|
+
PLATFORMS
|
71
|
+
ruby
|
72
|
+
|
73
|
+
DEPENDENCIES
|
74
|
+
dynamic_menus!
|
75
|
+
jeweler
|
76
|
+
jquery-rails
|
77
|
+
sqlite3
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2013 YOURNAME
|
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
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
= DynamicMenus
|
2
|
+
|
3
|
+
This project rocks and uses MIT-LICENSE.
|
4
|
+
|
5
|
+
= Installation
|
6
|
+
|
7
|
+
gem install dynamic_menus
|
8
|
+
|
9
|
+
Alter "roubes.rb" to include this in the top within the draw:
|
10
|
+
|
11
|
+
DynamicMenus.setup(routes: self)
|
12
|
+
|
13
|
+
Create a migration like this:
|
14
|
+
|
15
|
+
class CreateDynamicMenu < ActiveRecord::Migration
|
16
|
+
def up
|
17
|
+
DynamicMenus.create_tables
|
18
|
+
end
|
19
|
+
|
20
|
+
def down
|
21
|
+
DynamicMenus.drop_tables
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
Run db:migrate with this command:
|
26
|
+
|
27
|
+
rake db:migrate
|
28
|
+
|
29
|
+
Set up your menus by going to:
|
30
|
+
|
31
|
+
localhost:3000/dynamic_menus
|
data/Rakefile
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'DynamicMenus'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
require 'jeweler'
|
24
|
+
Jeweler::Tasks.new do |gem|
|
25
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
26
|
+
gem.name = "dynamic_menus"
|
27
|
+
gem.homepage = "http://github.com/kaspernj/dynamic_menus"
|
28
|
+
gem.license = "MIT"
|
29
|
+
gem.summary = %Q{Various helpers to create dynamic menus in Rails.}
|
30
|
+
gem.description = %Q{Various helpers to create dynamic menus in Rails.}
|
31
|
+
gem.email = "k@spernj.org"
|
32
|
+
gem.authors = ["kaspernj"]
|
33
|
+
# dependencies defined in Gemfile
|
34
|
+
end
|
35
|
+
Jeweler::RubygemsDotOrgTasks.new
|
36
|
+
|
37
|
+
Bundler::GemHelper.install_tasks
|
38
|
+
|
39
|
+
require 'rake/testtask'
|
40
|
+
|
41
|
+
Rake::TestTask.new(:test) do |t|
|
42
|
+
t.libs << 'lib'
|
43
|
+
t.libs << 'test'
|
44
|
+
t.pattern = 'test/**/*_test.rb'
|
45
|
+
t.verbose = false
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
task :default => :test
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.2
|
@@ -0,0 +1,90 @@
|
|
1
|
+
class DynamicMenusController < ApplicationController
|
2
|
+
protect_from_forgery
|
3
|
+
PATH = File.realpath("#{File.dirname(__FILE__)}/../views/dynamic_menus")
|
4
|
+
|
5
|
+
def index
|
6
|
+
@menus = DynamicMenu.all
|
7
|
+
@menus.sort do |menu1, menu2|
|
8
|
+
menu1.title!.to_s.downcase <=> menu2.title!.to_s.downcase
|
9
|
+
end
|
10
|
+
|
11
|
+
respond_to do |format|
|
12
|
+
format.html{ render "#{PATH}/index.html.haml" }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
# GET /dynamic_menu/1
|
17
|
+
# GET /dynamic_menu/1.json
|
18
|
+
def show
|
19
|
+
@dynamic_menu = DynamicMenu.find(params[:id])
|
20
|
+
|
21
|
+
respond_to do |format|
|
22
|
+
format.html { render "#{PATH}/show.html.haml" }
|
23
|
+
format.json { render json: @dynamic_menu }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# GET /dynamic_menu/new
|
28
|
+
# GET /dynamic_menu/new.json
|
29
|
+
def new
|
30
|
+
@dynamic_menu = DynamicMenu.new
|
31
|
+
|
32
|
+
respond_to do |format|
|
33
|
+
format.html { render "#{PATH}/new.html.haml" }
|
34
|
+
format.json { render json: @dynamic_menu }
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
# GET /dynamic_menu/1/edit
|
39
|
+
def edit
|
40
|
+
@dynamic_menu = DynamicMenu.find(params[:id])
|
41
|
+
|
42
|
+
respond_to do |format|
|
43
|
+
format.html { render "#{PATH}/edit.html.haml" }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# POST /dynamic_menu
|
48
|
+
# POST /dynamic_menu.json
|
49
|
+
def create
|
50
|
+
@dynamic_menu = DynamicMenu.new(params[:dynamic_menu])
|
51
|
+
|
52
|
+
respond_to do |format|
|
53
|
+
if @dynamic_menu.save
|
54
|
+
format.html { redirect_to @dynamic_menu, notice: 'DynamicMenu was successfully created.' }
|
55
|
+
format.json { render json: @dynamic_menu, status: :created, location: @dynamic_menu }
|
56
|
+
else
|
57
|
+
format.html { render "#{PATH}/new.html.haml" }
|
58
|
+
format.json { render json: @dynamic_menu.errors, status: :unprocessable_entity }
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# PUT /dynamic_menu/1
|
64
|
+
# PUT /dynamic_menu/1.json
|
65
|
+
def update
|
66
|
+
@dynamic_menu = DynamicMenu.find(params[:id])
|
67
|
+
|
68
|
+
respond_to do |format|
|
69
|
+
if @dynamic_menu.update_attributes(params[:dynamic_menu])
|
70
|
+
format.html { redirect_to @dynamic_menu, notice: 'DynamicMenu was successfully updated.' }
|
71
|
+
format.json { head :no_content }
|
72
|
+
else
|
73
|
+
format.html { render "#{PATH}/edit.html.haml" }
|
74
|
+
format.json { render json: @dynamic_menu.errors, status: :unprocessable_entity }
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# DELETE /dynamic_menu/1
|
80
|
+
# DELETE /dynamic_menu/1.json
|
81
|
+
def destroy
|
82
|
+
@dynamic_menu = DynamicMenu.find(params[:id])
|
83
|
+
@dynamic_menu.destroy
|
84
|
+
|
85
|
+
respond_to do |format|
|
86
|
+
format.html { redirect_to dynamic_menu_index_url }
|
87
|
+
format.json { head :no_content }
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class DynamicMenu < ActiveRecord::Base
|
2
|
+
attr_accessible :title, :dynamic_menu_id, :url, :idstr, :sort, :check_callbacks
|
3
|
+
translates :title
|
4
|
+
has_many :dynamic_menus
|
5
|
+
|
6
|
+
validate :validate
|
7
|
+
def validate
|
8
|
+
self.dynamic_menu_id = 0 if self.dynamic_menu_id.to_i == 0
|
9
|
+
end
|
10
|
+
|
11
|
+
def title!
|
12
|
+
title_str = title
|
13
|
+
return "[#{_("no title")}]" if title_str.to_s.strip.empty?
|
14
|
+
return title_str
|
15
|
+
end
|
16
|
+
|
17
|
+
def check_callbacks_enum
|
18
|
+
Enumerator.new do |yielder|
|
19
|
+
self.check_callbacks.to_s.strip.split(/\s*,\s*/).each do |str|
|
20
|
+
yielder << str.to_s.strip.to_sym unless str.empty?
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def check_callbacks?
|
26
|
+
!check_callbacks.to_s.strip.empty?
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
.dynamic_menu_form
|
2
|
+
=form_for(@dynamic_menu) do |f|
|
3
|
+
-if @dynamic_menu.errors.any?
|
4
|
+
#error_explanation
|
5
|
+
%h2=pluralize(@dynamic_menu.errors.count, "error") + " prohibited this news from being saved:"
|
6
|
+
|
7
|
+
%ul
|
8
|
+
-@dynamic_menu.errors.full_messages.each do |msg|
|
9
|
+
%li= msg
|
10
|
+
|
11
|
+
-if params[:dynamic_menu_id].to_i > 0 and parent_menu = DynamicMenu.find(params[:dynamic_menu_id].to_i)
|
12
|
+
.field
|
13
|
+
=f.label :title, _("Parent menu")
|
14
|
+
%br
|
15
|
+
=link_to(parent_menu.title!, parent_menu)
|
16
|
+
=f.hidden_field :dynamic_menu_id, value: parent_menu.id
|
17
|
+
.description=_("The menu-item before this item.")
|
18
|
+
.field
|
19
|
+
=f.label :title, _("Title")
|
20
|
+
%br
|
21
|
+
=f.text_field :title
|
22
|
+
.description=_("The title decides what the item should say.")
|
23
|
+
.field
|
24
|
+
=f.label :idstr, _("ID text")
|
25
|
+
%br
|
26
|
+
=f.text_field :idstr
|
27
|
+
.description=_("This ID can be used in order to get a specific menu item back.")
|
28
|
+
.field
|
29
|
+
=f.label :url, _("URL")
|
30
|
+
%br
|
31
|
+
=f.text_field :url
|
32
|
+
.description=_("The URL that this menu item should direct to.")
|
33
|
+
.field
|
34
|
+
=f.label :sort, _("Sort")
|
35
|
+
%br
|
36
|
+
=f.text_field :sort
|
37
|
+
.description=_("A number that decides in which order this item should be shown.")
|
38
|
+
.field
|
39
|
+
=f.label :check_callbacks, _("Check callbacks")
|
40
|
+
%br
|
41
|
+
=f.text_field :check_callbacks
|
42
|
+
.description=_("Comma separated list of strings that you can connect to in order to do callbacks, to check if this item should be shown or not.")
|
43
|
+
.actions
|
44
|
+
= f.submit
|
45
|
+
|
46
|
+
:javascript
|
47
|
+
$("#dynamic_menu_title").focus()
|
@@ -0,0 +1,29 @@
|
|
1
|
+
%h1=_("Listing Dynamic Menus")
|
2
|
+
|
3
|
+
.box{style: "width: 550px;"}
|
4
|
+
%table.list{width: "100%"}
|
5
|
+
%thead
|
6
|
+
%tr
|
7
|
+
%th=_("Menu")
|
8
|
+
%th=_("URL")
|
9
|
+
%th=_("Sort")
|
10
|
+
%th=_("Actions")
|
11
|
+
%tbody
|
12
|
+
-DynamicMenus.recursive_walkthrough(pass_args: {controller: self}, all: true) do |data|
|
13
|
+
%tr
|
14
|
+
%td
|
15
|
+
=(" " * data[:level]).html_safe
|
16
|
+
=link_to(data[:menu].title!, data[:menu])
|
17
|
+
%td=data[:menu].url
|
18
|
+
%td=data[:menu].sort
|
19
|
+
%td
|
20
|
+
(
|
21
|
+
=link_to(_("sub"), new_dynamic_menu_path(dynamic_menu_id: data[:menu].id))
|
22
|
+
=link_to(_("delete"), data[:menu], method: :delete, data: _("Are you sure?"))
|
23
|
+
)
|
24
|
+
-if @menus.empty?
|
25
|
+
%td.notice{colspan: 2}
|
26
|
+
=_("No menus was found.")
|
27
|
+
|
28
|
+
%br
|
29
|
+
=link_to(_("New menu"), new_dynamic_menu_path)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
%h1=sprintf(_("Edit menu: %s"), @dynamic_menu.title!)
|
2
|
+
|
3
|
+
.box{style: "width: 300px;"}
|
4
|
+
.field
|
5
|
+
%label=_("ID text") + ":"
|
6
|
+
=@dynamic_menu.idstr
|
7
|
+
.field
|
8
|
+
%label=_("URL") + ":"
|
9
|
+
=@dynamic_menu.url
|
10
|
+
.field
|
11
|
+
%label=_("Sort") + ":"
|
12
|
+
=@dynamic_menu.sort
|
13
|
+
.field
|
14
|
+
%label=_("Check callbacks") + ":"
|
15
|
+
=@dynamic_menu.check_callbacks_enum.to_a.join(", ")
|
16
|
+
|
17
|
+
%br
|
18
|
+
=link_to(_("Edit"), edit_dynamic_menu_path(@dynamic_menu))
|
19
|
+
=link_to(_("Add submenu"), new_dynamic_menu_path(dynamic_menu_id: @dynamic_menu.id))
|
@@ -0,0 +1,105 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "dynamic_menus"
|
8
|
+
s.version = "0.0.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["kaspernj"]
|
12
|
+
s.date = "2013-05-28"
|
13
|
+
s.description = "Various helpers to create dynamic menus in Rails."
|
14
|
+
s.email = "k@spernj.org"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README.rdoc"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
"Gemfile",
|
20
|
+
"Gemfile.lock",
|
21
|
+
"MIT-LICENSE",
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"app/controllers/dynamic_menus_controller.rb",
|
26
|
+
"app/models/dynamic_menu.rb",
|
27
|
+
"app/views/dynamic_menus/_form.html.haml",
|
28
|
+
"app/views/dynamic_menus/edit.html.haml",
|
29
|
+
"app/views/dynamic_menus/index.html.haml",
|
30
|
+
"app/views/dynamic_menus/new.html.haml",
|
31
|
+
"app/views/dynamic_menus/show.html.haml",
|
32
|
+
"app/views/error_no_access.html.haml",
|
33
|
+
"dynamic_menus.gemspec",
|
34
|
+
"lib/dynamic_menus.rb",
|
35
|
+
"lib/dynamic_menus/version.rb",
|
36
|
+
"lib/tasks/dynamic_menus_tasks.rake",
|
37
|
+
"test/dummy/README.rdoc",
|
38
|
+
"test/dummy/Rakefile",
|
39
|
+
"test/dummy/app/assets/javascripts/application.js",
|
40
|
+
"test/dummy/app/assets/stylesheets/application.css",
|
41
|
+
"test/dummy/app/controllers/application_controller.rb",
|
42
|
+
"test/dummy/app/helpers/application_helper.rb",
|
43
|
+
"test/dummy/app/mailers/.gitkeep",
|
44
|
+
"test/dummy/app/models/.gitkeep",
|
45
|
+
"test/dummy/app/models/user.rb",
|
46
|
+
"test/dummy/app/views/layouts/application.html.haml",
|
47
|
+
"test/dummy/config.ru",
|
48
|
+
"test/dummy/config/application.rb",
|
49
|
+
"test/dummy/config/boot.rb",
|
50
|
+
"test/dummy/config/database.yml",
|
51
|
+
"test/dummy/config/environment.rb",
|
52
|
+
"test/dummy/config/environments/development.rb",
|
53
|
+
"test/dummy/config/environments/production.rb",
|
54
|
+
"test/dummy/config/environments/test.rb",
|
55
|
+
"test/dummy/config/initializers/backtrace_silencers.rb",
|
56
|
+
"test/dummy/config/initializers/inflections.rb",
|
57
|
+
"test/dummy/config/initializers/mime_types.rb",
|
58
|
+
"test/dummy/config/initializers/secret_token.rb",
|
59
|
+
"test/dummy/config/initializers/session_store.rb",
|
60
|
+
"test/dummy/config/initializers/wrap_parameters.rb",
|
61
|
+
"test/dummy/config/locales/en.yml",
|
62
|
+
"test/dummy/config/routes.rb",
|
63
|
+
"test/dummy/db/migrate/20130311085618_create_users.rb",
|
64
|
+
"test/dummy/db/migrate/20130311085700_create_dynamic_menus.rb",
|
65
|
+
"test/dummy/db/schema.rb",
|
66
|
+
"test/dummy/lib/assets/.gitkeep",
|
67
|
+
"test/dummy/log/.gitkeep",
|
68
|
+
"test/dummy/public/404.html",
|
69
|
+
"test/dummy/public/422.html",
|
70
|
+
"test/dummy/public/500.html",
|
71
|
+
"test/dummy/public/favicon.ico",
|
72
|
+
"test/dummy/script/rails",
|
73
|
+
"test/dummy/test/fixtures/users.yml",
|
74
|
+
"test/dummy/test/unit/user_test.rb",
|
75
|
+
"test/dynamic_menus_test.rb",
|
76
|
+
"test/test_helper.rb"
|
77
|
+
]
|
78
|
+
s.homepage = "http://github.com/kaspernj/dynamic_menus"
|
79
|
+
s.licenses = ["MIT"]
|
80
|
+
s.require_paths = ["lib"]
|
81
|
+
s.rubygems_version = "1.8.23"
|
82
|
+
s.summary = "Various helpers to create dynamic menus in Rails."
|
83
|
+
|
84
|
+
if s.respond_to? :specification_version then
|
85
|
+
s.specification_version = 3
|
86
|
+
|
87
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
88
|
+
s.add_runtime_dependency(%q<dynamic_menus>, [">= 0"])
|
89
|
+
s.add_runtime_dependency(%q<jeweler>, [">= 0"])
|
90
|
+
s.add_runtime_dependency(%q<jquery-rails>, [">= 0"])
|
91
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
92
|
+
else
|
93
|
+
s.add_dependency(%q<dynamic_menus>, [">= 0"])
|
94
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
95
|
+
s.add_dependency(%q<jquery-rails>, [">= 0"])
|
96
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
97
|
+
end
|
98
|
+
else
|
99
|
+
s.add_dependency(%q<dynamic_menus>, [">= 0"])
|
100
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
101
|
+
s.add_dependency(%q<jquery-rails>, [">= 0"])
|
102
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|