Skip to content

Commit 3003d25

Browse files
authored
Version 3.3.1 (#122)
* Update description and homepage * Fix rubocop offences * Change the priority of multiple option * Update the changelog
1 parent fd9a83f commit 3003d25

File tree

5 files changed

+28
-6
lines changed

5 files changed

+28
-6
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based now on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## 3.3.1 — 2023-03-20
8+
9+
* Update gem description
10+
* Respect data-multiple in helper options (https://github.com/uploadcare/uploadcare-rails/issues/119)
11+
712
## 3.3.0 — 2023-03-16
813

914
Guarantee support of maintainable versions of Ruby and Rails

lib/uploadcare/rails/action_view/uploadcare_uploader_tags.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def uploadcare_uploader_field(object_name, method_name, options = {})
2828
object_name,
2929
method_name,
3030
uploadcare_uploader_options(
31-
options.merge(multiple: uploadcare_uploader_multiple?(object_name, method_name).presence)
31+
options.reverse_merge(multiple: uploadcare_uploader_multiple?(object_name, method_name).presence)
3232
)
3333
)
3434
end

lib/uploadcare/rails/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module Uploadcare
44
module Rails
5-
VERSION = '3.3.0'
5+
VERSION = '3.3.1'
66
end
77
end

spec/uploadcare/rails/action_view/uploadcare_uploader_tags_spec.rb

+16
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@
1919
end
2020
end
2121

22+
it 'includes a hidden field with multiple param' do
23+
tag = uploadcare_uploader_field(:post, :title, multiple: true)
24+
25+
[
26+
'<input',
27+
'role="uploadcare-uploader"',
28+
'type="hidden"',
29+
'name="post[title]"',
30+
'id="post_title"',
31+
'data-multiple="true"',
32+
'/>'
33+
].each do |fragment|
34+
expect(tag).to include(fragment)
35+
end
36+
end
37+
2238
it 'includes a hidden field tag' do
2339
tag = uploadcare_uploader_field_tag(:title)
2440

uploadcare-rails.gemspec

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@ Gem::Specification.new do |gem|
1010
gem.required_ruby_version = '>= 2.7.0'
1111

1212
gem.name = 'uploadcare-rails'
13-
gem.authors = ['@dmitrijivanchenko (Dmitrij Ivanchenko), @T0mbery (Andrey Aksenov)']
13+
gem.authors = ['@dmitrijivanchenko (Dmitrij Ivanchenko), @T0mbery (Andrey Aksenov)',
14+
'kraft001 (Konstantin Rafalskii)']
1415
gem.email = ['[email protected]']
1516
gem.summary = 'Rails gem for Uploadcare'
1617
gem.description = <<~DESCRIPTION
17-
Rails wrapper for Uploadcare service.
18-
Based on uploadcare-ruby gem (https://github.com/uploadcare/uploadcare-ruby)
18+
Rails API client (based on uploadcare-ruby) that handles uploads
19+
and further operations with files by wrapping Uploadcare Upload and REST APIs.
1920
DESCRIPTION
2021
gem.metadata = {
2122
'github' => 'https://github.com/uploadcare/uploadcare-rails',
2223
'issue_tracker' => 'https://github.com/uploadcare/uploadcare-rails/issues',
2324
'rubygems_mfa_required' => 'true'
2425
}
25-
gem.homepage = 'https://uploadcare.com/docs/integrations/'
26+
gem.homepage = 'https://github.com/uploadcare/uploadcare-rails'
2627
gem.license = 'MIT'
2728

2829
gem.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.rdoc']

0 commit comments

Comments
 (0)