runestone 2.0.0 → 2.0.1

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: 3c069ec88ae02b52e3cb0a155efe7d17b0cb3d0f9b248e74deec97cb1ed752e0
4
- data.tar.gz: 4e627b4879f88ae65b8b56090604e7e8fe0379f93f5a72b4142d76d5eabf08f7
3
+ metadata.gz: e9cc3c57faf66f24e588729cd07884658c90dac82958b8ed40e3815137d883c7
4
+ data.tar.gz: 2dbb5e6894010cede04ac56bada21d2bd0b7c49a57f7fdab9dc40b0314604e23
5
5
  SHA512:
6
- metadata.gz: 7f3f103de6f864ce9d8047232023f1c6db98867be4a7015d899c088875b830d9ee34e84c31d23b18bbdb88fc9058efe7a455891958d5adbb6b3600aed0ff4552
7
- data.tar.gz: 014ab3c81cb2c6df0473cd5ec0c65a35a6aa46a41c7f351962b26a97abc32eac74820738bcccddfa0d67b5a3b8c715d8ed5a6d1810d1099be1f134d85ac54679
6
+ metadata.gz: c11c9698ef72f31dfd3164f2e71951dc15376f6d19035c187c51be3266041f8e2ae95ee7a47ca4d9435a9d9ab1263621603960b22b014d0318b029d3809108f3
7
+ data.tar.gz: a322fa991a557625b6c8bd640b4264450426bafcd5414315c895142084a40c64c57240612f0faa72ff19c8236533e330b81530798cc1a4219de62d7e08f588e8
data/README.md CHANGED
@@ -92,6 +92,16 @@ The default dictionary that Runestone uses is the `runestone` dictionary. Which
92
92
  is the `simple` dictionary in PostgreSQL with `unaccent` to tranliterate some
93
93
  characters to the ASCII equivlent.
94
94
 
95
+ ```ruby
96
+ module RailsApplicationName
97
+ class Application < Rails::Application
98
+ config.runestone.dictionary = :runesonte
99
+ end
100
+ end
101
+ ```
102
+
103
+ If you are not using Rails, you can use the following:
104
+
95
105
  ```ruby
96
106
  Runestone.dictionary = :runesonte
97
107
  ```
@@ -102,7 +112,17 @@ Ranking can be configured to use the `normalization` paramater as described
102
112
  in the [PostgreSQL documentation][3]. The default is `16`
103
113
 
104
114
  ```ruby
105
- Runestone.dictionary = 16
115
+ module RailsApplicationName
116
+ class Application < Rails::Application
117
+ config.runestone.normalization = 1|16
118
+ end
119
+ end
120
+ ```
121
+
122
+ If you are not using Rails, you can use the following:
123
+
124
+ ```ruby
125
+ Runestone.normalization = 16
106
126
  ```
107
127
 
108
128
  [1]: http://rachbelaid.com/postgres-full-text-search-is-good-enough/
@@ -57,7 +57,7 @@ module Runestone::ActiveRecord
57
57
  def highlights(name: :default, dictionary: nil)
58
58
  dictionary ||= Runestone.dictionary
59
59
 
60
- rsettings = self.runestone_settings[name].find { |s| s.dictionary.to_s == dictionary.to_s}
60
+ rsettings = self.runestone_settings[name].find { |s| s.dictionary.to_s == dictionary.to_s }
61
61
  @highlights ||= highlight_indexes(rsettings.indexes.values.flatten.map{ |i| i.to_s.split('.') })
62
62
  end
63
63
 
@@ -14,6 +14,7 @@ class Runestone::Engine < Rails::Engine
14
14
 
15
15
  Runestone.runner = options.runner if options.runner
16
16
  Runestone.dictionary = options.dictionary if options.dictionary
17
+ Runestone.normalization = options.normalization if options.normalization
17
18
  Runestone.job_queue = options.job_queue if options.job_queue
18
19
  Runestone.typo_tolerances = options.typo_tolerances if options.typo_tolerances
19
20
  end
@@ -1,3 +1,3 @@
1
1
  module Runestone
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runestone
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Bracy