mub 0.1.0
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.md +28 -0
- data/Rakefile +8 -0
- data/app/assets/config/mub_manifest.js +1 -0
- data/app/assets/stylesheets/mub/application.css +15 -0
- data/app/controllers/mub/application_controller.rb +4 -0
- data/app/helpers/mub/application_helper.rb +4 -0
- data/app/models/mub/application_record.rb +5 -0
- data/app/models/mub/template.rb +20 -0
- data/app/views/layouts/mub/application.html.erb +15 -0
- data/config/routes.rb +2 -0
- data/db/migrate/20210921152440_create_mub_templates.rb +12 -0
- data/lib/mub/engine.rb +5 -0
- data/lib/mub/version.rb +3 -0
- data/lib/mub.rb +6 -0
- data/lib/tasks/auto_annotate_models.rake +59 -0
- data/lib/tasks/mub_tasks.rake +4 -0
- metadata +140 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a4401abab6739622af312bf7d53b67b3ed5d1e95fa32f6ce2c03f8376cad7c06
|
4
|
+
data.tar.gz: 2b31ef0244a43139e057351961148207720628a88b43a8b1064bcaae5c815d73
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4b4789f1a78b7808a994fe128d490d6b4cc76998b2d1e31f21d42eef955db376e24867ec3e06ef7d25496823570ddf86893c44f9734945667a9e89e67412de31
|
7
|
+
data.tar.gz: aaf7f0104a558c74d3fd589ce8247ed6acbe1d344c98e6c00f39a54c15e3278baab82669375a802dd0f3ca59486a8eb51540ad693cdc938399b9afa4746e803c
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2021 Zino
|
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
|
+
# Mub
|
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 'mub'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
```bash
|
16
|
+
$ bundle
|
17
|
+
```
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
```bash
|
21
|
+
$ gem install mub
|
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 @@
|
|
1
|
+
//= link_directory ../stylesheets/mub .css
|
@@ -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 other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Mub
|
2
|
+
class Template < ApplicationRecord
|
3
|
+
validates :resource_type, :name, :classification, presence: true
|
4
|
+
validates :name, uniqueness: { scope: :resource_type }
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
# == Schema Information
|
9
|
+
#
|
10
|
+
# Table name: mub_templates
|
11
|
+
#
|
12
|
+
# id :bigint not null, primary key
|
13
|
+
# activated_at :datetime
|
14
|
+
# classification :string not null
|
15
|
+
# description :text
|
16
|
+
# name :string not null
|
17
|
+
# resource_type :string not null
|
18
|
+
# created_at :datetime not null
|
19
|
+
# updated_at :datetime not null
|
20
|
+
#
|
data/config/routes.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateMubTemplates < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
create_table :mub_templates do |t|
|
4
|
+
t.string :resource_type, null: false
|
5
|
+
t.string :name, null: false
|
6
|
+
t.text :description
|
7
|
+
t.datetime :activated_at
|
8
|
+
t.string :classification, null: false
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/lib/mub/engine.rb
ADDED
data/lib/mub/version.rb
ADDED
data/lib/mub.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# NOTE: only doing this in development as some production environments (Heroku)
|
2
|
+
# NOTE: are sensitive to local FS writes, and besides -- it's just not proper
|
3
|
+
# NOTE: to have a dev-mode tool do its thing in production.
|
4
|
+
if Rails.env.development?
|
5
|
+
require 'annotate'
|
6
|
+
task :set_annotation_options do
|
7
|
+
# You can override any of these by setting an environment variable of the
|
8
|
+
# same name.
|
9
|
+
Annotate.set_defaults(
|
10
|
+
'active_admin' => 'false',
|
11
|
+
'additional_file_patterns' => [],
|
12
|
+
'routes' => 'false',
|
13
|
+
'models' => 'true',
|
14
|
+
'position_in_routes' => 'after',
|
15
|
+
'position_in_class' => 'after',
|
16
|
+
'position_in_test' => 'after',
|
17
|
+
'position_in_fixture' => 'after',
|
18
|
+
'position_in_factory' => 'after',
|
19
|
+
'position_in_serializer' => 'after',
|
20
|
+
'show_foreign_keys' => 'true',
|
21
|
+
'show_complete_foreign_keys' => 'false',
|
22
|
+
'show_indexes' => 'true',
|
23
|
+
'simple_indexes' => 'false',
|
24
|
+
'model_dir' => 'app/models',
|
25
|
+
'root_dir' => '',
|
26
|
+
'include_version' => 'false',
|
27
|
+
'require' => '',
|
28
|
+
'exclude_tests' => 'false',
|
29
|
+
'exclude_fixtures' => 'false',
|
30
|
+
'exclude_factories' => 'false',
|
31
|
+
'exclude_serializers' => 'false',
|
32
|
+
'exclude_scaffolds' => 'true',
|
33
|
+
'exclude_controllers' => 'true',
|
34
|
+
'exclude_helpers' => 'true',
|
35
|
+
'exclude_sti_subclasses' => 'false',
|
36
|
+
'ignore_model_sub_dir' => 'false',
|
37
|
+
'ignore_columns' => nil,
|
38
|
+
'ignore_routes' => nil,
|
39
|
+
'ignore_unknown_models' => 'false',
|
40
|
+
'hide_limit_column_types' => 'integer,bigint,boolean',
|
41
|
+
'hide_default_column_types' => 'json,jsonb,hstore',
|
42
|
+
'skip_on_db_migrate' => 'false',
|
43
|
+
'format_bare' => 'true',
|
44
|
+
'format_rdoc' => 'false',
|
45
|
+
'format_yard' => 'false',
|
46
|
+
'format_markdown' => 'false',
|
47
|
+
'sort' => 'false',
|
48
|
+
'force' => 'false',
|
49
|
+
'frozen' => 'false',
|
50
|
+
'classified_sort' => 'true',
|
51
|
+
'trace' => 'false',
|
52
|
+
'wrapper_open' => nil,
|
53
|
+
'wrapper_close' => nil,
|
54
|
+
'with_comment' => 'true'
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
Annotate.load_tasks
|
59
|
+
end
|
metadata
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mub
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Zino
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-09-21 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: 6.1.4
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 6.1.4.1
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 6.1.4
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 6.1.4.1
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: pry
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec-rails
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: annotate
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: factory_bot_rails
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
description: Resource Templating Engine
|
90
|
+
email:
|
91
|
+
- zino@chowbus.com
|
92
|
+
executables: []
|
93
|
+
extensions: []
|
94
|
+
extra_rdoc_files: []
|
95
|
+
files:
|
96
|
+
- MIT-LICENSE
|
97
|
+
- README.md
|
98
|
+
- Rakefile
|
99
|
+
- app/assets/config/mub_manifest.js
|
100
|
+
- app/assets/stylesheets/mub/application.css
|
101
|
+
- app/controllers/mub/application_controller.rb
|
102
|
+
- app/helpers/mub/application_helper.rb
|
103
|
+
- app/models/mub/application_record.rb
|
104
|
+
- app/models/mub/template.rb
|
105
|
+
- app/views/layouts/mub/application.html.erb
|
106
|
+
- config/routes.rb
|
107
|
+
- db/migrate/20210921152440_create_mub_templates.rb
|
108
|
+
- lib/mub.rb
|
109
|
+
- lib/mub/engine.rb
|
110
|
+
- lib/mub/version.rb
|
111
|
+
- lib/tasks/auto_annotate_models.rake
|
112
|
+
- lib/tasks/mub_tasks.rake
|
113
|
+
homepage: https://github.com/zinosama/mub
|
114
|
+
licenses:
|
115
|
+
- MIT
|
116
|
+
metadata:
|
117
|
+
allowed_push_host: https://rubygems.org/
|
118
|
+
homepage_uri: https://github.com/zinosama/mub
|
119
|
+
source_code_uri: https://github.com/zinosama/mub
|
120
|
+
changelog_uri: https://github.com/zinosama/mub/blob/master/CHANGELOG.md
|
121
|
+
post_install_message:
|
122
|
+
rdoc_options: []
|
123
|
+
require_paths:
|
124
|
+
- lib
|
125
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
requirements: []
|
136
|
+
rubygems_version: 3.0.3
|
137
|
+
signing_key:
|
138
|
+
specification_version: 4
|
139
|
+
summary: Resource Templating Engine
|
140
|
+
test_files: []
|