tvdeyen-fleximage 1.0.5 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.0.7
data/lib/fleximage.rb CHANGED
@@ -53,7 +53,6 @@ require 'fleximage/aviary_controller'
53
53
  ActionController::Base.class_eval{ include Fleximage::AviaryController }
54
54
 
55
55
  # Register mime types
56
- Mime::Type.register_alias "image/pjpeg", :jpg # IE6 sends jpg data as "image/pjpeg". Silly IE6.
57
- Mime::Type.register "image/jpeg", :jpg
56
+ Mime::Type.register "image/jpeg", :jpg, ["image/pjpeg"], ["jpeg"]
58
57
  Mime::Type.register "image/gif", :gif
59
58
  Mime::Type.register "image/png", :png
@@ -335,7 +335,8 @@ module Fleximage
335
335
  def image_file=(file)
336
336
  if self.class.image_file_exists(file)
337
337
 
338
- file_path = file.is_a?( ActionDispatch::Http::UploadedFile ) ? file.tempfile.path : file.path
338
+ file_path=file.path unless file.is_a? StringIO
339
+ file_path=file.tempfile.path if file.is_a?( ActionDispatch::Http::UploadedFile )
339
340
 
340
341
  # Create RMagick Image object from uploaded file
341
342
  if file_path
@@ -663,7 +664,8 @@ module Fleximage
663
664
 
664
665
  # Save the image in the rails tmp directory
665
666
  def save_temp_image(file)
666
- file_name = file.respond_to?(:original_filename) ? file.original_filename : file.path
667
+ file_name=file.path unless file.is_a? StringIO
668
+ file_name = file.original_filename if file.respond_to?(:original_filename)
667
669
  @image_file_temp = Time.now.to_f.to_s.sub('.', '_')
668
670
  path = "#{Rails.root}/tmp/fleximage"
669
671
  FileUtils.mkdir_p(path)
@@ -82,4 +82,4 @@ module Fleximage
82
82
  end
83
83
 
84
84
  end
85
- end
85
+ end
@@ -101,4 +101,4 @@ module Fleximage
101
101
  end
102
102
 
103
103
  end
104
- end
104
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tvdeyen-fleximage}
8
- s.version = "1.0.5"
8
+ s.version = "1.0.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Ahmed Adam", "Alex Wayne", "Andrew White", "Duccio", "Heiner Wohner", "JJ Buckley", "Jason Lee", "Joshua Abbott", "Koji Ando", "Kouhei Sutou", "Lasse Jansen", "Loïc Guitaut", "Martin Vielsmaier", "Squeegy", "Thomas von Deyen", "Vannoy", "Wolfgang Klinger", "Wolfgang Kölbl", "josei", "ralph"]
12
- s.date = %q{2011-05-22}
11
+ s.authors = ["Ahmed Adam", "Alex Wayne", "Andrew White", "Duccio", "Fernando Kosh", "Heiner Wohner", "JJ Buckley", "Jason Lee", "Joshua Abbott", "Koji Ando", "Kouhei Sutou", "Lasse Jansen", "Lo\303\257c Guitaut", "Martin Vielsmaier", "Squeegy", "Thomas von Deyen", "Vannoy", "Wolfgang Klinger", "Wolfgang K\303\266lbl", "josei", "ralph"]
12
+ s.date = %q{2011-09-08}
13
13
  s.description = %q{Fleximage is a Rails plugin that tries to make image uploading and rendering
14
14
  super easy.
15
15
  }
@@ -156,7 +156,7 @@ super easy.
156
156
  ]
157
157
  s.homepage = %q{http://github.com/tvdeyen/fleximage}
158
158
  s.require_paths = ["lib"]
159
- s.rubygems_version = %q{1.6.2}
159
+ s.rubygems_version = %q{1.7.2}
160
160
  s.summary = %q{Rails plugin for uploading images as resources, with support for resizing, text stamping, and other special effects.}
161
161
 
162
162
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,14 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tvdeyen-fleximage
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 25
4
5
  prerelease:
5
- version: 1.0.5
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 7
10
+ version: 1.0.7
6
11
  platform: ruby
7
12
  authors:
8
13
  - Ahmed Adam
9
14
  - Alex Wayne
10
15
  - Andrew White
11
16
  - Duccio
17
+ - Fernando Kosh
12
18
  - Heiner Wohner
13
19
  - JJ Buckley
14
20
  - Jason Lee
@@ -29,8 +35,7 @@ autorequire:
29
35
  bindir: bin
30
36
  cert_chain: []
31
37
 
32
- date: 2011-05-22 00:00:00 +02:00
33
- default_executable:
38
+ date: 2011-09-08 00:00:00 Z
34
39
  dependencies:
35
40
  - !ruby/object:Gem::Dependency
36
41
  name: rmagick
@@ -40,6 +45,9 @@ dependencies:
40
45
  requirements:
41
46
  - - ">="
42
47
  - !ruby/object:Gem::Version
48
+ hash: 3
49
+ segments:
50
+ - 0
43
51
  version: "0"
44
52
  type: :runtime
45
53
  version_requirements: *id001
@@ -51,6 +59,9 @@ dependencies:
51
59
  requirements:
52
60
  - - ">="
53
61
  - !ruby/object:Gem::Version
62
+ hash: 3
63
+ segments:
64
+ - 0
54
65
  version: "0"
55
66
  type: :runtime
56
67
  version_requirements: *id002
@@ -62,6 +73,11 @@ dependencies:
62
73
  requirements:
63
74
  - - ">="
64
75
  - !ruby/object:Gem::Version
76
+ hash: 7
77
+ segments:
78
+ - 3
79
+ - 0
80
+ - 0
65
81
  version: 3.0.0
66
82
  type: :development
67
83
  version_requirements: *id003
@@ -212,7 +228,6 @@ files:
212
228
  - test/unit/temp_image_test.rb
213
229
  - test/unit/use_creation_date_based_directories_option_test.rb
214
230
  - tvdeyen-fleximage.gemspec
215
- has_rdoc: true
216
231
  homepage: http://github.com/tvdeyen/fleximage
217
232
  licenses: []
218
233
 
@@ -226,17 +241,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
226
241
  requirements:
227
242
  - - ">="
228
243
  - !ruby/object:Gem::Version
244
+ hash: 3
245
+ segments:
246
+ - 0
229
247
  version: "0"
230
248
  required_rubygems_version: !ruby/object:Gem::Requirement
231
249
  none: false
232
250
  requirements:
233
251
  - - ">="
234
252
  - !ruby/object:Gem::Version
253
+ hash: 3
254
+ segments:
255
+ - 0
235
256
  version: "0"
236
257
  requirements: []
237
258
 
238
259
  rubyforge_project:
239
- rubygems_version: 1.6.2
260
+ rubygems_version: 1.7.2
240
261
  signing_key:
241
262
  specification_version: 3
242
263
  summary: Rails plugin for uploading images as resources, with support for resizing, text stamping, and other special effects.