{"id":18560923,"url":"https://github.com/artichoke/ruby-file-expand-path","last_synced_at":"2025-04-10T02:31:13.418Z","repository":{"id":38991041,"uuid":"392503666","full_name":"artichoke/ruby-file-expand-path","owner":"artichoke","description":"📂 Rust port of path normalization from MRI Ruby.","archived":false,"fork":false,"pushed_at":"2025-04-01T00:25:17.000Z","size":2367,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"trunk","last_synced_at":"2025-04-01T01:28:24.058Z","etag":null,"topics":["artichoke","ffi","filesystem","ruby","ruby-language","rust","rust-crate","windows"],"latest_commit_sha":null,"homepage":"https://artichoke.github.io/ruby-file-expand-path/ruby_file_expand_path/","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/artichoke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","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}},"created_at":"2021-08-04T01:09:52.000Z","updated_at":"2025-03-03T22:56:25.000Z","dependencies_parsed_at":"2024-02-13T01:37:58.866Z","dependency_job_id":"900307e8-e800-4006-8998-210cb1067a67","html_url":"https://github.com/artichoke/ruby-file-expand-path","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artichoke%2Fruby-file-expand-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artichoke%2Fruby-file-expand-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artichoke%2Fruby-file-expand-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artichoke%2Fruby-file-expand-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artichoke","download_url":"https://codeload.github.com/artichoke/ruby-file-expand-path/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144194,"owners_count":21054881,"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":["artichoke","ffi","filesystem","ruby","ruby-language","rust","rust-crate","windows"],"created_at":"2024-11-06T22:05:10.156Z","updated_at":"2025-04-10T02:31:13.106Z","avatar_url":"https://github.com/artichoke.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ruby-file-expand-path\n\n[![GitHub Actions](https://github.com/artichoke/ruby-file-expand-path/workflows/CI/badge.svg)](https://github.com/artichoke/ruby-file-expand-path/actions)\n[![Discord](https://img.shields.io/discord/607683947496734760)](https://discord.gg/QCe2tp2)\n[![Twitter](https://img.shields.io/twitter/follow/artichokeruby?label=Follow\u0026style=social)](https://twitter.com/artichokeruby)\n\u003cbr\u003e\n[![Crate](https://img.shields.io/crates/v/ruby-file-expand-path.svg)](https://crates.io/crates/ruby-file-expand-path)\n[![API](https://docs.rs/ruby-file-expand-path/badge.svg)](https://docs.rs/ruby-file-expand-path)\n[![API trunk](https://img.shields.io/badge/docs-trunk-blue.svg)](https://artichoke.github.io/ruby-file-expand-path/ruby_file_expand_path/)\n\nImplements file path expansion and normalization routines from MRI Ruby.\n\n\u003e A new function (`normalize` or `make_absolute` or something, bikeshed away)\n\u003e should be added that will turn a relative path into an absolute path without\n\u003e touching the filesystem. ([rust-lang/rust#59117][rust-59117]).\n\n[rust-59117]: https://github.com/rust-lang/rust/issues/59117\n\nThis crate normalizes and absolutizes paths according to the logic in Ruby\nv3.0.2 for [POSIX][mri-3.0.2-posix] and [Win32][mri-3.0.2-win32].\n\n[mri-3.0.2-posix]: https://github.com/ruby/ruby/blob/v3_0_2/file.c#L3690-L4037\n[mri-3.0.2-win32]:\n  https://github.com/ruby/ruby/blob/v3_0_2/win32/file.c#L276-L616\n\n## Usage\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nruby-file-expand-path = \"0.1.0\"\n```\n\nThen normalize paths like:\n\n```rust\nassert_eq!(\n    ruby_file_expand_path::expand(\"/home/artichoke/scripts/../run.sh\"),\n    Ok(b\"/home/artichoke/run.sh\")\n);\n```\n\n## License\n\n`ruby-file-expand-path` is licensed under the [MIT License](LICENSE) (c) Ryan\nLopopolo.\n\n`ruby-file-expand-path` is derived from `ruby` @ [v3.0.2][mri-3.0.2]. `ruby` is\ndual licensed under the [Ruby License or 2-clause BSD\nLicense][mri-3.0.2-license] Copyright (c) Yukihiro Matsumoto \\\u003cmatz@netlab.jp\\\u003e.\nA copy of the Ruby License can be found in [`COPYING`](COPYING) in this\nrepository.\n\n[mri-3.0.2]: https://github.com/ruby/ruby/tree/v3_0_2\n[mri-3.0.2-license]: https://github.com/ruby/ruby/blob/v3_0_2/COPYING\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartichoke%2Fruby-file-expand-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartichoke%2Fruby-file-expand-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartichoke%2Fruby-file-expand-path/lists"}