glib-web 0.6.12 → 0.6.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00d3e8e1909199ce9f70bd9329d1bf134d2ae1f05eea0f9ab549e9577f4b605e
4
- data.tar.gz: ba737a73886d6c57c61c37cf2dff6ca2833d84088295ba90ce8427682cab8229
3
+ metadata.gz: e20093312ead5735f1515024fb1d3f3ed9489a5b779b6bebed5389ee5d467387
4
+ data.tar.gz: 59d7bf932016ba5d9cbec3b9496a4684dcb1d9152315a04be64e76d3771b9e34
5
5
  SHA512:
6
- metadata.gz: 7fb56cbc0fcf302109b6becad2c91c11865ed22ecfd472165f6948388e33418f321cfbe41bf401b80b4131c8c9ac91ed9a39e95975b77cd2f5cafb186f26f80f
7
- data.tar.gz: f65100979137bbf28b724e7270f40f9c45435d647895e97bfd2eec196af424ef5cbed15341fa80dce30b16b298f8add76a827d19c85587bec66edf3e9d06d1b9
6
+ metadata.gz: e309034217ac808d8833d2790f247269bb61034d649b23bfdabda48bbb382aeeaa2aa4411a3a6307516df5ed7711ee5c894a12e5a3fc54f392f4690b64312331
7
+ data.tar.gz: 9d10545b5a48359871342d59919f058876f980ee970587a3638d8f89f07d6ff04557de3437ca42a8b93afa4c299b6b8463fb4497618be7956cad79b2d52b653a
@@ -38,11 +38,17 @@ module Glib::Analytics
38
38
 
39
39
  if group.nil? && action.nil? && !request.headers['referer'].nil?
40
40
  host = URI.parse(request.headers['referer']).host
41
- if host == request.host || !/^(.*).#{request.host.sub('www','')}/.match(host).nil?
42
-
43
- route = Rails.application.routes.recognize_path(request.headers['referer'].delete_suffix('/'))
44
- group = route[:controller]
45
- action = route[:action]
41
+ if host == request.host || !/^(.*).#{request.host.sub('www', '')}/.match(host).nil?
42
+ referer_url = request.headers['referer'].delete_suffix('/')
43
+
44
+ begin
45
+ route = Rails.application.routes.recognize_path(referer_url)
46
+ group = route[:controller]
47
+ action = route[:action]
48
+ rescue ActionController::RoutingError
49
+ # Do nothing. This may happen when the referrer is from the same domain,
50
+ # but not from the same Rails app.
51
+ end
46
52
  end
47
53
  end
48
54
 
@@ -35,6 +35,8 @@ module Glib
35
35
  hash :analytics
36
36
  hash :tooltip
37
37
  hash :tour
38
+ array :extensions
39
+
38
40
 
39
41
  # def initialize(json, page)
40
42
  # super(json, page)
@@ -12,7 +12,7 @@ json_ui_page json do |page|
12
12
  template.thumbnail title: 'Click me', onClick: ->(action) do
13
13
  action.windows_open url: json_ui_garage_url(path: 'home/blank')
14
14
  end
15
- template.thumbnail title: 'Item with subtitle', subtitle: 'Item subtitle'
15
+ template.thumbnail title: 'Item with icon and subtitle', subtitle: 'Item subtitle', icon: 'facebook'
16
16
  template.thumbnail title: 'Item with chips', chips: ->(menu) do
17
17
  menu.button text: 'Finished', styleClass: 'info'
18
18
  menu.button props: { text: 'Succeeded', styleClass: 'success' }
@@ -24,6 +24,8 @@ page.table sections: [
24
24
  action.windows_reload url: json_ui_garage_url(path: 'tables/layout', orders: reversed_order_params(order_key))
25
25
  end
26
26
  end
27
+
28
+ header.label text: "Markdown"
27
29
  end
28
30
 
29
31
  items = [1, 2, 3]
@@ -32,8 +34,11 @@ page.table sections: [
32
34
  column_indexes.each do |i|
33
35
  cell.label text: "Data #{item}"
34
36
  end
35
- end, onClick: ->(action) do
36
- action.windows_open url: json_ui_garage_url(path: 'home/blank')
37
+
38
+ markdown = "* [Item 1](#{json_ui_garage_url(path: 'home/blank')})\n"\
39
+ "* Item 2\n"\
40
+ '* Item 3'
41
+ cell.markdown text: markdown
37
42
  end
38
43
  end
39
44
  end
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.6.12
4
+ version: 0.6.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''