carrierwave 2.2.3 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of carrierwave might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6a0cdcecad532a99cca81fbb28113f5ebc67e4392c9c69fd4b1b93b84864eb2
4
- data.tar.gz: 923a9e4630fd3771e9401be7a2cbfee521df983396c3a5a72f58bd23f1812a87
3
+ metadata.gz: 04ecbb3b2d0424203756bda1f73e89bdf32d52f3fbcda13b979e9904d1d4f2c9
4
+ data.tar.gz: e7474ccefff230df0f9d6564825c63acd3176c2a37e2a4b66a797a864d610f74
5
5
  SHA512:
6
- metadata.gz: dc28940e27fb1b721ae86e98b5bf026409ab4d09ba09394e266470ed93c3fe36bd0a78d57c633b548e2cc3455b6442b6df212b43868d6e4b879719b85976fed0
7
- data.tar.gz: 313afd97eb83c72cd84cfdcfd94d6a8eea6affc34884291d40adff251d2dda1d5080555f01bb02496480ce42721ca7e93c48749eaec7a7b09ee52268dd1b6400
6
+ metadata.gz: 9a2cff0c002d2d31c1a61bf4d7158a4d648a88bb69843092130bfc48cf2026386becdc707e00f6eff379929ff88f7c20929fa67310e874fe3b4ad3197793b269
7
+ data.tar.gz: fe8c49e5858818fd2e8f3e271ba884a839d627aefe420f1c4e5d63c00601b4c2e71cb07cdb77ccf0758121173b932c4a12b95762b2b60ee6d0930c9a290f375a
@@ -51,7 +51,7 @@ module CarrierWave
51
51
  def whitelisted_content_type?(content_type)
52
52
  Array(content_type_allowlist).any? do |item|
53
53
  item = Regexp.quote(item) if item.class != Regexp
54
- content_type =~ /#{item}/
54
+ content_type =~ /\A#{item}/
55
55
  end
56
56
  end
57
57
 
@@ -80,7 +80,17 @@ module CarrierWave
80
80
  next unless self.send(condition, new_file)
81
81
  end
82
82
  end
83
- self.send(method, *args)
83
+
84
+ if args.is_a? Array
85
+ kwargs, args = args.partition { |arg| arg.is_a? Hash }
86
+ end
87
+
88
+ if kwargs.present?
89
+ kwargs = kwargs.reduce(:merge)
90
+ self.send(method, *args, **kwargs)
91
+ else
92
+ self.send(method, *args)
93
+ end
84
94
  end
85
95
  end
86
96
  end
@@ -1,3 +1,3 @@
1
1
  module CarrierWave
2
- VERSION = "2.2.3"
2
+ VERSION = "2.2.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-21 00:00:00.000000000 Z
11
+ date: 2023-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -412,7 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
412
412
  - !ruby/object:Gem::Version
413
413
  version: '0'
414
414
  requirements: []
415
- rubygems_version: 3.3.7
415
+ rubygems_version: 3.4.10
416
416
  signing_key:
417
417
  specification_version: 4
418
418
  summary: Ruby file upload library