
Security News
Feross on Risky Business Weekly Podcast: npm’s Ongoing Supply Chain Attacks
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
[]
(http://travis-ci.org/laurilehmijoki/filey-diff)
A Ruby library for comparing file-like objects from various data sources.
A file-like object. Can be, for example, a file system file or an AWS S3 object.
Provides Fileys.
The current built-in data sources support Amazon Web Services S3 and file system.
Given two data sources A and B, list the changed files that A has but B doesn't.
require 'aws-sdk'
require 'filey-diff'
s3 = AWS::S3.new(:access_key_id => 'some-id',
:secret_access_key => 'some-secret')
s3_bucket = s3.buckets['your-s3-bucket-name']
s3_data_source = Filey::DataSources::AwsSdkS3.new(s3_bucket)
fs_data_source = Filey::DataSources::FileSystem.new('/tmp/site-root')
Filey::Comparison.list_changed(fs_data_source, s3_data_source).each { |filey|
puts "File #{filey.full_path} has different contents on local file system than on S3"
}
Given two data sources A and B, list the files that A has but B doesn't.
Filey::Comparison.list_missing(fs_data_source, s3_data_source).each { |filey|
puts "File #{filey.full_path} is missing from S3"
}
Given two data sources A and B, list the files on A that have a different MD5 hash than the corresponding file on B.
Filey::Comparison.list_outdated(fs_data_source, s3_data_source).each { |filey|
puts "File #{filey.full_path} is newer on local file system than on S3"
}
The concurrency level determines the amount of parallel operations that the
AwsSdkS3
data source performs against the S3 API.
config = { :concurrency_level => 1000 }
s3_data_source = Filey::DataSources::AwsSdkS3.new(s3_bucket, config)
Arnie has a blog on AWS S3. He has just finished a new post and wants to upload only the new post into S3. With the help of Filey diff Arnie can write a Ruby program that uploads only the new post and nothing else.
Copyright (C) 2012 Lauri Lehmijoki
Distributed under the Apache-2.0 license http://www.apache.org/licenses/LICENSE-2.0.html
FAQs
Unknown package
We found that filey-diff 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
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.