Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
f301de52
Commit
f301de52
authored
Oct 24, 2008
by
Jon Yurek
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://github.com/bjhess/paperclip
parents
567657cb
6696a2b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
lib/paperclip.rb
+1
-1
test/integration_test.rb
+4
-4
No files found.
lib/paperclip.rb
View file @
f301de52
...
...
@@ -130,7 +130,7 @@ module Paperclip
# of thumbnail being generated. You can also specify :all as a key, which will apply
# to all of the thumbnails being generated. If you specify options for the :original,
# it would be best if you did not specify destructive options, as the intent of keeping
# the original around is to regenerate all the thumbnails
t
hen requirements change.
# the original around is to regenerate all the thumbnails
w
hen requirements change.
# has_attached_file :avatar, :styles => { :large => "300x300", :negative => "100x100" }
# :convert_options => {
# :all => "-strip",
...
...
test/integration_test.rb
View file @
f301de52
...
...
@@ -91,7 +91,7 @@ class IntegrationTest < Test::Unit::TestCase
end
end
context
"A model with no
thumbnail_
convert_options setting"
do
context
"A model with no convert_options setting"
do
setup
do
rebuild_model
:styles
=>
{
:large
=>
"300x300>"
,
:medium
=>
"100x100"
,
...
...
@@ -103,7 +103,7 @@ class IntegrationTest < Test::Unit::TestCase
end
should
"have its definition return nil when asked about convert_options"
do
assert
!
Dummy
.
attachment_definitions
[
:avatar
][
:
thumbnail_
convert_options
]
assert
!
Dummy
.
attachment_definitions
[
:avatar
][
:convert_options
]
end
context
"redefined to have convert_options setting"
do
...
...
@@ -111,14 +111,14 @@ class IntegrationTest < Test::Unit::TestCase
rebuild_model
:styles
=>
{
:large
=>
"300x300>"
,
:medium
=>
"100x100"
,
:thumb
=>
[
"32x32#"
,
:gif
]
},
:
thumbnail_
convert_options
=>
"-strip -depth 8"
,
:convert_options
=>
"-strip -depth 8"
,
:default_style
=>
:medium
,
:url
=>
"/:attachment/:class/:style/:id/:basename.:extension"
,
:path
=>
":rails_root/tmp/:attachment/:class/:style/:id/:basename.:extension"
end
should
"have its definition return convert_options value when asked about convert_options"
do
assert_equal
"-strip -depth 8"
,
Dummy
.
attachment_definitions
[
:avatar
][
:
thumbnail_
convert_options
]
assert_equal
"-strip -depth 8"
,
Dummy
.
attachment_definitions
[
:avatar
][
:convert_options
]
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment