words 0.4.2 → 0.4.3

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.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/examples.rb +2 -2
  3. data/lib/words.rb +3 -2
  4. data/words.gemspec +1 -1
  5. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
@@ -7,7 +7,7 @@ require 'lib/words.rb'
7
7
 
8
8
  if __FILE__ == $0
9
9
 
10
- wordnet = Words::Wordnet.new :tokyo
10
+ wordnet = Words::Wordnet.new #:tokyo
11
11
 
12
12
  puts wordnet.connected?
13
13
  wordnet.close!
@@ -52,4 +52,4 @@ if __FILE__ == $0
52
52
 
53
53
  wordnet.close!
54
54
 
55
- end
55
+ end
@@ -12,7 +12,7 @@ module Words
12
12
  # We identify each wordnet connector installed and there paths
13
13
  SUPPORTED_CONNECTIORS = Dir[File.join(File.dirname(__FILE__),'wordnet_connectors','*_wordnet_connection.rb')].inject(Hash.new) { |connectors, connection_file| connectors[ File.basename(connection_file).split('_').first.to_sym ] = connection_file; connectors }
14
14
  # An array of tippical wordnet install locations (if you have a standard install somewhere else please open as an issue in github so we can improve!)
15
- DEFAULT_WORDNET_LOCATIONS = ['/usr/share/wordnet', '/usr/local/share/wordnet', '/usr/local/WordNet-3.0', '/opt/WordNet-3.0', '/opt/wordnet', '/opt/local/share/WordNet-3.0/', '/usr/local/Cellar/wordnet/3.0']
15
+ DEFAULT_WORDNET_LOCATIONS = ['/usr/share/wordnet/', '/usr/local/share/wordnet/', '/usr/local/WordNet-3.0/', '/opt/WordNet-3.0/', '/opt/wordnet/', '/opt/local/share/WordNet-3.0/', '/usr/local/Cellar/wordnet/3.0/']
16
16
 
17
17
  # Exception to indicate that the wordnet connector specified is not currently available/supported.
18
18
  class BadWordnetConnector < RuntimeError; end
@@ -157,8 +157,9 @@ module Words
157
157
  end
158
158
 
159
159
  base_dirs.each do |dir|
160
- ["", "dict"].each do |sub_folder|
160
+ ["", "dict/"].each do |sub_folder|
161
161
  path = Pathname.new(dir + sub_folder)
162
+ puts path
162
163
  return path if (path + "data.noun").exist?
163
164
  end
164
165
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{words}
8
- s.version = "0.4.2"
8
+ s.version = "0.4.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Roja Buck"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 2
9
- version: 0.4.2
8
+ - 3
9
+ version: 0.4.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Roja Buck