autosuggest 0.2.0 → 0.3.0

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
  SHA256:
3
- metadata.gz: fe418b5cfaa006d454a8e061ae08b63821de147677175054be5e28ad254399c6
4
- data.tar.gz: 10c28b44de11f53fccd66a3e6f547a7f97282e23b529452a1db827b3d2dd0624
3
+ metadata.gz: 0cd2e072b09ebaecd6858e27f87b198e0909c8d70c0f36250c6eefc022600e59
4
+ data.tar.gz: '02434900d6a69b6c18ad2d5353c7359681f442fbe19a28f1aacfdac3c60dfe42'
5
5
  SHA512:
6
- metadata.gz: 236b65f1939693fd076445ebddff62535d1d1197e44561ade442e2c381f2d3c4bd06572daacc29718dbfb087abc1cf3c001d0152f21c9198d059d8c1d933985c
7
- data.tar.gz: 1ca979179a176b6a7eca3ee8b9593e6479680ea4706e8ad1c004d8c88efe0a1f1a82b779dee050cb1aa3c6af749323a87fc9f93c9c0c4d8eeb530a9e6a9f11cd
6
+ metadata.gz: 22ed0ecf00dae3f077cbd2be2cd024e61f6ceb6cdefca57af9a90d1769499e51c1df301ee37bfbd2344ef69afd6b9da3582aa21714b1b3d5061749eb0d9b190d
7
+ data.tar.gz: d8b757d31b2c2b9429afc29758f6d70631e9402593dbc127728c47f5553edb2ec04b9007dc79257820a500f0105f93d72254decd1cde3b2123990752f255600e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.3.0 (2024-05-22)
2
+
3
+ - Switched to Mittens for stemming
4
+ - Dropped support for Ruby < 3.1
5
+
1
6
  ## 0.2.0 (2023-01-29)
2
7
 
3
8
  - Added `language` option
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015-2023 Andrew Kane
1
+ Copyright (c) 2015-2024 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -4,9 +4,7 @@ Generate autocomplete suggestions based on what your users search
4
4
 
5
5
  :tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource)
6
6
 
7
- Autosuggest 0.2 was recently released! See [how to upgrade](#upgrading)
8
-
9
- [![Build Status](https://github.com/ankane/autosuggest/workflows/build/badge.svg?branch=master)](https://github.com/ankane/autosuggest/actions)
7
+ [![Build Status](https://github.com/ankane/autosuggest/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/autosuggest/actions)
10
8
 
11
9
  ## Installation
12
10
 
@@ -205,7 +203,7 @@ end
205
203
 
206
204
  ### 0.2.0
207
205
 
208
- Suggestions are now filtered by default, and only the query and score are returned. To get all queries and fields, use:
206
+ Suggestions are now filtered by default, and only the query and score are returned. Get all queries and fields with:
209
207
 
210
208
  ```ruby
211
209
  autosuggest.suggestions(filter: false)
@@ -10,8 +10,8 @@ module Autosuggest
10
10
  @profane_words = {}
11
11
  @concept_tree = {}
12
12
  begin
13
- @stemmer = Lingua::Stemmer.new(language: language)
14
- rescue Lingua::StemmerError
13
+ @stemmer = Mittens::Stemmer.new(language: language)
14
+ rescue ArgumentError
15
15
  raise ArgumentError, "Language not available"
16
16
  end
17
17
  # TODO take language into account for profanity
@@ -1,3 +1,3 @@
1
1
  module Autosuggest
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
data/lib/autosuggest.rb CHANGED
@@ -3,7 +3,7 @@ require "set"
3
3
  require "yaml" # for obscenity
4
4
 
5
5
  # dependencies
6
- require "lingua/stemmer"
6
+ require "mittens"
7
7
  require "obscenity"
8
8
 
9
9
  # modules
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autosuggest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-30 00:00:00.000000000 Z
11
+ date: 2024-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: ruby-stemmer
14
+ name: mittens
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -65,14 +65,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '2.7'
68
+ version: '3.1'
69
69
  required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubygems_version: 3.4.1
75
+ rubygems_version: 3.5.9
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: Generate autocomplete suggestions based on what your users search