diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-02-20 01:07:54 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-02-20 01:07:54 +0000 |
commit | 6a7fc51c6675786f4791c45edc1fac42ea6e3df9 (patch) | |
tree | 6d2d97d6779d19f05b80ec4519254bd5bb79004a /actionwebservice | |
parent | acb3d2cf755d6be35527d2ece57a5de415bb6cab (diff) | |
download | rails-6a7fc51c6675786f4791c45edc1fac42ea6e3df9.tar.gz rails-6a7fc51c6675786f4791c45edc1fac42ea6e3df9.tar.bz2 rails-6a7fc51c6675786f4791c45edc1fac42ea6e3df9.zip |
add code coverage testing scripts, remove dead code
detected by said scripts
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@708 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice')
-rw-r--r-- | actionwebservice/ChangeLog | 2 | ||||
-rw-r--r-- | actionwebservice/TODO | 31 | ||||
-rw-r--r-- | actionwebservice/lib/action_web_service/dispatcher/abstract.rb | 8 | ||||
-rw-r--r-- | actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb | 2 | ||||
-rwxr-xr-x | actionwebservice/test/gencov | 3 | ||||
-rwxr-xr-x | actionwebservice/test/run | 5 |
6 files changed, 9 insertions, 42 deletions
diff --git a/actionwebservice/ChangeLog b/actionwebservice/ChangeLog index 4efc01f46a..f9ace99955 100644 --- a/actionwebservice/ChangeLog +++ b/actionwebservice/ChangeLog @@ -1,6 +1,6 @@ UNRELEASED - * lib/action_service/dispatcher*: replaces "router" fragments with + * lib/action_service/dispatcher*: replace "router" fragments with one file for Action Controllers, moves dispatching work out of the container * lib/*,test/*,examples/*: rename project to diff --git a/actionwebservice/TODO b/actionwebservice/TODO index 35c6c66f11..461aa2bcda 100644 --- a/actionwebservice/TODO +++ b/actionwebservice/TODO @@ -1,34 +1,3 @@ -= 0.4.0 Tasks - - add ActiveRecord-like logging that includes timing information - -= Post-0.4.0 Tasks - - support namespaced custom types in WSDL in a way that interoperates - with .NET (.NET croaks on '::' currently). perhaps a transform - that maps Ruby::Class to Ruby.Class and back. - - - relax type-checking for XML-RPC, and perform casts between base types if there - are mismatches (i.e. String received when Integer expected, or vice-versa) - - - support XML-RPC's "handler." method namespacing. perhaps something like: - - class BloggingServices < ActionWebService::LayeredService - def initialize(request) - @request = controller.request - end - - web_service :mt {MTService.new(@request)} - web_service :blogger {BloggerService.new(@request)} - web_service :metaWeblog {MetaWeblogService.new(@request)} - end - - class ApiController < ApplicationController - web_service_dispatching_mode :delegated - web_service :xmlrpc { BloggingServices.new(@request) } - end - - - verify that cookie support works, and add cookie-authenticated - service examples. test with .NET. - = Low priority tasks - add better type mapping tests for XML-RPC - add tests for ActiveRecord support (with mock objects?) diff --git a/actionwebservice/lib/action_web_service/dispatcher/abstract.rb b/actionwebservice/lib/action_web_service/dispatcher/abstract.rb index e03446924a..2262cd1cdd 100644 --- a/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +++ b/actionwebservice/lib/action_web_service/dispatcher/abstract.rb @@ -75,10 +75,6 @@ module ActionWebService # :nodoc: return_value end - def fallback_invoke(dispatch_request) - raise NotImplementedError - end - def prepare_dispatch_request(protocol_request) api = method_name = web_service_name = web_service = params = nil public_method_name = protocol_request.public_method_name @@ -122,15 +118,11 @@ module ActionWebService # :nodoc: when :direct if web_service_exception_reporting return protocol_request.protocol.marshal_exception(exception) - else - raise exception end when :delegated web_service = web_service_object(protocol_request.web_service_name) if web_service && web_service.class.web_service_exception_reporting return protocol_request.protocol.marshal_exception(exception) - else - raise exception end end else diff --git a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb index 68c0f4ffb3..a8f34f2e33 100644 --- a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +++ b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb @@ -7,8 +7,6 @@ module ActionWebService # :nodoc: class << self alias_method :inherited_without_action_controller, :inherited end - end - base.class_eval do alias_method :before_direct_invoke_without_action_controller, :before_direct_invoke alias_method :after_direct_invoke_without_action_controller, :after_direct_invoke end diff --git a/actionwebservice/test/gencov b/actionwebservice/test/gencov new file mode 100755 index 0000000000..144233107a --- /dev/null +++ b/actionwebservice/test/gencov @@ -0,0 +1,3 @@ +#!/bin/sh + +rcov -x '.*_test\.rb,rubygems,abstract_,/run' ./run diff --git a/actionwebservice/test/run b/actionwebservice/test/run new file mode 100755 index 0000000000..5c6f8b2bc2 --- /dev/null +++ b/actionwebservice/test/run @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby + +Dir[File.join(File.dirname(__FILE__), '*_test.rb')].each do |f| + require f +end |