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
3a35ba9f
Commit
3a35ba9f
authored
Sep 14, 2011
by
Denis Yagofarov
Committed by
Prem Sichanugrist
Sep 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save Cocaine::CommandLine.path that already set
parent
825e1f15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
+7
-1
lib/paperclip.rb
+2
-1
test/paperclip_test.rb
+5
-0
No files found.
lib/paperclip.rb
View file @
3a35ba9f
...
...
@@ -97,7 +97,8 @@ module Paperclip
if
options
[
:image_magick_path
]
Paperclip
.
log
(
"[DEPRECATION] :image_magick_path is deprecated and will be removed. Use :command_path instead"
)
end
Cocaine
::
CommandLine
.
path
=
options
[
:command_path
]
||
options
[
:image_magick_path
]
command_path
=
options
[
:command_path
]
||
options
[
:image_magick_path
]
Cocaine
::
CommandLine
.
path
=
(
Cocaine
::
CommandLine
.
path
?
[
Cocaine
::
CommandLine
.
path
,
command_path
].
flatten
:
command_path
)
Cocaine
::
CommandLine
.
new
(
cmd
,
*
params
).
run
end
...
...
test/paperclip_test.rb
View file @
3a35ba9f
...
...
@@ -6,6 +6,11 @@ class PaperclipTest < Test::Unit::TestCase
Cocaine
::
CommandLine
.
expects
(
:new
).
with
(
"convert"
,
"stuff"
).
returns
(
stub
(
:run
))
Paperclip
.
run
(
"convert"
,
"stuff"
)
end
should
"save Cocaine::CommandLine.path that set before"
do
Cocaine
::
CommandLine
.
path
=
"/opt/my_app/bin"
Paperclip
.
run
(
"convert"
,
"stuff"
)
assert_equal
[
Cocaine
::
CommandLine
.
path
].
flatten
.
include?
(
"/opt/my_app/bin"
),
true
end
end
context
"Paperclip.each_instance_with_attachment"
do
...
...
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