forest_liana 2.4.3 → 2.4.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab5da510cbbd130d9945315a5ed6874dbef0ff5b
|
4
|
+
data.tar.gz: 5ccb84627512da30bcb6ff6ad5280b479cee5296
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 957986b31832349f58dfecc93d07ef9366d070d4fc2dcc9ca2daf6758e76216114b86b16e5d583b298199a96b0a65999448fb3cbfe2f132a5c1c415ef675a6f9
|
7
|
+
data.tar.gz: 28b1dcdfacc4377fc97a3da14de4a2870df9c29eb6155e9c6352b4af60731da375265095e3924a5918794082b7dd2b457306012d0aa005e28363c263ecab64de
|
@@ -108,12 +108,14 @@ module ForestLiana
|
|
108
108
|
|
109
109
|
def force_utf8_attributes_encoding(model)
|
110
110
|
# NOTICE: Declare all strings are encoded in utf-8
|
111
|
-
model['attributes']
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
111
|
+
if model['attributes']
|
112
|
+
model['attributes'].each do |name, value|
|
113
|
+
if value.respond_to?(:force_encoding)
|
114
|
+
begin
|
115
|
+
model['attributes'][name] = value.force_encoding('utf-8')
|
116
|
+
rescue
|
117
|
+
# NOTICE: Enums are frozen Strings
|
118
|
+
end
|
117
119
|
end
|
118
120
|
end
|
119
121
|
end
|
@@ -23,13 +23,17 @@ module ForestLiana
|
|
23
23
|
when 'Value'
|
24
24
|
if result.count
|
25
25
|
result_line = result.first
|
26
|
-
if
|
27
|
-
|
26
|
+
if result_line
|
27
|
+
if !result_line.key?('value')
|
28
|
+
raise error_message(result_line, "'value'")
|
29
|
+
else
|
30
|
+
@record = Model::Stat.new(value: {
|
31
|
+
countCurrent: result_line['value'],
|
32
|
+
countPrevious: result_line['previous']
|
33
|
+
})
|
34
|
+
end
|
28
35
|
else
|
29
|
-
@record = Model::Stat.new(value: {
|
30
|
-
countCurrent: result_line['value'],
|
31
|
-
countPrevious: result_line['previous']
|
32
|
-
})
|
36
|
+
@record = Model::Stat.new(value: { countCurrent: 0, countPrevious: 0 })
|
33
37
|
end
|
34
38
|
end
|
35
39
|
when 'Pie'
|
data/lib/forest_liana/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|