Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaoye
mycard
Commits
b845f12c
Commit
b845f12c
authored
Apr 02, 2012
by
zh99998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版本0.5.0 ygocore头像,稳定
parent
3349bd95
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
lib/iduel/user.rb
lib/iduel/user.rb
+1
-1
lib/update.rb
lib/update.rb
+1
-1
lib/ygocore/user.rb
lib/ygocore/user.rb
+1
-1
No files found.
lib/iduel/user.rb
View file @
b845f12c
...
@@ -27,7 +27,7 @@ class User
...
@@ -27,7 +27,7 @@ class User
yield
result
yield
result
Thread
.
new
do
Thread
.
new
do
open
(
"http://www.duelcn.com/uc_server/avatar.php?uid=
#{
id
-
100000
}
&size=
#{
size
}
"
,
'rb'
)
{
|
io
|
open
(
cache
,
'wb'
)
{
|
c
|
c
.
write
io
.
read
}}
rescue
cache
=
"graphics/avatars/noavatar_
#{
size
}
.gif"
open
(
"http://www.duelcn.com/uc_server/avatar.php?uid=
#{
id
-
100000
}
&size=
#{
size
}
"
,
'rb'
)
{
|
io
|
open
(
cache
,
'wb'
)
{
|
c
|
c
.
write
io
.
read
}}
rescue
cache
=
"graphics/avatars/noavatar_
#{
size
}
.gif"
yield
Surface
.
load
(
cache
)
if
scene
==
$scene
(
yield
Surface
.
load
(
cache
)
if
scene
==
$scene
)
rescue
nil
end
end
else
else
result
result
...
...
lib/update.rb
View file @
b845f12c
...
@@ -20,7 +20,7 @@ module Update
...
@@ -20,7 +20,7 @@ module Update
end
end
f
.
extract
{
true
}
f
.
extract
{
true
}
end
end
end
end
rescue
$log
.
error
(
'安装更新出错'
){
file
+
$!
.
inspect
+
$!
.
backtrace
.
inspect
}
Version
.
replace
$2
Version
.
replace
$2
File
.
delete
file
File
.
delete
file
@updated
=
true
@updated
=
true
...
...
lib/ygocore/user.rb
View file @
b845f12c
...
@@ -28,7 +28,7 @@ class User
...
@@ -28,7 +28,7 @@ class User
Thread
.
new
do
Thread
.
new
do
require
'cgi'
require
'cgi'
open
(
"http://card.touhou.cc/users/
#{
CGI
.
escape
@id
.
to_s
}
.png"
,
'rb'
)
{
|
io
|
open
(
cache
,
'wb'
)
{
|
c
|
c
.
write
io
.
read
}}
rescue
cache
=
"graphics/avatars/noavatar_
#{
size
}
.gif"
open
(
"http://card.touhou.cc/users/
#{
CGI
.
escape
@id
.
to_s
}
.png"
,
'rb'
)
{
|
io
|
open
(
cache
,
'wb'
)
{
|
c
|
c
.
write
io
.
read
}}
rescue
cache
=
"graphics/avatars/noavatar_
#{
size
}
.gif"
yield
Surface
.
load
(
cache
)
if
scene
==
$scene
(
yield
Surface
.
load
(
cache
)
if
scene
==
$scene
)
rescue
nil
end
end
else
else
result
result
...
...
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