Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-shell
Commits
e88ec0a4
Commit
e88ec0a4
authored
May 12, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put redis library in lib/vendor/ and adjust LOAD_PATH
parent
729470d3
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
26 additions
and
34 deletions
+26
-34
.gitignore
.gitignore
+0
-1
.rubocop.yml
.rubocop.yml
+1
-1
Makefile
Makefile
+4
-12
lib/gitlab_config.rb
lib/gitlab_config.rb
+1
-0
lib/gitlab_net.rb
lib/gitlab_net.rb
+1
-1
lib/vendor/redis/lib/redis.rb
lib/vendor/redis/lib/redis.rb
+6
-6
lib/vendor/redis/lib/redis/client.rb
lib/vendor/redis/lib/redis/client.rb
+2
-2
lib/vendor/redis/lib/redis/connection.rb
lib/vendor/redis/lib/redis/connection.rb
+2
-2
lib/vendor/redis/lib/redis/connection/command_helper.rb
lib/vendor/redis/lib/redis/connection/command_helper.rb
+0
-0
lib/vendor/redis/lib/redis/connection/hiredis.rb
lib/vendor/redis/lib/redis/connection/hiredis.rb
+2
-2
lib/vendor/redis/lib/redis/connection/registry.rb
lib/vendor/redis/lib/redis/connection/registry.rb
+0
-0
lib/vendor/redis/lib/redis/connection/ruby.rb
lib/vendor/redis/lib/redis/connection/ruby.rb
+3
-3
lib/vendor/redis/lib/redis/connection/synchrony.rb
lib/vendor/redis/lib/redis/connection/synchrony.rb
+3
-3
lib/vendor/redis/lib/redis/distributed.rb
lib/vendor/redis/lib/redis/distributed.rb
+1
-1
lib/vendor/redis/lib/redis/errors.rb
lib/vendor/redis/lib/redis/errors.rb
+0
-0
lib/vendor/redis/lib/redis/hash_ring.rb
lib/vendor/redis/lib/redis/hash_ring.rb
+0
-0
lib/vendor/redis/lib/redis/pipeline.rb
lib/vendor/redis/lib/redis/pipeline.rb
+0
-0
lib/vendor/redis/lib/redis/subscribe.rb
lib/vendor/redis/lib/redis/subscribe.rb
+0
-0
lib/vendor/redis/lib/redis/version.rb
lib/vendor/redis/lib/redis/version.rb
+0
-0
No files found.
.gitignore
View file @
e88ec0a4
...
...
@@ -8,4 +8,3 @@ coverage/
.bundle
tags
.bundle/
*.orig
.rubocop.yml
View file @
e88ec0a4
...
...
@@ -964,7 +964,7 @@ AllCops:
-
'
bin/**/*'
-
'
lib/backup/**/*'
-
'
lib/tasks/**/*'
-
'
lib/vendor/**/*'
-
'
lib/email_validator.rb'
-
'
lib/gitlab/upgrader.rb'
-
'
lib/gitlab/seeder.rb'
-
'
lib/vendor/**/*'
Makefile
View file @
e88ec0a4
REDIS_RB_VERSION
=
v3.3.0
REDIS_RB_TMP_DIR
:=
$(
shell
mktemp
-d
)
REDIS_RB_VENDOR_DIR
=
lib/vendor
REDIS_RB_VENDOR_DIR
=
lib/vendor/redis
PWD
=
`
pwd
`
all
:
update-redis
:
git clone https://github.com/redis/redis-rb.git
$(REDIS_RB_TMP_DIR)
cd
$(REDIS_RB_TMP_DIR)
;
git checkout
$(REDIS_RB_VERSION)
cd
$(PWD)
mkdir
-p
$(REDIS_RB_VENDOR_DIR)
cp
-r
$(REDIS_RB_TMP_DIR)
/lib/
*
$(REDIS_RB_VENDOR_DIR)
# Adjust all 'require redis/' paths to relative paths
sed
-i
.orig
-e
's/require "redis/require_relative "redis/g'
$(REDIS_RB_VENDOR_DIR)
/redis.rb
find
$(REDIS_RB_VENDOR_DIR)
/redis
-name
\*
.rb
-maxdepth
1
-exec
sed
-i
.orig
-e
"s/require
\"
redis
\/
/require_relative
\"
/g"
{}
\;
find
$(REDIS_RB_VENDOR_DIR)
/redis/connection
-name
\*
.rb
-maxdepth
1
-exec
sed
-i
.orig
-e
's/require "redis\/connection\//require_relative "/g'
*
.rb
{}
\;
find
$(REDIS_RB_VENDOR_DIR)
/redis/connection
-name
\*
.rb
-maxdepth
1
-exec
sed
-i
.orig
-e
's/require "redis\//require_relative "..\//g'
*
.rb
{}
\;
rm
-rf
$(REDIS_RB_VENDOR_DIR)
git clone
-b
$(REDIS_RB_VERSION)
https://github.com/redis/redis-rb.git
$(REDIS_RB_VENDOR_DIR)
rm
-rf
$(REDIS_RB_VENDOR_DIR)
/.git
.PHONY
=
update-redis
lib/gitlab_config.rb
View file @
e88ec0a4
$:
.
unshift
(
File
.
expand_path
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'vendor/redis/lib'
)))
require
'yaml'
class
GitlabConfig
...
...
lib/gitlab_net.rb
View file @
e88ec0a4
require
'net/http'
require
'openssl'
require
'json'
require
'redis'
require_relative
'gitlab_config'
require_relative
'gitlab_logger'
require_relative
'gitlab_access'
require_relative
'httpunix'
require_relative
'vendor/redis'
class
GitlabNet
class
ApiUnreachableError
<
StandardError
;
end
...
...
lib/vendor/redis.rb
→
lib/vendor/redis
/lib/redis
.rb
View file @
e88ec0a4
require
"monitor"
require
_relative
"redis/errors"
require
"redis/errors"
class
Redis
...
...
@@ -2766,8 +2766,8 @@ private
end
require
_relative
"redis/version"
require
_relative
"redis/connection"
require
_relative
"redis/client"
require
_relative
"redis/pipeline"
require
_relative
"redis/subscribe"
require
"redis/version"
require
"redis/connection"
require
"redis/client"
require
"redis/pipeline"
require
"redis/subscribe"
lib/vendor/redis/client.rb
→
lib/vendor/redis/
lib/redis/
client.rb
View file @
e88ec0a4
require
_relative
"
errors"
require
"redis/
errors"
require
"socket"
require
"cgi"
...
...
@@ -478,7 +478,7 @@ class Redis
if
driver
.
kind_of?
(
String
)
begin
require
_relative
"
connection/
#{
driver
}
"
require
"redis/
connection/
#{
driver
}
"
driver
=
Connection
.
const_get
(
driver
.
capitalize
)
rescue
LoadError
,
NameError
raise
RuntimeError
,
"Cannot load driver
#{
driver
.
inspect
}
"
...
...
lib/vendor/redis/connection.rb
→
lib/vendor/redis/
lib/redis/
connection.rb
View file @
e88ec0a4
require
_relative
"
connection/registry"
require
"redis/
connection/registry"
# If a connection driver was required before this file, the array
# Redis::Connection.drivers will contain one or more classes. The last driver
...
...
@@ -6,4 +6,4 @@ require_relative "connection/registry"
# the plain Ruby driver as our default. Another driver can be required at a
# later point in time, causing it to be the last element of the #drivers array
# and therefore be chosen by default.
require
_relative
"
connection/ruby"
if
Redis
::
Connection
.
drivers
.
empty?
require
"redis/
connection/ruby"
if
Redis
::
Connection
.
drivers
.
empty?
\ No newline at end of file
lib/vendor/redis/connection/command_helper.rb
→
lib/vendor/redis/
lib/redis/
connection/command_helper.rb
View file @
e88ec0a4
File moved
lib/vendor/redis/connection/hiredis.rb
→
lib/vendor/redis/
lib/redis/
connection/hiredis.rb
View file @
e88ec0a4
require
_relative
"
registry"
require
_relative
"..
/errors"
require
"redis/connection/
registry"
require
"redis
/errors"
require
"hiredis/connection"
require
"timeout"
...
...
lib/vendor/redis/connection/registry.rb
→
lib/vendor/redis/
lib/redis/
connection/registry.rb
View file @
e88ec0a4
File moved
lib/vendor/redis/connection/ruby.rb
→
lib/vendor/redis/
lib/redis/
connection/ruby.rb
View file @
e88ec0a4
require
_relative
"
registry"
require
_relative
"
command_helper"
require
_relative
"..
/errors"
require
"redis/connection/
registry"
require
"redis/connection/
command_helper"
require
"redis
/errors"
require
"socket"
require
"timeout"
...
...
lib/vendor/redis/connection/synchrony.rb
→
lib/vendor/redis/
lib/redis/
connection/synchrony.rb
View file @
e88ec0a4
require
_relative
"
command_helper"
require
_relative
"
registry"
require
_relative
"..
/errors"
require
"redis/connection/
command_helper"
require
"redis/connection/
registry"
require
"redis
/errors"
require
"em-synchrony"
require
"hiredis/reader"
...
...
lib/vendor/redis/distributed.rb
→
lib/vendor/redis/
lib/redis/
distributed.rb
View file @
e88ec0a4
require
_relative
"
hash_ring"
require
"redis/
hash_ring"
class
Redis
class
Distributed
...
...
lib/vendor/redis/errors.rb
→
lib/vendor/redis/
lib/redis/
errors.rb
View file @
e88ec0a4
File moved
lib/vendor/redis/hash_ring.rb
→
lib/vendor/redis/
lib/redis/
hash_ring.rb
View file @
e88ec0a4
File moved
lib/vendor/redis/pipeline.rb
→
lib/vendor/redis/
lib/redis/
pipeline.rb
View file @
e88ec0a4
File moved
lib/vendor/redis/subscribe.rb
→
lib/vendor/redis/
lib/redis/
subscribe.rb
View file @
e88ec0a4
File moved
lib/vendor/redis/version.rb
→
lib/vendor/redis/
lib/redis/
version.rb
View file @
e88ec0a4
File moved
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