actionservice 0.2.99

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,43 @@
1
+ require File.dirname(__FILE__) + '/abstract_unit'
2
+ require 'wsdl/parser'
3
+
4
+ class TestPerson < ActionService::Struct
5
+ member :id, Integer
6
+ member :names, [String]
7
+ member :lastname, String
8
+ member :deleted, TrueClass
9
+ end
10
+
11
+ class WsdlTestService < ActionService::Base
12
+ def add(a, b)
13
+ a + b
14
+ end
15
+
16
+ def find_people
17
+ []
18
+ end
19
+
20
+ export :add, :expects => [Integer, Integer], :returns => [Integer]
21
+ export :find_people, :returns => [[TestPerson]]
22
+ end
23
+
24
+ class WsdlController < ActionController::Base
25
+ service(:test_service) { WsdlTestService.new }
26
+ end
27
+
28
+ class RouterWsdlTest < Test::Unit::TestCase
29
+ def test_wsdl_generation
30
+ wsdl = WsdlController.to_wsdl(WsdlController, 'http://localhost:3000/test/', '/test')
31
+ assert(WSDL::Parser.new.parse(wsdl).is_a?(WSDL::Definitions))
32
+ end
33
+
34
+ def test_wsdl_action
35
+ test_request = ActionController::TestRequest.new({ 'action' => 'wsdl' })
36
+ test_request.env['REQUEST_METHOD'] = 'GET'
37
+ test_request.env['HTTP_HOST'] = 'localhost:3000'
38
+ controller = WsdlController.new
39
+ test_response = ActionController::TestResponse.new
40
+ controller.process(test_request, test_response)
41
+ assert(WSDL::Parser.new.parse(test_response.body).is_a?(WSDL::Definitions))
42
+ end
43
+ end
@@ -0,0 +1,16 @@
1
+ require File.dirname(__FILE__) + '/abstract_unit'
2
+
3
+ class TestStruct < ActionService::Struct
4
+ member :id, Integer
5
+ member :name, String
6
+ member :items, [String]
7
+ end
8
+
9
+ class StructTest < Test::Unit::TestCase
10
+ def test_members
11
+ assert(TestStruct.members.size == 3)
12
+ assert(TestStruct.members[:id] == Integer)
13
+ assert(TestStruct.members[:name] == String)
14
+ assert(TestStruct.members[:items] == [String])
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.4
3
+ specification_version: 1
4
+ name: actionservice
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.2.99
7
+ date: 2005-02-07
8
+ summary: Web service support for Action Pack.
9
+ require_paths:
10
+ - lib
11
+ email: bitserf@gmail.com
12
+ homepage: http://rubyforge.org/projects/actionservice
13
+ rubyforge_project: actionservice
14
+ description: Adds WSDL/SOAP and XML-RPC web service support to Action Pack
15
+ autorequire: action_service
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ -
22
+ - ">"
23
+ - !ruby/object:Gem::Version
24
+ version: 0.0.0
25
+ version:
26
+ platform: ruby
27
+ authors:
28
+ - Leon Breedt
29
+ files:
30
+ - Rakefile
31
+ - setup.rb
32
+ - README
33
+ - TODO
34
+ - HACKING
35
+ - CHANGELOG
36
+ - MIT-LICENSE
37
+ - examples/soap
38
+ - examples/soap/app
39
+ - examples/soap/lib
40
+ - examples/soap/README
41
+ - examples/soap/app/controllers
42
+ - examples/soap/app/controllers/search_controller.rb
43
+ - examples/soap/lib/google_search_service.rb
44
+ - lib/action_service
45
+ - lib/action_service.rb
46
+ - lib/action_service/router
47
+ - lib/action_service/protocol
48
+ - lib/action_service/invocation.rb
49
+ - lib/action_service/router.rb
50
+ - lib/action_service/protocol.rb
51
+ - lib/action_service/container.rb
52
+ - lib/action_service/struct.rb
53
+ - lib/action_service/base.rb
54
+ - lib/action_service/support
55
+ - lib/action_service/router/action_controller.rb
56
+ - lib/action_service/router/wsdl.rb
57
+ - lib/action_service/protocol/abstract.rb
58
+ - lib/action_service/protocol/soap.rb
59
+ - lib/action_service/protocol/registry.rb
60
+ - lib/action_service/support/class_inheritable_options.rb
61
+ - test/base_test.rb
62
+ - test/container_test.rb
63
+ - test/invocation_test.rb
64
+ - test/router_action_controller_test.rb
65
+ - test/abstract_unit.rb
66
+ - test/protocol_soap_test.rb
67
+ - test/struct_test.rb
68
+ - test/router_wsdl_test.rb
69
+ - test/protocol_registry_test.rb
70
+ test_files: []
71
+ rdoc_options: []
72
+ extra_rdoc_files: []
73
+ executables: []
74
+ extensions: []
75
+ requirements:
76
+ - none
77
+ dependencies:
78
+ - !ruby/object:Gem::Dependency
79
+ name: actionpack
80
+ version_requirement:
81
+ version_requirements: !ruby/object:Gem::Version::Requirement
82
+ requirements:
83
+ -
84
+ - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 1.4.0
87
+ version: