cosm-rb 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +12 -0
- data/.rbenv-version +1 -0
- data/.rspec +2 -0
- data/.rvmrc +1 -0
- data/.travis.yml +10 -0
- data/CHANGELOG.md +91 -0
- data/Gemfile +4 -0
- data/MIT-LICENSE +20 -0
- data/README.md +195 -0
- data/Rakefile +35 -0
- data/ci/build_hudson.sh +24 -0
- data/cosm-rb.gemspec +40 -0
- data/init.rb +2 -0
- data/lib/cosm-rb/array_extensions.rb +6 -0
- data/lib/cosm-rb/base/instance_methods.rb +28 -0
- data/lib/cosm-rb/base.rb +52 -0
- data/lib/cosm-rb/client.rb +7 -0
- data/lib/cosm-rb/datapoint.rb +71 -0
- data/lib/cosm-rb/datastream.rb +136 -0
- data/lib/cosm-rb/feed.rb +108 -0
- data/lib/cosm-rb/hash_extensions.rb +16 -0
- data/lib/cosm-rb/helpers.rb +42 -0
- data/lib/cosm-rb/key.rb +98 -0
- data/lib/cosm-rb/nil_content.rb +15 -0
- data/lib/cosm-rb/object_extensions.rb +6 -0
- data/lib/cosm-rb/parsers/csv/datastream_defaults.rb +12 -0
- data/lib/cosm-rb/parsers/csv/feed_defaults.rb +38 -0
- data/lib/cosm-rb/parsers/defaults.rb +13 -0
- data/lib/cosm-rb/parsers/json/datapoint_defaults.rb +12 -0
- data/lib/cosm-rb/parsers/json/datastream_defaults.rb +53 -0
- data/lib/cosm-rb/parsers/json/feed_defaults.rb +103 -0
- data/lib/cosm-rb/parsers/json/key_defaults.rb +15 -0
- data/lib/cosm-rb/parsers/json/search_result_defaults.rb +18 -0
- data/lib/cosm-rb/parsers/json/trigger_defaults.rb +12 -0
- data/lib/cosm-rb/parsers/xml/datapoint_defaults.rb +20 -0
- data/lib/cosm-rb/parsers/xml/datastream_defaults.rb +77 -0
- data/lib/cosm-rb/parsers/xml/feed_defaults.rb +127 -0
- data/lib/cosm-rb/parsers/xml/key_defaults.rb +40 -0
- data/lib/cosm-rb/parsers/xml/trigger_defaults.rb +22 -0
- data/lib/cosm-rb/permission.rb +67 -0
- data/lib/cosm-rb/resource.rb +43 -0
- data/lib/cosm-rb/search_result.rb +63 -0
- data/lib/cosm-rb/string_extensions.rb +6 -0
- data/lib/cosm-rb/template.rb +32 -0
- data/lib/cosm-rb/templates/csv/datapoint_defaults.rb +22 -0
- data/lib/cosm-rb/templates/csv/datastream_defaults.rb +43 -0
- data/lib/cosm-rb/templates/csv/feed_defaults.rb +47 -0
- data/lib/cosm-rb/templates/defaults.rb +14 -0
- data/lib/cosm-rb/templates/json/datapoint_defaults.rb +15 -0
- data/lib/cosm-rb/templates/json/datastream_defaults.rb +66 -0
- data/lib/cosm-rb/templates/json/feed_defaults.rb +134 -0
- data/lib/cosm-rb/templates/json/key_defaults.rb +41 -0
- data/lib/cosm-rb/templates/json/search_result_defaults.rb +47 -0
- data/lib/cosm-rb/templates/json/trigger_defaults.rb +21 -0
- data/lib/cosm-rb/templates/xml/datapoint_defaults.rb +25 -0
- data/lib/cosm-rb/templates/xml/datastream_defaults.rb +66 -0
- data/lib/cosm-rb/templates/xml/feed_defaults.rb +110 -0
- data/lib/cosm-rb/templates/xml/search_result_defaults.rb +116 -0
- data/lib/cosm-rb/templates/xml_headers.rb +17 -0
- data/lib/cosm-rb/trigger.rb +65 -0
- data/lib/cosm-rb/validations.rb +9 -0
- data/lib/cosm-rb/version.rb +3 -0
- data/lib/cosm-rb.rb +29 -0
- data/spec/cosm-rb/array_extensions_spec.rb +9 -0
- data/spec/cosm-rb/base/instance_methods_spec.rb +109 -0
- data/spec/cosm-rb/base_spec.rb +56 -0
- data/spec/cosm-rb/client_spec.rb +7 -0
- data/spec/cosm-rb/datapoint_spec.rb +169 -0
- data/spec/cosm-rb/datastream_spec.rb +301 -0
- data/spec/cosm-rb/feed_spec.rb +298 -0
- data/spec/cosm-rb/hash_extensions_spec.rb +20 -0
- data/spec/cosm-rb/helpers_spec.rb +56 -0
- data/spec/cosm-rb/key_spec.rb +178 -0
- data/spec/cosm-rb/parsers/csv/datastream_defaults_spec.rb +12 -0
- data/spec/cosm-rb/parsers/csv/feed_defaults_spec.rb +35 -0
- data/spec/cosm-rb/parsers/json/datapoint_defaults_spec.rb +15 -0
- data/spec/cosm-rb/parsers/json/datastream_defaults_spec.rb +82 -0
- data/spec/cosm-rb/parsers/json/feed_defaults_spec.rb +18 -0
- data/spec/cosm-rb/parsers/json/key_defaults_spec.rb +8 -0
- data/spec/cosm-rb/parsers/json/search_result_defaults_spec.rb +12 -0
- data/spec/cosm-rb/parsers/json/trigger_defaults_spec.rb +16 -0
- data/spec/cosm-rb/parsers/xml/datapoint_defaults_spec.rb +19 -0
- data/spec/cosm-rb/parsers/xml/datastream_defaults_spec.rb +63 -0
- data/spec/cosm-rb/parsers/xml/feed_defaults_spec.rb +65 -0
- data/spec/cosm-rb/parsers/xml/key_defaults_spec.rb +16 -0
- data/spec/cosm-rb/parsers/xml/trigger_defaults_spec.rb +16 -0
- data/spec/cosm-rb/search_result_spec.rb +258 -0
- data/spec/cosm-rb/string_extensions_spec.rb +12 -0
- data/spec/cosm-rb/template_spec.rb +74 -0
- data/spec/cosm-rb/templates/csv/datapoint_defaults_spec.rb +41 -0
- data/spec/cosm-rb/templates/csv/datastream_defaults_spec.rb +131 -0
- data/spec/cosm-rb/templates/csv/feed_defaults_spec.rb +78 -0
- data/spec/cosm-rb/templates/json/datapoint_defaults_spec.rb +14 -0
- data/spec/cosm-rb/templates/json/datastream_defaults_spec.rb +170 -0
- data/spec/cosm-rb/templates/json/feed_defaults_spec.rb +397 -0
- data/spec/cosm-rb/templates/json/key_defaults_spec.rb +29 -0
- data/spec/cosm-rb/templates/json/search_result_defaults_spec.rb +37 -0
- data/spec/cosm-rb/templates/json/trigger_defaults_spec.rb +19 -0
- data/spec/cosm-rb/templates/xml/datapoint_defaults_spec.rb +14 -0
- data/spec/cosm-rb/templates/xml/datastream_defaults_spec.rb +113 -0
- data/spec/cosm-rb/templates/xml/feed_defaults_spec.rb +131 -0
- data/spec/cosm-rb/templates/xml/search_result_defaults_spec.rb +44 -0
- data/spec/cosm-rb/trigger_spec.rb +117 -0
- data/spec/fixtures/models.rb +81 -0
- data/spec/spec_helper.rb +17 -0
- data/spec/support/contain_datapoint_eeml_matcher.rb +16 -0
- data/spec/support/contain_datastream_eeml_matcher.rb +60 -0
- data/spec/support/contain_feed_eeml_matcher.rb +96 -0
- data/spec/support/datapoint_helper.rb +53 -0
- data/spec/support/datastream_helper.rb +300 -0
- data/spec/support/describe_eeml_matcher.rb +23 -0
- data/spec/support/feed_helper.rb +771 -0
- data/spec/support/fully_represent_datapoint_matcher.rb +30 -0
- data/spec/support/fully_represent_datastream_matcher.rb +92 -0
- data/spec/support/fully_represent_feed_matcher.rb +226 -0
- data/spec/support/fully_represent_key_matcher.rb +74 -0
- data/spec/support/fully_represent_search_result_matcher.rb +67 -0
- data/spec/support/fully_represent_trigger_matcher.rb +29 -0
- data/spec/support/key_helper.rb +74 -0
- data/spec/support/search_result_helper.rb +252 -0
- data/spec/support/trigger_helper.rb +51 -0
- metadata +363 -0
@@ -0,0 +1,252 @@
|
|
1
|
+
def search_result_as_(format, options = {})
|
2
|
+
# Default data
|
3
|
+
# This data is based on http://api.cosm.com/v2/feeds/504
|
4
|
+
case format.to_s
|
5
|
+
when 'hash'
|
6
|
+
data = {
|
7
|
+
"totalResults" => "10000",
|
8
|
+
"itemsPerPage" => "100",
|
9
|
+
"startIndex" => "0",
|
10
|
+
"results" => [{
|
11
|
+
"updated"=>Time.parse('2011-01-02'),
|
12
|
+
"title"=>"Cosm Office Environment",
|
13
|
+
"private"=>false,
|
14
|
+
"id"=>504,
|
15
|
+
"icon"=>"http://cosm.com/logo.png",
|
16
|
+
"website"=>"http://cosm.com",
|
17
|
+
"tags" => "kittens , sofa, aardvark",
|
18
|
+
"description"=>"Sensors in cosm.com's headquarters.",
|
19
|
+
"feed" => "http://test.host/testfeed.html?random=890299&rand2=91",
|
20
|
+
"email"=>"abc@example.com",
|
21
|
+
"status"=>"live",
|
22
|
+
"creator"=>"http://cosm.com/users/skeletor",
|
23
|
+
'location_domain' => 'physical',
|
24
|
+
'location_lon' => -0.0807666778564453,
|
25
|
+
'location_disposition' => 'fixed',
|
26
|
+
'location_ele' => '23.0',
|
27
|
+
'location_exposure' => 'indoor',
|
28
|
+
'location_lat' => 51.5235375648154,
|
29
|
+
'location_name' => 'office',
|
30
|
+
"datastreams" => [
|
31
|
+
{
|
32
|
+
"updated" => Time.parse('2011-01-02'),
|
33
|
+
"max_value"=>658.0,
|
34
|
+
"unit_type"=>"",
|
35
|
+
"min_value"=>0.0,
|
36
|
+
"unit_label"=>"",
|
37
|
+
"current_value"=>"14",
|
38
|
+
"id"=>"0",
|
39
|
+
"tags"=>"humidity,Temperature, freakin lasers",
|
40
|
+
"datapoints" => [{
|
41
|
+
"value" => "1",
|
42
|
+
"at" => Time.parse("2011-03-02T15:59:56.895922Z")
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"value" => "1",
|
46
|
+
"at" => Time.parse("2011-03-02T16:00:07.188648Z")
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"value" => "2",
|
50
|
+
"at" => Time.parse("2011-03-02T16:00:18.416500Z")
|
51
|
+
}],
|
52
|
+
"unit_symbol"=>""},
|
53
|
+
{
|
54
|
+
"updated" => Time.parse('2011-01-02'),
|
55
|
+
"max_value"=>980.0,
|
56
|
+
"unit_type"=>"",
|
57
|
+
"min_value"=>0.0,
|
58
|
+
"unit_label"=>"label",
|
59
|
+
"current_value"=>"813",
|
60
|
+
"id"=>"1",
|
61
|
+
"tags"=>"light level",
|
62
|
+
"unit_symbol"=>""},
|
63
|
+
{
|
64
|
+
"updated" => Time.parse('2011-01-02'),
|
65
|
+
"max_value"=>774.0,
|
66
|
+
"unit_type"=>"some type",
|
67
|
+
"min_value"=>158.0,
|
68
|
+
"unit_label"=>"some measure",
|
69
|
+
"current_value"=>"318",
|
70
|
+
"id"=>"2",
|
71
|
+
"tags"=>"Temperature",
|
72
|
+
"unit_symbol"=>"some % symbol"},
|
73
|
+
{
|
74
|
+
"updated" => Time.parse('2011-01-02'),
|
75
|
+
"max_value"=>0.0,
|
76
|
+
"unit_type"=>"",
|
77
|
+
"min_value"=>0.0,
|
78
|
+
"unit_label"=>"",
|
79
|
+
"current_value"=>"0",
|
80
|
+
"id"=>"3",
|
81
|
+
"tags"=>"door 1",
|
82
|
+
"unit_symbol"=>"symbol"},
|
83
|
+
{
|
84
|
+
"updated" => Time.parse('2011-01-02'),
|
85
|
+
"max_value"=>0.0,
|
86
|
+
"unit_type"=>"",
|
87
|
+
"min_value"=>0.0,
|
88
|
+
"unit_label"=>"",
|
89
|
+
"current_value"=>"0",
|
90
|
+
"id"=>"4",
|
91
|
+
"tags"=>"door 2",
|
92
|
+
"unit_symbol"=>""},
|
93
|
+
{
|
94
|
+
"updated" => Time.parse('2011-01-02'),
|
95
|
+
"max_value"=>40.0,
|
96
|
+
"unit_type"=>"",
|
97
|
+
"min_value"=>0.0,
|
98
|
+
"unit_label"=>"",
|
99
|
+
"current_value"=>"40",
|
100
|
+
"id"=>"5",
|
101
|
+
"unit_symbol"=>""},
|
102
|
+
{
|
103
|
+
"updated" => Time.parse('2011-01-02'),
|
104
|
+
"max_value"=>32767.0,
|
105
|
+
"unit_type"=>"",
|
106
|
+
"min_value"=>-32768.0,
|
107
|
+
"unit_label"=>"",
|
108
|
+
"current_value"=>"15545",
|
109
|
+
"id"=>"6",
|
110
|
+
"tags"=>"successes",
|
111
|
+
"unit_symbol"=>""}]
|
112
|
+
}]
|
113
|
+
}
|
114
|
+
when 'json'
|
115
|
+
data = search_result_as_json(options[:version] || "1.0.0")
|
116
|
+
when 'xml'
|
117
|
+
raise "Not implemented"
|
118
|
+
end
|
119
|
+
|
120
|
+
# Add extra options we passed
|
121
|
+
if options[:with]
|
122
|
+
options[:with].each do |field, value|
|
123
|
+
data[field.to_s] = value
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
# Remove options we don't need
|
128
|
+
if options[:except]
|
129
|
+
options[:except].each do |field,_|
|
130
|
+
data.delete(field.to_s)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# Return the feed in the requested format
|
135
|
+
case format.to_s
|
136
|
+
when 'hash'
|
137
|
+
data
|
138
|
+
when 'json'
|
139
|
+
data.to_json
|
140
|
+
when 'xml'
|
141
|
+
data
|
142
|
+
else
|
143
|
+
raise "#{format} undefined"
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
def search_result_as_json(version)
|
148
|
+
case version
|
149
|
+
when "1.0.0"
|
150
|
+
{
|
151
|
+
"totalResults" => "10000",
|
152
|
+
"itemsPerPage" => "100",
|
153
|
+
"startIndex" => "0",
|
154
|
+
'results' => [{
|
155
|
+
'title' => 'Cosm Office Environment',
|
156
|
+
'status' => 'live',
|
157
|
+
'updated' => '2011-02-16T16:21:01.834174Z',
|
158
|
+
'tags' => ['hq', 'office'],
|
159
|
+
'description' => 'Sensors in cosm.com\'s headquarters.',
|
160
|
+
'website' => 'http://cosm.com/',
|
161
|
+
'private' => 'false',
|
162
|
+
'creator' => 'http://cosm.com/users/skeletor',
|
163
|
+
'version' => '1.0.0',
|
164
|
+
'id' => 504,
|
165
|
+
'location' =>
|
166
|
+
{ 'domain' => 'physical',
|
167
|
+
'lon' => -0.0807666778564453,
|
168
|
+
'disposition' => 'fixed',
|
169
|
+
'ele' => '23.0',
|
170
|
+
'exposure' => 'indoor',
|
171
|
+
'lat' => 51.5235375648154,
|
172
|
+
'name' => 'office'
|
173
|
+
},
|
174
|
+
'feed' => 'http://api.cosm.com/v2/feeds/504.json',
|
175
|
+
'datastreams' =>
|
176
|
+
[
|
177
|
+
{'min_value' => '0.0',
|
178
|
+
'at' => '2011-02-16T16:21:01.834174Z',
|
179
|
+
'tags' => ['humidity'],
|
180
|
+
"unit" => {
|
181
|
+
"symbol" => "cm",
|
182
|
+
"label" => "cms",
|
183
|
+
"type" => "metric"
|
184
|
+
|
185
|
+
},
|
186
|
+
|
187
|
+
'current_value' => '14',
|
188
|
+
'max_value' => '658.0',
|
189
|
+
'id' => '0'
|
190
|
+
},
|
191
|
+
{'min_value' => '0.0',
|
192
|
+
'at' => '2011-02-16T16:21:01.834174Z',
|
193
|
+
'tags' => ['light level'],
|
194
|
+
'current_value' => '717',
|
195
|
+
'max_value' => '980.0',
|
196
|
+
'id' => '1'
|
197
|
+
},
|
198
|
+
{'min_value' => '158.0',
|
199
|
+
'at' => '2011-02-16T16:21:01.834174Z',
|
200
|
+
'tags' => ['Temperature'],
|
201
|
+
'current_value' => '316',
|
202
|
+
'max_value' => '774.0',
|
203
|
+
'id' => '2',
|
204
|
+
"datapoints" => [{
|
205
|
+
"value" => "1",
|
206
|
+
"at" => "2011-03-02T15:59:56.895922Z"
|
207
|
+
},
|
208
|
+
{
|
209
|
+
"value" => "1",
|
210
|
+
"at" => "2011-03-02T16:00:07.188648Z"
|
211
|
+
},
|
212
|
+
{
|
213
|
+
"value" => "2",
|
214
|
+
"at" => "2011-03-02T16:00:18.416500Z"
|
215
|
+
}]
|
216
|
+
},
|
217
|
+
{'min_value' => '0.0',
|
218
|
+
'at' => '2011-02-16T16:21:01.834174Z',
|
219
|
+
'tags' => ['door 1'],
|
220
|
+
'current_value' => '0',
|
221
|
+
'max_value' => '0.0',
|
222
|
+
'id' => '3'
|
223
|
+
},
|
224
|
+
{'min_value' => '0.0',
|
225
|
+
'at' => '2011-02-16T16:21:01.834174Z',
|
226
|
+
'tags' => ['door 2'],
|
227
|
+
'current_value' => '0',
|
228
|
+
'max_value' => '0.0',
|
229
|
+
'id' => '4'
|
230
|
+
},
|
231
|
+
{'min_value' => '0.0',
|
232
|
+
'at' => '2011-02-16T16:21:01.834174Z',
|
233
|
+
'tags' => ['failures'],
|
234
|
+
'current_value' => '40',
|
235
|
+
'max_value' => '40.0',
|
236
|
+
'id' => '5'
|
237
|
+
},
|
238
|
+
{'min_value' => '-32768.0',
|
239
|
+
'at' => '2011-02-16T16:21:01.834174Z',
|
240
|
+
'tags' => ['successes'],
|
241
|
+
'current_value' => '2638',
|
242
|
+
'max_value' => '32767.0',
|
243
|
+
'id' => '6'
|
244
|
+
}
|
245
|
+
]
|
246
|
+
}]
|
247
|
+
}
|
248
|
+
else
|
249
|
+
raise "No such JSON version"
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
@@ -0,0 +1,51 @@
|
|
1
|
+
def trigger_as_(format, options = {})
|
2
|
+
# Default data
|
3
|
+
# This data is based on http://api.cosm.com/v2/feeds/504
|
4
|
+
case format.to_s
|
5
|
+
when 'hash'
|
6
|
+
data = {"threshold_value"=>"44", "notified_at"=>"", "url"=>"http://www.postbin.org/zc9sca", "trigger_type"=>"eq", "id"=>40, "stream_id"=>"1", "environment_id"=>424, "user"=>"lebreeze"}
|
7
|
+
when 'json'
|
8
|
+
data = {"threshold_value"=>"44", "notified_at"=>"", "url"=>"http://www.postbin.org/zc9sca", "trigger_type"=>"eq", "id"=>40, "stream_id"=>"1", "environment_id"=>424, "user"=>"lebreeze"}
|
9
|
+
when 'xml'
|
10
|
+
data = <<XML
|
11
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
12
|
+
<datastream-trigger>
|
13
|
+
<id type="integer">40</id>
|
14
|
+
<url>http://www.postbin.org/zc9sca</url>
|
15
|
+
<trigger-type>eq</trigger-type>
|
16
|
+
<threshold-value type="float">44</threshold-value>
|
17
|
+
<notified-at type="datetime"></notified-at>
|
18
|
+
<user>lebreeze</user>
|
19
|
+
<environment-id type="integer">424</environment-id>
|
20
|
+
<stream-id>1</stream-id>
|
21
|
+
</datastream-trigger>
|
22
|
+
XML
|
23
|
+
end
|
24
|
+
|
25
|
+
# Add extra options we passed
|
26
|
+
if options[:with]
|
27
|
+
options[:with].each do |field, value|
|
28
|
+
data[field.to_s] = value
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# Remove options we don't need
|
33
|
+
if options[:except]
|
34
|
+
options[:except].each do |field,_|
|
35
|
+
data.delete(field.to_s)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Return the feed in the requested format
|
40
|
+
case format.to_s
|
41
|
+
when 'hash'
|
42
|
+
data
|
43
|
+
when 'json'
|
44
|
+
data.to_json
|
45
|
+
when 'xml'
|
46
|
+
data
|
47
|
+
else
|
48
|
+
raise "#{format} undefined"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
metadata
ADDED
@@ -0,0 +1,363 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cosm-rb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Paul Bellamy
|
14
|
+
- Levent Ali
|
15
|
+
- Sam Mulube
|
16
|
+
autorequire:
|
17
|
+
bindir: bin
|
18
|
+
cert_chain: []
|
19
|
+
|
20
|
+
date: 2012-05-17 00:00:00 +01:00
|
21
|
+
default_executable:
|
22
|
+
dependencies:
|
23
|
+
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 61
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 8
|
33
|
+
- 1
|
34
|
+
version: 0.8.1
|
35
|
+
prerelease: false
|
36
|
+
type: :runtime
|
37
|
+
requirement: *id001
|
38
|
+
name: yajl-ruby
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 15
|
46
|
+
segments:
|
47
|
+
- 1
|
48
|
+
- 4
|
49
|
+
- 4
|
50
|
+
version: 1.4.4
|
51
|
+
prerelease: false
|
52
|
+
type: :runtime
|
53
|
+
requirement: *id002
|
54
|
+
name: nokogiri
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 57
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
- 8
|
65
|
+
- 3
|
66
|
+
version: 0.8.3
|
67
|
+
prerelease: false
|
68
|
+
type: :runtime
|
69
|
+
requirement: *id003
|
70
|
+
name: httparty
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
hash: 3
|
78
|
+
segments:
|
79
|
+
- 0
|
80
|
+
version: "0"
|
81
|
+
prerelease: false
|
82
|
+
type: :development
|
83
|
+
requirement: *id004
|
84
|
+
name: ruby-debug
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
hash: 41
|
92
|
+
segments:
|
93
|
+
- 0
|
94
|
+
- 9
|
95
|
+
- 9
|
96
|
+
version: 0.9.9
|
97
|
+
prerelease: false
|
98
|
+
type: :development
|
99
|
+
requirement: *id005
|
100
|
+
name: rcov
|
101
|
+
- !ruby/object:Gem::Dependency
|
102
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
103
|
+
none: false
|
104
|
+
requirements:
|
105
|
+
- - "="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
hash: 49
|
108
|
+
segments:
|
109
|
+
- 0
|
110
|
+
- 8
|
111
|
+
- 7
|
112
|
+
version: 0.8.7
|
113
|
+
prerelease: false
|
114
|
+
type: :development
|
115
|
+
requirement: *id006
|
116
|
+
name: rake
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
120
|
+
requirements:
|
121
|
+
- - "="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
hash: 23
|
124
|
+
segments:
|
125
|
+
- 2
|
126
|
+
- 6
|
127
|
+
- 0
|
128
|
+
version: 2.6.0
|
129
|
+
prerelease: false
|
130
|
+
type: :development
|
131
|
+
requirement: *id007
|
132
|
+
name: rspec
|
133
|
+
description: A library for communicating with the Cosm REST API, parsing and rendering Cosm feed formats
|
134
|
+
email:
|
135
|
+
- paul.a.bellamy@gmail.com
|
136
|
+
- lebreeze@gmail.com
|
137
|
+
- sam@pachube.com
|
138
|
+
executables: []
|
139
|
+
|
140
|
+
extensions: []
|
141
|
+
|
142
|
+
extra_rdoc_files:
|
143
|
+
- README.md
|
144
|
+
- CHANGELOG.md
|
145
|
+
- MIT-LICENSE
|
146
|
+
files:
|
147
|
+
- .gitignore
|
148
|
+
- .rbenv-version
|
149
|
+
- .rspec
|
150
|
+
- .rvmrc
|
151
|
+
- .travis.yml
|
152
|
+
- CHANGELOG.md
|
153
|
+
- Gemfile
|
154
|
+
- MIT-LICENSE
|
155
|
+
- README.md
|
156
|
+
- Rakefile
|
157
|
+
- ci/build_hudson.sh
|
158
|
+
- cosm-rb.gemspec
|
159
|
+
- init.rb
|
160
|
+
- lib/cosm-rb.rb
|
161
|
+
- lib/cosm-rb/array_extensions.rb
|
162
|
+
- lib/cosm-rb/base.rb
|
163
|
+
- lib/cosm-rb/base/instance_methods.rb
|
164
|
+
- lib/cosm-rb/client.rb
|
165
|
+
- lib/cosm-rb/datapoint.rb
|
166
|
+
- lib/cosm-rb/datastream.rb
|
167
|
+
- lib/cosm-rb/feed.rb
|
168
|
+
- lib/cosm-rb/hash_extensions.rb
|
169
|
+
- lib/cosm-rb/helpers.rb
|
170
|
+
- lib/cosm-rb/key.rb
|
171
|
+
- lib/cosm-rb/nil_content.rb
|
172
|
+
- lib/cosm-rb/object_extensions.rb
|
173
|
+
- lib/cosm-rb/parsers/csv/datastream_defaults.rb
|
174
|
+
- lib/cosm-rb/parsers/csv/feed_defaults.rb
|
175
|
+
- lib/cosm-rb/parsers/defaults.rb
|
176
|
+
- lib/cosm-rb/parsers/json/datapoint_defaults.rb
|
177
|
+
- lib/cosm-rb/parsers/json/datastream_defaults.rb
|
178
|
+
- lib/cosm-rb/parsers/json/feed_defaults.rb
|
179
|
+
- lib/cosm-rb/parsers/json/key_defaults.rb
|
180
|
+
- lib/cosm-rb/parsers/json/search_result_defaults.rb
|
181
|
+
- lib/cosm-rb/parsers/json/trigger_defaults.rb
|
182
|
+
- lib/cosm-rb/parsers/xml/datapoint_defaults.rb
|
183
|
+
- lib/cosm-rb/parsers/xml/datastream_defaults.rb
|
184
|
+
- lib/cosm-rb/parsers/xml/feed_defaults.rb
|
185
|
+
- lib/cosm-rb/parsers/xml/key_defaults.rb
|
186
|
+
- lib/cosm-rb/parsers/xml/trigger_defaults.rb
|
187
|
+
- lib/cosm-rb/permission.rb
|
188
|
+
- lib/cosm-rb/resource.rb
|
189
|
+
- lib/cosm-rb/search_result.rb
|
190
|
+
- lib/cosm-rb/string_extensions.rb
|
191
|
+
- lib/cosm-rb/template.rb
|
192
|
+
- lib/cosm-rb/templates/csv/datapoint_defaults.rb
|
193
|
+
- lib/cosm-rb/templates/csv/datastream_defaults.rb
|
194
|
+
- lib/cosm-rb/templates/csv/feed_defaults.rb
|
195
|
+
- lib/cosm-rb/templates/defaults.rb
|
196
|
+
- lib/cosm-rb/templates/json/datapoint_defaults.rb
|
197
|
+
- lib/cosm-rb/templates/json/datastream_defaults.rb
|
198
|
+
- lib/cosm-rb/templates/json/feed_defaults.rb
|
199
|
+
- lib/cosm-rb/templates/json/key_defaults.rb
|
200
|
+
- lib/cosm-rb/templates/json/search_result_defaults.rb
|
201
|
+
- lib/cosm-rb/templates/json/trigger_defaults.rb
|
202
|
+
- lib/cosm-rb/templates/xml/datapoint_defaults.rb
|
203
|
+
- lib/cosm-rb/templates/xml/datastream_defaults.rb
|
204
|
+
- lib/cosm-rb/templates/xml/feed_defaults.rb
|
205
|
+
- lib/cosm-rb/templates/xml/search_result_defaults.rb
|
206
|
+
- lib/cosm-rb/templates/xml_headers.rb
|
207
|
+
- lib/cosm-rb/trigger.rb
|
208
|
+
- lib/cosm-rb/validations.rb
|
209
|
+
- lib/cosm-rb/version.rb
|
210
|
+
- spec/cosm-rb/array_extensions_spec.rb
|
211
|
+
- spec/cosm-rb/base/instance_methods_spec.rb
|
212
|
+
- spec/cosm-rb/base_spec.rb
|
213
|
+
- spec/cosm-rb/client_spec.rb
|
214
|
+
- spec/cosm-rb/datapoint_spec.rb
|
215
|
+
- spec/cosm-rb/datastream_spec.rb
|
216
|
+
- spec/cosm-rb/feed_spec.rb
|
217
|
+
- spec/cosm-rb/hash_extensions_spec.rb
|
218
|
+
- spec/cosm-rb/helpers_spec.rb
|
219
|
+
- spec/cosm-rb/key_spec.rb
|
220
|
+
- spec/cosm-rb/parsers/csv/datastream_defaults_spec.rb
|
221
|
+
- spec/cosm-rb/parsers/csv/feed_defaults_spec.rb
|
222
|
+
- spec/cosm-rb/parsers/json/datapoint_defaults_spec.rb
|
223
|
+
- spec/cosm-rb/parsers/json/datastream_defaults_spec.rb
|
224
|
+
- spec/cosm-rb/parsers/json/feed_defaults_spec.rb
|
225
|
+
- spec/cosm-rb/parsers/json/key_defaults_spec.rb
|
226
|
+
- spec/cosm-rb/parsers/json/search_result_defaults_spec.rb
|
227
|
+
- spec/cosm-rb/parsers/json/trigger_defaults_spec.rb
|
228
|
+
- spec/cosm-rb/parsers/xml/datapoint_defaults_spec.rb
|
229
|
+
- spec/cosm-rb/parsers/xml/datastream_defaults_spec.rb
|
230
|
+
- spec/cosm-rb/parsers/xml/feed_defaults_spec.rb
|
231
|
+
- spec/cosm-rb/parsers/xml/key_defaults_spec.rb
|
232
|
+
- spec/cosm-rb/parsers/xml/trigger_defaults_spec.rb
|
233
|
+
- spec/cosm-rb/search_result_spec.rb
|
234
|
+
- spec/cosm-rb/string_extensions_spec.rb
|
235
|
+
- spec/cosm-rb/template_spec.rb
|
236
|
+
- spec/cosm-rb/templates/csv/datapoint_defaults_spec.rb
|
237
|
+
- spec/cosm-rb/templates/csv/datastream_defaults_spec.rb
|
238
|
+
- spec/cosm-rb/templates/csv/feed_defaults_spec.rb
|
239
|
+
- spec/cosm-rb/templates/json/datapoint_defaults_spec.rb
|
240
|
+
- spec/cosm-rb/templates/json/datastream_defaults_spec.rb
|
241
|
+
- spec/cosm-rb/templates/json/feed_defaults_spec.rb
|
242
|
+
- spec/cosm-rb/templates/json/key_defaults_spec.rb
|
243
|
+
- spec/cosm-rb/templates/json/search_result_defaults_spec.rb
|
244
|
+
- spec/cosm-rb/templates/json/trigger_defaults_spec.rb
|
245
|
+
- spec/cosm-rb/templates/xml/datapoint_defaults_spec.rb
|
246
|
+
- spec/cosm-rb/templates/xml/datastream_defaults_spec.rb
|
247
|
+
- spec/cosm-rb/templates/xml/feed_defaults_spec.rb
|
248
|
+
- spec/cosm-rb/templates/xml/search_result_defaults_spec.rb
|
249
|
+
- spec/cosm-rb/trigger_spec.rb
|
250
|
+
- spec/fixtures/models.rb
|
251
|
+
- spec/spec_helper.rb
|
252
|
+
- spec/support/contain_datapoint_eeml_matcher.rb
|
253
|
+
- spec/support/contain_datastream_eeml_matcher.rb
|
254
|
+
- spec/support/contain_feed_eeml_matcher.rb
|
255
|
+
- spec/support/datapoint_helper.rb
|
256
|
+
- spec/support/datastream_helper.rb
|
257
|
+
- spec/support/describe_eeml_matcher.rb
|
258
|
+
- spec/support/feed_helper.rb
|
259
|
+
- spec/support/fully_represent_datapoint_matcher.rb
|
260
|
+
- spec/support/fully_represent_datastream_matcher.rb
|
261
|
+
- spec/support/fully_represent_feed_matcher.rb
|
262
|
+
- spec/support/fully_represent_key_matcher.rb
|
263
|
+
- spec/support/fully_represent_search_result_matcher.rb
|
264
|
+
- spec/support/fully_represent_trigger_matcher.rb
|
265
|
+
- spec/support/key_helper.rb
|
266
|
+
- spec/support/search_result_helper.rb
|
267
|
+
- spec/support/trigger_helper.rb
|
268
|
+
has_rdoc: true
|
269
|
+
homepage: http://github.com/pachube/pachube_data_formats
|
270
|
+
licenses: []
|
271
|
+
|
272
|
+
post_install_message:
|
273
|
+
rdoc_options:
|
274
|
+
- --main
|
275
|
+
- README
|
276
|
+
require_paths:
|
277
|
+
- lib
|
278
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
279
|
+
none: false
|
280
|
+
requirements:
|
281
|
+
- - ">="
|
282
|
+
- !ruby/object:Gem::Version
|
283
|
+
hash: 3
|
284
|
+
segments:
|
285
|
+
- 0
|
286
|
+
version: "0"
|
287
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
288
|
+
none: false
|
289
|
+
requirements:
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
hash: 11
|
293
|
+
segments:
|
294
|
+
- 1
|
295
|
+
- 6
|
296
|
+
- 2
|
297
|
+
version: 1.6.2
|
298
|
+
requirements: []
|
299
|
+
|
300
|
+
rubyforge_project:
|
301
|
+
rubygems_version: 1.6.2
|
302
|
+
signing_key:
|
303
|
+
specification_version: 3
|
304
|
+
summary: A library for communicating with the Cosm REST API, parsing and rendering Cosm feed formats
|
305
|
+
test_files:
|
306
|
+
- spec/cosm-rb/array_extensions_spec.rb
|
307
|
+
- spec/cosm-rb/base/instance_methods_spec.rb
|
308
|
+
- spec/cosm-rb/base_spec.rb
|
309
|
+
- spec/cosm-rb/client_spec.rb
|
310
|
+
- spec/cosm-rb/datapoint_spec.rb
|
311
|
+
- spec/cosm-rb/datastream_spec.rb
|
312
|
+
- spec/cosm-rb/feed_spec.rb
|
313
|
+
- spec/cosm-rb/hash_extensions_spec.rb
|
314
|
+
- spec/cosm-rb/helpers_spec.rb
|
315
|
+
- spec/cosm-rb/key_spec.rb
|
316
|
+
- spec/cosm-rb/parsers/csv/datastream_defaults_spec.rb
|
317
|
+
- spec/cosm-rb/parsers/csv/feed_defaults_spec.rb
|
318
|
+
- spec/cosm-rb/parsers/json/datapoint_defaults_spec.rb
|
319
|
+
- spec/cosm-rb/parsers/json/datastream_defaults_spec.rb
|
320
|
+
- spec/cosm-rb/parsers/json/feed_defaults_spec.rb
|
321
|
+
- spec/cosm-rb/parsers/json/key_defaults_spec.rb
|
322
|
+
- spec/cosm-rb/parsers/json/search_result_defaults_spec.rb
|
323
|
+
- spec/cosm-rb/parsers/json/trigger_defaults_spec.rb
|
324
|
+
- spec/cosm-rb/parsers/xml/datapoint_defaults_spec.rb
|
325
|
+
- spec/cosm-rb/parsers/xml/datastream_defaults_spec.rb
|
326
|
+
- spec/cosm-rb/parsers/xml/feed_defaults_spec.rb
|
327
|
+
- spec/cosm-rb/parsers/xml/key_defaults_spec.rb
|
328
|
+
- spec/cosm-rb/parsers/xml/trigger_defaults_spec.rb
|
329
|
+
- spec/cosm-rb/search_result_spec.rb
|
330
|
+
- spec/cosm-rb/string_extensions_spec.rb
|
331
|
+
- spec/cosm-rb/template_spec.rb
|
332
|
+
- spec/cosm-rb/templates/csv/datapoint_defaults_spec.rb
|
333
|
+
- spec/cosm-rb/templates/csv/datastream_defaults_spec.rb
|
334
|
+
- spec/cosm-rb/templates/csv/feed_defaults_spec.rb
|
335
|
+
- spec/cosm-rb/templates/json/datapoint_defaults_spec.rb
|
336
|
+
- spec/cosm-rb/templates/json/datastream_defaults_spec.rb
|
337
|
+
- spec/cosm-rb/templates/json/feed_defaults_spec.rb
|
338
|
+
- spec/cosm-rb/templates/json/key_defaults_spec.rb
|
339
|
+
- spec/cosm-rb/templates/json/search_result_defaults_spec.rb
|
340
|
+
- spec/cosm-rb/templates/json/trigger_defaults_spec.rb
|
341
|
+
- spec/cosm-rb/templates/xml/datapoint_defaults_spec.rb
|
342
|
+
- spec/cosm-rb/templates/xml/datastream_defaults_spec.rb
|
343
|
+
- spec/cosm-rb/templates/xml/feed_defaults_spec.rb
|
344
|
+
- spec/cosm-rb/templates/xml/search_result_defaults_spec.rb
|
345
|
+
- spec/cosm-rb/trigger_spec.rb
|
346
|
+
- spec/fixtures/models.rb
|
347
|
+
- spec/spec_helper.rb
|
348
|
+
- spec/support/contain_datapoint_eeml_matcher.rb
|
349
|
+
- spec/support/contain_datastream_eeml_matcher.rb
|
350
|
+
- spec/support/contain_feed_eeml_matcher.rb
|
351
|
+
- spec/support/datapoint_helper.rb
|
352
|
+
- spec/support/datastream_helper.rb
|
353
|
+
- spec/support/describe_eeml_matcher.rb
|
354
|
+
- spec/support/feed_helper.rb
|
355
|
+
- spec/support/fully_represent_datapoint_matcher.rb
|
356
|
+
- spec/support/fully_represent_datastream_matcher.rb
|
357
|
+
- spec/support/fully_represent_feed_matcher.rb
|
358
|
+
- spec/support/fully_represent_key_matcher.rb
|
359
|
+
- spec/support/fully_represent_search_result_matcher.rb
|
360
|
+
- spec/support/fully_represent_trigger_matcher.rb
|
361
|
+
- spec/support/key_helper.rb
|
362
|
+
- spec/support/search_result_helper.rb
|
363
|
+
- spec/support/trigger_helper.rb
|