-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Issue Closes #40. # Overview As the title states, this PR adds a Rake task for Chusaku. This allows users to use a Rake task to execute Chusaku in addition to the executable it ships with like such: ```sh bin/rake chusaku -- --dry-run ``` Loading the gem's Rake tasks is a matter of adding a one-liner to a project's `Rakefile`: ```ruby Chusaku.load_tasks ``` Users will need to update their `Gemfile` such that Chusaku isn't being required with the `require: false` flag: ```ruby # BAD gem "chusaku", require: false # GOOD gem "chusaku" ``` --------- Co-authored-by: Gareth Jones <[email protected]>
- Loading branch information
Showing
5 changed files
with
48 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
/spec/reports/ | ||
/tmp/ | ||
|
||
.ruby-version | ||
Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
chusaku_lib = File.expand_path(File.dirname(__FILE__, 2)) | ||
|
||
desc "Add route annotations to your Rails actions" | ||
task chusaku: :environment do | ||
require "#{chusaku_lib}/chusaku/cli" | ||
|
||
Chusaku::CLI.new.call(ARGV[2...] || []) | ||
end |