
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
This is a gem that performs asynchronous SFTP downloads, ensuring that notifications of succesful downloads respect a sequential order.
For example, this means that if you download the following files:
from the remote host, all downloads will start concurrently but the notification related to b.txt
will happen only after the notification related to a.txt
.
This is especially useful when you need to import and parse files respecting the remote filename ordering.
You can also specify if the downloaded files should be removed from the remote location once the downloads are completed.
Add this line to your application's Gemfile:
gem 'sftp_downloader'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sftp_downloader
sftp_downloader --help
require 'sftp_downloader'
require 'logger'
logger = Logger.new(STDOUT)
credentials = {
host: 'INSERT_FTP_HOST_HERE',
username: 'INSERT_FTP_USERNAME_HERE',
password: 'INSERT_FTP_PASSWORD_HERE',
}
downloader = SftpDownloader::Client.new(
credentials: credentials, # required
download_path: './tmp/downloads', # default: './'
remote_path: '/out/', # default: '/'
file_pattern: /.+\.csv/, # default: /.*\..*/
logger: logger, # default: nil (doesn't log debugging info)
remove_after_download: true, # default: false
)
downloader.perform do |local_path|
puts "dealing with #{local_path}"
end
After checking out the repo, run bin/setup
to install dependencies. Then, run bin/console
for an interactive prompt that will allow you to experiment. Run bundle exec sftp_downloader
to use the code located in this directory, ignoring other installed copies of this gem.
To 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
to create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that sftp_downloader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.