growthforecast 0.0.4 → 0.0.5

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: 835154447cfabc62d3169a9ebe8a230b4ebb8130
4
- data.tar.gz: d5a728b0343028f389b9a026550e691e0e49492a
3
+ metadata.gz: cd4d2486476e9ed650b734bbe5653a290bf72108
4
+ data.tar.gz: bd028f62e1d7a2097336c3556a5f90728b19eef1
5
5
  SHA512:
6
- metadata.gz: d05c911e8a90f067d8b38d77c94696dcd9efea2df360159d648726c73974f698218239a7a9382c5a252457b499d70330b11fff984b68403d7c3e70e526706979
7
- data.tar.gz: 341c831d83339bead3ddf2ea28b1390c23b12f6955b8a782304dce36f27870c416cc8c5c7aa8c43284edd7855a513d66d641a64dface2614ad81ed1d0b102451
6
+ metadata.gz: 719e13e6aa5186cb4cd208b00771c2415b0d9ef0cce71e045c063fd2357cfbadcceb27e2a25d1a3996e35a356dca48bf6ff3640edb2877801ebc0add40edea1a
7
+ data.tar.gz: 73146d1d2e92d20f2fbc223506e3c14ca4042cfeda2698538dd81f184403cb26a7ddd8a960ab569f4ba47eaa22917df1fce29da651ebeb1bd7fe58bd09582117
@@ -126,39 +126,42 @@ class GrowthForecast::Spec
126
126
 
127
127
  #path
128
128
  unless specitem['path']
129
- errors.push("data[#{index}]: path missing")
129
+ errors.push("data: path missing")
130
130
  next
131
131
  end
132
132
  replaced_path = replace_keywords(specitem['path'])
133
133
  path_element = replaced_path.split('/')
134
134
  unless path_element.size == 3
135
- errors.push("data[#{index}]: path is not like SERVICE/SECTION/GRAPH")
135
+ errors.push("data: path is not like SERVICE/SECTION/GRAPH")
136
+ next
136
137
  end
137
138
  specitem_graph = cache.get(*path_element)
138
139
  unless specitem_graph
139
- errors.push("data[#{index}]: specified graph '#{replaced_path}' not found")
140
- end
141
-
142
- #data(sub graph) size
143
- unless target_data[index]
144
- errors.push("data[#{index}]: graph member missing")
140
+ errors.push("data: specified graph '#{replaced_path}' not found")
145
141
  next
146
142
  end
147
143
 
144
+ current_target = target_data.select { |data| data.graph_id.to_i == specitem_graph.id.to_i }
148
145
  #data graph_id
149
- if specitem_graph.id.to_i != target_data[index].graph_id.to_i
150
- errors.push("data[#{index}]: mismatch, spec '#{replaced_path}'(graph id #{specitem_graph.id}) but id '#{target_data[index].graph_id}'")
146
+ if current_target.size.zero?
147
+ errors.push("data mismatch, spec '#{replaced_path}'(graph id #{specitem_graph.id}) does not include in complex graph.")
148
+ next
149
+ end
150
+ if current_target.size > 1
151
+ errors.push("data mismatch, spec '#{replaced_path}'(graph id #{specitem_graph.id}) found more than one.")
152
+ next
151
153
  end
154
+ current_target = current_target.first
152
155
  #gmode, type
153
- if specitem.has_key?('gmode') && specitem['gmode'] != target_data[index].gmode
154
- errors.push("data[#{index}]: gmode mismatch, spec '#{specitem['gmode']}' but '#{target_data[index].gmode}'")
156
+ if specitem.has_key?('gmode') && specitem['gmode'] != current_target.gmode
157
+ errors.push("data: gmode mismatch, spec '#{specitem['gmode']}' but '#{current_target.gmode}'")
155
158
  end
156
- if specitem.has_key?('type') && specitem['type'] != target_data[index].type
157
- errors.push("data[#{index}]: type mismatch, spec '#{specitem['type']}' but '#{target_data[index].type}'")
159
+ if specitem.has_key?('type') && specitem['type'] != current_target.type
160
+ errors.push("data: type mismatch, spec '#{specitem['type']}' but '#{current_target.type}'")
158
161
  end
159
162
  #stack: stack of first data item is nonsense
160
- if index > 0 && specitem.has_key?('stack') && specitem['stack'] != target_data[index].stack
161
- errors.push("data[#{index}]: stack mismatch, spec '#{specitem['stack']}' but '#{target_data[index].stack}'")
163
+ if index > 0 && specitem.has_key?('stack') && specitem['stack'] != current_target.stack
164
+ errors.push("data: stack mismatch, spec '#{specitem['stack']}' but '#{current_target.stack}'")
162
165
  end
163
166
  end
164
167
 
@@ -1,3 +1,3 @@
1
1
  class GrowthForecast
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: growthforecast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-11 00:00:00.000000000 Z
11
+ date: 2015-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: resolve-hostname
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description: Client library and tool to update values, create/edit/delete graphs of
@@ -33,7 +33,7 @@ executables:
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
- - .gitignore
36
+ - ".gitignore"
37
37
  - Gemfile
38
38
  - LICENSE
39
39
  - README.md
@@ -61,19 +61,18 @@ require_paths:
61
61
  - lib
62
62
  required_ruby_version: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - '>='
64
+ - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - '>='
69
+ - - ">="
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  requirements: []
73
73
  rubyforge_project:
74
- rubygems_version: 2.0.2
74
+ rubygems_version: 2.4.5
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: A client library for GrowthForecast
78
78
  test_files: []
79
- has_rdoc: