glib-web 0.4.20 → 0.4.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/controllers/concerns/glib/auth/policy.rb +0 -0
- data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
- data/app/controllers/concerns/glib/json/traversal.rb +0 -0
- data/app/controllers/concerns/glib/json/ui.rb +3 -1
- data/app/controllers/glib/home_controller.rb +0 -0
- data/app/helpers/glib/dynamic_images_helper.rb +0 -0
- data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
- data/app/helpers/glib/json_ui/abstract_builder.rb +71 -68
- data/app/helpers/glib/json_ui/action_builder.rb +0 -0
- data/app/helpers/glib/json_ui/list_builders.rb +3 -2
- data/app/helpers/glib/json_ui/menu_builder.rb +0 -0
- data/app/helpers/glib/json_ui/page_helper.rb +0 -0
- data/app/helpers/glib/json_ui/response_helper.rb +0 -0
- data/app/helpers/glib/json_ui/split_builders.rb +0 -0
- data/app/helpers/glib/json_ui/styling_helper.rb +0 -0
- data/app/helpers/glib/json_ui/table_builders.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/banners.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +14 -0
- data/app/helpers/glib/json_ui/view_builder/panels.rb +8 -8
- 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/policies/glib/application_policy.rb +148 -148
- data/app/views/app/views/json_ui/vue/renderer.html.erb +4 -0
- data/app/views/json_ui/garage/_nav_menu.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/_alert_post_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/basic.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/basic_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +33 -0
- data/app/views/json_ui/garage/forms/dynamic_select.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/file_upload.json.jbuilder +2 -1
- data/app/views/json_ui/garage/forms/floating_submit.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/get_request.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/index.json.jbuilder +7 -4
- data/app/views/json_ui/garage/forms/pickers.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/rich_text.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/selects.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/forms/text_validation.json.jbuilder +5 -1
- data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
- data/app/views/json_ui/garage/home/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/_infinite_scroll_section.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/edit_actions.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/infinite_scroll.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/templating.json.jbuilder +9 -1
- data/app/views/json_ui/garage/pages/flat_centered.json.jbuilder +6 -6
- data/app/views/json_ui/garage/pages/full_width.json.jbuilder +7 -7
- 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/nav_buttons.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/card.json.jbuilder +11 -34
- data/app/views/json_ui/garage/panels/carousel.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/index.json.jbuilder +21 -7
- data/app/views/json_ui/garage/panels/responsive.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/split.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/vertical.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/export_import.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/horizontal_scroll.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/banners.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/carousels.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/charts.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/images.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/index.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/misc.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/texts.json.jbuilder +0 -0
- data/app/views/layouts/json_ui/renderer.html.erb +32 -0
- data/config/routes.rb +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-web.rb +0 -0
- data/lib/glib/dynamic_text.rb +0 -0
- data/lib/glib/dynamic_text/config.rb +0 -0
- data/lib/glib/engine.rb +0 -0
- data/lib/glib/json_crawler.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/forms_submit.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/nav_initiate.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
- data/lib/glib/json_crawler/http.rb +0 -0
- data/lib/glib/json_crawler/router.rb +0 -0
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- metadata +4 -6
- data/app/controllers/concerns/application/json/libs.rb +0 -94
- data/app/controllers/concerns/application/json/transformation.rb +0 -11
- data/app/controllers/concerns/application/json/ui.rb +0 -66
- data/app/controllers/concerns/application/json/validation.rb +0 -13
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
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<meta charset="utf-8" />
|
6
|
+
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" />
|
7
|
+
|
8
|
+
<title>App</title>
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
|
11
|
+
<%= javascript_pack_tag 'vue_renderer', defer: true %>
|
12
|
+
<%#= javascript_include_tag 'vue_renderer_extras', defer: true %>
|
13
|
+
|
14
|
+
<%= stylesheet_pack_tag 'vue_renderer' %>
|
15
|
+
|
16
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
|
17
|
+
|
18
|
+
<%= yield :head %>
|
19
|
+
</head>
|
20
|
+
|
21
|
+
<body>
|
22
|
+
<noscript>Please enable JavaScript to view this web site.</noscript>
|
23
|
+
<div id="app"></div>
|
24
|
+
|
25
|
+
<script>
|
26
|
+
var __page = <%= raw @__json_ui_orig_page%>;
|
27
|
+
</script>
|
28
|
+
|
29
|
+
<%= yield :footer %>
|
30
|
+
</body>
|
31
|
+
|
32
|
+
</html>
|
data/config/routes.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-web.rb
CHANGED
File without changes
|
data/lib/glib/dynamic_text.rb
CHANGED
File without changes
|
File without changes
|
data/lib/glib/engine.rb
CHANGED
File without changes
|
data/lib/glib/json_crawler.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: 0.4.
|
4
|
+
version: 0.4.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -64,10 +64,6 @@ executables: []
|
|
64
64
|
extensions: []
|
65
65
|
extra_rdoc_files: []
|
66
66
|
files:
|
67
|
-
- app/controllers/concerns/application/json/libs.rb
|
68
|
-
- app/controllers/concerns/application/json/transformation.rb
|
69
|
-
- app/controllers/concerns/application/json/ui.rb
|
70
|
-
- app/controllers/concerns/application/json/validation.rb
|
71
67
|
- app/controllers/concerns/glib/auth/policy.rb
|
72
68
|
- app/controllers/concerns/glib/json/dynamic_text.rb
|
73
69
|
- app/controllers/concerns/glib/json/libs.rb
|
@@ -105,6 +101,7 @@ files:
|
|
105
101
|
- app/views/json_ui/garage/forms/basic.json.jbuilder
|
106
102
|
- app/views/json_ui/garage/forms/basic_post.json.jbuilder
|
107
103
|
- app/views/json_ui/garage/forms/checkboxes.json.jbuilder
|
104
|
+
- app/views/json_ui/garage/forms/dynamic_group.json.jbuilder
|
108
105
|
- app/views/json_ui/garage/forms/dynamic_select.json.jbuilder
|
109
106
|
- app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder
|
110
107
|
- app/views/json_ui/garage/forms/file_upload.json.jbuilder
|
@@ -164,6 +161,7 @@ files:
|
|
164
161
|
- app/views/json_ui/garage/views/markdowns.json.jbuilder
|
165
162
|
- app/views/json_ui/garage/views/misc.json.jbuilder
|
166
163
|
- app/views/json_ui/garage/views/texts.json.jbuilder
|
164
|
+
- app/views/layouts/json_ui/renderer.html.erb
|
167
165
|
- config/routes.rb
|
168
166
|
- lib/generators/glib/install_generator.rb
|
169
167
|
- lib/generators/templates/20191017062519_create_texts.rb
|
@@ -205,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
203
|
version: '0'
|
206
204
|
requirements: []
|
207
205
|
rubyforge_project:
|
208
|
-
rubygems_version: 2.6
|
206
|
+
rubygems_version: 2.7.6
|
209
207
|
signing_key:
|
210
208
|
specification_version: 4
|
211
209
|
summary: ''
|
@@ -1,94 +0,0 @@
|
|
1
|
-
# # TODO: Deprecate
|
2
|
-
# module Application::Json::Libs
|
3
|
-
# extend ActiveSupport::Concern
|
4
|
-
|
5
|
-
# included do
|
6
|
-
# extend ClassMethods
|
7
|
-
|
8
|
-
# helper_method :json_ui_app_bundle_id, :json_ui_app_build_version, :json_ui_app_device_os
|
9
|
-
# helper_method :json_ui_app_is_android?, :json_ui_app_is_ios?, :json_ui_app_is_web?
|
10
|
-
# end
|
11
|
-
|
12
|
-
# def json_ui_app_bundle_id
|
13
|
-
# @json_ui_app_bundle_id ||= request.headers['JsonUiApp-Bundle-Id']
|
14
|
-
# end
|
15
|
-
|
16
|
-
# def json_ui_app_build_version
|
17
|
-
# @json_ui_app_build_version ||= request.headers['JsonUiApp-Build-Version']
|
18
|
-
# @json_ui_app_build_version = params[:build_version] if @json_ui_app_build_version.nil? && Rails.env.development? # For easy testing
|
19
|
-
# @json_ui_app_build_version
|
20
|
-
# end
|
21
|
-
|
22
|
-
# def json_ui_app_device_os
|
23
|
-
# @json_ui_app_device_os ||= request.headers['JsonUiApp-Device-Os']
|
24
|
-
# @json_ui_app_device_os = params[:device_os] if @json_ui_app_device_os.nil? && Rails.env.development? # For easy testing
|
25
|
-
# @json_ui_app_device_os || 'web'
|
26
|
-
# end
|
27
|
-
|
28
|
-
# def json_ui_app_is_android?
|
29
|
-
# json_ui_app_device_os == 'android'
|
30
|
-
# end
|
31
|
-
|
32
|
-
# def json_ui_app_is_ios?
|
33
|
-
# json_ui_app_device_os == 'ios'
|
34
|
-
# end
|
35
|
-
|
36
|
-
# def json_ui_app_is_web?
|
37
|
-
# json_ui_app_device_os == 'web'
|
38
|
-
# end
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
# module ClassMethods
|
43
|
-
|
44
|
-
# def json_libs_init(options)
|
45
|
-
# include Application::Json::Transformation
|
46
|
-
# include Application::Json::Validation
|
47
|
-
# include Application::Json::Ui
|
48
|
-
|
49
|
-
# before_action :__json_ui_start
|
50
|
-
|
51
|
-
# # Note that after_action gets executed in reverse
|
52
|
-
# after_action do
|
53
|
-
# __json_ui_commit(options)
|
54
|
-
# end
|
55
|
-
# after_action :__json_transformation_commit
|
56
|
-
# after_action :__json_validate_perform
|
57
|
-
# end
|
58
|
-
|
59
|
-
# def json_libs_set_locale
|
60
|
-
# before_action do
|
61
|
-
# # Need to explicitly fallback to EN
|
62
|
-
# I18n.locale = params[:_locale] || :en
|
63
|
-
# rescue
|
64
|
-
# I18n.locale = :en
|
65
|
-
# end
|
66
|
-
# end
|
67
|
-
|
68
|
-
# def json_libs_force_json_ui
|
69
|
-
# before_action do
|
70
|
-
# if params[:_render] != 'v1'
|
71
|
-
# redirect_to url_for(params.to_unsafe_h.merge(_render: 'v1'))
|
72
|
-
# end
|
73
|
-
# end
|
74
|
-
# end
|
75
|
-
|
76
|
-
# def json_libs_rescue_csrf
|
77
|
-
# rescue_from ActionController::InvalidAuthenticityToken do |exception|
|
78
|
-
# sign_out(:user)
|
79
|
-
|
80
|
-
# respond_to do |format|
|
81
|
-
# format.json do
|
82
|
-
# render json: {
|
83
|
-
# onResponse: {
|
84
|
-
# action: 'windows/open-v1',
|
85
|
-
# url: root_url
|
86
|
-
# }
|
87
|
-
# }
|
88
|
-
# end
|
89
|
-
# end
|
90
|
-
# end
|
91
|
-
# end
|
92
|
-
|
93
|
-
# end
|
94
|
-
# end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# module Application::Json::Transformation
|
2
|
-
# def json_transformation_start
|
3
|
-
# if request.format == 'json'
|
4
|
-
# @__transformed_json ||= JSON.parse(response.body) rescue nil
|
5
|
-
# end
|
6
|
-
# end
|
7
|
-
|
8
|
-
# def __json_transformation_commit
|
9
|
-
# response.body = @__transformed_json.to_json if @__transformed_json
|
10
|
-
# end
|
11
|
-
# end
|
@@ -1,66 +0,0 @@
|
|
1
|
-
# module Application::Json::Ui
|
2
|
-
# extend ActiveSupport::Concern
|
3
|
-
|
4
|
-
# included do
|
5
|
-
# rescue_from ActionController::UnknownFormat do |exception|
|
6
|
-
# if json_ui_activated?
|
7
|
-
# # Tell `__json_ui_start()` to avoid rendering this page while still retaining the `_render` param
|
8
|
-
# # so that the page remains linking to other json_ui pages.
|
9
|
-
# redirect_to url_for(format: nil, _skip_render: true)
|
10
|
-
# else
|
11
|
-
# raise exception
|
12
|
-
# end
|
13
|
-
# end
|
14
|
-
# end
|
15
|
-
|
16
|
-
# # Override
|
17
|
-
# def form_authenticity_token(*args)
|
18
|
-
# Rails.env.test? ? 'test_token' : super
|
19
|
-
# end
|
20
|
-
|
21
|
-
# # NOTE: Override default_url_options and call this method
|
22
|
-
# def json_ui_url_options
|
23
|
-
# options = {}
|
24
|
-
# options[:_render] = params[:_render]
|
25
|
-
# options[:_locale] = params[:_locale]
|
26
|
-
# options[:format] = :json if request.format == :json
|
27
|
-
# options
|
28
|
-
# end
|
29
|
-
|
30
|
-
# def json_ui_activated?
|
31
|
-
# @__json_ui_activated
|
32
|
-
# end
|
33
|
-
|
34
|
-
# def __json_ui_start
|
35
|
-
# @__json_ui_activated = false
|
36
|
-
# @__json_ui_rendering = false
|
37
|
-
# if params[:_render].present?
|
38
|
-
# @__json_ui_activated = true
|
39
|
-
# request.variant = :ui
|
40
|
-
|
41
|
-
# if request.format.html? && params[:_skip_render] != 'true'
|
42
|
-
# @__json_ui_rendering = true
|
43
|
-
# request.format = 'json'
|
44
|
-
# end
|
45
|
-
# end
|
46
|
-
# end
|
47
|
-
|
48
|
-
# def __json_ui_commit(options)
|
49
|
-
# if @__json_ui_rendering
|
50
|
-
# if (hash = json_transformation_start).is_a?(Hash)
|
51
|
-
# case params[:_render]
|
52
|
-
# when 'v1'
|
53
|
-
# __json_ui_vue(hash, options)
|
54
|
-
# end
|
55
|
-
# end
|
56
|
-
# end
|
57
|
-
# end
|
58
|
-
|
59
|
-
# private
|
60
|
-
|
61
|
-
# def __json_ui_vue(hash, options)
|
62
|
-
# renderer_path = options[:renderer_path]
|
63
|
-
# @__json_ui_orig_page = response.body
|
64
|
-
# response.body = render_to_string(template: renderer_path, layout: false, content_type: 'text/html', locals: { page: hash, options: options })
|
65
|
-
# end
|
66
|
-
# end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# module Application::Json::Validation
|
2
|
-
# def __json_validate_perform
|
3
|
-
# if Rails.env.development? && params[:_validate] == 'true'
|
4
|
-
# if (hash = json_transformation_start).is_a?(Hash)
|
5
|
-
# json_validate = JSONValidate.new(hash)
|
6
|
-
# response_message = json_validate.valid?
|
7
|
-
# hash[:_json] = {
|
8
|
-
# validationErrors: response_message
|
9
|
-
# }
|
10
|
-
# end
|
11
|
-
# end
|
12
|
-
# end
|
13
|
-
# end
|