sibu 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0f214aadf5875dec224d1cc6c1e10c12e60a116
4
- data.tar.gz: b15f79841ef717bd4525d078dfa7ec6627cb5a3e
3
+ metadata.gz: 667c4b9cf1f4ef1bd0e3a7713df142d23bf429d4
4
+ data.tar.gz: 481f1264b52f5a2591035ba55a2239988f293815
5
5
  SHA512:
6
- metadata.gz: 88be30374322ebae3217fb6768d18b1a8a58dc9fb93f2a6c688f909fe78b4fe4af2cb9e2a3b0e3c4f9b637caa25177cd78ba8abdee58aa071809623837a6ca04
7
- data.tar.gz: 8436ac5241e41c4d3efe22dddf290846bff382d899a6013f9a510ab6701781678b2aae1958847e61af1e8e2105e3de1313502a1321d92d81600d8f0e9ff22917
6
+ metadata.gz: 850463b883dfd41aa0b048cfaccca4af385f6ef2f725189e15ecfb047e10da872442b19f4a14c9545549cddc1dbc6a7d6c7ed922883fa7b18fd60739c7d1e0ec
7
+ data.tar.gz: e702dda5a7578bc2655c568b6a4602ef43af759293de983e53a44b1cf21fb0e879030369ff7a9c3e0b09d0ff2ef00ef9c867da4229b0b0265e6653c414d14fb0
@@ -2,7 +2,7 @@ class Sibu::DocumentUploader < Shrine
2
2
  plugin :validation_helpers
3
3
 
4
4
  Attacher.validate do
5
- validate_max_size 10*1024*1024, message: "est trop volumineux (10Mo maximum)"
5
+ validate_max_size (Rails.application.config.sibu[:max_doc_size] || 10)*1024*1024, message: "est trop volumineux (#{Rails.application.config.sibu[:max_doc_size] || 10}Mo maximum)"
6
6
  # validate_mime_type_inclusion %w[application/pdf]
7
7
  end
8
8
  end
@@ -4,7 +4,7 @@
4
4
  </div>
5
5
  <h2>Télécharger un document</h2>
6
6
  <p>
7
- Vous pouvez télécharger tous types de documents d'une taille inférieure à 10Mo.
7
+ Vous pouvez télécharger tous types de documents d'une taille inférieure à <%= Rails.application.config.sibu[:max_doc_size] || 10 %>Mo.
8
8
  Pour les documents textes, favorisez le format PDF pour une compatibilité optimale.
9
9
  </p>
10
10
  <div class="sibu_form">
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.7.2'
2
+ VERSION = '0.7.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sibu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-21 00:00:00.000000000 Z
11
+ date: 2019-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails