Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weixin_authorize
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
weixin_authorize
Commits
94cbc1ba
Commit
94cbc1ba
authored
Apr 19, 2014
by
lanrion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added fake date
parent
b23ec14b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
lib/weixin_authorize/api/media.rb
+1
-0
spec/api/media_spec.rb
+2
-2
No files found.
lib/weixin_authorize/api/media.rb
View file @
94cbc1ba
...
@@ -29,6 +29,7 @@ module WeixinAuthorize
...
@@ -29,6 +29,7 @@ module WeixinAuthorize
base
=
WeixinUploader
.
new
base
=
WeixinUploader
.
new
base
.
download!
(
media
.
to_s
)
base
.
download!
(
media
.
to_s
)
base
.
file
.
to_file
base
.
file
.
to_file
# CarrierWave.clean_cached_files!
else
else
media
.
is_a?
(
File
)
?
media
:
File
.
new
(
media
)
media
.
is_a?
(
File
)
?
media
:
File
.
new
(
media
)
end
end
...
...
spec/api/media_spec.rb
View file @
94cbc1ba
...
@@ -11,8 +11,8 @@ describe WeixinAuthorize::Api::Media do
...
@@ -11,8 +11,8 @@ describe WeixinAuthorize::Api::Media do
end
end
let
(
:remote_image_path
)
do
let
(
:remote_image_path
)
do
#
"http://l.ruby-china.org/user/large_avatar/273.png"
"http://l.ruby-china.org/user/large_avatar/273.png"
"http://g.hiphotos.baidu.com/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign=ce55457e4334970a537e187df4a3baad/03087bf40ad162d99455ef4d13dfa9ec8b13632762d0ed14.jpg"
#
"http://g.hiphotos.baidu.com/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign=ce55457e4334970a537e187df4a3baad/03087bf40ad162d99455ef4d13dfa9ec8b13632762d0ed14.jpg"
end
end
it
"can upload a image"
do
it
"can upload a image"
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