esp_sdk 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +36 -35
  3. data/.travis.yml +2 -1
  4. data/CHANGELOG.md +9 -0
  5. data/Gemfile.lock +63 -85
  6. data/Rakefile +2 -1
  7. data/esp_sdk.gemspec +3 -4
  8. data/lib/esp/aws_clients.rb +2 -2
  9. data/lib/esp/commands/add_external_account.rb +1 -1
  10. data/lib/esp/commands/commands_tasks.rb +2 -2
  11. data/lib/esp/extensions/active_resource/formats/json_api_format.rb +24 -16
  12. data/lib/esp/extensions/active_resource/validations.rb +1 -1
  13. data/lib/esp/resources/alert.rb +3 -2
  14. data/lib/esp/resources/custom_signature/definition.rb +2 -2
  15. data/lib/esp/resources/dashboard.rb +2 -5
  16. data/lib/esp/resources/resource.rb +14 -15
  17. data/lib/esp/resources/stat.rb +2 -5
  18. data/lib/esp/resources/suppression.rb +1 -1
  19. data/lib/esp/version.rb +1 -1
  20. data/test/esp/integration/custom_signature_definition_integration_test.rb +15 -1
  21. data/test/esp/integration/custom_signature_integration_test.rb +3 -1
  22. data/test/esp/integration/custom_signature_result_alert_integration_test.rb +4 -4
  23. data/test/esp/integration/custom_signature_result_integration_test.rb +2 -1
  24. data/test/esp/integration/json_api_format_integration_test.rb +1 -1
  25. data/test/esp/integration/suppression_integration_test.rb +1 -1
  26. data/test/esp/integration/suppression_unique_identifier_integration_test.rb +1 -1
  27. data/test/esp/resources/custom_signature/definition_test.rb +1 -1
  28. data/test/esp/resources/custom_signature_test.rb +1 -1
  29. data/test/esp/resources/external_account_test.rb +1 -1
  30. data/test/esp/resources/organization_test.rb +6 -6
  31. data/test/esp/resources/service_test.rb +1 -1
  32. data/test/esp/resources/sub_organization_test.rb +3 -3
  33. data/test/esp/resources/team_test.rb +2 -2
  34. data/test/factories/contact_requests.rb +1 -2
  35. data/test/factories/custom_signature/definitions.rb +1 -2
  36. data/test/factories/dashboards.rb +1 -2
  37. data/test/factories/external_accounts.rb +1 -2
  38. data/test/factories/organizations.rb +1 -2
  39. data/test/factories/reports.rb +1 -2
  40. data/test/factories/scan_intervals.rb +1 -2
  41. data/test/factories/stat_custom_signatures.rb +1 -2
  42. data/test/factories/stat_regions.rb +1 -2
  43. data/test/factories/stat_services.rb +1 -2
  44. data/test/factories/stat_signautures.rb +1 -2
  45. data/test/factories/stats.rb +1 -2
  46. data/test/factories/sub_organizations.rb +1 -2
  47. data/test/factories/suppression/regions.rb +2 -4
  48. data/test/factories/suppression/signatures.rb +2 -4
  49. data/test/factories/suppression/unique_identifiers.rb +2 -4
  50. data/test/factories/suppressions.rb +1 -2
  51. data/test/factories/users.rb +1 -2
  52. data/test/test_helper.rb +3 -10
  53. metadata +11 -28
  54. data/lib/tasks/testing.rake +0 -3
  55. data/test/parallel_reporter.rb +0 -93
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 978cdf444e38c28c557b064ded697801588861b4
4
- data.tar.gz: 002224323463cc5a0e8bd1a3199e578b35f076ba
3
+ metadata.gz: 9303aec59c2ef00c02e78c0e65a711e4c8f2ea67
4
+ data.tar.gz: 760ccebc858db243ed18a4c1e04a001b16578d0d
5
5
  SHA512:
6
- metadata.gz: 3cc050b808ce01966cb03aaa4919983c6fcc1126f618e463d9dce523d2d4e52eb7e1e48190b4728cefd13668d1f7eb6b8f9e4d379ffeae11d16775bb81a70f34
7
- data.tar.gz: 424feda1ed42cc94e87203a9fa662a113ebcce8932209212c0048a738ddf23f7ecb1e03cf962ad758ea62dbbe88959a7785ceacd7b7f9a67f8bd9cf93942df2c
6
+ metadata.gz: 6fd0ca9082f528f4b10f225702a6b9ca307cd4599918ea910389345f7d895e02ca8cf7de555684379c9fc0db15b766a6c21966d0522a3d2455301066c0bd41cd
7
+ data.tar.gz: e2b3149dc9c10035432cccb2cc65a0fb19f179e813c85bed1bbf661f345a21b58c3f347bf79707e194fdf8553a4c70bc994a1a3c3df7c9f26c0dbf576f709b3f
@@ -12,9 +12,11 @@ AllCops:
12
12
  - 'bin/**/*'
13
13
  - 'test/test_reporter.rb'
14
14
  - 'test/shared_connection.rb'
15
+ TargetRubyVersion: 2.0
15
16
 
16
17
  DisplayCopNames: true
17
- RunRailsCops: true
18
+ Rails:
19
+ Enabled: true
18
20
 
19
21
  ################################################################
20
22
  ###################### Style ###################################
@@ -105,7 +107,7 @@ Style/CaseEquality:
105
107
 
106
108
  Style/CaseIndentation:
107
109
  Enabled: true
108
- IndentWhenRelativeTo: case
110
+ EnforcedStyle: case
109
111
  SupportedStyles:
110
112
  - case
111
113
  - end
@@ -169,7 +171,7 @@ Style/ConstantName:
169
171
  Style/DefWithParentheses:
170
172
  Enabled: true
171
173
 
172
- Style/DeprecatedHashMethods:
174
+ Style/PreferredHashMethods:
173
175
  Enabled: true
174
176
 
175
177
  Style/Documentation:
@@ -328,7 +330,7 @@ Style/LeadingCommentSpace:
328
330
  Style/LineEndConcatenation:
329
331
  Enabled: true
330
332
 
331
- Style/MethodCallParentheses:
333
+ Style/MethodCallWithoutArgsParentheses:
332
334
  Enabled: true
333
335
 
334
336
  Style/MethodDefParentheses:
@@ -532,7 +534,7 @@ Style/SpaceAroundEqualsInParameterDefault:
532
534
  - space
533
535
  - no_space
534
536
 
535
- Style/SingleSpaceBeforeFirstArg:
537
+ Style/SpaceBeforeFirstArg:
536
538
  Enabled: true
537
539
 
538
540
  Style/SpaceAfterColon:
@@ -541,7 +543,7 @@ Style/SpaceAfterColon:
541
543
  Style/SpaceAfterComma:
542
544
  Enabled: true
543
545
 
544
- Style/SpaceAfterControlKeyword:
546
+ Style/SpaceAroundKeyword:
545
547
  Enabled: true
546
548
 
547
549
  Style/SpaceAfterMethodName:
@@ -584,9 +586,6 @@ Style/SpaceAroundEqualsInParameterDefault:
584
586
  Style/SpaceAroundOperators:
585
587
  Enabled: true
586
588
 
587
- Style/SpaceBeforeModifierKeyword:
588
- Enabled: true
589
-
590
589
  Style/SpaceInsideBrackets:
591
590
  Enabled: true
592
591
 
@@ -636,12 +635,13 @@ Style/TrailingBlankLines:
636
635
  - final_newline
637
636
  - final_blank_line
638
637
 
639
- Style/TrailingComma:
638
+ Style/TrailingCommaInLiteral:
639
+ Enabled: true
640
+ EnforcedStyleForMultiline: no_comma
641
+
642
+ Style/TrailingCommaInArguments:
640
643
  Enabled: true
641
644
  EnforcedStyleForMultiline: no_comma
642
- SupportedStyles:
643
- - comma
644
- - no_comma
645
645
 
646
646
  Style/TrailingUnderscoreVariable:
647
647
  Enabled: true
@@ -729,6 +729,10 @@ Metrics/BlockNesting:
729
729
  Enabled: true
730
730
  Max: 3
731
731
 
732
+ Metrics/BlockLength:
733
+ Exclude:
734
+ - 'test/**/*'
735
+
732
736
  Metrics/ClassLength:
733
737
  Exclude:
734
738
  - 'test/**/*'
@@ -789,10 +793,7 @@ Lint/Debugger:
789
793
  Enabled: true
790
794
 
791
795
  Lint/DefEndAlignment:
792
- AlignWith: start_of_line
793
- SupportedStyles:
794
- - start_of_line
795
- - def
796
+ EnforcedStyleAlignWith: start_of_line
796
797
  Enabled: true
797
798
 
798
799
  Lint/DeprecatedClassMethods:
@@ -814,10 +815,7 @@ Lint/EmptyInterpolation:
814
815
  Enabled: true
815
816
 
816
817
  Lint/EndAlignment:
817
- AlignWith: keyword
818
- SupportedStyles:
819
- - keyword
820
- - variable
818
+ EnforcedStyleAlignWith: keyword
821
819
  Enabled: true
822
820
 
823
821
  Lint/EndInMethod:
@@ -826,9 +824,6 @@ Lint/EndInMethod:
826
824
  Lint/EnsureReturn:
827
825
  Enabled: true
828
826
 
829
- Lint/Eval:
830
- Enabled: true
831
-
832
827
  Lint/FormatParameterMismatch:
833
828
  Description: 'The number of parameters to format/sprint must match the fields.'
834
829
  Enabled: true
@@ -863,9 +858,6 @@ Lint/RescueException:
863
858
  Lint/ShadowingOuterLocalVariable:
864
859
  Enabled: true
865
860
 
866
- Lint/SpaceBeforeFirstArg:
867
- Enabled: true
868
-
869
861
  Lint/StringConversionInInterpolation:
870
862
  Enabled: true
871
863
 
@@ -902,10 +894,18 @@ Lint/UselessSetterCall:
902
894
  Lint/Void:
903
895
  Enabled: true
904
896
 
897
+ Security/Eval:
898
+ Enabled: true
899
+
905
900
  ##############################################################
906
901
  ##################### Rails ##################################
907
902
  ##############################################################
908
903
 
904
+ Rails/SkipsModelValidations:
905
+ Enabled: true
906
+ Exclude:
907
+ - 'test/**/*'
908
+
909
909
  Rails/ActionFilter:
910
910
  Enabled: true
911
911
  EnforcedStyle: action
@@ -915,11 +915,6 @@ Rails/ActionFilter:
915
915
  Include:
916
916
  - app/controllers/**/*.rb
917
917
 
918
- Rails/DefaultScope:
919
- Enabled: true
920
- Include:
921
- - app/models/**/*.rb
922
-
923
918
  Rails/Delegate:
924
919
  Enabled: true
925
920
 
@@ -939,14 +934,20 @@ Rails/Output:
939
934
  Rails/ReadWriteAttribute:
940
935
  Enabled: true
941
936
  Include:
942
- - app/models/**/*.rb
937
+ - lib/**/*.rb
943
938
 
944
939
  Rails/ScopeArgs:
945
940
  Enabled: true
946
941
  Include:
947
- - app/models/**/*.rb
942
+ - lib/**/*.rb
948
943
 
949
944
  Rails/Validation:
950
945
  Enabled: true
951
946
  Include:
952
- - app/models/**/*.rb
947
+ - lib/**/*.rb
948
+
949
+ Rails/Exit:
950
+ Enabled: true
951
+ Exclude:
952
+ - lib/esp/commands/**/*.rb
953
+
@@ -8,8 +8,9 @@ rvm:
8
8
  - 2.3.0
9
9
  script:
10
10
  - bundle exec rake test
11
- - bundle exec rake coveralls:push
12
11
  - bundle exec rubocop
12
+ - bundle exec bundle-audit update
13
+ - bundle exec bundle-audit check
13
14
 
14
15
  addons:
15
16
  code_climate:
@@ -1,4 +1,13 @@
1
1
  ## Unreleased
2
+
3
+ ## 2.8.0 - 2017-04-04
4
+ ### Changed
5
+ - Removed leading whitespace from policy document #44
6
+ - Update gems #45
7
+ - Update ActiveSupport #49
8
+ - Handle Forbidden response from API #48
9
+
10
+ ## 2.7.0 - 2016-11-02
2
11
  ### Added
3
12
  - Users create/update/destroy support
4
13
  - Role all/find support
@@ -1,60 +1,55 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- esp_sdk (2.7.0)
4
+ esp_sdk (2.8.0)
5
5
  activeresource (~> 4.0.0)
6
- api-auth (~> 2.0.0)
6
+ api-auth (~> 2.0)
7
7
  rack
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (4.2.1)
13
- activesupport (= 4.2.1)
12
+ activemodel (4.2.8)
13
+ activesupport (= 4.2.8)
14
14
  builder (~> 3.1)
15
15
  activeresource (4.0.0)
16
16
  activemodel (~> 4.0)
17
17
  activesupport (~> 4.0)
18
18
  rails-observers (~> 0.1.1)
19
- activesupport (4.2.1)
19
+ activesupport (4.2.8)
20
20
  i18n (~> 0.7)
21
- json (~> 1.7, >= 1.7.7)
22
21
  minitest (~> 5.1)
23
22
  thread_safe (~> 0.3, >= 0.3.4)
24
23
  tzinfo (~> 1.1)
25
- addressable (2.3.8)
26
- ansi (1.5.0)
27
- api-auth (2.0.0)
28
- ast (2.0.0)
29
- astrolabe (1.3.1)
30
- parser (~> 2.2)
31
- awesome_print (1.6.1)
32
- aws-sdk (2.1.36)
33
- aws-sdk-resources (= 2.1.36)
34
- aws-sdk-core (2.1.36)
24
+ addressable (2.5.0)
25
+ public_suffix (~> 2.0, >= 2.0.2)
26
+ api-auth (2.1.0)
27
+ ast (2.3.0)
28
+ awesome_print (1.7.0)
29
+ aws-sdk (2.7.3)
30
+ aws-sdk-resources (= 2.7.3)
31
+ aws-sdk-core (2.7.3)
32
+ aws-sigv4 (~> 1.0)
35
33
  jmespath (~> 1.0)
36
- aws-sdk-resources (2.1.36)
37
- aws-sdk-core (= 2.1.36)
34
+ aws-sdk-resources (2.7.3)
35
+ aws-sdk-core (= 2.7.3)
36
+ aws-sigv4 (1.0.0)
38
37
  bourne (1.6.0)
39
38
  mocha (~> 1.1)
40
- builder (3.2.2)
41
- coderay (1.1.0)
42
- coveralls (0.8.0)
43
- multi_json (~> 1.10)
44
- rest-client (>= 1.6.8, < 2)
45
- simplecov (~> 0.9.1)
46
- term-ansicolor (~> 1.3)
47
- thor (~> 0.19.1)
48
- crack (0.4.2)
39
+ builder (3.2.3)
40
+ bundler-audit (0.5.0)
41
+ bundler (~> 1.2)
42
+ thor (~> 0.18)
43
+ coderay (1.1.1)
44
+ crack (0.4.3)
49
45
  safe_yaml (~> 1.0.0)
50
- docile (1.1.5)
51
- factory_girl (4.5.0)
46
+ factory_girl (4.8.0)
52
47
  activesupport (>= 3.0.0)
53
- ffi (1.9.10)
48
+ ffi (1.9.17)
54
49
  formatador (0.2.5)
55
- guard (2.13.0)
50
+ guard (2.14.1)
56
51
  formatador (>= 0.2.4)
57
- listen (>= 2.7, <= 4.0)
52
+ listen (>= 2.7, < 4.0)
58
53
  lumberjack (~> 1.0)
59
54
  nenv (~> 0.1)
60
55
  notiffany (~> 0.0)
@@ -62,87 +57,71 @@ GEM
62
57
  shellany (~> 0.0)
63
58
  thor (>= 0.18.1)
64
59
  guard-compat (1.2.1)
65
- guard-minitest (2.4.4)
60
+ guard-minitest (2.4.6)
66
61
  guard-compat (~> 1.2)
67
62
  minitest (>= 3.0)
68
63
  guard-rubocop (1.2.0)
69
64
  guard (~> 2.0)
70
65
  rubocop (~> 0.20)
71
- i18n (0.7.0)
72
- jmespath (1.1.3)
73
- json (1.8.2)
74
- listen (3.0.3)
75
- rb-fsevent (>= 0.9.3)
76
- rb-inotify (>= 0.9)
77
- lumberjack (1.0.9)
66
+ hashdiff (0.3.2)
67
+ i18n (0.8.1)
68
+ jmespath (1.3.1)
69
+ listen (3.0.8)
70
+ rb-fsevent (~> 0.9, >= 0.9.4)
71
+ rb-inotify (~> 0.9, >= 0.9.7)
72
+ lumberjack (1.0.11)
78
73
  metaclass (0.0.4)
79
74
  method_source (0.8.2)
80
- mime-types (2.4.3)
81
- minitest (5.6.0)
82
- minitest-reporters (1.0.11)
83
- ansi
84
- builder
85
- minitest (>= 5.0)
86
- ruby-progressbar
87
- mocha (1.1.0)
75
+ minitest (5.10.1)
76
+ mocha (1.2.1)
88
77
  metaclass (~> 0.0.1)
89
- multi_json (1.11.0)
90
- nenv (0.2.0)
91
- netrc (0.10.3)
92
- notiffany (0.0.8)
78
+ nenv (0.3.0)
79
+ notiffany (0.1.1)
93
80
  nenv (~> 0.1)
94
81
  shellany (~> 0.0)
95
- parser (2.2.2.5)
96
- ast (>= 1.1, < 3.0)
97
- powerpack (0.1.0)
98
- pry (0.10.2)
82
+ parser (2.3.3.1)
83
+ ast (~> 2.2)
84
+ powerpack (0.1.1)
85
+ pry (0.10.4)
99
86
  coderay (~> 1.1.0)
100
87
  method_source (~> 0.8.1)
101
88
  slop (~> 3.4)
102
- rack (1.6.4)
89
+ public_suffix (2.0.5)
90
+ rack (1.6.5)
103
91
  rails-observers (0.1.2)
104
92
  activemodel (~> 4.0)
105
- rainbow (2.0.0)
106
- rake (10.4.2)
107
- rb-fsevent (0.9.6)
108
- rb-inotify (0.9.5)
93
+ rainbow (2.2.1)
94
+ rake (12.0.0)
95
+ rb-fsevent (0.9.8)
96
+ rb-inotify (0.9.8)
109
97
  ffi (>= 0.5.0)
110
98
  rdiscount (2.2.0.1)
111
- rest-client (1.7.3)
112
- mime-types (>= 1.16, < 3.0)
113
- netrc (~> 0.7)
114
- rubocop (0.34.2)
115
- astrolabe (~> 1.3)
116
- parser (>= 2.2.2.5, < 3.0)
99
+ rubocop (0.47.1)
100
+ parser (>= 2.3.3.1, < 3.0)
117
101
  powerpack (~> 0.1)
118
102
  rainbow (>= 1.99.1, < 3.0)
119
- ruby-progressbar (~> 1.4)
120
- ruby-progressbar (1.7.5)
103
+ ruby-progressbar (~> 1.7)
104
+ unicode-display_width (~> 1.0, >= 1.0.1)
105
+ ruby-progressbar (1.8.1)
121
106
  safe_yaml (1.0.4)
122
107
  shellany (0.0.1)
123
108
  shoulda (3.5.0)
124
109
  shoulda-context (~> 1.0, >= 1.0.1)
125
110
  shoulda-matchers (>= 1.4.1, < 3.0)
126
- shoulda-context (1.2.1)
111
+ shoulda-context (1.2.2)
127
112
  shoulda-matchers (2.8.0)
128
113
  activesupport (>= 3.0.0)
129
- simplecov (0.9.2)
130
- docile (~> 1.1.0)
131
- multi_json (~> 1.0)
132
- simplecov-html (~> 0.9.0)
133
- simplecov-html (0.9.0)
134
114
  slop (3.6.0)
135
- term-ansicolor (1.3.0)
136
- tins (~> 1.0)
137
- thor (0.19.1)
138
- thread_safe (0.3.5)
139
- tins (1.3.5)
115
+ thor (0.19.4)
116
+ thread_safe (0.3.6)
140
117
  tzinfo (1.2.2)
141
118
  thread_safe (~> 0.1)
142
- webmock (1.21.0)
119
+ unicode-display_width (1.1.3)
120
+ webmock (2.3.2)
143
121
  addressable (>= 2.3.6)
144
122
  crack (>= 0.3.2)
145
- yard (0.9.5)
123
+ hashdiff
124
+ yard (0.9.8)
146
125
 
147
126
  PLATFORMS
148
127
  ruby
@@ -152,14 +131,13 @@ DEPENDENCIES
152
131
  aws-sdk
153
132
  bourne
154
133
  bundler
155
- coveralls
134
+ bundler-audit
156
135
  esp_sdk!
157
136
  factory_girl
158
137
  guard
159
138
  guard-minitest
160
139
  guard-rubocop
161
140
  minitest
162
- minitest-reporters
163
141
  mocha
164
142
  rake
165
143
  rdiscount
@@ -169,4 +147,4 @@ DEPENDENCIES
169
147
  yard
170
148
 
171
149
  BUNDLED WITH
172
- 1.12.5
150
+ 1.14.6