diff --git a/Gemfile b/Gemfile index 0fc84e5f9..237918812 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,6 @@ source 'http://ruby.taobao.org' #source 'http://ruby.sdutlinux.org/' # -puts unless RUBY_PLATFORM =~ /w32/ # unix-like only @@ -28,7 +27,7 @@ gem 'rufus-scheduler' group :development do gem 'grape-swagger' #gem 'grape-swagger-ui', git: 'https://github.com/guange2015/grape-swagger-ui.git' - #gem 'puma' + gem 'puma' if RbConfig::CONFIG['host_os'] =~ /linux/ gem 'pry-rails' if RUBY_VERSION >= '2.0.0' gem 'pry-byebug' diff --git a/app/controllers/git_callback_controller.rb b/app/controllers/git_callback_controller.rb new file mode 100644 index 000000000..717a22961 --- /dev/null +++ b/app/controllers/git_callback_controller.rb @@ -0,0 +1,9 @@ +class GitCallbackController < ApplicationController + + def post_update + @repository = Repository.find_by_root_url(params[:root_url]) + @repository.fetch_changesets + render :text => 'success' + end + +end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 365c5a78e..08188203d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -860,6 +860,11 @@ RedmineApp::Application.routes.draw do match 'system_log/clear' ##ended by lizanle + resources :git_callback do + collection do + post 'post_update' + end + end Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir| file = File.join(plugin_dir, "config/routes.rb") diff --git a/files/2013/09/130913214441_89d0a4acf8770fc08309561559c49b62.exe b/files/2013/09/130913214441_89d0a4acf8770fc08309561559c49b62.exe deleted file mode 100644 index 6b17f167a..000000000 Binary files a/files/2013/09/130913214441_89d0a4acf8770fc08309561559c49b62.exe and /dev/null differ