shul 0.3.6 → 0.3.7

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: b6b87391ec506132e39583379421870e593ce30c
4
- data.tar.gz: a8ee7b1fb5d22336eeb28dfac1895c3c9556106d
3
+ metadata.gz: 4520d3b8b63d440cb3e4e3536cbf7f0d481caf9e
4
+ data.tar.gz: 21572a0ead813c46c9f7b18993d6568d29e9e1cc
5
5
  SHA512:
6
- metadata.gz: 2a1aa243f5e348d00d7d28d7b7f87c724a6aaa5e346401d8bbfc8da7a137b55b9460865785847e8599f8e6908f4b7e7762cc273d630351bc226205d11d3348d5
7
- data.tar.gz: 5db8fb6579afcb3bc062c2ae80bcf8265a5c7e1a12ce62cd035e2b583abf457927ad784030d795c200605d962d868057474e81da57e6f4bcb0e6e1ef900ff3d4
6
+ metadata.gz: 1da36265405ba4d68e9e3f6fc9c4db5b41c33a2e40cb7702eaf227e75b8bc2899065131714547b6aa89e2dc730306f78b60d53fc6423358db416fb4bb4f5f601
7
+ data.tar.gz: d80b00c7cc23649dae3deba21899864db959b90000578f52c57093646c7e23db418e512da3f44b0dda4e84290fde0b61e88cab96b41dbcf301f98efa891dc6eb
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- c �Mk!�93 �d�0���R�� ���q�~?Yq���t!q����4jY���T����k�[ S��I��p� )��/��L�ix�u*o��盧E���q�����BF3�mNe��Y�}�ː ���,�g���u��� ˕%
2
- �g�QUD$ا�P��V]*��,�zစ7�|��`��c'�����Ш �<ʲ���t��7�@
1
+ ���K�� (�p�s0Ee1?����fq���n�u������!�G-<mE���e��e��,8㫣s���zX��ā�rVP��i���_ кe/[v}*��,�5��[���ނ
2
+ S��1�土� jϯ��N���ZX����>}�9�I���5f�S�D-����=�`����9���B�P��pY �x��g<��pw��X�͢�� o��$�ʯJV�O�R/%�mSg�RE����2����'v'N.���
data.tar.gz.sig CHANGED
Binary file
data/lib/shul.rb CHANGED
@@ -40,6 +40,9 @@ Shul::Main.new Shoes, xml
40
40
 
41
41
  # modifications
42
42
  #
43
+ # 26-Nov-2016: A background color can be applied to an hbox using the
44
+ # attribute *bgcolor*. The color of a label be changed using
45
+ # the attribute *color*.
43
46
  # 10-May-2016: The background color of a vbox can now be changed
44
47
  # An hbox or vbox can now have a margin
45
48
  # A label can now have a width. Helpful when using it within
@@ -50,6 +53,7 @@ Shul::Main.new Shoes, xml
50
53
 
51
54
 
52
55
 
56
+
53
57
  module RexleObject
54
58
  refine Rexle::Element do
55
59
 
@@ -252,9 +256,11 @@ module Shul
252
256
 
253
257
  def hbox(e)
254
258
 
255
- margin = e.attributes[:margin].to_i
259
+ h = e.attributes
260
+ margin = h[:margin].to_i
256
261
 
257
262
  flow = @shoes.flow margin: margin do
263
+ @shoes.background h[:bgcolor] if h[:bgcolor]
258
264
  e.elements.each {|x| method(x.name.sub(':','_').to_sym).call(x) }
259
265
  end
260
266
  e.obj = flow
@@ -312,17 +318,25 @@ module Shul
312
318
  e.obj = @shoes.image h[:src], top: h[:top], left: h[:left]
313
319
  end
314
320
 
315
- # e.g. <label value='light' width='40'/>
321
+ # e.g. <label value='light' width='40' color='#45a'/>
316
322
 
317
323
  def label(e)
318
324
 
319
- if e.attributes[:width] then
320
- e.obj = @shoes.para e.attributes[:value], width: e.attributes[:width]
321
- else
322
- e.obj = @shoes.para e.attributes[:value]
323
- end
325
+ h = { }
326
+ h.merge!({width: e.attributes[:width]}) if e.attributes[:width]
327
+ h.merge!({stroke: e.attributes[:color]}) if e.attributes[:color]
328
+ e.obj = @shoes.para e.attributes[:value] , h
324
329
 
325
330
  end
331
+
332
+ def location=(source)
333
+
334
+ xml, _ = RXFHelper.read(source)
335
+ doc = Rexle.new(xml)
336
+
337
+ @shoes.close
338
+
339
+ end
326
340
 
327
341
  def listbox(e)
328
342
  a = e.xpath 'listem/attribute::label'
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.6
4
+ version: 0.3.7
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: 2016-05-10 00:00:00.000000000 Z
34
+ date: 2016-11-26 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rexle
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.4.8
103
+ rubygems_version: 2.5.1
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Shoes + XUL = SHUL
metadata.gz.sig CHANGED
Binary file