google_translate_diff 1.0.2 → 1.0.3

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: 1886972d6b13f5558879a22a90c4b1dad5e0ef20
4
- data.tar.gz: fba14de63dcba2f52ad7752cc38ef95c44d2bcc5
3
+ metadata.gz: bc4b2582b8e854e4fcb52e03a56d67cc17c81a80
4
+ data.tar.gz: d2b05372dba01af35a3cea4c11e169ada41de9c5
5
5
  SHA512:
6
- metadata.gz: 43d184d364e9b85d1544306540df86bac03b9e58cd33ebbf57cbad15e3abb5c976162bb907789002104fcf9edb9eee933720b4d598aa37e61fa401b948b58ee7
7
- data.tar.gz: 411f437b92949a07bffc122ca533f4109d9b62fbb946fc2781f4b4005892efa533563c7c4645060bbbfc7e2f7ac0b0bfaf8fc1d58545924a3be221207fea2f02
6
+ metadata.gz: d906d9899926ca75b60eafb5000d1b351cb00bddd416b3e6dbaf37d6a58885295a6f89655f9ad75bdfc60944749db6627de1211cc0728cd1cd9240b53e992179
7
+ data.tar.gz: 3e56349941f80eb9e482ba29825c6a7571fd78a0c3c636f2ad88b80230bfcb9f837c5e839fb0a1fd2026c69ab0fe12a1e971d6f13d6cc4cd8763596872f30f8a
data/README.md CHANGED
@@ -37,8 +37,6 @@ Or install it yourself as:
37
37
 
38
38
  ## Usage
39
39
 
40
- *Warning*. *Modifies `Ox.default_options`.*
41
-
42
40
  ```ruby
43
41
  require "google_translate_diff"
44
42
 
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+
2
3
  lib = File.expand_path("../lib", __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require "google_translate_diff/version"
@@ -43,7 +44,7 @@ between revisions of long texts.
43
44
  spec.add_development_dependency "simplecov"
44
45
 
45
46
  spec.add_dependency "google-cloud-translate"
46
- spec.add_dependency "ox"
47
+ spec.add_dependency "ox", "< 2.5"
47
48
  spec.add_dependency "dry-initializer"
48
49
  spec.add_dependency "punkt-segmenter"
49
50
  end
@@ -65,7 +65,9 @@ class GoogleTranslateDiff::Tokenizer < ::Ox::Sax
65
65
  def tokenize(value)
66
66
  return [] if value.nil?
67
67
  tokenizer = new(value).tap do |h|
68
- Ox.default_options = { mode: :generic, effort: :tolerant, smart: true }
68
+ # Ox.default_options = {
69
+ # mode: :generic, effort: :tolerant, smart: true
70
+ # }
69
71
  Ox.sax_parse(h, StringIO.new(value))
70
72
  h.cut_last_token
71
73
  end
@@ -73,5 +75,5 @@ class GoogleTranslateDiff::Tokenizer < ::Ox::Sax
73
75
  end
74
76
  end
75
77
 
76
- SKIP = %i(script style).freeze
78
+ SKIP = %i[script style].freeze
77
79
  end
@@ -1,3 +1,3 @@
1
1
  module GoogleTranslateDiff
2
- VERSION = "1.0.2".freeze
2
+ VERSION = "1.0.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_translate_diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Sokolov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-29 00:00:00.000000000 Z
11
+ date: 2017-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: ox
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "<"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '2.5'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "<"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '2.5'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: dry-initializer
127
127
  requirement: !ruby/object:Gem::Requirement