Skip to content
This repository has been archived by the owner on Mar 20, 2018. It is now read-only.

Commit

Permalink
removed skypemac gem until we can figure out how to not install it on…
Browse files Browse the repository at this point in the history
… rof/staging/prod
  • Loading branch information
Jim Arnold committed Aug 23, 2012
1 parent 785e47d commit 7c29c29
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
4 changes: 0 additions & 4 deletions Gemfile
Expand Up @@ -54,10 +54,6 @@ group :test, :development do
gem "jslint_on_rails"
end

group :ignore_on_rof do
gem 'skypemac'
end

gem 'simplecov', :require => false, :group => :test

gem 'newrelic_rpm'
Expand Down
4 changes: 0 additions & 4 deletions Gemfile.lock
Expand Up @@ -206,7 +206,6 @@ GEM
thor (~> 0.14.6)
raindrops (0.10.0)
rake (0.9.2.2)
rb-appscript (0.6.1)
rdoc (3.12)
json (~> 1.4)
redis (3.0.1)
Expand Down Expand Up @@ -272,8 +271,6 @@ GEM
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
skypemac (0.0.1)
rb-appscript
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
Expand Down Expand Up @@ -348,7 +345,6 @@ DEPENDENCIES
simple-random
simple_form
simplecov
skypemac
truncate_html
uglifier (>= 1.0.3)
unicorn
2 changes: 1 addition & 1 deletion railsonfire.yml
@@ -1,7 +1,7 @@
id: 164da6d0-6c66-012f-a3f5-12313d2df0b0
setup:
commands:
- bundle install --without development production ignore_on_rof
- bundle install --without development production
- bundle exec rake db:migrate
test:
commands:
Expand Down
2 changes: 1 addition & 1 deletion script/check_build.rb
Expand Up @@ -21,7 +21,7 @@ def demonize

rof_user = ENV['ROF_USER']
rof_password = ENV['ROF_PASSWORD']

raise "You need to set ROF_USER and ROF_PASSWORD env vars" if !rof_user || !rof_password

begin
Expand Down
39 changes: 31 additions & 8 deletions script/check_site.rb
@@ -1,3 +1,5 @@
require 'daemons'

def broadcast_on_skype message
require 'skypemac'
vkchat = SkypeMac::Chat.recent_chats.find {|c|c.topic == "VictoryKit Chat"}
Expand All @@ -8,13 +10,34 @@ def broadcast_on_skype message
end
end

while true
status = `curl --head -s act.watchdog.net | awk 'NR==1{print $2}'`
status.strip!
if status != '200'
broadcast_on_skype "hey idiots, the site is broken"
def start
demonize
log("site checker is now started")
end

def stop
demonize
log "site checker is now stopped"
end

def demonize
Daemons.run_proc('check_site', :dir_mode => :normal, :dir => '/var/tmp/', :monitor => false) do
while true
status = `curl --head -s act.watchdog.net | awk 'NR==1{print $2}'`
status.strip!
if status == '500'
broadcast_on_skype "hey idiots, the site is broken"
end
sleep 60
end
end
print "Received #{status} from act.watchdog.net\r"
$stdout.flush
sleep 60
end

case ARGV[0]
when 'start'
start
when 'stop'
stop
else
puts "usage: check_build start|stop"
end

0 comments on commit 7c29c29

Please sign in to comment.