Commit Graph
1372 Commits
Author SHA1 Message Date
Douwe MaanandRémy Coutable 9af7d71bd6 Merge branch '18755-fix-destroy-project-causes-post_decline_request-to-be-executed' into 'master'
Resolve "Destroying a project causes post_decline_request to be executed"

## What does this MR do?

Ensure we don't send "access request declined" to access requesters when a project is deleted.

## Are there points in the code the reviewer needs to double check?

I've created a service to decouple the notification sending from the AR model.

## Why was this MR needed?

Because there was an issue.

## What are the relevant issue numbers?

Fixes #18755, #18750.

## Does this MR meet the acceptance criteria?

- [x] No CHANGELOG needed.
- [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 !4744

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-22 15:50:04 +02:00
Rémy CoutableandRobert Speicher e4938c6ed2 Merge branch 'feature/runner-lock-on-project' into 'master'
Make it possible to lock runner on a specific project

Make it possible to lock runner on a specific project.

![Screen_Shot_2016-06-20_at_4.03.08_PM](/uploads/186378643a20106ff0b67b6fd8bd7f28/Screen_Shot_2016-06-20_at_4.03.08_PM.png)

----

![Screen_Shot_2016-06-20_at_9.54.52_PM](/uploads/c479abdffaf19f383bb6b5a42bdd6cc3/Screen_Shot_2016-06-20_at_9.54.52_PM.png)

----

![Screen_Shot_2016-06-20_at_9.56.26_PM](/uploads/6ad838679b0c28a1fe2e20e9224387ea/Screen_Shot_2016-06-20_at_9.56.26_PM.png)

Closes #3407

See merge request !4093
2016-06-21 12:17:20 -04:00
Rémy CoutableandRobert Speicher 7315401ebd Merge branch 'fix/builds-api-nil-commit' into 'master'
Fix builds API response that did not include commit data

## What does this MR do?

This is fix for problem with builds API response not including information about commit this build is created for.

## What are the relevant issue numbers?

Closes #18476 

## 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] API support added
- 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 !4827
2016-06-21 12:08:15 -04:00
Yorick PeterseandRobert Speicher 1829af43d6 Merge branch '18590-banzai-filter-relativelinkfilter-is-slow' into 'master'
Optimize Banzai::Filter::RelativeLinkFilter

See merge request !4813
2016-06-21 12:07:09 -04:00
Yorick PeterseandRobert Speicher 2a1085a9f1 Merge branch '18792-cache-participants-call' into 'master'
Cache Participable#participants in instance variable

See merge request !4803
2016-06-21 12:05:00 -04:00
Yorick PeterseandRobert Speicher dc2670f2d2 Merge branch '18697-uniqueness-key-validation' into 'master'
Remove Duplicated keys adding UNIQUE index to fingerprint

See merge request !4787
2016-06-20 10:16:38 -04:00
Douwe MaanandRobert Speicher a3d5343ee2 Merge branch 'issue_12758' into 'master'
Implement custom notification level options

![Screen_Shot_2016-06-17_at_15.31.43](/uploads/3fc47d2f461b3e8b67bb8acaa304cf99/Screen_Shot_2016-06-17_at_15.31.43.png)

![Screenshot_from_2016-06-15_10-52-27](/uploads/88dbdd21d97e80ee772fe08fa0c9b393/Screenshot_from_2016-06-15_10-52-27.png)

part of #12758 

See merge request !4389
2016-06-17 22:09:34 -04:00
Douwe MaanandRobert Speicher a899e7e337 Merge branch '2979-personal-access-tokens' into 'master'
Allow creating Personal Access Tokens through the website

Related to #2979 

- Allow a user to create personal access tokens, and use them to authenticate
- Refactor `API::Helpers` into `API::Helpers::Core` and `API::Helpers::Authentication`

# Tasks

- [ ]  #2979 (!3749)  - Personal Access Tokens
    - [x]  Basic Implementation
        - [x]  Add UI to add "Personal Access Tokens"
        - [x]  Reload `lib/api` on every request
        - [x]  Respect these tokens for API requests
        - [x]  Just a param or a header too?
        - [x]  Allow revoking tokens
        - [x]  Expire tokens
        - [x]  Left bar should have a "PAT" icon
        - [x]  Scopes?
        - [x]  Copy to Clipboard
        - [x]  Show active/inactive tokens separately
            - [x]  No need to check for expired/revoked in the appropriate places
        - [x]  Why does regular ApplicationController check for private token?
        - [x]  Support non-API requests
        - [x]  Revert (or work on) `lib/api` eager loading
    - [x]  Create MR
    - [x]  Refactoring
    - [x]  Fix tests
    - [x]  Write more tests
    - [x]  Add screenshots to MR
    - [x]  Add description of query performance to MR
    - [x]  Limit the number of queries in the `personal_access_tokens` page
    - [x]  Wait for CI to pass
    - [x]  Fix merge issues in schema.rb
    - [x]  Assign MR to endboss
    - [x]  Wait for feedback
    - [x]  Fix feedback
        - [x]  Wait for CI to pass
    - [x]  Assign to @rspeicher
    - [x]  Fix @rspeicher's comments
    - [x]  Wait for CI to pass
    - [x]  Assign back to @rspeicher
    - [x]  Write documentation and ping @axil
    - [x]  Wait for Axil to respond
    - [x]  Assign to endboss
    - [x]  Address Douwe's feedback
        - [x]  Use the `private_token` or `authentication_token` param instead of `personal_access_token`
        - [x]  Ditto for the header
    - [x]  Assign to endboss
    - [x]  Make sure CI is green
    - [x]  Address Douwe's feedback
        - [x]  Don't go through the `authenticate_user_from_private_token!` method, if a private token is supplied (or combine them)
        - [x]  In `authenticate_user_from_personal_access_token!` don't hit DB if `token_string` is `nil`
        - [x]  Use `current_user.personal_access_tokens.build` in the controller
        - [x]  Remove the "We aren't using `personal_access_token` as the root param" comment
        - [x]  `No need for = "...", we can just have the Inactive ... #{...} on the next line` in the view
        - [x]  Render dates in a (more) human format
        - [x]  CSS issue with table
        - [x]  Don't show the tokens in the UI indefinitely
        - [x]  How to implement scopes? Add-on to current impl? Doorkeeper?
    - [x]  Wait for @DouweM's comments about scopes
    - [x]  Address @DouweM's second review 
        - [x]  Try not using `native['innerHTML']`
        - [x]  use contexts for all "when ..."
        - [x]  Ensure consistency (styling) with other pages for "You don't have any tokens" message
        - [x]  "Actions" table column doesn't need a label
        - [x]  %td can be moved outside of the if/else statement
        - [x]  The header title should be "Profile Settings"
        - [x]  Can this be a `before_create`, so we don't need to use `generate`?
        - [x]  If it couldn't be revoked, will we show an error?
        - [x]  If it couldn't be saved, will we show an error?
    - [x]  Merge master
    - [x]  Update CHANGELOG entry
    - [x]  Add tests for form errors?
    - [x]  Post screenshots
    - [x]  Tag @jschatz1 for review
    - [x]  Wait for [build](https://gitlab.com/gitlab-org/gitlab-ce/commit/0dff6fd/builds) to pass
    - [x]  Respond to @jschatz1's comments
        - [x]  Hardcoded colors should be variables
        - [x]  Should not be allowed to chose a date in the past
        - [x]  Use the same table as in the Applications tab
        - [x]  button should say "Create Personal Access Token"
        - [x]  Float the revoke to the right on the `a`
        - [x]  Change revocation message. "Are you sure you want to revoke this certificate? This action cannot be undone."
        - [x]  Date stays selected and looks selected even though date is set as "never".
        - [x]  ~~hover on the calendar button shifts~~ (not caused by this MR - happens on `milestones#new` as well)
        - [x]  Don't use the panel for the created token
            - [x]  Use a normal flash for "Your new personal access token has been created"
            - [x]  Show the input (with the token) below it full width.
            - [x]  Put the "Make sure you save it - you won't be able to access it again." message near the input
        - [x]  Have the input highlight all on single click
    - [x]  Update screenshots
    - [x]  Merge master in + conflicts
    - [x]  Assign to @jschatz1 again
    - [x]  Respond to @jschatz1's comments
        - [x]  No button for clipboard, only link
        - [x]  text-danger
        - [x]  highlight fade on that area where the token was created
    - [x]  Make sure [build](https://gitlab.com/gitlab-org/gitlab-ce/commit/d754d99179f1ffe846fcc1d8e858163b39efc5dc/builds) is green
    - [x]  Assign to @jschatz1
    - [x]  Wait for [build](https://gitlab.com/gitlab-org/gitlab-ce/commit/faa0e3f7580bc38d4d12916b4589c64d6c2678a7/builds) to pass
    - [x]  Respond to @DouweM's feedback
        - [x]  move the redirect_to out of the if/else
        - [x]  certificate -> token
        - [x]  datepicker back to text field
        - [x]  combine the get_user_from_private_token and get_user_from_personal_access_token methods in ApplicationController
        - [x]  combine the get_user_from_private_token and get_user_from_personal_access_token methods in `lib/api/helpers`
        - [x]  don't need the new constants
    - [x]  Wait for [build](https://gitlab.com/gitlab-org/gitlab-ce/commit/9d7cda3ddce52baad9618466a5d00319b333be57/builds) to pass
    - [ ]  Wait for merge

# Screenshots
![Screen_Shot_2016-06-16_at_8.30.33_AM](/uploads/30a168964b7c5e0eb322705747829fb6/Screen_Shot_2016-06-16_at_8.30.33_AM.png)
![Screen_Shot_2016-06-16_at_8.30.44_AM](/uploads/7a8202885df6120071bbe81b215aaead/Screen_Shot_2016-06-16_at_8.30.44_AM.png)
![Screen_Shot_2016-06-16_at_8.31.02_AM](/uploads/6905c0848864e390138b771389c7a1b2/Screen_Shot_2016-06-16_at_8.31.02_AM.png)
![Screen_Shot_2016-06-16_at_8.31.29_AM](/uploads/0bc92369fb2f9bc335773f6abec421c3/Screen_Shot_2016-06-16_at_8.31.29_AM.png)

See merge request !3749
2016-06-17 14:18:40 -04:00
Rémy CoutableandRobert Speicher ecd4a7b026 Merge branch '14918-add-filter-dropdown-to-tag-page' into 'master'
Add sorting dropdown to tag page

## What does this MR do?

Adds a sorting dropdown to the tags page just like the one on the branches page.

## Are there points in the code the reviewer needs to double check?

No

## Why was this MR needed?

Clients were asking for this

## What are the relevant issue numbers?

Closes #14918

## Screenshots (if relevant)

![Captura_de_pantalla_2016-06-01_a_las_4.07.58_p.m.](/uploads/4530683ddd91d3bdbdce77748fe63f87/Captura_de_pantalla_2016-06-01_a_las_4.07.58_p.m..png)

See merge request !4423
2016-06-17 14:13:03 -04:00
Robert SpeicherandRobert Speicher 27625dec2a Merge branch 'fix-project-find-with-namespace-order' into 'master'
Fixed ordering in Project.find_with_namespace

This MR fixes the ordering of `Project.find_with_namespace` to ensure that it returns rows that match literally first.

Closes #18603

See merge request !4682
2016-06-16 20:36:09 -04:00
Robert SpeicherandRobert Speicher c890f7604e Merge branch 'remove_jiraissue' into 'master'
Remove JiraIssue model and replace references with ExternalIssue

This MR Removes unused JiraIssue class and replaces references with ExternalIssue

Closes #18203 

See merge request !4659
2016-06-16 20:35:14 -04:00
Rémy CoutableandRobert Speicher 700a88a876 Merge branch 'fix/status-of-pipeline-without-builds' into 'master'
Improve pipeline status in case that pipeline has no jobs

## What does this MR do?

This MR resolves problem with pipeline status when there are no build in pipeline.

This can happen when builds were skipped - for example - by using `only`/`except` keyword in `.gitlab-ci.yml`.

## What are the relevant issue numbers?

Closes #17977

See merge request !4403
2016-06-16 13:28:06 -04:00
Rémy CoutableandRobert Speicher aafbfb0009 Merge branch 'group-owners-association' into 'master'
Turn Group#owners into a has_many association

## What does this MR do?

This turns the regular method `Group#owners` into a `has_many` association.

## Are there points in the code the reviewer needs to double check?

As far as I can tell there's no way to do this without using an intermediate association, but perhaps I'm missing something. The reason an intermediate association is needed is because the supplied Proc is applied to the _final_ association (the one returning users), this means that when using a single `has_many` you can't filter out any intermediate rows (e.g. group members).

## Why was this MR needed?

This code being a regular method would prevent eager loading of the owners of a Group, turning it into a `has_many` association resolves this problem. This was discovered in !4410.

## What are the relevant issue numbers?

None.

## 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] ~~API support added~~
- [ ] Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] 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 !4676
2016-06-16 13:28:06 -04:00
Rémy Coutable be09845914 Merge branch 'environments-and-deployments' into 'master'
Add environments and deployments

This MR is a continuation of https://gitlab.com/gitlab-org/gitlab-ce/issues/17009.

The current implementation is as follow:
1. We have two new tables: `environments` and `deployments`.
2. We have a new tab: `Environments` under `Pipelines` where you can see all you environments and add a new one.
3. We add a new option to `.gitlab-ci.yml` to track where we should create a deployment for environment.
4. If environment in `.gitlab-ci.yml` is specified it will create a deployment. **If environment does not exist it will be created.** (this got changed)
5. The deployment is always successful and shows the time of the action, in that case a build that presumably should do deployment. In the future we could extend deployment with statuses: success, failure. We could extend deployments with information that this is partial or full deployment.
6. User have to create environments that he will track first.
7. User can remove environments.
8. User can retry/rollback past deployment (in that case we retry past build). The new build when succeeds it will create a new deployment.
9. Currently environment have only one parameter: `name`. In the future it should have: `variables`, `credentials` and possibly `runners` and maybe other resources.
10. Currently deployment have this parameters: `sha`, `ref`, `deployable (in this case a build)`, `user (who triggered a deployment)`, `created_at`.

The `.gitlab-ci.yml`:
```
deploy to production:
  stage: deploy
  script: dpl travis...
  environment: production
```

What needs to be done:
- [x] Write initial implementation
- [x] Improve implementation (@ayufan)
- [x] Write tests (@ayufan)
- [x] Improve UX of the forms (cc @markpundsack) - reviewed by @markpundsack
- [x] Improve implementation of the views (cc @jschatz1) - done by @iamphill 
- [x] Write .gitlab-ci.yml documentation for `environments` - done by @ayufan
- [ ] Write user documentation (@ayufan and @markpundsack)

See merge request !4605
2016-06-15 13:48:09 +00:00
Douwe Maan 9413d1c2e9 Merge branch 'master' into 13948-access-request-to-projects-and-groups
# Conflicts:
#	app/views/layouts/nav/_project.html.haml
2016-06-14 16:23:16 +02:00
Kamil Trzcinski 006b650988 Merge remote-tracking branch 'origin/master' into environments-and-deployments
# Conflicts:
#	db/schema.rb
2016-06-14 16:19:29 +02:00
Kamil Trzcinski 2b5449b96d Fix Ci::Build#artifacts_expire_in= when assigning invalid duration 2016-06-14 14:51:09 +02:00
Kamil Trzcinski 3ade826065 Add specs for models and services 2016-06-14 13:51:12 +02:00
Rémy Coutable 515205d3c1 UI and copywriting improvements
+ Move 'Edit Project/Group' out of membership-related partial
+ Show the access request buttons only to logged-in users
+ Put the request access buttons out of in a more visible button
+ Improve the copy in the #remove_member_message helper

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-14 13:18:14 +02:00
Rémy Coutable d26f81239a Add request access for groups
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-14 13:07:26 +02:00
Kamil Trzcinski 1b62b86fdd Merge remote-tracking branch 'origin/master' into artifacts-expire-date 2016-06-14 11:38:44 +02:00
Kamil Trzcinski 60e0137c86 Fix specs 2016-06-14 11:38:34 +02:00
Douwe Maan 0c0ef7dfb6 Merge branch 'confidential-issues-in-private-projects' into 'master'
Allow users to create confidential issues in private projects

Closes #14787

## What does this MR do?

Allow users to create confidential issues in private projects, and exclude access to them to project members with `Guest` role.

## Are there points in the code the reviewer needs to double check?

The query generated by the `User#authorized_projects` method.

## Why was this MR needed?

Community have been requesting this feature.

## What are the relevant issue numbers?

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

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

## Screenshots (if relevant)

Not relevant.

## Todo

- [x] Allow users to create confidential issues in private projects
- [x] Project members with `Guest` role should not have access to confidential issues
- [ ] ~~Apply changes in EE + Elasticsearch~~ Will be done in another MR, when this got merged

See merge request !3471
2016-06-14 09:35:18 +00:00
Rémy Coutable 2f7b2057f2 Fix broken URI joining for teamcity_url with suffixes
If one had configured a `teamcity_url` like http://foo.bar/teamcity in
the previous implementation the plugin directed it's request i.e. to
http://foo.bar/httpAuth/... instead of http://foo.bar/teamcity/httpAuth/...

`URI.join` only works correctly, if the prefix URL has
  - at least one or more  trailing '/'
  - the appended parts are _not_ prefixed with '/'

The current implementation should work with all sorts of TeamCity base
URLs.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-14 10:07:37 +02:00
Rémy Coutable 17c32ee8d0 Factorize duplicated code into a method in BambooService and update specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-14 10:07:37 +02:00
Douglas Barbosa Alexandre b56c456750 Project members with guest role can't access confidential issues 2016-06-13 19:32:00 -03:00
Douglas Barbosa Alexandre 0568b90c97 Remove deprecated issues_tracker and issues_tracker_id from project 2016-06-13 18:13:55 -03:00
Kamil Trzcinski f6de5937e3 Merge remote-tracking branch 'origin/master' into artifacts-expire-date 2016-06-13 16:05:30 +02:00
Kamil Trzcinski c534d2e89e Improve tests 2016-06-13 16:05:23 +02:00
Douwe Maan c03f125904 Merge branch 'issue_3359_2' into 'master'
Remove notification level from user model

part of #3359 

See merge request !4494
2016-06-13 11:52:39 +00:00
Kamil TrzcinskiandPhil Hughes 421be01dab Improve design based on review 2016-06-13 11:09:19 +01:00
Kamil TrzcinskiandPhil Hughes 7e9273dd94 Test controllers if they allow to keep artifacts 2016-06-13 11:07:23 +01:00
Robert Speicher b4e84809e8 Merge branch 'finding-multiple-projects-by-paths' into 'master'
Add Project.where_paths_in

In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4410 I'm working on reducing the SQL queries needed to render Markdown. One reason for the large amount of queries is executing a large number of queries needed to find projects and related data. Basically `Project.find_with_namespace` is called in a loop and then any relations have to be retrieved separately.

By using `Project.where_paths_in` we can work around this by doing something like:

```ruby
project_paths = [...] # populated by some method
projects = Project.where_paths_in(project_paths).includes(:namespace, ...)
```

Ref: https://gitlab.com/gitlab-org/gitlab-ce/issues/18042

See merge request !4535
2016-06-10 17:17:19 +00:00
Rémy Coutable 133d5c1c64 Merge branch 'rename-ci-commit-phase-4' into 'master'
Rename Commit to Pipeline in TriggerRequest

Changes in TriggerRequest a `commit` to `pipeline`.


See merge request !4505
2016-06-10 14:31:21 +00:00
Felipe Artur 8f6d43e0fe Remove notification level from user model 2016-06-10 10:58:13 -03:00
Paco GuzmanandYorick Peterse be98ee2586 Fixing specs stubbed objects cannot access database 2016-06-10 15:41:56 +02:00
Paco GuzmanandYorick Peterse 136a4ea39b Cache the presence of an issue_tracker at project level
Using update_column to store the boolean flag to avoid
any side effects with the current state of the project
instance
2016-06-10 15:41:56 +02:00
Yorick Peterse 24920bc52a Add Project.where_paths_in
This method can be used to find multiple projects for multiple paths.
For example, take this snippet:

    Project.where_paths_in(%w{gitlab-org/gitlab-ce gitlab-org/gitlab-ee})

This will return an ActiveRecord::Relation containing the GitLab CE and
GitLab EE projects.

This method takes care of matching rows both case-sensitively and
case-insensitively where needed.

Project.find_with_namespace in turn has been modified to use
Project.where_paths_in without nuking any scoping (instead it uses
reorder(nil)). This means that any default scopes (e.g. those used for
"pending_delete" stay intact).

The method Project.where_paths_in was added so the various Markdown
filters can use a single query to grab all the projects referenced in a
set of documents, something Project.find_with_namespace didn't allow.
2016-06-10 15:33:05 +02:00
Rémy Coutable 3579edba1f Rename ci_commit -> pipeline
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-10 14:41:38 +02:00
Rémy Coutable 5324c93643 Rename MergeRequest#cannot_be_merged_because_build_is_not_success? to #mergeable_ci_state?
The logic of the method was obviously inverted.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-10 14:37:32 +02:00
Rémy Coutable 6dff7c1771 Improve initial implementation of the 'only_allow_merge_if_build_succeeds.rb' feature
Based on the feedback from reviewers.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-10 14:36:57 +02:00
Rui AndersonandRémy Coutable 07dbd6b388 Allow or not merge MR with failed build
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-10 14:36:54 +02:00
Kamil Trzcinski 921c356b5e Rename commit to pipeline in TriggerRequest 2016-06-09 17:57:07 +02:00
Alejandro Rodríguez fade1a4cde Fix pseudo n+1 queries with Note and Note Authors in issuables APIs
This was not a clear cut n+1 query, given that if you're directly subscribed to all issues
that the API is returning you never really need to check for the notes. However, if you're
subscribed to _all_ of them, then for each issuable you need to go once to `notes`, and
once to `users` (for the authors). By preemtively loading notes and authors, at worst you have
1 extra query, and at best you saved 2n extra queries. We also took advantage of this preloading
of notes when counting user notes.
2016-06-08 10:26:05 -04:00
Lin Jen-Shin 4f34cf3241 Add a blank line between before and it:
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12301563
2016-06-07 22:34:09 +08:00
Lin Jen-Shin 4fcdcc36f1 Avoid using subject and is_expected.to:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12274602
2016-06-07 22:34:09 +08:00
Lin Jen-Shin 5f3e647330 Prefer do and end for before/after:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12217415
2016-06-07 22:34:09 +08:00
Lin Jen-Shin db95704fb4 Fix method definition style 2016-06-07 22:34:09 +08:00
Lin Jen-Shin 2dd60b9b3f Use rspec's matchers and update style:
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12194552
2016-06-07 22:34:09 +08:00
Lin Jen-Shin 0c2962eb86 Use subject for more consistent testing style:
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4404#note_12194489
2016-06-07 22:34:09 +08:00