wamp_client 0.0.1

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,43 @@
1
+ require 'simplecov'
2
+ SimpleCov.start
3
+
4
+ require_relative '../lib/wamp_client'
5
+
6
+ require 'codecov'
7
+ SimpleCov.formatter = SimpleCov::Formatter::Codecov
8
+
9
+ require 'wamp_client'
10
+
11
+ module SpecHelper
12
+
13
+ class TestTransport < WampClient::Transport::Base
14
+
15
+ attr_accessor :messages
16
+
17
+ def initialize(options)
18
+ super(options)
19
+ @connected = true
20
+ self.messages = []
21
+ end
22
+
23
+ def connect
24
+
25
+ end
26
+
27
+ def send_message(msg)
28
+ self.messages.push(msg)
29
+ end
30
+
31
+ def receive_message(msg)
32
+
33
+ # Emulate serialization/deserialization
34
+ serialize = self.serializer.serialize(msg)
35
+ deserialize = self.serializer.deserialize(serialize)
36
+
37
+ # Call the received message
38
+ @on_message.call(deserialize) unless @on_message.nil?
39
+ end
40
+
41
+ end
42
+
43
+ end
data/tasks/rspec.rake ADDED
@@ -0,0 +1,3 @@
1
+ require 'rspec/core/rake_task'
2
+
3
+ RSpec::Core::RakeTask.new(:spec)
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'wamp_client/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'wamp_client'
8
+ spec.version = WampClient::VERSION
9
+ spec.authors = ['Eric Chapman']
10
+ spec.email = ['eric.chappy@gmail.com']
11
+ spec.summary = %q{Web Application Messaging Protocol Client}
12
+ spec.description = %q{An implementation of The Web Application Messaging Protocol (WAMP)}
13
+ spec.homepage = 'https://github.com/ericchapman/ruby_wamp_client'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency 'bundler', '~> 1.7'
22
+ spec.add_development_dependency 'rake', '~> 10.0'
23
+ spec.add_development_dependency 'rspec'
24
+ spec.add_development_dependency 'simplecov'
25
+ spec.add_development_dependency 'codecov'
26
+
27
+ spec.add_dependency 'websocket-eventmachine-client', '~> 1.1.0'
28
+ spec.add_dependency 'json', '~> 1.8.3'
29
+ end
metadata ADDED
@@ -0,0 +1,170 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wamp_client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Eric Chapman
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-04-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: codecov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: websocket-eventmachine-client
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 1.1.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: 1.1.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: json
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ~>
102
+ - !ruby/object:Gem::Version
103
+ version: 1.8.3
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: 1.8.3
111
+ description: An implementation of The Web Application Messaging Protocol (WAMP)
112
+ email:
113
+ - eric.chappy@gmail.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - .gitignore
119
+ - Gemfile
120
+ - LICENSE.txt
121
+ - README.md
122
+ - Rakefile
123
+ - circle.yml
124
+ - lib/wamp_client.rb
125
+ - lib/wamp_client/auth.rb
126
+ - lib/wamp_client/check.rb
127
+ - lib/wamp_client/connection.rb
128
+ - lib/wamp_client/message.rb
129
+ - lib/wamp_client/serializer.rb
130
+ - lib/wamp_client/session.rb
131
+ - lib/wamp_client/transport.rb
132
+ - lib/wamp_client/version.rb
133
+ - scripts/gen_message.rb
134
+ - spec/auth_spec.rb
135
+ - spec/check_spec.rb
136
+ - spec/message_spec.rb
137
+ - spec/session_spec.rb
138
+ - spec/spec_helper.rb
139
+ - tasks/rspec.rake
140
+ - wamp_client.gemspec
141
+ homepage: https://github.com/ericchapman/ruby_wamp_client
142
+ licenses:
143
+ - MIT
144
+ metadata: {}
145
+ post_install_message:
146
+ rdoc_options: []
147
+ require_paths:
148
+ - lib
149
+ required_ruby_version: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ required_rubygems_version: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ requirements: []
160
+ rubyforge_project:
161
+ rubygems_version: 2.0.14
162
+ signing_key:
163
+ specification_version: 4
164
+ summary: Web Application Messaging Protocol Client
165
+ test_files:
166
+ - spec/auth_spec.rb
167
+ - spec/check_spec.rb
168
+ - spec/message_spec.rb
169
+ - spec/session_spec.rb
170
+ - spec/spec_helper.rb