lib/oembed_proxy/embedly.rb in oembed_proxy-0.1.1 vs lib/oembed_proxy/embedly.rb in oembed_proxy-0.1.2
- old
+ new
@@ -11,10 +11,10 @@
def initialize(embedly_key)
# Import the expected embed.ly providers.
@pattern_hash = {}
@embedly_key = embedly_key
- File.open(File.expand_path('../../providers/embedly_patterns.def', __FILE__), 'r') do |f|
+ File.open(File.expand_path('../providers/embedly_patterns.def', __dir__), 'r') do |f|
f.each do |line|
regex = Utility.clean_pattern(line)
@pattern_hash[regex] = EMBEDLY_URL
end
end