capistrano3-idobata 0.0.2 → 0.0.3
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 +4 -4
- data/README.md +8 -1
- data/capistrano3-idobata.gemspec +2 -2
- data/lib/capistrano3/idobata/version.rb +1 -1
- data/lib/capistrano3/tasks/idobata.rake +9 -15
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3da4b475ea0ca4aeb756a04f032922784802eb53
|
4
|
+
data.tar.gz: 134cbbab52d2701d4404bc76197eca4c93c14470
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cc39c01cf61f69237579c4213d3cb797da0fc93a518a377961c7ee5cd7109033f8931d20c477f60db527bd4d0196237e4a501b68b6ac1259acdf28b6136665e
|
7
|
+
data.tar.gz: 07af0556d82d443f9ec83c4c43fbb08d57e7ff3a2c09e5db348f2857d07aab8d40954444868833d135c7ce7fc040fb10fcce4ee5c082a452277dbe88d7f31a32
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Capistrano3::Idobata
|
2
2
|
|
3
|
-
Send notification
|
3
|
+
Send deployment notification to Idobata :rocket:
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -16,6 +16,13 @@ set :idobata_hook_url, 'https://idobata.io/hook/generic/XXXXX'
|
|
16
16
|
set :repository_url, 'https://github.com/XXXXX/XXXXX'
|
17
17
|
```
|
18
18
|
|
19
|
+
## Adding any label to a notification
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
# config/deploy.rb
|
23
|
+
set :idobata_additional_label, 'NOOP'
|
24
|
+
```
|
25
|
+
|
19
26
|
## Contributing
|
20
27
|
|
21
28
|
1. Fork it ( https://github.com/spice-life/capistrano3-idobata/fork )
|
data/capistrano3-idobata.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Capistrano3::Idobata::VERSION
|
9
9
|
spec.authors = ["kirikiriyamama"]
|
10
10
|
spec.email = ["kirikiriyamama@icloud.com"]
|
11
|
-
spec.summary = %q{Send notification
|
12
|
-
spec.description = %q{Send notification
|
11
|
+
spec.summary = %q{Send deployment notification to Idobata}
|
12
|
+
spec.description = %q{Send deployment notification to Idobata}
|
13
13
|
spec.homepage = "https://github.com/spice-life/capistrano3-idobata"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
@@ -6,11 +6,7 @@ namespace :idobata do
|
|
6
6
|
namespace :notify do
|
7
7
|
task :started do
|
8
8
|
message = "#{deployer} started deploying"
|
9
|
-
label
|
10
|
-
{ type: :info, text: 'Deploy' },
|
11
|
-
{ type: :info, text: fetch(:stage) }
|
12
|
-
]
|
13
|
-
Idobata::Message.create(format: :html, source: message, label: label)
|
9
|
+
Idobata::Message.create(format: :html, source: message, label: label(type: :info))
|
14
10
|
end
|
15
11
|
|
16
12
|
task :finished do
|
@@ -20,20 +16,12 @@ namespace :idobata do
|
|
20
16
|
message = "Branch <a href='#{branch_url}'>#{fetch(:branch)}</a> "
|
21
17
|
message += "(at <a href='#{revision_url}'>#{fetch(:current_revision)}</a>) "
|
22
18
|
message += "was deployed by #{deployer}"
|
23
|
-
label
|
24
|
-
{ type: :success, text: 'Deploy' },
|
25
|
-
{ type: :success, text: fetch(:stage) }
|
26
|
-
]
|
27
|
-
Idobata::Message.create(format: :html, source: message, label: label)
|
19
|
+
Idobata::Message.create(format: :html, source: message, label: label(type: :success))
|
28
20
|
end
|
29
21
|
|
30
22
|
task :failed do
|
31
23
|
message = "Deployment by #{deployer} has failed"
|
32
|
-
label
|
33
|
-
{ type: :important, text: 'Deploy' },
|
34
|
-
{ type: :important, text: fetch(:stage) }
|
35
|
-
]
|
36
|
-
Idobata::Message.create(format: :html, source: message, label: label)
|
24
|
+
Idobata::Message.create(format: :html, source: message, label: label(type: :danger))
|
37
25
|
end
|
38
26
|
end
|
39
27
|
end
|
@@ -49,3 +37,9 @@ end
|
|
49
37
|
def deployer
|
50
38
|
ENV['DEPLOYER'] || `git config user.name`.chomp
|
51
39
|
end
|
40
|
+
|
41
|
+
def label(type:)
|
42
|
+
(['Deploy', fetch(:stage)] + Array(fetch(:idobata_additional_label))).map do |text|
|
43
|
+
{ type: type, text: text }
|
44
|
+
end
|
45
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano3-idobata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kirikiriyamama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -72,7 +72,7 @@ dependencies:
|
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '10.0'
|
75
|
-
description: Send notification
|
75
|
+
description: Send deployment notification to Idobata
|
76
76
|
email:
|
77
77
|
- kirikiriyamama@icloud.com
|
78
78
|
executables: []
|
@@ -109,8 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.4.5
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
|
-
summary: Send notification
|
115
|
+
summary: Send deployment notification to Idobata
|
116
116
|
test_files: []
|