{"id":15684616,"url":"https://github.com/jonathanhefner/pleasant_path","last_synced_at":"2025-11-11T20:25:22.251Z","repository":{"id":56888274,"uuid":"72871516","full_name":"jonathanhefner/pleasant_path","owner":"jonathanhefner","description":"Fluent API for pleasant file IO","archived":false,"fork":false,"pushed_at":"2023-03-18T21:01:46.000Z","size":113,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T21:06:47.560Z","etag":null,"topics":["pathname","ruby","utility"],"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/jonathanhefner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2016-11-04T17:45:17.000Z","updated_at":"2024-07-12T18:15:30.000Z","dependencies_parsed_at":"2024-10-23T18:09:22.606Z","dependency_job_id":"6e31637e-b3c6-4880-abad-90c6dd22ae17","html_url":"https://github.com/jonathanhefner/pleasant_path","commit_stats":{"total_commits":126,"total_committers":2,"mean_commits":63.0,"dds":"0.46031746031746035","last_synced_commit":"f42eab87e2e9539666cac3d99320bca64231414c"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhefner%2Fpleasant_path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhefner%2Fpleasant_path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhefner%2Fpleasant_path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanhefner%2Fpleasant_path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanhefner","download_url":"https://codeload.github.com/jonathanhefner/pleasant_path/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252922308,"owners_count":21825641,"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":["pathname","ruby","utility"],"created_at":"2024-10-03T17:20:14.365Z","updated_at":"2025-11-11T20:25:22.196Z","avatar_url":"https://github.com/jonathanhefner.png","language":"Ruby","readme":"# pleasant_path\n\nA [fluent API] for pleasant file IO, written as extensions to core Ruby\nobjects.  See API listing below, or browse the [full documentation].\n\n[fluent API]: https://en.wikipedia.org/wiki/Fluent_interface\n[full documentation]: https://www.rubydoc.info/gems/pleasant_path/\n\n\n## Examples\n\n```ruby\n# Pluck lines from a file\n\"log.txt\".path.read_lines.grep(/^ERROR /).append_to_file(\"errors.txt\")\n\n# Dedup lines in a file\n\"names.txt\".path.edit_lines(\u0026:uniq)\n```\n\n\n## Core API\n\nThe following methods are available:\n\n- [Pathname](https://www.rubydoc.info/gems/pleasant_path/Pathname)\n  - [::NULL](https://www.rubydoc.info/gems/pleasant_path/Pathname#NULL-constant)\n  - [#^](https://www.rubydoc.info/gems/pleasant_path/Pathname:%5E)\n  - [#append_file](https://www.rubydoc.info/gems/pleasant_path/Pathname:append_file)\n  - [#append_lines](https://www.rubydoc.info/gems/pleasant_path/Pathname:append_lines)\n  - [#append_text](https://www.rubydoc.info/gems/pleasant_path/Pathname:append_text)\n  - [#available_name](https://www.rubydoc.info/gems/pleasant_path/Pathname:available_name)\n  - [#chdir](https://www.rubydoc.info/gems/pleasant_path/Pathname:chdir)\n  - [#common_path](https://www.rubydoc.info/gems/pleasant_path/Pathname:common_path)\n  - [#copy](https://www.rubydoc.info/gems/pleasant_path/Pathname:copy)\n  - [#copy_as](https://www.rubydoc.info/gems/pleasant_path/Pathname:copy_as)\n  - [#copy_into](https://www.rubydoc.info/gems/pleasant_path/Pathname:copy_into)\n  - [#delete!](https://www.rubydoc.info/gems/pleasant_path/Pathname:delete%21)\n  - [#dir?](https://www.rubydoc.info/gems/pleasant_path/Pathname:dir%3F)\n  - [#dirs](https://www.rubydoc.info/gems/pleasant_path/Pathname:dirs)\n  - [#dirs_r](https://www.rubydoc.info/gems/pleasant_path/Pathname:dirs_r)\n  - [#edit_lines](https://www.rubydoc.info/gems/pleasant_path/Pathname:edit_lines)\n  - [#edit_text](https://www.rubydoc.info/gems/pleasant_path/Pathname:edit_text)\n  - [#existence](https://www.rubydoc.info/gems/pleasant_path/Pathname:existence)\n  - [#files](https://www.rubydoc.info/gems/pleasant_path/Pathname:files)\n  - [#files_r](https://www.rubydoc.info/gems/pleasant_path/Pathname:files_r)\n  - [#find_dirs](https://www.rubydoc.info/gems/pleasant_path/Pathname:find_dirs)\n  - [#find_files](https://www.rubydoc.info/gems/pleasant_path/Pathname:find_files)\n  - [#make_dir](https://www.rubydoc.info/gems/pleasant_path/Pathname:make_dir)\n  - [#make_dirname](https://www.rubydoc.info/gems/pleasant_path/Pathname:make_dirname)\n  - [#make_file](https://www.rubydoc.info/gems/pleasant_path/Pathname:make_file)\n  - [#move](https://www.rubydoc.info/gems/pleasant_path/Pathname:move)\n  - [#move_as](https://www.rubydoc.info/gems/pleasant_path/Pathname:move_as)\n  - [#move_into](https://www.rubydoc.info/gems/pleasant_path/Pathname:move_into)\n  - [#parentname](https://www.rubydoc.info/gems/pleasant_path/Pathname:parentname)\n  - [#read_lines](https://www.rubydoc.info/gems/pleasant_path/Pathname:read_lines)\n  - [#rename_basename](https://www.rubydoc.info/gems/pleasant_path/Pathname:rename_basename)\n  - [#rename_extname](https://www.rubydoc.info/gems/pleasant_path/Pathname:rename_extname)\n  - [#to_pathname](https://www.rubydoc.info/gems/pleasant_path/Pathname:to_pathname)\n  - [#write_lines](https://www.rubydoc.info/gems/pleasant_path/Pathname:write_lines)\n  - [#write_text](https://www.rubydoc.info/gems/pleasant_path/Pathname:write_text)\n- [String](https://www.rubydoc.info/gems/pleasant_path/String)\n  - [#/](https://www.rubydoc.info/gems/pleasant_path/String:%2F)\n  - [#append_to_file](https://www.rubydoc.info/gems/pleasant_path/String:append_to_file)\n  - [#path](https://www.rubydoc.info/gems/pleasant_path/String:path)\n  - [#to_pathname](https://www.rubydoc.info/gems/pleasant_path/String:to_pathname)\n  - [#write_to_file](https://www.rubydoc.info/gems/pleasant_path/String:write_to_file)\n- [Enumerable](https://www.rubydoc.info/gems/pleasant_path/Enumerable)\n  - [#append_to_file](https://www.rubydoc.info/gems/pleasant_path/Enumerable:append_to_file)\n  - [#write_to_file](https://www.rubydoc.info/gems/pleasant_path/Enumerable:write_to_file)\n- [File](https://www.rubydoc.info/gems/pleasant_path/File)\n  - [.common_path](https://www.rubydoc.info/gems/pleasant_path/File.common_path)\n  - [.edit_lines](https://www.rubydoc.info/gems/pleasant_path/File.edit_lines)\n  - [.edit_text](https://www.rubydoc.info/gems/pleasant_path/File.edit_text)\n- [IO](https://www.rubydoc.info/gems/pleasant_path/IO)\n  - [#read_lines](https://www.rubydoc.info/gems/pleasant_path/IO:read_lines)\n  - [#write_lines](https://www.rubydoc.info/gems/pleasant_path/IO:write_lines)\n\n\n## JSON-related and YAML-related API\n\n*pleasant_path* also includes methods for interacting with JSON and YAML\nfiles, using the [JSON module] and [YAML module] that are part of Ruby's\nstandard library.  Because Ruby does not load these modules by default,\n*pleasant_path* does not load its JSON-related and YAML-related API by\ndefault either.  To load these *pleasant_path* APIs **and** the relevant\nstandard library modules, use:\n\n```ruby\nrequire \"pleasant_path/json\"\nrequire \"pleasant_path/yaml\"\n```\n\n[JSON module]: https://docs.ruby-lang.org/en/master/JSON.html\n[YAML module]: https://docs.ruby-lang.org/en/master/YAML.html\n\nThe following methods are available:\n\n- Object\n  - [write_to_json](https://www.rubydoc.info/gems/pleasant_path/Object:write_to_json)\n  - [write_to_yaml](https://www.rubydoc.info/gems/pleasant_path/Object:write_to_yaml)\n- Pathname\n  - [load_json](https://www.rubydoc.info/gems/pleasant_path/Pathname:load_json)\n  - [load_yaml](https://www.rubydoc.info/gems/pleasant_path/Pathname:load_yaml)\n  - [read_json](https://www.rubydoc.info/gems/pleasant_path/Pathname:read_json)\n  - [read_yaml](https://www.rubydoc.info/gems/pleasant_path/Pathname:read_yaml)\n\n\n## Installation\n\nInstall the [`pleasant_path` gem](https://rubygems.org/gems/pleasant_path).\n\n\n## Contributing\n\nRun `rake test` to run the tests.\n\n\n## License\n\n[MIT License](LICENSE.txt)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanhefner%2Fpleasant_path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanhefner%2Fpleasant_path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanhefner%2Fpleasant_path/lists"}