jinda 0.7.7.4 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -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, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
6
+ * 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
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
+ */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
2
+ * This is a manif.est file that'll be compiled into application.css, which will include all the files
3
3
  * listed below.
4
4
  *
5
5
  * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
@@ -8,16 +8,8 @@
8
8
  * You're free to add application-wide styles to this file and they'll appear at the top of the
9
9
  * compiled file, but it's generally better to create a new file per style scope.
10
10
  *
11
+ *= require_tree .
11
12
  *= require_self
12
- *= require jindalte.css
13
- *= require jinda
13
+ *= require normalize-rails
14
14
  */
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
15
+ @import "jinda_jqm.css.scss"
@@ -0,0 +1,32 @@
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 vendor/assets/stylesheets of plugins, if any, 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 top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require normalize-rails
12
+ */
13
+
14
+ @import "jquery.mobile-1.2.1";
15
+ @import "jquery.mobile.splitview";
16
+ @import "jquery.mobile.grids.collapsible";
17
+ @import "jquery.mobile.datebox.css";
18
+ @import "sarabun";
19
+ @import "jinda";
20
+ @import "kul-4.2";
21
+ @import "articles";
22
+ @import "app.scss";
23
+ @import "font-awesome-sprockets";
24
+ @import "font-awesome";
25
+ @import "social";
26
+
27
+
28
+
29
+
30
+
31
+
32
+
@@ -1,4 +1,4 @@
1
1
  class ApplicationMailer < ActionMailer::Base
2
- default from: 'from@example.com'
3
- layout 'mailer'
2
+ default from: "from@example.com"
3
+ layout "mailer"
4
4
  end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -3,19 +3,6 @@
3
3
  - @title= 'Sign Up'
4
4
  = form_tag "/auth/identity/register", {'data-ajax'=>'false'} do
5
5
  %h1.h3.mb-3.font-weight-normal{:style => "text-align: center"} Sign Up
6
- %p.hint-text Sign Up with your social media account or Username
7
- .social-btn.text-center
8
- %a.btn.btn-primary.btn-lg{:href => "/auth/facebook"}
9
- %i.fa.fa-facebook
10
- Facebook
11
- %a.btn.btn-info.btn-lg{:href => "#"}
12
- %i.fa.fa-twitter
13
- Twitter
14
- %a.btn.btn-danger.btn-lg{:href => "/auth/google_oauth2"}
15
- %i.fa.fa-google
16
- Google
17
- .or-seperator
18
- %b or
19
6
  .sign_in
20
7
  .label-warning
21
8
  = flash[:alert]
@@ -1,51 +1,4 @@
1
- %html
2
- %head
3
- %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
4
- = csrf_meta_tags
5
- /%link{:href => "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic", :rel => "stylesheet"}/
6
- %title Jinda AdminLTE 2 | Starter
7
- = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
8
- = javascript_include_tag "application", 'data-turbolinks-track': 'reload'
9
- /
10
- BODY TAG OPTIONS:
11
- \=================
12
- Apply one or more of the following classes to get the
13
- desired effect
14
- |---------------------------------------------------------|
15
- | SKINS | skin-blue |
16
- | | skin-black |
17
- | | skin-purple |
18
- | | skin-yellow |
19
- | | skin-red |
20
- | | skin-green |
21
- |---------------------------------------------------------|
22
- |LAYOUT OPTIONS | fixed |
23
- | | layout-boxed |
24
- | | layout-top-nav |
25
- | | sidebar-collapse |
26
- | | sidebar-mini |
27
- |---------------------------------------------------------|
28
-
29
- %body.hold-transition.skin-yellow.sidebar-mini
30
- .wrapper
31
- = render "layouts/lte/header"
32
- = render "layouts/lte/sidebar"
33
- .content-wrapper
34
- %h3.box-title
35
- = @page_title
36
- = render 'layouts/lte/flash'
37
- .label-warning
38
- #flashes
39
- - if flash[:notice]
40
- %p#flash_notice.messages.notice= flash[:notice]
41
- = javascript_tag "$('#flash_notice').effect('highlight',{},1000);"
42
- - if flash[:error] || flash[:errors]
43
- %p#flash_errors.messages.errors= flash[:error] || flash[:errors]
44
- = javascript_tag "$('#flash_errors').effect('highlight',{},1000);"
45
- - flash[:error] = flash[:errors] = flash[:notice] = nil
46
- = yield
47
- = render 'layouts/lte/footer'
48
- .control-sidebar-bg
49
- / REQUIRED JS SCRIPTS
50
- / jQuery 3
51
-
1
+ - if request.accept=="text/html, */*; q=0.01"
2
+ = render "layouts/jqm/page"
3
+ - else
4
+ = render "layouts/jqm/full"
@@ -2,19 +2,6 @@
2
2
  .signup-form
3
3
  = form_tag "/auth/identity/callback", {'data-ajax'=>'false'} do
4
4
  %h1.h3.mb-3.font-weight-normal{:style => "text-align: center"} Sign in
5
- %p.hint-text Sign in with your social media account or Username
6
- .social-btn.text-center
7
- %a.btn.btn-primary.btn-lg{:href => "/auth/facebook"}
8
- %i.fa.fa-facebook
9
- Facebook
10
- %a.btn.btn-info.btn-lg{:href => "#"}
11
- %i.fa.fa-twitter
12
- Twitter
13
- %a.btn.btn-danger.btn-lg{:href => "/auth/google_oauth2"}
14
- %i.fa.fa-google
15
- Google
16
- .or-seperator
17
- %b or
18
5
  .sign_in
19
6
  .label-warning
20
7
  = flash[:alert]
@@ -1 +1 @@
1
- rKJOMS7I0Z2/6HTmUtZoHpiofv1hKjyG7PP/xif21dRzKKgCueZV6ImjpU0HdupQYnIheFTCoNdcQmzvzfl0oZaUr03Ox6pf/KGVkEUAwuBPAt76UzNrElzKR1LOctwpmQ6gqCT4AR26lGhpIQDC/XpzT6b4A05C19Xq6vwS4pYBPz119XcKB7dVVGfzhY79NndT1ifklAmWqw2qvoqDp9BdTPpI+HdtjZrbYV8KL0l34lqV/Cf8x2LkvNQjcnCQ8e8tCjNDBFbfQbNrAxQEC832RrQEZ4stK+miW3n+5tEMAwBg7lxyrI8OosHHn5GKnL5geG1NPIosSfgdiFnv0TGGRlaS2d8Is0c0LpWTAMoUN20xl6w6R2HMkumfXLmJLhZEfeZVsLwE11jjSxRLKd8hciqV+W9IqNqV--4BEM1/9dfS1odAZT--IrPmtHRIpZytag1DsyZDSg==
1
+ sj7MoSJcbkFpkRtkuRwjO4CipqEZhTBFSMBolFw2S1Ipuf3/kMWLg/r0/lwc8LD/dQ6zT2Q8Zy9FYFLN/EOtJFW/+gvGxhWuX9pkHHYROM8Dg26dJldm7mWM7G2/mWhxAgOFSW8NQmgHI2pE3hobB5NLIKtQWb71EcpCmICzfJE+nDCXpEgwRi+ww9PWhYJrgjVWyc3+e51s8pIRD0yzn3riz9KhGA5cuCbP9BwnMrCXXfYcCs4bWQYrcKiMyvKE5ijpPSI1xpoYSOR7agkPEaBpqTSlM/iXXi7+MxICzu6U7SQsnZ8Xcp5zgLuSz8OcX5ldQzIkM8/aXjpbHK8+qRXP1uhUBEW/Sa+weuEahcK3GOEevZC5DsTAvj2XCY9TNvtt3iS3FPjplxlMLewzgLbFWEetSxg9lUCJ--RmfhqxtEZB/MKp8x--QI7+v0CtHUKBE2pA8bYUGw==
@@ -8,7 +8,7 @@ require "active_support/core_ext/integer/time"
8
8
  Rails.application.configure do
9
9
  # Settings specified here will take precedence over those in config/application.rb.
10
10
 
11
- # Turn false under Spring and add config.action_view.cache_template_loading = true.
11
+ # Turn false under Spring and add config.action_view.cache_template_loading = true
12
12
  config.cache_classes = true
13
13
 
14
14
  # Eager loading loads your whole application. When running a single test locally,
@@ -1,8 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Define an application-wide content security policy.
4
- # See the Securing Rails Applications Guide for more information:
5
- # https://guides.rubyonrails.org/security.html#content-security-policy-header
3
+ # Define an application-wide content security policy
4
+ # For further information see the following documentation
5
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6
6
 
7
7
  # Rails.application.configure do
8
8
  # config.content_security_policy do |policy|
@@ -20,6 +20,7 @@
20
20
  # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21
21
  # config.content_security_policy_nonce_directives = %w(script-src)
22
22
  #
23
- # # Report violations without enforcing the policy.
23
+ # # Report CSP violations to a specified URI. See:
24
+ # # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
24
25
  # # config.content_security_policy_report_only = true
25
26
  # end
@@ -1,8 +1,6 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Configure parameters to be filtered from the log file. Use this to limit dissemination of
4
- # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
5
- # notations and behaviors.
3
+ # Configure sensitive parameters which will be filtered from the log file.
6
4
  Rails.application.config.filter_parameters += [
7
5
  :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
8
6
  ]
@@ -4,17 +4,16 @@ development:
4
4
  # Defines the default client. (required)
5
5
  default:
6
6
  # Mongoid can connect to a URI accepted by the driver:
7
- # uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development
7
+ # uri: mongodb://user:password@mongodb.domain.com:27017/dummy_development
8
8
 
9
9
  # Otherwise define the parameters separately.
10
10
  # This defines the name of the default database that Mongoid can connect to.
11
11
  # (required).
12
- database: shop263603_development
12
+ database: dummy_development
13
13
  # Provides the hosts the default client can connect to. Must be an array
14
14
  # of host:port pairs. (required)
15
15
  hosts:
16
- # - localhost:27017
17
- - mongodb
16
+ - localhost:27017
18
17
  options:
19
18
  # Note that all options listed below are Ruby driver client options (the mongo gem).
20
19
  # Please refer to the driver documentation of the version of the mongo gem you are using
@@ -58,7 +57,7 @@ development:
58
57
  # connect: :direct
59
58
 
60
59
  # Changes the default time in seconds the server monitors refresh their status
61
- # via ismaster commands. (default: 10)
60
+ # via hello commands. (default: 10)
62
61
  # heartbeat_frequency: 10
63
62
 
64
63
  # The time in seconds for selecting servers for a near read preference. (default: 0.015)
@@ -81,8 +80,13 @@ development:
81
80
  # (default: 10)
82
81
  # connect_timeout: 10
83
82
 
84
- # The timeout to wait to execute operations on a socket before raising an error.
85
- # (default: 5)
83
+ # How long to wait for a response for each operation sent to the
84
+ # server. This timeout should be set to a value larger than the
85
+ # processing time for the longest operation that will be executed
86
+ # by the application. Note that this is a client-side timeout;
87
+ # the server may continue executing an operation after the client
88
+ # aborts it with the SocketTimeout exception.
89
+ # (default: nil, meaning no timeout)
86
90
  # socket_timeout: 5
87
91
 
88
92
  # The name of the replica set to connect to. Servers provided as seeds that do
@@ -115,12 +119,44 @@ development:
115
119
 
116
120
  # Configure Mongoid specific options. (optional)
117
121
  options:
118
- # Includes the root model name in json serialization. (default: false)
122
+ # Application name that is printed to the mongodb logs upon establishing
123
+ # a connection in server versions >= 3.4. Note that the name cannot
124
+ # exceed 128 bytes. It is also used as the database name if the
125
+ # database name is not explicitly defined. (default: nil)
126
+ # app_name: MyApplicationName
127
+
128
+ production:
129
+ clients:
130
+ default:
131
+ uri: <%= ENV['MONGODB_URI'] %>
132
+ options:
133
+ raise_not_found_error: false
134
+ belongs_to_required_by_default: false
135
+
136
+
137
+ # Mark belongs_to associations as required by default, so that saving a
138
+ # model with a missing belongs_to association will trigger a validation
139
+ # error. (default: true)
140
+ # belongs_to_required_by_default: true
141
+ belongs_to_required_by_default: false
142
+
143
+ # Raise an exception when a field is redefined. (default: false)
144
+ # duplicate_fields_exception: false
145
+
146
+ # Include the root model name in json serialization. (default: false)
119
147
  # include_root_in_json: false
120
148
 
121
149
  # Include the _type field in serialization. (default: false)
122
150
  # include_type_for_serialization: false
123
151
 
152
+ # Whether to join nested persistence contexts for atomic operations
153
+ # to parent contexts by default. (default: false)
154
+ # join_contexts: false
155
+
156
+ # Set the Mongoid and Ruby driver log levels when Mongoid is not using
157
+ # Ruby on Rails logger instance. (default: :info)
158
+ # log_level: :info
159
+
124
160
  # Preload all models in development, needed when models use
125
161
  # inheritance. (default: false)
126
162
  # preload_models: false
@@ -134,46 +170,24 @@ development:
134
170
  # existing method. (default: false)
135
171
  # scope_overwrite_exception: false
136
172
 
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)
173
+ # Use ActiveSupport's time zone in time operations instead of
174
+ # the Ruby default time zone. See the time zone section below for
175
+ # further information. (default: true)
142
176
  # use_activesupport_time_zone: true
143
177
 
144
- # Ensure all times are UTC in the app side. (default: false)
178
+ # Return stored times as UTC. See the time zone section below for
179
+ # further information. Most applications should not use this option.
180
+ # (default: false)
145
181
  # use_utc: false
146
182
 
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)
183
+ # (Deprecated) In MongoDB 4.0 and earlier, set whether to create
184
+ # indexes in the background by default. (default: false)
172
185
  # background_indexing: false
186
+
173
187
  test:
174
188
  clients:
175
189
  default:
176
- database: shop263603_test
190
+ database: dummy_test
177
191
  hosts:
178
192
  - localhost:27017
179
193
  options:
@@ -4,12 +4,12 @@ development:
4
4
  # Defines the default client. (required)
5
5
  default:
6
6
  # Mongoid can connect to a URI accepted by the driver:
7
- # uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development
7
+ # uri: mongodb://user:password@mongodb.domain.com:27017/jinda_development
8
8
 
9
9
  # Otherwise define the parameters separately.
10
10
  # This defines the name of the default database that Mongoid can connect to.
11
11
  # (required).
12
- database: shop263603_development
12
+ database: jinda_development
13
13
  # Provides the hosts the default client can connect to. Must be an array
14
14
  # of host:port pairs. (required)
15
15
  hosts:
@@ -173,7 +173,7 @@ production:
173
173
  test:
174
174
  clients:
175
175
  default:
176
- database: shop263603_test
176
+ database: jinda_test
177
177
  hosts:
178
178
  - localhost:27017
179
179
  options:
@@ -4,12 +4,12 @@ development:
4
4
  # Defines the default client. (required)
5
5
  default:
6
6
  # Mongoid can connect to a URI accepted by the driver:
7
- # uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development
7
+ # uri: mongodb://user:password@mongodb.domain.com:27017/jinda_development
8
8
 
9
9
  # Otherwise define the parameters separately.
10
10
  # This defines the name of the default database that Mongoid can connect to.
11
11
  # (required).
12
- database: shop263603_development
12
+ database: jinda_development
13
13
  # Provides the hosts the default client can connect to. Must be an array
14
14
  # of host:port pairs. (required)
15
15
  hosts:
@@ -173,7 +173,7 @@ production:
173
173
  test:
174
174
  clients:
175
175
  default:
176
- database: shop263603_test
176
+ database: jinda_test
177
177
  hosts:
178
178
  - localhost:27017
179
179
  options:
@@ -15,7 +15,3 @@ services:
15
15
  image: mongo
16
16
  ports:
17
17
  - "27888:27017"
18
- # volumes:
19
- # - type: bind
20
- # source: ~/data
21
- # target: ~/data/db