Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

s3x

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

s3x

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

S3x

Gem Version Test Coverage Status

Found something spicy? Want to check it out in more detail? Here's a tool for ya 😎

Installation

Install the gem and add to Gemfile:

bundle add s3x

Or install it manually:

gem install s3x

Configuration

Initialize a bucket of interest:

bucket = S3x::Bucket.new("http://ftp.ruby-lang.org/")

You can set prefix to pre-filter items and/or override default page_size:

bucket = S3x::Bucket.new(
  "http://ftp.ruby-lang.org/",
  prefix: "pub/ruby/binaries", # default: nil
  page_size: 666               # default: 1000
)

Usage

Get first X (page_size) items:

bucket.items
# => [{
#   key:           "pub/media/irb_multiline.mp4",
#   etag:          "03fa58ca64375c23cb567be6b129ab11",
#   size:          239988,
#   storage_class: "INTELLIGENT_TIERING",
#   last_modified: 2019-04-20 09:10:30 UTC
# }, ...]

Get next page items:

bucket.next_items
# => [{...}, ...]

Check if the next page actually exists:

bucket.next_items?
# => true/false

Get all items in one take:

bucket.all_items
# => [{...}, ...]

Download selected item using its key:

bucket.download("pub/misc/ci_versions/cruby-jruby.json")
# => "[\"3.1\",\"3.2\",\"3.3\",\"head\",\"jruby\",\"jruby-head\"]\n"

Development

bin/setup         # install deps
bin/console       # interactive prompt to play around
rake spec         # run tests!
rake spec:no_vcr  # run tests with VCR cassettes disabled!
rake rubocop      # lint code!
rake rubocop:md   # lint docs!

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ocvit/s3x.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 24 Apr 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc