biodiversity19 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/bin/parserver +15 -14
  3. metadata +18 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 1.0.4
data/bin/parserver CHANGED
@@ -79,20 +79,21 @@ puts "Running parser service on port #{OPTIONS[:port]}, output type is '#{OPTION
79
79
  parser = ScientificNameParser.new
80
80
  server = TCPServer.open(OPTIONS[:port]) # Socket to listen on a port
81
81
  loop do # Servers run forever
82
- client = server.accept # Wait for a client to connect
83
- puts 'opening client'
84
- count = 0
85
- while a = client.readline rescue nil
86
- count += 1
87
- puts "parsed %s'th name" % count if count % 1000 == 0
88
- a.force_encoding("utf-8") if a && RUBY_VERSION_INT >= 19
89
- if ['end','exit','q', '.'].include? a.strip
90
- client.close
91
- break
82
+ Thread.start(server.accept) do |client|
83
+ puts 'opening client'
84
+ count = 0
85
+ while a = client.readline rescue nil
86
+ count += 1
87
+ puts "parsed %s'th name" % count if count % 1000 == 0
88
+ a.force_encoding("utf-8") if a && RUBY_VERSION_INT >= 19
89
+ if ['end','exit','q', '.'].include? a.strip
90
+ client.close
91
+ break
92
+ end
93
+ out = get_output(a, parser).strip
94
+ client.write(out + "\n") rescue break
92
95
  end
93
- out = get_output(a, parser).strip
94
- client.write(out + "\n") rescue break
96
+ puts 'closing client'
97
+ client.close
95
98
  end
96
- puts 'closing client'
97
- client.close
98
99
  end
metadata CHANGED
@@ -1,8 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biodiversity19
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.0.3
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 4
9
+ version: 1.0.4
6
10
  platform: ruby
7
11
  authors:
8
12
  - Dmitry Mozzherin
@@ -10,7 +14,8 @@ autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
16
 
13
- date: 2011-07-13 00:00:00 Z
17
+ date: 2011-08-03 00:00:00 -04:00
18
+ default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: treetop
@@ -20,6 +25,8 @@ dependencies:
20
25
  requirements:
21
26
  - - ">="
22
27
  - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
23
30
  version: "0"
24
31
  type: :runtime
25
32
  version_requirements: *id001
@@ -31,6 +38,8 @@ dependencies:
31
38
  requirements:
32
39
  - - ">="
33
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
34
43
  version: "0"
35
44
  type: :development
36
45
  version_requirements: *id002
@@ -71,6 +80,7 @@ files:
71
80
  - spec/parser/spec_helper.rb
72
81
  - spec/parser/test_data.txt
73
82
  - spec/spec_helper.rb
83
+ has_rdoc: true
74
84
  homepage: http://github.com/GlobalNamesArchitecture/biodiversity
75
85
  licenses: []
76
86
 
@@ -84,17 +94,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
94
  requirements:
85
95
  - - ">="
86
96
  - !ruby/object:Gem::Version
97
+ segments:
98
+ - 0
87
99
  version: "0"
88
100
  required_rubygems_version: !ruby/object:Gem::Requirement
89
101
  none: false
90
102
  requirements:
91
103
  - - ">="
92
104
  - !ruby/object:Gem::Version
105
+ segments:
106
+ - 0
93
107
  version: "0"
94
108
  requirements: []
95
109
 
96
110
  rubyforge_project:
97
- rubygems_version: 1.8.5
111
+ rubygems_version: 1.3.7
98
112
  signing_key:
99
113
  specification_version: 3
100
114
  summary: Parser of scientific names