jinda 0.7.5.2 → 0.7.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +60 -39
- data/lib/generators/jinda/install_generator.rb +3 -1
- data/lib/jinda/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 913d3ff0fb61e74a15477a65eb7f16806ca9fa364cdadb57a6746d4e3176dd69
|
4
|
+
data.tar.gz: ca642e667d15990c4e7648a569b55de894b1ecf4fc884265db9b1a523c1b8480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d74c12ca10291f6665f50da4ada71d3f7b965354f50fb90f097072cb80bd8cd5d9c53e3fff0239dbf8b7f9c81a5b4c9a5a9591f033f163c09bf53880cb0990c
|
7
|
+
data.tar.gz: 9a8e647a0e30efb91bae8f91e93b2e7fd45a6e7548d3d8aad277e641893279be5d4d15e33338f4af09340edbf2193037b1f0559b4aab4b98c953e7c38214f611
|
data/README.md
CHANGED
@@ -1,37 +1,62 @@
|
|
1
1
|
# Jinda
|
2
|
-
Rails Application Generator using Freemind
|
3
|
-
* [jinda](https://github.com/kul1/jinda)
|
4
|
-
-![Screen Shot 2019-09-07 at 1 00 03 PM](https://user-images.githubusercontent.com/3953832/64478408-f5feb500-d175-11e9-9d07-8b41f3c47924.png)
|
5
2
|
|
6
|
-
|
7
|
-
|
3
|
+
Jinda is a gem to create Rails Workflow & Application Generator using Freemind
|
4
|
+
|
5
|
+
Jinda is a tools for Ruby on Rails developer. (Required: basic Ruby on Rails )
|
6
|
+
|
7
|
+
## Jinda use the following technologies:
|
8
|
+
|
9
|
+
- JQuery Mobile and Bootstrap as Javascript front-end development framework
|
10
|
+
- Rails Engine as Jinda core for router, helper
|
11
|
+
- Workflow using Freemind design as XML to control Rails flow.
|
12
|
+
- User authentication for login and role for each activity
|
13
|
+
- Support Social authentication: Facebook, Google
|
14
|
+
- Polymorphic Association in mongodb
|
15
|
+
- Dynamic role for user and group
|
16
|
+
- Rails concern & mixins for rails modules and class
|
17
|
+
- Sample app: Articles, API Note, Document
|
18
|
+
- Support themes: Jinda_adminlte, Jinda_adminBSB
|
19
|
+
- Support HTML, HAML, SCSS
|
20
|
+
<br />
|
21
|
+
|
22
|
+
- [jinda](https://github.com/kul1/jinda) -![Screen Shot 2019-09-07 at 1 00 03 PM](https://user-images.githubusercontent.com/3953832/64478408-f5feb500-d175-11e9-9d07-8b41f3c47924.png)
|
23
|
+
|
24
|
+
## Additional Extension themes also available at
|
25
|
+
|
26
|
+
- [jinda_adminlte](https://github.com/kul1/jinda_adminlte)
|
27
|
+
|
8
28
|
- ![j18-screen](https://user-images.githubusercontent.com/3953832/34298172-faa7e962-e6e1-11e7-93e2-19dfd4ab42af.png)
|
9
29
|
|
10
|
-
|
30
|
+
- [jinda_adminbsb](https://github.com/kul1/jinda_adminbsb)
|
11
31
|
- ![jinda-bsb](https://user-images.githubusercontent.com/3953832/34320779-bb0980d2-e7c6-11e7-855c-fafc23487ba5.png)
|
12
32
|
|
13
33
|
## Prerequisites
|
14
34
|
|
15
35
|
These versions works for sure but others may do.
|
16
36
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
37
|
+
- Ruby 3.0.0
|
38
|
+
- Rails 6.1.3
|
39
|
+
- MongoDB 6
|
40
|
+
- Freemind 1.0.1
|
21
41
|
|
22
42
|
## Convention
|
23
43
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
44
|
+
- database is MongoDB
|
45
|
+
- images stored in upload directory, unset IMAGE_LOCATION in `initializer/jinda.rb` to use Cloudinary
|
46
|
+
- mail use Gmail SMTP, config in `config/application.rb`
|
47
|
+
- authentication use omniauth-identity
|
28
48
|
|
29
49
|
## Sample Application
|
50
|
+
|
30
51
|
### Screen shot install Jinda
|
31
|
-
|
52
|
+
|
53
|
+
[![yt_logo_rgb_light](https://user-images.githubusercontent.com/3953832/110579381-4fa9bc00-812c-11eb-973e-da9d0f2a8109.png)](https://www.youtube.com/watch?v=XUXv7Yrskjk&feature=youtu.be)
|
54
|
+
<br />
|
55
|
+
[![ Jinda Install](https://i9.ytimg.com/vi/XUXv7Yrskjk/mq3.jpg?sqp=CPjUoIIG&rs=AOn4CLBfMkmMtOGz3OfUp2zyhMs3Dy9xrw)](https://www.youtube.com/watch?v=XUXv7Yrskjk&feature=youtu.be)
|
56
|
+
|
32
57
|
### Sample Jinda in Docker
|
33
58
|
|
34
|
-
|
59
|
+
- https://github.com/kul1/b-255523-jd
|
35
60
|
|
36
61
|
Supposed we want to create ecommerce web site, first create a Rails
|
37
62
|
app without ActiveRecord
|
@@ -74,7 +99,7 @@ now the application is ready, start it as any Rails application
|
|
74
99
|
|
75
100
|
$ rails server
|
76
101
|
|
77
|
-
go to http://localhost:3000, click
|
102
|
+
go to http://localhost:3000, click _Sign In_ on the left menu, and enter user name `admin` and password `secret`
|
78
103
|
|
79
104
|
![login](https://user-images.githubusercontent.com/3953832/41832924-d868f8f0-7813-11e8-93bb-19c0357cf604.png)
|
80
105
|
|
@@ -84,9 +109,9 @@ Now open file `app/jinda/index.mm` using Freemind
|
|
84
109
|
|
85
110
|
The 3 main branches are
|
86
111
|
|
87
|
-
|
88
|
-
|
89
|
-
|
112
|
+
- models - this defines all the models to use in the application
|
113
|
+
- services - this defines services which will be come the menu on the left of the screen. There will be 2 levels; the first sub branch is the main menu (modules) and the second sub branch is the sub menu (services)
|
114
|
+
- roles - this defines role for all users
|
90
115
|
|
91
116
|
### models
|
92
117
|
|
@@ -96,12 +121,12 @@ Fiirst, we need to create some product so we click on models we'll see 2 models
|
|
96
121
|
|
97
122
|
The first sub branch (e.g. person) is the model name. According to Rails convention, this should be a singular word. The next sub branch are columns in the database. Let's take a look at each:
|
98
123
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
124
|
+
- `fname` - this create a column (field) called fname which is a String by default
|
125
|
+
- `sex: integer` - this create a column called sex, it is integer so must be explicity defined. The next sub branch (1: male) is disregarded by Jinda so we can put whatever we want. Here I just put some reminder.
|
126
|
+
- `belongs_to :address` - here we have ![pen](https://cloud.githubusercontent.com/assets/3953832/25600038/3a4ffb66-2f0b-11e7-9f03-b875e550eefe.png)
|
127
|
+
icon. this means whatever text on this line will be added as is to the model Jinda generates. You use this to specify anything you want such as association, index, remarks in code, etc. according to mongoid gem. To draw the icon, rest mouse on the branch and hit <Alt-I>.
|
128
|
+
- `dob: date` - use any type that mongoid provides.
|
129
|
+
- `photo` - for file field, just use String here. Jinda will receive the binary file and store in file system or cloudinary then generate a url link to it.
|
105
130
|
|
106
131
|
In this example we just want a product model, so delete the person and address model and add a product branch like so
|
107
132
|
|
@@ -111,7 +136,7 @@ Save the mind map then run:
|
|
111
136
|
|
112
137
|
rake jinda:update
|
113
138
|
|
114
|
-
This will create file `app/models/product.rb`. In this file, note the comment lines
|
139
|
+
This will create file `app/models/product.rb`. In this file, note the comment lines `# jinda begin` and ` # jinda end`. Everything inside these comments will get overwritten when you change the models branch in the mind map so if you need to put anything inside here, use the mind map instead. You can add anything outside these comment lines which will be preserved when doing jinda:update.
|
115
140
|
|
116
141
|
### services
|
117
142
|
|
@@ -121,34 +146,31 @@ Next we'll add some product into the database, we'll first take a look at the se
|
|
121
146
|
|
122
147
|
The text `users:User` on the sub branch has these implications:
|
123
148
|
|
124
|
-
|
125
|
-
|
149
|
+
- `users` correspond to `app/controllers/users_controller.rb` which already exist when you do rails generate jinda:install. New branch will create new controller if not exist. In Jinda term, this will be called module.
|
150
|
+
- `User` will create entry in main menu on the left of the screen. You don't see it in the screenshot above because it's controlled by the sub branch `role:m` which means this menu only available for login member. If you already signed in as admin, you should see it now.
|
126
151
|
|
127
152
|
The next sub branches has the following:
|
128
153
|
|
129
|
-
|
130
|
-
|
131
|
-
|
154
|
+
- `role: m` - means that this module (menu) is available only to user who has role m (if you open the role branch now will see that role m is member). All registered user has role m by default. User who is not log on would not be able to access this module.
|
155
|
+
- `link:info: /users` - means that this is a link, the format is link: _submenu label_ : _url_ where submenu label is the text to show in the submenu and url is the link to go to, in this case, it woud go to http://localhost:3000/users which will perform index action of UsersController.
|
156
|
+
- `user:edit` the branch that do not start with role:, rule:, nor link: will be a Jinda service. You will then specify the sequence of the execution as in this example there are 3 sub branches - enter_user, update_user, and rule:login? Let's take a look at them:
|
132
157
|
|
133
|
-
|
134
|
-
|
135
|
-
|
158
|
+
- `enter_user:edit` - the first step is to display a form to input user information, this is accompanied by icon ![image](https://cloud.githubusercontent.com/assets/3953832/25599946/47c32cf6-2f0a-11e7-80a8-2c02c6294c9a.png)
|
159
|
+
which means user interface screen. and will correspond to a view file `app/views/users/user/enter_user.html.erb` where `/users` comes from the module name (the sub branch of services), `/user` comes from the service name (the sub branch of users), and `enter_user.html.erb` comes from the first part of this branch. The `edit` after the colon is just a description of this step. This branch also has sub branch `rule:login? && own_xmain?` which specify rule for this step that the user must be login and can continue this task if he is the one who started it. _task_ in here means each instance of service.
|
160
|
+
- `update_user` - this icon ![image](https://cloud.githubusercontent.com/assets/3953832/25599976/87b69ad2-2f0a-11e7-9aba-1bd4e9546d3e.png) means to execute method update_user within `users_controller.rb`
|
136
161
|
|
137
162
|
Armed with this knowledge, we are ready to add new product into our application like so:
|
138
163
|
|
139
164
|
![add_enter](https://cloud.githubusercontent.com/assets/3953832/25600158/582d1fbe-2f0c-11e7-9bde-01a195a45b6c.png)
|
140
165
|
|
141
|
-
|
142
166
|
To generate controller and views we save this mind map and run
|
143
167
|
|
144
168
|
rake jinda:update
|
145
169
|
|
146
170
|
open file `app/views/products/add/enter.html.erb` you'll see some sample view already in there but commented. edit the file so it look like this
|
147
171
|
|
148
|
-
|
149
172
|
![product_enter](https://cloud.githubusercontent.com/assets/3953832/25600363/e5cc8282-2f0d-11e7-81f7-273c9bdc1a63.png)
|
150
173
|
|
151
|
-
|
152
174
|
Note that we do not specify form_tag and submit_tag, these will be supplied by Jinda.
|
153
175
|
|
154
176
|
then open file `app/controllers/products_controller.rb` and add `create` method as follow. The method name has to be correspond to the ![bookmark](http://songrit.googlecode.com/files/bookmark.png) branch.
|
@@ -165,7 +187,6 @@ run following command:
|
|
165
187
|
|
166
188
|
![rspec](https://user-images.githubusercontent.com/3953832/34680352-7931d426-f45e-11e7-9f40-8b85b94c61bf.png)
|
167
189
|
|
168
|
-
|
169
190
|
## Contributing
|
170
191
|
|
171
192
|
1. Fork it
|
data/lib/jinda/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jinda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.5.
|
4
|
+
version: 0.7.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Prateep Kul
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-03-
|
12
|
+
date: 2021-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -59,6 +59,20 @@ dependencies:
|
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 7.1.0
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rexml
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.2'
|
69
|
+
type: :runtime
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.2'
|
62
76
|
description: 'Generate Rails workflow from mind map: Freemind'
|
63
77
|
email:
|
64
78
|
- 1.0@kul.asia
|