neuron-client 0.2.6 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -8
- data/lib/neuron-client/api.rb +5 -0
- data/lib/neuron-client/model/ad.rb +142 -0
- data/lib/neuron-client/model/ad_calculations.rb +325 -0
- data/lib/neuron-client/model/ad_zone.rb +45 -0
- data/lib/neuron-client/model/base.rb +233 -18
- data/lib/neuron-client/model/blocked_referer.rb +20 -0
- data/lib/neuron-client/model/blocked_user_agent.rb +21 -0
- data/lib/neuron-client/model/geo_target.rb +36 -0
- data/lib/neuron-client/model/pixel.rb +22 -0
- data/lib/neuron-client/model/report.rb +35 -0
- data/lib/neuron-client/model/s3_file.rb +30 -0
- data/lib/neuron-client/model/zone.rb +64 -0
- data/lib/neuron-client/model/zone_calculations.rb +37 -0
- data/lib/neuron-client/schema/ad.rb +406 -0
- data/lib/neuron-client/schema/ad_zone.rb +49 -0
- data/lib/neuron-client/schema/blocked_referer.rb +52 -0
- data/lib/neuron-client/schema/blocked_user_agent.rb +64 -0
- data/lib/neuron-client/schema/common.rb +220 -0
- data/lib/neuron-client/schema/event.rb +17 -0
- data/lib/neuron-client/schema/geo_target.rb +33 -0
- data/lib/neuron-client/schema/pixel.rb +39 -0
- data/lib/neuron-client/schema/report.rb +59 -0
- data/lib/neuron-client/schema/s3_file.rb +87 -0
- data/lib/neuron-client/schema/zone.rb +214 -0
- data/lib/neuron-client/version.rb +1 -1
- data/lib/neuron-client.rb +24 -59
- data/neuron-client.gemspec +3 -0
- data/spec/lib/admin_connection_spec.rb +234 -0
- data/spec/lib/api_spec.rb +41 -63
- data/spec/lib/model/ad_calculations_spec.rb +1146 -0
- data/spec/lib/model/ad_spec.rb +253 -0
- data/spec/lib/model/ad_zone_spec.rb +15 -0
- data/spec/lib/model/base_spec.rb +5 -83
- data/spec/lib/model/blocked_referer_spec.rb +36 -0
- data/spec/lib/model/blocked_user_agent_spec.rb +36 -0
- data/spec/lib/model/geo_target_spec.rb +28 -0
- data/spec/lib/model/pixel_spec.rb +36 -0
- data/spec/lib/model/report_spec.rb +17 -0
- data/spec/lib/{s3_file_spec.rb → model/s3_file_spec.rb} +6 -5
- data/spec/lib/model/zone_calculations_spec.rb +49 -0
- data/spec/lib/model/zone_spec.rb +155 -0
- data/spec/lib/schema/ad_spec.rb +515 -0
- data/spec/lib/schema/ad_zone_spec.rb +149 -0
- data/spec/lib/schema/blocked_referer_spec.rb +136 -0
- data/spec/lib/schema/blocked_user_agent_spec.rb +147 -0
- data/spec/lib/schema/geo_target_spec.rb +92 -0
- data/spec/lib/schema/pixel_spec.rb +125 -0
- data/spec/lib/schema/report_spec.rb +129 -0
- data/spec/lib/schema/s3_file_spec.rb +164 -0
- data/spec/lib/schema/zone_spec.rb +243 -0
- data/spec/spec_helper.rb +2 -1
- metadata +141 -121
- data/lib/neuron-client/model/admin/ad.rb +0 -22
- data/lib/neuron-client/model/admin/ad_zone.rb +0 -15
- data/lib/neuron-client/model/admin/base.rb +0 -91
- data/lib/neuron-client/model/admin/blocked_referer.rb +0 -12
- data/lib/neuron-client/model/admin/blocked_user_agent.rb +0 -12
- data/lib/neuron-client/model/admin/geo_target.rb +0 -16
- data/lib/neuron-client/model/admin/pixel.rb +0 -12
- data/lib/neuron-client/model/admin/report.rb +0 -15
- data/lib/neuron-client/model/admin/s3_file.rb +0 -12
- data/lib/neuron-client/model/admin/zone.rb +0 -15
- data/lib/neuron-client/model/common/ad.rb +0 -42
- data/lib/neuron-client/model/common/ad_calculations.rb +0 -329
- data/lib/neuron-client/model/common/ad_zone.rb +0 -17
- data/lib/neuron-client/model/common/base.rb +0 -67
- data/lib/neuron-client/model/common/blocked_referer.rb +0 -16
- data/lib/neuron-client/model/common/blocked_user_agent.rb +0 -16
- data/lib/neuron-client/model/common/geo_target.rb +0 -16
- data/lib/neuron-client/model/common/pixel.rb +0 -18
- data/lib/neuron-client/model/common/report.rb +0 -21
- data/lib/neuron-client/model/common/s3_file.rb +0 -16
- data/lib/neuron-client/model/common/zone.rb +0 -22
- data/lib/neuron-client/model/common/zone_calculations.rb +0 -41
- data/lib/neuron-client/model/membase/ad.rb +0 -49
- data/lib/neuron-client/model/membase/ad_zone.rb +0 -11
- data/lib/neuron-client/model/membase/blocked_referer.rb +0 -20
- data/lib/neuron-client/model/membase/blocked_user_agent.rb +0 -20
- data/lib/neuron-client/model/membase/geo_target.rb +0 -11
- data/lib/neuron-client/model/membase/pixel.rb +0 -22
- data/lib/neuron-client/model/membase/report.rb +0 -11
- data/lib/neuron-client/model/membase/s3_file.rb +0 -11
- data/lib/neuron-client/model/membase/zone.rb +0 -30
- data/lib/neuron-client/model/models.rb +0 -15
- data/spec/lib/model/admin/ad_spec.rb +0 -34
- data/spec/lib/model/admin/ad_zone_spec.rb +0 -19
- data/spec/lib/model/admin/base_spec.rb +0 -11
- data/spec/lib/model/admin/blocked_referer_spec.rb +0 -11
- data/spec/lib/model/admin/blocked_user_agent_spec.rb +0 -11
- data/spec/lib/model/admin/geo_target_spec.rb +0 -30
- data/spec/lib/model/admin/report_spec.rb +0 -21
- data/spec/lib/model/admin/s3_spec.rb +0 -11
- data/spec/lib/model/admin/zone_spec.rb +0 -21
- data/spec/lib/model/common/ad_calculations_spec.rb +0 -1151
- data/spec/lib/model/common/ad_spec.rb +0 -11
- data/spec/lib/model/common/ad_zone_spec.rb +0 -11
- data/spec/lib/model/common/base_spec.rb +0 -11
- data/spec/lib/model/common/blocked_referer_spec.rb +0 -11
- data/spec/lib/model/common/blocked_user_agent_spec.rb +0 -11
- data/spec/lib/model/common/geo_target_spec.rb +0 -11
- data/spec/lib/model/common/report_spec.rb +0 -11
- data/spec/lib/model/common/s3_spec.rb +0 -11
- data/spec/lib/model/common/zone_calculations_spec.rb +0 -54
- data/spec/lib/model/common/zone_spec.rb +0 -11
- data/spec/lib/model/membase/ad_spec.rb +0 -54
- data/spec/lib/model/membase/ad_zone_spec.rb +0 -11
- data/spec/lib/model/membase/base_spec.rb +0 -11
- data/spec/lib/model/membase/blocked_referer_spec.rb +0 -34
- data/spec/lib/model/membase/blocked_user_agent_spec.rb +0 -34
- data/spec/lib/model/membase/geo_target_spec.rb +0 -11
- data/spec/lib/model/membase/pixel_spec.rb +0 -34
- data/spec/lib/model/membase/report_spec.rb +0 -11
- data/spec/lib/model/membase/s3_spec.rb +0 -11
- data/spec/lib/model/membase/zone_spec.rb +0 -32
- data/spec/lib/old_spec.rb +0 -437
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neuron-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- RMM Online
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-01-11 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rest-client
|
@@ -158,9 +158,63 @@ dependencies:
|
|
158
158
|
type: :runtime
|
159
159
|
version_requirements: *id007
|
160
160
|
- !ruby/object:Gem::Dependency
|
161
|
-
name:
|
161
|
+
name: map
|
162
162
|
prerelease: false
|
163
163
|
requirement: &id008 !ruby/object:Gem::Requirement
|
164
|
+
none: false
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
hash: 55
|
169
|
+
segments:
|
170
|
+
- 4
|
171
|
+
- 2
|
172
|
+
- 0
|
173
|
+
version: 4.2.0
|
174
|
+
- - <
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
hash: 9
|
177
|
+
segments:
|
178
|
+
- 5
|
179
|
+
version: "5"
|
180
|
+
type: :runtime
|
181
|
+
version_requirements: *id008
|
182
|
+
- !ruby/object:Gem::Dependency
|
183
|
+
name: deep_merge
|
184
|
+
prerelease: false
|
185
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
186
|
+
none: false
|
187
|
+
requirements:
|
188
|
+
- - ~>
|
189
|
+
- !ruby/object:Gem::Version
|
190
|
+
hash: 23
|
191
|
+
segments:
|
192
|
+
- 1
|
193
|
+
- 0
|
194
|
+
- 0
|
195
|
+
version: 1.0.0
|
196
|
+
type: :runtime
|
197
|
+
version_requirements: *id009
|
198
|
+
- !ruby/object:Gem::Dependency
|
199
|
+
name: json-schema
|
200
|
+
prerelease: false
|
201
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
202
|
+
none: false
|
203
|
+
requirements:
|
204
|
+
- - ~>
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
hash: 35
|
207
|
+
segments:
|
208
|
+
- 0
|
209
|
+
- 9
|
210
|
+
- 12
|
211
|
+
version: 0.9.12
|
212
|
+
type: :runtime
|
213
|
+
version_requirements: *id010
|
214
|
+
- !ruby/object:Gem::Dependency
|
215
|
+
name: rspec
|
216
|
+
prerelease: false
|
217
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
164
218
|
none: false
|
165
219
|
requirements:
|
166
220
|
- - ~>
|
@@ -172,11 +226,11 @@ dependencies:
|
|
172
226
|
- 0
|
173
227
|
version: 2.7.0
|
174
228
|
type: :development
|
175
|
-
version_requirements: *
|
229
|
+
version_requirements: *id011
|
176
230
|
- !ruby/object:Gem::Dependency
|
177
231
|
name: simplecov
|
178
232
|
prerelease: false
|
179
|
-
requirement: &
|
233
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
180
234
|
none: false
|
181
235
|
requirements:
|
182
236
|
- - ~>
|
@@ -188,11 +242,11 @@ dependencies:
|
|
188
242
|
- 4
|
189
243
|
version: 0.5.4
|
190
244
|
type: :development
|
191
|
-
version_requirements: *
|
245
|
+
version_requirements: *id012
|
192
246
|
- !ruby/object:Gem::Dependency
|
193
247
|
name: rb-fsevent
|
194
248
|
prerelease: false
|
195
|
-
requirement: &
|
249
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
196
250
|
none: false
|
197
251
|
requirements:
|
198
252
|
- - ~>
|
@@ -204,11 +258,11 @@ dependencies:
|
|
204
258
|
- 3
|
205
259
|
version: 0.4.3
|
206
260
|
type: :development
|
207
|
-
version_requirements: *
|
261
|
+
version_requirements: *id013
|
208
262
|
- !ruby/object:Gem::Dependency
|
209
263
|
name: guard
|
210
264
|
prerelease: false
|
211
|
-
requirement: &
|
265
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
212
266
|
none: false
|
213
267
|
requirements:
|
214
268
|
- - ~>
|
@@ -220,11 +274,11 @@ dependencies:
|
|
220
274
|
- 8
|
221
275
|
version: 0.8.8
|
222
276
|
type: :development
|
223
|
-
version_requirements: *
|
277
|
+
version_requirements: *id014
|
224
278
|
- !ruby/object:Gem::Dependency
|
225
279
|
name: guard-bundler
|
226
280
|
prerelease: false
|
227
|
-
requirement: &
|
281
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
228
282
|
none: false
|
229
283
|
requirements:
|
230
284
|
- - ~>
|
@@ -236,11 +290,11 @@ dependencies:
|
|
236
290
|
- 3
|
237
291
|
version: 0.1.3
|
238
292
|
type: :development
|
239
|
-
version_requirements: *
|
293
|
+
version_requirements: *id015
|
240
294
|
- !ruby/object:Gem::Dependency
|
241
295
|
name: guard-rspec
|
242
296
|
prerelease: false
|
243
|
-
requirement: &
|
297
|
+
requirement: &id016 !ruby/object:Gem::Requirement
|
244
298
|
none: false
|
245
299
|
requirements:
|
246
300
|
- - ~>
|
@@ -252,11 +306,11 @@ dependencies:
|
|
252
306
|
- 4
|
253
307
|
version: 0.5.4
|
254
308
|
type: :development
|
255
|
-
version_requirements: *
|
309
|
+
version_requirements: *id016
|
256
310
|
- !ruby/object:Gem::Dependency
|
257
311
|
name: fakeweb
|
258
312
|
prerelease: false
|
259
|
-
requirement: &
|
313
|
+
requirement: &id017 !ruby/object:Gem::Requirement
|
260
314
|
none: false
|
261
315
|
requirements:
|
262
316
|
- - ~>
|
@@ -268,11 +322,11 @@ dependencies:
|
|
268
322
|
- 0
|
269
323
|
version: 1.3.0
|
270
324
|
type: :development
|
271
|
-
version_requirements: *
|
325
|
+
version_requirements: *id017
|
272
326
|
- !ruby/object:Gem::Dependency
|
273
327
|
name: vcr
|
274
328
|
prerelease: false
|
275
|
-
requirement: &
|
329
|
+
requirement: &id018 !ruby/object:Gem::Requirement
|
276
330
|
none: false
|
277
331
|
requirements:
|
278
332
|
- - ~>
|
@@ -284,11 +338,11 @@ dependencies:
|
|
284
338
|
- 3
|
285
339
|
version: 1.11.3
|
286
340
|
type: :development
|
287
|
-
version_requirements: *
|
341
|
+
version_requirements: *id018
|
288
342
|
- !ruby/object:Gem::Dependency
|
289
343
|
name: timecop
|
290
344
|
prerelease: false
|
291
|
-
requirement: &
|
345
|
+
requirement: &id019 !ruby/object:Gem::Requirement
|
292
346
|
none: false
|
293
347
|
requirements:
|
294
348
|
- - ~>
|
@@ -300,11 +354,11 @@ dependencies:
|
|
300
354
|
- 5
|
301
355
|
version: 0.3.5
|
302
356
|
type: :development
|
303
|
-
version_requirements: *
|
357
|
+
version_requirements: *id019
|
304
358
|
- !ruby/object:Gem::Dependency
|
305
359
|
name: chronic
|
306
360
|
prerelease: false
|
307
|
-
requirement: &
|
361
|
+
requirement: &id020 !ruby/object:Gem::Requirement
|
308
362
|
none: false
|
309
363
|
requirements:
|
310
364
|
- - ~>
|
@@ -316,7 +370,7 @@ dependencies:
|
|
316
370
|
- 5
|
317
371
|
version: 0.6.5
|
318
372
|
type: :development
|
319
|
-
version_requirements: *
|
373
|
+
version_requirements: *id020
|
320
374
|
description: Neuron Admin Client Gem
|
321
375
|
email:
|
322
376
|
- devteam@rmmonline.com
|
@@ -338,78 +392,56 @@ files:
|
|
338
392
|
- lib/neuron-client/admin_connection.rb
|
339
393
|
- lib/neuron-client/api.rb
|
340
394
|
- lib/neuron-client/membase_connection.rb
|
341
|
-
- lib/neuron-client/model/
|
342
|
-
- lib/neuron-client/model/
|
343
|
-
- lib/neuron-client/model/
|
344
|
-
- lib/neuron-client/model/admin/blocked_referer.rb
|
345
|
-
- lib/neuron-client/model/admin/blocked_user_agent.rb
|
346
|
-
- lib/neuron-client/model/admin/geo_target.rb
|
347
|
-
- lib/neuron-client/model/admin/pixel.rb
|
348
|
-
- lib/neuron-client/model/admin/report.rb
|
349
|
-
- lib/neuron-client/model/admin/s3_file.rb
|
350
|
-
- lib/neuron-client/model/admin/zone.rb
|
395
|
+
- lib/neuron-client/model/ad.rb
|
396
|
+
- lib/neuron-client/model/ad_calculations.rb
|
397
|
+
- lib/neuron-client/model/ad_zone.rb
|
351
398
|
- lib/neuron-client/model/base.rb
|
352
|
-
- lib/neuron-client/model/
|
353
|
-
- lib/neuron-client/model/
|
354
|
-
- lib/neuron-client/model/
|
355
|
-
- lib/neuron-client/model/
|
356
|
-
- lib/neuron-client/model/
|
357
|
-
- lib/neuron-client/model/
|
358
|
-
- lib/neuron-client/model/
|
359
|
-
- lib/neuron-client/model/
|
360
|
-
- lib/neuron-client/
|
361
|
-
- lib/neuron-client/
|
362
|
-
- lib/neuron-client/
|
363
|
-
- lib/neuron-client/
|
364
|
-
- lib/neuron-client/
|
365
|
-
- lib/neuron-client/
|
366
|
-
- lib/neuron-client/
|
367
|
-
- lib/neuron-client/
|
368
|
-
- lib/neuron-client/
|
369
|
-
- lib/neuron-client/
|
370
|
-
- lib/neuron-client/
|
371
|
-
- lib/neuron-client/model/membase/s3_file.rb
|
372
|
-
- lib/neuron-client/model/membase/zone.rb
|
373
|
-
- lib/neuron-client/model/models.rb
|
399
|
+
- lib/neuron-client/model/blocked_referer.rb
|
400
|
+
- lib/neuron-client/model/blocked_user_agent.rb
|
401
|
+
- lib/neuron-client/model/geo_target.rb
|
402
|
+
- lib/neuron-client/model/pixel.rb
|
403
|
+
- lib/neuron-client/model/report.rb
|
404
|
+
- lib/neuron-client/model/s3_file.rb
|
405
|
+
- lib/neuron-client/model/zone.rb
|
406
|
+
- lib/neuron-client/model/zone_calculations.rb
|
407
|
+
- lib/neuron-client/schema/ad.rb
|
408
|
+
- lib/neuron-client/schema/ad_zone.rb
|
409
|
+
- lib/neuron-client/schema/blocked_referer.rb
|
410
|
+
- lib/neuron-client/schema/blocked_user_agent.rb
|
411
|
+
- lib/neuron-client/schema/common.rb
|
412
|
+
- lib/neuron-client/schema/event.rb
|
413
|
+
- lib/neuron-client/schema/geo_target.rb
|
414
|
+
- lib/neuron-client/schema/pixel.rb
|
415
|
+
- lib/neuron-client/schema/report.rb
|
416
|
+
- lib/neuron-client/schema/s3_file.rb
|
417
|
+
- lib/neuron-client/schema/zone.rb
|
374
418
|
- lib/neuron-client/version.rb
|
375
419
|
- neuron-client.gemspec
|
376
420
|
- spec/fixtures/vcr_cassettes/s3_file.yml
|
377
421
|
- spec/lib/admin_connection_spec.rb
|
378
422
|
- spec/lib/api_spec.rb
|
379
423
|
- spec/lib/membase_connection_spec.rb
|
380
|
-
- spec/lib/model/
|
381
|
-
- spec/lib/model/
|
382
|
-
- spec/lib/model/
|
383
|
-
- spec/lib/model/admin/blocked_referer_spec.rb
|
384
|
-
- spec/lib/model/admin/blocked_user_agent_spec.rb
|
385
|
-
- spec/lib/model/admin/geo_target_spec.rb
|
386
|
-
- spec/lib/model/admin/report_spec.rb
|
387
|
-
- spec/lib/model/admin/s3_spec.rb
|
388
|
-
- spec/lib/model/admin/zone_spec.rb
|
424
|
+
- spec/lib/model/ad_calculations_spec.rb
|
425
|
+
- spec/lib/model/ad_spec.rb
|
426
|
+
- spec/lib/model/ad_zone_spec.rb
|
389
427
|
- spec/lib/model/base_spec.rb
|
390
|
-
- spec/lib/model/
|
391
|
-
- spec/lib/model/
|
392
|
-
- spec/lib/model/
|
393
|
-
- spec/lib/model/
|
394
|
-
- spec/lib/model/
|
395
|
-
- spec/lib/model/
|
396
|
-
- spec/lib/model/
|
397
|
-
- spec/lib/model/
|
398
|
-
- spec/lib/
|
399
|
-
- spec/lib/
|
400
|
-
- spec/lib/
|
401
|
-
- spec/lib/
|
402
|
-
- spec/lib/
|
403
|
-
- spec/lib/
|
404
|
-
- spec/lib/
|
405
|
-
- spec/lib/
|
406
|
-
- spec/lib/
|
407
|
-
- spec/lib/model/membase/pixel_spec.rb
|
408
|
-
- spec/lib/model/membase/report_spec.rb
|
409
|
-
- spec/lib/model/membase/s3_spec.rb
|
410
|
-
- spec/lib/model/membase/zone_spec.rb
|
411
|
-
- spec/lib/old_spec.rb
|
412
|
-
- spec/lib/s3_file_spec.rb
|
428
|
+
- spec/lib/model/blocked_referer_spec.rb
|
429
|
+
- spec/lib/model/blocked_user_agent_spec.rb
|
430
|
+
- spec/lib/model/geo_target_spec.rb
|
431
|
+
- spec/lib/model/pixel_spec.rb
|
432
|
+
- spec/lib/model/report_spec.rb
|
433
|
+
- spec/lib/model/s3_file_spec.rb
|
434
|
+
- spec/lib/model/zone_calculations_spec.rb
|
435
|
+
- spec/lib/model/zone_spec.rb
|
436
|
+
- spec/lib/schema/ad_spec.rb
|
437
|
+
- spec/lib/schema/ad_zone_spec.rb
|
438
|
+
- spec/lib/schema/blocked_referer_spec.rb
|
439
|
+
- spec/lib/schema/blocked_user_agent_spec.rb
|
440
|
+
- spec/lib/schema/geo_target_spec.rb
|
441
|
+
- spec/lib/schema/pixel_spec.rb
|
442
|
+
- spec/lib/schema/report_spec.rb
|
443
|
+
- spec/lib/schema/s3_file_spec.rb
|
444
|
+
- spec/lib/schema/zone_spec.rb
|
413
445
|
- spec/spec_helper.rb
|
414
446
|
homepage: http://github.com/rmm/neuron-client
|
415
447
|
licenses: []
|
@@ -449,37 +481,25 @@ test_files:
|
|
449
481
|
- spec/lib/admin_connection_spec.rb
|
450
482
|
- spec/lib/api_spec.rb
|
451
483
|
- spec/lib/membase_connection_spec.rb
|
452
|
-
- spec/lib/model/
|
453
|
-
- spec/lib/model/
|
454
|
-
- spec/lib/model/
|
455
|
-
- spec/lib/model/admin/blocked_referer_spec.rb
|
456
|
-
- spec/lib/model/admin/blocked_user_agent_spec.rb
|
457
|
-
- spec/lib/model/admin/geo_target_spec.rb
|
458
|
-
- spec/lib/model/admin/report_spec.rb
|
459
|
-
- spec/lib/model/admin/s3_spec.rb
|
460
|
-
- spec/lib/model/admin/zone_spec.rb
|
484
|
+
- spec/lib/model/ad_calculations_spec.rb
|
485
|
+
- spec/lib/model/ad_spec.rb
|
486
|
+
- spec/lib/model/ad_zone_spec.rb
|
461
487
|
- spec/lib/model/base_spec.rb
|
462
|
-
- spec/lib/model/
|
463
|
-
- spec/lib/model/
|
464
|
-
- spec/lib/model/
|
465
|
-
- spec/lib/model/
|
466
|
-
- spec/lib/model/
|
467
|
-
- spec/lib/model/
|
468
|
-
- spec/lib/model/
|
469
|
-
- spec/lib/model/
|
470
|
-
- spec/lib/
|
471
|
-
- spec/lib/
|
472
|
-
- spec/lib/
|
473
|
-
- spec/lib/
|
474
|
-
- spec/lib/
|
475
|
-
- spec/lib/
|
476
|
-
- spec/lib/
|
477
|
-
- spec/lib/
|
478
|
-
- spec/lib/
|
479
|
-
- spec/lib/model/membase/pixel_spec.rb
|
480
|
-
- spec/lib/model/membase/report_spec.rb
|
481
|
-
- spec/lib/model/membase/s3_spec.rb
|
482
|
-
- spec/lib/model/membase/zone_spec.rb
|
483
|
-
- spec/lib/old_spec.rb
|
484
|
-
- spec/lib/s3_file_spec.rb
|
488
|
+
- spec/lib/model/blocked_referer_spec.rb
|
489
|
+
- spec/lib/model/blocked_user_agent_spec.rb
|
490
|
+
- spec/lib/model/geo_target_spec.rb
|
491
|
+
- spec/lib/model/pixel_spec.rb
|
492
|
+
- spec/lib/model/report_spec.rb
|
493
|
+
- spec/lib/model/s3_file_spec.rb
|
494
|
+
- spec/lib/model/zone_calculations_spec.rb
|
495
|
+
- spec/lib/model/zone_spec.rb
|
496
|
+
- spec/lib/schema/ad_spec.rb
|
497
|
+
- spec/lib/schema/ad_zone_spec.rb
|
498
|
+
- spec/lib/schema/blocked_referer_spec.rb
|
499
|
+
- spec/lib/schema/blocked_user_agent_spec.rb
|
500
|
+
- spec/lib/schema/geo_target_spec.rb
|
501
|
+
- spec/lib/schema/pixel_spec.rb
|
502
|
+
- spec/lib/schema/report_spec.rb
|
503
|
+
- spec/lib/schema/s3_file_spec.rb
|
504
|
+
- spec/lib/schema/zone_spec.rb
|
485
505
|
- spec/spec_helper.rb
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Neuron
|
2
|
-
module Client
|
3
|
-
module Model
|
4
|
-
module Admin
|
5
|
-
class Ad < Common::Ad
|
6
|
-
include Base
|
7
|
-
|
8
|
-
# deliveries
|
9
|
-
attr_accessor :total_impressed, :today_impressed
|
10
|
-
|
11
|
-
def recent(statistic, parameters)
|
12
|
-
self.class.connection.get("ads/#{id}/recent/#{statistic}", parameters)
|
13
|
-
end
|
14
|
-
|
15
|
-
def unlink(zone_id)
|
16
|
-
self.class.connection.delete("ads/#{id}/zones/#{zone_id}")
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,91 +0,0 @@
|
|
1
|
-
module Neuron
|
2
|
-
module Client
|
3
|
-
module Model
|
4
|
-
module Admin
|
5
|
-
module Base
|
6
|
-
def attributes
|
7
|
-
self.class.superclass.attributes || []
|
8
|
-
end
|
9
|
-
|
10
|
-
def to_hash(*except)
|
11
|
-
hash = {}
|
12
|
-
attributes.reject{|a| except.collect(&:to_sym).include?(a.to_sym)}.each do |attribute|
|
13
|
-
value = send(attribute)
|
14
|
-
hash[attribute] = value unless value.nil?
|
15
|
-
end
|
16
|
-
hash
|
17
|
-
end
|
18
|
-
|
19
|
-
def new_record?
|
20
|
-
id.nil?
|
21
|
-
end
|
22
|
-
|
23
|
-
def save
|
24
|
-
@errors = catch :errors do
|
25
|
-
if new_record?
|
26
|
-
response = self.class.connection.post("#{self.class.superclass.resources_name}", {self.class.superclass.resource_name => self.to_hash(:errors, :updated_at, :created_at)})
|
27
|
-
self.id = response[self.class.superclass.resource_name][self.class.remote_id]
|
28
|
-
else
|
29
|
-
response = self.class.connection.put("#{self.class.superclass.resources_name}/#{id}", {self.class.superclass.resource_name => self.to_hash(:errors, :updated_at, :created_at)})
|
30
|
-
end
|
31
|
-
[]
|
32
|
-
end
|
33
|
-
|
34
|
-
@errors.empty?
|
35
|
-
end
|
36
|
-
|
37
|
-
def update_attributes(attrs={})
|
38
|
-
@errors = catch :errors do
|
39
|
-
response = self.class.connection.put("#{self.class.superclass.resources_name}/#{id}", {self.class.superclass.resource_name => attrs})
|
40
|
-
attrs.each do |key, value|
|
41
|
-
self.send("#{key}=", value) if self.respond_to?("#{key}=")
|
42
|
-
end
|
43
|
-
[]
|
44
|
-
end
|
45
|
-
|
46
|
-
@errors.empty?
|
47
|
-
end
|
48
|
-
|
49
|
-
def valid?
|
50
|
-
@errors.empty?
|
51
|
-
end
|
52
|
-
|
53
|
-
def destroy
|
54
|
-
self.class.connection.delete("#{self.class.superclass.resources_name}/#{id}")
|
55
|
-
end
|
56
|
-
|
57
|
-
def self.included(base)
|
58
|
-
base.superclass.send(:attr_accessor, :errors)
|
59
|
-
base.extend(ClassMethods)
|
60
|
-
end
|
61
|
-
|
62
|
-
module ClassMethods
|
63
|
-
def find(id)
|
64
|
-
response = self.connection.get("#{superclass.resources_name}/#{id}")
|
65
|
-
model = nil
|
66
|
-
model = self.new(response[superclass.resource_name]) if response.present?
|
67
|
-
model
|
68
|
-
end
|
69
|
-
|
70
|
-
def all
|
71
|
-
response = self.connection.get("#{superclass.resources_name}")
|
72
|
-
response.map{|hash| self.new(hash[superclass.resource_name])}
|
73
|
-
end
|
74
|
-
|
75
|
-
def create(attrs={})
|
76
|
-
@errors = catch :errors do
|
77
|
-
return create!(attrs)
|
78
|
-
end
|
79
|
-
nil
|
80
|
-
end
|
81
|
-
|
82
|
-
def create!(attrs={})
|
83
|
-
response = self.connection.post("#{superclass.resources_name}", {superclass.resource_name => attrs})
|
84
|
-
self.new(response[superclass.resource_name])
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Neuron
|
2
|
-
module Client
|
3
|
-
module Model
|
4
|
-
module Admin
|
5
|
-
class GeoTarget < Common::GeoTarget
|
6
|
-
include Base
|
7
|
-
|
8
|
-
def self.query(parameters)
|
9
|
-
response = self.connection.get("geo_targets", parameters)
|
10
|
-
response.map{|hash| self.new(hash[superclass.resource_name])}
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
module Neuron
|
2
|
-
module Client
|
3
|
-
module Model
|
4
|
-
module Common
|
5
|
-
class Ad
|
6
|
-
include Base
|
7
|
-
include AdCalculations
|
8
|
-
|
9
|
-
resource_name("ad")
|
10
|
-
resources_name("ads")
|
11
|
-
|
12
|
-
attr_accessor :name, :approved, :response_type, :parameters, :geo_target_ids, :ad_trackers,
|
13
|
-
:ad_trackers_attributes, :trackers,
|
14
|
-
# redirect
|
15
|
-
:redirect_url,
|
16
|
-
# video
|
17
|
-
:video_api_url, :video_setup_xml, :video_flv_url,
|
18
|
-
:video_clickthru_url, :video_companion_ad_html, :social_links, :social_links_attributes,
|
19
|
-
# caps
|
20
|
-
:frequency_cap_limit, :frequency_cap_window, :overall_cap,
|
21
|
-
:daily_cap, :day_partitions, :ideal_impressions_per_hour,
|
22
|
-
# range
|
23
|
-
:start_datetime, :end_datetime, :time_zone,
|
24
|
-
# related pixels
|
25
|
-
:pixel_ids,
|
26
|
-
# timestamps
|
27
|
-
:created_at, :updated_at
|
28
|
-
|
29
|
-
class << self
|
30
|
-
def stringify_day_partitions(days)
|
31
|
-
result = ""
|
32
|
-
168.times do |i|
|
33
|
-
result << (days[i.to_s] || "F")
|
34
|
-
end
|
35
|
-
result
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|