Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for loading remote files over ftp #355

Merged
merged 1 commit into from
Dec 28, 2016

Conversation

iainbeeston
Copy link
Contributor

Roo uses open-uri to load remote files. Open-uri can download files over both http and ftp, however, roo was short-circuiting this and only loading open-uri if the uri started with "http://" or "https://". I've modified this check to also allow "ftp://" uris to be loaded.

It would have been nice to do this more dynamically, by "asking" open-uri what protocols it supports, but there doesn't seem to be a way to do this in open-uri at present.

Roo uses open-uri to load remote files. Open-uri can download files over both http and ftp, however, roo was short-circuiting this and only loading open-uri if the uri started with "http://" or "https://". I've modified this check to also allow "ftp://" uris to be loaded.

It would have been nice to do this more dynamically, by "asking" open-uri what protocols it supports, but there doesn't seem to be a way to do this in open-uri at present.
@coveralls
Copy link

coveralls commented Dec 20, 2016

Coverage Status

Coverage remained the same at 93.661% when pulling 4332445 on iainbeeston:patch-1 into 0f67aa1 on roo-rb:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.661% when pulling 4332445 on iainbeeston:patch-1 into 0f67aa1 on roo-rb:master.

@stevendaniels stevendaniels merged commit 13794fa into roo-rb:master Dec 28, 2016
@stevendaniels
Copy link
Contributor

Thanks for the PR @iainbeeston

jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Jan 8, 2017
## [2.7.1] 2017-01-03
### Fixed
- Fixed regression where a CSV's encoding was being ignored [372](roo-rb/roo#372)

## [2.7.0] 2016-12-31
### Fixed
- Added rack server for testing Roo's download capabilities [365](roo-rb/roo#365)
- Refactored tests into different formats [365](roo-rb/roo#365)
- Fixed OpenOffice for JRuby [362](roo-rb/roo#362)
- Added '0.000000' => '%.6f' number format [354](roo-rb/roo#354)
- Add additional formula cell types for to_csv [367][roo-rb/roo#367]

### Added
- Extracted formatters from Roo::Base#to_* methods [364](roo-rb/roo#364)

## [2.6.0] 2016-12-28
### Fixed
- Fixed error if sheet name starts with a slash [348](roo-rb/roo#348)
- Fixed loading to support files on ftp [355](roo-rb/roo#355)
- Fixed Ruby 2.4.0 deprecation warnings [356](roo-rb/roo#356)
- properly return date as string [359](roo-rb/roo#359)

### Added
- Cell values can be set in a CSV [350](roo-rb/roo#350)
- Raise an error Roo::Excelx::Extractor document is missing [358](roo-rb/roo#358)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants