Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check if file is a StringIO

Fixes image_file_string=
  • Loading branch information...
commit 4dc88f4217045826c22cef3298b4dfb3a7440f03 1 parent ecf88b3
@hewo authored
Showing with 6 additions and 5 deletions.
  1. +1 −1  VERSION
  2. +3 −3 fleximage.gemspec
  3. +2 −1  lib/fleximage/model.rb
View
2  VERSION
@@ -1 +1 @@
-1.0.6
+1.0.7
View
6 fleximage.gemspec
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{fleximage}
- s.version = "1.0.5"
+ s.version = "1.0.7"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
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ïc Guitaut", "Martin Vielsmaier", "Squeegy", "Thomas von Deyen", "Vannoy", "Wolfgang Klinger", "Wolfgang Kölbl", "josei", "ralph"]
@@ -24,6 +24,7 @@ super easy.
"Rakefile",
"VERSION",
"autotest.rb",
+ "fleximage.gemspec",
"init.rb",
"lib/dsl_accessor.rb",
"lib/fleximage.rb",
@@ -151,8 +152,7 @@ super easy.
"test/unit/preprocess_image_option_test.rb",
"test/unit/require_image_option_test.rb",
"test/unit/temp_image_test.rb",
- "test/unit/use_creation_date_based_directories_option_test.rb",
- "tvdeyen-fleximage.gemspec"
+ "test/unit/use_creation_date_based_directories_option_test.rb"
]
s.homepage = %q{http://github.com/hewo/fleximage}
s.require_paths = ["lib"]
View
3  lib/fleximage/model.rb
@@ -335,7 +335,8 @@ def url_format
def image_file=(file)
if self.class.image_file_exists(file)
- file_path = file.is_a?( ActionDispatch::Http::UploadedFile ) ? file.tempfile.path : file.path
+ file_path=file.tempfile.path if file.is_a?( ActionDispatch::Http::UploadedFile )
+ file_path=file.path unless file.is_a? StringIO
# Create RMagick Image object from uploaded file
if file_path
Please sign in to comment.
Something went wrong with that request. Please try again.