biodiversity 1.0.2 → 1.0.3
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.
- data/VERSION +1 -1
- data/bin/parserver +11 -10
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
data/bin/parserver
CHANGED
@@ -80,18 +80,19 @@ parser = ScientificNameParser.new
|
|
80
80
|
server = TCPServer.open(OPTIONS[:port]) # Socket to listen on a port
|
81
81
|
loop do # Servers run forever
|
82
82
|
client = server.accept # Wait for a client to connect
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
end
|
91
|
-
client.puts get_output(a, parser)
|
92
|
-
rescue EOFError
|
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
|
93
90
|
client.close
|
94
91
|
break
|
95
92
|
end
|
93
|
+
out = get_output(a, parser).strip
|
94
|
+
client.write(out + "\n") rescue break
|
96
95
|
end
|
96
|
+
puts 'closing client'
|
97
|
+
client.close
|
97
98
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biodiversity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 3
|
10
|
+
version: 1.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dmitry Mozzherin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-13 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|