Skip to content

Commit

Permalink
Fixing relative path to cvs file
Browse files Browse the repository at this point in the history
  • Loading branch information
javiervidal committed Dec 22, 2014
1 parent f84817a commit eb33be2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 0 additions & 2 deletions lib/mic/mic.rb
Expand Up @@ -2,8 +2,6 @@ class Mic

require 'csv'

FILE = 'files/ISO10383.csv'

class << self

def where(options = {})
Expand Down
6 changes: 5 additions & 1 deletion lib/mic/search.rb
Expand Up @@ -4,7 +4,7 @@ class Search

def initialize
@a = []
CSV.foreach(Mic::FILE) do |row|
CSV.foreach(file) do |row|
h = {}
h[:mic] = row[2]
h[:acronym] = row[6]
Expand All @@ -24,6 +24,10 @@ def select_by(symbol, string, include_segments)
@a.select{ |m| m[symbol] =~ Regexp.new(string, 'i') }
end

def file
File.expand_path('../../files/ISO10383.csv', File.dirname(__FILE__))
end

end

end
2 changes: 1 addition & 1 deletion lib/mic/version.rb
@@ -1,3 +1,3 @@
class Mic
VERSION = "1.0.1"
VERSION = "1.0.2"
end

0 comments on commit eb33be2

Please sign in to comment.