summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hound.yml4
-rw-r--r--.teatro.yml8
-rw-r--r--CHANGELOG28
-rw-r--r--CONTRIBUTING.md21
-rw-r--r--Gemfile9
-rw-r--r--Gemfile.lock29
-rw-r--r--README.md9
-rw-r--r--VERSION2
-rw-r--r--app/assets/images/brand_logo.pngbin0 -> 32119 bytes
-rw-r--r--app/assets/javascripts/application.js.coffee10
-rw-r--r--app/assets/javascripts/extensions/array.js2
-rw-r--r--app/assets/javascripts/groups.js.coffee2
-rw-r--r--app/assets/javascripts/markdown_area.js.coffee106
-rw-r--r--app/assets/javascripts/merge_request.js.coffee4
-rw-r--r--app/assets/javascripts/notes.js.coffee13
-rw-r--r--app/assets/javascripts/profile.js.coffee2
-rw-r--r--app/assets/stylesheets/application.scss8
-rw-r--r--app/assets/stylesheets/generic/buttons.scss8
-rw-r--r--app/assets/stylesheets/generic/common.scss14
-rw-r--r--app/assets/stylesheets/generic/forms.scss28
-rw-r--r--app/assets/stylesheets/generic/jquery.scss4
-rw-r--r--app/assets/stylesheets/generic/selects.scss2
-rw-r--r--app/assets/stylesheets/gl_bootstrap.scss2
-rw-r--r--app/assets/stylesheets/main/variables.scss6
-rw-r--r--app/assets/stylesheets/sections/commits.scss40
-rw-r--r--app/assets/stylesheets/sections/diff.scss4
-rw-r--r--app/assets/stylesheets/sections/errors.scss14
-rw-r--r--app/assets/stylesheets/sections/events.scss3
-rw-r--r--app/assets/stylesheets/sections/explore.scss8
-rw-r--r--app/assets/stylesheets/sections/groups.scss4
-rw-r--r--app/assets/stylesheets/sections/header.scss19
-rw-r--r--app/assets/stylesheets/sections/login.scss18
-rw-r--r--app/assets/stylesheets/sections/nav.scss2
-rw-r--r--app/assets/stylesheets/sections/notes.scss46
-rw-r--r--app/assets/stylesheets/sections/profile.scss15
-rw-r--r--app/assets/stylesheets/sections/projects.scss4
-rw-r--r--app/assets/stylesheets/sections/tree.scss1
-rw-r--r--app/assets/stylesheets/themes/ui_basic.scss18
-rw-r--r--app/controllers/admin/broadcast_messages_controller.rb9
-rw-r--r--app/controllers/admin/groups_controller.rb8
-rw-r--r--app/controllers/admin/hooks_controller.rb6
-rw-r--r--app/controllers/admin/users_controller.rb45
-rw-r--r--app/controllers/application_controller.rb25
-rw-r--r--app/controllers/explore/groups_controller.rb14
-rw-r--r--app/controllers/explore/projects_controller.rb19
-rw-r--r--app/controllers/groups/milestones_controller.rb56
-rw-r--r--app/controllers/groups_controller.rb8
-rw-r--r--app/controllers/omniauth_callbacks_controller.rb19
-rw-r--r--app/controllers/profiles/emails_controller.rb8
-rw-r--r--app/controllers/profiles/keys_controller.rb7
-rw-r--r--app/controllers/profiles/passwords_controller.rb12
-rw-r--r--app/controllers/profiles_controller.rb14
-rw-r--r--app/controllers/projects/blob_controller.rb10
-rw-r--r--app/controllers/projects/commit_controller.rb14
-rw-r--r--app/controllers/projects/commits_controller.rb2
-rw-r--r--app/controllers/projects/compare_controller.rb6
-rw-r--r--app/controllers/projects/deploy_keys_controller.rb6
-rw-r--r--app/controllers/projects/edit_tree_controller.rb2
-rw-r--r--app/controllers/projects/hooks_controller.rb6
-rw-r--r--app/controllers/projects/issues_controller.rb19
-rw-r--r--app/controllers/projects/merge_requests_controller.rb75
-rw-r--r--app/controllers/projects/milestones_controller.rb8
-rw-r--r--app/controllers/projects/notes_controller.rb25
-rw-r--r--app/controllers/projects/protected_branches_controller.rb8
-rw-r--r--app/controllers/projects/refs_controller.rb2
-rw-r--r--app/controllers/projects/repositories_controller.rb1
-rw-r--r--app/controllers/projects/services_controller.rb9
-rw-r--r--app/controllers/projects/snippets_controller.rb8
-rw-r--r--app/controllers/projects/team_members_controller.rb6
-rw-r--r--app/controllers/projects/tree_controller.rb9
-rw-r--r--app/controllers/projects_controller.rb46
-rw-r--r--app/controllers/public/projects_controller.rb14
-rw-r--r--app/controllers/registrations_controller.rb13
-rw-r--r--app/controllers/sessions_controller.rb23
-rw-r--r--app/controllers/snippets_controller.rb8
-rw-r--r--app/controllers/users_groups_controller.rb6
-rw-r--r--app/finders/notes_finder.rb2
-rw-r--r--app/finders/trending_projects_finder.rb19
-rw-r--r--app/helpers/appearances_helper.rb17
-rw-r--r--app/helpers/commits_helper.rb12
-rw-r--r--app/helpers/dashboard_helper.rb38
-rw-r--r--app/helpers/diff_helper.rb22
-rw-r--r--app/helpers/events_helper.rb21
-rw-r--r--app/helpers/gitlab_markdown_helper.rb23
-rw-r--r--app/helpers/groups_helper.rb11
-rw-r--r--app/helpers/notes_helper.rb25
-rw-r--r--app/helpers/projects_helper.rb6
-rw-r--r--app/mailers/emails/issues.rb32
-rw-r--r--app/mailers/emails/merge_requests.rb38
-rw-r--r--app/mailers/emails/notes.rb23
-rw-r--r--app/mailers/emails/profile.rb3
-rw-r--r--app/mailers/notify.rb46
-rw-r--r--app/models/ability.rb50
-rw-r--r--app/models/broadcast_message.rb2
-rw-r--r--app/models/commit.rb27
-rw-r--r--app/models/concerns/mentionable.rb12
-rw-r--r--app/models/concerns/token_authenticatable.rb31
-rw-r--r--app/models/deploy_keys_project.rb3
-rw-r--r--app/models/email.rb8
-rw-r--r--app/models/event.rb17
-rw-r--r--app/models/forked_project_link.rb4
-rw-r--r--app/models/group.rb18
-rw-r--r--app/models/group_milestone.rb95
-rw-r--r--app/models/issue.rb3
-rw-r--r--app/models/key.rb2
-rw-r--r--app/models/merge_request.rb15
-rw-r--r--app/models/merge_request_diff.rb2
-rw-r--r--app/models/milestone.rb2
-rw-r--r--app/models/namespace.rb6
-rw-r--r--app/models/note.rb43
-rw-r--r--app/models/project.rb36
-rw-r--r--app/models/project_hook.rb2
-rw-r--r--app/models/project_services/assembla_service.rb2
-rw-r--r--app/models/project_services/campfire_service.rb2
-rw-r--r--app/models/project_services/emails_on_push_service.rb2
-rw-r--r--app/models/project_services/gitlab_ci_service.rb2
-rw-r--r--app/models/project_services/hipchat_service.rb2
-rw-r--r--app/models/project_services/slack_service.rb3
-rw-r--r--app/models/protected_branch.rb2
-rw-r--r--app/models/repository.rb36
-rw-r--r--app/models/service.rb2
-rw-r--r--app/models/snippet.rb2
-rw-r--r--app/models/user.rb91
-rw-r--r--app/models/users_group.rb19
-rw-r--r--app/models/users_project.rb39
-rw-r--r--app/models/web_hook.rb2
-rw-r--r--app/observers/base_observer.rb13
-rw-r--r--app/observers/note_observer.rb20
-rw-r--r--app/observers/project_activity_cache_observer.rb8
-rw-r--r--app/observers/project_observer.rb30
-rw-r--r--app/observers/system_hook_observer.rb17
-rw-r--r--app/observers/user_observer.rb20
-rw-r--r--app/observers/users_group_observer.rb9
-rw-r--r--app/observers/users_project_observer.rb23
-rw-r--r--app/services/base_service.rb4
-rw-r--r--app/services/files/create_service.rb5
-rw-r--r--app/services/issues/base_service.rb7
-rw-r--r--app/services/issues/close_service.rb2
-rw-r--r--app/services/issues/create_service.rb2
-rw-r--r--app/services/issues/reopen_service.rb3
-rw-r--r--app/services/issues/update_service.rb6
-rw-r--r--app/services/merge_requests/auto_merge_service.rb6
-rw-r--r--app/services/merge_requests/build_service.rb70
-rw-r--r--app/services/merge_requests/reopen_service.rb1
-rw-r--r--app/services/merge_requests/update_service.rb8
-rw-r--r--app/services/milestones/group_service.rb26
-rw-r--r--app/services/milestones/update_service.rb4
-rw-r--r--app/services/notes/create_service.rb19
-rw-r--r--app/services/notification_service.rb37
-rw-r--r--app/services/projects/create_service.rb30
-rw-r--r--app/services/projects/destroy_service.rb28
-rw-r--r--app/services/projects/participants_service.rb43
-rw-r--r--app/services/projects/transfer_service.rb2
-rw-r--r--app/services/projects/update_service.rb15
-rw-r--r--app/services/search/global_service.rb1
-rw-r--r--app/services/search/project_service.rb6
-rw-r--r--app/views/admin/users/_form.html.haml4
-rw-r--r--app/views/admin/users/show.html.haml2
-rw-r--r--app/views/dashboard/_zero_authorized_projects.html.haml2
-rw-r--r--app/views/dashboard/issues.html.haml1
-rw-r--r--app/views/dashboard/merge_requests.html.haml1
-rw-r--r--app/views/dashboard/show.html.haml4
-rwxr-xr-xapp/views/devise/confirmations/new.html.haml28
-rw-r--r--app/views/devise/mailer/confirmation_instructions.html.erb2
-rw-r--r--app/views/devise/mailer/reset_password_instructions.html.erb2
-rw-r--r--app/views/devise/mailer/unlock_instructions.html.erb2
-rw-r--r--app/views/devise/passwords/edit.html.haml33
-rwxr-xr-xapp/views/devise/passwords/new.html.haml27
-rw-r--r--app/views/devise/registrations/new.html.haml51
-rw-r--r--app/views/devise/sessions/_new_base.html.haml4
-rw-r--r--app/views/devise/sessions/_new_ldap.html.haml2
-rw-r--r--app/views/devise/sessions/new.html.haml77
-rw-r--r--app/views/devise/shared/_sign_in_link.html.haml5
-rw-r--r--app/views/errors/access_denied.html.haml4
-rw-r--r--app/views/errors/encoding.html.haml4
-rw-r--r--app/views/errors/git_not_found.html.haml4
-rw-r--r--app/views/errors/not_found.html.haml4
-rw-r--r--app/views/errors/omniauth_error.html.haml12
-rw-r--r--app/views/events/_event_issue.atom.haml2
-rw-r--r--app/views/events/_event_merge_request.atom.haml2
-rw-r--r--app/views/events/_event_note.atom.haml2
-rw-r--r--app/views/events/_event_push.atom.haml2
-rw-r--r--app/views/explore/groups/index.html.haml51
-rw-r--r--app/views/explore/projects/_project.html.haml20
-rw-r--r--app/views/explore/projects/index.html.haml38
-rw-r--r--app/views/explore/projects/trending.html.haml11
-rw-r--r--app/views/groups/_filter.html.haml23
-rw-r--r--app/views/groups/issues.html.haml1
-rw-r--r--app/views/groups/merge_requests.html.haml1
-rw-r--r--app/views/groups/milestones/_issue.html.haml10
-rw-r--r--app/views/groups/milestones/_issues.html.haml6
-rw-r--r--app/views/groups/milestones/_merge_request.html.haml10
-rw-r--r--app/views/groups/milestones/_merge_requests.html.haml6
-rw-r--r--app/views/groups/milestones/index.html.haml50
-rw-r--r--app/views/groups/milestones/show.html.haml88
-rw-r--r--app/views/groups/new.html.haml8
-rw-r--r--app/views/groups/show.html.haml4
-rw-r--r--app/views/help/index.html.haml24
-rw-r--r--app/views/layouts/_head.html.haml14
-rw-r--r--app/views/layouts/_head_panel.html.haml2
-rw-r--r--app/views/layouts/_public_head_panel.html.haml2
-rw-r--r--app/views/layouts/_search.html.haml2
-rw-r--r--app/views/layouts/admin.html.haml2
-rw-r--r--app/views/layouts/devise.html.haml35
-rw-r--r--app/views/layouts/errors.html.haml7
-rw-r--r--app/views/layouts/explore.html.haml28
-rw-r--r--app/views/layouts/nav/_admin.html.haml6
-rw-r--r--app/views/layouts/nav/_dashboard.html.haml2
-rw-r--r--app/views/layouts/nav/_group.html.haml5
-rw-r--r--app/views/layouts/nav/_profile.html.haml2
-rw-r--r--app/views/layouts/nav/_project.html.haml2
-rw-r--r--app/views/layouts/notify.html.haml4
-rw-r--r--app/views/layouts/projects.html.haml2
-rw-r--r--app/views/layouts/public.html.haml11
-rw-r--r--app/views/notify/merge_request_status_email.html.haml2
-rw-r--r--app/views/notify/merge_request_status_email.text.haml8
-rw-r--r--app/views/notify/new_user_email.html.haml9
-rw-r--r--app/views/notify/new_user_email.text.erb7
-rw-r--r--app/views/notify/project_was_moved_email.html.haml6
-rw-r--r--app/views/notify/project_was_moved_email.text.erb4
-rw-r--r--app/views/notify/reassigned_issue_email.html.haml5
-rw-r--r--app/views/notify/reassigned_issue_email.text.erb2
-rw-r--r--app/views/notify/repository_push_email.html.haml4
-rw-r--r--app/views/notify/repository_push_email.text.haml4
-rw-r--r--app/views/profiles/keys/new.html.haml4
-rw-r--r--app/views/profiles/show.html.haml10
-rw-r--r--app/views/projects/_home_panel.html.haml7
-rw-r--r--app/views/projects/blob/_blob.html.haml2
-rw-r--r--app/views/projects/blob/_download.html.haml2
-rw-r--r--app/views/projects/commit/huge_commit.html.haml3
-rw-r--r--app/views/projects/commit/show.html.haml2
-rw-r--r--app/views/projects/commits/_commit.html.haml18
-rw-r--r--app/views/projects/commits/_diff_file.html.haml48
-rw-r--r--app/views/projects/commits/_diff_head.html.haml26
-rw-r--r--app/views/projects/commits/_diff_stats.html.haml41
-rw-r--r--app/views/projects/commits/_diff_warning.html.haml19
-rw-r--r--app/views/projects/commits/_diffs.html.haml108
-rw-r--r--app/views/projects/commits/_text_file.html.haml2
-rw-r--r--app/views/projects/compare/show.html.haml15
-rw-r--r--app/views/projects/edit.html.haml2
-rw-r--r--app/views/projects/edit_tree/show.html.haml5
-rw-r--r--app/views/projects/graphs/show.html.haml2
-rw-r--r--app/views/projects/import.html.haml4
-rw-r--r--app/views/projects/issues/_head.html.haml2
-rw-r--r--app/views/projects/issues/_issue.html.haml4
-rw-r--r--app/views/projects/issues/index.html.haml2
-rw-r--r--app/views/projects/merge_requests/_new_compare.html.haml8
-rw-r--r--app/views/projects/merge_requests/_new_submit.html.haml9
-rw-r--r--app/views/projects/merge_requests/_show.html.haml3
-rw-r--r--app/views/projects/merge_requests/index.html.haml3
-rw-r--r--app/views/projects/merge_requests/new.html.haml2
-rw-r--r--app/views/projects/merge_requests/show/_mr_accept.html.haml2
-rw-r--r--app/views/projects/merge_requests/show/_mr_ci.html.haml8
-rw-r--r--app/views/projects/milestones/_issue.html.haml2
-rw-r--r--app/views/projects/milestones/_merge_request.html.haml2
-rw-r--r--app/views/projects/milestones/_milestone.html.haml2
-rw-r--r--app/views/projects/milestones/show.html.haml4
-rw-r--r--app/views/projects/new.html.haml2
-rw-r--r--app/views/projects/notes/_commit_discussion.html.haml0
-rw-r--r--app/views/projects/notes/_diff_notes_with_reply.html.haml6
-rw-r--r--app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml8
-rw-r--r--app/views/projects/notes/_discussion.html.haml52
-rw-r--r--app/views/projects/notes/_discussion_reply_button.html.haml10
-rw-r--r--app/views/projects/notes/_form.html.haml4
-rw-r--r--app/views/projects/notes/discussions/_active.html.haml21
-rw-r--r--app/views/projects/notes/discussions/_commit.html.haml28
-rw-r--r--app/views/projects/notes/discussions/_diff.html.haml (renamed from app/views/projects/notes/_discussion_diff.html.haml)0
-rw-r--r--app/views/projects/notes/discussions/_outdated.html.haml20
-rw-r--r--app/views/projects/repositories/_download_archive.html.haml2
-rw-r--r--app/views/projects/show.html.haml10
-rw-r--r--app/views/projects/tree/_blob_item.html.haml2
-rw-r--r--app/views/projects/tree/_readme.html.haml2
-rw-r--r--app/views/projects/tree/_tree_item.html.haml2
-rw-r--r--app/views/public/projects/index.html.haml68
-rw-r--r--app/views/search/_project_results.html.haml1
-rw-r--r--app/views/search/results/_issue.html.haml2
-rw-r--r--app/views/search/results/_merge_request.html.haml6
-rw-r--r--app/views/search/results/_note.html.haml9
-rw-r--r--app/views/shared/_filter.html.haml6
-rw-r--r--app/views/shared/_project_filter.html.haml6
-rw-r--r--app/views/users/_groups.html.haml2
-rw-r--r--app/workers/repository_import_worker.rb3
-rw-r--r--config/application.rb15
-rw-r--r--config/database.yml.postgresql4
-rw-r--r--config/environments/development.rb3
-rw-r--r--config/environments/test.rb3
-rw-r--r--config/gitlab.teatro.yml86
-rw-r--r--config/gitlab.yml.example16
-rw-r--r--config/initializers/1_settings.rb3
-rw-r--r--config/initializers/devise.rb4
-rw-r--r--config/locales/devise.en.yml3
-rw-r--r--config/routes.rb26
-rw-r--r--db/fixtures/development/01_admin.rb2
-rw-r--r--db/fixtures/production/001_admin.rb4
-rw-r--r--db/migrate/20140407135544_fix_namespaces.rb2
-rw-r--r--doc/api/merge_requests.md26
-rw-r--r--doc/api/repositories.md29
-rw-r--r--doc/api/users.md70
-rw-r--r--doc/development/gitlab_diagram_overview.odgbin26292 -> 50512 bytes
-rw-r--r--doc/development/gitlab_diagram_overview.pngbin130285 -> 256612 bytes
-rw-r--r--doc/install/installation.md12
-rw-r--r--doc/install/requirements.md45
-rw-r--r--doc/markdown/markdown.md46
-rw-r--r--doc/permissions/permissions.md1
-rw-r--r--doc/public_access/public_access.md4
-rw-r--r--doc/raketasks/backup_hrz.pngbin0 -> 21955 bytes
-rw-r--r--doc/raketasks/backup_restore.md12
-rw-r--r--doc/raketasks/cleanup.md8
-rw-r--r--doc/raketasks/features.md18
-rw-r--r--doc/raketasks/import.md4
-rw-r--r--doc/raketasks/maintenance.md10
-rw-r--r--doc/raketasks/user_management.md16
-rw-r--r--doc/raketasks/web_hooks.md18
-rw-r--r--doc/release/monthly.md124
-rw-r--r--doc/release/patch.md3
-rw-r--r--doc/release/security.md3
-rw-r--r--doc/update/5.1-to-6.0.md6
-rw-r--r--doc/update/6.0-to-7.1.md (renamed from doc/update/6.0-to-7.0.md)18
-rw-r--r--doc/update/6.9-to-7.0.md48
-rw-r--r--doc/update/7.0-to-7.1.md138
-rw-r--r--doc/update/README.md1
-rw-r--r--doc/update/mysql_to_postgresql.md2
-rw-r--r--doc/update/ruby.md59
-rw-r--r--doc/workflow/README.md1
-rw-r--r--doc/workflow/groups.md71
-rw-r--r--doc/workflow/groups/add_member_to_group.pngbin0 -> 138184 bytes
-rw-r--r--doc/workflow/groups/group_dashboard.pngbin0 -> 107332 bytes
-rw-r--r--doc/workflow/groups/group_with_two_projects.pngbin0 -> 129319 bytes
-rw-r--r--doc/workflow/groups/new_group_button.pngbin0 -> 185406 bytes
-rw-r--r--doc/workflow/groups/new_group_form.pngbin0 -> 106491 bytes
-rw-r--r--doc/workflow/groups/override_access_level.pngbin0 -> 157193 bytes
-rw-r--r--doc/workflow/groups/project_members_via_group.pngbin0 -> 151339 bytes
-rw-r--r--doc/workflow/groups/transfer_project.pngbin0 -> 164958 bytes
-rw-r--r--features/admin/users.feature8
-rw-r--r--features/explore/projects.feature (renamed from features/public/projects.feature)2
-rw-r--r--features/explore/public_groups.feature (renamed from features/public/public_groups.feature)34
-rw-r--r--features/group.feature21
-rw-r--r--features/project/commits/user_lookup.feature2
-rw-r--r--features/project/edit_issuetracker.feature2
-rw-r--r--features/project/project.feature11
-rw-r--r--features/project/public.feature8
-rw-r--r--features/project/redirects.feature12
-rw-r--r--features/project/source/browse_files.feature14
-rw-r--r--features/steps/admin/active_tab.rb2
-rw-r--r--features/steps/admin/users.rb19
-rw-r--r--features/steps/dashboard/active_tab.rb2
-rw-r--r--features/steps/explore/groups_feature.rb (renamed from features/steps/public/groups_feature.rb)18
-rw-r--r--features/steps/explore/projects.rb (renamed from features/steps/public/projects.rb)2
-rw-r--r--features/steps/group/group.rb101
-rw-r--r--features/steps/profile/active_tab.rb2
-rw-r--r--features/steps/project/active_tab.rb2
-rw-r--r--features/steps/project/archived.rb2
-rw-r--r--features/steps/project/browse_commits.rb5
-rw-r--r--features/steps/project/browse_files.rb28
-rw-r--r--features/steps/project/merge_requests.rb12
-rw-r--r--features/steps/project/multiselect_blob.rb2
-rw-r--r--features/steps/project/project.rb23
-rw-r--r--features/steps/project/public.rb9
-rw-r--r--features/steps/project/redirects.rb38
-rw-r--r--features/steps/shared/active_tab.rb6
-rw-r--r--features/steps/shared/diff_note.rb48
-rw-r--r--features/steps/shared/group.rb8
-rw-r--r--features/steps/shared/paths.rb10
-rw-r--r--features/steps/shared/project.rb2
-rw-r--r--lib/api/entities.rb4
-rw-r--r--lib/api/helpers.rb8
-rw-r--r--lib/api/notes.rb13
-rw-r--r--lib/api/repositories.rb12
-rw-r--r--lib/api/users.rb4
-rw-r--r--lib/gitlab/config_helper.rb9
-rw-r--r--lib/gitlab/contributors.rb9
-rw-r--r--lib/gitlab/ldap/adapter.rb10
-rw-r--r--lib/gitlab/markdown.rb7
-rw-r--r--lib/gitlab/oauth/user.rb10
-rw-r--r--lib/gitlab/regex.rb25
-rw-r--r--lib/gitlab/satellite/action.rb2
-rw-r--r--lib/gitlab/satellite/compare_action.rb4
-rw-r--r--lib/gitlab/satellite/merge_action.rb3
-rw-r--r--lib/gitlab/satellite/satellite.rb2
-rw-r--r--lib/gitlab/theme.rb10
-rw-r--r--lib/gitlab/url_builder.rb25
-rw-r--r--lib/gitlab/visibility_level.rb8
-rw-r--r--lib/tasks/cache.rake7
-rw-r--r--lib/tasks/gitlab/check.rake40
-rw-r--r--lib/tasks/gitlab/cleanup.rake24
-rw-r--r--lib/tasks/gitlab/test.rake2
-rw-r--r--spec/controllers/application_controller_spec.rb2
-rw-r--r--spec/controllers/blob_controller_spec.rb14
-rw-r--r--spec/controllers/tree_controller_spec.rb13
-rw-r--r--spec/factories.rb3
-rw-r--r--spec/features/admin/admin_users_spec.rb18
-rw-r--r--spec/features/profile_spec.rb2
-rw-r--r--spec/features/projects_spec.rb2
-rw-r--r--spec/features/search_spec.rb1
-rw-r--r--spec/fixtures/doc_sample.txt2
-rw-r--r--spec/helpers/gitlab_markdown_helper_spec.rb14
-rw-r--r--spec/javascripts/stat_graph_spec.js2
-rw-r--r--spec/lib/gitlab/regex_spec.rb21
-rw-r--r--spec/lib/gitlab/satellite/action_spec.rb5
-rw-r--r--spec/lib/gitlab/url_builder_spec.rb11
-rw-r--r--spec/mailers/notify_spec.rb53
-rw-r--r--spec/models/event_spec.rb22
-rw-r--r--spec/models/gitlab_ci_service_spec.rb1
-rw-r--r--spec/models/issue_spec.rb2
-rw-r--r--spec/models/key_spec.rb2
-rw-r--r--spec/models/merge_request_spec.rb2
-rw-r--r--spec/models/milestone_spec.rb1
-rw-r--r--spec/models/namespace_spec.rb2
-rw-r--r--spec/models/note_spec.rb2
-rw-r--r--spec/models/project_snippet_spec.rb1
-rw-r--r--spec/models/project_spec.rb5
-rw-r--r--spec/models/protected_branch_spec.rb1
-rw-r--r--spec/models/service_spec.rb1
-rw-r--r--spec/models/snippet_spec.rb1
-rw-r--r--spec/models/system_hook_spec.rb9
-rw-r--r--spec/models/user_spec.rb66
-rw-r--r--spec/models/users_group_spec.rb29
-rw-r--r--spec/models/users_project_spec.rb1
-rw-r--r--spec/models/web_hook_spec.rb1
-rw-r--r--spec/observers/note_observer_spec.rb56
-rw-r--r--spec/observers/user_observer_spec.rb27
-rw-r--r--spec/observers/users_group_observer_spec.rb32
-rw-r--r--spec/observers/users_project_observer_spec.rb63
-rw-r--r--spec/requests/api/branches_spec.rb2
-rw-r--r--spec/requests/api/commits_spec.rb3
-rw-r--r--spec/requests/api/files_spec.rb3
-rw-r--r--spec/requests/api/internal_spec.rb3
-rw-r--r--spec/requests/api/issues_spec.rb3
-rw-r--r--spec/requests/api/merge_requests_spec.rb2
-rw-r--r--spec/requests/api/milestones_spec.rb6
-rw-r--r--spec/requests/api/namespaces_spec.rb3
-rw-r--r--spec/requests/api/notes_spec.rb7
-rw-r--r--spec/requests/api/project_hooks_spec.rb3
-rw-r--r--spec/requests/api/project_members_spec.rb3
-rw-r--r--spec/requests/api/projects_spec.rb3
-rw-r--r--spec/requests/api/repositories_spec.rb19
-rw-r--r--spec/requests/api/services_spec.rb3
-rw-r--r--spec/requests/api/users_spec.rb13
-rw-r--r--spec/services/issues/bulk_update_context_spec.rb13
-rw-r--r--spec/services/milestones/group_service_spec.rb70
-rw-r--r--spec/services/notes/create_service_spec.rb26
-rw-r--r--spec/services/notification_service_spec.rb86
-rw-r--r--spec/services/projects/create_service_spec.rb98
-rw-r--r--spec/services/projects/image_service_spec.rb3
-rw-r--r--spec/services/projects/transfer_service_spec.rb3
-rw-r--r--spec/services/projects/update_service_spec.rb19
-rw-r--r--spec/services/search_service_spec.rb23
-rw-r--r--spec/spec_helper.rb2
-rw-r--r--spec/support/login_helpers.rb4
-rw-r--r--spec/support/mentionable_shared_examples.rb8
-rw-r--r--spec/support/test_env.rb20
-rw-r--r--spec/support/valid_commit_with_alt_email.rb2
-rw-r--r--vendor/assets/javascripts/highlight.pack.js1
-rw-r--r--vendor/assets/javascripts/highlightjs.min.js1
454 files changed, 4261 insertions, 2277 deletions
diff --git a/.hound.yml b/.hound.yml
new file mode 100644
index 00000000000..3bde29fb2bf
--- /dev/null
+++ b/.hound.yml
@@ -0,0 +1,4 @@
+# Prefer single quotes
+StringLiterals:
+ EnforcedStyle: single_quotes
+ Enabled: true
diff --git a/.teatro.yml b/.teatro.yml
new file mode 100644
index 00000000000..30054361981
--- /dev/null
+++ b/.teatro.yml
@@ -0,0 +1,8 @@
+stage:
+ before:
+ - cp config/gitlab.teatro.yml config/gitlab.yml
+ - mkdir /apps/gitlab-satellites
+ - mkdir /apps/repositories
+
+ database:
+ - RAILS_ENV=development force=yes bundle exec rake db:create gitlab:setup \ No newline at end of file
diff --git a/CHANGELOG b/CHANGELOG
index 495d20e8b04..2675db90543 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,31 @@
+v 7.1.0
+ - Remove observers
+ - Improve MR discussions
+ - Filter by description on Issues#index page
+ - Fix bug with namespace select when create new project page
+ - Show README link after description for non-master members
+ - Add @all mention for comments
+ - Dont show reply button if user is not signed in
+ - Expose more information for issues with webhook
+ - Add a mention of the merge request into the default merge request commit message
+ - Improve code highlight, introduce support for more languages like Go, Clojure, Erlang etc
+ - Fix concurrency issue in repository download
+ - Dont allow repository name start with ?
+ - Improve email threading (Pierre de La Morinerie)
+ - Cleaner help page
+ - Group milestones
+ - Improved email notifications
+ - Contributors API (sponsored by Mobbr)
+ - Fix LDAP TLS authentication (Boris HUISGEN)
+ - Show VERSION information on project sidebar
+ - Improve branch removal logic when accept MR
+ - Fix bug where comment form is spawned inside the Reply button
+ - Remove Dir.chdir from Satellite#lock for thread-safety
+ - Increased default git max_size value from 5MB to 20MB in gitlab.yml. Please update your configs!
+ - Show error message in case of timeout in satellite when create MR
+ - Show first 100 files for huge diff instead of hiding all
+ - Change default admin email from admin@local.host to admin@example.com
+
v 7.0.0
- The CPU no longer overheats when you hold down the spacebar
- Improve edit file UI
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3b6212c960d..f02ba2216d2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,8 +1,8 @@
# Contribute to GitLab
-This guide details how contribute to GitLab.
-
-If you want to know how the GitLab team handles contributions have a look at [the GitLab contributing process](PROCESS.md).
+Thank you for your interest in contributing to GitLab.
+This guide details how contribute to GitLab in a way that is efficient for everyone.
+If you have read this guide and want to know how the GitLab core-team operates please see [the GitLab contributing process](PROCESS.md).
## Contributor license agreement
@@ -42,7 +42,7 @@ Please send a merge request with a tested solution or a merge request with a fai
1. **Observed behavior**
1. **Relevant logs and/or screenshots:** Please use code blocks (\`\`\`) to format console output, logs, and code as it's very hard to read otherwise.
1. **Output of checks**
- * Results of GitLab [Application Check](doc/install/installation.md#check-application-status) (`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production`); we will only investigate if the tests are passing
+ * Results of GitLab [Application Check](doc/install/installation.md#check-application-status) (`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`); we will only investigate if the tests are passing
* Version of GitLab you are running; we will only investigate issues in the latest stable and development releases as per the [maintenance policy](MAINTENANCE.md)
* Add the last commit sha1 of the GitLab version you used to replicate the issue (obtainable from the help page)
* Describe your setup (use relevant parts from `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
@@ -65,19 +65,19 @@ If you can, please submit a merge request with the fix or improvements including
1. If you have multiple commits please combine them into one commit by [squashing them](http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
1. Push the commit to your fork
1. Submit a merge request (MR) to the master branch
-1. The MR title should describes the change you want to make
+1. The MR title should describe the change you want to make
1. The MR description should give a motive for your change and the method you used to achieve it
1. If the MR changes the UI it should include before and after screenshots
1. If the MR changes CSS classes please include the list of affected pages `grep css-class ./app -R`
1. Link relevant [issues](https://gitlab.com/gitlab-org/gitlab-ce/issues) and/or [feature requests](http://feedback.gitlab.com/) from the merge request description and leave a comment on them with a link back to the MR
-1. Be prepared to answer questions and incorporate feedback even if requests for this arrive weeks or months after your MR submittion
+1. Be prepared to answer questions and incorporate feedback even if requests for this arrive weeks or months after your MR submission
1. If your MR touches code that executes shell commands, make sure it adheres to the [shell command guidelines]( doc/development/shell_commands.md).
The **official merge window** is in the beginning of the month from the 1st to the 7th day of the month. The best time to submit a MR and get feedback fast. Before this time the GitLab B.V. team is still dealing with work that is created by the monthly release such as assisting subscribers with upgrade issues, the release of Enterprise Edition and the upgrade of GitLab Cloud. After the 7th it is already getting closer to the release date of the next version. This means there is less time to fix the issues created by merging large new features.
-Please keep the change in a single MR **as small as possible**. If you want to contribute a large feature think very hard what the minimum viable change is. Can you split functionality? Can you only submit the backend/API code? Can you start with a very simple UI? The smaller a MR is the more likely it is it will be merged, after that you can send more MR's to enhance it.
+Please keep the change in a single MR **as small as possible**. If you want to contribute a large feature think very hard what the minimum viable change is. Can you split functionality? Can you only submit the backend/API code? Can you start with a very simple UI? Can you do part of the refactor? The increased reviewability of small MR's that leads to higher code quality is more important to us than having a mimimal commit log. The smaller a MR is the more likely it is it will be merged (quickly), after that you can send more MR's to enhance it.
-For examples of feedback on merge requests please look at already [closed merge requests](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests?assignee_id=&label_name=&milestone_id=&scope=&sort=&state=closed). Please ensure that your merge request meets the following contribution acceptance criteria.
+For examples of feedback on merge requests please look at already [closed merge requests](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests?assignee_id=&label_name=&milestone_id=&scope=&sort=&state=closed). If you would like quick feedback on your merge request feel free to mention one of the Merge Marshalls of [the core-team](https://about.gitlab.com/core-team/). Please ensure that your merge request meets the following contribution acceptance criteria.
**Please format your merge request description as follows:**
@@ -97,7 +97,8 @@ For examples of feedback on merge requests please look at already [closed merge
1. Keeps the GitLab code base clean and well structured
1. Contains functionality we think other users will benefit from too
1. Doesn't add configuration options since they complicate future changes
-1. Contains a single commit (please use `git rebase -i` to squash commits)
+1. Initially contains a single commit (please use `git rebase -i` to squash commits)
+1. Changes after submitting the merge request should be in separate commits (no squashing). You will be asked to squash when the review is over, before merging.
1. It conforms to the following style guides
## Style guides
@@ -113,4 +114,4 @@ For examples of feedback on merge requests please look at already [closed merge
1. [Shell commands](doc/development/shell_commands.md) created by GitLab contributors to enhance security
1. [Markdown](http://www.cirosantilli.com/markdown-styleguide)
-This is also the style used by linting tools such as [Rubocop](https://github.com/bbatsov/rubocop), PullReview[https://www.pullreview.com/] and [Hound CI](https://houndci.com).
+This is also the style used by linting tools such as [Rubocop](https://github.com/bbatsov/rubocop), [PullReview](https://www.pullreview.com/) and [Hound CI](https://houndci.com).
diff --git a/Gemfile b/Gemfile
index c64213479f7..86f8edbdad4 100644
--- a/Gemfile
+++ b/Gemfile
@@ -10,9 +10,6 @@ end
gem "rails", "~> 4.1.0"
-gem "protected_attributes"
-gem 'rails-observers'
-
# Make links from text
gem 'rails_autolink', '~> 1.1'
@@ -24,8 +21,8 @@ gem "mysql2", group: :mysql
gem "pg", group: :postgres
# Auth
-gem "devise", '3.0.4'
-gem "devise-async", '0.8.0'
+gem "devise", '3.2.4'
+gem "devise-async", '0.9.0'
gem 'omniauth', "~> 1.1.3"
gem 'omniauth-google-oauth2'
gem 'omniauth-twitter'
@@ -49,7 +46,6 @@ gem "gitlab-linguist", "~> 3.0.0", require: "linguist"
# API
gem "grape", "~> 0.6.1"
-# Replace with rubygems when nesteted entities get released
gem "grape-entity", "~> 0.4.2"
gem 'rack-cors', require: 'rack/cors'
@@ -177,6 +173,7 @@ gem "font-awesome-rails", '~> 3.2'
gem "gitlab_emoji", "~> 0.0.1.1"
gem "gon", '~> 5.0.0'
gem 'nprogress-rails'
+gem 'request_store'
group :development do
gem "annotate", "~> 2.6.0.beta2"
diff --git a/Gemfile.lock b/Gemfile.lock
index 6c27b6e3739..fe85e9ec9ea 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -40,7 +40,7 @@ GEM
axiom-types (0.0.5)
descendants_tracker (~> 0.0.1)
ice_nine (~> 0.9)
- bcrypt-ruby (3.1.2)
+ bcrypt (3.1.7)
better_errors (1.0.1)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
@@ -94,13 +94,14 @@ GEM
default_value_for (3.0.0)
activerecord (>= 3.2.0, < 5.0)
descendants_tracker (0.0.3)
- devise (3.0.4)
- bcrypt-ruby (~> 3.0)
+ devise (3.2.4)
+ bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
+ thread_safe (~> 0.1)
warden (~> 1.2.3)
- devise-async (0.8.0)
- devise (>= 2.2, < 3.2)
+ devise-async (0.9.0)
+ devise (~> 3.2)
diff-lcs (1.2.5)
diffy (3.0.3)
docile (1.1.1)
@@ -164,7 +165,7 @@ GEM
multi_json
gitlab-grack (2.0.0.pre)
rack (~> 1.5.1)
- gitlab-grit (2.6.9)
+ gitlab-grit (2.6.10)
charlock_holmes (~> 0.6)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
@@ -175,7 +176,7 @@ GEM
mime-types (~> 1.19)
gitlab_emoji (0.0.1.1)
emoji (~> 1.0.1)
- gitlab_git (6.0.0)
+ gitlab_git (6.0.1)
activesupport (~> 4.0)
charlock_holmes (~> 0.6)
gitlab-grit (~> 2.6)
@@ -282,7 +283,7 @@ GEM
method_source (0.8.2)
mime-types (1.25.1)
mini_portile (0.6.0)
- minitest (5.3.4)
+ minitest (5.3.5)
multi_json (1.10.1)
multi_xml (0.5.5)
multipart-post (1.2.0)
@@ -331,8 +332,6 @@ GEM
websocket-driver (>= 0.2.0)
polyglot (0.3.4)
posix-spawn (0.3.8)
- protected_attributes (1.0.5)
- activemodel (>= 4.0.1, < 5.0)
pry (0.9.12.4)
coderay (~> 1.0)
method_source (~> 0.8)
@@ -365,8 +364,6 @@ GEM
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.1)
sprockets-rails (~> 2.0)
- rails-observers (0.1.2)
- activemodel (~> 4.0)
rails_autolink (1.1.6)
rails (> 3.1)
rails_best_practices (1.14.4)
@@ -412,6 +409,7 @@ GEM
redis-store (1.1.4)
redis (>= 2.2)
ref (1.0.5)
+ request_store (1.0.5)
require_all (1.3.2)
rest-client (1.6.7)
mime-types (>= 1.16)
@@ -588,8 +586,8 @@ DEPENDENCIES
d3_rails (~> 3.1.4)
database_cleaner
default_value_for (~> 3.0.0)
- devise (= 3.0.4)
- devise-async (= 0.8.0)
+ devise (= 3.2.4)
+ devise-async (= 0.9.0)
diffy (~> 3.0.3)
dropzonejs-rails
email_spec
@@ -637,14 +635,12 @@ DEPENDENCIES
org-ruby
pg
poltergeist (~> 1.5.1)
- protected_attributes
pry
quiet_assets (~> 1.0.1)
rack-attack
rack-cors
rack-mini-profiler
rails (~> 4.1.0)
- rails-observers
rails_autolink (~> 1.1)
rails_best_practices
raphael-rails (~> 2.1.2)
@@ -652,6 +648,7 @@ DEPENDENCIES
rb-inotify
redcarpet (~> 2.2.2)
redis-rails
+ request_store
rspec-rails
sanitize (~> 2.0)
sass-rails (~> 4.0.2)
diff --git a/README.md b/README.md
index 07c5c61e939..bcee4e064fa 100644
--- a/README.md
+++ b/README.md
@@ -127,3 +127,12 @@ All documentation can be found on [doc.gitlab.com/ce/](http://doc.gitlab.com/ce/
## Getting help
Please see [Getting help for GitLab](https://www.gitlab.com/getting-help/) on our website for the many options to get help.
+
+## Is it any good?
+
+[Yes](https://news.ycombinator.com/item?id=3067434)
+
+## Is it awesome?
+
+Thanks for [asking this question](https://twitter.com/supersloth/status/489462789384056832) Joshua.
+[These people](https://twitter.com/gitlabhq/favorites) seem to like it.
diff --git a/VERSION b/VERSION
index 66ce77b7ead..a3fcc7121bb 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-7.0.0
+7.1.0
diff --git a/app/assets/images/brand_logo.png b/app/assets/images/brand_logo.png
new file mode 100644
index 00000000000..09b1689ca45
--- /dev/null
+++ b/app/assets/images/brand_logo.png
Binary files differ
diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee
index 9bcd8f0a171..a28f76ddd15 100644
--- a/app/assets/javascripts/application.js.coffee
+++ b/app/assets/javascripts/application.js.coffee
@@ -23,7 +23,7 @@
#= require g.raphael-min
#= require g.bar-min
#= require branch-graph
-#= require highlightjs.min
+#= require highlight.pack
#= require ace/ace
#= require d3
#= require underscore
@@ -143,6 +143,14 @@ $ ->
$(@).next('table').show()
$(@).remove()
+ # Show/hide comments on diff
+ $("body").on "click", ".js-toggle-diff-comments", (e) ->
+ $(@).find('i').
+ toggleClass('icon-chevron-down').
+ toggleClass('icon-chevron-up')
+ $(@).closest(".diff-file").find(".notes_holder").toggle()
+ e.preventDefault()
+
(($) ->
# Disable an element and add the 'disabled' Bootstrap class
$.fn.extend disable: ->
diff --git a/app/assets/javascripts/extensions/array.js b/app/assets/javascripts/extensions/array.js
index 7fccc9c9d5f..24f9e00097c 100644
--- a/app/assets/javascripts/extensions/array.js
+++ b/app/assets/javascripts/extensions/array.js
@@ -4,4 +4,4 @@ Array.prototype.first = function() {
Array.prototype.last = function() {
return this[this.length-1];
-} \ No newline at end of file
+}
diff --git a/app/assets/javascripts/groups.js.coffee b/app/assets/javascripts/groups.js.coffee
index 7850eb14e74..49d6605980b 100644
--- a/app/assets/javascripts/groups.js.coffee
+++ b/app/assets/javascripts/groups.js.coffee
@@ -14,4 +14,4 @@ $ ->
$('.js-group-avatar-input').bind "change", ->
form = $(this).closest("form")
filename = $(this).val().replace(/^.*[\\\/]/, '')
- form.find(".js-avatar-filename").text(filename) \ No newline at end of file
+ form.find(".js-avatar-filename").text(filename)
diff --git a/app/assets/javascripts/markdown_area.js.coffee b/app/assets/javascripts/markdown_area.js.coffee
index def5d12a820..1449735fae9 100644
--- a/app/assets/javascripts/markdown_area.js.coffee
+++ b/app/assets/javascripts/markdown_area.js.coffee
@@ -21,7 +21,6 @@ $(document).ready ->
$(".div-dropzone").append divSpinner
$(".div-dropzone-spinner").append iconSpinner
-
dropzone = $(".div-dropzone").dropzone(
url: project_image_path_upload
dictDefaultMessage: ""
@@ -77,9 +76,110 @@ $(document).ready ->
return
)
+ child = $(dropzone[0]).children("textarea")
+
+ formatLink = (str) ->
+ "![" + str.alt + "](" + str.url + ")"
+
+ handlePaste = (e) ->
+ e.preventDefault()
+ my_event = e.originalEvent
+
+ if my_event.clipboardData and my_event.clipboardData.items
+ processItem(my_event)
+
+ processItem = (e) ->
+ image = isImage(e)
+ if image
+ filename = getFilename(e) or "image.png"
+ text = "{{" + filename + "}}"
+ pasteText(text)
+ uploadFile image.getAsFile(), filename
+
+ else
+ text = e.clipboardData.getData("text/plain")
+ pasteText(text)
+
+ isImage = (data) ->
+ i = 0
+ while i < data.clipboardData.items.length
+ item = data.clipboardData.items[i]
+ if item.type.indexOf("image") isnt -1
+ return item
+ i++
+ return false
+
+ pasteText = (text) ->
+ caretStart = $(child)[0].selectionStart
+ caretEnd = $(child)[0].selectionEnd
+ textEnd = $(child).val().length
+
+ beforeSelection = $(child).val().substring 0, caretStart
+ afterSelection = $(child).val().substring caretEnd, textEnd
+ $(child).val beforeSelection + text + afterSelection
+ $(".markdown-area").trigger "input"
+
+ getFilename = (e) ->
+ if window.clipboardData and window.clipboardData.getData
+ value = window.clipboardData.getData("Text")
+ else if e.clipboardData and e.clipboardData.getData
+ value = e.clipboardData.getData("text/plain")
+
+ value = value.split("\r")
+ value.first()
+
+ uploadFile = (item, filename) ->
+ formData = new FormData()
+ formData.append "markdown_img", item, filename
+ $.ajax
+ url: project_image_path_upload
+ type: "POST"
+ data: formData
+ dataType: "json"
+ processData: false
+ contentType: false
+ headers:
+ "X-CSRF-Token": $("meta[name=\"csrf-token\"]").attr("content")
+
+ beforeSend: ->
+ showSpinner()
+ closeAlertMessage()
+
+ success: (e, textStatus, response) ->
+ insertToTextArea(filename, formatLink(response.responseJSON.link))
+
+ error: (response) ->
+ showError(response.responseJSON.message)
+
+ complete: ->
+ closeSpinner()
+
+ insertToTextArea = (filename, url) ->
+ $(child).val (index, val) ->
+ val.replace("{{" + filename + "}}", url + "\n")
+
+ appendToTextArea = (url) ->
+ $(child).val (index, val) ->
+ val + url + "\n"
+
+ showSpinner = (e) ->
+ $(".div-dropzone-spinner").css "opacity", 0.7
+
+ closeSpinner = ->
+ $(".div-dropzone-spinner").css "opacity", 0
+
+ showError = (message) ->
+ checkIfMsgExists = $(".error-alert").children().length
+ if checkIfMsgExists is 0
+ $(".error-alert").append divAlert
+ $(".div-dropzone-alert").append btnAlert + message
+
+ closeAlertMessage = ->
+ $(".div-dropzone-alert").alert "close"
+
$(".markdown-selector").click (e) ->
e.preventDefault()
- $(".div-dropzone").click()
+ $(@).closest(".div-dropzone-wrapper").find(".div-dropzone").click()
return
- return \ No newline at end of file
+ return
diff --git a/app/assets/javascripts/merge_request.js.coffee b/app/assets/javascripts/merge_request.js.coffee
index b04a81c85eb..59e53b69e3d 100644
--- a/app/assets/javascripts/merge_request.js.coffee
+++ b/app/assets/javascripts/merge_request.js.coffee
@@ -109,10 +109,10 @@ class MergeRequest
type: 'GET'
url: this.$('.merge-request-tabs .diffs-tab a').attr('href')
beforeSend: =>
- this.$('.status').addClass 'loading'
+ this.$('.mr-loading-status .loading').show()
complete: =>
@diffs_loaded = true
- this.$('.status').removeClass 'loading'
+ this.$('.mr-loading-status .loading').hide()
success: (data) =>
this.$(".diffs").html(data.html)
dataType: 'json'
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee
index a41ee67a841..607b109dc0b 100644
--- a/app/assets/javascripts/notes.js.coffee
+++ b/app/assets/javascripts/notes.js.coffee
@@ -142,8 +142,15 @@ class Notes
# remove the note (will be added again below)
row.next().find(".note").remove()
- # append new note to all matching discussions
- $(".notes[rel='" + note.discussion_id + "']").append note.html
+ # Add note to 'Changes' page discussions
+ $(".notes[rel='" + note.discussion_id + "']").append note.html
+
+ # Init discussion on 'Discussion' page if it is merge request page
+ if $('body').attr('data-page').indexOf('projects:merge_request') == 0
+ $('ul.main-notes-list').append(note.discussion_with_diff_html)
+ else
+ # append new note to all matching discussions
+ $(".notes[rel='" + note.discussion_id + "']").append note.html
# cleanup after successfully creating a diff/discussion note
@removeDiscussionNoteForm(form)
@@ -369,7 +376,7 @@ class Notes
###
replyToDiscussionNote: (e) =>
form = $(".js-new-note-form")
- replyLink = $(e.target)
+ replyLink = $(e.target).closest(".js-discussion-reply-button")
replyLink.hide()
# insert the form after the button
diff --git a/app/assets/javascripts/profile.js.coffee b/app/assets/javascripts/profile.js.coffee
index b37a78ac197..0e99921f899 100644
--- a/app/assets/javascripts/profile.js.coffee
+++ b/app/assets/javascripts/profile.js.coffee
@@ -27,4 +27,4 @@ $ ->
filename = $(this).val().replace(/^.*[\\\/]/, '')
form.find(".js-avatar-filename").text(filename)
- $('.profile-groups-avatars').tooltip("placement": "top") \ No newline at end of file
+ $('.profile-groups-avatars').tooltip("placement": "top")
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index 7d058ad7719..b596af38311 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -8,8 +8,6 @@
*= require select2
*= require highlightjs.min
*= require_self
- *= require nprogress
- *= require nprogress-bootstrap
*= require dropzone/basic
*/
@@ -21,6 +19,12 @@
@import 'gl_bootstrap';
/**
+ * NProgress load bar css
+ */
+@import 'nprogress';
+@import 'nprogress-bootstrap';
+
+/**
* Font icons
*
*/
diff --git a/app/assets/stylesheets/generic/buttons.scss b/app/assets/stylesheets/generic/buttons.scss
index 36fc771a9dc..046e5040fb2 100644
--- a/app/assets/stylesheets/generic/buttons.scss
+++ b/app/assets/stylesheets/generic/buttons.scss
@@ -152,16 +152,16 @@
}
&.btn-close {
- color: #B94A48;
- font-weight: bold;
+ color: $bg_danger;
+ border-color: $border_danger;
&:hover {
color: #B94A48;
}
}
&.btn-reopen {
- color: #468847;
- font-weight: bold;
+ color: $bg_success;
+ border-color: $border_success;
&:hover {
color: #468847;
}
diff --git a/app/assets/stylesheets/generic/common.scss b/app/assets/stylesheets/generic/common.scss
index da2c1b0cbd8..991561cd503 100644
--- a/app/assets/stylesheets/generic/common.scss
+++ b/app/assets/stylesheets/generic/common.scss
@@ -16,6 +16,7 @@
.append-bottom-15 { margin-bottom:15px }
.append-bottom-20 { margin-bottom:20px }
.inline { display: inline-block }
+.center { text-align: center }
.underlined-link { text-decoration: underline; }
.hint { font-style: italic; color: #999; }
@@ -55,7 +56,7 @@ pre {
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
- background: $bg_style_color;
+ background: $bg_primary;
color: #FFF
}
@@ -256,13 +257,6 @@ li.note {
}
}
-h1.http_status_code {
- font-size: 56px;
- line-height: 100px;
- font-weight: normal;
- color: #456;
-}
-
.control-group {
.controls {
span {
@@ -343,3 +337,7 @@ table {
.wiki .highlight, .note-body .highlight {
margin-bottom: 9px;
}
+
+.footer-links a {
+ margin-right: 15px;
+}
diff --git a/app/assets/stylesheets/generic/forms.scss b/app/assets/stylesheets/generic/forms.scss
index 5258acca466..2a31cae5dfb 100644
--- a/app/assets/stylesheets/generic/forms.scss
+++ b/app/assets/stylesheets/generic/forms.scss
@@ -76,30 +76,10 @@ label {
}
}
-.commit-message-container {
- background-color: $body-bg;
- position: relative;
- font-family: $monospace_font;
- $left: 12px;
- .max-width-marker {
- width: 72ch;
- color: rgba(0, 0, 0, 0.0);
- font-family: inherit;
- left: $left;
- height: 100%;
- border-right: 1px solid mix($input-border, white);
- position: absolute;
- z-index: 1;
- }
- > textarea {
- background-color: rgba(0, 0, 0, 0.0);
- font-family: inherit;
- padding-left: $left;
- position: relative;
- z-index: 2;
- }
-}
-
.fieldset-form fieldset {
margin-bottom: 20px;
}
+
+.form-control {
+ @include box-shadow(none);
+}
diff --git a/app/assets/stylesheets/generic/jquery.scss b/app/assets/stylesheets/generic/jquery.scss
index 6b29accb315..bfbbc7d25e3 100644
--- a/app/assets/stylesheets/generic/jquery.scss
+++ b/app/assets/stylesheets/generic/jquery.scss
@@ -41,8 +41,8 @@
}
.ui-state-active {
- border: 1px solid $bg_style_color;
- background: $bg_style_color;
+ border: 1px solid $bg_primary;
+ background: $bg_primary;
color: #FFF;
}
diff --git a/app/assets/stylesheets/generic/selects.scss b/app/assets/stylesheets/generic/selects.scss
index 0afd85aedf6..e0f508d2695 100644
--- a/app/assets/stylesheets/generic/selects.scss
+++ b/app/assets/stylesheets/generic/selects.scss
@@ -42,7 +42,7 @@
.select2-results {
max-height: 350px;
.select2-highlighted {
- background: $bg_style_color;
+ background: $bg_primary;
}
}
}
diff --git a/app/assets/stylesheets/gl_bootstrap.scss b/app/assets/stylesheets/gl_bootstrap.scss
index 4271a7b310c..34b0608646c 100644
--- a/app/assets/stylesheets/gl_bootstrap.scss
+++ b/app/assets/stylesheets/gl_bootstrap.scss
@@ -9,7 +9,7 @@
$font-size-base: 13px !default;
$nav-pills-active-link-hover-bg: $bg_primary;
$pagination-active-bg: $bg_primary;
-$list-group-active-bg: $bg_style_color;
+$list-group-active-bg: $bg_primary;
// Core variables and mixins
@import "bootstrap/variables";
diff --git a/app/assets/stylesheets/main/variables.scss b/app/assets/stylesheets/main/variables.scss
index 68f7f6b8581..c49f7db788e 100644
--- a/app/assets/stylesheets/main/variables.scss
+++ b/app/assets/stylesheets/main/variables.scss
@@ -2,7 +2,6 @@
* General Colors
*/
$style_color: #474D57;
-$bg_style_color: #2299BB;
$hover: #D9EDF7;
/*
@@ -40,3 +39,8 @@ $border_warning: #EB9532;
*/
$added: #63c363;
$deleted: #f77;
+
+/**
+ *
+ */
+$nprogress-color: #3498db;
diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss
index ef8c5f089b9..684e8377a7b 100644
--- a/app/assets/stylesheets/sections/commits.scss
+++ b/app/assets/stylesheets/sections/commits.scss
@@ -112,7 +112,9 @@
.commit-stat-summary {
color: #666;
- line-height: 2;
+ font-size: 14px;
+ font-weight: normal;
+ padding: 10px 0;
}
.commit-info-row {
@@ -177,10 +179,18 @@ li.commit {
.commit-row-description {
font-size: 14px;
- border-left: 1px solid #e5e5e5;
- padding: 0 15px 0 7px;
+ border-left: 1px solid #EEE;
+ padding: 10px 15px;
margin: 5px 0 10px 5px;
+ background: #f9f9f9;
display: none;
+
+ pre {
+ border: none;
+ background: inherit;
+ padding: 0;
+ margin: 0;
+ }
}
.commit-row-info {
@@ -213,3 +223,27 @@ li.commit {
padding: 4px 12px;
}
}
+
+.commit-message-container {
+ background-color: $body-bg;
+ position: relative;
+ font-family: $monospace_font;
+ $left: 12px;
+ .max-width-marker {
+ width: 72ch;
+ color: rgba(0, 0, 0, 0.0);
+ font-family: inherit;
+ left: $left;
+ height: 100%;
+ border-right: 1px solid mix($input-border, white);
+ position: absolute;
+ z-index: 1;
+ }
+ > textarea {
+ background-color: rgba(0, 0, 0, 0.0);
+ font-family: inherit;
+ padding-left: $left;
+ position: relative;
+ z-index: 2;
+ }
+}
diff --git a/app/assets/stylesheets/sections/diff.scss b/app/assets/stylesheets/sections/diff.scss
index f4926e2f523..88b188dbe8d 100644
--- a/app/assets/stylesheets/sections/diff.scss
+++ b/app/assets/stylesheets/sections/diff.scss
@@ -40,12 +40,12 @@
font-size: 12px;
.old {
span.idiff {
- background-color: #FAA;
+ background-color: #F99;
}
}
.new {
span.idiff {
- background-color: #AFA;
+ background-color: #8F8;
}
}
diff --git a/app/assets/stylesheets/sections/errors.scss b/app/assets/stylesheets/sections/errors.scss
new file mode 100644
index 00000000000..32d2d7b1dbf
--- /dev/null
+++ b/app/assets/stylesheets/sections/errors.scss
@@ -0,0 +1,14 @@
+.error-page {
+ max-width: 400px;
+ margin: 0 auto;
+
+ h1, h2, h3 {
+ text-align: center;
+ }
+
+ h1 {
+ font-size: 56px;
+ line-height: 100px;
+ font-weight: 300;
+ }
+}
diff --git a/app/assets/stylesheets/sections/events.scss b/app/assets/stylesheets/sections/events.scss
index 957af62c0ea..656aa5b18a6 100644
--- a/app/assets/stylesheets/sections/events.scss
+++ b/app/assets/stylesheets/sections/events.scss
@@ -156,12 +156,13 @@
.filter_icon {
a {
text-align:center;
- background: #EEE;
+ background: $bg_primary;
margin-bottom: 10px;
float: left;
padding: 9px 6px;
font-size: 18px;
width: 40px;
+ color: #FFF;
@include border-radius(3px);
}
diff --git a/app/assets/stylesheets/sections/explore.scss b/app/assets/stylesheets/sections/explore.scss
new file mode 100644
index 00000000000..9b92128624c
--- /dev/null
+++ b/app/assets/stylesheets/sections/explore.scss
@@ -0,0 +1,8 @@
+.explore-title {
+ text-align: center;
+
+ h3 {
+ font-weight: normal;
+ font-size: 30px;
+ }
+}
diff --git a/app/assets/stylesheets/sections/groups.scss b/app/assets/stylesheets/sections/groups.scss
index 60ec79acadb..e49fe1a9dd6 100644
--- a/app/assets/stylesheets/sections/groups.scss
+++ b/app/assets/stylesheets/sections/groups.scss
@@ -7,3 +7,7 @@
.member-search-form {
float: left;
}
+
+.milestone-row {
+ @include str-truncated(90%);
+}
diff --git a/app/assets/stylesheets/sections/header.scss b/app/assets/stylesheets/sections/header.scss
index b811b0bc665..e0e0d60c387 100644
--- a/app/assets/stylesheets/sections/header.scss
+++ b/app/assets/stylesheets/sections/header.scss
@@ -6,14 +6,12 @@ header {
&.navbar-gitlab {
margin-bottom: 0;
min-height: 40px;
+ border: none;
.navbar-inner {
- background: #F1F1F1;
- border-bottom: 1px solid #DDD;
filter: none;
.nav > li > a {
- color: $style_color;
font-size: 14px;
line-height: 32px;
padding: 6px 10px;
@@ -55,13 +53,9 @@ header {
font-size: 18px;
.app_logo { margin-left: -15px; }
+
.title {
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- vertical-align: top;
- white-space: nowrap;
- max-width: 70%;
+ @include str-truncated(70%);
}
.navbar-collapse {
@@ -132,6 +126,7 @@ header {
margin: 0;
margin-left: 5px;
@include header-font;
+ @include str-truncated(37%);
}
.profile-pic {
@@ -248,8 +243,6 @@ header {
float: left;
height: 46px;
width: 2px;
- background: white;
- border-left: 1px solid #DDD;
margin-left: 10px;
margin-right: 10px;
}
@@ -258,7 +251,7 @@ header {
.search .search-input {
width: 300px;
&:focus {
- width: 400px;
+ width: 330px;
}
}
@@ -266,7 +259,7 @@ header {
.search .search-input {
width: 200px;
&:focus {
- width: 300px;
+ width: 230px;
}
}
}
diff --git a/app/assets/stylesheets/sections/login.scss b/app/assets/stylesheets/sections/login.scss
index a78a9cd4879..54887b7c401 100644
--- a/app/assets/stylesheets/sections/login.scss
+++ b/app/assets/stylesheets/sections/login.scss
@@ -6,11 +6,13 @@
}
.login-box{
- max-width: 304px;
- position: relative;
- @include border-radius(5px);
- margin: auto;
- background: white;
+ }
+
+ .brand-image {
+ img {
+ max-width: 100%;
+ margin-bottom: 20px;
+ }
}
.login-logo{
@@ -19,7 +21,7 @@
}
.form-control {
- background-color: #f1f1f1;
+ background-color: #F5F5F5;
font-size: 16px;
padding: 14px 10px;
width: 100%;
@@ -41,6 +43,10 @@
margin-bottom:0px;
@include border-radius(0);
}
+
+ &:active, &:focus {
+ background-color: #FFF;
+ }
}
.login-box a.forgot {
diff --git a/app/assets/stylesheets/sections/nav.scss b/app/assets/stylesheets/sections/nav.scss
index 59eaaec9498..f5d09c2df10 100644
--- a/app/assets/stylesheets/sections/nav.scss
+++ b/app/assets/stylesheets/sections/nav.scss
@@ -3,7 +3,7 @@
margin: 20px 0;
margin-top: 0;
padding-top: 4px;
- border-bottom: 1px solid #E1E1E1;
+ border-bottom: 1px solid #E9E9E9;
ul {
padding: 0;
diff --git a/app/assets/stylesheets/sections/notes.scss b/app/assets/stylesheets/sections/notes.scss
index e8d6ec3e29a..18db7abc64e 100644
--- a/app/assets/stylesheets/sections/notes.scss
+++ b/app/assets/stylesheets/sections/notes.scss
@@ -43,38 +43,14 @@ ul.notes {
}
.discussion {
- padding: 8px 0;
+ padding: 10px 0;
overflow: hidden;
display: block;
position:relative;
+ border-bottom: 1px solid #EEE;
.discussion-body {
margin-left: 50px;
-
- .diff-file,
- .discussion-hidden,
- .notes {
- background-color: #F9F9F9;
- }
- .diff-file .notes {
- /* reset */
- background: inherit;
- border: none;
- @include box-shadow(none);
-
- }
- .discussion-hidden .note {
- @extend .cgray;
- padding: 8px;
- text-align: center;
- }
- .notes .note {
- border-color: #ddd;
- padding: 8px;
- }
- .reply-btn {
- margin-top: 8px;
- }
}
}
@@ -137,10 +113,6 @@ ul.notes {
vertical-align: top;
}
}
-
- .reply-btn {
- margin: 5px;
- }
}
/**
@@ -376,3 +348,17 @@ ul.notes {
margin-top: 5px;
margin-bottom: 5px;
}
+
+.discussion-body,
+.diff-file {
+ .notes .note {
+ border-color: #ddd;
+ padding: 10px 15px;
+ }
+
+ .discussion-reply-holder {
+ background: #f9f9f9;
+ padding: 10px 15px;
+ border-top: 1px solid #DDD;
+ }
+}
diff --git a/app/assets/stylesheets/sections/profile.scss b/app/assets/stylesheets/sections/profile.scss
index ed73e1630f2..086875582f3 100644
--- a/app/assets/stylesheets/sections/profile.scss
+++ b/app/assets/stylesheets/sections/profile.scss
@@ -56,10 +56,10 @@
text-align: center;
.prev {
- @extend .thumbnail;
- height: 30px;
- width: 175px;
+ height: 80px;
+ width: 160px;
margin-bottom: 10px;
+ @include border-radius(4px);
&.classic {
background: #31363e;
@@ -92,10 +92,13 @@
text-align: center;
.prev {
- @extend .thumbnail;
- height: 151px;
- width: 220px;
+ width: 160px;
margin-bottom: 10px;
+
+ img {
+ max-width: 100%;
+ @include border-radius(4px);
+ }
}
}
}
diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss
index 34dd3448f53..c9188fb751c 100644
--- a/app/assets/stylesheets/sections/projects.scss
+++ b/app/assets/stylesheets/sections/projects.scss
@@ -172,8 +172,8 @@ ul.nav.nav-projects-tabs {
}
.public-clone {
- background: #333;
- color: #f5f5f5;
+ background: #EEE;
+ color: #777;
padding: 6px 10px;
margin: 1px;
font-weight: normal;
diff --git a/app/assets/stylesheets/sections/tree.scss b/app/assets/stylesheets/sections/tree.scss
index b08f94f55a0..678a6cd716d 100644
--- a/app/assets/stylesheets/sections/tree.scss
+++ b/app/assets/stylesheets/sections/tree.scss
@@ -28,6 +28,7 @@
}
td {
border-color: #F1F1F1 !important;
+ border-bottom: 1px solid;
}
&:hover {
td {
diff --git a/app/assets/stylesheets/themes/ui_basic.scss b/app/assets/stylesheets/themes/ui_basic.scss
index 30f0bbaf4c8..3e3744fdc33 100644
--- a/app/assets/stylesheets/themes/ui_basic.scss
+++ b/app/assets/stylesheets/themes/ui_basic.scss
@@ -4,11 +4,21 @@
*
*/
.ui_basic {
- .separator {
- background: #F9F9F9;
- border-left: 1px solid #DDD;
+ header {
+ &.navbar-gitlab {
+ .navbar-inner {
+ background: #F1F1F1;
+ border-bottom: 1px solid #DDD;
+ .nav > li > a {
+ color: $style_color;
+ }
+ .separator {
+ background: #F9F9F9;
+ border-left: 1px solid #DDD;
+ }
+ }
+ }
}
-
.main-nav {
background: #FFF;
}
diff --git a/app/controllers/admin/broadcast_messages_controller.rb b/app/controllers/admin/broadcast_messages_controller.rb
index 9a70ef9d199..e1643bb34bf 100644
--- a/app/controllers/admin/broadcast_messages_controller.rb
+++ b/app/controllers/admin/broadcast_messages_controller.rb
@@ -6,7 +6,7 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController
end
def create
- @broadcast_message = BroadcastMessage.new(params[:broadcast_message])
+ @broadcast_message = BroadcastMessage.new(broadcast_message_params)
if @broadcast_message.save
redirect_to admin_broadcast_messages_path, notice: 'Broadcast Message was successfully created.'
@@ -29,4 +29,11 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController
def broadcast_messages
@broadcast_messages ||= BroadcastMessage.order("starts_at DESC").page(params[:page])
end
+
+ def broadcast_message_params
+ params.require(:broadcast_message).permit(
+ :alert_type, :color, :ends_at, :font,
+ :message, :starts_at
+ )
+ end
end
diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb
index 1a523d081dd..0388997ec69 100644
--- a/app/controllers/admin/groups_controller.rb
+++ b/app/controllers/admin/groups_controller.rb
@@ -20,7 +20,7 @@ class Admin::GroupsController < Admin::ApplicationController
end
def create
- @group = Group.new(params[:group])
+ @group = Group.new(group_params)
@group.path = @group.name.dup.parameterize if @group.name
if @group.save
@@ -32,7 +32,7 @@ class Admin::GroupsController < Admin::ApplicationController
end
def update
- if @group.update_attributes(params[:group])
+ if @group.update_attributes(group_params)
redirect_to [:admin, @group], notice: 'Group was successfully updated.'
else
render "edit"
@@ -56,4 +56,8 @@ class Admin::GroupsController < Admin::ApplicationController
def group
@group = Group.find_by(path: params[:id])
end
+
+ def group_params
+ params.require(:group).permit(:name, :description, :path, :avatar)
+ end
end
diff --git a/app/controllers/admin/hooks_controller.rb b/app/controllers/admin/hooks_controller.rb
index c5bf76f8c39..0a463239d74 100644
--- a/app/controllers/admin/hooks_controller.rb
+++ b/app/controllers/admin/hooks_controller.rb
@@ -5,7 +5,7 @@ class Admin::HooksController < Admin::ApplicationController
end
def create
- @hook = SystemHook.new(params[:hook])
+ @hook = SystemHook.new(hook_params)
if @hook.save
redirect_to admin_hooks_path, notice: 'Hook was successfully created.'
@@ -37,4 +37,8 @@ class Admin::HooksController < Admin::ApplicationController
redirect_to :back
end
+
+ def hook_params
+ params.require(:hook).permit(:url)
+ end
end
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 5ecdfbd807e..f63df27eebd 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -13,7 +13,7 @@ class Admin::UsersController < Admin::ApplicationController
end
def new
- @user = User.build_user
+ @user = User.new
end
def edit
@@ -37,17 +37,15 @@ class Admin::UsersController < Admin::ApplicationController
end
def create
- admin = params[:user].delete("admin")
-
opts = {
force_random_password: true,
- password_expires_at: Time.now
+ password_expires_at: nil
}
- @user = User.build_user(params[:user].merge(opts), as: :admin)
- @user.admin = (admin && admin.to_i > 0)
+ @user = User.new(user_params.merge(opts))
@user.created_by_id = current_user.id
@user.generate_password
+ @user.generate_reset_token
@user.skip_confirmation!
respond_to do |format|
@@ -62,19 +60,17 @@ class Admin::UsersController < Admin::ApplicationController
end
def update
- admin = params[:user].delete("admin")
-
- if params[:user][:password].blank?
- params[:user].delete(:password)
- params[:user].delete(:password_confirmation)
- end
+ user_params_with_pass = user_params.dup
- if admin.present?
- user.admin = !admin.to_i.zero?
+ if params[:user][:password].present?
+ user_params_with_pass.merge!(
+ password: params[:user][:password],
+ password_confirmation: params[:user][:password_confirmation],
+ )
end
respond_to do |format|
- if user.update_attributes(params[:user], as: :admin)
+ if user.update_attributes(user_params_with_pass)
user.confirm!
format.html { redirect_to [:admin, user], notice: 'User was successfully updated.' }
format.json { head :ok }
@@ -100,9 +96,28 @@ class Admin::UsersController < Admin::ApplicationController
end
end
+ def remove_email
+ email = user.emails.find(params[:email_id])
+ email.destroy
+
+ respond_to do |format|
+ format.html { redirect_to :back, notice: "Successfully removed email." }
+ format.js { render nothing: true }
+ end
+ end
+
protected
def user
@user ||= User.find_by!(username: params[:id])
end
+
+ def user_params
+ params.require(:user).permit(
+ :email, :remember_me, :bio, :name, :username,
+ :skype, :linkedin, :twitter, :website_url, :color_scheme_id, :theme_id, :force_random_password,
+ :extern_uid, :provider, :password_expires_at, :avatar, :hide_no_ssh_key,
+ :projects_limit, :can_create_group, :admin
+ )
+ end
end
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 603e89a5e29..d0546a441e1 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,6 +1,7 @@
require 'gon'
class ApplicationController < ActionController::Base
+ before_filter :authenticate_user_from_token!
before_filter :authenticate_user!
before_filter :reject_blocked!
before_filter :check_password_expiration
@@ -28,6 +29,25 @@ class ApplicationController < ActionController::Base
protected
+ # From https://github.com/plataformatec/devise/wiki/How-To:-Simple-Token-Authentication-Example
+ # https://gist.github.com/josevalim/fb706b1e933ef01e4fb6
+ def authenticate_user_from_token!
+ user_token = if params[:authenticity_token].presence
+ params[:authenticity_token].presence
+ elsif params[:private_token].presence
+ params[:private_token].presence
+ end
+ user = user_token && User.find_by_authentication_token(user_token.to_s)
+
+ if user
+ # Notice we are passing store false, so the user is not
+ # actually stored in the session and a token is needed
+ # for every request. If you want the token to work as a
+ # sign in token, you can simply remove store: false.
+ sign_in user, store: false
+ end
+ end
+
def log_exception(exception)
application_trace = ActionDispatch::ExceptionWrapper.new(env, exception).application_trace
application_trace.map!{ |t| " #{t}\n" }
@@ -48,7 +68,7 @@ class ApplicationController < ActionController::Base
flash[:alert] = "Your account is blocked. Retry when an admin has unblocked it."
new_user_session_path
else
- super
+ stored_location_for(:redirect) || stored_location_for(resource) || root_path
end
end
@@ -226,8 +246,7 @@ class ApplicationController < ActionController::Base
end
def configure_permitted_parameters
- devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:username, :email, :password, :login, :remember_me) }
- devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:username, :email, :name, :password, :password_confirmation) }
+ devise_parameter_sanitizer.sanitize(:sign_in) { |u| u.permit(:username, :email, :password, :login, :remember_me) }
end
def hexdigest(string)
diff --git a/app/controllers/explore/groups_controller.rb b/app/controllers/explore/groups_controller.rb
new file mode 100644
index 00000000000..f8e1a31e0b3
--- /dev/null
+++ b/app/controllers/explore/groups_controller.rb
@@ -0,0 +1,14 @@
+class Explore::GroupsController < ApplicationController
+ skip_before_filter :authenticate_user!,
+ :reject_blocked, :set_current_user_for_observers,
+ :add_abilities
+
+ layout "explore"
+
+ def index
+ @groups = GroupsFinder.new.execute(current_user)
+ @groups = @groups.search(params[:search]) if params[:search].present?
+ @groups = @groups.sort(@sort = params[:sort])
+ @groups = @groups.page(params[:page]).per(20)
+ end
+end
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb
new file mode 100644
index 00000000000..05b3289682b
--- /dev/null
+++ b/app/controllers/explore/projects_controller.rb
@@ -0,0 +1,19 @@
+class Explore::ProjectsController < ApplicationController
+ skip_before_filter :authenticate_user!,
+ :reject_blocked,
+ :add_abilities
+
+ layout 'explore'
+
+ def index
+ @projects = ProjectsFinder.new.execute(current_user)
+ @projects = @projects.search(params[:search]) if params[:search].present?
+ @projects = @projects.sort(@sort = params[:sort])
+ @projects = @projects.includes(:namespace).page(params[:page]).per(20)
+ end
+
+ def trending
+ @trending_projects = TrendingProjectsFinder.new.execute(current_user)
+ @trending_projects = @trending_projects.page(params[:page]).per(10)
+ end
+end
diff --git a/app/controllers/groups/milestones_controller.rb b/app/controllers/groups/milestones_controller.rb
new file mode 100644
index 00000000000..860d8e03922
--- /dev/null
+++ b/app/controllers/groups/milestones_controller.rb
@@ -0,0 +1,56 @@
+class Groups::MilestonesController < ApplicationController
+ layout 'group'
+
+ before_filter :authorize_group_milestone!, only: :update
+
+ def index
+ project_milestones = case params[:status]
+ when 'all'; status
+ when 'closed'; status('closed')
+ else status('active')
+ end
+ @group_milestones = Milestones::GroupService.new(project_milestones).execute
+ @group_milestones = Kaminari.paginate_array(@group_milestones).page(params[:page]).per(30)
+ end
+
+ def show
+ project_milestones = Milestone.where(project_id: group.projects).order("due_date ASC")
+ @group_milestone = Milestones::GroupService.new(project_milestones).milestone(title)
+ end
+
+ def update
+ project_milestones = Milestone.where(project_id: group.projects).order("due_date ASC")
+ @group_milestones = Milestones::GroupService.new(project_milestones).milestone(title)
+
+ @group_milestones.milestones.each do |milestone|
+ Milestones::UpdateService.new(milestone.project, current_user, params[:milestone]).execute(milestone)
+ end
+
+ respond_to do |format|
+ format.js
+ format.html do
+ redirect_to group_milestones_path(group)
+ end
+ end
+ end
+
+ private
+
+ def group
+ @group ||= Group.find_by(path: params[:group_id])
+ end
+
+ def title
+ params[:title]
+ end
+
+ def status(state = nil)
+ conditions = { project_id: group.projects }
+ conditions.reverse_merge!(state: state) if state
+ Milestone.where(conditions).order("title ASC")
+ end
+
+ def authorize_group_milestone!
+ return render_404 unless can?(current_user, :manage_group, group)
+ end
+end
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index a2629c51384..ddde90d3ee0 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -22,7 +22,7 @@ class GroupsController < ApplicationController
end
def create
- @group = Group.new(params[:group])
+ @group = Group.new(group_params)
@group.path = @group.name.dup.parameterize if @group.name
if @group.save
@@ -84,7 +84,7 @@ class GroupsController < ApplicationController
end
def update
- if @group.update_attributes(params[:group])
+ if @group.update_attributes(group_params)
redirect_to edit_group_path(@group), notice: 'Group was successfully updated.'
else
render action: "edit"
@@ -159,4 +159,8 @@ class GroupsController < ApplicationController
params[:state] = 'opened' if params[:state].blank?
params[:group_id] = @group.id
end
+
+ def group_params
+ params.require(:group).permit(:name, :description, :path, :avatar)
+ end
end
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb
index 0c87fe0d9ae..ef2afec52dc 100644
--- a/app/controllers/omniauth_callbacks_controller.rb
+++ b/app/controllers/omniauth_callbacks_controller.rb
@@ -31,6 +31,12 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
end
end
+ def omniauth_error
+ @provider = params[:provider]
+ @error = params[:error]
+ render 'errors/omniauth_error', layout: "errors", status: 422
+ end
+
private
def handle_omniauth
@@ -45,14 +51,19 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
# Create user if does not exist
# and allow_single_sign_on is true
- if Gitlab.config.omniauth['allow_single_sign_on']
- @user ||= Gitlab::OAuth::User.create(oauth)
+ if Gitlab.config.omniauth['allow_single_sign_on'] && !@user
+ @user, errors = Gitlab::OAuth::User.create(oauth)
end
- if @user
+ if @user && !errors
sign_in_and_redirect(@user)
else
- flash[:notice] = "There's no such user!"
+ if errors
+ error_message = errors.map{ |attribute, message| "#{attribute} #{message}" }.join(", ")
+ redirect_to omniauth_error_path(oauth['provider'], error: error_message) and return
+ else
+ flash[:notice] = "There's no such user!"
+ end
redirect_to new_user_session_path
end
end
diff --git a/app/controllers/profiles/emails_controller.rb b/app/controllers/profiles/emails_controller.rb
index 40c352dab0c..f3f0e69b83a 100644
--- a/app/controllers/profiles/emails_controller.rb
+++ b/app/controllers/profiles/emails_controller.rb
@@ -7,7 +7,7 @@ class Profiles::EmailsController < ApplicationController
end
def create
- @email = current_user.emails.new(params[:email])
+ @email = current_user.emails.new(email_params)
flash[:alert] = @email.errors.full_messages.first unless @email.save
@@ -23,4 +23,10 @@ class Profiles::EmailsController < ApplicationController
format.js { render nothing: true }
end
end
+
+ private
+
+ def email_params
+ params.require(:email).permit(:email)
+ end
end
diff --git a/app/controllers/profiles/keys_controller.rb b/app/controllers/profiles/keys_controller.rb
index 6713cd7c8c7..88414b13564 100644
--- a/app/controllers/profiles/keys_controller.rb
+++ b/app/controllers/profiles/keys_controller.rb
@@ -15,7 +15,7 @@ class Profiles::KeysController < ApplicationController
end
def create
- @key = current_user.keys.new(params[:key])
+ @key = current_user.keys.new(key_params)
if @key.save
redirect_to profile_key_path(@key)
@@ -53,4 +53,9 @@ class Profiles::KeysController < ApplicationController
end
end
+ private
+
+ def key_params
+ params.require(:key).permit(:title, :key)
+ end
end
diff --git a/app/controllers/profiles/passwords_controller.rb b/app/controllers/profiles/passwords_controller.rb
index df6954554ea..0d93f5cbfdf 100644
--- a/app/controllers/profiles/passwords_controller.rb
+++ b/app/controllers/profiles/passwords_controller.rb
@@ -11,8 +11,8 @@ class Profiles::PasswordsController < ApplicationController
end
def create
- new_password = params[:user][:password]
- new_password_confirmation = params[:user][:password_confirmation]
+ new_password = user_params[:password]
+ new_password_confirmation = user_params[:password_confirmation]
result = @user.update_attributes(
password: new_password,
@@ -31,11 +31,11 @@ class Profiles::PasswordsController < ApplicationController
end
def update
- password_attributes = params[:user].select do |key, value|
+ password_attributes = user_params.select do |key, value|
%w(password password_confirmation).include?(key.to_s)
end
- unless @user.valid_password?(params[:user][:current_password])
+ unless @user.valid_password?(user_params[:current_password])
redirect_to edit_profile_password_path, alert: 'You must provide a valid current password'
return
end
@@ -74,4 +74,8 @@ class Profiles::PasswordsController < ApplicationController
def authorize_change_password!
return render_404 if @user.ldap_user?
end
+
+ def user_params
+ params.require(:user).permit(:current_password, :password, :password_confirmation)
+ end
end
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 9c9a129b26b..e877f9b9049 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -14,9 +14,9 @@ class ProfilesController < ApplicationController
end
def update
- params[:user].delete(:email) if @user.ldap_user?
+ user_params.except!(:email) if @user.ldap_user?
- if @user.update_attributes(params[:user])
+ if @user.update_attributes(user_params)
flash[:notice] = "Profile was successfully updated"
else
flash[:alert] = "Failed to update profile"
@@ -41,7 +41,7 @@ class ProfilesController < ApplicationController
end
def update_username
- @user.update_attributes(username: params[:user][:username])
+ @user.update_attributes(username: user_params[:username])
respond_to do |format|
format.js
@@ -57,4 +57,12 @@ class ProfilesController < ApplicationController
def authorize_change_username!
return render_404 unless @user.can_change_username?
end
+
+ def user_params
+ params.require(:user).permit(
+ :email, :password, :password_confirmation, :bio, :name, :username,
+ :skype, :linkedin, :twitter, :website_url, :color_scheme_id, :theme_id,
+ :avatar, :hide_no_ssh_key,
+ )
+ end
end
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb
index a1a8bed09f4..db3d173b98d 100644
--- a/app/controllers/projects/blob_controller.rb
+++ b/app/controllers/projects/blob_controller.rb
@@ -30,8 +30,12 @@ class Projects::BlobController < Projects::ApplicationController
def blob
@blob ||= @repository.blob_at(@commit.id, @path)
- return not_found! unless @blob
-
- @blob
+ if @blob
+ @blob
+ elsif tree.entries.any?
+ redirect_to project_tree_path(@project, File.join(@ref, @path)) and return
+ else
+ return not_found!
+ end
end
end
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index 860ab408299..c344297ba8a 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -20,11 +20,10 @@ class Projects::CommitController < Projects::ApplicationController
end
begin
- @suppress_diff = true if commit.diff_suppress? && !params[:force_show_diff]
- @force_suppress_diff = commit.diff_force_suppress?
+ @diffs = @commit.diffs
rescue Grit::Git::GitTimeout
- @suppress_diff = true
- @status = :huge_commit
+ @diffs = []
+ @diff_timeout = true
end
@note = project.build_commit_note(commit)
@@ -38,12 +37,7 @@ class Projects::CommitController < Projects::ApplicationController
}
respond_to do |format|
- format.html do
- if @status == :huge_commit
- render "huge_commit" and return
- end
- end
-
+ format.html
format.diff { render text: @commit.to_diff }
format.patch { render text: @commit.to_patch }
end
diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb
index 12856191c26..038645aa497 100644
--- a/app/controllers/projects/commits_controller.rb
+++ b/app/controllers/projects/commits_controller.rb
@@ -13,6 +13,8 @@ class Projects::CommitsController < Projects::ApplicationController
@limit, @offset = (params[:limit] || 40), (params[:offset] || 0)
@commits = @repo.commits(@ref, @path, @limit, @offset)
+ @note_counts = Note.where(commit_id: @commits.map(&:id)).
+ group(:commit_id).count
respond_to do |format|
format.html # index.html.erb
diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb
index 234b6058ff0..eae96396574 100644
--- a/app/controllers/projects/compare_controller.rb
+++ b/app/controllers/projects/compare_controller.rb
@@ -15,11 +15,7 @@ class Projects::CompareController < Projects::ApplicationController
@diffs = compare.diffs
@refs_are_same = compare.same
@line_notes = []
- @timeout = compare.timeout
-
- diff_line_count = Commit::diff_line_count(@diffs)
- @suppress_diff = Commit::diff_suppress?(@diffs, diff_line_count) && !params[:force_show_diff]
- @force_suppress_diff = Commit::diff_force_suppress?(@diffs, diff_line_count)
+ @diff_timeout = compare.timeout
end
def create
diff --git a/app/controllers/projects/deploy_keys_controller.rb b/app/controllers/projects/deploy_keys_controller.rb
index 6e1a76ff417..d20937ea8ea 100644
--- a/app/controllers/projects/deploy_keys_controller.rb
+++ b/app/controllers/projects/deploy_keys_controller.rb
@@ -22,7 +22,7 @@ class Projects::DeployKeysController < Projects::ApplicationController
end
def create
- @key = DeployKey.new(params[:deploy_key])
+ @key = DeployKey.new(deploy_key_params)
if @key.valid? && @project.deploy_keys << @key
redirect_to project_deploy_keys_path(@project)
@@ -58,4 +58,8 @@ class Projects::DeployKeysController < Projects::ApplicationController
def available_keys
@available_keys ||= current_user.accessible_deploy_keys
end
+
+ def deploy_key_params
+ params.require(:deploy_key).permit(:key, :title)
+ end
end
diff --git a/app/controllers/projects/edit_tree_controller.rb b/app/controllers/projects/edit_tree_controller.rb
index be611892bb0..ca83b21f429 100644
--- a/app/controllers/projects/edit_tree_controller.rb
+++ b/app/controllers/projects/edit_tree_controller.rb
@@ -28,8 +28,6 @@ class Projects::EditTreeController < Projects::BaseTreeController
def preview
@content = params[:content]
- #FIXME workaround https://github.com/gitlabhq/gitlabhq/issues/5936
- @content += "\n" if @blob.data.end_with?("\n")
diffy = Diffy::Diff.new(@blob.data, @content, diff: '-U 3',
include_diff_info: true)
diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb
index c43d26385f7..268e19f26ee 100644
--- a/app/controllers/projects/hooks_controller.rb
+++ b/app/controllers/projects/hooks_controller.rb
@@ -12,7 +12,7 @@ class Projects::HooksController < Projects::ApplicationController
end
def create
- @hook = @project.hooks.new(params[:hook])
+ @hook = @project.hooks.new(hook_params)
@hook.save
if @hook.valid?
@@ -40,4 +40,8 @@ class Projects::HooksController < Projects::ApplicationController
def hook
@hook ||= @project.hooks.find(params[:id])
end
+
+ def hook_params
+ params.require(:hook).permit(:url, :push_events, :issues_events, :merge_requests_events, :tag_push_events)
+ end
end
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index ddea8901f9b..4dc9384c996 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -20,7 +20,7 @@ class Projects::IssuesController < Projects::ApplicationController
terms = params['issue_search']
@issues = issues_filtered
- @issues = @issues.where("title LIKE ?", "%#{terms}%") if terms.present?
+ @issues = @issues.where("title LIKE ? OR description LIKE ?", "%#{terms}%", "%#{terms}%") if terms.present?
@issues = @issues.page(params[:page]).per(20)
assignee_id, milestone_id = params[:assignee_id], params[:milestone_id]
@@ -42,7 +42,11 @@ class Projects::IssuesController < Projects::ApplicationController
end
def new
- @issue = @project.issues.new(params[:issue])
+ params[:issue] ||= ActionController::Parameters.new(
+ assignee_id: ""
+ )
+
+ @issue = @project.issues.new(issue_params)
respond_with(@issue)
end
@@ -59,7 +63,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
def create
- @issue = Issues::CreateService.new(project, current_user, params[:issue]).execute
+ @issue = Issues::CreateService.new(project, current_user, issue_params).execute
respond_to do |format|
format.html do
@@ -76,7 +80,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
def update
- @issue = Issues::UpdateService.new(project, current_user, params[:issue]).execute(issue)
+ @issue = Issues::UpdateService.new(project, current_user, issue_params).execute(issue)
respond_to do |format|
format.js
@@ -144,4 +148,11 @@ class Projects::IssuesController < Projects::ApplicationController
raise ActiveRecord::RecordNotFound.new
end
end
+
+ def issue_params
+ params.require(:issue).permit(
+ :title, :assignee_id, :position, :description,
+ :milestone_id, :label_list, :state_event
+ )
+ end
end
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 1abedc1f272..fcc6384e27c 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -32,6 +32,9 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
def show
+ @note_counts = Note.where(commit_id: @merge_request.commits.map(&:id)).
+ group(:commit_id).count
+
respond_to do |format|
format.html
format.diff { render text: @merge_request.to_diff(current_user) }
@@ -41,16 +44,13 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def diffs
@commit = @merge_request.last_commit
-
@comments_allowed = @reply_allowed = true
- @comments_target = {noteable_type: 'MergeRequest',
- noteable_id: @merge_request.id}
+ @comments_target = {
+ noteable_type: 'MergeRequest',
+ noteable_id: @merge_request.id
+ }
@line_notes = @merge_request.notes.where("line_code is not null")
- diff_line_count = Commit::diff_line_count(@merge_request.diffs)
- @suppress_diff = Commit::diff_suppress?(@merge_request.diffs, diff_line_count) && !params[:force_show_diff]
- @force_suppress_diff = Commit::diff_force_suppress?(@merge_request.diffs, diff_line_count)
-
respond_to do |format|
format.html
format.json { render json: { html: view_to_html_string("projects/merge_requests/show/_diffs") } }
@@ -58,43 +58,22 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
def new
- @merge_request = MergeRequest.new(params[:merge_request])
- @merge_request.source_project = @project unless @merge_request.source_project
- @merge_request.target_project ||= (@project.forked_from_project || @project)
- @target_branches = @merge_request.target_project.nil? ? [] : @merge_request.target_project.repository.branch_names
- @merge_request.target_branch ||= @merge_request.target_project.default_branch
- @source_project = @merge_request.source_project
-
- if @merge_request.target_branch && @merge_request.source_branch
- compare_action = Gitlab::Satellite::CompareAction.new(
- current_user,
- @merge_request.target_project,
- @merge_request.target_branch,
- @merge_request.source_project,
- @merge_request.source_branch
- )
-
- @compare_failed = false
- @commits = compare_action.commits
-
- if @commits
- @commits.map! { |commit| Commit.new(commit) }
- @commit = @commits.first
- else
- # false value because failed to get commits from satellite
- @commits = []
- @compare_failed = true
- end
+ params[:merge_request] ||= ActionController::Parameters.new(source_project: @project)
+ @merge_request = MergeRequests::BuildService.new(project, current_user, merge_request_params).execute
- @diffs = compare_action.diffs
- @merge_request.title = @merge_request.source_branch.titleize.humanize
- @target_project = @merge_request.target_project
- @target_repo = @target_project.repository
+ @target_branches = if @merge_request.target_project
+ @merge_request.target_project.repository.branch_names
+ else
+ []
+ end
- diff_line_count = Commit::diff_line_count(@diffs)
- @suppress_diff = Commit::diff_suppress?(@diffs, diff_line_count)
- @force_suppress_diff = @suppress_diff
- end
+ @target_project = merge_request.target_project
+ @source_project = merge_request.source_project
+ @commits = @merge_request.compare_commits
+ @commit = @merge_request.compare_base_commit
+ @diffs = @merge_request.compare_diffs
+ @note_counts = Note.where(commit_id: @commits.map(&:id)).
+ group(:commit_id).count
end
def edit
@@ -105,7 +84,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def create
@target_branches ||= []
- @merge_request = MergeRequests::CreateService.new(project, current_user, params[:merge_request]).execute
+ @merge_request = MergeRequests::CreateService.new(project, current_user, merge_request_params).execute
if @merge_request.valid?
redirect_to project_merge_request_path(@merge_request.target_project, @merge_request), notice: 'Merge request was successfully created.'
@@ -117,7 +96,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
def update
- @merge_request = MergeRequests::UpdateService.new(project, current_user, params[:merge_request]).execute(@merge_request)
+ @merge_request = MergeRequests::UpdateService.new(project, current_user, merge_request_params).execute(@merge_request)
if @merge_request.valid?
respond_to do |format|
@@ -258,4 +237,12 @@ class Projects::MergeRequestsController < Projects::ApplicationController
can?(current_user, action, project)
end
+
+ def merge_request_params
+ params.require(:merge_request).permit(
+ :title, :assignee_id, :source_project_id, :source_branch,
+ :target_project_id, :target_branch, :milestone_id,
+ :state_event, :description, :label_list
+ )
+ end
end
diff --git a/app/controllers/projects/milestones_controller.rb b/app/controllers/projects/milestones_controller.rb
index c38c77d6b85..d338cdedfaf 100644
--- a/app/controllers/projects/milestones_controller.rb
+++ b/app/controllers/projects/milestones_controller.rb
@@ -37,7 +37,7 @@ class Projects::MilestonesController < Projects::ApplicationController
end
def create
- @milestone = Milestones::CreateService.new(project, current_user, params[:milestone]).execute
+ @milestone = Milestones::CreateService.new(project, current_user, milestone_params).execute
if @milestone.save
redirect_to project_milestone_path(@project, @milestone)
@@ -47,7 +47,7 @@ class Projects::MilestonesController < Projects::ApplicationController
end
def update
- @milestone = Milestones::UpdateService.new(project, current_user, params[:milestone]).execute(milestone)
+ @milestone = Milestones::UpdateService.new(project, current_user, milestone_params).execute(milestone)
respond_to do |format|
format.js
@@ -105,4 +105,8 @@ class Projects::MilestonesController < Projects::ApplicationController
def module_enabled
return render_404 unless @project.issues_enabled
end
+
+ def milestone_params
+ params.require(:milestone).permit(:title, :description, :due_date, :state_event)
+ end
end
diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb
index b5b0446b43f..2154b6ed2eb 100644
--- a/app/controllers/projects/notes_controller.rb
+++ b/app/controllers/projects/notes_controller.rb
@@ -21,7 +21,7 @@ class Projects::NotesController < Projects::ApplicationController
end
def create
- @note = Notes::CreateService.new(project, current_user, params).execute
+ @note = Notes::CreateService.new(project, current_user, note_params).execute
respond_to do |format|
format.json { render_note_json(@note) }
@@ -30,7 +30,7 @@ class Projects::NotesController < Projects::ApplicationController
end
def update
- note.update_attributes(params[:note])
+ note.update_attributes(note_params)
note.reset_events_cache
respond_to do |format|
@@ -85,16 +85,35 @@ class Projects::NotesController < Projects::ApplicationController
)
end
+ def note_to_discussion_with_diff_html(note)
+ return unless note.for_diff_line?
+
+ render_to_string(
+ "projects/notes/_discussion",
+ layout: false,
+ formats: [:html],
+ locals: { discussion_notes: [note] }
+ )
+ end
+
def render_note_json(note)
render json: {
id: note.id,
discussion_id: note.discussion_id,
html: note_to_html(note),
- discussion_html: note_to_discussion_html(note)
+ discussion_html: note_to_discussion_html(note),
+ discussion_with_diff_html: note_to_discussion_with_diff_html(note)
}
end
def authorize_admin_note!
return access_denied! unless can?(current_user, :admin_note, note)
end
+
+ def note_params
+ params.require(:note).permit(
+ :note, :noteable, :noteable_id, :noteable_type, :project_id,
+ :attachment, :line_code, :commit_id
+ )
+ end
end
diff --git a/app/controllers/projects/protected_branches_controller.rb b/app/controllers/projects/protected_branches_controller.rb
index e39e97af8dd..bd31b1d3c54 100644
--- a/app/controllers/projects/protected_branches_controller.rb
+++ b/app/controllers/projects/protected_branches_controller.rb
@@ -11,7 +11,7 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
end
def create
- @project.protected_branches.create(params[:protected_branch])
+ @project.protected_branches.create(protected_branch_params)
redirect_to project_protected_branches_path(@project)
end
@@ -23,4 +23,10 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
format.js { render nothing: true }
end
end
+
+ private
+
+ def protected_branch_params
+ params.require(:protected_branch).permit(:name)
+ end
end
diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb
index 8834a995081..7997c726fbb 100644
--- a/app/controllers/projects/refs_controller.rb
+++ b/app/controllers/projects/refs_controller.rb
@@ -37,7 +37,7 @@ class Projects::RefsController < Projects::ApplicationController
0
end
- @limit = 10
+ @limit = 25
@path = params[:path]
diff --git a/app/controllers/projects/repositories_controller.rb b/app/controllers/projects/repositories_controller.rb
index 28fed8b0e3f..f76ddb34bc4 100644
--- a/app/controllers/projects/repositories_controller.rb
+++ b/app/controllers/projects/repositories_controller.rb
@@ -22,6 +22,7 @@ class Projects::RepositoriesController < Projects::ApplicationController
if file_path
# Send file to user
+ response.headers["Content-Length"] = File.open(file_path).size.to_s
send_file file_path
else
render_404
diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb
index 6db22186c14..b143dec3a93 100644
--- a/app/controllers/projects/services_controller.rb
+++ b/app/controllers/projects/services_controller.rb
@@ -16,7 +16,7 @@ class Projects::ServicesController < Projects::ApplicationController
end
def update
- if @service.update_attributes(params[:service])
+ if @service.update_attributes(service_params)
redirect_to edit_project_service_path(@project, @service.to_param)
else
render 'edit'
@@ -36,4 +36,11 @@ class Projects::ServicesController < Projects::ApplicationController
def service
@service ||= @project.services.find { |service| service.to_param == params[:id] }
end
+
+ def service_params
+ params.require(:service).permit(
+ :title, :token, :type, :active, :api_key, :subdomain,
+ :room, :recipients, :project_url
+ )
+ end
end
diff --git a/app/controllers/projects/snippets_controller.rb b/app/controllers/projects/snippets_controller.rb
index f93f2d5f9bb..25026973118 100644
--- a/app/controllers/projects/snippets_controller.rb
+++ b/app/controllers/projects/snippets_controller.rb
@@ -25,7 +25,7 @@ class Projects::SnippetsController < Projects::ApplicationController
end
def create
- @snippet = @project.snippets.build(params[:project_snippet])
+ @snippet = @project.snippets.build(snippet_params)
@snippet.author = current_user
if @snippet.save
@@ -39,7 +39,7 @@ class Projects::SnippetsController < Projects::ApplicationController
end
def update
- if @snippet.update_attributes(params[:project_snippet])
+ if @snippet.update_attributes(snippet_params)
redirect_to project_snippet_path(@project, @snippet)
else
respond_with(@snippet)
@@ -86,4 +86,8 @@ class Projects::SnippetsController < Projects::ApplicationController
def module_enabled
return render_404 unless @project.snippets_enabled
end
+
+ def snippet_params
+ params.require(:project_snippet).permit(:title, :content, :file_name, :private)
+ end
end
diff --git a/app/controllers/projects/team_members_controller.rb b/app/controllers/projects/team_members_controller.rb
index 44068878cd1..1de5bac9ee8 100644
--- a/app/controllers/projects/team_members_controller.rb
+++ b/app/controllers/projects/team_members_controller.rb
@@ -27,7 +27,7 @@ class Projects::TeamMembersController < Projects::ApplicationController
def update
@user_project_relation = project.users_projects.find_by(user_id: member)
- @user_project_relation.update_attributes(params[:team_member])
+ @user_project_relation.update_attributes(member_params)
unless @user_project_relation.valid?
flash[:alert] = "User should have at least one role"
@@ -67,4 +67,8 @@ class Projects::TeamMembersController < Projects::ApplicationController
def member
@member ||= User.find_by(username: params[:id])
end
+
+ def member_params
+ params.require(:team_member).permit(:user_id, :project_access)
+ end
end
diff --git a/app/controllers/projects/tree_controller.rb b/app/controllers/projects/tree_controller.rb
index 30c94ec6da0..4d033b36848 100644
--- a/app/controllers/projects/tree_controller.rb
+++ b/app/controllers/projects/tree_controller.rb
@@ -1,7 +1,14 @@
# Controller for viewing a repository's file structure
class Projects::TreeController < Projects::BaseTreeController
def show
- return not_found! if tree.entries.empty?
+
+ if tree.entries.empty?
+ if @repository.blob_at(@commit.id, @path)
+ redirect_to project_blob_path(@project, File.join(@ref, @path)) and return
+ else
+ return not_found!
+ end
+ end
respond_to do |format|
format.html
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 9e14af62048..3d012b7e164 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -20,7 +20,7 @@ class ProjectsController < ApplicationController
end
def create
- @project = ::Projects::CreateService.new(current_user, params[:project]).execute
+ @project = ::Projects::CreateService.new(current_user, project_params).execute
flash[:notice] = 'Project was successfully created.' if @project.saved?
respond_to do |format|
@@ -29,7 +29,7 @@ class ProjectsController < ApplicationController
end
def update
- status = ::Projects::UpdateService.new(@project, current_user, params).execute
+ status = ::Projects::UpdateService.new(@project, current_user, project_params).execute
respond_to do |format|
if status
@@ -44,7 +44,7 @@ class ProjectsController < ApplicationController
end
def transfer
- ::Projects::TransferService.new(project, current_user, params[:project]).execute
+ ::Projects::TransferService.new(project, current_user, project_params).execute
end
def show
@@ -85,7 +85,7 @@ class ProjectsController < ApplicationController
redirect_to import_project_path(@project)
end
- @project.import_url = params[:project][:import_url]
+ @project.import_url = project_params[:import_url]
if @project.save
@project.reload
@@ -98,8 +98,7 @@ class ProjectsController < ApplicationController
def destroy
return access_denied! unless can?(current_user, :remove_project, project)
- project.team.truncate
- project.destroy
+ ::Projects::DestroyService.new(@project, current_user, {}).execute
respond_to do |format|
format.html { redirect_to root_path }
@@ -125,18 +124,12 @@ class ProjectsController < ApplicationController
def autocomplete_sources
note_type = params['type']
note_id = params['type_id']
- participating = if note_type && note_id
- participants_in(note_type, note_id)
- else
- []
- end
- team_members = sorted(@project.team.members)
- participants = team_members + participating
+ participants = ::Projects::ParticipantsService.new(@project).execute(note_type, note_id)
@suggestions = {
emojis: Emoji.names.map { |e| { name: e, path: view_context.image_url("emoji/#{e}.png") } },
issues: @project.issues.select([:iid, :title, :description]),
mergerequests: @project.merge_requests.select([:iid, :title, :description]),
- members: participants.uniq
+ members: participants
}
respond_to do |format|
@@ -193,24 +186,11 @@ class ProjectsController < ApplicationController
current_user ? "projects" : "public_projects"
end
- def participants_in(type, id)
- users = case type
- when "Issue"
- issue = @project.issues.find_by_iid(id)
- issue ? issue.participants : []
- when "MergeRequest"
- merge_request = @project.merge_requests.find_by_iid(id)
- merge_request ? merge_request.participants : []
- when "Commit"
- author_ids = Note.for_commit_id(id).pluck(:author_id).uniq
- User.where(id: author_ids)
- else
- []
- end
- sorted(users)
- end
-
- def sorted(users)
- users.uniq.to_a.compact.sort_by(&:username).map { |user| { username: user.username, name: user.name } }
+ def project_params
+ params.require(:project).permit(
+ :name, :path, :description, :issues_tracker, :label_list,
+ :issues_enabled, :merge_requests_enabled, :snippets_enabled, :issues_tracker_id, :default_branch,
+ :wiki_enabled, :visibility_level, :import_url, :last_activity_at, :namespace_id
+ )
end
end
diff --git a/app/controllers/public/projects_controller.rb b/app/controllers/public/projects_controller.rb
deleted file mode 100644
index d6238f79547..00000000000
--- a/app/controllers/public/projects_controller.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-class Public::ProjectsController < ApplicationController
- skip_before_filter :authenticate_user!,
- :reject_blocked, :set_current_user_for_observers,
- :add_abilities
-
- layout 'public'
-
- def index
- @projects = Project.publicish(current_user)
- @projects = @projects.search(params[:search]) if params[:search].present?
- @projects = @projects.sort(@sort = params[:sort])
- @projects = @projects.includes(:namespace).page(params[:page]).per(20)
- end
-end
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 5f18bac82ed..9e70978992f 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -13,7 +13,14 @@ class RegistrationsController < Devise::RegistrationsController
def build_resource(hash=nil)
super
- self.resource.with_defaults
+ end
+
+ def after_sign_up_path_for resource
+ new_user_session_path
+ end
+
+ def after_inactive_sign_up_path_for resource
+ new_user_session_path
end
private
@@ -21,4 +28,8 @@ class RegistrationsController < Devise::RegistrationsController
def signup_enabled?
redirect_to new_user_session_path unless Gitlab.config.gitlab.signup_enabled
end
+
+ def sign_up_params
+ params.require(:user).permit(:username, :email, :name, :password, :password_confirmation)
+ end
end
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
new file mode 100644
index 00000000000..f7d5ca08c05
--- /dev/null
+++ b/app/controllers/sessions_controller.rb
@@ -0,0 +1,23 @@
+class SessionsController < Devise::SessionsController
+
+ def new
+ redirect_url = if request.referer.present?
+ referer_uri = URI(request.referer)
+ if referer_uri.host == Gitlab.config.gitlab.host
+ referer_uri.path
+ else
+ request.fullpath
+ end
+ else
+ request.fullpath
+ end
+
+ store_location_for(:redirect, redirect_url)
+
+ super
+ end
+
+ def create
+ super
+ end
+end
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb
index 4fe98f804dc..e75db61e680 100644
--- a/app/controllers/snippets_controller.rb
+++ b/app/controllers/snippets_controller.rb
@@ -51,7 +51,7 @@ class SnippetsController < ApplicationController
end
def create
- @snippet = PersonalSnippet.new(params[:personal_snippet])
+ @snippet = PersonalSnippet.new(snippet_params)
@snippet.author = current_user
if @snippet.save
@@ -65,7 +65,7 @@ class SnippetsController < ApplicationController
end
def update
- if @snippet.update_attributes(params[:personal_snippet])
+ if @snippet.update_attributes(snippet_params)
redirect_to snippet_path(@snippet)
else
respond_with @snippet
@@ -109,4 +109,8 @@ class SnippetsController < ApplicationController
def set_title
@title = 'Snippets'
end
+
+ def snippet_params
+ params.require(:personal_snippet).permit(:title, :content, :file_name, :private)
+ end
end
diff --git a/app/controllers/users_groups_controller.rb b/app/controllers/users_groups_controller.rb
index b9bdc189522..a35a12a866b 100644
--- a/app/controllers/users_groups_controller.rb
+++ b/app/controllers/users_groups_controller.rb
@@ -14,7 +14,7 @@ class UsersGroupsController < ApplicationController
def update
@member = @group.users_groups.find(params[:id])
- @member.update_attributes(params[:users_group])
+ @member.update_attributes(member_params)
end
def destroy
@@ -41,4 +41,8 @@ class UsersGroupsController < ApplicationController
return render_404
end
end
+
+ def member_params
+ params.require(:users_group).permit(:group_access, :user_id)
+ end
end
diff --git a/app/finders/notes_finder.rb b/app/finders/notes_finder.rb
index ea055694cd7..bef82d7f0fd 100644
--- a/app/finders/notes_finder.rb
+++ b/app/finders/notes_finder.rb
@@ -14,7 +14,7 @@ class NotesFinder
project.issues.find(target_id).notes.inc_author.fresh
when "merge_request"
project.merge_requests.find(target_id).mr_and_commit_notes.inc_author.fresh
- when "snippet"
+ when "snippet", "project_snippet"
project.snippets.find(target_id).notes.fresh
else
raise 'invalid target_type'
diff --git a/app/finders/trending_projects_finder.rb b/app/finders/trending_projects_finder.rb
new file mode 100644
index 00000000000..32d7968924a
--- /dev/null
+++ b/app/finders/trending_projects_finder.rb
@@ -0,0 +1,19 @@
+class TrendingProjectsFinder
+ def execute(current_user, start_date = nil)
+ start_date ||= Date.today - 1.month
+
+ projects = projects_for(current_user)
+
+ # Determine trending projects based on comments count
+ # for period of time - ex. month
+ projects.joins(:notes).where('notes.created_at > ?', start_date).
+ select("projects.*, count(notes.id) as ncount").
+ group("projects.id").order("ncount DESC")
+ end
+
+ private
+
+ def projects_for(current_user)
+ ProjectsFinder.new.execute(current_user)
+ end
+end
diff --git a/app/helpers/appearances_helper.rb b/app/helpers/appearances_helper.rb
new file mode 100644
index 00000000000..96e5d43a369
--- /dev/null
+++ b/app/helpers/appearances_helper.rb
@@ -0,0 +1,17 @@
+module AppearancesHelper
+ def brand_item
+ nil
+ end
+
+ def brand_title
+ 'GitLab Community Edition'
+ end
+
+ def brand_image
+ nil
+ end
+
+ def brand_text
+ nil
+ end
+end
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 4d27cf2851e..9a8b3928bf4 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
module CommitsHelper
# Returns a link to the commit author. If the author has a matching user and
# is a member of the current @project it will link to the team member page.
@@ -180,6 +181,17 @@ module CommitsHelper
return old_lines, new_lines
end
+ def link_to_browse_code(project, commit)
+ if current_controller?(:projects, :commits)
+ if @repo.blob_at(commit.id, @path)
+ return link_to "Browse File »", project_blob_path(project, tree_join(commit.id, @path)), class: "pull-right"
+ elsif @path.present?
+ return link_to "Browse Dir »", project_tree_path(project, tree_join(commit.id, @path)), class: "pull-right"
+ end
+ end
+ link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right"
+ end
+
protected
# Private: Returns a link to a person. If the person has a matching user and
diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb
index d5712ab3374..c4e33e3308f 100644
--- a/app/helpers/dashboard_helper.rb
+++ b/app/helpers/dashboard_helper.rb
@@ -35,4 +35,42 @@ module DashboardHelper
path << "?#{options.to_param}"
path
end
+
+ def assigned_entities_count(current_user, entity, scope = nil)
+ items = current_user.send("assigned_" + entity.pluralize).opened
+
+ if scope.kind_of?(Group)
+ items = items.of_group(scope)
+ elsif scope.kind_of?(Project)
+ items = items.of_projects(scope)
+ end
+
+ items.count
+ end
+
+ def authored_entities_count(current_user, entity, scope = nil)
+ items = current_user.send(entity.pluralize).opened
+
+ if scope.kind_of?(Group)
+ items = items.of_group(scope)
+ elsif scope.kind_of?(Project)
+ items = items.of_projects(scope)
+ end
+
+ items.count
+ end
+
+ def authorized_entities_count(current_user, entity, scope = nil)
+ items = entity.classify.constantize.opened
+
+ if scope.kind_of?(Group)
+ items = items.of_group(scope)
+ elsif scope.kind_of?(Project)
+ items = items.of_projects(scope)
+ else
+ items = items.of_projects(current_user.authorized_projects)
+ end
+
+ items.count
+ end
end
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb
new file mode 100644
index 00000000000..ee4d4fbdff5
--- /dev/null
+++ b/app/helpers/diff_helper.rb
@@ -0,0 +1,22 @@
+module DiffHelper
+ def safe_diff_files(diffs)
+ if diff_hard_limit_enabled?
+ diffs.first(Commit::DIFF_HARD_LIMIT_FILES)
+ else
+ diffs.first(Commit::DIFF_SAFE_FILES)
+ end
+ end
+
+ def show_diff_size_warninig?(diffs)
+ safe_diff_files(diffs).size < diffs.size
+ end
+
+ def diff_hard_limit_enabled?
+ # Enabling hard limit allows user to see more diff information
+ if params[:force_show_diff].present?
+ true
+ else
+ false
+ end
+ end
+end
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb
index d3904e16c11..c7e8fdad7a0 100644
--- a/app/helpers/events_helper.rb
+++ b/app/helpers/events_helper.rb
@@ -45,15 +45,15 @@ module EventsHelper
def event_feed_title(event)
if event.issue?
- "#{event.author_name} #{event.action_name} issue ##{event.target_id}: #{event.issue_title} at #{event.project_name}"
+ "#{event.author_name} #{event.action_name} issue ##{event.target_iid}: #{event.issue_title} at #{event.project_name}"
elsif event.merge_request?
- "#{event.author_name} #{event.action_name} MR ##{event.target_id}: #{event.merge_request_title} at #{event.project_name}"
+ "#{event.author_name} #{event.action_name} MR ##{event.target_iid}: #{event.merge_request_title} at #{event.project_name}"
elsif event.push?
"#{event.author_name} #{event.push_action_name} #{event.ref_type} #{event.ref_name} at #{event.project_name}"
elsif event.membership_changed?
"#{event.author_name} #{event.action_name} #{event.project_name}"
elsif event.note?
- "#{event.author_name} commented on #{event.note_target_type} ##{truncate event.note_target_id} at #{event.project_name}"
+ "#{event.author_name} commented on #{event.note_target_type} ##{truncate event.note_target_iid} at #{event.project_name}"
else
""
end
@@ -64,7 +64,16 @@ module EventsHelper
project_issue_url(event.project, event.issue)
elsif event.merge_request?
project_merge_request_url(event.project, event.merge_request)
-
+ elsif event.note?
+ if event.note_target
+ if event.note_commit?
+ project_commit_path(event.project, event.note_commit_id, anchor: dom_id(event.target))
+ elsif event.note_project_snippet?
+ project_snippet_path(event.project, event.note_target)
+ else
+ event_note_target_path(event)
+ end
+ end
elsif event.push?
if event.push_with_commits?
if event.commits_count > 1
@@ -83,6 +92,10 @@ module EventsHelper
render "events/event_issue", issue: event.issue
elsif event.push?
render "events/event_push", event: event
+ elsif event.merge_request?
+ render "events/event_merge_request", merge_request: event.merge_request
+ elsif event.note?
+ render "events/event_note", note: event.note
end
end
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb
index db5b4eacd1f..c112e98508c 100644
--- a/app/helpers/gitlab_markdown_helper.rb
+++ b/app/helpers/gitlab_markdown_helper.rb
@@ -63,10 +63,14 @@ module GitlabMarkdownHelper
paths = extract_paths(text)
paths.uniq.each do |file_path|
- new_path = rebuild_path(file_path)
- # Finds quoted path so we don't replace other mentions of the string
- # eg. "doc/api" will be replaced and "/home/doc/api/text" won't
- text.gsub!("\"#{file_path}\"", "\"/#{new_path}\"")
+ # If project does not have repository
+ # its nothing to rebuild
+ if @repository.exists? && !@repository.empty?
+ new_path = rebuild_path(file_path)
+ # Finds quoted path so we don't replace other mentions of the string
+ # eg. "doc/api" will be replaced and "/home/doc/api/text" won't
+ text.gsub!("\"#{file_path}\"", "\"/#{new_path}\"")
+ end
end
text
@@ -91,7 +95,12 @@ module GitlabMarkdownHelper
end
def link_to_ignore?(link)
- ignored_protocols.map{ |protocol| link.include?(protocol) }.any?
+ if link =~ /\#\w+/
+ # ignore anchors like <a href="#my-header">
+ true
+ else
+ ignored_protocols.map{ |protocol| link.include?(protocol) }.any?
+ end
end
def ignored_protocols
@@ -129,7 +138,7 @@ module GitlabMarkdownHelper
# If we are at doc/api/README.md and the README.md contains relative links like [Users](users.md)
# this takes the request path(doc/api/README.md), and replaces the README.md with users.md so the path looks like doc/api/users.md
# If we are at doc/api and the README.md shown in below the tree view
- # this takes the rquest path(doc/api) and adds users.md so the path looks like doc/api/users.md
+ # this takes the request path(doc/api) and adds users.md so the path looks like doc/api/users.md
def build_nested_path(path, request_path)
return request_path if path == ""
return path unless request_path
@@ -169,7 +178,7 @@ module GitlabMarkdownHelper
def current_sha
if @commit
@commit.id
- else
+ elsif @repository && !@repository.empty?
@repository.head_commit.sha
end
end
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb
index cfc9a572cac..0dc53dedeb7 100644
--- a/app/helpers/groups_helper.rb
+++ b/app/helpers/groups_helper.rb
@@ -31,6 +31,17 @@ module GroupsHelper
end
title
+ end
+
+ def group_filter_path(entity, options={})
+ exist_opts = {
+ status: params[:status]
+ }
+
+ options = exist_opts.merge(options)
+ path = request.path
+ path << "?#{options.to_param}"
+ path
end
end
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb
index 9ed38ba84b2..53ac5febd61 100644
--- a/app/helpers/notes_helper.rb
+++ b/app/helpers/notes_helper.rb
@@ -15,12 +15,6 @@ module NotesHelper
end
end
- def link_to_merge_request_diff_line_note(note)
- if note.for_merge_request_diff_line? and note.diff
- link_to "#{note.diff_file_name}:L#{note.diff_new_line}", diffs_project_merge_request_path(note.project, note.noteable, anchor: note.line_code)
- end
- end
-
def note_timestamp(note)
# Shows the created at time and the updated at time if different
ts = "#{time_ago_with_tooltip(note.created_at, 'bottom', 'note_created_ago')}"
@@ -61,4 +55,23 @@ module NotesHelper
link_to "", "javascript:;", class: "add-diff-note js-add-diff-note-button",
data: data, title: "Add a comment to this line"
end
+
+ def link_to_reply_diff(note)
+ return unless current_user
+
+ data = {
+ noteable_type: note.noteable_type,
+ noteable_id: note.noteable_id,
+ commit_id: note.commit_id,
+ line_code: note.line_code,
+ discussion_id: note.discussion_id
+ }
+
+ link_to "javascript:;", class: "btn reply-btn js-discussion-reply-button",
+ data: data, title: "Add a reply" do
+ link_text = ""
+ link_text < content_tag(:i, nil, class: 'icon-comment')
+ link_text << "Reply"
+ end
+ end
end
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index ba4c7068e90..bc2ec84302d 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -221,4 +221,10 @@ module ProjectsHelper
"Never"
end
end
+
+ def contribution_guide_url(project)
+ if project && project.repository.contribution_guide
+ project_blob_path(project, tree_join(project.default_branch, project.repository.contribution_guide.name))
+ end
+ end
end
diff --git a/app/mailers/emails/issues.rb b/app/mailers/emails/issues.rb
index a096df9dc0d..e5346235963 100644
--- a/app/mailers/emails/issues.rb
+++ b/app/mailers/emails/issues.rb
@@ -4,10 +4,10 @@ module Emails
@issue = Issue.find(issue_id)
@project = @issue.project
@target_url = project_issue_url(@project, @issue)
- set_message_id("issue_#{issue_id}")
- mail(from: sender(@issue.author_id),
- to: recipient(recipient_id),
- subject: subject("#{@issue.title} (##{@issue.iid})"))
+ mail_new_thread(@issue,
+ from: sender(@issue.author_id),
+ to: recipient(recipient_id),
+ subject: subject("#{@issue.title} (##{@issue.iid})"))
end
def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id, updated_by_user_id)
@@ -15,10 +15,10 @@ module Emails
@previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id
@project = @issue.project
@target_url = project_issue_url(@project, @issue)
- set_reference("issue_#{issue_id}")
- mail(from: sender(updated_by_user_id),
- to: recipient(recipient_id),
- subject: subject("#{@issue.title} (##{@issue.iid})"))
+ mail_answer_thread(@issue,
+ from: sender(updated_by_user_id),
+ to: recipient(recipient_id),
+ subject: subject("#{@issue.title} (##{@issue.iid})"))
end
def closed_issue_email(recipient_id, issue_id, updated_by_user_id)
@@ -26,10 +26,10 @@ module Emails
@project = @issue.project
@updated_by = User.find updated_by_user_id
@target_url = project_issue_url(@project, @issue)
- set_reference("issue_#{issue_id}")
- mail(from: sender(updated_by_user_id),
- to: recipient(recipient_id),
- subject: subject("#{@issue.title} (##{@issue.iid})"))
+ mail_answer_thread(@issue,
+ from: sender(updated_by_user_id),
+ to: recipient(recipient_id),
+ subject: subject("#{@issue.title} (##{@issue.iid})"))
end
def issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id)
@@ -38,10 +38,10 @@ module Emails
@project = @issue.project
@updated_by = User.find updated_by_user_id
@target_url = project_issue_url(@project, @issue)
- set_reference("issue_#{issue_id}")
- mail(from: sender(updated_by_user_id),
- to: recipient(recipient_id),
- subject: subject("#{@issue.title} (##{@issue.iid})"))
+ mail_answer_thread(@issue,
+ from: sender(updated_by_user_id),
+ to: recipient(recipient_id),
+ subject: subject("#{@issue.title} (##{@issue.iid})"))
end
end
end
diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb
index ea5671c4502..935987e2ed1 100644
--- a/app/mailers/emails/merge_requests.rb
+++ b/app/mailers/emails/merge_requests.rb
@@ -4,10 +4,10 @@ module Emails
@merge_request = MergeRequest.find(merge_request_id)
@project = @merge_request.project
@target_url = project_merge_request_url(@project, @merge_request)
- set_message_id("merge_request_#{merge_request_id}")
- mail(from: sender(@merge_request.author_id),
- to: recipient(recipient_id),
- subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
+ mail_new_thread(@merge_request,
+ from: sender(@merge_request.author_id),
+ to: recipient(recipient_id),
+ subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
end
def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id, updated_by_user_id)
@@ -15,10 +15,10 @@ module Emails
@previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id
@project = @merge_request.project
@target_url = project_merge_request_url(@project, @merge_request)
- set_reference("merge_request_#{merge_request_id}")
- mail(from: sender(updated_by_user_id),
- to: recipient(recipient_id),
- subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
+ mail_answer_thread(@merge_request,
+ from: sender(updated_by_user_id),
+ to: recipient(recipient_id),
+ subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
end
def closed_merge_request_email(recipient_id, merge_request_id, updated_by_user_id)
@@ -26,20 +26,32 @@ module Emails
@updated_by = User.find updated_by_user_id
@project = @merge_request.project
@target_url = project_merge_request_url(@project, @merge_request)
- set_reference("merge_request_#{merge_request_id}")
- mail(from: sender(updated_by_user_id),
- to: recipient(recipient_id),
- subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
+ mail_answer_thread(@merge_request,
+ from: sender(updated_by_user_id),
+ to: recipient(recipient_id),
+ subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
end
def merged_merge_request_email(recipient_id, merge_request_id, updated_by_user_id)
@merge_request = MergeRequest.find(merge_request_id)
@project = @merge_request.project
@target_url = project_merge_request_url(@project, @merge_request)
+ mail_answer_thread(@merge_request,
+ from: sender(updated_by_user_id),
+ to: recipient(recipient_id),
+ subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
+ end
+
+ def merge_request_status_email(recipient_id, merge_request_id, status, updated_by_user_id)
+ @merge_request = MergeRequest.find(merge_request_id)
+ @mr_status = status
+ @project = @merge_request.project
+ @updated_by = User.find updated_by_user_id
+ @target_url = project_merge_request_url(@project, @merge_request)
set_reference("merge_request_#{merge_request_id}")
mail(from: sender(updated_by_user_id),
to: recipient(recipient_id),
- subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
+ subject: subject("#{@merge_request.title} (##{@merge_request.iid}) #{@mr_status}"))
end
end
diff --git a/app/mailers/emails/notes.rb b/app/mailers/emails/notes.rb
index b7fedbd3707..ef9af726a6c 100644
--- a/app/mailers/emails/notes.rb
+++ b/app/mailers/emails/notes.rb
@@ -5,9 +5,10 @@ module Emails
@commit = @note.noteable
@project = @note.project
@target_url = project_commit_url(@project, @commit, anchor: "note_#{@note.id}")
- mail(from: sender(@note.author_id),
- to: recipient(recipient_id),
- subject: subject("#{@commit.title} (#{@commit.short_id})"))
+ mail_answer_thread(@commit,
+ from: sender(@note.author_id),
+ to: recipient(recipient_id),
+ subject: subject("#{@commit.title} (#{@commit.short_id})"))
end
def note_issue_email(recipient_id, note_id)
@@ -15,10 +16,10 @@ module Emails
@issue = @note.noteable
@project = @note.project
@target_url = project_issue_url(@project, @issue, anchor: "note_#{@note.id}")
- set_reference("issue_#{@issue.id}")
- mail(from: sender(@note.author_id),
- to: recipient(recipient_id),
- subject: subject("#{@issue.title} (##{@issue.iid})"))
+ mail_answer_thread(@issue,
+ from: sender(@note.author_id),
+ to: recipient(recipient_id),
+ subject: subject("#{@issue.title} (##{@issue.iid})"))
end
def note_merge_request_email(recipient_id, note_id)
@@ -26,10 +27,10 @@ module Emails
@merge_request = @note.noteable
@project = @note.project
@target_url = project_merge_request_url(@project, @merge_request, anchor: "note_#{@note.id}")
- set_reference("merge_request_#{@merge_request.id}")
- mail(from: sender(@note.author_id),
- to: recipient(recipient_id),
- subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
+ mail_answer_thread(@merge_request,
+ from: sender(@note.author_id),
+ to: recipient(recipient_id),
+ subject: subject("#{@merge_request.title} (##{@merge_request.iid})"))
end
end
end
diff --git a/app/mailers/emails/profile.rb b/app/mailers/emails/profile.rb
index f02d95fd557..f8a7d133d1d 100644
--- a/app/mailers/emails/profile.rb
+++ b/app/mailers/emails/profile.rb
@@ -1,9 +1,10 @@
module Emails
module Profile
- def new_user_email(user_id, password)
+ def new_user_email(user_id, password, token = nil)
@user = User.find(user_id)
@password = password
@target_url = user_url(@user)
+ @token = token
mail(to: @user.email, subject: subject("Account was created for you"))
end
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 84a0da0129d..bd438bab89a 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -1,4 +1,6 @@
class Notify < ActionMailer::Base
+ include ActionDispatch::Routing::PolymorphicRoutes
+
include Emails::Issues
include Emails::MergeRequests
include Emails::Notes
@@ -53,14 +55,6 @@ class Notify < ActionMailer::Base
end
end
- # Set the Message-ID header field
- #
- # local_part - The local part of the message ID
- #
- def set_message_id(local_part)
- headers["Message-ID"] = "<#{local_part}@#{Gitlab.config.gitlab.host}>"
- end
-
# Set the References header field
#
# local_part - The local part of the referenced message ID
@@ -93,4 +87,40 @@ class Notify < ActionMailer::Base
subject << extra.join(' | ') if extra.present?
subject
end
+
+ # Return a string suitable for inclusion in the 'Message-Id' mail header.
+ #
+ # The message-id is generated from the unique URL to a model object.
+ def message_id(model)
+ model_name = model.class.model_name.singular_route_key
+ "<#{model_name}_#{model.id}@#{Gitlab.config.gitlab.host}>"
+ end
+
+ # Send an email that starts a new conversation thread,
+ # with headers suitable for grouping by thread in email clients.
+ #
+ # See: mail_answer_thread
+ def mail_new_thread(model, headers = {}, &block)
+ headers['Message-ID'] = message_id(model)
+ mail(headers, &block)
+ end
+
+ # Send an email that responds to an existing conversation thread,
+ # with headers suitable for grouping by thread in email clients.
+ #
+ # For grouping emails by thread, email clients heuristics require the answers to:
+ #
+ # * have a subject that begin by 'Re: '
+ # * have a 'In-Reply-To' or 'References' header that references the original 'Message-ID'
+ #
+ def mail_answer_thread(model, headers = {}, &block)
+ headers['In-Reply-To'] = message_id(model)
+ headers['References'] = message_id(model)
+
+ if (headers[:subject])
+ headers[:subject].prepend('Re: ')
+ end
+
+ mail(headers, &block)
+ end
end
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 234578b5e18..d33ca41118a 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -67,40 +67,42 @@ class Ability
def project_abilities(user, project)
rules = []
+ key = "/user/#{user.id}/project/#{project.id}"
+ RequestStore.store[key] ||= begin
+ team = project.team
- team = project.team
+ # Rules based on role in project
+ if team.master?(user)
+ rules += project_master_rules
- # Rules based on role in project
- if team.master?(user)
- rules += project_master_rules
+ elsif team.developer?(user)
+ rules += project_dev_rules
- elsif team.developer?(user)
- rules += project_dev_rules
+ elsif team.reporter?(user)
+ rules += project_report_rules
- elsif team.reporter?(user)
- rules += project_report_rules
+ elsif team.guest?(user)
+ rules += project_guest_rules
+ end
- elsif team.guest?(user)
- rules += project_guest_rules
- end
+ if project.public? || project.internal?
+ rules += public_project_rules
+ end
- if project.public? || project.internal?
- rules += public_project_rules
- end
+ if project.owner == user || user.admin?
+ rules += project_admin_rules
+ end
- if project.owner == user || user.admin?
- rules += project_admin_rules
- end
+ if project.group && project.group.has_owner?(user)
+ rules += project_admin_rules
+ end
- if project.group && project.group.has_owner?(user)
- rules += project_admin_rules
- end
+ if project.archived?
+ rules -= project_archived_rules
+ end
- if project.archived?
- rules -= project_archived_rules
+ rules
end
-
- rules
end
def public_project_rules
diff --git a/app/models/broadcast_message.rb b/app/models/broadcast_message.rb
index ce8b7973cd9..4d0c04bcc3d 100644
--- a/app/models/broadcast_message.rb
+++ b/app/models/broadcast_message.rb
@@ -14,8 +14,6 @@
#
class BroadcastMessage < ActiveRecord::Base
- attr_accessible :alert_type, :color, :ends_at, :font, :message, :starts_at
-
validates :message, presence: true
validates :starts_at, presence: true
validates :ends_at, presence: true
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 82876e10446..ff5392957ce 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -12,6 +12,7 @@ class Commit
# User can force display of diff above this size
DIFF_SAFE_FILES = 100
DIFF_SAFE_LINES = 5000
+
# Commits above this size will not be rendered in HTML
DIFF_HARD_LIMIT_FILES = 1000
DIFF_HARD_LIMIT_LINES = 50000
@@ -23,23 +24,7 @@ class Commit
# Calculate number of lines to render for diffs
def diff_line_count(diffs)
- diffs.reduce(0){|sum, d| sum + d.diff.lines.count}
- end
-
- def diff_suppress?(diffs, line_count = nil)
- # optimize - check file count first
- return true if diffs.size > DIFF_SAFE_FILES
-
- line_count ||= Commit::diff_line_count(diffs)
- line_count > DIFF_SAFE_LINES
- end
-
- def diff_force_suppress?(diffs, line_count = nil)
- # optimize - check file count first
- return true if diffs.size > DIFF_HARD_LIMIT_FILES
-
- line_count ||= Commit::diff_line_count(diffs)
- line_count > DIFF_HARD_LIMIT_LINES
+ diffs.reduce(0) { |sum, d| sum + d.diff.lines.count }
end
end
@@ -60,14 +45,6 @@ class Commit
@diff_line_count
end
- def diff_suppress?
- Commit::diff_suppress?(self.diffs, diff_line_count)
- end
-
- def diff_force_suppress?
- Commit::diff_force_suppress?(self.diffs, diff_line_count)
- end
-
# Returns a string describing the commit for use in a link title
#
# Example
diff --git a/app/models/concerns/mentionable.rb b/app/models/concerns/mentionable.rb
index a46a593c6e3..81414959f3b 100644
--- a/app/models/concerns/mentionable.rb
+++ b/app/models/concerns/mentionable.rb
@@ -49,12 +49,16 @@ module Mentionable
matches = mentionable_text.scan(/@[a-zA-Z][a-zA-Z0-9_\-\.]*/)
matches.each do |match|
identifier = match.delete "@"
- if has_project
- id = project.team.members.find_by(username: identifier).try(:id)
+ if identifier == "all"
+ users += project.team.members.flatten
else
- id = User.where(username: identifier).pluck(:id).first
+ if has_project
+ id = project.team.members.find_by(username: identifier).try(:id)
+ else
+ id = User.find_by(username: identifier).try(:id)
+ end
+ users << User.find(id) unless id.blank?
end
- users << User.find(id) unless id.blank?
end
users.uniq
end
diff --git a/app/models/concerns/token_authenticatable.rb b/app/models/concerns/token_authenticatable.rb
new file mode 100644
index 00000000000..9b88ec1cc38
--- /dev/null
+++ b/app/models/concerns/token_authenticatable.rb
@@ -0,0 +1,31 @@
+module TokenAuthenticatable
+ extend ActiveSupport::Concern
+
+ module ClassMethods
+ def find_by_authentication_token(authentication_token = nil)
+ if authentication_token
+ where(authentication_token: authentication_token).first
+ end
+ end
+ end
+
+ def ensure_authentication_token
+ if authentication_token.blank?
+ self.authentication_token = generate_authentication_token
+ end
+ end
+
+ def reset_authentication_token!
+ self.authentication_token = generate_authentication_token
+ save
+ end
+
+ private
+
+ def generate_authentication_token
+ loop do
+ token = Devise.friendly_token
+ break token unless self.class.unscoped.where(authentication_token: token).first
+ end
+ end
+end
diff --git a/app/models/deploy_keys_project.rb b/app/models/deploy_keys_project.rb
index 739d749830a..f23d8205ddc 100644
--- a/app/models/deploy_keys_project.rb
+++ b/app/models/deploy_keys_project.rb
@@ -10,13 +10,10 @@
#
class DeployKeysProject < ActiveRecord::Base
- attr_accessible :key_id, :project_id
-
belongs_to :project
belongs_to :deploy_key
validates :deploy_key_id, presence: true
validates :deploy_key_id, uniqueness: { scope: [:project_id], message: "already exists in project" }
-
validates :project_id, presence: true
end
diff --git a/app/models/email.rb b/app/models/email.rb
index 9068c2b87b6..57f476bd519 100644
--- a/app/models/email.rb
+++ b/app/models/email.rb
@@ -10,16 +10,8 @@
#
class Email < ActiveRecord::Base
- attr_accessible :email, :user_id
-
- #
- # Relations
- #
belongs_to :user
- #
- # Validations
- #
validates :user_id, presence: true
validates :email, presence: true, email: { strict_mode: true }, uniqueness: true
validate :unique_email, if: ->(email) { email.email_changed? }
diff --git a/app/models/event.rb b/app/models/event.rb
index b88635ccb59..8681c2e4d90 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -15,9 +15,6 @@
#
class Event < ActiveRecord::Base
- attr_accessible :project, :action, :data, :author_id, :project_id,
- :target_id, :target_type
-
default_scope { where.not(author_id: nil) }
CREATED = 1
@@ -33,6 +30,7 @@ class Event < ActiveRecord::Base
delegate :name, :email, to: :author, prefix: true, allow_nil: true
delegate :title, to: :issue, prefix: true, allow_nil: true
delegate :title, to: :merge_request, prefix: true, allow_nil: true
+ delegate :title, to: :note, prefix: true, allow_nil: true
belongs_to :author, class_name: "User"
belongs_to :project
@@ -41,6 +39,9 @@ class Event < ActiveRecord::Base
# For Hash only
serialize :data
+ # Callbacks
+ after_create :reset_project_activity
+
# Scopes
scope :recent, -> { order("created_at DESC") }
scope :code_push, -> { where(action: PUSHED) }
@@ -147,6 +148,10 @@ class Event < ActiveRecord::Base
target if target_type == "MergeRequest"
end
+ def note
+ target if target_type == "Note"
+ end
+
def action_name
if closed?
"closed"
@@ -303,4 +308,10 @@ class Event < ActiveRecord::Base
target.respond_to? :title
end
end
+
+ def reset_project_activity
+ if project
+ project.update_column(:last_activity_at, self.created_at)
+ end
+ end
end
diff --git a/app/models/forked_project_link.rb b/app/models/forked_project_link.rb
index 17add270f67..9b0c6263a96 100644
--- a/app/models/forked_project_link.rb
+++ b/app/models/forked_project_link.rb
@@ -10,10 +10,6 @@
#
class ForkedProjectLink < ActiveRecord::Base
- attr_accessible :forked_from_project_id, :forked_to_project_id
-
- # Relations
belongs_to :forked_to_project, class_name: Project
belongs_to :forked_from_project, class_name: Project
-
end
diff --git a/app/models/group.rb b/app/models/group.rb
index e51e19ab60c..66239f7fe6f 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -20,8 +20,6 @@ class Group < Namespace
has_many :users_groups, dependent: :destroy
has_many :users, through: :users_groups
- attr_accessible :avatar
-
validate :avatar_type, if: ->(user) { user.avatar_changed? }
validates :avatar, file_size: { maximum: 100.kilobytes.to_i }
@@ -75,4 +73,20 @@ class Group < Namespace
def public_profile?
projects.public_only.any?
end
+
+ class << self
+ def search(query)
+ where("LOWER(namespaces.name) LIKE :query", query: "%#{query.downcase}%")
+ end
+
+ def sort(method)
+ case method.to_s
+ when "newest" then reorder("namespaces.created_at DESC")
+ when "oldest" then reorder("namespaces.created_at ASC")
+ when "recently_updated" then reorder("namespaces.updated_at DESC")
+ when "last_updated" then reorder("namespaces.updated_at ASC")
+ else reorder("namespaces.path, namespaces.name ASC")
+ end
+ end
+ end
end
diff --git a/app/models/group_milestone.rb b/app/models/group_milestone.rb
new file mode 100644
index 00000000000..33915313789
--- /dev/null
+++ b/app/models/group_milestone.rb
@@ -0,0 +1,95 @@
+class GroupMilestone
+
+ def initialize(title, milestones)
+ @title = title
+ @milestones = milestones
+ end
+
+ def title
+ @title
+ end
+
+ def safe_title
+ @title.parameterize
+ end
+
+ def milestones
+ @milestones
+ end
+
+ def projects
+ milestones.map { |milestone| milestone.project }
+ end
+
+ def issue_count
+ milestones.map { |milestone| milestone.issues.count }.sum
+ end
+
+ def merge_requests_count
+ milestones.map { |milestone| milestone.merge_requests.count }.sum
+ end
+
+ def open_items_count
+ milestones.map { |milestone| milestone.open_items_count }.sum
+ end
+
+ def closed_items_count
+ milestones.map { |milestone| milestone.closed_items_count }.sum
+ end
+
+ def total_items_count
+ milestones.map { |milestone| milestone.total_items_count }.sum
+ end
+
+ def percent_complete
+ ((closed_items_count * 100) / total_items_count).abs
+ rescue ZeroDivisionError
+ 100
+ end
+
+ def state
+ state = milestones.map { |milestone| milestone.state }
+
+ if state.count('closed') == state.size
+ 'closed'
+ else
+ 'active'
+ end
+ end
+
+ def active?
+ state == 'active'
+ end
+
+ def closed?
+ state == 'closed'
+ end
+
+ def issues
+ @group_issues ||= milestones.map { |milestone| milestone.issues }.flatten.group_by(&:state)
+ end
+
+ def merge_requests
+ @group_merge_requests ||= milestones.map { |milestone| milestone.merge_requests }.flatten.group_by(&:state)
+ end
+
+ def participants
+ milestones.map { |milestone| milestone.participants.uniq }.reject(&:empty?).flatten
+ end
+
+ def opened_issues
+ issues.values_at("opened", "reopened").compact.flatten
+ end
+
+ def closed_issues
+ issues['closed']
+ end
+
+ def opened_merge_requests
+ merge_requests.values_at("opened", "reopened").compact.flatten
+ end
+
+ def closed_merge_requests
+ merge_requests.values_at("closed", "merged", "locked").compact.flatten
+ end
+end
diff --git a/app/models/issue.rb b/app/models/issue.rb
index f0c2e552273..a116a9354cb 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -33,9 +33,6 @@ class Issue < ActiveRecord::Base
scope :of_group, ->(group) { where(project_id: group.project_ids) }
scope :of_user_team, ->(team) { where(project_id: team.project_ids, assignee_id: team.member_ids) }
- attr_accessible :title, :assignee_id, :position, :description,
- :milestone_id, :label_list, :state_event
-
acts_as_taggable_on :labels
scope :cared, ->(user) { where(assignee_id: user) }
diff --git a/app/models/key.rb b/app/models/key.rb
index 035c9efa016..d59993b1905 100644
--- a/app/models/key.rb
+++ b/app/models/key.rb
@@ -19,8 +19,6 @@ class Key < ActiveRecord::Base
belongs_to :user
- attr_accessible :key, :title
-
before_validation :strip_white_space, :generate_fingerpint
validates :title, presence: true, length: { within: 0..255 }
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index bfea209bf6d..28486fb41c6 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -36,16 +36,17 @@ class MergeRequest < ActiveRecord::Base
delegate :commits, :diffs, :last_commit, :last_commit_short_sha, to: :merge_request_diff, prefix: nil
- attr_accessible :title, :assignee_id, :source_project_id, :source_branch,
- :target_project_id, :target_branch, :milestone_id,
- :state_event, :description, :label_list
-
attr_accessor :should_remove_source_branch
# When this attribute is true some MR validation is ignored
# It allows us to close or modify broken merge requests
attr_accessor :allow_broken
+ # Temporary fields to store compare vars
+ # when creating new merge request
+ attr_accessor :can_be_created, :compare_failed, :compare_base_commit,
+ :compare_commits, :compare_diffs
+
ActsAsTaggableOn.strict_case_match = true
acts_as_taggable_on :labels
@@ -62,11 +63,11 @@ class MergeRequest < ActiveRecord::Base
transition closed: :reopened
end
- event :lock do
+ event :lock_mr do
transition [:reopened, :opened] => :locked
end
- event :unlock do
+ event :unlock_mr do
transition locked: :reopened
end
@@ -297,6 +298,8 @@ class MergeRequest < ActiveRecord::Base
message << title.to_s
message << "\n\n"
message << description.to_s
+ message << "\n\n"
+ message << "See merge request !#{iid}"
message
end
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb
index 7dce71a677b..d3c07555b0c 100644
--- a/app/models/merge_request_diff.rb
+++ b/app/models/merge_request_diff.rb
@@ -22,8 +22,6 @@ class MergeRequestDiff < ActiveRecord::Base
belongs_to :merge_request
- attr_accessible :state, :st_commits, :st_diffs
-
delegate :target_branch, :source_branch, to: :merge_request, prefix: nil
state_machine :state, initial: :empty do
diff --git a/app/models/milestone.rb b/app/models/milestone.rb
index 39ab0b536a3..8fd3e56d2ee 100644
--- a/app/models/milestone.rb
+++ b/app/models/milestone.rb
@@ -16,8 +16,6 @@
class Milestone < ActiveRecord::Base
include InternalId
- attr_accessible :title, :description, :due_date, :state_event
-
belongs_to :project
has_many :issues
has_many :merge_requests
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 446e5f04c63..b19b72906e7 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -16,8 +16,6 @@
class Namespace < ActiveRecord::Base
include Gitlab::ShellAdapter
- attr_accessible :name, :description, :path
-
has_many :projects, dependent: :destroy
belongs_to :owner, class_name: "User"
@@ -25,12 +23,12 @@ class Namespace < ActiveRecord::Base
validates :name, presence: true, uniqueness: true,
length: { within: 0..255 },
format: { with: Gitlab::Regex.name_regex,
- message: "only letters, digits, spaces & '_' '-' '.' allowed." }
+ message: Gitlab::Regex.name_regex_message }
validates :description, length: { within: 0..255 }
validates :path, uniqueness: { case_sensitive: false }, presence: true, length: { within: 1..255 },
exclusion: { in: Gitlab::Blacklist.path },
format: { with: Gitlab::Regex.path_regex,
- message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" }
+ message: Gitlab::Regex.path_regex_message }
delegate :name, to: :owner, allow_nil: true, prefix: true
diff --git a/app/models/note.rb b/app/models/note.rb
index 659cd752071..ed4829b2b39 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -25,8 +25,6 @@ class Note < ActiveRecord::Base
default_value_for :system, false
- attr_accessible :note, :noteable, :noteable_id, :noteable_type, :project_id,
- :attachment, :line_code, :commit_id
attr_mentionable :note
belongs_to :project
@@ -57,18 +55,19 @@ class Note < ActiveRecord::Base
serialize :st_diff
before_create :set_diff, if: ->(n) { n.line_code.present? }
+ after_update :set_references
class << self
def create_status_change_note(noteable, project, author, status, source)
body = "_Status changed to #{status}#{' by ' + source.gfm_reference if source}_"
- create({
+ create(
noteable: noteable,
project: project,
author: author,
note: body,
system: true
- }, without_protection: true)
+ )
end
# +noteable+ was referenced from +mentioner+, by including GFM in either +mentioner+'s description or an associated Note.
@@ -87,7 +86,7 @@ class Note < ActiveRecord::Base
note_options.merge!(noteable: noteable)
end
- create(note_options, without_protection: true)
+ create(note_options)
end
def create_milestone_change_note(noteable, project, author, milestone)
@@ -97,13 +96,13 @@ class Note < ActiveRecord::Base
"_Milestone changed to #{milestone.title}_"
end
- create({
+ create(
noteable: noteable,
project: project,
author: author,
note: body,
system: true
- }, without_protection: true)
+ )
end
def create_assignee_change_note(noteable, project, author, assignee)
@@ -115,7 +114,7 @@ class Note < ActiveRecord::Base
author: author,
note: body,
system: true
- }, without_protection: true)
+ })
end
def discussions_from_notes(notes)
@@ -178,10 +177,28 @@ class Note < ActiveRecord::Base
@diff ||= Gitlab::Git::Diff.new(st_diff) if st_diff.respond_to?(:map)
end
+ # Check if such line of code exists in merge request diff
+ # If exists - its active discussion
+ # If not - its outdated diff
def active?
- # TODO: determine if discussion is outdated
- # according to recent MR diff or not
- true
+ return true unless self.diff
+
+ noteable.diffs.each do |mr_diff|
+ next unless mr_diff.new_path == self.diff.new_path
+
+ Gitlab::DiffParser.new(mr_diff.diff.lines.to_a, mr_diff.new_path).
+ each do |full_line, type, line_code, line_new, line_old|
+ if full_line == diff_line
+ return true
+ end
+ end
+ end
+
+ false
+ end
+
+ def outdated?
+ !active?
end
def diff_file_index
@@ -314,4 +331,8 @@ class Note < ActiveRecord::Base
order('id DESC').limit(100).
update_all(updated_at: Time.now)
end
+
+ def set_references
+ notice_added_references(project, author)
+ end
end
diff --git a/app/models/project.rb b/app/models/project.rb
index 762b540b7a3..339143196a7 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -27,23 +27,20 @@
class Project < ActiveRecord::Base
include Gitlab::ShellAdapter
include Gitlab::VisibilityLevel
+ include Gitlab::ConfigHelper
+ extend Gitlab::ConfigHelper
extend Enumerize
default_value_for :archived, false
- default_value_for :issues_enabled, true
- default_value_for :merge_requests_enabled, true
- default_value_for :wiki_enabled, true
+ default_value_for :visibility_level, gitlab_config_features.visibility_level
+ default_value_for :issues_enabled, gitlab_config_features.issues
+ default_value_for :merge_requests_enabled, gitlab_config_features.merge_requests
+ default_value_for :wiki_enabled, gitlab_config_features.wiki
default_value_for :wall_enabled, false
- default_value_for :snippets_enabled, true
+ default_value_for :snippets_enabled, gitlab_config_features.snippets
ActsAsTaggableOn.strict_case_match = true
- attr_accessible :name, :path, :description, :issues_tracker, :label_list,
- :issues_enabled, :merge_requests_enabled, :snippets_enabled, :issues_tracker_id,
- :wiki_enabled, :visibility_level, :import_url, :last_activity_at, as: [:default, :admin]
-
- attr_accessible :namespace_id, :creator_id, as: :admin
-
acts_as_taggable_on :labels, :issues_default_labels
attr_accessor :new_default_branch
@@ -93,13 +90,16 @@ class Project < ActiveRecord::Base
validates :description, length: { maximum: 2000 }, allow_blank: true
validates :name, presence: true, length: { within: 0..255 },
format: { with: Gitlab::Regex.project_name_regex,
- message: "only letters, digits, spaces & '_' '-' '.' allowed. Letter or digit should be first" }
+ message: Gitlab::Regex.project_regex_message }
validates :path, presence: true, length: { within: 0..255 },
exclusion: { in: Gitlab::Blacklist.path },
format: { with: Gitlab::Regex.path_regex,
- message: "only letters, digits & '_' '-' '.' allowed. Letter or digit should be first" }
+ message: Gitlab::Regex.path_regex_message }
validates :issues_enabled, :merge_requests_enabled,
:wiki_enabled, inclusion: { in: [true, false] }
+ validates :visibility_level,
+ exclusion: { in: gitlab_config.restricted_visibility_levels },
+ if: -> { gitlab_config.restricted_visibility_levels.any? }
validates :issues_tracker_id, length: { maximum: 255 }, allow_blank: true
validates :namespace, presence: true
validates_uniqueness_of :name, scope: :namespace_id
@@ -243,7 +243,7 @@ class Project < ActiveRecord::Base
end
def check_limit
- unless creator.can_create_project?
+ unless creator.can_create_project? or namespace.kind == 'group'
errors[:limit_reached] << ("Your project limit is #{creator.projects_limit} projects! Please contact your administrator to increase it")
end
rescue
@@ -255,7 +255,7 @@ class Project < ActiveRecord::Base
end
def web_url
- [Gitlab.config.gitlab.url, path_with_namespace].join("/")
+ [gitlab_config.url, path_with_namespace].join("/")
end
def web_url_without_protocol
@@ -391,7 +391,11 @@ class Project < ActiveRecord::Base
services.each do |service|
# Call service hook only if it is active
- service.execute(data) if service.active
+ begin
+ service.execute(data) if service.active
+ rescue => e
+ logger.error(e)
+ end
end
end
@@ -476,7 +480,7 @@ class Project < ActiveRecord::Base
end
def http_url_to_repo
- [Gitlab.config.gitlab.url, "/", path_with_namespace, ".git"].join('')
+ [gitlab_config.url, "/", path_with_namespace, ".git"].join('')
end
# Check if current branch name is marked as protected in the system
diff --git a/app/models/project_hook.rb b/app/models/project_hook.rb
index 6db6767a88d..21867a9316c 100644
--- a/app/models/project_hook.rb
+++ b/app/models/project_hook.rb
@@ -18,8 +18,6 @@
class ProjectHook < WebHook
belongs_to :project
- attr_accessible :push_events, :issues_events, :merge_requests_events, :tag_push_events
-
scope :push_hooks, -> { where(push_events: true) }
scope :tag_push_hooks, -> { where(tag_push_events: true) }
scope :issue_hooks, -> { where(issues_events: true) }
diff --git a/app/models/project_services/assembla_service.rb b/app/models/project_services/assembla_service.rb
index 06e9d6118d2..9a8cbb32ac1 100644
--- a/app/models/project_services/assembla_service.rb
+++ b/app/models/project_services/assembla_service.rb
@@ -18,8 +18,6 @@
#
class AssemblaService < Service
- attr_accessible :subdomain
-
include HTTParty
validates :token, presence: true, if: :activated?
diff --git a/app/models/project_services/campfire_service.rb b/app/models/project_services/campfire_service.rb
index 19030ecffa2..83e1bac1ef2 100644
--- a/app/models/project_services/campfire_service.rb
+++ b/app/models/project_services/campfire_service.rb
@@ -18,8 +18,6 @@
#
class CampfireService < Service
- attr_accessible :subdomain, :room
-
validates :token, presence: true, if: :activated?
def title
diff --git a/app/models/project_services/emails_on_push_service.rb b/app/models/project_services/emails_on_push_service.rb
index 04775c4f2b2..be5bab4ec32 100644
--- a/app/models/project_services/emails_on_push_service.rb
+++ b/app/models/project_services/emails_on_push_service.rb
@@ -18,8 +18,6 @@
#
class EmailsOnPushService < Service
- attr_accessible :recipients
-
validates :recipients, presence: true, if: :activated?
def title
diff --git a/app/models/project_services/gitlab_ci_service.rb b/app/models/project_services/gitlab_ci_service.rb
index ef395e0ec68..58ddce45288 100644
--- a/app/models/project_services/gitlab_ci_service.rb
+++ b/app/models/project_services/gitlab_ci_service.rb
@@ -18,8 +18,6 @@
#
class GitlabCiService < CiService
- attr_accessible :project_url
-
validates :project_url, presence: true, if: :activated?
validates :token, presence: true, if: :activated?
diff --git a/app/models/project_services/hipchat_service.rb b/app/models/project_services/hipchat_service.rb
index d62f61856d1..9c6fe7dab21 100644
--- a/app/models/project_services/hipchat_service.rb
+++ b/app/models/project_services/hipchat_service.rb
@@ -18,8 +18,6 @@
#
class HipchatService < Service
- attr_accessible :room
-
validates :token, presence: true, if: :activated?
def title
diff --git a/app/models/project_services/slack_service.rb b/app/models/project_services/slack_service.rb
index 50fd62def1d..7e54188abf7 100644
--- a/app/models/project_services/slack_service.rb
+++ b/app/models/project_services/slack_service.rb
@@ -18,9 +18,6 @@
#
class SlackService < Service
- attr_accessible :room
- attr_accessible :subdomain
-
validates :room, presence: true, if: :activated?
validates :subdomain, presence: true, if: :activated?
validates :token, presence: true, if: :activated?
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb
index d2b2b1218d1..1b06dd77523 100644
--- a/app/models/protected_branch.rb
+++ b/app/models/protected_branch.rb
@@ -12,8 +12,6 @@
class ProtectedBranch < ActiveRecord::Base
include Gitlab::ShellAdapter
- attr_accessible :name
-
belongs_to :project
validates :name, presence: true
validates :project, presence: true
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 00a1032b6c4..2ff70c248dc 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -128,12 +128,13 @@ class Repository
Rails.cache.delete(cache_key(:commit_count))
Rails.cache.delete(cache_key(:graph_log))
Rails.cache.delete(cache_key(:readme))
+ Rails.cache.delete(cache_key(:version))
Rails.cache.delete(cache_key(:contribution_guide))
end
def graph_log
Rails.cache.fetch(cache_key(:graph_log)) do
- stats = Gitlab::Git::GitStats.new(raw, root_ref)
+ stats = Gitlab::Git::GitStats.new(raw, root_ref, Gitlab.config.git.timeout)
stats.parsed_log
end
end
@@ -156,12 +157,24 @@ class Repository
Gitlab::Git::Blob.find(self, sha, path)
end
+ def blob_by_oid(oid)
+ Gitlab::Git::Blob.raw(self, oid)
+ end
+
def readme
Rails.cache.fetch(cache_key(:readme)) do
tree(:head).readme
end
end
+ def version
+ Rails.cache.fetch(cache_key(:version)) do
+ tree(:head).blobs.find do |file|
+ file.name.downcase == 'version'
+ end
+ end
+ end
+
def contribution_guide
Rails.cache.fetch(cache_key(:contribution_guide)) do
tree(:head).contribution_guide
@@ -229,4 +242,25 @@ class Repository
branches
end
end
+
+ def contributors
+ log = graph_log.group_by { |i| i[:author_email] }
+
+ log.map do |email, contributions|
+ contributor = Gitlab::Contributor.new
+ contributor.email = email
+
+ contributions.each do |contribution|
+ if contributor.name.blank?
+ contributor.name = contribution[:author_name]
+ end
+
+ contributor.commits += 1
+ contributor.additions += contribution[:additions] || 0
+ contributor.deletions += contribution[:deletions] || 0
+ end
+
+ contributor
+ end
+ end
end
diff --git a/app/models/service.rb b/app/models/service.rb
index d655937079d..0dc6d514b46 100644
--- a/app/models/service.rb
+++ b/app/models/service.rb
@@ -22,8 +22,6 @@
class Service < ActiveRecord::Base
default_value_for :active, false
- attr_accessible :title, :token, :type, :active, :api_key
-
belongs_to :project
has_one :service_hook
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index 9e4409daa1a..2c38e7939bd 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -18,8 +18,6 @@
class Snippet < ActiveRecord::Base
include Linguist::BlobHelper
- attr_accessible :title, :content, :file_name, :expires_at, :private
-
default_value_for :private, true
belongs_to :author, class_name: "User"
diff --git a/app/models/user.rb b/app/models/user.rb
index 2352f8c050b..350e30f1618 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -50,31 +50,25 @@ require 'carrierwave/orm/activerecord'
require 'file_size_validator'
class User < ActiveRecord::Base
+ include Gitlab::ConfigHelper
+ extend Gitlab::ConfigHelper
+ include TokenAuthenticatable
+
default_value_for :admin, false
- default_value_for :can_create_group, true
+ default_value_for :can_create_group, gitlab_config.default_can_create_group
default_value_for :can_create_team, false
default_value_for :hide_no_ssh_key, false
+ default_value_for :projects_limit, gitlab_config.default_projects_limit
+ default_value_for :theme_id, gitlab_config.default_theme
- devise :database_authenticatable, :token_authenticatable, :lockable, :async,
+ devise :database_authenticatable, :lockable, :async,
:recoverable, :rememberable, :trackable, :validatable, :omniauthable, :confirmable, :registerable
- attr_accessible :email, :password, :password_confirmation, :remember_me, :bio, :name, :username,
- :skype, :linkedin, :twitter, :website_url, :color_scheme_id, :theme_id, :force_random_password,
- :extern_uid, :provider, :password_expires_at, :avatar, :hide_no_ssh_key,
- as: [:default, :admin]
-
- attr_accessible :projects_limit, :can_create_group,
- as: :admin
-
attr_accessor :force_random_password
# Virtual attribute for authenticating by either username or email
attr_accessor :login
- # Add login to attr_accessible
- attr_accessible :login
-
-
#
# Relations
#
@@ -120,7 +114,7 @@ class User < ActiveRecord::Base
validates :username, presence: true, uniqueness: { case_sensitive: false },
exclusion: { in: Gitlab::Blacklist.path },
format: { with: Gitlab::Regex.username_regex,
- message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" }
+ message: Gitlab::Regex.username_regex_message }
validates :notification_level, inclusion: { in: Notification.notification_levels }, presence: true
validate :namespace_uniq, if: ->(user) { user.username_changed? }
@@ -132,6 +126,10 @@ class User < ActiveRecord::Base
before_validation :sanitize_attrs
before_save :ensure_authentication_token
+ after_save :ensure_namespace_correct
+ after_create :post_create_hook
+ after_destroy :post_destroy_hook
+
alias_attribute :private_token, :authentication_token
@@ -219,20 +217,8 @@ class User < ActiveRecord::Base
where('users.username = ? OR users.id = ?', name_or_id.to_s, name_or_id.to_i).first
end
- def build_user(attrs = {}, options= {})
- if options[:as] == :admin
- User.new(defaults.merge(attrs.symbolize_keys), options)
- else
- User.new(attrs, options).with_defaults
- end
- end
-
- def defaults
- {
- projects_limit: Gitlab.config.gitlab.default_projects_limit,
- can_create_group: Gitlab.config.gitlab.default_can_create_group,
- theme_id: Gitlab.config.gitlab.default_theme
- }
+ def build_user(attrs = {})
+ User.new(attrs)
end
end
@@ -254,6 +240,15 @@ class User < ActiveRecord::Base
end
end
+ def generate_reset_token
+ @reset_token, enc = Devise.token_generator.generate(self.class, :reset_password_token)
+
+ self.reset_password_token = enc
+ self.reset_password_sent_at = Time.now.utc
+
+ @reset_token
+ end
+
def namespace_uniq
namespace_name = self.username
if Namespace.find_by(path: namespace_name)
@@ -310,7 +305,7 @@ class User < ActiveRecord::Base
end
def can_change_username?
- Gitlab.config.gitlab.username_changing_enabled
+ gitlab_config.username_changing_enabled
end
def can_create_project?
@@ -368,7 +363,7 @@ class User < ActiveRecord::Base
end
def several_namespaces?
- owned_groups.any?
+ owned_groups.any? || masters_groups.any?
end
def namespace_id
@@ -485,9 +480,41 @@ class User < ActiveRecord::Base
def avatar_url(size = nil)
if avatar.present?
- URI::join(Gitlab.config.gitlab.url, avatar.url).to_s
+ [gitlab_config.url, avatar.url].join("/")
else
GravatarService.new.execute(email, size)
end
end
+
+ def ensure_namespace_correct
+ # Ensure user has namespace
+ self.create_namespace!(path: self.username, name: self.username) unless self.namespace
+
+ if self.username_changed?
+ self.namespace.update_attributes(path: self.username, name: self.username)
+ end
+ end
+
+ def post_create_hook
+ log_info("User \"#{self.name}\" (#{self.email}) was created")
+ notification_service.new_user(self, @reset_token)
+ system_hook_service.execute_hooks_for(self, :create)
+ end
+
+ def post_destroy_hook
+ log_info("User \"#{self.name}\" (#{self.email}) was removed")
+ system_hook_service.execute_hooks_for(self, :destroy)
+ end
+
+ def notification_service
+ NotificationService.new
+ end
+
+ def log_info message
+ Gitlab::AppLogger.info message
+ end
+
+ def system_hook_service
+ SystemHooksService.new
+ end
end
diff --git a/app/models/users_group.rb b/app/models/users_group.rb
index 5f8b832d51e..270f968ef61 100644
--- a/app/models/users_group.rb
+++ b/app/models/users_group.rb
@@ -19,8 +19,6 @@ class UsersGroup < ActiveRecord::Base
Gitlab::Access.options_with_owner
end
- attr_accessible :group_access, :user_id
-
belongs_to :user
belongs_to :group
@@ -33,6 +31,9 @@ class UsersGroup < ActiveRecord::Base
scope :with_group, ->(group) { where(group_id: group.id) }
scope :with_user, ->(user) { where(user_id: user.id) }
+ after_create :notify_create
+ after_update :notify_update
+
validates :group_access, inclusion: { in: UsersGroup.group_access_roles.values }, presence: true
validates :user_id, presence: true
validates :group_id, presence: true
@@ -43,4 +44,18 @@ class UsersGroup < ActiveRecord::Base
def access_field
group_access
end
+
+ def notify_create
+ notification_service.new_group_member(self)
+ end
+
+ def notify_update
+ if group_access_changed?
+ notification_service.update_group_member(self)
+ end
+ end
+
+ def notification_service
+ NotificationService.new
+ end
end
diff --git a/app/models/users_project.rb b/app/models/users_project.rb
index e8810f56def..60bdf7a3cfb 100644
--- a/app/models/users_project.rb
+++ b/app/models/users_project.rb
@@ -16,8 +16,6 @@ class UsersProject < ActiveRecord::Base
include Notifiable
include Gitlab::Access
- attr_accessible :user, :user_id, :project_access
-
belongs_to :user
belongs_to :project
@@ -37,6 +35,10 @@ class UsersProject < ActiveRecord::Base
scope :in_projects, ->(projects) { where(project_id: projects.map { |p| p.id }) }
scope :with_user, ->(user) { where(user_id: user.id) }
+ after_create :post_create_hook
+ after_update :post_update_hook
+ after_destroy :post_destroy_hook
+
class << self
# Add users to project teams with passed access option
@@ -114,4 +116,37 @@ class UsersProject < ActiveRecord::Base
def owner?
project.owner == user
end
+
+ def post_create_hook
+ Event.create(
+ project_id: self.project.id,
+ action: Event::JOINED,
+ author_id: self.user.id
+ )
+
+ notification_service.new_team_member(self) unless owner?
+ system_hook_service.execute_hooks_for(self, :create)
+ end
+
+ def post_update_hook
+ notification_service.update_team_member(self) if self.project_access_changed?
+ end
+
+ def post_destroy_hook
+ Event.create(
+ project_id: self.project.id,
+ action: Event::LEFT,
+ author_id: self.user.id
+ )
+
+ system_hook_service.execute_hooks_for(self, :destroy)
+ end
+
+ def notification_service
+ NotificationService.new
+ end
+
+ def system_hook_service
+ SystemHooksService.new
+ end
end
diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb
index 76854da5c38..6cf0c1f683e 100644
--- a/app/models/web_hook.rb
+++ b/app/models/web_hook.rb
@@ -22,8 +22,6 @@ class WebHook < ActiveRecord::Base
default_value_for :issues_events, false
default_value_for :merge_requests_events, false
- attr_accessible :url
-
# HTTParty timeout
default_timeout 10
diff --git a/app/observers/base_observer.rb b/app/observers/base_observer.rb
deleted file mode 100644
index 260d1f05db3..00000000000
--- a/app/observers/base_observer.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class BaseObserver < ActiveRecord::Observer
- def notification
- NotificationService.new
- end
-
- def event_service
- EventCreateService.new
- end
-
- def log_info message
- Gitlab::AppLogger.info message
- end
-end
diff --git a/app/observers/note_observer.rb b/app/observers/note_observer.rb
deleted file mode 100644
index bb0b0876eca..00000000000
--- a/app/observers/note_observer.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-class NoteObserver < BaseObserver
- def after_create(note)
- notification.new_note(note)
-
- # Skip system notes, like status changes and cross-references.
- unless note.system
- event_service.leave_note(note, note.author)
-
- # Create a cross-reference note if this Note contains GFM that names an
- # issue, merge request, or commit.
- note.references.each do |mentioned|
- Note.create_cross_reference_note(mentioned, note.noteable, note.author, note.project)
- end
- end
- end
-
- def after_update(note)
- note.notice_added_references(note.project, note.author)
- end
-end
diff --git a/app/observers/project_activity_cache_observer.rb b/app/observers/project_activity_cache_observer.rb
deleted file mode 100644
index 96ced90db80..00000000000
--- a/app/observers/project_activity_cache_observer.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-class ProjectActivityCacheObserver < BaseObserver
- observe :event
-
- def after_create(event)
- event.project.update_column(:last_activity_at, event.created_at) if event.project
- end
-end
-
diff --git a/app/observers/project_observer.rb b/app/observers/project_observer.rb
deleted file mode 100644
index ad41ddad58f..00000000000
--- a/app/observers/project_observer.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-class ProjectObserver < BaseObserver
- def after_create(project)
- log_info("#{project.owner.name} created a new project \"#{project.name_with_namespace}\"")
- end
-
- def after_update(project)
- project.send_move_instructions if project.namespace_id_changed?
- project.rename_repo if project.path_changed?
- end
-
- def before_destroy(project)
- project.repository.expire_cache unless project.empty_repo?
- end
-
- def after_destroy(project)
- GitlabShellWorker.perform_async(
- :remove_repository,
- project.path_with_namespace
- )
-
- GitlabShellWorker.perform_async(
- :remove_repository,
- project.path_with_namespace + ".wiki"
- )
-
- project.satellite.destroy
-
- log_info("Project \"#{project.name}\" was removed")
- end
-end
diff --git a/app/observers/system_hook_observer.rb b/app/observers/system_hook_observer.rb
deleted file mode 100644
index 80de177b9a2..00000000000
--- a/app/observers/system_hook_observer.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-class SystemHookObserver < BaseObserver
- observe :user, :project, :users_project
-
- def after_create(model)
- system_hook_service.execute_hooks_for(model, :create)
- end
-
- def after_destroy(model)
- system_hook_service.execute_hooks_for(model, :destroy)
- end
-
- private
-
- def system_hook_service
- SystemHooksService.new
- end
-end
diff --git a/app/observers/user_observer.rb b/app/observers/user_observer.rb
deleted file mode 100644
index fba0f1006d9..00000000000
--- a/app/observers/user_observer.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-class UserObserver < BaseObserver
- def after_create(user)
- log_info("User \"#{user.name}\" (#{user.email}) was created")
-
- notification.new_user(user)
- end
-
- def after_destroy user
- log_info("User \"#{user.name}\" (#{user.email}) was removed")
- end
-
- def after_save user
- # Ensure user has namespace
- user.create_namespace!(path: user.username, name: user.username) unless user.namespace
-
- if user.username_changed?
- user.namespace.update_attributes(path: user.username, name: user.username)
- end
- end
-end
diff --git a/app/observers/users_group_observer.rb b/app/observers/users_group_observer.rb
deleted file mode 100644
index 42a05b5e177..00000000000
--- a/app/observers/users_group_observer.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class UsersGroupObserver < BaseObserver
- def after_create(membership)
- notification.new_group_member(membership)
- end
-
- def after_update(membership)
- notification.update_group_member(membership) if membership.group_access_changed?
- end
-end
diff --git a/app/observers/users_project_observer.rb b/app/observers/users_project_observer.rb
deleted file mode 100644
index 44c72b30187..00000000000
--- a/app/observers/users_project_observer.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-class UsersProjectObserver < BaseObserver
- def after_create(users_project)
- Event.create(
- project_id: users_project.project.id,
- action: Event::JOINED,
- author_id: users_project.user.id
- )
-
- notification.new_team_member(users_project)
- end
-
- def after_update(users_project)
- notification.update_team_member(users_project) if users_project.project_access_changed?
- end
-
- def after_destroy(users_project)
- Event.create(
- project_id: users_project.project.id,
- action: Event::LEFT,
- author_id: users_project.user.id
- )
- end
-end
diff --git a/app/services/base_service.rb b/app/services/base_service.rb
index 9ad80923152..31b38aca530 100644
--- a/app/services/base_service.rb
+++ b/app/services/base_service.rb
@@ -28,4 +28,8 @@ class BaseService
def log_info message
Gitlab::AppLogger.info message
end
+
+ def system_hook_service
+ SystemHooksService.new
+ end
end
diff --git a/app/services/files/create_service.rb b/app/services/files/create_service.rb
index 1998fb79e7d..82e4d7b684f 100644
--- a/app/services/files/create_service.rb
+++ b/app/services/files/create_service.rb
@@ -21,7 +21,10 @@ module Files
file_path = path
unless file_name =~ Gitlab::Regex.path_regex
- return error("Your changes could not be committed, because file name contains not allowed characters")
+ return error(
+ 'Your changes could not be committed, because the file name ' +
+ Gitlab::Regex.path_regex_message
+ )
end
blob = repository.blob_at_branch(ref, file_path)
diff --git a/app/services/issues/base_service.rb b/app/services/issues/base_service.rb
index eac774210ae..71b9ffc3489 100644
--- a/app/services/issues/base_service.rb
+++ b/app/services/issues/base_service.rb
@@ -7,8 +7,11 @@ module Issues
Note.create_assignee_change_note(issue, issue.project, current_user, issue.assignee)
end
- def execute_hooks(issue)
- issue.project.execute_hooks(issue.to_hook_data, :issue_hooks)
+ def execute_hooks(issue, action = 'open')
+ issue_data = issue.to_hook_data
+ issue_url = Gitlab::UrlBuilder.new(:issue).build(issue.id)
+ issue_data[:object_attributes].merge!(url: issue_url, action: action)
+ issue.project.execute_hooks(issue_data, :issue_hooks)
end
def create_milestone_note(issue)
diff --git a/app/services/issues/close_service.rb b/app/services/issues/close_service.rb
index 85c0226ccab..ffed13a12e1 100644
--- a/app/services/issues/close_service.rb
+++ b/app/services/issues/close_service.rb
@@ -5,7 +5,7 @@ module Issues
notification_service.close_issue(issue, current_user)
event_service.close_issue(issue, current_user)
create_note(issue, commit)
- execute_hooks(issue)
+ execute_hooks(issue, 'close')
end
issue
diff --git a/app/services/issues/create_service.rb b/app/services/issues/create_service.rb
index d6137833bb9..6d05d417f1b 100644
--- a/app/services/issues/create_service.rb
+++ b/app/services/issues/create_service.rb
@@ -8,7 +8,7 @@ module Issues
notification_service.new_issue(issue, current_user)
event_service.open_issue(issue, current_user)
issue.create_cross_references!(issue.project, current_user)
- execute_hooks(issue)
+ execute_hooks(issue, 'open')
end
issue
diff --git a/app/services/issues/reopen_service.rb b/app/services/issues/reopen_service.rb
index a931398aff6..1e5c398516d 100644
--- a/app/services/issues/reopen_service.rb
+++ b/app/services/issues/reopen_service.rb
@@ -4,7 +4,8 @@ module Issues
if issue.reopen
event_service.reopen_issue(issue, current_user)
create_note(issue)
- execute_hooks(issue)
+ notification_service.reopen_issue(issue, current_user)
+ execute_hooks(issue, 'reopen')
end
issue
diff --git a/app/services/issues/update_service.rb b/app/services/issues/update_service.rb
index b4a742b0037..a0e57144435 100644
--- a/app/services/issues/update_service.rb
+++ b/app/services/issues/update_service.rb
@@ -1,7 +1,7 @@
module Issues
class UpdateService < Issues::BaseService
def execute(issue)
- state = params.delete('state_event') || params.delete(:state_event)
+ state = params[:state_event]
case state
when 'reopen'
@@ -10,7 +10,7 @@ module Issues
Issues::CloseService.new(project, current_user, {}).execute(issue)
end
- if params.present? && issue.update_attributes(params)
+ if params.present? && issue.update_attributes(params.except(:state_event))
issue.reset_events_cache
if issue.previous_changes.include?('milestone_id')
@@ -23,7 +23,7 @@ module Issues
end
issue.notice_added_references(issue.project, current_user)
- execute_hooks(issue)
+ execute_hooks(issue, 'update')
end
issue
diff --git a/app/services/merge_requests/auto_merge_service.rb b/app/services/merge_requests/auto_merge_service.rb
index e35c03275f2..20b88d1510c 100644
--- a/app/services/merge_requests/auto_merge_service.rb
+++ b/app/services/merge_requests/auto_merge_service.rb
@@ -6,7 +6,7 @@ module MergeRequests
# Called when you do merge via GitLab UI
class AutoMergeService < BaseMergeService
def execute(merge_request, current_user, commit_message)
- merge_request.lock
+ merge_request.lock_mr
if Gitlab::Satellite::MergeAction.new(current_user, merge_request).merge!(commit_message)
merge_request.merge
@@ -17,11 +17,11 @@ module MergeRequests
true
else
- merge_request.unlock
+ merge_request.unlock_mr
false
end
rescue
- merge_request.unlock if merge_request.locked?
+ merge_request.unlock_mr if merge_request.locked?
merge_request.mark_as_unmergeable
false
end
diff --git a/app/services/merge_requests/build_service.rb b/app/services/merge_requests/build_service.rb
new file mode 100644
index 00000000000..466ed1c1760
--- /dev/null
+++ b/app/services/merge_requests/build_service.rb
@@ -0,0 +1,70 @@
+module MergeRequests
+ class BuildService < MergeRequests::BaseService
+ def execute
+ merge_request = MergeRequest.new(params)
+
+ # Set MR attributes
+ merge_request.can_be_created = false
+ merge_request.compare_failed = false
+ merge_request.compare_commits = []
+ merge_request.compare_diffs = []
+ merge_request.source_project = project unless merge_request.source_project
+ merge_request.target_project ||= (project.forked_from_project || project)
+ merge_request.target_branch ||= merge_request.target_project.default_branch
+
+ unless merge_request.target_branch && merge_request.source_branch
+ return build_failed(merge_request, "You must select source and target branches")
+ end
+
+ # Generate suggested MR title based on source branch name
+ merge_request.title = merge_request.source_branch.titleize.humanize
+
+ # Try to compare branches to get commits list and diffs
+ compare_action = Gitlab::Satellite::CompareAction.new(
+ current_user,
+ merge_request.target_project,
+ merge_request.target_branch,
+ merge_request.source_project,
+ merge_request.source_branch
+ )
+
+ commits = compare_action.commits
+
+ # At this point we decide if merge request can be created
+ # If we have at least one commit to merge -> creation allowed
+ if commits.present?
+ merge_request.compare_commits = Commit.decorate(commits)
+ merge_request.compare_base_commit = Commit.new(commits.first)
+ merge_request.can_be_created = true
+ merge_request.compare_failed = false
+
+ # Try to collect diff for merge request.
+ diffs = compare_action.diffs
+
+ if diffs.present?
+ merge_request.compare_diffs = diffs
+
+ elsif diffs == false
+ # satellite timeout return false
+ merge_request.can_be_created = false
+ merge_request.compare_failed = true
+ end
+ else
+ merge_request.can_be_created = false
+ merge_request.compare_failed = false
+ end
+
+ merge_request
+
+ rescue Gitlab::Satellite::BranchesWithoutParent
+ return build_failed(merge_request, "Selected branches have no common commit so they cannot be merged.")
+ end
+
+ def build_failed(merge_request, message)
+ merge_request.errors.add(:base, message)
+ merge_request.compare_commits = []
+ merge_request.can_be_created = false
+ merge_request
+ end
+ end
+end
diff --git a/app/services/merge_requests/reopen_service.rb b/app/services/merge_requests/reopen_service.rb
index 2eb13d3e0e1..bd68919a550 100644
--- a/app/services/merge_requests/reopen_service.rb
+++ b/app/services/merge_requests/reopen_service.rb
@@ -3,6 +3,7 @@ module MergeRequests
def execute(merge_request)
if merge_request.reopen
event_service.reopen_mr(merge_request, current_user)
+ notification_service.reopen_mr(merge_request, current_user)
create_note(merge_request)
execute_hooks(merge_request)
merge_request.reload_code
diff --git a/app/services/merge_requests/update_service.rb b/app/services/merge_requests/update_service.rb
index f1aa8b73930..6e416a0080c 100644
--- a/app/services/merge_requests/update_service.rb
+++ b/app/services/merge_requests/update_service.rb
@@ -7,10 +7,10 @@ module MergeRequests
def execute(merge_request)
# We dont allow change of source/target projects
# after merge request was created
- params.delete(:source_project_id)
- params.delete(:target_project_id)
+ params.except!(:source_project_id)
+ params.except!(:target_project_id)
- state = params.delete('state_event') || params.delete(:state_event)
+ state = params[:state_event]
case state
when 'reopen'
@@ -19,7 +19,7 @@ module MergeRequests
MergeRequests::CloseService.new(project, current_user, {}).execute(merge_request)
end
- if params.present? && merge_request.update_attributes(params)
+ if params.present? && merge_request.update_attributes(params.except(:state_event))
merge_request.reset_events_cache
if merge_request.previous_changes.include?('milestone_id')
diff --git a/app/services/milestones/group_service.rb b/app/services/milestones/group_service.rb
new file mode 100644
index 00000000000..11d702f1e7b
--- /dev/null
+++ b/app/services/milestones/group_service.rb
@@ -0,0 +1,26 @@
+module Milestones
+ class GroupService < Milestones::BaseService
+ def initialize(project_milestones)
+ @project_milestones = project_milestones.group_by(&:title)
+ end
+
+ def execute
+ build(@project_milestones)
+ end
+
+ def milestone(title)
+ if title
+ group_milestone = @project_milestones[title].group_by(&:title)
+ build(group_milestone).first
+ else
+ nil
+ end
+ end
+
+ private
+
+ def build(milestone)
+ milestone.map{ |title, milestones| GroupMilestone.new(title, milestones) }
+ end
+ end
+end
diff --git a/app/services/milestones/update_service.rb b/app/services/milestones/update_service.rb
index 307e96a2b36..ed64847f429 100644
--- a/app/services/milestones/update_service.rb
+++ b/app/services/milestones/update_service.rb
@@ -1,7 +1,7 @@
module Milestones
class UpdateService < Milestones::BaseService
def execute(milestone)
- state = params.delete('state_event') || params.delete(:state_event)
+ state = params[:state_event]
case state
when 'activate'
@@ -11,7 +11,7 @@ module Milestones
end
if params.present?
- milestone.update_attributes(params)
+ milestone.update_attributes(params.except(:state_event))
end
milestone
diff --git a/app/services/notes/create_service.rb b/app/services/notes/create_service.rb
index ff6dfb61139..f64006a4edc 100644
--- a/app/services/notes/create_service.rb
+++ b/app/services/notes/create_service.rb
@@ -1,10 +1,25 @@
module Notes
class CreateService < BaseService
def execute
- note = project.notes.new(params[:note])
+ note = project.notes.new(params)
note.author = current_user
note.system = false
- note.save
+
+ if note.save
+ notification_service.new_note(note)
+
+ # Skip system notes, like status changes and cross-references.
+ unless note.system
+ event_service.leave_note(note, note.author)
+
+ # Create a cross-reference note if this Note contains GFM that names an
+ # issue, merge request, or commit.
+ note.references.each do |mentioned|
+ Note.create_cross_reference_note(mentioned, note.noteable, note.author, note.project)
+ end
+ end
+ end
+
note
end
end
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 650b6008db8..36d33e0d7ca 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -80,6 +80,10 @@ class NotificationService
close_resource_email(merge_request, merge_request.target_project, current_user, 'closed_merge_request_email')
end
+ def reopen_issue(issue, current_user)
+ reopen_resource_email(issue, issue.project, current_user, 'issue_status_changed_email', 'reopened')
+ end
+
# When we merge a merge request we should send next emails:
#
# * merge_request author if their notification level is not Disabled
@@ -89,16 +93,21 @@ class NotificationService
def merge_mr(merge_request, current_user)
recipients = reject_muted_users([merge_request.author, merge_request.assignee], merge_request.target_project)
recipients = recipients.concat(project_watchers(merge_request.target_project)).uniq
+ recipients.delete(current_user)
recipients.each do |recipient|
mailer.merged_merge_request_email(recipient.id, merge_request.id, current_user.id)
end
end
+ def reopen_mr(merge_request, current_user)
+ reopen_resource_email(merge_request, merge_request.target_project, current_user, 'merge_request_status_email', 'reopened')
+ end
+
# Notify new user with email after creation
- def new_user(user)
+ def new_user(user, token = nil)
# Don't email omniauth created users
- mailer.new_user_email(user.id, user.password) unless user.extern_uid?
+ mailer.new_user_email(user.id, user.password, token) unless user.extern_uid?
end
# Notify users on new note in system
@@ -301,7 +310,9 @@ class NotificationService
end
def reassign_resource_email(target, project, current_user, method)
- recipients = User.where(id: [target.assignee_id, target.assignee_id_was])
+ assignee_id_was = previous_record(target, "assignee_id")
+
+ recipients = User.where(id: [target.assignee_id, assignee_id_was])
# Add watchers to email list
recipients = recipients.concat(project_watchers(project))
@@ -313,11 +324,29 @@ class NotificationService
recipients.delete(current_user)
recipients.each do |recipient|
- mailer.send(method, recipient.id, target.id, target.assignee_id_was, current_user.id)
+ mailer.send(method, recipient.id, target.id, assignee_id_was, current_user.id)
+ end
+ end
+
+ def reopen_resource_email(target, project, current_user, method, status)
+ recipients = reject_muted_users([target.author, target.assignee], project)
+ recipients = recipients.concat(project_watchers(project)).uniq
+ recipients.delete(current_user)
+
+ recipients.each do |recipient|
+ mailer.send(method, recipient.id, target.id, status, current_user.id)
end
end
def mailer
Notify.delay
end
+
+ def previous_record(object, attribute)
+ if object && attribute
+ if object.previous_changes.include?(attribute)
+ object.previous_changes[attribute].first
+ end
+ end
+ end
end
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb
index 3d2b9bf4875..3565e4e4f70 100644
--- a/app/services/projects/create_service.rb
+++ b/app/services/projects/create_service.rb
@@ -5,27 +5,13 @@ module Projects
end
def execute
- # get namespace id
- namespace_id = params.delete(:namespace_id)
+ @project = Project.new(params)
- # check that user is allowed to set specified visibility_level
+ # Reset visibility levet if is not allowed to set it
unless Gitlab::VisibilityLevel.allowed_for?(current_user, params[:visibility_level])
- params.delete(:visibility_level)
+ @project.visibility_level = default_features.visibility_level
end
- # Load default feature settings
- default_features = Gitlab.config.gitlab.default_projects_features
-
- default_opts = {
- issues_enabled: default_features.issues,
- wiki_enabled: default_features.wiki,
- snippets_enabled: default_features.snippets,
- merge_requests_enabled: default_features.merge_requests,
- visibility_level: default_features.visibility_level
- }.stringify_keys
-
- @project = Project.new(default_opts.merge(params))
-
# Parametrize path for project
#
# Ex.
@@ -33,13 +19,14 @@ module Projects
#
@project.path = @project.name.dup.parameterize unless @project.path.present?
+ # get namespace id
+ namespace_id = params[:namespace_id]
if namespace_id
# Find matching namespace and check if it allowed
# for current user if namespace_id passed.
- if allowed_namespace?(current_user, namespace_id)
- @project.namespace_id = namespace_id
- else
+ unless allowed_namespace?(current_user, namespace_id)
+ @project.namespace_id = nil
deny_namespace
return @project
end
@@ -51,6 +38,9 @@ module Projects
@project.creator = current_user
if @project.save
+ log_info("#{@project.owner.name} created a new project \"#{@project.name_with_namespace}\"")
+ system_hook_service.execute_hooks_for(@project, :create)
+
unless @project.group
@project.users_projects.create(
project_access: UsersProject::MASTER,
diff --git a/app/services/projects/destroy_service.rb b/app/services/projects/destroy_service.rb
new file mode 100644
index 00000000000..7e1d753b021
--- /dev/null
+++ b/app/services/projects/destroy_service.rb
@@ -0,0 +1,28 @@
+module Projects
+ class DestroyService < BaseService
+ def execute
+ return false unless can?(current_user, :remove_project, project)
+
+ project.team.truncate
+ project.repository.expire_cache unless project.empty_repo?
+
+ if project.destroy
+ GitlabShellWorker.perform_async(
+ :remove_repository,
+ project.path_with_namespace
+ )
+
+ GitlabShellWorker.perform_async(
+ :remove_repository,
+ project.path_with_namespace + ".wiki"
+ )
+
+ project.satellite.destroy
+
+ log_info("Project \"#{project.name}\" was removed")
+ system_hook_service.execute_hooks_for(project, :destroy)
+ true
+ end
+ end
+ end
+end
diff --git a/app/services/projects/participants_service.rb b/app/services/projects/participants_service.rb
new file mode 100644
index 00000000000..c4d2c0963b7
--- /dev/null
+++ b/app/services/projects/participants_service.rb
@@ -0,0 +1,43 @@
+module Projects
+ class ParticipantsService < BaseService
+ def initialize(project)
+ @project = project
+ end
+
+ def execute(note_type, note_id)
+ participating = if note_type && note_id
+ participants_in(note_type, note_id)
+ else
+ []
+ end
+ team_members = sorted(@project.team.members)
+ participants = all_members + team_members + participating
+ participants.uniq
+ end
+
+ def participants_in(type, id)
+ users = case type
+ when "Issue"
+ issue = @project.issues.find_by_iid(id)
+ issue ? issue.participants : []
+ when "MergeRequest"
+ merge_request = @project.merge_requests.find_by_iid(id)
+ merge_request ? merge_request.participants : []
+ when "Commit"
+ author_ids = Note.for_commit_id(id).pluck(:author_id).uniq
+ User.where(id: author_ids)
+ else
+ []
+ end
+ sorted(users)
+ end
+
+ def sorted(users)
+ users.uniq.to_a.compact.sort_by(&:username).map { |user| { username: user.username, name: user.name } }
+ end
+
+ def all_members
+ [{ username: "all", name: "Project and Group Members" }]
+ end
+ end
+end
diff --git a/app/services/projects/transfer_service.rb b/app/services/projects/transfer_service.rb
index d115e92a105..e39fe882cb1 100644
--- a/app/services/projects/transfer_service.rb
+++ b/app/services/projects/transfer_service.rb
@@ -12,7 +12,7 @@ module Projects
class TransferError < StandardError; end
def execute
- namespace_id = params.delete(:namespace_id)
+ namespace_id = params[:namespace_id]
namespace = Namespace.find_by(id: namespace_id)
if allowed_transfer?(current_user, project, namespace)
diff --git a/app/services/projects/update_service.rb b/app/services/projects/update_service.rb
index d9d371da5c4..36877a61679 100644
--- a/app/services/projects/update_service.rb
+++ b/app/services/projects/update_service.rb
@@ -1,19 +1,22 @@
module Projects
class UpdateService < BaseService
- def execute(role = :default)
- params[:project].delete(:namespace_id)
+ def execute
# check that user is allowed to set specified visibility_level
- unless can?(current_user, :change_visibility_level, project) && Gitlab::VisibilityLevel.allowed_for?(current_user, params[:project][:visibility_level])
- params[:project].delete(:visibility_level)
+ unless can?(current_user, :change_visibility_level, project) && Gitlab::VisibilityLevel.allowed_for?(current_user, params[:visibility_level])
+ params[:visibility_level] = project.visibility_level
end
- new_branch = params[:project].delete(:default_branch)
+ new_branch = params[:default_branch]
if project.repository.exists? && new_branch && new_branch != project.default_branch
project.change_head(new_branch)
end
- project.update_attributes(params[:project], as: role)
+ if project.update_attributes(params.except(:default_branch))
+ if project.previous_changes.include?('path')
+ project.rename_repo
+ end
+ end
end
end
end
diff --git a/app/services/search/global_service.rb b/app/services/search/global_service.rb
index 21214511182..d213e1375e0 100644
--- a/app/services/search/global_service.rb
+++ b/app/services/search/global_service.rb
@@ -28,6 +28,7 @@ module Search
projects: [],
merge_requests: [],
issues: [],
+ notes: [],
total_results: 0,
}
end
diff --git a/app/services/search/project_service.rb b/app/services/search/project_service.rb
index 3ebaafc752c..493dee95f90 100644
--- a/app/services/search/project_service.rb
+++ b/app/services/search/project_service.rb
@@ -18,8 +18,9 @@ module Search
result[:total_results] = blobs.total_count
else
result[:merge_requests] = project.merge_requests.search(query).order('updated_at DESC').limit(20)
- result[:issues] = project.issues.search(query).order('updated_at DESC').limit(20)
- result[:total_results] = %w(issues merge_requests).sum { |items| result[items.to_sym].size }
+ result[:issues] = project.issues.where("title like :query OR description like :query ", query: "%#{query}%").order('updated_at DESC').limit(20)
+ result[:notes] = Note.where(noteable_type: 'issue').where(project_id: project.id).where("note like :query", query: "%#{query}%").order('updated_at DESC').limit(20)
+ result[:total_results] = %w(issues merge_requests notes).sum { |items| result[items.to_sym].size }
end
result
@@ -30,6 +31,7 @@ module Search
merge_requests: [],
issues: [],
blobs: [],
+ notes: [],
total_results: 0,
}
end
diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml
index d00772d4dfe..e18dd9bc905 100644
--- a/app/views/admin/users/_form.html.haml
+++ b/app/views/admin/users/_form.html.haml
@@ -31,9 +31,9 @@
= f.label :password, class: 'control-label'
.col-sm-10
%strong
- A temporary password will be generated and sent to user.
+ Reset link will be generated and sent to the user.
%br
- User will be forced to change it after first sign in
+ User will be forced to set the password on first sign in.
- else
%fieldset
%legend Password
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml
index a255c64fc27..3c30ccd78b3 100644
--- a/app/views/admin/users/show.html.haml
+++ b/app/views/admin/users/show.html.haml
@@ -44,6 +44,8 @@
%li
%span.light Secondary email:
%strong= email.email
+ = link_to remove_email_admin_user_path(@user, email), data: { confirm: "Are you sure you want to remove #{email.email}?" }, method: :delete, class: "btn-tiny btn btn-remove pull-right", title: 'Remove secondary email', id: "remove_email_#{email.id}" do
+ %i.icon-remove
%li
%span.light Can create groups:
diff --git a/app/views/dashboard/_zero_authorized_projects.html.haml b/app/views/dashboard/_zero_authorized_projects.html.haml
index ee086d88e3e..ff85e32bc4e 100644
--- a/app/views/dashboard/_zero_authorized_projects.html.haml
+++ b/app/views/dashboard/_zero_authorized_projects.html.haml
@@ -46,5 +46,5 @@
%br
Public projects are an easy way to allow everyone to have read-only access.
.link_holder
- = link_to public_projects_path, class: "btn btn-new" do
+ = link_to explore_projects_path, class: "btn btn-new" do
Browse public projects »
diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml
index 9888da2f7f2..d3ff291eaa8 100644
--- a/app/views/dashboard/issues.html.haml
+++ b/app/views/dashboard/issues.html.haml
@@ -1,6 +1,5 @@
%h3.page-title
Issues
- %span.pull-right #{@issues.total_count} issues
%p.light
List all issues from all projects you have access to.
diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml
index ee3bec2849d..7a9ea9f6f90 100644
--- a/app/views/dashboard/merge_requests.html.haml
+++ b/app/views/dashboard/merge_requests.html.haml
@@ -1,6 +1,5 @@
%h3.page-title
Merge Requests
- %span.pull-right #{@merge_requests.total_count} merge requests
%p.light
diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml
index 306b71717ef..6a08b1aa640 100644
--- a/app/views/dashboard/show.html.haml
+++ b/app/views/dashboard/show.html.haml
@@ -1,8 +1,8 @@
- if @has_authorized_projects
.dashboard.row
- .activities.col-md-8
+ %section.activities.col-md-8
= render 'activities'
- .side.col-md-4.left.responsive-side
+ %aside.side.col-md-4.left.responsive-side
= render 'sidebar'
.fixed.sidebar-expand-button.hidden-lg.hidden-md
diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.html.haml
index bf634d9de60..08e17490865 100755
--- a/app/views/devise/confirmations/new.html.haml
+++ b/app/views/devise/confirmations/new.html.haml
@@ -1,15 +1,13 @@
-.login-box
- %h3.page-title Resend confirmation instructions
- = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
- .devise-errors
- = devise_error_messages!
- .clearfix.append-bottom-20
- = f.email_field :email, placeholder: 'Email', class: "form-control", required: true
- .clearfix.append-bottom-10
- = f.submit "Resend confirmation instructions", class: 'btn btn-success'
- %hr
- %p
- %span.light
- Already have login and password?
- %strong
- = link_to "Sign in", new_session_path(resource_name)
+.login-box.panel.panel-default
+ .panel-heading
+ %h3.panel-title Resend confirmation instructions
+ .panel-body
+ = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
+ .devise-errors
+ = devise_error_messages!
+ .clearfix.append-bottom-20
+ = f.email_field :email, placeholder: 'Email', class: "form-control", required: true
+ .clearfix.append-bottom-10
+ = f.submit "Resend confirmation instructions", class: 'btn btn-success'
+ .panel-footer
+ = render 'devise/shared/sign_in_link'
diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb
index 553d08369e9..cb1291cf3bf 100644
--- a/app/views/devise/mailer/confirmation_instructions.html.erb
+++ b/app/views/devise/mailer/confirmation_instructions.html.erb
@@ -6,4 +6,4 @@
<p>You can confirm your account through the link below:</p>
<% end %>
-<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @resource.confirmation_token) %></p>
+<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb
index e1144e943b4..7913e88beb6 100644
--- a/app/views/devise/mailer/reset_password_instructions.html.erb
+++ b/app/views/devise/mailer/reset_password_instructions.html.erb
@@ -2,7 +2,7 @@
<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
-<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @resource.reset_password_token) %></p>
+<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb
index 0429883f05b..8c2a4f0c2d9 100644
--- a/app/views/devise/mailer/unlock_instructions.html.erb
+++ b/app/views/devise/mailer/unlock_instructions.html.erb
@@ -4,4 +4,4 @@
<p>Click the link below to unlock your account:</p>
-<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @resource.unlock_token) %></p>
+<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml
index 95c52608e1f..efcd0296176 100644
--- a/app/views/devise/passwords/edit.html.haml
+++ b/app/views/devise/passwords/edit.html.haml
@@ -1,15 +1,18 @@
-= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "login-box" }) do |f|
- %h3 Change your password
- .devise-errors
- = devise_error_messages!
- = f.hidden_field :reset_password_token
- %div
- = f.password_field :password, class: "form-control top", placeholder: "New password", required: true
- %div
- = f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm new password", required: true
- %div
- .clearfix.append-bottom-10
- = f.submit "Change my password", class: "btn btn-primary"
- = link_to "Sign in", new_session_path(resource_name), class: "btn pull-right"
- %div
- = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
+.login-box.panel.panel-default
+ .panel-heading
+ %h3.panel-title Change your password
+ .panel-body
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
+ .devise-errors
+ = devise_error_messages!
+ = f.hidden_field :reset_password_token
+ %div
+ = f.password_field :password, class: "form-control top", placeholder: "New password", required: true
+ %div
+ = f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm new password", required: true
+ .clearfix.append-bottom-10
+ = f.submit "Change my password", class: "btn btn-primary"
+ .panel-footer
+ %p
+ = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
+ = render 'devise/shared/sign_in_link'
diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml
index 040821ca32a..bf44dee5ad7 100755
--- a/app/views/devise/passwords/new.html.haml
+++ b/app/views/devise/passwords/new.html.haml
@@ -1,14 +1,13 @@
-= form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: "login-box", method: :post }) do |f|
- %h3.page-title Reset password
- .devise-errors
- = devise_error_messages!
- .clearfix.append-bottom-20
- = f.email_field :email, placeholder: "Email", class: "form-control", required: true
- .clearfix.append-bottom-10
- = f.submit "Reset password", class: "btn-primary btn"
- %hr
- %p
- %span.light
- Already have login and password?
- %strong
- = link_to "Sign in", new_session_path(resource_name)
+.login-box.panel.panel-default
+ .panel-heading
+ %h3.panel-title Reset password
+ .panel-body
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
+ .devise-errors
+ = devise_error_messages!
+ .clearfix.append-bottom-20
+ = f.email_field :email, placeholder: "Email", class: "form-control", required: true
+ .clearfix.append-bottom-10
+ = f.submit "Reset password", class: "btn-primary btn"
+ .panel-footer
+ = render 'devise/shared/sign_in_link'
diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml
index 24bc0406544..52d484949b6 100644
--- a/app/views/devise/registrations/new.html.haml
+++ b/app/views/devise/registrations/new.html.haml
@@ -1,24 +1,27 @@
-= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "login-box" }) do |f|
- %h3.page-title Sign Up
- .devise-errors
- = devise_error_messages!
- %div
- = f.text_field :name, class: "form-control top", placeholder: "Name", required: true
- %div
- = f.text_field :username, class: "form-control middle", placeholder: "Username", required: true
- %div
- = f.email_field :email, class: "form-control middle", placeholder: "Email", required: true
- %div
- = f.password_field :password, class: "form-control middle", placeholder: "Password", required: true
- %div
- = f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm password", required: true
- %div
- = f.submit "Sign up", class: "btn-create btn"
- %hr
- %p
- %span.light
- Have an account?
- %strong
- = link_to "Sign in", new_session_path(resource_name)
- %p
- = link_to "Forgot your password?", new_password_path(resource_name)
+.login-box.panel.panel-success
+ .panel-heading
+ %h3.panel-title Sign up
+ .panel-body
+ = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
+ .devise-errors
+ = devise_error_messages!
+ %div
+ = f.text_field :name, class: "form-control top", placeholder: "Name", required: true
+ %div
+ = f.text_field :username, class: "form-control middle", placeholder: "Username", required: true
+ %div
+ = f.email_field :email, class: "form-control middle", placeholder: "Email", required: true
+ %div
+ = f.password_field :password, class: "form-control middle", placeholder: "Password", required: true
+ %div
+ = f.password_field :password_confirmation, class: "form-control bottom", placeholder: "Confirm password", required: true
+ %div
+ = f.submit "Sign up", class: "btn-create btn"
+ .panel-footer
+ %p
+ %span.light
+ Have an account?
+ %strong
+ = link_to "Sign in", new_session_path(resource_name)
+ %p
+ = link_to "Forgot your password?", new_password_path(resource_name)
diff --git a/app/views/devise/sessions/_new_base.html.haml b/app/views/devise/sessions/_new_base.html.haml
index a2f85fa3fe2..4e196044892 100644
--- a/app/views/devise/sessions/_new_base.html.haml
+++ b/app/views/devise/sessions/_new_base.html.haml
@@ -7,8 +7,6 @@
= f.check_box :remember_me
%span Remember me
%div
- = f.submit "Sign in", class: "btn-create btn"
+ = f.submit "Sign in", class: "btn-save btn"
.pull-right
= link_to "Forgot your password?", new_password_path(resource_name), class: "btn"
-
-
diff --git a/app/views/devise/sessions/_new_ldap.html.haml b/app/views/devise/sessions/_new_ldap.html.haml
index bb1d0a4001f..6c5a878e904 100644
--- a/app/views/devise/sessions/_new_ldap.html.haml
+++ b/app/views/devise/sessions/_new_ldap.html.haml
@@ -2,4 +2,4 @@
= text_field_tag :username, nil, {class: "form-control top", placeholder: "LDAP Login", autofocus: "autofocus"}
= password_field_tag :password, nil, {class: "form-control bottom", placeholder: "Password"}
%br/
- = submit_tag "LDAP Sign in", class: "btn-create btn"
+ = submit_tag "LDAP Sign in", class: "btn-save btn"
diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml
index 31221ae9c37..f53d6f09daf 100644
--- a/app/views/devise/sessions/new.html.haml
+++ b/app/views/devise/sessions/new.html.haml
@@ -1,43 +1,42 @@
-.login-box
- %h3.page-title Sign in
- - if ldap_enabled? && gitlab_config.signin_enabled
- %ul.nav.nav-tabs
- %li.active
- = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
- %li
- = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
- .tab-content
- %div#tab-ldap.tab-pane.active
- = render partial: 'devise/sessions/new_ldap'
- %div#tab-signin.tab-pane
- = render partial: 'devise/sessions/new_base'
+.login-box.panel.panel-primary
+ .panel-heading
+ %h3.panel-title Sign in
+ .panel-body
+ - if ldap_enabled? && gitlab_config.signin_enabled
+ %ul.nav.nav-tabs
+ %li.active
+ = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
+ %li
+ = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
+ .tab-content
+ %div#tab-ldap.tab-pane.active
+ = render partial: 'devise/sessions/new_ldap'
+ %div#tab-signin.tab-pane
+ = render partial: 'devise/sessions/new_base'
+
+ - elsif ldap_enabled?
+ = render partial: 'devise/sessions/new_ldap'
+ - elsif gitlab_config.signin_enabled
+ = render partial: 'devise/sessions/new_base'
+ - else
+ %div
+ No authentication methods configured.
+
+ = render 'devise/sessions/oauth_providers' if Gitlab.config.omniauth.enabled && devise_mapping.omniauthable?
+
+ .panel-footer
+ - if gitlab_config.signup_enabled
+ %p
+ %span.light
+ Don't have an account?
+ %strong
+ = link_to "Sign up", new_registration_path(resource_name)
- - elsif ldap_enabled?
- = render partial: 'devise/sessions/new_ldap'
-
- - elsif gitlab_config.signin_enabled
- = render partial: 'devise/sessions/new_base'
-
- - else
- %div
- No authentication methods configured.
-
-
- = render 'devise/sessions/oauth_providers' if Gitlab.config.omniauth.enabled && devise_mapping.omniauthable?
- %hr
-
- - if gitlab_config.signup_enabled
%p
- %span.light
- Don't have an account?
- %strong
- = link_to "Sign up", new_registration_path(resource_name)
-
- %p
- %span.light Did not receive confirmation email?
- = link_to "Send again", new_confirmation_path(resource_name)
+ %span.light Did not receive confirmation email?
+ = link_to "Send again", new_confirmation_path(resource_name)
- - if extra_config.has_key?('sign_in_text')
- %hr
- = markdown(extra_config.sign_in_text)
+ - if extra_config.has_key?('sign_in_text')
+ %hr
+ = markdown(extra_config.sign_in_text)
diff --git a/app/views/devise/shared/_sign_in_link.html.haml b/app/views/devise/shared/_sign_in_link.html.haml
new file mode 100644
index 00000000000..fafc4b82f53
--- /dev/null
+++ b/app/views/devise/shared/_sign_in_link.html.haml
@@ -0,0 +1,5 @@
+%p
+ %span.light
+ Already have login and password?
+ %strong
+ = link_to "Sign in", new_session_path(resource_name)
diff --git a/app/views/errors/access_denied.html.haml b/app/views/errors/access_denied.html.haml
index e005a7c4409..a1d8664c4ce 100644
--- a/app/views/errors/access_denied.html.haml
+++ b/app/views/errors/access_denied.html.haml
@@ -1,5 +1,5 @@
-%h1.http_status_code 403
-%h3.page-title Access Denied
+%h1 403
+%h3 Access Denied
%hr
%p You are not allowed to access this page.
%p Read more about project permissions #{link_to "here", help_page_path("permissions", "permissions"), class: "vlink"}
diff --git a/app/views/errors/encoding.html.haml b/app/views/errors/encoding.html.haml
index 7021f06dd7f..64c7451a8da 100644
--- a/app/views/errors/encoding.html.haml
+++ b/app/views/errors/encoding.html.haml
@@ -1,4 +1,4 @@
-%h1.http_status_code 500
-%h3.page-title Encoding Error
+%h1 500
+%h3 Encoding Error
%hr
%p Page can't be loaded because of an encoding error.
diff --git a/app/views/errors/git_not_found.html.haml b/app/views/errors/git_not_found.html.haml
index d8ed7773207..189e53bca55 100644
--- a/app/views/errors/git_not_found.html.haml
+++ b/app/views/errors/git_not_found.html.haml
@@ -1,5 +1,5 @@
-%h1.http_status_code 404
-%h3.page-title Git Resource Not found
+%h1 404
+%h3 Git Resource Not found
%hr
%p
Application can't get access to some branch or commit in your repository. It
diff --git a/app/views/errors/not_found.html.haml b/app/views/errors/not_found.html.haml
index 4b97ddefc72..7bf88f592cf 100644
--- a/app/views/errors/not_found.html.haml
+++ b/app/views/errors/not_found.html.haml
@@ -1,4 +1,4 @@
-%h1.http_status_code 404
-%h3.page-title The resource you were looking for doesn't exist.
+%h1 404
+%h3 The resource you were looking for doesn't exist.
%hr
%p You may have mistyped the address or the page may have moved.
diff --git a/app/views/errors/omniauth_error.html.haml b/app/views/errors/omniauth_error.html.haml
new file mode 100644
index 00000000000..f3c8221a9d9
--- /dev/null
+++ b/app/views/errors/omniauth_error.html.haml
@@ -0,0 +1,12 @@
+%h1 422
+%h3 Sign-in using #{@provider} auth failed
+%hr
+%p Sign-in failed because #{@error}.
+%p There are couple of steps you can take:
+
+%ul
+ %li Try logging in using your email
+ %li Try logging in using your username
+ %li If you have forgotten your password, try recovering it using #{ link_to "Password recovery", new_password_path(resource_name) }
+
+%p If none of the options work, try contacting the GitLab administrator.
diff --git a/app/views/events/_event_issue.atom.haml b/app/views/events/_event_issue.atom.haml
index 64dc02e3f56..56801107d05 100644
--- a/app/views/events/_event_issue.atom.haml
+++ b/app/views/events/_event_issue.atom.haml
@@ -1,2 +1,2 @@
%div{:xmlns => "http://www.w3.org/1999/xhtml"}
- %p= simple_format issue.description
+ %p= markdown issue.description
diff --git a/app/views/events/_event_merge_request.atom.haml b/app/views/events/_event_merge_request.atom.haml
new file mode 100644
index 00000000000..dea256bb7f2
--- /dev/null
+++ b/app/views/events/_event_merge_request.atom.haml
@@ -0,0 +1,2 @@
+%div{xmlns: "http://www.w3.org/1999/xhtml"}
+ %p= markdown merge_request.description
diff --git a/app/views/events/_event_note.atom.haml b/app/views/events/_event_note.atom.haml
new file mode 100644
index 00000000000..96039ad18dc
--- /dev/null
+++ b/app/views/events/_event_note.atom.haml
@@ -0,0 +1,2 @@
+%div{:xmlns => "http://www.w3.org/1999/xhtml"}
+ %p= markdown note.note
diff --git a/app/views/events/_event_push.atom.haml b/app/views/events/_event_push.atom.haml
index e44b366040f..17228c430ca 100644
--- a/app/views/events/_event_push.atom.haml
+++ b/app/views/events/_event_push.atom.haml
@@ -6,7 +6,7 @@
%i
at
= commit[:timestamp].to_time.to_s(:short)
- %blockquote= simple_format(escape_once(commit[:message]))
+ %blockquote= markdown(escape_once(commit[:message]))
- if event.commits_count > 15
%p
%i
diff --git a/app/views/explore/groups/index.html.haml b/app/views/explore/groups/index.html.haml
new file mode 100644
index 00000000000..80ddd5c1bde
--- /dev/null
+++ b/app/views/explore/groups/index.html.haml
@@ -0,0 +1,51 @@
+.clearfix
+ .pull-left
+ = form_tag explore_groups_path, method: :get, class: 'form-inline form-tiny' do |f|
+ .form-group
+ = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input input-mn-300", id: "groups_search"
+ .form-group
+ = submit_tag 'Search', class: "btn btn-primary wide"
+
+ .pull-right
+ .dropdown.inline
+ %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
+ %span.light sort:
+ - if @sort.present?
+ = @sort.humanize
+ - else
+ Name
+ %b.caret
+ %ul.dropdown-menu
+ %li
+ = link_to explore_groups_path(sort: nil) do
+ Name
+ = link_to explore_groups_path(sort: 'newest') do
+ Newest
+ = link_to explore_groups_path(sort: 'oldest') do
+ Oldest
+ = link_to explore_groups_path(sort: 'recently_updated') do
+ Recently updated
+ = link_to explore_groups_path(sort: 'last_updated') do
+ Last updated
+
+%hr
+
+%ul.bordered-list
+ - @groups.each do |group|
+ %li
+ .clearfix
+ %h4
+ = link_to group_path(id: group.path) do
+ %i.icon-group
+ = group.name
+ .clearfix
+ %p
+ = truncate group.description, length: 150
+ .clearfix
+ %p.light
+ #{pluralize(group.members.size, 'member')}, #{pluralize(group.projects.count, 'project')}
+ - unless @groups.present?
+ .nothing-here-block No public groups
+
+
+= paginate @groups, theme: "gitlab"
diff --git a/app/views/explore/projects/_project.html.haml b/app/views/explore/projects/_project.html.haml
new file mode 100644
index 00000000000..665d111bead
--- /dev/null
+++ b/app/views/explore/projects/_project.html.haml
@@ -0,0 +1,20 @@
+%li
+ %h4.project-title
+ .project-access-icon
+ = visibility_level_icon(project.visibility_level)
+ = link_to project.name_with_namespace, project
+
+ - if project.description.present?
+ %p.project-description.str-truncated
+ = project.description
+
+ .repo-info
+ - unless project.empty_repo?
+ = link_to pluralize(project.repository.round_commit_count, 'commit'), project_commits_path(project, project.default_branch)
+ &middot;
+ = link_to pluralize(project.repository.branch_names.count, 'branch'), project_branches_path(project)
+ &middot;
+ = link_to pluralize(project.repository.tag_names.count, 'tag'), project_tags_path(project)
+ - else
+ %i.icon-warning-sign
+ Empty repository
diff --git a/app/views/explore/projects/index.html.haml b/app/views/explore/projects/index.html.haml
new file mode 100644
index 00000000000..c8bf78385e8
--- /dev/null
+++ b/app/views/explore/projects/index.html.haml
@@ -0,0 +1,38 @@
+.clearfix
+ .pull-left
+ = form_tag explore_projects_path, method: :get, class: 'form-inline form-tiny' do |f|
+ .form-group
+ = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input input-mn-300", id: "projects_search"
+ .form-group
+ = submit_tag 'Search', class: "btn btn-primary wide"
+
+ .pull-right
+ .dropdown.inline
+ %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
+ %span.light sort:
+ - if @sort.present?
+ = @sort.humanize
+ - else
+ Name
+ %b.caret
+ %ul.dropdown-menu
+ %li
+ = link_to explore_projects_path(sort: nil) do
+ Name
+ = link_to explore_projects_path(sort: 'newest') do
+ Newest
+ = link_to explore_projects_path(sort: 'oldest') do
+ Oldest
+ = link_to explore_projects_path(sort: 'recently_updated') do
+ Recently updated
+ = link_to explore_projects_path(sort: 'last_updated') do
+ Last updated
+
+%hr
+.public-projects
+ %ul.bordered-list.top-list
+ = render @projects
+ - unless @projects.present?
+ .nothing-here-block No public projects
+
+ = paginate @projects, theme: "gitlab"
diff --git a/app/views/explore/projects/trending.html.haml b/app/views/explore/projects/trending.html.haml
new file mode 100644
index 00000000000..18bb1ac0ba4
--- /dev/null
+++ b/app/views/explore/projects/trending.html.haml
@@ -0,0 +1,11 @@
+.explore-trending-block
+ %p.lead
+ %i.icon-comments-alt
+ See most discussed projects for last month
+ %hr
+ .public-projects
+ %ul.bordered-list
+ = render @trending_projects
+
+ .center
+ = link_to 'Show all projects', explore_projects_path, class: 'btn btn-primary'
diff --git a/app/views/groups/_filter.html.haml b/app/views/groups/_filter.html.haml
index fe8c0669c0e..393be3f1d12 100644
--- a/app/views/groups/_filter.html.haml
+++ b/app/views/groups/_filter.html.haml
@@ -1,29 +1,12 @@
= form_tag group_filter_path(entity), method: 'get' do
%fieldset
%ul.nav.nav-pills.nav-stacked
- %li{class: ("active" if !params[:status])}
- = link_to group_filter_path(entity, status: nil) do
- Open
+ %li{class: ("active" if (params[:status] == 'active' || !params[:status]))}
+ = link_to group_filter_path(entity, status: 'active') do
+ Active
%li{class: ("active" if params[:status] == 'closed')}
= link_to group_filter_path(entity, status: 'closed') do
Closed
%li{class: ("active" if params[:status] == 'all')}
= link_to group_filter_path(entity, status: 'all') do
All
-
- %fieldset
- %legend Projects:
- %ul.nav.nav-pills.nav-stacked
- - @projects.each do |project|
- - unless entities_per_project(project, entity).zero?
- %li{class: ("active" if params[:project_id] == project.id.to_s)}
- = link_to group_filter_path(entity, project_id: project.id) do
- = project.name_with_namespace
- %small.pull-right= entities_per_project(project, entity)
- - if @projects.blank?
- .nothing-here-block This group has no projects yet
-
- %fieldset
- %hr
- = link_to "Reset", group_filter_path(entity), class: 'btn pull-right'
-
diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml
index 0eec2d6be0b..0152ae86833 100644
--- a/app/views/groups/issues.html.haml
+++ b/app/views/groups/issues.html.haml
@@ -1,6 +1,5 @@
%h3.page-title
Issues
- %span.pull-right #{@issues.total_count} issues
%p.light
Only issues from
diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml
index 71adb2c5516..71d346d0469 100644
--- a/app/views/groups/merge_requests.html.haml
+++ b/app/views/groups/merge_requests.html.haml
@@ -1,6 +1,5 @@
%h3.page-title
Merge Requests
- %span.pull-right #{@merge_requests.total_count} merge requests
%p.light
Only merge requests from
diff --git a/app/views/groups/milestones/_issue.html.haml b/app/views/groups/milestones/_issue.html.haml
new file mode 100644
index 00000000000..c95c2e89670
--- /dev/null
+++ b/app/views/groups/milestones/_issue.html.haml
@@ -0,0 +1,10 @@
+%li{ id: dom_id(issue, 'sortable'), class: 'issue-row', 'data-iid' => issue.iid }
+ %span.milestone-row
+ - project = issue.project
+ %strong #{project.name} &middot;
+ = link_to [project, issue] do
+ %span.cgray ##{issue.iid}
+ = link_to_gfm issue.title, [project, issue], title: issue.title
+ .pull-right.assignee-icon
+ - if issue.assignee
+ = image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16"
diff --git a/app/views/groups/milestones/_issues.html.haml b/app/views/groups/milestones/_issues.html.haml
new file mode 100644
index 00000000000..9f350b772bd
--- /dev/null
+++ b/app/views/groups/milestones/_issues.html.haml
@@ -0,0 +1,6 @@
+.panel.panel-default
+ .panel-heading= title
+ %ul{ class: "well-list issues-sortable-list" }
+ - if issues
+ - issues.each do |issue|
+ = render 'issue', issue: issue
diff --git a/app/views/groups/milestones/_merge_request.html.haml b/app/views/groups/milestones/_merge_request.html.haml
new file mode 100644
index 00000000000..e0c903bfdb2
--- /dev/null
+++ b/app/views/groups/milestones/_merge_request.html.haml
@@ -0,0 +1,10 @@
+%li{ id: dom_id(merge_request, 'sortable'), class: 'mr-row', 'data-iid' => merge_request.iid }
+ %span.milestone-row
+ - project = merge_request.project
+ %strong #{project.name} &middot;
+ = link_to [project, merge_request] do
+ %span.cgray ##{merge_request.iid}
+ = link_to_gfm merge_request.title, [project, merge_request], title: merge_request.title
+ .pull-right.assignee-icon
+ - if merge_request.assignee
+ = image_tag avatar_icon(merge_request.assignee.email, 16), class: "avatar s16"
diff --git a/app/views/groups/milestones/_merge_requests.html.haml b/app/views/groups/milestones/_merge_requests.html.haml
new file mode 100644
index 00000000000..50057e2c636
--- /dev/null
+++ b/app/views/groups/milestones/_merge_requests.html.haml
@@ -0,0 +1,6 @@
+.panel.panel-default
+ .panel-heading= title
+ %ul{ class: "well-list merge_requests-sortable-list" }
+ - if merge_requests
+ - merge_requests.each do |merge_request|
+ = render 'merge_request', merge_request: merge_request
diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml
new file mode 100644
index 00000000000..54e901173f0
--- /dev/null
+++ b/app/views/groups/milestones/index.html.haml
@@ -0,0 +1,50 @@
+%h3.page-title
+ Milestones
+ %span.pull-right #{@group_milestones.count} milestones
+
+%p.light
+ Only milestones from
+ %strong #{@group.name}
+ group are listed here.
+
+%hr
+
+.row
+ .fixed.sidebar-expand-button.hidden-lg.hidden-md
+ %i.icon-list.icon-2x
+ .col-md-3.responsive-side
+ = render 'groups/filter', entity: 'milestone'
+ .col-md-9
+ .panel.panel-default
+ %ul.well-list
+ - if @group_milestones.blank?
+ %li
+ .nothing-here-block No milestones to show
+ - else
+ - @group_milestones.each do |milestone|
+ %li{class: "milestone milestone-#{milestone.closed? ? 'closed' : 'open'}", id: dom_id(milestone.milestones.first) }
+ .pull-right
+ - if can?(current_user, :manage_group, @group)
+ - if milestone.closed?
+ = link_to 'Reopen Milestone', group_milestone_path(@group, milestone.safe_title, title: milestone.title, milestone: {state_event: :activate }), method: :put, class: "btn btn-small btn-grouped btn-reopen"
+ - else
+ = link_to 'Close Milestone', group_milestone_path(@group, milestone.safe_title, title: milestone.title, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-close"
+ %h4
+ = link_to_gfm truncate(milestone.title, length: 100), group_milestone_path(@group, milestone.safe_title, title: milestone.title)
+ %div
+ %div
+ = link_to group_milestone_path(@group, milestone.safe_title, title: milestone.title) do
+ = pluralize milestone.issue_count, 'Issue'
+ &nbsp;
+ = link_to group_milestone_path(@group, milestone.safe_title, title: milestone.title) do
+ = pluralize milestone.merge_requests_count, 'Merge Request'
+ &nbsp;
+ %span.light #{milestone.percent_complete}% complete
+ .progress.progress-info
+ .progress-bar{style: "width: #{milestone.percent_complete}%;"}
+ %div
+ %br
+ - milestone.projects.each do |project|
+ %span.label.label-default
+ = project.name
+ = paginate @group_milestones, theme: "gitlab"
diff --git a/app/views/groups/milestones/show.html.haml b/app/views/groups/milestones/show.html.haml
new file mode 100644
index 00000000000..411d1822be0
--- /dev/null
+++ b/app/views/groups/milestones/show.html.haml
@@ -0,0 +1,88 @@
+%h3.page-title
+ Milestone #{@group_milestone.title}
+ .pull-right
+ - if can?(current_user, :manage_group, @group)
+ - if @group_milestone.active?
+ = link_to 'Close Milestone', group_milestone_path(@group, @group_milestone.safe_title, title: @group_milestone.title, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-close"
+ - else
+ = link_to 'Reopen Milestone', group_milestone_path(@group, @group_milestone.safe_title, title: @group_milestone.title, milestone: {state_event: :activate }), method: :put, class: "btn btn-small btn-grouped btn-reopen"
+
+- if (@group_milestone.total_items_count == @group_milestone.closed_items_count) && @group_milestone.active?
+ .alert.alert-success
+ %span All issues for this milestone are closed. You may close the milestone now.
+
+.back-link
+ = link_to group_milestones_path(@group) do
+ &larr; To milestones list
+
+.issue-box{ class: "issue-box-#{@group_milestone.closed? ? 'closed' : 'open'}" }
+ .state.clearfix
+ .state-label
+ - if @group_milestone.closed?
+ Closed
+ - else
+ Open
+
+ %h4.title
+ = gfm escape_once(@group_milestone.title)
+
+ .description
+ - @group_milestone.milestones.each do |milestone|
+ %hr
+ %h4
+ = link_to "#{milestone.project.name} - #{milestone.title}", project_milestone_path(milestone.project, milestone)
+ %span.pull-right= milestone.expires_at
+ - if milestone.closed?
+ %span.label.label-danger #{milestone.state}
+ = preserve do
+ - if milestone.description.present?
+ = milestone.description
+
+ .context
+ %p
+ Progress:
+ #{@group_milestone.closed_items_count} closed
+ &ndash;
+ #{@group_milestone.open_items_count} open
+
+ .progress.progress-info
+ .progress-bar{style: "width: #{@group_milestone.percent_complete}%;"}
+
+%ul.nav.nav-tabs
+ %li.active
+ = link_to '#tab-issues', 'data-toggle' => 'tab' do
+ Issues
+ %span.badge= @group_milestone.issue_count
+ %li
+ = link_to '#tab-merge-requests', 'data-toggle' => 'tab' do
+ Merge Requests
+ %span.badge= @group_milestone.merge_requests_count
+ %li
+ = link_to '#tab-participants', 'data-toggle' => 'tab' do
+ Participants
+ %span.badge= @group_milestone.participants.count
+
+.tab-content
+ .tab-pane.active#tab-issues
+ .row
+ .col-md-6
+ = render 'issues', title: "Open", issues: @group_milestone.opened_issues
+ .col-md-6
+ = render 'issues', title: "Closed", issues: @group_milestone.closed_issues
+
+ .tab-pane#tab-merge-requests
+ .row
+ .col-md-6
+ = render 'merge_requests', title: "Open", merge_requests: @group_milestone.opened_merge_requests
+ .col-md-6
+ = render 'merge_requests', title: "Closed", merge_requests: @group_milestone.closed_merge_requests
+
+ .tab-pane#tab-participants
+ %ul.bordered-list
+ - @group_milestone.participants.each do |user|
+ %li
+ = link_to user, title: user.name, class: "darken" do
+ = image_tag avatar_icon(user.email, 32), class: "avatar s32"
+ %strong= truncate(user.name, lenght: 40)
+ %br
+ %small.cgray= user.username
diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml
index ebf5e8571aa..cdc087f949a 100644
--- a/app/views/groups/new.html.haml
+++ b/app/views/groups/new.html.haml
@@ -6,12 +6,12 @@
= f.label :name, class: 'control-label' do
Group name
.col-sm-10
- = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control"
+ = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control", tabindex: 1, autofocus: true
.form-group.group-description-holder
= f.label :description, "Details", class: 'control-label'
.col-sm-10
- = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4
+ = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4, tabindex: 2
.form-group.group-description-holder
= f.label :avatar, "Group avatar", class: 'control-label'
@@ -35,6 +35,4 @@
%li Existing projects may be moved into a group
.form-actions
- = f.submit 'Create group', class: "btn btn-create"
-
-
+ = f.submit 'Create group', class: "btn btn-create", tabindex: 3
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml
index 06183dd74a9..6db393c882c 100644
--- a/app/views/groups/show.html.haml
+++ b/app/views/groups/show.html.haml
@@ -1,5 +1,5 @@
.dashboard
- .activities.col-md-8.hidden-sm.hidden-xs
+ %section.activities.col-md-8.hidden-sm.hidden-xs
- if current_user
= render "events/event_last_push", event: @last_push
= link_to dashboard_path, class: 'btn btn-tiny' do
@@ -16,7 +16,7 @@
- else
.nothing-here-block Project activity will be displayed here
= spinner
- .side.col-md-4
+ %aside.side.col-md-4
.light-well.append-bottom-20
= image_tag group_icon(@group.path), class: "avatar s90"
.clearfix.light
diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml
index a89ccde7924..219693af09f 100644
--- a/app/views/help/index.html.haml
+++ b/app/views/help/index.html.haml
@@ -1,5 +1,5 @@
-.jumbotron
- %h2
+%div
+ %h1
GitLab
%span= Gitlab::VERSION
%small= Gitlab::REVISION
@@ -16,7 +16,17 @@
%br
Read more about GitLab at #{link_to "www.gitlab.com", "https://www.gitlab.com/", target: "_blank"}.
+%hr
+
.row
+ .col-md-8
+ .documentation-index
+ = preserve do
+ - readme_text = File.read(Rails.root.join("doc", "README.md"))
+ - text = readme_text.dup
+ - readme_text.scan(/\]\(([^(]+)\)/) { |match| text.gsub!(match.first, "help/#{match.first}") }
+ = markdown text
+
.col-md-4
.panel.panel-default
.panel-heading
@@ -32,13 +42,3 @@
%li
Use
= link_to "shortcuts", '#', onclick: "new Shortcuts()"
-
- .col-md-8
- .panel.panel-default.documentation-index
- .panel-heading Documentation
- .panel-body
- = preserve do
- - readme_text = File.read(Rails.root.join("doc", "README.md"))
- - text = readme_text.dup
- - readme_text.scan(/\]\(([^(]+)\)/) { |match| text.gsub!(match.first, "help/#{match.first}") }
- = markdown text
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index d9a7a2d31cf..0c27f679dee 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -1,5 +1,14 @@
%head
%meta{charset: "utf-8"}
+
+ -# Go repository retrieval support
+ -# Need to be the fist thing in the head
+ -# Since Go is using an XML parser to process HTML5
+ -# https://github.com/gitlabhq/gitlabhq/pull/5958#issuecomment-45397555
+ - if controller_name == 'projects' && action_name == 'show'
+ %meta{name: "go-import", content: "#{@project.web_url_without_protocol} git #{@project.web_url}.git"}
+ %meta{content: "GitLab Community Edition", name: "description"}
+
%title
= "#{title} | " if defined?(title)
GitLab
@@ -24,8 +33,3 @@
= auto_discovery_link_tag(:atom, project_commits_url(@project, @ref, format: :atom, private_token: current_user.private_token), title: "Recent commits to #{@project.name}:#{@ref}")
- if current_controller?(:issues)
= auto_discovery_link_tag(:atom, project_issues_url(@project, :atom, private_token: current_user.private_token), title: "#{@project.name} issues")
-
- -# Go repository retrieval support.
- - if controller_name == 'projects' && action_name == 'show'
- %meta{name: "go-import", content: "#{@project.web_url_without_protocol} git #{@project.web_url}.git"}
-
diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml
index fba56b5dc3b..7c727aca785 100644
--- a/app/views/layouts/_head_panel.html.haml
+++ b/app/views/layouts/_head_panel.html.haml
@@ -24,7 +24,7 @@
'data-original-title' => 'Help' do
%i.icon-question-sign
%li
- = link_to public_root_path, title: "Public area", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
+ = link_to explore_root_path, title: "Explore", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
%i.icon-globe
%li
= link_to user_snippets_path(current_user), title: "My snippets", class: 'has_bottom_tooltip', 'data-original-title' => 'My snippets' do
diff --git a/app/views/layouts/_public_head_panel.html.haml b/app/views/layouts/_public_head_panel.html.haml
index 63992a22f32..5d7f72e6b31 100644
--- a/app/views/layouts/_public_head_panel.html.haml
+++ b/app/views/layouts/_public_head_panel.html.haml
@@ -3,7 +3,7 @@
.container
%div.app_logo
%span.separator
- = link_to public_root_path, class: "home" do
+ = link_to explore_root_path, class: "home" do
%h1 GITLAB
%span.separator
%h1.title= title
diff --git a/app/views/layouts/_search.html.haml b/app/views/layouts/_search.html.haml
index a0e55b21c32..caf0e39234a 100644
--- a/app/views/layouts/_search.html.haml
+++ b/app/views/layouts/_search.html.haml
@@ -1,6 +1,6 @@
.search
= form_tag search_path, method: :get, class: 'navbar-form pull-left' do |f|
- = text_field_tag "search", nil, placeholder: search_placeholder, class: "search-input"
+ = search_field_tag "search", nil, placeholder: search_placeholder, class: "search-input"
= hidden_field_tag :group_id, @group.try(:id)
- if @project && @project.persisted?
= hidden_field_tag :project_id, @project.id
diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml
index c7a827555a7..1ea91a1914f 100644
--- a/app/views/layouts/admin.html.haml
+++ b/app/views/layouts/admin.html.haml
@@ -10,4 +10,4 @@
.container
.content= yield
- = yield :embedded_scripts \ No newline at end of file
+ = yield :embedded_scripts
diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml
index 5d93ffa50ad..00b1959912f 100644
--- a/app/views/layouts/devise.html.haml
+++ b/app/views/layouts/devise.html.haml
@@ -5,13 +5,34 @@
= render "layouts/flash"
.container
.content
- %center
- %h1 GitLab
- %p.light
- GitLab is open source software to collaborate on code.
- %br
- Sign in or browse for #{link_to "public projects", public_projects_path}.
+ .login-title
+ %h1= brand_title
%hr
.container
.content
- = yield
+ .row
+ .col-md-7
+ - if brand_item
+ .brand-image
+ = brand_image
+ .brand_text
+ = brand_text
+ - else
+ .brand-image.hidden-sm.hidden-xs
+ = image_tag 'brand_logo.png'
+ .brand_text.hidden-xs
+ %h2 Open source software to collaborate on code
+
+ %p.lead
+ Manage git repositories with fine grained access controls that keep your code secure.
+ Perform code reviews and enhance collaboration with merge requests.
+ Each project can also have an issue tracker and a wiki.
+
+ .col-md-5
+ = yield
+ %hr
+ .container
+ .footer-links
+ = link_to "Explore", explore_root_path
+ = link_to "Documentation", "http://doc.gitlab.com/"
+ = link_to "About GitLab", "https://about.gitlab.com/"
diff --git a/app/views/layouts/errors.html.haml b/app/views/layouts/errors.html.haml
index df2350b1535..d0e276d751a 100644
--- a/app/views/layouts/errors.html.haml
+++ b/app/views/layouts/errors.html.haml
@@ -4,7 +4,6 @@
%body{class: "#{app_theme} application"}
= render "layouts/head_panel", title: "" if current_user
= render "layouts/flash"
- .container
- .content
- %center.padded.prepend-top-20
- = yield
+ .container.navless-container
+ .error-page
+ = yield
diff --git a/app/views/layouts/explore.html.haml b/app/views/layouts/explore.html.haml
new file mode 100644
index 00000000000..73b4940e3d3
--- /dev/null
+++ b/app/views/layouts/explore.html.haml
@@ -0,0 +1,28 @@
+- page_title = 'Explore'
+!!! 5
+%html{ lang: "en"}
+ = render "layouts/head", title: page_title
+ %body{class: "#{app_theme} application", :'data-page' => body_data_page}
+ = render "layouts/broadcast"
+ - if current_user
+ = render "layouts/head_panel", title: page_title
+ - else
+ = render "layouts/public_head_panel", title: page_title
+ .container.navless-container
+ .content
+ .explore-title
+ %h3
+ Explore GitLab
+ %p.lead
+ Discover projects and groups. Share your projects with others
+
+
+ %ul.nav.nav-tabs
+ = nav_link(path: 'projects#trending') do
+ = link_to 'Trending Projects', explore_root_path
+ = nav_link(path: 'projects#index') do
+ = link_to 'All Projects', explore_projects_path
+ = nav_link(controller: :groups) do
+ = link_to 'All Groups', explore_groups_path
+
+ = yield
diff --git a/app/views/layouts/nav/_admin.html.haml b/app/views/layouts/nav/_admin.html.haml
index 48c569f8684..c57216f01c8 100644
--- a/app/views/layouts/nav/_admin.html.haml
+++ b/app/views/layouts/nav/_admin.html.haml
@@ -1,13 +1,13 @@
%ul
= nav_link(controller: :dashboard, html_options: {class: 'home'}) do
= link_to admin_root_path, title: "Stats" do
- %i.icon-home
+ Overview
= nav_link(controller: :projects) do
= link_to "Projects", admin_projects_path
- = nav_link(controller: :groups) do
- = link_to "Groups", admin_groups_path
= nav_link(controller: :users) do
= link_to "Users", admin_users_path
+ = nav_link(controller: :groups) do
+ = link_to "Groups", admin_groups_path
= nav_link(controller: :logs) do
= link_to "Logs", admin_logs_path
= nav_link(controller: :broadcast_messages) do
diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml
index 12fd49e609f..a300bbc1904 100644
--- a/app/views/layouts/nav/_dashboard.html.haml
+++ b/app/views/layouts/nav/_dashboard.html.haml
@@ -1,7 +1,7 @@
%ul
= nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do
= link_to root_path, title: "Home" do
- %i.icon-home
+ Activity
= nav_link(path: 'dashboard#projects') do
= link_to projects_dashboard_path do
Projects
diff --git a/app/views/layouts/nav/_group.html.haml b/app/views/layouts/nav/_group.html.haml
index 36b102dc25a..9095a843c9f 100644
--- a/app/views/layouts/nav/_group.html.haml
+++ b/app/views/layouts/nav/_group.html.haml
@@ -1,7 +1,10 @@
%ul
= nav_link(path: 'groups#show', html_options: {class: 'home'}) do
= link_to group_path(@group), title: "Home" do
- %i.icon-home
+ Activity
+ = nav_link(controller: [:group, :milestones]) do
+ = link_to group_milestones_path(@group) do
+ Milestones
= nav_link(path: 'groups#issues') do
= link_to issues_group_path(@group) do
Issues
diff --git a/app/views/layouts/nav/_profile.html.haml b/app/views/layouts/nav/_profile.html.haml
index 35d0d417502..1de5ee99cf4 100644
--- a/app/views/layouts/nav/_profile.html.haml
+++ b/app/views/layouts/nav/_profile.html.haml
@@ -1,7 +1,7 @@
%ul
= nav_link(path: 'profiles#show', html_options: {class: 'home'}) do
= link_to profile_path, title: "Profile" do
- %i.icon-home
+ Profile
= nav_link(controller: :accounts) do
= link_to "Account", profile_account_path
= nav_link(controller: :emails) do
diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml
index dd48ff6ce38..69491c2529e 100644
--- a/app/views/layouts/nav/_project.html.haml
+++ b/app/views/layouts/nav/_project.html.haml
@@ -1,7 +1,7 @@
%ul
= nav_link(path: 'projects#show', html_options: {class: "home"}) do
= link_to project_path(@project), title: "Project" do
- %i.icon-home
+ Activity
- if project_nav_tab? :files
= nav_link(controller: %w(tree blob blame edit_tree new_tree)) do
diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml
index 991d4f0c6d8..ab421d63f1a 100644
--- a/app/views/layouts/notify.html.haml
+++ b/app/views/layouts/notify.html.haml
@@ -4,6 +4,10 @@
%title
GitLab
:css
+ img {
+ max-width: 100%;
+ height: auto;
+ }
p.details {
font-style:italic;
color:#777
diff --git a/app/views/layouts/projects.html.haml b/app/views/layouts/projects.html.haml
index 11c815c52a7..f02eca6bd7c 100644
--- a/app/views/layouts/projects.html.haml
+++ b/app/views/layouts/projects.html.haml
@@ -14,4 +14,4 @@
.container
.content= yield
- = yield :embedded_scripts \ No newline at end of file
+ = yield :embedded_scripts
diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml
deleted file mode 100644
index 3c76bbb9575..00000000000
--- a/app/views/layouts/public.html.haml
+++ /dev/null
@@ -1,11 +0,0 @@
-!!! 5
-%html{ lang: "en"}
- = render "layouts/head", title: "Public Projects"
- %body{class: "#{app_theme} application", :'data-page' => body_data_page}
- = render "layouts/broadcast"
- - if current_user
- = render "layouts/head_panel", title: "Public Projects"
- - else
- = render "layouts/public_head_panel", title: "Public Projects"
- .container.navless-container
- .content= yield
diff --git a/app/views/notify/merge_request_status_email.html.haml b/app/views/notify/merge_request_status_email.html.haml
new file mode 100644
index 00000000000..c9bf04f514e
--- /dev/null
+++ b/app/views/notify/merge_request_status_email.html.haml
@@ -0,0 +1,2 @@
+%p
+ = "Merge Request ##{@merge_request.iid} was #{@mr_status} by #{@updated_by.name}"
diff --git a/app/views/notify/merge_request_status_email.text.haml b/app/views/notify/merge_request_status_email.text.haml
new file mode 100644
index 00000000000..8750bf86e2c
--- /dev/null
+++ b/app/views/notify/merge_request_status_email.text.haml
@@ -0,0 +1,8 @@
+= "Merge Request ##{@merge_request.iid} was #{@mr_status} by #{@updated_by.name}"
+
+Merge Request url: #{project_merge_request_url(@merge_request.target_project, @merge_request)}
+
+= merge_path_description(@merge_request, 'to')
+
+Author: #{@merge_request.author_name}
+Assignee: #{@merge_request.assignee_name}
diff --git a/app/views/notify/new_user_email.html.haml b/app/views/notify/new_user_email.html.haml
index 09518cd3c7f..ebbe98dd472 100644
--- a/app/views/notify/new_user_email.html.haml
+++ b/app/views/notify/new_user_email.html.haml
@@ -11,11 +11,4 @@
- if @user.created_by_id
%p
- password..................................
- %code= @password
-
- %p
- You will be forced to change this password immediately after login.
-
-%p
- = link_to "Click here to login", root_url
+ = link_to "Click here to set your password", edit_password_url(@user, :reset_password_token => @token)
diff --git a/app/views/notify/new_user_email.text.erb b/app/views/notify/new_user_email.text.erb
index c21c95d3047..96b26879a77 100644
--- a/app/views/notify/new_user_email.text.erb
+++ b/app/views/notify/new_user_email.text.erb
@@ -4,10 +4,5 @@ The Administrator created an account for you. Now you are a member of the compan
login.................. <%= @user.email %>
<% if @user.created_by_id %>
- password............... <%= @password %>
-
- You will be forced to change this password immediately after login.
+ <%= link_to "Click here to set your password", edit_password_url(@user, :reset_password_token => @token) %>
<% end %>
-
-
-Click here to login: <%= url_for(root_url) %>
diff --git a/app/views/notify/project_was_moved_email.html.haml b/app/views/notify/project_was_moved_email.html.haml
index 3e761c43435..1667c59bc07 100644
--- a/app/views/notify/project_was_moved_email.html.haml
+++ b/app/views/notify/project_was_moved_email.html.haml
@@ -5,7 +5,11 @@
= link_to project_url(@project) do
= @project.name_with_namespace
%p
- To update the remote url in your local repository run:
+ To update the remote url in your local repository run (for ssh):
%p{ style: "background:#f5f5f5; padding:10px; border:1px solid #ddd" }
git remote set-url origin #{@project.ssh_url_to_repo}
+%p
+ or for http(s):
+%p{ style: "background:#f5f5f5; padding:10px; border:1px solid #ddd" }
+ git remote set-url origin #{@project.http_url_to_repo}
%br
diff --git a/app/views/notify/project_was_moved_email.text.erb b/app/views/notify/project_was_moved_email.text.erb
index 7889c7b9cc4..664148fb3ba 100644
--- a/app/views/notify/project_was_moved_email.text.erb
+++ b/app/views/notify/project_was_moved_email.text.erb
@@ -4,5 +4,7 @@ The project is now located under
<%= project_url(@project) %>
-To update the remote url in your local repository run:
+To update the remote url in your local repository run (for ssh):
git remote set-url origin <%= @project.ssh_url_to_repo %>
+or for http(s):
+ git remote set-url origin <%= @project.http_url_to_repo %>
diff --git a/app/views/notify/reassigned_issue_email.html.haml b/app/views/notify/reassigned_issue_email.html.haml
index 07227a3e68c..f1458df5c7b 100644
--- a/app/views/notify/reassigned_issue_email.html.haml
+++ b/app/views/notify/reassigned_issue_email.html.haml
@@ -4,5 +4,8 @@
from
%strong #{@previous_assignee.name}
to
- %strong #{@issue.assignee_name}
+ - if @issue.assignee_id
+ %strong #{@issue.assignee_name}
+ - else
+ %strong Unassigned
diff --git a/app/views/notify/reassigned_issue_email.text.erb b/app/views/notify/reassigned_issue_email.text.erb
index bc0d0567922..4becac2749c 100644
--- a/app/views/notify/reassigned_issue_email.text.erb
+++ b/app/views/notify/reassigned_issue_email.text.erb
@@ -2,4 +2,4 @@ Reassigned Issue <%= @issue.iid %>
<%= url_for(project_issue_url(@issue.project, @issue)) %>
-Assignee changed <%= "from #{@previous_assignee.name}" if @previous_assignee %> to <%= @issue.assignee_name %>
+Assignee changed <%= "from #{@previous_assignee.name}" if @previous_assignee %> to <%= "#{@issue.assignee_id ? @issue.assignee_name : 'Unassigned'}" %>
diff --git a/app/views/notify/repository_push_email.html.haml b/app/views/notify/repository_push_email.html.haml
index 85a01a567f3..bf358fe70a9 100644
--- a/app/views/notify/repository_push_email.html.haml
+++ b/app/views/notify/repository_push_email.html.haml
@@ -5,7 +5,9 @@
%ul
- @commits.each do |commit|
%li
- #{commit.short_id} - #{commit.title}
+ %strong #{commit.short_id}
+ %span by #{commit.author_name}
+ %pre #{commit.safe_message}
%h4 Changes:
- @diffs.each do |diff|
diff --git a/app/views/notify/repository_push_email.text.haml b/app/views/notify/repository_push_email.text.haml
index a15b8efe1f7..ac337c7628a 100644
--- a/app/views/notify/repository_push_email.text.haml
+++ b/app/views/notify/repository_push_email.text.haml
@@ -3,7 +3,9 @@
\
Commits:
- @commits.each do |commit|
- #{commit.short_id} - #{truncate(commit.title, length: 40)}
+ #{commit.short_id} by #{commit.author_name}
+ #{commit.safe_message}
+ \- - - - -
\
\
Changes:
diff --git a/app/views/profiles/keys/new.html.haml b/app/views/profiles/keys/new.html.haml
index 126afa55540..46b7fc72869 100644
--- a/app/views/profiles/keys/new.html.haml
+++ b/app/views/profiles/keys/new.html.haml
@@ -5,7 +5,7 @@
= render 'form'
:javascript
- $('#key_key').on('keyup', function(){
+ $('#key_key').on('focusout', function(){
var title = $('#key_title'),
val = $('#key_key').val(),
key_mail = val.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+|\.[a-zA-Z0-9._-]+)/gi);
@@ -13,4 +13,4 @@
if( key_mail && key_mail.length > 0 && title.val() == '' ){
$('#key_title').val( key_mail );
}
- });
+ }); \ No newline at end of file
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index 9a4c13af975..e03a43cbf1f 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -68,12 +68,14 @@
%p.light
- if @user.avatar?
You can change your avatar here
- %br
- or remove the current avatar to revert to #{link_to "gravatar.com", "http://gravatar.com"}
+ - if Gitlab.config.gravatar.enabled
+ %br
+ or remove the current avatar to revert to #{link_to "gravatar.com", "http://gravatar.com"}
- else
You can upload an avatar here
- %br
- or change it at #{link_to "gravatar.com", "http://gravatar.com"}
+ - if Gitlab.config.gravatar.enabled
+ %br
+ or change it at #{link_to "gravatar.com", "http://gravatar.com"}
%hr
%a.choose-btn.btn.btn-small.js-choose-user-avatar-button
%i.icon-paper-clip
diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml
index 81bb0e20a35..ddf815ebd99 100644
--- a/app/views/projects/_home_panel.html.haml
+++ b/app/views/projects/_home_panel.html.haml
@@ -17,10 +17,15 @@
.col-md-7
.project-home-desc
- if @project.description.present?
- = auto_link @project.description, link: :urls
+ = auto_link ERB::Util.html_escape(@project.description), link: :urls
- if can?(current_user, :admin_project, @project)
&ndash;
%strong= link_to 'Edit', edit_project_path
+ - elsif !@project.empty_repo? && @repository.readme
+ - readme = @repository.readme
+ &ndash;
+ = link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)) do
+ = readme.name
- unless empty_repo
.col-md-5
diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml
index 87574d4648b..be785dacedb 100644
--- a/app/views/projects/blob/_blob.html.haml
+++ b/app/views/projects/blob/_blob.html.haml
@@ -20,7 +20,7 @@
= render blob_commit, project: @project
%div#tree-content-holder.tree-content-holder
- .file-holder
+ %article.file-holder
.file-title.clearfix
%i.icon-file
%span.file_name
diff --git a/app/views/projects/blob/_download.html.haml b/app/views/projects/blob/_download.html.haml
index ff317f90209..cdbfee7cc68 100644
--- a/app/views/projects/blob/_download.html.haml
+++ b/app/views/projects/blob/_download.html.haml
@@ -1,5 +1,5 @@
.file-content.blob_file.blob-no-preview
- %center
+ .center
= link_to project_raw_path(@project, @id) do
%h1.light
%i.icon-download-alt
diff --git a/app/views/projects/commit/huge_commit.html.haml b/app/views/projects/commit/huge_commit.html.haml
deleted file mode 100644
index 398ce771426..00000000000
--- a/app/views/projects/commit/huge_commit.html.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-= render "projects/commit/commit_box"
-.alert.alert-danger
- %h4 Commit diffs are too big to be displayed
diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml
index da1b4c10f87..0a15aef6cb7 100644
--- a/app/views/projects/commit/show.html.haml
+++ b/app/views/projects/commit/show.html.haml
@@ -1,3 +1,3 @@
= render "commit_box"
-= render "projects/commits/diffs", diffs: @commit.diffs, project: @project
+= render "projects/commits/diffs", diffs: @diffs, project: @project
= render "projects/notes/notes_with_form"
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index a0606662807..abe0d4cff46 100644
--- a/app/views/projects/commits/_commit.html.haml
+++ b/app/views/projects/commits/_commit.html.haml
@@ -7,17 +7,23 @@
- if commit.description?
%a.text-expander.js-toggle-button ...
- = link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right"
+ = link_to_browse_code(project, commit)
+
.notes_count
- - notes = project.notes.for_commit_id(commit.id)
- - if notes.any?
+ - if @note_counts
+ - note_count = @note_counts.fetch(commit.id, 0)
+ - else
+ - notes = project.notes.for_commit_id(commit.id)
+ - note_count = notes.count
+
+ - if note_count > 0
%span.label.label-gray
- %i.icon-comment
- = notes.count
+ %i.icon-comment= note_count
- if commit.description?
.commit-row-description.js-toggle-content
- = simple_format(commit.description)
+ %pre
+ = commit.description
.commit-row-info
= commit_author_link(commit, avatar: true, size: 16)
diff --git a/app/views/projects/commits/_diff_file.html.haml b/app/views/projects/commits/_diff_file.html.haml
new file mode 100644
index 00000000000..45d1cd9c9a0
--- /dev/null
+++ b/app/views/projects/commits/_diff_file.html.haml
@@ -0,0 +1,48 @@
+- file = project.repository.blob_at(@commit.id, diff.new_path)
+- file = project.repository.blob_at(@commit.parent_id, diff.old_path) unless file
+- return unless file
+.diff-file{id: "diff-#{i}"}
+ .diff-header{id: "file-path-#{hexdigest(diff.new_path || diff.old_path)}"}
+ - if diff.deleted_file
+ %span= diff.old_path
+
+ .diff-btn-group
+ - if @commit.parent_ids.present?
+ = link_to project_blob_path(project, tree_join(@commit.parent_id, diff.new_path)), { class: 'btn btn-small view-file' } do
+ View file @
+ %span.commit-short-id= @commit.short_id(6)
+ - else
+ %span= diff.new_path
+ - if diff_file_mode_changed?(diff)
+ %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
+
+ .diff-btn-group
+ = link_to "#", class: "js-toggle-diff-comments btn btn-small" do
+ %i.icon-chevron-down
+ Diff comments
+ &nbsp;
+
+ - if @merge_request && @merge_request.source_project
+ = link_to project_edit_tree_path(@merge_request.source_project, tree_join(@merge_request.source_branch, diff.new_path), from_merge_request_id: @merge_request.id), { class: 'btn btn-small' } do
+ Edit
+ &nbsp;
+
+ = link_to project_blob_path(project, tree_join(@commit.id, diff.new_path)), { class: 'btn btn-small view-file' } do
+ View file @
+ %span.commit-short-id= @commit.short_id(6)
+
+
+ .diff-content
+ -# Skipp all non non-supported blobs
+ - return unless file.respond_to?('text?')
+ - if file.text?
+ - if params[:view] == 'parallel'
+ = render "projects/commits/parallel_view", diff: diff, project: project, file: file, index: i
+ - else
+ = render "projects/commits/text_file", diff: diff, index: i
+ - elsif file.image?
+ - old_file = project.repository.blob_at(@commit.parent_id, diff.old_path) if @commit.parent_id
+ = render "projects/commits/image", diff: diff, old_file: old_file, file: file, index: i
+ - else
+ .nothing-here-block No preview for this file type
+
diff --git a/app/views/projects/commits/_diff_head.html.haml b/app/views/projects/commits/_diff_head.html.haml
deleted file mode 100644
index 5aa542287fe..00000000000
--- a/app/views/projects/commits/_diff_head.html.haml
+++ /dev/null
@@ -1,26 +0,0 @@
-%ul.bordered-list
- - diffs.each_with_index do |diff, i|
- %li
- - if diff.deleted_file
- %span.deleted-file
- %a{href: "#diff-#{i}"}
- %i.icon-minus
- = diff.old_path
- - elsif diff.renamed_file
- %span.renamed-file
- %a{href: "#diff-#{i}"}
- %i.icon-minus
- = diff.old_path
- = "->"
- = diff.new_path
- - elsif diff.new_file
- %span.new-file
- %a{href: "#diff-#{i}"}
- %i.icon-plus
- = diff.new_path
- - else
- %span.edit-file
- %a{href: "#diff-#{i}"}
- %i.icon-adjust
- = diff.new_path
-
diff --git a/app/views/projects/commits/_diff_stats.html.haml b/app/views/projects/commits/_diff_stats.html.haml
new file mode 100644
index 00000000000..846a1ee10e6
--- /dev/null
+++ b/app/views/projects/commits/_diff_stats.html.haml
@@ -0,0 +1,41 @@
+.js-toggle-container
+ .commit-stat-summary
+ Showing
+ %strong.cdark #{pluralize(diffs.count, "changed file")}
+ - if current_controller?(:commit)
+ - unless @commit.has_zero_stats?
+ with
+ %strong.cgreen #{@commit.stats.additions} additions
+ and
+ %strong.cred #{@commit.stats.deletions} deletions
+ &nbsp;
+ = link_to '#', class: 'btn btn-small js-toggle-button' do
+ Show diff stats
+ %i.icon-chevron-down
+ .file-stats.js-toggle-content.hide
+ %ul.bordered-list
+ - diffs.each_with_index do |diff, i|
+ %li
+ - if diff.deleted_file
+ %span.deleted-file
+ %a{href: "#diff-#{i}"}
+ %i.icon-minus
+ = diff.old_path
+ - elsif diff.renamed_file
+ %span.renamed-file
+ %a{href: "#diff-#{i}"}
+ %i.icon-minus
+ = diff.old_path
+ = "->"
+ = diff.new_path
+ - elsif diff.new_file
+ %span.new-file
+ %a{href: "#diff-#{i}"}
+ %i.icon-plus
+ = diff.new_path
+ - else
+ %span.edit-file
+ %a{href: "#diff-#{i}"}
+ %i.icon-adjust
+ = diff.new_path
+
diff --git a/app/views/projects/commits/_diff_warning.html.haml b/app/views/projects/commits/_diff_warning.html.haml
new file mode 100644
index 00000000000..05d516efa11
--- /dev/null
+++ b/app/views/projects/commits/_diff_warning.html.haml
@@ -0,0 +1,19 @@
+.bs-callout.bs-callout-warning
+ %h4
+ Too many changes.
+ .pull-right
+ - unless diff_hard_limit_enabled?
+ = link_to "Reload with full diff", url_for(params.merge(force_show_diff: true)), class: "btn btn-small btn-warning"
+
+ - if current_controller?(:commit) or current_controller?(:merge_requests)
+ - if current_controller?(:commit)
+ = link_to "Plain diff", project_commit_path(@project, @commit, format: :diff), class: "btn btn-warning btn-small"
+ = link_to "Email patch", project_commit_path(@project, @commit, format: :patch), class: "btn btn-warning btn-small"
+ - elsif @merge_request && @merge_request.persisted?
+ = link_to "Plain diff", project_merge_request_path(@project, @merge_request, format: :diff), class: "btn btn-warning btn-small"
+ = link_to "Email patch", project_merge_request_path(@project, @merge_request, format: :patch), class: "btn btn-warning btn-small"
+ %p
+ To preserve performance only
+ %strong #{safe_diff_files(diffs).size} of #{diffs.size}
+ files displayed.
+
diff --git a/app/views/projects/commits/_diffs.html.haml b/app/views/projects/commits/_diffs.html.haml
index a62f50776fa..64d6a2f09cf 100644
--- a/app/views/projects/commits/_diffs.html.haml
+++ b/app/views/projects/commits/_diffs.html.haml
@@ -1,91 +1,23 @@
-- @suppress_diff ||= @suppress_diff || @force_suppress_diff
-- if @suppress_diff
- .alert.alert-warning
- %p
- %strong Warning! This is a large diff.
- %p
- To preserve performance the diff is not shown.
- - if current_controller?(:commit) or current_controller?(:merge_requests)
- - if current_controller?(:commit)
- Please, download the diff as
- = link_to "plain diff", project_commit_path(@project, @commit, format: :diff), class: "underlined-link"
- or
- = link_to "email patch", project_commit_path(@project, @commit, format: :patch), class: "underlined-link"
- instead.
- - elsif @merge_request && @merge_request.persisted?
- Please, download the diff as
- = link_to "plain diff", project_merge_request_path(@project, @merge_request, format: :diff), class: "underlined-link"
- or
- = link_to "email patch", project_merge_request_path(@project, @merge_request, format: :patch), class: "underlined-link"
- instead.
- - unless @force_suppress_diff
- %p
- If you still want to see the diff
- = link_to "click this link", url_for(force_show_diff: true), class: "underlined-link"
-
-%p.commit-stat-summary
- Showing
- %strong.cdark #{pluralize(diffs.count, "changed file")}
- - if current_controller?(:commit)
- - unless @commit.has_zero_stats?
- with
- %strong.cgreen #{@commit.stats.additions} additions
- and
- %strong.cred #{@commit.stats.deletions} deletions
- - if params[:view] == 'parallel'
- = link_to "Inline Diff", url_for(view: 'inline'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'}
- - else
- = link_to "Side-by-side Diff", url_for(view: 'parallel'), {id: "commit-diff-viewtype", class: 'btn btn-tiny pull-right'}
-.file-stats
- = render "projects/commits/diff_head", diffs: diffs
+.row
+ .col-md-8
+ = render 'projects/commits/diff_stats', diffs: diffs
+ .col-md-4
+ %ul.nav.nav-tabs
+ %li.pull-right{class: params[:view] == 'parallel' ? 'active' : ''}
+ = link_to "Side-by-side Diff", url_for(view: 'parallel'), {id: "commit-diff-viewtype"}
+ %li.pull-right{class: params[:view] != 'parallel' ? 'active' : ''}
+ = link_to "Inline Diff", url_for(view: 'inline'), {id: "commit-diff-viewtype"}
+
+- if show_diff_size_warninig?(diffs)
+ = render 'projects/commits/diff_warning', diffs: diffs
.files
- - unless @suppress_diff
- - diffs.each_with_index do |diff, i|
- - file = project.repository.blob_at(@commit.id, diff.new_path)
- - file = project.repository.blob_at(@commit.parent_id, diff.old_path) unless file
- - next unless file
- .diff-file.js-toggle-container{id: "diff-#{i}"}
- .diff-header{id: "file-path-#{hexdigest(diff.new_path || diff.old_path)}"}
- - if diff.deleted_file
- %span= diff.old_path
-
- .diff-btn-group
- - if @commit.parent_ids.present?
- = link_to project_blob_path(project, tree_join(@commit.parent_id, diff.new_path)), { class: 'btn btn-small view-file' } do
- View file @
- %span.commit-short-id= @commit.short_id(6)
- - else
- %span= diff.new_path
- - if diff_file_mode_changed?(diff)
- %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
-
- .diff-btn-group
- = link_to "#", class: "js-toggle-button btn btn-small" do
- %i.icon-chevron-down
- Diff comments
- &nbsp;
+ - safe_diff_files(diffs).each_with_index do |diff, i|
+ = render 'projects/commits/diff_file', diff: diff, i: i, project: project
- - if @merge_request && @merge_request.source_project
- = link_to project_edit_tree_path(@merge_request.source_project, tree_join(@merge_request.source_branch, diff.new_path), from_merge_request_id: @merge_request.id), { class: 'btn btn-small' } do
- Edit
- &nbsp;
-
- = link_to project_blob_path(project, tree_join(@commit.id, diff.new_path)), { class: 'btn btn-small view-file' } do
- View file @
- %span.commit-short-id= @commit.short_id(6)
-
-
- .diff-content
- -# Skipp all non non-supported blobs
- - next unless file.respond_to?('text?')
- - if file.text?
- - if params[:view] == 'parallel'
- = render "projects/commits/parallel_view", diff: diff, project: project, file: file, index: i
- - else
- = render "projects/commits/text_file", diff: diff, index: i
- - elsif file.image?
- - old_file = project.repository.blob_at(@commit.parent_id, diff.old_path) if @commit.parent_id
- = render "projects/commits/image", diff: diff, old_file: old_file, file: file, index: i
- - else
- .nothing-here-block No preview for this file type
+- if @diff_timeout
+ .alert.alert-danger
+ %h4
+ Failed to collect changes
+ %p
+ Maybe diff is really big and operation failed with timeout. Try to get diff localy
diff --git a/app/views/projects/commits/_text_file.html.haml b/app/views/projects/commits/_text_file.html.haml
index 8ced4133294..f5b0d711416 100644
--- a/app/views/projects/commits/_text_file.html.haml
+++ b/app/views/projects/commits/_text_file.html.haml
@@ -1,4 +1,4 @@
-- too_big = diff.diff.lines.count > 1000
+- too_big = diff.diff.lines.count > Commit::DIFF_SAFE_LINES
- if too_big
%a.supp_diff_link Changes suppressed. Click to show
diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml
index 88122a73bba..240bfe7484e 100644
--- a/app/views/projects/compare/show.html.haml
+++ b/app/views/projects/compare/show.html.haml
@@ -18,22 +18,11 @@
- else
%ul.well-list= render Commit.decorate(@commits), project: @project
- %h4 Changes
- - if @diffs.present?
- = render "projects/commits/diffs", diffs: @diffs, project: @project
- - elsif @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
- .bs-callout.bs-callout-danger
- %h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits.
- %p To preserve performance the line changes are not shown.
- - elsif @timeout
- .bs-callout.bs-callout-danger
- %h4 Number of changed files for this comparison is extremely large.
- %p Use command line to browse through changes for this comparison.
-
+ = render "projects/commits/diffs", diffs: @diffs, project: @project
- else
.light-well
- %center
+ .center
%h4
There isn't anything to compare.
%p.slead
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index 4195a491a0f..6eaa3e7559a 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -183,7 +183,7 @@
.nothing-here-block Only project owner can remove a project
.save-project-loader.hide
- %center
+ .center
%h2
%i.icon-spinner.icon-spin
Saving project.
diff --git a/app/views/projects/edit_tree/show.html.haml b/app/views/projects/edit_tree/show.html.haml
index 32a6d4ef36e..05050e7df7c 100644
--- a/app/views/projects/edit_tree/show.html.haml
+++ b/app/views/projects/edit_tree/show.html.haml
@@ -16,9 +16,9 @@
.btn-group.tree-btn-group
= link_to "Cancel", @after_edit_path, class: "btn btn-tiny btn-cancel", data: { confirm: leave_edit_message }
.file-content.code
- %pre.js-edit-mode-pane#editor= @blob.data
+ %pre.js-edit-mode-pane#editor
.js-edit-mode-pane#preview.hide
- %center
+ .center
%h2
%i.icon-spinner.icon-spin
@@ -43,6 +43,7 @@
ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace")
var ace_mode = "#{@blob.language.try(:ace_mode)}";
var editor = ace.edit("editor");
+ editor.setValue("#{escape_javascript(@blob.data)}");
if (ace_mode) {
editor.getSession().setMode('ace/mode/' + ace_mode);
}
diff --git a/app/views/projects/graphs/show.html.haml b/app/views/projects/graphs/show.html.haml
index 27348232ba2..8e4548f26d0 100644
--- a/app/views/projects/graphs/show.html.haml
+++ b/app/views/projects/graphs/show.html.haml
@@ -1,5 +1,5 @@
.loading-graph
- %center
+ .center
%h3.page-title
%i.icon-spinner.icon-spin
Building repository graph.
diff --git a/app/views/projects/import.html.haml b/app/views/projects/import.html.haml
index d11372be61b..f883b24fc21 100644
--- a/app/views/projects/import.html.haml
+++ b/app/views/projects/import.html.haml
@@ -1,6 +1,6 @@
- if @project.import_in_progress?
.save-project-loader
- %center
+ .center
%h2
%i.icon-spinner.icon-spin
Import in progress.
@@ -11,7 +11,7 @@
- elsif @project.import_failed?
.save-project-loader
- %center
+ .center
%h2
Import failed. Retry?
%hr
diff --git a/app/views/projects/issues/_head.html.haml b/app/views/projects/issues/_head.html.haml
index 716ea7cefed..dad547d4ebc 100644
--- a/app/views/projects/issues/_head.html.haml
+++ b/app/views/projects/issues/_head.html.haml
@@ -2,8 +2,6 @@
= nav_link(controller: :issues) do
= link_to project_issues_path(@project), class: "tab" do
Browse Issues
- - if current_controller?(:issues)
- %span.badge.issue_counter #{@issues.total_count}
= nav_link(controller: :milestones) do
= link_to 'Milestones', project_milestones_path(@project), class: "tab"
= nav_link(controller: :labels) do
diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml
index 3fc04c26cf2..8d447da3ae9 100644
--- a/app/views/projects/issues/_issue.html.haml
+++ b/app/views/projects/issues/_issue.html.haml
@@ -38,9 +38,9 @@
.issue-actions
- if can? current_user, :modify_issue, issue
- if issue.closed?
- = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-small btn-grouped reopen_issue", remote: true
+ = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-small btn-grouped reopen_issue btn-reopen", remote: true
- else
- = link_to 'Close', project_issue_path(issue.project, issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-small btn-grouped close_issue", remote: true
+ = link_to 'Close', project_issue_path(issue.project, issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-small btn-grouped close_issue btn-close", remote: true
= link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link btn-grouped" do
%i.icon-edit
Edit
diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml
index 2e66d059565..5de77b8bf32 100644
--- a/app/views/projects/issues/index.html.haml
+++ b/app/views/projects/issues/index.html.haml
@@ -4,6 +4,6 @@
%i.icon-list.icon-2x
.col-md-3.responsive-side
= render 'shared/project_filter', project_entities_path: project_issues_path(@project),
- labels: true, redirect: 'issues'
+ labels: true, redirect: 'issues', entity: 'issue'
.col-md-9.issues-holder
= render "issues"
diff --git a/app/views/projects/merge_requests/_new_compare.html.haml b/app/views/projects/merge_requests/_new_compare.html.haml
index f8f14a71a11..99726172154 100644
--- a/app/views/projects/merge_requests/_new_compare.html.haml
+++ b/app/views/projects/merge_requests/_new_compare.html.haml
@@ -27,19 +27,19 @@
.panel-footer
.mr_target_commit
- -if @merge_request.errors.any?
+ - if @merge_request.errors.any?
.alert.alert-danger
- @merge_request.errors.full_messages.each do |msg|
%div= msg
- - if @merge_request.source_branch.present? && @merge_request.target_branch.present?
- - if @compare_failed
+ - elsif @merge_request.source_branch.present? && @merge_request.target_branch.present?
+ - if @merge_request.compare_failed
.alert.alert-danger
%h4 Compare failed
%p We can't compare selected branches. It may be because of huge diff or satellite timeout. Please try again or select different branches.
- else
.light-well
- %center
+ .center
%h4
There isn't anything to merge.
%p.slead
diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml
index 34a30975e07..73d364b4f93 100644
--- a/app/views/projects/merge_requests/_new_submit.html.haml
+++ b/app/views/projects/merge_requests/_new_submit.html.haml
@@ -44,11 +44,10 @@
Milestone
%div= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2'})
.panel-footer
- - if @target_repo.contribution_guide
- - contribution_guide_url = project_blob_path(@target_project, tree_join(@target_repo.root_ref, @target_repo.contribution_guide.name))
+ - if contribution_guide_url(@target_project)
%p
Please review the
- %strong #{link_to "guidelines for contribution", contribution_guide_url}
+ %strong #{link_to "guidelines for contribution", contribution_guide_url(@target_project)}
to this repository.
= f.hidden_field :source_project_id
= f.hidden_field :target_project_id
@@ -76,6 +75,10 @@
.bs-callout.bs-callout-danger
%h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits.
%p To preserve performance the line changes are not shown.
+ - else
+ .bs-callout.bs-callout-danger
+ %h4 This comparison includes huge diff.
+ %p To preserve performance the line changes are not shown.
:javascript
diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml
index 486454793ba..8fca9f0212b 100644
--- a/app/views/projects/merge_requests/_show.html.haml
+++ b/app/views/projects/merge_requests/_show.html.haml
@@ -31,7 +31,8 @@
= render "projects/merge_requests/show/diffs"
.notes.tab-content.voting_notes#notes{ class: (controller.action_name == 'show') ? "" : "hide" }
= render "projects/notes/notes_with_form"
- .status
+ .mr-loading-status
+ = spinner
:javascript
var merge_request;
diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml
index 4bb803eb6df..0954fa8fcea 100644
--- a/app/views/projects/merge_requests/index.html.haml
+++ b/app/views/projects/merge_requests/index.html.haml
@@ -4,14 +4,13 @@
New Merge Request
%h3.page-title
Merge Requests
- %span (#{@merge_requests.total_count})
%hr
.row
.fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x
.col-md-3.responsive-side
= render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project),
- labels: true, redirect: 'merge_requests'
+ labels: true, redirect: 'merge_requests', entity: 'merge_request'
.col-md-9
.mr-filters.append-bottom-10
.dropdown.inline
diff --git a/app/views/projects/merge_requests/new.html.haml b/app/views/projects/merge_requests/new.html.haml
index c24e5916721..4756903d0e0 100644
--- a/app/views/projects/merge_requests/new.html.haml
+++ b/app/views/projects/merge_requests/new.html.haml
@@ -1,4 +1,4 @@
-- if @commits.present?
+- if @merge_request.can_be_created
= render 'new_submit'
- else
= render 'new_compare'
diff --git a/app/views/projects/merge_requests/show/_mr_accept.html.haml b/app/views/projects/merge_requests/show/_mr_accept.html.haml
index 07e05f55012..ead19ec05cf 100644
--- a/app/views/projects/merge_requests/show/_mr_accept.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_accept.html.haml
@@ -38,7 +38,7 @@
.accept-group
.pull-left
= f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request"
- - if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch)
+ - if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && !@merge_request.for_fork?
.remove_branch_holder.pull-left
= label_tag :should_remove_source_branch, class: "checkbox" do
= check_box_tag :should_remove_source_branch
diff --git a/app/views/projects/merge_requests/show/_mr_ci.html.haml b/app/views/projects/merge_requests/show/_mr_ci.html.haml
index 507a9e507f1..b77eeac6123 100644
--- a/app/views/projects/merge_requests/show/_mr_ci.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_ci.html.haml
@@ -1,21 +1,21 @@
- if @commits.any?
.ci_widget.ci-success{style: "display:none"}
%i.icon-ok
- %strong CI build passed
+ %span CI build passed
for #{@merge_request.last_commit_short_sha}.
= link_to "Build page", ci_build_details_path(@merge_request)
.ci_widget.ci-failed{style: "display:none"}
%i.icon-remove
- %strong CI build failed
+ %span CI build failed
for #{@merge_request.last_commit_short_sha}.
= link_to "Build page", ci_build_details_path(@merge_request)
- [:running, :pending].each do |status|
.ci_widget{class: "ci-#{status}", style: "display:none"}
%i.icon-time
- %strong CI build #{status}
+ %span CI build #{status}
for #{@merge_request.last_commit_short_sha}.
= link_to "Build page", ci_build_details_path(@merge_request)
@@ -26,4 +26,4 @@
.ci_widget.ci-error{style: "display:none"}
%i.icon-remove
- %strong Cannot connect to the CI server. Please check your settings and try again.
+ %span Cannot connect to the CI server. Please check your settings and try again.
diff --git a/app/views/projects/milestones/_issue.html.haml b/app/views/projects/milestones/_issue.html.haml
index 08ccd0cdc8a..b5ec0fc9882 100644
--- a/app/views/projects/milestones/_issue.html.haml
+++ b/app/views/projects/milestones/_issue.html.haml
@@ -2,7 +2,7 @@
%span.str-truncated
= link_to [@project, issue] do
%span.cgray ##{issue.iid}
- = link_to_gfm issue.title, [@project, issue]
+ = link_to_gfm issue.title, [@project, issue], title: issue.title
.pull-right.assignee-icon
- if issue.assignee
= image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16"
diff --git a/app/views/projects/milestones/_merge_request.html.haml b/app/views/projects/milestones/_merge_request.html.haml
index d630c4518dd..d54cb3f8e74 100644
--- a/app/views/projects/milestones/_merge_request.html.haml
+++ b/app/views/projects/milestones/_merge_request.html.haml
@@ -2,4 +2,4 @@
%span.str-truncated
= link_to [@project, merge_request] do
%span.cgray ##{merge_request.iid}
- = link_to_gfm truncate(merge_request.title, length: 60), [@project, merge_request]
+ = link_to_gfm merge_request.title, [@project, merge_request], title: merge_request.title
diff --git a/app/views/projects/milestones/_milestone.html.haml b/app/views/projects/milestones/_milestone.html.haml
index 5579659d60e..4018d132a55 100644
--- a/app/views/projects/milestones/_milestone.html.haml
+++ b/app/views/projects/milestones/_milestone.html.haml
@@ -4,7 +4,7 @@
= link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link btn-grouped" do
%i.icon-edit
Edit
- = link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-remove"
+ = link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-small btn-close"
%h4
= link_to_gfm truncate(milestone.title, length: 100), project_milestone_path(milestone.project, milestone)
- if milestone.expired? and not milestone.closed?
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 5cf7f332118..42c3f45f6c9 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -7,9 +7,9 @@
%i.icon-edit
Edit
- if @milestone.active?
- = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-remove btn-grouped"
+ = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-grouped"
- else
- = link_to 'Reopen Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-grouped"
+ = link_to 'Reopen Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-grouped"
- if @milestone.issues.any? && @milestone.can_be_closed?
.alert.alert-success
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 5d5637c1588..7efaf5a087b 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -72,7 +72,7 @@
Create a group
.save-project-loader.hide
- %center
+ .center
%h2
%i.icon-spinner.icon-spin
Creating project &amp; repository.
diff --git a/app/views/projects/notes/_commit_discussion.html.haml b/app/views/projects/notes/_commit_discussion.html.haml
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/app/views/projects/notes/_commit_discussion.html.haml
diff --git a/app/views/projects/notes/_diff_notes_with_reply.html.haml b/app/views/projects/notes/_diff_notes_with_reply.html.haml
index 9acadc6a14e..79a66eff129 100644
--- a/app/views/projects/notes/_diff_notes_with_reply.html.haml
+++ b/app/views/projects/notes/_diff_notes_with_reply.html.haml
@@ -1,7 +1,7 @@
- note = notes.first # example note
-# Check if line want not changed since comment was left
- if !defined?(line) || line == note.diff_line
- %tr.notes_holder.js-toggle-content
+ %tr.notes_holder
%td.notes_line{ colspan: 2 }
%span.btn.disabled
%i.icon-comment
@@ -9,5 +9,5 @@
%td.notes_content
%ul.notes{ rel: note.discussion_id }
= render notes
-
- = render "projects/notes/discussion_reply_button", note: note
+ .discussion-reply-holder
+ = link_to_reply_diff(note)
diff --git a/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml b/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
index 399ce30d1a9..8adf903a9a1 100644
--- a/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
+++ b/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
@@ -2,7 +2,7 @@
- note2 = notes2.first # example note
-# Check if line want not changed since comment was left
/- if !defined?(line) || line == note.diff_line
-%tr.notes_holder.js-toggle-content
+%tr.notes_holder
- if note1
%td.notes_line
%span.btn.disabled
@@ -12,7 +12,8 @@
%ul.notes{ rel: note1.discussion_id }
= render notes1
- = render "projects/notes/discussion_reply_button", note: note1
+ .discussion-reply-holder
+ = link_to_reply_diff(note1)
- else
%td= ""
%td= ""
@@ -26,7 +27,8 @@
%ul.notes{ rel: note2.discussion_id }
= render notes2
- = render "projects/notes/discussion_reply_button", note: note2
+ .discussion-reply-holder
+ = link_to_reply_diff(note2)
- else
%td= ""
%td= ""
diff --git a/app/views/projects/notes/_discussion.html.haml b/app/views/projects/notes/_discussion.html.haml
index 78793eb860f..8c7964cbf3e 100644
--- a/app/views/projects/notes/_discussion.html.haml
+++ b/app/views/projects/notes/_discussion.html.haml
@@ -1,46 +1,8 @@
- note = discussion_notes.first
-.discussion.js-toggle-container{ class: note.discussion_id }
- .discussion-header
- .discussion-actions
- = link_to "#", class: "js-toggle-button" do
- %i.icon-chevron-up
- Show/hide discussion
- = image_tag avatar_icon(note.author_email), class: "avatar s32"
- %div
- = link_to_member(@project, note.author, avatar: false)
- - if note.for_merge_request?
- - if note.diff
- started a discussion on this merge request diff
- = link_to_merge_request_diff_line_note(note)
- - else
- started
- %strong
- %i.icon-remove
- outdated
- discussion on this merge request diff
- - elsif note.for_commit?
- started a discussion on commit
- #{link_to note.noteable.short_id, project_commit_path(note.project, note.noteable)}
- = link_to_commit_diff_line_note(note) if note.for_diff_line?
- - else
- %cite.cgray started a discussion
- %div
- - last_note = discussion_notes.last
- last updated by
- = link_to_member(@project, last_note.author, avatar: false)
- %span.discussion-last-update
- #{time_ago_with_tooltip(last_note.updated_at, 'bottom', 'discussion_updated_ago')}
- .discussion-body.js-toggle-content
- - if note.for_diff_line?
- - if note.active?
- = render "projects/notes/discussion_diff", discussion_notes: discussion_notes, note: note
- - else
- = link_to 'show outdated discussion', '#', class: 'js-show-outdated-discussion'
- %div.hide.outdated-discussion
- .notes{ rel: discussion_notes.first.discussion_id }
- = render discussion_notes
-
- - else
- .notes{ rel: discussion_notes.first.discussion_id }
- = render discussion_notes
- = render "projects/notes/discussion_reply_button", note: discussion_notes.first
+- if note.for_merge_request?
+ - if note.outdated?
+ = render "projects/notes/discussions/outdated", discussion_notes: discussion_notes
+ - else
+ = render "projects/notes/discussions/active", discussion_notes: discussion_notes
+- else
+ = render "projects/notes/discussions/commit", discussion_notes: discussion_notes
diff --git a/app/views/projects/notes/_discussion_reply_button.html.haml b/app/views/projects/notes/_discussion_reply_button.html.haml
deleted file mode 100644
index d1c5ccc29db..00000000000
--- a/app/views/projects/notes/_discussion_reply_button.html.haml
+++ /dev/null
@@ -1,10 +0,0 @@
-= link_to "javascript:;",
- class: "btn reply-btn js-discussion-reply-button",
- data: { noteable_type: note.noteable_type,
- noteable_id: note.noteable_id,
- commit_id: note.commit_id,
- line_code: note.line_code,
- discussion_id: note.discussion_id },
- title: "Add a reply" do
- %i.icon-comment
- Reply
diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml
index b62aada3a9a..5ebafb13f1c 100644
--- a/app/views/projects/notes/_form.html.haml
+++ b/app/views/projects/notes/_form.html.haml
@@ -17,8 +17,8 @@
= f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input markdown-area'
.light.clearfix
- .pull-left Comments are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}
- .pull-right Attach images (JPG, PNG, GIF) by dragging &amp; dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }.
+ .pull-left Comments are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }}
+ .pull-right Attach images (JPG, PNG, GIF) by dragging &amp; dropping or #{link_to "selecting them", '#', class: 'markdown-selector', tabindex: -1 }.
.note-preview-holder.hide
.js-note-preview
diff --git a/app/views/projects/notes/discussions/_active.html.haml b/app/views/projects/notes/discussions/_active.html.haml
new file mode 100644
index 00000000000..ef296b35dd5
--- /dev/null
+++ b/app/views/projects/notes/discussions/_active.html.haml
@@ -0,0 +1,21 @@
+- note = discussion_notes.first
+.discussion.js-toggle-container{ class: note.discussion_id }
+ .discussion-header
+ .discussion-actions
+ = link_to "#", class: "js-toggle-button" do
+ %i.icon-chevron-up
+ Show/hide discussion
+ = image_tag avatar_icon(note.author_email), class: "avatar s32"
+ %div
+ = link_to_member(@project, note.author, avatar: false)
+ started a discussion
+ = link_to diffs_project_merge_request_path(note.project, note.noteable, anchor: note.line_code) do
+ %strong on the diff
+ .last-update.hide.js-toggle-content
+ - last_note = discussion_notes.last
+ last updated by
+ = link_to_member(@project, last_note.author, avatar: false)
+ %span.discussion-last-update
+ #{time_ago_with_tooltip(last_note.updated_at, 'bottom', 'discussion_updated_ago')}
+ .discussion-body.js-toggle-content
+ = render "projects/notes/discussions/diff", discussion_notes: discussion_notes, note: note
diff --git a/app/views/projects/notes/discussions/_commit.html.haml b/app/views/projects/notes/discussions/_commit.html.haml
new file mode 100644
index 00000000000..78460974a9b
--- /dev/null
+++ b/app/views/projects/notes/discussions/_commit.html.haml
@@ -0,0 +1,28 @@
+- note = discussion_notes.first
+.discussion.js-toggle-container{ class: note.discussion_id }
+ .discussion-header
+ .discussion-actions
+ = link_to "#", class: "js-toggle-button" do
+ %i.icon-chevron-up
+ Show/hide discussion
+ = image_tag avatar_icon(note.author_email), class: "avatar s32"
+ %div
+ = link_to_member(@project, note.author, avatar: false)
+ started a discussion on commit
+ = link_to(note.noteable.short_id, project_commit_path(note.project, note.noteable), class: 'monospace')
+ .last-update.hide.js-toggle-content
+ - last_note = discussion_notes.last
+ last updated by
+ = link_to_member(@project, last_note.author, avatar: false)
+ %span.discussion-last-update
+ #{time_ago_with_tooltip(last_note.updated_at, 'bottom', 'discussion_updated_ago')}
+ .discussion-body.js-toggle-content
+ - if note.for_diff_line?
+ = render "projects/notes/discussions/diff", discussion_notes: discussion_notes, note: note
+ - else
+ .panel.panel-default
+ .notes{ rel: discussion_notes.first.discussion_id }
+ = render discussion_notes
+ .discussion-reply-holder
+ = link_to_reply_diff(discussion_notes.first)
+
diff --git a/app/views/projects/notes/_discussion_diff.html.haml b/app/views/projects/notes/discussions/_diff.html.haml
index 26c5494f466..26c5494f466 100644
--- a/app/views/projects/notes/_discussion_diff.html.haml
+++ b/app/views/projects/notes/discussions/_diff.html.haml
diff --git a/app/views/projects/notes/discussions/_outdated.html.haml b/app/views/projects/notes/discussions/_outdated.html.haml
new file mode 100644
index 00000000000..67c29be8ac1
--- /dev/null
+++ b/app/views/projects/notes/discussions/_outdated.html.haml
@@ -0,0 +1,20 @@
+- note = discussion_notes.first
+.discussion.js-toggle-container{ class: note.discussion_id }
+ .discussion-header
+ .discussion-actions
+ = link_to "#", class: "js-toggle-button" do
+ %i.icon-chevron-down
+ Show/hide discussion
+ = image_tag avatar_icon(note.author_email), class: "avatar s32"
+ %div
+ = link_to_member(@project, note.author, avatar: false)
+ started a discussion on the
+ %strong outdated diff
+ %div
+ - last_note = discussion_notes.last
+ last updated by
+ = link_to_member(@project, last_note.author, avatar: false)
+ %span.discussion-last-update
+ #{time_ago_with_tooltip(last_note.updated_at, 'bottom', 'discussion_updated_ago')}
+ .discussion-body.js-toggle-content.hide
+ = render "projects/notes/discussions/diff", discussion_notes: discussion_notes, note: note
diff --git a/app/views/projects/repositories/_download_archive.html.haml b/app/views/projects/repositories/_download_archive.html.haml
index 88c1cfa28e0..0bf59a20384 100644
--- a/app/views/projects/repositories/_download_archive.html.haml
+++ b/app/views/projects/repositories/_download_archive.html.haml
@@ -34,4 +34,4 @@
%span zip
= link_to archive_project_repository_path(@project, ref: ref, format: 'tar.gz'), class: 'btn', rel: 'nofollow' do
%i.icon-download-alt
- %span tar.gz \ No newline at end of file
+ %span tar.gz
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 7e9f1122aa9..c4e5087b0a1 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -1,12 +1,12 @@
= render "home_panel"
.row
- .col-md-9
+ %section.col-md-9
= render "events/event_last_push", event: @last_push
= render 'shared/event_filter'
.content_list
= spinner
- .col-md-3.project-side.hidden-sm.hidden-xs
+ %aside.col-md-3.project-side.hidden-sm.hidden-xs
.clearfix
- if @project.archived?
.alert.alert-warning
@@ -44,6 +44,12 @@
= link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)), class: 'btn btn-block' do
= readme.name
+ - if @repository.version
+ - version = @repository.version
+ = link_to project_blob_path(@project, tree_join(@repository.root_ref, version.name)), class: 'btn btn-block' do
+ Version:
+ = @repository.blob_by_oid(version.id).data
+
.prepend-top-10
%p
%span.light Created on
diff --git a/app/views/projects/tree/_blob_item.html.haml b/app/views/projects/tree/_blob_item.html.haml
index 0971a426527..393ef0e24bd 100644
--- a/app/views/projects/tree/_blob_item.html.haml
+++ b/app/views/projects/tree/_blob_item.html.haml
@@ -5,4 +5,4 @@
= link_to blob_item.name, project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name))
%td.tree_time_ago.cgray
= render 'spinner'
- %td.hidden-xs.tree_commit{ colspan: 2 }
+ %td.hidden-xs.tree_commit
diff --git a/app/views/projects/tree/_readme.html.haml b/app/views/projects/tree/_readme.html.haml
index 0c19109445a..c066b7102fd 100644
--- a/app/views/projects/tree/_readme.html.haml
+++ b/app/views/projects/tree/_readme.html.haml
@@ -1,4 +1,4 @@
-.readme-holder#README
+%article.readme-holder#README
%h4.readme-file-title
%i.icon-file
= readme.name
diff --git a/app/views/projects/tree/_tree_item.html.haml b/app/views/projects/tree/_tree_item.html.haml
index 760e95e84f0..f8cecf9be1f 100644
--- a/app/views/projects/tree/_tree_item.html.haml
+++ b/app/views/projects/tree/_tree_item.html.haml
@@ -5,4 +5,4 @@
= link_to tree_item.name, project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name))
%td.tree_time_ago.cgray
= render 'spinner'
- %td.hidden-xs.tree_commit{ colspan: 2 }
+ %td.hidden-xs.tree_commit
diff --git a/app/views/public/projects/index.html.haml b/app/views/public/projects/index.html.haml
deleted file mode 100644
index 624ec0b9b95..00000000000
--- a/app/views/public/projects/index.html.haml
+++ /dev/null
@@ -1,68 +0,0 @@
-%h3.page-title
- Projects (#{@projects.total_count})
-.light
- You can browse public projects in read-only mode until signed in.
-%hr
-.clearfix
- .pull-left
- = form_tag public_projects_path, method: :get, class: 'form-inline form-tiny' do |f|
- .form-group
- = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input input-mn-300", id: "projects_search"
- .form-group
- = submit_tag 'Search', class: "btn btn-primary wide"
-
- .pull-right
- .dropdown.inline
- %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
- %span.light sort:
- - if @sort.present?
- = @sort.humanize
- - else
- Name
- %b.caret
- %ul.dropdown-menu
- %li
- = link_to public_projects_path(sort: nil) do
- Name
- = link_to public_projects_path(sort: 'newest') do
- Newest
- = link_to public_projects_path(sort: 'oldest') do
- Oldest
- = link_to public_projects_path(sort: 'recently_updated') do
- Recently updated
- = link_to public_projects_path(sort: 'last_updated') do
- Last updated
-
-%hr
-.public-projects
- %ul.bordered-list.top-list
- - @projects.each do |project|
- %li
- %h4
- = link_to project_path(project) do
- = project.name_with_namespace
- - if project.internal?
- %small.access-icon
- = internal_icon
- Internal
- .pull-right
- %pre.public-clone git clone #{project.http_url_to_repo}
-
- - if project.description.present?
- %p
- = project.description
-
- .repo-info
- - unless project.empty_repo?
- = link_to pluralize(project.repository.round_commit_count, 'commit'), project_commits_path(project, project.default_branch)
- &middot;
- = link_to pluralize(project.repository.branch_names.count, 'branch'), project_branches_path(project)
- &middot;
- = link_to pluralize(project.repository.tag_names.count, 'tag'), project_tags_path(project)
- - else
- %i.icon-warning-sign
- Empty repository
- - unless @projects.present?
- .nothing-here-block No public projects
-
- = paginate @projects, theme: "gitlab"
diff --git a/app/views/search/_project_results.html.haml b/app/views/search/_project_results.html.haml
index f285bda5736..af3b97879c7 100644
--- a/app/views/search/_project_results.html.haml
+++ b/app/views/search/_project_results.html.haml
@@ -15,3 +15,4 @@
%ul.bordered-list
= render partial: "search/results/merge_request", collection: @search_results[:merge_requests]
= render partial: "search/results/issue", collection: @search_results[:issues]
+ = render partial: "search/results/note", collection: @search_results[:notes]
diff --git a/app/views/search/results/_issue.html.haml b/app/views/search/results/_issue.html.haml
index 7a24b76bced..8147cf272fb 100644
--- a/app/views/search/results/_issue.html.haml
+++ b/app/views/search/results/_issue.html.haml
@@ -6,4 +6,4 @@
= truncate issue.title, length: 50
%span.light (#{issue.project.name_with_namespace})
- if issue.closed?
- %span.label Closed
+ %span.label.label-danger Closed
diff --git a/app/views/search/results/_merge_request.html.haml b/app/views/search/results/_merge_request.html.haml
index 22d7587f6c1..de2a79970c1 100644
--- a/app/views/search/results/_merge_request.html.haml
+++ b/app/views/search/results/_merge_request.html.haml
@@ -8,5 +8,7 @@
%span.light (#{merge_request.source_project.name_with_namespace}:#{merge_request.source_branch} &rarr; #{merge_request.target_project.name_with_namespace}:#{merge_request.target_branch})
- else
%span.light (#{merge_request.source_branch} &rarr; #{merge_request.target_branch})
- - if merge_request.closed?
- %span.label Closed
+ - if merge_request.merged?
+ %span.label.label-primary Merged
+ - elsif merge_request.closed?
+ %span.label.label-danger Closed
diff --git a/app/views/search/results/_note.html.haml b/app/views/search/results/_note.html.haml
new file mode 100644
index 00000000000..97e892bdd4d
--- /dev/null
+++ b/app/views/search/results/_note.html.haml
@@ -0,0 +1,9 @@
+%li
+ note on issue:
+ = link_to [note.project, note.noteable] do
+ %span ##{note.noteable.iid}
+ %strong.term
+ = truncate note.noteable.title, length: 50
+ %span.light (#{note.project.name_with_namespace})
+ - if note.noteable.closed?
+ %span.label Closed
diff --git a/app/views/shared/_filter.html.haml b/app/views/shared/_filter.html.haml
index 19ecc458e29..9e65ce11ade 100644
--- a/app/views/shared/_filter.html.haml
+++ b/app/views/shared/_filter.html.haml
@@ -6,12 +6,18 @@
%li{class: ("active" if params[:scope] == 'assigned-to-me')}
= link_to filter_path(entity, scope: 'assigned-to-me') do
Assigned to me
+ %span.pull-right
+ = assigned_entities_count(current_user, entity, @group)
%li{class: ("active" if params[:scope] == 'authored')}
= link_to filter_path(entity, scope: 'authored') do
Created by me
+ %span.pull-right
+ = authored_entities_count(current_user, entity, @group)
%li{class: ("active" if params[:scope] == 'all')}
= link_to filter_path(entity, scope: 'all') do
Everyone's
+ %span.pull-right
+ = authorized_entities_count(current_user, entity, @group)
%fieldset.status-filter
%legend State
diff --git a/app/views/shared/_project_filter.html.haml b/app/views/shared/_project_filter.html.haml
index 743b4fba542..38cb1208cdc 100644
--- a/app/views/shared/_project_filter.html.haml
+++ b/app/views/shared/_project_filter.html.haml
@@ -6,12 +6,18 @@
%li{class: ("active" if params[:scope] == 'all')}
= link_to project_filter_path(scope: 'all') do
Everyone's
+ %span.pull-right
+ = authorized_entities_count(current_user, entity, @project)
%li{class: ("active" if params[:scope] == 'assigned-to-me')}
= link_to project_filter_path(scope: 'assigned-to-me') do
Assigned to me
+ %span.pull-right
+ = assigned_entities_count(current_user, entity, @project)
%li{class: ("active" if params[:scope] == 'created-by-me')}
= link_to project_filter_path(scope: 'created-by-me') do
Created by me
+ %span.pull-right
+ = authored_entities_count(current_user, entity, @project)
%fieldset
%legend State
diff --git a/app/views/users/_groups.html.haml b/app/views/users/_groups.html.haml
index 412df943fcc..09b2985d498 100644
--- a/app/views/users/_groups.html.haml
+++ b/app/views/users/_groups.html.haml
@@ -1,3 +1,3 @@
- groups.each do |group|
= link_to group, class: 'profile-groups-avatars', :title => group.name do
- = image_tag group_icon(group.path) \ No newline at end of file
+ = image_tag group_icon(group.path)
diff --git a/app/workers/repository_import_worker.rb b/app/workers/repository_import_worker.rb
index e66df8c4db1..43ef54631a9 100644
--- a/app/workers/repository_import_worker.rb
+++ b/app/workers/repository_import_worker.rb
@@ -14,8 +14,9 @@ class RepositoryImportWorker
project.import_finish
project.save
project.satellite.create unless project.satellite.exists?
+ project.update_repository_size
else
project.import_fail
end
end
-end
+end \ No newline at end of file
diff --git a/config/application.rb b/config/application.rb
index 540426b6672..58a5949c653 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -18,15 +18,6 @@ module Gitlab
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
- # Activate observers that should always be running.
- config.active_record.observers = :project_activity_cache_observer,
- :note_observer,
- :project_observer,
- :system_hook_observer,
- :user_observer,
- :users_group_observer,
- :users_project_observer
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
@@ -50,12 +41,6 @@ module Gitlab
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
- # Enforce whitelist mode for mass assignment.
- # This will create an empty whitelist of attributes available for mass-assignment for all models
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
- # parameters by using an attr_accessible or attr_protected declaration.
- config.active_record.whitelist_attributes = true
-
# Enable the asset pipeline
config.assets.enabled = true
config.assets.paths << Emoji.images_path
diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql
index 66960551cfd..7067e0fe402 100644
--- a/config/database.yml.postgresql
+++ b/config/database.yml.postgresql
@@ -10,7 +10,6 @@ production:
# password:
# host: localhost
# port: 5432
- # socket: /tmp/postgresql.sock
#
# Development specific
@@ -22,7 +21,6 @@ development:
pool: 5
username: postgres
password:
- # socket: /tmp/postgresql.sock
#
# Staging specific
@@ -34,7 +32,6 @@ staging:
pool: 5
username: postgres
password:
- # socket: /tmp/postgresql.sock
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
@@ -46,4 +43,3 @@ test: &test
pool: 5
username: postgres
password:
- # socket: /tmp/postgresql.sock
diff --git a/config/environments/development.rb b/config/environments/development.rb
index e4c7649fda0..356e26bd68c 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -19,9 +19,6 @@ Gitlab::Application.configure do
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
- # Raise exception on mass assignment protection for Active Record models
- config.active_record.mass_assignment_sanitizer = :strict
-
# Do not compress assets
config.assets.compress = false
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 3860dc5c74c..25b082b98da 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -26,9 +26,6 @@ Gitlab::Application.configure do
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
- # Raise exception on mass assignment protection for Active Record models
- # config.active_record.mass_assignment_sanitizer = :strict
-
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
diff --git a/config/gitlab.teatro.yml b/config/gitlab.teatro.yml
new file mode 100644
index 00000000000..f0656400beb
--- /dev/null
+++ b/config/gitlab.teatro.yml
@@ -0,0 +1,86 @@
+
+production: &base
+ gitlab:
+ host: localhost
+ port: 80
+ https: false
+
+ user: root
+
+ email_from: example@example.com
+
+ support_email: support@example.com
+
+ default_projects_features:
+ issues: true
+ merge_requests: true
+ wiki: true
+ wall: false
+ snippets: false
+ visibility_level: "private" # can be "private" | "internal" | "public"
+
+ issues_tracker:
+
+ gravatar:
+ enabled: true # Use user avatar image from Gravatar.com (default: true)
+
+ ldap:
+ enabled: false
+ host: '_your_ldap_server'
+ port: 636
+ uid: 'sAMAccountName'
+ method: 'ssl' # "tls" or "ssl" or "plain"
+ bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
+ password: '_the_password_of_the_bind_user'
+ allow_username_or_email_login: true
+
+ base: ''
+
+ user_filter: ''
+
+ omniauth:
+ enabled: false
+
+ satellites:
+ # Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
+ path: /apps/gitlab-satellites/
+
+ backup:
+ path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
+
+ gitlab_shell:
+ path: /apps/gitlab-shell/
+
+ # REPOS_PATH MUST NOT BE A SYMLINK!!!
+ repos_path: /apps/repositories/
+ hooks_path: /apps/gitlab-shell/hooks/
+
+ upload_pack: true
+ receive_pack: true
+
+ git:
+ bin_path: /usr/bin/git
+ max_size: 5242880 # 5.megabytes
+ timeout: 10
+
+ extra:
+
+development:
+ <<: *base
+
+test:
+ <<: *base
+ gravatar:
+ enabled: true
+ gitlab:
+ host: localhost
+ port: 80
+ issues_tracker:
+ redmine:
+ title: "Redmine"
+ project_url: "http://redmine/projects/:issues_tracker_id"
+ issues_url: "http://redmine/:project_id/:issues_tracker_id/:id"
+ new_issue_url: "http://redmine/projects/:issues_tracker_id/issues/new"
+
+staging:
+ <<: *base
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 806984e8d40..250a4908c58 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -49,14 +49,15 @@ production: &base
## COLOR = 5
# default_theme: 2 # default: 2
-
- ## Users management
- # default: false - Account passwords are not sent via the email if signup is enabled.
+ ## Users can create accounts
+ # This also allows normal users to sign up for accounts themselves
+ # default: false - By default GitLab administrators must create all new accounts
# signup_enabled: true
- #
- # default: true - If set to false, standard login form won't be shown on the sign-in page
- # signin_enabled: false
+ ## Standard login settings
+ # The standard login can be disabled to force login via LDAP
+ # default: true - If set to false the standard login form won't be shown on the sign-in page
+ # signin_enabled: false
# Restrict setting visibility levels for non-admin users.
# The default is to allow all levels.
@@ -196,6 +197,7 @@ production: &base
satellites:
# Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
path: /home/git/gitlab-satellites/
+ timeout: 30
## Backup settings
backup:
@@ -225,7 +227,7 @@ production: &base
# The next value is the maximum memory size grit can use
# Given in number of bytes per git object (e.g. a commit)
# This value can be increased if you have very large commits
- max_size: 5242880 # 5.megabytes
+ max_size: 20971520 # 20.megabytes
# Git timeout to read a commit, in seconds
timeout: 10
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index f55e69c08f6..49e35d5bb68 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -139,6 +139,7 @@ Settings.git['timeout'] ||= 10
Settings['satellites'] ||= Settingslogic.new({})
Settings.satellites['path'] = File.expand_path(Settings.satellites['path'] || "tmp/repo_satellites/", Rails.root)
+Settings.satellites['timeout'] ||= 30
#
# Extra customization
@@ -150,6 +151,6 @@ Settings['extra'] ||= Settingslogic.new({})
#
if Rails.env.test?
Settings.gitlab['default_projects_limit'] = 42
- Settings.gitlab['default_can_create_group'] = false
+ Settings.gitlab['default_can_create_group'] = true
Settings.gitlab['default_can_create_team'] = false
end
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 50669ece7a8..34f4f386988 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -155,10 +155,6 @@ Devise.setup do |config|
# REST_AUTH_SITE_KEY to pepper)
# config.encryptor = :sha512
- # ==> Configuration for :token_authenticatable
- # Defines name of the authentication token params key
- config.token_authentication_key = :private_token
-
# Authentication through token does not store user in session and needs
# to be supplied on each request. Useful if you are using the token as API token.
config.skip_session_storage << :token_auth
diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml
index 275273a0b12..1cbcde5b3da 100644
--- a/config/locales/devise.en.yml
+++ b/config/locales/devise.en.yml
@@ -25,6 +25,9 @@ en:
sessions:
signed_in: 'Signed in successfully.'
signed_out: 'Signed out successfully.'
+ users_sessions:
+ user:
+ signed_in: 'Signed in successfully.'
passwords:
send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
updated: 'Your password was changed successfully. You are now signed in.'
diff --git a/config/routes.rb b/config/routes.rb
index 746e532a0ec..f54f9ea5341 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -47,13 +47,23 @@ Gitlab::Application.routes.draw do
get "/s/:username" => "snippets#user_index", as: :user_snippets, constraints: { username: /.*/ }
#
- # Public namespace
+ # Explroe area
#
- namespace :public do
- resources :projects, only: [:index]
- root to: "projects#index"
+ namespace :explore do
+ resources :projects, only: [:index] do
+ collection do
+ get :trending
+ end
+ end
+
+ resources :groups, only: [:index]
+ root to: "projects#trending"
end
+ # Compatibility with old routing
+ get 'public' => "explore/projects#index"
+ get 'public/projects' => "explore/projects#index"
+
#
# Attachments serving
#
@@ -68,6 +78,7 @@ Gitlab::Application.routes.draw do
put :team_update
put :block
put :unblock
+ delete 'remove/:email_id', action: 'remove_email', as: 'remove_email'
end
end
@@ -150,15 +161,20 @@ Gitlab::Application.routes.draw do
end
resources :users_groups, only: [:create, :update, :destroy]
+
scope module: :groups do
resource :avatar, only: [:destroy]
+ resources :milestones
end
end
resources :projects, constraints: { id: /[^\/]+/ }, only: [:new, :create]
- devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, registrations: :registrations , passwords: :passwords}
+ devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, registrations: :registrations , passwords: :passwords, sessions: :sessions }
+ devise_scope :user do
+ get "/users/auth/:provider/omniauth_error" => "omniauth_callbacks#omniauth_error", as: :omniauth_error
+ end
#
# Project Area
#
diff --git a/db/fixtures/development/01_admin.rb b/db/fixtures/development/01_admin.rb
index 42d18435340..176845fd8a8 100644
--- a/db/fixtures/development/01_admin.rb
+++ b/db/fixtures/development/01_admin.rb
@@ -2,7 +2,7 @@ User.seed(:id, [
{
id: 1,
name: "Administrator",
- email: "admin@local.host",
+ email: "admin@example.com",
username: 'root',
password: "5iveL!fe",
password_confirmation: "5iveL!fe",
diff --git a/db/fixtures/production/001_admin.rb b/db/fixtures/production/001_admin.rb
index a919fad7040..c00ba3c10ba 100644
--- a/db/fixtures/production/001_admin.rb
+++ b/db/fixtures/production/001_admin.rb
@@ -1,5 +1,5 @@
admin = User.create(
- email: "admin@local.host",
+ email: "admin@example.com",
name: "Administrator",
username: 'root',
password: "5iveL!fe",
@@ -18,7 +18,7 @@ if admin.valid?
puts %q[
Administrator account created:
-login.........admin@local.host
+login.........root
password......5iveL!fe
]
end
diff --git a/db/migrate/20140407135544_fix_namespaces.rb b/db/migrate/20140407135544_fix_namespaces.rb
index 8c4f2b0f6b1..59665d538f0 100644
--- a/db/migrate/20140407135544_fix_namespaces.rb
+++ b/db/migrate/20140407135544_fix_namespaces.rb
@@ -7,4 +7,4 @@ class FixNamespaces < ActiveRecord::Migration
def down
end
-end \ No newline at end of file
+end
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md
index 27c0d644e11..a46472a0812 100644
--- a/doc/api/merge_requests.md
+++ b/doc/api/merge_requests.md
@@ -30,7 +30,7 @@ Parameters:
"author": {
"id": 1,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
@@ -38,7 +38,7 @@ Parameters:
"assignee": {
"id": 1,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
@@ -74,7 +74,7 @@ Parameters:
"author": {
"id": 1,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
@@ -82,7 +82,7 @@ Parameters:
"assignee": {
"id": 1,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
@@ -120,7 +120,7 @@ Parameters:
"author": {
"id": 1,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
@@ -128,7 +128,7 @@ Parameters:
"assignee": {
"id": 1,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
@@ -167,7 +167,7 @@ Parameters:
"author": {
"id": 1,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
@@ -175,7 +175,7 @@ Parameters:
"assignee": {
"id": 1,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
@@ -218,7 +218,7 @@ Parameters:
"author": {
"id": 1,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
@@ -226,7 +226,7 @@ Parameters:
"assignee": {
"id": 1,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
@@ -253,7 +253,7 @@ Parameters:
"author": {
"id": 1,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"blocked": false,
"created_at": "2012-04-29T08:46:00Z"
@@ -282,7 +282,7 @@ Parameters:
"author": {
"id": 11,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2014-03-06T08:17:35.000Z"
@@ -293,7 +293,7 @@ Parameters:
"author": {
"id": 11,
"username": "admin",
- "email": "admin@local.host",
+ "email": "admin@example.com",
"name": "Administrator",
"state": "active",
"created_at": "2014-03-06T08:17:35.000Z"
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index 26ae3e87232..2539e3edbf9 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -220,3 +220,32 @@ Response:
"compare_same_ref": false
}
```
+
+## Contributors
+
+Get repository contributors list
+
+```
+GET /projects/:id/repository/contributors
+```
+
+Parameters:
++ `id` (required) - The ID of a project
+
+Response:
+
+```
+[{
+ "name": "Dmitriy Zaporozhets",
+ "email": "dmitriy.zaporozhets@gmail.com",
+ "commits": 117,
+ "additions": 2097,
+ "deletions": 517
+}, {
+ "name": "Jacob Vosmaer",
+ "email": "contact@jacobvosmaer.nl",
+ "commits": 33,
+ "additions": 338,
+ "deletions": 244
+}]
+```
diff --git a/doc/api/users.md b/doc/api/users.md
index 4ddbf739774..57078353fd0 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -6,7 +6,7 @@ Get a list of users.
This function takes pagination parameters `page` and `per_page` to restrict the list of users.
-### For normal users:
+### For normal users
```
GET /users
@@ -31,8 +31,7 @@ GET /users
]
```
-
-### For admins:
+### For admins
```
GET /users
@@ -84,7 +83,7 @@ GET /users
]
```
-You can search for a users by email or username with: `/users?search=John`
+You can search for users by email or username with: `/users?search=John`
Also see `def search query` in `app/models/user.rb`.
@@ -92,7 +91,7 @@ Also see `def search query` in `app/models/user.rb`.
Get a single user.
-#### For user:
+### For user
```
GET /users/:id
@@ -112,8 +111,7 @@ Parameters:
}
```
-
-#### For admin:
+### For admin
```
GET /users/:id
@@ -161,13 +159,13 @@ Parameters:
- `username` (required) - Username
- `name` (required) - Name
- `skype` (optional) - Skype ID
-- `linkedin` (optional) - Linkedin
+- `linkedin` (optional) - LinkedIn
- `twitter` (optional) - Twitter account
-- `website_url` (optional) - Website url
+- `website_url` (optional) - Website URL
- `projects_limit` (optional) - Number of projects user can create
- `extern_uid` (optional) - External UID
- `provider` (optional) - External provider name
-- `bio` (optional) - User's bio
+- `bio` (optional) - User's biography
- `admin` (optional) - User is admin - true or false (default)
- `can_create_group` (optional) - User can create groups - true or false
@@ -181,26 +179,32 @@ PUT /users/:id
Parameters:
-- `email` - Email
-- `username` - Username
-- `name` - Name
-- `password` - Password
-- `skype` - Skype ID
-- `linkedin` - Linkedin
-- `twitter` - Twitter account
-- `website_url` - Website url
-- `projects_limit` - Limit projects each user can create
-- `extern_uid` - External UID
-- `provider` - External provider name
-- `bio` - User's bio
-- `admin` (optional) - User is admin - true or false (default)
-- `can_create_group` (optional) - User can create groups - true or false
-
-Note, at the moment this method does only return a 404 error, even in cases where a 409 (Conflict) would be more appropriate, e.g. when renaming the email address to some existing one.
+- `email` - Email
+- `username` - Username
+- `name` - Name
+- `password` - Password
+- `skype` - Skype ID
+- `linkedin` - LinkedIn
+- `twitter` - Twitter account
+- `website_url` - Website URL
+- `projects_limit` - Limit projects each user can create
+- `extern_uid` - External UID
+- `provider` - External provider name
+- `bio` - User's biography
+- `admin` (optional) - User is admin - true or false (default)
+- `can_create_group` (optional) - User can create groups - true or false
+
+Note, at the moment this method does only return a 404 error,
+even in cases where a 409 (Conflict) would be more appropriate,
+e.g. when renaming the email address to some existing one.
## User deletion
-Deletes a user. Available only for administrators. This is an idempotent function, calling this function for a non-existent user id still returns a status code `200 Ok`. The JSON response differs if the user was actually deleted or not. In the former the user is returned and in the latter not.
+Deletes a user. Available only for administrators.
+This is an idempotent function, calling this function for a non-existent user id
+still returns a status code `200 Ok`.
+The JSON response differs if the user was actually deleted or not.
+In the former the user is returned and in the latter not.
```
DELETE /users/:id
@@ -310,7 +314,7 @@ POST /user/keys
Parameters:
- `title` (required) - new SSH Key's title
-- `key` (required) - new SSH key
+- `key` (required) - new SSH key
## Add SSH key for user
@@ -322,15 +326,17 @@ POST /users/:id/keys
Parameters:
-- `id` (required) - id of specified user
+- `id` (required) - id of specified user
- `title` (required) - new SSH Key's title
-- `key` (required) - new SSH key
+- `key` (required) - new SSH key
Will return created key with status `201 Created` on success, or `404 Not found` on fail.
## Delete SSH key for current user
-Deletes key owned by currently authenticated user. This is an idempotent function and calling it on a key that is already deleted or not available results in `200 Ok`.
+Deletes key owned by currently authenticated user.
+This is an idempotent function and calling it on a key that is already deleted
+or not available results in `200 Ok`.
```
DELETE /user/keys/:id
@@ -351,6 +357,6 @@ DELETE /users/:uid/keys/:id
Parameters:
- `uid` (required) - id of specified user
-- `id` (required) - SSH key ID
+- `id` (required) - SSH key ID
Will return `200 Ok` on success, or `404 Not found` if either user or key cannot be found.
diff --git a/doc/development/gitlab_diagram_overview.odg b/doc/development/gitlab_diagram_overview.odg
index b7e02f8fa78..9bfc7313ff4 100644
--- a/doc/development/gitlab_diagram_overview.odg
+++ b/doc/development/gitlab_diagram_overview.odg
Binary files differ
diff --git a/doc/development/gitlab_diagram_overview.png b/doc/development/gitlab_diagram_overview.png
index b5831cf0a4c..d9b9eed3d8f 100644
--- a/doc/development/gitlab_diagram_overview.png
+++ b/doc/development/gitlab_diagram_overview.png
Binary files differ
diff --git a/doc/install/installation.md b/doc/install/installation.md
index 1b5139e8bb9..73b5fbb0c33 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -95,8 +95,8 @@ Remove the old Ruby 1.8 if present
Download Ruby and compile it:
mkdir /tmp/ruby && cd /tmp/ruby
- curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p481.tar.gz | tar xz
- cd ruby-2.0.0-p481
+ curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz
+ cd ruby-2.1.2
./configure --disable-install-rdoc
make
sudo make install
@@ -141,12 +141,12 @@ We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](da
### Clone the Source
# Clone GitLab repository
- sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-0-stable gitlab
+ sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-1-stable gitlab
# Go to gitlab dir
cd /home/git/gitlab
-**Note:** You can change `7-0-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server!
+**Note:** You can change `7-1-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server!
### Configure it
@@ -243,7 +243,7 @@ GitLab Shell is an ssh access and repository management software developed speci
# By default, the gitlab-shell config is generated from your main gitlab config.
#
# Note: When using GitLab with HTTPS please change the following:
- # - Provide paths to the certificates under `ca_file` and `ca_path options.
+ # - Provide paths to the certificates under `ca_file` and `ca_path` options.
# - The `gitlab_url` option must point to the https endpoint of GitLab.
# - In case you are using self signed certificate set `self_signed_cert` to `true`.
# See #using-https for all necessary details.
@@ -331,6 +331,8 @@ To make sure you didn't miss anything run a more thorough check with:
If all items are green, then congratulations on successfully installing GitLab!
+NOTE: Supply `SANITIZE=true` environment variable to `gitlab:check` to omit project names from the output of the check command.
+
### Initial Login
Visit YOUR_SERVER in your web browser for your first GitLab login. The setup has created an admin account for you. You can use it to log in:
diff --git a/doc/install/requirements.md b/doc/install/requirements.md
index d7c4c4da2ed..10370d54fb1 100644
--- a/doc/install/requirements.md
+++ b/doc/install/requirements.md
@@ -2,9 +2,7 @@
## Operating Systems
-GitLab is developed for the Linux operating system. For the installations options and instructions please see [the installation section of the readme](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md#installation).
-
-### Supported Linux distributions
+### Supported Unix distributions
- Ubuntu
- Debian
@@ -13,36 +11,29 @@ GitLab is developed for the Linux operating system. For the installations option
- Scientific Linux
- Oracle Linux
-### Unsupported Linux distributions
+For the installations options please see [the installation page on the GitLab website](https://about.gitlab.com/installation/).
+
+### Unsupported Unix distributions
+- OS X
- Arch Linux
- Fedora
- Gentoo
+- FreeBSD
-But on the above unsupported distributions is still possible to install GitLab yourself with the [manual installation guide](https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md).
-
-### Unsupported Unix operating systems
-
-There is nothing that prevents GitLab from running on other Unix operating systems.
+On the above unsupported distributions is still possible to install GitLab yourself.
+Please see the [manual installation guide](https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md) and the [unofficial installation guides](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Unofficial-Installation-Guides) on the public wiki for more information.
-This means you may get it to work on systems running FreeBSD or OS X.
-
-If you want to do this, please be aware it could be a lot of work.
-
-Please consider using a virtual machine to run GitLab.
-
-### Other operating systems such as Windows
+### Non Unix operating systems such as Windows
+GitLab is developed for Unix operating systems.
GitLab does **not** run on Windows and we have no plans of supporting it in the near future.
-
Please consider using a virtual machine to run GitLab.
## Ruby versions
GitLab requires Ruby (MRI) 2.0 or 2.1
-
You will have to use the standard MRI implementation of Ruby.
-
We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab needs several Gems that have native extensions.
## Hardware requirements
@@ -59,7 +50,11 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab
### Memory
-- 512MB is the absolute minimum but we do not recommend this amount of memory, you'll need to configure a minimum swap of 256MB, you're memory will only allow you to run one slow unicorn worker, things will case only git ssh access to work because the git http access requires two running workers (one to receive the user request and one for the authorization check),
+- 512MB is the absolute minimum but we do not recommend this amount of memory.
+You will either need to configure a minimum swap of 256MB and this will only allow you to run one slow unicorn worker.
+One unicorn worker will cause only git ssh access to work because the git http access requires two running workers.
+It requires one worker to receive the user request and one worker for the authorization check.
+Or if you use SSD you can configure 2GB of swap to use two Unicorn workers and have slow operation with http access.
- 1GB supports up to 100 users (with individual repositories under 250MB, otherwise git memory usage necessitates configuring swap space)
- **2GB** is the **recommended** memory size and supports up to 500 users
- 4GB supports up to 2,000 users
@@ -80,7 +75,15 @@ If you have enough RAM memory and a recent CPU the speed of GitLab is mainly lim
## Database
-If you want to run the database separately, the **recommended** database size is **1 MB per user**
+If you want to run the database separately, the **recommended** database size is **1 MB per user**.
+
+## Redis and Sidekiq
+
+Redis stores all user sessions and the background task queue.
+The storage requirements for Redis are minimal, about 25kB per user.
+Sidekiq processes the background jobs with a multithreaded process.
+This process starts with the entire Rails stack (200MB+) but it can grow over time due to memory leaks.
+On a very active server (10.000 active users) the Sidekiq process can use 1GB+ of memory.
## Supported webbrowsers
diff --git a/doc/markdown/markdown.md b/doc/markdown/markdown.md
index 64f571b4351..2565acb8eff 100644
--- a/doc/markdown/markdown.md
+++ b/doc/markdown/markdown.md
@@ -4,39 +4,25 @@
**[GitLab Flavored Markdown](#gitlab-flavored-markdown-gfm)**
-[Newlines](#newlines)
-
-[Multiple underscores in words](#multiple-underscores-in-words)
-
-[URL autolinking](#url-autolinking)
-
-[Code and Syntax Highlighting](#code-and-syntax-highlighting)
-
-[Emoji](#emoji)
-
-[Special GitLab references](#special-gitlab-references)
+* [Newlines](#newlines)
+* [Multiple underscores in words](#multiple-underscores-in-words)
+* [URL autolinking](#url-autolinking)
+* [Code and Syntax Highlighting](#code-and-syntax-highlighting)
+* [Emoji](#emoji)
+* [Special GitLab references](#special-gitlab-references)
**[Standard Markdown](#standard-markdown)**
-[Headers](#headers)
-
-[Emphasis](#emphasis)
-
-[Lists](#lists)
-
-[Links](#links)
-
-[Images](#images)
-
-[Blockquotes](#blockquotes)
-
-[Inline HTML](#inline-html)
-
-[Horizontal Rule](#horizontal-rule)
-
-[Line Breaks](#line-breaks)
-
-[Tables](#tables)
+* [Headers](#headers)
+* [Emphasis](#emphasis)
+* [Lists](#lists)
+* [Links](#links)
+* [Images](#images)
+* [Blockquotes](#blockquotes)
+* [Inline HTML](#inline-html)
+* [Horizontal Rule](#horizontal-rule)
+* [Line Breaks](#line-breaks)
+* [Tables](#tables)
**[References](#references)**
diff --git a/doc/permissions/permissions.md b/doc/permissions/permissions.md
index e01b02212b6..29fe521b4d1 100644
--- a/doc/permissions/permissions.md
+++ b/doc/permissions/permissions.md
@@ -23,6 +23,7 @@ If a user is a GitLab administrator they receive all permissions.
| Add tags | | | ✓ | ✓ | ✓ |
| Write a wiki | | | ✓ | ✓ | ✓ |
| Manage issue tracker | | | ✓ | ✓ | ✓ |
+| Create new milestones | | | | ✓ | ✓ |
| Add new team members | | | | ✓ | ✓ |
| Push to protected branches | | | | ✓ | ✓ |
| Enable/Disable branch protection | | | | ✓ | ✓ |
diff --git a/doc/public_access/public_access.md b/doc/public_access/public_access.md
index 493e59af225..9b117319eec 100644
--- a/doc/public_access/public_access.md
+++ b/doc/public_access/public_access.md
@@ -12,7 +12,7 @@ Public projects can be cloned **without any** authentication.
It will also be listed on the [public access directory](/public).
-**Any logged in user** will have [Guest](/help/permissions) permissions on the repository.
+**Any logged in user** will have [Guest](../permissions/permissions) permissions on the repository.
## Internal projects
@@ -20,7 +20,7 @@ Internal projects can be cloned by any logged in user.
It will also be listed on the [public access directory](/public) for logged in users.
-Any logged in user will have [Guest](/help/permissions) permissions on the repository.
+Any logged in user will have [Guest](../permissions/permissions) permissions on the repository.
## How to change project visibility
diff --git a/doc/raketasks/backup_hrz.png b/doc/raketasks/backup_hrz.png
new file mode 100644
index 00000000000..03e50df1d76
--- /dev/null
+++ b/doc/raketasks/backup_hrz.png
Binary files differ
diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md
index 5c1594d13d8..aa587271113 100644
--- a/doc/raketasks/backup_restore.md
+++ b/doc/raketasks/backup_restore.md
@@ -1,5 +1,7 @@
# Backup restore
+![backup banner](backup_hrz.png)
+
## Create a backup of the GitLab system
Creates a backup archive of the database and all repositories. This archive will be saved in backup_path (see `config/gitlab.yml`).
@@ -7,6 +9,10 @@ Creates a backup archive of the database and all repositories. This archive will
The filename will be `[TIMESTAMP]_gitlab_backup.tar`. This timestamp can be used to restore an specific backup.
```
+# omnibus-gitlab
+sudo gitlab-rake gitlab:backup:create
+
+# installation from source or cookbook
bundle exec rake gitlab:backup:create RAILS_ENV=production
```
@@ -42,6 +48,10 @@ Deleting old backups... [SKIPPING]
## Restore a previously created backup
```
+# omnibus-gitlab
+sudo gitlab-rake gitlab:backup:restore
+
+# installation from source or cookbook
bundle exec rake gitlab:backup:restore RAILS_ENV=production
```
@@ -84,6 +94,8 @@ Deleting tmp directories...[DONE]
## Configure cron to make daily backups
+For omnibus-gitlab, see https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#scheduling-a-backup .
+
```
cd /home/git/gitlab
sudo -u git -H editor config/gitlab.yml # Enable keep_time in the backup section to automatically delete old backups
diff --git a/doc/raketasks/cleanup.md b/doc/raketasks/cleanup.md
index 4b3b6d71a75..9e48f56c951 100644
--- a/doc/raketasks/cleanup.md
+++ b/doc/raketasks/cleanup.md
@@ -5,11 +5,19 @@
Remove namespaces(dirs) from `/home/git/repositories` if they don't exist in GitLab database.
```
+# omnibus-gitlab
+sudo gitlab-rake gitlab:cleanup:dirs
+
+# installation from source or cookbook
bundle exec rake gitlab:cleanup:dirs RAILS_ENV=production
```
Remove repositories (global only for now) from `/home/git/repositories` if they don't exist in GitLab database.
```
+# omnibus-gitlab
+sudo gitlab-rake gitlab:cleanup:repos
+
+# installation from source or cookbook
bundle exec rake gitlab:cleanup:repos RAILS_ENV=production
```
diff --git a/doc/raketasks/features.md b/doc/raketasks/features.md
index eaa9af5f962..99b3d5525b0 100644
--- a/doc/raketasks/features.md
+++ b/doc/raketasks/features.md
@@ -18,21 +18,3 @@ New path: `git@example.org:username/myrepo.git` or `git@example.org:groupname/my
```
bundle exec rake gitlab:enable_namespaces RAILS_ENV=production
```
-
-## Rebuild project satellites
-
-This command will build missing satellites for projects. After this you will be able to **merge a merge request** via GitLab and use the **online editor**.
-
-```
-bundle exec rake gitlab:satellites:create RAILS_ENV=production
-```
-
-Example output:
-
-```
-Creating satellite for abcd.git
-[git clone output]
-Creating satellite for abcd2.git
-[git clone output]
-done
-```
diff --git a/doc/raketasks/import.md b/doc/raketasks/import.md
index 628bd373b8d..39b1a52a44d 100644
--- a/doc/raketasks/import.md
+++ b/doc/raketasks/import.md
@@ -15,6 +15,10 @@ How to use:
2. run the command below
```
+# omnibus-gitlab
+sudo gitlab-rake gitlab:import:repos
+
+# installation from source or cookbook
bundle exec rake gitlab:import:repos RAILS_ENV=production
```
diff --git a/doc/raketasks/maintenance.md b/doc/raketasks/maintenance.md
index 30276dd7629..9f5d21527c3 100644
--- a/doc/raketasks/maintenance.md
+++ b/doc/raketasks/maintenance.md
@@ -5,6 +5,10 @@
This command gathers information about your GitLab installation and the System it runs on. These may be useful when asking for help or reporting issues.
```
+# omnibus-gitlab
+sudo gitlab-rake gitlab:env:info
+
+# installation from source or cookbook
bundle exec rake gitlab:env:info RAILS_ENV=production
```
@@ -52,9 +56,15 @@ It will check that each component was setup according to the installation guide
You may also have a look at our [Trouble Shooting Guide](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide).
```
+# omnibus-gitlab
+sudo gitlab-rake gitlab:check
+
+# installation from source or cookbook
bundle exec rake gitlab:check RAILS_ENV=production
```
+NOTE: Use SANITIZE=true for gitlab:check if you want to omit project names from the output.
+
Example output:
```
diff --git a/doc/raketasks/user_management.md b/doc/raketasks/user_management.md
index 81378494c6b..eb9eebb4b4a 100644
--- a/doc/raketasks/user_management.md
+++ b/doc/raketasks/user_management.md
@@ -3,6 +3,10 @@
## Add user as a developer to all projects
```bash
+# omnibus-gitlab
+sudo gitlab-rake gitlab:import:user_to_projects[username@domain.tld]
+
+# installation from source or cookbook
bundle exec rake gitlab:import:user_to_projects[username@domain.tld]
```
@@ -13,12 +17,20 @@ Notes:
- admin users are added as masters
```bash
+# omnibus-gitlab
+sudo gitlab-rake gitlab:import:all_users_to_all_projects
+
+# installation from source or cookbook
bundle exec rake gitlab:import:all_users_to_all_projects
```
## Add user as a developer to all groups
```bash
+# omnibus-gitlab
+sudo gitlab-rake gitlab:import:user_to_groups[username@domain.tld]
+
+# installation from source or cookbook
bundle exec rake gitlab:import:user_to_groups[username@domain.tld]
```
@@ -29,5 +41,9 @@ Notes:
- admin users are added as owners so they can add additional users to the group
```bash
+# omnibus-gitlab
+sudo gitlab-rake gitlab:import:all_users_to_all_groups
+
+# installation from source or cookbook
bundle exec rake gitlab:import:all_users_to_all_groups
```
diff --git a/doc/raketasks/web_hooks.md b/doc/raketasks/web_hooks.md
index 704473af2d9..ac32c01289d 100644
--- a/doc/raketasks/web_hooks.md
+++ b/doc/raketasks/web_hooks.md
@@ -2,26 +2,44 @@
## Add a web hook for **ALL** projects:
+ # omnibus-gitlab
+ sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook"
+ # source installations or cookbook
RAILS_ENV=production bundle exec rake gitlab:web_hook:add URL="http://example.com/hook"
## Add a web hook for projects in a given **NAMESPACE**:
+ # omnibus-gitlab
+ sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme
+ # source installations or cookbook
RAILS_ENV=production bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme
## Remove a web hook from **ALL** projects using:
+ # omnibus-gitlab
+ sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook"
+ # source installations or cookbook
RAILS_ENV=production bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook"
## Remove a web hook from projects in a given **NAMESPACE**:
+ # omnibus-gitlab
+ sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme
+ # source installations or cookbook
RAILS_ENV=production bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme
## List **ALL** web hooks:
+ # omnibus-gitlab
+ sudo gitlab-rake gitlab:web_hook:list
+ # source installations or cookbook
RAILS_ENV=production bundle exec rake gitlab:web_hook:list
## List the web hooks from projects in a given **NAMESPACE**:
+ # omnibus-gitlab
+ sudo gitlab-rake gitlab:web_hook:list NAMESPACE=/
+ # source installations or cookbook
RAILS_ENV=production bundle exec rake gitlab:web_hook:list NAMESPACE=/
> Note: `/` is the global namespace.
diff --git a/doc/release/monthly.md b/doc/release/monthly.md
index 45040084dfc..e47412480e7 100644
--- a/doc/release/monthly.md
+++ b/doc/release/monthly.md
@@ -14,22 +14,60 @@ A release manager is selected that coordinates the entire release of this versio
Any changes not yet added to the changelog are added by lead developer and in that merge request the complete team is asked if there is anything missing.
-# **18th - Releasing RC1**
+### **4. Create an overall issue**
-The RC1 release comes with the task to update the installation and upgrade docs. Be mindful that there might already be merge requests for this on GitLab or GitHub.
+```
+15th:
+
+* Update the changelog (#LINK)
+
+16th:
+
+* Merge CE in to EE (#LINK)
+
+17th:
+
+* Create x.x.0.rc1 (#LINK)
-### **1. Create an issue for RC1 release**
+18th:
-Consider naming the issue "Release x.x.x.rc1" to make it easier for later searches.
+* Update GitLab.com with rc1 (#LINK)
+* Regression issue and tweet about rc1 (#LINK)
+* Start blog post (#LINK)
-### **2. Update the installation guide**
+21th:
+
+* Do QA and fix anything coming out of it (#LINK)
+
+22nd:
+
+* Release CE and EE (#LINK)
+
+23th:
+
+* Prepare package for GitLab.com release (#LINK)
+
+24th:
+
+* Deploy to GitLab.com (#LINK)
+```
+
+# **16th - Merge the CE into EE**
+
+Do this via a merge request.
+
+# **17th - Create RC1**
+
+The RC1 release comes with the task to update the installation and upgrade docs. Be mindful that there might already be merge requests for this on GitLab or GitHub.
+
+### **1. Update the installation guide**
1. Check if it references the correct branch `x-x-stable` (doesn't exist yet, but that is okay)
1. Check the [GitLab Shell version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L782)
1. Check the [Git version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L794)
1. There might be other changes. Ask around.
-### **3. Create an update guides**
+### **2. Create an update guides**
1. Create: CE update guide from previous version. Like `from-6-8-to-6.9`
1. Create: CE to EE update guide in EE repository for latest version.
@@ -81,7 +119,7 @@ Check if the `init.d/gitlab` script changed since last release: <https://gitlab.
#### 10. Check application status
-### **4. Code quality indicators**
+### **3. Code quality indicators**
Make sure the code quality indicators are green / good.
@@ -95,11 +133,11 @@ Make sure the code quality indicators are green / good.
- [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq)
-### **5. Set VERSION**
+### **4. Set VERSION**
Change version in VERSION to `x.x.0.rc1`.
-### **6. Tag**
+### **5. Tag**
Create an annotated tag that points to the version change commit:
@@ -107,22 +145,16 @@ Create an annotated tag that points to the version change commit:
git tag -a vx.x.0.rc1 -m 'Version x.x.0.rc1'
```
-### **7. Tweet**
+# **18th - Release RC1**
-Tweet about the RC release:
-
-> GitLab x.x.x.rc1 is out. This is a release candidate intended for testing only. Please let us know if you find regressions.
-
-n
-### **8. Update GitLab.com**
-
-Merge the RC1 code into GitLab.com. Once the build is green, deploy in the morning.
+### **1. Update GitLab.com**
+Merge the RC1 EE code into GitLab.com.
+Once the build is green, create a package.
+Try to deploy in the morning.
It is important to do this as soon as possible, so we can catch any errors before we release the full version.
-# **21st - Preparation **
-
-### **1. Prepare the blog post**
+### **2. Prepare the blog post**
- Check the changelog of CE and EE for important changes. Based on [release blog template](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/release_blog_template.md) fill in the important information.
- Create a WIP MR for the blog post and cc the team so everyone can give feedback.
@@ -130,7 +162,26 @@ It is important to do this as soon as possible, so we can catch any errors befor
- Decide with team who will be the MVP user.
- Add a note if there are security fixes: This release fixes an important security issue and we advise everyone to upgrade as soon as possible.
-### **2. Q&A**
+### **3. Create a regressions issue**
+
+On [the GitLab CE issue tracker on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/issues/) create an issue titled "GitLab X.X regressions" add the following text:
+
+This is a meta issue to discuss possible regressions in this monthly release and any patch versions.
+Please do not raise issues directly in this issue but link to issues that might warrant a patch release.
+The decision to create a patch release or not is with the release manager who is assigned to this issue.
+The release manager will comment here about the plans for patch releases.
+
+Assign the issue to the release manager and /cc all the core-team members active on the issue tracker. If there are any known bugs in the release add them immediately.
+
+### **4. Tweet**
+
+Tweet about the RC release:
+
+> GitLab x.x.0.rc1 is out. This release candidate is only suitable for testing. Please link regressions issues from LINK_TO_REGRESSION_ISSUE
+
+# **21st - Preparation**
+
+### **1. Q&A**
Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X release" in order to keep track of the progress.
@@ -138,7 +189,7 @@ Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gi
**NOTE** Upgrader can only be tested when tags are pushed to all repositories. Do not forget to confirm it is working before releasing. Note that in the issue.
-### **3. Fix anything coming out of the QA**
+### **2. Fix anything coming out of the QA**
Create an issue with description of a problem, if it is quick fix fix yourself otherwise contact the team for advice.
@@ -205,30 +256,19 @@ Merge the [blog merge request](#1-prepare-the-blog-post) in `www-gitlab-com` rep
### **8. Tweet to blog**
-Send out a tweet to share the good news with the world. List the features in short and link to the blog post.
-
-Proposed tweet for CE "GitLab X.X.X CE is released! It brings *** <link-to-blogpost>"
+Send out a tweet to share the good news with the world.
+List the most important features and link to the blog post.
-Proposed tweet for EE "GitLab X.X.X EE is released! It brings *** <link-to-blogpost>"
+Proposed tweet for CE "GitLab X.X is released! It brings *** <link-to-blogpost>"
-### **9. Send out newsletter**
-
-In MailChimp replicate the former release newsletters to customers / newsletter subscribers (these are two separate things) and modify them accordingly.
+### **9. Send out the newsletter**
+Send out an email to the 'GitLab Newsletter' mailing list on MailChimp.
+Replicate the former release newsletter and modify it accordingly.
Include a link to the blog post and keep it short.
-Proposed email for CE: "We have released a new version of GitLab Community Edition and its packages. See our blog post(<link>) for more information."
-
-### **10. Create a regressions issue**
-
-On [the GitLab CE issue tracker on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/issues/) create an issue titled "GitLab X.X regressions" add the following text:
-
-This is a meta issue to discuss possible regressions in this monthly release and any patch versions.
-Please do not raise issues directly in this issue but link to issues that might warrant a patch release.
-The decision to create a patch release or not is with the release manager who is assigned to this issue.
-The release manager will comment here about the plans for patch releases.
-
-Assign the issue to the release manager and /cc all the core-team members active on the issue tracker. If there are any known bugs in the release add them immediately.
+Proposed email text:
+"We have released a new version of GitLab. See our blog post(<link>) for more information."
# **23rd - Optional Patch Release**
diff --git a/doc/release/patch.md b/doc/release/patch.md
index 7762c9f0e11..bcc14568fc8 100644
--- a/doc/release/patch.md
+++ b/doc/release/patch.md
@@ -27,4 +27,5 @@ Otherwise include it in the monthly release and note there was a regression fix
1. [Build new packages with the latest version](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md)
1. Cherry-pick the changelog update back into master
1. Send tweets about the release from `@gitlabhq`, tweet should include the most important feature that the release is addressing as well as the link to the changelog
-1. Note in the 'GitLab X.X regressions' issue that the patch was published(CE only)
+1. Note in the 'GitLab X.X regressions' issue that the patch was published (CE only)
+1. Send out an email to the 'GitLab Newsletter' mailing list on MailChimp (or the 'Subscribers' list if the patch is EE only)
diff --git a/doc/release/security.md b/doc/release/security.md
index 5265ca82eba..f20d7e16222 100644
--- a/doc/release/security.md
+++ b/doc/release/security.md
@@ -18,9 +18,8 @@ Please report suspected security vulnerabilities in private to <support@gitlab.c
1. Create feature branches for the blog post on GitLab.com and link them from the code branch
1. Merge and publish the blog posts
1. Send tweets about the release from `@gitlabhq`
-1. Send out an email to the subscribers mailing list on MailChimp
+1. Send out an email to the 'GitLab Newsletter' mailing list on MailChimp (or the 'Subscribers' list if the security fix is for EE only)
1. Send out an email to [the community google mailing list](https://groups.google.com/forum/#!forum/gitlabhq)
-1. Send out an email to [the GitLab newsletter list](http://gitlab.us5.list-manage.com/subscribe?u=498dccd07cf3e9482bee33ba4&id=98a9a4992c)
1. Post a signed copy of our complete announcement to [oss-security](http://www.openwall.com/lists/oss-security/) and request a CVE number
1. Add the security researcher to the [Security Researcher Acknowledgments list](http://www.gitlab.com/vulnerability-acknowledgements/)
1. Thank the security researcher in an email for their cooperation
diff --git a/doc/update/5.1-to-6.0.md b/doc/update/5.1-to-6.0.md
index 11afc75f0f3..d8484b2c650 100644
--- a/doc/update/5.1-to-6.0.md
+++ b/doc/update/5.1-to-6.0.md
@@ -95,15 +95,15 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
Note: We switched from Puma in GitLab 5.x to unicorn in GitLab 6.0.
-- Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/masterconfig/gitlab.yml.example but with your settings.
-- Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/masterconfig/unicorn.rb.example but with your settings.
+- Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-0-stable/config/gitlab.yml.example but with your settings.
+- Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-0-stable/config/unicorn.rb.example but with your settings.
## 7. Update Init script
```bash
cd /home/git/gitlab
sudo rm /etc/init.d/gitlab
-sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
+sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
```
diff --git a/doc/update/6.0-to-7.0.md b/doc/update/6.0-to-7.1.md
index b73adc8cfb3..e328114a673 100644
--- a/doc/update/6.0-to-7.0.md
+++ b/doc/update/6.0-to-7.1.md
@@ -1,8 +1,8 @@
-# From 6.0 to 7.0
+# From 6.0 to 7.1
## Deprecations
-The 'Wall' feature has been removed in GitLab 7.0. Existing wall comments will remain stored in the database after the upgrade.
+The 'Wall' feature has been removed in GitLab 7.1. Existing wall comments will remain stored in the database after the upgrade.
## Global issue numbers
@@ -32,7 +32,7 @@ sudo -u git -H git fetch --all
For GitLab Community Edition:
```bash
-sudo -u git -H git checkout 7-0-stable
+sudo -u git -H git checkout 7-1-stable
```
OR
@@ -40,7 +40,7 @@ OR
For GitLab Enterprise Edition:
```bash
-sudo -u git -H git checkout 7-0-stable-ee
+sudo -u git -H git checkout 7-1-stable-ee
```
@@ -56,7 +56,7 @@ sudo apt-get install logrotate
```bash
cd /home/git/gitlab-shell
sudo -u git -H git fetch
-sudo -u git -H git checkout v1.9.3 # Addresses multiple critical security vulnerabilities
+sudo -u git -H git checkout v1.9.6 # Addresses multiple critical security vulnerabilities
```
## 5. Install libs, migrations, etc.
@@ -89,12 +89,12 @@ sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
TIP: to see what changed in gitlab.yml.example in this release use next command:
```
-git diff 6-0-stable:config/gitlab.yml.example 7-0-stable:config/gitlab.yml.example
+git diff 6-0-stable:config/gitlab.yml.example 7-1-stable:config/gitlab.yml.example
```
-* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-0-stable/config/gitlab.yml.example but with your settings.
-* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-0-stable/config/unicorn.rb.example but with your settings.
-* Make `/etc/nginx/sites-available/nginx` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-0-stable/lib/support/nginx/gitlab but with your settings.
+* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-1-stable/config/gitlab.yml.example but with your settings.
+* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-1-stable/config/unicorn.rb.example but with your settings.
+* Make `/etc/nginx/sites-available/nginx` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-1-stable/lib/support/nginx/gitlab but with your settings.
* Copy rack attack middleware config
```bash
diff --git a/doc/update/6.9-to-7.0.md b/doc/update/6.9-to-7.0.md
index d6e9c9f3155..70a30a58687 100644
--- a/doc/update/6.9-to-7.0.md
+++ b/doc/update/6.9-to-7.0.md
@@ -13,7 +13,39 @@ sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
sudo service gitlab stop
```
-### 2. Get latest code
+### 2. Update Ruby
+
+If you are still using Ruby 1.9.3 or below, you will need to update Ruby.
+You can check which version you are running with `ruby -v`.
+
+If you are you running Ruby 2.0.x, you do not need to upgrade ruby, but can consider doing so for performance reasons.
+
+If you are running Ruby 2.1.1 consider upgrading to 2.1.2, because of the high memory usage of Ruby 2.1.1.
+
+Install, update dependencies:
+
+```bash
+sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl
+```
+
+Download and compile Ruby:
+
+```bash
+mkdir /tmp/ruby && cd /tmp/ruby
+curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz
+cd ruby-2.1.2
+./configure --disable-install-rdoc
+make
+sudo make install
+```
+
+Install Bundler:
+
+```bash
+sudo gem install bundler --no-ri --no-rdoc
+```
+
+### 3. Get latest code
```bash
cd /home/git/gitlab
@@ -34,7 +66,7 @@ For GitLab Enterprise Edition:
sudo -u git -H git checkout 7-0-stable-ee
```
-### 3. Update gitlab-shell (and its config)
+### 4. Update gitlab-shell (and its config)
```bash
cd /home/git/gitlab-shell
@@ -42,7 +74,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout v1.9.6
```
-### 4. Install libs, migrations, etc.
+### 5. Install libs, migrations, etc.
```bash
cd /home/git/gitlab
@@ -58,9 +90,13 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
# Clean up assets and cache
sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
+
+# Update init.d script
+sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
+sudo chmod +x /etc/init.d/gitlab
```
-### 5. Update config files
+### 6. Update config files
#### New configuration options for gitlab.yml
@@ -70,12 +106,12 @@ There are new configuration options available for gitlab.yml. View them with the
git diff 6-9-stable:config/gitlab.yml.example 7-0-stable:config/gitlab.yml.example
```
-### 6. Start application
+### 7. Start application
sudo service gitlab start
sudo service nginx restart
-### 7. Check application status
+### 8. Check application status
Check if GitLab and its environment are configured correctly:
diff --git a/doc/update/7.0-to-7.1.md b/doc/update/7.0-to-7.1.md
new file mode 100644
index 00000000000..6864101f8c6
--- /dev/null
+++ b/doc/update/7.0-to-7.1.md
@@ -0,0 +1,138 @@
+# From 7.0 to 7.1
+
+### 0. Backup
+
+```bash
+cd /home/git/gitlab
+sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
+```
+
+### 1. Stop server
+
+```bash
+sudo service gitlab stop
+```
+
+### 2. Update Ruby
+
+If you are still using Ruby 1.9.3 or below, you will need to update Ruby.
+You can check which version you are running with `ruby -v`.
+
+If you are you running Ruby 2.0.x, you do not need to upgrade ruby, but can consider doing so for performance reasons.
+
+If you are running Ruby 2.1.1 consider upgrading to 2.1.2, because of the high memory usage of Ruby 2.1.1.
+
+Install, update dependencies:
+
+```bash
+sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl
+```
+
+Download and compile Ruby:
+
+```bash
+mkdir /tmp/ruby && cd /tmp/ruby
+curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz
+cd ruby-2.1.2
+./configure --disable-install-rdoc
+make
+sudo make install
+```
+
+Install Bundler:
+
+```bash
+sudo gem install bundler --no-ri --no-rdoc
+```
+
+### 3. Get latest code
+
+```bash
+cd /home/git/gitlab
+sudo -u git -H git fetch --all
+```
+
+For Gitlab Community Edition:
+
+```bash
+sudo -u git -H git checkout 7-1-stable
+```
+
+OR
+
+For GitLab Enterprise Edition:
+
+```bash
+sudo -u git -H git checkout 7-1-stable-ee
+```
+
+### 4. Update gitlab-shell (and its config)
+
+```bash
+cd /home/git/gitlab-shell
+sudo -u git -H git fetch
+sudo -u git -H git checkout v1.9.6
+```
+
+### 5. Install libs, migrations, etc.
+
+```bash
+cd /home/git/gitlab
+
+# MySQL installations (note: the line below states '--without ... postgres')
+sudo -u git -H bundle install --without development test postgres --deployment
+
+# PostgreSQL installations (note: the line below states '--without ... mysql')
+sudo -u git -H bundle install --without development test mysql --deployment
+
+# Run database migrations
+sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
+
+# Clean up assets and cache
+sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
+
+# Update init.d script
+sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
+sudo chmod +x /etc/init.d/gitlab
+```
+
+### 6. Update config files
+
+#### New configuration options for gitlab.yml
+
+There are new configuration options available for gitlab.yml. View them with the command below and apply them to your current gitlab.yml if desired.
+
+```
+git diff 7-0-stable:config/gitlab.yml.example 7-1-stable:config/gitlab.yml.example
+```
+
+### 7. Start application
+
+ sudo service gitlab start
+ sudo service nginx restart
+
+### 8. Check application status
+
+Check if GitLab and its environment are configured correctly:
+
+ sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
+
+To make sure you didn't miss anything run a more thorough check with:
+
+ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
+
+If all items are green, then congratulations upgrade is complete!
+
+## Things went south? Revert to previous version (7.0)
+
+### 1. Revert the code to the previous version
+Follow the [`upgrade guide from 6.9 to 7.0`](6.9-to-7.0.md), except for the database migration
+(The backup is already migrated to the previous version)
+
+### 2. Restore from the backup:
+
+```bash
+cd /home/git/gitlab
+sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
+```
+If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above.
diff --git a/doc/update/README.md b/doc/update/README.md
index 8c0cf5f7b26..9a6f09b370a 100644
--- a/doc/update/README.md
+++ b/doc/update/README.md
@@ -1,5 +1,4 @@
- [The individual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update)
- [Upgrader](upgrader.md)
-- [Ruby](ruby.md)
- [Patch versions](patch_versions.md)
- [MySQL to PostgreSQL](mysql_to_postgresql.md)
diff --git a/doc/update/mysql_to_postgresql.md b/doc/update/mysql_to_postgresql.md
index 05c95679673..91689890640 100644
--- a/doc/update/mysql_to_postgresql.md
+++ b/doc/update/mysql_to_postgresql.md
@@ -91,7 +91,7 @@ cd tmp/backups/postgresql
sudo -u git -H mysqldump --compatible=postgresql --default-character-set=utf8 -r gitlabhq_production.mysql -u root gitlabhq_production
# Clone the database converter
-sudo -u git -H git clone https://github.com/lanyrd/mysql-postgresql-converter.git
+sudo -u git -H git clone https://github.com/gitlabhq/mysql-postgresql-converter.git
# Convert gitlabhq_production.mysql
sudo -u git -H mkdir db
diff --git a/doc/update/ruby.md b/doc/update/ruby.md
deleted file mode 100644
index d1d9d3e77f5..00000000000
--- a/doc/update/ruby.md
+++ /dev/null
@@ -1,59 +0,0 @@
-# Updating Ruby from source
-
-This guide explains how to update Ruby in case you installed it from source according to the [instructions](../install/installation.md#2-ruby).
-
-## 1. Look for Ruby versions
-
-This guide will only update `/usr/local/bin/ruby`. You can see which Ruby binaries are installed on your system by running:
-
-```bash
-ls -l $(which -a ruby)
-```
-
-## 2. Stop GitLab
-
-```bash
-sudo service gitlab stop
-```
-
-## 3. Install or update dependencies
-
-Here we are assuming you are using Debian/Ubuntu.
-
-```bash
-sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl
-```
-
-## 4. Download, compile and install Ruby
-
-Find the latest stable version of Ruby 1.9 or 2.0 at <https://www.ruby-lang.org/en/downloads/>. We recommend at least 2.0.0-p353, which is patched against [CVE-2013-4164](https://www.ruby-lang.org/en/news/2013/11/22/heap-overflow-in-floating-point-parsing-cve-2013-4164/).
-
-```bash
-cd /tmp
-curl --progress http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p353.tar.gz | tar xz
-cd ruby-2.0.0-p353
-./configure --disable-install-rdoc
-make
-sudo make install # overwrite the existing Ruby in /usr/local/bin
-sudo gem install bundler
-```
-
-### 5. Reinstall GitLab gem bundle
-
-Just to be sure we will reinstall the gems used by GitLab. Note that the `bundle install` command [depends on your choice of database](../install/installation.md#install-gems).
-
-```bash
-cd /home/git/gitlab
-sudo -u git -H rm -rf vendor/bundle # remove existing Gem bundle
-sudo -u git -H bundle install --deployment --without development test mysql aws # Assuming PostgreSQL
-```
-
-## 6. Start GitLab
-
-We are now ready to restart GitLab.
-
-```bash
-sudo service gitlab start
-```
-
-## Done
diff --git a/doc/workflow/README.md b/doc/workflow/README.md
index c715f6e5943..00d4bed1cc7 100644
--- a/doc/workflow/README.md
+++ b/doc/workflow/README.md
@@ -1,3 +1,4 @@
- [Workflow](workflow.md)
- [Project Features](project_features.md)
- [Authorization for merge requests](authorization_for_merge_requests.md)
+- [Groups](groups.md)
diff --git a/doc/workflow/groups.md b/doc/workflow/groups.md
new file mode 100644
index 00000000000..611f871cf77
--- /dev/null
+++ b/doc/workflow/groups.md
@@ -0,0 +1,71 @@
+# GitLab Groups
+
+GitLab groups allow you to group projects into directories and give users to several projects at once.
+
+When you create a new project in GitLab, the default namespace for the project is the personal namespace associated with your GitLab user.
+In this document we will see how to create groups, put projects in groups and manage who can access the projects in a group.
+
+## Creating groups
+
+You can create a group by going to the 'Groups' tab of the GitLab dashboard and clicking the 'New group' button.
+
+![Click the 'New group' button in the 'Groups' tab](groups/new_group_button.png)
+
+Next, enter the name (required) and the optional description and group avatar.
+
+![Fill in the name for your new group](groups/new_group_form.png)
+
+When your group has been created you are presented with the group dashboard feed, which will be empty.
+
+![Group dashboard](groups/group_dashboard.png)
+
+You can use the 'New project' button to add a project to the new group.
+
+## Transfering an existing project into a group
+
+You can transfer an existing project into a group you own from the project settings page.
+First scroll down to the 'Dangerous settings' and click 'Show them to me'.
+Now you can pick any of the groups you manage as the new namespace for the group.
+
+![Transfer a project to a new namespace](groups/transfer_project.png)
+
+GitLab administrators can use the admin interface to move any project to any namespace if needed.
+
+## Adding users to a group
+
+One of the benefits of putting multiple projects in one group is that you can give a user to access to all projects in the group with one action.
+
+Suppose we have a group with two projects.
+
+![Group with two projects](groups/group_with_two_projects.png)
+
+On the 'Group Members' page we can now add a new user Barry to the group.
+
+![Add user Barry to the group](groups/add_member_to_group.png)
+
+Now because Barry is a 'Developer' member of the 'Open Source' group, he automatically gets 'Developer' access to all projects in the 'Open Source' group.
+
+![Barry has 'Developer' access to GitLab CI](groups/project_members_via_group.png)
+
+If necessary, you can increase the access level of an individual user for a specific project, by adding them as a Member to the project.
+
+![Barry effectively has 'Master' access to GitLab CI now](groups/override_access_level.png)
+
+## Managing group memberships via LDAP
+
+In GitLab Enterprise Edition it is possible to manage GitLab group memberships using LDAP groups.
+See [the GitLab Enterprise Edition documentation](http://doc.gitlab.com/ee/integration/ldap.html) for more information.
+
+## Allowing only admins to create groups
+
+By default, any GitLab user can create new groups.
+This ability can be disabled for individual users from the admin panel.
+It is also possible to configure GitLab so that new users default to not being able to create groups:
+
+```
+# For omnibus-gitlab, put the following in /etc/gitlab/gitlab.rb
+gitlab_rails['gitlab_default_can_create_group'] = false
+
+# For installations from source, uncomment the 'default_can_create_group'
+# line in /home/git/gitlab/config/gitlab.yml
+```
diff --git a/doc/workflow/groups/add_member_to_group.png b/doc/workflow/groups/add_member_to_group.png
new file mode 100644
index 00000000000..fa340ce572f
--- /dev/null
+++ b/doc/workflow/groups/add_member_to_group.png
Binary files differ
diff --git a/doc/workflow/groups/group_dashboard.png b/doc/workflow/groups/group_dashboard.png
new file mode 100644
index 00000000000..7fc9048d74d
--- /dev/null
+++ b/doc/workflow/groups/group_dashboard.png
Binary files differ
diff --git a/doc/workflow/groups/group_with_two_projects.png b/doc/workflow/groups/group_with_two_projects.png
new file mode 100644
index 00000000000..87242781e4f
--- /dev/null
+++ b/doc/workflow/groups/group_with_two_projects.png
Binary files differ
diff --git a/doc/workflow/groups/new_group_button.png b/doc/workflow/groups/new_group_button.png
new file mode 100644
index 00000000000..51e82798658
--- /dev/null
+++ b/doc/workflow/groups/new_group_button.png
Binary files differ
diff --git a/doc/workflow/groups/new_group_form.png b/doc/workflow/groups/new_group_form.png
new file mode 100644
index 00000000000..bf992c40bc2
--- /dev/null
+++ b/doc/workflow/groups/new_group_form.png
Binary files differ
diff --git a/doc/workflow/groups/override_access_level.png b/doc/workflow/groups/override_access_level.png
new file mode 100644
index 00000000000..f4225a63679
--- /dev/null
+++ b/doc/workflow/groups/override_access_level.png
Binary files differ
diff --git a/doc/workflow/groups/project_members_via_group.png b/doc/workflow/groups/project_members_via_group.png
new file mode 100644
index 00000000000..b13cb1cfd95
--- /dev/null
+++ b/doc/workflow/groups/project_members_via_group.png
Binary files differ
diff --git a/doc/workflow/groups/transfer_project.png b/doc/workflow/groups/transfer_project.png
new file mode 100644
index 00000000000..044fe10d073
--- /dev/null
+++ b/doc/workflow/groups/transfer_project.png
Binary files differ
diff --git a/features/admin/users.feature b/features/admin/users.feature
index ce31aafd290..d8c1288e5f0 100644
--- a/features/admin/users.feature
+++ b/features/admin/users.feature
@@ -21,3 +21,11 @@ Feature: Admin Users
And click edit on my user
When I submit modified user
Then I see user attributes changed
+
+@javascript
+ Scenario: Remove users secondary email
+ Given I visit admin users page
+ And I view the user with secondary email
+ And I see the secondary email
+ When I click remove secondary email
+ Then I should not see secondary email anymore
diff --git a/features/public/projects.feature b/features/explore/projects.feature
index c7bb3b4f8ce..2ed9707ec39 100644
--- a/features/public/projects.feature
+++ b/features/explore/projects.feature
@@ -1,5 +1,5 @@
@public
-Feature: Public Projects Feature
+Feature: Explore Projects Feature
Background:
Given public project "Community"
And internal project "Internal"
diff --git a/features/public/public_groups.feature b/features/explore/public_groups.feature
index 8bbda8cb6d4..825e3da934e 100644
--- a/features/public/public_groups.feature
+++ b/features/explore/public_groups.feature
@@ -1,5 +1,5 @@
@public
-Feature: Public Projects Feature
+Feature: Explore Groups Feature
Background:
Given group "TestGroup" has private project "Enterprise"
@@ -117,3 +117,35 @@ Feature: Public Projects Feature
And I visit group "TestGroup" members page
Then I should see group member "John Doe"
And I should not see member roles
+
+ Scenario: I should see group with public project in public groups area
+ Given group "TestGroup" has public project "Community"
+ When I visit the public groups area
+ Then I should see group "TestGroup"
+
+ Scenario: I should not see group with internal project in public groups area
+ Given group "TestGroup" has internal project "Internal"
+ When I visit the public groups area
+ Then I should not see group "TestGroup"
+
+ Scenario: I should not see group with private project in public groups area
+ When I visit the public groups area
+ Then I should not see group "TestGroup"
+
+ Scenario: I should see group with public project in public groups area as user
+ Given group "TestGroup" has public project "Community"
+ When I sign in as a user
+ And I visit the public groups area
+ Then I should see group "TestGroup"
+
+ Scenario: I should see group with internal project in public groups area as user
+ Given group "TestGroup" has internal project "Internal"
+ When I sign in as a user
+ And I visit the public groups area
+ Then I should see group "TestGroup"
+
+ Scenario: I should not see group with private project in public groups area as user
+ When I sign in as a user
+ And I visit the public groups area
+ Then I should not see group "TestGroup"
+
diff --git a/features/group.feature b/features/group.feature
index 71c28c07a3c..b5ff03db844 100644
--- a/features/group.feature
+++ b/features/group.feature
@@ -120,3 +120,24 @@ Feature: Groups
When I search for 'Mary' member
Then I should see user "Mary Jane" in team list
Then I should not see user "John Doe" in team list
+
+ # Group milestones
+
+ Scenario: I should see group "Owned" milestone index page with no milestones
+ When I visit group "Owned" page
+ And I click on group milestones
+ Then I should see group milestones index page has no milestones
+
+ Scenario: I should see group "Owned" milestone index page with milestones
+ Given Group has projects with milestones
+ When I visit group "Owned" page
+ And I click on group milestones
+ Then I should see group milestones index page with milestones
+
+ Scenario: I should see group "Owned" milestone show page
+ Given Group has projects with milestones
+ When I visit group "Owned" page
+ And I click on group milestones
+ And I click on one group milestone
+ Then I should see group milestone with descriptions and expiry date
+ And I should see group milestone with all issues and MRs assigned to that milestone
diff --git a/features/project/commits/user_lookup.feature b/features/project/commits/user_lookup.feature
index f3864c0ab38..aa347e24fe4 100644
--- a/features/project/commits/user_lookup.feature
+++ b/features/project/commits/user_lookup.feature
@@ -11,4 +11,4 @@ Feature: Project Browse Commits User Lookup
Scenario: I browse another commit from list
Given I click on another commit link
- Then I see other commit info \ No newline at end of file
+ Then I see other commit info
diff --git a/features/project/edit_issuetracker.feature b/features/project/edit_issuetracker.feature
index b5477d3c7ab..cc0de07ca69 100644
--- a/features/project/edit_issuetracker.feature
+++ b/features/project/edit_issuetracker.feature
@@ -15,4 +15,4 @@ Feature: Project Issue Tracker
When I visit edit project "Shop" page
And change the issue tracker to "Redmine"
And I save project
- Then I the project should have "Redmine" as issue tracker \ No newline at end of file
+ Then I the project should have "Redmine" as issue tracker
diff --git a/features/project/project.feature b/features/project/project.feature
index d8bb1d55e2d..c1f192f123e 100644
--- a/features/project/project.feature
+++ b/features/project/project.feature
@@ -24,3 +24,14 @@ Feature: Project Feature
When I visit edit project "Shop" page
And change project path settings
Then I should see project with new path settings
+
+ Scenario: I should see project readme and version
+ When I visit project "Shop" page
+ Then I should see project "Shop" README link
+ And I should see project "Shop" version
+
+ Scenario: I should change project default branch
+ When I visit edit project "Shop" page
+ And change project default branch
+ And I save project
+ Then I should see project default branch changed
diff --git a/features/project/public.feature b/features/project/public.feature
deleted file mode 100644
index c5a9da14c54..00000000000
--- a/features/project/public.feature
+++ /dev/null
@@ -1,8 +0,0 @@
-Feature: Public Projects
- Background:
- Given I sign in as a user
-
- Scenario: I should see the list of public projects
- When I visit the public projects area
- Then I should see the list of public projects
-
diff --git a/features/project/redirects.feature b/features/project/redirects.feature
index ce197912f64..a2e77e7bf30 100644
--- a/features/project/redirects.feature
+++ b/features/project/redirects.feature
@@ -24,3 +24,15 @@ Feature: Project Redirects
Given I sign in as a user
When I visit project "Enterprise" page
Then page status code should be 404
+
+ Scenario: I visit a public project without signing in
+ When I visit project "Community" page
+ And I should see project "Community" home page
+ And I click on "Sign In"
+ And Authenticate
+ Then I should be redirected to "Community" page
+
+ Scenario: I visit private project page without signing in
+ When I visit project "Enterprise" page
+ And I get redirected to signin page where I sign in
+ Then I should be redirected to "Enterprise" page
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature
index a204c3e10c7..4af2cc83581 100644
--- a/features/project/source/browse_files.feature
+++ b/features/project/source/browse_files.feature
@@ -38,4 +38,16 @@ Feature: Project Browse files
And I click link "Diff"
Then I see diff
-
+ Scenario: I can browse directory with Browse Dir
+ Given I click on app directory
+ And I click on history link
+ Then I see Browse dir link
+
+ Scenario: I can browse file with Browse File
+ Given I click on readme file
+ And I click on history link
+ Then I see Browse file link
+
+ Scenario: I can browse code with Browse Code
+ Given I click on history link
+ Then I see Browse code link
diff --git a/features/steps/admin/active_tab.rb b/features/steps/admin/active_tab.rb
index ccafe09c18f..8f09e51ccef 100644
--- a/features/steps/admin/active_tab.rb
+++ b/features/steps/admin/active_tab.rb
@@ -4,7 +4,7 @@ class AdminActiveTab < Spinach::FeatureSteps
include SharedActiveTab
Then 'the active main tab should be Home' do
- ensure_active_main_tab('Home')
+ ensure_active_main_tab('Overview')
end
Then 'the active main tab should be Projects' do
diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb
index 659008dd875..253c4609e82 100644
--- a/features/steps/admin/users.rb
+++ b/features/steps/admin/users.rb
@@ -44,4 +44,23 @@ class AdminUsers < Spinach::FeatureSteps
step 'click edit on my user' do
find("#edit_user_#{current_user.id}").click
end
+
+ step 'I view the user with secondary email' do
+ @user_with_secondary_email = User.last
+ @user_with_secondary_email.emails.new(email: "secondary@example.com")
+ @user_with_secondary_email.save
+ visit "/admin/users/#{@user_with_secondary_email.username}"
+ end
+
+ step 'I see the secondary email' do
+ page.should have_content "Secondary email: #{@user_with_secondary_email.emails.last.email}"
+ end
+
+ step 'I click remove secondary email' do
+ find("#remove_email_#{@user_with_secondary_email.emails.last.id}").click
+ end
+
+ step 'I should not see secondary email anymore' do
+ page.should_not have_content "Secondary email:"
+ end
end
diff --git a/features/steps/dashboard/active_tab.rb b/features/steps/dashboard/active_tab.rb
index 8f5f0eed816..68d32ed971a 100644
--- a/features/steps/dashboard/active_tab.rb
+++ b/features/steps/dashboard/active_tab.rb
@@ -4,7 +4,7 @@ class DashboardActiveTab < Spinach::FeatureSteps
include SharedActiveTab
Then 'the active main tab should be Home' do
- ensure_active_main_tab('Home')
+ ensure_active_main_tab('Activity')
end
Then 'the active main tab should be Issues' do
diff --git a/features/steps/public/groups_feature.rb b/features/steps/explore/groups_feature.rb
index 015deca5427..48486a83424 100644
--- a/features/steps/public/groups_feature.rb
+++ b/features/steps/explore/groups_feature.rb
@@ -1,4 +1,4 @@
-class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
+class Spinach::Features::ExploreGroupsFeature < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedGroup
@@ -15,7 +15,7 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
step 'group "TestGroup" has public project "Community"' do
group_has_project("TestGroup", "Community", Gitlab::VisibilityLevel::PUBLIC)
end
-
+
step '"John Doe" is owner of group "TestGroup"' do
group = Group.find_by(name: "TestGroup") || create(:group, name: "TestGroup")
user = create(:user, name: "John Doe")
@@ -37,31 +37,31 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
step 'I visit group "TestGroup" members page' do
visit members_group_path(Group.find_by(name: "TestGroup"))
end
-
+
step 'I should not see project "Enterprise" items' do
page.should_not have_content "Enterprise"
end
-
+
step 'I should see project "Internal" items' do
page.should have_content "Internal"
end
-
+
step 'I should not see project "Internal" items' do
page.should_not have_content "Internal"
end
-
+
step 'I should see project "Community" items' do
page.should have_content "Community"
end
-
+
step 'I change filter to Everyone\'s' do
click_link "Everyone's"
end
-
+
step 'I should see group member "John Doe"' do
page.should have_content "John Doe"
end
-
+
step 'I should not see member roles' do
page.body.should_not match(%r{owner|developer|reporter|guest}i)
end
diff --git a/features/steps/public/projects.rb b/features/steps/explore/projects.rb
index 7c7311bb91c..8aa2916014b 100644
--- a/features/steps/public/projects.rb
+++ b/features/steps/explore/projects.rb
@@ -1,4 +1,4 @@
-class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
+class Spinach::Features::ExploreProjectsFeature < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedProject
diff --git a/features/steps/group/group.rb b/features/steps/group/group.rb
index f321428592f..288524f92b2 100644
--- a/features/steps/group/group.rb
+++ b/features/steps/group/group.rb
@@ -164,6 +164,41 @@ class Groups < Spinach::FeatureSteps
end
end
+ step 'I click on group milestones' do
+ click_link 'Milestones'
+ end
+
+ step 'I should see group milestones index page has no milestones' do
+ page.should have_content('No milestones to show')
+ end
+
+ step 'Group has projects with milestones' do
+ group_milestone
+ end
+
+ step 'I should see group milestones index page with milestones' do
+ page.should have_content('Version 7.2')
+ page.should have_content('GL-113')
+ page.should have_link('2 Issues', href: group_milestone_path("owned", "version-7-2", title: "Version 7.2"))
+ page.should have_link('3 Merge Requests', href: group_milestone_path("owned", "gl-113", title: "GL-113"))
+ end
+
+ step 'I click on one group milestone' do
+ click_link 'GL-113'
+ end
+
+ step 'I should see group milestone with descriptions and expiry date' do
+ page.should have_content('Lorem Ipsum is simply dummy text of the printing and typesetting industry')
+ page.should have_content('expires at Aug 20, 2014')
+ end
+
+ step 'I should see group milestone with all issues and MRs assigned to that milestone' do
+ page.should have_content('Milestone GL-113')
+ page.should have_content('Progress: 0 closed – 4 open')
+ page.should have_link(@issue1.title, href: project_issue_path(@project1, @issue1))
+ page.should have_link(@mr3.title, href: project_merge_request_path(@project3, @mr3))
+ end
+
protected
def assigned_to_me key
@@ -173,4 +208,70 @@ class Groups < Spinach::FeatureSteps
def project
Group.find_by(name: "Owned").projects.first
end
+
+ def group_milestone
+ group = Group.find_by(name: "Owned")
+
+ @project1 = create :project,
+ group: group
+ project2 = create :project,
+ path: 'gitlab-ci',
+ group: group
+ @project3 = create :project,
+ path: 'cookbook-gitlab',
+ group: group
+ milestone1_project1 = create :milestone,
+ title: "Version 7.2",
+ project: @project1
+ milestone1_project2 = create :milestone,
+ title: "Version 7.2",
+ project: project2
+ milestone1_project3 = create :milestone,
+ title: "Version 7.2",
+ project: @project3
+ milestone2_project1 = create :milestone,
+ title: "GL-113",
+ project: @project1
+ milestone2_project2 = create :milestone,
+ title: "GL-113",
+ project: project2
+ milestone2_project3 = create :milestone,
+ title: "GL-113",
+ project: @project3,
+ due_date: '2014-08-20',
+ description: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry'
+ @issue1 = create :issue,
+ project: @project1,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone2_project1
+ issue2 = create :issue,
+ project: project2,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone1_project2
+ issue3 = create :issue,
+ project: @project3,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone1_project1
+ mr1 = create :merge_request,
+ source_project: @project1,
+ target_project: @project1,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone2_project1
+ mr2 = create :merge_request,
+ source_project: project2,
+ target_project: project2,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone2_project2
+ @mr3 = create :merge_request,
+ source_project: @project3,
+ target_project: @project3,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone2_project3
+ end
end
diff --git a/features/steps/profile/active_tab.rb b/features/steps/profile/active_tab.rb
index ee9f5f201cf..1924a6fa785 100644
--- a/features/steps/profile/active_tab.rb
+++ b/features/steps/profile/active_tab.rb
@@ -4,7 +4,7 @@ class ProfileActiveTab < Spinach::FeatureSteps
include SharedActiveTab
Then 'the active main tab should be Home' do
- ensure_active_main_tab('Home')
+ ensure_active_main_tab('Profile')
end
Then 'the active main tab should be Account' do
diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb
index dcc252f4765..dfafbc6fc0e 100644
--- a/features/steps/project/active_tab.rb
+++ b/features/steps/project/active_tab.rb
@@ -7,7 +7,7 @@ class ProjectActiveTab < Spinach::FeatureSteps
# Main Tabs
Then 'the active main tab should be Home' do
- ensure_active_main_tab('Home')
+ ensure_active_main_tab('Activity')
end
Then 'the active main tab should be Settings' do
diff --git a/features/steps/project/archived.rb b/features/steps/project/archived.rb
index dfbe762c438..8b490d2ffc0 100644
--- a/features/steps/project/archived.rb
+++ b/features/steps/project/archived.rb
@@ -34,4 +34,4 @@ class ProjectArchived < Spinach::FeatureSteps
click_link "Unarchive"
end
-end \ No newline at end of file
+end
diff --git a/features/steps/project/browse_commits.rb b/features/steps/project/browse_commits.rb
index bd944dee610..fe47a731915 100644
--- a/features/steps/project/browse_commits.rb
+++ b/features/steps/project/browse_commits.rb
@@ -61,8 +61,7 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
Then 'I see big commit warning' do
page.should have_content BigCommits::BIG_COMMIT_MESSAGE
- page.should have_content "Warning! This is a large diff"
- page.should have_content "If you still want to see the diff"
+ page.should have_content "Too many changes"
end
Given 'I visit huge commit page' do
@@ -71,8 +70,6 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
Then 'I see huge commit message' do
page.should have_content BigCommits::HUGE_COMMIT_MESSAGE
- page.should have_content "Warning! This is a large diff"
- page.should_not have_content "If you still want to see the diff"
end
Given 'I visit a commit with an image that changed' do
diff --git a/features/steps/project/browse_files.rb b/features/steps/project/browse_files.rb
index 7cdd1101ac5..7134050da69 100644
--- a/features/steps/project/browse_files.rb
+++ b/features/steps/project/browse_files.rb
@@ -62,4 +62,32 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
page.should have_content "File name"
page.should have_content "Commit message"
end
+
+ step 'I click on app directory' do
+ click_link 'app'
+ end
+
+ step 'I click on history link' do
+ click_link 'history'
+ end
+
+ step 'I see Browse dir link' do
+ page.should have_link 'Browse Dir »'
+ page.should_not have_link 'Browse Code »'
+ end
+
+ step 'I click on readme file' do
+ click_link 'README.md'
+ end
+
+ step 'I see Browse file link' do
+ page.should have_link 'Browse File »'
+ page.should_not have_link 'Browse Code »'
+ end
+
+ step 'I see Browse code link' do
+ page.should have_link 'Browse Code »'
+ page.should_not have_link 'Browse File »'
+ page.should_not have_link 'Browse Dir »'
+ end
end
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index e0aec699a56..b0a6e530e8a 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -131,21 +131,21 @@ class ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I should see a discussion has started on line 185' do
- page.should have_content "#{current_user.name} started a discussion on this merge request diff"
- page.should have_content "app/assets/stylesheets/tree.scss:L185"
+ page.should have_content "#{current_user.name} started a discussion"
+ page.should have_content "app/assets/stylesheets/tree.scss"
page.should have_content "Line is wrong"
end
step 'I should see a discussion has started on commit b1e6a9dbf1:L185' do
page.should have_content "#{current_user.name} started a discussion on commit"
- page.should have_content "app/assets/stylesheets/tree.scss:L185"
+ page.should have_content "app/assets/stylesheets/tree.scss"
page.should have_content "Line is wrong"
end
step 'I should see a discussion has started on commit b1e6a9dbf1' do
page.should have_content "#{current_user.name} started a discussion on commit"
page.should have_content "One comment to rule them all"
- page.should have_content "app/assets/stylesheets/tree.scss:L185"
+ page.should have_content "app/assets/stylesheets/tree.scss"
end
step 'merge request is mergeable' do
@@ -257,9 +257,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps
click_button "Add Comment"
end
- within ".note-text" do
- page.should have_content message
- end
+ page.should have_content message
end
def init_diff_note_first_file
diff --git a/features/steps/project/multiselect_blob.rb b/features/steps/project/multiselect_blob.rb
index 3d330e837c1..28df7bc9312 100644
--- a/features/steps/project/multiselect_blob.rb
+++ b/features/steps/project/multiselect_blob.rb
@@ -55,4 +55,4 @@ class ProjectMultiselectBlob < Spinach::FeatureSteps
step 'I click on "Gemfile.lock" file in repo' do
click_link "Gemfile.lock"
end
-end \ No newline at end of file
+end
diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb
index 92728d474b2..b6968152aaf 100644
--- a/features/steps/project/project.rb
+++ b/features/steps/project/project.rb
@@ -24,4 +24,27 @@ class ProjectFeature < Spinach::FeatureSteps
step 'I should see project with new path settings' do
project.path.should == "new-path"
end
+
+ step 'I should see project "Shop" README link' do
+ within '.project-side' do
+ page.should have_content "README.md"
+ end
+ end
+
+ step 'I should see project "Shop" version' do
+ within '.project-side' do
+ page.should have_content "Version: 2.2.0"
+ end
+ end
+
+ step 'change project default branch' do
+ select 'stable', from: 'project_default_branch'
+ end
+
+ step 'I should see project default branch changed' do
+ # TODO: Uncomment this when we can do real gitlab-shell calls
+ # from spinach tests. Right now gitlab-shell calls are stubbed so this test
+ # will not pass
+ # find(:css, 'select#project_default_branch').value.should == 'stable'
+ end
end
diff --git a/features/steps/project/public.rb b/features/steps/project/public.rb
deleted file mode 100644
index 7063e7d56ae..00000000000
--- a/features/steps/project/public.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class PublicProjects < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedProject
- include SharedPaths
-
- Then 'I should see the list of public projects' do
- page.should have_content "Public Projects"
- end
-end
diff --git a/features/steps/project/redirects.rb b/features/steps/project/redirects.rb
index cfa4ce82be3..7e01735af95 100644
--- a/features/steps/project/redirects.rb
+++ b/features/steps/project/redirects.rb
@@ -17,6 +17,7 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
end
step 'I should see project "Community" home page' do
+ Gitlab.config.gitlab.stub(:host).and_return("www.example.com")
within '.project-home-title' do
page.should have_content 'Community'
end
@@ -31,5 +32,40 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
project = Project.find_by(name: 'Community')
visit project_path(project) + 'DoesNotExist'
end
-end
+ step 'I click on "Sign In"' do
+ within '.pull-right' do
+ click_link "Sign in"
+ end
+ end
+
+ step 'Authenticate' do
+ admin = create(:admin)
+ project = Project.find_by(name: 'Community')
+ fill_in "user_login", with: admin.email
+ fill_in "user_password", with: admin.password
+ click_button "Sign in"
+ Thread.current[:current_user] = admin
+ end
+
+ step 'I should be redirected to "Community" page' do
+ project = Project.find_by(name: 'Community')
+ page.current_path.should == "/#{project.path_with_namespace}"
+ page.status_code.should == 200
+ end
+
+ step 'I get redirected to signin page where I sign in' do
+ admin = create(:admin)
+ project = Project.find_by(name: 'Enterprise')
+ fill_in "user_login", with: admin.email
+ fill_in "user_password", with: admin.password
+ click_button "Sign in"
+ Thread.current[:current_user] = admin
+ end
+
+ step 'I should be redirected to "Enterprise" page' do
+ project = Project.find_by(name: 'Enterprise')
+ page.current_path.should == "/#{project.path_with_namespace}"
+ page.status_code.should == 200
+ end
+end
diff --git a/features/steps/shared/active_tab.rb b/features/steps/shared/active_tab.rb
index d504fda3327..e3cd5fcfe85 100644
--- a/features/steps/shared/active_tab.rb
+++ b/features/steps/shared/active_tab.rb
@@ -2,11 +2,7 @@ module SharedActiveTab
include Spinach::DSL
def ensure_active_main_tab(content)
- if content == "Home"
- page.find('.main-nav li.active').should have_css('i.icon-home')
- else
- page.find('.main-nav li.active').should have_content(content)
- end
+ page.find('.main-nav li.active').should have_content(content)
end
def ensure_active_sub_tab(content)
diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb
index f917d7bde08..201642a086e 100644
--- a/features/steps/shared/diff_note.rb
+++ b/features/steps/shared/diff_note.rb
@@ -2,7 +2,7 @@ module SharedDiffNote
include Spinach::DSL
Given 'I cancel the diff comment' do
- within(".diff-file") do
+ within(diff_file_selector) do
find(".js-close-discussion-note-form").click
end
end
@@ -13,14 +13,14 @@ module SharedDiffNote
end
Given 'I haven\'t written any diff comment text' do
- within(".diff-file") do
+ within(diff_file_selector) do
fill_in "note[note]", with: ""
end
end
Given 'I leave a diff comment like "Typo, please fix"' do
find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_29_14"]').click
- within(".diff-file form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_29_14']") do
+ within("#{diff_file_selector} form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_29_14']") do
fill_in "note[note]", with: "Typo, please fix"
find(".js-comment-button").trigger("click")
sleep 0.05
@@ -29,7 +29,7 @@ module SharedDiffNote
Given 'I preview a diff comment text like "Should fix it :smile:"' do
find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_29_14"]').click
- within(".diff-file form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_29_14']") do
+ within("#{diff_file_selector} form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_29_14']") do
fill_in "note[note]", with: "Should fix it :smile:"
find(".js-note-preview-button").trigger("click")
end
@@ -38,7 +38,7 @@ module SharedDiffNote
Given 'I preview another diff comment text like "DRY this up"' do
find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_57_41"]').click
- within(".diff-file form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_57_41']") do
+ within("#{diff_file_selector} form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_57_41']") do
fill_in "note[note]", with: "DRY this up"
find(".js-note-preview-button").trigger("click")
end
@@ -53,63 +53,61 @@ module SharedDiffNote
end
Given 'I write a diff comment like ":-1: I don\'t like this"' do
- within(".diff-file") do
+ within(diff_file_selector) do
fill_in "note[note]", with: ":-1: I don\'t like this"
end
end
Given 'I submit the diff comment' do
- within(".diff-file") do
+ within(diff_file_selector) do
click_button("Add Comment")
end
end
-
-
Then 'I should not see the diff comment form' do
- within(".diff-file") do
+ within(diff_file_selector) do
page.should_not have_css("form.new_note")
end
end
Then 'I should not see the diff comment preview button' do
- within(".diff-file") do
+ within(diff_file_selector) do
page.should have_css(".js-note-preview-button", visible: false)
end
end
Then 'I should not see the diff comment text field' do
- within(".diff-file") do
+ within(diff_file_selector) do
page.should have_css(".js-note-text", visible: false)
end
end
Then 'I should only see one diff form' do
- within(".diff-file") do
+ within(diff_file_selector) do
page.should have_css("form.new_note", count: 1)
end
end
Then 'I should see a diff comment form with ":-1: I don\'t like this"' do
- within(".diff-file") do
+ within(diff_file_selector) do
page.should have_field("note[note]", with: ":-1: I don\'t like this")
end
end
Then 'I should see a diff comment saying "Typo, please fix"' do
- within(".diff-file .note") do
+ within("#{diff_file_selector} .note") do
page.should have_content("Typo, please fix")
end
end
Then 'I should see a discussion reply button' do
- within(".diff-file") do
+ within(diff_file_selector) do
page.should have_link("Reply")
end
end
Then 'I should see a temporary diff comment form' do
- within(".diff-file") do
+ within(diff_file_selector) do
page.should have_css(".js-temp-notes-holder form.new_note")
end
end
@@ -119,40 +117,44 @@ module SharedDiffNote
end
Then 'I should see an empty diff comment form' do
- within(".diff-file") do
+ within(diff_file_selector) do
page.should have_field("note[note]", with: "")
end
end
Then 'I should see the cancel comment button' do
- within(".diff-file form") do
+ within("#{diff_file_selector} form") do
page.should have_css(".js-close-discussion-note-form", text: "Cancel")
end
end
Then 'I should see the diff comment preview' do
- within(".diff-file form") do
+ within("#{diff_file_selector} form") do
page.should have_css(".js-note-preview", visible: false)
end
end
Then 'I should see the diff comment edit button' do
- within(".diff-file") do
+ within(diff_file_selector) do
page.should have_css(".js-note-write-button", visible: true)
end
end
Then 'I should see the diff comment preview button' do
- within(".diff-file") do
+ within(diff_file_selector) do
page.should have_css(".js-note-preview-button", visible: true)
end
end
Then 'I should see two separate previews' do
- within(".diff-file") do
+ within(diff_file_selector) do
page.should have_css(".js-note-preview", visible: true, count: 2)
page.should have_content("Should fix it")
page.should have_content("DRY this up")
end
end
+
+ def diff_file_selector
+ ".diff-file"
+ end
end
diff --git a/features/steps/shared/group.rb b/features/steps/shared/group.rb
index 6b4c47312a7..1b225dd61a6 100644
--- a/features/steps/shared/group.rb
+++ b/features/steps/shared/group.rb
@@ -21,6 +21,14 @@ module SharedGroup
is_member_of("Mary Jane", "Guest", Gitlab::Access::GUEST)
end
+ step 'I should see group "TestGroup"' do
+ page.should have_content "TestGroup"
+ end
+
+ step 'I should not see group "TestGroup"' do
+ page.should_not have_content "TestGroup"
+ end
+
protected
def is_member_of(username, groupname, role)
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index 2090b642059..a0b4099ab3e 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -324,7 +324,7 @@ module SharedPaths
# ----------------------------------------
step 'I visit the public projects area' do
- visit public_root_path
+ visit explore_projects_path
end
step 'I visit public page for "Community" project' do
@@ -332,6 +332,14 @@ module SharedPaths
end
# ----------------------------------------
+ # Public Groups
+ # ----------------------------------------
+
+ step 'I visit the public groups area' do
+ visit explore_groups_path
+ end
+
+ # ----------------------------------------
# Snippets
# ----------------------------------------
diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb
index 40362fee0bc..ddb87daeeb7 100644
--- a/features/steps/shared/project.rb
+++ b/features/steps/shared/project.rb
@@ -10,7 +10,7 @@ module SharedProject
# Create a specific project called "Shop"
And 'I own project "Shop"' do
@project = Project.find_by(name: "Shop")
- @project ||= create(:project, name: "Shop", namespace: @user.namespace)
+ @project ||= create(:project, name: "Shop", namespace: @user.namespace, snippets_enabled: true)
@project.team << [@user, :master]
end
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index b190646a1e3..09fb97abf29 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -218,5 +218,9 @@ module API
expose :same, as: :compare_same_ref
end
+
+ class Contributor < Grape::Entity
+ expose :name, :email, :commits, :additions, :deletions
+ end
end
end
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index b6a5806d646..d7d209e16f7 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -98,10 +98,14 @@ module API
def attributes_for_keys(keys)
attrs = {}
+
keys.each do |key|
- attrs[key] = params[key] if params[key].present? or (params.has_key?(key) and params[key] == false)
+ if params[key].present? or (params.has_key?(key) and params[key] == false)
+ attrs[key] = params[key]
+ end
end
- attrs
+
+ ActionController::Parameters.new(attrs).permit!
end
# error helpers
diff --git a/lib/api/notes.rb b/lib/api/notes.rb
index 413faf0cf2d..0ef9a3c4beb 100644
--- a/lib/api/notes.rb
+++ b/lib/api/notes.rb
@@ -50,12 +50,15 @@ module API
post ":id/#{noteables_str}/:#{noteable_id_str}/notes" do
required_attributes! [:body]
- @noteable = user_project.send(:"#{noteables_str}").find(params[:"#{noteable_id_str}"])
- @note = @noteable.notes.new(note: params[:body])
- @note.author = current_user
- @note.project = user_project
+ opts = {
+ note: params[:body],
+ noteable_type: noteables_str.classify,
+ noteable_id: params[noteable_id_str]
+ }
+
+ @note = ::Notes::CreateService.new(user_project, current_user, opts).execute
- if @note.save
+ if @note.valid?
present @note, with: Entities::Note
else
not_found!
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb
index 03806d9343b..d091fa4f035 100644
--- a/lib/api/repositories.rb
+++ b/lib/api/repositories.rb
@@ -150,6 +150,18 @@ module API
compare = Gitlab::Git::Compare.new(user_project.repository.raw_repository, params[:from], params[:to], MergeRequestDiff::COMMITS_SAFE_SIZE)
present compare, with: Entities::Compare
end
+
+ # Get repository contributors
+ #
+ # Parameters:
+ # id (required) - The ID of a project
+ # Example Request:
+ # GET /projects/:id/repository/contributors
+ get ':id/repository/contributors' do
+ authorize! :download_code, user_project
+
+ present user_project.repository.contributors, with: Entities::Contributor
+ end
end
end
end
diff --git a/lib/api/users.rb b/lib/api/users.rb
index 92dbe97f0a4..69553f16397 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -59,7 +59,7 @@ module API
authenticated_as_admin!
required_attributes! [:email, :password, :name, :username]
attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :projects_limit, :username, :extern_uid, :provider, :bio, :can_create_group, :admin]
- user = User.build_user(attrs, as: :admin)
+ user = User.build_user(attrs)
admin = attrs.delete(:admin)
user.admin = admin unless admin.nil?
if user.save
@@ -96,7 +96,7 @@ module API
admin = attrs.delete(:admin)
user.admin = admin unless admin.nil?
- if user.update_attributes(attrs, as: :admin)
+ if user.update_attributes(attrs)
present user, with: Entities::UserFull
else
not_found!
diff --git a/lib/gitlab/config_helper.rb b/lib/gitlab/config_helper.rb
new file mode 100644
index 00000000000..41880069e4c
--- /dev/null
+++ b/lib/gitlab/config_helper.rb
@@ -0,0 +1,9 @@
+module Gitlab::ConfigHelper
+ def gitlab_config_features
+ Gitlab.config.gitlab.default_projects_features
+ end
+
+ def gitlab_config
+ Gitlab.config.gitlab
+ end
+end
diff --git a/lib/gitlab/contributors.rb b/lib/gitlab/contributors.rb
new file mode 100644
index 00000000000..c41e92b620f
--- /dev/null
+++ b/lib/gitlab/contributors.rb
@@ -0,0 +1,9 @@
+module Gitlab
+ class Contributor
+ attr_accessor :email, :name, :commits, :additions, :deletions
+
+ def initialize
+ @commits, @additions, @deletions = 0, 0, 0
+ end
+ end
+end
diff --git a/lib/gitlab/ldap/adapter.rb b/lib/gitlab/ldap/adapter.rb
index e36616f0e66..ca239bea884 100644
--- a/lib/gitlab/ldap/adapter.rb
+++ b/lib/gitlab/ldap/adapter.rb
@@ -14,7 +14,15 @@ module Gitlab
end
def self.adapter_options
- encryption = config['method'].to_s == 'ssl' ? :simple_tls : nil
+ encryption =
+ case config['method'].to_s
+ when 'ssl'
+ :simple_tls
+ when 'tls'
+ :start_tls
+ else
+ nil
+ end
options = {
host: config['host'],
diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb
index c04be788f07..b248d8f9436 100644
--- a/lib/gitlab/markdown.rb
+++ b/lib/gitlab/markdown.rb
@@ -169,10 +169,13 @@ module Gitlab
end
def reference_user(identifier, project = @project)
- if user = User.find_by(username: identifier)
- options = html_options.merge(
+ options = html_options.merge(
class: "gfm gfm-team_member #{html_options[:class]}"
)
+
+ if identifier == "all"
+ link_to("@all", project_url(project), options)
+ elsif user = User.find_by(username: identifier)
link_to("@#{identifier}", user_url(identifier), options)
end
end
diff --git a/lib/gitlab/oauth/user.rb b/lib/gitlab/oauth/user.rb
index 9ad75e63a04..0056eb3a28b 100644
--- a/lib/gitlab/oauth/user.rb
+++ b/lib/gitlab/oauth/user.rb
@@ -27,7 +27,7 @@ module Gitlab
password_confirmation: password,
}
- user = model.build_user(opts, as: :admin)
+ user = model.build_user(opts)
user.skip_confirmation!
# Services like twitter and github does not return email via oauth
@@ -44,7 +44,13 @@ module Gitlab
user.username = email_username.gsub("'", "")
end
- user.save!
+ begin
+ user.save!
+ rescue ActiveRecord::RecordInvalid => e
+ log.info "(OAuth) Email #{e.record.errors[:email]}. Username #{e.record.errors[:username]}"
+ return nil, e.record.errors
+ end
+
log.info "(OAuth) Creating user #{email} from login with extern_uid => #{uid}"
if Gitlab.config.omniauth['block_auto_created_users'] && !ldap?
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index e932b64f4f0..4b8038843b0 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -6,18 +6,35 @@ module Gitlab
default_regex
end
+ def username_regex_message
+ default_regex_message
+ end
+
def project_name_regex
/\A[a-zA-Z0-9_][a-zA-Z0-9_\-\. ]*\z/
end
+ def project_regex_message
+ "can contain only letters, digits, '_', '-' and '.' and space. " \
+ "It must start with letter, digit or '_'."
+ end
+
def name_regex
/\A[a-zA-Z0-9_\-\. ]*\z/
end
+ def name_regex_message
+ "can contain only letters, digits, '_', '-' and '.' and space."
+ end
+
def path_regex
default_regex
end
+ def path_regex_message
+ default_regex_message
+ end
+
def archive_formats_regex
#|zip|tar| tar.gz | tar.bz2 |
/(zip|tar|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/
@@ -48,8 +65,14 @@ module Gitlab
protected
+ def default_regex_message
+ "can contain only letters, digits, '_', '-' and '.'. " \
+ "It must start with letter, digit or '_', optionally preceeded by '.'. " \
+ "It must not end in '.git'."
+ end
+
def default_regex
- /\A[.?]?[a-zA-Z0-9_][a-zA-Z0-9_\-\.]*(?<!\.git)\z/
+ /\A[a-zA-Z0-9_.][a-zA-Z0-9_\-\.]*(?<!\.git)\z/
end
end
end
diff --git a/lib/gitlab/satellite/action.rb b/lib/gitlab/satellite/action.rb
index 5ea6f956765..be45cb5c98e 100644
--- a/lib/gitlab/satellite/action.rb
+++ b/lib/gitlab/satellite/action.rb
@@ -1,7 +1,7 @@
module Gitlab
module Satellite
class Action
- DEFAULT_OPTIONS = { git_timeout: 30.seconds }
+ DEFAULT_OPTIONS = { git_timeout: Gitlab.config.satellites.timeout.seconds }
attr_accessor :options, :project, :user
diff --git a/lib/gitlab/satellite/compare_action.rb b/lib/gitlab/satellite/compare_action.rb
index c923bb9c0f0..9c9e69e3515 100644
--- a/lib/gitlab/satellite/compare_action.rb
+++ b/lib/gitlab/satellite/compare_action.rb
@@ -1,5 +1,7 @@
module Gitlab
module Satellite
+ class BranchesWithoutParent < StandardError; end
+
class CompareAction < Action
def initialize(user, target_project, target_branch, source_project, source_branch)
super user, target_project
@@ -22,7 +24,7 @@ module Gitlab
diffs
end
rescue Grit::Git::CommandFailed => ex
- handle_exception(ex)
+ raise BranchesWithoutParent
end
# Retrieve an array of commits between the source and the target
diff --git a/lib/gitlab/satellite/merge_action.rb b/lib/gitlab/satellite/merge_action.rb
index 5f17aa60b8b..6c32dfb3ad9 100644
--- a/lib/gitlab/satellite/merge_action.rb
+++ b/lib/gitlab/satellite/merge_action.rb
@@ -31,8 +31,9 @@ module Gitlab
# push merge back to bare repo
# will raise CommandFailed when push fails
merge_repo.git.push(default_options, :origin, merge_request.target_branch)
+
# remove source branch
- if merge_request.should_remove_source_branch && !project.root_ref?(merge_request.source_branch)
+ if merge_request.should_remove_source_branch && !project.root_ref?(merge_request.source_branch) && !merge_request.for_fork?
# will raise CommandFailed when push fails
merge_repo.git.push(default_options, :origin, ":#{merge_request.source_branch}")
end
diff --git a/lib/gitlab/satellite/satellite.rb b/lib/gitlab/satellite/satellite.rb
index 05123ad9c41..7c058b58c4c 100644
--- a/lib/gitlab/satellite/satellite.rb
+++ b/lib/gitlab/satellite/satellite.rb
@@ -53,7 +53,7 @@ module Gitlab
File.open(lock_file, "w+") do |f|
begin
f.flock File::LOCK_EX
- Dir.chdir(path) { return yield }
+ yield
ensure
f.flock File::LOCK_UN
end
diff --git a/lib/gitlab/theme.rb b/lib/gitlab/theme.rb
index 44237a062fc..b7c50cb734d 100644
--- a/lib/gitlab/theme.rb
+++ b/lib/gitlab/theme.rb
@@ -1,10 +1,10 @@
module Gitlab
class Theme
- BASIC = 1
- MARS = 2
- MODERN = 3
- GRAY = 4
- COLOR = 5
+ BASIC = 1 unless const_defined?(:BASIC)
+ MARS = 2 unless const_defined?(:MARS)
+ MODERN = 3 unless const_defined?(:MODERN)
+ GRAY = 4 unless const_defined?(:GRAY)
+ COLOR = 5 unless const_defined?(:COLOR)
def self.css_class_by_id(id)
themes = {
diff --git a/lib/gitlab/url_builder.rb b/lib/gitlab/url_builder.rb
new file mode 100644
index 00000000000..de7e0404086
--- /dev/null
+++ b/lib/gitlab/url_builder.rb
@@ -0,0 +1,25 @@
+module Gitlab
+ class UrlBuilder
+ include Rails.application.routes.url_helpers
+
+ def initialize(type)
+ @type = type
+ end
+
+ def build(id)
+ case @type
+ when :issue
+ issue_url(id)
+ end
+ end
+
+ private
+
+ def issue_url(id)
+ issue = Issue.find(id)
+ project_issue_url(id: issue.iid,
+ project_id: issue.project,
+ host: Settings.gitlab['url'])
+ end
+ end
+end
diff --git a/lib/gitlab/visibility_level.rb b/lib/gitlab/visibility_level.rb
index eada9bcddf5..ea1319268f8 100644
--- a/lib/gitlab/visibility_level.rb
+++ b/lib/gitlab/visibility_level.rb
@@ -5,9 +5,9 @@
#
module Gitlab
module VisibilityLevel
- PRIVATE = 0
- INTERNAL = 10
- PUBLIC = 20
+ PRIVATE = 0 unless const_defined?(:PRIVATE)
+ INTERNAL = 10 unless const_defined?(:INTERNAL)
+ PUBLIC = 20 unless const_defined?(:PUBLIC)
class << self
def values
@@ -21,7 +21,7 @@ module Gitlab
'Public' => PUBLIC
}
end
-
+
def allowed_for?(user, level)
user.is_admin? || !Gitlab.config.gitlab.restricted_visibility_levels.include?(level)
end
diff --git a/lib/tasks/cache.rake b/lib/tasks/cache.rake
index 8320b9b2576..753a5a11070 100644
--- a/lib/tasks/cache.rake
+++ b/lib/tasks/cache.rake
@@ -1,6 +1,11 @@
namespace :cache do
desc "GITLAB | Clear redis cache"
task :clear => :environment do
- Rails.cache.clear
+ # Hack into Rails.cache until https://github.com/redis-store/redis-store/pull/225
+ # is accepted (I hope) and we can update the redis-store gem.
+ redis_store = Rails.cache.instance_variable_get(:@data)
+ redis_store.keys.each_slice(1000) do |key_slice|
+ redis_store.del(*key_slice)
+ end
end
end
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 34116568e99..3f219261abe 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -27,6 +27,7 @@ namespace :gitlab do
check_projects_have_namespace
check_satellites_exist
check_redis_version
+ check_ruby_version
check_git_version
finished_checking "GitLab"
@@ -216,7 +217,7 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
- print "#{project.name_with_namespace.yellow} ... "
+ print sanitized_message(project)
if project.satellite.exists?
puts "yes".green
@@ -525,7 +526,7 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
- print "#{project.name_with_namespace.yellow} ... "
+ print sanitized_message(project)
if project.empty_repo?
puts "repository is empty".magenta
@@ -588,7 +589,7 @@ namespace :gitlab do
puts ""
Project.find_each(batch_size: 100) do |project|
- print "#{project.name_with_namespace.yellow} ... "
+ print sanitized_message(project)
if project.namespace
puts "yes".green
@@ -816,6 +817,23 @@ namespace :gitlab do
end
end
+ def check_ruby_version
+ required_version = Gitlab::VersionInfo.new(2, 0, 0)
+ current_version = Gitlab::VersionInfo.parse(run(%W(ruby --version)))
+
+ print "Ruby version >= #{required_version} ? ... "
+
+ if current_version.valid? && required_version <= current_version
+ puts "yes (#{current_version})".green
+ else
+ puts "no".red
+ try_fixing_it(
+ "Update your ruby to a version >= #{required_version} from #{current_version}"
+ )
+ fix_and_rerun
+ end
+ end
+
def check_git_version
required_version = Gitlab::VersionInfo.new(1, 7, 10)
current_version = Gitlab::VersionInfo.parse(run(%W(#{Gitlab.config.git.bin_path} --version)))
@@ -837,4 +855,20 @@ namespace :gitlab do
def omnibus_gitlab?
Dir.pwd == '/opt/gitlab/embedded/service/gitlab-rails'
end
+
+ def sanitized_message(project)
+ if sanitize
+ "#{project.namespace_id.to_s.yellow}/#{project.id.to_s.yellow} ... "
+ else
+ "#{project.name_with_namespace.yellow} ... "
+ end
+ end
+
+ def sanitize
+ if ENV['SANITIZE'] == "true"
+ true
+ else
+ false
+ end
+ end
end
diff --git a/lib/tasks/gitlab/cleanup.rake b/lib/tasks/gitlab/cleanup.rake
index 4aaab11340f..63dcdc52370 100644
--- a/lib/tasks/gitlab/cleanup.rake
+++ b/lib/tasks/gitlab/cleanup.rake
@@ -84,5 +84,29 @@ namespace :gitlab do
puts "To cleanup this directories run this command with REMOVE=true".yellow
end
end
+
+ desc "GITLAB | Cleanup | Block users that have been removed in LDAP"
+ task block_removed_ldap_users: :environment do
+ warn_user_is_not_gitlab
+ block_flag = ENV['BLOCK']
+
+ User.ldap.each do |ldap_user|
+ print "#{ldap_user.name} (#{ldap_user.extern_uid}) ..."
+ if Gitlab::LDAP::Access.open { |access| access.allowed?(ldap_user) }
+ puts " [OK]".green
+ else
+ if block_flag
+ ldap_user.block!
+ puts " [BLOCKED]".red
+ else
+ puts " [NOT IN LDAP]".yellow
+ end
+ end
+ end
+
+ unless block_flag
+ puts "To block these users run this command with BLOCK=true".yellow
+ end
+ end
end
end
diff --git a/lib/tasks/gitlab/test.rake b/lib/tasks/gitlab/test.rake
index 5b937ce0a28..c01b00bd1c0 100644
--- a/lib/tasks/gitlab/test.rake
+++ b/lib/tasks/gitlab/test.rake
@@ -11,4 +11,4 @@ namespace :gitlab do
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) or raise("#{cmd} failed!")
end
end
-end \ No newline at end of file
+end
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index e1c0269b295..cc32805f5ec 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -30,4 +30,4 @@ describe ApplicationController do
controller.send(:check_password_expiration)
end
end
-end \ No newline at end of file
+end
diff --git a/spec/controllers/blob_controller_spec.rb b/spec/controllers/blob_controller_spec.rb
index cea6922e1c3..929f6d3b46d 100644
--- a/spec/controllers/blob_controller_spec.rb
+++ b/spec/controllers/blob_controller_spec.rb
@@ -34,4 +34,18 @@ describe Projects::BlobController do
it { should respond_with(:not_found) }
end
end
+
+ describe 'GET show with tree path' do
+ render_views
+
+ before do
+ get :show, project_id: project.to_param, id: id
+ controller.instance_variable_set(:@blob, nil)
+ end
+
+ context 'redirect to tree' do
+ let(:id) { 'master/doc' }
+ it { should redirect_to("/#{project.path_with_namespace}/tree/master/doc") }
+ end
+ end
end
diff --git a/spec/controllers/tree_controller_spec.rb b/spec/controllers/tree_controller_spec.rb
index 479118a3465..b169c2a678f 100644
--- a/spec/controllers/tree_controller_spec.rb
+++ b/spec/controllers/tree_controller_spec.rb
@@ -40,4 +40,17 @@ describe Projects::TreeController do
it { should respond_with(:not_found) }
end
end
+
+ describe 'GET show with blob path' do
+ render_views
+
+ before do
+ get :show, project_id: project.to_param, id: id
+ end
+
+ context 'redirect to blob' do
+ let(:id) { 'master/README.md' }
+ it { should redirect_to("/#{project.path_with_namespace}/blob/master/README.md") }
+ end
+ end
end
diff --git a/spec/factories.rb b/spec/factories.rb
index 41cc99cbcb9..ad4c56986c3 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -32,6 +32,7 @@ FactoryGirl.define do
path { name.downcase.gsub(/\s/, '_') }
namespace
creator
+ snippets_enabled true
trait :public do
visibility_level Gitlab::VisibilityLevel::PUBLIC
@@ -245,7 +246,7 @@ FactoryGirl.define do
end
end
end
-
+
factory :email do
user
email do
diff --git a/spec/features/admin/admin_users_spec.rb b/spec/features/admin/admin_users_spec.rb
index 1aba40966c4..82da19746f8 100644
--- a/spec/features/admin/admin_users_spec.rb
+++ b/spec/features/admin/admin_users_spec.rb
@@ -47,20 +47,16 @@ describe "Admin::Users", feature: true do
it "should call send mail" do
Notify.should_receive(:new_user_email)
- User.observers.enable :user_observer do
- click_button "Create user"
- end
+ click_button "Create user"
end
it "should send valid email to user with email & password" do
- User.observers.enable :user_observer do
- click_button "Create user"
- user = User.last
- email = ActionMailer::Base.deliveries.last
- email.subject.should have_content("Account was created")
- email.text_part.body.should have_content(user.email)
- email.text_part.body.should have_content('password')
- end
+ click_button "Create user"
+ user = User.last
+ email = ActionMailer::Base.deliveries.last
+ email.subject.should have_content("Account was created")
+ email.text_part.body.should have_content(user.email)
+ email.text_part.body.should have_content('password')
end
end
diff --git a/spec/features/profile_spec.rb b/spec/features/profile_spec.rb
index e8364bbb962..bdf7b59114b 100644
--- a/spec/features/profile_spec.rb
+++ b/spec/features/profile_spec.rb
@@ -1,8 +1,6 @@
require 'spec_helper'
describe "Profile account page", feature: true do
- before(:each) { enable_observers }
- after(:each) {disable_observers}
let(:user) { create(:user) }
before do
diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb
index 1e24782c39a..524c4d5fa21 100644
--- a/spec/features/projects_spec.rb
+++ b/spec/features/projects_spec.rb
@@ -1,8 +1,6 @@
require 'spec_helper'
describe "Projects", feature: true do
- before(:each) { enable_observers }
- after(:each) {disable_observers}
before { login_as :user }
describe "DELETE /projects/:id" do
diff --git a/spec/features/search_spec.rb b/spec/features/search_spec.rb
index f12eb124296..cce9f06cb69 100644
--- a/spec/features/search_spec.rb
+++ b/spec/features/search_spec.rb
@@ -2,7 +2,6 @@ require 'spec_helper'
describe "Search", feature: true do
before do
- ActiveRecord::Base.observers.enable(:user_observer)
login_as :user
@project = create(:project, namespace: @user.namespace)
@project.team << [@user, :reporter]
diff --git a/spec/fixtures/doc_sample.txt b/spec/fixtures/doc_sample.txt
index 45dbc1aadde..600477e9421 100644
--- a/spec/fixtures/doc_sample.txt
+++ b/spec/fixtures/doc_sample.txt
@@ -1,3 +1,3 @@
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? \ No newline at end of file
+Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
diff --git a/spec/helpers/gitlab_markdown_helper_spec.rb b/spec/helpers/gitlab_markdown_helper_spec.rb
index fc9d1ac90c0..f176a393415 100644
--- a/spec/helpers/gitlab_markdown_helper_spec.rb
+++ b/spec/helpers/gitlab_markdown_helper_spec.rb
@@ -5,6 +5,7 @@ describe GitlabMarkdownHelper do
include IssuesHelper
let!(:project) { create(:project) }
+ let(:empty_project) { create(:empty_project) }
let(:user) { create(:user, username: 'gfm') }
let(:commit) { project.repository.commit }
@@ -506,6 +507,19 @@ describe GitlabMarkdownHelper do
end
end
+ describe "markdwon for empty repository" do
+ before do
+ @project = empty_project
+ @repository = empty_project.repository
+ end
+
+ it "should not touch relative urls" do
+ actual = "[GitLab API doc][GitLab readme]\n [GitLab readme]: doc/api/README.md\n"
+ expected = "<p><a href=\"doc/api/README.md\">GitLab API doc</a></p>\n"
+ markdown(actual).should match(expected)
+ end
+ end
+
describe "#render_wiki_content" do
before do
@wiki = double('WikiPage')
diff --git a/spec/javascripts/stat_graph_spec.js b/spec/javascripts/stat_graph_spec.js
index b8881769ac1..b589af34610 100644
--- a/spec/javascripts/stat_graph_spec.js
+++ b/spec/javascripts/stat_graph_spec.js
@@ -14,4 +14,4 @@ describe("StatGraph", function () {
})
})
-}); \ No newline at end of file
+});
diff --git a/spec/lib/gitlab/regex_spec.rb b/spec/lib/gitlab/regex_spec.rb
new file mode 100644
index 00000000000..a3aae7771bd
--- /dev/null
+++ b/spec/lib/gitlab/regex_spec.rb
@@ -0,0 +1,21 @@
+require 'spec_helper'
+
+describe Gitlab::Regex do
+ describe 'path regex' do
+ it { 'gitlab-ce'.should match(Gitlab::Regex.path_regex) }
+ it { 'gitlab_git'.should match(Gitlab::Regex.path_regex) }
+ it { '_underscore.js'.should match(Gitlab::Regex.path_regex) }
+ it { '100px.com'.should match(Gitlab::Regex.path_regex) }
+ it { '?gitlab'.should_not match(Gitlab::Regex.path_regex) }
+ it { 'git lab'.should_not match(Gitlab::Regex.path_regex) }
+ it { 'gitlab.git'.should_not match(Gitlab::Regex.path_regex) }
+ end
+
+ describe 'project name regex' do
+ it { 'gitlab-ce'.should match(Gitlab::Regex.project_name_regex) }
+ it { 'GitLab CE'.should match(Gitlab::Regex.project_name_regex) }
+ it { '100 lines'.should match(Gitlab::Regex.project_name_regex) }
+ it { 'gitlab.git'.should match(Gitlab::Regex.project_name_regex) }
+ it { '?gitlab'.should_not match(Gitlab::Regex.project_name_regex) }
+ end
+end
diff --git a/spec/lib/gitlab/satellite/action_spec.rb b/spec/lib/gitlab/satellite/action_spec.rb
index d65e7c42b7e..9ec0d6aad8c 100644
--- a/spec/lib/gitlab/satellite/action_spec.rb
+++ b/spec/lib/gitlab/satellite/action_spec.rb
@@ -5,6 +5,10 @@ describe 'Gitlab::Satellite::Action' do
let(:user) { create(:user) }
describe '#prepare_satellite!' do
+ it 'should be able to fetch timeout from conf' do
+ Gitlab.config.satellites.timeout = 30
+ DEFAULT_OPTIONS['git_timeout'].should == 30.seconds
+ end
it 'create a repository with a parking branch and one remote: origin' do
repo = project.satellite.repo
@@ -113,4 +117,3 @@ describe 'Gitlab::Satellite::Action' do
end
end
-
diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb
new file mode 100644
index 00000000000..eb47bee8336
--- /dev/null
+++ b/spec/lib/gitlab/url_builder_spec.rb
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe Gitlab::UrlBuilder do
+ describe 'When asking for an issue' do
+ it 'returns the issue url' do
+ issue = create(:issue)
+ url = Gitlab::UrlBuilder.new(:issue).build(issue.id)
+ expect(url).to eq "#{Settings.gitlab['url']}/#{issue.project.to_param}/issues/#{issue.iid}"
+ end
+ end
+end
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 224b613b477..314b2691c40 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -22,11 +22,28 @@ describe Notify do
end
end
+ shared_examples 'an email starting a new thread' do |message_id_prefix|
+ it 'has a discussion identifier' do
+ should have_header 'Message-ID', /<#{message_id_prefix}(.*)@#{Gitlab.config.gitlab.host}>/
+ end
+ end
+
+ shared_examples 'an answer to an existing thread' do |thread_id_prefix|
+ it 'has a subject that begins with Re: ' do
+ should have_subject /^Re: /
+ end
+
+ it 'has headers that reference an existing thread' do
+ should have_header 'References', /<#{thread_id_prefix}(.*)@#{Gitlab.config.gitlab.host}>/
+ should have_header 'In-Reply-To', /<#{thread_id_prefix}(.*)@#{Gitlab.config.gitlab.host}>/
+ end
+ end
+
describe 'for new users, the email' do
let(:example_site_path) { root_path }
let(:new_user) { create(:user, email: 'newguy@example.com', created_by_id: 1) }
- subject { Notify.new_user_email(new_user.id, new_user.password) }
+ subject { Notify.new_user_email(new_user.id, new_user.password, 'kETLwRaayvigPq_x3SNM') }
it_behaves_like 'an email sent from GitLab'
@@ -42,8 +59,12 @@ describe Notify do
should have_body_text /#{new_user.email}/
end
- it 'contains the new user\'s password' do
- should have_body_text /password/
+ it 'contains the password text' do
+ should have_body_text /Click here to set your password/
+ end
+
+ it 'includes a link for user to set password' do
+ should have_body_text 'http://localhost/users/password/edit?reset_password_token=kETLwRaayvigPq_x3SNM'
end
it 'includes a link to the site' do
@@ -153,6 +174,7 @@ describe Notify do
subject { Notify.new_issue_email(issue.assignee_id, issue.id) }
it_behaves_like 'an assignee email'
+ it_behaves_like 'an email starting a new thread', 'issue'
it 'has the correct subject' do
should have_subject /#{project.name} \| #{issue.title} \(##{issue.iid}\)/
@@ -161,10 +183,6 @@ describe Notify do
it 'contains a link to the new issue' do
should have_body_text /#{project_issue_path project, issue}/
end
-
- it 'has the correct message-id set' do
- should have_header 'Message-ID', "<issue_#{issue.id}@#{Gitlab.config.gitlab.host}>"
- end
end
describe 'that are new with a description' do
@@ -179,6 +197,7 @@ describe Notify do
subject { Notify.reassigned_issue_email(recipient.id, issue.id, previous_assignee.id, current_user) }
it_behaves_like 'a multiple recipients email'
+ it_behaves_like 'an answer to an existing thread', 'issue'
it 'is sent as the author' do
sender = subject.header[:from].addrs[0]
@@ -201,16 +220,14 @@ describe Notify do
it 'contains a link to the issue' do
should have_body_text /#{project_issue_path project, issue}/
end
-
- it 'has the correct reference set' do
- should have_header 'References', "<issue_#{issue.id}@#{Gitlab.config.gitlab.host}>"
- end
end
describe 'status changed' do
let(:status) { 'closed' }
subject { Notify.issue_status_changed_email(recipient.id, issue.id, status, current_user) }
+ it_behaves_like 'an answer to an existing thread', 'issue'
+
it 'is sent as the author' do
sender = subject.header[:from].addrs[0]
sender.display_name.should eq(current_user.name)
@@ -232,10 +249,6 @@ describe Notify do
it 'contains a link to the issue' do
should have_body_text /#{project_issue_path project, issue}/
end
-
- it 'has the correct reference set' do
- should have_header 'References', "<issue_#{issue.id}@#{Gitlab.config.gitlab.host}>"
- end
end
end
@@ -249,6 +262,7 @@ describe Notify do
subject { Notify.new_merge_request_email(merge_request.assignee_id, merge_request.id) }
it_behaves_like 'an assignee email'
+ it_behaves_like 'an email starting a new thread', 'merge_request'
it 'has the correct subject' do
should have_subject /#{merge_request.title} \(##{merge_request.iid}\)/
@@ -283,6 +297,7 @@ describe Notify do
subject { Notify.reassigned_merge_request_email(recipient.id, merge_request.id, previous_assignee.id, current_user.id) }
it_behaves_like 'a multiple recipients email'
+ it_behaves_like 'an answer to an existing thread', 'merge_request'
it 'is sent as the author' do
sender = subject.header[:from].addrs[0]
@@ -311,6 +326,7 @@ describe Notify do
subject { Notify.merged_merge_request_email(recipient.id, merge_request.id, merge_author.id) }
it_behaves_like 'a multiple recipients email'
+ it_behaves_like 'an answer to an existing thread', 'merge_request'
it 'is sent as the merge author' do
sender = subject.header[:from].addrs[0]
@@ -329,10 +345,6 @@ describe Notify do
it 'contains a link to the merge request' do
should have_body_text /#{project_merge_request_path project, merge_request}/
end
-
- it 'has the correct reference set' do
- should have_header 'References', "<merge_request_#{merge_request.id}@#{Gitlab.config.gitlab.host}>"
- end
end
end
end
@@ -410,6 +422,7 @@ describe Notify do
subject { Notify.note_commit_email(recipient.id, note.id) }
it_behaves_like 'a note email'
+ it_behaves_like 'an answer to an existing thread', 'commits'
it 'has the correct subject' do
should have_subject /#{commit.title} \(#{commit.short_id}\)/
@@ -428,6 +441,7 @@ describe Notify do
subject { Notify.note_merge_request_email(recipient.id, note.id) }
it_behaves_like 'a note email'
+ it_behaves_like 'an answer to an existing thread', 'merge_request'
it 'has the correct subject' do
should have_subject /#{merge_request.title} \(##{merge_request.iid}\)/
@@ -446,6 +460,7 @@ describe Notify do
subject { Notify.note_issue_email(recipient.id, note.id) }
it_behaves_like 'a note email'
+ it_behaves_like 'an answer to an existing thread', 'issue'
it 'has the correct subject' do
should have_subject /#{issue.title} \(##{issue.iid}\)/
diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb
index f415e750dd5..1fdd959da9d 100644
--- a/spec/models/event_spec.rb
+++ b/spec/models/event_spec.rb
@@ -65,26 +65,4 @@ describe Event do
it { @event.branch_name.should == "master" }
it { @event.author.should == @user }
end
-
- describe 'Team events' do
- let(:user_project) { double.as_null_object }
- let(:observer) { UsersProjectObserver.instance }
-
- before {
- Event.should_receive :create
- observer.stub(notification: double.as_null_object)
- }
-
- describe "Joined project team" do
- it "should create event" do
- observer.after_create user_project
- end
- end
-
- describe "Left project team" do
- it "should create event" do
- observer.after_destroy user_project
- end
- end
- end
end
diff --git a/spec/models/gitlab_ci_service_spec.rb b/spec/models/gitlab_ci_service_spec.rb
index a0708f14236..439a30869bb 100644
--- a/spec/models/gitlab_ci_service_spec.rb
+++ b/spec/models/gitlab_ci_service_spec.rb
@@ -26,7 +26,6 @@ describe GitlabCiService do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:project_id) }
end
describe 'commits methods' do
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb
index d53c4037c35..8b299cea67c 100644
--- a/spec/models/issue_spec.rb
+++ b/spec/models/issue_spec.rb
@@ -25,8 +25,6 @@ describe Issue do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:author_id) }
- it { should_not allow_mass_assignment_of(:project_id) }
end
describe 'modules' do
diff --git a/spec/models/key_spec.rb b/spec/models/key_spec.rb
index 474067fe38a..95c0aed0ffe 100644
--- a/spec/models/key_spec.rb
+++ b/spec/models/key_spec.rb
@@ -20,8 +20,6 @@ describe Key do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:project_id) }
- it { should_not allow_mass_assignment_of(:user_id) }
end
describe "Validation" do
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index 1148df87ab7..ec6d29de82b 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -28,8 +28,6 @@ describe MergeRequest do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:author_id) }
- it { should_not allow_mass_assignment_of(:project_id) }
end
describe "Respond to" do
diff --git a/spec/models/milestone_spec.rb b/spec/models/milestone_spec.rb
index 8309ad3a724..a3071c3251a 100644
--- a/spec/models/milestone_spec.rb
+++ b/spec/models/milestone_spec.rb
@@ -22,7 +22,6 @@ describe Milestone do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:project_id) }
end
describe "Validation" do
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb
index d2bf96979f9..3562ebed1ff 100644
--- a/spec/models/namespace_spec.rb
+++ b/spec/models/namespace_spec.rb
@@ -26,8 +26,6 @@ describe Namespace do
it { should validate_presence_of :owner }
describe "Mass assignment" do
- it { should allow_mass_assignment_of(:name) }
- it { should allow_mass_assignment_of(:path) }
end
describe "Respond to" do
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index 43779e6bbfc..d06dee6ce92 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -27,8 +27,6 @@ describe Note do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:author) }
- it { should_not allow_mass_assignment_of(:author_id) }
end
describe "Validation" do
diff --git a/spec/models/project_snippet_spec.rb b/spec/models/project_snippet_spec.rb
index 42147179387..e4df934460b 100644
--- a/spec/models/project_snippet_spec.rb
+++ b/spec/models/project_snippet_spec.rb
@@ -23,7 +23,6 @@ describe ProjectSnippet do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:project_id) }
end
describe "Validation" do
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index a2519fbd684..c3263ed0fe7 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -27,9 +27,6 @@
require 'spec_helper'
describe Project do
- before { enable_observers }
- after { disable_observers }
-
describe "Associations" do
it { should belong_to(:group) }
it { should belong_to(:namespace) }
@@ -51,8 +48,6 @@ describe Project do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:namespace_id) }
- it { should_not allow_mass_assignment_of(:creator_id) }
end
describe "Validation" do
diff --git a/spec/models/protected_branch_spec.rb b/spec/models/protected_branch_spec.rb
index 35b929c2f3e..af48c2c6d9e 100644
--- a/spec/models/protected_branch_spec.rb
+++ b/spec/models/protected_branch_spec.rb
@@ -17,7 +17,6 @@ describe ProtectedBranch do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:project_id) }
end
describe 'Validation' do
diff --git a/spec/models/service_spec.rb b/spec/models/service_spec.rb
index a4bed81c0f6..adeeac115c1 100644
--- a/spec/models/service_spec.rb
+++ b/spec/models/service_spec.rb
@@ -27,7 +27,6 @@ describe Service do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:project_id) }
end
describe "Test Button" do
diff --git a/spec/models/snippet_spec.rb b/spec/models/snippet_spec.rb
index a77c594aaf1..d179e9516e2 100644
--- a/spec/models/snippet_spec.rb
+++ b/spec/models/snippet_spec.rb
@@ -24,7 +24,6 @@ describe Snippet do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:author_id) }
end
describe "Validation" do
diff --git a/spec/models/system_hook_spec.rb b/spec/models/system_hook_spec.rb
index 47d6d861d70..2b98acdeb6c 100644
--- a/spec/models/system_hook_spec.rb
+++ b/spec/models/system_hook_spec.rb
@@ -19,21 +19,20 @@ require "spec_helper"
describe SystemHook do
describe "execute" do
- before(:each) { ActiveRecord::Base.observers.enable(:all) }
-
before(:each) do
@system_hook = create(:system_hook)
WebMock.stub_request(:post, @system_hook.url)
end
it "project_create hook" do
- project = create(:project)
+ Projects::CreateService.new(create(:user), name: 'empty').execute
WebMock.should have_requested(:post, @system_hook.url).with(body: /project_create/).once
end
it "project_destroy hook" do
- project = create(:project)
- project.destroy
+ user = create(:user)
+ project = create(:empty_project, namespace: user.namespace)
+ Projects::DestroyService.new(project, user, {}).execute
WebMock.should have_requested(:post, @system_hook.url).with(body: /project_destroy/).once
end
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 4e0ebb584d1..a36b57a95de 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -65,8 +65,6 @@ describe User do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:projects_limit) }
- it { should allow_mass_assignment_of(:projects_limit).as(:admin) }
end
describe 'validations' do
@@ -145,7 +143,6 @@ describe User do
describe 'projects' do
before do
- ActiveRecord::Base.observers.enable(:user_observer)
@user = create :user
@project = create :project, namespace: @user.namespace
@project_2 = create :project, group: create(:group) # Grant MASTER access to the user
@@ -168,7 +165,6 @@ describe User do
describe 'groups' do
before do
- ActiveRecord::Base.observers.enable(:user_observer)
@user = create :user
@group = create :group
@group.add_owner(@user)
@@ -181,7 +177,6 @@ describe User do
describe 'group multiple owners' do
before do
- ActiveRecord::Base.observers.enable(:user_observer)
@user = create :user
@user2 = create :user
@group = create :group
@@ -195,7 +190,6 @@ describe User do
describe 'namespaced' do
before do
- ActiveRecord::Base.observers.enable(:user_observer)
@user = create :user
@project = create :project, namespace: @user.namespace
end
@@ -247,59 +241,23 @@ describe User do
it { user.first_name.should == 'John' }
end
- describe 'without defaults' do
+ describe 'with defaults' do
let(:user) { User.new }
- it "should not apply defaults to user" do
- user.projects_limit.should == 10
- user.can_create_group.should be_true
- user.theme_id.should == Gitlab::Theme::BASIC
- end
- end
- context 'as admin' do
- describe 'with defaults' do
- let(:user) { User.build_user({}, as: :admin) }
-
- it "should apply defaults to user" do
- user.projects_limit.should == Gitlab.config.gitlab.default_projects_limit
- user.can_create_group.should == Gitlab.config.gitlab.default_can_create_group
- user.theme_id.should == Gitlab.config.gitlab.default_theme
- end
- end
-
- describe 'with default overrides' do
- let(:user) { User.build_user({projects_limit: 123, can_create_group: true, can_create_team: true, theme_id: Gitlab::Theme::BASIC}, as: :admin) }
-
- it "should apply defaults to user" do
- Gitlab.config.gitlab.default_projects_limit.should_not == 123
- Gitlab.config.gitlab.default_can_create_group.should_not be_true
- Gitlab.config.gitlab.default_theme.should_not == Gitlab::Theme::BASIC
- user.projects_limit.should == 123
- user.can_create_group.should be_true
- user.theme_id.should == Gitlab::Theme::BASIC
- end
+ it "should apply defaults to user" do
+ user.projects_limit.should == Gitlab.config.gitlab.default_projects_limit
+ user.can_create_group.should == Gitlab.config.gitlab.default_can_create_group
+ user.theme_id.should == Gitlab.config.gitlab.default_theme
end
end
- context 'as user' do
- describe 'with defaults' do
- let(:user) { User.build_user }
+ describe 'with default overrides' do
+ let(:user) { User.new(projects_limit: 123, can_create_group: false, can_create_team: true, theme_id: Gitlab::Theme::BASIC) }
- it "should apply defaults to user" do
- user.projects_limit.should == Gitlab.config.gitlab.default_projects_limit
- user.can_create_group.should == Gitlab.config.gitlab.default_can_create_group
- user.theme_id.should == Gitlab.config.gitlab.default_theme
- end
- end
-
- describe 'with default overrides' do
- let(:user) { User.build_user(projects_limit: 123, can_create_group: true, theme_id: Gitlab::Theme::BASIC) }
-
- it "should apply defaults to user" do
- user.projects_limit.should == Gitlab.config.gitlab.default_projects_limit
- user.can_create_group.should == Gitlab.config.gitlab.default_can_create_group
- user.theme_id.should == Gitlab.config.gitlab.default_theme
- end
+ it "should apply defaults to user" do
+ user.projects_limit.should == 123
+ user.can_create_group.should be_false
+ user.theme_id.should == Gitlab::Theme::BASIC
end
end
end
@@ -339,7 +297,7 @@ describe User do
user.all_ssh_keys.should include(key.key)
end
end
-
+
describe :avatar_type do
let(:user) { create(:user) }
diff --git a/spec/models/users_group_spec.rb b/spec/models/users_group_spec.rb
index acecae07146..0b6f7a08198 100644
--- a/spec/models/users_group_spec.rb
+++ b/spec/models/users_group_spec.rb
@@ -20,7 +20,6 @@ describe UsersGroup do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:group_id) }
end
describe "Validation" do
@@ -37,4 +36,32 @@ describe UsersGroup do
it { should respond_to(:user_name) }
it { should respond_to(:user_email) }
end
+
+ context 'notification' do
+ describe "#after_create" do
+ it "should send email to user" do
+ membership = build(:users_group)
+ membership.stub(notification_service: double('NotificationService').as_null_object)
+ membership.should_receive(:notification_service)
+ membership.save
+ end
+ end
+
+ describe "#after_update" do
+ before do
+ @membership = create :users_group
+ @membership.stub(notification_service: double('NotificationService').as_null_object)
+ end
+
+ it "should send email to user" do
+ @membership.should_receive(:notification_service)
+ @membership.update_attribute(:group_access, UsersGroup::MASTER)
+ end
+
+ it "does not send an email when the access level has not changed" do
+ @membership.should_not_receive(:notification_service)
+ @membership.update_attribute(:group_access, UsersGroup::OWNER)
+ end
+ end
+ end
end
diff --git a/spec/models/users_project_spec.rb b/spec/models/users_project_spec.rb
index aa4b8cb449b..3f38164e964 100644
--- a/spec/models/users_project_spec.rb
+++ b/spec/models/users_project_spec.rb
@@ -20,7 +20,6 @@ describe UsersProject do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:project_id) }
end
describe "Validation" do
diff --git a/spec/models/web_hook_spec.rb b/spec/models/web_hook_spec.rb
index 20ee1416125..e9c04ee89cb 100644
--- a/spec/models/web_hook_spec.rb
+++ b/spec/models/web_hook_spec.rb
@@ -23,7 +23,6 @@ describe ProjectHook do
end
describe "Mass assignment" do
- it { should_not allow_mass_assignment_of(:project_id) }
end
describe "Validations" do
diff --git a/spec/observers/note_observer_spec.rb b/spec/observers/note_observer_spec.rb
deleted file mode 100644
index f8693355b23..00000000000
--- a/spec/observers/note_observer_spec.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-require 'spec_helper'
-
-describe NoteObserver do
- subject { NoteObserver.instance }
- before { subject.stub(notification: double('NotificationService').as_null_object) }
-
- let(:team_without_author) { (1..2).map { |n| double :user, id: n } }
- let(:note) { double(:note).as_null_object }
-
- describe '#after_create' do
-
- it 'is called after a note is created' do
- subject.should_receive :after_create
-
- Note.observers.enable :note_observer do
- create(:note)
- end
- end
-
- it 'sends out notifications' do
- subject.should_receive(:notification)
-
- subject.after_create(note)
- end
-
- it 'creates cross-reference notes as appropriate' do
- @p = create(:project)
- @referenced = create(:issue, project: @p)
- @referencer = create(:issue, project: @p)
- @author = create(:user)
-
- Note.should_receive(:create_cross_reference_note).with(@referenced, @referencer, @author, @p)
-
- Note.observers.enable :note_observer do
- create(:note, project: @p, author: @author, noteable: @referencer,
- note: "Duplicate of ##{@referenced.iid}")
- end
- end
-
- it "doesn't cross-reference system notes" do
- Note.should_receive(:create_cross_reference_note).once
-
- Note.observers.enable :note_observer do
- Note.create_cross_reference_note(create(:issue), create(:issue))
- end
- end
- end
-
- describe '#after_update' do
- it 'checks for new cross-references' do
- note.should_receive(:notice_added_references)
-
- subject.after_update(note)
- end
- end
-end
diff --git a/spec/observers/user_observer_spec.rb b/spec/observers/user_observer_spec.rb
deleted file mode 100644
index 9aeade535f9..00000000000
--- a/spec/observers/user_observer_spec.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-require 'spec_helper'
-
-describe UserObserver do
- before(:each) { enable_observers }
- after(:each) {disable_observers}
- subject { UserObserver.instance }
- before { subject.stub(notification: double('NotificationService').as_null_object) }
-
- it 'calls #after_create when new users are created' do
- new_user = build(:user)
- subject.should_receive(:after_create).with(new_user)
- new_user.save
- end
-
- context 'when a new user is created' do
- it 'sends an email' do
- subject.should_receive(:notification)
- create(:user)
- end
-
- it 'trigger logger' do
- user = double(:user, id: 42, password: 'P@ssword!', name: 'John', email: 'u@mail.local', extern_uid?: false)
- Gitlab::AppLogger.should_receive(:info)
- create(:user)
- end
- end
-end
diff --git a/spec/observers/users_group_observer_spec.rb b/spec/observers/users_group_observer_spec.rb
deleted file mode 100644
index 2ab99c33b78..00000000000
--- a/spec/observers/users_group_observer_spec.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-require 'spec_helper'
-
-describe UsersGroupObserver do
- before(:each) { enable_observers }
- after(:each) { disable_observers }
-
- subject { UsersGroupObserver.instance }
- before { subject.stub(notification: double('NotificationService').as_null_object) }
-
- describe "#after_create" do
- it "should send email to user" do
- subject.should_receive(:notification)
- create(:users_group)
- end
- end
-
- describe "#after_update" do
- before do
- @membership = create :users_group
- end
-
- it "should send email to user" do
- subject.should_receive(:notification)
- @membership.update_attribute(:group_access, UsersGroup::MASTER)
- end
-
- it "does not send an email when the access level has not changed" do
- subject.should_not_receive(:notification)
- @membership.update_attribute(:group_access, UsersGroup::OWNER)
- end
- end
-end
diff --git a/spec/observers/users_project_observer_spec.rb b/spec/observers/users_project_observer_spec.rb
deleted file mode 100644
index b024465e8c3..00000000000
--- a/spec/observers/users_project_observer_spec.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-require 'spec_helper'
-
-describe UsersProjectObserver do
- before(:each) { enable_observers }
- after(:each) { disable_observers }
-
- let(:user) { create(:user) }
- let(:project) { create(:project) }
- subject { UsersProjectObserver.instance }
- before { subject.stub(notification: double('NotificationService').as_null_object) }
-
- describe "#after_update" do
- before do
- @users_project = create :users_project
- end
-
- it "should called when UsersProject updated" do
- subject.should_receive(:after_update)
- @users_project.update_attribute(:project_access, UsersProject::MASTER)
- end
-
- it "should send email to user" do
- subject.should_receive(:notification)
- @users_project.update_attribute(:project_access, UsersProject::OWNER)
- end
-
- it "should not called after UsersProject destroyed" do
- subject.should_not_receive(:after_update)
- @users_project.destroy
- end
- end
-
- describe "#after_destroy" do
- before do
- @users_project = create :users_project
- end
-
- it "should called when UsersProject destroyed" do
- subject.should_receive(:after_destroy)
- @users_project.destroy
- end
-
- it "should create new event" do
- Event.should_receive(:create)
- @users_project.destroy
- end
- end
-
- describe "#after_create" do
- it "should send email to user" do
- subject.should_receive(:notification)
- Event.stub(create: true)
-
- create(:users_project)
- end
-
- it "should create new event" do
- Event.should_receive(:create)
-
- create(:users_project)
- end
- end
-end
diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb
index 72589da5d40..b145e620122 100644
--- a/spec/requests/api/branches_spec.rb
+++ b/spec/requests/api/branches_spec.rb
@@ -3,8 +3,6 @@ require 'mime/types'
describe API::API, api: true do
include ApiHelpers
- before(:each) { enable_observers }
- after(:each) {disable_observers}
let(:user) { create(:user) }
let(:user2) { create(:user) }
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb
index 165276d1435..b56269d275d 100644
--- a/spec/requests/api/commits_spec.rb
+++ b/spec/requests/api/commits_spec.rb
@@ -3,9 +3,6 @@ require 'mime/types'
describe API::API, api: true do
include ApiHelpers
- before(:each) { enable_observers }
- after(:each) {disable_observers}
-
let(:user) { create(:user) }
let(:user2) { create(:user) }
let!(:project) { create(:project, creator_id: user.id) }
diff --git a/spec/requests/api/files_spec.rb b/spec/requests/api/files_spec.rb
index edfe935d985..e84122f2fbc 100644
--- a/spec/requests/api/files_spec.rb
+++ b/spec/requests/api/files_spec.rb
@@ -2,9 +2,6 @@ require 'spec_helper'
describe API::API, api: true do
include ApiHelpers
- before(:each) { ActiveRecord::Base.observers.enable(:user_observer) }
- after(:each) { ActiveRecord::Base.observers.disable(:user_observer) }
-
let(:user) { create(:user) }
let!(:project) { create(:project, namespace: user.namespace ) }
before { project.team << [user, :developer] }
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb
index 8797c3fbbbf..dbe8043c633 100644
--- a/spec/requests/api/internal_spec.rb
+++ b/spec/requests/api/internal_spec.rb
@@ -2,9 +2,6 @@ require 'spec_helper'
describe API::API, api: true do
include ApiHelpers
- before(:each) { ActiveRecord::Base.observers.enable(:user_observer) }
- after(:each) { ActiveRecord::Base.observers.disable(:user_observer) }
-
let(:user) { create(:user) }
let(:key) { create(:key, user: user) }
let(:project) { create(:project) }
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb
index e62bc844352..dff7f20cb32 100644
--- a/spec/requests/api/issues_spec.rb
+++ b/spec/requests/api/issues_spec.rb
@@ -2,9 +2,6 @@ require 'spec_helper'
describe API::API, api: true do
include ApiHelpers
- before(:each) { ActiveRecord::Base.observers.enable(:user_observer) }
- after(:each) { ActiveRecord::Base.observers.disable(:user_observer) }
-
let(:user) { create(:user) }
let!(:project) { create(:project, namespace: user.namespace ) }
let!(:issue) { create(:issue, author: user, assignee: user, project: project) }
diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb
index 2fb3684fdf0..3611d9d6dc3 100644
--- a/spec/requests/api/merge_requests_spec.rb
+++ b/spec/requests/api/merge_requests_spec.rb
@@ -2,8 +2,6 @@ require "spec_helper"
describe API::API, api: true do
include ApiHelpers
- before(:each) { ActiveRecord::Base.observers.enable(:user_observer) }
- after(:each) { ActiveRecord::Base.observers.disable(:user_observer) }
let(:user) { create(:user) }
let!(:project) {create(:project, creator_id: user.id, namespace: user.namespace) }
let!(:merge_request) { create(:merge_request, :simple, author: user, assignee: user, source_project: project, target_project: project, title: "Test") }
diff --git a/spec/requests/api/milestones_spec.rb b/spec/requests/api/milestones_spec.rb
index 0d2740c5acf..f0619a1c801 100644
--- a/spec/requests/api/milestones_spec.rb
+++ b/spec/requests/api/milestones_spec.rb
@@ -2,9 +2,6 @@ require 'spec_helper'
describe API::API, api: true do
include ApiHelpers
- before(:each) { enable_observers }
- after(:each) {disable_observers}
-
let(:user) { create(:user) }
let!(:project) { create(:project, namespace: user.namespace ) }
let!(:milestone) { create(:milestone, project: project) }
@@ -92,9 +89,6 @@ describe API::API, api: true do
end
describe "PUT /projects/:id/milestones/:milestone_id to test observer on close" do
- before { enable_observers }
- after { disable_observers }
-
it "should create an activity event when an milestone is closed" do
Event.should_receive(:create)
diff --git a/spec/requests/api/namespaces_spec.rb b/spec/requests/api/namespaces_spec.rb
index 2de7d1e23c3..d9d52468b15 100644
--- a/spec/requests/api/namespaces_spec.rb
+++ b/spec/requests/api/namespaces_spec.rb
@@ -2,9 +2,6 @@ require 'spec_helper'
describe API::API, api: true do
include ApiHelpers
- before(:each) { ActiveRecord::Base.observers.enable(:user_observer) }
- after(:each) { ActiveRecord::Base.observers.disable(:user_observer) }
-
let(:admin) { create(:admin) }
let!(:group1) { create(:group) }
let!(:group2) { create(:group) }
diff --git a/spec/requests/api/notes_spec.rb b/spec/requests/api/notes_spec.rb
index 2875db04ee4..7aa53787aed 100644
--- a/spec/requests/api/notes_spec.rb
+++ b/spec/requests/api/notes_spec.rb
@@ -2,9 +2,6 @@ require 'spec_helper'
describe API::API, api: true do
include ApiHelpers
- before(:each) { ActiveRecord::Base.observers.enable(:user_observer) }
- after(:each) { ActiveRecord::Base.observers.disable(:user_observer) }
-
let(:user) { create(:user) }
let!(:project) { create(:project, namespace: user.namespace ) }
let!(:issue) { create(:issue, project: project, author: user) }
@@ -128,14 +125,10 @@ describe API::API, api: true do
end
describe "POST /projects/:id/noteable/:noteable_id/notes to test observer on create" do
- before { enable_observers }
- after { disable_observers }
-
it "should create an activity event when an issue note is created" do
Event.should_receive(:create)
post api("/projects/#{project.id}/issues/#{issue.id}/notes", user), body: 'hi!'
end
end
-
end
diff --git a/spec/requests/api/project_hooks_spec.rb b/spec/requests/api/project_hooks_spec.rb
index 6e281f5a43e..cdb5e3d0612 100644
--- a/spec/requests/api/project_hooks_spec.rb
+++ b/spec/requests/api/project_hooks_spec.rb
@@ -2,9 +2,6 @@ require 'spec_helper'
describe API::API, 'ProjectHooks', api: true do
include ApiHelpers
- before(:each) { enable_observers }
- after(:each) { disable_observers }
-
let(:user) { create(:user) }
let(:user3) { create(:user) }
let!(:project) { create(:project, creator_id: user.id, namespace: user.namespace) }
diff --git a/spec/requests/api/project_members_spec.rb b/spec/requests/api/project_members_spec.rb
index 032f850010c..3c480c2ac4b 100644
--- a/spec/requests/api/project_members_spec.rb
+++ b/spec/requests/api/project_members_spec.rb
@@ -2,9 +2,6 @@ require 'spec_helper'
describe API::API, api: true do
include ApiHelpers
- before(:each) { enable_observers }
- after(:each) { disable_observers }
-
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:user3) { create(:user) }
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index 415735091c3..41841e855fd 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -2,9 +2,6 @@ require 'spec_helper'
describe API::API, api: true do
include ApiHelpers
- before(:each) { enable_observers }
- after(:each) { disable_observers }
-
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:user3) { create(:user) }
diff --git a/spec/requests/api/repositories_spec.rb b/spec/requests/api/repositories_spec.rb
index 5afb3bddcb7..a02231a5bba 100644
--- a/spec/requests/api/repositories_spec.rb
+++ b/spec/requests/api/repositories_spec.rb
@@ -3,9 +3,6 @@ require 'mime/types'
describe API::API, api: true do
include ApiHelpers
- before(:each) { enable_observers }
- after(:each) {disable_observers}
-
let(:user) { create(:user) }
let(:user2) { create(:user) }
let!(:project) { create(:project, creator_id: user.id) }
@@ -131,7 +128,7 @@ describe API::API, api: true do
end
end
- describe 'GET /GET /projects/:id/repository/compare' do
+ describe 'GET /projects/:id/repository/compare' do
it "should compare branches" do
get api("/projects/#{project.id}/repository/compare", user), from: 'master', to: 'simple_merge_request'
response.status.should == 200
@@ -169,4 +166,18 @@ describe API::API, api: true do
json_response['compare_same_ref'].should be_true
end
end
+
+ describe 'GET /projects/:id/repository/contributors' do
+ it 'should return valid data' do
+ get api("/projects/#{project.id}/repository/contributors", user)
+ response.status.should == 200
+ json_response.should be_an Array
+ contributor = json_response.first
+ contributor['email'].should == 'dmitriy.zaporozhets@gmail.com'
+ contributor['name'].should == 'Dmitriy Zaporozhets'
+ contributor['commits'].should == 185
+ contributor['additions'].should == 66072
+ contributor['deletions'].should == 63013
+ end
+ end
end
diff --git a/spec/requests/api/services_spec.rb b/spec/requests/api/services_spec.rb
index 684f8615999..f883c9e028a 100644
--- a/spec/requests/api/services_spec.rb
+++ b/spec/requests/api/services_spec.rb
@@ -2,9 +2,6 @@ require "spec_helper"
describe API::API, api: true do
include ApiHelpers
- before(:each) { ActiveRecord::Base.observers.enable(:user_observer) }
- after(:each) { ActiveRecord::Base.observers.disable(:user_observer) }
-
let(:user) { create(:user) }
let(:project) {create(:project, creator_id: user.id, namespace: user.namespace) }
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index c3eec56d133..8bbe9b5b736 100644
--- a/spec/requests/api/users_spec.rb
+++ b/spec/requests/api/users_spec.rb
@@ -97,19 +97,6 @@ describe API::API, api: true do
response.status.should == 201
end
- it "creating a user should respect default project limit" do
- limit = 123456
- Gitlab.config.gitlab.stub(:default_projects_limit).and_return(limit)
- attr = attributes_for(:user )
- expect {
- post api("/users", admin), attr
- }.to change { User.count }.by(1)
- user = User.find_by(username: attr[:username])
- user.projects_limit.should == limit
- user.theme_id.should == Gitlab::Theme::MARS
- Gitlab.config.gitlab.unstub(:default_projects_limit)
- end
-
it "should not create user with invalid email" do
post api("/users", admin), { email: "invalid email", password: 'password' }
response.status.should == 400
diff --git a/spec/services/issues/bulk_update_context_spec.rb b/spec/services/issues/bulk_update_context_spec.rb
index 548109a8450..f4c9148f1a3 100644
--- a/spec/services/issues/bulk_update_context_spec.rb
+++ b/spec/services/issues/bulk_update_context_spec.rb
@@ -1,12 +1,9 @@
require 'spec_helper'
describe Issues::BulkUpdateService do
- before(:each) { ActiveRecord::Base.observers.enable(:user_observer) }
- after(:each) { ActiveRecord::Base.observers.disable(:user_observer) }
-
let(:issue) {
create(:issue, project: @project)
- }
+ }
before do
@user = create :user
@@ -23,7 +20,7 @@ describe Issues::BulkUpdateService do
@issues = 5.times.collect do
create(:issue, project: @project)
end
- @params = {
+ @params = {
update: {
status: 'closed',
issues_ids: @issues.map(&:id)
@@ -48,7 +45,7 @@ describe Issues::BulkUpdateService do
@issues = 5.times.collect do
create(:closed_issue, project: @project)
end
- @params = {
+ @params = {
update: {
status: 'reopen',
issues_ids: @issues.map(&:id)
@@ -71,7 +68,7 @@ describe Issues::BulkUpdateService do
before do
@new_assignee = create :user
- @params = {
+ @params = {
update: {
issues_ids: [issue.id],
assignee_id: @new_assignee.id
@@ -93,7 +90,7 @@ describe Issues::BulkUpdateService do
before do
@milestone = create :milestone
- @params = {
+ @params = {
update: {
issues_ids: [issue.id],
milestone_id: @milestone.id
diff --git a/spec/services/milestones/group_service_spec.rb b/spec/services/milestones/group_service_spec.rb
new file mode 100644
index 00000000000..74eb0f99e0f
--- /dev/null
+++ b/spec/services/milestones/group_service_spec.rb
@@ -0,0 +1,70 @@
+require 'spec_helper'
+
+describe Milestones::GroupService do
+ let(:user) { create(:user) }
+ let(:user2) { create(:user) }
+ let(:group) { create(:group) }
+ let(:project1) { create(:project, group: group) }
+ let(:project2) { create(:project, path: 'gitlab-ci', group: group) }
+ let(:project3) { create(:project, path: 'cookbook-gitlab', group: group) }
+ let(:milestone1_project1) { create(:milestone, title: "Milestone v1.2", project: project1) }
+ let(:milestone1_project2) { create(:milestone, title: "Milestone v1.2", project: project2) }
+ let(:milestone1_project3) { create(:milestone, title: "Milestone v1.2", project: project3) }
+ let(:milestone2_project1) { create(:milestone, title: "VD-123", project: project1) }
+ let(:milestone2_project2) { create(:milestone, title: "VD-123", project: project2) }
+ let(:milestone2_project3) { create(:milestone, title: "VD-123", project: project3) }
+
+ describe 'execute' do
+ context 'with valid projects' do
+ before do
+ milestones =
+ [
+ milestone1_project1,
+ milestone1_project2,
+ milestone1_project3,
+ milestone2_project1,
+ milestone2_project2,
+ milestone2_project3
+ ]
+ @group_milestones = Milestones::GroupService.new(milestones).execute
+ end
+
+ it 'should have all project milestones' do
+ expect(@group_milestones.count).to eq(2)
+ end
+
+ it 'should have all project milestones titles' do
+ expect(@group_milestones.map { |group_milestone| group_milestone.title }).to match_array(['Milestone v1.2', 'VD-123'])
+ end
+
+ it 'should have all project milestones' do
+ expect(@group_milestones.map { |group_milestone| group_milestone.milestones.count }.sum).to eq(6)
+ end
+ end
+ end
+
+ describe 'milestone' do
+ context 'with valid title' do
+ before do
+ milestones =
+ [
+ milestone1_project1,
+ milestone1_project2,
+ milestone1_project3,
+ milestone2_project1,
+ milestone2_project2,
+ milestone2_project3
+ ]
+ @group_milestones = Milestones::GroupService.new(milestones).milestone('Milestone v1.2')
+ end
+
+ it 'should have exactly one group milestone' do
+ expect(@group_milestones.title).to eq('Milestone v1.2')
+ end
+
+ it 'should have all project milestones with the same title' do
+ expect(@group_milestones.milestones.count).to eq(3)
+ end
+ end
+ end
+end
diff --git a/spec/services/notes/create_service_spec.rb b/spec/services/notes/create_service_spec.rb
new file mode 100644
index 00000000000..f59786efcf9
--- /dev/null
+++ b/spec/services/notes/create_service_spec.rb
@@ -0,0 +1,26 @@
+require 'spec_helper'
+
+describe Notes::CreateService do
+ let(:project) { create(:empty_project) }
+ let(:issue) { create(:issue, project: project) }
+ let(:user) { create(:user) }
+
+ describe :execute do
+ context "valid params" do
+ before do
+ project.team << [user, :master]
+ opts = {
+ note: 'Awesome comment',
+ noteable_type: 'Issue',
+ noteable_id: issue.id
+ }
+
+ @note = Notes::CreateService.new(project, user, opts).execute
+ end
+
+ it { @note.should be_valid }
+ it { @note.note.should == 'Awesome comment' }
+ end
+ end
+end
+
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index 57a4240f7a2..df355f6f07a 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -95,6 +95,49 @@ describe NotificationService do
end
end
+ context 'issue note mention' do
+ let(:issue) { create(:issue, assignee: create(:user)) }
+ let(:mentioned_issue) { create(:issue, assignee: issue.assignee) }
+ let(:note) { create(:note_on_issue, noteable: issue, project_id: issue.project_id, note: '@all mentioned') }
+
+ before do
+ build_team(note.project)
+ end
+
+ describe :new_note do
+ it do
+ # Notify all team members
+ note.project.team.members.each do |member|
+ # User with disabled notification should not be notified
+ next if member.id == @u_disabled.id
+ should_email(member.id)
+ end
+ should_email(note.noteable.author_id)
+ should_email(note.noteable.assignee_id)
+
+ should_not_email(note.author_id)
+ should_not_email(@u_disabled.id)
+ should_not_email(@u_not_mentioned.id)
+ notification.new_note(note)
+ end
+
+ it 'filters out "mentioned in" notes' do
+ mentioned_note = Note.create_cross_reference_note(mentioned_issue, issue, issue.author, issue.project)
+
+ Notify.should_not_receive(:note_issue_email)
+ notification.new_note(mentioned_note)
+ end
+ end
+
+ def should_email(user_id)
+ Notify.should_receive(:note_issue_email).with(user_id, note.id)
+ end
+
+ def should_not_email(user_id)
+ Notify.should_not_receive(:note_issue_email).with(user_id, note.id)
+ end
+ end
+
context 'commit note' do
let(:note) { create(:note_on_commit) }
@@ -172,7 +215,7 @@ describe NotificationService do
end
def should_email(user_id)
- Notify.should_receive(:reassigned_issue_email).with(user_id, issue.id, issue.assignee_id, @u_disabled.id)
+ Notify.should_receive(:reassigned_issue_email).with(user_id, issue.id, nil, @u_disabled.id)
end
def should_not_email(user_id)
@@ -199,6 +242,26 @@ describe NotificationService do
Notify.should_not_receive(:closed_issue_email).with(user_id, issue.id, @u_disabled.id)
end
end
+
+ describe :reopen_issue do
+ it 'should send email to issue assignee and issue author' do
+ should_email(issue.assignee_id)
+ should_email(issue.author_id)
+ should_email(@u_watcher.id)
+ should_not_email(@u_participating.id)
+ should_not_email(@u_disabled.id)
+
+ notification.reopen_issue(issue, @u_disabled)
+ end
+
+ def should_email(user_id)
+ Notify.should_receive(:issue_status_changed_email).with(user_id, issue.id, 'reopened', @u_disabled.id)
+ end
+
+ def should_not_email(user_id)
+ Notify.should_not_receive(:issue_status_changed_email).with(user_id, issue.id, 'reopened', @u_disabled.id)
+ end
+ end
end
describe 'Merge Requests' do
@@ -236,7 +299,7 @@ describe NotificationService do
end
def should_email(user_id)
- Notify.should_receive(:reassigned_merge_request_email).with(user_id, merge_request.id, merge_request.assignee_id, merge_request.author_id)
+ Notify.should_receive(:reassigned_merge_request_email).with(user_id, merge_request.id, nil, merge_request.author_id)
end
def should_not_email(user_id)
@@ -279,6 +342,24 @@ describe NotificationService do
Notify.should_not_receive(:merged_merge_request_email).with(user_id, merge_request.id, @u_disabled.id)
end
end
+
+ describe :reopen_merge_request do
+ it do
+ should_email(merge_request.assignee_id)
+ should_email(@u_watcher.id)
+ should_not_email(@u_participating.id)
+ should_not_email(@u_disabled.id)
+ notification.reopen_mr(merge_request, @u_disabled)
+ end
+
+ def should_email(user_id)
+ Notify.should_receive(:merge_request_status_email).with(user_id, merge_request.id, 'reopened', @u_disabled.id)
+ end
+
+ def should_not_email(user_id)
+ Notify.should_not_receive(:merge_request_status_email).with(user_id, merge_request.id, 'reopened', @u_disabled.id)
+ end
+ end
end
describe 'Projects' do
@@ -312,6 +393,7 @@ describe NotificationService do
@u_disabled = create(:user, notification_level: Notification::N_DISABLED)
@u_mentioned = create(:user, username: 'mention', notification_level: Notification::N_PARTICIPATING)
@u_committer = create(:user, username: 'committer')
+ @u_not_mentioned = create(:user, username: 'regular', notification_level: Notification::N_PARTICIPATING)
project.team << [@u_watcher, :master]
project.team << [@u_participating, :master]
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb
index 0eac6bed74b..9c97dad2ff0 100644
--- a/spec/services/projects/create_service_spec.rb
+++ b/spec/services/projects/create_service_spec.rb
@@ -1,9 +1,6 @@
require 'spec_helper'
describe Projects::CreateService do
- before(:each) { ActiveRecord::Base.observers.enable(:user_observer) }
- after(:each) { ActiveRecord::Base.observers.disable(:user_observer) }
-
describe :create_by_user do
before do
@user = create :user
@@ -58,104 +55,9 @@ describe Projects::CreateService do
it { File.exists?(@path).should be_false }
end
end
-
- context 'respect configured visibility setting' do
- before(:each) do
- @settings = double("settings")
- @settings.stub(:issues) { true }
- @settings.stub(:merge_requests) { true }
- @settings.stub(:wiki) { true }
- @settings.stub(:snippets) { true }
- stub_const("Settings", Class.new)
- @restrictions = double("restrictions")
- @restrictions.stub(:restricted_visibility_levels) { [] }
- Settings.stub_chain(:gitlab).and_return(@restrictions)
- Settings.stub_chain(:gitlab, :default_projects_features).and_return(@settings)
- end
-
- context 'should be public when setting is public' do
- before do
- @settings.stub(:visibility_level) { Gitlab::VisibilityLevel::PUBLIC }
- @project = create_project(@user, @opts)
- end
-
- it { @project.public?.should be_true }
- end
-
- context 'should be private when setting is private' do
- before do
- @settings.stub(:visibility_level) { Gitlab::VisibilityLevel::PRIVATE }
- @project = create_project(@user, @opts)
- end
-
- it { @project.private?.should be_true }
- end
-
- context 'should be internal when setting is internal' do
- before do
- @settings.stub(:visibility_level) { Gitlab::VisibilityLevel::INTERNAL }
- @project = create_project(@user, @opts)
- end
-
- it { @project.internal?.should be_true }
- end
- end
-
- context 'respect configured visibility restrictions setting' do
- before(:each) do
- @settings = double("settings")
- @settings.stub(:issues) { true }
- @settings.stub(:merge_requests) { true }
- @settings.stub(:wiki) { true }
- @settings.stub(:snippets) { true }
- @settings.stub(:visibility_level) { Gitlab::VisibilityLevel::PRIVATE }
- stub_const("Settings", Class.new)
- @restrictions = double("restrictions")
- @restrictions.stub(:restricted_visibility_levels) { [ Gitlab::VisibilityLevel::PUBLIC ] }
- Settings.stub_chain(:gitlab).and_return(@restrictions)
- Settings.stub_chain(:gitlab, :default_projects_features).and_return(@settings)
- end
-
- context 'should be private when option is public' do
- before do
- @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
- @project = create_project(@user, @opts)
- end
-
- it { @project.private?.should be_true }
- end
-
- context 'should be public when option is public for admin' do
- before do
- @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
- @project = create_project(@admin, @opts)
- end
-
- it { @project.public?.should be_true }
- end
-
- context 'should be private when option is private' do
- before do
- @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
- @project = create_project(@user, @opts)
- end
-
- it { @project.private?.should be_true }
- end
-
- context 'should be internal when option is internal' do
- before do
- @opts.merge!(visibility_level: Gitlab::VisibilityLevel::INTERNAL)
- @project = create_project(@user, @opts)
- end
-
- it { @project.internal?.should be_true }
- end
- end
end
def create_project(user, opts)
Projects::CreateService.new(user, opts).execute
end
end
-
diff --git a/spec/services/projects/image_service_spec.rb b/spec/services/projects/image_service_spec.rb
index 070c21698cf..23c4e227ae3 100644
--- a/spec/services/projects/image_service_spec.rb
+++ b/spec/services/projects/image_service_spec.rb
@@ -1,9 +1,6 @@
require 'spec_helper'
describe Projects::ImageService do
- before(:each) { enable_observers }
- after(:each) { disable_observers }
-
describe 'Image service' do
before do
@user = create :user
diff --git a/spec/services/projects/transfer_service_spec.rb b/spec/services/projects/transfer_service_spec.rb
index 563a8b0c01c..2508dfc4565 100644
--- a/spec/services/projects/transfer_service_spec.rb
+++ b/spec/services/projects/transfer_service_spec.rb
@@ -1,9 +1,6 @@
require 'spec_helper'
describe Projects::TransferService do
- before(:each) { enable_observers }
- after(:each) {disable_observers}
-
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:group2) { create(:group) }
diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb
index 1854c0d8233..62357787521 100644
--- a/spec/services/projects/update_service_spec.rb
+++ b/spec/services/projects/update_service_spec.rb
@@ -1,22 +1,19 @@
require 'spec_helper'
describe Projects::UpdateService do
- before(:each) { ActiveRecord::Base.observers.enable(:user_observer) }
- after(:each) { ActiveRecord::Base.observers.disable(:user_observer) }
-
describe :update_by_user do
before do
@user = create :user
@admin = create :user, admin: true
@project = create :project, creator_id: @user.id, namespace: @user.namespace
- @opts = { project: {} }
+ @opts = {}
end
context 'should be private when updated to private' do
before do
@created_private = @project.private?
- @opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
+ @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
update_project(@project, @user, @opts)
end
@@ -28,7 +25,7 @@ describe Projects::UpdateService do
before do
@created_private = @project.private?
- @opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::INTERNAL)
+ @opts.merge!(visibility_level: Gitlab::VisibilityLevel::INTERNAL)
update_project(@project, @user, @opts)
end
@@ -40,7 +37,7 @@ describe Projects::UpdateService do
before do
@created_private = @project.private?
- @opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
+ @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
update_project(@project, @user, @opts)
end
@@ -59,7 +56,7 @@ describe Projects::UpdateService do
before do
@created_private = @project.private?
- @opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
+ @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
update_project(@project, @user, @opts)
end
@@ -71,7 +68,7 @@ describe Projects::UpdateService do
before do
@created_private = @project.private?
- @opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::INTERNAL)
+ @opts.merge!(visibility_level: Gitlab::VisibilityLevel::INTERNAL)
update_project(@project, @user, @opts)
end
@@ -83,7 +80,7 @@ describe Projects::UpdateService do
before do
@created_private = @project.private?
- @opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
+ @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
update_project(@project, @user, @opts)
end
@@ -95,7 +92,7 @@ describe Projects::UpdateService do
before do
@created_private = @project.private?
- @opts[:project].merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
+ @opts.merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
update_project(@project, @admin, @opts)
end
diff --git a/spec/services/search_service_spec.rb b/spec/services/search_service_spec.rb
index b467282a5d6..daffe98a8ed 100644
--- a/spec/services/search_service_spec.rb
+++ b/spec/services/search_service_spec.rb
@@ -1,19 +1,18 @@
require 'spec_helper'
describe 'Search::GlobalService' do
- let(:user) { create(:user, namespace: found_namespace) }
- let(:public_user) { create(:user, namespace: public_namespace) }
- let(:internal_user) { create(:user, namespace: internal_namespace) }
+ let(:user) { create(:user) }
+ let(:public_user) { create(:user) }
+ let(:internal_user) { create(:user) }
- let(:found_namespace) { create(:namespace, name: 'searchable namespace', path:'another_thing') }
- let(:unfound_namespace) { create(:namespace, name: 'unfound namespace', path: 'yet_something_else') }
- let(:internal_namespace) { create(:namespace, name: 'searchable internal namespace', path: 'something_internal') }
- let(:public_namespace) { create(:namespace, name: 'searchable public namespace', path: 'something_public') }
+ let!(:found_project) { create(:empty_project, :private, name: 'searchable_project') }
+ let!(:unfound_project) { create(:empty_project, :private, name: 'unfound_project') }
+ let!(:internal_project) { create(:empty_project, :internal, name: 'searchable_internal_project') }
+ let!(:public_project) { create(:empty_project, :public, name: 'searchable_public_project') }
- let!(:found_project) { create(:project, :private, name: 'searchable_project', creator_id: user.id, namespace: found_namespace) }
- let!(:unfound_project) { create(:project, :private, name: 'unfound_project', creator_id: user.id, namespace: unfound_namespace) }
- let!(:internal_project) { create(:project, :internal, name: 'searchable_internal_project', creator_id: internal_user.id, namespace: internal_namespace) }
- let!(:public_project) { create(:project, :public, name: 'searchable_public_project', creator_id: public_user.id, namespace: public_namespace) }
+ before do
+ found_project.team << [user, :master]
+ end
describe '#execute' do
context 'unauthenticated' do
@@ -38,7 +37,7 @@ describe 'Search::GlobalService' do
end
it 'namespace name should be searchable' do
- context = Search::GlobalService.new(user, search: "searchable namespace")
+ context = Search::GlobalService.new(user, search: found_project.namespace.path)
results = context.execute
results[:projects].should match_array [found_project]
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 65a641bcf12..2181238ae9f 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -43,7 +43,7 @@ RSpec.configure do |config|
# instead of true.
config.before(:suite) do
- TestEnv.init(observers: false, init_repos: true, repos: false)
+ TestEnv.init(init_repos: true, repos: false)
end
config.before(:each) do
TestEnv.setup_stubs
diff --git a/spec/support/login_helpers.rb b/spec/support/login_helpers.rb
index cc0ec2f4e3d..7713e9f17d7 100644
--- a/spec/support/login_helpers.rb
+++ b/spec/support/login_helpers.rb
@@ -3,9 +3,7 @@ module LoginHelpers
#
# role - User role (e.g., :admin, :user)
def login_as(role)
- ActiveRecord::Base.observers.enable(:user_observer) do
- @user = create(role)
- end
+ @user = create(role)
login_with(@user)
end
diff --git a/spec/support/mentionable_shared_examples.rb b/spec/support/mentionable_shared_examples.rb
index 3802e94ecf0..0d67e7ee4e6 100644
--- a/spec/support/mentionable_shared_examples.rb
+++ b/spec/support/mentionable_shared_examples.rb
@@ -11,7 +11,7 @@ def common_mentionable_setup
let(:mentioned_issue) { create :issue, project: mproject }
let(:other_issue) { create :issue, project: mproject }
- let(:mentioned_mr) { create :merge_request, source_project: mproject, source_branch: 'different' }
+ let(:mentioned_mr) { create :merge_request, :simple, source_project: mproject }
let(:mentioned_commit) { double('commit', sha: '1234567890abcdef').as_null_object }
# Override to add known commits to the repository stub.
@@ -29,11 +29,7 @@ def common_mentionable_setup
# unrecognized commits.
commitmap = { '123456' => mentioned_commit }
extra_commits.each { |c| commitmap[c.sha[0..5]] = c }
-
- repo = double('repository')
- repo.stub(:commit) { |sha| commitmap[sha] }
- mproject.stub(repository: repo)
-
+ mproject.repository.stub(:commit) { |sha| commitmap[sha] }
set_mentionable_text.call(ref_string)
end
end
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb
index b1bb65a836e..85059dfa9e9 100644
--- a/spec/support/test_env.rb
+++ b/spec/support/test_env.rb
@@ -17,14 +17,6 @@ module TestEnv
def init(opts = {})
RSpec::Mocks::setup(self)
- # Disable observers to improve test speed
- #
- # You can enable it in whole test case where needed by next string:
- #
- # before(:each) { enable_observers }
- #
- disable_observers if opts[:observers] == false
-
# Disable mailer for spinach tests
disable_mailer if opts[:mailer] == false
setup_stubs
@@ -33,14 +25,6 @@ module TestEnv
setup_test_repos(opts) if opts[:repos] == true
end
- def enable_observers
- ActiveRecord::Base.observers.enable(:all)
- end
-
- def disable_observers
- ActiveRecord::Base.observers.disable(:all)
- end
-
def disable_mailer
NotificationService.any_instance.stub(mailer: double.as_null_object)
end
@@ -89,10 +73,6 @@ module TestEnv
Repository.any_instance.stub(
size: 12.45
)
-
- BaseObserver.any_instance.stub(
- current_user: double("current_user", id: 1)
- )
end
def clear_repo_dir(namespace, name)
diff --git a/spec/support/valid_commit_with_alt_email.rb b/spec/support/valid_commit_with_alt_email.rb
index d6e364c41f1..75854c63a59 100644
--- a/spec/support/valid_commit_with_alt_email.rb
+++ b/spec/support/valid_commit_with_alt_email.rb
@@ -3,4 +3,4 @@ module ValidCommitWithAltEmail
MESSAGE = "fixed notes logic"
AUTHOR_FULL_NAME = "Dmitriy Zaporozhets"
AUTHOR_EMAIL = "dzaporozhets@sphereconsultinginc.com"
-end \ No newline at end of file
+end
diff --git a/vendor/assets/javascripts/highlight.pack.js b/vendor/assets/javascripts/highlight.pack.js
new file mode 100644
index 00000000000..17b457bf743
--- /dev/null
+++ b/vendor/assets/javascripts/highlight.pack.js
@@ -0,0 +1 @@
+var hljs=new function(){function j(v){return v.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(v){return v.nodeName.toLowerCase()}function h(w,x){var v=w&&w.exec(x);return v&&v.index==0}function r(w){var v=(w.className+" "+(w.parentNode?w.parentNode.className:"")).split(/\s+/);v=v.map(function(x){return x.replace(/^lang(uage)?-/,"")});return v.filter(function(x){return i(x)||x=="no-highlight"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)=="br"){z+=1}else{if(A.nodeType==1){v.push({event:"start",offset:z,node:A});z=w(A,z);v.push({event:"stop",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F="";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset<y[0].offset)?w:y}return y[0].event=="start"?w:y}function A(H){function G(I){return" "+I.nodeName+'="'+j(I.value)+'"'}F+="<"+t(H)+Array.prototype.map.call(H.attributes,G).join("")+">"}function E(G){F+="</"+t(G)+">"}function v(G){(G.event=="start"?A:E)(G.node)}while(w.length||y.length){var D=B();F+=j(C.substr(x,D[0].offset-x));x=D[0].offset;if(D==w){z.reverse().forEach(E);do{v(D.splice(0,1)[0]);D=B()}while(D==w&&D.length&&D[0].offset==x);z.reverse().forEach(A)}else{if(D[0].event=="start"){z.push(D[0].node)}else{z.pop()}v(D.splice(0,1)[0])}}return F+j(C.substr(x))}function m(y){function v(z){return(z&&z.source)||z}function w(A,z){return RegExp(v(A),"m"+(y.cI?"i":"")+(z?"g":""))}function x(D,C){if(D.compiled){return}D.compiled=true;D.k=D.k||D.bK;if(D.k){var z={};var E=function(G,F){if(y.cI){F=F.toLowerCase()}F.split(" ").forEach(function(H){var I=H.split("|");z[I[0]]=[G,I[1]?Number(I[1]):1]})};if(typeof D.k=="string"){E("keyword",D.k)}else{Object.keys(D.k).forEach(function(F){E(F,D.k[F])})}D.k=z}D.lR=w(D.l||/\b[A-Za-z0-9_]+\b/,true);if(C){if(D.bK){D.b="\\b("+D.bK.split(" ").join("|")+")\\b"}if(!D.b){D.b=/\B|\b/}D.bR=w(D.b);if(!D.e&&!D.eW){D.e=/\B|\b/}if(D.e){D.eR=w(D.e)}D.tE=v(D.e)||"";if(D.eW&&C.tE){D.tE+=(D.e?"|":"")+C.tE}}if(D.i){D.iR=w(D.i)}if(D.r===undefined){D.r=1}if(!D.c){D.c=[]}var B=[];D.c.forEach(function(F){if(F.v){F.v.forEach(function(G){B.push(o(F,G))})}else{B.push(F=="self"?D:F)}});D.c=B;D.c.forEach(function(F){x(F,D)});if(D.starts){x(D.starts,C)}var A=D.c.map(function(F){return F.bK?"\\.?("+F.b+")\\.?":F.b}).concat([D.tE,D.i]).map(v).filter(Boolean);D.t=A.length?w(A.join("|"),true):{exec:function(F){return null}};D.continuation={}}x(y)}function c(S,L,J,R){function v(U,V){for(var T=0;T<V.c.length;T++){if(h(V.c[T].bR,U)){return V.c[T]}}}function z(U,T){if(h(U.eR,T)){return U}if(U.eW){return z(U.parent,T)}}function A(T,U){return !J&&h(U.iR,T)}function E(V,T){var U=M.cI?T[0].toLowerCase():T[0];return V.k.hasOwnProperty(U)&&V.k[U]}function w(Z,X,W,V){var T=V?"":b.classPrefix,U='<span class="'+T,Y=W?"":"</span>";U+=Z+'">';return U+X+Y}function N(){if(!I.k){return j(C)}var T="";var W=0;I.lR.lastIndex=0;var U=I.lR.exec(C);while(U){T+=j(C.substr(W,U.index-W));var V=E(I,U);if(V){H+=V[1];T+=w(V[0],j(U[0]))}else{T+=j(U[0])}W=I.lR.lastIndex;U=I.lR.exec(C)}return T+j(C.substr(W))}function F(){if(I.sL&&!f[I.sL]){return j(C)}var T=I.sL?c(I.sL,C,true,I.continuation.top):e(C);if(I.r>0){H+=T.r}if(I.subLanguageMode=="continuous"){I.continuation.top=T.top}return w(T.language,T.value,false,true)}function Q(){return I.sL!==undefined?F():N()}function P(V,U){var T=V.cN?w(V.cN,"",true):"";if(V.rB){D+=T;C=""}else{if(V.eB){D+=j(U)+T;C=""}else{D+=T;C=U}}I=Object.create(V,{parent:{value:I}})}function G(T,X){C+=T;if(X===undefined){D+=Q();return 0}var V=v(X,I);if(V){D+=Q();P(V,X);return V.rB?0:X.length}var W=z(I,X);if(W){var U=I;if(!(U.rE||U.eE)){C+=X}D+=Q();do{if(I.cN){D+="</span>"}H+=I.r;I=I.parent}while(I!=W.parent);if(U.eE){D+=j(X)}C="";if(W.starts){P(W.starts,"")}return U.rE?0:X.length}if(A(X,I)){throw new Error('Illegal lexeme "'+X+'" for mode "'+(I.cN||"<unnamed>")+'"')}C+=X;return X.length||1}var M=i(S);if(!M){throw new Error('Unknown language: "'+S+'"')}m(M);var I=R||M;var D="";for(var K=I;K!=M;K=K.parent){if(K.cN){D+=w(K.cN,D,true)}}var C="";var H=0;try{var B,y,x=0;while(true){I.t.lastIndex=x;B=I.t.exec(L);if(!B){break}y=G(L.substr(x,B.index-x),B[0]);x=B.index+y}G(L.substr(x));for(var K=I;K.parent;K=K.parent){if(K.cN){D+="</span>"}}return{r:H,value:D,language:S,top:I}}catch(O){if(O.message.indexOf("Illegal")!=-1){return{r:0,value:j(L)}}else{throw O}}}function e(y,x){x=x||b.languages||Object.keys(f);var v={r:0,value:j(y)};var w=v;x.forEach(function(z){if(!i(z)){return}var A=c(z,y,false);A.language=z;if(A.r>w.r){w=A}if(A.r>v.r){w=v;v=A}});if(w.language){v.second_best=w}return v}function g(v){if(b.tabReplace){v=v.replace(/^((<[^>]+>|\t)+)/gm,function(w,z,y,x){return z.replace(/\t/g,b.tabReplace)})}if(b.useBR){v=v.replace(/\n/g,"<br>")}return v}function p(z){var y=b.useBR?z.innerHTML.replace(/\n/g,"").replace(/<br>|<br [^>]*>/g,"\n").replace(/<[^>]*>/g,""):z.textContent;var A=r(z);if(A=="no-highlight"){return}var v=A?c(A,y,true):e(y);var w=u(z);if(w.length){var x=document.createElementNS("http://www.w3.org/1999/xhtml","pre");x.innerHTML=v.value;v.value=q(w,u(x),y)}v.value=g(v.value);z.innerHTML=v.value;z.className+=" hljs "+(!A&&v.language||"");z.result={language:v.language,re:v.r};if(v.second_best){z.second_best={language:v.second_best.language,re:v.second_best.r}}}var b={classPrefix:"hljs-",tabReplace:null,useBR:false,languages:undefined};function s(v){b=o(b,v)}function l(){if(l.called){return}l.called=true;var v=document.querySelectorAll("pre code");Array.prototype.forEach.call(v,p)}function a(){addEventListener("DOMContentLoaded",l,false);addEventListener("load",l,false)}var f={};var n={};function d(v,x){var w=f[v]=x(this);if(w.aliases){w.aliases.forEach(function(y){n[y]=v})}}function k(){return Object.keys(f)}function i(v){return f[v]||f[n[v]]}this.highlight=c;this.highlightAuto=e;this.fixMarkup=g;this.highlightBlock=p;this.configure=s;this.initHighlighting=l;this.initHighlightingOnLoad=a;this.registerLanguage=d;this.listLanguages=k;this.getLanguage=i;this.inherit=o;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]};this.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/};this.CLCM={cN:"comment",b:"//",e:"$",c:[this.PWM]};this.CBCM={cN:"comment",b:"/\\*",e:"\\*/",c:[this.PWM]};this.HCM={cN:"comment",b:"#",e:"$",c:[this.PWM]};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.CSSNM={cN:"number",b:this.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0};this.RM={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.TM={cN:"title",b:this.IR,r:0};this.UTM={cN:"title",b:this.UIR,r:0}}();hljs.registerLanguage("bash",function(b){var a={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]};var d={cN:"string",b:/"/,e:/"/,c:[b.BE,a,{cN:"variable",b:/\$\(/,e:/\)/,c:[b.BE]}]};var c={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:true,c:[b.inherit(b.TM,{b:/\w[\w\d_]*/})],r:0},b.HCM,b.NM,d,c,a]}});hljs.registerLanguage("fix",function(a){return{c:[{b:/[^\u2401\u0001]+/,e:/[\u2401\u0001]/,eE:true,rB:true,rE:false,c:[{b:/([^\u2401\u0001=]+)/,e:/=([^\u2401\u0001=]+)/,rE:true,rB:false,cN:"attribute"},{b:/=/,e:/([\u2401\u0001])/,eE:true,eB:true,cN:"string"}]}],cI:true}});hljs.registerLanguage("nsis",function(a){var c={cN:"symbol",b:"\\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)"};var b={cN:"constant",b:"\\$+{[a-zA-Z0-9_]+}"};var f={cN:"variable",b:"\\$+[a-zA-Z0-9_]+",i:"\\(\\){}"};var e={cN:"constant",b:"\\$+\\([a-zA-Z0-9_]+\\)"};var g={cN:"params",b:"(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)"};var d={cN:"constant",b:"\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)"};return{cI:false,k:{keyword:"Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetPluginUnload SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption SubSectionEnd Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle",literal:"admin all auto both colored current false force hide highest lastused leave listonly none normal notset off on open print show silent silentlog smooth textonly true user "},c:[a.HCM,a.CBCM,{cN:"string",b:'"',e:'"',i:"\\n",c:[{cN:"symbol",b:"\\$(\\\\(n|r|t)|\\$)"},c,b,f,e]},{cN:"comment",b:";",e:"$",r:0},{cN:"function",bK:"Function PageEx Section SectionGroup SubSection",e:"$"},d,b,f,e,g,a.NM,{cN:"literal",b:a.IR+"::"+a.IR}]}});hljs.registerLanguage("haxe",function(a){var c="[a-zA-Z_$][a-zA-Z0-9_$]*";var b="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)";return{aliases:["hx"],k:{keyword:"break callback case cast catch class continue default do dynamic else enum extends extern for function here if implements import in inline interface never new override package private public return static super switch this throw trace try typedef untyped using var while",literal:"true false null"},c:[a.ASM,a.QSM,a.CLCM,a.CBCM,a.CNM,{cN:"class",bK:"class interface",e:"{",eE:true,c:[{bK:"extends implements"},a.TM]},{cN:"preprocessor",b:"#",e:"$",k:"if else elseif end error"},{cN:"function",bK:"function",e:"[{;]",eE:true,i:"\\S",c:[a.TM,{cN:"params",b:"\\(",e:"\\)",c:[a.ASM,a.QSM,a.CLCM,a.CBCM]},{cN:"type",b:":",e:b,r:10}]}]}});hljs.registerLanguage("erlang",function(i){var c="[a-z'][a-zA-Z0-9_']*";var o="("+c+":"+c+"|"+c+")";var f={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun let not of orelse|10 query receive rem try when xor",literal:"false true"};var l={cN:"comment",b:"%",e:"$"};var e={cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0};var g={b:"fun\\s+"+c+"/\\d+"};var n={b:o+"\\(",e:"\\)",rB:true,r:0,c:[{cN:"function_name",b:o,r:0},{b:"\\(",e:"\\)",eW:true,rE:true,r:0}]};var h={cN:"tuple",b:"{",e:"}",r:0};var a={cN:"variable",b:"\\b_([A-Z][A-Za-z0-9_]*)?",r:0};var m={cN:"variable",b:"[A-Z][a-zA-Z0-9_]*",r:0};var b={b:"#"+i.UIR,r:0,rB:true,c:[{cN:"record_name",b:"#"+i.UIR,r:0},{b:"{",e:"}",r:0}]};var k={bK:"fun receive if try case",e:"end",k:f};k.c=[l,g,i.inherit(i.ASM,{cN:""}),k,n,i.QSM,e,h,a,m,b];var j=[l,g,k,n,i.QSM,e,h,a,m,b];n.c[1].c=j;h.c=j;b.c[1].c=j;var d={cN:"params",b:"\\(",e:"\\)",c:j};return{aliases:["erl"],k:f,i:"(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",c:[{cN:"function",b:"^"+c+"\\s*\\(",e:"->",rB:true,i:"\\(|#|//|/\\*|\\\\|:|;",c:[d,i.inherit(i.TM,{b:c})],starts:{e:";|\\.",k:f,c:j}},l,{cN:"pp",b:"^-",e:"\\.",r:0,eE:true,rB:true,l:"-"+i.IR,k:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",c:[d]},e,i.QSM,b,a,m,h,{b:/\.$/}]}});hljs.registerLanguage("cs",function(b){var a="abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async await ascending descending from get group into join let orderby partial select set value var where yield";return{aliases:["csharp"],k:a,i:/::/,c:[{cN:"comment",b:"///",e:"$",rB:true,c:[{cN:"xmlDocTag",v:[{b:"///",r:0},{b:"<!--|-->"},{b:"</?",e:">"}]}]},b.CLCM,b.CBCM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},b.ASM,b.QSM,b.CNM,{bK:"protected public private internal",e:/[{;=]/,k:a,c:[{bK:"class namespace interface",starts:{c:[b.TM]}},{b:b.IR+"\\s*\\(",rB:true,c:[b.TM]}]}]}});hljs.registerLanguage("protobuf",function(a){return{k:{keyword:"package import option optional required repeated group",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",literal:"true false"},c:[a.QSM,a.NM,a.CLCM,{cN:"class",bK:"message enum service",e:/\{/,i:/\n/,c:[a.inherit(a.TM,{starts:{eW:true,eE:true}})]},{cN:"function",bK:"rpc",e:/;/,eE:true,k:"rpc returns"},{cN:"constant",b:/^\s*[A-Z_]+/,e:/\s*=/,eE:true}]}});hljs.registerLanguage("vim",function(a){return{l:/[!#@\w]+/,k:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw d|0 delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu g|0 go gr grepa gu gv ha h|0 helpf helpg helpt hi hid his i|0 ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs n|0 new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf q|0 quita qa r|0 rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv s|0 sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync t|0 tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up v|0 ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"abs acos add and append argc argidx argv asin atan atan2 browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call ceil changenr char2nr cindent clearmatches col complete complete_add complete_check confirm copy cos cosh count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists exp expand extend feedkeys filereadable filewritable filter finddir findfile float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getmatches getpid getpos getqflist getreg getregtype gettabvar gettabwinvar getwinposx getwinposy getwinvar glob globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert invert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime log log10 luaeval map maparg mapcheck match matchadd matcharg matchdelete matchend matchlist matchstr max min mkdir mode mzeval nextnonblank nr2char or pathshorten pow prevnonblank printf pumvisible py3eval pyeval range readfile reltime reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse round screenattr screenchar screencol screenrow search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar setwinvar sha256 shellescape shiftwidth simplify sin sinh sort soundfold spellbadword spellsuggest split sqrt str2float str2nr strchars strdisplaywidth strftime stridx string strlen strpart strridx strtrans strwidth submatch substitute synconcealed synID synIDattr synIDtrans synstack system tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname tolower toupper tr trunc type undofile undotree values virtcol visualmode wildmenumode winbufnr wincol winheight winline winnr winrestcmd winrestview winsaveview winwidth writefile xor"},i:/[{:]/,c:[a.NM,a.ASM,{cN:"string",b:/"((\\")|[^"\n])*("|\n)/},{cN:"variable",b:/[bwtglsav]:[\w\d_]*/},{cN:"function",bK:"function function!",e:"$",r:0,c:[a.TM,{cN:"params",b:"\\(",e:"\\)"}]}]}});hljs.registerLanguage("brainfuck",function(b){var a={cN:"literal",b:"[\\+\\-]",r:0};return{aliases:["bf"],c:[{cN:"comment",b:"[^\\[\\]\\.,\\+\\-<> \r\n]",rE:true,e:"[\\[\\]\\.,\\+\\-<> \r\n]",r:0},{cN:"title",b:"[\\[\\]]",r:0},{cN:"string",b:"[\\.,]",r:0},{b:/\+\+|\-\-/,rB:true,c:[a]},a]}});hljs.registerLanguage("ruby",function(f){var j="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var i="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor";var b={cN:"yardoctag",b:"@[A-Za-z]+"};var c={cN:"value",b:"#<",e:">"};var k={cN:"comment",v:[{b:"#",e:"$",c:[b]},{b:"^\\=begin",e:"^\\=end",c:[b],r:10},{b:"^__END__",e:"\\n$"}]};var d={cN:"subst",b:"#\\{",e:"}",k:i};var e={cN:"string",c:[f.BE,d],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:"%[qw]?\\(",e:"\\)"},{b:"%[qw]?\\[",e:"\\]"},{b:"%[qw]?{",e:"}"},{b:"%[qw]?<",e:">"},{b:"%[qw]?/",e:"/"},{b:"%[qw]?%",e:"%"},{b:"%[qw]?-",e:"-"},{b:"%[qw]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]};var a={cN:"params",b:"\\(",e:"\\)",k:i};var h=[e,c,k,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[f.inherit(f.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+f.IR+"::)?"+f.IR}]},k]},{cN:"function",bK:"def",e:" |$|;",r:0,c:[f.inherit(f.TM,{b:j}),a,k]},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[e,{b:j}],r:0},{cN:"symbol",b:f.UIR+"(\\!|\\?)?:",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+f.RSR+")\\s*",c:[c,k,{cN:"regexp",c:[f.BE,d],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];d.c=h;a.c=h;var g=[{r:1,cN:"output",b:"^\\s*=> ",e:"$",rB:true,c:[{cN:"status",b:"^\\s*=>"},{b:" ",e:"$",c:h}]},{r:1,cN:"input",b:"^[^ ][^=>]*>+ ",e:"$",rB:true,c:[{cN:"prompt",b:"^[^ ][^=>]*>+"},{b:" ",e:"$",c:h}]}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:i,c:g.concat(h)}});hljs.registerLanguage("nimrod",function(a){return{k:{keyword:"addr and as asm bind block break|0 case|0 cast const|0 continue|0 converter discard distinct|10 div do elif else|0 end|0 enum|0 except export finally for from generic if|0 import|0 in include|0 interface is isnot|10 iterator|10 let|0 macro method|10 mixin mod nil not notin|10 object|0 of or out proc|10 ptr raise ref|10 return shl shr static template|10 try|0 tuple type|0 using|0 var|0 when while|0 with without xor yield",literal:"shared guarded stdin stdout stderr result|10 true false"},c:[{cN:"decorator",b:/{\./,e:/\.}/,r:10},{cN:"string",b:/[a-zA-Z]\w*"/,e:/"/,c:[{b:/""/}]},{cN:"string",b:/([a-zA-Z]\w*)?"""/,e:/"""/},{cN:"string",b:/"/,e:/"/,i:/\n/,c:[{b:/\\./}]},{cN:"type",b:/\b[A-Z]\w+\b/,r:0},{cN:"type",b:/\b(int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|float32|float64|bool|char|string|cstring|pointer|expr|stmt|void|auto|any|range|array|openarray|varargs|seq|set|clong|culong|cchar|cschar|cshort|cint|csize|clonglong|cfloat|cdouble|clongdouble|cuchar|cushort|cuint|culonglong|cstringarray|semistatic)\b/},{cN:"number",b:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/,r:0},{cN:"number",b:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/,r:0},{cN:"number",b:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/,r:0},{cN:"number",b:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/,r:0},a.HCM]}});hljs.registerLanguage("rust",function(a){return{aliases:["rs"],k:"alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self sizeof static struct super trait true type typeof unsafe unsized use virtual while yield int i8 i16 i32 i64 uint u8 u32 u64 float f32 f64 str char bool",i:"</",c:[a.CLCM,a.CBCM,a.inherit(a.QSM,{i:null}),{cN:"string",b:/r(#*)".*?"\1(?!#)/},{cN:"string",b:/'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/},{b:/'[a-zA-Z_][a-zA-Z0-9_]*/},{cN:"number",b:"\\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\\.[0-9_]+)?([uif](8|16|32|64)?)?)",r:0},{cN:"function",bK:"fn",e:"(\\(|<)",eE:true,c:[a.UTM]},{cN:"preprocessor",b:"#\\[",e:"\\]"},{bK:"type",e:"(=|<)",c:[a.UTM],i:"\\S"},{bK:"trait enum",e:"({|<)",c:[a.UTM],i:"\\S"},{b:a.IR+"::"},{b:"->"}]}});hljs.registerLanguage("ruleslanguage",function(a){return{k:{keyword:"BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM NUMDAYS READ_DATE STAGING",built_in:"IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME"},c:[a.CLCM,a.CBCM,a.ASM,a.QSM,a.CNM,{cN:"array",b:"#[a-zA-Z .]+"}]}});hljs.registerLanguage("rib",function(a){return{k:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",i:"</",c:[a.HCM,a.CNM,a.ASM,a.QSM]}});hljs.registerLanguage("diff",function(a){return{aliases:["patch"],c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});hljs.registerLanguage("haml",function(a){return{cI:true,c:[{cN:"doctype",b:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",r:10},{cN:"comment",b:"^\\s*(!=#|=#|-#|/).*$",r:0},{b:"^\\s*(-|=|!=)(?!#)",starts:{e:"\\n",sL:"ruby"}},{cN:"tag",b:"^\\s*%",c:[{cN:"title",b:"\\w+"},{cN:"value",b:"[#\\.]\\w+"},{b:"{\\s*",e:"\\s*}",eE:true,c:[{b:":\\w+\\s*=>",e:",\\s+",rB:true,eW:true,c:[{cN:"symbol",b:":\\w+"},{cN:"string",b:'"',e:'"'},{cN:"string",b:"'",e:"'"},{b:"\\w+",r:0}]}]},{b:"\\(\\s*",e:"\\s*\\)",eE:true,c:[{b:"\\w+\\s*=",e:"\\s+",rB:true,eW:true,c:[{cN:"attribute",b:"\\w+",r:0},{cN:"string",b:'"',e:'"'},{cN:"string",b:"'",e:"'"},{b:"\\w+",r:0}]}]}]},{cN:"bullet",b:"^\\s*[=~]\\s*",r:0},{b:"#{",starts:{e:"}",sL:"ruby"}}]}});hljs.registerLanguage("javascript",function(a){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},a.ASM,a.QSM,a.CLCM,a.CBCM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBCM,a.RM,{b:/</,e:/>;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:true,c:[a.inherit(a.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBCM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+a.IR,r:0}]}});hljs.registerLanguage("glsl",function(a){return{k:{keyword:"atomic_uint attribute bool break bvec2 bvec3 bvec4 case centroid coherent const continue default discard dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 do double dvec2 dvec3 dvec4 else flat float for highp if iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray in inout int invariant isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 layout lowp mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 mediump noperspective out patch precision readonly restrict return sample sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow smooth struct subroutine switch uimage1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint uniform usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D usamplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 varying vec2 vec3 vec4 void volatile while writeonly",built_in:"gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffsetgl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_PerVertex gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicCounter atomicCounterDecrement atomicCounterIncrement barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow gl_TextureMatrix gl_TextureMatrixInverse",literal:"true false"},i:'"',c:[a.CLCM,a.CBCM,a.CNM,{cN:"preprocessor",b:"#",e:"$"}]}});hljs.registerLanguage("rsl",function(a){return{k:{keyword:"float color point normal vector matrix while for if do return else break extern continue",built_in:"abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp faceforward filterstep floor format fresnel incident length lightsource log match max min mod noise normalize ntransform opposite option phong pnoise pow printf ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan texture textureinfo trace transform vtransform xcomp ycomp zcomp"},i:"</",c:[a.CLCM,a.CBCM,a.QSM,a.ASM,a.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"shader",bK:"surface displacement light volume imager",e:"\\("},{cN:"shading",bK:"illuminate illuminance gather",e:"\\("}]}});hljs.registerLanguage("lua",function(b){var a="\\[=*\\[";var e="\\]=*\\]";var c={b:a,e:e,c:["self"]};var d=[{cN:"comment",b:"--(?!"+a+")",e:"$"},{cN:"comment",b:"--"+a,e:e,c:[c],r:10}];return{l:b.UIR,k:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},c:d.concat([{cN:"function",bK:"function",e:"\\)",c:[b.inherit(b.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{cN:"params",b:"\\(",eW:true,c:d}].concat(d)},b.CNM,b.ASM,b.QSM,{cN:"string",b:a,e:e,c:[c],r:5}])}});hljs.registerLanguage("xml",function(a){var c="[A-Za-z0-9\\._:-]+";var d={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"};var b={eW:true,i:/</,r:0,c:[d,{cN:"attribute",b:c,r:0},{b:"=",r:0,c:[{cN:"value",v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:true,c:[{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},d,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ /><]+",r:0},b]}]}});hljs.registerLanguage("markdown",function(a){return{aliases:["md","mkdown","mkd"],c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|\t)",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:true,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:true,rE:true,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:true,eE:true},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:true,eE:true}],r:10},{b:"^\\[.+\\]:",e:"$",rB:true,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:true,eE:true},{cN:"link_url",b:"\\s",e:"$"}]}]}});hljs.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",rB:true,eE:true,e:"\\("};return{cI:true,i:"[=/|']",c:[a.CBCM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.CSSNM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBCM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.CSSNM,a.QSM,a.ASM,a.CBCM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}});hljs.registerLanguage("capnproto",function(a){return{aliases:["capnp"],k:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},c:[a.QSM,a.NM,a.HCM,{cN:"shebang",b:/@0x[\w\d]{16};/,i:/\n/},{cN:"number",b:/@\d+\b/},{cN:"class",bK:"struct enum",e:/\{/,i:/\n/,c:[a.inherit(a.TM,{starts:{eW:true,eE:true}})]},{cN:"class",bK:"interface",e:/\{/,i:/\n/,c:[a.inherit(a.TM,{starts:{eW:true,eE:true}})]}]}});hljs.registerLanguage("lisp",function(i){var l="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*";var m="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?";var k={cN:"shebang",b:"^#!",e:"$"};var b={cN:"literal",b:"\\b(t{1}|nil)\\b"};var e={cN:"number",v:[{b:m,r:0},{b:"#b[0-1]+(/[0-1]+)?"},{b:"#o[0-7]+(/[0-7]+)?"},{b:"#x[0-9a-f]+(/[0-9a-f]+)?"},{b:"#c\\("+m+" +"+m,e:"\\)"}]};var h=i.inherit(i.QSM,{i:null});var n={cN:"comment",b:";",e:"$"};var g={cN:"variable",b:"\\*",e:"\\*"};var o={cN:"keyword",b:"[:&]"+l};var d={b:"\\(",e:"\\)",c:["self",b,h,e]};var a={cN:"quoted",c:[e,h,g,o,d],v:[{b:"['`]\\(",e:"\\)"},{b:"\\(quote ",e:"\\)",k:{title:"quote"}}]};var c={cN:"quoted",b:"'"+l};var j={cN:"list",b:"\\(",e:"\\)"};var f={eW:true,r:0};j.c=[{cN:"title",b:l},f];f.c=[a,c,j,b,e,h,n,g,o];return{i:/\S/,c:[e,k,b,h,n,a,c,j]}});hljs.registerLanguage("profile",function(a){return{c:[a.CNM,{cN:"built_in",b:"{",e:"}$",eB:true,eE:true,c:[a.ASM,a.QSM],r:0},{cN:"filename",b:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",e:":",eE:true},{cN:"header",b:"(ncalls|tottime|cumtime)",e:"$",k:"ncalls tottime|10 cumtime|10 filename",r:10},{cN:"summary",b:"function calls",e:"$",c:[a.CNM],r:10},a.ASM,a.QSM,{cN:"function",b:"\\(",e:"\\)$",c:[a.UTM],r:0}]}});hljs.registerLanguage("http",function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}});hljs.registerLanguage("java",function(b){var a="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws";return{aliases:["jsp"],k:a,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}],r:10},b.CLCM,b.CBCM,b.ASM,b.QSM,{bK:"protected public private",e:/[{;=]/,k:a,c:[{cN:"class",bK:"class interface",eW:true,eE:true,i:/[:"\[\]]/,c:[{bK:"extends implements",r:10},b.UTM]},{b:b.UIR+"\\s*\\(",rB:true,c:[b.UTM]}]},b.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("gherkin",function(a){return{k:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",c:[{cN:"keyword",b:"\\*"},{cN:"comment",b:"@[^@\r\n\t ]+",e:"$"},{cN:"string",b:"\\|",e:"\\$"},{cN:"variable",b:"<",e:">",},a.HCM,{cN:"string",b:'"""',e:'"""'},a.QSM]}});hljs.registerLanguage("fsharp",function(a){return{aliases:["fs"],k:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",c:[{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},{cN:"string",b:'"""',e:'"""'},{cN:"comment",b:"\\(\\*",e:"\\*\\)"},{cN:"class",bK:"type",e:"\\(|=|$",eE:true,c:[a.UTM]},{cN:"annotation",b:"\\[<",e:">\\]"},{cN:"attribute",b:"\\B('[A-Za-z])\\b",c:[a.BE]},a.CLCM,a.inherit(a.QSM,{i:null}),a.CNM]}});hljs.registerLanguage("mathematica",function(a){return{aliases:["mma"],l:"(\\$|\\b)"+a.IR+"\\b",k:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber",c:[{cN:"comment",b:/\(\*/,e:/\*\)/},a.ASM,a.QSM,a.CNM,{cN:"list",b:/\{/,e:/\}/,i:/:/}]}});hljs.registerLanguage("swift",function(a){var e={keyword:"class deinit enum extension func import init let protocol static struct subscript typealias var break case continue default do else fallthrough if in for return switch where while as dynamicType is new super self Self Type __COLUMN__ __FILE__ __FUNCTION__ __LINE__ associativity didSet get infix inout left mutating none nonmutating operator override postfix precedence prefix right set unowned unowned safe unsafe weak willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue assert bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal false filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced join lexicographicalCompare map max maxElement min minElement nil numericCast partition posix print println quickSort reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith strideof strideofValue swap swift toString transcode true underestimateCount unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafePointers withVaList"};var g={cN:"type",b:"\\b[A-Z][\\w']*",r:0};var b={cN:"comment",b:"/\\*",e:"\\*/",c:[a.PWM,"self"]};var c={cN:"subst",b:/\\\(/,e:"\\)",k:e,c:[]};var f={cN:"number",b:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",r:0};var d=a.inherit(a.QSM,{c:[c,a.BE]});c.c=[f];return{k:e,c:[d,a.CLCM,b,g,f,{cN:"func",bK:"func",eE:true,c:[a.inherit(a.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/,i:/\(/}),{cN:"generics",b:/\</,e:/\>/,i:/\>/},{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBCM],i:/["']/}],i:/\[|%/},{cN:"class",k:"struct protocol class extension enum",b:"(struct|protocol|class(?! (func|var))|extension|enum)",e:"\\{",eE:true,c:[a.inherit(a.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/})]},{cN:"preprocessor",b:"(@assignment|@class_protocol|@exported|@final|@lazy|@noreturn|@NSCopying|@NSManaged|@objc|@optional|@required|@auto_closure|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix)"},]}});hljs.registerLanguage("php",function(b){var e={cN:"variable",b:"(\\$|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var a={cN:"preprocessor",b:/<\?(php)?|\?>/};var c={cN:"string",c:[b.BE,a],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},b.inherit(b.ASM,{i:null}),b.inherit(b.QSM,{i:null})]};var d={v:[b.BNM,b.CNM]};return{aliases:["php3","php4","php5","php6"],cI:true,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[b.CLCM,b.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},a]},{cN:"comment",b:"__halt_compiler.+?;",eW:true,k:"__halt_compiler",l:b.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[b.BE]},a,e,{cN:"function",bK:"function",e:/[;{]/,eE:true,i:"\\$|\\[|%",c:[b.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",e,b.CBCM,c,d]}]},{cN:"class",bK:"class interface",e:"{",eE:true,i:/[:\(\$"]/,c:[{bK:"extends implements",r:10},b.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[b.UTM]},{bK:"use",e:";",c:[b.UTM]},{b:"=>"},c,d]}});hljs.registerLanguage("haskell",function(f){var g={cN:"comment",v:[{b:"--",e:"$"},{b:"{-",e:"-}",c:["self"]}]};var e={cN:"pragma",b:"{-#",e:"#-}"};var b={cN:"preprocessor",b:"^#",e:"$"};var d={cN:"type",b:"\\b[A-Z][\\w']*",r:0};var c={cN:"container",b:"\\(",e:"\\)",i:'"',c:[e,g,b,{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},f.inherit(f.TM,{b:"[_a-z][\\w']*"})]};var a={cN:"container",b:"{",e:"}",c:c.c};return{aliases:["hs"],k:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",c:[{cN:"module",b:"\\bmodule\\b",e:"where",k:"module where",c:[c,g],i:"\\W\\.|;"},{cN:"import",b:"\\bimport\\b",e:"$",k:"import|0 qualified as hiding",c:[c,g],i:"\\W\\.|;"},{cN:"class",b:"^(\\s*)?(class|instance)\\b",e:"where",k:"class family instance where",c:[d,c,g]},{cN:"typedef",b:"\\b(data|(new)?type)\\b",e:"$",k:"data family type newtype deriving",c:[e,g,d,c,a]},{cN:"default",bK:"default",e:"$",c:[d,c,g]},{cN:"infix",bK:"infix infixl infixr",e:"$",c:[f.CNM,g]},{cN:"foreign",b:"\\bforeign\\b",e:"$",k:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",c:[d,f.QSM,g]},{cN:"shebang",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},e,g,b,f.QSM,f.CNM,d,f.inherit(f.TM,{b:"^[_a-z][\\w']*"}),{b:"->|<-"}]}});hljs.registerLanguage("1c",function(b){var f="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*";var c="возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт";var e="ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон";var a={cN:"dquote",b:'""'};var d={cN:"string",b:'"',e:'"|$',c:[a]};var g={cN:"string",b:"\\|",e:'"|$',c:[a]};return{cI:true,l:f,k:{keyword:c,built_in:e},c:[b.CLCM,b.NM,d,g,{cN:"function",b:"(процедура|функция)",e:"$",l:f,k:"процедура функция",c:[b.inherit(b.TM,{b:f}),{cN:"tail",eW:true,c:[{cN:"params",b:"\\(",e:"\\)",l:f,k:"знач",c:[d,g]},{cN:"export",b:"экспорт",eW:true,l:f,k:"экспорт",c:[b.CLCM]}]},b.CLCM]},{cN:"preprocessor",b:"#",e:"$"},{cN:"date",b:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}});hljs.registerLanguage("x86asm",function(a){return{cI:true,l:"\\.?"+a.IR,k:{keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",literal:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l",pseudo:"db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times",preprocessor:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public ",built_in:"bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},c:[{cN:"comment",b:";",e:"$",r:0},{cN:"number",b:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",r:0},{cN:"number",b:"\\$[0-9][0-9A-Fa-f]*",r:0},{cN:"number",b:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[HhXx]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{cN:"number",b:"\\b(?:0[HhXx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"},a.QSM,{cN:"string",b:"'",e:"[^\\\\]'",r:0},{cN:"string",b:"`",e:"[^\\\\]`",r:0},{cN:"string",b:"\\.[A-Za-z0-9]+",r:0},{cN:"label",b:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",r:0},{cN:"label",b:"^\\s*%%[A-Za-z0-9_$#@~.?]*:",r:0},{cN:"argument",b:"%[0-9]+",r:0},{cN:"built_in",b:"%!S+",r:0}]}});hljs.registerLanguage("python",function(a){var f={cN:"prompt",b:/^(>>>|\.\.\.) /};var b={cN:"string",c:[a.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[f],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[f],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},a.ASM,a.QSM]};var d={cN:"number",r:0,v:[{b:a.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:a.CNR+"[lLjJ]?"}]};var e={cN:"params",b:/\(/,e:/\)/,c:["self",f,d,b]};var c={e:/:/,i:/[${=;\n]/,c:[a.UTM,e]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[f,d,b,a.HCM,a.inherit(c,{cN:"function",bK:"def",r:10}),a.inherit(c,{cN:"class",bK:"class"}),{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("smalltalk",function(a){var b="[a-z][a-zA-Z0-9_]*";var d={cN:"char",b:"\\$.{1}"};var c={cN:"symbol",b:"#"+a.UIR};return{aliases:["st"],k:"self super nil true false thisContext",c:[{cN:"comment",b:'"',e:'"'},a.ASM,{cN:"class",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},{cN:"method",b:b+":",r:0},a.CNM,c,d,{cN:"localvars",b:"\\|[ ]*"+b+"([ ]+"+b+")*[ ]*\\|",rB:true,e:/\|/,i:/\S/,c:[{b:"(\\|[ ]*)?"+b}]},{cN:"array",b:"\\#\\(",e:"\\)",c:[a.ASM,d,a.CNM,c]}]}});hljs.registerLanguage("tex",function(a){var d={cN:"command",b:"\\\\[a-zA-Zа-яА-я]+[\\*]?"};var c={cN:"command",b:"\\\\[^a-zA-Zа-яА-я0-9]"};var b={cN:"special",b:"[{}\\[\\]\\&#~]",r:0};return{c:[{b:"\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",rB:true,c:[d,c,{cN:"number",b:" *=",e:"-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",eB:true}],r:10},d,c,b,{cN:"formula",b:"\\$\\$",e:"\\$\\$",c:[d,c,b],r:0},{cN:"formula",b:"\\$",e:"\\$",c:[d,c,b],r:0},{cN:"comment",b:"%",e:"$",r:0}]}});hljs.registerLanguage("actionscript",function(a){var c="[a-zA-Z_$][a-zA-Z0-9_$]*";var b="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)";var d={cN:"rest_arg",b:"[.]{3}",e:c,r:10};return{aliases:["as"],k:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},c:[a.ASM,a.QSM,a.CLCM,a.CBCM,a.CNM,{cN:"package",bK:"package",e:"{",c:[a.TM]},{cN:"class",bK:"class interface",e:"{",eE:true,c:[{bK:"extends implements"},a.TM]},{cN:"preprocessor",bK:"import include",e:";"},{cN:"function",bK:"function",e:"[{;]",eE:true,i:"\\S",c:[a.TM,{cN:"params",b:"\\(",e:"\\)",c:[a.ASM,a.QSM,a.CLCM,a.CBCM,d]},{cN:"type",b:":",e:b,r:10}]}]}});hljs.registerLanguage("sql",function(a){var b={cN:"comment",b:"--",e:"$"};return{cI:true,i:/[<>]/,c:[{cN:"operator",bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate savepoint release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup",e:/;/,eW:true,k:{keyword:"abs absolute acos action add adddate addtime aes_decrypt aes_encrypt after aggregate all allocate alter analyze and any are as asc ascii asin assertion at atan atan2 atn2 authorization authors avg backup before begin benchmark between bin binlog bit_and bit_count bit_length bit_or bit_xor both by cache call cascade cascaded case cast catalog ceil ceiling chain change changed char_length character_length charindex charset check checksum checksum_agg choose close coalesce coercibility collate collation collationproperty column columns columns_updated commit compress concat concat_ws concurrent connect connection connection_id consistent constraint constraints continue contributors conv convert convert_tz corresponding cos cot count count_big crc32 create cross cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime data database databases datalength date_add date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts datetimeoffsetfromparts day dayname dayofmonth dayofweek dayofyear deallocate declare decode default deferrable deferred degrees delayed delete des_decrypt des_encrypt des_key_file desc describe descriptor diagnostics difference disconnect distinct distinctrow div do domain double drop dumpfile each else elt enclosed encode encrypt end end-exec engine engines eomonth errors escape escaped event eventdata events except exception exec execute exists exp explain export_set extended external extract fast fetch field fields find_in_set first first_value floor flush for force foreign format found found_rows from from_base64 from_days from_unixtime full function get get_format get_lock getdate getutcdate global go goto grant grants greatest group group_concat grouping grouping_id gtid_subset gtid_subtract handler having help hex high_priority hosts hour ident_current ident_incr ident_seed identified identity if ifnull ignore iif ilike immediate in index indicator inet6_aton inet6_ntoa inet_aton inet_ntoa infile initially inner innodb input insert install instr intersect into is is_free_lock is_ipv4 is_ipv4_compat is_ipv4_mapped is_not is_not_null is_used_lock isdate isnull isolation join key kill language last last_day last_insert_id last_value lcase lead leading least leaves left len lenght level like limit lines ln load load_file local localtime localtimestamp locate lock log log10 log2 logfile logs low_priority lower lpad ltrim make_set makedate maketime master master_pos_wait match matched max md5 medium merge microsecond mid min minute mod mode module month monthname mutex name_const names national natural nchar next no no_write_to_binlog not now nullif nvarchar oct octet_length of old_password on only open optimize option optionally or ord order outer outfile output pad parse partial partition password patindex percent_rank percentile_cont percentile_disc period_add period_diff pi plugin position pow power pragma precision prepare preserve primary prior privileges procedure procedure_analyze processlist profile profiles public publishingservername purge quarter query quick quote quotename radians rand read references regexp relative relaylog release release_lock rename repair repeat replace replicate reset restore restrict return returns reverse revoke right rlike rollback rollup round row row_count rows rpad rtrim savepoint schema scroll sec_to_time second section select serializable server session session_user set sha sha1 sha2 share show sign sin size slave sleep smalldatetimefromparts snapshot some soname soundex sounds_like space sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sql_variant_property sqlstate sqrt square start starting status std stddev stddev_pop stddev_samp stdev stdevp stop str str_to_date straight_join strcmp string stuff subdate substr substring subtime subtring_index sum switchoffset sysdate sysdatetime sysdatetimeoffset system_user sysutcdatetime table tables tablespace tan temporary terminated tertiary_weights then time time_format time_to_sec timediff timefromparts timestamp timestampadd timestampdiff timezone_hour timezone_minute to to_base64 to_days to_seconds todatetimeoffset trailing transaction translation trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse ucase uncompress uncompressed_length unhex unicode uninstall union unique unix_timestamp unknown unlock update upgrade upped upper usage use user user_resources using utc_date utc_time utc_timestamp uuid uuid_short validate_password_strength value values var var_pop var_samp variables variance varp version view warnings week weekday weekofyear weight_string when whenever where with work write xml xor year yearweek zon",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int integer interval number numeric real serial smallint varchar varying int8 serial8 text"},c:[{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[a.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[a.BE]},a.CNM,a.CBCM,b]},a.CBCM,b]}});hljs.registerLanguage("nix",function(b){var a={keyword:"rec with let in inherit assert if else then",constant:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"};var g={cN:"subst",b:/\$\{/,e:/\}/,k:a};var d={cN:"variable",b:/[a-zA-Z0-9-_]+(\s*=)/};var e={cN:"string",b:"''",e:"''",c:[g]};var f={cN:"string",b:'"',e:'"',c:[g]};var c=[b.NM,b.HCM,b.CBCM,e,f,d];g.c=c;return{aliases:["nixos"],k:a,c:c}});hljs.registerLanguage("handlebars",function(b){var a="each in with if else unless bindattr action collection debugger log outlet template unbound view yield";return{aliases:["hbs","html.hbs","html.handlebars"],cI:true,sL:"xml",subLanguageMode:"continuous",c:[{cN:"expression",b:"{{",e:"}}",c:[{cN:"begin-block",b:"#[a-zA-Z- .]+",k:a},{cN:"string",b:'"',e:'"'},{cN:"end-block",b:"\\/[a-zA-Z- .]+",k:a},{cN:"variable",b:"[a-zA-Z-.]+",k:a}]}]}});hljs.registerLanguage("thrift",function(a){var b="bool byte i16 i32 i64 double string binary";return{k:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:b,literal:"true false"},c:[a.QSM,a.NM,a.CLCM,a.CBCM,{cN:"class",bK:"struct enum service exception",e:/\{/,i:/\n/,c:[a.inherit(a.TM,{starts:{eW:true,eE:true}})]},{cN:"stl_container",b:"\\b(set|list|map)\\s*<",e:">",k:b,c:["self"]}]}});hljs.registerLanguage("vala",function(a){return{k:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object",literal:"false true null"},c:[{cN:"class",bK:"class interface delegate namespace",e:"{",eE:true,i:"[^,:\\n\\s\\.]",c:[a.UTM]},a.CLCM,a.CBCM,{cN:"string",b:'"""',e:'"""',r:5},a.ASM,a.QSM,a.CNM,{cN:"preprocessor",b:"^#",e:"$",r:2},{cN:"constant",b:" [A-Z_]+ ",r:0}]}});hljs.registerLanguage("gradle",function(a){return{cI:true,k:{keyword:"task project allprojects subprojects artifacts buildscript configurations dependencies repositories sourceSets description delete from into include exclude source classpath destinationDir includes options sourceCompatibility targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant def abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true antlrtask checkstyle codenarc copy boolean byte char class double float int interface long short void compile runTime file fileTree abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine"},c:[a.CLCM,a.CBCM,a.ASM,a.QSM,a.NM,a.RM]}});hljs.registerLanguage("ini",function(a){return{cI:true,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM],r:0}]}]}});hljs.registerLanguage("livecodeserver",function(a){var e={cN:"variable",b:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",r:0};var b={cN:"comment",e:"$",v:[a.CBCM,a.HCM,{b:"--"},{b:"[^:]//"}]};var d=a.inherit(a.TM,{v:[{b:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{b:"\\b_[a-z0-9\\-]+"}]});var c=a.inherit(a.TM,{b:"\\b([A-Za-z0-9_\\-]+)\\b"});return{cI:false,k:{keyword:"after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if",constant:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",operator:"div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg base64Decode base64Encode baseConvert binaryDecode binaryEncode byteToNum cachedURL cachedURLs charToNum cipherNames commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames global globals hasMemory hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames num number numToByte numToChar offset open openfiles openProcesses openProcessIDs openSockets paramCount param params peerAddress pendingMessages platform processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_Execute revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sec secs seconds sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName tick ticks time to toLower toUpper transpose trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus value variableNames version waitDepth weekdayNames wordOffset add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket process post seek rel relative read from process rename replace require resetAll revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split subtract union unload wait write"},c:[e,{cN:"keyword",b:"\\bend\\sif\\b"},{cN:"function",bK:"function",e:"$",c:[e,c,a.ASM,a.QSM,a.BNM,a.CNM,d]},{cN:"function",bK:"end",e:"$",c:[c,d]},{cN:"command",bK:"command on",e:"$",c:[e,c,a.ASM,a.QSM,a.BNM,a.CNM,d]},{cN:"command",bK:"end",e:"$",c:[c,d]},{cN:"preprocessor",b:"<\\?rev|<\\?lc|<\\?livecode",r:10},{cN:"preprocessor",b:"<\\?"},{cN:"preprocessor",b:"\\?>"},b,a.ASM,a.QSM,a.BNM,a.CNM,d],i:";$|^\\[|^="}});hljs.registerLanguage("d",function(x){var b={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"};var c="(0|[1-9][\\d_]*)",q="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",h="0[bB][01_]+",v="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",y="0[xX]"+v,p="([eE][+-]?"+q+")",o="("+q+"(\\.\\d*|"+p+")|\\d+\\."+q+q+"|\\."+c+p+"?)",k="(0[xX]("+v+"\\."+v+"|\\.?"+v+")[pP][+-]?"+q+")",l="("+c+"|"+h+"|"+y+")",n="("+k+"|"+o+")";var z="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};";var m={cN:"number",b:"\\b"+l+"(L|u|U|Lu|LU|uL|UL)?",r:0};var j={cN:"number",b:"\\b("+n+"([fF]|L|i|[fF]i|Li)?|"+l+"(i|[fF]i|Li))",r:0};var s={cN:"string",b:"'("+z+"|.)",e:"'",i:"."};var r={b:z,r:0};var w={cN:"string",b:'"',c:[r],e:'"[cwd]?'};var f={cN:"string",b:'[rq]"',e:'"[cwd]?',r:5};var u={cN:"string",b:"`",e:"`[cwd]?"};var i={cN:"string",b:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',r:10};var t={cN:"string",b:'q"\\{',e:'\\}"'};var e={cN:"shebang",b:"^#!",e:"$",r:5};var g={cN:"preprocessor",b:"#(line)",e:"$",r:5};var d={cN:"keyword",b:"@[a-zA-Z_][a-zA-Z_\\d]*"};var a={cN:"comment",b:"\\/\\+",c:["self"],e:"\\+\\/",r:10};return{l:x.UIR,k:b,c:[x.CLCM,x.CBCM,a,i,w,f,u,t,j,m,s,e,g,d]}});hljs.registerLanguage("vbnet",function(a){return{aliases:["vb"],cI:true,k:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},i:"//|{|}|endif|gosub|variant|wend",c:[a.inherit(a.QSM,{c:[{b:'""'}]}),{cN:"comment",b:"'",e:"$",rB:true,c:[{cN:"xmlDocTag",b:"'''|<!--|-->"},{cN:"xmlDocTag",b:"</?",e:">"}]},a.CNM,{cN:"preprocessor",b:"#",e:"$",k:"if else elseif end region externalsource"}]}});hljs.registerLanguage("axapta",function(a){return{k:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",c:[a.CLCM,a.CBCM,a.ASM,a.QSM,a.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"class",bK:"class interface",e:"{",eE:true,i:":",c:[{cN:"inheritance",bK:"extends implements",r:10},a.UTM]}]}});hljs.registerLanguage("perl",function(c){var d="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when";var f={cN:"subst",b:"[$@]\\{",e:"\\}",k:d};var g={b:"->{",e:"}"};var a={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@][^\s\w{]/,r:0}]};var e={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5};var h=[c.BE,f,a];var b=[a,c.HCM,e,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:true},g,{cN:"string",c:h,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[c.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[c.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+c.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[c.HCM,e,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[c.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];f.c=b;g.c=b;return{aliases:["pl"],k:d,c:b}});hljs.registerLanguage("scala",function(a){var c={cN:"annotation",b:"@[A-Za-z]+"};var b={cN:"string",b:'u?r?"""',e:'"""',r:10};var d={cN:"symbol",b:"'\\w[\\w\\d_]*(?!')"};return{k:"type yield lazy override def with val var false true sealed abstract private trait object null if for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws",c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"@[A-Za-z]+"}],r:10},a.CLCM,a.CBCM,b,a.QSM,d,{cN:"class",b:"((case )?class |object |trait )",e:"({|$)",eE:true,i:":",k:"case class trait object",c:[{bK:"extends with",r:10},a.UTM,{cN:"params",b:"\\(",e:"\\)",c:[a.QSM,b,c]}]},a.CNM,c]}});hljs.registerLanguage("cmake",function(a){return{aliases:["cmake.in"],cI:true,k:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or",operator:"equal less greater strless strgreater strequal matches"},c:[{cN:"envvar",b:"\\${",e:"}"},a.HCM,a.QSM,a.NM]}});hljs.registerLanguage("ocaml",function(a){return{aliases:["ml"],k:{keyword:"and as assert asr begin class constraint do done downto else end exception external false for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new object of open or private rec ref sig struct then to true try type val virtual when while with parser value",built_in:"bool char float int list unit array exn option int32 int64 nativeint format4 format6 lazy_t in_channel out_channel string"},i:/\/\//,c:[{cN:"string",b:'"""',e:'"""'},{cN:"comment",b:"\\(\\*",e:"\\*\\)",c:["self"]},{cN:"class",bK:"type",e:"\\(|=|$",eE:true,c:[a.UTM]},{cN:"annotation",b:"\\[<",e:">\\]"},a.CBCM,a.inherit(a.ASM,{i:null}),a.inherit(a.QSM,{i:null}),a.CNM]}});hljs.registerLanguage("autohotkey",function(b){var d={cN:"escape",b:"`[\\s\\S]"};var c={cN:"comment",b:";",e:"$",r:0};var a=[{cN:"built_in",b:"A_[a-zA-Z0-9]+"},{cN:"built_in",bK:"ComSpec Clipboard ClipboardAll ErrorLevel"}];return{cI:true,k:{keyword:"Break Continue Else Gosub If Loop Return While",literal:"A true false NOT AND OR"},c:a.concat([d,b.inherit(b.QSM,{c:[d]}),c,{cN:"number",b:b.NR,r:0},{cN:"var_expand",b:"%",e:"%",i:"\\n",c:[d]},{cN:"label",c:[d],v:[{b:'^[^\\n";]+::(?!=)'},{b:'^[^\\n";]+:(?!=)',r:0}]},{b:",\\s*,",r:10}])}});hljs.registerLanguage("objectivec",function(a){var d={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView NSView NSViewController NSWindow NSWindowController NSSet NSUUID NSIndexSet UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"};var c=/[a-zA-Z@][a-zA-Z0-9_]*/;var b="@interface @class @protocol @implementation";return{aliases:["m","mm","objc","obj-c"],k:d,l:c,i:"</",c:[a.CLCM,a.CBCM,a.CNM,a.QSM,{cN:"string",v:[{b:'@"',e:'"',i:"\\n",c:[a.BE]},{b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"}]},{cN:"preprocessor",b:"#",e:"$",c:[{cN:"title",v:[{b:'"',e:'"'},{b:"<",e:">"}]}]},{cN:"class",b:"("+b.split(" ").join("|")+")\\b",e:"({|$)",eE:true,k:b,l:c,c:[a.UTM]},{cN:"variable",b:"\\."+a.UIR,r:0}]}});hljs.registerLanguage("avrasm",function(a){return{cI:true,l:"\\.?"+a.IR,k:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",preprocessor:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},c:[a.CBCM,{cN:"comment",b:";",e:"$",r:0},a.CNM,a.BNM,{cN:"number",b:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},a.QSM,{cN:"string",b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"},{cN:"label",b:"^[A-Za-z0-9_.$]+:"},{cN:"preprocessor",b:"#",e:"$"},{cN:"localvars",b:"@[0-9]+"}]}});hljs.registerLanguage("vhdl",function(a){return{cI:true,k:{keyword:"abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",typename:"boolean bit character severity_level integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector std_logic std_logic_vector unsigned signed boolean_vector integer_vector real_vector time_vector"},i:"{",c:[a.CBCM,{cN:"comment",b:"--",e:"$"},a.QSM,a.CNM,{cN:"literal",b:"'(U|X|0|1|Z|W|L|H|-)'",c:[a.BE]},{cN:"attribute",b:"'[A-Za-z](_?[A-Za-z0-9])*",c:[a.BE]}]}});hljs.registerLanguage("coffeescript",function(c){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module global window document"};var a="[A-Za-z$_][0-9A-Za-z$_]*";var f=c.inherit(c.TM,{b:a});var e={cN:"subst",b:/#\{/,e:/}/,k:b};var d=[c.BNM,c.inherit(c.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[c.BE]},{b:/'/,e:/'/,c:[c.BE]},{b:/"""/,e:/"""/,c:[c.BE,e]},{b:/"/,e:/"/,c:[c.BE,e]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[e,c.HCM]},{b:"//[gim]*",r:0},{b:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"}]},{cN:"property",b:"@"+a},{b:"`",e:"`",eB:true,eE:true,sL:"javascript"}];e.c=d;return{aliases:["coffee","cson","iced"],k:b,c:d.concat([{cN:"comment",b:"###",e:"###"},c.HCM,{cN:"function",b:"("+a+"\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",e:"[-=]>",rB:true,c:[f,{cN:"params",b:"\\(",rB:true,c:[{b:/\(/,e:/\)/,k:b,c:["self"].concat(d)}]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:true,i:/[:="\[\]]/,c:[f]},f]},{cN:"attribute",b:a+":",e:":",rB:true,eE:true,r:0}])}});hljs.registerLanguage("mizar",function(a){return{k:["environ vocabularies notations constructors definitions registrations theorems schemes requirements","begin end definition registration cluster existence pred func defpred deffunc theorem proof","let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from","be being by means equals implies iff redefine define now not or attr is mode suppose per cases set","thesis contradiction scheme reserve struct","correctness compatibility coherence symmetry assymetry reflexivity irreflexivity","connectedness uniqueness commutativity idempotence involutiveness projectivity"].join(" "),c:[{cN:"comment",b:"::",e:"$"}]}});hljs.registerLanguage("nginx",function(c){var b={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+c.UIR}]};var a={eW:true,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[c.HCM,{cN:"string",c:[c.BE,b],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:true,eE:true},{cN:"regexp",c:[c.BE,b],v:[{b:"\\s\\^",e:"\\s|{|;",rE:true},{b:"~\\*?\\s+",e:"\\s|{|;",rE:true},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},b]};return{aliases:["nginxconf"],c:[c.HCM,{b:c.UIR+"\\s",e:";|{",rB:true,c:[{cN:"title",b:c.UIR,starts:a}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("erlang-repl",function(a){return{k:{special_functions:"spawn spawn_link self",reserved:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},c:[{cN:"prompt",b:"^[0-9]+> ",r:10},{cN:"comment",b:"%",e:"$"},{cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},a.ASM,a.QSM,{cN:"constant",b:"\\?(::)?([A-Z]\\w*(::)?)+"},{cN:"arrow",b:"->"},{cN:"ok",b:"ok"},{cN:"exclamation_mark",b:"!"},{cN:"function_or_atom",b:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",r:0},{cN:"variable",b:"[A-Z][a-zA-Z0-9_']*",r:0}]}});hljs.registerLanguage("r",function(a){var b="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{c:[a.HCM,{b:b,l:b,k:{keyword:"function if in break next repeat else for return switch while try tryCatch|10 stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...|10",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",r:0},{cN:"number",b:"\\d+\\.(?!\\d)(?:i\\b)?",r:0},{cN:"number",b:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{b:"`",e:"`",r:0},{cN:"string",c:[a.BE],v:[{b:'"',e:'"'},{b:"'",e:"'"}]}]}});hljs.registerLanguage("json",function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}});hljs.registerLanguage("django",function(a){var b={cN:"filter",b:/\|[A-Za-z]+\:?/,k:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone",c:[{cN:"argument",b:/"/,e:/"/},{cN:"argument",b:/'/,e:/'/}]};return{aliases:["jinja"],cI:true,sL:"xml",subLanguageMode:"continuous",c:[{cN:"template_comment",b:/\{%\s*comment\s*%}/,e:/\{%\s*endcomment\s*%}/},{cN:"template_comment",b:/\{#/,e:/#}/},{cN:"template_tag",b:/\{%/,e:/%}/,k:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor in ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup by as ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim",c:[b]},{cN:"variable",b:/\{\{/,e:/}}/,c:[b]}]}});hljs.registerLanguage("delphi",function(b){var a="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure";var e={cN:"comment",v:[{b:/\{/,e:/\}/,r:0},{b:/\(\*/,e:/\*\)/,r:10}]};var c={cN:"string",b:/'/,e:/'/,c:[{b:/''/}]};var d={cN:"string",b:/(#\d+)+/};var f={b:b.IR+"\\s*=\\s*class\\s*\\(",rB:true,c:[b.TM]};var g={cN:"function",bK:"function constructor destructor procedure",e:/[:;]/,k:"function constructor|10 destructor|10 procedure|10",c:[b.TM,{cN:"params",b:/\(/,e:/\)/,k:a,c:[c,d]},e]};return{cI:true,k:a,i:/("|\$[G-Zg-z]|\/\*|<\/)/,c:[e,b.CLCM,c,d,b.NM,f,g]}});hljs.registerLanguage("vbscript",function(a){return{aliases:["vbs"],cI:true,k:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},i:"//",c:[a.inherit(a.QSM,{c:[{b:'""'}]}),{cN:"comment",b:/'/,e:/$/,r:0},a.CNM]}});hljs.registerLanguage("oxygene",function(b){var g="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained";var a={cN:"comment",b:"{",e:"}",r:0};var e={cN:"comment",b:"\\(\\*",e:"\\*\\)",r:10};var c={cN:"string",b:"'",e:"'",c:[{b:"''"}]};var d={cN:"string",b:"(#\\d+)+"};var f={cN:"function",bK:"function constructor destructor procedure method",e:"[:;]",k:"function constructor|10 destructor|10 procedure|10 method|10",c:[b.TM,{cN:"params",b:"\\(",e:"\\)",k:g,c:[c,d]},a,e]};return{cI:true,k:g,i:'("|\\$[G-Zg-z]|\\/\\*|</)',c:[a,e,b.CLCM,c,d,b.NM,f,{cN:"class",b:"=\\bclass\\b",e:"end;",k:g,c:[c,d,a,e,b.CLCM,f]}]}});hljs.registerLanguage("mel",function(a){return{k:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",i:"</",c:[a.CNM,a.ASM,a.QSM,{cN:"string",b:"`",e:"`",c:[a.BE]},{cN:"variable",v:[{b:"\\$\\d"},{b:"[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)"},{b:"\\*(\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)",r:0}]},a.CLCM,a.CBCM]}});hljs.registerLanguage("dos",function(a){return{aliases:["bat","cmd"],cI:true,k:{flow:"if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq",keyword:"shift cd dir echo setlocal endlocal set pause copy",stream:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux",winutils:"ping net ipconfig taskkill xcopy ren del"},c:[{cN:"envvar",b:"%%[^ ]"},{cN:"envvar",b:"%[^ ]+?%"},{cN:"envvar",b:"![^ ]+?!"},{cN:"number",b:"\\b\\d+",r:0},{cN:"comment",b:"@?rem",e:"$"}]}});hljs.registerLanguage("apache",function(a){var b={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:true,c:[a.HCM,{cN:"tag",b:"</?",e:">"},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",b]},b,a.QSM]}}],i:/\S/}});hljs.registerLanguage("scss",function(a){var c="[a-zA-Z-][a-zA-Z0-9_-]*";var f={cN:"variable",b:"(\\$"+c+")\\b"};var d={cN:"function",b:c+"\\(",rB:true,eE:true,e:"\\("};var b={cN:"hexcolor",b:"#[0-9A-Fa-f]+"};var e={cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[d,b,a.CSSNM,a.QSM,a.ASM,a.CBCM,{cN:"important",b:"!important"}]}};return{cI:true,i:"[=/|']",c:[a.CLCM,a.CBCM,d,{cN:"id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{cN:"pseudo",b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{cN:"pseudo",b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},f,{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{cN:"value",b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{cN:"value",b:":",e:";",c:[d,f,b,a.CSSNM,a.QSM,a.ASM,{cN:"important",b:"!important"}]},{cN:"at_rule",b:"@",e:"[{;]",k:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",c:[d,f,a.QSM,a.ASM,b,a.CSSNM,{cN:"preprocessor",b:"\\s[A-Za-z0-9_.-]+",r:0}]}]}});hljs.registerLanguage("monkey",function(a){var b={v:[{cN:"number",b:"[$][a-fA-F0-9]+"},a.NM]};return{cI:true,k:{keyword:"public private property continue exit extern new try catch eachin not abstract final select case default const local global field end if then else elseif endif while wend repeat until forever for to step next return module inline throw",built_in:"DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI",literal:"true false null and or shl shr mod"},c:[{cN:"comment",b:"#rem",e:"#end"},{cN:"comment",b:"'",e:"$",r:0},{cN:"function",bK:"function method",e:"[(=:]|$",i:/\n/,c:[a.UTM,]},{cN:"class",bK:"class interface",e:"$",c:[{bK:"extends implements"},a.UTM]},{cN:"variable",b:"\\b(self|super)\\b"},{cN:"preprocessor",bK:"import",e:"$"},{cN:"preprocessor",b:"\\s*#",e:"$",k:"if else elseif endif end then"},{cN:"pi",b:"^\\s*strict\\b"},{bK:"alias",e:"=",c:[a.UTM]},a.QSM,b]}});hljs.registerLanguage("applescript",function(a){var b=a.inherit(a.QSM,{i:""});var d={cN:"params",b:"\\(",e:"\\)",c:["self",a.CNM,b]};var c=[{cN:"comment",b:"--",e:"$"},{cN:"comment",b:"\\(\\*",e:"\\*\\)",c:["self",{b:"--",e:"$"}]},a.HCM];return{aliases:["osascript"],k:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",constant:"AppleScript false linefeed return pi quote result space tab true",type:"alias application boolean class constant date file integer list number real record string text",command:"activate beep count delay launch log offset read round run say summarize write",property:"character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},c:[b,a.CNM,{cN:"type",b:"\\bPOSIX file\\b"},{cN:"command",b:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{cN:"constant",b:"\\b(text item delimiters|current application|missing value)\\b"},{cN:"keyword",b:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{cN:"property",b:"\\b(POSIX path|(date|time) string|quoted form)\\b"},{cN:"function_start",bK:"on",i:"[${=;\\n]",c:[a.UTM,d]}].concat(c),i:"//"}});hljs.registerLanguage("lasso",function(d){var b="[a-zA-Z_][a-zA-Z0-9_.]*";var i="<\\?(lasso(script)?|=)";var c="\\]|\\?>";var g={literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null bytes list queue set stack staticarray tie local var variable global data self inherited",keyword:"error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"};var a={cN:"comment",b:"<!--",e:"-->",r:0};var j={cN:"preprocessor",b:"\\[noprocess\\]",starts:{cN:"markup",e:"\\[/noprocess\\]",rE:true,c:[a]}};var e={cN:"preprocessor",b:"\\[/noprocess|"+i};var h={cN:"variable",b:"'"+b+"'"};var f=[d.CLCM,{cN:"javadoc",b:"/\\*\\*!",e:"\\*/",c:[d.PWM]},d.CBCM,d.inherit(d.CNM,{b:d.CNR+"|-?(infinity|nan)\\b"}),d.inherit(d.ASM,{i:null}),d.inherit(d.QSM,{i:null}),{cN:"string",b:"`",e:"`"},{cN:"variable",v:[{b:"[#$]"+b},{b:"#",e:"\\d+",i:"\\W"}]},{cN:"tag",b:"::\\s*",e:b,i:"\\W"},{cN:"attribute",v:[{b:"-"+d.UIR,r:0},{b:"(\\.\\.\\.)"}]},{cN:"subst",v:[{b:"->\\s*",c:[h]},{b:":=|/(?!\\w)=?|[-+*%=<>&|!?\\\\]+",r:0}]},{cN:"built_in",b:"\\.\\.?",r:0,c:[h]},{cN:"class",bK:"define",rE:true,e:"\\(|=>",c:[d.inherit(d.TM,{b:d.UIR+"(=(?!>))?"})]}];return{aliases:["ls","lassoscript"],cI:true,l:b+"|&[lg]t;",k:g,c:[{cN:"preprocessor",b:c,r:0,starts:{cN:"markup",e:"\\[|"+i,rE:true,r:0,c:[a]}},j,e,{cN:"preprocessor",b:"\\[no_square_brackets",starts:{e:"\\[/no_square_brackets\\]",l:b+"|&[lg]t;",k:g,c:[{cN:"preprocessor",b:c,r:0,starts:{cN:"markup",e:i,rE:true,c:[a]}},j,e].concat(f)}},{cN:"preprocessor",b:"\\[",r:0},{cN:"shebang",b:"^#!.+lasso9\\b",r:10}].concat(f)}});hljs.registerLanguage("cpp",function(a){var b={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c","h","c++","h++"],k:b,i:"</",c:[a.CLCM,a.CBCM,a.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},a.CNM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line pragma",c:[{b:'include\\s*[<"]',e:'[>"]',k:"include",i:"\\n"},a.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:b,c:["self"]},{b:a.IR+"::"}]}});hljs.registerLanguage("matlab",function(a){var b=[a.CNM,{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}]}];return{k:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},i:'(//|"|#|/\\*|\\s+/\\w+)',c:[{cN:"function",bK:"function",e:"$",c:[a.UTM,{cN:"params",b:"\\(",e:"\\)"},{cN:"params",b:"\\[",e:"\\]"}]},{cN:"transposed_variable",b:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",e:"",r:0},{cN:"matrix",b:"\\[",e:"\\]'*[\\.']*",c:b,r:0},{cN:"cell",b:"\\{",c:b,i:/:/,v:[{e:/\}'[\.']*/},{e:/\}/,r:0}]},{cN:"comment",b:"\\%",e:"$"}].concat(b)}});hljs.registerLanguage("scilab",function(a){var b=[a.CNM,{cN:"string",b:"'|\"",e:"'|\"",c:[a.BE,{b:"''"}]}];return{aliases:["sci"],k:{keyword:"abort break case clear catch continue do elseif else endfunction end for functionglobal if pause return resume select try then while%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp errorexec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isemptyisinfisnan isvector lasterror length load linspace list listfiles log10 log2 logmax min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand realround sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tantype typename warning zeros matrix"},i:'("|#|/\\*|\\s+/\\w+)',c:[{cN:"function",bK:"function endfunction",e:"$",k:"function endfunction|10",c:[a.UTM,{cN:"params",b:"\\(",e:"\\)"}]},{cN:"transposed_variable",b:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",e:"",r:0},{cN:"matrix",b:"\\[",e:"\\]'*[\\.']*",r:0,c:b},{cN:"comment",b:"//",e:"$"}].concat(b)}});hljs.registerLanguage("makefile",function(a){var b={cN:"variable",b:/\$\(/,e:/\)/,c:[a.BE]};return{aliases:["mk","mak"],c:[a.HCM,{b:/^\w+\s*\W*=/,rB:true,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:true,starts:{e:/$/,r:0,c:[b]}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,c:[a.QSM,b]}]}});hljs.registerLanguage("asciidoc",function(a){return{c:[{cN:"comment",b:"^/{4,}\\n",e:"\\n/{4,}$",r:10},{cN:"comment",b:"^//",e:"$",r:0},{cN:"title",b:"^\\.\\w.*$"},{b:"^[=\\*]{4,}\\n",e:"\\n^[=\\*]{4,}$",r:10},{cN:"header",b:"^(={1,5}) .+?( \\1)?$",r:10},{cN:"header",b:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$",r:10},{cN:"attribute",b:"^:.+?:",e:"\\s",eE:true,r:10},{cN:"attribute",b:"^\\[.+?\\]$",r:0},{cN:"blockquote",b:"^_{4,}\\n",e:"\\n_{4,}$",r:10},{cN:"code",b:"^[\\-\\.]{4,}\\n",e:"\\n[\\-\\.]{4,}$",r:10},{b:"^\\+{4,}\\n",e:"\\n\\+{4,}$",c:[{b:"<",e:">",sL:"xml",r:0}],r:10},{cN:"bullet",b:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{cN:"label",b:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",r:10},{cN:"strong",b:"\\B\\*(?![\\*\\s])",e:"(\\n{2}|\\*)",c:[{b:"\\\\*\\w",r:0}]},{cN:"emphasis",b:"\\B'(?!['\\s])",e:"(\\n{2}|')",c:[{b:"\\\\'\\w",r:0}],r:0},{cN:"emphasis",b:"_(?![_\\s])",e:"(\\n{2}|_)",r:0},{cN:"smartquote",b:"``.+?''",r:10},{cN:"smartquote",b:"`.+?'",r:10},{cN:"code",b:"(`.+?`|\\+.+?\\+)",r:0},{cN:"code",b:"^[ \\t]",e:"$",r:0},{cN:"horizontal_rule",b:"^'{3,}[ \\t]*$",r:10},{b:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",rB:true,c:[{b:"(link|image:?):",r:0},{cN:"link_url",b:"\\w",e:"[^\\[]+",r:0},{cN:"link_label",b:"\\[",e:"\\]",eB:true,eE:true,r:0}],r:10}]}});hljs.registerLanguage("parser3",function(a){return{sL:"xml",r:0,c:[{cN:"comment",b:"^#",e:"$"},{cN:"comment",b:"\\^rem{",e:"}",r:10,c:[{b:"{",e:"}",c:["self"]}]},{cN:"preprocessor",b:"^@(?:BASE|USE|CLASS|OPTIONS)$",r:10},{cN:"title",b:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{cN:"variable",b:"\\$\\{?[\\w\\-\\.\\:]+\\}?"},{cN:"keyword",b:"\\^[\\w\\-\\.\\:]+"},{cN:"number",b:"\\^#[0-9a-fA-F]+"},a.CNM]}});hljs.registerLanguage("clojure",function(l){var e={built_in:"def cond apply if-not if-let if not not= = &lt; < > &lt;= <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"};var f="[a-zA-Z_0-9\\!\\.\\?\\-\\+\\*\\/\\<\\=\\>\\&\\#\\$';]+";var a="[\\s:\\(\\{]+\\d+(\\.\\d+)?";var d={cN:"number",b:a,r:0};var j=l.inherit(l.QSM,{i:null});var o={cN:"comment",b:";",e:"$",r:0};var n={cN:"collection",b:"[\\[\\{]",e:"[\\]\\}]"};var c={cN:"comment",b:"\\^"+f};var b={cN:"comment",b:"\\^\\{",e:"\\}"};var h={cN:"attribute",b:"[:]"+f};var m={cN:"list",b:"\\(",e:"\\)"};var g={eW:true,k:{literal:"true false nil"},r:0};var i={k:e,l:f,cN:"title",b:f,starts:g};m.c=[{cN:"comment",b:"comment"},i,g];g.c=[m,j,c,b,o,h,n,d];n.c=[m,j,c,o,h,n,d];return{aliases:["clj"],i:/\S/,c:[o,m,{cN:"prompt",b:/^=> /,starts:{e:/\n\n|\Z/}}]}});hljs.registerLanguage("elixir",function(e){var f="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var g="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var i="and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote";var c={cN:"subst",b:"#\\{",e:"}",l:f,k:i};var d={cN:"string",c:[e.BE,c],v:[{b:/'/,e:/'/},{b:/"/,e:/"/}]};var b={eW:true,rE:true,l:f,k:i,r:0};var h={cN:"function",bK:"def defmacro",e:/\bdo\b/,c:[e.inherit(e.TM,{b:g,starts:b})]};var j=e.inherit(h,{cN:"class",bK:"defmodule defrecord",e:/\bdo\b|$|;/});var a=[d,e.HCM,j,h,{cN:"constant",b:"(\\b[A-Z_]\\w*(.)?)+",r:0},{cN:"symbol",b:":",c:[d,{b:g}],r:0},{cN:"symbol",b:f+":",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"->"},{b:"("+e.RSR+")\\s*",c:[e.HCM,{cN:"regexp",i:"\\n",c:[e.BE,c],v:[{b:"/",e:"/[a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];c.c=a;b.c=a;return{l:f,k:i,c:a}});hljs.registerLanguage("typescript",function(a){return{aliases:["ts"],k:{keyword:"in if for while finally var new function|0 do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private get set super interface extendsstatic constructor implements enum export import declare",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void",},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:0},a.ASM,a.QSM,a.CLCM,a.CBCM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBCM,a.RM,{b:/</,e:/>;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:true,c:[a.inherit(a.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBCM],i:/["'\(]/}],i:/\[|%/,r:0},{cN:"constructor",bK:"constructor",e:/\{/,eE:true,r:10},{cN:"module",bK:"module",e:/\{/,eE:true,},{cN:"interface",bK:"interface",e:/\{/,eE:true,},{b:/\$[(.]/},{b:"\\."+a.IR,r:0}]}});hljs.registerLanguage("go",function(a){var b={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer",constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:b,i:"</",c:[a.CLCM,a.CBCM,a.QSM,{cN:"string",b:"'",e:"[^\\\\]'"},{cN:"string",b:"`",e:"`"},{cN:"number",b:"[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?",r:0},a.CNM]}}); \ No newline at end of file
diff --git a/vendor/assets/javascripts/highlightjs.min.js b/vendor/assets/javascripts/highlightjs.min.js
deleted file mode 100644
index d8acc5c5320..00000000000
--- a/vendor/assets/javascripts/highlightjs.min.js
+++ /dev/null
@@ -1 +0,0 @@
-var hljs=new function(){function k(v){return v.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(v){return v.nodeName.toLowerCase()}function i(w,x){var v=w&&w.exec(x);return v&&v.index==0}function d(v){return Array.prototype.map.call(v.childNodes,function(w){if(w.nodeType==3){return b.useBR?w.nodeValue.replace(/\n/g,""):w.nodeValue}if(t(w)=="br"){return"\n"}return d(w)}).join("")}function r(w){var v=(w.className+" "+(w.parentNode?w.parentNode.className:"")).split(/\s+/);v=v.map(function(x){return x.replace(/^language-/,"")});return v.filter(function(x){return j(x)||x=="no-highlight"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)=="br"){z+=1}else{if(A.nodeType==1){v.push({event:"start",offset:z,node:A});z=w(A,z);v.push({event:"stop",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F="";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset<y[0].offset)?w:y}return y[0].event=="start"?w:y}function A(H){function G(I){return" "+I.nodeName+'="'+k(I.value)+'"'}F+="<"+t(H)+Array.prototype.map.call(H.attributes,G).join("")+">"}function E(G){F+="</"+t(G)+">"}function v(G){(G.event=="start"?A:E)(G.node)}while(w.length||y.length){var D=B();F+=k(C.substr(x,D[0].offset-x));x=D[0].offset;if(D==w){z.reverse().forEach(E);do{v(D.splice(0,1)[0]);D=B()}while(D==w&&D.length&&D[0].offset==x);z.reverse().forEach(A)}else{if(D[0].event=="start"){z.push(D[0].node)}else{z.pop()}v(D.splice(0,1)[0])}}return F+k(C.substr(x))}function m(y){function v(z){return(z&&z.source)||z}function w(A,z){return RegExp(v(A),"m"+(y.cI?"i":"")+(z?"g":""))}function x(D,C){if(D.compiled){return}D.compiled=true;D.k=D.k||D.bK;if(D.k){var z={};function E(G,F){if(y.cI){F=F.toLowerCase()}F.split(" ").forEach(function(H){var I=H.split("|");z[I[0]]=[G,I[1]?Number(I[1]):1]})}if(typeof D.k=="string"){E("keyword",D.k)}else{Object.keys(D.k).forEach(function(F){E(F,D.k[F])})}D.k=z}D.lR=w(D.l||/\b[A-Za-z0-9_]+\b/,true);if(C){if(D.bK){D.b=D.bK.split(" ").join("|")}if(!D.b){D.b=/\B|\b/}D.bR=w(D.b);if(!D.e&&!D.eW){D.e=/\B|\b/}if(D.e){D.eR=w(D.e)}D.tE=v(D.e)||"";if(D.eW&&C.tE){D.tE+=(D.e?"|":"")+C.tE}}if(D.i){D.iR=w(D.i)}if(D.r===undefined){D.r=1}if(!D.c){D.c=[]}var B=[];D.c.forEach(function(F){if(F.v){F.v.forEach(function(G){B.push(o(F,G))})}else{B.push(F=="self"?D:F)}});D.c=B;D.c.forEach(function(F){x(F,D)});if(D.starts){x(D.starts,C)}var A=D.c.map(function(F){return F.bK?"\\.?\\b("+F.b+")\\b\\.?":F.b}).concat([D.tE]).concat([D.i]).map(v).filter(Boolean);D.t=A.length?w(A.join("|"),true):{exec:function(F){return null}};D.continuation={}}x(y)}function c(S,L,J,R){function v(U,V){for(var T=0;T<V.c.length;T++){if(i(V.c[T].bR,U)){return V.c[T]}}}function z(U,T){if(i(U.eR,T)){return U}if(U.eW){return z(U.parent,T)}}function A(T,U){return !J&&i(U.iR,T)}function E(V,T){var U=M.cI?T[0].toLowerCase():T[0];return V.k.hasOwnProperty(U)&&V.k[U]}function w(Z,X,W,V){var T=V?"":b.classPrefix,U='<span class="'+T,Y=W?"":"</span>";U+=Z+'">';return U+X+Y}function N(){var U=k(C);if(!I.k){return U}var T="";var X=0;I.lR.lastIndex=0;var V=I.lR.exec(U);while(V){T+=U.substr(X,V.index-X);var W=E(I,V);if(W){H+=W[1];T+=w(W[0],V[0])}else{T+=V[0]}X=I.lR.lastIndex;V=I.lR.exec(U)}return T+U.substr(X)}function F(){if(I.sL&&!f[I.sL]){return k(C)}var T=I.sL?c(I.sL,C,true,I.continuation.top):g(C);if(I.r>0){H+=T.r}if(I.subLanguageMode=="continuous"){I.continuation.top=T.top}return w(T.language,T.value,false,true)}function Q(){return I.sL!==undefined?F():N()}function P(V,U){var T=V.cN?w(V.cN,"",true):"";if(V.rB){D+=T;C=""}else{if(V.eB){D+=k(U)+T;C=""}else{D+=T;C=U}}I=Object.create(V,{parent:{value:I}})}function G(T,X){C+=T;if(X===undefined){D+=Q();return 0}var V=v(X,I);if(V){D+=Q();P(V,X);return V.rB?0:X.length}var W=z(I,X);if(W){var U=I;if(!(U.rE||U.eE)){C+=X}D+=Q();do{if(I.cN){D+="</span>"}H+=I.r;I=I.parent}while(I!=W.parent);if(U.eE){D+=k(X)}C="";if(W.starts){P(W.starts,"")}return U.rE?0:X.length}if(A(X,I)){throw new Error('Illegal lexeme "'+X+'" for mode "'+(I.cN||"<unnamed>")+'"')}C+=X;return X.length||1}var M=j(S);if(!M){throw new Error('Unknown language: "'+S+'"')}m(M);var I=R||M;var D="";for(var K=I;K!=M;K=K.parent){if(K.cN){D=w(K.cN,D,true)}}var C="";var H=0;try{var B,y,x=0;while(true){I.t.lastIndex=x;B=I.t.exec(L);if(!B){break}y=G(L.substr(x,B.index-x),B[0]);x=B.index+y}G(L.substr(x));for(var K=I;K.parent;K=K.parent){if(K.cN){D+="</span>"}}return{r:H,value:D,language:S,top:I}}catch(O){if(O.message.indexOf("Illegal")!=-1){return{r:0,value:k(L)}}else{throw O}}}function g(y,x){x=x||b.languages||Object.keys(f);var v={r:0,value:k(y)};var w=v;x.forEach(function(z){if(!j(z)){return}var A=c(z,y,false);A.language=z;if(A.r>w.r){w=A}if(A.r>v.r){w=v;v=A}});if(w.language){v.second_best=w}return v}function h(v){if(b.tabReplace){v=v.replace(/^((<[^>]+>|\t)+)/gm,function(w,z,y,x){return z.replace(/\t/g,b.tabReplace)})}if(b.useBR){v=v.replace(/\n/g,"<br>")}return v}function p(z){var y=d(z);var A=r(z);if(A=="no-highlight"){return}var v=A?c(A,y,true):g(y);var w=u(z);if(w.length){var x=document.createElementNS("http://www.w3.org/1999/xhtml","pre");x.innerHTML=v.value;v.value=q(w,u(x),y)}v.value=h(v.value);z.innerHTML=v.value;z.className+=" hljs "+(!A&&v.language||"");z.result={language:v.language,re:v.r};if(v.second_best){z.second_best={language:v.second_best.language,re:v.second_best.r}}}var b={classPrefix:"hljs-",tabReplace:null,useBR:false,languages:undefined};function s(v){b=o(b,v)}function l(){if(l.called){return}l.called=true;var v=document.querySelectorAll("pre code");Array.prototype.forEach.call(v,p)}function a(){addEventListener("DOMContentLoaded",l,false);addEventListener("load",l,false)}var f={};var n={};function e(v,x){var w=f[v]=x(this);if(w.aliases){w.aliases.forEach(function(y){n[y]=v})}}function j(v){return f[v]||f[n[v]]}this.highlight=c;this.highlightAuto=g;this.fixMarkup=h;this.highlightBlock=p;this.configure=s;this.initHighlighting=l;this.initHighlightingOnLoad=a;this.registerLanguage=e;this.getLanguage=j;this.inherit=o;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.TM={cN:"title",b:this.IR,r:0};this.UTM={cN:"title",b:this.UIR,r:0}}();hljs.registerLanguage("bash",function(b){var a={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]};var d={cN:"string",b:/"/,e:/"/,c:[b.BE,a,{cN:"variable",b:/\$\(/,e:/\)/,c:[b.BE]}]};var c={cN:"string",b:/'/,e:/'/};return{l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:true,c:[b.inherit(b.TM,{b:/\w[\w\d_]*/})],r:0},b.HCM,b.NM,d,c,a]}});hljs.registerLanguage("cs",function(b){var a="abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async await ascending descending from get group into join let orderby partial select set value var where yield";return{k:a,c:[{cN:"comment",b:"///",e:"$",rB:true,c:[{cN:"xmlDocTag",b:"///|<!--|-->"},{cN:"xmlDocTag",b:"</?",e:">"}]},b.CLCM,b.CBLCLM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},b.ASM,b.QSM,b.CNM,{bK:"protected public private internal",e:/[{;=]/,k:a,c:[{bK:"class namespace interface",starts:{c:[b.TM]}},{b:b.IR+"\\s*\\(",rB:true,c:[b.TM]}]}]}});hljs.registerLanguage("ruby",function(e){var h="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var g="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor";var a={cN:"yardoctag",b:"@[A-Za-z]+"};var i={cN:"comment",v:[{b:"#",e:"$",c:[a]},{b:"^\\=begin",e:"^\\=end",c:[a],r:10},{b:"^__END__",e:"\\n$"}]};var c={cN:"subst",b:"#\\{",e:"}",k:g};var d={cN:"string",c:[e.BE,c],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:"%[qw]?\\(",e:"\\)"},{b:"%[qw]?\\[",e:"\\]"},{b:"%[qw]?{",e:"}"},{b:"%[qw]?<",e:">",r:10},{b:"%[qw]?/",e:"/",r:10},{b:"%[qw]?%",e:"%",r:10},{b:"%[qw]?-",e:"-",r:10},{b:"%[qw]?\\|",e:"\\|",r:10},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]};var b={cN:"params",b:"\\(",e:"\\)",k:g};var f=[d,i,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]},i]},{cN:"function",bK:"def",e:" |$|;",r:0,c:[e.inherit(e.TM,{b:h}),b,i]},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[d,{b:h}],r:0},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[i,{cN:"regexp",c:[e.BE,c],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];c.c=f;b.c=f;return{k:g,c:f}});hljs.registerLanguage("diff",function(a){return{c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});hljs.registerLanguage("javascript",function(a){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,a.REGEXP_MODE,{b:/</,e:/>;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,c:[a.inherit(a.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBLCLM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+a.IR,r:0}]}});hljs.registerLanguage("xml",function(a){var c="[A-Za-z0-9\\._:-]+";var d={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"};var b={eW:true,i:/</,r:0,c:[d,{cN:"attribute",b:c,r:0},{b:"=",r:0,c:[{cN:"value",v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html"],cI:true,c:[{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},d,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ /><]+",r:0},b]}]}});hljs.registerLanguage("markdown",function(a){return{c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|\t)",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:true,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:true,rE:true,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:true,eE:true},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:true,eE:true,}],r:10},{b:"^\\[.+\\]:",e:"$",rB:true,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:true,eE:true},{cN:"link_url",b:"\\s",e:"$"}]}]}});hljs.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}});hljs.registerLanguage("http",function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}});hljs.registerLanguage("java",function(b){var a="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws";return{k:a,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}],r:10},b.CLCM,b.CBLCLM,b.ASM,b.QSM,{bK:"protected public private",e:/[{;=]/,k:a,c:[{cN:"class",bK:"class interface",eW:true,i:/[:"<>]/,c:[{bK:"extends implements",r:10},b.UTM]},{b:b.UIR+"\\s*\\(",rB:true,c:[b.UTM]}]},b.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("php",function(b){var e={cN:"variable",b:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var a={cN:"preprocessor",b:/<\?(php)?|\?>/};var c={cN:"string",c:[b.BE,a],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},b.inherit(b.ASM,{i:null}),b.inherit(b.QSM,{i:null})]};var d={v:[b.BNM,b.CNM]};return{cI:true,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[b.CLCM,b.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},a]},{cN:"comment",b:"__halt_compiler.+?;",eW:true,k:"__halt_compiler",l:b.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[b.BE]},a,e,{cN:"function",bK:"function",e:/[;{]/,i:"\\$|\\[|%",c:[b.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",e,b.CBLCLM,c,d]}]},{cN:"class",bK:"class interface",e:"{",i:/[:\(\$"]/,c:[{bK:"extends implements",r:10},b.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[b.UTM]},{bK:"use",e:";",c:[b.UTM]},{b:"=>"},c,d]}});hljs.registerLanguage("python",function(a){var f={cN:"prompt",b:/^(>>>|\.\.\.) /};var b={cN:"string",c:[a.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[f],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[f],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/,},{b:/(b|br)"/,e:/"/,},a.ASM,a.QSM]};var d={cN:"number",r:0,v:[{b:a.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:a.CNR+"[lLjJ]?"}]};var e={cN:"params",b:/\(/,e:/\)/,c:["self",f,d,b]};var c={e:/:/,i:/[${=;\n]/,c:[a.UTM,e]};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[f,d,b,a.HCM,a.inherit(c,{cN:"function",bK:"def",r:10}),a.inherit(c,{cN:"class",bK:"class"}),{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("sql",function(a){return{cI:true,i:/[<>]/,c:[{cN:"operator",b:"\\b(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant|merge)\\b(?!:)",e:";",eW:true,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row merge matched database",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[a.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[a.BE]},a.CNM]},a.CBLCLM,{cN:"comment",b:"--",e:"$"}]}});hljs.registerLanguage("ini",function(a){return{cI:true,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM],r:0}]}]}});hljs.registerLanguage("perl",function(c){var d="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when";var f={cN:"subst",b:"[$@]\\{",e:"\\}",k:d};var g={b:"->{",e:"}"};var a={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@\*](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@\*][^\s\w{]/,r:0}]};var e={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5};var h=[c.BE,f,a];var b=[a,c.HCM,e,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:true},g,{cN:"string",c:h,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[c.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[c.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+c.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[c.HCM,e,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[c.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];f.c=b;g.c=b;return{k:d,c:b}});hljs.registerLanguage("objectivec",function(a){var d={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign self synchronized id nonatomic super unichar IBOutlet IBAction strong weak @private @protected @public @try @property @end @throw @catch @finally @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"};var c=/[a-zA-Z@][a-zA-Z0-9_]*/;var b="@interface @class @protocol @implementation";return{k:d,l:c,i:"</",c:[a.CLCM,a.CBLCLM,a.CNM,a.QSM,{cN:"string",b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"},{cN:"preprocessor",b:"#import",e:"$",c:[{cN:"title",b:'"',e:'"'},{cN:"title",b:"<",e:">"}]},{cN:"preprocessor",b:"#",e:"$"},{cN:"class",b:"("+b.split(" ").join("|")+")\\b",e:"({|$)",k:b,l:c,c:[a.UTM]},{cN:"variable",b:"\\."+a.UIR,r:0}]}});hljs.registerLanguage("coffeescript",function(c){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module exports global window document"};var a="[A-Za-z$_][0-9A-Za-z$_]*";var f=c.inherit(c.TM,{b:a});var e={cN:"subst",b:/#\{/,e:/}/,k:b};var d=[c.BNM,c.inherit(c.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[c.BE]},{b:/'/,e:/'/,c:[c.BE]},{b:/"""/,e:/"""/,c:[c.BE,e]},{b:/"/,e:/"/,c:[c.BE,e]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[e,c.HCM]},{b:"//[gim]*",r:0},{b:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"}]},{cN:"property",b:"@"+a},{b:"`",e:"`",eB:true,eE:true,sL:"javascript"}];e.c=d;return{k:b,c:d.concat([{cN:"comment",b:"###",e:"###"},c.HCM,{cN:"function",b:"("+a+"\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",e:"[-=]>",rB:true,c:[f,{cN:"params",b:"\\(",rB:true,c:[{b:/\(/,e:/\)/,k:b,c:["self"].concat(d)}]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:true,i:/[:="\[\]]/,c:[f]},f]},{cN:"attribute",b:a+":",e:":",rB:true,eE:true,r:0}])}});hljs.registerLanguage("nginx",function(c){var b={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+c.UIR}]};var a={eW:true,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[c.HCM,{cN:"string",c:[c.BE,b],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:true,eE:true},{cN:"regexp",c:[c.BE,b],v:[{b:"\\s\\^",e:"\\s|{|;",rE:true},{b:"~\\*?\\s+",e:"\\s|{|;",rE:true},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},b]};return{c:[c.HCM,{b:c.UIR+"\\s",e:";|{",rB:true,c:[c.inherit(c.UTM,{starts:a})],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("json",function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}});hljs.registerLanguage("apache",function(a){var b={cN:"number",b:"[\\$%]\\d+"};return{cI:true,c:[a.HCM,{cN:"tag",b:"</?",e:">"},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",b]},b,a.QSM]}}],i:/\S/}});hljs.registerLanguage("cpp",function(a){var b={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c"],k:b,i:"</",c:[a.CLCM,a.CBLCLM,a.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},a.CNM,{cN:"preprocessor",b:"#",e:"$",c:[{b:"include\\s*<",e:">",i:"\\n"},a.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:b,r:10,c:["self"]}]}});hljs.registerLanguage("makefile",function(a){var b={cN:"variable",b:/\$\(/,e:/\)/,c:[a.BE]};return{c:[a.HCM,{b:/^\w+\s*\W*=/,rB:true,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:true,starts:{e:/$/,r:0,c:[b],}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,c:[a.QSM,b]}]}}); \ No newline at end of file