onfleet / ruby-onfleet

Onfleet API wrapper in Ruby
MIT License
2 stars 2 forks source link

Reference to local file in configuration #6

Closed jonathandean closed 1 year ago

jonathandean commented 1 year ago

In https://github.com/onfleet/ruby-onfleet/blob/main/lib/configuration.rb#L8 there is a reference to @danmenza 's local machine project root. That gives this obvious error when attempted to be used on any other system:

gems/ruby-onfleet-1.0.2/lib/configuration.rb:8:in `read': No such file or directory @ rb_sysopen - /Users/danmenza/onfleet/code/api_wrappers/ruby-onfleet/package.json (Errno::ENOENT)
jonathandean commented 1 year ago

The correct line there would probably be:

file = File.read(File.expand_path("../../package.json", __FILE__))