Class: Capistrano::Lingr
- Inherits:
-
Object
- Object
- Capistrano::Lingr
- Defined in:
- lib/capistrano/lingr/version.rb,
lib/capistrano/lingr.rb
Constant Summary collapse
- VERSION =
'0.0.4'
- HOST =
'lingr.com'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(capistrano) ⇒ Lingr
constructor
A new instance of Lingr.
- #notification ⇒ Object
Constructor Details
#initialize(capistrano) ⇒ Lingr
Returns a new instance of Lingr.
21 22 23 |
# File 'lib/capistrano/lingr.rb', line 21 def initialize(capistrano) @cap = capistrano end |
Class Method Details
.load_into(configuration) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/capistrano/lingr.rb', line 8 def self.load_into(configuration) configuration.load do namespace :notify do desc 'Send a notification of deploy to Lingr' task :lingr do Capistrano::Lingr.new(configuration).notification end end end end |
Instance Method Details
#notification ⇒ Object
25 26 27 28 29 |
# File 'lib/capistrano/lingr.rb', line 25 def notification Net::HTTP.start(HOST, 80) do |http| http.get("/api/room/say?bot=#{bot_id}&bot_verifier=#{verifier}&room=#{room_id}&text=#{URI.escape(text)}") end end |