diff options
author | Stan Hu <stanhu@gmail.com> | 2016-08-19 20:38:44 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-08-19 20:38:44 +0000 |
commit | 310eef45213b56f17686045cc12ac9297585a1d8 (patch) | |
tree | dde202349dea1a43ee91be8ed39f97f106622210 /app/controllers | |
parent | b06f9211b0c3a90200c030e84ae425778bac6412 (diff) | |
parent | a927a9bf6baa99be94181c3ab980947621ae2fe0 (diff) | |
download | gitlab-ce-310eef45213b56f17686045cc12ac9297585a1d8.tar.gz |
Merge branch 'gokmengoksel/gitlab-ce-koding' into 'master'
Koding Integration
## What does this MR do?
Will provide Koding integration with GitLab services. Forked from !4914.
## Are there points in the code the reviewer needs to double check?
I've introduced new layouts which might not be necessary, first time contributor.
## Why was this MR needed?
We're planning to ship Koding with GitLab.
## What are the relevant issue numbers?
#12759 #14698
## Screenshots (if relevant)
### Screencasts
http://recordit.co/BDMbhwgxPD
http://recordit.co/By0qiz1ClC
### Enable Koding in Application Settings
![image](/uploads/73a69421105c03aa2b0b47e2617d3fbc/image.png)
### Koding Dashboard
![image](/uploads/6c7dda34792280c0e4791e36af4eba11/image.png)
### Set up Koding Stack
1 - ![image](/uploads/d5c2b93f8e61b5cbffdb06f0267d485f/image.png)
2 - ![image](/uploads/44d9a9b574b8ac0c5eb553fb9653d5da/image.png)
### Run on Koding on Project Page
![image](/uploads/7d2b46221009074ffff75d66d5a1a555/image.png)
### Run in IDE on Merge Requests
![image](/uploads/65eed90c34c34b5fe7ad29ef9c717640/image.png)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !5909
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/koding_controller.rb | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 9e1dc15de84..6ef7cf0bae6 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -109,6 +109,8 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :sentry_dsn, :akismet_enabled, :akismet_api_key, + :koding_enabled, + :koding_url, :email_author_in_body, :repository_checks_enabled, :metrics_packet_size, diff --git a/app/controllers/koding_controller.rb b/app/controllers/koding_controller.rb new file mode 100644 index 00000000000..bb89f3090f9 --- /dev/null +++ b/app/controllers/koding_controller.rb @@ -0,0 +1,15 @@ +class KodingController < ApplicationController + before_action :check_integration!, :authenticate_user!, :reject_blocked! + layout 'koding' + + def index + path = File.join(Rails.root, 'doc/integration/koding-usage.md') + @markdown = File.read(path) + end + + private + + def check_integration! + render_404 unless current_application_settings.koding_enabled? + end +end |