simrpc 0.1 → 0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,56 @@
1
+ # simrpc spec system helper
2
+ #
3
+ # Copyright (C) 2010 Mohammed Morsi <movitto@yahoo.com>
4
+ # See LICENSE for the License of this software
5
+
6
+ require 'rubygems'
7
+ require 'spec'
8
+ require 'spec/autorun'
9
+ require 'spec/interop/test'
10
+
11
+ dir = File.expand_path(File.dirname(__FILE__) + '/..' )
12
+
13
+ require dir + '/lib/simrpc'
14
+
15
+ include Simrpc
16
+
17
+ # test class
18
+ class MyClass
19
+ attr_accessor :str_member
20
+ attr_accessor :float_member
21
+ attr_accessor :associated_obj
22
+
23
+ attr_accessor :associated_obj_set # boolean indicating if associated_obj is set as it is marked as ignored_null in the schema
24
+
25
+ def associated_obj=(value)
26
+ @associated_obj = value
27
+ @associated_obj_set = true
28
+ end
29
+
30
+ def initialize(str = '', float = 0.0, associated_obj = nil) # must be able to be initialized w/o any args
31
+ @str_member = str
32
+ @float_member = float
33
+ @associated_obj = associated_obj
34
+
35
+ @associated_obj_set = false
36
+ end
37
+ end
38
+
39
+ TEST_SCHEMA =
40
+ "<schema>"+
41
+ " <method name='foo_method'>" +
42
+ " <param type='int' name='some_int'/>"+
43
+ " <param type='float' name='floating_point_number'/>"+
44
+ " <return_value type='str' name='a_string' />" +
45
+ " <return_value type='obj' name='my_class_instance' associated='MyClass' />" +
46
+ " </method>"+
47
+ " <method name='bar_method'>" +
48
+ " <param type='array' name='byte_array' associated='int'/>"+
49
+ " <return_value type='int' name='bool_success' />"+
50
+ " </method>"+
51
+ " <class name='MyClass'>"+
52
+ " <member type='str' name='str_member' />" +
53
+ " <member type='float' name='float_member' />" +
54
+ " <member type='obj' name='associated_obj' ignore_null='true' />" +
55
+ " </class>"+
56
+ "</schema>"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simrpc
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.1"
4
+ version: "0.2"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mohammed Morsi
@@ -9,54 +9,56 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-19 00:00:00 -05:00
12
+ date: 2010-03-11 00:00:00 -05:00
13
13
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: qpid
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 2.1.1
24
- version:
14
+ dependencies: []
15
+
25
16
  description: simrpc is a simple Ruby module for rpc communication, using Apache QPID as the transport mechanism.
26
17
  email: movitto@yahoo.com
27
18
  executables: []
28
19
 
29
20
  extensions: []
30
21
 
31
- extra_rdoc_files:
32
- - README
33
- - LICENSE
22
+ extra_rdoc_files: []
23
+
34
24
  files:
35
- - lib/semaphore.rb
25
+ - lib/simrpc/message.rb
26
+ - lib/simrpc/common.rb
27
+ - lib/simrpc/semaphore.rb
28
+ - lib/simrpc/qpid_adapter.rb
29
+ - lib/simrpc/exceptions.rb
30
+ - lib/simrpc/schema.rb
31
+ - lib/simrpc/node.rb
36
32
  - lib/simrpc.rb
37
- - README
38
33
  - LICENSE
34
+ - Rakefile
35
+ - README.rdoc
36
+ - spec/common_spec.rb
37
+ - spec/spec_helper.rb
38
+ - spec/qpid_spec.rb
39
+ - spec/node_spec.rb
40
+ - spec/schema_spec.rb
41
+ - spec/message_spec.rb
39
42
  has_rdoc: true
40
43
  homepage: http://projects.morsi.org/Simrpc
41
44
  licenses: []
42
45
 
43
46
  post_install_message:
44
- rdoc_options:
45
- - --inline-source
46
- - --charset=UTF-8
47
+ rdoc_options: []
48
+
47
49
  require_paths:
48
50
  - lib
49
51
  required_ruby_version: !ruby/object:Gem::Requirement
50
52
  requirements:
51
53
  - - ">="
52
54
  - !ruby/object:Gem::Version
53
- version: "0"
55
+ version: 1.8.1
54
56
  version:
55
57
  required_rubygems_version: !ruby/object:Gem::Requirement
56
58
  requirements:
57
59
  - - ">="
58
60
  - !ruby/object:Gem::Version
59
- version: 1.3.1
61
+ version: 1.3.3
60
62
  version:
61
63
  requirements: []
62
64
 
data/README DELETED
@@ -1,25 +0,0 @@
1
- Simrpc - A Simple RPC library using AMQP as the transport mechanism
2
- Copyright (C) 2009 Mohammed Morsi <movitto@yahoo.com>
3
- Simrpc is made available under the MIT License
4
-
5
- I. Intro
6
- =====================================================
7
- Simrpc is a simple Ruby module for rpc communication,
8
- that uses Apache QPID as the transport mechanism.
9
-
10
- II. Using
11
- =====================================================
12
- Until I write a tutorial, the simrpc test suite
13
- should detail common usage. The Simrpc API
14
- http://projects.morsi.org/simrpc/doc/ (generated
15
- from rdoc) details the complete interface
16
-
17
- III. TODO
18
- =====================================================
19
- Efficiency improvements
20
- C++ rewrite, w/ Ruby and other wrappers, so
21
- Simrpc can be used as across-languages
22
-
23
- IV. Authors
24
- =====================================================
25
- Mohammed Morsi <movitto@yahoo.com>
File without changes