capistrano-hook 0.3.3 → 0.3.4
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.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.travis.yml +4 -11
- data/Capfile +2 -0
- data/Gemfile +2 -0
- data/README.md +1 -8
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/capistrano-hook.gemspec +2 -1
- data/config/deploy.rb +2 -0
- data/config/deploy/production.rb +2 -0
- data/config/deploy/staging.rb +1 -0
- data/lib/capistrano/hook.rb +2 -0
- data/lib/capistrano/hook/load.rb +2 -0
- data/lib/capistrano/hook/version.rb +3 -1
- data/lib/capistrano/hook/web.rb +2 -0
- data/lib/capistrano/tasks/webhook.rake +4 -0
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b80c4faf5076514a2e20ceb5a515f973934c0e952102807233d03f31eac28a42
|
4
|
+
data.tar.gz: a0c638091a9edad6c551fdf4e412ed262e1279b8c9010b5fc0caf2cffcc83696
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 065e963486d4e78e1efcc71fd14f77e1e003634d9ddb845a98d64aca9b666b4d2074e1f673550deadc8214c570c5643dd7e89b418a5d3969d96b0e4da1062363
|
7
|
+
data.tar.gz: 88fe744384f7d9fee5ce19a16cec95509743163ab92f9115fb53a644e264e8c065ef73cb184357b03820904487e323d37f8dc0fc66a73f8947f2798ce557a20c
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,16 +1,9 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.
|
4
|
-
- 2.
|
5
|
-
- 2.
|
6
|
-
- 2.
|
7
|
-
- 2.4.3
|
8
|
-
- ruby-head
|
9
|
-
- rbx-2
|
10
|
-
matrix:
|
11
|
-
allow_failures:
|
12
|
-
- rvm: ruby-head
|
13
|
-
- rvm: rbx-2
|
3
|
+
- 2.3.8
|
4
|
+
- 2.4.7
|
5
|
+
- 2.5.6
|
6
|
+
- 2.6.4
|
14
7
|
before_install: gem install bundler -v 1.12.5
|
15
8
|
script:
|
16
9
|
- bundle exec rake
|
data/Capfile
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
[](http://badge.fury.io/rb/capistrano-hook)
|
4
4
|
[](https://travis-ci.org/yulii/capistrano-hook)
|
5
5
|
[](https://codeclimate.com/github/yulii/capistrano-hook)
|
6
|
-
[](https://gemnasium.com/yulii/capistrano-hook)
|
7
6
|
|
8
7
|
Notification hooks include start, finish and fail of deployments.
|
9
8
|
|
@@ -96,15 +95,9 @@ set :webhook_failed_payload, {
|
|
96
95
|
}
|
97
96
|
```
|
98
97
|
|
99
|
-
## Development
|
100
|
-
|
101
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
102
|
-
|
103
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `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).
|
104
|
-
|
105
98
|
## Contributing
|
106
99
|
|
107
|
-
|
100
|
+
Fork, fix, then send a pull request and attach test code.
|
108
101
|
|
109
102
|
|
110
103
|
## License
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/capistrano-hook.gemspec
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
3
|
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
@@ -19,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
19
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
21
|
spec.require_paths = ['lib']
|
21
22
|
|
22
|
-
spec.add_dependency 'capistrano', '
|
23
|
+
spec.add_dependency 'capistrano', '>= 3.0'
|
23
24
|
|
24
25
|
spec.add_development_dependency 'bundler'
|
25
26
|
spec.add_development_dependency 'minitest'
|
data/config/deploy.rb
CHANGED
data/config/deploy/production.rb
CHANGED
data/config/deploy/staging.rb
CHANGED
data/lib/capistrano/hook.rb
CHANGED
data/lib/capistrano/hook/load.rb
CHANGED
data/lib/capistrano/hook/web.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Capistrano hook will not be run with no settings.
|
2
4
|
#
|
3
5
|
# You can setting the variables shown below.
|
@@ -12,6 +14,7 @@
|
|
12
14
|
namespace :webhook do
|
13
15
|
def webhook(url, payload)
|
14
16
|
return if url.nil? || payload.nil? || payload.empty?
|
17
|
+
|
15
18
|
info "POST #{url} payload='#{payload}'"
|
16
19
|
result = Capistrano::Hook::Web.client(url).post(payload)
|
17
20
|
message = "HTTP #{result.code} #{result.message} body='#{result.body}'; "
|
@@ -35,6 +38,7 @@ namespace :webhook do
|
|
35
38
|
padding = keys.max_by(&:length).length
|
36
39
|
keys.each do |key|
|
37
40
|
next if fetch(key).nil? || fetch(key).empty?
|
41
|
+
|
38
42
|
puts ":#{key.to_s.ljust(padding)} => #{fetch(key)}"
|
39
43
|
end
|
40
44
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-hook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yulii
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3.
|
26
|
+
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,8 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
|
-
|
146
|
-
rubygems_version: 2.5.1
|
145
|
+
rubygems_version: 3.0.3
|
147
146
|
signing_key:
|
148
147
|
specification_version: 4
|
149
148
|
summary: Simple webhooks for Capistrano deployments.
|