Commit Graph

19478 Commits

Author SHA1 Message Date
Yorick Peterse 2fa4e2fb6a Evaluate benchmark blocks in the proper context
This ensures that blocks defines using "benchmark_subject" have access
to methods defined using let/subject & friends.
2015-10-05 16:27:41 +02:00
Dmitriy Zaporozhets 39772f0116 Merge branch 'ci-web-hooks' 2015-10-05 15:01:40 +02:00
Yorick Peterse b6808f437d Merge branch 'benchmark-suite' into 'master'
Basic RSpec/benchmark-ips powered benchmark suite

Corresponding issue: #2909, see the commit messages for more details.

A few things to note:

1. The current use of `subject` isn't exactly easy on the eyes due to them having to return a Proc, I'm not sure yet how (and if) we can work around this.
2. The maximum amount of iterations in the current `User.by_login` benchmark is arbitrary, we might have to adjust it once said method's performance has been improved.
3. Benchmarks currently take 2 seconds to warm up and 5 seconds to run (benchmark-ips defaults). 
4. The custom RSpec matcher file (`benchmark_matchers.rb`) is a bit messy, any feedback on this would be appreciated

Any comments/feedback on this would be greatly appreciated.

See merge request !1503
2015-10-05 12:56:52 +00:00
Dmitriy Zaporozhets 3137d155ca Merge branch 'fix_scroll_on_diff_tab' into 'master'
Fix anchors to comments in diffs

https://gitlab.com/gitlab-org/gitlab-ce/issues/2218

See merge request !1508
2015-10-05 12:23:23 +00:00
Achilleas Pipinellis 66fa6070e8 Merge branch 'golang-i386' into 'master'
Golang download instructions assume amd64



See merge request !1488
2015-10-05 12:00:07 +00:00
Valery Sizov 31330e4a3c Fix anchors to comments in diffs 2015-10-05 14:00:41 +03:00
Yorick Peterse 0bef64911b Added documentation for writing benchmarks 2015-10-05 11:32:22 +02:00
Yorick Peterse 89920ca819 Allow benchmark failures for the time being
This will be disallowed again once the existing benchmarks pass (which
relies on #2341).
2015-10-05 11:08:52 +02:00
Dmitriy Zaporozhets ecbe393b8d
CI web hooks menu active state and consitent title
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-05 10:51:25 +02:00
Yorick Peterse 22506ddc50 Added benchmark_subject method for benchmarks
This class method can be used in "describe" blocks to specify the
subject of a benchmark. This lets you write:

    benchmark_subject { Foo }

instead of:

    benchmark_subject { -> { Foo } }
2015-10-05 10:51:24 +02:00
Dmitriy Zaporozhets c293cc9152
Move CI web hooks page to project settings area
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-05 10:47:23 +02:00
Dmitriy Zaporozhets 0de7c83a78 Merge pull request #9673 from fscherwi/patch-1
change build status image to svg
2015-10-04 15:26:52 +02:00
Dmitriy Zaporozhets ffadefb331 Merge pull request #9690 from ggarnier/master
Fix "useless assignment" Rubocop warnings
2015-10-04 15:26:23 +02:00
Guilherme Garnier 963e6366be Fix rubocop warnings in features 2015-10-03 19:59:54 -05:00
Guilherme Garnier aed145a9c6 Fix rubocop warnings in spec/lib and spec/tasks 2015-10-03 16:02:21 -05:00
Guilherme Garnier 1cfb48ddd0 Merge remote-tracking branch 'upstream/master' 2015-10-03 11:46:29 -05:00
Dmitriy Zaporozhets 662f8af497 Merge branch 'fix-cache-key-expiration-for-commits' into 'master'
Fix bug where transferring a project would result in stale commit links

Transferring a project to another namespace updates the project's updated_at
field, but since the cache key did not depend on the object, the page fragments
were not invalidated. This resulted in stale links to the commits. Changing
the cache key to use the project pathname solves this issue.

Closes gitlab-org/omnibus-gitlab#843

See merge request !1497
2015-10-03 08:45:27 +00:00
Dmitriy Zaporozhets 2b493695a3 Merge branch 'projects' into 'master'
Improve project page height

old thing. Grey block not aligned to the bottom. It was a scroll even with short project description.

![Screen_Shot_2015-10-01_at_16.03.24](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b412eeaa40c79861191d1a432d95951d/Screen_Shot_2015-10-01_at_16.03.24.png)

New awesome stuff, no scroll, grey block aligned to the bottom. 

![Screen_Shot_2015-10-01_at_16.04.08](https://gitlab.com/gitlab-org/gitlab-ce/uploads/823cdb6bfb8caec892ed001448f731e5/Screen_Shot_2015-10-01_at_16.04.08.png)

See merge request !1487
2015-10-03 08:44:06 +00:00
Guilherme Garnier 848d7b2a2b Fix rubocop warnings in spec/models 2015-10-03 01:48:54 -05:00
Guilherme Garnier 59d0263bc8 Fix rubocop warnings in lib 2015-10-03 01:29:58 -05:00
Guilherme Garnier 2b075f16c7 Fix rubocop warnings in app 2015-10-03 00:56:37 -05:00
Guilherme Garnier 0406455c8a Enable "UselessAssignment" rubocop lint 2015-10-03 00:56:16 -05:00
Stan Hu 3fbcc51102 Update README cache key to use full project namespace 2015-10-02 13:26:42 -07:00
Stan Hu dbc85bfa01 Fix bug where transferring a project would result in stale commit links
Transferring a project to another namespace updates the project's updated_at
field, but since the cache key did not depend on the object, the page fragments
were not invalidated. This resulted in stale links to the commits. Changing
the cache key to use the object pathname solves this issue.

Closes gitlab-org/omnibus-gitlab#843
2015-10-02 11:24:17 -07:00
Andrey 75c03530f8 removed max-heght from project.scss 2015-10-02 17:08:12 +02:00
Yorick Peterse 19893a1c10 Basic setup for an RSpec based benchmark suite
This benchmark suite uses benchmark-ips
(https://github.com/evanphx/benchmark-ips) behind the scenes. Specs can
be turned into benchmark specs by setting "benchmark" to "true" in the
top-level describe block like so:

    describe SomeClass, benchmark: true do

    end

Writing benchmarks can be done using custom RSpec matchers, for example:

    describe MaruTheCat, benchmark: true do
      describe '#jump_in_box' do
        it 'should run 1000 iterations per second' do
          maru = described_class.new

          expect { maru.jump_in_box }.to iterate_per_second(1000)
        end
      end
    end

By default the "iterate_per_second" expectation requires a standard
deviation under 30% (this is just an arbitrary default for now). You can
change this by chaining "with_maximum_stddev" on the expectation:

    expect { maru.jump_in_box }.to iterate_per_second(1000)
      .with_maximum_stddev(10)

This will change the expectation to require a maximum deviation of 10%.

Alternatively you can use the it block style to write specs:

    describe MaruTheCat, benchmark: true do
      describe '#jump_in_box' do
        subject { -> { described_class.new } }

        it { is_expected.to iterate_per_second(1000) }
      end
    end

Because "iterate_per_second" operates on a block, opposed to a static
value, the "subject" method must return a Proc. This looks a bit goofy
but I have been unable to find a nice way around this.
2015-10-02 17:00:23 +02:00
Dmitriy Zaporozhets b5c12f742a Merge remote-tracking branch 'public/hide_services_password' 2015-10-02 16:48:38 +02:00
Dmitriy Zaporozhets 0e7b96bf48 Merge branch 'access_level_badge_bug' into 'master'
Fix: Wrong access level badge on MR comments

https://gitlab.com/gitlab-org/gitlab-ce/issues/2654

See merge request !1501
2015-10-02 14:39:58 +00:00
Andrey acdb5f34cf max height to layout.scss 2015-10-02 16:38:37 +02:00
Douwe Maan 93522e59ec Merge branch 'rs-throttle-reset' into 'master'
Throttle "Forgot your password?" emails

Addresses internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2611

See merge request !1476
2015-10-02 14:37:07 +00:00
Yorick Peterse dbc05d4a62 Don't use "rm" for cleaning tmp/builds
If this directory were to be empty this would result in warnings being
printed to STDERR, cluttering spec output. Doing this in Ruby fixes this
problem (and also removes the need for shell alltogether).
2015-10-02 16:25:47 +02:00
Valery Sizov 97e6c9b42c Wrong access level badge on MR comments 2015-10-02 15:11:17 +03:00
Jacob Vosmaer c867c22509 Merge branch 'migration-doc-fix' into 'master'
Back and forth permission on builds/

@jacobvosmaer I missed that :(


See merge request !1500
2015-10-02 11:25:00 +00:00
Kamil Trzcinski a4292066f0 Back and forth permission on builds/ 2015-10-02 12:44:20 +02:00
Dmitriy Zaporozhets c7e323438e Merge branch 'ensure-ci-project' into 'master'
Ensure GitLab CI project exists when CI service is activated manually

When I check activeated checkbox in project services for GitLab CI it
cause half-working state when gitlab_ci_project is missing. This patch
fixes it until we have proper behaviour implemented later

This fix also bring us to the point when fork of project is a bit broken and have unnecessary code so I made cleanup. 

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

cc @ayufan 

See merge request !1491
2015-10-02 10:39:31 +00:00
Andrey 5ebcf21b81 section and .content now in layout.cssc 2015-10-02 12:01:46 +02:00
Valery Sizov 731b860976 Hide password in the service settings form 2015-10-02 12:48:57 +03:00
Yorick Peterse 2fa89a3dc6 Added benchmark-ips to the Gemfile
This allows me to use this Gem for benchmarking without having to
add/remove it every time.
2015-10-02 11:29:46 +02:00
Andrey fd86b66914 CSS markup fixed
Everything is fixed according DZ comments.
Added a bit sexy transition for our project buttons ><
2015-10-02 11:24:12 +02:00
Dmitriy Zaporozhets 3515cb9b2d
Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-02 11:02:05 +02:00
Dmitriy Zaporozhets 37e9e71ea1
Remove unnecessary fork ci logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-02 10:26:56 +02:00
Dmitriy Zaporozhets 5de0b07844
Prevent creating 2 Ci::Project entities when enable CI
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-02 10:08:16 +02:00
Dmitriy Zaporozhets b69b2520b1 Merge branch 'add_last_push_widget' into 'master'
Add last push widget to starred projects dashboard

This adds the last push widget to the starred projects dashboard. If a user set the starred projects dashboard as their preferred dashboard they would not see last push widget. The look is seamless between starred and 'your projects' dashboards.

### Screenshot:

![Screen_Shot_2015-10-01_at_3.15.52_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/2f5dcf49c3d0186bdd05bb6788b143f1/Screen_Shot_2015-10-01_at_3.15.52_PM.png)


See merge request !1304
2015-10-02 07:55:02 +00:00
Robert Speicher d40dd5cfe3 Conform to spec guidelines that only exist in my head
[ci skip]
2015-10-02 00:14:47 -04:00
Robert Speicher f036d4095e Fix spec broken by updated Devise translations 2015-10-01 23:46:43 -04:00
Robert Speicher b8ff38b1d4 Refactor PasswordsController to use before_actions 2015-10-01 21:47:27 -04:00
Robert Speicher c7b43126bd Add recently_reset message to Devise translations 2015-10-01 21:46:51 -04:00
Robert Speicher ad7ad8745a Add User#recently_sent_password_reset? 2015-10-01 21:41:56 -04:00
Robert Speicher 19748ddee6 Update config/locales/devise.en.yml with latest version
It looks like a lot of changes but it's not, they just sorted it
alphabetically.
2015-10-01 21:38:39 -04:00
Robert Speicher d7eceafb27 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2015-10-01 17:13:59 -04:00