gitlab-org--gitlab-foss/spec
Jacob Schatz 423943da57 Merge branch 'desplacturing' into 'master'
Refactor remnants of CoffeeScript destructured opts and super into ES6

## What does this MR do?

Gets rid of some CoffeeScript remnants that are difficult to work with, and updates them to use ES6 syntax/constructs. I updated nearby code to ES6, but these updates usually just included using the es6 class syntax and scoped variable keywords. 

**Important**: For the most part, I tried to avoid refactoring the design of the existing code. If I attempted that, this would've taken much much longer and it would've been out of this issue's scope. 

## Why was this MR needed?

The compiled coffeescript for destructured default params is very difficult to work in. 

These changes makes some of these rough patches more maintainable:

e.g.
![Screen_Shot_2016-09-19_at_4.43.08_PM](/uploads/40cd3f79b9c5f595f3738213b0dadbbf/Screen_Shot_2016-09-19_at_4.43.08_PM.png)

## 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 [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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)

## What are the relevant issue numbers?

Meta Issue: 
https://gitlab.com/gitlab-org/gitlab-ce/issues/21887

Child Issues: 

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

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

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

## To Test Manually: 

#### app/assets/javascripts/LabelManager.js.es6 -> [diff](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6261/diffs#diff-1)
- Navigate to [Labels](http://localhost:3000/gitlab-org/gitlab-test/labels) and click around (toggle label priority, add new labels, subcribe, edit, delete)

#### app/assets/javascripts/blob/blob_ci_yaml.js.es6  -> [diff](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6261/diffs#diff-3)
- [Create new file](http://localhost:3000/gitlab-org/gitlab-test/new/master) and give it the name `.gitlab-ci.yml`, then attempt to select a template

#### app/assets/javascripts/blob/blob_license_selectors.js.es6 -> [diff](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6261/diffs#diff-7)
- [Create new file](http://localhost:3000/gitlab-org/gitlab-test/new/master) and give it the name `license`, then attempt to select a template

#### app/assets/javascripts/blob/template_selector.js.es6 -> [diff](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6261/diffs#diff-8)
- This class is extended by the two previously mentioned files. As long as they work, this should work.

#### app/assets/javascripts/issues-bulk-assignment.js.es6 -> [diff](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6261/diffs#diff-11)
- [Visit issues](http://localhost:3000/gitlab-org/gitlab-test/issues), assign multiple issues a new label or milestone and update.

#### app/assets/javascripts/profile/gl_crop.js.es6 -> [diff](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6261/diffs#diff-12)
- [Visit your profile settings](http://localhost:3000/profile), upload a photo and attempt to crop and set as new profile picture.

#### app/assets/javascripts/profile/profile.js.es6 > [diff](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6261/diffs#diff-14)
- [Visit your profile settings](http://localhost:3000/profile), change various fields (Name, Bio, Email, Notifs settings) and submit form

#### app/assets/javascripts/todos.js.es6 -> [diff](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6261/diffs#diff-18)
- [Visit an issue](http://localhost:3000/documentcloud/underscore/issues/6) and Add Todo, then visit [Todos](http://localhost:3000/dashboard/todos). Try out the sorting features, making sure everything looks right. Mark the Todo done. 

#### app/assets/javascripts/user.js.es6 -> [diff](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6261/diffs#diff-19)
- [Visit user profile](http://localhost:3000/u/root) and click between tabs. 

#### app/assets/javascripts/user_tabs.js.es6 -> [diff](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6261/diffs#diff-20)
- Same as previous.

cc: @jschatz1

See merge request !6261
2016-10-05 14:22:43 +00:00
..
config
controllers Merge branch 'restrict-failed-2fa-attempts' into 'master' 2016-10-04 15:04:57 +00:00
factories Merge branch '21983-member-add_user-doesn-t-detect-existing-members-that-have-requested-access' into 'master' 2016-10-02 11:42:57 +00:00
features Adds v-pre to code blocks in comments 2016-10-04 14:06:44 +01:00
finders Enable Lint/StringConversionInInterpolation cop and autocorrect offenses 2016-10-03 16:09:57 +02:00
fixtures Returns the total number of issues in the JSON response 2016-08-31 09:30:37 +01:00
helpers Merge branch 'rc-new-members-request-access-service' into 'master' 2016-10-02 11:33:06 +00:00
initializers
javascripts Fix test for SearchAutocomplete. 2016-10-05 11:25:04 +02:00
lib Merge branch 'test-improve-gitlab-identifier' into 'master' 2016-10-05 11:38:58 +00:00
mailers override subject method in devise mailer 2016-10-03 18:07:28 +08:00
models Merge branch 'test-improve-gitlab-identifier' into 'master' 2016-10-05 11:38:58 +00:00
policies Test if issue authors can access private projects 2016-09-20 14:57:23 -03:00
requests Merge branch 'update-runner-information' into 'master' 2016-10-05 10:23:43 +00:00
routing Fix markdown help references 2016-08-26 09:38:21 -05:00
services Merge branch 'all-skipped-equals-success' into 'master' 2016-10-05 08:48:05 +00:00
support Simplify Mentionable concern instance methods 2016-10-04 10:45:48 +02:00
tasks/gitlab
uploaders
views Merge branch '21744-fix-missing-values-in-linter' into 'master' 2016-09-30 16:51:47 +00:00
workers Refactor Gitlab::Identifier 2016-10-05 12:40:17 +02:00
factories_spec.rb
rails_helper.rb
simplecov_env.rb Bump SimpleCov merge timeout to 365 days 2016-08-22 13:44:14 +02:00
spec_helper.rb Upgrade Devise from 4.1.1 to 4.2.0. 2016-09-27 20:08:49 -06:00
teaspoon_env.rb