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
7792407e
Commit
7792407e
authored
Nov 14, 2008
by
Jon Yurek
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://github.com/laserlemon/paperclip
parents
5751624c
9f3fec1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
lib/paperclip/geometry.rb
+2
-1
test/geometry_test.rb
+7
-5
No files found.
lib/paperclip/geometry.rb
View file @
7792407e
...
...
@@ -65,7 +65,8 @@ module Paperclip
def
to_s
s
=
""
s
<<
width
.
to_i
.
to_s
if
width
>
0
s
<<
"x
#{
height
.
to_i
}#{
modifier
}
"
if
height
>
0
s
<<
"x
#{
height
.
to_i
}
"
if
height
>
0
s
<<
modifier
.
to_s
s
end
...
...
test/geometry_test.rb
View file @
7792407e
...
...
@@ -44,11 +44,6 @@ class GeometryTest < Test::Unit::TestCase
assert_equal
0
,
@geo
.
height
end
should
"ensure the modifier is nil if only one dimension present"
do
assert
@geo
=
Paperclip
::
Geometry
.
parse
(
"123x"
)
assert_nil
@geo
.
modifier
end
should
"ensure the modifier is nil if not present"
do
assert
@geo
=
Paperclip
::
Geometry
.
parse
(
"123x456"
)
assert_nil
@geo
.
modifier
...
...
@@ -60,6 +55,13 @@ class GeometryTest < Test::Unit::TestCase
assert_equal
mod
,
@geo
.
modifier
end
end
[
'>'
,
'<'
,
'#'
,
'@'
,
'%'
,
'^'
,
'!'
].
each
do
|
mod
|
should
"ensure the modifier
#{
mod
}
gets passed to ImageMagic"
do
assert
@geo
=
Paperclip
::
Geometry
.
parse
(
"123x
#{
mod
}
"
)
assert_equal
mod
,
@geo
.
to_s
.
last
end
end
should
"make sure the modifier gets passed during transformation_to"
do
assert
@src
=
Paperclip
::
Geometry
.
parse
(
"123x456"
)
...
...
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