wordnik 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/wordnik.rb +2 -10
  2. data/lib/wordnik/version.rb +1 -1
  3. metadata +1 -1
data/lib/wordnik.rb CHANGED
@@ -38,18 +38,10 @@ module Wordnik
38
38
  self.resources = {}
39
39
  self.resource_names.map do |resource_name|
40
40
  name = resource_name.underscore.to_sym # 'fooBar' => :foo_bar
41
- begin
42
- # This is the path the installed gem will want
43
- filename = File.join(ENV['GEM_HOME'], "gems", "wordnik-#{Wordnik::VERSION}", "api_docs/#{resource_name}.json")
44
- raw_data = JSON.parse(File.read(filename))
45
- rescue
46
- # This is the path the not-installed gem in development will want
47
- filename = File.join("api_docs/#{resource_name}.json")
48
- raw_data = JSON.parse(File.read(filename))
49
- end
41
+ filename = File.join(File.dirname(__FILE__), "../api_docs/#{resource_name}.json")
50
42
  resource = Resource.new(
51
43
  :name => name,
52
- :raw_data => raw_data
44
+ :raw_data => JSON.parse(File.read(filename))
53
45
  )
54
46
  self.resources[name] = resource
55
47
  end
@@ -1,3 +1,3 @@
1
1
  module Wordnik
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: wordnik
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.4
5
+ version: 0.3.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Zeke Sikelianos