tem_multi_proxy 0.2.1 → 0.2.2

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.2. Fixed Linux behavior when no reader is connected.
2
+
1
3
  v0.2.1. Client returns nil instead of exception when it fails to connect to the server.
2
4
 
3
5
  v0.2. The multi_proxy can respond to remote queries on connected TEMs.
data/Rakefile CHANGED
@@ -10,8 +10,7 @@ Echoe.new('tem_multi_proxy') do |p|
10
10
  p.email = 'victor@costan.us'
11
11
  p.summary = 'Maintains TEM proxies for all the physically attached TEMs.'
12
12
  p.url = 'http://tem.rubyforge.org'
13
- p.dependencies = ['eventmachine >=0.12.8',
14
- 'rbtree >=0.2.1',
13
+ p.dependencies = ['rbtree >=0.2.1',
15
14
  'smartcard >=0.3.1',
16
15
  'tem_ruby >=0.11',
17
16
  'zerg_support >=0.0.9']
@@ -23,7 +23,14 @@ class Manager
23
23
 
24
24
  # Polls each smartcard reader to see if there's a card present.
25
25
  def poll_readers
26
- readers = @pcsc_context.list_readers(nil).map { |name| { :name => name }}
26
+ begin
27
+ readers = @pcsc_context.list_readers(nil).map { |name| { :name => name }}
28
+ rescue
29
+ # Linux PC/SC raises an exception if no readers are connected.
30
+ readers = []
31
+ end
32
+ return readers if readers.empty?
33
+
27
34
  reader_states = Smartcard::PCSC::ReaderStates.new readers.length
28
35
  readers.each_with_index do |reader, i|
29
36
  reader_states.set_reader_name_of!(i, reader[:name])
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{tem_multi_proxy}
5
- s.version = "0.2.1"
5
+ s.version = "0.2.2"
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"]
@@ -24,20 +24,17 @@ Gem::Specification.new do |s|
24
24
  s.specification_version = 3
25
25
 
26
26
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
- s.add_runtime_dependency(%q<eventmachine>, [">= 0.12.8"])
28
27
  s.add_runtime_dependency(%q<rbtree>, [">= 0.2.1"])
29
28
  s.add_runtime_dependency(%q<smartcard>, [">= 0.3.1"])
30
29
  s.add_runtime_dependency(%q<tem_ruby>, [">= 0.11"])
31
30
  s.add_runtime_dependency(%q<zerg_support>, [">= 0.0.9"])
32
31
  else
33
- s.add_dependency(%q<eventmachine>, [">= 0.12.8"])
34
32
  s.add_dependency(%q<rbtree>, [">= 0.2.1"])
35
33
  s.add_dependency(%q<smartcard>, [">= 0.3.1"])
36
34
  s.add_dependency(%q<tem_ruby>, [">= 0.11"])
37
35
  s.add_dependency(%q<zerg_support>, [">= 0.0.9"])
38
36
  end
39
37
  else
40
- s.add_dependency(%q<eventmachine>, [">= 0.12.8"])
41
38
  s.add_dependency(%q<rbtree>, [">= 0.2.1"])
42
39
  s.add_dependency(%q<smartcard>, [">= 0.3.1"])
43
40
  s.add_dependency(%q<tem_ruby>, [">= 0.11"])
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.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Costan
@@ -12,16 +12,6 @@ cert_chain: []
12
12
  date: 2009-06-04 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: eventmachine
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 0.12.8
24
- version:
25
15
  - !ruby/object:Gem::Dependency
26
16
  name: rbtree
27
17
  type: :runtime