Add require forwardable in havest_record_collection model #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Im getting an error
NameError (uninitialized constant Harvesting::Models::HarvestRecordCollection::Forwardable)
when Irequire 'harvesting'
after installing the gem in both2.4.1
and2.5.1
. I have torequire 'forwardable'
first and then my error goes away. This seems like a side effect based on order ofrequire
and seems to be masked in the build system/test suite since all the tests are passing. Im not sure the best approach is to adding arequire
side effect check to Travis.Detail are below, let me know what you think.
Checking this off
master@54778805333dd22e4d44752ea1341aab091d6ade
and running the latest version of the docker container defined in this repo (ruby2.4.1
):Ruby
2.5.1
:If then I specify
require forwardable
beforerequire harvesting
it works (ruby2.4.1
):Briefly investigating the travis tests passing regardless of the above error, it seems like the problem could be due to the
rspec_helper.rb
loading all bundler dependencies beforeharvesting
: https://github.com/ombulabs/harvesting/blob/master/spec/spec_helper.rb#L1 which would loadrequire 'http'
amongst others defined in theharvesting.gemspec
. Im able to repeat this behavior running:Fix
Leveraging the changes in this PR I no longer get the
NameError (uninitialized constant Harvesting::Models::HarvestRecordCollection::Forwardable)
error against2.4.1
or2.5.1
. Verified via the docker container from this repo (ruby2.4.1
):Version Info
2.4.1
2.5.1