glib-web 0.4.21 → 0.4.22

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: aa9a08c06c8619898e10d67b5d68ee274401b277ce6da81c740d0e810a64cdb6
4
- data.tar.gz: b71b5dbe3831eadbb862401842cdc682d0e611377f6047d8f3824348ab223eb3
3
+ metadata.gz: 8246b8bcd18dcbe28425e75bbce1a103b1bbc9b91fb76ca55e377de79e0d26e7
4
+ data.tar.gz: 8b9bc8c89bdb6937f22b189366865f0e131909e0607c7dccec353e6f72b9da35
5
5
  SHA512:
6
- metadata.gz: ef9bc351860c115971670b239749bee8e65e8720ef9938b15c711093d15e6d95f12260e72bb82851e359d8e82fc02cfaa6c962c215b0d332cf39053b3137202e
7
- data.tar.gz: eb7e1725bd909c633710ea0d8bb45b74468c850231a7adb0b175822141d6b76d1cf7f747919756184429b57702637c2590ab676617fdb545f2aacb5b2764dd63
6
+ metadata.gz: 20ba5755e83751d7898b731d1772a5502a2b49b7972dfb2dc9069dfe221838e6881ef0840b57344c433b2e098ceb0010463efc956525cbba9c2a5ebe0d73d055
7
+ data.tar.gz: db0c95b2a8123f3e992054509d06c60043acd203ece6d52f1cd455374f70faed07a72ede92537feb6259e5a666ec6d0cdc1416a8dc058b890085901d7aa466b0
@@ -21,7 +21,8 @@ module Glib::Auth
21
21
  module Overrides
22
22
  public # Override
23
23
  def policy(record)
24
- return @__pundit_policy if defined? @__pundit_policy
24
+ @__pundit_policies ||= {}
25
+ return @__pundit_policies[record] if @__pundit_policies[record]
25
26
 
26
27
  if record.is_a?(Symbol) && record.to_s.ends_with?('_admin')
27
28
  policy_class = CommonAdminPolicy
@@ -29,13 +30,12 @@ module Glib::Auth
29
30
  policy_class = Pundit::PolicyFinder.new(record).policy
30
31
  end
31
32
  raise "Policy not found for #{record.class}" unless policy_class
32
- @__pundit_policy = policy_class.new(current_user, record, self, request, params, *policy_class.args_builder.call(self))
33
+ @__pundit_policies[record] = policy_class.new(current_user, record, self, request, params, *policy_class.args_builder.call(self))
33
34
  end
34
35
  end
35
36
 
36
37
  public
37
38
  def raise_access_denied(record)
38
- # raise Pundit::NotAuthorizedError.new(record: record, policy: policy(record), query: "#{action_name}?")
39
39
  raise UnauthorizedError.new(record: record, policy: policy(record), query: "#{action_name}?")
40
40
  end
41
41
 
@@ -23,6 +23,9 @@ module Glib
23
23
  string :subsubtitle
24
24
  string :imageUrl
25
25
  action :onClick
26
+
27
+ # NOTE: Experimental. Still deciding whether this needs to be a full blown panel or
28
+ # an array of badges (with relevant properties, e.g. text, color, etc)
26
29
  views :accessoryViews
27
30
  end
28
31
 
@@ -70,8 +70,8 @@ class Glib::JsonUi::ViewBuilder
70
70
  end
71
71
 
72
72
  class Number < Text
73
- date :min
74
- date :max
73
+ int :min
74
+ int :max
75
75
  end
76
76
 
77
77
  class Email < Text
@@ -139,13 +139,6 @@ class Glib::JsonUi::ViewBuilder
139
139
  string :align
140
140
  end
141
141
 
142
- # class Split < View
143
- # views :leftViews
144
- # views :centerViews
145
- # views :rightViews
146
- # string :align
147
- # end
148
-
149
142
  class Split < View
150
143
  def content(block)
151
144
  block.call page.split_content_builder
@@ -14,7 +14,9 @@ json_ui_page json do |page|
14
14
  end
15
15
  template.thumbnail title: 'Item with subtitle', subtitle: 'Item subtitle'
16
16
  template.thumbnail title: 'Item with thumbnail image', subtitle: 'Item subtitle', imageUrl: glib_json_image_standard_url
17
- template.thumbnail title: 'Item with accessories', subtitle: 'Item subtitle', accessoryViews: ->(thumbnail) do
17
+ template.featured title: 'Featured with featured image', subtitle: 'Item subtitle', imageUrl: glib_json_image_standard_url
18
+
19
+ template.thumbnail title: 'Item with accessories (Experimental)', subtitle: 'Item subtitle', accessoryViews: ->(thumbnail) do
18
20
  thumbnail.panels_horizontal childViews: ->(horizontal) do
19
21
  horizontal.chip text: 'finished'
20
22
  horizontal.spacer width: 10
@@ -22,7 +24,6 @@ json_ui_page json do |page|
22
24
  end
23
25
  end
24
26
 
25
- template.featured title: 'Featured with featured image', subtitle: 'Item subtitle', imageUrl: glib_json_image_standard_url
26
27
  end
27
28
  end
28
29
  end
@@ -28,21 +28,24 @@ json_ui_page json do |page|
28
28
  end
29
29
  end, ->(section) do
30
30
  section.header padding: glib_json_padding_list, childViews: ->(header) do
31
- header.h2 text: 'Layout with sub-panels'
31
+ header.h2 text: 'Layout with predefined sub-panels'
32
32
  header.spacer height: 6
33
- header.label text: 'Each sub-panel is a vertical panel'
33
+ header.label text: 'Each sub-panel is a responsive panel'
34
34
  end
35
35
 
36
36
  section.rows builder: ->(template) do
37
37
  template.thumbnail title: 'Split', subtitle: 'Sub-panels: left, center, right', onClick: ->(action) do
38
38
  action.windows_open url: json_ui_garage_url(path: 'panels/split')
39
39
  end
40
- template.thumbnail title: 'Page', subtitle: 'Sub-panels: header, content, footer', onClick: ->(action) do
40
+ template.thumbnail title: 'Page', subtitle: 'Sub-panels: header, body, footer', onClick: ->(action) do
41
41
  action.windows_open url: json_ui_garage_url(path: 'pages/index')
42
42
  end
43
43
  template.thumbnail title: 'List', subtitle: 'Sub-panels: header, footer', onClick: ->(action) do
44
44
  action.windows_open url: json_ui_garage_url(path: 'lists/index')
45
45
  end
46
+ template.thumbnail title: 'Table (Web Only)', subtitle: 'Sub-panels: header, footer', onClick: ->(action) do
47
+ action.windows_open url: json_ui_garage_url(path: 'tables/index')
48
+ end
46
49
 
47
50
  end
48
51
  end, ->(section) do
@@ -54,13 +57,16 @@ json_ui_page json do |page|
54
57
  template.thumbnail title: 'List', subtitle: 'Rows without columns', onClick: ->(action) do
55
58
  action.windows_open url: json_ui_garage_url(path: 'lists/index')
56
59
  end
60
+ template.thumbnail title: 'Table (Web Only)', subtitle: 'Rows with columns', onClick: ->(action) do
61
+ action.windows_open url: json_ui_garage_url(path: 'tables/index')
62
+ end
57
63
 
58
64
  end
59
65
  end, ->(section) do
60
66
  section.header padding: glib_json_padding_list, childViews: ->(header) do
61
67
  header.h2 text: 'Non-layout'
62
68
  header.spacer height: 6
63
- header.label text: 'Adds functionality to a vertical layout'
69
+ header.label text: 'Adds functionality to a responsive layout'
64
70
  end
65
71
 
66
72
  section.rows builder: ->(template) do
@@ -1,55 +1,88 @@
1
1
  json.title 'Responsive Panels'
2
2
 
3
- json_ui_page json do |page|
4
- render "#{@path_prefix}/nav_menu", json: json, page: page
5
-
6
- page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
- scroll.label text: 'Shrink the browser\'s width to see how the column panels are rearranged. On mobile screens, they are always arranged vertically'
8
-
9
- scroll.spacer height: 20
10
- scroll.h2 text: 'With 12 columns'
11
- scroll.spacer height: 6
12
- scroll.panels_responsive width: 'matchParent', childViews: ->(horizontal) do
13
- horizontal.panels_column lg: { cols: 8 }, backgroundColor: '#c3cad2', childViews: ->(column) do
14
- column.button text: '1'
15
- end
16
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#b3bac2', childViews: ->(column) do
17
- column.button text: '2'
18
- end
19
- end
20
-
21
- scroll.spacer height: 20
22
- scroll.h2 text: 'With more than 12 columns'
23
- scroll.spacer height: 6
24
- scroll.panels_responsive width: 'matchParent', childViews: ->(horizontal) do
25
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#c3cad2', childViews: ->(column) do
26
- column.button text: '1'
27
- end
28
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#b3bac2', childViews: ->(column) do
29
- column.button text: '2'
30
- end
31
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#c3cad2', childViews: ->(column) do
32
- column.button text: '3'
33
- end
34
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#b3bac2', childViews: ->(column) do
35
- column.button text: '4'
36
- end
37
- horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#c3cad2', childViews: ->(column) do
38
- column.button text: '5'
39
- end
40
- end
41
-
42
- scroll.spacer height: 20
43
- scroll.h2 text: 'With responsive paddings'
44
- scroll.spacer height: 6
45
- scroll.panels_responsive width: 'matchParent', childViews: ->(horizontal) do
46
- horizontal.panels_column lg: { cols: 8, padding: { right: 20 } }, childViews: ->(column) do
47
- column.button width: 'matchParent', text: '1'
48
- end
49
- horizontal.panels_column lg: { cols: 4 }, childViews: ->(column) do
50
- column.button width: 'matchParent', text: '2'
51
- end
3
+ page = json_ui_page json
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
+ scroll.label text: 'Shrink the browser\'s width to see how the column panels are rearranged. On mobile screens, they are always arranged vertically'
8
+
9
+ scroll.spacer height: 20
10
+ scroll.h2 text: 'With 12 columns'
11
+ scroll.spacer height: 6
12
+ scroll.panels_responsive width: 'matchParent', childViews: ->(horizontal) do
13
+ horizontal.panels_column lg: { cols: 8 }, backgroundColor: '#c3cad2', childViews: ->(column) do
14
+ column.button text: '1'
15
+ end
16
+ horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#b3bac2', childViews: ->(column) do
17
+ column.button text: '2'
18
+ end
19
+ end
20
+
21
+ scroll.spacer height: 20
22
+ scroll.h2 text: 'With more than 12 columns'
23
+ scroll.spacer height: 6
24
+ scroll.panels_responsive width: 'matchParent', childViews: ->(horizontal) do
25
+ horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#c3cad2', childViews: ->(column) do
26
+ column.button text: '1'
27
+ end
28
+ horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#b3bac2', childViews: ->(column) do
29
+ column.button text: '2'
30
+ end
31
+ horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#c3cad2', childViews: ->(column) do
32
+ column.button text: '3'
33
+ end
34
+ horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#b3bac2', childViews: ->(column) do
35
+ column.button text: '4'
36
+ end
37
+ horizontal.panels_column lg: { cols: 4 }, backgroundColor: '#c3cad2', childViews: ->(column) do
38
+ column.button text: '5'
39
+ end
40
+ end
41
+
42
+ scroll.spacer height: 20
43
+ scroll.h2 text: 'With responsive paddings'
44
+ scroll.spacer height: 6
45
+ scroll.panels_responsive width: 'matchParent', childViews: ->(horizontal) do
46
+ horizontal.panels_column lg: { cols: 8, padding: { right: 20 } }, childViews: ->(column) do
47
+ column.button width: 'matchParent', text: '1'
48
+ end
49
+ horizontal.panels_column lg: { cols: 4 }, childViews: ->(column) do
50
+ column.button width: 'matchParent', text: '2'
51
+ end
52
+ end
53
+
54
+ scroll.spacer height: 20
55
+ scroll.h2 text: 'With mixed components'
56
+ scroll.spacer height: 6
57
+ scroll.panels_responsive width: 'matchParent', childViews: ->(responsive) do
58
+ responsive.h4 text: 'Heading'
59
+
60
+ responsive.label text: 'Label'
61
+
62
+ # responsive.spacer height: 10
63
+ # responsive.image url: glib_json_image_standard_url, width: 100, height: 100
64
+
65
+ # responsive.spacer height: 10
66
+ # responsive.image url: glib_json_image_standard_url
67
+
68
+ # responsive.panels_column lg: { cols: 8, padding: { right: 20 } }, childViews: ->(column) do
69
+ # column.button width: 'matchParent', text: '1'
70
+ # end
71
+ # responsive.panels_column lg: { cols: 4 }, childViews: ->(column) do
72
+ # column.button width: 'matchParent', text: '2'
73
+ # end
74
+
75
+ responsive.panels_column lg: { cols: 8 }, backgroundColor: '#c3cad2', childViews: ->(column) do
76
+ column.button text: '1'
77
+ end
78
+ responsive.panels_column lg: { cols: 4 }, backgroundColor: '#b3bac2', childViews: ->(column) do
79
+ column.button text: '2'
52
80
  end
53
81
 
82
+ responsive.spacer height: 10
83
+ responsive.button text: 'Button'
54
84
  end
85
+
86
+ scroll.spacer height: 20
87
+
55
88
  end
@@ -178,131 +178,6 @@ json_ui_page json do |page|
178
178
  end
179
179
  end
180
180
  end
181
-
182
-
183
-
184
-
185
-
186
- # scroll.h1 text: '2 columns'
187
- # scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
188
- # panel.button text: '1'
189
- # end, rightViews: ->(panel) do
190
- # panel.button text: '2'
191
- # end
192
-
193
- # scroll.label text: "\n"
194
- # scroll.h1 text: '3 columns'
195
- # scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
196
- # panel.button text: '1'
197
- # end, centerViews: ->(panel) do
198
- # panel.button width: 'matchParent', text: '2'
199
- # end, rightViews: ->(panel) do
200
- # panel.button text: '3'
201
- # end
202
-
203
- # scroll.label text: "\n"
204
- # scroll.h1 text: 'Expandable left'
205
- # scroll.panels_split width: 'matchParent', centerViews: ->(panel) do
206
- # panel.button width: 'matchParent', text: '1'
207
- # end, rightViews: ->(panel) do
208
- # panel.button text: '2'
209
- # end
210
-
211
- # scroll.label text: "\n"
212
- # scroll.h1 text: 'Expandable right'
213
- # scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
214
- # panel.button text: '1'
215
- # end, centerViews: ->(panel) do
216
- # panel.button width: 'matchParent', text: '2'
217
- # end
218
-
219
- # scroll.label text: "\n"
220
- # scroll.h1 text: 'Short center text'
221
- # scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
222
- # panel.button text: '1'
223
- # end, centerViews: ->(panel) do
224
- # panel.label text: 'short'
225
- # end, rightViews: ->(panel) do
226
- # panel.button text: '2'
227
- # end
228
-
229
- # scroll.label text: "\n"
230
- # scroll.h1 text: 'Long center text'
231
- # scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
232
- # panel.button text: '1'
233
- # end, centerViews: ->(panel) do
234
- # panel.label text: 'a very very very very very very very very very very very very very very very very very very very very very very very very very very very very long text'
235
- # end, rightViews: ->(panel) do
236
- # panel.button text: '2'
237
- # end
238
-
239
- # scroll.label text: "\n"
240
- # scroll.h1 text: 'Few center items'
241
- # scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
242
- # panel.button text: 'L'
243
- # end, centerViews: ->(panel) do
244
- # panel.panels_horizontal childViews: ->(h) do
245
- # h.button text: '1'
246
- # h.button text: '2'
247
- # h.button text: '3'
248
- # end
249
- # end, rightViews: ->(panel) do
250
- # panel.button text: 'R'
251
- # end
252
-
253
- # scroll.label text: "\n"
254
- # scroll.h1 text: 'Many center items'
255
- # scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
256
- # panel.button text: 'L'
257
- # end, centerViews: ->(panel) do
258
- # panel.panels_horizontal childViews: ->(h) do
259
- # (1..20).each do |index|
260
- # h.button text: index
261
- # end
262
- # end
263
- # end, rightViews: ->(panel) do
264
- # panel.button text: 'R'
265
- # end
266
-
267
- # scroll.label text: "\n"
268
- # scroll.h1 text: 'Center filled equally'
269
- # scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
270
- # panel.button text: 'L'
271
- # end, centerViews: ->(panel) do
272
- # panel.panels_horizontal backgroundColor: '#b3bac2', distribution: 'fillEqually', childViews: ->(h) do
273
- # h.button text: '1'
274
- # h.button text: '2'
275
- # h.button text: '3'
276
- # end
277
- # end, rightViews: ->(panel) do
278
- # panel.button text: 'R'
279
- # end
280
-
281
- # scroll.label text: "\n"
282
- # scroll.h1 text: 'Center spaced equally'
283
- # scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
284
- # panel.button text: 'L'
285
- # end, centerViews: ->(panel) do
286
- # panel.panels_horizontal backgroundColor: '#b3bac2', distribution: 'spaceEqually', childViews: ->(h) do
287
- # h.button text: '1'
288
- # h.button text: '2'
289
- # h.button text: '3'
290
- # end
291
- # end, rightViews: ->(panel) do
292
- # panel.button text: 'R'
293
- # end
294
-
295
- # scroll.label text: "\n"
296
- # scroll.h1 text: 'Combo 1'
297
- # scroll.panels_split width: 'matchParent', leftViews: ->(panel) do
298
- # panel.label text: 'a very very very very very very very very very very very very very very very very very very very very very very very very very very very very long text'
299
- # end, rightViews: ->(panel) do
300
- # panel.panels_horizontal backgroundColor: '#b3bac2', distribution: 'spaceEqually', childViews: ->(h) do
301
- # h.label text: 'Label One'
302
- # h.label text: 'Label Two'
303
- # end
304
- # end
305
-
306
181
  end
307
182
  end
308
183
 
@@ -1,38 +1,42 @@
1
1
  json.title 'Views'
2
2
 
3
- json_ui_page json do |page|
4
- render "#{@path_prefix}/nav_menu", json: json, page: page
5
-
6
- page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
- scroll.h2 text: 'Avatar'
8
- scroll.spacer height: 6
9
- scroll.avatar url: glib_json_image_avatar_url
3
+ page = json_ui_page json
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
+ scroll.h2 text: 'Avatar'
8
+ scroll.spacer height: 6
9
+ scroll.avatar url: glib_json_image_avatar_url
10
10
 
11
- scroll.spacer height: 20
12
- scroll.h2 text: 'Icon'
13
- scroll.spacer height: 6
14
- scroll.icon name: 'info'
11
+ scroll.spacer height: 20
12
+ scroll.h2 text: 'Icon'
13
+ scroll.spacer height: 6
14
+ scroll.icon name: 'info'
15
15
 
16
- scroll.spacer height: 20
17
- scroll.h2 text: 'Image with URL'
18
- scroll.spacer height: 6
19
- scroll.image width: 100, url: glib_json_image_standard_url
16
+ scroll.spacer height: 20
17
+ scroll.h2 text: 'Full-width image'
18
+ scroll.spacer height: 6
19
+ scroll.image url: glib_json_image_standard_url
20
20
 
21
- scroll.spacer height: 20
22
- scroll.h2 text: 'Image with base64 data'
23
- scroll.spacer height: 6
24
- scroll.image height: 100, base64Data: 'data:image/gif;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl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
21
+ scroll.spacer height: 20
22
+ scroll.h2 text: 'Width-constraint image'
23
+ scroll.spacer height: 6
24
+ scroll.image width: 100, url: glib_json_image_standard_url
25
+
26
+ scroll.spacer height: 20
27
+ scroll.h2 text: 'Image with base64 data'
28
+ scroll.spacer height: 6
29
+ scroll.image height: 100, base64Data: 'data:image/gif;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9DQ0O/v70w5MLypoG8wKOuwsP/g4P/Q0IcwKEswKMl8aJ9fX2xjdOtGRs/Pz+Dg4GImIP8gIH0sKEAwKKmTiKZ8aB/f39Wsl+LFt8dgUE9PT5x5aHBwcP+AgP+WltdgYMyZfyywz78AAAAAAAD///8AAP9mZv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw=='
25
30
 
26
- scroll.spacer height: 20
27
- scroll.h2 text: 'QR Code as base64 image'
28
- scroll.spacer height: 6
29
- if defined? RQRCode
30
- qr_content = { version: 1, message: 'This is a test' }
31
- qr = RQRCode::QRCode.new(qr_content.to_json)
32
- scroll.image base64Data: qr.as_png(size: 300).to_data_url
33
- else
34
- scroll.label text: 'Include "rqrcode" gem to enable this'
35
- end
36
-
31
+ scroll.spacer height: 20
32
+ scroll.h2 text: 'QR Code as base64 image'
33
+ scroll.spacer height: 6
34
+ if defined? RQRCode
35
+ qr_content = { version: 1, message: 'This is a test' }
36
+ qr = RQRCode::QRCode.new(qr_content.to_json)
37
+ scroll.image base64Data: qr.as_png(size: 300).to_data_url
38
+ else
39
+ scroll.label text: 'Include "rqrcode" gem to enable this'
37
40
  end
41
+
38
42
  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.4.21
4
+ version: 0.4.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''