{"id":15512156,"url":"https://github.com/npezza93/interval_inflector","last_synced_at":"2025-04-24T05:47:09.014Z","repository":{"id":65908859,"uuid":"602176494","full_name":"npezza93/interval_inflector","owner":"npezza93","description":"Converts a duration object into a pretty interval string. Ex: 1.year =\u003e yearly","archived":false,"fork":false,"pushed_at":"2023-02-15T17:21:25.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T05:47:02.956Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/npezza93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-15T16:53:19.000Z","updated_at":"2023-03-19T17:43:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"468031a6-fff3-4259-a0ab-62875a69edfb","html_url":"https://github.com/npezza93/interval_inflector","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"45f52a64448d4093d029bbd891070aac906ac8c2"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npezza93%2Finterval_inflector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npezza93%2Finterval_inflector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npezza93%2Finterval_inflector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npezza93%2Finterval_inflector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npezza93","download_url":"https://codeload.github.com/npezza93/interval_inflector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250573343,"owners_count":21452345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T09:53:29.105Z","updated_at":"2025-04-24T05:47:08.997Z","avatar_url":"https://github.com/npezza93.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# interval_inflector\n\nAdds support for stringifying ActiveSupport::Duration objects into intervals\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n    $ bundle add interval_inflector\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    $ gem install interval_inflector\n\n## Usage\n\n```ruby\n# to_interval taks an optional `in` argument to convert\n# the duration into. Defaults to the current interval\n1.minute.to_interval(in: :seconds) #=\u003e \"every 60 seconds\"\n1.year.to_interval(in: :months) #=\u003e \"every 12 months\"\n6.months.to_interval #=\u003e \"every 6 months\"\n1.minute.to_interval #=\u003e \"every minute\"\n1.month.to_interval #=\u003e \"monthly\"\n1.year.to_interval #=\u003e \"yearly\"\n1.week.to_interval #=\u003e \"weekly\"\n1.day.to_interval #=\u003e \"daily\"\n1.hour.to_interval #=\u003e \"hourly\"\n1.second.to_interval #=\u003e \"every second\"\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/npezza93/interval_inflector. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/npezza93/interval_inflector/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the IntervalInflector project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/npezza93/interval_inflector/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpezza93%2Finterval_inflector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpezza93%2Finterval_inflector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpezza93%2Finterval_inflector/lists"}