berkshelf-notifiers-datadog 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +28 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +183 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +6 -0
- data/berkshelf-notifiers-datadog.gemspec +31 -0
- data/bin/berks-notifier +6 -0
- data/lib/berkshelf/notifiers/datadog.rb +52 -0
- data/lib/berkshelf/notifiers/datadog/version.rb +7 -0
- metadata +129 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d0e91f4e9818c90eea8cb694534ef4da0f28b7d3b33536c60aa508301415a339
|
4
|
+
data.tar.gz: e88425d3e014b92859d30d469c0217299aad685730b9d85aa4b6884bf00c6194
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 932bc5d3c783aa212bf15a6aa75fb6a965af03e2ba3bc2d8a77f8a358a213d130b4219a0eb77164ddf0f9ee1811e7c8611249bfcecf15b47b9c74322b6dc8ec1
|
7
|
+
data.tar.gz: 9b6f12ce04f8c7a1d3416047ca0858cbfc690f3da5899efaa683e2204b29e2489163a29413cb8389c2ba5100c0f7461f5cf75cb21449ab15b710f50396864276
|
data/.editorconfig
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
; EditorConfig is awesome: http://EditorConfig.org
|
2
|
+
|
3
|
+
root = true
|
4
|
+
|
5
|
+
; Ruby/JS style
|
6
|
+
; UTF-8 charset
|
7
|
+
; Unix-style newlines with a newline ending every file
|
8
|
+
; 2 space indent
|
9
|
+
; Trim trailing whitespace
|
10
|
+
[*]
|
11
|
+
indent_style = space
|
12
|
+
indent_size = 2
|
13
|
+
end_of_line = lf
|
14
|
+
charset = utf-8
|
15
|
+
trim_trailing_whitespace = true
|
16
|
+
insert_final_newline = true
|
17
|
+
|
18
|
+
; Markdown
|
19
|
+
; 4 space indent
|
20
|
+
; Trailing whitespace is potentially meaningful, leave it
|
21
|
+
[*.md]
|
22
|
+
indent_size = 4
|
23
|
+
trim_trailing_whitespace = false
|
24
|
+
|
25
|
+
; Shell scripts
|
26
|
+
; 4 space indent
|
27
|
+
[*.sh]
|
28
|
+
indent_size = 4
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at thejeffbyrnes@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,183 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
berkshelf-notifiers-datadog (0.1.0)
|
5
|
+
berkshelf (~> 7.0)
|
6
|
+
dogapi (~> 1.31)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
addressable (2.5.2)
|
12
|
+
public_suffix (>= 2.0.2, < 4.0)
|
13
|
+
berkshelf (7.0.6)
|
14
|
+
chef (>= 13.6.52)
|
15
|
+
chef-config
|
16
|
+
cleanroom (~> 1.0)
|
17
|
+
concurrent-ruby (~> 1.0)
|
18
|
+
minitar (>= 0.6)
|
19
|
+
mixlib-archive (~> 0.4)
|
20
|
+
mixlib-config (>= 2.2.5)
|
21
|
+
mixlib-shellout (~> 2.0)
|
22
|
+
octokit (~> 4.0)
|
23
|
+
retryable (~> 2.0)
|
24
|
+
solve (~> 4.0)
|
25
|
+
thor (>= 0.20)
|
26
|
+
builder (3.2.3)
|
27
|
+
chef (14.6.47)
|
28
|
+
addressable
|
29
|
+
bundler (>= 1.10)
|
30
|
+
chef-config (= 14.6.47)
|
31
|
+
chef-zero (>= 13.0)
|
32
|
+
diff-lcs (~> 1.2, >= 1.2.4)
|
33
|
+
erubis (~> 2.7)
|
34
|
+
ffi (~> 1.9, >= 1.9.25)
|
35
|
+
ffi-yajl (~> 2.2)
|
36
|
+
highline (~> 1.6, >= 1.6.9)
|
37
|
+
iniparse (~> 1.4)
|
38
|
+
mixlib-archive (~> 0.4)
|
39
|
+
mixlib-authentication (~> 2.1)
|
40
|
+
mixlib-cli (~> 1.7)
|
41
|
+
mixlib-log (~> 2.0, >= 2.0.3)
|
42
|
+
mixlib-shellout (~> 2.4)
|
43
|
+
net-sftp (~> 2.1, >= 2.1.2)
|
44
|
+
net-ssh (~> 4.2)
|
45
|
+
net-ssh-multi (~> 1.2, >= 1.2.1)
|
46
|
+
ohai (~> 14.0)
|
47
|
+
plist (~> 3.2)
|
48
|
+
proxifier (~> 1.0)
|
49
|
+
rspec-core (~> 3.5)
|
50
|
+
rspec-expectations (~> 3.5)
|
51
|
+
rspec-mocks (~> 3.5)
|
52
|
+
rspec_junit_formatter (~> 0.2.0)
|
53
|
+
serverspec (~> 2.7)
|
54
|
+
specinfra (~> 2.10)
|
55
|
+
syslog-logger (~> 1.6)
|
56
|
+
uuidtools (~> 2.1.5)
|
57
|
+
chef-config (14.6.47)
|
58
|
+
addressable
|
59
|
+
fuzzyurl
|
60
|
+
mixlib-config (>= 2.2.12, < 3.0)
|
61
|
+
mixlib-shellout (~> 2.0)
|
62
|
+
tomlrb (~> 1.2)
|
63
|
+
chef-zero (14.0.6)
|
64
|
+
ffi-yajl (~> 2.2)
|
65
|
+
hashie (>= 2.0, < 4.0)
|
66
|
+
mixlib-log (~> 2.0)
|
67
|
+
rack (~> 2.0)
|
68
|
+
uuidtools (~> 2.1)
|
69
|
+
cleanroom (1.0.0)
|
70
|
+
concurrent-ruby (1.0.5)
|
71
|
+
diff-lcs (1.3)
|
72
|
+
dogapi (1.32.0)
|
73
|
+
multi_json
|
74
|
+
erubis (2.7.0)
|
75
|
+
faraday (0.15.3)
|
76
|
+
multipart-post (>= 1.2, < 3)
|
77
|
+
ffi (1.9.25)
|
78
|
+
ffi-yajl (2.3.1)
|
79
|
+
libyajl2 (~> 1.2)
|
80
|
+
fuzzyurl (0.9.0)
|
81
|
+
hashie (3.6.0)
|
82
|
+
highline (1.7.10)
|
83
|
+
iniparse (1.4.4)
|
84
|
+
ipaddress (0.8.3)
|
85
|
+
libyajl2 (1.2.0)
|
86
|
+
minitar (0.7)
|
87
|
+
mixlib-archive (0.4.18)
|
88
|
+
mixlib-log
|
89
|
+
mixlib-authentication (2.1.1)
|
90
|
+
mixlib-cli (1.7.0)
|
91
|
+
mixlib-config (2.2.13)
|
92
|
+
tomlrb
|
93
|
+
mixlib-log (2.0.4)
|
94
|
+
mixlib-shellout (2.4.0)
|
95
|
+
molinillo (0.6.6)
|
96
|
+
multi_json (1.13.1)
|
97
|
+
multipart-post (2.0.0)
|
98
|
+
net-scp (1.2.1)
|
99
|
+
net-ssh (>= 2.6.5)
|
100
|
+
net-sftp (2.1.2)
|
101
|
+
net-ssh (>= 2.6.5)
|
102
|
+
net-ssh (4.2.0)
|
103
|
+
net-ssh-gateway (2.0.0)
|
104
|
+
net-ssh (>= 4.0.0)
|
105
|
+
net-ssh-multi (1.2.1)
|
106
|
+
net-ssh (>= 2.6.5)
|
107
|
+
net-ssh-gateway (>= 1.2.0)
|
108
|
+
net-telnet (0.1.1)
|
109
|
+
octokit (4.13.0)
|
110
|
+
sawyer (~> 0.8.0, >= 0.5.3)
|
111
|
+
ohai (14.6.2)
|
112
|
+
chef-config (>= 12.8, < 15)
|
113
|
+
ffi (~> 1.9)
|
114
|
+
ffi-yajl (~> 2.2)
|
115
|
+
ipaddress
|
116
|
+
mixlib-cli (>= 1.7.0)
|
117
|
+
mixlib-config (~> 2.0)
|
118
|
+
mixlib-log (~> 2.0, >= 2.0.1)
|
119
|
+
mixlib-shellout (~> 2.0)
|
120
|
+
plist (~> 3.1)
|
121
|
+
systemu (~> 2.6.4)
|
122
|
+
wmi-lite (~> 1.0)
|
123
|
+
plist (3.4.0)
|
124
|
+
proxifier (1.0.3)
|
125
|
+
public_suffix (3.0.3)
|
126
|
+
rack (2.0.5)
|
127
|
+
rake (10.5.0)
|
128
|
+
retryable (2.0.4)
|
129
|
+
rspec (3.8.0)
|
130
|
+
rspec-core (~> 3.8.0)
|
131
|
+
rspec-expectations (~> 3.8.0)
|
132
|
+
rspec-mocks (~> 3.8.0)
|
133
|
+
rspec-core (3.8.0)
|
134
|
+
rspec-support (~> 3.8.0)
|
135
|
+
rspec-expectations (3.8.2)
|
136
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
137
|
+
rspec-support (~> 3.8.0)
|
138
|
+
rspec-its (1.2.0)
|
139
|
+
rspec-core (>= 3.0.0)
|
140
|
+
rspec-expectations (>= 3.0.0)
|
141
|
+
rspec-mocks (3.8.0)
|
142
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
143
|
+
rspec-support (~> 3.8.0)
|
144
|
+
rspec-support (3.8.0)
|
145
|
+
rspec_junit_formatter (0.2.3)
|
146
|
+
builder (< 4)
|
147
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
148
|
+
sawyer (0.8.1)
|
149
|
+
addressable (>= 2.3.5, < 2.6)
|
150
|
+
faraday (~> 0.8, < 1.0)
|
151
|
+
semverse (2.0.0)
|
152
|
+
serverspec (2.41.3)
|
153
|
+
multi_json
|
154
|
+
rspec (~> 3.0)
|
155
|
+
rspec-its
|
156
|
+
specinfra (~> 2.72)
|
157
|
+
sfl (2.3)
|
158
|
+
solve (4.0.0)
|
159
|
+
molinillo (~> 0.6)
|
160
|
+
semverse (>= 1.1, < 3.0)
|
161
|
+
specinfra (2.76.3)
|
162
|
+
net-scp
|
163
|
+
net-ssh (>= 2.7)
|
164
|
+
net-telnet (= 0.1.1)
|
165
|
+
sfl
|
166
|
+
syslog-logger (1.6.8)
|
167
|
+
systemu (2.6.5)
|
168
|
+
thor (0.20.0)
|
169
|
+
tomlrb (1.2.7)
|
170
|
+
uuidtools (2.1.5)
|
171
|
+
wmi-lite (1.0.0)
|
172
|
+
|
173
|
+
PLATFORMS
|
174
|
+
ruby
|
175
|
+
|
176
|
+
DEPENDENCIES
|
177
|
+
berkshelf-notifiers-datadog!
|
178
|
+
bundler (~> 1.16)
|
179
|
+
rake (~> 10.0)
|
180
|
+
rspec (~> 3.0)
|
181
|
+
|
182
|
+
BUNDLED WITH
|
183
|
+
1.16.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Jeff Byrnes
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Berkshelf::Notifiers::Datadog
|
2
|
+
|
3
|
+
Add the ability for [Berkshelf](https://github.com/berkshelf/berkshelf) to send its output to Datadog when uploading cookbooks.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install this gem directly into ChefDK:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
chef gem install berkshelf_datadog_notifier
|
11
|
+
```
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
This gem monkey patches the default `human` Berkshelf formatter. Running `berks upload` without any arguments, or specifically running `berks upload -F human`, will trigger it to attempt to notify the Datadog HTTP API of any cookbooks that are uploaded if you have the `$DATADOG_API_KEY` env var set.
|
16
|
+
|
17
|
+
It mimics how Berkshelf’s own bin works, and thus can be used as a drop-in replacement for `berks` entirely. One way to do that is to alias it in your dotfiles:
|
18
|
+
|
19
|
+
```bash
|
20
|
+
alias berks='berks-notifier'
|
21
|
+
```
|
22
|
+
|
23
|
+
## Development
|
24
|
+
|
25
|
+
After checking out the repo, run `chef exec bundle install` to install dependencies. Then, run `chef exec bundle exec rake spec` to run the tests.
|
26
|
+
|
27
|
+
To install this gem onto your local machine, run `chef exec bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `chef exec bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/darkskyapp/berkshelf-notifiers-datadog. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
32
|
+
|
33
|
+
## License
|
34
|
+
|
35
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
36
|
+
|
37
|
+
## Code of Conduct
|
38
|
+
|
39
|
+
Everyone interacting in the Berkshelf::Notifiers::Datadog project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/darkskyapp/berkshelf-notifiers-datadog/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path('lib', __dir__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'berkshelf/notifiers/datadog/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'berkshelf-notifiers-datadog'
|
8
|
+
spec.version = Berkshelf::Notifiers::Datadog::VERSION
|
9
|
+
spec.authors = ['The Dark Sky Company, LLC']
|
10
|
+
spec.email = ['devops@darksky.net']
|
11
|
+
|
12
|
+
spec.summary = 'Wrap Berkshelf & send a Datadog event when uploading a cookbook.'
|
13
|
+
spec.homepage = 'https://github.com/darkskyapp/berkshelf-notifiers-datadog'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
end
|
21
|
+
spec.bindir = 'bin'
|
22
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ['lib']
|
24
|
+
|
25
|
+
spec.add_dependency 'berkshelf', '~> 7.0'
|
26
|
+
spec.add_dependency 'dogapi', '~> 1.31'
|
27
|
+
|
28
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
29
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
30
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
31
|
+
end
|
data/bin/berks-notifier
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'berkshelf/notifiers/datadog/version'
|
2
|
+
|
3
|
+
module Berkshelf
|
4
|
+
module Notifiers
|
5
|
+
module Datadog
|
6
|
+
require 'dogapi'
|
7
|
+
|
8
|
+
# Output a Cookbook upload message using {Berkshelf.ui}
|
9
|
+
# Send Datadog an event using {Dogapi}
|
10
|
+
#
|
11
|
+
# @param [Berkshelf::CachedCookbook] cookbook
|
12
|
+
# @param [Ridley::Connection] conn
|
13
|
+
def uploaded(cookbook, conn)
|
14
|
+
upload_message = "Uploaded #{cookbook.cookbook_name} (#{cookbook.version}) to: '#{conn.server_url}'"
|
15
|
+
|
16
|
+
# Invoke the original method declaration
|
17
|
+
super
|
18
|
+
|
19
|
+
# Only attempt to talk to Datadog if we have an env var set
|
20
|
+
api_key = ENV['DATADOG_API_KEY']
|
21
|
+
|
22
|
+
if api_key
|
23
|
+
Berkshelf.ui.info "Sending a Datadog event for #{cookbook.cookbook_name} (#{cookbook.version})"
|
24
|
+
|
25
|
+
dog = Dogapi::Client.new(api_key)
|
26
|
+
|
27
|
+
dog.emit_event(
|
28
|
+
Dogapi::Event.new(
|
29
|
+
upload_message,
|
30
|
+
msg_title: "Berkshelf uploaded #{cookbook.cookbook_name} v#{cookbook.version}",
|
31
|
+
tags: [
|
32
|
+
'berkshelf',
|
33
|
+
"cookbook:#{cookbook.cookbook_name}",
|
34
|
+
]
|
35
|
+
)
|
36
|
+
)
|
37
|
+
else
|
38
|
+
Berkshelf.ui.info 'No Datadog API key provided, skipping'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# README: Cleanly monkey patch default formatter for Berkshelf
|
46
|
+
#
|
47
|
+
# See https://stackoverflow.com/a/4471202/133479
|
48
|
+
module Berkshelf
|
49
|
+
class HumanFormatter
|
50
|
+
prepend Berkshelf::Notifiers::Datadog
|
51
|
+
end
|
52
|
+
end
|
metadata
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: berkshelf-notifiers-datadog
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- The Dark Sky Company, LLC
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-11-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: berkshelf
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '7.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '7.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: dogapi
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.31'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.31'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.16'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.16'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
description:
|
84
|
+
email:
|
85
|
+
- devops@darksky.net
|
86
|
+
executables:
|
87
|
+
- berks-notifier
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- ".editorconfig"
|
92
|
+
- ".gitignore"
|
93
|
+
- ".rspec"
|
94
|
+
- ".travis.yml"
|
95
|
+
- CODE_OF_CONDUCT.md
|
96
|
+
- Gemfile
|
97
|
+
- Gemfile.lock
|
98
|
+
- LICENSE.txt
|
99
|
+
- README.md
|
100
|
+
- Rakefile
|
101
|
+
- berkshelf-notifiers-datadog.gemspec
|
102
|
+
- bin/berks-notifier
|
103
|
+
- lib/berkshelf/notifiers/datadog.rb
|
104
|
+
- lib/berkshelf/notifiers/datadog/version.rb
|
105
|
+
homepage: https://github.com/darkskyapp/berkshelf-notifiers-datadog
|
106
|
+
licenses:
|
107
|
+
- MIT
|
108
|
+
metadata: {}
|
109
|
+
post_install_message:
|
110
|
+
rdoc_options: []
|
111
|
+
require_paths:
|
112
|
+
- lib
|
113
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
requirements: []
|
124
|
+
rubyforge_project:
|
125
|
+
rubygems_version: 2.7.6
|
126
|
+
signing_key:
|
127
|
+
specification_version: 4
|
128
|
+
summary: Wrap Berkshelf & send a Datadog event when uploading a cookbook.
|
129
|
+
test_files: []
|