-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtranslation_diff.gemspec
More file actions
56 lines (50 loc) · 2.34 KB
/
Copy pathtranslation_diff.gemspec
File metadata and controls
56 lines (50 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "translation_diff/version"
# rubocop:disable-next Metrics/BlockLength
Gem::Specification.new do |spec|
spec.name = "translation_diff"
spec.version = TranslationDiff::VERSION
spec.authors = ["Islam Gagiev"]
spec.email = ["omniacinis@gmail.com"]
spec.summary = "A translation cache that sends only new or changed sentences to your provider."
spec.description = %(
TranslationDiff extracts translatable text from HTML, splits it into
sentences, and caches each sentence by content hash. Only the sentences
missing from the cache are sent to whichever translation provider you plug
in through a small provider contract, so re-translating a long text after a
small edit costs the price of the edit, not the whole text.
)
spec.homepage = "https://github.com/Halvanhelv/translation_diff"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.4"
if spec.respond_to?(:metadata)
spec.metadata["allowed_push_host"] = "https://rubygems.org"
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
spec.metadata["rubygems_mfa_required"] = "true"
else
raise "RubyGems 2.0 or newer is required to protect against " \
"public gem pushes."
end
spec.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.add_development_dependency "minitest", "~> 6.0"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rubocop", "~> 1.90"
spec.add_development_dependency "simplecov", "~> 1.2"
# `ox` walks HTML; `pragmatic_segmenter` backs the default sentence
# segmenter and has zero dependencies of its own; `faraday` and
# `faraday-retry` are the HTTP transport every REST provider inherits.
# Everything else -- the connection pool, and whatever backs the cache and
# the rate limiter -- is supplied by the application and duck typed, so it
# stays out of the gemspec.
spec.add_dependency "faraday", "~> 2.9"
spec.add_dependency "faraday-retry", "~> 2.2"
spec.add_dependency "ox", "~> 2.14"
spec.add_dependency "pragmatic_segmenter", "~> 0.3"
end