paratrooper-pingdom 1.0.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.

Potentially problematic release.


This version of paratrooper-pingdom might be problematic. Click here for more details.

@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWY1YmQ5ZGFiZWEwZGI2MTVhYzA4ZTBiYTNlNWY0ZDU1M2IyNDJhMw==
5
+ data.tar.gz: !binary |-
6
+ NDI0OTk1MTMyYTMxZGM4MDdmNTQ2Nzg2NjY2OTAyNDY3ZDNhNDUyZg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NzZiNzY2OTc0MWU4OTQwMjdlYzA5Y2VkNjkxZjMxYzk5MzNkZjE2OGE5M2Nm
10
+ OTJiNmJlZDhjNDE1ZmRjZDA5MTg3NGM2YjM2NWYyMTJjMjVkYWEwN2UwNmM0
11
+ MDg2M2YzYmFlNjVlNGY0M2QzN2ZlMjkxMDQ3MmVjZDAyMTYzODk=
12
+ data.tar.gz: !binary |-
13
+ YTU2ZGJlYWY1MDJkYzczOTRhYzVmNmU5NmY1NWE0MjU0MWQ5Yzg0MGIyOGRi
14
+ YmM2ZTk2NjVkMmQ2NmFkMjQwZjc0MjEzZDM3ZjZkYmUzNzIzNDIzMjc2NmNm
15
+ ZTY0MGI4NWQ1ODRiMjI5YzQwNGZjMmMwOTJmZmNlZTBlOGEwMzk=
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in paratrooper-airbrake.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Matt Polito, Tobias L. Maier
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,60 @@
1
+ # Paratrooper - Pingdom Notifier
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/paratrooper-pingdom.png)](http://badge.fury.io/rb/paratrooper-pingdom)
4
+ [![Code Climate](https://codeclimate.com/github/tmaier/paratrooper-pingdom.png)](https://codeclimate.com/github/tmaier/paratrooper-pingdom)
5
+
6
+ Notify [Pingdom][] to stop application monitoring during deployments when
7
+ using [Paratrooper][]
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ gem 'paratrooper-pingdom'
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install paratrooper-pingdom
22
+
23
+ ## Usage
24
+
25
+ When initializing `Paratrooper::Deploy` a `notifiers` option can be passed
26
+
27
+ ```ruby
28
+ Paratrooper::Deploy.new('app_name',
29
+ notifiers: [
30
+ Paratrooper::Pingdom::Notifier.new('app_key', 'username', 'password')
31
+ ]
32
+ )
33
+ ```
34
+
35
+ This will notify Pingdom that a deploy has begun and to stop application
36
+ monitoring until enabled again. When Paratrooper has finished your deploy
37
+ another notification will be sent to Pingdom to enable application monitoring.
38
+
39
+ For more information on `notifiers`, see [Paratrooper][] documentation.
40
+
41
+ ## Contributing
42
+
43
+ 1. Fork it
44
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
45
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
46
+ 4. Push to the branch (`git push origin my-new-feature`)
47
+ 5. Create new Pull Request
48
+
49
+ ## Thanks
50
+
51
+ The Pingdom Notifier is based on the [NewRelic Notifier][].
52
+
53
+ * [Matt Polito][]
54
+ * [Brandon Farmer][]
55
+
56
+ [Pingdom]: https://www.pingdom.com/
57
+ [Paratrooper]: https://github.com/mattpolito/paratrooper
58
+ [NewRelic Notifier]: https://github.com/mattpolito/paratrooper-newrelic
59
+ [Brandon Farmer]: https://github.com/bthesorceror
60
+ [Matt Polito]: https://github.com/mattpolito
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,33 @@
1
+ require "paratrooper-pingdom/version"
2
+ require 'paratrooper/notifier'
3
+
4
+ module Paratrooper
5
+ module Pingdom
6
+
7
+ # Public: Sends notification to Pingdom to stop monitoring while deploy is
8
+ # happening
9
+ #
10
+ class Notifier < Paratrooper::Notifier
11
+ attr_reader :app_key, :username, :password
12
+
13
+ # Public: Initializes PingdomNotifier
14
+ #
15
+ # app_key - String app key from Pingdom
16
+ # username - String Pingdom username
17
+ # password - String Pingdom password
18
+ def initialize(app_key, username, password)
19
+ @app_key = app_key
20
+ @username = username
21
+ @password = password
22
+ end
23
+
24
+ def setup(options = {})
25
+ %x[curl https://api.pingdom.com/api/2.0/checks -X PUT -d "paused=true" -H "App-Key: #{app_key}" -u "#{username}:#{password}"]
26
+ end
27
+
28
+ def teardown(options = {})
29
+ %x[curl https://api.pingdom.com/api/2.0/checks -X PUT -d "paused=false" -H "App-Key: #{app_key}" -u "#{username}:#{password}"]
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,5 @@
1
+ module Paratrooper
2
+ module Pingdom
3
+ VERSION = "1.0.0"
4
+ end
5
+ end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'paratrooper-pingdom/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "paratrooper-pingdom"
8
+ gem.version = Paratrooper::Pingdom::VERSION
9
+ gem.authors = ["Tobias L. Maier"]
10
+ gem.email = ["tobias.maier@baucloud.com"]
11
+ gem.description = %q{Send deploy notifications to Pingdom service when deploying with Paratrooper}
12
+ gem.summary = %q{Send deploy notifications to Pingdom service when deploying with Paratrooper}
13
+ gem.homepage = "https://github.com/tmaier/paratrooper-pingdom"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_development_dependency 'rake'
21
+ gem.add_development_dependency 'rspec', '~> 2.12'
22
+ gem.add_development_dependency 'pry'
23
+ gem.add_dependency 'paratrooper', '~> 1.2'
24
+ end
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: paratrooper-pingdom
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Tobias L. Maier
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-04-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '2.12'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '2.12'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: paratrooper
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.2'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '1.2'
69
+ description: Send deploy notifications to Pingdom service when deploying with Paratrooper
70
+ email:
71
+ - tobias.maier@baucloud.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .gitignore
77
+ - Gemfile
78
+ - LICENSE.txt
79
+ - README.md
80
+ - Rakefile
81
+ - lib/paratrooper-pingdom.rb
82
+ - lib/paratrooper-pingdom/version.rb
83
+ - paratrooper-newrelic.gemspec
84
+ homepage: https://github.com/tmaier/paratrooper-pingdom
85
+ licenses: []
86
+ metadata: {}
87
+ post_install_message:
88
+ rdoc_options: []
89
+ require_paths:
90
+ - lib
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ requirements: []
102
+ rubyforge_project:
103
+ rubygems_version: 2.0.3
104
+ signing_key:
105
+ specification_version: 4
106
+ summary: Send deploy notifications to Pingdom service when deploying with Paratrooper
107
+ test_files: []