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
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
Léo-Paul Géneau
gitlab-ce
Commits
5a7fbb8d
Commit
5a7fbb8d
authored
May 03, 2018
by
blackst0ne
Committed by
Rémy Coutable
May 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Rails5] Fix params passed to MergeWorker
parent
38a5bcd1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
Gemfile.rails5.lock
Gemfile.rails5.lock
+4
-6
app/models/merge_request.rb
app/models/merge_request.rb
+1
-1
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+1
-1
No files found.
Gemfile.rails5.lock
View file @
5a7fbb8d
...
@@ -162,6 +162,7 @@ GEM
...
@@ -162,6 +162,7 @@ GEM
activerecord (>= 3.2.0, < 5.2)
activerecord (>= 3.2.0, < 5.2)
descendants_tracker (0.0.4)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
thread_safe (~> 0.3, >= 0.3.1)
device_detector (1.0.1)
devise (4.4.1)
devise (4.4.1)
bcrypt (~> 3.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
orm_adapter (~> 0.1)
...
@@ -375,7 +376,7 @@ GEM
...
@@ -375,7 +376,7 @@ GEM
rake
rake
grape_logging (1.7.0)
grape_logging (1.7.0)
grape
grape
grpc (1.1
0
.0)
grpc (1.1
1
.0)
google-protobuf (~> 3.1)
google-protobuf (~> 3.1)
googleapis-common-protos-types (~> 1.0.0)
googleapis-common-protos-types (~> 1.0.0)
googleauth (>= 0.5.1, < 0.7)
googleauth (>= 0.5.1, < 0.7)
...
@@ -554,9 +555,6 @@ GEM
...
@@ -554,9 +555,6 @@ GEM
jwt (>= 1.5)
jwt (>= 1.5)
omniauth (>= 1.1.1)
omniauth (>= 1.1.1)
omniauth-oauth2 (>= 1.5)
omniauth-oauth2 (>= 1.5)
omniauth-jwt (0.0.2)
jwt
omniauth (~> 1.1)
omniauth-kerberos (0.3.0)
omniauth-kerberos (0.3.0)
omniauth-multipassword
omniauth-multipassword
timfel-krb5-auth (~> 0.8)
timfel-krb5-auth (~> 0.8)
...
@@ -1033,6 +1031,7 @@ DEPENDENCIES
...
@@ -1033,6 +1031,7 @@ DEPENDENCIES
database_cleaner (~> 1.5.0)
database_cleaner (~> 1.5.0)
deckar01-task_list (= 2.0.0)
deckar01-task_list (= 2.0.0)
default_value_for (~> 3.0.5)
default_value_for (~> 3.0.5)
device_detector
devise (~> 4.2)
devise (~> 4.2)
devise-two-factor (~> 3.0.0)
devise-two-factor (~> 3.0.0)
diffy (~> 3.1.0)
diffy (~> 3.1.0)
...
@@ -1080,7 +1079,7 @@ DEPENDENCIES
...
@@ -1080,7 +1079,7 @@ DEPENDENCIES
grape-entity (~> 0.6.0)
grape-entity (~> 0.6.0)
grape-route-helpers (~> 2.1.0)
grape-route-helpers (~> 2.1.0)
grape_logging (~> 1.7)
grape_logging (~> 1.7)
grpc (~> 1.1
0
.0)
grpc (~> 1.1
1
.0)
haml_lint (~> 0.26.0)
haml_lint (~> 0.26.0)
hamlit (~> 2.6.1)
hamlit (~> 2.6.1)
hashie-forbidden_attributes
hashie-forbidden_attributes
...
@@ -1121,7 +1120,6 @@ DEPENDENCIES
...
@@ -1121,7 +1120,6 @@ DEPENDENCIES
omniauth-github (~> 1.1.1)
omniauth-github (~> 1.1.1)
omniauth-gitlab (~> 1.0.2)
omniauth-gitlab (~> 1.0.2)
omniauth-google-oauth2 (~> 0.5.3)
omniauth-google-oauth2 (~> 0.5.3)
omniauth-jwt (~> 0.0.2)
omniauth-kerberos (~> 0.3.0)
omniauth-kerberos (~> 0.3.0)
omniauth-oauth2-generic (~> 0.2.2)
omniauth-oauth2-generic (~> 0.2.2)
omniauth-saml (~> 1.10)
omniauth-saml (~> 1.10)
...
...
app/models/merge_request.rb
View file @
5a7fbb8d
...
@@ -323,7 +323,7 @@ class MergeRequest < ActiveRecord::Base
...
@@ -323,7 +323,7 @@ class MergeRequest < ActiveRecord::Base
# updates `merge_jid` with the MergeWorker#jid.
# updates `merge_jid` with the MergeWorker#jid.
# This helps tracking enqueued and ongoing merge jobs.
# This helps tracking enqueued and ongoing merge jobs.
def
merge_async
(
user_id
,
params
)
def
merge_async
(
user_id
,
params
)
jid
=
MergeWorker
.
perform_async
(
id
,
user_id
,
params
)
jid
=
MergeWorker
.
perform_async
(
id
,
user_id
,
params
.
to_h
)
update_column
(
:merge_jid
,
jid
)
update_column
(
:merge_jid
,
jid
)
end
end
...
...
spec/models/merge_request_spec.rb
View file @
5a7fbb8d
...
@@ -1213,7 +1213,7 @@ describe MergeRequest do
...
@@ -1213,7 +1213,7 @@ describe MergeRequest do
it
'enqueues MergeWorker job and updates merge_jid'
do
it
'enqueues MergeWorker job and updates merge_jid'
do
merge_request
=
create
(
:merge_request
)
merge_request
=
create
(
:merge_request
)
user_id
=
double
(
:user_id
)
user_id
=
double
(
:user_id
)
params
=
double
(
:params
)
params
=
{}
merge_jid
=
'hash-123'
merge_jid
=
'hash-123'
expect
(
MergeWorker
).
to
receive
(
:perform_async
).
with
(
merge_request
.
id
,
user_id
,
params
)
do
expect
(
MergeWorker
).
to
receive
(
:perform_async
).
with
(
merge_request
.
id
,
user_id
,
params
)
do
...
...
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