-
Notifications
You must be signed in to change notification settings - Fork 14
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
Skip tasks v0.4.0 #16
base: master
Are you sure you want to change the base?
Changes from all commits
891a39d
be4fef8
6d74251
e9e2d67
c243db2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,12 @@ describe Sam do | |
Container.tasks.should eq(["db:schema", "db:with_argument"]) | ||
end | ||
end | ||
context "with arguments" do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please add an empty line between blocks |
||
it "ignores dependencies that have a ~" do | ||
Sam.process_tasks(["db:schema:2", "~db:schema:1", "f2=2"]) | ||
Container.tasks.should eq(["db:db:migrate"]) | ||
end | ||
end | ||
end | ||
end | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ module Sam | |
|
||
# Launch current task. Prerequisites are invoked first. | ||
def call(args : Args) | ||
return if args.raw.find {|x| "~#{path}" == x } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's grep all tasks that need to be skipped in P.S. Also add an empty line after guard clause |
||
@invoked = true | ||
case @block.arity | ||
when 0, 1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's maybe make it a bit more clear:
To skip a task or prerequisite task specify it's path with "~" prefix