{"id":15032896,"url":"https://github.com/ruby/tempfile","last_synced_at":"2025-06-20T05:33:30.057Z","repository":{"id":40461883,"uuid":"239687241","full_name":"ruby/tempfile","owner":"ruby","description":"A utility class for managing temporary files.","archived":false,"fork":false,"pushed_at":"2025-06-17T09:41:40.000Z","size":236,"stargazers_count":31,"open_issues_count":2,"forks_count":11,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-06-17T10:39:42.977Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null}},"created_at":"2020-02-11T05:53:20.000Z","updated_at":"2025-06-17T09:41:43.000Z","dependencies_parsed_at":"2023-12-11T01:29:57.938Z","dependency_job_id":"dba96f2c-a3ac-4895-af8c-307c463c5f3e","html_url":"https://github.com/ruby/tempfile","commit_stats":{"total_commits":186,"total_committers":40,"mean_commits":4.65,"dds":0.7956989247311828,"last_synced_commit":"86aac8890016b4ec073d63998caebb491b930feb"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ruby/tempfile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Ftempfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Ftempfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Ftempfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Ftempfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/tempfile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Ftempfile/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260346218,"owners_count":22995123,"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":["ruby"],"created_at":"2024-09-24T20:19:41.319Z","updated_at":"2025-06-20T05:33:25.042Z","avatar_url":"https://github.com/ruby.png","language":"Ruby","readme":"# Tempfile\n\nA utility class for managing temporary files. When you create a Tempfile\nobject, it will create a temporary file with a unique filename. A Tempfile\nobjects behaves just like a File object, and you can perform all the usual\nfile operations on it: reading data, writing data, changing its permissions,\netc. So although this class does not explicitly document all instance methods\nsupported by File, you can in fact call any File instance method on a\nTempfile object.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'tempfile'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install tempfile\n\n## Usage\n\n```ruby\nrequire 'tempfile'\n\nfile = Tempfile.new('foo')\nfile.path      # =\u003e A unique filename in the OS's temp directory,\n               #    e.g.: \"/tmp/foo.24722.0\"\n               #    This filename contains 'foo' in its basename.\nfile.write(\"hello world\")\nfile.rewind\nfile.read      # =\u003e \"hello world\"\nfile.close\nfile.unlink    # deletes the temp file\n```\n\n## Documentation\n\n[RDoc](https://docs.ruby-lang.org/en/master/Tempfile.html)\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 in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, 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/ruby/tempfile.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Ftempfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Ftempfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Ftempfile/lists"}