glib-web 3.19.2 → 3.19.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
  3. data/app/helpers/glib/app_feature_support_helper.rb +0 -0
  4. data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
  5. data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
  6. data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
  7. data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
  8. data/app/helpers/glib/json_ui/table_builders.rb +0 -0
  9. data/app/helpers/glib/json_ui/view_builder/fields.rb +7 -1
  10. data/app/models/glib/active_storage/attachment.rb +0 -0
  11. data/app/models/glib/active_storage/blob.rb +0 -0
  12. data/app/models/glib/dynamic_text_record.rb +0 -0
  13. data/app/models/glib/text.rb +0 -0
  14. data/app/validators/email_typo_validator.rb +0 -0
  15. data/app/validators/email_validator.rb +0 -0
  16. data/app/validators/url_validator.rb +0 -0
  17. data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +0 -0
  18. data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
  19. data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
  20. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  21. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  22. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  23. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  24. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  25. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  26. data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
  27. data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
  28. data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
  30. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  31. data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
  32. data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
  33. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  35. data/app/views/json_ui/garage/pages/index.json.jbuilder +0 -0
  36. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  37. data/app/views/json_ui/garage/pages/lifecycle_hooks.json.jbuilder +0 -0
  38. data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
  39. data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
  42. data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
  45. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
  50. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
  51. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
  52. data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
  53. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  54. data/app/views/json_ui/garage/views/links.json.jbuilder +0 -0
  55. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  56. data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
  57. data/app/views/layouts/json_ui/no_custom.html.erb +0 -0
  58. data/lib/generators/glib/install_generator.rb +0 -0
  59. data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
  60. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
  61. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
  62. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
  63. data/lib/generators/templates/database.yml +0 -0
  64. data/lib/generators/templates/dynamic_text.rb +0 -0
  65. data/lib/glib/crypt/utils.rb +0 -0
  66. data/lib/glib/crypt.rb +0 -0
  67. data/lib/glib/direct_uploads_controller.rb +24 -0
  68. data/lib/glib/dynamic_text/config.rb +0 -0
  69. data/lib/glib/dynamic_text.rb +0 -0
  70. data/lib/glib/engine.rb +5 -0
  71. data/lib/glib/json_crawler/action_crawler.rb +0 -0
  72. data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
  73. data/lib/glib/json_crawler/action_crawlers/dialogs_alert.rb +0 -0
  74. data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
  75. data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
  76. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  77. data/lib/glib/json_crawler/coverage.rb +0 -0
  78. data/lib/glib/json_crawler.rb +0 -0
  79. data/lib/glib/value.rb +0 -0
  80. data/lib/glib/version.rb +0 -0
  81. data/lib/glib-web.rb +0 -0
  82. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67b648386b6ef43c8d5d2b2afa56f07029488197df66380bfb112a10def0401d
4
- data.tar.gz: 5b1675fac6daff200b2c98e91f422d1d5e3893adbc1344dd93243b875c44337b
3
+ metadata.gz: b0c2d26cf82fbfdbd485fff935be53a9214a01275b9ad93c3c53783b209c1abc
4
+ data.tar.gz: 9d3d387cf498bd32fba5f7bbf5b3ba9b593114391e304e5575af4c3971d81e05
5
5
  SHA512:
6
- metadata.gz: d91a8a287907ccc9b3c868a2d6dcb286663337226816cc5c850f4ef8f915cf4bd72b082e11af571a3ec59bfc659af0c5aa3832ba23d7ca01161005edc914253d
7
- data.tar.gz: 5069a312201ec0872a3d2d943e67f2cae0bc9e87e54439001ed6ac5377a46a3b66619072aa26cecc276311b90001396f1b9dee612af097e23bfc3bba90a43eaf
6
+ metadata.gz: 42c2f3f8165417cd299ad9e1a9d097cec4da4330c4d375d4c482aa437a97e05e9fae52e99cef4e0fb32fb91bffcb0a7532e31d3defc3acf9031017f05df7883f
7
+ data.tar.gz: ccb292cc3d447aaf16250201c50bd80dff766edcdeb6b8485e7fe9413656b0454fbfedac037f12362fe3d1bbd4860e4ec21c0a3d094a50cd48a9ef0af3c38dcb
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -2,6 +2,8 @@ class Glib::JsonUi::ViewBuilder
2
2
  module Fields
3
3
 
4
4
  class AbstractField < View
5
+ include Rails.application.routes.url_helpers
6
+
5
7
  bool :readOnly
6
8
  bool :disabled
7
9
  hash :validation
@@ -9,6 +11,10 @@ class Glib::JsonUi::ViewBuilder
9
11
  action :onChange
10
12
  string :paramNameForFormData
11
13
 
14
+ def default_url_options
15
+ { only_path: true }
16
+ end
17
+
12
18
  def label(label)
13
19
  @label = label
14
20
  end
@@ -347,7 +353,7 @@ class Glib::JsonUi::ViewBuilder
347
353
  # association = form.nested_associations.last
348
354
  # context = association || form
349
355
 
350
- @files ||= context.field_value(@prop, collect_ids: false).to_a.map { |file| { name: file.blob&.filename, signed_id: file.signed_id } }
356
+ @files ||= context.field_value(@prop, collect_ids: false).to_a.map { |file| { name: file.blob&.filename, signed_id: file.signed_id, url: url_for(file) } }
351
357
  end
352
358
 
353
359
  json.files @files if @files.present?
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/glib/crypt.rb CHANGED
File without changes
@@ -0,0 +1,24 @@
1
+ ::ActiveStorage::DirectUploadsController.class_eval do
2
+ # include Rails.application.routes.url_helpers
3
+ before_action :authenticate_user!
4
+
5
+ rescue_from StandardError do
6
+ render json: { message: 'Upload failed' }, status: 500
7
+ end
8
+
9
+ rescue_from Glib::Auth::Policy::UnauthorizedError do
10
+ render json: { message: 'Forbidden' }, status: 403
11
+ end
12
+
13
+ rescue_from ActionController::InvalidAuthenticityToken do
14
+ render json: { message: 'Session expired. Please refresh page' }, status: 401
15
+ end
16
+
17
+ def authenticate_user!
18
+ current_user.present? ? nil : raise_error
19
+ end
20
+
21
+ def raise_error
22
+ raise Glib::Auth::Policy::UnauthorizedError
23
+ end
24
+ end
File without changes
File without changes
data/lib/glib/engine.rb CHANGED
@@ -2,6 +2,11 @@ module Glib
2
2
  module Web
3
3
  class Engine < ::Rails::Engine
4
4
  # isolate_namespace Glib::Web
5
+
6
+ # modify direct upload
7
+ config.to_prepare do
8
+ require_relative 'direct_uploads_controller'
9
+ end
5
10
  end
6
11
  end
7
12
  end
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/glib/value.rb CHANGED
File without changes
data/lib/glib/version.rb CHANGED
File without changes
data/lib/glib-web.rb CHANGED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.19.2
4
+ version: 3.19.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -290,6 +290,7 @@ files:
290
290
  - lib/glib-web.rb
291
291
  - lib/glib/crypt.rb
292
292
  - lib/glib/crypt/utils.rb
293
+ - lib/glib/direct_uploads_controller.rb
293
294
  - lib/glib/dynamic_text.rb
294
295
  - lib/glib/dynamic_text/config.rb
295
296
  - lib/glib/engine.rb
@@ -329,8 +330,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
330
  - !ruby/object:Gem::Version
330
331
  version: '0'
331
332
  requirements: []
332
- rubyforge_project:
333
- rubygems_version: 2.7.6
333
+ rubygems_version: 3.4.6
334
334
  signing_key:
335
335
  specification_version: 4
336
336
  summary: ''