orbit-basic/lib/github_app.rb

13 lines
251 B
Ruby
Raw Permalink Normal View History

2011-08-23 07:01:22 +00:00
class GithubApp < Sinatra::Base
before do
@site = Site.first
end
get '/site/update' do
updated = system('git pull')
@site.update_attribute(:up_to_date, true) if updated
redirect "admin/sites?updated=#{updated}"
end
end