summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-06-07 21:45:03 +0200
committerRémy Coutable <remy@rymai.me>2017-06-09 17:21:39 +0200
commit54c04f53fddc36d62a3d3d4125c9fe205138fc63 (patch)
tree57eba99111815c7d761e26b51ef13d3e01756750
parentadd21d409f65fd9ea8cb6b253f876322c2770612 (diff)
downloadgitlab-ce-54c04f53fddc36d62a3d3d4125c9fe205138fc63.tar.gz
Fix spec failures and add a feature flag for the performance bar
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--lib/gitlab/performance_bar.rb2
-rw-r--r--spec/models/commit_spec.rb2
-rw-r--r--vendor/assets/stylesheets/peek.scss13
3 files changed, 11 insertions, 6 deletions
diff --git a/lib/gitlab/performance_bar.rb b/lib/gitlab/performance_bar.rb
index 3324fec94d4..163a40ad306 100644
--- a/lib/gitlab/performance_bar.rb
+++ b/lib/gitlab/performance_bar.rb
@@ -1,7 +1,7 @@
module Gitlab
module PerformanceBar
def self.enabled?
- ENV["PERFORMANCE_BAR"] == '1'
+ Feature.enabled?('gitlab_performance_bar')
end
end
end
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb
index 140fd2720bf..3905240f48d 100644
--- a/spec/models/commit_spec.rb
+++ b/spec/models/commit_spec.rb
@@ -21,7 +21,7 @@ describe Commit, models: true do
it 'caches the author' do
user = create(:user, email: commit.author_email)
- expect(RequestStore).to receive(:active?).twice.and_return(true)
+ expect(RequestStore).to receive(:active?).and_return(true)
expect_any_instance_of(Commit).to receive(:find_author_by_any_email).and_call_original
expect(commit.author).to eq(user)
diff --git a/vendor/assets/stylesheets/peek.scss b/vendor/assets/stylesheets/peek.scss
index 4977487d3ae..3508f2e2450 100644
--- a/vendor/assets/stylesheets/peek.scss
+++ b/vendor/assets/stylesheets/peek.scss
@@ -6,8 +6,13 @@ header.navbar-gitlab.with-peek {
}
#peek {
- background: $black;
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
height: 35px;
+ z-index: 400;
+ background: #000;
line-height: 35px;
color: #999;
@@ -53,12 +58,12 @@ header.navbar-gitlab.with-peek {
}
strong {
- color: $white-light;
+ color: #fff;
}
table {
strong {
- color: $black;
+ color: #000;
}
}
@@ -90,5 +95,5 @@ header.navbar-gitlab.with-peek {
}
#modal-peek-pg-queries-content {
- color: $black;
+ color: #000;
}