{"id":28435325,"url":"https://github.com/yegor256/ellipsized","last_synced_at":"2025-06-30T13:32:40.160Z","repository":{"id":294584577,"uuid":"987190788","full_name":"yegor256/ellipsized","owner":"yegor256","description":"A Ruby function that replaces a piece of text with ellipsis in order to make it fit into certain number of characters","archived":false,"fork":false,"pushed_at":"2025-06-29T04:07:36.000Z","size":50,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T05:19:14.747Z","etag":null,"topics":["ellipsis","ruby","ruby-gem","string-manipulation"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/ellipsized","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/yegor256.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2025-05-20T17:54:48.000Z","updated_at":"2025-06-29T04:07:19.000Z","dependencies_parsed_at":"2025-06-20T09:21:17.389Z","dependency_job_id":"54e4c719-9142-42ed-927a-266dc4f2a5dc","html_url":"https://github.com/yegor256/ellipsized","commit_stats":null,"previous_names":["yegor256/ellipsized"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/yegor256/ellipsized","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fellipsized","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fellipsized/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fellipsized/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fellipsized/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yegor256","download_url":"https://codeload.github.com/yegor256/ellipsized/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fellipsized/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262539880,"owners_count":23325964,"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":["ellipsis","ruby","ruby-gem","string-manipulation"],"created_at":"2025-06-05T20:08:07.496Z","updated_at":"2025-06-30T13:32:40.108Z","avatar_url":"https://github.com/yegor256.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Adds a `.ellipsized` method to `String`\n\n[![DevOps By Rultor.com](https://www.rultor.com/b/yegor256/ellipsized)](https://www.rultor.com/p/yegor256/ellipsized)\n[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)\n\n[![rake](https://github.com/yegor256/ellipsized/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/ellipsized/actions/workflows/rake.yml)\n[![PDD status](https://www.0pdd.com/svg?name=yegor256/ellipsized)](https://www.0pdd.com/p?name=yegor256/ellipsized)\n[![Gem Version](https://badge.fury.io/rb/ellipsized.svg)](https://badge.fury.io/rb/ellipsized)\n[![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/ellipsized.svg)](https://codecov.io/github/yegor256/ellipsized?branch=master)\n[![Yard Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://rubydoc.info/github/yegor256/ellipsized/master/frames)\n[![Hits-of-Code](https://hitsofcode.com/github/yegor256/ellipsized)](https://hitsofcode.com/view/github/yegor256/ellipsized)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/ellipsized/blob/master/LICENSE.txt)\n\nIt makes a string fit into a required length by replacing\npart of it in the middle with an [ellipsis]:\n\n```ruby\nrequire 'ellipsized'\nputs 'Hello, dear world!'.ellipsized(16)\n```\n\nPrints:\n\n```text\nHello, ...world!\n```\n\nYou can also specify what to use to fill the gap:\n\n```ruby\nputs 'How are you doing?'.ellipsized(14, '.. skip ..')\n```\n\nPrints:\n\n```text\nHo.. skip ..g?\n```\n\nYou can also specify alignment:\n\n```ruby\nputs 'How are you doing?'.ellipsized(14, '.. skip ..', :left)\n```\n\nPrints:\n\n```text\n.. skip ..ing?\n```\n\nThat's it.\n\n## How to contribute\n\nRead\n[these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).\nMake sure your build is green before you contribute\nyour pull request. You will need to have\n[Ruby](https://www.ruby-lang.org/en/) 3.0+ and\n[Bundler](https://bundler.io/) installed. Then run:\n\n```bash\nbundle update\nbundle exec rake\n```\n\nIf it's clean and you don't see any error messages, submit your pull request.\n\n[ellipsis]: https://en.wikipedia.org/wiki/Ellipsis\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fellipsized","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyegor256%2Fellipsized","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fellipsized/lists"}