Skip to content

v2.0.0

Choose a tag to compare

@Halvanhelv Halvanhelv released this 07 Sep 15:04
· 101 commits to main since this release
dc60264

Major release. The gem now loads two runtime dependencies instead of eight.

Breaking changes

  • Six runtime dependencies were removed. Applications relying on this gem to install the DeepL client, redis, redis-namespace, connection_pool or ratelimit must now depend on them directly. The README example requires them explicitly.
  • RedisRateLimiter takes threshold and interval as keywords. Callers passing them positionally must switch.

What was actually used

gem where its constant appears in lib/ verdict
ox Ox::Sax, Ox.sax_parse in the tokenizer kept
punkt-segmenter Punkt::SentenceTokenizer in the tokenizer kept
dry-initializer five extend lines dropped
connection_pool nowhere — the pool is duck typed on #with dropped
redis nowhere — bare Redis is never named dropped
deepl-rb nowhere — required at load, constant unused dropped
redis-namespace inside one method body of RedisCacheStore dropped
ratelimit inside one method body of RedisRateLimiter dropped

redis-namespace and ratelimit already resolved lazily — the gem loaded fine without them and only broke if you used those classes. Declaring them as hard dependencies forced them on everyone who ran their own cache store.

This is what the README always promised: "This dependencies are not included, as you might need to roll your own cache based on different store." The gemspec just never agreed with it.

Fixed

RedisRateLimiter declared threshold and interval as positional params, so the keyword call the README documents silently discarded them and fell back to 8000 and 60. They are keywords now, with a regression test.

Internal

  • dry-initializer was replaced by plain initializers. Its generated readers were private, so the private attr_readers that replace them leave the public API unchanged.
  • Both Redis wrappers had no tests at all; they have six now. Coverage went from 94.68% to 97.57%.

Full changelog: v1.1.1...v2.0.0