From 2d4f76c5bbfcda0cb76d004f2ac6cf53f0cb5c9e Mon Sep 17 00:00:00 2001 From: Konstantin Date: Tue, 16 May 2023 17:16:37 +0300 Subject: [PATCH] Version 4.3.4 (#125) * Remove the default value for store param * Fix rubocop issues * Update changelog --- .rubocop.yml | 4 ++-- CHANGELOG.md | 7 +++++++ Gemfile | 7 +++++++ lib/uploadcare/client/multipart_upload_client.rb | 1 - lib/uploadcare/entity/conversion/base_converter.rb | 2 +- lib/uploadcare/entity/uploader.rb | 2 +- lib/uploadcare/ruby/version.rb | 2 +- uploadcare-ruby.gemspec | 7 ------- 8 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index b3903666..f767bd1d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,10 +2,10 @@ AllCops: NewCops: enable TargetRubyVersion: 2.7 -Metrics/LineLength: +Layout/LineLength: Max: 120 -IneffectiveAccessModifier: +Lint/IneffectiveAccessModifier: Enabled: false Style/HashTransformKeys: diff --git a/CHANGELOG.md b/CHANGELOG.md index dd612faf..fbf1ac7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 4.3.4 — 2023-05-16 + +### Changed + +* Use `auto` as the default value for the `store` param. + + ## 4.3.3 — 2023-04-14 ### Changed diff --git a/Gemfile b/Gemfile index a5734e84..daf8bb83 100644 --- a/Gemfile +++ b/Gemfile @@ -2,5 +2,12 @@ source 'https://rubygems.org' +gem 'byebug', '~> 11.1' +gem 'rake', '~> 13.0' +gem 'rspec', '~> 3.0' +gem 'rubocop', '~> 1.48' +gem 'vcr', '~> 6.1' +gem 'webmock', '~> 3.18' + # Specify your gem's dependencies in uploadcare-ruby.gemspec gemspec diff --git a/lib/uploadcare/client/multipart_upload_client.rb b/lib/uploadcare/client/multipart_upload_client.rb index 21c743ab..6039bc3a 100644 --- a/lib/uploadcare/client/multipart_upload_client.rb +++ b/lib/uploadcare/client/multipart_upload_client.rb @@ -25,7 +25,6 @@ def upload(object, options = {}, &block) # Asks Uploadcare server to create a number of storage bin for uploads def upload_start(object, options = {}) - options.merge!(store: options[:store] || false) body = HTTP::FormData::Multipart.new( Param::Upload::UploadParamsGenerator.call(options).merge(form_data_for(object)) ) diff --git a/lib/uploadcare/entity/conversion/base_converter.rb b/lib/uploadcare/entity/conversion/base_converter.rb index 5cc0eb64..89df484d 100644 --- a/lib/uploadcare/entity/conversion/base_converter.rb +++ b/lib/uploadcare/entity/conversion/base_converter.rb @@ -10,7 +10,7 @@ class << self # Converts files # # @param doc_params [Array] of hashes with params or [Hash] - # @option options [Boolean] :store (false) whether to store file on servers. + # @option options [Boolean] :store whether to store file on servers. def convert(params, options = {}) files_params = params.is_a?(Hash) ? [params] : params conversion_client.new.convert_many(files_params, options) diff --git a/lib/uploadcare/entity/uploader.rb b/lib/uploadcare/entity/uploader.rb index 220287d3..444f5ed9 100644 --- a/lib/uploadcare/entity/uploader.rb +++ b/lib/uploadcare/entity/uploader.rb @@ -15,7 +15,7 @@ class Uploader < Entity # # @param object [Array], [String] or [File] # @param [Hash] options options for upload - # @option options [Boolean] :store (false) whether to store file on servers. + # @option options [Boolean] :store whether to store file on servers. def self.upload(object, options = {}) if big_file?(object) multipart_upload(object, options) diff --git a/lib/uploadcare/ruby/version.rb b/lib/uploadcare/ruby/version.rb index 3a69931f..19c95ae2 100644 --- a/lib/uploadcare/ruby/version.rb +++ b/lib/uploadcare/ruby/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Uploadcare - VERSION = '4.3.3' + VERSION = '4.3.4' end diff --git a/uploadcare-ruby.gemspec b/uploadcare-ruby.gemspec index d5909e82..5ee8fcac 100644 --- a/uploadcare-ruby.gemspec +++ b/uploadcare-ruby.gemspec @@ -47,11 +47,4 @@ Gem::Specification.new do |spec| spec.add_dependency 'parallel', '~> 1.22' spec.add_dependency 'retries', '~> 0.0' spec.add_dependency 'uploadcare-api_struct', '>= 1.1', '< 2' - - spec.add_development_dependency 'byebug', '~> 11.1' - spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rspec', '~> 3.0' - spec.add_development_dependency 'rubocop', '~> 1.48' - spec.add_development_dependency 'vcr', '~> 6.1' - spec.add_development_dependency 'webmock', '~> 3.18' end