opener-chained-daemon 3.1.2 → 3.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f35c2981bde4e7e2b83deb6b9a412cdd5aa61ccc6c3c89bc454d728a7c54ee9
4
- data.tar.gz: e12cf2b8dd8df0483fa1bb304cf32b6185aa110bf468bcdb991cd3053aef48ed
3
+ metadata.gz: 1dafbc02ba750a4f1f2e360e5febf6521bdb3c5019c3c9bea961ec2a20b56ef3
4
+ data.tar.gz: '09915d7c540dd6932da9f5da8bee68fa259611ba628e53b6796c775b7ff73368'
5
5
  SHA512:
6
- metadata.gz: 56185c5656db86a96b1171d932e4cd746d3ce4e4ec9022647889076e07ddddac580cb5770d9bcb676d2d140182bf47a99d08ffd55db7cd15192752205e567a3e
7
- data.tar.gz: 7c13d54407fb02a78b96e6495cddea4a338798cf1a86066623c831ba562a6e785f8a9eb4fec764e263508b451e9b1469de4bb58526d35f385afe61b45b7d4bc5
6
+ metadata.gz: 8f89040096bb0f6f9c755c0db9564cbc8a63e772352b5f05c0e4a4341f659e7bd8abdfe3b8b1aa87b6cccf7db17355628105079d95fd0679e4f650f504fcc41e
7
+ data.tar.gz: 3fbb26c4542fae6143077292a288e10ec0aba51c9b2f463f55355d3a3cab518b4c2f1135de978d6f8aeec6e2b30d06f50bc60da9d2cc0cb4ee072a3040e6f81a
@@ -1,7 +1,7 @@
1
1
  module Opener
2
2
  class ChainedDaemon
3
3
 
4
- VERSION = '3.1.2'
4
+ VERSION = '3.1.3'
5
5
 
6
6
  end
7
7
  end
@@ -43,7 +43,9 @@ module Opener
43
43
  raise Core::UnsupportedLanguageError.new kaf.language
44
44
  end
45
45
 
46
- response = Faraday.post BASE_URL, {lang: kaf.language, input: kaf.raw}.to_query
46
+ input = kaf.raw
47
+ input = input.gsub(/\,[^\ ]/, ', ')
48
+ response = Faraday.post BASE_URL, {lang: kaf.language, input: input}.to_query
47
49
  raise Core::UnsupportedLanguageError, kaf.language if response.status == 406
48
50
  raise response.body if response.status >= 400
49
51
  tokens = JSON.parse response.body
@@ -62,14 +64,16 @@ module Opener
62
64
  end
63
65
  misc = word['misc'] || miscs[word['id']]
64
66
 
67
+ Rollbar.scoped({ input: input, params: params, tokens: tokens, word: word }) do
68
+ raise 'Missing misc'
69
+ end if misc.nil?
70
+
65
71
  offset = misc.match(/start_char=(\d+)|/)[1].to_i
66
72
  length = misc.match(/end_char=(\d+)/)[1].to_i - offset
67
73
 
68
74
  u_pos = word['upos']
69
75
  pos = POS[u_pos]
70
- Rollbar.scoped({ input: input, params: params, tokens: tokens }) do
71
- raise "Didn't find a map for #{u_pos}"
72
- end if pos.nil?
76
+ raise "Didn't find a map for #{u_pos}" if pos.nil?
73
77
  type = if POS_OPEN.include? pos then 'open' else 'close' end
74
78
 
75
79
  params = {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-chained-daemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-16 00:00:00.000000000 Z
11
+ date: 2020-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport