model_info 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +34 -0
- data/Rakefile +37 -0
- data/app/assets/javascripts/model_info/application.js +15 -0
- data/app/assets/javascripts/model_info/associations.js +2 -0
- data/app/assets/javascripts/model_info/fetch_model_infos.js +2 -0
- data/app/assets/stylesheets/model_info/application.css +15 -0
- data/app/assets/stylesheets/model_info/associations.css +4 -0
- data/app/assets/stylesheets/model_info/bootstrap.css +6566 -0
- data/app/assets/stylesheets/model_info/bootstrap.min.css +5 -0
- data/app/assets/stylesheets/model_info/fetch_model_infos.css +4 -0
- data/app/controllers/model_info/application_controller.rb +23 -0
- data/app/controllers/model_info/associations_controller.rb +49 -0
- data/app/controllers/model_info/models_controller.rb +54 -0
- data/app/helpers/model_info/application_helper.rb +4 -0
- data/app/helpers/model_info/associations_helper.rb +4 -0
- data/app/views/layouts/model_info/_header.html.erb +7 -0
- data/app/views/layouts/model_info/_models_header.html.erb +5 -0
- data/app/views/layouts/model_info/application.html.erb +15 -0
- data/app/views/model_info/associations/edit.html.erb +14 -0
- data/app/views/model_info/associations/index.html.erb +50 -0
- data/app/views/model_info/associations/new.html.erb +24 -0
- data/app/views/model_info/associations/show.html.erb +19 -0
- data/app/views/model_info/models/display.html.erb +49 -0
- data/app/views/model_info/models/edit.html.erb +14 -0
- data/app/views/model_info/models/new.html.erb +21 -0
- data/app/views/model_info/models/show.html.erb +19 -0
- data/config/routes.rb +19 -0
- data/lib/model_info/engine.rb +5 -0
- data/lib/model_info/version.rb +3 -0
- data/lib/model_info.rb +3 -0
- data/lib/tasks/model_info_tasks.rake +4 -0
- metadata +118 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 55b092ee9f141aad0c271c418e2b1e8b9ded2d22
|
4
|
+
data.tar.gz: 11c2c1dfa990fabd3b6a658a45360b530c9123a0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f755689ef0fcad9703ec1f23447ba2c12c30d576eb9b69b90348f97aa6486275fad0caee410d72d10e8e257097d88a5ade291e7dad1010b4e6ab47cef609e17b
|
7
|
+
data.tar.gz: dbf9ceb4c2df061203972e623f5382ea6867cb371c274e68f01d02ca84ee535b52de6f4e918f97ff3a146c6a237929e7b46b65405921de96be5d3486b031f1f9
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2015 nitanshu
|
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,34 @@
|
|
1
|
+
= ModelInfo
|
2
|
+
|
3
|
+
ModelInfo gem provides all *models*(available in your application including engine's model) CRUD and all *associations* of a model and their CRUD.
|
4
|
+
|
5
|
+
== Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
<tt>gem 'model_info' , :github => 'nitanshu/model_info'</tt>
|
10
|
+
|
11
|
+
Please install *kaminari* gem:
|
12
|
+
|
13
|
+
<tt>gem 'kaminari'</tt>
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
<tt>$ bundle</tt>
|
18
|
+
|
19
|
+
== Usage
|
20
|
+
|
21
|
+
To use this gem you just need to mount it in your route file *config/routes.rb*
|
22
|
+
|
23
|
+
<tt> mount ModelInfo::Engine => '/model_info' </tt>
|
24
|
+
|
25
|
+
Then to go to the dashboard hit the url as:
|
26
|
+
|
27
|
+
your_application_url */model_info/models*
|
28
|
+
|
29
|
+
== Working Status
|
30
|
+
|
31
|
+
This engine may break so many times but I am working on so many things such as handling all exceptions and the system breaks on polymorphic association.
|
32
|
+
|
33
|
+
|
34
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,37 @@
|
|
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 = 'ModelInfo'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
18
|
+
load 'rails/tasks/engine.rake'
|
19
|
+
|
20
|
+
|
21
|
+
load 'rails/tasks/statistics.rake'
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
Bundler::GemHelper.install_tasks
|
26
|
+
|
27
|
+
require 'rake/testtask'
|
28
|
+
|
29
|
+
Rake::TestTask.new(:test) do |t|
|
30
|
+
t.libs << 'lib'
|
31
|
+
t.libs << 'test'
|
32
|
+
t.pattern = 'test/**/*_test.rb'
|
33
|
+
t.verbose = false
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
task default: :test
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|