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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import custom rake tasks #320

Closed
wants to merge 1 commit into from

Conversation

@ratneshraval
Copy link
Contributor

commented Jul 29, 2019

This is a 馃悶 bug fix.

  • I've added tests (if it's a bug, feature or enhancement)
  • I've adjusted the documentation (if it's a feature or enhancement)
  • The test suite passes (run bundle exec rspec to verify this)

Summary

Loading custom rake tasks via import

Context

As of jets 2.0.0, custom tasks do no load automatically. This update should fix the issue.

Version Changes

Patch: x.x.+

@tongueroo

This comment has been minimized.

Copy link
Owner

commented Aug 4, 2019

Think import may be a keyword that is specific to the Rake DSL. Getting this error.

$ bundle exec rake -T
rake aborted!
NoMethodError: undefined method `import' for Jets::Commands::RakeTasks:Class
/home/ec2-user/tongueroo/jets/lib/jets/commands/rake_tasks.rb:21:in `block in load!'
/home/ec2-user/tongueroo/jets/lib/jets/commands/rake_tasks.rb:21:in `each'
/home/ec2-user/tongueroo/jets/lib/jets/commands/rake_tasks.rb:21:in `load!'
/home/ec2-user/tongueroo/jets/lib/jets/core.rb:51:in `load_tasks'
/home/ec2-user/environment/demo/Rakefile:2:in `<top (required)>'
/home/ec2-user/.rbenv/versions/2.5.3/bin/bundle:23:in `load'
/home/ec2-user/.rbenv/versions/2.5.3/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)
$ 

Also, the current load method works fine when testing. Here's a test:

$ jets new demo
$ cd demo
$ jets generate task feeds fetch
      create  lib/tasks/feeds.rake
$ bundle exec rake -T | grep feed
rake feeds:fetch            # TODO
$ jets --version
2.0.1

So unsure why it sounds like rake tasks don't automatically load for you. Believe it's happening, just unable to reproduce. Closing out. If you find more info that may help, please add it.

@tongueroo tongueroo closed this Aug 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.