Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
1
Merge Requests
1
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-ce
Commits
8d0604b3
Commit
8d0604b3
authored
Aug 20, 2021
by
Mayra Cabrera
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '336754-ruby3-prep' into 'master'
Prepare Ruby 3 support See merge request gitlab-org/gitlab!68531
parents
9d3bc148
7ebadfe3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
16 deletions
+20
-16
app/models/clusters/clusters_hierarchy.rb
app/models/clusters/clusters_hierarchy.rb
+1
-1
ee/db/geo/migrate/20210504143244_add_verification_to_merge_request_diff_registry.rb
...143244_add_verification_to_merge_request_diff_registry.rb
+3
-3
lib/gitlab/import_export/attributes_permitter.rb
lib/gitlab/import_export/attributes_permitter.rb
+6
-2
lib/gitlab/import_export/relation_tree_restorer.rb
lib/gitlab/import_export/relation_tree_restorer.rb
+3
-1
lib/gitlab/timeless.rb
lib/gitlab/timeless.rb
+2
-1
lib/tasks/gitlab/graphql.rake
lib/tasks/gitlab/graphql.rake
+2
-2
scripts/used-feature-flags
scripts/used-feature-flags
+1
-0
spec/migrations/update_minimum_password_length_spec.rb
spec/migrations/update_minimum_password_length_spec.rb
+1
-1
spec/models/user_spec.rb
spec/models/user_spec.rb
+1
-5
No files found.
app/models/clusters/clusters_hierarchy.rb
View file @
8d0604b3
...
...
@@ -83,7 +83,7 @@ module Clusters
project_id:
clusterable
.
id
}
model
.
sanitize_sql_array
([
Arel
.
sql
(
order
),
values
]
)
Arel
.
sql
(
model
.
sanitize_sql_array
([
Arel
.
sql
(
order
),
values
])
)
end
def
group_clusters_base_query
...
...
ee/db/geo/migrate/20210504143244_add_verification_to_merge_request_diff_registry.rb
View file @
8d0604b3
...
...
@@ -15,10 +15,10 @@ class AddVerificationToMergeRequestDiffRegistry < ActiveRecord::Migration[6.0]
add_column_unless_exists
:verification_failure
,
:string
,
limit:
255
# rubocop:disable Migration/PreventStrings because https://gitlab.com/gitlab-org/gitlab/-/issues/323806
end
def
add_column_unless_exists
(
column
,
*
arg
s
)
return
if
column_exists?
(
:merge_request_diff_registry
,
column
)
def
add_column_unless_exists
(
column
_name
,
type
,
**
option
s
)
return
if
column_exists?
(
:merge_request_diff_registry
,
column
_name
)
add_column
REGISTRY
,
column
,
*
arg
s
add_column
REGISTRY
,
column
_name
,
type
,
**
option
s
end
def
down
...
...
lib/gitlab/import_export/attributes_permitter.rb
View file @
8d0604b3
...
...
@@ -88,11 +88,15 @@ module Gitlab
end
def
build_attributes
@attributes_finder
.
included_attributes
.
each
(
&
method
(
:add_permitted_attributes
))
@attributes_finder
.
included_attributes
.
each
do
|
model_name
,
attributes
|
add_permitted_attributes
(
model_name
,
attributes
)
end
end
def
build_methods
@attributes_finder
.
methods
.
each
(
&
method
(
:add_permitted_attributes
))
@attributes_finder
.
methods
.
each
do
|
model_name
,
attributes
|
add_permitted_attributes
(
model_name
,
attributes
)
end
end
def
add_permitted_attributes
(
model_name
,
attributes
)
...
...
lib/gitlab/import_export/relation_tree_restorer.rb
View file @
8d0604b3
...
...
@@ -61,7 +61,9 @@ module Gitlab
# the configuration yaml file too.
# Finally, it updates each attribute in the newly imported project/group.
def
create_relations!
relations
.
each
(
&
method
(
:process_relation!
))
relations
.
each
do
|
relation_key
,
relation_definition
|
process_relation!
(
relation_key
,
relation_definition
)
end
end
def
process_relation!
(
relation_key
,
relation_definition
)
...
...
lib/gitlab/timeless.rb
View file @
8d0604b3
...
...
@@ -6,7 +6,8 @@ module Gitlab
original_record_timestamps
=
model
.
record_timestamps
model
.
record_timestamps
=
false
if
block
.
arity
.
abs
==
1
# negative arity means arguments are optional
if
block
.
arity
==
1
||
block
.
arity
<
0
block
.
call
(
model
)
else
block
.
call
...
...
lib/tasks/gitlab/graphql.rake
View file @
8d0604b3
...
...
@@ -111,7 +111,7 @@ namespace :gitlab do
desc
'GitLab | GraphQL | Generate GraphQL docs'
task
compile_docs:
[
:environment
,
:enable_feature_flags
]
do
renderer
=
Tooling
::
Graphql
::
Docs
::
Renderer
.
new
(
GitlabSchema
,
render_options
)
renderer
=
Tooling
::
Graphql
::
Docs
::
Renderer
.
new
(
GitlabSchema
,
**
render_options
)
renderer
.
write
...
...
@@ -120,7 +120,7 @@ namespace :gitlab do
desc
'GitLab | GraphQL | Check if GraphQL docs are up to date'
task
check_docs:
[
:environment
,
:enable_feature_flags
]
do
renderer
=
Tooling
::
Graphql
::
Docs
::
Renderer
.
new
(
GitlabSchema
,
render_options
)
renderer
=
Tooling
::
Graphql
::
Docs
::
Renderer
.
new
(
GitlabSchema
,
**
render_options
)
doc
=
File
.
read
(
Rails
.
root
.
join
(
OUTPUT_DIR
,
'index.md'
))
...
...
scripts/used-feature-flags
View file @
8d0604b3
...
...
@@ -2,6 +2,7 @@
# frozen_string_literal: true
require
'set'
require
'fileutils'
class
String
def
red
...
...
spec/migrations/update_minimum_password_length_spec.rb
View file @
8d0604b3
...
...
@@ -13,7 +13,7 @@ RSpec.describe UpdateMinimumPasswordLength do
before
do
stub_const
(
'ApplicationSetting::DEFAULT_MINIMUM_PASSWORD_LENGTH'
,
10
)
allow
(
Devise
.
password_length
).
to
receive
(
:min
).
and_return
(
12
)
allow
(
Devise
).
to
receive
(
:password_length
).
and_return
(
12
..
20
)
end
it
'correctly migrates minimum_password_length'
do
...
...
spec/models/user_spec.rb
View file @
8d0604b3
...
...
@@ -857,12 +857,8 @@ RSpec.describe User do
end
context
'maximum value'
do
before
do
allow
(
Devise
.
password_length
).
to
receive
(
:max
).
and_return
(
201
)
end
it
'is determined by the current value of `Devise.password_length.max`'
do
expect
(
password_length
.
max
).
to
eq
(
201
)
expect
(
password_length
.
max
).
to
eq
(
Devise
.
password_length
.
max
)
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