Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

v2.0.0

Pre-release
Pre-release

Choose a tag to compare

@bryanchriswhite bryanchriswhite released this 21 Mar 00:29
· 4 commits to main since this release
v2.0.0

Breaking changes:

  • LibStorj::Env.new now takes a hash instead of an array.

    You can now pass a string containing the path to a yaml file (following the structure in options.example.yml) directly to the Env.new method:

    require 'ruby-libstorj'
    
    storj = LibStorj::Env.new(path: <some/path/to/a.yaml>)

    Alternatively, you can pass a hash of FFI structs:

    require 'ruby-libstorj'
    
    # initialize structs
    bridge = LibStorj::Ext::Storj::BridgeOptions.new
    http = LibStorj::Ext::Storj::HttpOptions.new
    encrypt = LibStorj::Ext::Storj::EncryptOptions.new
    log = LibStorj::Ext::Storj::LogOptions.new
    
    # manipulate structs
    # ...
    
    options = {
      bridge_options: bridge
    }
    
    storj = LibStorj::Env.new(*options)