Skip to content

Conversation

@jamesoneill997
Copy link
Contributor

This PR allows for users to identify gems that haven't been updated in a defined amount of time with an --older-than flag. This is useful because it can be added to automated checks during CI to help developers identify gems that have been abandoned or are no longer actively maintained.

Example output:

jamesoneill@Jamess-MacBook-Pro:~/gem_dating(add-min-date-arg⚡) » gem_dating --older-than=2y
NAME | VERSION | DATE      
-----|---------|-----------
rake | 13.3.0  | 1980-01-02
jamesoneill@Jamess-MacBook-Pro:~/gem_dating(add-min-date-arg⚡) » gem_dating --older-than=1y
NAME     | VERSION | DATE      
---------|---------|-----------
rake     | 13.3.0  | 1980-01-02
m        | 1.6.2   | 2023-09-17
mocktail | 2.0.0   | 2023-08-24
jamesoneill@Jamess-MacBook-Pro:~/gem_dating(add-min-date-arg⚡) » gem_dating --older-than=1d
NAME     | VERSION | DATE      
---------|---------|-----------
rake     | 13.3.0  | 1980-01-02
minitest | 5.25.5  | 2025-03-12
standard | 1.50.0  | 2025-05-13
m        | 1.6.2   | 2023-09-17
mocktail | 2.0.0   | 2023-08-24

I hope that you don't mind me creating this PR out of the blue, and I hope that you find it useful. I'm happy to make any changes that you think are suitable.

Thanks in advance!

@jamesoneill997
Copy link
Contributor Author

Hey @Daniel-N-Huss // @stevenjackson ,

Appreciate that this gem hasn't been bumped in a little bit so I'm not sure if you're actively maintaining/accepting PRs currently, but would be great to get a review and see what your thoughts are if you're open to changes.

@Daniel-N-Huss
Copy link
Collaborator

👋 Hey @jamesoneill997!

I've got it on my list to take a look at this. I should have a bit of time in the next week to put some eyes here. Much appreciated!

@jamesoneill997
Copy link
Contributor Author

Thanks Daniel, much appreciated 🙏😁

Daniel-N-Huss and others added 5 commits June 12, 2025 17:16
Because we're not really filtering until after we get specs back from our query, I think moving this to change what Results we're returned is a more natural fit.

Co-Authored-By: James O'Neill <36668255+jamesoneill997@users.noreply.github.com>
I'm going to pack this up with some other changes for the next bump
@Daniel-N-Huss
Copy link
Collaborator

@jamesoneill997 I appreciate the thoughtful addition! I wouldn't have considered this a CI tool, so I think it's neat you want to apply it that way.

Couple notes about the poking I did. I'll merge with these changes, but am always happy to discuss and fix forward.

  • Your regex for parsing the time unit and amount was novel, and a decent solution! I personally try to avoid regexes if there's a more deterministic approach. In part, I find regex patterns can be a bit hard to reason about, but that may be my own preference more than anything.
  • At first glance, I think adding the filter into the same place as fetching from RubyGems is sensible. Though, we're not actually changing anything about our query and the filtering is all happening in our gem. So I think shifting that over to our Result class helps clarify that we're fully responsible for filtering on our side.
  • There wasn't anything out of place with how you were parsing the new argument. I've had a couple items on my todo list that I'd like to add in, and will need to extend the ability to parse args so I'm tackling that as part of your changes.
  • I like the build_mock_spec helper you added!
  • and I appreciate you improving test coverage with your testing unknown default returns.
  • I'm not going to version bump yet, there's a couple other changes I'd like to add before I bundle and release the next version; I'll get cracking on that release!

💚 Thanks for taking the time.

@Daniel-N-Huss Daniel-N-Huss merged commit e852453 into testdouble:main Jun 13, 2025
@jamesoneill997
Copy link
Contributor Author

Thanks very much for that @Daniel-N-Huss , I appreciate the input and detailed response!

It's a nice gem, you've done a great job with it. I'm more than happy to contribute on any of the features that you're looking to add if it's any help.

Looking forward to seeing the next release, all the best! 😁

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.

2 participants