Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ pkg/*
*.gem
.bundle
USAGE.md
spec/vcr/*
spec/vcr/*
.idea/*
6 changes: 3 additions & 3 deletions lib/wordnik/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ def initialize
@user_agent = "ruby-#{Wordnik::VERSION}"
# Build the default set of resource names from the filenames of the API documentation
begin
api_docs_path = File.join(File.dirname(__FILE__), "../../api_docs")
@resource_names = `find #{api_docs_path} -name '*.json'`.split("\n").map {|f| f.split("/").last.sub('.json', '') }.sort
api_docs_path = File.join(File.dirname(__FILE__), '../../api_docs')
@resource_names = Dir.glob(File.join(api_docs_path, '*.json')).map {|f| f.split('/').last.sub('.json', '') }.sort
true
rescue
raise "Problem loading the resource files in ./api_docs/"
raise 'Problem loading the resource files in ./api_docs/'
end
end

Expand Down