diff options
author | Sytse Sijbrandij <sytses@gmail.com> | 2014-06-13 17:13:00 +0200 |
---|---|---|
committer | Sytse Sijbrandij <sytses@gmail.com> | 2014-06-13 17:13:00 +0200 |
commit | e5d14c89a69e66a7f8615149ff8ddffe03cf55e0 (patch) | |
tree | ca2468cdd4c4404e4cf36d3aed36f32aa8a6dbf9 | |
parent | fbb35036057bae352669ada607033cec65db880d (diff) | |
download | gitlab-ci-e5d14c89a69e66a7f8615149ff8ddffe03cf55e0.tar.gz |
Remove added file and rename runners token constant to registration token.
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | app/views/admin/runners/index.html.haml | 6 | ||||
-rw-r--r-- | app/views/runners/index.html.haml | 28 | ||||
-rw-r--r-- | config/initializers/2_app.rb | 2 | ||||
-rw-r--r-- | lib/api/helpers.rb | 2 | ||||
-rw-r--r-- | spec/requests/runners_spec.rb | 2 |
6 files changed, 9 insertions, 34 deletions
@@ -1,3 +1,6 @@ +v5.1 + - Registration token and runner token are named differently + v5.0.1 - Update rails to 4.0.5 diff --git a/app/views/admin/runners/index.html.haml b/app/views/admin/runners/index.html.haml index 42f2f54..2cce14e 100644 --- a/app/views/admin/runners/index.html.haml +++ b/app/views/admin/runners/index.html.haml @@ -7,8 +7,8 @@ = pluralize(@runners.total_count, 'runner') %p.lead - %span To register a new runner you should use the following token - %code #{GitlabCi::RUNNERS_TOKEN} + %span To register new runner you should the following registration token. With this token the runner will request a unique runner token and use that for future communication. + %code #{GitlabCi::REGISTRATION_TOKEN} .bs-callout %p @@ -35,7 +35,7 @@ %tr %th ID %th Type - %th Token + %th Runner token %th Description %th Projects %th Builds Stats diff --git a/app/views/runners/index.html.haml b/app/views/runners/index.html.haml deleted file mode 100644 index 6d0a006..0000000 --- a/app/views/runners/index.html.haml +++ /dev/null @@ -1,28 +0,0 @@ -= content_for :title do - %h3.project-title - Runners - -.alert.alert-info - %strong To register new runner you should the following registration token - %code #{GitlabCi::RunnersToken} - -%p - Runner is a process which run a build. - You can setup as much runners as you need. - %br - Runners can be placed on separate users, servers, even on your local machine - %br - -%table.table - %tr - %th ID - %th Runner token - %th Description - %th Last build - %th Projects - %th Builds Stats - %th Registered - %th - - = render @runners - = paginate @runners diff --git a/config/initializers/2_app.rb b/config/initializers/2_app.rb index 8730519..839ddc4 100644 --- a/config/initializers/2_app.rb +++ b/config/initializers/2_app.rb @@ -1,7 +1,7 @@ module GitlabCi VERSION = File.read(Rails.root.join("VERSION")).strip REVISION = `git log --pretty=format:'%h' -n 1` - RUNNERS_TOKEN = SecureRandom.hex(10) + REGISTRATION_TOKEN = SecureRandom.hex(10) def self.config Settings diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index fb57938..ded4118 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -22,7 +22,7 @@ module API end def authenticate_runners! - forbidden! unless params[:token] == GitlabCi::RUNNERS_TOKEN + forbidden! unless params[:token] == GitlabCi::REGISTRATION_TOKEN end def authenticate_runner! diff --git a/spec/requests/runners_spec.rb b/spec/requests/runners_spec.rb index 528379c..bf0b658 100644 --- a/spec/requests/runners_spec.rb +++ b/spec/requests/runners_spec.rb @@ -40,7 +40,7 @@ describe API::API do describe "POST /runners/register" do it "should create a runner if token provided" do - post api("/runners/register"), token: GitlabCi::RUNNERS_TOKEN, public_key: 'sha-rsa ....' + post api("/runners/register"), token: GitlabCi::REGISTRATION_TOKEN, public_key: 'sha-rsa ....' response.status.should == 201 end |