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

findJobByRegex not searching comments #3

Closed
baskettcase opened this issue Jul 6, 2015 · 7 comments
Closed

findJobByRegex not searching comments #3

baskettcase opened this issue Jul 6, 2015 · 7 comments

Comments

@baskettcase
Copy link

Your example shows that findJobByRegex searches comments, but looking at your code it looks like it only searches the taskCommandLine. Could we have it search the comments also? and/or another function that uses stristr() some of us really hate Regex because we're not very good at it! :) It's also hard for a custom search for a client since they are usually even worse at searching by Regex :)

Thanks!

@TiBeN
Copy link
Owner

TiBeN commented Jul 6, 2015

Hi,
Thanks for report
You are right the regex was matched against the taskCommandLine property only.
I just fixed it by doing the match against the whole generated crontab line.
As a proof i added a test case which uses the example in the documentation.

About the second point,
Regex have been choosen for the cronjob query against the repository because they are powerful and pretty universal (and not so hard! If you plan to become a confirmed developper you should definitively try to master them!).
This library is low level focused. It's up to you to add a layer which translates a search query from the users into a regex string like you translate and protect a user search into a SQL query.

@baskettcase
Copy link
Author

Ok thanks, I appreciate the quick response!

battis pushed a commit to battis/autocrontabjob that referenced this issue Aug 11, 2015
Apparently [this](TiBeN/CrontabManager#3) is still an issue.
@TiBeN TiBeN closed this as completed Dec 8, 2015
@LaloLoop
Copy link

Hi sorry for commenting on this closed issue, but it's kinda related with it.
I started using this library and it's working great, except for the new feature/correction added in the latest commit (fbc9409).
When I require/ install the latest version (1.2.0), composer is pulling the what seems to be the 1.2.0v, and it's reported like so in the console. The problem is, that while inspecting the code, and the composer lock file, the version downloaded was the one pointed by the e0e12c9 commit.
I'm fairly new to composer and PHP in general, so I am not sure if I am doing something wrong while requiring the dependency.
Even when specifying 1.2.0 as the version on the composer.json file it still points to the older version.
Thanks for all the work you put on this library.
Greetings.

@TiBeN
Copy link
Owner

TiBeN commented Aug 27, 2016

Hi,
you are right, and sorry, at the time i fixed this issue i forgot to create a new version tag so theses commits are only on the master branch. I'll do this asap.

@TiBeN TiBeN reopened this Aug 27, 2016
@TiBeN
Copy link
Owner

TiBeN commented Aug 27, 2016

Ok i published the version v1.2.1 and updated packagist so you should be able to use this version in your composer.json
I wait for your confirmation before closing this issue.

@LaloLoop
Copy link

Thank you for the quick response, I just updated my composer.json to download again the version as it's described in the README. It is working correctly now.
The only non matching thing with the repo is the CHANGELOG that was downloaded by composer, it says the last version is 1.3.0, instead of 1.2.1 (it's pointing to 8982726 instead of 1560d21) but I'll let you decide if it it's worth modifying it or wait until you make another change. I think it's because of the tag only having 1 commit instead of the last 2 you made.
The code is in sync with the last feature you added, so I think this can be closed.
Thank you again and Greetings :) 👍

@TiBeN
Copy link
Owner

TiBeN commented Aug 28, 2016

Yes i first decided to tag this version 1.3.0, but i thought it was only a bugfix release so i taggued it 1.2.1 but forgot to make the change on the changelog before creating the version! The last commit fixes only the Changelog version typo so you are in sync with the last stable version.
Thanks .

@TiBeN TiBeN closed this as completed Aug 28, 2016
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

No branches or pull requests

3 participants