Commit Graph
17190 Commits
Author SHA1 Message Date
Robert Speicher 0bb320cfda Fix Style/HashSyntax violations 2015-06-22 14:54:33 -04:00
Robert Speicher 4dbf118a16 Fix Style/Not cop violations 2015-06-22 14:52:41 -04:00
Robert Speicher 0716a559b5 Fix Style/AsciiComments cop violation 2015-06-22 14:43:51 -04:00
Robert Speicher 94eff65569 Fix Style/SpaceInsideHashLiteralBraces cop violations
These fixes were performed automatically by Rubocop's `-a` flag.
2015-06-22 14:41:00 -04:00
Robert Speicher 56246b70fb Fix Style/TrailingBlankLines cop violations 2015-06-22 14:38:33 -04:00
Robert Speicher 649c9969ba Fix Style/IndentationConsistency cop violations 2015-06-22 14:33:01 -04:00
Dmitriy Zaporozhets 7b9b3c5aab Fix part of api specs for rubocop
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-22 15:05:19 +02:00
Dmitriy Zaporozhets cf259cdb43 Remove unnecessary whitespace between let and (
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-22 14:39:07 +02:00
Dmitriy Zaporozhets f167f37e5a Fix rubocop issues at feature/ directory
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-22 14:21:34 +02:00
Dmitriy Zaporozhets 770eba73d4 Enable rubocop for tests too
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-22 13:35:02 +02:00
Dmitriy Zaporozhets 6c4d48b8b9 Merge branch 'rs-remove-link-to-override'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	spec/helpers/application_helper_spec.rb
2015-06-22 12:26:41 +02:00
Dmitriy Zaporozhets 9179dc6dc8 Merge branch 'new-logo' into 'master'
Replace old logo with new one

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

cc @JobV @sytses

See merge request !848
2015-06-22 10:18:51 +00:00
Dmitriy Zaporozhets 75f7a9648e Merge branch 'web-editor-autocrlf' into 'master'
Convert CRLF newlines to LF when committing using the web editor.

Fixes #1823 and https://github.com/gitlabhq/gitlabhq/issues/7950.

Depends on https://gitlab.com/gitlab-org/gitlab_git/merge_requests/29 being merged and a new gitlab_git being released.

cc @jacobvosmaer

See merge request !858
2015-06-22 10:11:26 +00:00
Jacob Vosmaer 29069abec3 Merge branch 'change_log_update' into 'master'
Minor changelog fix

See merge request !861
2015-06-22 09:54:14 +00:00
Dmitriy Zaporozhets 0214a21db5 Merge branch 'restore_uploads_fix' into 'master'
Avoid "cannot copy directory ... to itself" error on restore (on Docker?)

rake gitlab:backup:restore fails for me in my Docker-hosted Gitlab-CE instance; during the restore, any existing "uploads" directory is backed up by [this code](https://gitlab.com/gitlab-org/gitlab-ce/blob/833bc30/lib/backup/uploads.rb#L23) --

```ruby
    def backup_existing_uploads_dir
      timestamped_uploads_path = File.join(app_uploads_dir, '..', "uploads.#{Time.now.to_i}")
      if File.exists?(app_uploads_dir)
        FileUtils.mv(app_uploads_dir, timestamped_uploads_path)
      end
    end
```

When this executes for me, the ```FileUtils.mv``` parameters are "/home/git/gitlab/public/uploads" and "/home/git/gitlab/public/uploads/../uploads.1407019546"; an exception is raised, producing this double stacktrace:

```
ArgumentError: cannot copy directory /home/git/gitlab/public/uploads to itself /home/git/gitlab/public/uploads/../uploads.1407019546
/home/git/gitlab/lib/backup/uploads.rb:26:in `backup_existing_uploads_dir'
/home/git/gitlab/lib/backup/uploads.rb:18:in `restore'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:73:in `block (4 levels) in <top (required)>'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:30:in `block (3 levels) in <top (required)>'
Errno::EXDEV: Invalid cross-device link @ sys_fail2 - (/home/git/gitlab/public/uploads, /home/git/gitlab/public/uploads/../uploads.1407019546)
/home/git/gitlab/lib/backup/uploads.rb:26:in `backup_existing_uploads_dir'
/home/git/gitlab/lib/backup/uploads.rb:18:in `restore'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:73:in `block (4 levels) in <top (required)>'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:30:in `block (3 levels) in <top (required)>'
Tasks: TOP => gitlab:backup:uploads:restore
(See full trace by running task with --trace)
```

I'm guessing from the first message that ```mv``` walks the destination path to ensure that we're not moving the source into itself -- it doesn't get as far as interpreting the '..', but throws when it sees that the destination appears to start with the source path.

The second stacktrace I have no clue about - maybe it's AUFS- or Docker-related?

I attempted to reproduce this separately with the omnibus distribution in a fresh Ubuntu 14.04 install without Docker involved, and was unable to - backup and restore worked fine. I then tested my theory by FileUtils.expand_path-ing the destination in my own Docker setup code, and that made the problem go away, so that's what this merge request does.

(I'm using backups created and restored on gitlab-ce 7-1-stable, at facfec4b2; this is on Ubuntu 14.04 with Docker 1.1.1)

I know I'd look askance at a PR without tests for an unreproducable problem, but even if this is rejected, I'm submitting it anyway because maybe someone else will Google it and find it useful. I'm happy to do more work to improve this if you have suggestions.

See merge request !165
2015-06-22 09:52:42 +00:00
Dmitriy Zaporozhets 29b6d465a7 Merge branch 'rs-dev-issue-2355' into 'master'
MergeRequest#show performance improvements

This is a first pass on improving the performance of the `MergeRequests#show` page. Notable changes:

- The "Commits" tab is loaded lazily, so the initial page load should be much faster for MRs with many commits.
- Relative timestamps via `timeago` are only initialized once per load instead of `O(n^2)`. This greatly improves frontend rendering times for a large number of commits.
- Refactored `User.find_for_commit` to use a single ARel-generated SQL query instead of the old method which resulted in one query, and could result in up to three.

See merge request !838
2015-06-22 09:48:49 +00:00
Dmitriy Zaporozhets ea9dda9541 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-06-22 11:26:33 +02:00
Dmitriy Zaporozhets 791bf11513 Merge branch 'master' of github.com:gitlabhq/gitlabhq 2015-06-22 11:26:27 +02:00
Jacob Vosmaer cfc261d707 Bump gitlab_git to 7.2.5 2015-06-22 11:24:02 +02:00
Valery Sizov 3d45b9161a changelog fix 2015-06-22 09:30:19 +03:00
Robert Speicher e17020b907 Add MergeRequestTabs specs 2015-06-21 22:57:32 -04:00
Robert Speicher 8e72c65cda Minor style fixes in MergeRequestTabs 2015-06-21 18:57:04 -04:00
stanhu 1f3b6ef3f9 Merge pull request #9401 from strand/patch-2
Update Code of Conduct to Contributor Covenant 1.1.0
2015-06-20 16:54:55 -07:00
Douwe Maan 0734756ee4 Convert CRLF newlines to LF when committing using the web editor. 2015-06-20 14:35:24 +02:00
Douwe Maan c0df5ff126 Merge branch 'snippet_optional_filename' into 'master'
Make snippet filename optional.

Fixes #2384.

See merge request !1866
2015-06-20 10:47:06 +00:00
Douwe Maan 0795698162 Merge branch 'new-mr-disable-change-target-branch' into 'master'
Disable changing of target branch in new merge request page when a branch has already been specified

### What does this MR do?

This MR prevents a user from changing the target branch inside a new merge request page if the target branch has already been specified (e.g. from the shortcut in the activity feed). A link to "Change branches" is provided to allow the user to do this properly.

### Why was this MR needed?

If a user attempted to create a merge request from a shortcut with a pre-specified target branch (e.g. `master`), the dropdown would suggest that the user could change the branch. However, this did not actually work due to duplicate data elements (see #1830 for more details), and the target branch would always be set to the original, default branch. This would lead to confusion, potentially causing an improper merge request to be created.

### What are the relevant issue numbers?

Closes #1830

### Screenshot

![image](https://gitlab.com/stanhu/gitlab-ce/uploads/eeec4f5d4b66625a14be41e5ecbdc016/image.png)

See merge request !846
2015-06-20 10:41:07 +00:00
Douwe Maan b2eef41d41 Merge branch 'fix-error-500-internal-snippet' into 'master'
Fix Error 500 when one user attempts to access another's personal, internal snippet

### What does this MR do?

This MR fixes an Error 500 that occurred if one user tried to access another's personal, internal snippet. Steps to reproduce:

### Why was this MR needed?

1. Go to `<hostname>/snippets/new`.
2. Select "Internal".
3. Create a snippet. Save the URL (e.g. `<hostname>/snippets/20`)
4. Logout and sign in as another user.
5. Go to the URL in step 3.

### What are the relevant issue numbers?

Closes #1815

See merge request !854
2015-06-20 10:38:33 +00:00
Achilleas Pipinellis cbb1353b28 Merge branch 'sshdoc' into 'master'
Include non-default ssh key location info

Fixes #875

Provide help for people who aren't SSH-clued by indicating
how to point to key files that have been named something
other than the default. A lot of people seem to assume that
the filename they choose is irrelevant and then wonder why
their private key is not being found by simple 'ssh' commands.

See merge request !507
2015-06-20 10:04:30 +00:00
Stan Hu e785b9d2e2 Fix Error 500 when one user attempts to access a personal, internal snippet
Closes #1815
2015-06-19 21:23:46 -07:00
Nicolas aecc989154 Make snippet filename optional.
Fixes #2384.
2015-06-20 01:06:57 +02:00
Stan Hu c8d4a408f8 Disable changing of target branch in new merge request page when a branch has already been specified
Closes #1830
2015-06-19 15:39:56 -07:00
Robert Speicher efa0146c7f Merge branch 'rs-blobview-js-refactor' into 'master'
Refactor and spec line highlighting Javascript

- Replaces the fragile Spinach tests for this feature with Jasmine tests
- The "Don't scroll the page when we click a line number" behavior now works as expected

See merge request !820
2015-06-19 21:27:25 +00:00
Robert Speicher ff27747ec7 Fix timezone-based time_ago_with_tooltip spec failures 2015-06-19 16:49:52 -04:00
Robert Speicher 7f5b255c08 Minor style fixes for LineHighlighter 2015-06-19 16:43:09 -04:00
Douwe Maan e13b523c92 Merge branch 'rs-dev-issue-2415' into 'master'
Show user 2FA status on Admin::Users#show

| Enabled | Disabled |
| ------- | -------- |
| ![Screen_Shot_2015-06-19_at_2.58.42_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b81f6a992366105c14e03852385b28f0/Screen_Shot_2015-06-19_at_2.58.42_PM.png) | ![Screen_Shot_2015-06-19_at_2.58.30_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/7bb8fd11b6c27615eef19154ffabe2de/Screen_Shot_2015-06-19_at_2.58.30_PM.png) |

Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2415

See merge request !851
2015-06-19 20:10:19 +00:00
Robert Speicher b6318297fc Use User#two_factor_enabled instead of otp_required_for_login 2015-06-19 15:14:37 -04:00
Robert Speicher 22dd2240a6 Add 2FA status to Admin::Users#show 2015-06-19 15:04:47 -04:00
Robert Speicher 6c8f0fe906 Add convenience methods to User for getting and setting 2FA status 2015-06-19 14:59:42 -04:00
Robert Speicher 7964e7d6a1 Move the User dashboard enum further up in the class 2015-06-19 14:59:07 -04:00
Jeff Blaine 06d2c09f95 Show username SSH config example 2015-06-19 14:49:23 -04:00
Jeff Blaine 39ad10f9fe Include non-default ssh key location info
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/875

Provide help for people who aren't SSH-clued by indicating
how to point to key files that have been named something
other than the default. A lot of people seem to assume that
the filename they choose is irrelevant and then wonder why
their private key is not being found by simple 'ssh' commands.
2015-06-19 14:49:23 -04:00
Job van der Voort 473fb23afc Merge branch 'starting_shell' into 'master'
Starting shell document to GitLab basics

I added a new branch for all the changes on this MR https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/1863

Everything should look nicer now :)

See merge request !1869
2015-06-19 16:14:49 +00:00
Strand McCutchen 3f7608683c Update Code of Conduct to Contributor Covenant 1.1.0 2015-06-19 09:55:35 -06:00
Douwe Maan b78981bc93 Merge branch 'blog-post-use-at-all' into 'master'
Define 'everyone'

See merge request !1872
2015-06-19 15:15:31 +00:00
karen Carias 0221628ffb deleted duplicated file 2015-06-19 08:12:49 -07:00
Dmitriy Zaporozhets f5e0e5c0a3 Replace old logo with new one
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-19 16:59:16 +02:00
Jacob Vosmaer 6c0db42951 Merge branch 'update-rake-docs-for-omnibus-assets' into 'master'
Update maintenance documentation to explain no need to recompile asssets for omnibus installations

See merge request !847
2015-06-19 14:54:02 +00:00
Stan Hu 9c47d69788 Update maintenance documentation to explain no need to recompile asssets for omnibus installations 2015-06-19 07:23:45 -07:00
Robert Speicher e59aad6e83 Refactor LineHighlighter 2015-06-19 04:31:24 -04:00
Robert Speicher 32366d1811 Rename BlobView to LineHighlighter 2015-06-19 04:31:24 -04:00