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
47b540d5
Commit
47b540d5
authored
Aug 03, 2015
by
Tute Costa
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1949 from alassek/geometry-string-fix
Fix GeometryParser for '@>' special case
parents
c819d5da
b0e515ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lib/paperclip/geometry_parser_factory.rb
+1
-1
spec/paperclip/geometry_spec.rb
+1
-1
No files found.
lib/paperclip/geometry_parser_factory.rb
View file @
47b540d5
module
Paperclip
class
GeometryParser
FORMAT
=
/\b(\d*)x?(\d*)\b(?:,(\d?))?([\>\<\#\@\%^!])?/i
FORMAT
=
/\b(\d*)x?(\d*)\b(?:,(\d?))?(
\@\>|\>\@|
[\>\<\#\@\%^!])?/i
def
initialize
(
string
)
@string
=
string
end
...
...
spec/paperclip/geometry_spec.rb
View file @
47b540d5
...
...
@@ -82,7 +82,7 @@ describe Paperclip::Geometry do
assert_equal
456
,
@upper
.
height
end
[
'>'
,
'<'
,
'#'
,
'@'
,
'%'
,
'^'
,
'!'
,
nil
].
each
do
|
mod
|
[
'>'
,
'<'
,
'#'
,
'@'
,
'
@>'
,
'>@'
,
'
%'
,
'^'
,
'!'
,
nil
].
each
do
|
mod
|
it
"ensures the modifier
#{
description
}
is preserved"
do
assert
@geo
=
Paperclip
::
Geometry
.
parse
(
"123x456
#{
mod
}
"
)
assert_equal
mod
,
@geo
.
modifier
...
...
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