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
6572554c
Commit
6572554c
authored
Apr 01, 2014
by
lanrion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hot fix for without redis config
parent
daf34aa0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
lib/weixin_authorize/adapter/redis_storage.rb
+1
-1
lib/weixin_authorize/adapter/storage.rb
+1
-1
lib/weixin_authorize/config.rb
+5
-0
No files found.
lib/weixin_authorize/adapter/redis_storage.rb
View file @
6572554c
...
@@ -27,7 +27,7 @@ module WeixinAuthorize
...
@@ -27,7 +27,7 @@ module WeixinAuthorize
end
end
def
weixin_redis
def
weixin_redis
WeixinAuthorize
.
config
.
redis
WeixinAuthorize
.
weixin_
redis
end
end
end
end
...
...
lib/weixin_authorize/adapter/storage.rb
View file @
6572554c
...
@@ -10,7 +10,7 @@ module WeixinAuthorize
...
@@ -10,7 +10,7 @@ module WeixinAuthorize
end
end
def
self
.
init_with
(
client
)
def
self
.
init_with
(
client
)
if
WeixinAuthorize
.
config
.
redis
.
nil?
if
WeixinAuthorize
.
weixin_
redis
.
nil?
ClientStorage
.
new
(
client
)
ClientStorage
.
new
(
client
)
else
else
RedisStorage
.
new
(
client
)
RedisStorage
.
new
(
client
)
...
...
lib/weixin_authorize/config.rb
View file @
6572554c
...
@@ -7,6 +7,11 @@ module WeixinAuthorize
...
@@ -7,6 +7,11 @@ module WeixinAuthorize
def
configure
def
configure
yield
self
.
config
||=
Config
.
new
yield
self
.
config
||=
Config
.
new
end
end
def
weixin_redis
return
nil
if
WeixinAuthorize
.
config
.
nil?
@redis
||=
WeixinAuthorize
.
config
.
redis
end
end
end
class
Config
class
Config
...
...
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