paramore 3.6.4 → 3.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/paramore/types.rb +16 -0
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f25798a2596838cff8c3355c05286e6c8c6c0493226fed24f93d6d27271a10a5
4
- data.tar.gz: 9a1bff5d5e92b3fab7045b2ad8904d97b7de7c814f37e9d0535028648db46bc1
3
+ metadata.gz: 7892599e7d615d8851d79fb96e02335dc65bf5edc26c1f075c2914a3cf073b30
4
+ data.tar.gz: 16105241093b7f0c931533a4b2712ba183404a1df40b57c30dc6f6f00c41f37d
5
5
  SHA512:
6
- metadata.gz: 2a21bf0e45a727fa73473d6d011f6650e0894843962d0c9b493e01093792fd87add7ba1462e66440155b8269ff03d2d49780453f220d847ccafaf22e2a642a03
7
- data.tar.gz: 9b6d06d90120343be0cd44665c4642c461f02e76a053e694f87e51447e0285eb741d32caa53d888d39ad4000e5fd9bc9e83400f9f07066f6fa78cc77ea8ccc1f
6
+ metadata.gz: 685214b2c04ee09db06517ef0014939b6bb135c97877deab6ab233bdfdb67812fcada89643d2473e528ee9ecff4b6daa18d3dafbdf3a650bab15ed8577ec1a91
7
+ data.tar.gz: '059f6eb4b4a00cba24b2aca2b1db26a2a1e6a10167bf2c1653be0d3858d1044c86c23042ef16a4f9233d19c04fa76b59dee276b0f87ca471a465fd85a36ad58c'
@@ -56,4 +56,20 @@ module Paramore
56
56
  ::Date.parse(input)
57
57
  end
58
58
  end
59
+
60
+ module UploadedFile
61
+ VALID_CLASSES = [
62
+ File,
63
+ StringIO,
64
+ Rack::Test::UploadedFile,
65
+ ActionDispatch::Http::UploadedFile,
66
+ ].freeze
67
+
68
+ module_function
69
+ def [](input)
70
+ raise "#{input.class} is not a file!" unless input.class.in?(VALID_CLASSES)
71
+
72
+ input
73
+ end
74
+ end
59
75
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paramore
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.4
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Kairevičius
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-29 00:00:00.000000000 Z
11
+ date: 2021-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-rails
@@ -115,7 +115,7 @@ licenses:
115
115
  - MIT
116
116
  metadata: {}
117
117
  post_install_message: |
118
- Thank you for installing Paramore 3.6.4 !
118
+ Thank you for installing Paramore 3.7.0 !
119
119
  From the command line you can run `paramore` to generate a configuration file
120
120
 
121
121
  More details here : https://github.com/lumzdas/paramore/blob/master/README.md