capistrano3-idobata 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2312c2388c13efa37f04bba09b5132c57739023
4
- data.tar.gz: 6079580d0534c2d338d3bcfb3db4c80ac0db16a0
3
+ metadata.gz: 3da4b475ea0ca4aeb756a04f032922784802eb53
4
+ data.tar.gz: 134cbbab52d2701d4404bc76197eca4c93c14470
5
5
  SHA512:
6
- metadata.gz: 037724876f6872f02cd45cfeb71d3ec32876b272e7c2e0c3886433c03db3bdbcfdbf4026405b562b7fd511b20e3a63c231518182f6a1af89efe64a6ef75aae07
7
- data.tar.gz: 40c42c06f73e8b9ccef93ada7bf8d9c1bbbe11c00ede157867f2eb356cef2e67e87e180f4dc89f264c6f85f47a1d60ab367f57f74a14e8a7c6729217859ae25a
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 of a deployment to Idobata
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 )
@@ -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 of a deployment to Idobata}
12
- spec.description = %q{Send notification of a deployment to Idobata}
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
 
@@ -1,5 +1,5 @@
1
1
  module Capistrano3
2
2
  module Idobata
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -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.2
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-01-06 00:00:00.000000000 Z
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 of a deployment to Idobata
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.2.2
112
+ rubygems_version: 2.4.5
113
113
  signing_key:
114
114
  specification_version: 4
115
- summary: Send notification of a deployment to Idobata
115
+ summary: Send deployment notification to Idobata
116
116
  test_files: []