htmlcom 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/htmlcom.rb +17 -8
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e96d1c92647c0547a158d8372a2c51c41ccf6d3d22f68adf3546203511bac21f
|
4
|
+
data.tar.gz: 228aabfeb413f84de57e9cd1f29491b28c7a515fae798a3259d2531a117c0069
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b16a5343918b17349de476895f189c2623543dfae67b5963ff479389032c34ea1477c4d63dd437d9c083ac9039c04d60e1338767f35093fb3f86faa5cdc0840
|
7
|
+
data.tar.gz: 9192e38cad6df5088947398a7f42be5fb42c6f5468f0c7ebb61c4f8c40a9de87e9b1fb352dbd70a4bac0bb25d22870caa4380f8aca9dd1047fd37f4b27d59845
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/htmlcom.rb
CHANGED
@@ -335,11 +335,14 @@ EOF
|
|
335
335
|
|
336
336
|
def initialize(obj)
|
337
337
|
|
338
|
+
puts 'about to build object: ' + obj.inspect
|
338
339
|
@doc = build(obj)
|
339
340
|
puts '@doc.xml : ' + @doc.xml.inspect
|
341
|
+
|
340
342
|
if @id then
|
343
|
+
puts '@tag, @html -> ' + [@tag, @htmltag].inspect
|
341
344
|
elem = @doc.root.element(@tag + '/' + @htmltag)
|
342
|
-
puts '
|
345
|
+
puts 'elem2: ' +elem.inspect
|
343
346
|
elem.attributes[:name] = @id
|
344
347
|
elem.attributes[:id] = @id
|
345
348
|
end
|
@@ -361,6 +364,7 @@ EOF
|
|
361
364
|
private
|
362
365
|
|
363
366
|
def build(rawobj)
|
367
|
+
puts 'rawobj: ' + rawobj.inspect
|
364
368
|
obj = rawobj.is_a?(Hash) ? RexleBuilder.new(rawobj).to_a : rawobj
|
365
369
|
Rexle.new(obj)
|
366
370
|
end
|
@@ -371,6 +375,7 @@ EOF
|
|
371
375
|
|
372
376
|
def initialize(rawobj)
|
373
377
|
|
378
|
+
puts '@tag: ' + @tag.inspect
|
374
379
|
if @label then
|
375
380
|
|
376
381
|
obj = [{label: @label}, rawobj]
|
@@ -443,7 +448,7 @@ EOF
|
|
443
448
|
@id = id
|
444
449
|
@label = label
|
445
450
|
super( [@htmltag, {type: 'text', value: text}])
|
446
|
-
|
451
|
+
puts 'Text: after super'
|
447
452
|
end
|
448
453
|
|
449
454
|
end
|
@@ -496,7 +501,7 @@ EOF
|
|
496
501
|
|
497
502
|
def initialize(inputs: {}, options: {}, id: 'form1', method: :get, action: '', debug: false)
|
498
503
|
|
499
|
-
@debug
|
504
|
+
@debug = debug
|
500
505
|
|
501
506
|
h = inputs.map do |key, value|
|
502
507
|
|
@@ -505,11 +510,13 @@ EOF
|
|
505
510
|
puts 'klass: ' + value.first.inspect
|
506
511
|
end
|
507
512
|
|
508
|
-
[key, value]
|
513
|
+
[key.to_sym, value]
|
509
514
|
end.to_h
|
510
515
|
|
511
|
-
options
|
512
|
-
|
516
|
+
if options then
|
517
|
+
options.each do |key, value|
|
518
|
+
h[key.to_sym] << value
|
519
|
+
end
|
513
520
|
end
|
514
521
|
|
515
522
|
klass = {
|
@@ -526,7 +533,7 @@ EOF
|
|
526
533
|
id = key
|
527
534
|
puts 'value: ' + value.inspect
|
528
535
|
type, content = value
|
529
|
-
action = case type
|
536
|
+
action = case type.to_sym
|
530
537
|
when :dropdown
|
531
538
|
content = value.last
|
532
539
|
'Select'
|
@@ -534,7 +541,9 @@ EOF
|
|
534
541
|
'Enter'
|
535
542
|
end
|
536
543
|
|
537
|
-
|
544
|
+
puts 'type: ' + type.inspect
|
545
|
+
obj = klass[type.to_sym].new content, id: id, label: action + ' ' + id.to_s
|
546
|
+
puts 'after klass'
|
538
547
|
|
539
548
|
obj.to_doc.root.element(type.to_s).elements.each do |e|
|
540
549
|
@form.html_element.add e
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: htmlcom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
JNdZs/7/k4vQlgqYQ3HnoA6GgIanmCgNkediqllxv/epLyIkW2DSJGcYXM8QjSEk
|
37
37
|
+4RQ8UHDCOWHpFPlT5Pgc0wPc7KyXosRYHg=
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date: 2022-
|
39
|
+
date: 2022-08-06 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: jsmenubuilder
|
metadata.gz.sig
CHANGED
Binary file
|