paperclip-dimension 0.3.0 → 0.3.1

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: 7121833dd0fe9f1b3db0c6ff4022a16d9456bd2c
4
- data.tar.gz: 479db6c06ebb406319523c948245112767cfae10
3
+ metadata.gz: 8d10ec9a9a64b1808833e16c811797b3d3bb18c3
4
+ data.tar.gz: 4e2a6bb91c3d1075ecc2b541d9a3dcbc08a33dca
5
5
  SHA512:
6
- metadata.gz: 7ea2c5a35ded79db2784da8a8d405802418858c9b4638f76bfc9838dba6bba6d2e17b0f4b3d102b1d7e9693b1a7fe0a6a93b24a5cfe87ead081559fe3a965170
7
- data.tar.gz: a4c980107021aeb1cb2224a96ab8ceda12126491265612c84c8473558f87993f5ca7a5580f2f45cd19d9ee9a54c9709c100159a21808408f3d3801efd021f70c
6
+ metadata.gz: deb230018bc3a3151e1deb1f4b3dc00382f4726e2b1124af6f69ade9ea3fabf682b6f5637ea0dbb1b7ce0089103c768072042b3250cf54c183b8e1a19dd8cf4b
7
+ data.tar.gz: 3cfdadc38735290f2efed0f6b8d3184db02db77c0a4d2c201be3884da8f7576c40af52c94c9f8528edde44ad37db5f34f3354fa41f436bc9027261cf14192f27
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://secure.travis-ci.org/aq1018/paperclip-dimension.svg)](https://travis-ci.org/aq1018/paperclip-dimension) [![Code Climate](https://codeclimate.com/github/aq1018/paperclip-dimension.svg)](https://codeclimate.com/github/aq1018/paperclip-dimension)
2
+
1
3
  paperclip-dimension
2
4
  ===================
3
5
 
@@ -34,6 +34,7 @@ module Paperclip
34
34
  def save_dimensions_for(name)
35
35
  dimension_hash = {}
36
36
  attachment = self.send(name)
37
+ return unless attachment.content_type =~ %r{^(image|(x-)?application)/(bmp|gif|jpeg|jpg|pjpeg|png|x-png)$}
37
38
  styles = [:original]
38
39
  styles += attachment.styles.keys if attachment.styles
39
40
  styles.each do |style|
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Paperclip
3
3
  module Dimension
4
- VERSION = '0.3.0'.freeze
4
+ VERSION = '0.3.1'.freeze
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip-dimension
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Qian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-14 00:00:00.000000000 Z
11
+ date: 2016-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paperclip
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  requirements: []
130
130
  rubyforge_project:
131
- rubygems_version: 2.4.7
131
+ rubygems_version: 2.6.7
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: A simple plugin to persist image dimensions.