glebtv-ckeditor 4.4.3.3 → 4.4.3.4

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: e54a1c71d4dc40fcb0fb7e9da1d2caf8af55f370
4
- data.tar.gz: 27e760ba0d7837d55b82996c558989a374972d2e
3
+ metadata.gz: d485a8b1df7dc5b6e3bacbb44fbb8a6e4eba3cc5
4
+ data.tar.gz: 6e664a7958dc53b87415eb1f2bf7475238bc45a8
5
5
  SHA512:
6
- metadata.gz: 4c5f4aee8c389d23c10e26ae5e3f53870058dd6c7425ad45374c6e4ea6e392fc1856597fce2a3d9e24703a5d201fc0ecff1764d3c755d221aa872609c280bd07
7
- data.tar.gz: a9bf7ef636e9c86b8066cf5d8486e3c326fa8a7becf14725eb382033dab581eae8a7363c6149c5a9d584dae0cdcd478fbca4a61a41b2c074b0aef45227cbedf9
6
+ metadata.gz: 48f57823de6c9eaae06c0b1826cea0203a8dea3f007e50bb5cb44820a91aeaea2d1dccc5bf51118b7e155c129d82be75cc27ae84aabe84664b6be114159f645c
7
+ data.tar.gz: 70a4ccee28ecb77e20bc9fe49a0cd620b9bffe642ed801995284a8f894adb5c9904a50d1f51efb7d1919b27fbc7026340fc0c13404512fb7166c148b712278d9
@@ -1,4 +1,4 @@
1
1
  module Ckeditor
2
- VERSION="4.4.3.3".freeze
2
+ VERSION="4.4.3.4".freeze
3
3
  end
4
4
 
@@ -2,7 +2,10 @@ class Ckeditor::AttachmentFile < Ckeditor::Asset
2
2
  has_attached_file :data,
3
3
  :url => "/ckeditor_assets/attachments/:id/:filename",
4
4
  :path => ":rails_root/public/ckeditor_assets/attachments/:id/:filename"
5
-
5
+
6
+ if respond_to?(:do_not_validate_attachment_file_type)
7
+ do_not_validate_attachment_file_type :data, if: :data?
8
+ end
6
9
  validates_attachment_size :data, :less_than => 100.megabytes
7
10
  validates_attachment_presence :data
8
11
 
@@ -3,8 +3,11 @@ class Ckeditor::Picture < Ckeditor::Asset
3
3
  :url => "/ckeditor_assets/pictures/:id/:style_:basename.:extension",
4
4
  :path => ":rails_root/public/ckeditor_assets/pictures/:id/:style_:basename.:extension",
5
5
  :styles => { :content => '800>', :thumb => '118x100#' }
6
-
7
- validates_attachment_size :data, :less_than => 2.megabytes
6
+
7
+ if respond_to?(:validates_attachment_content_type)
8
+ validates_attachment_content_type :data, :content_type => ['image/gif', 'image/jpeg', 'image/jpg', 'image/png'], if: :data?
9
+ end
10
+ validates_attachment_size :data, :less_than => 10.megabytes
8
11
  validates_attachment_presence :data
9
12
 
10
13
  def url_content
@@ -2,7 +2,11 @@ class Ckeditor::AttachmentFile < Ckeditor::Asset
2
2
  has_mongoid_attached_file :data,
3
3
  :url => "/ckeditor_assets/attachments/:id/:filename",
4
4
  :path => ":rails_root/public/ckeditor_assets/attachments/:id/:filename"
5
-
5
+
6
+ if respond_to?(:do_not_validate_attachment_file_type)
7
+ do_not_validate_attachment_file_type :data, if: :data?
8
+ end
9
+
6
10
  validates_attachment_size :data, :less_than => 100.megabytes
7
11
  validates_attachment_presence :data
8
12
 
@@ -3,8 +3,11 @@ class Ckeditor::Picture < Ckeditor::Asset
3
3
  :url => "/ckeditor_assets/pictures/:id/:style_:basename.:extension",
4
4
  :path => ":rails_root/public/ckeditor_assets/pictures/:id/:style_:basename.:extension",
5
5
  :styles => { :content => '800>', :thumb => '118x100#' }
6
-
7
- validates_attachment_size :data, :less_than => 2.megabytes
6
+
7
+ if respond_to?(:validates_attachment_content_type)
8
+ validates_attachment_content_type :data, :content_type => ['image/gif', 'image/jpeg', 'image/jpg', 'image/png'], if: :data?
9
+ end
10
+ validates_attachment_size :data, :less_than => 10.megabytes
8
11
  validates_attachment_presence :data
9
12
 
10
13
  def url_content
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glebtv-ckeditor
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.3.3
4
+ version: 4.4.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Galeta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-12 00:00:00.000000000 Z
11
+ date: 2014-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails