glib-web 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/forms_helper.rb +0 -0
- data/app/helpers/glib/json_ui/abstract_builder.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/dialogs.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/http.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/snackbars.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/windows.rb +0 -0
- data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
- data/app/helpers/glib/json_ui/list_builders.rb +0 -0
- 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 +0 -0
- data/app/helpers/glib/json_ui/view_builder/panels.rb +0 -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/dynamic_text_record.rb +0 -0
- data/app/models/glib/text.rb +0 -0
- data/app/policies/glib/application_policy.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/app/views/json_ui/vue/renderer.html.erb +0 -0
- data/app/views/json_ui/garage/_nav_menu.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_dialogs.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_http.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_reload.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_snackbars.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_timeouts.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_windows.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 +0 -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 +0 -0
- 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 +0 -0
- 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/show_hide.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/styled_boxes.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 +0 -0
- 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/home/slow.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 +0 -0
- data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/flat_centered.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/loading_indicator.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/_styled.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
- 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/flow.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 +0 -0
- data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
- 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/tables/layout.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/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 +1 -0
- data/lib/glib/crypt.rb +1 -1
- data/lib/glib/crypt/utils.rb +0 -0
- data/lib/glib/dynamic_text.rb +1 -1
- 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 +7 -2
- data/lib/glib/json_crawler/coverage.rb +0 -0
- data/lib/glib/json_crawler/http.rb +4 -8
- data/lib/glib/json_crawler/router.rb +0 -4
- data/lib/glib/test_helpers.rb +40 -0
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- data/lib/tasks/db.rake +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 92d880220ff29cbee352b8077c541e62b548796b4f1e7ef760f1f3b2967360be
|
|
4
|
+
data.tar.gz: 8d2f3393a965980996dc0408859f130551d7c840a88bd11435ecb48ee64aba99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a75416c64751c7b4680104e9bcd199bfec7945bf34a4e7cdc58f4fb9deadc16aa1a79e54e0d50dd3f968e133f6583f39fa0ef4979f2bff0e952eabf4ebc65593
|
|
7
|
+
data.tar.gz: f9024d9668c9e6198db90494237f7ca0f2a87199fbe5c1c17d2410f3382b1cd6600c8862aeb700171ab08172704b59bfa6a93359cda6ba57a11bea77f2aa93f3
|
|
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/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
|
|
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/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
data/lib/glib/crypt.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require_relative './crypt/utils'
|
|
1
|
+
require_relative './crypt/utils'
|
data/lib/glib/crypt/utils.rb
CHANGED
|
File without changes
|
data/lib/glib/dynamic_text.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require_relative './dynamic_text/config'
|
|
1
|
+
require_relative './dynamic_text/config'
|
|
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
|
|
@@ -12,11 +12,16 @@ module Glib
|
|
|
12
12
|
crawl json['footer']&.[]('childViews')
|
|
13
13
|
|
|
14
14
|
json['rightNavButtons']&.each do |button|
|
|
15
|
-
|
|
15
|
+
if button['buttons'].present?
|
|
16
|
+
button['buttons'].each do |inner_button|
|
|
17
|
+
click inner_button
|
|
18
|
+
end
|
|
19
|
+
else
|
|
20
|
+
click button
|
|
21
|
+
end
|
|
16
22
|
end
|
|
17
23
|
end
|
|
18
24
|
end
|
|
19
|
-
|
|
20
25
|
end
|
|
21
26
|
end
|
|
22
27
|
end
|
|
File without changes
|
|
@@ -40,14 +40,6 @@ module Glib
|
|
|
40
40
|
fetch(:delete, url, action, {})
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
def controller
|
|
44
|
-
@context.integration_session.controller
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def action_name
|
|
48
|
-
controller.action_name.to_sym
|
|
49
|
-
end
|
|
50
|
-
|
|
51
43
|
private
|
|
52
44
|
Response = Struct.new :code, :headers, :media_type, :body do
|
|
53
45
|
def initialize(*)
|
|
@@ -83,6 +75,10 @@ module Glib
|
|
|
83
75
|
@context.send(method, url, params: params, headers: http_header)
|
|
84
76
|
raw_response = @context.response
|
|
85
77
|
response = Response.new(raw_response.code.to_i, raw_response.headers, raw_response.media_type, raw_response.body)
|
|
78
|
+
|
|
79
|
+
if (controller = @context.controller)
|
|
80
|
+
Glib::JsonCrawler::Coverage.coverage_files.add(controller.class.instance_method(controller.action_name).source_location.first)
|
|
81
|
+
end
|
|
86
82
|
rescue => ex
|
|
87
83
|
if !inspect_result
|
|
88
84
|
case ex
|
|
@@ -19,10 +19,6 @@ module Glib
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def step(http, args)
|
|
22
|
-
if (controller = http.controller)
|
|
23
|
-
Glib::JsonCrawler::Coverage.coverage_files.add(controller.class.instance_method(http.action_name).source_location.first)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
22
|
case args['view']
|
|
27
23
|
when 'fields/submit-v1', 'fields/submit'
|
|
28
24
|
@depth += 1
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module Glib
|
|
2
|
+
module TestHelpers
|
|
3
|
+
def response_assert_equal
|
|
4
|
+
expected = __get_previous_result_from_git
|
|
5
|
+
result = __log(response.body)
|
|
6
|
+
assert_equal JSON.parse(expected), JSON.parse(result), "Result mismatch! #{__git_is_available? ? `git diff #{__log_dir}/#{__log_file}` : ''}"
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
private
|
|
10
|
+
def __git_is_available?
|
|
11
|
+
@__git_is_available ||= (`git status 2>&1` =~ /fatal/).nil?
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def __log_dir
|
|
15
|
+
if @__log_dir.nil?
|
|
16
|
+
@__log_dir = File.expand_path("controllers/#{self.class.to_s.underscore}_results", File.dirname(__FILE__))
|
|
17
|
+
unless File.directory?(@__log_dir)
|
|
18
|
+
FileUtils.mkdir_p(@__log_dir)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
@__log_dir
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def __log_file
|
|
25
|
+
@__log_file ||= "#{self.method_name}.json"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def __log json
|
|
29
|
+
File.open("#{File.join(__log_dir, __log_file)}", "w") do |f|
|
|
30
|
+
f << JSON.pretty_generate( JSON.parse(json) )
|
|
31
|
+
end
|
|
32
|
+
json
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def __get_previous_result_from_git
|
|
36
|
+
`git checkout -- "#{File.join(__log_dir, __log_file)}" > /dev/null 2>&1` if __git_is_available?
|
|
37
|
+
File.exists?(File.join(__log_dir, __log_file)) ? File.open(File.join(__log_dir, __log_file)).read : "\{\}"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
data/lib/glib/value.rb
CHANGED
|
File without changes
|
data/lib/glib/version.rb
CHANGED
|
File without changes
|
data/lib/tasks/db.rake
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.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -212,6 +212,7 @@ files:
|
|
|
212
212
|
- lib/glib/json_crawler/coverage.rb
|
|
213
213
|
- lib/glib/json_crawler/http.rb
|
|
214
214
|
- lib/glib/json_crawler/router.rb
|
|
215
|
+
- lib/glib/test_helpers.rb
|
|
215
216
|
- lib/glib/value.rb
|
|
216
217
|
- lib/glib/version.rb
|
|
217
218
|
- lib/tasks/db.rake
|
|
@@ -233,8 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
233
234
|
- !ruby/object:Gem::Version
|
|
234
235
|
version: '0'
|
|
235
236
|
requirements: []
|
|
236
|
-
|
|
237
|
-
rubygems_version: 2.6.8
|
|
237
|
+
rubygems_version: 3.1.2
|
|
238
238
|
signing_key:
|
|
239
239
|
specification_version: 4
|
|
240
240
|
summary: ''
|