rubyjedi-actionwebservice 2.3.5.20100615120735 → 2.3.5.20100618223219
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +8 -4
- data/examples/googlesearch/autoloading/google_search_api.rb +1 -0
- data/examples/googlesearch/autoloading/google_search_controller.rb +1 -0
- data/examples/googlesearch/delegated/google_search_service.rb +1 -0
- data/examples/googlesearch/delegated/search_controller.rb +1 -0
- data/examples/googlesearch/direct/google_search_api.rb +1 -0
- data/examples/googlesearch/direct/search_controller.rb +1 -0
- data/examples/metaWeblog/apis/blogger_api.rb +1 -0
- data/examples/metaWeblog/apis/blogger_service.rb +1 -0
- data/examples/metaWeblog/apis/meta_weblog_api.rb +1 -0
- data/examples/metaWeblog/apis/meta_weblog_service.rb +1 -0
- data/examples/metaWeblog/controllers/xmlrpc_controller.rb +1 -0
- data/generators/web_service/templates/api_definition.rb +1 -0
- data/generators/web_service/templates/controller.rb +1 -0
- data/generators/web_service/templates/functional_test.rb +1 -0
- data/generators/web_service/web_service_generator.rb +1 -0
- data/lib/action_web_service.rb +1 -0
- data/lib/action_web_service/acts_as_web_service.rb +2 -1
- data/lib/action_web_service/api.rb +1 -0
- data/lib/action_web_service/base.rb +1 -0
- data/lib/action_web_service/casting.rb +13 -4
- data/lib/action_web_service/client.rb +1 -0
- data/lib/action_web_service/client/base.rb +1 -0
- data/lib/action_web_service/client/soap_client.rb +1 -0
- data/lib/action_web_service/client/xmlrpc_client.rb +1 -0
- data/lib/action_web_service/container.rb +1 -0
- data/lib/action_web_service/container/action_controller_container.rb +1 -0
- data/lib/action_web_service/container/delegated_container.rb +1 -0
- data/lib/action_web_service/container/direct_container.rb +1 -0
- data/lib/action_web_service/dispatcher.rb +1 -0
- data/lib/action_web_service/dispatcher/abstract.rb +1 -0
- data/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +1 -0
- data/lib/action_web_service/invocation.rb +1 -0
- data/lib/action_web_service/protocol.rb +1 -0
- data/lib/action_web_service/protocol/abstract.rb +1 -0
- data/lib/action_web_service/protocol/discovery.rb +1 -0
- data/lib/action_web_service/protocol/soap_protocol.rb +1 -0
- data/lib/action_web_service/protocol/soap_protocol/marshaler.rb +1 -0
- data/lib/action_web_service/protocol/xmlrpc_protocol.rb +1 -0
- data/lib/action_web_service/scaffolding.rb +1 -0
- data/lib/action_web_service/simple.rb +2 -1
- data/lib/action_web_service/string_to_datetime_for_soap.rb +1 -0
- data/lib/action_web_service/struct.rb +1 -0
- data/lib/action_web_service/support/class_inheritable_options.rb +1 -0
- data/lib/action_web_service/support/signature_types.rb +1 -0
- data/lib/action_web_service/test_invoke.rb +1 -0
- data/lib/action_web_service/version.rb +1 -0
- data/lib/actionwebservice.rb +1 -0
- data/setup.rb +1 -0
- data/test/abstract_client.rb +1 -0
- data/test/abstract_dispatcher.rb +1 -0
- data/test/abstract_unit.rb +1 -0
- data/test/actionwebservice_unittest.db +0 -0
- data/test/api_test.rb +1 -0
- data/test/apis/auto_load_api.rb +1 -0
- data/test/apis/broken_auto_load_api.rb +1 -0
- data/test/base_test.rb +1 -0
- data/test/casting_test.rb +1 -0
- data/test/client_soap_test.rb +1 -0
- data/test/client_xmlrpc_test.rb +1 -0
- data/test/container_test.rb +1 -0
- data/test/dispatcher_action_controller_soap_test.rb +11 -3
- data/test/dispatcher_action_controller_xmlrpc_test.rb +1 -0
- data/test/invocation_test.rb +1 -0
- data/test/scaffolded_controller_test.rb +1 -0
- data/test/struct_test.rb +1 -0
- data/test/test_invoke_test.rb +1 -0
- metadata +5 -11
- data/test/debug.log +0 -12305
data/Rakefile
CHANGED
@@ -25,9 +25,13 @@ task :default => [ :test ]
|
|
25
25
|
|
26
26
|
# Run the unit tests
|
27
27
|
Rake::TestTask.new { |t|
|
28
|
+
test_scope = ENV['SCOPE'] || '*'
|
29
|
+
t.test_files = FileList[ test_scope.split(',').collect{|scope| "test/#{scope}_test.rb"} ]
|
30
|
+
|
31
|
+
t.warning = !!ENV['WARNINGS']
|
32
|
+
t.verbose = !!ENV['VERBOSE']
|
33
|
+
|
28
34
|
t.libs << "test"
|
29
|
-
t.test_files = Dir['test/*_test.rb']
|
30
|
-
t.verbose = true
|
31
35
|
}
|
32
36
|
|
33
37
|
SCHEMA_PATH = File.join(File.dirname(__FILE__), *%w(test fixtures db_definitions))
|
@@ -74,8 +78,8 @@ spec = Gem::Specification.new do |s|
|
|
74
78
|
s.description = %q{Adds WSDL/SOAP and XML-RPC web service support to Action Pack}
|
75
79
|
s.version = PKG_VERSION
|
76
80
|
|
77
|
-
s.author = "Leon Breedt, Kent Sibilev"
|
78
|
-
s.email = "bitserf@gmail.com, ksibilev@yahoo.com"
|
81
|
+
s.author = "Laurence A. Lee, Leon Breedt, Kent Sibilev"
|
82
|
+
s.email = "rubyjedi@gmail.com, bitserf@gmail.com, ksibilev@yahoo.com"
|
79
83
|
s.rubyforge_project = "aws"
|
80
84
|
s.homepage = "http://www.rubyonrails.org"
|
81
85
|
|
data/lib/action_web_service.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
require 'time'
|
2
3
|
require 'date'
|
3
4
|
require 'xmlrpc/datetime'
|
@@ -100,8 +101,10 @@ module ActionWebService # :nodoc:
|
|
100
101
|
when :decimal
|
101
102
|
BigDecimal(value.to_s)
|
102
103
|
when :time
|
103
|
-
|
104
|
-
|
104
|
+
if value.kind_of?(Hash)
|
105
|
+
value = "%s/%s/%s %s:%s:%s" % value.values_at(*%w[2 3 1 4 5 6])
|
106
|
+
Time.respond_to?(:strptime) ? Time.strptime(value.to_s, "%m/%d/%Y %H:%M:%S") : Time.parse(value.to_s)
|
107
|
+
elsif value.kind_of?(Time)
|
105
108
|
value
|
106
109
|
elsif value.kind_of?(DateTime)
|
107
110
|
value.to_time
|
@@ -109,10 +112,16 @@ module ActionWebService # :nodoc:
|
|
109
112
|
Time.parse(value.to_s)
|
110
113
|
end
|
111
114
|
when :date
|
112
|
-
|
115
|
+
if value.kind_of?(Hash)
|
116
|
+
value = "%s/%s/%s" % value.values_at(*%w[2 3 1])
|
117
|
+
return Date.strptime(value.to_s,"%m/%d/%Y")
|
118
|
+
end
|
113
119
|
value.kind_of?(Date) ? value : Date.parse(value.to_s)
|
114
120
|
when :datetime
|
115
|
-
|
121
|
+
if value.kind_of?(Hash)
|
122
|
+
value = "%s/%s/%s %s:%s:%s" % value.values_at(*%w[2 3 1 4 5 6])
|
123
|
+
return DateTime.strptime(value.to_s,"%m/%d/%Y %H:%M:%S")
|
124
|
+
end
|
116
125
|
value.kind_of?(DateTime) ? value : DateTime.parse(value.to_s)
|
117
126
|
end
|
118
127
|
end
|
data/lib/actionwebservice.rb
CHANGED
data/setup.rb
CHANGED
data/test/abstract_client.rb
CHANGED
data/test/abstract_dispatcher.rb
CHANGED
data/test/abstract_unit.rb
CHANGED
Binary file
|
data/test/api_test.rb
CHANGED
data/test/apis/auto_load_api.rb
CHANGED
data/test/base_test.rb
CHANGED
data/test/casting_test.rb
CHANGED
data/test/client_soap_test.rb
CHANGED
data/test/client_xmlrpc_test.rb
CHANGED
data/test/container_test.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
$:.unshift(File.dirname(__FILE__) + '/apis')
|
2
3
|
require 'abstract_dispatcher'
|
3
4
|
require 'wsdl/parser'
|
@@ -69,8 +70,13 @@ class TC_DispatcherActionControllerSoap < Test::Unit::TestCase
|
|
69
70
|
|
70
71
|
def test_utf8
|
71
72
|
@direct_controller.web_service_exception_reporting = true
|
72
|
-
|
73
|
-
|
73
|
+
if RUBY_VERSION.to_f >= 1.9
|
74
|
+
utf8_string = Utf8String.force_encoding('UTF-8')
|
75
|
+
else
|
76
|
+
$KCODE = 'u'
|
77
|
+
utf8_string = Utf8String.to_s
|
78
|
+
end
|
79
|
+
assert_equal(utf8_string, do_method_call(@direct_controller, 'TestUtf8'))
|
74
80
|
retval = SOAP::Processor.unmarshal(@response_body).body.response
|
75
81
|
assert retval.is_a?(SOAP::SOAPString)
|
76
82
|
|
@@ -78,7 +84,9 @@ class TC_DispatcherActionControllerSoap < Test::Unit::TestCase
|
|
78
84
|
# will be sent back as base64 by SOAP4R. By the time we get it here though,
|
79
85
|
# it will be decoded back into a string. So lets read the base64 value
|
80
86
|
# from the message body directly.
|
81
|
-
|
87
|
+
unless RUBY_VERSION.to_f >= 1.9
|
88
|
+
$KCODE = 'NONE'
|
89
|
+
end
|
82
90
|
do_method_call(@direct_controller, 'TestUtf8')
|
83
91
|
retval = SOAP::Processor.unmarshal(@response_body).body.response
|
84
92
|
# not sure why this test fails but too lazy to find out why :-(
|