tem_multi_proxy 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.2.5. Added forgotten dependency on tem_ruby, updated documentation.
2
+
1
3
  v0.2.4. Updated to API for smartcard 0.4.0.
2
4
 
3
5
  v0.2.3. Removed unused dependency on eventmachine.
data/README CHANGED
@@ -11,4 +11,3 @@ Note on testing: since the proxy is entirely event-driven, testing it would be
11
11
  a pain, or I don't know how to do it easily yet. Therefore I'm not going to
12
12
  write complex tests for 200 lines of code that I don't expect to change ever
13
13
  again. Contributions are welcome though :)
14
-
data/Rakefile CHANGED
@@ -1,9 +1,15 @@
1
+ # Rakefile for the tem_multi_proxy gem.
2
+ #
3
+ # Author:: Victor Costan
4
+ # Copyright:: Copyright (C) 2009 Massachusetts Institute of Technology
5
+ # License:: MIT
6
+
1
7
  require 'rubygems'
2
8
  gem 'echoe'
3
9
  require 'echoe'
4
10
 
5
11
  Echoe.new('tem_multi_proxy') do |p|
6
- p.project = 'tem' # rubyforge project
12
+ p.project = 'tem' # rubyforge project
7
13
  p.docs_host = "costan@rubyforge.org:/var/www/gforge-projects/tem/rdoc/"
8
14
 
9
15
  p.author = 'Victor Costan'
@@ -11,11 +17,12 @@ Echoe.new('tem_multi_proxy') do |p|
11
17
  p.summary = 'Maintains TEM proxies for all the physically attached TEMs.'
12
18
  p.url = 'http://tem.rubyforge.org'
13
19
  p.dependencies = ['rbtree >=0.2.1',
14
- 'smartcard >=0.4.1',
20
+ 'smartcard >=0.4.6',
21
+ 'tem_ruby >=0.11.7',
15
22
  'zerg_support >=0.0.9']
16
23
 
17
- p.need_tar_gz = !Platform.windows?
18
- p.need_zip = !Platform.windows?
24
+ p.need_tar_gz = !Gem.win_platform?
25
+ p.need_zip = !Gem.win_platform?
19
26
  p.rdoc_pattern = /^(lib|bin|tasks|ext)|^BUILD|^README|^CHANGELOG|^TODO|^LICENSE|^COPYING$/
20
27
  end
21
28
 
data/bin/tem_multi_proxy CHANGED
@@ -1,4 +1,15 @@
1
1
  #!/usr/bin/env ruby
2
+ #
3
+ # Launcher for a tem_multi_proxy server.
4
+ #
5
+ # Author:: Victor Costan
6
+ # Copyright:: Copyright (C) 2009 Massachusetts Institute of Technology
7
+ # License:: MIT
8
+ #
9
+ # Usage: tem_multi_proxy [rpc port]
10
+ # The default RPC port is 9000. The RPC can be used with the tem_multi_proxy
11
+ # client library to obtain information about the cards connected to the system
12
+ # running tem_multi_proxy.
2
13
 
3
14
  require 'rubygems'
4
15
  require 'tem_multi_proxy'
@@ -1,4 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
+ #
3
+ # Queries a tem_multi_proxy server about the smartcards connected to it via RPC.
4
+ #
5
+ # Author:: Victor Costan
6
+ # Copyright:: Copyright (C) 2009 Massachusetts Institute of Technology
7
+ # License:: MIT
8
+ #
9
+ # Usage: tem_multi_proxy_query [host[:port]]
10
+ # The host:port should point to the RPC port of the tem_multi_proxy server.
11
+ # The default host is localhost, and the default port is 9000.
2
12
 
3
13
  require 'rubygems'
4
14
  require 'tem_multi_proxy'
@@ -1,6 +1,19 @@
1
+ # RPC client for a tem_multi_proxy server.
2
+ #
3
+ # Author:: Victor Costan
4
+ # Copyright:: Copyright (C) 2009 Massachusetts Institute of Technology
5
+ # License:: MIT
6
+
1
7
  # :nodoc: namespace
2
8
  module Tem::MultiProxy
3
-
9
+
10
+
11
+ # RPC client for a tem_multi_proxy server.
12
+ #
13
+ # The client supports the RPC server's interface for obtaining administrative
14
+ # information about the cards connected to it. To communicate with the
15
+ # smart-cards, use the transports in the smartcard gem (see the Smartcard::Iso
16
+ # namespace).
4
17
  class Client
5
18
  Protocol = Zerg::Support::Protocols::ObjectProtocol
6
19
  Adapter = Zerg::Support::Sockets::ProtocolAdapter.adapter_module Protocol
@@ -27,6 +40,6 @@ class Client
27
40
  :opts => { :host => server_host, :port => port } }
28
41
  end
29
42
  end
30
- end
43
+ end # class Tem::MultiProxy::Client
31
44
 
32
45
  end # namespace Tem::MultiProxy
@@ -1,3 +1,9 @@
1
+ # Manages the mapping between live TEMs and proxy processes.
2
+ #
3
+ # Author:: Victor Costan
4
+ # Copyright:: Copyright (C) 2009 Massachusetts Institute of Technology
5
+ # License:: MIT
6
+
1
7
  require 'logger'
2
8
  require 'rbtree'
3
9
  require 'set'
@@ -6,6 +12,18 @@ require 'set'
6
12
  # :nodoc: namespace
7
13
  module Tem::MultiProxy
8
14
 
15
+
16
+ # Manages the mapping between live smart-cards and proxy processes.
17
+ #
18
+ # This class is intended to live as a singleton instance, though that is not
19
+ # enforced. The instance does its work in a dedicated thread which spins inside
20
+ # the management_loop method. Information about the live smartcards is returned
21
+ # by the tem_ports method.
22
+ #
23
+ # While the management thread is spinning, it actively maintains a one-to-one
24
+ # mapping between connected smart-cards and proxy processes, by spawning new
25
+ # processes when cards are connected, and killing processes when cards are
26
+ # disconnected.
9
27
  class Manager
10
28
  def initialize
11
29
  @pcsc_context = Smartcard::PCSC::Context.new(Smartcard::PCSC::SCOPE_SYSTEM)
@@ -139,6 +157,6 @@ class Manager
139
157
  Kernel.sleep 1
140
158
  end
141
159
  end
142
- end
160
+ end # class Tem::MultiProxy::Manager
143
161
 
144
162
  end # namespace Tem::MultiProxy
@@ -1,3 +1,9 @@
1
+ # RPC client for a tem_multi_proxy server.
2
+ #
3
+ # Author:: Victor Costan
4
+ # Copyright:: Copyright (C) 2009 Massachusetts Institute of Technology
5
+ # License:: MIT
6
+
1
7
  require 'logger'
2
8
  require 'rbtree'
3
9
  require 'set'
@@ -1,3 +1,9 @@
1
+ # Main include file for the tem_multi_proxy Rubygem.
2
+ #
3
+ # Author:: Victor Costan
4
+ # Copyright:: Copyright (C) 2009 Massachusetts Institute of Technology
5
+ # License:: MIT
6
+
1
7
  # Gem requirements.
2
8
  require 'rubygems'
3
9
  require 'smartcard'
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{tem_multi_proxy}
5
- s.version = "0.2.4"
5
+ s.version = "0.2.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Victor Costan"]
9
- s.date = %q{2009-08-19}
9
+ s.date = %q{2009-11-09}
10
10
  s.description = %q{Maintains TEM proxies for all the physically attached TEMs.}
11
11
  s.email = %q{victor@costan.us}
12
12
  s.executables = ["tem_multi_proxy", "tem_multi_proxy_query"]
@@ -25,16 +25,19 @@ Gem::Specification.new do |s|
25
25
 
26
26
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
27
  s.add_runtime_dependency(%q<rbtree>, [">= 0.2.1"])
28
- s.add_runtime_dependency(%q<smartcard>, [">= 0.4.1"])
28
+ s.add_runtime_dependency(%q<smartcard>, [">= 0.4.6"])
29
+ s.add_runtime_dependency(%q<tem_ruby>, [">= 0.11.7"])
29
30
  s.add_runtime_dependency(%q<zerg_support>, [">= 0.0.9"])
30
31
  else
31
32
  s.add_dependency(%q<rbtree>, [">= 0.2.1"])
32
- s.add_dependency(%q<smartcard>, [">= 0.4.1"])
33
+ s.add_dependency(%q<smartcard>, [">= 0.4.6"])
34
+ s.add_dependency(%q<tem_ruby>, [">= 0.11.7"])
33
35
  s.add_dependency(%q<zerg_support>, [">= 0.0.9"])
34
36
  end
35
37
  else
36
38
  s.add_dependency(%q<rbtree>, [">= 0.2.1"])
37
- s.add_dependency(%q<smartcard>, [">= 0.4.1"])
39
+ s.add_dependency(%q<smartcard>, [">= 0.4.6"])
40
+ s.add_dependency(%q<tem_ruby>, [">= 0.11.7"])
38
41
  s.add_dependency(%q<zerg_support>, [">= 0.0.9"])
39
42
  end
40
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tem_multi_proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Costan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-19 00:00:00 -04:00
12
+ date: 2009-11-09 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,7 +30,17 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.4.1
33
+ version: 0.4.6
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: tem_ruby
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 0.11.7
34
44
  version:
35
45
  - !ruby/object:Gem::Dependency
36
46
  name: zerg_support