glib-web 3.23.0 → 3.23.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/glib/json/libs.rb +28 -9
- data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
- data/app/helpers/glib/app_feature_support_helper.rb +0 -0
- data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
- data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
- data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
- data/app/helpers/glib/urls_helper.rb +2 -2
- data/app/models/glib/active_storage/attachment.rb +0 -0
- data/app/models/glib/active_storage/blob.rb +0 -0
- data/app/models/glib/dynamic_text_record.rb +0 -0
- data/app/models/glib/text.rb +0 -0
- data/app/validators/email_typo_validator.rb +0 -0
- data/app/validators/email_validator.rb +0 -0
- data/app/validators/url_validator.rb +0 -0
- data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
- data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
- data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/lifecycle_hooks.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
- data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
- data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
- data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/links.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
- data/app/views/layouts/json_ui/no_custom.html.erb +0 -0
- data/lib/generators/glib/install_generator.rb +0 -0
- data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
- data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
- data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
- data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
- data/lib/generators/templates/database.yml +0 -0
- data/lib/generators/templates/dynamic_text.rb +0 -0
- data/lib/glib/crypt/utils.rb +2 -1
- data/lib/glib/crypt.rb +27 -0
- data/lib/glib/dynamic_text/config.rb +0 -0
- data/lib/glib/dynamic_text.rb +0 -0
- data/lib/glib/json_crawler/action_crawler.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/dialogs_alert.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
- data/lib/glib/json_crawler/coverage.rb +0 -0
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a811ee1cb0c122afb173bc3518ec0259c734ccd5b137195fd6e2a1acfd7f4324
|
4
|
+
data.tar.gz: 826e0af4bbe74e0d804242d2cd6e79531ad56ebe7188061fa7d40d34a77c7f71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6bf10f5745554bc5ff670aa5acc12fbf544666b069a2d91c5f48ba56093317ac3ee839906e724f2ed3d4a9b6814575855f2a25a04e98449b2bdcf8a424218c0
|
7
|
+
data.tar.gz: 6d68d0b78429a9d25d8d04c1c23c32e0d742a8c7ebfb3eadb8ab0db0e35fcca7af432df0eebb3606005a54a79339f34c445ee24097735b88ff63bae7cb499d14
|
@@ -62,14 +62,27 @@ module Glib::Json::Libs
|
|
62
62
|
JSON.parse(render_to_string(template, locals: args))
|
63
63
|
end
|
64
64
|
|
65
|
-
def
|
65
|
+
def glib_html_url(url)
|
66
|
+
url = url.include?('?') ? url.sub(/.json\?/, '?') : url.sub(/.json$/, '')
|
67
|
+
|
68
|
+
# As much as possible, try retaining the front fragment by matching the back, because
|
69
|
+
# the front could be either a `?` or `&`
|
70
|
+
url = url.sub(/format=json\&/, '');
|
71
|
+
|
72
|
+
# If no match, then we replace the front fragment
|
73
|
+
url.sub(/[\&\?]format=json/, '');
|
74
|
+
end
|
75
|
+
|
76
|
+
def glib_redirect_to(url, return_to_previous: false)
|
77
|
+
url = __delete_redirect_back_url(url) if return_to_previous
|
78
|
+
|
66
79
|
respond_to do |format|
|
67
80
|
format.html do
|
68
81
|
redirect_to url
|
69
82
|
end
|
70
83
|
format.json do
|
71
84
|
if __json_ui_rendering?
|
72
|
-
redirect_to url
|
85
|
+
redirect_to glib_html_url(url)
|
73
86
|
return
|
74
87
|
end
|
75
88
|
|
@@ -147,10 +160,10 @@ module Glib::Json::Libs
|
|
147
160
|
session.delete(REDIRECT_BACK_KEY) || url
|
148
161
|
end
|
149
162
|
|
150
|
-
def html_ui_redirect_back_or_to(default_url)
|
151
|
-
|
152
|
-
|
153
|
-
end
|
163
|
+
# def html_ui_redirect_back_or_to(default_url)
|
164
|
+
# redirect_url = __delete_redirect_back_url(default_url)
|
165
|
+
# redirect_to redirect_url
|
166
|
+
# end
|
154
167
|
|
155
168
|
def json_ui_redirect_back_or_to(default_url, json_action)
|
156
169
|
redirect_url = __delete_redirect_back_url(default_url)
|
@@ -210,9 +223,15 @@ module Glib::Json::Libs
|
|
210
223
|
end
|
211
224
|
|
212
225
|
def json_ui_redirect_to(url)
|
213
|
-
|
214
|
-
|
215
|
-
|
226
|
+
# `onLoad` also executes in `onResponse` situation, e.g. form submit.
|
227
|
+
on_load = { action: 'windows/open', url: url }
|
228
|
+
|
229
|
+
if glib_json_dialog_mode?
|
230
|
+
# Only do this in dialog mode because this seems to add to the rendering time
|
231
|
+
# (i.e. longer flicker time), presumably due to the use of things like `nextTick()`.
|
232
|
+
on_load = { action: 'dialogs/close', onClose: on_load }
|
233
|
+
end
|
234
|
+
render json: { onLoad: on_load }
|
216
235
|
end
|
217
236
|
|
218
237
|
module ClassMethods
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Glib
|
2
2
|
module UrlsHelper
|
3
|
-
def glib_url_current(
|
4
|
-
url_for(
|
3
|
+
def glib_url_current(override_params: params.to_unsafe_h, extra_params: {})
|
4
|
+
url_for(override_params.merge(extra_params.merge(only_path: false)))
|
5
5
|
end
|
6
6
|
|
7
7
|
def glib_url_equals_current?(url)
|
File without changes
|
File without changes
|
File without changes
|
data/app/models/glib/text.rb
CHANGED
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
|
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
|
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/utils.rb
CHANGED
data/lib/glib/crypt.rb
CHANGED
@@ -1 +1,28 @@
|
|
1
1
|
require_relative './crypt/utils'
|
2
|
+
|
3
|
+
# A replacement of Glib::Crypt::Utils
|
4
|
+
module Glib
|
5
|
+
class Crypt
|
6
|
+
# Recommended digest: 'SHA256'
|
7
|
+
def self.encrypt(original_message, encryption_secret, encryption_salt, digest)
|
8
|
+
encryptor = message_encryptor(encryption_secret, encryption_salt, digest)
|
9
|
+
CGI.escape(encryptor.encrypt_and_sign(original_message))
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.decrypt(encrypted_message, encryption_secret, encryption_salt, digest)
|
13
|
+
encryptor = message_encryptor(encryption_secret, encryption_salt, digest)
|
14
|
+
begin
|
15
|
+
encryptor.decrypt_and_verify(CGI.unescape(encrypted_message))
|
16
|
+
rescue ActiveSupport::MessageEncryptor::InvalidMessage
|
17
|
+
nil
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
def self.message_encryptor(encryption_secret, encryption_salt, digest)
|
23
|
+
key_generator = ActiveSupport::KeyGenerator.new(encryption_secret, iterations: 1000)
|
24
|
+
key_secret = key_generator.generate_key(encryption_salt, 32)
|
25
|
+
ActiveSupport::MessageEncryptor.new(key_secret, digest: digest, serializer: JSON)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
File without changes
|
data/lib/glib/dynamic_text.rb
CHANGED
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/value.rb
CHANGED
File without changes
|
data/lib/glib/version.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.23.
|
4
|
+
version: 3.23.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -336,7 +336,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
336
336
|
- !ruby/object:Gem::Version
|
337
337
|
version: '0'
|
338
338
|
requirements: []
|
339
|
-
|
339
|
+
rubyforge_project:
|
340
|
+
rubygems_version: 2.7.6
|
340
341
|
signing_key:
|
341
342
|
specification_version: 4
|
342
343
|
summary: ''
|