jinda 0.7.7 → 0.7.7.1

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -5
  3. data/config/mongoid.yml +19 -0
  4. data/lib/generators/jinda/install_generator.rb +0 -3
  5. data/lib/generators/jinda/templates/Dockerfile +7 -7
  6. data/lib/generators/jinda/templates/app/jinda/index.mm +119 -2
  7. data/{app → lib/generators/jinda/templates/app}/views/jinda/_activity.md +0 -0
  8. data/{app → lib/generators/jinda/templates/app}/views/jinda/_menu.haml +0 -0
  9. data/{app → lib/generators/jinda/templates/app}/views/jinda/_menu_mm.haml +0 -0
  10. data/{app → lib/generators/jinda/templates/app}/views/jinda/_model.md +0 -0
  11. data/{app → lib/generators/jinda/templates/app}/views/jinda/_modul.md +0 -0
  12. data/{app → lib/generators/jinda/templates/app}/views/jinda/_pending_home.haml +0 -0
  13. data/{app → lib/generators/jinda/templates/app}/views/jinda/_pending_page.haml +0 -0
  14. data/{app → lib/generators/jinda/templates/app}/views/jinda/_service.md +0 -0
  15. data/{app → lib/generators/jinda/templates/app}/views/jinda/_static.haml +0 -0
  16. data/{app → lib/generators/jinda/templates/app}/views/jinda/doc-thai.md +0 -0
  17. data/{app → lib/generators/jinda/templates/app}/views/jinda/doc.md +0 -0
  18. data/{app → lib/generators/jinda/templates/app}/views/jinda/error_logs.haml +0 -0
  19. data/{app → lib/generators/jinda/templates/app}/views/jinda/feed.rss.builder +0 -0
  20. data/{app → lib/generators/jinda/templates/app}/views/jinda/help.haml +0 -0
  21. data/{app → lib/generators/jinda/templates/app}/views/jinda/index.html.haml +0 -0
  22. data/{app → lib/generators/jinda/templates/app}/views/jinda/logs.haml +0 -0
  23. data/{app → lib/generators/jinda/templates/app}/views/jinda/notice_logs.haml +0 -0
  24. data/{app → lib/generators/jinda/templates/app}/views/jinda/pending.haml +0 -0
  25. data/{app → lib/generators/jinda/templates/app}/views/jinda/run_form.haml +0 -0
  26. data/{app → lib/generators/jinda/templates/app}/views/jinda/run_output.haml +0 -0
  27. data/{app → lib/generators/jinda/templates/app}/views/jinda/search.haml +0 -0
  28. data/{app → lib/generators/jinda/templates/app}/views/jinda/status.haml +0 -0
  29. data/lib/generators/jinda/templates/config/initializers/fix_mongoid_generator.rb-org +14 -0
  30. data/lib/generators/jinda/templates/config/mongoid.yml +182 -0
  31. data/lib/jinda/gem_helpers.rb +0 -38
  32. data/lib/jinda/gen_helpers.rb +1 -1
  33. data/lib/jinda/gen_modules.rb +16 -0
  34. data/lib/jinda/gen_services.rb +1 -1
  35. data/lib/jinda/rake_views.rb +13 -9
  36. data/lib/jinda/version.rb +1 -1
  37. metadata +35 -61
  38. data/app/jinda/index.mm +0 -369
  39. data/app/jinda/template/index.mm +0 -366
  40. data/app/jinda/template/linkview.haml +0 -21
  41. data/app/jinda/template/view.html.erb +0 -26
  42. data/lib/generators/jinda/installer/gemfiles-org/custom_gems.rb +0 -8
  43. data/lib/generators/jinda/installer/gemfiles-org/dev_gems.rb +0 -20
  44. data/lib/generators/jinda/installer/gemfiles-org/runtime_gems.rb +0 -30
  45. data/lib/generators/jinda/installer/gemfiles-org/todo.md +0 -3
  46. data/lib/generators/jinda/installer/test.rb +0 -6
  47. data/lib/generators/jinda/templates/app/controllers/comments_controller.rb +0 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff04781073eaa28139e89ddc945cf4d88ea6c64dd75a24c8212557fa2023eed1
4
- data.tar.gz: 075eaec64aef3d4863874c51cb03d9139b30060c1c0ffcffdefc16d80db27e91
3
+ metadata.gz: 797a31e47b9ab273e1fd12df4555133a0dc8c9a0970ad3aa889fbf8f144a67c9
4
+ data.tar.gz: 88a0167d68a5af1cf276dd403570980c26af5e14ccdc43bdf1871700da43b131
5
5
  SHA512:
6
- metadata.gz: 350f12c8aef137adefdd72a61029baf18cfff2629bd6f6c14492399020b69f82de11f20c437f59a9df7f0bef4af705b3c3bb5796767c30bd9c9c895862b71fc4
7
- data.tar.gz: ab5849d2b486cd598ee5ef271a562fd3ca1b67b91d2def77cf9e42a310084faef92d06b17e43672087516758736c798b3bc3fe5619fdcda072bc846c38e6f86e
6
+ metadata.gz: d14b440948b33feb71289bf6336e158909cf85b8bae07e4e472d7cb2593357b2dcb333487f75535008658c5254d8e8ba57c5a37772bbe607ca73ae249953c159
7
+ data.tar.gz: 4cf7c763ec5cf7a663908c1cf9de047f2d17f2d3c8959e08a0647ca2d5e1f5937f4bc0af0c38418da90669e08e82c2b6ce09b809059014038c97b044634d2b21
data/README.md CHANGED
@@ -19,7 +19,10 @@ Jinda is a tools for Ruby on Rails developer. (Required: basic Ruby on Rails )
19
19
  - Support HTML, HAML, SCSS
20
20
  <br />
21
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)
22
+ # [Jinda](https://github.com/kul1/jinda)
23
+
24
+
25
+ ![Screen Shot 2019-09-07 at 1 00 03 PM](https://user-images.githubusercontent.com/3953832/64478408-f5feb500-d175-11e9-9d07-8b41f3c47924.png)
23
26
 
24
27
  ## Additional Extension themes also available at
25
28
 
@@ -39,6 +42,18 @@ These versions works for sure but others may do.
39
42
  - MongoDB 6
40
43
  - Freemind 1.0.1
41
44
 
45
+ ## Note for Mac M1
46
+
47
+ - Once finish configure: Ruby and Rails version
48
+ - Need Pre-install Nokogiri as follow:
49
+
50
+ ```
51
+
52
+ arch -x86_64 gem install nokogiri -v '1.10.10' --platform=ruby -- --use-system-libraries
53
+
54
+
55
+ ```
56
+
42
57
  ## Convention
43
58
 
44
59
  - database is MongoDB
@@ -56,7 +71,7 @@ These versions works for sure but others may do.
56
71
 
57
72
  ### Sample Jinda in Docker
58
73
 
59
- - https://github.com/kul1/b-255523-jd
74
+ - https://github.com/kul1/jinda-docker
60
75
 
61
76
  Supposed we want to create ecommerce web site, first create a Rails
62
77
  app without ActiveRecord
@@ -169,13 +184,11 @@ To generate controller and views we save this mind map and run
169
184
 
170
185
  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
171
186
 
172
- ![product_enter](https://cloud.githubusercontent.com/assets/3953832/25600363/e5cc8282-2f0d-11e7-81f7-273c9bdc1a63.png)
173
187
 
174
188
  Note that we do not specify form_tag and submit_tag, these will be supplied by Jinda.
175
189
 
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.
190
+ then open file `app/controllers/products_controller.rb` and add `create` method as follow. The method name has to be correspond to the bookmark branch.
177
191
 
178
- ![products_controller](http://songrit.googlecode.com/files/products_controller.png)
179
192
 
180
193
  ## Testing
181
194
 
@@ -0,0 +1,19 @@
1
+ production:
2
+ clients:
3
+ default:
4
+ uri: <%= ENV['MONGOHQ_URL'] %>
5
+ options:
6
+ skip_version_check: true
7
+ safe: true
8
+ development:
9
+ clients:
10
+ default:
11
+ database: jinda
12
+ hosts:
13
+ - localhost:27017
14
+ test:
15
+ clients:
16
+ default:
17
+ database: jinda
18
+ hosts:
19
+ - localhost:27017
@@ -202,9 +202,6 @@ module Jinda
202
202
  # :enable_starttls_auto => true }
203
203
  # config.action_mailer.raise_delivery_errors = true
204
204
  # config.action_mailer.perform_deliveries = true
205
-
206
- # Rails 6.1 required
207
- config.autoloader = :classic
208
205
  }
209
206
  end
210
207
  initializer "jinda.rb" do
@@ -1,25 +1,25 @@
1
1
  # https://docs.docker.com/compose/rails/
2
- FROM ruby:2.6.3
2
+ FROM ruby:2.6.8
3
3
  RUN apt-get update -qq
4
4
  RUN mkdir /myapp
5
5
  WORKDIR /myapp
6
6
  COPY Gemfile /myapp/Gemfile
7
- # COPY Gemfile.lock /myapp/Gemfile.lock
8
-
7
+ COPY Gemfile.lock /myapp/Gemfile.lock
8
+ # Fix from here
9
+ RUN gem install bundler:2.2.27
10
+ # Fix end here
9
11
  RUN bundle install
10
12
  COPY . /myapp
11
13
 
12
14
  # Set Rails environment to production
13
15
  # ENV RAILS_ENV production
14
- ENV RAILS_ENV development
15
- RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
16
- && apt install -y nodejs
16
+ # RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
17
+ # && apt install -y nodejs
17
18
 
18
19
  # Add a script to be executed every time the container starts.
19
20
  COPY entrypoint.sh /usr/bin/
20
21
  RUN chmod +x /usr/bin/entrypoint.sh
21
22
  ENTRYPOINT ["entrypoint.sh"]
22
- # EXPOSE 3000
23
23
  EXPOSE 3000
24
24
 
25
25
  # Start the main process.
@@ -2,6 +2,75 @@
2
2
  <!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
3
3
  <node CREATED="1273819432637" ID="ID_1098419600" MODIFIED="1334737006485" TEXT="Jinda">
4
4
  <node CREATED="1273819462973" ID="ID_282419531" MODIFIED="1589756758387" POSITION="right" TEXT="services">
5
+ <node CREATED="1601820660551" ID="ID_139677023" MODIFIED="1603227975197" TEXT="jobs: Job">
6
+ <icon BUILTIN="edit"/>
7
+ <node CREATED="1601820684325" ID="ID_1286878862" MODIFIED="1601820727491" TEXT="link: All Jobs: /jobs"/>
8
+ <node CREATED="1601820729659" ID="ID_276716699" MODIFIED="1601820779914" TEXT="link: My jobs: /jobs/my"/>
9
+ <node CREATED="1601822748019" ID="ID_710706962" MODIFIED="1601824169249" TEXT="link: My forms: /jobs/forms"/>
10
+ <node CREATED="1601820781395" ID="ID_1580322062" MODIFIED="1601820816872" TEXT="new_job: Create Job">
11
+ <node CREATED="1601820816874" ID="ID_1803423595" MODIFIED="1601820891672" TEXT="form_job: New Job">
12
+ <icon BUILTIN="attach"/>
13
+ <node CREATED="1601820843199" ID="ID_1253655360" MODIFIED="1601820852670" TEXT="role:m"/>
14
+ </node>
15
+ <node CREATED="1493419491125" ID="ID_1019426774" MODIFIED="1601820999248" TEXT="create: Create Job">
16
+ <icon BUILTIN="bookmark"/>
17
+ </node>
18
+ <node CREATED="1591278861459" ID="ID_877986566" MODIFIED="1601821018793" TEXT="/jobs/my">
19
+ <arrowlink DESTINATION="ID_877986566" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_1133007537" STARTARROW="None" STARTINCLINATION="0;0;"/>
20
+ <linktarget COLOR="#b0b0b0" DESTINATION="ID_877986566" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_1133007537" SOURCE="ID_877986566" STARTARROW="None" STARTINCLINATION="0;0;"/>
21
+ <icon BUILTIN="forward"/>
22
+ </node>
23
+ </node>
24
+ <node CREATED="1493419562726" ID="ID_376861955" MODIFIED="1601821049556" TEXT="edit_job: Edit Job">
25
+ <node CREATED="1493419577933" ID="ID_198883253" MODIFIED="1601821081293" TEXT="select_job: Select Job">
26
+ <icon BUILTIN="attach"/>
27
+ <node CREATED="1493479602815" ID="ID_1464280671" MODIFIED="1493479606921" TEXT="role:m"/>
28
+ </node>
29
+ <node CREATED="1493419612720" ID="ID_1612399184" MODIFIED="1601821097663" TEXT="edit_job: Edit Job">
30
+ <icon BUILTIN="attach"/>
31
+ <node CREATED="1493479557266" ID="ID_723936584" MODIFIED="1493479561055" TEXT="role:m"/>
32
+ </node>
33
+ <node CREATED="1493419735921" ID="ID_1964849468" MODIFIED="1601821122532" TEXT="j_update: Update Job">
34
+ <icon BUILTIN="bookmark"/>
35
+ </node>
36
+ <node CREATED="1591278861459" ID="ID_97595650" MODIFIED="1601821133353" TEXT="/jobs/my">
37
+ <arrowlink DESTINATION="ID_97595650" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_517754602" STARTARROW="None" STARTINCLINATION="0;0;"/>
38
+ <linktarget COLOR="#b0b0b0" DESTINATION="ID_97595650" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_517754602" SOURCE="ID_97595650" STARTARROW="None" STARTINCLINATION="0;0;"/>
39
+ <icon BUILTIN="forward"/>
40
+ </node>
41
+ </node>
42
+ <node CREATED="1601821472569" ID="ID_742665624" MODIFIED="1601824259096" TEXT="create_form: Create Job Form">
43
+ <node CREATED="1601822078458" ID="ID_886094975" MODIFIED="1601822982118" TEXT="select_week: Select Week">
44
+ <icon BUILTIN="attach"/>
45
+ <node CREATED="1601822120607" ID="ID_1713564257" MODIFIED="1601822124704" TEXT="role: m"/>
46
+ </node>
47
+ <node CREATED="1601822128584" ID="ID_640095382" MODIFIED="1601824279809" TEXT="select_jobs: Select Jobs">
48
+ <icon BUILTIN="attach"/>
49
+ </node>
50
+ <node CREATED="1601822198702" ID="ID_428693571" MODIFIED="1601824290111" TEXT="create: Create form">
51
+ <icon BUILTIN="bookmark"/>
52
+ </node>
53
+ </node>
54
+ <node CREATED="1601825689253" ID="ID_384470912" MODIFIED="1601825751799" TEXT="import_job: Import Email Job">
55
+ <node CREATED="1601825759059" ID="ID_1682072231" MODIFIED="1601825814486" TEXT="select_email: Select Email">
56
+ <icon BUILTIN="attach"/>
57
+ <node CREATED="1601825782297" ID="ID_896263383" MODIFIED="1601825787888" TEXT="role:m"/>
58
+ </node>
59
+ <node CREATED="1601825791782" ID="ID_1652681094" MODIFIED="1601825818439" TEXT="create: Create Job">
60
+ <icon BUILTIN="bookmark"/>
61
+ </node>
62
+ </node>
63
+ <node CREATED="1495246388313" ID="ID_1736872254" MODIFIED="1601825881187" TEXT="xedit_job: xEdit Job">
64
+ <icon BUILTIN="button_cancel"/>
65
+ <node CREATED="1495246432533" ID="ID_660502522" MODIFIED="1601821206153" TEXT="edit_job: Edit Job">
66
+ <icon BUILTIN="attach"/>
67
+ <node CREATED="1495246517185" ID="ID_1839607839" MODIFIED="1495246522964" TEXT="role:m"/>
68
+ </node>
69
+ <node CREATED="1495246466176" ID="ID_1595275607" MODIFIED="1601821175818" TEXT="j_update: Update Job">
70
+ <icon BUILTIN="bookmark"/>
71
+ </node>
72
+ </node>
73
+ </node>
5
74
  <node CREATED="1275756501221" FOLDED="true" ID="ID_1720745721" MODIFIED="1583097151076" TEXT="users:User">
6
75
  <node CREATED="1278491598711" ID="ID_1662699954" MODIFIED="1494393920347" TEXT="role:m"/>
7
76
  <node CREATED="1279700865182" ID="ID_1266797279" MODIFIED="1357798847781" TEXT="link:info: /users"/>
@@ -151,7 +220,9 @@
151
220
  </node>
152
221
  </node>
153
222
  </node>
154
- <node CREATED="1493393619430" FOLDED="true" ID="ID_328863650" MODIFIED="1602251538059" TEXT="articles: Article">
223
+ <node CREATED="1493393619430" ID="ID_328863650" MODIFIED="1603227923763" TEXT="articles: Article">
224
+ <linktarget COLOR="#b0b0b0" DESTINATION="ID_328863650" ENDARROW="Default" ENDINCLINATION="206;0;" ID="Arrow_ID_1639605095" SOURCE="ID_704959130" STARTARROW="None" STARTINCLINATION="206;0;"/>
225
+ <linktarget COLOR="#b0b0b0" DESTINATION="ID_328863650" ENDARROW="Default" ENDINCLINATION="206;0;" ID="Arrow_ID_1178441047" SOURCE="ID_704959130" STARTARROW="None" STARTINCLINATION="206;0;"/>
155
226
  <node CREATED="1493419096527" ID="ID_1521905276" MODIFIED="1493478060121" TEXT="link: All Articles: /articles"/>
156
227
  <node CREATED="1493489768542" FOLDED="true" ID="ID_1376361427" MODIFIED="1589757167952" TEXT="link: My article: /articles/my">
157
228
  <node CREATED="1493490295677" ID="ID_628476988" MODIFIED="1493490302239" TEXT="role:m"/>
@@ -199,8 +270,13 @@
199
270
  </node>
200
271
  </node>
201
272
  </node>
202
- <node CREATED="1493664700564" FOLDED="true" ID="ID_704959130" MODIFIED="1602251564023" TEXT="comments: Comment">
273
+ <node CREATED="1493664700564" ID="ID_704959130" MODIFIED="1603247113420" TEXT="comments: Comment">
274
+ <arrowlink DESTINATION="ID_704959130" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_1795784656" STARTARROW="None" STARTINCLINATION="0;0;"/>
275
+ <arrowlink DESTINATION="ID_328863650" ENDARROW="Default" ENDINCLINATION="206;0;" ID="Arrow_ID_1639605095" STARTARROW="None" STARTINCLINATION="206;0;"/>
276
+ <arrowlink DESTINATION="ID_328863650" ENDARROW="Default" ENDINCLINATION="206;0;" ID="Arrow_ID_1178441047" STARTARROW="None" STARTINCLINATION="206;0;"/>
277
+ <linktarget COLOR="#b0b0b0" DESTINATION="ID_704959130" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_1795784656" SOURCE="ID_704959130" STARTARROW="None" STARTINCLINATION="0;0;"/>
203
278
  <icon BUILTIN="button_cancel"/>
279
+ <icon BUILTIN="back"/>
204
280
  <node CREATED="1493665155709" ID="ID_1973520751" MODIFIED="1591392666652" TEXT="new_comment: New Comment">
205
281
  <icon BUILTIN="button_cancel"/>
206
282
  <node CREATED="1493665192413" ID="ID_345629058" MODIFIED="1493665226422" TEXT="create">
@@ -214,6 +290,24 @@
214
290
  </node>
215
291
  </node>
216
292
  <node CREATED="1494393494180" ID="ID_1101205873" MODIFIED="1495275996686" TEXT="role:m"/>
293
+ <node CREATED="1493664700564" ID="ID_298151177" MODIFIED="1603226693472" TEXT="comments: Comment">
294
+ <arrowlink DESTINATION="ID_298151177" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_441433142" STARTARROW="None" STARTINCLINATION="0;0;"/>
295
+ <linktarget COLOR="#b0b0b0" DESTINATION="ID_298151177" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_441433142" SOURCE="ID_298151177" STARTARROW="None" STARTINCLINATION="0;0;"/>
296
+ <icon BUILTIN="button_cancel"/>
297
+ <node CREATED="1493665155709" ID="ID_1683596181" MODIFIED="1591392666652" TEXT="new_comment: New Comment">
298
+ <icon BUILTIN="button_cancel"/>
299
+ <node CREATED="1493665192413" ID="ID_933207888" MODIFIED="1493665226422" TEXT="create">
300
+ <icon BUILTIN="bookmark"/>
301
+ <node CREATED="1493665231940" ID="ID_1008837954" MODIFIED="1493665237018" TEXT="role:m"/>
302
+ </node>
303
+ <node CREATED="1591278861459" ID="ID_1293153336" MODIFIED="1591319807025" TEXT="/articles/my">
304
+ <arrowlink DESTINATION="ID_1293153336" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_1294102929" STARTARROW="None" STARTINCLINATION="0;0;"/>
305
+ <linktarget COLOR="#b0b0b0" DESTINATION="ID_1293153336" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_1294102929" SOURCE="ID_1293153336" STARTARROW="None" STARTINCLINATION="0;0;"/>
306
+ <icon BUILTIN="forward"/>
307
+ </node>
308
+ </node>
309
+ <node CREATED="1494393494180" ID="ID_738264489" MODIFIED="1495275996686" TEXT="role:m"/>
310
+ </node>
217
311
  </node>
218
312
  <node CREATED="1489875563330" FOLDED="true" ID="ID_1495015891" MODIFIED="1507248509212" TEXT="ctrs: ctrs&amp; Menu">
219
313
  <node CREATED="1489875583646" ID="ID_1796125628" MODIFIED="1494393464288" TEXT="role:a"/>
@@ -282,6 +376,26 @@
282
376
  <node CREATED="1273819859775" ID="ID_568365839" MODIFIED="1330477315009" TEXT="d: developer"/>
283
377
  </node>
284
378
  <node CREATED="1273819456867" ID="ID_1677010054" MODIFIED="1602123498759" POSITION="left" TEXT="models">
379
+ <node CREATED="1601820108365" ID="ID_591513581" MODIFIED="1602252717484" TEXT="job">
380
+ <node CREATED="1601820193310" ID="ID_1678574551" MODIFIED="1601820216286" TEXT="position"/>
381
+ <node CREATED="1601820228844" ID="ID_1289078868" MODIFIED="1601820242751" TEXT="description"/>
382
+ <node CREATED="1601820246298" ID="ID_1153691509" MODIFIED="1601820275636" TEXT="company"/>
383
+ <node CREATED="1602110778557" ID="ID_437875745" MODIFIED="1602110813052" TEXT="company_address"/>
384
+ <node CREATED="1601820461486" ID="ID_798011242" MODIFIED="1601847964783" TEXT="status"/>
385
+ <node CREATED="1602253474660" ID="ID_522876229" MODIFIED="1602253482889" TEXT="end_client"/>
386
+ <node CREATED="1602252728314" ID="ID_186209711" MODIFIED="1602252737801" TEXT="job_location"/>
387
+ <node CREATED="1602295399976" ID="ID_1710081408" MODIFIED="1602295413856" TEXT="job_duration"/>
388
+ <node CREATED="1601855595238" ID="ID_1080679443" MODIFIED="1601855709023" TEXT="issue_on :DateTime"/>
389
+ <node CREATED="1601855680220" ID="ID_1753753417" MODIFIED="1601855709024" TEXT="process_at :DateTime"/>
390
+ <node CREATED="1602442453304" ID="ID_1131460144" MODIFIED="1602442461849" TEXT="dscan"/>
391
+ <node CREATED="1602442690768" ID="ID_577206742" MODIFIED="1602442697514" TEXT="keywords"/>
392
+ <node CREATED="1493705838166" ID="ID_894358811" MODIFIED="1602593200859" TEXT="has_many :comments, as: :commentable">
393
+ <icon BUILTIN="edit"/>
394
+ </node>
395
+ <node CREATED="1493487131376" ID="ID_1100384924" MODIFIED="1538328284823" TEXT="belongs_to :user, :class_name =&gt; &quot;User&quot;">
396
+ <icon BUILTIN="edit"/>
397
+ </node>
398
+ </node>
285
399
  <node CREATED="1292122118499" FOLDED="true" ID="ID_1957754752" MODIFIED="1493705885123" TEXT="person">
286
400
  <node CREATED="1292122135809" ID="ID_1617970069" MODIFIED="1332878659106" TEXT="fname"/>
287
401
  <node CREATED="1292122150362" ID="ID_1200135538" MODIFIED="1332878662388" TEXT="lname"/>
@@ -357,6 +471,9 @@
357
471
  <node CREATED="1493643129947" ID="ID_588013696" MODIFIED="1602110865206" TEXT="belongs_to :user, :class_name =&gt; &quot;User&quot; ">
358
472
  <icon BUILTIN="edit"/>
359
473
  </node>
474
+ <node CREATED="1601847760278" ID="ID_31602545" MODIFIED="1602110883654" TEXT="belongs_to :job, :class_name =&gt; &quot;Job&quot; ">
475
+ <icon BUILTIN="edit"/>
476
+ </node>
360
477
  <node CREATED="1601847760278" ID="ID_1288333428" MODIFIED="1602591549062" TEXT="belongs_to :commentable, polymorphic: true ">
361
478
  <icon BUILTIN="edit"/>
362
479
  </node>
@@ -0,0 +1,14 @@
1
+ require 'rails/generators'
2
+ require 'rails/generators/mongoid/config/config_generator'
3
+
4
+ if Gem::Version.new(Mongoid::VERSION) >= Gem::Version.new('7.3.0')
5
+ warn("You may need not this file: #{__FILE__}\nAfter https://github.com/mongodb/mongoid/pull/4953 is released.")
6
+ end
7
+ Mongoid::Generators::ConfigGenerator.class_eval do
8
+ def app_name
9
+ # Rails::Application.subclasses.first.parent.to_s.underscore
10
+ # No more Module#parent
11
+ # See https://github.com/rails/rails/commit/167b4153cac0069a21e0bb9689cb16f34f6abbaa
12
+ Rails::Application.subclasses.first.module_parent_name.underscore
13
+ end
14
+ end
@@ -0,0 +1,182 @@
1
+ development:
2
+ # Configure available database clients. (required)
3
+ clients:
4
+ # Defines the default client. (required)
5
+ default:
6
+ # Mongoid can connect to a URI accepted by the driver:
7
+ # uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development
8
+
9
+ # Otherwise define the parameters separately.
10
+ # This defines the name of the default database that Mongoid can connect to.
11
+ # (required).
12
+ database: shop263603_development
13
+ # Provides the hosts the default client can connect to. Must be an array
14
+ # of host:port pairs. (required)
15
+ hosts:
16
+ - localhost:27017
17
+ # - mongodb
18
+ options:
19
+ # Note that all options listed below are Ruby driver client options (the mongo gem).
20
+ # Please refer to the driver documentation of the version of the mongo gem you are using
21
+ # for the most up-to-date list of options.
22
+ #
23
+ # Change the default write concern. (default = { w: 1 })
24
+ # write:
25
+ # w: 1
26
+
27
+ # Change the default read preference. Valid options for mode are: :secondary,
28
+ # :secondary_preferred, :primary, :primary_preferred, :nearest
29
+ # (default: primary)
30
+ # read:
31
+ # mode: :secondary_preferred
32
+ # tag_sets:
33
+ # - use: web
34
+
35
+ # The name of the user for authentication.
36
+ # user: 'user'
37
+
38
+ # The password of the user for authentication.
39
+ # password: 'password'
40
+
41
+ # The user's database roles.
42
+ # roles:
43
+ # - 'dbOwner'
44
+
45
+ # Change the default authentication mechanism. Valid options are: :scram,
46
+ # :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication
47
+ # mechanisms require username and password, with the exception of :mongodb_x509.
48
+ # Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain.
49
+ # auth_mech: :scram
50
+
51
+ # The database or source to authenticate the user against.
52
+ # (default: the database specified above or admin)
53
+ # auth_source: admin
54
+
55
+ # Force a the driver cluster to behave in a certain manner instead of auto-
56
+ # discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct
57
+ # when connecting to hidden members of a replica set.
58
+ # connect: :direct
59
+
60
+ # Changes the default time in seconds the server monitors refresh their status
61
+ # via ismaster commands. (default: 10)
62
+ # heartbeat_frequency: 10
63
+
64
+ # The time in seconds for selecting servers for a near read preference. (default: 0.015)
65
+ # local_threshold: 0.015
66
+
67
+ # The timeout in seconds for selecting a server for an operation. (default: 30)
68
+ # server_selection_timeout: 30
69
+
70
+ # The maximum number of connections in the connection pool. (default: 5)
71
+ # max_pool_size: 5
72
+
73
+ # The minimum number of connections in the connection pool. (default: 1)
74
+ # min_pool_size: 1
75
+
76
+ # The time to wait, in seconds, in the connection pool for a connection
77
+ # to be checked in before timing out. (default: 5)
78
+ # wait_queue_timeout: 5
79
+
80
+ # The time to wait to establish a connection before timing out, in seconds.
81
+ # (default: 10)
82
+ # connect_timeout: 10
83
+
84
+ # The timeout to wait to execute operations on a socket before raising an error.
85
+ # (default: 5)
86
+ # socket_timeout: 5
87
+
88
+ # The name of the replica set to connect to. Servers provided as seeds that do
89
+ # not belong to this replica set will be ignored.
90
+ # replica_set: name
91
+
92
+ # Whether to connect to the servers via ssl. (default: false)
93
+ # ssl: true
94
+
95
+ # The certificate file used to identify the connection against MongoDB.
96
+ # ssl_cert: /path/to/my.cert
97
+
98
+ # The private keyfile used to identify the connection against MongoDB.
99
+ # Note that even if the key is stored in the same file as the certificate,
100
+ # both need to be explicitly specified.
101
+ # ssl_key: /path/to/my.key
102
+
103
+ # A passphrase for the private key.
104
+ # ssl_key_pass_phrase: password
105
+
106
+ # Whether to do peer certification validation. (default: true)
107
+ # ssl_verify: true
108
+
109
+ # The file containing concatenated certificate authority certificates
110
+ # used to validate certs passed from the other end of the connection.
111
+ # ssl_ca_cert: /path/to/ca.cert
112
+
113
+ # Whether to truncate long log lines. (default: true)
114
+ # truncate_logs: true
115
+
116
+ # Configure Mongoid specific options. (optional)
117
+ options:
118
+ # Includes the root model name in json serialization. (default: false)
119
+ # include_root_in_json: false
120
+
121
+ # Include the _type field in serialization. (default: false)
122
+ # include_type_for_serialization: false
123
+
124
+ # Preload all models in development, needed when models use
125
+ # inheritance. (default: false)
126
+ # preload_models: false
127
+
128
+ # Raise an error when performing a #find and the document is not found.
129
+ # (default: true)
130
+ # raise_not_found_error: true
131
+ raise_not_found_error: false
132
+
133
+ # Raise an error when defining a scope with the same name as an
134
+ # existing method. (default: false)
135
+ # scope_overwrite_exception: false
136
+
137
+ # Raise an error when defining a field with the same name as an
138
+ # existing method. (default: false)
139
+ # duplicate_fields_exception: false
140
+
141
+ # Use Active Support's time zone in conversions. (default: true)
142
+ # use_activesupport_time_zone: true
143
+
144
+ # Ensure all times are UTC in the app side. (default: false)
145
+ # use_utc: false
146
+
147
+ # Set the Mongoid and Ruby driver log levels when not in a Rails
148
+ # environment. The Mongoid logger will be set to the Rails logger
149
+ # otherwise.(default: :info)
150
+ # log_level: :info
151
+
152
+ # Control whether `belongs_to` association is required. By default
153
+ # `belongs_to` will trigger a validation error if the association
154
+ # is not present. (default: true)
155
+ # belongs_to_required_by_default: true
156
+ belongs_to_required_by_default: false
157
+
158
+ # Application name that is printed to the mongodb logs upon establishing a
159
+ # connection in server versions >= 3.4. Note that the name cannot exceed 128 bytes.
160
+ # app_name: MyApplicationName
161
+
162
+ production:
163
+ clients:
164
+ default:
165
+ uri: <%= ENV['MONGODB_URI'] %>
166
+ options:
167
+ raise_not_found_error: false
168
+ belongs_to_required_by_default: false
169
+
170
+
171
+ # Use background indexes by default if `background` option not specified. (default: false)
172
+ # background_indexing: false
173
+ test:
174
+ clients:
175
+ default:
176
+ database: shop263603_test
177
+ hosts:
178
+ - localhost:27017
179
+ options:
180
+ read:
181
+ mode: :primary
182
+ max_pool_size: 1
@@ -6,44 +6,6 @@ module Jinda
6
6
  # Find gem root
7
7
  spec = Gem::Specification.find_by_name("jinda")
8
8
  $gem_root = spec.gem_dir
9
-
10
- def controller_exists?(modul)
11
- File.exists? $gem_root + "/lib/generators/jinda/templates/app/controllers/#{modul}_controller.rb"
12
- end
13
-
14
- #
15
- # Mock generate controller for test
16
- # Otherwise test will call rails g controller
17
- #
18
- def process_controllers
19
- process_services
20
- modules= Jinda::Module.all
21
- modules.each do |m|
22
- next if controller_exists?(m.code)
23
- puts " Rails generate controller #{m.code}"
24
- end
25
- end
26
-
27
- def gen_view_file_exist?(dir)
28
- gdir = $gem_root + "/spec/temp/" + dir
29
- File.exists?(gdir)
30
- end
31
-
32
- def gen_view_mkdir(dir,t)
33
- gdir = $gem_root + "/spec/temp/" + dir
34
- Dir.mkdir(gdir)
35
- t << "create directory #{gdir}"
36
- end
37
-
38
- def gen_view_createfile(sv,f,t)
39
- gsv = $gem_root + "/lib/generators/jinda/templates/" + sv
40
- gf = $gem_root + "/spec/temp/" + f
41
- FileUtils.cp gsv,gf
42
- # FileUtils.cp "app/jinda/template/linkview.haml",f
43
- t << "create file #{gf}"
44
- end
45
-
46
-
47
9
  end
48
10
  end
49
11
 
@@ -9,7 +9,7 @@
9
9
  end
10
10
 
11
11
  def gen_view_mkdir(dir,t)
12
- Dir.mkdir(dir)
12
+ FileUtils.mkdir_p(dir) unless File.exists?(dir)
13
13
  t << "create directory #{dir}"
14
14
  end
15
15
 
@@ -0,0 +1,16 @@
1
+ # ##########################################################################
2
+ # Update module from Rails
3
+ # ##########################################################################
4
+ def gen_module_controller
5
+ # find s_controller name in Jinda::Module
6
+ # if found ..
7
+ # else
8
+ # create
9
+ # end
10
+ #
11
+ # MM was defined in Rails: config/initializer/jinda.rb
12
+ @prefix = "spec/temp/"
13
+ @tdir = "#{@prefix}app/controllers/*_controller.rb"
14
+ # dir_module_names = Dir.glob("#{@prefix}app/controllers/*_controller.rb").map { |path| (path.match(/(\w+)/); $1) }
15
+ dir_module_names = Dir.glob(@tdir).map {|path| (path.match(/(\w+)_controller.rb/); $1)}
16
+ end
@@ -32,7 +32,7 @@
32
32
  # ##########################################################################
33
33
  # First Node eg: Module Name
34
34
  # ##########################################################################
35
- # create or update to GmaModule
35
+ # create or update to Jinda::Module model
36
36
  ma_module= Jinda::Module.find_or_create_by :code=>module_code
37
37
  ma_module.update_attributes :uid=>ma_module.id.to_s, :icon=>menu_icon
38
38
  protected_modules << ma_module.uid