cosm-rb 0.2.05 → 0.2.07
Sign up to get free protection for your applications and to get access to all the features.
- data/.rbenv-version +1 -1
- data/.travis.yml +0 -6
- data/cosm-rb.gemspec +2 -1
- data/lib/cosm-rb/parsers/csv/feed_defaults.rb +2 -0
- data/lib/cosm-rb/version.rb +1 -1
- data/spec/cosm-rb/parsers/csv/feed_defaults_spec.rb +12 -0
- metadata +161 -186
data/.rbenv-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-1.
|
1
|
+
ruby-1.9.3-p194
|
data/.travis.yml
CHANGED
data/cosm-rb.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_dependency("multi_xml", ">=0.5.2")
|
22
22
|
s.add_dependency("yajl-ruby", ">=1.1.0")
|
23
23
|
s.add_dependency("nokogiri", ">=1.5.6")
|
24
|
-
s.add_dependency("httparty", ">=0.
|
24
|
+
s.add_dependency("httparty", ">=0.10.0")
|
25
25
|
|
26
26
|
if RUBY_VERSION.to_f < 1.9
|
27
27
|
s.add_dependency("fastercsv", ">=1.5.x")
|
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.add_development_dependency("ruby-debug")
|
35
35
|
s.add_development_dependency("rcov", ">=0.9.9")
|
36
36
|
else
|
37
|
+
s.add_development_dependency("debugger")
|
37
38
|
s.add_development_dependency("simplecov", ">=0.7.1")
|
38
39
|
end
|
39
40
|
end
|
data/lib/cosm-rb/version.rb
CHANGED
@@ -49,6 +49,18 @@ describe "default feed csv parser" do
|
|
49
49
|
}.to raise_error(Cosm::Parsers::CSV::InvalidCSVError)
|
50
50
|
end
|
51
51
|
|
52
|
+
it "should raise an error if passed empty content as v2" do
|
53
|
+
expect {
|
54
|
+
Cosm::Feed.new("", :v2)
|
55
|
+
}.to raise_error(Cosm::Parsers::CSV::InvalidCSVError)
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should raise an error if passed empty content as v1" do
|
59
|
+
expect {
|
60
|
+
Cosm::Feed.new("", :v1)
|
61
|
+
}.to raise_error(Cosm::Parsers::CSV::InvalidCSVError)
|
62
|
+
end
|
63
|
+
|
52
64
|
it "should raise an error if passed some wild csv with more than max permitted three columns" do
|
53
65
|
csv =<<-CSV
|
54
66
|
Date-Time, System HOA,Jockey Pump HOA,VFD Pump HOA,Lag Pump HOA,Lag Pump 2 HOA,Power Monitor,Water Level Relay,High Discharge Pressure,Reset Function,Jockey Running,VFD Run,Lag Pump Run,VFD Fault,Filter In Auto,Filter In Hand,Differential Press 1,Filter 1 Running,High Limit Switch,Low Limit Switch,Lag Pump Running,VFD Run Output Auto,VFD Pump On,Lag Pump,Lag Pump 1 On,System Auto Mode,Fault,Lag Pump 2 Run,Jockey On,Jockey Pump Run,Lag Pump 2,Filter Forward,Filter Reverse,Filter Solenoid,Pressure,Flow,Unknown?,VFD Input,VFD Output,
|
metadata
CHANGED
@@ -1,213 +1,191 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: cosm-rb
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.07
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 5
|
10
|
-
version: 0.2.05
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Paul Bellamy
|
14
9
|
- Levent Ali
|
15
10
|
- Sam Mulube
|
16
11
|
autorequire:
|
17
12
|
bindir: bin
|
18
13
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
14
|
+
date: 2013-01-28 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: multi_json
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
25
19
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 23
|
30
|
-
segments:
|
31
|
-
- 1
|
32
|
-
- 3
|
33
|
-
- 6
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
34
23
|
version: 1.3.6
|
35
|
-
version_requirements: *id001
|
36
|
-
name: multi_json
|
37
|
-
prerelease: false
|
38
24
|
type: :runtime
|
39
|
-
|
40
|
-
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
27
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
- 0
|
48
|
-
- 5
|
49
|
-
- 2
|
50
|
-
version: 0.5.2
|
51
|
-
version_requirements: *id002
|
28
|
+
requirements:
|
29
|
+
- - ! '>='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 1.3.6
|
32
|
+
- !ruby/object:Gem::Dependency
|
52
33
|
name: multi_xml
|
53
|
-
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 0.5.2
|
54
40
|
type: :runtime
|
55
|
-
|
56
|
-
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
43
|
none: false
|
58
|
-
requirements:
|
59
|
-
- -
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
|
62
|
-
|
63
|
-
- 1
|
64
|
-
- 1
|
65
|
-
- 0
|
66
|
-
version: 1.1.0
|
67
|
-
version_requirements: *id003
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.5.2
|
48
|
+
- !ruby/object:Gem::Dependency
|
68
49
|
name: yajl-ruby
|
69
|
-
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 1.1.0
|
70
56
|
type: :runtime
|
71
|
-
|
72
|
-
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
59
|
none: false
|
74
|
-
requirements:
|
75
|
-
- -
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
|
79
|
-
- 1
|
80
|
-
- 5
|
81
|
-
- 6
|
82
|
-
version: 1.5.6
|
83
|
-
version_requirements: *id004
|
60
|
+
requirements:
|
61
|
+
- - ! '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 1.1.0
|
64
|
+
- !ruby/object:Gem::Dependency
|
84
65
|
name: nokogiri
|
85
|
-
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: 1.5.6
|
86
72
|
type: :runtime
|
87
|
-
|
88
|
-
|
73
|
+
prerelease: false
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
75
|
none: false
|
90
|
-
requirements:
|
91
|
-
- -
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
|
94
|
-
|
95
|
-
- 0
|
96
|
-
- 8
|
97
|
-
- 3
|
98
|
-
version: 0.8.3
|
99
|
-
version_requirements: *id005
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 1.5.6
|
80
|
+
- !ruby/object:Gem::Dependency
|
100
81
|
name: httparty
|
101
|
-
|
102
|
-
type: :runtime
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
105
83
|
none: false
|
106
|
-
requirements:
|
107
|
-
- -
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
110
|
-
segments:
|
111
|
-
- 1
|
112
|
-
- 5
|
113
|
-
- x
|
114
|
-
version: 1.5.x
|
115
|
-
version_requirements: *id006
|
116
|
-
name: fastercsv
|
117
|
-
prerelease: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 0.10.0
|
118
88
|
type: :runtime
|
119
|
-
|
120
|
-
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
91
|
none: false
|
122
|
-
requirements:
|
123
|
-
- -
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
|
126
|
-
|
127
|
-
- 1
|
128
|
-
- 5
|
129
|
-
- 9
|
130
|
-
version: 1.5.9
|
131
|
-
version_requirements: *id007
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 0.10.0
|
96
|
+
- !ruby/object:Gem::Dependency
|
132
97
|
name: ox
|
133
|
-
|
134
|
-
type: :runtime
|
135
|
-
- !ruby/object:Gem::Dependency
|
136
|
-
requirement: &id008 !ruby/object:Gem::Requirement
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
137
99
|
none: false
|
138
|
-
requirements:
|
139
|
-
- -
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
|
142
|
-
|
143
|
-
- 0
|
144
|
-
version: "0"
|
145
|
-
version_requirements: *id008
|
146
|
-
name: ruby-debug
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.5.9
|
104
|
+
type: :runtime
|
147
105
|
prerelease: false
|
148
|
-
|
149
|
-
- !ruby/object:Gem::Dependency
|
150
|
-
requirement: &id009 !ruby/object:Gem::Requirement
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
151
107
|
none: false
|
152
|
-
requirements:
|
153
|
-
- -
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
108
|
+
requirements:
|
109
|
+
- - ! '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 1.5.9
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: debugger
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
type: :development
|
163
121
|
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ! '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
- !ruby/object:Gem::Dependency
|
129
|
+
name: simplecov
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
132
|
+
requirements:
|
133
|
+
- - ! '>='
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: 0.7.1
|
164
136
|
type: :development
|
165
|
-
|
166
|
-
|
137
|
+
prerelease: false
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
167
139
|
none: false
|
168
|
-
requirements:
|
169
|
-
- -
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
|
172
|
-
|
173
|
-
- 0
|
174
|
-
- 8
|
175
|
-
- 7
|
176
|
-
version: 0.8.7
|
177
|
-
version_requirements: *id010
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: 0.7.1
|
144
|
+
- !ruby/object:Gem::Dependency
|
178
145
|
name: rake
|
179
|
-
|
146
|
+
requirement: !ruby/object:Gem::Requirement
|
147
|
+
none: false
|
148
|
+
requirements:
|
149
|
+
- - '='
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: 0.8.7
|
180
152
|
type: :development
|
181
|
-
|
182
|
-
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
183
155
|
none: false
|
184
|
-
requirements:
|
185
|
-
- -
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
|
188
|
-
|
189
|
-
- 2
|
190
|
-
- 6
|
191
|
-
- 0
|
192
|
-
version: 2.6.0
|
193
|
-
version_requirements: *id011
|
156
|
+
requirements:
|
157
|
+
- - '='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.8.7
|
160
|
+
- !ruby/object:Gem::Dependency
|
194
161
|
name: rspec
|
195
|
-
|
162
|
+
requirement: !ruby/object:Gem::Requirement
|
163
|
+
none: false
|
164
|
+
requirements:
|
165
|
+
- - '='
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: 2.6.0
|
196
168
|
type: :development
|
197
|
-
|
198
|
-
|
169
|
+
prerelease: false
|
170
|
+
version_requirements: !ruby/object:Gem::Requirement
|
171
|
+
none: false
|
172
|
+
requirements:
|
173
|
+
- - '='
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: 2.6.0
|
176
|
+
description: A library for communicating with the Cosm REST API, parsing and rendering
|
177
|
+
Cosm feed formats
|
178
|
+
email:
|
199
179
|
- paul.a.bellamy@gmail.com
|
200
180
|
- lebreeze@gmail.com
|
201
181
|
- sam@pachube.com
|
202
182
|
executables: []
|
203
|
-
|
204
183
|
extensions: []
|
205
|
-
|
206
|
-
extra_rdoc_files:
|
184
|
+
extra_rdoc_files:
|
207
185
|
- README.md
|
208
186
|
- CHANGELOG.md
|
209
187
|
- MIT-LICENSE
|
210
|
-
files:
|
188
|
+
files:
|
211
189
|
- .gitignore
|
212
190
|
- .rbenv-version
|
213
191
|
- .rspec
|
@@ -330,40 +308,37 @@ files:
|
|
330
308
|
- spec/support/key_helper.rb
|
331
309
|
- spec/support/search_result_helper.rb
|
332
310
|
- spec/support/trigger_helper.rb
|
333
|
-
has_rdoc: true
|
334
311
|
homepage: http://github.com/cosm/cosm-rb
|
335
312
|
licenses: []
|
336
|
-
|
337
313
|
post_install_message:
|
338
|
-
rdoc_options:
|
314
|
+
rdoc_options:
|
339
315
|
- --main
|
340
316
|
- README
|
341
|
-
require_paths:
|
317
|
+
require_paths:
|
342
318
|
- lib
|
343
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
319
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
344
320
|
none: false
|
345
|
-
requirements:
|
346
|
-
- -
|
347
|
-
- !ruby/object:Gem::Version
|
348
|
-
|
349
|
-
segments:
|
321
|
+
requirements:
|
322
|
+
- - ! '>='
|
323
|
+
- !ruby/object:Gem::Version
|
324
|
+
version: '0'
|
325
|
+
segments:
|
350
326
|
- 0
|
351
|
-
|
352
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
327
|
+
hash: -1496334543805275150
|
328
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
353
329
|
none: false
|
354
|
-
requirements:
|
355
|
-
- -
|
356
|
-
- !ruby/object:Gem::Version
|
357
|
-
|
358
|
-
segments:
|
330
|
+
requirements:
|
331
|
+
- - ! '>='
|
332
|
+
- !ruby/object:Gem::Version
|
333
|
+
version: '0'
|
334
|
+
segments:
|
359
335
|
- 0
|
360
|
-
|
336
|
+
hash: -1496334543805275150
|
361
337
|
requirements: []
|
362
|
-
|
363
338
|
rubyforge_project:
|
364
|
-
rubygems_version: 1.
|
339
|
+
rubygems_version: 1.8.23
|
365
340
|
signing_key:
|
366
341
|
specification_version: 3
|
367
|
-
summary: A library for communicating with the Cosm REST API, parsing and rendering
|
342
|
+
summary: A library for communicating with the Cosm REST API, parsing and rendering
|
343
|
+
Cosm feed formats
|
368
344
|
test_files: []
|
369
|
-
|