Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discover external commands through Bundler #910

Merged
merged 1 commit into from
Jul 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/nanoc/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ def self.setup_commands
cmd = load_command_at(cmd_filename)
add_command(cmd)
end

if defined?(Bundler)
# Discover external commands through Bundler
Bundler.require(:nanoc)
Copy link
Member

Choose a reason for hiding this comment

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

What happens if no nanoc group exists? What if it is empty?

A change without tests puts me off, but at the same time, I have no idea how to test this in an automated fashion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing. That's how this Bundler API works.

end
end

# Loads site-specific commands.
Expand Down