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: c78d47a8264edbad70f6ee5349dd55a0a6db9bcc
4
- data.tar.gz: 4ae401ab9a5413e44d733c340ad7956548c07300
3
+ metadata.gz: ab5da510cbbd130d9945315a5ed6874dbef0ff5b
4
+ data.tar.gz: 5ccb84627512da30bcb6ff6ad5280b479cee5296
5
5
  SHA512:
6
- metadata.gz: c42bf8e044ef0f49191549aba9a2f7fcdcc7f0f5f3fc148d5b31c8fd9d1fb64063a64fc69611f5a5e4496e8a822b14550d1f0cc5e029c94968b35dc7ce1d3234
7
- data.tar.gz: d8850265355987c66b9a7ebfc05978bbe3049fe6540ce13f2adbff7fe2cfc0ca63308d2a535690979a63f034eb4c64bab9a1aff37abd63bbdd2c94cfb68dbdfb
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'].each do |name, value|
112
- if value.respond_to?(:force_encoding)
113
- begin
114
- model['attributes'][name] = value.force_encoding('utf-8')
115
- rescue
116
- # NOTICE: Enums are frozen Strings
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 !result_line.key?('value')
27
- raise error_message(result_line, "'value'")
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'
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "2.4.3"
2
+ VERSION = "2.4.4"
3
3
  end
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.3
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-05 00:00:00.000000000 Z
11
+ date: 2018-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails