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
43697d06
Commit
43697d06
authored
May 20, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename campfire service
Renames `campfire_service` to `campfire_integration`
parent
7adb9d45
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
app/models/integration.rb
app/models/integration.rb
+1
-0
app/models/project.rb
app/models/project.rb
+1
-1
spec/lib/gitlab/import_export/all_models.yml
spec/lib/gitlab/import_export/all_models.yml
+1
-1
spec/models/integrations/campfire_spec.rb
spec/models/integrations/campfire_spec.rb
+4
-4
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-1
No files found.
app/models/integration.rb
View file @
43697d06
...
@@ -42,6 +42,7 @@ class Integration < ApplicationRecord
...
@@ -42,6 +42,7 @@ class Integration < ApplicationRecord
RENAMED_TO_INTEGRATION
=
%w[
RENAMED_TO_INTEGRATION
=
%w[
asana assembla
asana assembla
bamboo bugzilla buildkite
bamboo bugzilla buildkite
campfire
]
.
to_set
.
freeze
]
.
to_set
.
freeze
serialize
:properties
,
JSON
# rubocop:disable Cop/ActiveRecordSerialize
serialize
:properties
,
JSON
# rubocop:disable Cop/ActiveRecordSerialize
...
...
app/models/project.rb
View file @
43697d06
...
@@ -160,7 +160,7 @@ class Project < ApplicationRecord
...
@@ -160,7 +160,7 @@ class Project < ApplicationRecord
has_one
:bamboo_integration
,
class_name:
'Integrations::Bamboo'
has_one
:bamboo_integration
,
class_name:
'Integrations::Bamboo'
has_one
:bugzilla_integration
,
class_name:
'Integrations::Bugzilla'
has_one
:bugzilla_integration
,
class_name:
'Integrations::Bugzilla'
has_one
:buildkite_integration
,
class_name:
'Integrations::Buildkite'
has_one
:buildkite_integration
,
class_name:
'Integrations::Buildkite'
has_one
:campfire_
service
,
class_name:
'Integrations::Campfire'
has_one
:campfire_
integration
,
class_name:
'Integrations::Campfire'
has_one
:confluence_service
,
class_name:
'Integrations::Confluence'
has_one
:confluence_service
,
class_name:
'Integrations::Confluence'
has_one
:custom_issue_tracker_service
,
class_name:
'Integrations::CustomIssueTracker'
has_one
:custom_issue_tracker_service
,
class_name:
'Integrations::CustomIssueTracker'
has_one
:datadog_service
,
class_name:
'Integrations::Datadog'
has_one
:datadog_service
,
class_name:
'Integrations::Datadog'
...
...
spec/lib/gitlab/import_export/all_models.yml
View file @
43697d06
...
@@ -362,7 +362,7 @@ project:
...
@@ -362,7 +362,7 @@ project:
-
boards
-
boards
-
last_event
-
last_event
-
integrations
-
integrations
-
campfire_
service
-
campfire_
integration
-
confluence_service
-
confluence_service
-
datadog_service
-
datadog_service
-
discord_service
-
discord_service
...
...
spec/models/integrations/campfire_spec.rb
View file @
43697d06
...
@@ -33,8 +33,8 @@ RSpec.describe Integrations::Campfire do
...
@@ -33,8 +33,8 @@ RSpec.describe Integrations::Campfire do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
before
do
@campfire_
service
=
described_class
.
new
@campfire_
integration
=
described_class
.
new
allow
(
@campfire_
service
).
to
receive_messages
(
allow
(
@campfire_
integration
).
to
receive_messages
(
project_id:
project
.
id
,
project_id:
project
.
id
,
project:
project
,
project:
project
,
service_hook:
true
,
service_hook:
true
,
...
@@ -62,7 +62,7 @@ RSpec.describe Integrations::Campfire do
...
@@ -62,7 +62,7 @@ RSpec.describe Integrations::Campfire do
speak_url
=
'https://project-name.campfirenow.com/room/123/speak.json'
speak_url
=
'https://project-name.campfirenow.com/room/123/speak.json'
stub_full_request
(
speak_url
,
method: :post
).
with
(
basic_auth:
@auth
)
stub_full_request
(
speak_url
,
method: :post
).
with
(
basic_auth:
@auth
)
@campfire_
service
.
execute
(
@sample_data
)
@campfire_
integration
.
execute
(
@sample_data
)
expect
(
WebMock
).
to
have_requested
(
:get
,
stubbed_hostname
(
@rooms_url
)).
once
expect
(
WebMock
).
to
have_requested
(
:get
,
stubbed_hostname
(
@rooms_url
)).
once
expect
(
WebMock
).
to
have_requested
(
:post
,
stubbed_hostname
(
speak_url
))
expect
(
WebMock
).
to
have_requested
(
:post
,
stubbed_hostname
(
speak_url
))
...
@@ -78,7 +78,7 @@ RSpec.describe Integrations::Campfire do
...
@@ -78,7 +78,7 @@ RSpec.describe Integrations::Campfire do
headers:
@headers
headers:
@headers
)
)
@campfire_
service
.
execute
(
@sample_data
)
@campfire_
integration
.
execute
(
@sample_data
)
expect
(
WebMock
).
to
have_requested
(
:get
,
'https://8.8.8.9/rooms.json'
).
once
expect
(
WebMock
).
to
have_requested
(
:get
,
'https://8.8.8.9/rooms.json'
).
once
expect
(
WebMock
).
not_to
have_requested
(
:post
,
'*/room/.*/speak.json'
)
expect
(
WebMock
).
not_to
have_requested
(
:post
,
'*/room/.*/speak.json'
)
...
...
spec/models/project_spec.rb
View file @
43697d06
...
@@ -45,7 +45,7 @@ RSpec.describe Project, factory_default: :keep do
...
@@ -45,7 +45,7 @@ RSpec.describe Project, factory_default: :keep do
it
{
is_expected
.
to
have_one
(
:pushover_service
)
}
it
{
is_expected
.
to
have_one
(
:pushover_service
)
}
it
{
is_expected
.
to
have_one
(
:asana_integration
)
}
it
{
is_expected
.
to
have_one
(
:asana_integration
)
}
it
{
is_expected
.
to
have_many
(
:boards
)
}
it
{
is_expected
.
to
have_many
(
:boards
)
}
it
{
is_expected
.
to
have_one
(
:campfire_
service
)
}
it
{
is_expected
.
to
have_one
(
:campfire_
integration
)
}
it
{
is_expected
.
to
have_one
(
:datadog_service
)
}
it
{
is_expected
.
to
have_one
(
:datadog_service
)
}
it
{
is_expected
.
to
have_one
(
:discord_service
)
}
it
{
is_expected
.
to
have_one
(
:discord_service
)
}
it
{
is_expected
.
to
have_one
(
:drone_ci_service
)
}
it
{
is_expected
.
to
have_one
(
:drone_ci_service
)
}
...
...
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