-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add rake task for style and tests #167
Conversation
58f3306
to
0763d36
Compare
@rahul2240 there is quite a lot of PRs in Trollolo at the moment, so it may take some days until I have time to review this. 😉 |
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.
@rahul2240 thanks for your PR. 💐 I think you misunderstood the issue. It is about having a single task that run what is run in Travis 😉
Rakefile
Outdated
@@ -10,3 +10,20 @@ namespace :gem do | |||
system 'gem build trollolo.gemspec' | |||
end | |||
end | |||
|
|||
# rake task for rspec and rubocop | |||
# rake -T (for rake tasks) |
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.
why is this comment needed here? 😕
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.
I will remove it.
|
||
task default: %i[rubocop spec] | ||
|
||
desc 'Run tests' |
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.
@rahul2240 the issue is about creating a single rake task that run both the tests and rubocop. 😉
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.
@Ana06 using rake will do both the tasks (test,style check) if there is some offence then only it will not complete.
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.
@rahul2240 what do you mean with using rake
? what command would you run?
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.
@Ana06 I am using only "rake" as a command and it is doing both the task i.e testing as well as style checking.
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.
@rahul2240 and what happens if we add another unrelated rake task in the future?
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.
@Ana06 Right now test and style check is set as default for rake command if unrelated rake task is added in future then we will have to use (rake taskname) to run it.
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.
@Ana06 If I am doing it wrong please let me know I am ready to start again 😄
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.
@rahul2240 if we add a task in the future you will have to run rake taskname and then you can not run both things at the same time. We want a single rake task, not two, that runs everything that Travis run.
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.
@Ana06 Ok now I got it. Cann't we add that task to default? so that it runs automatically with rake command, Or we need a more simpler method?
Rakefile
Outdated
|
||
desc 'Run rubocop' | ||
task :rubocop do | ||
RuboCop::RakeTask.new |
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.
this is not including the same options documented in the contributing guide and used in Travis. It should be the same.
031f872
to
4de2f5f
Compare
Instead of remembering all the commands it would be nice to have rake task to run tests and style checkers closes openSUSE#164
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.
You should not add them to the default. As already said we want a single rake task, that runs everything that Travis run.
@rahul2240 what is the state of this? do you need help? |
@Ana06 I am searching for the solution, give me some more time please. |
@Ana06 We can use namespace and add all the rake task there or in my code instead of adding it to default we can name it as "check" so that (rake check) command will run all the test.If this is not what you want then please I need your help. |
@rahul2240 what about doing it how I suggested already? We want a single rake task that runs everything that Travis run. 😉 The namespace would also work, but you don't need to complicate that much 😄 |
@rahul2240 do you need help to implement the requested changes? Do you need that I clarify something? 😃 |
@Ana06 Travis runs 2 tasks i.e 'bundle exec rubocop -D' & 'bundle exec rspec spec/unit' so what you want is in .rakefile i remove the rake tasks and target travis.yml to run those tasks locally with a single command? |
Instead of remembering all the commands it would be nice to have rake task to run tests and style checkers
closes #164