-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,15 +110,14 @@ def as_klass | |
private | ||
|
||
def load_gem_copy(files) | ||
puts "Requiring copy of #{gem_name} with: #{files.inspect}" if verbose | ||
# These are absolute file paths, so they can use `require` | ||
files.each do |filepath| | ||
# begin | ||
# But files required here may not load their own internal files properly if they are still using `require`. | ||
# Since Ruby 2.2, best practice for ruby libraries is to use require_relative for internal files, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
pboling
Author
Owner
|
||
# and require for external files and dependencies. | ||
# Ref: https://github.com/panorama-ed/memo_wise/issues/349 | ||
require filepath | ||
# rescue LoadError => e | ||
# puts file.to_s | ||
# puts tempfile.path | ||
# puts e.class | ||
# puts e.message | ||
# end | ||
end | ||
end | ||
|
||
|
is there a reference to this best practice?