attachment_on_the_fly 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{attachment_on_the_fly}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeff Sutherland"]
12
- s.date = %q{2009-10-21}
12
+ s.date = %q{2009-11-04}
13
13
  s.description = %q{A Paperclip mix-in to allow auto-generation of resized images}
14
14
  s.email = %q{jefferey.sutherland@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -24,7 +24,9 @@ Gem::Specification.new do |s|
24
24
  "attachment_on_the_fly.gemspec",
25
25
  "init.rb",
26
26
  "lib/attachment_on_the_fly.rb",
27
- "pkg/attachment_on_the_fly-0.0.0.gem"
27
+ "pkg/attachment_on_the_fly-0.0.0.gem",
28
+ "pkg/attachment_on_the_fly-0.0.1.gem",
29
+ "pkg/attachment_on_the_fly-0.0.2.gem"
28
30
  ]
29
31
  s.homepage = %q{http://github.com/drpentode/Attachment-on-the-Fly}
30
32
  s.rdoc_options = ["--charset=UTF-8"]
@@ -69,12 +69,13 @@ Paperclip::Attachment.class_eval do
69
69
  url_path = url_arr.join("/")
70
70
 
71
71
  original = path + "/" + instance.attachment.original_filename
72
- newfilename = url_path + "/" + prefix + file_name
72
+ newfilename = path + "/" + prefix + file_name
73
+ new_path = url_path + "/" + prefix + file_name
73
74
 
74
- return newfilename if File.exist?(newfilename)
75
+ return new_path if File.exist?(newfilename)
75
76
 
76
77
  if !File.exist?(original)
77
- return newfilename
78
+ return new_path
78
79
  end
79
80
 
80
81
  if kind == "height"
@@ -88,6 +89,6 @@ Paperclip::Attachment.class_eval do
88
89
  `convert -colorspace RGB -geometry #{height}x#{height} -quality 100 #{original} #{newfilename} 2>&1 > /dev/null`
89
90
  end
90
91
 
91
- return newfilename
92
+ return new_path
92
93
  end
93
94
  end
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attachment_on_the_fly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Sutherland
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-21 00:00:00 -06:00
12
+ date: 2009-11-04 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -31,6 +31,8 @@ files:
31
31
  - init.rb
32
32
  - lib/attachment_on_the_fly.rb
33
33
  - pkg/attachment_on_the_fly-0.0.0.gem
34
+ - pkg/attachment_on_the_fly-0.0.1.gem
35
+ - pkg/attachment_on_the_fly-0.0.2.gem
34
36
  has_rdoc: true
35
37
  homepage: http://github.com/drpentode/Attachment-on-the-Fly
36
38
  licenses: []