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

Unifyed task names to runtime task names #13

Merged
merged 1 commit into from May 31, 2020
Merged

Unifyed task names to runtime task names #13

merged 1 commit into from May 31, 2020

Conversation

Shigeyuki-fukuda
Copy link
Contributor

@Shigeyuki-fukuda Shigeyuki-fukuda commented May 30, 2020

Problem

The generated task name is not consistent with the runtime task name.
Therefore, I don't think it can be done intuitively.

For example

generated task name: 20200530_foo_bar.rake

$ bin/rails generate oneshot foo_bar
Running via Spring preloader in process 93693
      create  lib/tasks/oneshot/20200530_foo_bar.rake

runtime task name: foo_bar_20200530

$ bin/rake oneshot:foo_bar_20200530

Solution

I unifyed task names to runtime task names.

For example

generated task name: foo_bar_20200530.rake

$ bin/rails generate oneshot foo_bar
Running via Spring preloader in process 93857
      create  lib/tasks/oneshot/foo_bar_20200530.rake

runtime task name: foo_bar_20200530

$ bin/rake oneshot:foo_bar_20200530

Spec

I checked the file generated by the modified source and modified the RSpec.

@s-osa
Copy link
Owner

s-osa commented May 30, 2020

Thank you for the pull request 😄

I completely agree with the importance of consistency. But the date prefix of filenames is also a vital interface to glance files.

How about changing task names instead of filenames?

@Shigeyuki-fukuda
Copy link
Contributor Author

Shigeyuki-fukuda commented May 31, 2020

@s-osa

Thank you for your reply.

How about changing task names instead of filenames?

I also agree with that opinion:ok_hand:
I changed my policy in 497d34a .

@s-osa
Copy link
Owner

s-osa commented May 31, 2020

The change is LGTM. Thanks a lot.

Could you summarize changes into one commit?
After you squash the commits, I'd like to merge and release the new version.

@Shigeyuki-fukuda
Copy link
Contributor Author

@s-osa

The change is LGTM. Thanks a lot.

Thank you, too 😄 .

Could you summarize changes into one commit?
After you squash the commits, I'd like to merge and release the new version.

I summarized changes into one commit.
19d3756

@s-osa s-osa merged commit 20476c1 into s-osa:master May 31, 2020
@Shigeyuki-fukuda
Copy link
Contributor Author

@s-osa
Thank you for your review 🙏

@s-osa s-osa mentioned this pull request May 31, 2020
@s-osa
Copy link
Owner

s-osa commented May 31, 2020

I've released the new version, including this change. Please try it 😉
https://rubygems.org/gems/oneshot_task_generator/versions/0.2.0

@Shigeyuki-fukuda Shigeyuki-fukuda deleted the unify_task_names_to_runtime_task_names branch June 20, 2020 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants