esp_sdk 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/esp.rb +0 -10
- data/lib/esp/resources/custom_signature.rb +6 -108
- data/lib/esp/resources/custom_signature/definition.rb +100 -0
- data/lib/esp/resources/custom_signature/result.rb +97 -0
- data/lib/esp/resources/custom_signature/result/alert.rb +53 -0
- data/lib/esp/resources/dashboard.rb +2 -2
- data/lib/esp/resources/report.rb +5 -1
- data/lib/esp/resources/suppression.rb +4 -0
- data/lib/esp/version.rb +1 -1
- data/test/esp/integration/custom_signature_definition_integration_test.rb +95 -0
- data/test/esp/integration/custom_signature_integration_test.rb +0 -33
- data/test/esp/integration/custom_signature_result_alert_integration_test.rb +59 -0
- data/test/esp/integration/custom_signature_result_integration_test.rb +83 -0
- data/test/esp/integration/external_account_integration_test.rb +0 -22
- data/test/esp/integration/report_export_integration_integration_test.rb +1 -1
- data/test/esp/resources/custom_signature/definition_test.rb +77 -0
- data/test/esp/resources/custom_signature/result/alert_test.rb +84 -0
- data/test/esp/resources/custom_signature/result_test.rb +91 -0
- data/test/esp/resources/custom_signature_test.rb +7 -122
- data/test/esp/resources/service_test.rb +8 -0
- data/test/factories/custom_signature/definitions.rb +30 -0
- data/test/factories/custom_signature/result_alerts.rb +94 -0
- data/test/factories/custom_signature/results.rb +49 -0
- data/test/factories/reports.rb +0 -10
- metadata +24 -3
@@ -0,0 +1,49 @@
|
|
1
|
+
FactoryGirl.define do
|
2
|
+
factory :result, class: 'ESP::CustomSignature::Result' do
|
3
|
+
skip_create
|
4
|
+
|
5
|
+
sequence(:id) { |n| n }
|
6
|
+
code 'abc'
|
7
|
+
created_at { Time.current }
|
8
|
+
language 'javascript'
|
9
|
+
status "complete"
|
10
|
+
updated_at { Time.current }
|
11
|
+
|
12
|
+
relationships do
|
13
|
+
{
|
14
|
+
definition: {
|
15
|
+
data: {
|
16
|
+
type: "definitions",
|
17
|
+
id: "1"
|
18
|
+
},
|
19
|
+
links: {
|
20
|
+
related: "http://localhost:3000/api/v2/custom_signature_definitions/1.json"
|
21
|
+
}
|
22
|
+
},
|
23
|
+
region: {
|
24
|
+
data: {
|
25
|
+
type: "regions",
|
26
|
+
id: "1"
|
27
|
+
},
|
28
|
+
links: {
|
29
|
+
related: "http://localhost:3000/api/v2/regions/1.json"
|
30
|
+
}
|
31
|
+
},
|
32
|
+
external_account: {
|
33
|
+
data: {
|
34
|
+
type: "external_accounts",
|
35
|
+
id: "1"
|
36
|
+
},
|
37
|
+
links: {
|
38
|
+
related: "http://localhost:3000/api/v2/external_accounts/1.json"
|
39
|
+
}
|
40
|
+
},
|
41
|
+
alerts: {
|
42
|
+
links: {
|
43
|
+
related: "http://localhost:3000/api/v2/custom_signature_results/#{id}/alerts.json"
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
data/test/factories/reports.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esp_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evident.io
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -330,6 +330,9 @@ files:
|
|
330
330
|
- lib/esp/resources/concerns/stat_totals.rb
|
331
331
|
- lib/esp/resources/contact_request.rb
|
332
332
|
- lib/esp/resources/custom_signature.rb
|
333
|
+
- lib/esp/resources/custom_signature/definition.rb
|
334
|
+
- lib/esp/resources/custom_signature/result.rb
|
335
|
+
- lib/esp/resources/custom_signature/result/alert.rb
|
333
336
|
- lib/esp/resources/dashboard.rb
|
334
337
|
- lib/esp/resources/external_account.rb
|
335
338
|
- lib/esp/resources/metadata.rb
|
@@ -366,7 +369,10 @@ files:
|
|
366
369
|
- test/esp/integration/alert_integration_test.rb
|
367
370
|
- test/esp/integration/cloud_trail_event_integration_test.rb
|
368
371
|
- test/esp/integration/contact_request_integration_test.rb
|
372
|
+
- test/esp/integration/custom_signature_definition_integration_test.rb
|
369
373
|
- test/esp/integration/custom_signature_integration_test.rb
|
374
|
+
- test/esp/integration/custom_signature_result_alert_integration_test.rb
|
375
|
+
- test/esp/integration/custom_signature_result_integration_test.rb
|
370
376
|
- test/esp/integration/dashboard_integration_test.rb
|
371
377
|
- test/esp/integration/external_account_integration_test.rb
|
372
378
|
- test/esp/integration/json_api_format_integration_test.rb
|
@@ -397,6 +403,9 @@ files:
|
|
397
403
|
- test/esp/resources/alert_test.rb
|
398
404
|
- test/esp/resources/cloud_trail_event_test.rb
|
399
405
|
- test/esp/resources/contact_request_test.rb
|
406
|
+
- test/esp/resources/custom_signature/definition_test.rb
|
407
|
+
- test/esp/resources/custom_signature/result/alert_test.rb
|
408
|
+
- test/esp/resources/custom_signature/result_test.rb
|
400
409
|
- test/esp/resources/custom_signature_test.rb
|
401
410
|
- test/esp/resources/dashboard_test.rb
|
402
411
|
- test/esp/resources/external_account_test.rb
|
@@ -426,6 +435,9 @@ files:
|
|
426
435
|
- test/factories/alerts.rb
|
427
436
|
- test/factories/cloud_trail_events.rb
|
428
437
|
- test/factories/contact_requests.rb
|
438
|
+
- test/factories/custom_signature/definitions.rb
|
439
|
+
- test/factories/custom_signature/result_alerts.rb
|
440
|
+
- test/factories/custom_signature/results.rb
|
429
441
|
- test/factories/custom_signatures.rb
|
430
442
|
- test/factories/dashboards.rb
|
431
443
|
- test/factories/errors.rb
|
@@ -473,7 +485,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
473
485
|
version: '0'
|
474
486
|
requirements: []
|
475
487
|
rubyforge_project:
|
476
|
-
rubygems_version: 2.
|
488
|
+
rubygems_version: 2.0.14.1
|
477
489
|
signing_key:
|
478
490
|
specification_version: 4
|
479
491
|
summary: SDK for interacting with the ESP API.
|
@@ -486,7 +498,10 @@ test_files:
|
|
486
498
|
- test/esp/integration/alert_integration_test.rb
|
487
499
|
- test/esp/integration/cloud_trail_event_integration_test.rb
|
488
500
|
- test/esp/integration/contact_request_integration_test.rb
|
501
|
+
- test/esp/integration/custom_signature_definition_integration_test.rb
|
489
502
|
- test/esp/integration/custom_signature_integration_test.rb
|
503
|
+
- test/esp/integration/custom_signature_result_alert_integration_test.rb
|
504
|
+
- test/esp/integration/custom_signature_result_integration_test.rb
|
490
505
|
- test/esp/integration/dashboard_integration_test.rb
|
491
506
|
- test/esp/integration/external_account_integration_test.rb
|
492
507
|
- test/esp/integration/json_api_format_integration_test.rb
|
@@ -517,6 +532,9 @@ test_files:
|
|
517
532
|
- test/esp/resources/alert_test.rb
|
518
533
|
- test/esp/resources/cloud_trail_event_test.rb
|
519
534
|
- test/esp/resources/contact_request_test.rb
|
535
|
+
- test/esp/resources/custom_signature/definition_test.rb
|
536
|
+
- test/esp/resources/custom_signature/result/alert_test.rb
|
537
|
+
- test/esp/resources/custom_signature/result_test.rb
|
520
538
|
- test/esp/resources/custom_signature_test.rb
|
521
539
|
- test/esp/resources/dashboard_test.rb
|
522
540
|
- test/esp/resources/external_account_test.rb
|
@@ -546,6 +564,9 @@ test_files:
|
|
546
564
|
- test/factories/alerts.rb
|
547
565
|
- test/factories/cloud_trail_events.rb
|
548
566
|
- test/factories/contact_requests.rb
|
567
|
+
- test/factories/custom_signature/definitions.rb
|
568
|
+
- test/factories/custom_signature/result_alerts.rb
|
569
|
+
- test/factories/custom_signature/results.rb
|
549
570
|
- test/factories/custom_signatures.rb
|
550
571
|
- test/factories/dashboards.rb
|
551
572
|
- test/factories/errors.rb
|