opener-outlet 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f930e8c0a3a29dc5249d6a5482a42dc4b1e78330
4
- data.tar.gz: 0827a2ca99d274b15f63aef6a379847922ba6a69
3
+ metadata.gz: 7ff341e7b4b21951e449c53856b4206632f732a1
4
+ data.tar.gz: 0b8235e5b7d745c8406c870e400075a2827b1d63
5
5
  SHA512:
6
- metadata.gz: f3e4196ee9495bff4b482d225b4baa19f4c1bbe818b248a662d90cd86f4805c82c307b211e7415a3deac4cfcf340634c5ede562812d809e9382ac9c5e387bb41
7
- data.tar.gz: 6abd0fd15cccf9396dd4f620526e6324f21676ce28c34d81581563988f408a4861551d682057f8144b85d4b384f6284da3cb364a8102399c2ced5a1bb8b350ad
6
+ metadata.gz: fb31383fb0f9921d118eef0a4df0aa2c222132b7e401931ad74addda9c1745b2f0caed2dc97fcfa348462bfcca1c65e054ba4393a00ff97b5ec3c1d80710f506
7
+ data.tar.gz: df9e66b1f1afe9803aa1e9f5e78404af863797a476c86d8e4652f8b4f9b4dcc1c9138c9eabfd648c25803284fec5af24826d17f3a482e76ac3a6da385eb8c997
data/README.md CHANGED
@@ -8,7 +8,7 @@ Database and shows them into your browser.
8
8
 
9
9
  This software is part of a larger collection of natural language processing
10
10
  tools known as "the OpeNER project". You can find more information about the
11
- project at (the OpeNER portal)[http://opener-project.github.io]. There you can
11
+ project at the [OpeNER portal](http://opener-project.github.io). There you can
12
12
  also find references to terms like KAF (an XML standard to represent linguistic
13
13
  annotations in texts), component, cores, scenario's and pipelines.
14
14
 
@@ -56,10 +56,8 @@ Description of dependencies
56
56
  ---------------------------
57
57
 
58
58
  This component runs best if you run it in an environment suited for OpeNER
59
- components. You can find an installation guide and helper tools in the (OpeNER
60
- installer)[https://github.com/opener-project/opener-installer] and (an
61
- installation guide on the Opener
62
- Website)[http://opener-project.github.io/getting-started/how-to/local-installation.html]
59
+ components. You can find an installation guide and helper tools in the [OpeNER installer](https://github.com/opener-project/opener-installer) and an
60
+ installation guide on the [Opener Website](http://opener-project.github.io/getting-started/how-to/local-installation.html)
63
61
 
64
62
  At least you need the following system setup:
65
63
 
@@ -89,21 +87,21 @@ can find the core technolies in the following repositories:
89
87
  Where to go from here
90
88
  ---------------------
91
89
 
92
- * Check (the project websitere)[http://opener-project.github.io]
93
- * (Checkout the webservice)[http://opener.olery.com/outlet]
90
+ * [Check the project websitere](http://opener-project.github.io)
91
+ * [Checkout the webservice](http://opener.olery.com/outlet)
94
92
 
95
93
  Report problem/Get help
96
94
  -----------------------
97
95
 
98
96
  If you encounter problems, please email support@opener-project.eu or leave an
99
- issue in the (issue tracker)[https://github.com/opener-project/outlet/issues].
97
+ issue in the [issue tracker](https://github.com/opener-project/outlet/issues).
100
98
 
101
99
 
102
100
  Contributing
103
101
  ------------
104
102
 
105
- 1. Fork it ( http://github.com/opener-project/outlet/fork )
103
+ 1. Fork it <http://github.com/opener-project/outlet/fork>
106
104
  2. Create your feature branch (`git checkout -b my-new-feature`)
107
105
  3. Commit your changes (`git commit -am 'Add some feature'`)
108
106
  4. Push to the branch (`git push origin my-new-feature`)
109
- 5. Create new Pull Request
107
+ 5. Create new Pull Request
@@ -23,12 +23,33 @@ module Opener
23
23
  erb :index
24
24
  end
25
25
  end
26
+
27
+ get '/:request_id.json' do
28
+ unless params[:request_id] == 'favicon.ico'
29
+ begin
30
+ output = Output.find_by_uuid(params[:request_id])
31
+ if output
32
+ content_type('text/json')
33
+ kj = Opener::KafToJson.new
34
+ json = kj.run(output.text) rescue output.text
35
+ body(json)
36
+ else
37
+ halt(404, "No record found for ID #{params[:request_id]}")
38
+ end
39
+ rescue => error
40
+ error_callback = params[:error_callback]
41
+
42
+ submit_error(error_callback, error.message) if error_callback
43
+
44
+ raise(error)
45
+ end
46
+ end
47
+ end
26
48
 
27
49
  get '/:request_id' do
28
50
  unless params[:request_id] == 'favicon.ico'
29
51
  begin
30
52
  output = Output.find_by_uuid(params[:request_id])
31
-
32
53
  if output
33
54
  content_type(:xml)
34
55
  body(output.text)
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class Outlet
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.5"
4
4
  end
5
5
  end
data/lib/opener/outlet.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require_relative 'outlet/output'
2
2
  require_relative 'outlet/version'
3
3
  require_relative 'outlet/server'
4
+ require 'opener/kaf_to_json'
4
5
 
5
6
  module Opener
6
7
  class Outlet
@@ -35,6 +35,7 @@ Gem::Specification.new do |gem|
35
35
  gem.add_dependency 'activerecord', '~>3.2'
36
36
  gem.add_dependency 'activesupport', '~>3.2'
37
37
  gem.add_dependency 'opener-webservice'
38
+ gem.add_dependency 'opener-kaf2json'
38
39
 
39
40
  gem.add_development_dependency 'rspec'
40
41
  gem.add_development_dependency 'cucumber'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-outlet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com
@@ -192,6 +192,20 @@ dependencies:
192
192
  version: '0'
193
193
  prerelease: false
194
194
  type: :runtime
195
+ - !ruby/object:Gem::Dependency
196
+ name: opener-kaf2json
197
+ version_requirements: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - '>='
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ requirement: !ruby/object:Gem::Requirement
203
+ requirements:
204
+ - - '>='
205
+ - !ruby/object:Gem::Version
206
+ version: '0'
207
+ prerelease: false
208
+ type: :runtime
195
209
  - !ruby/object:Gem::Dependency
196
210
  name: rspec
197
211
  version_requirements: !ruby/object:Gem::Requirement
@@ -251,28 +265,28 @@ dependencies:
251
265
  description: Database storing for the web services output when using callbacks.
252
266
  email:
253
267
  executables:
254
- - outlet-server
255
268
  - outlet-daemon
269
+ - outlet-server
256
270
  extensions: []
257
271
  extra_rdoc_files: []
258
272
  files:
273
+ - README.md
274
+ - bin/outlet-daemon
275
+ - bin/outlet-server
276
+ - config.ru
259
277
  - config/database.rb
278
+ - exec/outlet.rb
260
279
  - lib/opener/outlet.rb
261
- - lib/opener/outlet/visualizer.rb
262
- - lib/opener/outlet/version.rb
263
280
  - lib/opener/outlet/output.rb
264
- - lib/opener/outlet/server.rb
265
281
  - lib/opener/outlet/public/outlet.css
266
- - lib/opener/outlet/views/show.erb
282
+ - lib/opener/outlet/server.rb
283
+ - lib/opener/outlet/version.rb
267
284
  - lib/opener/outlet/views/index.erb
285
+ - lib/opener/outlet/views/show.erb
268
286
  - lib/opener/outlet/views/show.html.erb
269
- - config.ru
287
+ - lib/opener/outlet/visualizer.rb
270
288
  - opener-outlet.gemspec
271
- - README.md
272
- - exec/outlet.rb
273
289
  - visualizer.rb
274
- - bin/outlet-server
275
- - bin/outlet-daemon
276
290
  homepage: http://opener-project.github.com/
277
291
  licenses: []
278
292
  metadata: {}
@@ -292,9 +306,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
292
306
  version: '0'
293
307
  requirements: []
294
308
  rubyforge_project:
295
- rubygems_version: 2.1.9
309
+ rubygems_version: 2.2.2
296
310
  signing_key:
297
311
  specification_version: 4
298
312
  summary: Database storing for the web services output when using callbacks.
299
313
  test_files: []
300
- has_rdoc: yard