Update source: pull from git

This commit is contained in:
chris2tof committed 2011-08-23 15:01:22 +08:00
1 parent 4f38074932
commit 2842001a3b
7 files changed
+35 -7

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
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