Add RemoteInput.open without cache - #24
Open
tikkss wants to merge 2 commits into
Open
Conversation
GitHub: red-data-toolsGH-5 This patch will introduce the new high level API for IO like object (input only object, read only object). `RemoteInput.open` downloads the data lazily on the first read. The data is stored in a system temporary directory and removed on close: ```ruby RemoteInput.open("https://example.com/sample/data.csv") do |input| input.read end ``` `RemoteInput::Input#local_path` returns a temporary file path: ```ruby RemoteInput.open("https://example.com/sample/data.csv") do |input| input.local_path # => /system temporary directory/red-remote-input/1234-567/data # 1234 is the process ID # 567 is the object ID # data is the fixed file name end ``` Without a block, `RemoteInput.open` returns a `RemoteInput::Input` object that must be closed explicitly: ```ruby input = RemoteInput.open("https://example.com/sample/data.csv") input.read input.close ```
Contributor
Author
|
GitHub Actions was disabled when I opened this PR, so no workflows ran. |
kou
reviewed
Sep 2, 2026
Because `RemoteInput::Input` is redundant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub: GH-5
This patch will introduce the new high level API for IO like object (input only object, read only object).
RemoteInput.opendownloads the data lazily on the first read. The data is stored in a system temporary directory and removed on close:RemoteInput#local_pathreturns a temporary file path:Without a block,
RemoteInput.openreturns aRemoteInputobject that must be closed explicitly: