shul 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/shul.rb +32 -13
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b168ef512ec4e28b1abbb2f8f989ca38c91b3d6
|
|
4
|
+
data.tar.gz: 468803f88af3fc33ed13a7c8b55457cf7ed5fbd5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afb4ed8944c840d8c22a5ba0356e0d489571d137f490fca2ea01b648d5ae8cc6c7a3d56860533e5cc403018ecbc2fbf140c96bc9cf886dc56e6da9e9a825d268
|
|
7
|
+
data.tar.gz: fb1da1638fc60ce7942bec6a0f9f3a56e8384a73cd6e9290cbeebb3080fc745ca4a28270b19f59f09581ee8f7cde7a06104de4198ba938eebeb73e1a562ff6a9
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/shul.rb
CHANGED
|
@@ -54,9 +54,21 @@ module Shul
|
|
|
54
54
|
|
|
55
55
|
doc = Rexle.new xml
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
attr = doc.root.attributes.to_h
|
|
58
|
+
|
|
59
|
+
bflag = if attr.has_key? :width and attr.has_key? :height then
|
|
60
|
+
|
|
61
|
+
attr[:width] = attr[:width].to_i
|
|
62
|
+
attr[:height] = attr[:height].to_i
|
|
63
|
+
|
|
64
|
+
false
|
|
65
|
+
else
|
|
66
|
+
true
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
shoes.app(attr) do
|
|
58
70
|
|
|
59
|
-
shul = Shul::App.new self, doc
|
|
71
|
+
shul = Shul::App.new self, doc, refresh: bflag, attributes: attr
|
|
60
72
|
|
|
61
73
|
end
|
|
62
74
|
|
|
@@ -66,7 +78,7 @@ module Shul
|
|
|
66
78
|
|
|
67
79
|
class App
|
|
68
80
|
|
|
69
|
-
def initialize(shoes_app, source)
|
|
81
|
+
def initialize(shoes_app, source, refresh: false, attributes: {title: 'Shul'})
|
|
70
82
|
|
|
71
83
|
doc = if source.is_a? Rexle then source
|
|
72
84
|
else
|
|
@@ -74,25 +86,32 @@ module Shul
|
|
|
74
86
|
Rexle.new(xml)
|
|
75
87
|
end
|
|
76
88
|
|
|
89
|
+
|
|
77
90
|
# To find out the window dimensions we must first render the app
|
|
78
91
|
shul = Window.new(shoes_app, doc)
|
|
79
92
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
93
|
+
if refresh then
|
|
94
|
+
|
|
95
|
+
h = attributes
|
|
83
96
|
|
|
84
|
-
|
|
85
|
-
wdth, hght = find_max_dimensions(box)
|
|
97
|
+
shoes_app.start do |app|
|
|
86
98
|
|
|
87
|
-
|
|
88
|
-
|
|
99
|
+
sleep 0.0001
|
|
100
|
+
|
|
101
|
+
box = doc.root.element('hbox | vbox')
|
|
89
102
|
|
|
90
|
-
|
|
103
|
+
ht, wh = find_max_dimensions(box)
|
|
104
|
+
|
|
105
|
+
h[:width],h[:height] = ht.to_i, wh.to_i
|
|
106
|
+
|
|
107
|
+
win = window(h) { Window.new self, doc }
|
|
91
108
|
|
|
92
|
-
|
|
93
|
-
|
|
109
|
+
app.close # closes the initial shoes app
|
|
110
|
+
shul = nil
|
|
94
111
|
|
|
112
|
+
end
|
|
95
113
|
end
|
|
114
|
+
|
|
96
115
|
end
|
|
97
116
|
|
|
98
117
|
private
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|