eitil 1.1.11 → 1.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/eitil_core/lib/eitil_core/active_record/hash_to_relation.rb +6 -1
- data/eitil_integrate/lib/eitil_integrate/application_exporter/auto_sum/sum_data.rb +17 -9
- data/eitil_integrate/lib/eitil_integrate/application_exporter/log_state.rb +1 -1
- data/eitil_integrate/lib/eitil_integrate/application_exporter/style_cells.rb +2 -0
- data/lib/eitil/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 707b27f67c74dec844efce22b99755420d624a11060e5c7fafdd0a4b3b4ce60a
|
4
|
+
data.tar.gz: 47c775e85c7f8d04466c802b8b717a8c6c478c982b0d34935e21f1846bff7d11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06023f05445799146cf9a4e43e4a9247f89281ee59a5770b909541641024052ef8c34ae9ab07dfd03191f0c43484ed84f2c5d2c321b89bf4958261f73f086171
|
7
|
+
data.tar.gz: 52aa15d5003c3234703426e365d1488442cd8e4230c7423489cd4713c2ef3bc2aea662ca984ef104cece728e2c6397d7ce29a828c50fd4734b7fba3ce9f552c6
|
@@ -7,7 +7,12 @@ class Array
|
|
7
7
|
|
8
8
|
def to_relation
|
9
9
|
|
10
|
-
|
10
|
+
# Return an empty ActiveRecord_Relation instance when no objects are present,
|
11
|
+
# instead of returning the empty array itself. The reason being, that when you
|
12
|
+
# always return an association, you won't run into problems with undefined methods
|
13
|
+
# called later on, expecting an association instead of an array.
|
14
|
+
|
15
|
+
return ApplicationRecord.none unless self.present?
|
11
16
|
|
12
17
|
unless self.all? { |item| item.class.ancestors.include? ApplicationRecord }
|
13
18
|
raise_error "InvalidArrayError", ".to_relation requires that all array items are model instances"
|
@@ -34,18 +34,26 @@ module EitilIntegrate::RubyXL
|
|
34
34
|
|
35
35
|
end
|
36
36
|
|
37
|
-
#
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
#
|
44
|
-
|
37
|
+
# ALERT: the outcomment below is made to skip formatting days at all, so that
|
38
|
+
# – following eitje business logic – we currently only return an hh:mm notation
|
39
|
+
|
40
|
+
# # parsing times into maxes (60 m, 24 h, ∞ days)
|
41
|
+
# th += tm / 60
|
42
|
+
# tm = tm % 60
|
43
|
+
# td += th / 24
|
44
|
+
# th = th % 24
|
45
|
+
|
46
|
+
# # formatting strings
|
47
|
+
# sd = td.to_s
|
48
|
+
|
45
49
|
sh = th.to_s.rjust(2,'0')
|
46
50
|
sm = tm.to_s.rjust(2,'0')
|
47
51
|
|
48
|
-
|
52
|
+
# ALERT: the outcomment below is made to skip formatting days at all, so that
|
53
|
+
# – following eitje business logic – we currently only return an hh:mm notation
|
54
|
+
|
55
|
+
# [[sd, sh, sm].join(':')]
|
56
|
+
[[sh, sm].join(':')]
|
49
57
|
end
|
50
58
|
|
51
59
|
def format_time(time)
|
@@ -59,6 +59,8 @@ module EitilIntegrate::RubyXL
|
|
59
59
|
base_style_x_columns_width (0...n_columns), width
|
60
60
|
end
|
61
61
|
|
62
|
+
alias_method :base_style_first_x_columns_width, :style_first_x_columns_width
|
63
|
+
|
62
64
|
def style_x_columns_width(column_indices = [], width)
|
63
65
|
column_indices.each { |i| @sheet.change_column_width(i, width) }
|
64
66
|
end
|
data/lib/eitil/version.rb
CHANGED