BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
39b6f31c
Commit
39b6f31c
authored
Jun 01, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate constants warnings by:
* Replace `require` or `require_relative` with `require_dependency` * Remove unneeded `autoload`
parent
db40a7c4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
22 deletions
+24
-22
webpack_helper.rb
app/helpers/webpack_helper.rb
+0
-2
2_gitlab.rb
config/initializers/2_gitlab.rb
+1
-1
omniauth.rb
config/initializers/omniauth.rb
+4
-5
auth.rb
lib/gitlab/auth.rb
+4
-0
jwt.rb
lib/omni_auth/strategies/jwt.rb
+1
-3
listener.rb
lib/rspec_flaky/listener.rb
+5
-5
report.rb
lib/rspec_flaky/report.rb
+2
-2
prune-old-flaky-specs
scripts/prune-old-flaky-specs
+4
-1
jwt_spec.rb
spec/lib/omni_auth/strategies/jwt_spec.rb
+3
-3
No files found.
app/helpers/webpack_helper.rb
View file @
39b6f31c
require
'gitlab/webpack/manifest'
module
WebpackHelper
def
webpack_bundle_tag
(
bundle
)
javascript_include_tag
(
*
webpack_entrypoint_paths
(
bundle
))
...
...
config/initializers/2_gitlab.rb
View file @
39b6f31c
require_
relative
'../../lib/
gitlab'
require_
dependency
'
gitlab'
config/initializers/omniauth.rb
View file @
39b6f31c
...
...
@@ -20,11 +20,10 @@ end
if
Gitlab
.
config
.
omniauth
.
enabled
provider_names
=
Gitlab
.
config
.
omniauth
.
providers
.
map
(
&
:name
)
require
'omniauth-kerberos'
if
provider_names
.
include?
(
'kerberos'
)
end
module
OmniAuth
module
Strategies
autoload
:Bitbucket
,
Rails
.
root
.
join
(
'lib'
,
'omni_auth'
,
'strategies'
,
'bitbucket'
)
autoload
:Jwt
,
Rails
.
root
.
join
(
'lib'
,
'omni_auth'
,
'strategies'
,
'jwt'
)
Gitlab
::
Auth
.
omniauth_providers
.
each
do
|
provider
|
if
provider_names
.
include?
(
provider
)
require_dependency
"omni_auth/strategies/
#{
provider
}
"
end
end
end
lib/gitlab/auth.rb
View file @
39b6f31c
...
...
@@ -14,6 +14,10 @@ module Gitlab
DEFAULT_SCOPES
=
[
:api
].
freeze
class
<<
self
def
omniauth_providers
%w[bitbucket jwt]
end
def
find_for_git_client
(
login
,
password
,
project
:,
ip
:)
raise
"Must provide an IP for rate limiting"
if
ip
.
nil?
...
...
lib/omni_auth/strategies/jwt.rb
View file @
39b6f31c
...
...
@@ -3,7 +3,7 @@ require 'jwt'
module
OmniAuth
module
Strategies
class
J
WT
class
J
wt
ClaimInvalid
=
Class
.
new
(
StandardError
)
include
OmniAuth
::
Strategy
...
...
@@ -56,7 +56,5 @@ module OmniAuth
fail
!
:claim_invalid
,
e
end
end
class
Jwt
<
JWT
;
end
end
end
lib/rspec_flaky/listener.rb
View file @
39b6f31c
require
'json'
require_
relative
'
config'
require_
relative
'
example'
require_
relative
'
flaky_example'
require_
relative
'
flaky_examples_collection'
require_
relative
'
report'
require_
dependency
'rspec_flaky/
config'
require_
dependency
'rspec_flaky/
example'
require_
dependency
'rspec_flaky/
flaky_example'
require_
dependency
'rspec_flaky/
flaky_examples_collection'
require_
dependency
'rspec_flaky/
report'
module
RspecFlaky
class
Listener
...
...
lib/rspec_flaky/report.rb
View file @
39b6f31c
require
'json'
require
'time'
require_
relative
'
config'
require_
relative
'
flaky_examples_collection'
require_
dependency
'rspec_flaky/
config'
require_
dependency
'rspec_flaky/
flaky_examples_collection'
module
RspecFlaky
# This class is responsible for loading/saving JSON reports, and pruning
...
...
scripts/prune-old-flaky-specs
View file @
39b6f31c
...
...
@@ -5,7 +5,10 @@
# gem manually on the CI
require
'rubygems'
require_relative
'../lib/rspec_flaky/report'
singleton_class
.
__send__
(
:alias_method
,
:require_dependency
,
:require
)
$LOAD_PATH
.
unshift
(
File
.
expand_path
(
'../lib'
,
__dir__
))
require
'rspec_flaky/report'
report_file
=
ARGV
.
shift
unless
report_file
...
...
spec/lib/omni_auth/strategies/jwt_spec.rb
View file @
39b6f31c
...
...
@@ -43,7 +43,7 @@ describe OmniAuth::Strategies::Jwt do
end
it
'raises error'
do
expect
{
strategy
.
decoded
}.
to
raise_error
(
OmniAuth
::
Strategies
::
J
WT
::
ClaimInvalid
)
expect
{
strategy
.
decoded
}.
to
raise_error
(
OmniAuth
::
Strategies
::
J
wt
::
ClaimInvalid
)
end
end
...
...
@@ -61,7 +61,7 @@ describe OmniAuth::Strategies::Jwt do
end
it
'raises error'
do
expect
{
strategy
.
decoded
}.
to
raise_error
(
OmniAuth
::
Strategies
::
J
WT
::
ClaimInvalid
)
expect
{
strategy
.
decoded
}.
to
raise_error
(
OmniAuth
::
Strategies
::
J
wt
::
ClaimInvalid
)
end
end
...
...
@@ -80,7 +80,7 @@ describe OmniAuth::Strategies::Jwt do
end
it
'raises error'
do
expect
{
strategy
.
decoded
}.
to
raise_error
(
OmniAuth
::
Strategies
::
J
WT
::
ClaimInvalid
)
expect
{
strategy
.
decoded
}.
to
raise_error
(
OmniAuth
::
Strategies
::
J
wt
::
ClaimInvalid
)
end
end
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