Skip to content

Reduce number of requires#92

Open
sethherr wants to merge 4 commits intomasterfrom
revise_requires
Open

Reduce number of requires#92
sethherr wants to merge 4 commits intomasterfrom
revise_requires

Conversation

@sethherr
Copy link
Contributor

No description provided.

Copy link
Contributor

@lmarburger lmarburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a ruby file uses a library, I'm all for having it explicitly require it. Otherwise, that file can only run by using an opaque loading mechanism where the libs required globally are known.

require 'rubygems'
require 'rake'
require 'date'
require File.expand_path('../lib/papertrail/version', __FILE__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lib/ should be in the path when this is run so "papertrail/version" should be all that's necessary to require.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. Doesn't work 😢

@sethherr
Copy link
Contributor Author

@lmarburger I waffled on what made more sense with requiring papertrail, and your comment makes me think maybe I chose the wrong course. Would it be better to put the require papertrail in each of the cli ruby files rather than the bin files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants