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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0f59f113030fc82171ee0c447a2654cab0d8a8b7
4
- data.tar.gz: 24fa552be8dd3a4de0b6adf823dcfff7b64ef24a
2
+ SHA256:
3
+ metadata.gz: b80c4faf5076514a2e20ceb5a515f973934c0e952102807233d03f31eac28a42
4
+ data.tar.gz: a0c638091a9edad6c551fdf4e412ed262e1279b8c9010b5fc0caf2cffcc83696
5
5
  SHA512:
6
- metadata.gz: b64a878e219398b8375e3b616014bccc82e713d7a4ecf2d53bb57295168a8561eecf2c2033a7a0bee0c4d7ebe730b37daedcd71b51c421e116c6dd7e021a6317
7
- data.tar.gz: 9b4d521645f732d25cf35b3cd758726976bcd41344931ef25439d22703f3d980011154a51f800f1d38b236eede20f8c69fa7a9bac7ce3bcab6cde03fb6b2c6a5
6
+ metadata.gz: 065e963486d4e78e1efcc71fd14f77e1e003634d9ddb845a98d64aca9b666b4d2074e1f673550deadc8214c570c5643dd7e89b418a5d3969d96b0e4da1062363
7
+ data.tar.gz: 88fe744384f7d9fee5ce19a16cec95509743163ab92f9115fb53a644e264e8c065ef73cb184357b03820904487e323d37f8dc0fc66a73f8947f2798ce557a20c
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  /.bundle/
2
+ /.ruby-version
2
3
  /.yardoc
3
4
  /Gemfile.lock
4
5
  /_yardoc/
data/.travis.yml CHANGED
@@ -1,16 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
4
- - 2.1
5
- - 2.2.8
6
- - 2.3.6
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'capistrano/setup'
2
4
  require 'capistrano/deploy'
3
5
  require 'capistrano/hook'
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in capistrano-hook.gemspec
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/capistrano-hook.svg)](http://badge.fury.io/rb/capistrano-hook)
4
4
  [![Build Status](https://travis-ci.org/yulii/capistrano-hook.svg?branch=master)](https://travis-ci.org/yulii/capistrano-hook)
5
5
  [![Code Climate](https://codeclimate.com/github/yulii/capistrano-hook/badges/gpa.svg)](https://codeclimate.com/github/yulii/capistrano-hook)
6
- [![Dependency Status](https://gemnasium.com/yulii/capistrano-hook.svg)](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
- Bug reports and pull requests are welcome on GitHub at https://github.com/yulii/capistrano-hook. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
100
+ Fork, fix, then send a pull request and attach test code.
108
101
 
109
102
 
110
103
  ## License
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rake/testtask'
3
5
 
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'capistrano/hook/load'
@@ -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', '~> 3.1'
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # config valid only for current version of Capistrano
2
4
  lock '3.4.0'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # server-based syntax
2
4
  # ======================
3
5
  # Defines a single server with a list of roles and multiple properties.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # server-based syntax
2
3
  # ======================
3
4
  # Defines a single server with a list of roles and multiple properties.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'capistrano/hook/load'
2
4
 
3
5
  load File.expand_path('tasks/webhook.rake', __dir__)
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'capistrano/hook/version'
2
4
  require 'capistrano/hook/web'
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Capistrano
2
4
  module Hook
3
- VERSION = '0.3.3'.freeze
5
+ VERSION = '0.3.4'
4
6
  end
5
7
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'net/http'
3
5
  module Capistrano
@@ -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.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: 2018-03-26 00:00:00.000000000 Z
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.1'
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.1'
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
- rubyforge_project:
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.