marty 1.1.3 → 1.1.4
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
- data/Gemfile.lock +2 -2
- data/app/models/marty/tag.rb +1 -1
- data/lib/marty/data_importer.rb +1 -1
- data/lib/marty/util.rb +1 -1
- data/lib/marty/version.rb +1 -1
- data/lib/marty/xl.rb +11 -11
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fec0c9190bc1dc21dcf6b875d0caea7e18a02b2
|
4
|
+
data.tar.gz: ba68943aa93960504fdb34e75396fd4fbeb5cb63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b9a2d7be4f5442c2fe6738e5a2bbb4bdc6644724eb4847af362f281428545491925273dfdf84d058a1373a967f82fcf5f3d8e564aeb74518d147e49ad875425
|
7
|
+
data.tar.gz: 538254b2f9553151d7a87b86ef6636b47e11b068d7e2f3f6e5ff8e68b005cf3655555994258a3a9a6520b4739606a5e8c1ee75801581a059fd3bfa6f6eafac9d
|
data/Gemfile.lock
CHANGED
@@ -4,7 +4,7 @@ PATH
|
|
4
4
|
marty (1.1.3)
|
5
5
|
axlsx (= 2.1.0pre)
|
6
6
|
coderay
|
7
|
-
delorean_lang (~> 0.3.
|
7
|
+
delorean_lang (~> 0.3.33)
|
8
8
|
json-schema
|
9
9
|
mcfly (= 0.0.19)
|
10
10
|
net-ldap (~> 0.12.0)
|
@@ -83,7 +83,7 @@ GEM
|
|
83
83
|
delayed_job_active_record (4.1.2)
|
84
84
|
activerecord (>= 3.0, < 5.2)
|
85
85
|
delayed_job (>= 3.0, < 5)
|
86
|
-
delorean_lang (0.3.
|
86
|
+
delorean_lang (0.3.33)
|
87
87
|
activerecord (>= 3.2)
|
88
88
|
treetop (~> 1.5)
|
89
89
|
diff-lcs (1.3)
|
data/app/models/marty/tag.rb
CHANGED
data/lib/marty/data_importer.rb
CHANGED
data/lib/marty/util.rb
CHANGED
data/lib/marty/version.rb
CHANGED
data/lib/marty/xl.rb
CHANGED
@@ -107,14 +107,14 @@ class Marty::Xl
|
|
107
107
|
x1, y1, x2, y2, w, h = d[1]
|
108
108
|
column_offset, row_offset = offset
|
109
109
|
|
110
|
-
y_coords = y2.is_a?(
|
111
|
-
x_coords = x2.is_a?(
|
110
|
+
y_coords = y2.is_a?(Integer) || d[0] != "image" ? [y1, y2] : [y1]
|
111
|
+
x_coords = x2.is_a?(Integer) || d[0] != "image" ? [x1, x2] : [x1]
|
112
112
|
|
113
113
|
# add the row offset:
|
114
114
|
y1, y2 = y_coords.map { |y|
|
115
|
-
if y.is_a?(
|
115
|
+
if y.is_a?(Integer)
|
116
116
|
row_offset + y
|
117
|
-
elsif y.is_a?(Hash) && y["off"].is_a?(
|
117
|
+
elsif y.is_a?(Hash) && y["off"].is_a?(Integer)
|
118
118
|
last_row + y["off"]
|
119
119
|
else
|
120
120
|
raise "bad offset #{y}"
|
@@ -123,7 +123,7 @@ class Marty::Xl
|
|
123
123
|
|
124
124
|
# add the column offset:
|
125
125
|
x1, x2 = x_coords.map { |x|
|
126
|
-
raise "bad range point #{x}" unless x.is_a?
|
126
|
+
raise "bad range point #{x}" unless x.is_a? Integer
|
127
127
|
column_offset + x
|
128
128
|
}
|
129
129
|
|
@@ -341,12 +341,12 @@ class Marty::Xl
|
|
341
341
|
|
342
342
|
y1, y2 = [y1, y2].map { |y|
|
343
343
|
next y unless y.is_a?(Hash)
|
344
|
-
raise "bad offset #{y}" unless y["off"].is_a?(
|
344
|
+
raise "bad offset #{y}" unless y["off"].is_a?(Integer)
|
345
345
|
ws.rows.last.row_index + y["off"]
|
346
346
|
}
|
347
347
|
|
348
348
|
[x1, y1, x2, y2].each { |x|
|
349
|
-
raise "bad range point #{x}" unless x.is_a?
|
349
|
+
raise "bad range point #{x}" unless x.is_a? Integer
|
350
350
|
}
|
351
351
|
Axlsx.cell_r(x1, y1) + ":" + Axlsx.cell_r(x2, y2)
|
352
352
|
end
|
@@ -400,7 +400,7 @@ class Marty::Xl
|
|
400
400
|
op, offset, data = opl
|
401
401
|
raise "bad offset #{offset}" unless
|
402
402
|
offset.is_a?(Array) && offset.length == 2 &&
|
403
|
-
offset.all? {|x| x.is_a?
|
403
|
+
offset.all? {|x| x.is_a? Integer}
|
404
404
|
# column offset, row offset:
|
405
405
|
column_offset, row_offset = offset
|
406
406
|
r_number, last_row = row_offset, row_offset
|
@@ -443,7 +443,7 @@ class Marty::Xl
|
|
443
443
|
|
444
444
|
# FIXME: need to handle Array?
|
445
445
|
raise "non hash arg for row_style" unless style.is_a?(Hash)
|
446
|
-
raise "bad row num #{opl}" unless row_num.is_a?(
|
446
|
+
raise "bad row num #{opl}" unless row_num.is_a?(Integer)
|
447
447
|
|
448
448
|
style = self.class.symbolize_keys(style, ':')
|
449
449
|
|
@@ -490,14 +490,14 @@ class Marty::Xl
|
|
490
490
|
range.is_a?(Array) && range.length == 6
|
491
491
|
x1, y1, x2, y2, w, h = range
|
492
492
|
raise "bad image range, width or height #{range}" unless
|
493
|
-
[ x1, y1, w, h ].all? {|x| x.is_a?
|
493
|
+
[ x1, y1, w, h ].all? {|x| x.is_a? Integer}
|
494
494
|
ws.add_image(image_src: "#{Rails.public_path}/images/#{img}",
|
495
495
|
noSelect: true,
|
496
496
|
noMove: true) do |image|
|
497
497
|
image.width = w
|
498
498
|
image.height = h
|
499
499
|
image.start_at x1, y1
|
500
|
-
image.end_at x2, y2 if x2.is_a?(
|
500
|
+
image.end_at x2, y2 if x2.is_a?(Integer) && y2.is_a?(Integer)
|
501
501
|
end
|
502
502
|
else
|
503
503
|
raise "unknown op #{opl[0]}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arman Bostani
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2017-12-
|
17
|
+
date: 2017-12-28 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: pg
|
@@ -1660,7 +1660,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1660
1660
|
version: '0'
|
1661
1661
|
requirements: []
|
1662
1662
|
rubyforge_project:
|
1663
|
-
rubygems_version: 2.6.
|
1663
|
+
rubygems_version: 2.6.14
|
1664
1664
|
signing_key:
|
1665
1665
|
specification_version: 4
|
1666
1666
|
summary: A framework for working with versioned data
|