capistrano-hook 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -1
- data/README.md +6 -0
- data/bin/console +1 -1
- data/bin/test +9 -0
- data/capistrano-hook.gemspec +3 -3
- data/config/deploy.rb +3 -23
- data/config/deploy/production.rb +4 -8
- data/config/deploy/staging.rb +0 -6
- data/lib/capistrano/hook.rb +1 -2
- data/lib/capistrano/hook/load.rb +2 -0
- data/lib/capistrano/hook/version.rb +1 -1
- data/lib/capistrano/tasks/webhook.rake +1 -3
- metadata +7 -6
- data/.rubocop_todo.yml +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ae3585f41ea69167d0bc3ebd77ee93d38f5ce89
|
4
|
+
data.tar.gz: e0d3e0a4c702b40b1aef4712ed6a1c1ceca456e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51f678aa09aa2068ea691515a6d67fd6513b3211c439d12c4dc62ed6f9bf20d3ed98b661005cb2f482540b969fad856850c953f7dd7fefca3576937b294e3aec
|
7
|
+
data.tar.gz: bd50536bc35fffe3dc6190d4b05c6088d67dfe59ec498b8ada73c1f947bf50d6479d61fc65223400ba0c3c39637cd690e0493b13ff917d511fea136a765ec53f
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Capistrano::Hook
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/capistrano-hook.svg)](http://badge.fury.io/rb/capistrano-hook)
|
4
|
+
[![Build Status](https://travis-ci.org/yulii/capistrano-hook.svg)](https://travis-ci.org/yulii/capistrano-hook)
|
5
|
+
[![Dependency Status](https://gemnasium.com/yulii/capistrano-hook.svg)](https://gemnasium.com/yulii/capistrano-hook)
|
6
|
+
|
7
|
+
Notification hooks include start, finish and fail of deployments.
|
8
|
+
|
3
9
|
## Installation
|
4
10
|
|
5
11
|
Add this line to your application's Gemfile:
|
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'bundler/setup'
|
4
|
-
require 'capistrano/hook'
|
4
|
+
require 'capistrano/hook/load'
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
data/bin/test
ADDED
data/capistrano-hook.gemspec
CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = 'capistrano-hook'
|
8
8
|
spec.version = Capistrano::Hook::VERSION
|
9
9
|
spec.authors = ['yulii']
|
10
|
-
spec.email = ['
|
10
|
+
spec.email = ['yone.info@gmail.com']
|
11
11
|
|
12
|
-
spec.summary = 'Simple
|
13
|
-
spec.description = '
|
12
|
+
spec.summary = 'Simple hooks for Capistrano deployments.'
|
13
|
+
spec.description = 'Notification hooks include start, finish and fail of deployments.'
|
14
14
|
spec.homepage = 'https://github.com/yulii/capistrano-hook'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
data/config/deploy.rb
CHANGED
@@ -3,35 +3,16 @@ lock '3.4.0'
|
|
3
3
|
|
4
4
|
set :application, 'capistrano-hook'
|
5
5
|
set :repo_url, 'git@github.com:yulii/capistrano-hook.git'
|
6
|
-
|
7
|
-
# Default branch is :master
|
8
|
-
# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
|
6
|
+
set :branch, :master
|
9
7
|
|
10
8
|
set :deploy_to, '/tmp'
|
11
9
|
set :scm, :git
|
12
|
-
|
13
|
-
|
14
|
-
# set :format, :pretty
|
15
|
-
|
16
|
-
# Default value for :log_level is :debug
|
17
|
-
# set :log_level, :debug
|
18
|
-
|
19
|
-
# Default value for :pty is false
|
20
|
-
# set :pty, true
|
21
|
-
|
22
|
-
# Default value for :linked_files is []
|
23
|
-
# set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
|
24
|
-
|
25
|
-
# Default value for linked_dirs is []
|
26
|
-
# set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system')
|
27
|
-
|
28
|
-
# Default value for default_env is {}
|
29
|
-
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
10
|
+
set :format, :pretty
|
11
|
+
set :log_level, :debug
|
30
12
|
|
31
13
|
set :keep_releases, 5
|
32
14
|
|
33
15
|
namespace :deploy do
|
34
|
-
|
35
16
|
after :restart, :clear_cache do
|
36
17
|
on roles(:web), in: :groups, limit: 3, wait: 10 do
|
37
18
|
# Here we can do anything such as:
|
@@ -40,5 +21,4 @@ namespace :deploy do
|
|
40
21
|
# end
|
41
22
|
end
|
42
23
|
end
|
43
|
-
|
44
24
|
end
|
data/config/deploy/production.rb
CHANGED
@@ -7,8 +7,6 @@
|
|
7
7
|
# server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
|
8
8
|
# server 'db.example.com', user: 'deploy', roles: %w{db}
|
9
9
|
|
10
|
-
|
11
|
-
|
12
10
|
# role-based syntax
|
13
11
|
# ==================
|
14
12
|
|
@@ -21,14 +19,12 @@
|
|
21
19
|
# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
|
22
20
|
# role :db, %w{deploy@example.com}
|
23
21
|
|
24
|
-
|
25
|
-
|
26
22
|
# Configuration
|
27
23
|
# =============
|
28
|
-
set :webhook_url, '
|
29
|
-
set :webhook_starting_payload,
|
30
|
-
set :webhook_finished_payload,
|
31
|
-
set :webhook_failed_payload,
|
24
|
+
set :webhook_url, 'https://yulii.github.io'
|
25
|
+
set :webhook_starting_payload, text: '[production] Now, deploying...'
|
26
|
+
set :webhook_finished_payload, text: '[production] Deployment has been completed!'
|
27
|
+
set :webhook_failed_payload, text: '[production] Oops! something went wrong.'
|
32
28
|
|
33
29
|
# The server-based syntax can be used to override options:
|
34
30
|
# ------------------------------------
|
data/config/deploy/staging.rb
CHANGED
@@ -7,8 +7,6 @@
|
|
7
7
|
# server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
|
8
8
|
# server 'db.example.com', user: 'deploy', roles: %w{db}
|
9
9
|
|
10
|
-
|
11
|
-
|
12
10
|
# role-based syntax
|
13
11
|
# ==================
|
14
12
|
|
@@ -21,8 +19,6 @@
|
|
21
19
|
# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
|
22
20
|
# role :db, %w{deploy@example.com}
|
23
21
|
|
24
|
-
|
25
|
-
|
26
22
|
# Configuration
|
27
23
|
# =============
|
28
24
|
# You can set any configuration variable like in config/deploy.rb
|
@@ -31,8 +27,6 @@
|
|
31
27
|
# http://capistranorb.com/documentation/getting-started/configuration/
|
32
28
|
# Feel free to add new variables to customise your setup.
|
33
29
|
|
34
|
-
|
35
|
-
|
36
30
|
# Custom SSH Options
|
37
31
|
# ==================
|
38
32
|
# You may pass any option but keep in mind that net/ssh understands a
|
data/lib/capistrano/hook.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
namespace :webhook do
|
2
|
-
|
3
2
|
desc <<-DESC
|
4
3
|
Capistrano hook will not be run with no settings.
|
5
4
|
|
6
5
|
You can setting the variables shown below.
|
7
6
|
|
8
|
-
set :webhook_url, '
|
7
|
+
set :webhook_url, 'https://yulii.github.io'
|
9
8
|
set :webhook_starting_payload, { text: 'Now, deploying...' }
|
10
9
|
set :webhook_finished_payload, { text: 'Deployment has been completed!' }
|
11
10
|
set :webhook_failed_payload, { text: 'Oops! something went wrong.' }
|
@@ -17,7 +16,6 @@ namespace :webhook do
|
|
17
16
|
end
|
18
17
|
|
19
18
|
namespace :post do
|
20
|
-
|
21
19
|
task :starting do
|
22
20
|
run_locally do
|
23
21
|
url = fetch(:webhook_url)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-hook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yulii
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -108,16 +108,15 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description:
|
111
|
+
description: Notification hooks include start, finish and fail of deployments.
|
112
112
|
email:
|
113
|
-
-
|
113
|
+
- yone.info@gmail.com
|
114
114
|
executables: []
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
118
|
- ".gitignore"
|
119
119
|
- ".rubocop.yml"
|
120
|
-
- ".rubocop_todo.yml"
|
121
120
|
- ".travis.yml"
|
122
121
|
- CODE_OF_CONDUCT.md
|
123
122
|
- Capfile
|
@@ -128,11 +127,13 @@ files:
|
|
128
127
|
- bin/console
|
129
128
|
- bin/rubocop-auto-correct
|
130
129
|
- bin/setup
|
130
|
+
- bin/test
|
131
131
|
- capistrano-hook.gemspec
|
132
132
|
- config/deploy.rb
|
133
133
|
- config/deploy/production.rb
|
134
134
|
- config/deploy/staging.rb
|
135
135
|
- lib/capistrano/hook.rb
|
136
|
+
- lib/capistrano/hook/load.rb
|
136
137
|
- lib/capistrano/hook/version.rb
|
137
138
|
- lib/capistrano/hook/web.rb
|
138
139
|
- lib/capistrano/tasks/webhook.rake
|
@@ -159,5 +160,5 @@ rubyforge_project:
|
|
159
160
|
rubygems_version: 2.4.5
|
160
161
|
signing_key:
|
161
162
|
specification_version: 4
|
162
|
-
summary: Simple
|
163
|
+
summary: Simple hooks for Capistrano deployments.
|
163
164
|
test_files: []
|
data/.rubocop_todo.yml
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
-
# on 2015-07-29 21:24:29 +0900 using RuboCop version 0.32.1.
|
3
|
-
# The point is for the user to remove these configuration records
|
4
|
-
# one by one as the offenses are removed from the code base.
|
5
|
-
# Note that changes in the inspected code, or installation of new
|
6
|
-
# versions of RuboCop, may require this file to be generated again.
|
7
|
-
|
8
|
-
# Offense count: 2
|
9
|
-
# Configuration parameters: AllowURI, URISchemes.
|
10
|
-
Metrics/LineLength:
|
11
|
-
Max: 104
|
12
|
-
|
13
|
-
# Offense count: 1
|
14
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
15
|
-
Style/ClassAndModuleChildren:
|
16
|
-
Enabled: false
|
17
|
-
|
18
|
-
# Offense count: 3
|
19
|
-
Style/Documentation:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
# Offense count: 1
|
23
|
-
# Cop supports --auto-correct.
|
24
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
|
25
|
-
Style/HashSyntax:
|
26
|
-
Enabled: false
|
27
|
-
|
28
|
-
# Offense count: 2
|
29
|
-
# Cop supports --auto-correct.
|
30
|
-
# Configuration parameters: PreferredDelimiters.
|
31
|
-
Style/PercentLiteralDelimiters:
|
32
|
-
Enabled: false
|
33
|
-
|
34
|
-
# Offense count: 20
|
35
|
-
# Cop supports --auto-correct.
|
36
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
37
|
-
Style/StringLiterals:
|
38
|
-
Enabled: false
|
39
|
-
|
40
|
-
# Offense count: 2
|
41
|
-
# Cop supports --auto-correct.
|
42
|
-
Style/UnneededPercentQ:
|
43
|
-
Enabled: false
|