diff --git a/README.md b/README.md index 872caed..e97dfab 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ Ruby bindings to the [libuplink](https://github.com/storj/uplink-c) Storj API li ### Prerequisites * Clone [uplink-c](https://github.com/storj/uplink-c) repository. -* Check out the release version `v1.7.0`. +* Check out the release version `v1.8.0`. ```bash $ git fetch --tags - $ git checkout tags/v1.7.0 + $ git checkout tags/v1.8.0 ``` * Run `make build` to build the uplink-c library. * The `libuplink.so` file should be created in the `.build` folder. @@ -23,9 +23,18 @@ Ruby bindings to the [libuplink](https://github.com/storj/uplink-c) Storj API li Add this line to your application's Gemfile: ```ruby -gem 'uplink-ruby', '~> 1.7.0' +gem 'uplink-ruby', '~> 1.8.0' ``` +or from the git: + +```ruby +gem 'uplink-ruby', git: 'https://github.com/storj-thirdparty/uplink-ruby', tag: 'v1.8.0' +``` + +Make sure the major & minor version of the gem or git tag matches the uplink-c release version. + + ### Running the Tests * Create a [Storj](https://www.storj.io/) account. * In the Storj Dashboard, create an Access Grant and set the access grant key to `UPLINK_0_ACCESS` environment variable diff --git a/lib/uplink/access.rb b/lib/uplink/access.rb index 223fd07..3715e90 100644 --- a/lib/uplink/access.rb +++ b/lib/uplink/access.rb @@ -101,6 +101,7 @@ def edge_register_access(config, options = nil) certificate_pem = FFI::MemoryPointer.from_string(config[:certificate_pem]) if config[:certificate_pem] register_config[:auth_service_address] = auth_service_address register_config[:certificate_pem] = certificate_pem + register_config[:insecure_unencrypted_connection] = config[:insecure_unencrypted_connection] register_options = nil if options && !options.empty? diff --git a/lib/uplink_lib.rb b/lib/uplink_lib.rb index 7eb8537..d426864 100644 --- a/lib/uplink_lib.rb +++ b/lib/uplink_lib.rb @@ -231,7 +231,8 @@ class UplinkListUploadPartsOptions < FFI::Struct class EdgeConfig < FFI::Struct layout :auth_service_address, :pointer, # string - :certificate_pem, :pointer # string + :certificate_pem, :pointer, # string + :insecure_unencrypted_connection, :bool end class EdgeRegisterAccessOptions < FFI::Struct diff --git a/spec/lib/access_spec.rb b/spec/lib/access_spec.rb index 80055f4..99c1af5 100644 --- a/spec/lib/access_spec.rb +++ b/spec/lib/access_spec.rb @@ -17,11 +17,6 @@ module UplinkTest dial_timeout_milliseconds: 10_000 } expect { described_class.request_access_with_passphrase_and_config(config, SATELLITE_ADDRESS, API_KEY, PASSPHRASE) { |_access| nil } }.not_to raise_error - - config = { - dial_timeout_milliseconds: 1 - } - expect { described_class.request_access_with_passphrase_and_config(config, SATELLITE_ADDRESS, API_KEY, PASSPHRASE) { |_access| nil } }.to raise_error(described_class::InternalError) end it 'returning satellite address' do diff --git a/spec/lib/project_spec.rb b/spec/lib/project_spec.rb index ea1cdfd..0b6ce42 100644 --- a/spec/lib/project_spec.rb +++ b/spec/lib/project_spec.rb @@ -24,13 +24,6 @@ module UplinkTest dial_timeout_milliseconds: 10_000 } expect { access.open_project_with_config(config) { |_project| nil } }.not_to raise_error - - config = { - dial_timeout_milliseconds: 1 - } - access.open_project_with_config(config) do |project| - expect { project.ensure_bucket(bucket_name) }.to raise_error(described_class::InternalError) - end end end diff --git a/uplink-ruby.gemspec b/uplink-ruby.gemspec index 05d6afb..cae7926 100644 --- a/uplink-ruby.gemspec +++ b/uplink-ruby.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = 'uplink-ruby' - s.version = '1.7.0' + s.version = '1.8.0' s.summary = 'libuplink bindings for ruby' s.description = 'Ruby bindings to the libuplink C Storj API library' s.authors = ['Your Data Inc']