jinda 0.7.7.4 → 0.8.0

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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -25
  3. data/app/assets/config/manifest.js +4 -1
  4. data/lib/generators/jinda/config_generator.rb +1 -1
  5. data/lib/generators/jinda/install_generator.rb +3 -4
  6. data/lib/generators/jinda/templates/app/assets/config/manifest.js +4 -0
  7. data/lib/generators/jinda/templates/config/mongoid.yml +3 -3
  8. data/lib/generators/jinda/templates/config/mongoid.yml-docker +3 -3
  9. data/lib/generators/jinda/templates/config/mongoid.yml-localhost +3 -3
  10. data/lib/generators/jinda/templates/spec/features/userlogins_spec.rb +1 -1
  11. data/lib/jinda/version.rb +1 -1
  12. data/test/dummy/Dockerfile +2 -4
  13. data/test/dummy/Gemfile +6 -8
  14. data/test/dummy/Gemfile.lock +205 -189
  15. data/test/dummy/README.md.bak +24 -0
  16. data/test/dummy/app/assets/config/manifest.js +4 -0
  17. data/test/dummy/app/assets/javascripts/application.js +8 -8
  18. data/test/dummy/app/assets/stylesheets/application.css.bak +15 -0
  19. data/test/dummy/app/assets/stylesheets/{application.scss → application.css.scss} +4 -12
  20. data/test/dummy/app/assets/stylesheets/jinda_jqm.css.scss +32 -0
  21. data/test/dummy/app/mailers/application_mailer.rb +2 -2
  22. data/test/dummy/app/mailers/application_mailer.rb-org +4 -0
  23. data/test/dummy/app/views/identities/new.html.haml +0 -13
  24. data/test/dummy/app/views/layouts/application.haml +4 -51
  25. data/test/dummy/app/views/sessions/new.html.haml +0 -13
  26. data/test/dummy/config/credentials.yml.enc +1 -1
  27. data/test/dummy/config/environments/test.rb +1 -1
  28. data/test/dummy/config/initializers/content_security_policy.rb +5 -4
  29. data/test/dummy/config/initializers/filter_parameter_logging.rb +1 -3
  30. data/test/dummy/config/mongoid.yml +54 -40
  31. data/test/dummy/config/mongoid.yml-docker +3 -3
  32. data/test/dummy/config/mongoid.yml-localhost +3 -3
  33. data/test/dummy/docker-compose.yml +0 -4
  34. data/test/dummy/log/development.log +2 -2331
  35. data/test/dummy/spec/features/userlogins_spec.rb +1 -1
  36. data/test/dummy/tmp/development_secret.txt +1 -1
  37. data/test/integration/config_generator_test.rb +28 -0
  38. metadata +9 -19
  39. data/test/dummy/Guardfile +0 -96
  40. data/test/dummy/app/assets/stylesheets/jinda.scss +0 -253
  41. data/test/dummy/app/controllers/adminltes_controller.rb +0 -2
  42. data/test/dummy/app/views/adminltes/dashboard1.haml +0 -461
  43. data/test/dummy/app/views/adminltes/dashboard2.haml +0 -656
  44. data/test/dummy/app/views/identities/new-bak.html.haml +0 -32
  45. data/test/dummy/app/views/layouts/application.haml.bak +0 -4
  46. data/test/dummy/app/views/layouts/lte/_flash.haml +0 -9
  47. data/test/dummy/app/views/layouts/lte/_footer.haml +0 -7
  48. data/test/dummy/app/views/layouts/lte/_header.haml +0 -111
  49. data/test/dummy/app/views/layouts/lte/_menu.haml +0 -42
  50. data/test/dummy/app/views/layouts/lte/_menu_mm.haml +0 -36
  51. data/test/dummy/app/views/layouts/lte/_rightbar.haml +0 -123
  52. data/test/dummy/app/views/layouts/lte/_sidebar.haml +0 -154
  53. data/test/dummy/app/views/sessions/new-bak.html.haml +0 -22
  54. /data/lib/generators/jinda/templates/app/mailers/{application_mailer.rb → application_mailer.rb-org} +0 -0
@@ -13,7 +13,7 @@ RSpec.feature "Userlogins", type: :feature do
13
13
 
14
14
  scenario "Google User Sign In" do
15
15
  visit "/auth/google_oauth2"
16
- expect(page).to have_text("My Articles")
16
+ expect(page).to have_text("Sign Out")
17
17
  end
18
18
 
19
19
 
@@ -1 +1 @@
1
- 4c3fe5941e16cfbd3d524bf40427b40556764fb06d021eb9617e4386452377ee62ccb30bdc54af63bf6725a1b25953f6d888f52718c802050481310313575594
1
+ 1b1b29c0ebe13fdb2bb00364b7a1b4f21eab332749fbcc2b8de9ed78f7ab60b7a82f8753bece3727dbaf2f86e586aa36266059a263fab6b631cf439176c5efcb
@@ -0,0 +1,28 @@
1
+ require 'test_helper'
2
+ require 'generators/jinda/config/config_generator'
3
+ require 'pry'
4
+
5
+ class ConfigGeneratorTest < Rails::Generators::TestCase
6
+ tests Jinda::Generators::ConfigGenerator
7
+ destination File.expand_path('../../tmp', __FILE__)
8
+ setup :prepare_destination
9
+
10
+ test "backup_files method moves .env file to .env-bak if it exists" do
11
+ FileUtils.touch("#{destination_root}/.env")
12
+ assert File.exist?("#{destination_root}/.env")
13
+
14
+ run_generator
15
+ refute File.exist?("#{destination_root}/.env")
16
+ binding.pry
17
+ assert File.exist?("#{destination_root}/.env-bak")
18
+ end
19
+
20
+ test "gen_image_store method creates an 'upload' directory" do
21
+ run_generator
22
+ assert File.directory?("#{destination_root}/upload")
23
+ end
24
+
25
+ # Add more tests for other methods as needed...
26
+
27
+ end
28
+
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.7.4
4
+ version: 0.8.0
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: 2022-12-06 00:00:00.000000000 Z
12
+ date: 2024-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongoid
@@ -221,7 +221,7 @@ files:
221
221
  - lib/generators/jinda/templates/app/jinda/template/index.mm
222
222
  - lib/generators/jinda/templates/app/jinda/template/linkview.haml
223
223
  - lib/generators/jinda/templates/app/jinda/template/view.html.erb
224
- - lib/generators/jinda/templates/app/mailers/application_mailer.rb
224
+ - lib/generators/jinda/templates/app/mailers/application_mailer.rb-org
225
225
  - lib/generators/jinda/templates/app/mailers/jinda_mailer.rb
226
226
  - lib/generators/jinda/templates/app/mailers/note_mailer.rb
227
227
  - lib/generators/jinda/templates/app/mailers/user_mailer.rb
@@ -396,17 +396,17 @@ files:
396
396
  - test/dummy/Dockerfile
397
397
  - test/dummy/Gemfile
398
398
  - test/dummy/Gemfile.lock
399
- - test/dummy/Guardfile
400
399
  - test/dummy/README.md
400
+ - test/dummy/README.md.bak
401
401
  - test/dummy/Rakefile
402
402
  - test/dummy/app/assets/config/manifest.js
403
403
  - test/dummy/app/assets/config/manifest.js-rails
404
404
  - test/dummy/app/assets/javascripts/application.js
405
- - test/dummy/app/assets/stylesheets/application.scss
406
- - test/dummy/app/assets/stylesheets/jinda.scss
405
+ - test/dummy/app/assets/stylesheets/application.css.bak
406
+ - test/dummy/app/assets/stylesheets/application.css.scss
407
+ - test/dummy/app/assets/stylesheets/jinda_jqm.css.scss
407
408
  - test/dummy/app/channels/application_cable/channel.rb
408
409
  - test/dummy/app/channels/application_cable/connection.rb
409
- - test/dummy/app/controllers/adminltes_controller.rb
410
410
  - test/dummy/app/controllers/admins_controller.rb
411
411
  - test/dummy/app/controllers/api/v1/notes_controller.rb
412
412
  - test/dummy/app/controllers/application_controller.rb
@@ -438,6 +438,7 @@ files:
438
438
  - test/dummy/app/jinda/template/view.html.erb
439
439
  - test/dummy/app/jobs/application_job.rb
440
440
  - test/dummy/app/mailers/application_mailer.rb
441
+ - test/dummy/app/mailers/application_mailer.rb-org
441
442
  - test/dummy/app/mailers/jinda_mailer.rb
442
443
  - test/dummy/app/mailers/note_mailer.rb
443
444
  - test/dummy/app/mailers/user_mailer.rb
@@ -457,8 +458,6 @@ files:
457
458
  - test/dummy/app/models/person.rb
458
459
  - test/dummy/app/models/user.rb
459
460
  - test/dummy/app/views/adminbsbs/content.haml
460
- - test/dummy/app/views/adminltes/dashboard1.haml
461
- - test/dummy/app/views/adminltes/dashboard2.haml
462
461
  - test/dummy/app/views/admins/edit_role/edit_role.html.erb
463
462
  - test/dummy/app/views/admins/edit_role/select_user.html.erb
464
463
  - test/dummy/app/views/api/v1/note.haml
@@ -483,7 +482,6 @@ files:
483
482
  - test/dummy/app/views/docs/edit/select_note.html.erb
484
483
  - test/dummy/app/views/docs/index.haml
485
484
  - test/dummy/app/views/docs/my.haml
486
- - test/dummy/app/views/identities/new-bak.html.haml
487
485
  - test/dummy/app/views/identities/new.html.haml
488
486
  - test/dummy/app/views/jinda/_activity.md
489
487
  - test/dummy/app/views/jinda/_menu.haml
@@ -511,7 +509,6 @@ files:
511
509
  - test/dummy/app/views/layouts/_head.html.erb
512
510
  - test/dummy/app/views/layouts/_meta_tag.html.erb
513
511
  - test/dummy/app/views/layouts/application.haml
514
- - test/dummy/app/views/layouts/application.haml.bak
515
512
  - test/dummy/app/views/layouts/application.html.erb.bak
516
513
  - test/dummy/app/views/layouts/bsb/_footer.haml
517
514
  - test/dummy/app/views/layouts/bsb/_header.haml
@@ -524,13 +521,6 @@ files:
524
521
  - test/dummy/app/views/layouts/jqm/_full.haml
525
522
  - test/dummy/app/views/layouts/jqm/_page.haml
526
523
  - test/dummy/app/views/layouts/jqm/application.haml-jqm
527
- - test/dummy/app/views/layouts/lte/_flash.haml
528
- - test/dummy/app/views/layouts/lte/_footer.haml
529
- - test/dummy/app/views/layouts/lte/_header.haml
530
- - test/dummy/app/views/layouts/lte/_menu.haml
531
- - test/dummy/app/views/layouts/lte/_menu_mm.haml
532
- - test/dummy/app/views/layouts/lte/_rightbar.haml
533
- - test/dummy/app/views/layouts/lte/_sidebar.haml
534
524
  - test/dummy/app/views/layouts/mailer.html.erb
535
525
  - test/dummy/app/views/layouts/mailer.html.haml
536
526
  - test/dummy/app/views/layouts/mailer.text.erb
@@ -554,7 +544,6 @@ files:
554
544
  - test/dummy/app/views/notes/xedit/edit_note.html.erb
555
545
  - test/dummy/app/views/password_resets/edit.html.erb
556
546
  - test/dummy/app/views/password_resets/new.html.haml
557
- - test/dummy/app/views/sessions/new-bak.html.haml
558
547
  - test/dummy/app/views/sessions/new.html.haml
559
548
  - test/dummy/app/views/sitemap/index.xml.haml
560
549
  - test/dummy/app/views/user_mailer/password_reset.html.haml
@@ -621,6 +610,7 @@ files:
621
610
  - test/dummy/spec/support/request_spec_helper.rb
622
611
  - test/dummy/spec/views/articles/_article.html.erb_spec.rbx
623
612
  - test/dummy/tmp/development_secret.txt
613
+ - test/integration/config_generator_test.rb
624
614
  - test/integration/navigation_test.rb
625
615
  - test/jinda_test.rb
626
616
  - test/test_helper.rb
data/test/dummy/Guardfile DELETED
@@ -1,96 +0,0 @@
1
- # A sample Guardfile
2
- # More info at https://github.com/guard/guard#readme
3
-
4
- ## Uncomment and set this to only include directories you want to watch
5
- # directories %w(app lib config test spec features) \
6
- # .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
-
8
- ## Note: if you are using the `directories` clause above and you are not
9
- ## watching the project directory ('.'), then you will want to move
10
- ## the Guardfile to a watched dir and symlink it back, e.g.
11
- #
12
- # $ mkdir config
13
- # $ mv Guardfile config/
14
- # $ ln -s config/Guardfile .
15
- #
16
- # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
-
18
- guard :minitest do
19
- # with Minitest::Unit
20
- watch(%r{^test/(.*)\/?test_(.*)\.rb$})
21
- watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
22
- watch(%r{^test/test_helper\.rb$}) { 'test' }
23
-
24
- # with Minitest::Spec
25
- # watch(%r{^spec/(.*)_spec\.rb$})
26
- # watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
27
- # watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
28
-
29
- # Rails 4
30
- # watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
31
- # watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
32
- # watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
33
- # watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
34
- # watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
35
- # watch(%r{^test/.+_test\.rb$})
36
- # watch(%r{^test/test_helper\.rb$}) { 'test' }
37
-
38
- # Rails < 4
39
- # watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
40
- # watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
41
- # watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
42
- end
43
-
44
- # Note: The cmd option is now required due to the increasing number of ways
45
- # rspec may be run, below are examples of the most common uses.
46
- # * bundler: 'bundle exec rspec'
47
- # * bundler binstubs: 'bin/rspec'
48
- # * spring: 'bin/rspec' (This will use spring if running and you have
49
- # installed the spring binstubs per the docs)
50
- # * zeus: 'zeus rspec' (requires the server to be started separately)
51
- # * 'just' rspec: 'rspec'
52
-
53
- guard :rspec, cmd: "bundle exec rspec" do
54
- require "guard/rspec/dsl"
55
- dsl = Guard::RSpec::Dsl.new(self)
56
-
57
- # Feel free to open issues for suggestions and improvements
58
-
59
- # RSpec files
60
- rspec = dsl.rspec
61
- watch(rspec.spec_helper) { rspec.spec_dir }
62
- watch(rspec.spec_support) { rspec.spec_dir }
63
- watch(rspec.spec_files)
64
-
65
- # Ruby files
66
- ruby = dsl.ruby
67
- dsl.watch_spec_files_for(ruby.lib_files)
68
-
69
- # Rails files
70
- rails = dsl.rails(view_extensions: %w(erb haml slim))
71
- dsl.watch_spec_files_for(rails.app_files)
72
- dsl.watch_spec_files_for(rails.views)
73
-
74
- watch(rails.controllers) do |m|
75
- [
76
- rspec.spec.call("routing/#{m[1]}_routing"),
77
- rspec.spec.call("controllers/#{m[1]}_controller"),
78
- rspec.spec.call("acceptance/#{m[1]}")
79
- ]
80
- end
81
-
82
- # Rails config changes
83
- watch(rails.spec_helper) { rspec.spec_dir }
84
- watch(rails.routes) { "#{rspec.spec_dir}/routing" }
85
- watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
86
-
87
- # Capybara features specs
88
- watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
89
- watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
90
-
91
- # Turnip features and steps
92
- watch(%r{^spec/acceptance/(.+)\.feature$})
93
- watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
94
- Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
95
- end
96
- end
@@ -1,253 +0,0 @@
1
- // jinda.scss from theme jinda_adminlte template directory
2
- #tooltip {
3
- position: absolute;
4
- border: 1px solid #333;
5
- background: #f7f5d1;
6
- padding: 2px 5px;
7
- color: #333;
8
- display: none;
9
- }
10
- #notice {
11
- color: #f90609;
12
- background-color: #ebd1d1;
13
- font-weight: bolder;
14
- padding-left: 10px;
15
- }
16
- .step {
17
- /*display: table-row;*/
18
- margin-top: 20px;
19
- margin-bottom: 20px;
20
- }
21
- .steps_more {
22
- font-size: 40px;
23
- font-weight: bold;
24
- vertical-align: middle;
25
- color: white;
26
- width: 80px;
27
- height: 80px;
28
- background: url(images/button_blue.png) no-repeat;
29
- display: table-cell;
30
- text-align: center;
31
- }
32
- .step_now {
33
- font-size: 40px;
34
- font-weight: bold;
35
- vertical-align: middle;
36
- color: white;
37
- width: 80px;
38
- height: 80px;
39
- background: url(images/button_red.png) no-repeat;
40
- display: table-cell;
41
- text-align: center;
42
- }
43
- .steps_done {
44
- font-size: 40px;
45
- font-weight: bold;
46
- vertical-align: middle;
47
- color: white;
48
- width: 80px;
49
- height: 80px;
50
- background: url(images/button_black.png) no-repeat;
51
- display: table-cell;
52
- text-align: center;
53
- }
54
- .sign_in {
55
- width: 100%;
56
- max-width: 410px;
57
- padding: 15px;
58
- margin: auto;
59
- display: block;
60
- }
61
- .row-description {
62
- font-size: 12px;
63
- }
64
-
65
- .right-date {
66
- font-size: 10px;
67
- float: right;
68
- }
69
- .row-body {
70
- font-size: 12px;
71
- }
72
- #logreg-forms {
73
- width: 412px;
74
- margin: 10vh auto;
75
- background-color: #f3f3f3;
76
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
77
- transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
78
- }
79
-
80
- .module-table {
81
- display: grid;
82
- }
83
-
84
- .module-table textarea {
85
- height: 200px;
86
- }
87
-
88
- body {
89
- background: #dfe7e9;
90
- font-family: "Roboto", sans-serif;
91
- }
92
- .form-control {
93
- font-size: 12px;
94
- transition: all 0.4s;
95
- box-shadow: none;
96
- }
97
- .form-control:focus {
98
- border-color: #5cb85c;
99
- }
100
- .form-control,
101
- .btn {
102
- border-radius: 10px;
103
- outline: none !important;
104
- }
105
- .form-group input {
106
- border-width: 0px;
107
- }
108
- .signup-form {
109
- width: 480px;
110
- margin: 0 auto;
111
- padding: 30px 0;
112
- }
113
- .signup-form form {
114
- border-radius: 5px;
115
- margin-bottom: 20px;
116
- background: #fff;
117
- box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
118
- padding: 40px;
119
- }
120
- .signup-form a {
121
- color: #5cb85c;
122
- }
123
- .signup-form h2 {
124
- text-align: center;
125
- font-size: 34px;
126
- margin: 10px 0 15px;
127
- }
128
- .signup-form .hint-text {
129
- color: #999;
130
- text-align: center;
131
- margin-bottom: 20px;
132
- }
133
- .signup-form .form-group {
134
- margin-bottom: 20px;
135
- }
136
- .signup-form .btn {
137
- font-size: 18px;
138
- line-height: 26px;
139
- font-weight: bold;
140
- text-align: center;
141
- }
142
- .signup-btn {
143
- text-align: center;
144
- border-color: #5cb85c;
145
- transition: all 0.4s;
146
- }
147
- .signup-btn:hover {
148
- background: #5cb85c;
149
- opacity: 0.8;
150
- }
151
- .or-seperator {
152
- margin: 50px 0 15px;
153
- text-align: center;
154
- border-top: 1px solid #e0e0e0;
155
- }
156
- .or-seperator b {
157
- padding: 0 10px;
158
- width: 40px;
159
- height: 40px;
160
- font-size: 16px;
161
- text-align: center;
162
- line-height: 40px;
163
- background: #fff;
164
- display: inline-block;
165
- border: 1px solid #e0e0e0;
166
- border-radius: 50%;
167
- position: relative;
168
- top: -22px;
169
- z-index: 1;
170
- }
171
- .social-btn .btn {
172
- color: #fff;
173
- margin: 10px 0 0 15px;
174
- font-size: 15px;
175
- border-radius: 50px;
176
- font-weight: normal;
177
- border: none;
178
- transition: all 0.4s;
179
- }
180
- .social-btn .btn:first-child {
181
- margin-left: 0;
182
- }
183
- .social-btn .btn:hover {
184
- opacity: 0.8;
185
- }
186
- .social-btn .btn-primary {
187
- background: #507cc0;
188
- }
189
- .social-btn .btn-info {
190
- background: #64ccf1;
191
- }
192
- .social-btn .btn-danger {
193
- background: #df4930;
194
- }
195
- .social-btn .btn i {
196
- float: left;
197
- margin: 3px 10px;
198
- font-size: 20px;
199
- }
200
- .container {
201
- margin: 5px;
202
- }
203
-
204
- /* Fixed Jinda_adminLTE .main-header .logo */
205
- .main-header .logo {
206
- height: 51px;
207
- }
208
-
209
- /* Fixed Jinda_adminLTE treemenu, Sign_in*/
210
-
211
- @media (min-width: 768px) {
212
- .sidebar-mini.sidebar-collapse .main-sidebar {
213
- width: 40px !important;
214
- }
215
- .container {
216
- width: 580px;
217
- }
218
- }
219
-
220
- body {
221
- margin: 0;
222
- font-family: Arial, Helvetica, sans-serif;
223
- line-height: 1.5;
224
- }
225
- .sidebar-menu {
226
- text-align: left;
227
- }
228
-
229
- .inner ul {
230
- list-style: none;
231
- margin: 0;
232
- padding: 0;
233
- }
234
- .form-group.form-control input {
235
- background: transparent;
236
- padding: 5px;
237
- }
238
-
239
- .form-group.form-control input[type="text"]:focus {
240
- background-color: transparent;
241
- }
242
-
243
- .display-addcomment {
244
- float: left;
245
- width: 450px;
246
- }
247
-
248
- .img-circle {
249
- max-width: 45px;
250
- }
251
- .comment-user-image {
252
- max-width: 45px;
253
- }
@@ -1,2 +0,0 @@
1
- class AdminltesController < ApplicationController
2
- end