mm-attach-it 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -157,11 +157,15 @@ class AttachmentOptions
157
157
 
158
158
  def file_is_resizale?
159
159
  if @styles.keys.size > 0
160
- begin
161
- system("identify -format %wx%h #{@assigned_file.path}")
162
- rescue Exception => exception
163
- false
160
+ result = ''
161
+ IO.popen("identify -format %wx%h #{@assigned_file.path} 2>&1") do |o|
162
+ @pid = o.pid
163
+ while line = o.gets do
164
+ result = result + line.to_s
165
+ end
164
166
  end
167
+
168
+ !result.match(/^\d+x\d+$/).nil?
165
169
  else
166
170
  true
167
171
  end
@@ -1,3 +1,3 @@
1
1
  module AttachIt
2
- Version = '0.1.4'
2
+ Version = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mm-attach-it
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adilson Chacon
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-28 00:00:00 Z
18
+ date: 2011-07-14 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: wand
@@ -23,12 +23,13 @@ dependencies:
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
- - - ">="
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
28
  hash: 3
29
29
  segments:
30
30
  - 0
31
- version: "0"
31
+ - 4
32
+ version: "0.4"
32
33
  type: :runtime
33
34
  version_requirements: *id001
34
35
  - !ruby/object:Gem::Dependency
@@ -37,12 +38,14 @@ dependencies:
37
38
  requirement: &id002 !ruby/object:Gem::Requirement
38
39
  none: false
39
40
  requirements:
40
- - - ">="
41
+ - - ~>
41
42
  - !ruby/object:Gem::Version
42
- hash: 3
43
+ hash: 51
43
44
  segments:
44
45
  - 0
45
- version: "0"
46
+ - 8
47
+ - 6
48
+ version: 0.8.6
46
49
  type: :runtime
47
50
  version_requirements: *id002
48
51
  - !ruby/object:Gem::Dependency