cosm-rb 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
data/.rbenv-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.8.7-p249
|
1
|
+
ruby-1.8.7-p249
|
@@ -25,7 +25,7 @@ module Cosm
|
|
25
25
|
{ "id" => row.first.to_s.strip, "current_value" => row.last.to_s.strip }.merge(timestamp)
|
26
26
|
}
|
27
27
|
elsif version == :v1
|
28
|
-
raise InvalidCSVError, "CSV is invalid. Currently we can only accept CSV for your most recent set of values. You have submitted
|
28
|
+
raise InvalidCSVError, "CSV is invalid. Currently we can only accept CSV for your most recent set of values. You have submitted #{rows.size} rows of data." if rows.size > 1
|
29
29
|
hash["datastreams"] = []
|
30
30
|
rows.first.each_with_index do |current_value, stream_id|
|
31
31
|
hash["datastreams"] << { "id" => stream_id.to_s.strip, "current_value" => current_value.to_s.strip }
|
data/lib/cosm-rb/version.rb
CHANGED
@@ -53,11 +53,12 @@ CSV
|
|
53
53
|
csv =<<-CSV
|
54
54
|
This,2
|
55
55
|
Wrong,3
|
56
|
+
Is,4
|
56
57
|
CSV
|
57
58
|
|
58
59
|
expect {
|
59
60
|
Cosm::Feed.new(csv, :v1)
|
60
|
-
}.to raise_error(Cosm::Parsers::CSV::InvalidCSVError)
|
61
|
+
}.to raise_error(Cosm::Parsers::CSV::InvalidCSVError, /3 rows/)
|
61
62
|
end
|
62
63
|
|
63
64
|
context "unwanted whitespace" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cosm-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Paul Bellamy
|
@@ -17,7 +17,8 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2012-08-
|
20
|
+
date: 2012-08-06 00:00:00 +00:00
|
21
|
+
default_executable:
|
21
22
|
dependencies:
|
22
23
|
- !ruby/object:Gem::Dependency
|
23
24
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -31,10 +32,10 @@ dependencies:
|
|
31
32
|
- 8
|
32
33
|
- 1
|
33
34
|
version: 0.8.1
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
35
|
requirement: *id001
|
36
|
+
type: :runtime
|
37
37
|
name: yajl-ruby
|
38
|
+
prerelease: false
|
38
39
|
- !ruby/object:Gem::Dependency
|
39
40
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
41
|
none: false
|
@@ -47,10 +48,10 @@ dependencies:
|
|
47
48
|
- 4
|
48
49
|
- 4
|
49
50
|
version: 1.4.4
|
50
|
-
type: :runtime
|
51
|
-
prerelease: false
|
52
51
|
requirement: *id002
|
52
|
+
type: :runtime
|
53
53
|
name: nokogiri
|
54
|
+
prerelease: false
|
54
55
|
- !ruby/object:Gem::Dependency
|
55
56
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
56
57
|
none: false
|
@@ -63,10 +64,10 @@ dependencies:
|
|
63
64
|
- 8
|
64
65
|
- 3
|
65
66
|
version: 0.8.3
|
66
|
-
type: :runtime
|
67
|
-
prerelease: false
|
68
67
|
requirement: *id003
|
68
|
+
type: :runtime
|
69
69
|
name: httparty
|
70
|
+
prerelease: false
|
70
71
|
- !ruby/object:Gem::Dependency
|
71
72
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
72
73
|
none: false
|
@@ -79,10 +80,10 @@ dependencies:
|
|
79
80
|
- 5
|
80
81
|
- x
|
81
82
|
version: 1.5.x
|
82
|
-
type: :runtime
|
83
|
-
prerelease: false
|
84
83
|
requirement: *id004
|
84
|
+
type: :runtime
|
85
85
|
name: fastercsv
|
86
|
+
prerelease: false
|
86
87
|
- !ruby/object:Gem::Dependency
|
87
88
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
88
89
|
none: false
|
@@ -93,10 +94,10 @@ dependencies:
|
|
93
94
|
segments:
|
94
95
|
- 0
|
95
96
|
version: "0"
|
96
|
-
type: :development
|
97
|
-
prerelease: false
|
98
97
|
requirement: *id005
|
98
|
+
type: :development
|
99
99
|
name: ruby-debug
|
100
|
+
prerelease: false
|
100
101
|
- !ruby/object:Gem::Dependency
|
101
102
|
version_requirements: &id006 !ruby/object:Gem::Requirement
|
102
103
|
none: false
|
@@ -109,10 +110,10 @@ dependencies:
|
|
109
110
|
- 9
|
110
111
|
- 9
|
111
112
|
version: 0.9.9
|
112
|
-
type: :development
|
113
|
-
prerelease: false
|
114
113
|
requirement: *id006
|
114
|
+
type: :development
|
115
115
|
name: rcov
|
116
|
+
prerelease: false
|
116
117
|
- !ruby/object:Gem::Dependency
|
117
118
|
version_requirements: &id007 !ruby/object:Gem::Requirement
|
118
119
|
none: false
|
@@ -125,10 +126,10 @@ dependencies:
|
|
125
126
|
- 8
|
126
127
|
- 7
|
127
128
|
version: 0.8.7
|
128
|
-
type: :development
|
129
|
-
prerelease: false
|
130
129
|
requirement: *id007
|
130
|
+
type: :development
|
131
131
|
name: rake
|
132
|
+
prerelease: false
|
132
133
|
- !ruby/object:Gem::Dependency
|
133
134
|
version_requirements: &id008 !ruby/object:Gem::Requirement
|
134
135
|
none: false
|
@@ -141,10 +142,10 @@ dependencies:
|
|
141
142
|
- 6
|
142
143
|
- 0
|
143
144
|
version: 2.6.0
|
144
|
-
type: :development
|
145
|
-
prerelease: false
|
146
145
|
requirement: *id008
|
146
|
+
type: :development
|
147
147
|
name: rspec
|
148
|
+
prerelease: false
|
148
149
|
description: A library for communicating with the Cosm REST API, parsing and rendering Cosm feed formats
|
149
150
|
email:
|
150
151
|
- paul.a.bellamy@gmail.com
|
@@ -281,6 +282,7 @@ files:
|
|
281
282
|
- spec/support/key_helper.rb
|
282
283
|
- spec/support/search_result_helper.rb
|
283
284
|
- spec/support/trigger_helper.rb
|
285
|
+
has_rdoc: true
|
284
286
|
homepage: http://github.com/cosm/cosm-rb
|
285
287
|
licenses: []
|
286
288
|
|
@@ -311,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
313
|
requirements: []
|
312
314
|
|
313
315
|
rubyforge_project:
|
314
|
-
rubygems_version: 1.
|
316
|
+
rubygems_version: 1.6.2
|
315
317
|
signing_key:
|
316
318
|
specification_version: 3
|
317
319
|
summary: A library for communicating with the Cosm REST API, parsing and rendering Cosm feed formats
|