shul 0.3.12 → 0.3.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
  SHA1:
3
- metadata.gz: 986d36724410915c839699ac3eddfb05b28e8635
4
- data.tar.gz: c7d8c19e1f6c8b8a40c76a6f10538451e2973339
3
+ metadata.gz: 20e97767b7db378996a7a95ec176b5149be6bcc9
4
+ data.tar.gz: 9d6792343efbe2c637ffe91c701366777ab51f7d
5
5
  SHA512:
6
- metadata.gz: 9f7df1e42bea6902649a4357e3739da15f2cfb0c1c2e476b46c0b294172bec87a824e97e7708e12a93aacb58b8966eebaa75b1df71ffdd3ff61d35e2ab16c972
7
- data.tar.gz: 1bfbbc2ab1b4097a4c84170b52821a58e970163db0dcbd4665d6ad6640cd5cc195f5d68c54b4d0cabd57c3bb9e445e083d0497cb3bd78fb9d2f67dd94e80ee7c
6
+ metadata.gz: 25b371058131849a62509355cf7ae5b8676732b04b3330039ba2501d9a4d006485a93f96b03a3dc5dcbac5068af7f5d6a34b4bdb0c990050893161a87ecbde44
7
+ data.tar.gz: 88530a2d21351fa77a50f864bf101deff5e63ad3deabd4ca2cc4d521223300da1eaff35880117ab1611f10e483b7d47ca79f031cf261c172d6f53d5601011383
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/shul.rb CHANGED
@@ -40,6 +40,7 @@ Shul::Main.new Shoes, xml
40
40
 
41
41
  # modifications
42
42
  #
43
+ # 23-Jan-2017: A Vbox or Hbox width can now be set
43
44
  # 13-Jan-2017: The script tag is now executed only after the
44
45
  # document elements have been loaded
45
46
  # 10-Jan-2017: Implemented methods value() and value=() for the label element
@@ -295,11 +296,14 @@ module Shul
295
296
  end
296
297
 
297
298
  def hbox(e)
298
-
299
+
300
+ h2 = {}
299
301
  h = e.attributes
300
- margin = h[:margin].to_i
301
302
 
302
- flow = @shoes.flow margin: margin do
303
+ h2.merge!({margin: h[:margin].to_i})
304
+ h2.merge!({width: h[:width].to_i}) if h[:width]
305
+
306
+ flow = @shoes.flow h2 do
303
307
  @shoes.background h[:bgcolor] if h[:bgcolor]
304
308
  e.elements.each {|x| method(x.name.sub(':','_').to_sym).call(x) }
305
309
  end
@@ -364,8 +368,12 @@ module Shul
364
368
 
365
369
  h = { }
366
370
  h.merge!({width: e.attributes[:width]}) if e.attributes[:width]
371
+ h.merge!({margin: e.attributes[:margin].to_i}) if e.attributes[:margin]
367
372
  h.merge!({stroke: e.attributes[:color]}) if e.attributes[:color]
368
-
373
+
374
+ # setting the para bgcolor doesn't work
375
+ #h.merge!({fill: e.attributes[:bgcolor]}) if e.attributes[:bgcolor]
376
+
369
377
  e.obj = @shoes.para e.attributes[:value] , h
370
378
 
371
379
 
@@ -374,7 +382,7 @@ module Shul
374
382
  end
375
383
 
376
384
  def e.value=(v)
377
- self.attributes[:value] = v
385
+ self.attributes[:value] = v
378
386
  self.obj.replace v
379
387
  end
380
388
 
@@ -442,9 +450,13 @@ module Shul
442
450
 
443
451
  def vbox(e)
444
452
 
453
+ h2 = {}
445
454
  h = e.attributes
446
- margin = h[:margin].to_i
447
- stack = @shoes.stack margin: margin do
455
+
456
+ h2.merge!({margin: h[:margin].to_i}) if h[:margin]
457
+ h2.merge!({width: h[:width].to_i}) if h[:width]
458
+
459
+ stack = @shoes.stack h2 do
448
460
  @shoes.background h[:bgcolor] if h[:bgcolor]
449
461
  e.elements.each {|x| method(x.name.sub(':','_').to_sym).call(x) }
450
462
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  /vGEl178JmTwkkyOnfudv6A8yY1uGiMvCrStPdAXg91qOFgoQFo/tUKAHYzSpxYg
32
32
  pcdACC5rdLX/DA==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-01-13 00:00:00.000000000 Z
34
+ date: 2017-01-23 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rexle
metadata.gz.sig CHANGED
Binary file