glib-web 4.10.2 → 4.10.5
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/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/abstract_builder.rb +20 -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/json_ui/view_builder/fields.rb +1 -1
- data/app/helpers/glib/json_ui/view_builder/panels.rb +1 -1
- data/app/models/concerns/glib/enum_humanization.rb +1 -1
- 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/dialogs_oauth_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/bulk_edit_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/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/controls.json.jbuilder +2 -2
- 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/app/views/layouts/json_ui/renderer.html.erb +0 -1
- 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/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/dialogs_close.rb +14 -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/json_crawler/http.rb +25 -2
- data/lib/glib/json_crawler/router.rb +2 -0
- data/lib/glib/json_crawler.rb +1 -0
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e69d390e7aa529eb45c0cb1313ea2eaab6215f9bae0ce30c9a0eb4b072303c14
|
4
|
+
data.tar.gz: c03d46e44b24765844368c1d76e241380f6ef4cb419d3cf30b5d26a575794f2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa94ad210b099330240701b7f4a66594eda52ed81b3d18a6a2907085d182b2671134c6df44399b4f5801d1659849f93a4ede489d711704c4d8d570181f69679f
|
7
|
+
data.tar.gz: 4eb32759ee6d6ee5ba8c9fc0de3f9d5304c5fcd38804d37d17dcefc8c6feb4f8ccaedd7fb0f065586f72d56e7679ef1b9348b9f76b5bea8472c6377ea19ac251
|
File without changes
|
File without changes
|
File without changes
|
@@ -339,8 +339,28 @@ module Glib
|
|
339
339
|
end
|
340
340
|
|
341
341
|
def to_color(value)
|
342
|
+
known_colors = [
|
343
|
+
'primary',
|
344
|
+
'secondary',
|
345
|
+
'tertiary',
|
346
|
+
'error',
|
347
|
+
'warning',
|
348
|
+
'info',
|
349
|
+
'success',
|
350
|
+
'thin-primary',
|
351
|
+
'thin-secondary',
|
352
|
+
'black',
|
353
|
+
'white',
|
354
|
+
'grey',
|
355
|
+
'soft-grey',
|
356
|
+
'highlight'
|
357
|
+
]
|
342
358
|
value = value&.to_s
|
343
359
|
|
360
|
+
if known_colors.include?(value)
|
361
|
+
return value
|
362
|
+
end
|
363
|
+
|
344
364
|
if value
|
345
365
|
if !Rails.env.production?
|
346
366
|
if !value.match(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/i)
|
File without changes
|
File without changes
|
File without changes
|
@@ -21,7 +21,7 @@ module Glib
|
|
21
21
|
if enum_value
|
22
22
|
translation_key = "activerecord.attributes.#{model_name.i18n_key}.#{enum_name.to_s.pluralize}.#{enum_value}"
|
23
23
|
|
24
|
-
if default_translation.nil? && Rails.env.development?
|
24
|
+
if default_translation.nil? && (Rails.env.development? || Rails.env.test?)
|
25
25
|
text = I18n.t(translation_key, raise: I18n::MissingTranslationData)
|
26
26
|
else
|
27
27
|
text = I18n.t(translation_key, default: default_translation)
|
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
|
@@ -39,10 +39,10 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
39
39
|
dialog.body padding: glib_json_padding_body, childViews: ->(view) do
|
40
40
|
view.panels_responsive styleClass: 'popover-menu', width: 200, childViews: ->(res) do
|
41
41
|
res.label text: 'Item 1', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
42
|
-
saction.windows_open url: '
|
42
|
+
saction.windows_open url: json_ui_garage_url(path: 'pages/index')
|
43
43
|
end
|
44
44
|
res.label text: 'Item 2', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
45
|
-
saction.
|
45
|
+
saction.windows_open url: json_ui_garage_url(path: 'home/blank')
|
46
46
|
end
|
47
47
|
res.label text: 'Item 3', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
48
48
|
saction.popovers_close key: 'menu'
|
File without changes
|
File without changes
|
File without changes
|
@@ -9,7 +9,6 @@
|
|
9
9
|
<%= csrf_meta_tags %>
|
10
10
|
|
11
11
|
<%= vite_javascript_tag 'vue_renderer', defer: true %>
|
12
|
-
<%= vite_stylesheet_tag 'vue_renderer' %>
|
13
12
|
<%# TODO: Remove this, for dev only %>
|
14
13
|
<%# <script src="https://cdn.tailwindcss.com"></script> %>
|
15
14
|
<link href="//fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
|
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/dynamic_text.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Glib
|
2
|
+
module JsonCrawler
|
3
|
+
class DialogsClose < ActionCrawler
|
4
|
+
def initialize(http, args, action)
|
5
|
+
super(http)
|
6
|
+
|
7
|
+
@http.router.log action, nil
|
8
|
+
if (on_close = args.fetch('onClose', nil))
|
9
|
+
perform(on_close)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -14,6 +14,7 @@ module Glib
|
|
14
14
|
def initialize(context, user, router)
|
15
15
|
@context = context
|
16
16
|
@history = []
|
17
|
+
@content_history = []
|
17
18
|
@response_times = []
|
18
19
|
@user = user
|
19
20
|
@router = router
|
@@ -51,6 +52,12 @@ module Glib
|
|
51
52
|
def fetch(method, url, action, params = {}, inspect_result = true)
|
52
53
|
return nil if url.blank?
|
53
54
|
|
55
|
+
if (last_record = @content_history.last)
|
56
|
+
previous_url = last_record[:url]
|
57
|
+
else
|
58
|
+
previous_url = nil
|
59
|
+
end
|
60
|
+
|
54
61
|
if method == :get
|
55
62
|
return nil if history.include?(url)
|
56
63
|
|
@@ -64,7 +71,8 @@ module Glib
|
|
64
71
|
http_header = {
|
65
72
|
'Client-DeviceOS' => user[:device],
|
66
73
|
'Client-Version' => user[:version],
|
67
|
-
'X-CSRF-Token' => user[:token]
|
74
|
+
'X-CSRF-Token' => user[:token],
|
75
|
+
'Referer' => previous_url
|
68
76
|
}
|
69
77
|
http_header.merge!(params[:headers]) if params[:headers].present?
|
70
78
|
|
@@ -76,7 +84,15 @@ module Glib
|
|
76
84
|
begin
|
77
85
|
@context.send(method, url, params: params, headers: http_header)
|
78
86
|
raw_response = @context.response
|
79
|
-
|
87
|
+
body = raw_response.body
|
88
|
+
response = Response.new(raw_response.code.to_i, raw_response.headers, raw_response.media_type, body)
|
89
|
+
|
90
|
+
if method == :get
|
91
|
+
@content_history << {
|
92
|
+
url: url,
|
93
|
+
response: body
|
94
|
+
}
|
95
|
+
end
|
80
96
|
|
81
97
|
if (controller = @context.controller)
|
82
98
|
Glib::JsonCrawler::Coverage.coverage_files.add(controller.class.instance_method(controller.action_name).source_location.first)
|
@@ -90,7 +106,14 @@ module Glib
|
|
90
106
|
end
|
91
107
|
|
92
108
|
if !response
|
109
|
+
crash_log_file = Rails.root.join('tmp', "crash-#{DateTime.current.to_fs(:number)}.log")
|
110
|
+
puts
|
93
111
|
puts "Crashed on #{url}"
|
112
|
+
puts "Referrer: #{previous_url}"
|
113
|
+
if last_record
|
114
|
+
File.write(crash_log_file, last_record[:response])
|
115
|
+
puts "Previous page's content logged to #{crash_log_file}"
|
116
|
+
end
|
94
117
|
raise
|
95
118
|
end
|
96
119
|
end
|
@@ -107,6 +107,8 @@ module Glib
|
|
107
107
|
JsonCrawler::FormsSubmit.new(http, params)
|
108
108
|
when 'dialogs/alert-v1', 'dialogs/alert'
|
109
109
|
JsonCrawler::DialogsAlert.new(http, params, action)
|
110
|
+
when 'dialogs/close-v1', 'dialogs/close', 'popovers/close', 'popovers/close-v1'
|
111
|
+
JsonCrawler::DialogsClose.new(http, params, action)
|
110
112
|
else
|
111
113
|
unless [
|
112
114
|
'http/delete-v1',
|
data/lib/glib/json_crawler.rb
CHANGED
@@ -8,6 +8,7 @@ require_relative './json_crawler/action_crawlers/windows_open'
|
|
8
8
|
require_relative './json_crawler/action_crawlers/action_http'
|
9
9
|
require_relative './json_crawler/action_crawlers/forms_submit'
|
10
10
|
require_relative './json_crawler/action_crawlers/dialogs_alert'
|
11
|
+
require_relative './json_crawler/action_crawlers/dialogs_close'
|
11
12
|
require_relative './json_crawler/action_crawlers/dialogs_show'
|
12
13
|
require_relative './json_crawler/action_crawlers/menu'
|
13
14
|
require_relative './json_crawler/action_crawlers/run_multiple'
|
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: 4.10.
|
4
|
+
version: 4.10.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -354,6 +354,7 @@ files:
|
|
354
354
|
- lib/glib/json_crawler/action_crawler.rb
|
355
355
|
- lib/glib/json_crawler/action_crawlers/action_http.rb
|
356
356
|
- lib/glib/json_crawler/action_crawlers/dialogs_alert.rb
|
357
|
+
- lib/glib/json_crawler/action_crawlers/dialogs_close.rb
|
357
358
|
- lib/glib/json_crawler/action_crawlers/dialogs_show.rb
|
358
359
|
- lib/glib/json_crawler/action_crawlers/forms_submit.rb
|
359
360
|
- lib/glib/json_crawler/action_crawlers/menu.rb
|
@@ -388,8 +389,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
388
389
|
- !ruby/object:Gem::Version
|
389
390
|
version: '0'
|
390
391
|
requirements: []
|
391
|
-
|
392
|
-
rubygems_version: 2.7.6
|
392
|
+
rubygems_version: 3.4.6
|
393
393
|
signing_key:
|
394
394
|
specification_version: 4
|
395
395
|
summary: ''
|