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
f1875520
Commit
f1875520
authored
Apr 03, 2012
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rake task failure on Rails 3.2.3
parent
7d845690
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
features/basic_integration.feature
+2
-0
features/rake_tasks.feature
+1
-0
features/step_definitions/attachment_steps.rb
+4
-2
No files found.
features/basic_integration.feature
View file @
f1875520
...
...
@@ -11,6 +11,7 @@ Feature: Rails integration
Scenario
:
Filesystem integration test
Given I add this snippet to the User model
:
"""
attr_accessible :name, :attachment
has_attached_file :attachment, :url => "/system/:attachment/:style/:filename"
"""
And
I start the rails application
...
...
@@ -25,6 +26,7 @@ Feature: Rails integration
Scenario
:
S3 Integration test
Given I add this snippet to the User model
:
"""
attr_accessible :name, :attachment
has_attached_file :attachment,
:storage => :s3,
:path => "/:attachment/:style/:filename",
...
...
features/rake_tasks.feature
View file @
f1875520
...
...
@@ -7,6 +7,7 @@ Feature: Rake tasks
And
I run a migration
And I add this snippet to the User model
:
"""
attr_accessible :name, :attachment
has_attached_file :attachment, :path => ":rails_root/public/system/:attachment/:style/:filename"
"""
...
...
features/step_definitions/attachment_steps.rb
View file @
f1875520
...
...
@@ -10,11 +10,13 @@ end
World
(
AttachmentHelpers
)
When
/^I modify my attachment definition to:$/
do
|
definition
|
write_file
"app/models/user.rb"
,
<<-
FILE
class User < ActiveRecord::Base
content
=
in_current_dir
{
File
.
read
(
"app/models/user.rb"
)
}
content
.
gsub!
(
/has_attached_file.+end/m
,
<<-
FILE
)
#{
definition
}
end
FILE
write_file
"app/models/user.rb"
,
content
in_current_dir
{
FileUtils
.
rm_rf
".rbx"
}
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