https://github.com/zaikoxander/file_to_tempfile
Easily convert a File object to a Tempfile object.
https://github.com/zaikoxander/file_to_tempfile
Last synced: 3 months ago
JSON representation
Easily convert a File object to a Tempfile object.
- Host: GitHub
- URL: https://github.com/zaikoxander/file_to_tempfile
- Owner: ZaikoXander
- License: mit
- Created: 2024-05-01T18:15:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-04T20:48:24.000Z (about 1 year ago)
- Last Synced: 2025-02-01T01:04:09.545Z (4 months ago)
- Language: Ruby
- Homepage: https://rubygems.org/gems/file_to_tempfile
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# FileToTempfile
Easily convert a File object to a Tempfile object.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'file_to_tempfile'
```And then execute:
```sh
$ bundle install
```## Usage
```ruby
require 'file_to_tempfile'file = File.open '.gitignore'
tempfile = FileToTempfile.convert(file)
```## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ZaikoXander/file_to_tempfile.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).