levinalex-liaison_labor 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,10 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
1
  Gem::Specification.new do |s|
4
2
  s.name = %q{liaison_labor}
5
- s.version = "0.1.8"
3
+ s.version = "0.1.9"
6
4
 
7
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
6
  s.authors = ["Levin Alexander"]
9
- s.date = %q{2009-06-11}
7
+ s.date = %q{2009-06-12}
10
8
  s.default_executable = %q{liaison_server}
11
9
  s.description = %q{An interface to the LIAISON® analyser by DiaSorin <http://www.diasorin.com/en/productsandsystems/liaison>}
12
10
  s.email = ["mail@levinalex.net"]
@@ -18,19 +16,19 @@ Gem::Specification.new do |s|
18
16
  s.rdoc_options = ["--main", "README.txt"]
19
17
  s.require_paths = ["lib"]
20
18
  s.rubyforge_project = %q{liaison_labor}
21
- s.rubygems_version = %q{1.3.1}
19
+ s.rubygems_version = %q{1.2.0}
22
20
  s.summary = %q{interfaces Liaison device to worklist_manager}
23
21
 
24
22
  if s.respond_to? :specification_version then
25
23
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
26
24
  s.specification_version = 2
27
25
 
28
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
29
- s.add_development_dependency(%q<hoe>, [">= 1.12.1"])
26
+ if current_version >= 3 then
27
+ s.add_development_dependency(%q<hoe>, [">= 1.12.2"])
30
28
  else
31
- s.add_dependency(%q<hoe>, [">= 1.12.1"])
29
+ s.add_dependency(%q<hoe>, [">= 1.12.2"])
32
30
  end
33
31
  else
34
- s.add_dependency(%q<hoe>, [">= 1.12.1"])
32
+ s.add_dependency(%q<hoe>, [">= 1.12.2"])
35
33
  end
36
34
  end
data/lib/liaison_labor.rb CHANGED
@@ -4,5 +4,5 @@ require File.join(File.dirname(__FILE__),'liaison_labor','interface.rb')
4
4
  require File.join(File.dirname(__FILE__),'liaison_labor','packets.rb')
5
5
 
6
6
  class LiaisonLabor
7
- VERSION = '0.1.8'
7
+ VERSION = '0.1.9'
8
8
  end
@@ -12,6 +12,7 @@ class Hash
12
12
  def symbolize_keys
13
13
  inject({}) do |options, (key, value)|
14
14
  options[(key.to_sym rescue key) || key] = value
15
+ options
15
16
  end
16
17
  end
17
18
 
@@ -21,7 +22,6 @@ class Hash
21
22
  options
22
23
  end
23
24
  end
24
-
25
25
  end
26
26
 
27
27
 
@@ -35,7 +35,7 @@ module Diasorin
35
35
  DefaultConfig = {
36
36
  :serial_port => "/dev/ttyUSB0",
37
37
  :baudrate => 9600,
38
- :uri => "http://localhost/liaison/"
38
+ :endpoint => "http://localhost/liaison/"
39
39
  }
40
40
 
41
41
  class LiaisonServer
@@ -50,7 +50,7 @@ module Diasorin
50
50
 
51
51
  # if an option is not given on the command line
52
52
  # it is taken from the config file, or the default is used
53
- @options = Hash.new() { |h,k| @options_from_file[k] || DefaultConfig[k] }
53
+ @options = DefaultConfig.merge(@options_from_file)
54
54
  end
55
55
 
56
56
  # parse command line options
@@ -113,7 +113,8 @@ module Diasorin
113
113
  #
114
114
  liaison.on_order_request do |barcode|
115
115
  begin
116
- data = YAML.load(::Net::HTTP.get( URI.join(@options[:endpoint],"find_requests/",barcode) ))
116
+ uri = URI.join(@options[:endpoint],"find_requests/",barcode)
117
+ data = YAML.load(::Net::HTTP.get(uri))
117
118
  rescue Exception => e
118
119
  puts e
119
120
  puts e.backtrace
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: levinalex-liaison_labor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Levin Alexander
@@ -9,18 +9,18 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-11 00:00:00 -07:00
12
+ date: 2009-06-12 00:00:00 -07:00
13
13
  default_executable: liaison_server
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hoe
17
- type: :development
17
+ type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.12.1
23
+ version: 1.12.2
24
24
  version:
25
25
  description: "An interface to the LIAISON\xC2\xAE analyser by DiaSorin <http://www.diasorin.com/en/productsandsystems/liaison>"
26
26
  email: