google_spell_checker 0.1.0 → 0.2.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
  SHA1:
3
- metadata.gz: 6637d2b991d84b685bc8d64ceb521640672f3364
4
- data.tar.gz: b2224570f1539679694f70954524b28e1f78faa5
3
+ metadata.gz: 5fb22fc9d237e6512c1f12e03d89bc5af244ca08
4
+ data.tar.gz: 0e56310d8ee8c1f6d90ba870c737719e43d939ec
5
5
  SHA512:
6
- metadata.gz: 211b76f40429b7b35b1eebada985395cc2c0524e5647d42d726c2fc61b84d53ae79713fdd89e3e3ccd201055ffbabb45d1b9a50eac7a4bd0f25064b1884b0a9e
7
- data.tar.gz: 9b4aa6d77e0ec0116d54325c2aa97ea9d82ad9ccd6cbf002a3c0937bae775df9640acadf00c12e82f736161d523e2b421b17ac3962d3fe227f3855433f5ceb91
6
+ metadata.gz: 01788cac9769c25eee1628adc769c5f1a93dd870bd0c31b3436e9a6205c26a0c9685def75a2a55a5d87fa466b6afb89757b5bc88e2c5904cf21694c7eea99070
7
+ data.tar.gz: 718e93471c116cd68d452a7a469d3c9c3fad07a59e65c69dcc2191cd3e059bb4e3d5fb5db1c20205fcfa34256d0a00329b673bcac41946d7405c150c7e0a2edb
data/README.md CHANGED
@@ -9,16 +9,33 @@ This gem is using google to check word's spelling.
9
9
  ###Installation
10
10
 
11
11
  ```
12
- gem 'google_spell_checker','0.0.0'
12
+ gem 'google_spell_checker','0.1.0'
13
13
  ```
14
14
 
15
15
  and run the `bundle` command.
16
16
 
17
- ###Examples
17
+ ####Examples
18
18
 
19
19
  ```
20
20
  GoogleSpellChecker.check 'take m to your heatr'
21
- => "take <em>me</em> to your <em>heart</em>"
21
+ => "take <b><i>me</i></b> to your <b><i>heart</i></b>"
22
22
  ```
23
23
 
24
24
  If there is no incorrect word, it will output void character.
25
+
26
+ ### Using 'google.com.hk'
27
+
28
+ If you can access fluently "google.com.hk" rather than "google.com", you can run the following generator command:
29
+
30
+ ```
31
+ % rails g google_spell_checker:config
32
+ ```
33
+
34
+ Then uncommented the third line of the generated file 'config/initializers/google_spell_checker_config.rb'.
35
+
36
+ ####Examples
37
+
38
+ ```
39
+ GoogleSpellChecker.check 'take m to your heatr'
40
+ => "take <em>me</em> to your <em>heart</em>"
41
+ ```
@@ -13,7 +13,6 @@ module GoogleSpellChecker
13
13
  class Configuration
14
14
  include ActiveSupport::Configurable
15
15
  config_accessor :using_hk
16
- config.using_hk = false
17
16
  end
18
17
 
19
18
  def param_name
@@ -24,4 +23,8 @@ module GoogleSpellChecker
24
23
  writer, line = 'def param_name=(value); config.param_name = value; end', __LINE__
25
24
  singleton_class.class_eval writer, __FILE__, line
26
25
  class_eval writer, __FILE__, line
26
+
27
+ configure do |config|
28
+ config.using_hk = false
29
+ end
27
30
  end
@@ -1,3 +1,3 @@
1
1
  module GoogleSpellChecker
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_spell_checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Ji