actionwebservice 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +9 -0
- data/Rakefile +3 -3
- data/lib/action_web_service/casting.rb +8 -0
- data/lib/action_web_service/version.rb +2 -2
- data/setup.rb +22 -3
- data/test/abstract_dispatcher.rb +7 -0
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
*0.9.4* (December 7th, 2005)
|
2
|
+
|
3
|
+
* Update from LGPL to MIT license as per Minero Aoki's permission. [Marcel Molina Jr.]
|
4
|
+
|
5
|
+
* Rename Version constant to VERSION. #2802 [Marcel Molina Jr.]
|
6
|
+
|
7
|
+
* Fix that XML-RPC date/time values did not have well-defined behaviour (#2516, #2534). This fix has one caveat, in that we can't support pre-1970 dates from XML-RPC clients.
|
8
|
+
|
9
|
+
|
1
10
|
*0.9.3* (November 7th, 2005)
|
2
11
|
|
3
12
|
* Upgraded to Action Pack 1.11.0 and Active Record 1.13.0
|
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ require File.join(File.dirname(__FILE__), 'lib', 'action_web_service', 'version'
|
|
10
10
|
|
11
11
|
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
12
12
|
PKG_NAME = 'actionwebservice'
|
13
|
-
PKG_VERSION = ActionWebService::
|
13
|
+
PKG_VERSION = ActionWebService::VERSION::STRING + PKG_BUILD
|
14
14
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
15
15
|
PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
|
16
16
|
|
@@ -63,8 +63,8 @@ spec = Gem::Specification.new do |s|
|
|
63
63
|
s.rubyforge_project = "aws"
|
64
64
|
s.homepage = "http://www.rubyonrails.org"
|
65
65
|
|
66
|
-
s.add_dependency('actionpack', '= 1.11.
|
67
|
-
s.add_dependency('activerecord', '= 1.13.
|
66
|
+
s.add_dependency('actionpack', '= 1.11.1' + PKG_BUILD)
|
67
|
+
s.add_dependency('activerecord', '= 1.13.1' + PKG_BUILD)
|
68
68
|
|
69
69
|
s.has_rdoc = true
|
70
70
|
s.requirements << 'none'
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'time'
|
2
2
|
require 'date'
|
3
|
+
require 'xmlrpc/datetime'
|
3
4
|
|
4
5
|
module ActionWebService # :nodoc:
|
5
6
|
module Casting # :nodoc:
|
@@ -58,6 +59,13 @@ module ActionWebService # :nodoc:
|
|
58
59
|
end
|
59
60
|
|
60
61
|
def cast_base_type(value, signature_type) # :nodoc:
|
62
|
+
# This is a work-around for the fact that XML-RPC special-cases DateTime values into its own DateTime type
|
63
|
+
# in order to support iso8601 dates. This doesn't work too well for us, so we'll convert it into a Time,
|
64
|
+
# with the caveat that we won't be able to handle pre-1970 dates that are sent to us.
|
65
|
+
#
|
66
|
+
# See http://dev.rubyonrails.com/ticket/2516
|
67
|
+
value = value.to_time if value.is_a?(XMLRPC::DateTime)
|
68
|
+
|
61
69
|
case signature_type.type
|
62
70
|
when :int
|
63
71
|
Integer(value)
|
data/setup.rb
CHANGED
@@ -3,9 +3,28 @@
|
|
3
3
|
#
|
4
4
|
# Copyright (c) 2000-2004 Minero Aoki
|
5
5
|
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
7
|
+
# a copy of this software and associated documentation files (the
|
8
|
+
# "Software"), to deal in the Software without restriction, including
|
9
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
10
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
11
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
12
|
+
# the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be
|
15
|
+
# included in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
19
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
21
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
22
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
23
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
#
|
25
|
+
# Note: Originally licensed under LGPL v2+. Using MIT license for Rails
|
26
|
+
# with permission of Minero Aoki.
|
27
|
+
|
9
28
|
#
|
10
29
|
|
11
30
|
unless Enumerable.method_defined?(:map) # Ruby 1.4.6
|
data/test/abstract_dispatcher.rb
CHANGED
@@ -62,6 +62,7 @@ module DispatcherTest
|
|
62
62
|
api_method :test_utf8, :returns => [:string]
|
63
63
|
api_method :hex, :expects => [:base64], :returns => [:string]
|
64
64
|
api_method :unhex, :expects => [:string], :returns => [:base64]
|
65
|
+
api_method :time, :expects => [:time], :returns => [:time]
|
65
66
|
end
|
66
67
|
|
67
68
|
class VirtualAPI < ActionWebService::API::Base
|
@@ -260,6 +261,10 @@ module DispatcherTest
|
|
260
261
|
return [s].pack("H*")
|
261
262
|
end
|
262
263
|
|
264
|
+
def time(t)
|
265
|
+
t
|
266
|
+
end
|
267
|
+
|
263
268
|
protected
|
264
269
|
def alwaysfail(method_name, params)
|
265
270
|
@before_filter_called = true
|
@@ -295,6 +300,8 @@ module DispatcherCommonTests
|
|
295
300
|
assert(result[1].is_a?(DispatcherTest::Person))
|
296
301
|
assert_equal("cafe", do_method_call(@direct_controller, 'Hex', "\xca\xfe"))
|
297
302
|
assert_equal("\xca\xfe", do_method_call(@direct_controller, 'Unhex', "cafe"))
|
303
|
+
time = Time.gm(1998, "Feb", 02, 15, 12, 01)
|
304
|
+
assert_equal(time, do_method_call(@direct_controller, 'Time', time))
|
298
305
|
end
|
299
306
|
|
300
307
|
def test_direct_entrypoint
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: actionwebservice
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.9.
|
7
|
-
date: 2005-
|
6
|
+
version: 0.9.4
|
7
|
+
date: 2005-12-07 00:00:00 -06:00
|
8
8
|
summary: Web service support for Action Pack.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -132,7 +132,7 @@ dependencies:
|
|
132
132
|
-
|
133
133
|
- "="
|
134
134
|
- !ruby/object:Gem::Version
|
135
|
-
version: 1.11.
|
135
|
+
version: 1.11.1
|
136
136
|
version:
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: activerecord
|
@@ -142,5 +142,5 @@ dependencies:
|
|
142
142
|
-
|
143
143
|
- "="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.13.
|
145
|
+
version: 1.13.1
|
146
146
|
version:
|