growthforecast 0.0.4 → 0.0.5
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/lib/growthforecast/spec.rb +19 -16
- data/lib/growthforecast/version.rb +1 -1
- metadata +8 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cd4d2486476e9ed650b734bbe5653a290bf72108
|
|
4
|
+
data.tar.gz: bd028f62e1d7a2097336c3556a5f90728b19eef1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 719e13e6aa5186cb4cd208b00771c2415b0d9ef0cce71e045c063fd2357cfbadcceb27e2a25d1a3996e35a356dca48bf6ff3640edb2877801ebc0add40edea1a
|
|
7
|
+
data.tar.gz: 73146d1d2e92d20f2fbc223506e3c14ca4042cfeda2698538dd81f184403cb26a7ddd8a960ab569f4ba47eaa22917df1fce29da651ebeb1bd7fe58bd09582117
|
data/lib/growthforecast/spec.rb
CHANGED
|
@@ -126,39 +126,42 @@ class GrowthForecast::Spec
|
|
|
126
126
|
|
|
127
127
|
#path
|
|
128
128
|
unless specitem['path']
|
|
129
|
-
errors.push("data
|
|
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
|
|
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
|
|
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
|
|
150
|
-
errors.push("data
|
|
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'] !=
|
|
154
|
-
errors.push("data
|
|
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'] !=
|
|
157
|
-
errors.push("data
|
|
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'] !=
|
|
161
|
-
errors.push("data
|
|
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
|
|
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
|
+
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:
|
|
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.
|
|
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:
|