capistrano-ikachan 0.0.1 → 0.0.2

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
2
  SHA1:
3
- metadata.gz: 235218264690e49b163ccf6682d85afe39c91d5e
4
- data.tar.gz: b2b3cf78f6e40c2c37a75a92a036be78e59ee09b
3
+ metadata.gz: bc7defac3685a27dfc795a29f28598cc0866243e
4
+ data.tar.gz: 974d5cebb4bb7f253b0e2b291856aca5621222b1
5
5
  SHA512:
6
- metadata.gz: 8301bdfec094fa3a0f9f32d324943f15f906974f0693028e2ea5a791a8ef1d603351cf8c31f3e51cbaaba523df975a795800a101ad692dbc8a632b9d1b5bcb8e
7
- data.tar.gz: a434eb14762d6c83c1327f87767ba459b4337523853aa586bc4996739bc9ca17497fb5ef97721661d52fa42b003851c485d14d9bc799596fd623adb499001827
6
+ metadata.gz: 6279caba84a4e2881815ad819ca38529b813df28b8a987dd468b0b5cfe56ae6fc63102cbdff009e3b29af602e2f798745adc9a605b0e1548cd2bec2b59d6dd82
7
+ data.tar.gz: f96a2df041db5e3fe644ecbd137b07b7c277138c8fa4a42cfdf22c76b7bafb0fb0bcdb2f58a43dd2903980db6a2edcf1f434c50345572505f5d8785e870fca85
data/README.md CHANGED
@@ -30,11 +30,11 @@ require 'capistrano/ikachan'
30
30
  config.rb:
31
31
 
32
32
  ```ruby
33
- set irc_channel, 'ikachan'
34
- set irc_server, 'http://chat.freenode.net'
33
+ set ikachan_channel, 'ikachan'
34
+ set ikachan_server, 'http://ikachan.example.com'
35
35
 
36
- before 'deploy:starting', 'irc:notify_start'
37
- after 'deploy:finished', 'irc:notify_end'
36
+ before 'deploy:starting', 'ikachan:notify_start'
37
+ after 'deploy:finished', 'ikachan:notify_end'
38
38
  ```
39
39
 
40
40
  Contributing
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Ikachan
3
- VERSION = "0.0.1"
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
@@ -1,11 +1,11 @@
1
1
  require 'string-irc'
2
2
 
3
- namespace :irc do
3
+ namespace :ikachan do
4
4
  start = Time.now
5
5
 
6
- set :irc_channel, 'ikachan'
7
- set :irc_server, 'http://chat.freenode.net'
8
- set :irc_message_type, 'notice'
6
+ set :ikachan_channel, 'ikachan'
7
+ set :ikachan_server, 'http://ikachan.example.com'
8
+ set :ikachan_message_type, 'notice'
9
9
 
10
10
  set :username, -> {
11
11
  username = `git config --get user.name`.strip
@@ -23,30 +23,30 @@ namespace :irc do
23
23
  StringIrc.new(stage).send(color)
24
24
  }
25
25
 
26
- set :irc_start_message, -> {
26
+ set :ikachan_start_message, -> {
27
27
  state = StringIrc.new('started').orange.bold.to_s
28
28
  "#{fetch(:username)} #{state} deployment to #{fetch(:destination)} of #{fetch(:application)} from #{fetch(:branch)} by cap"
29
29
  }
30
30
 
31
- set :irc_end_message, -> {
31
+ set :ikachan_end_message, -> {
32
32
  elapse_time = "(#{sprintf('%.2f', Time.now - start)} sec)"
33
33
  state = StringIrc.new('finished').green.bold.to_s
34
34
  "#{fetch(:username)} #{state} deployment to #{fetch(:destination)} by cap #{elapse_time}"
35
35
  }
36
36
 
37
- def notify_to_irc(message)
38
- channel = fetch(:irc_channel)
39
- host = fetch(:irc_server)
40
- type = fetch(:irc_message_type)
37
+ def notify_to_ikachan(message)
38
+ channel = fetch(:ikachan_channel)
39
+ host = fetch(:ikachan_server)
40
+ type = fetch(:ikachan_message_type)
41
41
  `curl -s -F channel=\##{channel} #{host}/join`
42
42
  `curl -s -F channel=\##{channel} -F message="#{message}" #{host}/#{type}`
43
43
  end
44
44
 
45
45
  task :notify_start do
46
- notify_to_irc fetch(:irc_start_message)
46
+ notify_to_ikachan fetch(:ikachan_start_message)
47
47
  end
48
48
 
49
49
  task :notify_end do
50
- notify_to_irc fetch(:irc_end_message)
50
+ notify_to_ikachan fetch(:ikachan_end_message)
51
51
  end
52
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-ikachan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - linyows