dogapi 1.37.0 → 1.41.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.azure-pipelines/all.yml +16 -7
  3. data/.github/CODEOWNERS +10 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  6. data/.github/PULL_REQUEST_TEMPLATE.md +77 -0
  7. data/.github/labeler.yml +5 -0
  8. data/.github/workflows/labeler.yml +11 -0
  9. data/.github/workflows/stale.yml +39 -0
  10. data/.rubocop_todo.yml +44 -75
  11. data/CHANGELOG.md +39 -1
  12. data/CONTRIBUTING.md +111 -0
  13. data/DEVELOPMENT.md +11 -0
  14. data/Gemfile +2 -0
  15. data/Gemfile_1.9 +13 -0
  16. data/LICENSE +21 -20
  17. data/LICENSE-3rdparty.csv +6 -0
  18. data/README.rdoc +14 -0
  19. data/RELEASING.md +46 -0
  20. data/SUPPORT.md +9 -0
  21. data/dogapi.gemspec +2 -0
  22. data/examples/custom_metric.rb +1 -1
  23. data/lib/capistrano/README.md +4 -1
  24. data/lib/capistrano/datadog.rb +8 -4
  25. data/lib/capistrano/datadog/v2.rb +9 -1
  26. data/lib/capistrano/datadog/v3.rb +10 -1
  27. data/lib/dogapi.rb +4 -0
  28. data/lib/dogapi/common.rb +90 -35
  29. data/lib/dogapi/event.rb +4 -0
  30. data/lib/dogapi/facade.rb +176 -28
  31. data/lib/dogapi/metric.rb +4 -0
  32. data/lib/dogapi/v1.rb +9 -0
  33. data/lib/dogapi/v1/alert.rb +4 -0
  34. data/lib/dogapi/v1/aws_integration.rb +117 -0
  35. data/lib/dogapi/v1/aws_logs.rb +107 -0
  36. data/lib/dogapi/v1/azure_integration.rb +85 -0
  37. data/lib/dogapi/v1/comment.rb +4 -0
  38. data/lib/dogapi/v1/dash.rb +10 -4
  39. data/lib/dogapi/v1/dashboard.rb +4 -0
  40. data/lib/dogapi/v1/dashboard_list.rb +4 -0
  41. data/lib/dogapi/v1/embed.rb +4 -0
  42. data/lib/dogapi/v1/event.rb +4 -0
  43. data/lib/dogapi/v1/gcp_integration.rb +76 -0
  44. data/lib/dogapi/v1/hosts.rb +4 -0
  45. data/lib/dogapi/v1/integration.rb +4 -0
  46. data/lib/dogapi/v1/metadata.rb +4 -0
  47. data/lib/dogapi/v1/metric.rb +4 -0
  48. data/lib/dogapi/v1/monitor.rb +20 -7
  49. data/lib/dogapi/v1/screenboard.rb +4 -0
  50. data/lib/dogapi/v1/search.rb +4 -0
  51. data/lib/dogapi/v1/service_check.rb +4 -0
  52. data/lib/dogapi/v1/service_level_objective.rb +31 -35
  53. data/lib/dogapi/v1/snapshot.rb +4 -0
  54. data/lib/dogapi/v1/synthetics.rb +80 -0
  55. data/lib/dogapi/v1/tag.rb +4 -0
  56. data/lib/dogapi/v1/usage.rb +4 -0
  57. data/lib/dogapi/v1/user.rb +4 -0
  58. data/lib/dogapi/v2.rb +4 -0
  59. data/lib/dogapi/v2/dashboard_list.rb +4 -0
  60. data/lib/dogapi/version.rb +5 -1
  61. data/spec/integration/alert_spec.rb +4 -0
  62. data/spec/integration/aws_integration_spec.rb +55 -0
  63. data/spec/integration/aws_logs_spec.rb +59 -0
  64. data/spec/integration/azure_integration_spec.rb +63 -0
  65. data/spec/integration/comment_spec.rb +5 -0
  66. data/spec/integration/common_spec.rb +4 -0
  67. data/spec/integration/dash_spec.rb +7 -1
  68. data/spec/integration/dashboard_list_spec.rb +4 -0
  69. data/spec/integration/dashboard_spec.rb +4 -0
  70. data/spec/integration/embed_spec.rb +4 -0
  71. data/spec/integration/event_spec.rb +5 -0
  72. data/spec/integration/gcp_integration_spec.rb +57 -0
  73. data/spec/integration/integration_spec.rb +4 -0
  74. data/spec/integration/metadata_spec.rb +4 -0
  75. data/spec/integration/metric_spec.rb +4 -0
  76. data/spec/integration/monitor_spec.rb +30 -1
  77. data/spec/integration/screenboard_spec.rb +4 -0
  78. data/spec/integration/search_spec.rb +4 -0
  79. data/spec/integration/service_check_spec.rb +4 -0
  80. data/spec/integration/service_level_objective_spec.rb +13 -11
  81. data/spec/integration/snapshot_spec.rb +4 -0
  82. data/spec/integration/synthetics_spec.rb +131 -0
  83. data/spec/integration/tag_spec.rb +4 -0
  84. data/spec/integration/usage_spec.rb +4 -0
  85. data/spec/integration/user_spec.rb +4 -0
  86. data/spec/spec_helper.rb +12 -21
  87. data/spec/unit/capistrano_spec.rb +4 -0
  88. data/spec/unit/common_spec.rb +64 -7
  89. data/spec/unit/facade_spec.rb +4 -0
  90. metadata +31 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 762f1d3fe87b94278a55cca80da8824b0c2db3c420ea9e8192cd1f33d7a274ce
4
- data.tar.gz: c60248ed8d4cc8e3d3f96662651878f42591bd336c4c6d58511489e504474607
3
+ metadata.gz: bedd02d8446f4dfce31b9a2b375da5376860490ea6122e3829db203c51f2120b
4
+ data.tar.gz: 8378113bb0b466b3cf6b9e05622c1386691492e474d8c64f5fe8c742b60b32ba
5
5
  SHA512:
6
- metadata.gz: '09565868bb18c71030b625b908a8783f83f135e237c6e6fe8600ecd745141c34cd3e2bc019fb24ad84d01fdb5b839d56cd4dc57db9fe751b37c13ec43f31593b'
7
- data.tar.gz: d93617177693a86273716dd2ccc99bb3e79ef2aa77a44cd021a635a7181e34df9485592a2ed341c9cae50407007add7a9e30348a77212aea28ab7332da2b38bb
6
+ metadata.gz: 84dd004b3f9cc6e55f4523339690ee1e8688e45d53febeb10d472cbf510b5a42caf9caeb0a9f0e86721887aba0fa48adc694a7b67aa21da4984d3752001a1d81
7
+ data.tar.gz: eb764eb19d7b150798e758487bf1457fc7d245cbbc9315d99b7616ea3eddf4d79d061e30cf423924aa6930cae9be98eb7ff88339ee11a3cb959f9c78f8dd6eec
@@ -15,20 +15,20 @@ jobs:
15
15
  vmImage: "Ubuntu-16.04"
16
16
  strategy:
17
17
  matrix:
18
- Rb23:
19
- RUBY_VERSION: '2.3.7'
20
- TASK: spec
21
18
  Rb24:
22
- RUBY_VERSION: '2.4.6'
19
+ RUBY_VERSION: '2.4'
23
20
  TASK: spec
24
21
  Rb25:
25
- RUBY_VERSION: '2.5.5'
22
+ RUBY_VERSION: '2.5'
26
23
  TASK: spec
27
24
  Rb26:
28
- RUBY_VERSION: '2.6.3'
25
+ RUBY_VERSION: '2.6'
26
+ TASK: spec
27
+ Rb27:
28
+ RUBY_VERSION: '2.7'
29
29
  TASK: spec
30
30
  Lint:
31
- RUBY_VERSION: '2.6.3'
31
+ RUBY_VERSION: '2.6'
32
32
  TASK: rubocop
33
33
  steps:
34
34
  - task: UseRubyVersion@0
@@ -42,3 +42,12 @@ jobs:
42
42
  displayName: 'bundle install'
43
43
  - script: bundle exec rake $(TASK)
44
44
  displayName: Run $(TASK) via bundle
45
+ - job: TestRuby19
46
+ pool:
47
+ vmImage: "Ubuntu-16.04"
48
+ steps:
49
+ # Until the `container` AZP resource supports being root in a container https://github.com/microsoft/azure-pipelines-agent/issues/2619 we need this long single line approach
50
+ # By default AZP clones the repo into a folder called `s` - https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/pipeline-options-for-git?view=azure-devops#checkout-path
51
+ # Mount this repo into the container, overwrite the Gemfile with the Ruby 1.9.3 supported depdencies, and run tests
52
+ - script: docker run -v $(Agent.BuildDirectory)/s:/cloned_repo corgibytes/ruby-1.9.3 bin/bash -c "cd cloned_repo; mv Gemfile_1.9 Gemfile; bundle install --retry=3 --jobs=4; bundle exec rake spec"
53
+ displayName: "Run tests with Ruby 1.9.3"
@@ -0,0 +1,10 @@
1
+ # See https://help.github.com/articles/about-codeowners/ for syntax
2
+ # Rules are matched bottom-to-top, so one team can own subdirectories
3
+ # and another team can own the rest of the directory.
4
+
5
+ # All your base
6
+ * @DataDog/integrations-tools-and-libraries
7
+
8
+ # Documentation
9
+ *.md @DataDog/baklava @DataDog/integrations-tools-and-libraries
10
+ LICENSE @DataDog/baklava @DataDog/integrations-tools-and-libraries
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: 'kind/bug'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ Label the issue properly.
14
+ - Add `severity/` label.
15
+ - Add `documentation` label if this issue is related to documentation changes.
16
+
17
+ **To Reproduce**
18
+ Steps to reproduce the behavior:
19
+ 1. Go to '...'
20
+ 2. Click on '....'
21
+ 3. Scroll down to '....'
22
+ 4. See error
23
+
24
+ **Expected behavior**
25
+ A clear and concise description of what you expected to happen.
26
+
27
+ **Screenshots**
28
+ If applicable, add screenshots to help explain your problem.
29
+
30
+ **Environment and Versions (please complete the following information):**
31
+ A clear and precise description of your setup:
32
+ - version for this project in use.
33
+ - services, libraries, languages and tools list and versions.
34
+
35
+ **Additional context**
36
+ Add any other context about the problem here.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: 'kind/feature-request'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Note:**
11
+ If you have a feature request, you should [contact support](https://docs.datadoghq.com/help/) so the request can be properly tracked.
12
+
13
+ **Is your feature request related to a problem? Please describe.**
14
+ A clear and concise description of what the problem is.
15
+
16
+ **Describe the solution you'd like**
17
+ A clear and concise description of what you want to happen.
18
+
19
+ **Describe alternatives you've considered**
20
+ A clear and concise description of any alternative solutions or features you've considered.
21
+
22
+ **Additional context**
23
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,77 @@
1
+ ### Requirements for Contributing to this repository
2
+
3
+ * Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
4
+ * The pull request must only fix one issue, or add one feature, at the time.
5
+ * The pull request must update the test suite to demonstrate the changed functionality.
6
+ * After you create the pull request, all status checks must be pass before a maintainer reviews your contribution. For more details, please see [CONTRIBUTING](/CONTRIBUTING.md).
7
+
8
+ ### What does this PR do?
9
+
10
+ <!--
11
+
12
+ What inspired you to submit this pull request?
13
+ Link to the issue describing the bug that you're fixing.
14
+
15
+ If there is not yet an issue for your bug, please open a new issue and then link to that issue in your pull request.
16
+ Note: In some cases, one person's "bug" is another person's "feature." If the pull request does not address an existing issue with the "bug" label, the maintainers have the final say on whether the current behavior is a bug.
17
+
18
+ -->
19
+
20
+ ### Description of the Change
21
+
22
+ <!--
23
+
24
+ A brief description of the change being made with this pull request.
25
+
26
+ We must be able to understand the design of your change from this description.
27
+ If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion.
28
+ Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts.
29
+
30
+ -->
31
+
32
+ ### Alternate Designs
33
+
34
+ <!-- Explain what other alternates were considered and why the proposed version was selected -->
35
+
36
+ ### Possible Drawbacks
37
+
38
+ <!-- What are the possible side-effects or negative impacts of the code change? -->
39
+
40
+ ### Verification Process
41
+
42
+ <!--
43
+
44
+ What process did you follow to verify that your change has the desired effects?
45
+
46
+ - How did you verify that all new functionality works as expected?
47
+ - How did you verify that all changed functionality works as expected?
48
+ - How did you verify that the change has not introduced any regressions?
49
+
50
+ Describe the actions you performed (including scripts, commands you ran, etc.), and describe the results you observed.
51
+
52
+ -->
53
+
54
+ ### Additional Notes
55
+
56
+ <!-- Anything else we should know when reviewing? -->
57
+
58
+ ### Release Notes
59
+
60
+ <!--
61
+
62
+ If the PR title is not enough to describe the changes in a single line that explains this improvement in
63
+ terms that a user can understand. This text will be added in release notes.
64
+
65
+ For example, you can provide additionnal notes about feature deprecation or backward incompatible changes.
66
+
67
+ -->
68
+
69
+ ### Review checklist (to be filled by reviewers)
70
+
71
+ - [ ] Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
72
+ - [ ] PR title must be written as a CHANGELOG entry [(see why)](/CONTRIBUTING.md#pull-request-title)
73
+ - [ ] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
74
+ - [ ] PR must have one `changelog/` label attached. If applicable it should have the `backward-incompatible` label attached.
75
+ - [ ] PR should not have `do-not-merge/` label attached.
76
+ - [ ] If Applicable, issue must have `kind/` and `severity/` labels attached at least.
77
+
@@ -0,0 +1,5 @@
1
+ # Configuration for labeler - https://github.com/actions/labeler
2
+
3
+ documentation:
4
+ - "*.md"
5
+ - "*.rdoc"
@@ -0,0 +1,11 @@
1
+ name: "Pull Request Labeler"
2
+ on:
3
+ - pull_request
4
+
5
+ jobs:
6
+ triage:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: DataDog/labeler@glob-all
10
+ with:
11
+ repo-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -0,0 +1,39 @@
1
+ # Configuration for https://github.com/actions/stale
2
+
3
+ name: "Stale issues and pull requests"
4
+ on:
5
+ schedule:
6
+ - cron: "0 0 * * *"
7
+
8
+ jobs:
9
+ stale:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/stale@v1
13
+ with:
14
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
15
+ stale-issue-message: >-
16
+ Thanks for your contribution!
17
+
18
+
19
+ This issue has been automatically marked as stale because it has not had
20
+ activity in the last 30 days. Note that the issue will not be automatically
21
+ closed, but this notification will remind us to investigate why there's
22
+ been inactivity. Thank you for participating in the Datadog open source community.
23
+
24
+
25
+ If you would like this issue to remain open:
26
+
27
+ 1. Verify that you can still reproduce the issue in the latest version of this project.
28
+
29
+ 1. Comment that the issue is still reproducible and include updated details requested in the issue template.
30
+ days-before-stale: 30
31
+ days-before-close: 99999
32
+ stale-issue-label: 'stale'
33
+ exempt-issue-label: 'stale/exempt'
34
+ stale-pr-message: >-
35
+ This issue has been automatically marked as stale because it has not had activity in the last 30 days.
36
+
37
+ Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity.
38
+ stale-pr-label: 'stale'
39
+ exempt-pr-label: 'stale/exempt'
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-10-23 14:52:35 -0500 using RuboCop version 0.49.1.
3
+ # on 2020-01-30 14:50:03 +0100 using RuboCop version 0.49.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -36,22 +36,23 @@ Layout/CommentIndentation:
36
36
  Exclude:
37
37
  - 'lib/dogapi/event.rb'
38
38
 
39
- # Offense count: 3
39
+ # Offense count: 1
40
40
  # Cop supports --auto-correct.
41
41
  Layout/EmptyLineAfterMagicComment:
42
42
  Exclude:
43
43
  - 'dogapi.gemspec'
44
- - 'spec/integration/comment_spec.rb'
45
- - 'spec/integration/event_spec.rb'
46
44
 
47
- # Offense count: 2
45
+ # Offense count: 16
48
46
  # Cop supports --auto-correct.
49
47
  Layout/EmptyLines:
50
48
  Exclude:
49
+ - 'config/deploy.rb'
50
+ - 'config/deploy/production.rb'
51
+ - 'config/deploy/staging.rb'
51
52
  - 'lib/capistrano/datadog/v2.rb'
52
53
  - 'lib/dogapi/facade.rb'
53
54
 
54
- # Offense count: 78
55
+ # Offense count: 92
55
56
  # Cop supports --auto-correct.
56
57
  # Configuration parameters: EnforcedStyle, SupportedStyles.
57
58
  # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
@@ -85,20 +86,10 @@ Layout/ExtraSpacing:
85
86
 
86
87
  # Offense count: 2
87
88
  # Cop supports --auto-correct.
88
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
89
- # SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
90
- Layout/FirstParameterIndentation:
91
- Exclude:
92
- - 'spec/spec_helper.rb'
93
-
94
- # Offense count: 3
95
- # Cop supports --auto-correct.
96
- # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
89
+ # Configuration parameters: SupportedStyles, IndentationWidth.
97
90
  # SupportedStyles: special_inside_parentheses, consistent, align_braces
98
91
  Layout/IndentHash:
99
- Exclude:
100
- - 'lib/dogapi/v1/event.rb'
101
- - 'lib/dogapi/v1/service_level_objective.rb'
92
+ EnforcedStyle: consistent
102
93
 
103
94
  # Offense count: 1
104
95
  # Cop supports --auto-correct.
@@ -141,7 +132,6 @@ Layout/SpaceAroundEqualsInParameterDefault:
141
132
  - 'lib/dogapi/common.rb'
142
133
  - 'lib/dogapi/event.rb'
143
134
  - 'lib/dogapi/facade.rb'
144
- - 'lib/dogapi/v1/dash.rb'
145
135
  - 'lib/dogapi/v1/embed.rb'
146
136
  - 'lib/dogapi/v1/event.rb'
147
137
  - 'lib/dogapi/v1/metric.rb'
@@ -157,29 +147,12 @@ Layout/SpaceAroundOperators:
157
147
  - 'examples/custom_metric.rb'
158
148
  - 'lib/dogapi/event.rb'
159
149
 
160
- # Offense count: 8
161
- # Cop supports --auto-correct.
162
- Layout/SpaceBeforeComma:
163
- Exclude:
164
- - 'lib/dogapi/facade.rb'
165
- - 'lib/dogapi/v1/service_level_objective.rb'
166
-
167
- # Offense count: 2
150
+ # Offense count: 1
168
151
  # Cop supports --auto-correct.
169
152
  # Configuration parameters: AllowForAlignment.
170
153
  Layout/SpaceBeforeFirstArg:
171
154
  Exclude:
172
155
  - 'lib/capistrano/datadog/v2.rb'
173
- - 'lib/dogapi/v1/service_level_objective.rb'
174
-
175
- # Offense count: 6
176
- # Cop supports --auto-correct.
177
- # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces.
178
- # SupportedStyles: space, no_space, compact
179
- # SupportedStylesForEmptyBraces: space, no_space
180
- Layout/SpaceInsideHashLiteralBraces:
181
- Exclude:
182
- - 'spec/integration/service_level_objective_spec.rb'
183
156
 
184
157
  # Offense count: 1
185
158
  # Cop supports --auto-correct.
@@ -228,20 +201,25 @@ Lint/UselessAssignment:
228
201
  Exclude:
229
202
  - 'lib/capistrano/datadog.rb'
230
203
 
231
- # Offense count: 13
204
+ # Offense count: 12
232
205
  Metrics/AbcSize:
233
- Max: 51
206
+ Max: 53
234
207
 
235
- # Offense count: 24
208
+ # Offense count: 29
236
209
  # Configuration parameters: CountComments, ExcludedMethods.
237
210
  Metrics/BlockLength:
238
- Max: 102
211
+ Max: 123
239
212
 
240
- # Offense count: 5
213
+ # Offense count: 1
214
+ # Configuration parameters: CountComments.
215
+ Metrics/ClassLength:
216
+ Max: 105
217
+
218
+ # Offense count: 3
241
219
  Metrics/CyclomaticComplexity:
242
- Max: 11
220
+ Max: 9
243
221
 
244
- # Offense count: 18
222
+ # Offense count: 16
245
223
  # Configuration parameters: CountComments.
246
224
  Metrics/MethodLength:
247
225
  Max: 34
@@ -249,13 +227,13 @@ Metrics/MethodLength:
249
227
  # Offense count: 7
250
228
  # Configuration parameters: CountKeywordArgs.
251
229
  Metrics/ParameterLists:
252
- Max: 11
230
+ Max: 7
253
231
 
254
- # Offense count: 4
232
+ # Offense count: 2
255
233
  Metrics/PerceivedComplexity:
256
- Max: 12
234
+ Max: 10
257
235
 
258
- # Offense count: 13
236
+ # Offense count: 19
259
237
  Style/AccessorMethodName:
260
238
  Exclude:
261
239
  - 'lib/dogapi/facade.rb'
@@ -264,6 +242,7 @@ Style/AccessorMethodName:
264
242
  - 'lib/dogapi/v1/dashboard.rb'
265
243
  - 'lib/dogapi/v1/embed.rb'
266
244
  - 'lib/dogapi/v1/screenboard.rb'
245
+ - 'lib/dogapi/v1/synthetics.rb'
267
246
  - 'lib/dogapi/v1/user.rb'
268
247
 
269
248
  # Offense count: 1
@@ -302,7 +281,7 @@ Style/ClassCheck:
302
281
  - 'lib/dogapi/facade.rb'
303
282
  - 'lib/dogapi/v1/event.rb'
304
283
 
305
- # Offense count: 2
284
+ # Offense count: 3
306
285
  # Cop supports --auto-correct.
307
286
  Style/ClassMethods:
308
287
  Exclude:
@@ -322,22 +301,13 @@ Style/ColonMethodCall:
322
301
 
323
302
  # Offense count: 1
324
303
  # Cop supports --auto-correct.
325
- # Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerBackticks.
326
- # SupportedStyles: backticks, percent_x, mixed
327
- Style/CommandLiteral:
328
- Exclude:
329
- - 'lib/dogapi/common.rb'
330
-
331
- # Offense count: 2
332
- # Cop supports --auto-correct.
333
304
  # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions.
334
305
  # SupportedStyles: assign_to_condition, assign_inside_condition
335
306
  Style/ConditionalAssignment:
336
307
  Exclude:
337
308
  - 'lib/capistrano/datadog.rb'
338
- - 'lib/dogapi/v1/service_level_objective.rb'
339
309
 
340
- # Offense count: 21
310
+ # Offense count: 20
341
311
  # Cop supports --auto-correct.
342
312
  Style/DefWithParentheses:
343
313
  Exclude:
@@ -364,7 +334,7 @@ Style/GuardClause:
364
334
  - 'lib/capistrano/datadog.rb'
365
335
  - 'lib/dogapi/facade.rb'
366
336
 
367
- # Offense count: 86
337
+ # Offense count: 88
368
338
  # Cop supports --auto-correct.
369
339
  # Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
370
340
  # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
@@ -385,7 +355,7 @@ Style/HashSyntax:
385
355
  - 'lib/dogapi/v1/snapshot.rb'
386
356
  - 'lib/dogapi/v1/tag.rb'
387
357
 
388
- # Offense count: 15
358
+ # Offense count: 16
389
359
  # Cop supports --auto-correct.
390
360
  # Configuration parameters: MaxLineLength.
391
361
  Style/IfUnlessModifier:
@@ -405,7 +375,7 @@ Style/LineEndConcatenation:
405
375
  Exclude:
406
376
  - 'dogapi.gemspec'
407
377
 
408
- # Offense count: 18
378
+ # Offense count: 21
409
379
  # Cop supports --auto-correct.
410
380
  Style/MethodCallWithoutArgsParentheses:
411
381
  Exclude:
@@ -420,7 +390,7 @@ Style/MultilineIfThen:
420
390
  Exclude:
421
391
  - 'lib/capistrano/datadog.rb'
422
392
 
423
- # Offense count: 30
393
+ # Offense count: 37
424
394
  # Cop supports --auto-correct.
425
395
  Style/MutableConstant:
426
396
  Enabled: false
@@ -440,18 +410,11 @@ Style/Not:
440
410
  Exclude:
441
411
  - 'lib/dogapi/v1/metric.rb'
442
412
 
443
- # Offense count: 1
444
- # Cop supports --auto-correct.
445
- # Configuration parameters: Strict.
446
- Style/NumericLiterals:
447
- MinDigits: 8
448
-
449
- # Offense count: 4
413
+ # Offense count: 3
450
414
  # Cop supports --auto-correct.
451
415
  # Configuration parameters: PreferredDelimiters.
452
416
  Style/PercentLiteralDelimiters:
453
417
  Exclude:
454
- - 'lib/dogapi/common.rb'
455
418
  - 'spec/integration/event_spec.rb'
456
419
  - 'spec/integration/monitor_spec.rb'
457
420
 
@@ -470,7 +433,7 @@ Style/RedundantBegin:
470
433
  - 'lib/capistrano/datadog.rb'
471
434
  - 'lib/dogapi/v1/metric.rb'
472
435
 
473
- # Offense count: 2
436
+ # Offense count: 4
474
437
  # Cop supports --auto-correct.
475
438
  # Configuration parameters: AllowMultipleReturnValues.
476
439
  Style/RedundantReturn:
@@ -507,21 +470,24 @@ Style/SpecialGlobalVars:
507
470
  Exclude:
508
471
  - 'dogapi.gemspec'
509
472
 
510
- # Offense count: 23
473
+ # Offense count: 35
511
474
  # Cop supports --auto-correct.
512
475
  # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
513
476
  # SupportedStyles: single_quotes, double_quotes
514
477
  Style/StringLiterals:
515
478
  Exclude:
479
+ - 'Capfile'
516
480
  - 'Gemfile'
517
481
  - 'Rakefile'
482
+ - 'config/deploy.rb'
483
+ - 'config/deploy/staging.rb'
518
484
  - 'dogapi.gemspec'
519
485
  - 'examples/Capfile'
520
486
  - 'examples/custom_event.rb'
521
487
  - 'lib/dogapi/event.rb'
522
- - 'spec/integration/service_level_objective_spec.rb'
488
+ - 'lib/dogapi/v1/monitor.rb'
523
489
 
524
- # Offense count: 10
490
+ # Offense count: 9
525
491
  # Cop supports --auto-correct.
526
492
  # Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
527
493
  # SupportedStylesForMultiline: comma, consistent_comma, no_comma
@@ -554,3 +520,6 @@ Style/YodaCondition:
554
520
  Style/ZeroLengthPredicate:
555
521
  Exclude:
556
522
  - 'lib/capistrano/datadog.rb'
523
+
524
+ Style/SymbolArray:
525
+ EnforcedStyle: brackets # Since ruby1.9 is supported