Skip to content
Browse files

Revert "Update to work with Redmine 1.4"

This reverts commit 15dafeb.

I was too quick there, and the commit really prepares for Redmine 2, not 1.4. It has been moved to the redmine_2.x branch.
  • Loading branch information...
1 parent 15dafeb commit 9002957438f7f2deb07a88bedbe6001b43b65684 @koppen committed May 8, 2012
View
4 app/controllers/github_hook_controller.rb
@@ -20,10 +20,6 @@ def index
private
- def system(*args)
- Kernel.system(args)
- end
-
# Executes shell command. Returns true if the shell command exits with a success status code
def exec(command)
logger.debug { "GithubHook: Executing command: '#{command}'" }
View
5 config/routes.rb
@@ -1,3 +1,4 @@
-RedmineApp::Application.routes.draw do
- match 'github_hook' => 'github_hook#index', :via => [:post]
+ActionController::Routing::Routes.draw do |map|
+ map.connect 'github_hook', :controller => 'github_hook', :action => 'index',
+ :conditions => {:method => :post}
end
View
4 test/functional/github_hook_controller_test.rb
@@ -1,6 +1,5 @@
require File.dirname(__FILE__) + '/../test_helper'
-require 'test/unit'
require 'mocha'
class GithubHookControllerTest < ActionController::TestCase
@@ -56,7 +55,8 @@ def setup
Project.stubs(:find_by_identifier).with('github').returns(@project)
# Make sure we don't run actual commands in test
- @controller.expects(:system).never
+ Kernel.stubs(:system)
+
Repository.expects(:fetch_changesets).never
end
View
7 test/test_helper.rb
@@ -1,2 +1,5 @@
-# Load the normal Rails helper from the Redmine host app
-require File.expand_path(File.dirname(__FILE__) + '/../../../test/test_helper')
+# Load the normal Rails helper
+require File.expand_path(File.dirname(__FILE__) + '/../../../../test/test_helper')
+
+# Ensure that we are using the temporary fixture path
+Engines::Testing.set_fixture_path

0 comments on commit 9002957

Please sign in to comment.
Something went wrong with that request. Please try again.