glib-web 3.20.0 → 3.20.2
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/auth/policy.rb +1 -1
- data/app/controllers/concerns/glib/json/libs.rb +5 -0
- data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
- data/app/controllers/concerns/glib/json/ui.rb +4 -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/json_ui/view_builder/fields.rb +9 -2
- data/app/helpers/glib/json_ui/view_builder.rb +3 -0
- data/app/models/glib/active_storage/attachment.rb +0 -0
- data/app/models/glib/active_storage/blob.rb +0 -0
- data/app/models/glib/application_record.rb +3 -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/index.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/index.json.jbuilder +1 -1
- 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 +0 -0
- data/lib/glib/crypt.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/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/mailer_tester.rb +3 -1
- data/lib/glib/time_freezable_mailer.rb +37 -0
- data/lib/glib/time_returning_mailer.rb +15 -0
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- data/lib/glib-web.rb +3 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50cd95cb3043e936a17b46b0b3e3a102cbe3faa2894e3b67e53228ac115e2a83
|
4
|
+
data.tar.gz: c6a7069e1c997a5e0731039dabeb56c926fd452668a41ff75cc4f06ab0379a27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b9134e80a27875fc0971a9dc05dc2d7e1daea7c9bb156e14a3f5fad294db2f1a831f8ecc48d8e42dd7ff02d3a5d7772bca18cc9bb37f176eebb540dfc86ec6f
|
7
|
+
data.tar.gz: 844365e90f4a43e1ec06a54a380ac56df052ded036dddfb6fd40b5e747dc5e579cbae07e308cc5a7088c1071ea3ad342687df2c9abe19c923ea70e5c5ae863dc
|
@@ -116,6 +116,11 @@ module Glib::Json::Libs
|
|
116
116
|
redirect_to user_default_url
|
117
117
|
end
|
118
118
|
format.json do
|
119
|
+
if __json_ui_rendering?
|
120
|
+
redirect_to user_default_url
|
121
|
+
return
|
122
|
+
end
|
123
|
+
|
119
124
|
render json: if glib_json_dialog_mode?
|
120
125
|
{ onLoad: __glib_error_dialog('Access denied', "Make sure you're logged in with the correct account.") }
|
121
126
|
else
|
File without changes
|
@@ -32,6 +32,10 @@ module Glib::Json::Ui
|
|
32
32
|
@__json_ui_activated
|
33
33
|
end
|
34
34
|
|
35
|
+
def __json_ui_rendering?
|
36
|
+
@__json_ui_rendering != nil
|
37
|
+
end
|
38
|
+
|
35
39
|
def json_ui_page_lifecycle_prop(name)
|
36
40
|
if (hash = json_transformation_start).is_a?(Hash) && hash['body'] # A valid page
|
37
41
|
hash[name] ||= { 'action' => 'runMultiple', 'childActions' => [] }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -295,7 +295,12 @@ class Glib::JsonUi::ViewBuilder
|
|
295
295
|
json.set! :buttonLabels, @buttonLabels
|
296
296
|
|
297
297
|
if @prop && context
|
298
|
-
json.fileTitle context.field_value(@prop).blob&.filename
|
298
|
+
# json.fileTitle context.field_value(@prop).blob&.filename
|
299
|
+
|
300
|
+
if (value = context.field_value(@prop)).attached?
|
301
|
+
json.fileTitle value.blob.filename
|
302
|
+
json.fileUrl url_for(value)
|
303
|
+
end
|
299
304
|
end
|
300
305
|
|
301
306
|
super
|
@@ -303,7 +308,9 @@ class Glib::JsonUi::ViewBuilder
|
|
303
308
|
|
304
309
|
@Override
|
305
310
|
def determine_value(context, prop)
|
306
|
-
context.field_value(prop)
|
311
|
+
if (value = context.field_value(prop)).attached?
|
312
|
+
value.signed_id || ''
|
313
|
+
end
|
307
314
|
end
|
308
315
|
end
|
309
316
|
|
File without changes
|
File without changes
|
@@ -7,6 +7,9 @@ module Glib
|
|
7
7
|
scope :created_asc, -> { order(created_at: :asc) }
|
8
8
|
scope :created_desc, -> { order(created_at: :desc) }
|
9
9
|
|
10
|
+
scope :updated_asc, -> { order(updated_at: :asc) }
|
11
|
+
scope :updated_desc, -> { order(updated_at: :desc) }
|
12
|
+
|
10
13
|
def self.glib_has_one_attached(field_name)
|
11
14
|
has_one_attached field_name
|
12
15
|
|
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
|
@@ -127,7 +127,7 @@ json_ui_page json do |page|
|
|
127
127
|
end
|
128
128
|
|
129
129
|
section.rows builder: ->(template) do
|
130
|
-
template.thumbnail title: 'Grid', subtitle: '
|
130
|
+
template.thumbnail title: 'Grid', subtitle: 'Arrange child component in grid like', onClick: ->(action) do
|
131
131
|
action.windows_open url: json_ui_garage_url(path: 'panels/grid')
|
132
132
|
end
|
133
133
|
|
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
File without changes
|
data/lib/glib/crypt.rb
CHANGED
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/glib/mailer_tester.rb
CHANGED
@@ -15,7 +15,9 @@ module Glib
|
|
15
15
|
preview_class.instance_methods(false).each do |mailer_method|
|
16
16
|
test "mailer for #{preview_class}##{mailer_method}" do
|
17
17
|
preview.send(mailer_method).deliver_now
|
18
|
-
|
18
|
+
|
19
|
+
# See TimeFreezableMailer
|
20
|
+
preview.try(:return_time_if_frozen)
|
19
21
|
|
20
22
|
logfile = File.join(log_dir, "#{preview_class.name.underscore}##{mailer_method}.txt")
|
21
23
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Glib
|
2
|
+
module TimeFreezableMailer
|
3
|
+
@@__mailer_freeze_time = false
|
4
|
+
|
5
|
+
def allow_time_freeze?
|
6
|
+
Rails.env.development? || Rails.env.test?
|
7
|
+
end
|
8
|
+
|
9
|
+
def return_time_if_frozen
|
10
|
+
return unless allow_time_freeze?
|
11
|
+
return unless @@__mailer_freeze_time
|
12
|
+
|
13
|
+
@@__mailer_freeze_time = false
|
14
|
+
|
15
|
+
Timecop.return # Allows mailer preview to use Timecop.freeze()
|
16
|
+
end
|
17
|
+
|
18
|
+
def freeze_time(year, month, day)
|
19
|
+
return unless allow_time_freeze?
|
20
|
+
|
21
|
+
if @@__mailer_freeze_time
|
22
|
+
example_code = %{
|
23
|
+
Rails.application.config.to_prepare do
|
24
|
+
class ::Rails::MailersController
|
25
|
+
prepend Glib::TimeReturningMailer
|
26
|
+
end
|
27
|
+
end
|
28
|
+
}
|
29
|
+
|
30
|
+
raise "Please create `config/initializers/mailer_preview_setup.rb` and add the following: #{example_code}"
|
31
|
+
end
|
32
|
+
|
33
|
+
@@__mailer_freeze_time = true
|
34
|
+
Timecop.freeze(DateTime.new(year, month, day))
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Glib
|
2
|
+
module TimeReturningMailer
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
prepended do
|
6
|
+
include Glib::TimeFreezableMailer
|
7
|
+
end
|
8
|
+
|
9
|
+
# Override Rails::MailersController's preview
|
10
|
+
def preview
|
11
|
+
super
|
12
|
+
return_time_if_frozen
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/glib/value.rb
CHANGED
File without changes
|
data/lib/glib/version.rb
CHANGED
File without changes
|
data/lib/glib-web.rb
CHANGED
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.20.
|
4
|
+
version: 3.20.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -310,6 +310,8 @@ files:
|
|
310
310
|
- lib/glib/json_crawler/router.rb
|
311
311
|
- lib/glib/mailer_tester.rb
|
312
312
|
- lib/glib/test_helpers.rb
|
313
|
+
- lib/glib/time_freezable_mailer.rb
|
314
|
+
- lib/glib/time_returning_mailer.rb
|
313
315
|
- lib/glib/value.rb
|
314
316
|
- lib/glib/version.rb
|
315
317
|
- lib/tasks/db.rake
|
@@ -331,7 +333,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
331
333
|
- !ruby/object:Gem::Version
|
332
334
|
version: '0'
|
333
335
|
requirements: []
|
334
|
-
|
336
|
+
rubyforge_project:
|
337
|
+
rubygems_version: 2.7.6
|
335
338
|
signing_key:
|
336
339
|
specification_version: 4
|
337
340
|
summary: ''
|