capistrano-idobata 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/README.md +2 -2
- data/capistrano-idobata.gemspec +0 -1
- data/lib/capistrano/idobata/tasks/capistrano-idobata.rake +11 -12
- data/lib/capistrano/idobata/version.rb +1 -1
- data/lib/capistrano/idobata.rb +4 -4
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08701cd00b326ba723602a6124bdfebc7dcf9ed4
|
4
|
+
data.tar.gz: 2d5663aff58748610bd02c8aeb5c454cb4b1fd43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a8ab97d8e9be9470ad8dd1f3cf600b563c5b38f0b42da32e1b8045d021a7c3b3805068b0ee9e00c1a041b222a65d7bcb30dbdbc6354c612c4805341b811cee0
|
7
|
+
data.tar.gz: 76cc2d8ecdaf17ab27cbda441c9510158dc3664e9360fbfcd54718533b34f19fa9318a79eba1ea39d92ebc67285ece088b5b394e8757e60db00fa6d8d2e349f6
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Capistrano::Idobata
|
2
2
|
|
3
|
-
Capistrano 3 integration with [
|
3
|
+
Capistrano 3 integration with [Idobata](http://idobata.io)
|
4
4
|
|
5
5
|
![](https://f.cloud.github.com/assets/43500/2460021/a57d4620-af64-11e3-83fe-f7c09d92f66d.png)
|
6
6
|
|
@@ -29,7 +29,7 @@ set :idobata_hook_url, 'https://idobata.io/hook/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX
|
|
29
29
|
|
30
30
|
## Contributing
|
31
31
|
|
32
|
-
1. Fork it ( http://github.com
|
32
|
+
1. Fork it ( http://github.com/takkanm/capistrano-idobata/fork )
|
33
33
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
34
34
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
35
35
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/capistrano-idobata.gemspec
CHANGED
@@ -14,7 +14,6 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.add_dependency 'capistrano', '~> 3.0'
|
17
|
-
spec.add_dependency 'rest-client'
|
18
17
|
|
19
18
|
spec.files = `git ls-files -z`.split("\x0")
|
20
19
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -1,21 +1,21 @@
|
|
1
1
|
namespace :idobata do
|
2
2
|
task :setup do
|
3
|
-
@
|
3
|
+
@deploy_information = Capistrano::Idobata::DeployInformation.new(
|
4
4
|
idobata_hook_url: fetch(:idobata_hook_url, nil),
|
5
5
|
application: fetch(:application),
|
6
6
|
stage: fetch(:stage, 'production'),
|
7
7
|
branch: fetch(:branch, nil)
|
8
8
|
)
|
9
9
|
|
10
|
-
@idobata_client = Capistrano::Idobata::Client.new(@
|
10
|
+
@idobata_client = Capistrano::Idobata::Client.new(@deploy_information.idobata_hook_url)
|
11
11
|
end
|
12
12
|
|
13
13
|
task :starting do
|
14
14
|
if @idobata_client.valid?
|
15
|
-
message = if @
|
16
|
-
"deploy #{@
|
15
|
+
message = if @deploy_information.branch
|
16
|
+
"deploy #{@deploy_information.application}'s #{@deploy_information.branch} to #{@deploy_information.stage} start !! :rocket:"
|
17
17
|
else
|
18
|
-
"deploy #{@
|
18
|
+
"deploy #{@deploy_information.application}' to #{@deploy_information.stage} start !! :rocket:"
|
19
19
|
end
|
20
20
|
|
21
21
|
@idobata_client.send(message)
|
@@ -24,10 +24,10 @@ namespace :idobata do
|
|
24
24
|
|
25
25
|
task :finished do
|
26
26
|
if @idobata_client.valid?
|
27
|
-
message = if @
|
28
|
-
":white_check_mark: deploy #{@
|
27
|
+
message = if @deploy_information.branch
|
28
|
+
":white_check_mark: deploy #{@deploy_information.application}'s #{@deploy_information.branch} to #{@deploy_information.stage} success !!"
|
29
29
|
else
|
30
|
-
":white_check_mark: deploy #{@
|
30
|
+
":white_check_mark: deploy #{@deploy_information.application}' to #{@deploy_information.stage} success !!"
|
31
31
|
end
|
32
32
|
|
33
33
|
@idobata_client.send(message)
|
@@ -36,11 +36,10 @@ namespace :idobata do
|
|
36
36
|
|
37
37
|
task :failed do
|
38
38
|
if @idobata_client.valid?
|
39
|
-
|
40
|
-
|
41
|
-
":broken_heart: deploy #{@deploy_infomation.application}'s #{@deploy_infomation.branch} to #{@deploy_infomation.stage} failed !!"
|
39
|
+
message = if @deploy_information.branch
|
40
|
+
":broken_heart: deploy #{@deploy_information.application}'s #{@deploy_information.branch} to #{@deploy_information.stage} failed !!"
|
42
41
|
else
|
43
|
-
":broken_heart: deploy #{@
|
42
|
+
":broken_heart: deploy #{@deploy_information.application}' to #{@deploy_information.stage} failed !!"
|
44
43
|
end
|
45
44
|
|
46
45
|
@idobata_client.send(message)
|
data/lib/capistrano/idobata.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require
|
1
|
+
require 'capistrano/idobata/version'
|
2
|
+
require 'net/http'
|
2
3
|
require 'pathname'
|
3
|
-
require 'restclient'
|
4
4
|
|
5
5
|
module Capistrano
|
6
6
|
module Idobata
|
@@ -14,11 +14,11 @@ module Capistrano
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def send(message)
|
17
|
-
|
17
|
+
Net::HTTP.post_form URI.parse(@hook_url), source: message
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
class
|
21
|
+
class DeployInformation
|
22
22
|
attr_reader :idobata_hook_url, :application, :stage, :branch
|
23
23
|
|
24
24
|
def initialize(idobata_hook_url: nil, application: nil, stage: nil, branch: nil)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-idobata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitsutaka Mimura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rest-client
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: bundler
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
88
|
version: '0'
|
103
89
|
requirements: []
|
104
90
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.5.1
|
106
92
|
signing_key:
|
107
93
|
specification_version: 4
|
108
94
|
summary: Capistrano 3 integration with Idobata
|