hunspell 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/example.rb +1 -1
  4. data/extconf.rb +12 -3
  5. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d322658793cc7c2808595f0dc0a2d8100ab54e6
4
- data.tar.gz: 33a9631865e9e08398d3dc5d0c1aaae67a6e7913
3
+ metadata.gz: c308045f23e29df48f5e8a7809ed37c93446b332
4
+ data.tar.gz: 5d4c52272cfc819bf32db405d8259f502af55898
5
5
  SHA512:
6
- metadata.gz: 59efb47ef479d151348782d699415a970ba5dac92a72aaa91e07f3598eeb13068a4bf539d4b337d05cc410c2ed699f1dcda7573ccbe368db874bbb334897b427
7
- data.tar.gz: 45b030ae8528f0933c0db4b2927092c5bbbc28274b3742fb79ff8d5a970090fe65b1c03d0db79638057507c0ca3c4e3a9cd4c3c46b17f9c8abdc471ffae5ad20
6
+ metadata.gz: 1d369b2961a256a2c675c63c69bba9e97aad5676e3b64b61f82b2d4ad6c2bcf9854568d302422367308c08e050e97cd84851554610ba60ee392d9e35d9ad314d
7
+ data.tar.gz: 062a7e9cf35f56d23a0e2918ced11e1e9da6ca83d1164dfca420943636b1e46ae303bcb018cfdf59c64db0ee0cd502d10b56751b999521c5e7f5c5e52b1e4372
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Hunspell
1
+ # Hunspell [![Build Status](https://travis-ci.org/segabor/Hunspell.svg?branch=master)](https://travis-ci.org/segabor/Hunspell)
2
2
 
3
3
  Ruby interface to hunspell spell checker
4
4
  Copyright 2007, Gabor SEBESTYEN
@@ -57,7 +57,7 @@ require "Hunspell" # inject Hunspell class to Ruby namespace
57
57
  # instantiate Hunspell with Hungarian affix and dictionary files
58
58
  #
59
59
 
60
- sp = Hunspell.new("hu.aff", "hu.dic")
60
+ sp = Hunspell.new("hu_HU.aff", "hu_HU.dic")
61
61
 
62
62
  # spell check Hungarian word 'ablak' (window) => true
63
63
  #
data/example.rb CHANGED
@@ -4,7 +4,7 @@ require "Hunspell" # inject Hunspell class to Ruby namespace
4
4
 
5
5
  # instantiate Hunspell with Hungarian affix and dictionary files
6
6
  #
7
- sp = Hunspell.new("hu.aff", "hu.dic")
7
+ sp = Hunspell.new("hu_HU.aff", "hu_HU.dic")
8
8
 
9
9
  # spell check Hungarian word 'ablak' (window) => true
10
10
  #
data/extconf.rb CHANGED
@@ -19,13 +19,22 @@ LIB_DIRS = [
19
19
  '/usr/lib'
20
20
  ]
21
21
 
22
+ HUNSPELL_TEST_HEADERS = ['hunspell/hunspell.h']
23
+ HUNSPELL_TEST_FUNCTION = 'Hunspell_create'
22
24
 
23
- dir_config('hunspell-1.3', HEADER_DIRS, LIB_DIRS)
25
+ # Hunspell libraries to test for, in order of precedence
26
+ HUNSPELL_LIBRARIES = ['hunspell-1.5', 'hunspell-1.4', 'hunspell-1.3']
24
27
 
25
- if have_library('hunspell-1.3', 'Hunspell_create', ['hunspell/hunspell.h'])
28
+ HUNSPELL_LIBRARIES.each do |library|
29
+ dir_config(library, HEADER_DIRS, LIB_DIRS)
30
+ end
31
+
32
+ # Link with first matching library
33
+ if HUNSPELL_LIBRARIES.any? { |library| have_library(library, HUNSPELL_TEST_FUNCTION, HUNSPELL_TEST_HEADERS) }
26
34
  then
27
35
  create_makefile('Hunspell')
28
36
  else
29
- puts('Missing hunspell library')
37
+ STDERR.puts('Missing hunspell library')
38
+ STDERR.puts('Supported versions: ' + HUNSPELL_LIBRARIES.join(' '))
30
39
  end
31
40
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hunspell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gábor SEBESTYÉN
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-07 00:00:00.000000000 Z
11
+ date: 2016-12-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Hunspell is an easy native Ruby interface to the famous Hunspell spell checker
@@ -36,21 +36,21 @@ post_install_message:
36
36
  rdoc_options: []
37
37
  require_paths:
38
38
  - lib
39
- - .
39
+ - "."
40
40
  required_ruby_version: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - '>='
42
+ - - ">="
43
43
  - !ruby/object:Gem::Version
44
44
  version: '0'
45
45
  required_rubygems_version: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - '>='
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0'
50
50
  requirements:
51
51
  - hunspell 1.3 or newer
52
52
  rubyforge_project:
53
- rubygems_version: 2.4.8
53
+ rubygems_version: 2.5.2
54
54
  signing_key:
55
55
  specification_version: 4
56
56
  summary: Ruby interface to hunspell spell checker