Imported Upstream version 7.10.0
1
.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
CHANGELOG merge=union
|
60
.gitignore
vendored
|
@ -1,40 +1,42 @@
|
|||
.bundle
|
||||
.rbx/
|
||||
db/*.sqlite3
|
||||
db/*.sqlite3-journal
|
||||
log/*.log*
|
||||
tmp/
|
||||
.sass-cache/
|
||||
coverage/*
|
||||
backups/*
|
||||
*.log
|
||||
*.swp
|
||||
public/uploads/
|
||||
.ruby-version
|
||||
.ruby-gemset
|
||||
.rvmrc
|
||||
.rbenv-version
|
||||
.DS_Store
|
||||
.bundle
|
||||
.chef
|
||||
.directory
|
||||
nohup.out
|
||||
Vagrantfile
|
||||
.envrc
|
||||
.gitlab_shell_secret
|
||||
.idea
|
||||
.rbenv-version
|
||||
.rbx/
|
||||
.ruby-gemset
|
||||
.ruby-version
|
||||
.rvmrc
|
||||
.sass-cache/
|
||||
.secret
|
||||
.vagrant
|
||||
config/gitlab.yml
|
||||
Vagrantfile
|
||||
backups/*
|
||||
config/aws.yml
|
||||
config/database.yml
|
||||
config/gitlab.yml
|
||||
config/initializers/omniauth.rb
|
||||
config/initializers/rack_attack.rb
|
||||
config/initializers/smtp_settings.rb
|
||||
config/unicorn.rb
|
||||
config/resque.yml
|
||||
config/aws.yml
|
||||
config/unicorn.rb
|
||||
coverage/*
|
||||
db/*.sqlite3
|
||||
db/*.sqlite3-journal
|
||||
db/data.yml
|
||||
.idea
|
||||
.DS_Store
|
||||
.chef
|
||||
vendor/bundle/*
|
||||
rails_best_practices_output.html
|
||||
doc/code/*
|
||||
.secret
|
||||
*.log
|
||||
public/uploads.*
|
||||
public/assets/
|
||||
.envrc
|
||||
dump.rdb
|
||||
log/*.log*
|
||||
nohup.out
|
||||
public/assets/
|
||||
public/uploads.*
|
||||
public/uploads/
|
||||
rails_best_practices_output.html
|
||||
tags
|
||||
tmp/
|
||||
vendor/bundle/*
|
||||
|
|
11
.pkgr.yml
|
@ -1,10 +1,15 @@
|
|||
user: git
|
||||
group: git
|
||||
services:
|
||||
- postgres
|
||||
before_precompile: ./bin/pkgr_before_precompile.sh
|
||||
targets:
|
||||
debian-7: &wheezy
|
||||
build_dependencies:
|
||||
- libkrb5-dev
|
||||
- libicu-dev
|
||||
- cmake
|
||||
- pkg-config
|
||||
dependencies:
|
||||
- libicu48
|
||||
- libpcre3
|
||||
|
@ -12,14 +17,20 @@ targets:
|
|||
ubuntu-12.04: *wheezy
|
||||
ubuntu-14.04:
|
||||
build_dependencies:
|
||||
- libkrb5-dev
|
||||
- libicu-dev
|
||||
- cmake
|
||||
- pkg-config
|
||||
dependencies:
|
||||
- libicu52
|
||||
- libpcre3
|
||||
- git
|
||||
centos-6:
|
||||
build_dependencies:
|
||||
- krb5-devel
|
||||
- libicu-devel
|
||||
- cmake
|
||||
- pkgconfig
|
||||
dependencies:
|
||||
- libicu
|
||||
- pcre
|
||||
|
|
1006
.rubocop.yml
Normal file
1
.ruby-version
Normal file
|
@ -0,0 +1 @@
|
|||
2.1.6
|
36
.travis.yml
|
@ -1,36 +0,0 @@
|
|||
language: ruby
|
||||
env:
|
||||
global:
|
||||
- TRAVIS=true
|
||||
matrix:
|
||||
- TASK=spinach_project DB=mysql
|
||||
- TASK=spinach_other DB=mysql
|
||||
- TASK=spec:api DB=mysql
|
||||
- TASK=spec:feature DB=mysql
|
||||
- TASK=spec:other DB=mysql
|
||||
- TASK=jasmine:ci DB=mysql
|
||||
- TASK=spinach_project DB=postgresql
|
||||
- TASK=spinach_other DB=postgresql
|
||||
- TASK=spec:api DB=postgresql
|
||||
- TASK=spec:feature DB=postgresql
|
||||
- TASK=spec:other DB=postgresql
|
||||
- TASK=jasmine:ci DB=postgresql
|
||||
before_install:
|
||||
- sudo apt-get install libicu-dev -y
|
||||
install:
|
||||
- "travis_retry bundle install --deployment --without production --retry 5"
|
||||
branches:
|
||||
only:
|
||||
- 'master'
|
||||
rvm:
|
||||
- 2.0.0
|
||||
services:
|
||||
- redis-server
|
||||
before_script:
|
||||
- "cp config/database.yml.$DB config/database.yml"
|
||||
- "cp config/gitlab.yml.example config/gitlab.yml"
|
||||
- "bundle exec rake db:setup"
|
||||
- "bundle exec rake db:seed_fu"
|
||||
script: "bundle exec rake $TASK --trace"
|
||||
notifications:
|
||||
email: false
|
510
CHANGELOG
|
@ -1,3 +1,513 @@
|
|||
Please view this file on the master branch, on stable branches it's out of date.
|
||||
|
||||
v 7.11.0 (unreleased)
|
||||
- Fix clone URL field and X11 Primary selection (Dmitry Medvinsky)
|
||||
- Ignore invalid lines in .gitmodules
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
v 7.10.0 (unreleased)
|
||||
- Ignore submodules that are defined in .gitmodules but are checked in as directories.
|
||||
- Allow projects to be imported from Google Code.
|
||||
- Remove access control for uploaded images to fix broken images in emails (Hannes Rosenögger)
|
||||
- Allow users to be invited by email to join a group or project.
|
||||
- Don't crash when project repository doesn't exist.
|
||||
- Add config var to block auto-created LDAP users.
|
||||
- Don't use HTML ellipsis in EmailsOnPush subject truncated commit message.
|
||||
- Set EmailsOnPush reply-to address to committer email when enabled.
|
||||
- Fix broken file browsing with a submodule that contains a relative link (Stan Hu)
|
||||
- Fix persistent XSS vulnerability around profile website URLs.
|
||||
- Fix project import URL regex to prevent arbitary local repos from being imported.
|
||||
- Fix directory traversal vulnerability around uploads routes.
|
||||
- Fix directory traversal vulnerability around help pages.
|
||||
- Don't leak existence of project via search autocomplete.
|
||||
- Don't leak existence of group or project via search.
|
||||
- Fix bug where Wiki pages that included a '/' were no longer accessible (Stan Hu)
|
||||
- Fix bug where error messages from Dropzone would not be displayed on the issues page (Stan Hu)
|
||||
- Add a rake task to check repository integrity with `git fsck`
|
||||
- Add ability to configure Reply-To address in gitlab.yml (Stan Hu)
|
||||
- Move current user to the top of the list in assignee/author filters (Stan Hu)
|
||||
- Fix broken side-by-side diff view on merge request page (Stan Hu)
|
||||
- Set Application controller default URL options to ensure all url_for calls are consistent (Stan Hu)
|
||||
- Allow HTML tags in Markdown input
|
||||
- Fix code unfold not working on Compare commits page (Stan Hu)
|
||||
- Fix generating SSH key fingerprints with OpenSSH 6.8. (Sašo Stanovnik)
|
||||
- Include missing events and fix save functionality in admin service template settings form (Stan Hu)
|
||||
- Fix "Import projects from" button to show the correct instructions (Stan Hu)
|
||||
- Fix dots in Wiki slugs causing errors (Stan Hu)
|
||||
- Make maximum attachment size configurable via Application Settings (Stan Hu)
|
||||
- Update poltergeist to version 1.6.0 to support PhantomJS 2.0 (Zeger-Jan van de Weg)
|
||||
- Fix cross references when usernames, milestones, or project names contain underscores (Stan Hu)
|
||||
- Disable reference creation for comments surrounded by code/preformatted blocks (Stan Hu)
|
||||
- Reduce Rack Attack false positives causing 403 errors during HTTP authentication (Stan Hu)
|
||||
- enable line wrapping per default and remove the checkbox to toggle it (Hannes Rosenögger)
|
||||
- Fix a link in the patch update guide
|
||||
- Add a service to support external wikis (Hannes Rosenögger)
|
||||
- Omit the "email patches" link and fix plain diff view for merge commits
|
||||
- List new commits for newly pushed branch in activity view.
|
||||
- Add sidetiq gem dependency to match EE
|
||||
- Add changelog, license and contribution guide links to project tab bar.
|
||||
- Improve diff UI
|
||||
- Fix alignment of navbar toggle button (Cody Mize)
|
||||
- Fix checkbox rendering for nested task lists
|
||||
- Identical look of selectboxes in UI
|
||||
- Upgrade the gitlab_git gem to version 7.1.3
|
||||
- Move "Import existing repository by URL" option to button.
|
||||
- Improve error message when save profile has error.
|
||||
- Passing the name of pushed ref to CI service (requires GitLab CI 7.9+)
|
||||
- Add location field to user profile
|
||||
- Fix print view for markdown files and wiki pages
|
||||
- Fix errors when deleting old backups
|
||||
- Improve GitLab performance when working with git repositories
|
||||
- Add tag message and last commit to tag hook (Kamil Trzciński)
|
||||
- Restrict permissions on backup files
|
||||
- Improve oauth accounts UI in profile page
|
||||
- Add ability to unlink connected accounts
|
||||
- Replace commits calendar with faster contribution calendar that includes issues and merge requests
|
||||
- Add inifinite scroll to user page activity
|
||||
- Don't include system notes in issue/MR comment count.
|
||||
- Don't mark merge request as updated when merge status relative to target branch changes.
|
||||
- Link note avatar to user.
|
||||
- Make Git-over-SSH errors more descriptive.
|
||||
- Fix EmailsOnPush.
|
||||
- Refactor issue filtering
|
||||
- AJAX selectbox for issue assignee and author filters
|
||||
- Fix issue with missing options in issue filtering dropdown if selected one
|
||||
- Prevent holding Control-Enter or Command-Enter from posting comment multiple times.
|
||||
- Prevent note form from being cleared when submitting failed.
|
||||
- Improve file icons rendering on tree (Sullivan Sénéchal)
|
||||
- API: Add pagination to project events
|
||||
- Get issue links in notification mail to work again.
|
||||
- Don't show commit comment button when user is not signed in.
|
||||
- Fix admin user projects lists.
|
||||
- Don't leak private group existence by redirecting from namespace controller to group controller.
|
||||
- Ability to skip some items from backup (database, respositories or uploads)
|
||||
- Archive repositories in background worker.
|
||||
- Import GitHub, Bitbucket or GitLab.com projects owned by authenticated user into current namespace.
|
||||
- Project labels are now available over the API under the "tag_list" field (Cristian Medina)
|
||||
- Fixed link paths for HTTP and SSH on the admin project view (Jeremy Maziarz)
|
||||
- Fix and improve help rendering (Sullivan Sénéchal)
|
||||
- Fix final line in EmailsOnPush email diff being rendered as error.
|
||||
- Authometic setup GitLab CI project for forks if origin project has GitLab CI enabled
|
||||
- Prevent duplicate Buildkite service creation.
|
||||
- Fix git over ssh errors 'fatal: protocol error: bad line length character'
|
||||
- Automatically setup GitLab CI project for forks if origin project has GitLab CI enabled
|
||||
- Bust group page project list cache when namespace name or path changes.
|
||||
- Explicitly set image alt-attribute to prevent graphical glitches if gravatars could not be loaded
|
||||
- Allow user to choose a public email to show on public profile
|
||||
- Remove truncation from issue titles on milestone page (Jason Blanchard)
|
||||
- Fix stuck Merge Request merging events from old installations (Ben Bodenmiller)
|
||||
- Fix merge request comments on files with multiple commits
|
||||
- Fix Resource Owner Password Authentication Flow
|
||||
|
||||
v 7.9.4
|
||||
- Security: Fix project import URL regex to prevent arbitary local repos from being imported
|
||||
- Fixed issue where only 25 commits would load in file listings
|
||||
- Fix LDAP identities after config update
|
||||
|
||||
v 7.9.3
|
||||
- Contains no changes
|
||||
- Add icons to Add dropdown items.
|
||||
- Allow admin to create public deploy keys that are accessible to any project.
|
||||
- Warn when gitlab-shell version doesn't match requirement.
|
||||
- Skip email confirmation when set by admin or via LDAP.
|
||||
- Only allow users to reference groups, projects, issues, MRs, commits they have access to.
|
||||
|
||||
v 7.9.3
|
||||
- Contains no changes
|
||||
|
||||
v 7.9.2
|
||||
- Contains no changes
|
||||
|
||||
v 7.9.1
|
||||
- Include missing events and fix save functionality in admin service template settings form (Stan Hu)
|
||||
- Fix "Import projects from" button to show the correct instructions (Stan Hu)
|
||||
- Fix OAuth2 issue importing a new project from GitHub and GitLab (Stan Hu)
|
||||
- Fix for LDAP with commas in DN
|
||||
- Fix missing events and in admin Slack service template settings form (Stan Hu)
|
||||
- Don't show commit comment button when user is not signed in.
|
||||
- Downgrade gemnasium-gitlab-service gem
|
||||
|
||||
v 7.9.0
|
||||
- Add HipChat integration documentation (Stan Hu)
|
||||
- Update documentation for object_kind field in Webhook push and tag push Webhooks (Stan Hu)
|
||||
- Fix broken email images (Hannes Rosenögger)
|
||||
- Automatically config git if user forgot, where possible (Zeger-Jan van de Weg)
|
||||
- Fix mass SQL statements on initial push (Hannes Rosenögger)
|
||||
- Add tag push notifications and normalize HipChat and Slack messages to be consistent (Stan Hu)
|
||||
- Add comment notification events to HipChat and Slack services (Stan Hu)
|
||||
- Add issue and merge request events to HipChat and Slack services (Stan Hu)
|
||||
- Fix merge request URL passed to Webhooks. (Stan Hu)
|
||||
- Fix bug that caused a server error when editing a comment to "+1" or "-1" (Stan Hu)
|
||||
- Fix code preview theme setting for comments, issues, merge requests, and snippets (Stan Hu)
|
||||
- Move labels/milestones tabs to sidebar
|
||||
- Upgrade Rails gem to version 4.1.9.
|
||||
- Improve error messages for file edit failures
|
||||
- Improve UI for commits, issues and merge request lists
|
||||
- Fix commit comments on first line of diff not rendering in Merge Request Discussion view.
|
||||
- Allow admins to override restricted project visibility settings.
|
||||
- Move restricted visibility settings from gitlab.yml into the web UI.
|
||||
- Improve trigger merge request hook when source project branch has been updated (Kirill Zaitsev)
|
||||
- Save web edit in new branch
|
||||
- Fix ordering of imported but unchanged projects (Marco Wessel)
|
||||
- Mobile UI improvements: make aside content expandable
|
||||
- Expose avatar_url in projects API
|
||||
- Fix checkbox alignment on the application settings page.
|
||||
- Generalize image upload in drag and drop in markdown to all files (Hannes Rosenögger)
|
||||
- Fix mass-unassignment of issues (Robert Speicher)
|
||||
- Fix hidden diff comments in merge request discussion view
|
||||
- Allow user confirmation to be skipped for new users via API
|
||||
- Add a service to send updates to an Irker gateway (Romain Coltel)
|
||||
- Add brakeman (security scanner for Ruby on Rails)
|
||||
- Slack username and channel options
|
||||
- Add grouped milestones from all projects to dashboard.
|
||||
- Web hook sends pusher email as well as commiter
|
||||
- Add Bitbucket omniauth provider.
|
||||
- Add Bitbucket importer.
|
||||
- Support referencing issues to a project whose name starts with a digit
|
||||
- Condense commits already in target branch when updating merge request source branch.
|
||||
- Send notifications and leave system comments when bulk updating issues.
|
||||
- Automatically link commit ranges to compare page: sha1...sha4 or sha1..sha4 (includes sha1 in comparison)
|
||||
- Move groups page from profile to dashboard
|
||||
- Starred projects page at dashboard
|
||||
- Blocking user does not remove him/her from project/groups but show blocked label
|
||||
- Change subject of EmailsOnPush emails to include namespace, project and branch.
|
||||
- Change subject of EmailsOnPush emails to include first commit message when multiple were pushed.
|
||||
- Remove confusing footer from EmailsOnPush mail body.
|
||||
- Add list of changed files to EmailsOnPush emails.
|
||||
- Add option to send EmailsOnPush emails from committer email if domain matches.
|
||||
- Add option to disable code diffs in EmailOnPush emails.
|
||||
- Wrap commit message in EmailsOnPush email.
|
||||
- Send EmailsOnPush emails when deleting commits using force push.
|
||||
- Fix EmailsOnPush email comparison link to include first commit.
|
||||
- Fix highliht of selected lines in file
|
||||
- Reject access to group/project avatar if the user doesn't have access.
|
||||
- Add database migration to clean group duplicates with same path and name (Make sure you have a backup before update)
|
||||
- Add GitLab active users count to rake gitlab:check
|
||||
- Starred projects page at dashboard
|
||||
- Make email display name configurable
|
||||
- Improve json validation in hook data
|
||||
- Use Emoji One
|
||||
- Updated emoji help documentation to properly reference EmojiOne.
|
||||
- Fix missing GitHub organisation repositories on import page.
|
||||
- Added blue theme
|
||||
- Remove annoying notice messages when create/update merge request
|
||||
- Allow smb:// links in Markdown text.
|
||||
- Filter merge request by title or description at Merge Requests page
|
||||
- Block user if he/she was blocked in Active Directory
|
||||
- Fix import pages not working after first load.
|
||||
- Use custom LDAP label in LDAP signin form.
|
||||
- Execute hooks and services when branch or tag is created or deleted through web interface.
|
||||
- Block and unblock user if he/she was blocked/unblocked in Active Directory
|
||||
- Raise recommended number of unicorn workers from 2 to 3
|
||||
- Use same layout and interactivity for project members as group members.
|
||||
- Prevent gitlab-shell character encoding issues by receiving its changes as raw data.
|
||||
- Ability to unsubscribe/subscribe to issue or merge request
|
||||
- Delete deploy key when last connection to a project is destroyed.
|
||||
- Fix invalid Atom feeds when using emoji, horizontal rules, or images (Christian Walther)
|
||||
- Backup of repositories with tar instead of git bundle (only now are git-annex files included in the backup)
|
||||
- Add canceled status for CI
|
||||
- Send EmailsOnPush email when branch or tag is created or deleted.
|
||||
- Faster merge request processing for large repository
|
||||
- Prevent doubling AJAX request with each commit visit via Turbolink
|
||||
- Prevent unnecessary doubling of js events on import pages and user calendar
|
||||
|
||||
v 7.8.4
|
||||
- Fix issue_tracker_id substitution in custom issue trackers
|
||||
- Fix path and name duplication in namespaces
|
||||
|
||||
v 7.8.3
|
||||
- Bump version of gitlab_git fixing annotated tags without message
|
||||
|
||||
v 7.8.2
|
||||
- Fix service migration issue when upgrading from versions prior to 7.3
|
||||
- Fix setting of the default use project limit via admin UI
|
||||
- Fix showing of already imported projects for GitLab and Gitorious importers
|
||||
- Fix response of push to repository to return "Not found" if user doesn't have access
|
||||
- Fix check if user is allowed to view the file attachment
|
||||
- Fix import check for case sensetive namespaces
|
||||
- Increase timeout for Git-over-HTTP requests to 1 hour since large pulls/pushes can take a long time.
|
||||
- Properly handle autosave local storage exceptions.
|
||||
- Escape wildcards when searching LDAP by username.
|
||||
|
||||
v 7.8.1
|
||||
- Fix run of custom post receive hooks
|
||||
- Fix migration that caused issues when upgrading to version 7.8 from versions prior to 7.3
|
||||
- Fix the warning for LDAP users about need to set password
|
||||
- Fix avatars which were not shown for non logged in users
|
||||
- Fix urls for the issues when relative url was enabled
|
||||
|
||||
v 7.8.0
|
||||
- Fix access control and protection against XSS for note attachments and other uploads.
|
||||
- Replace highlight.js with rouge-fork rugments (Stefan Tatschner)
|
||||
- Make project search case insensitive (Hannes Rosenögger)
|
||||
- Include issue/mr participants in list of recipients for reassign/close/reopen emails
|
||||
- Expose description in groups API
|
||||
- Better UI for project services page
|
||||
- Cleaner UI for web editor
|
||||
- Add diff syntax highlighting in email-on-push service notifications (Hannes Rosenögger)
|
||||
- Add API endpoint to fetch all changes on a MergeRequest (Jeroen van Baarsen)
|
||||
- View note image attachments in new tab when clicked instead of downloading them
|
||||
- Improve sorting logic in UI and API. Explicitly define what sorting method is used by default
|
||||
- Fix overflow at sidebar when have several items
|
||||
- Add notes for label changes in issue and merge requests
|
||||
- Show tags in commit view (Hannes Rosenögger)
|
||||
- Only count a user's vote once on a merge request or issue (Michael Clarke)
|
||||
- Increase font size when browse source files and diffs
|
||||
- Service Templates now let you set default values for all services
|
||||
- Create new file in empty repository using GitLab UI
|
||||
- Ability to clone project using oauth2 token
|
||||
- Upgrade Sidekiq gem to version 3.3.0
|
||||
- Stop git zombie creation during force push check
|
||||
- Show success/error messages for test setting button in services
|
||||
- Added Rubocop for code style checks
|
||||
- Fix commits pagination
|
||||
- Async load a branch information at the commit page
|
||||
- Disable blacklist validation for project names
|
||||
- Allow configuring protection of the default branch upon first push (Marco Wessel)
|
||||
- Add gitlab.com importer
|
||||
- Add an ability to login with gitlab.com
|
||||
- Add a commit calendar to the user profile (Hannes Rosenögger)
|
||||
- Submit comment on command-enter
|
||||
- Notify all members of a group when that group is mentioned in a comment, for example: `@gitlab-org` or `@sales`.
|
||||
- Extend issue clossing pattern to include "Resolve", "Resolves", "Resolved", "Resolving" and "Close" (Julien Bianchi and Hannes Rosenögger)
|
||||
- Fix long broadcast message cut-off on left sidebar (Visay Keo)
|
||||
- Add Project Avatars (Steven Thonus and Hannes Rosenögger)
|
||||
- Password reset token validity increased from 2 hours to 2 days since it is also send on account creation.
|
||||
- Edit group members via API
|
||||
- Enable raw image paste from clipboard, currently Chrome only (Marco Cyriacks)
|
||||
- Add action property to merge request hook (Julien Bianchi)
|
||||
- Remove duplicates from group milestone participants list.
|
||||
- Add a new API function that retrieves all issues assigned to a single milestone (Justin Whear and Hannes Rosenögger)
|
||||
- API: Access groups with their path (Julien Bianchi)
|
||||
- Added link to milestone and keeping resource context on smaller viewports for issues and merge requests (Jason Blanchard)
|
||||
- Allow notification email to be set separately from primary email.
|
||||
- API: Add support for editing an existing project (Mika Mäenpää and Hannes Rosenögger)
|
||||
- Don't have Markdown preview fail for long comments/wiki pages.
|
||||
- When test web hook - show error message instead of 500 error page if connection to hook url was reset
|
||||
- Added support for firing system hooks on group create/destroy and adding/removing users to group (Boyan Tabakov)
|
||||
- Added persistent collapse button for left side nav bar (Jason Blanchard)
|
||||
- Prevent losing unsaved comments by automatically restoring them when comment page is loaded again.
|
||||
- Don't allow page to be scaled on mobile.
|
||||
- Clean the username acquired from OAuth/LDAP so it doesn't fail username validation and block signing up.
|
||||
- Show assignees in merge request index page (Kelvin Mutuma)
|
||||
- Link head panel titles to relevant root page.
|
||||
- Allow users that signed up via OAuth to set their password in order to use Git over HTTP(S).
|
||||
- Show users button to share their newly created public or internal projects on twitter
|
||||
- Add quick help links to the GitLab pricing and feature comparison pages.
|
||||
- Fix duplicate authorized applications in user profile and incorrect application client count in admin area.
|
||||
- Make sure Markdown previews always use the same styling as the eventual destination.
|
||||
- Remove deprecated Group#owner_id from API
|
||||
- Show projects user contributed to on user page. Show stars near project on user page.
|
||||
- Improve database performance for GitLab
|
||||
- Add Asana service (Jeremy Benoist)
|
||||
- Improve project web hooks with extra data
|
||||
|
||||
v 7.7.2
|
||||
- Update GitLab Shell to version 2.4.2 that fixes a bug when developers can push to protected branch
|
||||
- Fix issue when LDAP user can't login with existing GitLab account
|
||||
|
||||
v 7.7.1
|
||||
- Improve mention autocomplete performance
|
||||
- Show setup instructions for GitHub import if disabled
|
||||
- Allow use http for OAuth applications
|
||||
|
||||
v 7.7.0
|
||||
- Import from GitHub.com feature
|
||||
- Add Jetbrains Teamcity CI service (Jason Lippert)
|
||||
- Mention notification level
|
||||
- Markdown preview in wiki (Yuriy Glukhov)
|
||||
- Raise group avatar filesize limit to 200kb
|
||||
- OAuth applications feature
|
||||
- Show user SSH keys in admin area
|
||||
- Developer can push to protected branches option
|
||||
- Set project path instead of project name in create form
|
||||
- Block Git HTTP access after 10 failed authentication attempts
|
||||
- Updates to the messages returned by API (sponsored by O'Reilly Media)
|
||||
- New UI layout with side navigation
|
||||
- Add alert message in case of outdated browser (IE < 10)
|
||||
- Added API support for sorting projects
|
||||
- Update gitlab_git to version 7.0.0.rc14
|
||||
- Add API project search filter option for authorized projects
|
||||
- Fix File blame not respecting branch selection
|
||||
- Change some of application settings on fly in admin area UI
|
||||
- Redesign signin/signup pages
|
||||
- Close standard input in Gitlab::Popen.popen
|
||||
- Trigger GitLab CI when push tags
|
||||
- When accept merge request - do merge using sidaekiq job
|
||||
- Enable web signups by default
|
||||
- Fixes for diff comments: drag-n-drop images, selecting images
|
||||
- Fixes for edit comments: drag-n-drop images, preview mode, selecting images, save & update
|
||||
- Remove password strength indicator
|
||||
|
||||
|
||||
|
||||
v 7.6.0
|
||||
- Fork repository to groups
|
||||
- New rugged version
|
||||
- Add CRON=1 backup setting for quiet backups
|
||||
- Fix failing wiki restore
|
||||
- Add optional Sidekiq MemoryKiller middleware (enabled via SIDEKIQ_MAX_RSS env variable)
|
||||
- Monokai highlighting style now more faithful to original design (Mark Riedesel)
|
||||
- Create project with repository in synchrony
|
||||
- Added ability to create empty repo or import existing one if project does not have repository
|
||||
- Reactivate highlight.js language autodetection
|
||||
- Mobile UI improvements
|
||||
- Change maximum avatar file size from 100KB to 200KB
|
||||
- Strict validation for snippet file names
|
||||
- Enable Markdown preview for issues, merge requests, milestones, and notes (Vinnie Okada)
|
||||
- In the docker directory is a container template based on the Omnibus packages.
|
||||
- Update Sidekiq to version 2.17.8
|
||||
- Add author filter to project issues and merge requests pages
|
||||
- Atom feed for user activity
|
||||
- Support multiple omniauth providers for the same user
|
||||
- Rendering cross reference in issue title and tooltip for merge request
|
||||
- Show username in comments
|
||||
- Possibility to create Milestones or Labels when Issues are disabled
|
||||
- Fix bug with showing gpg signature in tag
|
||||
|
||||
v 7.5.3
|
||||
- Bump gitlab_git to 7.0.0.rc12 (includes Rugged 0.21.2)
|
||||
|
||||
v 7.5.2
|
||||
- Don't log Sidekiq arguments by default
|
||||
- Fix restore of wiki repositories from backups
|
||||
|
||||
v 7.5.1
|
||||
- Add missing timestamps to 'members' table
|
||||
|
||||
v 7.5.0
|
||||
- API: Add support for Hipchat (Kevin Houdebert)
|
||||
- Add time zone configuration in gitlab.yml (Sullivan Senechal)
|
||||
- Fix LDAP authentication for Git HTTP access
|
||||
- Run 'GC.start' after every EmailsOnPushWorker job
|
||||
- Fix LDAP config lookup for provider 'ldap'
|
||||
- Drop all sequences during Postgres database restore
|
||||
- Project title links to project homepage (Ben Bodenmiller)
|
||||
- Add Atlassian Bamboo CI service (Drew Blessing)
|
||||
- Mentioned @user will receive email even if he is not participating in issue or commit
|
||||
- Session API: Use case-insensitive authentication like in UI (Andrey Krivko)
|
||||
- Tie up loose ends with annotated tags: API & UI (Sean Edge)
|
||||
- Return valid json for deleting branch via API (sponsored by O'Reilly Media)
|
||||
- Expose username in project events API (sponsored by O'Reilly Media)
|
||||
- Adds comments to commits in the API
|
||||
- Performance improvements
|
||||
- Fix post-receive issue for projects with deleted forks
|
||||
- New gitlab-shell version with custom hooks support
|
||||
- Improve code
|
||||
- GitLab CI 5.2+ support (does not support older versions)
|
||||
- Fixed bug when you can not push commits starting with 000000 to protected branches
|
||||
- Added a password strength indicator
|
||||
- Change project name and path in one form
|
||||
- Display renamed files in diff views (Vinnie Okada)
|
||||
- Fix raw view for public snippets
|
||||
- Use secret token with GitLab internal API.
|
||||
- Add missing timestamps to 'members' table
|
||||
|
||||
v 7.4.3
|
||||
- Fix raw snippets view
|
||||
- Fix security issue for member api
|
||||
- Fix buildbox integration
|
||||
|
||||
v 7.4.2
|
||||
- Fix internal snippet exposing for unauthenticated users
|
||||
|
||||
v 7.4.1
|
||||
- Fix LDAP authentication for Git HTTP access
|
||||
- Fix LDAP config lookup for provider 'ldap'
|
||||
- Fix public snippets
|
||||
- Fix 500 error on projects with nested submodules
|
||||
|
||||
v 7.4.0
|
||||
- Refactored membership logic
|
||||
- Improve error reporting on users API (Julien Bianchi)
|
||||
- Refactor test coverage tools usage. Use SIMPLECOV=true to generate it locally
|
||||
- Default branch is protected by default
|
||||
- Increase unicorn timeout to 60 seconds
|
||||
- Sort search autocomplete projects by stars count so most popular go first
|
||||
- Add README to tab on project show page
|
||||
- Do not delete tmp/repositories itself during clean-up, only its contents
|
||||
- Support for backup uploads to remote storage
|
||||
- Prevent notes polling when there are not notes
|
||||
- Internal ForkService: Prepare support for fork to a given namespace
|
||||
- API: Add support for forking a project via the API (Bernhard Kaindl)
|
||||
- API: filter project issues by milestone (Julien Bianchi)
|
||||
- Fail harder in the backup script
|
||||
- Changes to Slack service structure, only webhook url needed
|
||||
- Zen mode for wiki and milestones (Robert Schilling)
|
||||
- Move Emoji parsing to html-pipeline-gitlab (Robert Schilling)
|
||||
- Font Awesome 4.2 integration (Sullivan Senechal)
|
||||
- Add Pushover service integration (Sullivan Senechal)
|
||||
- Add select field type for services options (Sullivan Senechal)
|
||||
- Add cross-project references to the Markdown parser (Vinnie Okada)
|
||||
- Add task lists to issue and merge request descriptions (Vinnie Okada)
|
||||
- Snippets can be public, internal or private
|
||||
- Improve danger zone: ask project path to confirm data-loss action
|
||||
- Raise exception on forgery
|
||||
- Show build coverage in Merge Requests (requires GitLab CI v5.1)
|
||||
- New milestone and label links on issue edit form
|
||||
- Improved repository graphs
|
||||
- Improve event note display in dashboard and project activity views (Vinnie Okada)
|
||||
- Add users sorting to admin area
|
||||
- UI improvements
|
||||
- Fix ambiguous sha problem with mentioned commit
|
||||
- Fixed bug with apostrophe when at mentioning users
|
||||
- Add active directory ldap option
|
||||
- Developers can push to wiki repo. Protected branches does not affect wiki repo any more
|
||||
- Faster rev list
|
||||
- Fix branch removal
|
||||
|
||||
v 7.3.2
|
||||
- Fix creating new file via web editor
|
||||
- Use gitlab-shell v2.0.1
|
||||
|
||||
v 7.3.1
|
||||
- Fix ref parsing in Gitlab::GitAccess
|
||||
- Fix error 500 when viewing diff on a file with changed permissions
|
||||
- Fix adding comments to MR when source branch is master
|
||||
- Fix error 500 when searching description contains relative link
|
||||
|
||||
v 7.3.0
|
||||
- Always set the 'origin' remote in satellite actions
|
||||
- Write authorized_keys in tmp/ during tests
|
||||
- Use sockets to connect to Redis
|
||||
- Add dormant New Relic gem (can be enabled via environment variables)
|
||||
- Expire Rack sessions after 1 week
|
||||
- Cleaner signin/signup pages
|
||||
- Improved comments UI
|
||||
- Better search with filtering, pagination etc
|
||||
- Added a checkbox to toggle line wrapping in diff (Yuriy Glukhov)
|
||||
- Prevent project stars duplication when fork project
|
||||
- Use the default Unicorn socket backlog value of 1024
|
||||
- Support Unix domain sockets for Redis
|
||||
- Store session Redis keys in 'session:gitlab:' namespace
|
||||
- Deprecate LDAP account takeover based on partial LDAP email / GitLab username match
|
||||
- Use /bin/sh instead of Bash in bin/web, bin/background_jobs (Pavel Novitskiy)
|
||||
- Keyboard shortcuts for productivity (Robert Schilling)
|
||||
- API: filter issues by state (Julien Bianchi)
|
||||
- API: filter issues by labels (Julien Bianchi)
|
||||
- Add system hook for ssh key changes
|
||||
- Add blob permalink link (Ciro Santilli)
|
||||
- Create annotated tags through UI and API (Sean Edge)
|
||||
- Snippets search (Charles Bushong)
|
||||
- Comment new push to existing MR
|
||||
- Add 'ci' to the blacklist of forbidden names
|
||||
- Improve text filtering on issues page
|
||||
- Comment & Close button
|
||||
- Process git push --all much faster
|
||||
- Don't allow edit of system notes
|
||||
- Project wiki search (Ralf Seidler)
|
||||
- Enabled Shibboleth authentication support (Matus Banas)
|
||||
- Zen mode (fullscreen) for issues/MR/notes (Robert Schilling)
|
||||
- Add ability to configure webhook timeout via gitlab.yml (Wes Gurney)
|
||||
- Sort project merge requests in asc or desc order for updated_at or created_at field (sponsored by O'Reilly Media)
|
||||
- Add Redis socket support to 'rake gitlab:shell:install'
|
||||
|
||||
v 7.2.1
|
||||
- Delete orphaned labels during label migration (James Brooks)
|
||||
- Security: prevent XSS with stricter MIME types for raw repo files
|
||||
|
|
|
@ -10,7 +10,7 @@ By submitting code as an individual you agree to the [individual contributor lic
|
|||
|
||||
## Security vulnerability disclosure
|
||||
|
||||
Please report suspected security vulnerabilities in private to support@gitlab.com, also see the [disclosure section on the GitLab.com website](http://www.gitlab.com/disclosure/). Please do NOT create publicly viewable issues for suspected security vulnerabilities.
|
||||
Please report suspected security vulnerabilities in private to support@gitlab.com, also see the [disclosure section on the GitLab.com website](http://about.gitlab.com/disclosure/). Please do NOT create publicly viewable issues for suspected security vulnerabilities.
|
||||
|
||||
## Closing policy for issues and merge requests
|
||||
|
||||
|
@ -20,9 +20,16 @@ Please treat our volunteers with courtesy and respect, it will go a long way tow
|
|||
|
||||
Issues and merge requests should be in English and contain appropriate language for audiences of all ages.
|
||||
|
||||
## Helping others
|
||||
|
||||
Please help other GitLab users when you can.
|
||||
The channnels people will reach out on can be found on the [getting help page](https://about.gitlab.com/getting-help/).
|
||||
Sign up for the mailinglist, answer GitLab questions on StackOverflow or respond in the irc channel.
|
||||
You can also sign up on [CodeTriage](http://www.codetriage.com/gitlabhq/gitlabhq) to help with one issue every day.
|
||||
|
||||
## Issue tracker
|
||||
|
||||
To get support for your particular problem please use the channels as detailed in the [getting help section of the readme](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md#getting-help). Professional [support subscriptions](http://www.gitlab.com/subscription/) and [consulting services](http://www.gitlab.com/consultancy/) are available from [GitLab.com](http://www.gitlab.com/).
|
||||
To get support for your particular problem please use the channels as detailed in the [getting help section of the readme](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md#getting-help). Professional [support subscriptions](http://about.gitlab.com/subscription/) and [consulting services](http://about.gitlab.com/consultancy/) are available from [GitLab.com](http://about.gitlab.com/).
|
||||
|
||||
The [issue tracker](https://gitlab.com/gitlab-org/gitlab-ce/issues) is only for obvious errors in the latest [stable or development release of GitLab](MAINTENANCE.md). If something is wrong but it is not a regression compared to older versions of GitLab please do not open an issue but a feature request. When submitting an issue please conform to the issue submission guidelines listed below. Not all issues will be addressed and your issue is more likely to be addressed if you submit a merge request which partially or fully addresses the issue.
|
||||
|
||||
|
@ -37,14 +44,14 @@ Please send a merge request with a tested solution or a merge request with a fai
|
|||
**[Search the issues](https://gitlab.com/gitlab-org/gitlab-ce/issues)** for similar entries before submitting your own, there's a good chance somebody else had the same issue. Show your support with `:+1:` and/or join the discussion. Please submit issues in the following format (as the first post):
|
||||
|
||||
1. **Summary:** Summarize your issue in one sentence (what goes wrong, what did you expect to happen)
|
||||
1. **Steps to reproduce:** How can we reproduce the issue, preferably on the [GitLab development virtual machine with vagrant](https://gitlab.com/gitlab-org/cookbook-gitlab/blob/master/doc/development.md) (start your issue with: `vagrant destroy && vagrant up && vagrant ssh`)
|
||||
1. **Steps to reproduce:** How can we reproduce the issue
|
||||
1. **Expected behavior:** Describe your issue in detail
|
||||
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 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)
|
||||
* Add the last commit SHA-1 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`)
|
||||
1. **Possible fixes**: If you can, link to the line of code that might be responsible for the problem
|
||||
|
||||
|
@ -54,14 +61,19 @@ We welcome merge requests with fixes and improvements to GitLab code, tests, and
|
|||
|
||||
Merge requests can be filed either at [gitlab.com](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests) or [github.com](https://github.com/gitlabhq/gitlabhq/pulls).
|
||||
|
||||
If you are new to GitLab development (or web development in general), search for the label `easyfix` ([gitlab.com](https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name=easyfix), [github](https://github.com/gitlabhq/gitlabhq/labels/easyfix)). Those are issues easy to fix, marked by the GitLab core-team. If you are unsure how to proceed but want to help, mention one of the core-team members to give you a hint.
|
||||
|
||||
To start with GitLab download the [GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit) and see [Development section](doc/development/README.md) in the help file.
|
||||
|
||||
### Merge request guidelines
|
||||
|
||||
If you can, please submit a merge request with the fix or improvements including tests. If you don't know how to fix the issue but can write a test that exposes the issue we will accept that as well. In general bug fixes that include a regression test are merged quickly while new features without proper tests are least likely to receive timely feedback. The workflow to make a merge request is as follows:
|
||||
|
||||
1. Fork the project on GitLab Cloud
|
||||
1. Create a feature branch
|
||||
1. Write [tests](README.md#run-the-tests) and code
|
||||
1. Write [tests](https://gitlab.com/gitlab-org/gitlab-development-kit#running-the-tests) and code
|
||||
1. Add your changes to the [CHANGELOG](CHANGELOG)
|
||||
1. If you are changing the README, some documentation or other things which have no effect on the tests, add `[ci skip]` somewhere in the commit message
|
||||
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
|
||||
|
@ -72,34 +84,69 @@ If you can, please submit a merge request with the fix or improvements including
|
|||
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 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).
|
||||
1. Also have a look at the [shell command guidelines](doc/development/shell_commands.md) if your code reads or opens files, or handles paths to files on disk.
|
||||
|
||||
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? 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.
|
||||
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 minimal 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). 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.
|
||||
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 contribution acceptance criteria.
|
||||
|
||||
**Please format your merge request description as follows:**
|
||||
## Definition of done
|
||||
|
||||
If you contribute to GitLab please know that changes involve more than just code.
|
||||
We have the following [definition of done](http://guide.agilealliance.org/guide/definition-of-done.html).
|
||||
Please ensure you support the feature you contribute through all of these steps.
|
||||
|
||||
1. Description explaning the relevancy (see following item)
|
||||
1. Working and clean code that is commented where needed
|
||||
1. Unit and integration tests that pass on the CI server
|
||||
1. Documented in the /doc directory
|
||||
1. Changelog entry added
|
||||
1. Reviewed and any concerns are addressed
|
||||
1. Merged by the project lead
|
||||
1. Added to the release blog article
|
||||
1. Added to [the website](https://gitlab.com/gitlab-com/www-gitlab-com/) if relevant
|
||||
1. Community questions answered
|
||||
1. Answers to questions radiated (in docs/wiki/etc.)
|
||||
|
||||
If you add a dependency in GitLab (such as an operating system package) please consider updating the following and note the applicability of each in your merge request:
|
||||
|
||||
1. Note the addition in the release blog post (create one if it doesn't exist yet) https://gitlab.com/gitlab-com/www-gitlab-com/merge_requests/
|
||||
1. Upgrade guide, for example https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/7.5-to-7.6.md
|
||||
1. Upgrader https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/upgrader.md#2-run-gitlab-upgrade-tool
|
||||
1. Installation guide https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md#1-packages-dependencies
|
||||
1. GitLab Development Kit https://gitlab.com/gitlab-org/gitlab-development-kit
|
||||
1. Test suite https://gitlab.com/gitlab-org/gitlab-ci/blob/master/doc/examples/configure_a_runner_to_run_the_gitlab_ce_test_suite.md
|
||||
1. Omnibus package creator https://gitlab.com/gitlab-org/omnibus-gitlab
|
||||
|
||||
## Merge request description format
|
||||
|
||||
1. What does this MR do?
|
||||
1. Are there points in the code the reviewer needs to double check?
|
||||
1. Why was this MR needed?
|
||||
1. What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)?
|
||||
1. Screenshots (If appropiate)
|
||||
1. Screenshots (if relevant)
|
||||
|
||||
## Contribution acceptance criteria
|
||||
|
||||
1. The change is as small as possible (see the above paragraph for details)
|
||||
1. Include proper tests and make all tests pass (unless it contains a test exposing a bug in existing code)
|
||||
1. Can merge without problems (if not please use: `git rebase master`)
|
||||
1. All tests have to pass, if you suspect a failing CI build is unrelated to your contribution ask for tests to be restarted. See [the CI setup document](http://doc.gitlab.com/ce/development/ci_setup.html) on who you can ask for test restart.
|
||||
1. Initially contains a single commit (please use `git rebase -i` to squash commits)
|
||||
1. Can merge without problems (if not please merge `master`, never rebase commits pushed to the remote server)
|
||||
1. Does not break any existing functionality
|
||||
1. Fixes one specific issue or implements one specific feature (do not combine things, send separate merge requests if needed)
|
||||
1. Migrations should do only one thing (eg: either create a table, move data to a new table or remove an old table) to aid retrying on failure
|
||||
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. 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
|
||||
1. It conforms to the following style guides.
|
||||
If your change touches a line that does not follow the style,
|
||||
modify the entire line to follow it. This prevents linting tools from generating warnings.
|
||||
Don't touch neighbouring lines. As an exception, automatic mass refactoring modifications
|
||||
may leave style non-compliant.
|
||||
|
||||
## Style guides
|
||||
|
||||
|
@ -113,5 +160,20 @@ For examples of feedback on merge requests please look at already [closed merge
|
|||
1. [CoffeeScript](https://github.com/thoughtbot/guides/tree/master/style#coffeescript)
|
||||
1. [Shell commands](doc/development/shell_commands.md) created by GitLab contributors to enhance security
|
||||
1. [Markdown](http://www.cirosantilli.com/markdown-styleguide)
|
||||
1. Interface text should be written subjectively instead of objectively. It should be the gitlab core team addressing a person. It should be written in present time and never use past tense (has been/was). For example instead of "prohibited this user from being saved due to the following errors:" the text should be "sorry, we could not create your account because:". Also these [excellent writing guidelines](https://github.com/NARKOZ/guides#writing).
|
||||
|
||||
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).
|
||||
|
||||
## Code of conduct
|
||||
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
||||
|
||||
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
||||
|
||||
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior can be
|
||||
reported by emailing contact@gitlab.com
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
||||
|
|
|
@ -1 +1 @@
|
|||
1.9.7
|
||||
2.6.2
|
||||
|
|
79
Gemfile
|
@ -27,22 +27,31 @@ gem 'omniauth', "~> 1.1.3"
|
|||
gem 'omniauth-google-oauth2'
|
||||
gem 'omniauth-twitter'
|
||||
gem 'omniauth-github'
|
||||
gem 'omniauth-shibboleth'
|
||||
gem 'omniauth-kerberos'
|
||||
gem 'omniauth-gitlab'
|
||||
gem 'omniauth-bitbucket'
|
||||
gem 'doorkeeper', '2.1.3'
|
||||
gem "rack-oauth2", "~> 1.0.5"
|
||||
|
||||
# Browser detection
|
||||
gem "browser"
|
||||
|
||||
# Extracting information from a git repository
|
||||
# Provide access to Gitlab::Git library
|
||||
gem "gitlab_git", '~> 6.0'
|
||||
gem "gitlab_git", '~> 7.1.10'
|
||||
|
||||
# Ruby/Rack Git Smart-HTTP Server Handler
|
||||
gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack'
|
||||
gem 'gitlab-grack', '~> 2.0.2', require: 'grack'
|
||||
|
||||
# LDAP Auth
|
||||
gem 'gitlab_omniauth-ldap', '1.0.4', require: "omniauth-ldap"
|
||||
gem 'gitlab_omniauth-ldap', '1.2.1', require: "omniauth-ldap"
|
||||
|
||||
# Git Wiki
|
||||
gem 'gollum-lib', '~> 3.0.0'
|
||||
gem 'gollum-lib', '~> 4.0.2'
|
||||
|
||||
# Language detection
|
||||
gem "gitlab-linguist", "~> 3.0.0", require: "linguist"
|
||||
gem "gitlab-linguist", "~> 3.0.1", require: "linguist"
|
||||
|
||||
# API
|
||||
gem "grape", "~> 0.6.1"
|
||||
|
@ -69,8 +78,8 @@ gem "carrierwave"
|
|||
gem 'dropzonejs-rails'
|
||||
|
||||
# for aws storage
|
||||
gem "fog", "~> 1.14", group: :aws
|
||||
gem "unf", group: :aws
|
||||
gem "fog", "~> 1.14"
|
||||
gem "unf"
|
||||
|
||||
# Authorization
|
||||
gem "six"
|
||||
|
@ -78,14 +87,17 @@ gem "six"
|
|||
# Seed data
|
||||
gem "seed-fu"
|
||||
|
||||
# Markup pipeline for GitLab
|
||||
gem 'html-pipeline-gitlab', '~> 0.1'
|
||||
|
||||
# Markdown to HTML
|
||||
gem "github-markup"
|
||||
|
||||
# Required markup gems by github-markdown
|
||||
gem 'redcarpet', '~> 2.2.2'
|
||||
gem 'redcarpet', '~> 3.2.3'
|
||||
gem 'RedCloth'
|
||||
gem 'rdoc', '~>3.6'
|
||||
gem 'org-ruby'
|
||||
gem 'org-ruby', '= 0.9.12'
|
||||
gem 'creole', '~>0.3.6'
|
||||
gem 'wikicloth', '=0.8.1'
|
||||
gem 'asciidoctor', '= 0.1.4'
|
||||
|
@ -103,12 +115,13 @@ end
|
|||
gem "state_machine"
|
||||
|
||||
# Issue tags
|
||||
gem "acts-as-taggable-on"
|
||||
gem 'acts-as-taggable-on', '~> 3.4'
|
||||
|
||||
# Background jobs
|
||||
gem 'slim'
|
||||
gem 'sinatra', require: nil
|
||||
gem 'sidekiq', '2.17.0'
|
||||
gem 'sidekiq', '~> 3.3'
|
||||
gem 'sidetiq', '0.6.3'
|
||||
|
||||
# HTTP requests
|
||||
gem "httparty"
|
||||
|
@ -130,7 +143,7 @@ gem "redis-rails"
|
|||
gem 'tinder', '~> 1.9.2'
|
||||
|
||||
# HipChat integration
|
||||
gem "hipchat", "~> 0.14.0"
|
||||
gem "hipchat", "~> 1.4.0"
|
||||
|
||||
# Flowdock integration
|
||||
gem "gitlab-flowdock-git-hook", "~> 0.4.2"
|
||||
|
@ -139,11 +152,17 @@ gem "gitlab-flowdock-git-hook", "~> 0.4.2"
|
|||
gem "gemnasium-gitlab-service", "~> 0.2"
|
||||
|
||||
# Slack integration
|
||||
gem "slack-notifier", "~> 0.3.2"
|
||||
gem "slack-notifier", "~> 1.0.0"
|
||||
|
||||
# Asana integration
|
||||
gem 'asana', '~> 0.0.6'
|
||||
|
||||
# d3
|
||||
gem "d3_rails", "~> 3.1.4"
|
||||
|
||||
#cal-heatmap
|
||||
gem "cal-heatmap-rails", "~> 0.0.1"
|
||||
|
||||
# underscore-rails
|
||||
gem "underscore-rails", "~> 1.4.4"
|
||||
|
||||
|
@ -156,13 +175,15 @@ gem "rack-attack"
|
|||
# Ace editor
|
||||
gem 'ace-rails-ap'
|
||||
|
||||
# Semantic UI Sass for Sidebar
|
||||
gem 'semantic-ui-sass', '~> 0.16.1.0'
|
||||
# Keyboard shortcuts
|
||||
gem 'mousetrap-rails'
|
||||
|
||||
# Detect and convert string character encoding
|
||||
gem 'charlock_holmes'
|
||||
|
||||
gem "sass-rails", '~> 4.0.2'
|
||||
gem "coffee-rails"
|
||||
gem "uglifier"
|
||||
gem "therubyracer"
|
||||
gem 'turbolinks'
|
||||
gem 'jquery-turbolinks'
|
||||
|
||||
|
@ -173,14 +194,16 @@ gem "jquery-ui-rails"
|
|||
gem "jquery-scrollto-rails"
|
||||
gem "raphael-rails", "~> 2.1.2"
|
||||
gem 'bootstrap-sass', '~> 3.0'
|
||||
gem "font-awesome-rails", '~> 3.2'
|
||||
gem "gitlab_emoji", "~> 0.0.1.1"
|
||||
gem "font-awesome-rails", '~> 4.2'
|
||||
gem "gitlab_emoji", "~> 0.1"
|
||||
gem "gon", '~> 5.0.0'
|
||||
gem 'nprogress-rails'
|
||||
gem 'request_store'
|
||||
gem "virtus"
|
||||
gem 'addressable'
|
||||
|
||||
group :development do
|
||||
gem 'brakeman', require: false
|
||||
gem "annotate", "~> 2.6.0.beta2"
|
||||
gem "letter_opener"
|
||||
gem 'quiet_assets', '~> 1.0.1'
|
||||
|
@ -190,8 +213,6 @@ group :development do
|
|||
gem 'better_errors'
|
||||
gem 'binding_of_caller'
|
||||
|
||||
gem 'rails_best_practices'
|
||||
|
||||
# Docs generator
|
||||
gem "sdoc"
|
||||
|
||||
|
@ -201,11 +222,12 @@ end
|
|||
|
||||
group :development, :test do
|
||||
gem 'coveralls', require: false
|
||||
gem 'rubocop', '0.28.0', require: false
|
||||
# gem 'rails-dev-tweaks'
|
||||
gem 'spinach-rails'
|
||||
gem "rspec-rails"
|
||||
gem "rspec-rails", '2.99'
|
||||
gem "capybara", '~> 2.2.1'
|
||||
gem "pry"
|
||||
gem "pry-rails"
|
||||
gem "awesome_print"
|
||||
gem "database_cleaner"
|
||||
gem "launchy"
|
||||
|
@ -231,14 +253,16 @@ group :development, :test do
|
|||
|
||||
gem 'jasmine', '2.0.2'
|
||||
|
||||
gem "spring", '1.1.1'
|
||||
gem "spring-commands-rspec", '1.0.1'
|
||||
gem "spring", '~> 1.3.1'
|
||||
gem "spring-commands-rspec", '1.0.4'
|
||||
gem "spring-commands-spinach", '1.0.0'
|
||||
|
||||
gem "byebug"
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem "simplecov", require: false
|
||||
gem "shoulda-matchers", "~> 2.1.0"
|
||||
gem "shoulda-matchers", "~> 2.7.0"
|
||||
gem 'email_spec'
|
||||
gem "webmock"
|
||||
gem 'test_after_commit'
|
||||
|
@ -247,3 +271,8 @@ end
|
|||
group :production do
|
||||
gem "gitlab_meta", '7.0'
|
||||
end
|
||||
|
||||
gem "newrelic_rpm"
|
||||
|
||||
gem 'octokit', '3.7.0'
|
||||
gem "rugments"
|
||||
|
|
407
Gemfile.lock
|
@ -3,40 +3,53 @@ GEM
|
|||
specs:
|
||||
RedCloth (4.2.9)
|
||||
ace-rails-ap (2.0.1)
|
||||
actionmailer (4.1.1)
|
||||
actionpack (= 4.1.1)
|
||||
actionview (= 4.1.1)
|
||||
mail (~> 2.5.4)
|
||||
actionpack (4.1.1)
|
||||
actionview (= 4.1.1)
|
||||
activesupport (= 4.1.1)
|
||||
actionmailer (4.1.9)
|
||||
actionpack (= 4.1.9)
|
||||
actionview (= 4.1.9)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
actionpack (4.1.9)
|
||||
actionview (= 4.1.9)
|
||||
activesupport (= 4.1.9)
|
||||
rack (~> 1.5.2)
|
||||
rack-test (~> 0.6.2)
|
||||
actionview (4.1.1)
|
||||
activesupport (= 4.1.1)
|
||||
actionview (4.1.9)
|
||||
activesupport (= 4.1.9)
|
||||
builder (~> 3.1)
|
||||
erubis (~> 2.7.0)
|
||||
activemodel (4.1.1)
|
||||
activesupport (= 4.1.1)
|
||||
activemodel (4.1.9)
|
||||
activesupport (= 4.1.9)
|
||||
builder (~> 3.1)
|
||||
activerecord (4.1.1)
|
||||
activemodel (= 4.1.1)
|
||||
activesupport (= 4.1.1)
|
||||
activerecord (4.1.9)
|
||||
activemodel (= 4.1.9)
|
||||
activesupport (= 4.1.9)
|
||||
arel (~> 5.0.0)
|
||||
activesupport (4.1.1)
|
||||
activeresource (4.0.0)
|
||||
activemodel (~> 4.0)
|
||||
activesupport (~> 4.0)
|
||||
rails-observers (~> 0.1.1)
|
||||
activesupport (4.1.9)
|
||||
i18n (~> 0.6, >= 0.6.9)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.1)
|
||||
tzinfo (~> 1.1)
|
||||
acts-as-taggable-on (2.4.1)
|
||||
rails (>= 3, < 5)
|
||||
acts-as-taggable-on (3.5.0)
|
||||
activerecord (>= 3.2, < 5)
|
||||
addressable (2.3.5)
|
||||
annotate (2.6.0)
|
||||
activerecord (>= 2.3.0)
|
||||
rake (>= 0.8.7)
|
||||
arel (5.0.1.20140414130214)
|
||||
asana (0.0.6)
|
||||
activeresource (>= 3.2.3)
|
||||
asciidoctor (0.1.4)
|
||||
ast (2.0.0)
|
||||
astrolabe (1.3.0)
|
||||
parser (>= 2.2.0.pre.3, < 3.0)
|
||||
attr_required (1.0.0)
|
||||
autoprefixer-rails (5.1.6)
|
||||
execjs
|
||||
json
|
||||
awesome_print (1.2.0)
|
||||
axiom-types (0.0.5)
|
||||
descendants_tracker (~> 0.0.1)
|
||||
|
@ -47,9 +60,25 @@ GEM
|
|||
erubis (>= 2.6.6)
|
||||
binding_of_caller (0.7.2)
|
||||
debug_inspector (>= 0.0.1)
|
||||
bootstrap-sass (3.0.3.0)
|
||||
sass (~> 3.2)
|
||||
bootstrap-sass (3.3.3)
|
||||
autoprefixer-rails (>= 5.0.0.1)
|
||||
sass (>= 3.2.19)
|
||||
brakeman (3.0.1)
|
||||
erubis (~> 2.6)
|
||||
fastercsv (~> 1.5)
|
||||
haml (>= 3.0, < 5.0)
|
||||
highline (~> 1.6.20)
|
||||
multi_json (~> 1.2)
|
||||
ruby2ruby (~> 2.1.1)
|
||||
ruby_parser (~> 3.5.0)
|
||||
sass (~> 3.0)
|
||||
terminal-table (~> 1.4)
|
||||
browser (0.7.2)
|
||||
builder (3.2.2)
|
||||
byebug (3.2.0)
|
||||
columnize (~> 0.8)
|
||||
debugger-linecache (~> 1.2)
|
||||
cal-heatmap-rails (0.0.1)
|
||||
capybara (2.2.1)
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
|
@ -60,12 +89,10 @@ GEM
|
|||
activemodel (>= 3.2.0)
|
||||
activesupport (>= 3.2.0)
|
||||
json (>= 1.7)
|
||||
celluloid (0.15.2)
|
||||
timers (~> 1.1.0)
|
||||
celluloid (0.16.0)
|
||||
timers (~> 4.0.0)
|
||||
charlock_holmes (0.6.9.4)
|
||||
cliver (0.3.2)
|
||||
code_analyzer (0.4.3)
|
||||
sexp_processor
|
||||
coderay (1.1.0)
|
||||
coercible (1.0.0)
|
||||
descendants_tracker (~> 0.0.1)
|
||||
|
@ -78,7 +105,8 @@ GEM
|
|||
coffee-script-source (1.6.3)
|
||||
colored (1.2)
|
||||
colorize (0.5.8)
|
||||
connection_pool (1.2.0)
|
||||
columnize (0.9.0)
|
||||
connection_pool (2.1.0)
|
||||
coveralls (0.7.0)
|
||||
multi_json (~> 1.3)
|
||||
rest-client
|
||||
|
@ -93,6 +121,7 @@ GEM
|
|||
daemons (1.1.9)
|
||||
database_cleaner (1.3.0)
|
||||
debug_inspector (0.0.2)
|
||||
debugger-linecache (1.2.0)
|
||||
default_value_for (3.0.0)
|
||||
activerecord (>= 3.2.0, < 5.0)
|
||||
descendants_tracker (0.0.3)
|
||||
|
@ -106,21 +135,21 @@ GEM
|
|||
devise (~> 3.2)
|
||||
diff-lcs (1.2.5)
|
||||
diffy (3.0.3)
|
||||
docile (1.1.1)
|
||||
docile (1.1.5)
|
||||
doorkeeper (2.1.3)
|
||||
railties (>= 3.2)
|
||||
dotenv (0.9.0)
|
||||
dropzonejs-rails (0.4.14)
|
||||
rails (> 3.1)
|
||||
email_spec (1.5.0)
|
||||
launchy (~> 2.1)
|
||||
mail (~> 2.2)
|
||||
emoji (1.0.1)
|
||||
json
|
||||
enumerize (0.7.0)
|
||||
activesupport (>= 3.2)
|
||||
equalizer (0.0.8)
|
||||
erubis (2.7.0)
|
||||
escape_utils (0.2.4)
|
||||
eventmachine (1.0.3)
|
||||
eventmachine (1.0.4)
|
||||
excon (0.32.1)
|
||||
execjs (2.0.2)
|
||||
expression_parser (0.9.0)
|
||||
|
@ -133,6 +162,7 @@ GEM
|
|||
multipart-post (~> 1.2.0)
|
||||
faraday_middleware (0.9.0)
|
||||
faraday (>= 0.7.4, < 0.9)
|
||||
fastercsv (1.5.5)
|
||||
ffaker (1.22.1)
|
||||
ffi (1.9.3)
|
||||
fog (1.21.0)
|
||||
|
@ -152,50 +182,54 @@ GEM
|
|||
net-ssh (>= 2.1.3)
|
||||
fog-json (1.0.0)
|
||||
multi_json (~> 1.0)
|
||||
font-awesome-rails (3.2.1.3)
|
||||
font-awesome-rails (4.2.0.0)
|
||||
railties (>= 3.2, < 5.0)
|
||||
foreman (0.63.0)
|
||||
dotenv (>= 0.7)
|
||||
thor (>= 0.13.6)
|
||||
formatador (0.2.4)
|
||||
gemnasium-gitlab-service (0.2.2)
|
||||
rugged (~> 0.19)
|
||||
gemnasium-gitlab-service (0.2.6)
|
||||
rugged (~> 0.21)
|
||||
gemojione (2.0.0)
|
||||
json
|
||||
gherkin-ruby (0.3.1)
|
||||
racc
|
||||
github-markup (1.1.0)
|
||||
github-markup (1.3.1)
|
||||
posix-spawn (~> 0.3.8)
|
||||
gitlab-flowdock-git-hook (0.4.2.2)
|
||||
gitlab-grit (>= 2.4.1)
|
||||
multi_json
|
||||
gitlab-grack (2.0.0.pre)
|
||||
gitlab-grack (2.0.2)
|
||||
rack (~> 1.5.1)
|
||||
gitlab-grit (2.6.10)
|
||||
gitlab-grit (2.7.2)
|
||||
charlock_holmes (~> 0.6)
|
||||
diff-lcs (~> 1.1)
|
||||
mime-types (~> 1.15)
|
||||
posix-spawn (~> 0.3)
|
||||
gitlab-linguist (3.0.0)
|
||||
gitlab-linguist (3.0.1)
|
||||
charlock_holmes (~> 0.6.6)
|
||||
escape_utils (~> 0.2.4)
|
||||
mime-types (~> 1.19)
|
||||
gitlab_emoji (0.0.1.1)
|
||||
emoji (~> 1.0.1)
|
||||
gitlab_git (6.2.1)
|
||||
gitlab_emoji (0.1.0)
|
||||
gemojione (~> 2.0)
|
||||
gitlab_git (7.1.10)
|
||||
activesupport (~> 4.0)
|
||||
charlock_holmes (~> 0.6)
|
||||
gitlab-grit (~> 2.6)
|
||||
gitlab-linguist (~> 3.0)
|
||||
rugged (~> 0.21.0)
|
||||
rugged (~> 0.21.2)
|
||||
gitlab_meta (7.0)
|
||||
gitlab_omniauth-ldap (1.0.4)
|
||||
net-ldap (~> 0.3.1)
|
||||
gitlab_omniauth-ldap (1.2.1)
|
||||
net-ldap (~> 0.9)
|
||||
omniauth (~> 1.0)
|
||||
pyu-ruby-sasl (~> 0.0.3.1)
|
||||
rubyntlm (~> 0.1.1)
|
||||
gollum-lib (3.0.0)
|
||||
github-markup (~> 1.1.0)
|
||||
gitlab-grit (~> 2.6.5)
|
||||
nokogiri (~> 1.6.1)
|
||||
rouge (~> 1.3.3)
|
||||
rubyntlm (~> 0.3)
|
||||
gollum-grit_adapter (0.1.3)
|
||||
gitlab-grit (~> 2.7, >= 2.7.1)
|
||||
gollum-lib (4.0.2)
|
||||
github-markup (~> 1.3.1)
|
||||
gollum-grit_adapter (~> 0.1, >= 0.1.1)
|
||||
nokogiri (~> 1.6.4)
|
||||
rouge (~> 1.7.4)
|
||||
sanitize (~> 2.1.0)
|
||||
stringex (~> 2.5.1)
|
||||
gon (5.0.1)
|
||||
|
@ -235,16 +269,28 @@ GEM
|
|||
haml (>= 3.1, < 5.0)
|
||||
railties (>= 4.0.1)
|
||||
hashie (2.1.2)
|
||||
highline (1.6.21)
|
||||
hike (1.2.3)
|
||||
hipchat (0.14.0)
|
||||
httparty
|
||||
hipchat (1.4.0)
|
||||
httparty
|
||||
hitimes (1.2.2)
|
||||
html-pipeline (1.11.0)
|
||||
activesupport (>= 2)
|
||||
nokogiri (~> 1.4)
|
||||
html-pipeline-gitlab (0.2.0)
|
||||
actionpack (~> 4)
|
||||
gitlab_emoji (~> 0.1)
|
||||
html-pipeline (~> 1.11.0)
|
||||
mime-types
|
||||
sanitize (~> 2.1)
|
||||
http_parser.rb (0.5.3)
|
||||
httparty (0.13.0)
|
||||
json (~> 1.8)
|
||||
multi_xml (>= 0.5.2)
|
||||
httpauth (0.2.1)
|
||||
i18n (0.6.11)
|
||||
httpclient (2.5.3.3)
|
||||
i18n (0.7.0)
|
||||
ice_cube (0.11.1)
|
||||
ice_nine (0.10.0)
|
||||
jasmine (2.0.2)
|
||||
jasmine-core (~> 2.0.0)
|
||||
|
@ -263,40 +309,40 @@ GEM
|
|||
turbolinks
|
||||
jquery-ui-rails (4.2.1)
|
||||
railties (>= 3.2.16)
|
||||
json (1.8.1)
|
||||
json (1.8.2)
|
||||
jwt (0.1.13)
|
||||
multi_json (>= 1.5)
|
||||
kaminari (0.15.1)
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
kgio (2.8.1)
|
||||
kgio (2.9.2)
|
||||
launchy (2.4.2)
|
||||
addressable (~> 2.3)
|
||||
letter_opener (1.1.2)
|
||||
launchy (~> 2.2)
|
||||
libv8 (3.16.14.3)
|
||||
listen (2.3.1)
|
||||
celluloid (>= 0.15.2)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
lumberjack (1.0.4)
|
||||
mail (2.5.4)
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
mail (2.6.3)
|
||||
mime-types (>= 1.16, < 3)
|
||||
method_source (0.8.2)
|
||||
mime-types (1.25.1)
|
||||
mini_portile (0.6.0)
|
||||
mini_portile (0.6.1)
|
||||
minitest (5.3.5)
|
||||
mousetrap-rails (1.4.6)
|
||||
multi_json (1.10.1)
|
||||
multi_xml (0.5.5)
|
||||
multipart-post (1.2.0)
|
||||
mysql2 (0.3.16)
|
||||
net-ldap (0.3.1)
|
||||
net-ldap (0.11)
|
||||
net-scp (1.1.2)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (2.8.0)
|
||||
nokogiri (1.6.2.1)
|
||||
mini_portile (= 0.6.0)
|
||||
newrelic_rpm (3.9.4.245)
|
||||
nokogiri (1.6.5)
|
||||
mini_portile (~> 0.6.0)
|
||||
nprogress-rails (0.1.2.3)
|
||||
oauth (0.4.7)
|
||||
oauth2 (0.8.1)
|
||||
|
@ -305,27 +351,45 @@ GEM
|
|||
jwt (~> 0.1.4)
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.2)
|
||||
octokit (3.7.0)
|
||||
sawyer (~> 0.6.0, >= 0.5.3)
|
||||
omniauth (1.1.4)
|
||||
hashie (>= 1.2, < 3)
|
||||
rack
|
||||
omniauth-bitbucket (0.0.2)
|
||||
multi_json (~> 1.7)
|
||||
omniauth (~> 1.1)
|
||||
omniauth-oauth (~> 1.0)
|
||||
omniauth-github (1.1.1)
|
||||
omniauth (~> 1.0)
|
||||
omniauth-oauth2 (~> 1.1)
|
||||
omniauth-gitlab (1.0.0)
|
||||
omniauth (~> 1.0)
|
||||
omniauth-oauth2 (~> 1.0)
|
||||
omniauth-google-oauth2 (0.2.5)
|
||||
omniauth (> 1.0)
|
||||
omniauth-oauth2 (~> 1.1)
|
||||
omniauth-kerberos (0.2.0)
|
||||
omniauth-multipassword
|
||||
timfel-krb5-auth (~> 0.8)
|
||||
omniauth-multipassword (0.4.1)
|
||||
omniauth (~> 1.0)
|
||||
omniauth-oauth (1.0.1)
|
||||
oauth
|
||||
omniauth (~> 1.0)
|
||||
omniauth-oauth2 (1.1.1)
|
||||
oauth2 (~> 0.8.0)
|
||||
omniauth (~> 1.0)
|
||||
omniauth-shibboleth (1.1.1)
|
||||
omniauth (>= 1.0.0)
|
||||
omniauth-twitter (1.0.1)
|
||||
multi_json (~> 1.3)
|
||||
omniauth-oauth (~> 1.0)
|
||||
org-ruby (0.9.8)
|
||||
org-ruby (0.9.12)
|
||||
rubypants (~> 0.2)
|
||||
orm_adapter (0.5.0)
|
||||
parser (2.2.0.2)
|
||||
ast (>= 1.1, < 3.0)
|
||||
pg (0.15.1)
|
||||
phantomjs (1.9.2.0)
|
||||
poltergeist (1.5.1)
|
||||
|
@ -333,12 +397,14 @@ GEM
|
|||
cliver (~> 0.3.1)
|
||||
multi_json (~> 1.0)
|
||||
websocket-driver (>= 0.2.0)
|
||||
polyglot (0.3.4)
|
||||
posix-spawn (0.3.9)
|
||||
powerpack (0.0.9)
|
||||
pry (0.9.12.4)
|
||||
coderay (~> 1.0)
|
||||
method_source (~> 0.8)
|
||||
slop (~> 3.4)
|
||||
pry-rails (0.3.2)
|
||||
pry (>= 0.9.10)
|
||||
pyu-ruby-sasl (0.0.3.3)
|
||||
quiet_assets (1.0.2)
|
||||
railties (>= 3.1, < 5.0)
|
||||
|
@ -346,53 +412,53 @@ GEM
|
|||
rack (1.5.2)
|
||||
rack-accept (0.4.5)
|
||||
rack (>= 0.4)
|
||||
rack-attack (2.3.0)
|
||||
rack-attack (4.2.0)
|
||||
rack
|
||||
rack-cors (0.2.9)
|
||||
rack-mini-profiler (0.9.0)
|
||||
rack (>= 1.1.3)
|
||||
rack-mount (0.8.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-oauth2 (1.0.8)
|
||||
activesupport (>= 2.3)
|
||||
attr_required (>= 0.0.5)
|
||||
httpclient (>= 2.2.0.2)
|
||||
multi_json (>= 1.3.6)
|
||||
rack (>= 1.1)
|
||||
rack-protection (1.5.1)
|
||||
rack
|
||||
rack-test (0.6.2)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
rails (4.1.1)
|
||||
actionmailer (= 4.1.1)
|
||||
actionpack (= 4.1.1)
|
||||
actionview (= 4.1.1)
|
||||
activemodel (= 4.1.1)
|
||||
activerecord (= 4.1.1)
|
||||
activesupport (= 4.1.1)
|
||||
rails (4.1.9)
|
||||
actionmailer (= 4.1.9)
|
||||
actionpack (= 4.1.9)
|
||||
actionview (= 4.1.9)
|
||||
activemodel (= 4.1.9)
|
||||
activerecord (= 4.1.9)
|
||||
activesupport (= 4.1.9)
|
||||
bundler (>= 1.3.0, < 2.0)
|
||||
railties (= 4.1.1)
|
||||
railties (= 4.1.9)
|
||||
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)
|
||||
activesupport
|
||||
awesome_print
|
||||
code_analyzer (>= 0.4.3)
|
||||
colored
|
||||
erubis
|
||||
i18n
|
||||
require_all
|
||||
ruby-progressbar
|
||||
railties (4.1.1)
|
||||
actionpack (= 4.1.1)
|
||||
activesupport (= 4.1.1)
|
||||
railties (4.1.9)
|
||||
actionpack (= 4.1.9)
|
||||
activesupport (= 4.1.9)
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
raindrops (0.12.0)
|
||||
rake (10.3.2)
|
||||
rainbow (2.0.0)
|
||||
raindrops (0.13.0)
|
||||
rake (10.4.2)
|
||||
raphael-rails (2.1.2)
|
||||
rb-fsevent (0.9.3)
|
||||
rb-inotify (0.9.2)
|
||||
ffi (>= 0.5.0)
|
||||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
redcarpet (2.2.2)
|
||||
redis (3.0.6)
|
||||
redcarpet (3.2.3)
|
||||
redis (3.1.0)
|
||||
redis-actionpack (4.0.0)
|
||||
actionpack (~> 4)
|
||||
redis-rack (~> 1.5.0)
|
||||
|
@ -400,8 +466,8 @@ GEM
|
|||
redis-activesupport (4.0.0)
|
||||
activesupport (~> 4)
|
||||
redis-store (~> 1.1.0)
|
||||
redis-namespace (1.4.1)
|
||||
redis (~> 3.0.4)
|
||||
redis-namespace (1.5.1)
|
||||
redis (~> 3.0, >= 3.0.4)
|
||||
redis-rack (1.5.0)
|
||||
rack (~> 1.5)
|
||||
redis-store (~> 1.1.0)
|
||||
|
@ -411,32 +477,46 @@ GEM
|
|||
redis-store (~> 1.1.0)
|
||||
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)
|
||||
rinku (1.7.3)
|
||||
rouge (1.3.3)
|
||||
rspec (2.14.1)
|
||||
rspec-core (~> 2.14.0)
|
||||
rspec-expectations (~> 2.14.0)
|
||||
rspec-mocks (~> 2.14.0)
|
||||
rspec-core (2.14.7)
|
||||
rspec-expectations (2.14.4)
|
||||
rouge (1.7.7)
|
||||
rspec (2.99.0)
|
||||
rspec-core (~> 2.99.0)
|
||||
rspec-expectations (~> 2.99.0)
|
||||
rspec-mocks (~> 2.99.0)
|
||||
rspec-collection_matchers (1.1.2)
|
||||
rspec-expectations (>= 2.99.0.beta1)
|
||||
rspec-core (2.99.2)
|
||||
rspec-expectations (2.99.2)
|
||||
diff-lcs (>= 1.1.3, < 2.0)
|
||||
rspec-mocks (2.14.4)
|
||||
rspec-rails (2.14.0)
|
||||
rspec-mocks (2.99.3)
|
||||
rspec-rails (2.99.0)
|
||||
actionpack (>= 3.0)
|
||||
activemodel (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
rspec-core (~> 2.14.0)
|
||||
rspec-expectations (~> 2.14.0)
|
||||
rspec-mocks (~> 2.14.0)
|
||||
ruby-progressbar (1.2.0)
|
||||
rubyntlm (0.1.1)
|
||||
rspec-collection_matchers
|
||||
rspec-core (~> 2.99.0)
|
||||
rspec-expectations (~> 2.99.0)
|
||||
rspec-mocks (~> 2.99.0)
|
||||
rubocop (0.28.0)
|
||||
astrolabe (~> 1.3)
|
||||
parser (>= 2.2.0.pre.7, < 3.0)
|
||||
powerpack (~> 0.0.6)
|
||||
rainbow (>= 1.99.1, < 3.0)
|
||||
ruby-progressbar (~> 1.4)
|
||||
ruby-progressbar (1.7.1)
|
||||
ruby2ruby (2.1.3)
|
||||
ruby_parser (~> 3.1)
|
||||
sexp_processor (~> 4.0)
|
||||
ruby_parser (3.5.0)
|
||||
sexp_processor (~> 4.1)
|
||||
rubyntlm (0.5.0)
|
||||
rubypants (0.2.0)
|
||||
rugged (0.21.0)
|
||||
rugged (0.21.4)
|
||||
rugments (1.0.0.beta6)
|
||||
safe_yaml (0.9.7)
|
||||
sanitize (2.1.0)
|
||||
nokogiri (>= 1.4.4)
|
||||
|
@ -446,6 +526,9 @@ GEM
|
|||
sass (~> 3.2.0)
|
||||
sprockets (~> 2.8, <= 2.11.0)
|
||||
sprockets-rails (~> 2.0)
|
||||
sawyer (0.6.0)
|
||||
addressable (~> 2.3.5)
|
||||
faraday (~> 0.8, < 0.10)
|
||||
sdoc (0.3.20)
|
||||
json (>= 1.1.3)
|
||||
rdoc (~> 3.10)
|
||||
|
@ -454,20 +537,22 @@ GEM
|
|||
activesupport (>= 3.1, < 4.2)
|
||||
select2-rails (3.5.2)
|
||||
thor (~> 0.14)
|
||||
semantic-ui-sass (0.16.1.0)
|
||||
sass (~> 3.2)
|
||||
settingslogic (2.0.9)
|
||||
sexp_processor (4.4.0)
|
||||
shoulda-matchers (2.1.0)
|
||||
sexp_processor (4.4.5)
|
||||
shoulda-matchers (2.7.0)
|
||||
activesupport (>= 3.0.0)
|
||||
sidekiq (2.17.0)
|
||||
celluloid (>= 0.15.2)
|
||||
connection_pool (>= 1.0.0)
|
||||
sidekiq (3.3.0)
|
||||
celluloid (>= 0.16.0)
|
||||
connection_pool (>= 2.0.0)
|
||||
json
|
||||
redis (>= 3.0.4)
|
||||
redis (>= 3.0.6)
|
||||
redis-namespace (>= 1.3.1)
|
||||
sidetiq (0.6.3)
|
||||
celluloid (>= 0.14.1)
|
||||
ice_cube (= 0.11.1)
|
||||
sidekiq (>= 3.0.0)
|
||||
simple_oauth (0.1.9)
|
||||
simplecov (0.8.2)
|
||||
simplecov (0.9.0)
|
||||
docile (~> 1.1.0)
|
||||
multi_json
|
||||
simplecov-html (~> 0.8.0)
|
||||
|
@ -477,11 +562,11 @@ GEM
|
|||
rack-protection (~> 1.4)
|
||||
tilt (~> 1.3, >= 1.3.4)
|
||||
six (0.2.0)
|
||||
slack-notifier (0.3.2)
|
||||
slack-notifier (1.0.0)
|
||||
slim (2.0.2)
|
||||
temple (~> 0.6.6)
|
||||
tilt (>= 1.3.3, < 2.1)
|
||||
slop (3.4.7)
|
||||
slop (3.6.0)
|
||||
spinach (0.8.7)
|
||||
colorize (= 0.5.8)
|
||||
gherkin-ruby (>= 0.3.1)
|
||||
|
@ -489,8 +574,8 @@ GEM
|
|||
capybara (>= 2.0.0)
|
||||
railties (>= 3)
|
||||
spinach (>= 0.4)
|
||||
spring (1.1.1)
|
||||
spring-commands-rspec (1.0.1)
|
||||
spring (1.3.3)
|
||||
spring-commands-rspec (1.0.4)
|
||||
spring (>= 0.9.1)
|
||||
spring-commands-spinach (1.0.0)
|
||||
spring (>= 0.9.1)
|
||||
|
@ -499,28 +584,28 @@ GEM
|
|||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
sprockets-rails (2.1.3)
|
||||
sprockets-rails (2.2.4)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
sprockets (~> 2.8)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
stamp (0.5.0)
|
||||
state_machine (1.2.0)
|
||||
stringex (2.5.1)
|
||||
stringex (2.5.2)
|
||||
temple (0.6.7)
|
||||
term-ansicolor (1.2.2)
|
||||
tins (~> 0.8)
|
||||
terminal-table (1.4.5)
|
||||
test_after_commit (0.2.2)
|
||||
therubyracer (0.12.0)
|
||||
libv8 (~> 3.16.14.0)
|
||||
ref
|
||||
thin (1.6.1)
|
||||
daemons (>= 1.0.9)
|
||||
eventmachine (>= 1.0.0)
|
||||
rack (>= 1.0.0)
|
||||
thor (0.19.1)
|
||||
thread_safe (0.3.4)
|
||||
thread_safe (0.3.5)
|
||||
tilt (1.4.1)
|
||||
timers (1.1.0)
|
||||
timers (4.0.1)
|
||||
hitimes
|
||||
timfel-krb5-auth (0.8.3)
|
||||
tinder (1.9.3)
|
||||
eventmachine (~> 1.0)
|
||||
faraday (~> 0.8)
|
||||
|
@ -531,9 +616,6 @@ GEM
|
|||
multi_json (~> 1.7)
|
||||
twitter-stream (~> 0.1)
|
||||
tins (0.13.1)
|
||||
treetop (1.4.15)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
turbolinks (2.0.0)
|
||||
coffee-rails
|
||||
twitter-stream (0.1.16)
|
||||
|
@ -555,7 +637,7 @@ GEM
|
|||
raindrops (~> 0.7)
|
||||
unicorn-worker-killer (0.4.2)
|
||||
unicorn (~> 4)
|
||||
version_sorter (1.1.0)
|
||||
version_sorter (2.0.0)
|
||||
virtus (1.0.1)
|
||||
axiom-types (~> 0.0.5)
|
||||
coercible (~> 1.0)
|
||||
|
@ -580,15 +662,22 @@ PLATFORMS
|
|||
DEPENDENCIES
|
||||
RedCloth
|
||||
ace-rails-ap
|
||||
acts-as-taggable-on
|
||||
acts-as-taggable-on (~> 3.4)
|
||||
addressable
|
||||
annotate (~> 2.6.0.beta2)
|
||||
asana (~> 0.0.6)
|
||||
asciidoctor (= 0.1.4)
|
||||
awesome_print
|
||||
better_errors
|
||||
binding_of_caller
|
||||
bootstrap-sass (~> 3.0)
|
||||
brakeman
|
||||
browser
|
||||
byebug
|
||||
cal-heatmap-rails (~> 0.0.1)
|
||||
capybara (~> 2.2.1)
|
||||
carrierwave
|
||||
charlock_holmes
|
||||
coffee-rails
|
||||
colored
|
||||
coveralls
|
||||
|
@ -599,24 +688,25 @@ DEPENDENCIES
|
|||
devise (= 3.2.4)
|
||||
devise-async (= 0.9.0)
|
||||
diffy (~> 3.0.3)
|
||||
doorkeeper (= 2.1.3)
|
||||
dropzonejs-rails
|
||||
email_spec
|
||||
enumerize
|
||||
factory_girl_rails
|
||||
ffaker
|
||||
fog (~> 1.14)
|
||||
font-awesome-rails (~> 3.2)
|
||||
font-awesome-rails (~> 4.2)
|
||||
foreman
|
||||
gemnasium-gitlab-service (~> 0.2)
|
||||
github-markup
|
||||
gitlab-flowdock-git-hook (~> 0.4.2)
|
||||
gitlab-grack (~> 2.0.0.pre)
|
||||
gitlab-linguist (~> 3.0.0)
|
||||
gitlab_emoji (~> 0.0.1.1)
|
||||
gitlab_git (~> 6.0)
|
||||
gitlab-grack (~> 2.0.2)
|
||||
gitlab-linguist (~> 3.0.1)
|
||||
gitlab_emoji (~> 0.1)
|
||||
gitlab_git (~> 7.1.10)
|
||||
gitlab_meta (= 7.0)
|
||||
gitlab_omniauth-ldap (= 1.0.4)
|
||||
gollum-lib (~> 3.0.0)
|
||||
gitlab_omniauth-ldap (= 1.2.1)
|
||||
gollum-lib (~> 4.0.2)
|
||||
gon (~> 5.0.0)
|
||||
grape (~> 0.6.1)
|
||||
grape-entity (~> 0.4.2)
|
||||
|
@ -624,7 +714,8 @@ DEPENDENCIES
|
|||
guard-rspec
|
||||
guard-spinach
|
||||
haml-rails
|
||||
hipchat (~> 0.14.0)
|
||||
hipchat (~> 1.4.0)
|
||||
html-pipeline-gitlab (~> 0.1)
|
||||
httparty
|
||||
jasmine (= 2.0.2)
|
||||
jquery-atwho-rails (~> 0.3.3)
|
||||
|
@ -636,53 +727,61 @@ DEPENDENCIES
|
|||
launchy
|
||||
letter_opener
|
||||
minitest (~> 5.3.0)
|
||||
mousetrap-rails
|
||||
mysql2
|
||||
newrelic_rpm
|
||||
nprogress-rails
|
||||
octokit (= 3.7.0)
|
||||
omniauth (~> 1.1.3)
|
||||
omniauth-bitbucket
|
||||
omniauth-github
|
||||
omniauth-gitlab
|
||||
omniauth-google-oauth2
|
||||
omniauth-kerberos
|
||||
omniauth-shibboleth
|
||||
omniauth-twitter
|
||||
org-ruby
|
||||
org-ruby (= 0.9.12)
|
||||
pg
|
||||
poltergeist (~> 1.5.1)
|
||||
pry
|
||||
pry-rails
|
||||
quiet_assets (~> 1.0.1)
|
||||
rack-attack
|
||||
rack-cors
|
||||
rack-mini-profiler
|
||||
rack-oauth2 (~> 1.0.5)
|
||||
rails (~> 4.1.0)
|
||||
rails_autolink (~> 1.1)
|
||||
rails_best_practices
|
||||
raphael-rails (~> 2.1.2)
|
||||
rb-fsevent
|
||||
rb-inotify
|
||||
rdoc (~> 3.6)
|
||||
redcarpet (~> 2.2.2)
|
||||
redcarpet (~> 3.2.3)
|
||||
redis-rails
|
||||
request_store
|
||||
rspec-rails
|
||||
rspec-rails (= 2.99)
|
||||
rubocop (= 0.28.0)
|
||||
rugments
|
||||
sanitize (~> 2.0)
|
||||
sass-rails (~> 4.0.2)
|
||||
sdoc
|
||||
seed-fu
|
||||
select2-rails
|
||||
semantic-ui-sass (~> 0.16.1.0)
|
||||
settingslogic
|
||||
shoulda-matchers (~> 2.1.0)
|
||||
sidekiq (= 2.17.0)
|
||||
shoulda-matchers (~> 2.7.0)
|
||||
sidekiq (~> 3.3)
|
||||
sidetiq (= 0.6.3)
|
||||
simplecov
|
||||
sinatra
|
||||
six
|
||||
slack-notifier (~> 0.3.2)
|
||||
slack-notifier (~> 1.0.0)
|
||||
slim
|
||||
spinach-rails
|
||||
spring (= 1.1.1)
|
||||
spring-commands-rspec (= 1.0.1)
|
||||
spring (~> 1.3.1)
|
||||
spring-commands-rspec (= 1.0.4)
|
||||
spring-commands-spinach (= 1.0.0)
|
||||
stamp
|
||||
state_machine
|
||||
test_after_commit
|
||||
therubyracer
|
||||
thin
|
||||
tinder (~> 1.9.2)
|
||||
turbolinks
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# A sample Guardfile
|
||||
# More info at https://github.com/guard/guard#readme
|
||||
|
||||
guard 'rspec', cmd: "spring rspec", version: 2, all_on_start: false, all_after_pass: false do
|
||||
guard 'rspec', cmd: "spring rspec", all_on_start: false, all_after_pass: false do
|
||||
watch(%r{^spec/.+_spec\.rb$})
|
||||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
||||
watch(%r{^lib/api/(.+)\.rb$}) { |m| "spec/requests/api/#{m[1]}_spec.rb" }
|
||||
|
@ -19,7 +19,7 @@ guard 'rspec', cmd: "spring rspec", version: 2, all_on_start: false, all_after_p
|
|||
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
|
||||
end
|
||||
|
||||
guard 'spinach' do
|
||||
guard 'spinach', command_prefix: 'spring' do
|
||||
watch(%r|^features/(.*)\.feature|)
|
||||
watch(%r|^features/steps/(.*)([^/]+)\.rb|) do |m|
|
||||
"features/#{m[1]}#{m[2]}.feature"
|
||||
|
|
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2011-2014 GitLab B.V.
|
||||
Copyright (c) 2011-2015 GitLab B.V.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
GitLab is a fast moving and evolving project. We currently don't have the resources to support many releases concurrently. We support exactly one stable release at any given time.
|
||||
|
||||
GitLab follows the [Semantic Versioning](http://semver.org/) for its releases: `(Major).(Minor).(Patch)`.
|
||||
GitLab follows the [Semantic Versioning](http://semver.org/) for its releases: `(Major).(Minor).(Patch)` in a [pragmatic way](https://gist.github.com/jashkenas/cbd2b088e20279ae2c8e).
|
||||
|
||||
- **Major version**: Whenever there is something significant or any backwards incompatible changes are introduced to the public API.
|
||||
- **Minor version**: When new, backwards compatible functionality is introduced to the public API or a minor feature is introduced, or when a set of smaller features is rolled out.
|
||||
|
|
17
PROCESS.md
|
@ -18,7 +18,7 @@ Below we describe the contributing process to GitLab for two reasons. So that co
|
|||
- Responds to merge requests the issue team mentions them in and monitors for new merge requests
|
||||
- Provides feedback to the merge request submitter to improve the merge request (style, tests, etc.)
|
||||
- Mark merge requests 'ready-for-merge' when they meet the contribution guidelines
|
||||
- Mention developer(s) based on the [list of members and their specialities](https://www.gitlab.com/core-team/)
|
||||
- Mention developer(s) based on the [list of members and their specialities](https://about.gitlab.com/core-team/)
|
||||
- Closes merge requests with no feedback from the reporter for two weeks
|
||||
|
||||
## Priorities of the issue team
|
||||
|
@ -30,7 +30,7 @@ Below we describe the contributing process to GitLab for two reasons. So that co
|
|||
|
||||
## Mentioning people
|
||||
|
||||
The most important thing is making sure valid issues receive feedback from the development team. Therefore the priority is mentioning developers that can help on those issue. Please select someone with relevant experience from [GitLab core team](https://www.gitlab.com/core-team/). If there is nobody mentioned with that expertise look in the commit history for the affected files to find someone. Avoid mentioning the lead developer, this is the person that is least likely to give a timely response. If the involvement of the lead developer is needed the other core team members will mention this person.
|
||||
The most important thing is making sure valid issues receive feedback from the development team. Therefore the priority is mentioning developers that can help on those issue. Please select someone with relevant experience from [GitLab core team](https://about.gitlab.com/core-team/). If there is nobody mentioned with that expertise look in the commit history for the affected files to find someone. Avoid mentioning the lead developer, this is the person that is least likely to give a timely response. If the involvement of the lead developer is needed the other core team members will mention this person.
|
||||
|
||||
## Workflow labels
|
||||
|
||||
|
@ -71,7 +71,7 @@ Thanks for the issue report. Please reformat your issue to conform to the issue
|
|||
|
||||
### Feature requests
|
||||
|
||||
Thank you for your interest in improving GitLab. We don't use the issue tracker for feature requests. Things that are wrong but are not a regression compared to older versions of GitLab are considered feature requests and not issues. Please use the [feature request forum](http://feedback.gitlab.com/) for this purpose or create a merge request implementing this feature. Have a look at the \[contribution guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md) for more information.
|
||||
Thank you for your interest in improving GitLab. We don't use the issue tracker for feature requests. Things that are wrong but are not a regression compared to older versions of GitLab are considered feature requests and not issues. Please use the \[feature request forum\]\(http://feedback.gitlab.com/) for this purpose or create a merge request implementing this feature. Have a look at the \[contribution guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md) for more information.
|
||||
|
||||
### Issue report for old version
|
||||
|
||||
|
@ -79,7 +79,7 @@ Thanks for the issue report but we only support issues for the latest stable ver
|
|||
|
||||
### Support requests and configuration questions
|
||||
|
||||
Thanks for your interest in GitLab. We don't use the issue tracker for support requests and configuration questions. Please use the \[support forum\]\(https://groups.google.com/forum/#!forum/gitlabhq), \[Stack Overflow\]\(http://stackoverflow.com/questions/tagged/gitlab), the #gitlab IRC channel on Freenode or the http://www.gitlab.com paid services for this purpose. Have a look at the \[contribution guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md) for more information.
|
||||
Thanks for your interest in GitLab. We don't use the issue tracker for support requests and configuration questions. Please use the \[support forum\]\(https://groups.google.com/forum/#!forum/gitlabhq), \[Stack Overflow\]\(http://stackoverflow.com/questions/tagged/gitlab), the #gitlab IRC channel on Freenode or the http://about.gitlab.com paid services for this purpose. Have a look at the \[contribution guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md) for more information.
|
||||
|
||||
### Code format
|
||||
|
||||
|
@ -87,7 +87,7 @@ Please use ``` to format console output, logs, and code as it's very hard to rea
|
|||
|
||||
### Issue fixed in newer version
|
||||
|
||||
Thanks for the issue report. This issue has already been fixed in newer versions of GitLab. Due to the size of this project and our limited resources we are only able to support the latest stable release as outlined in our \[contributing guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#issue-tracker). In order to get this bug fix and enjoy many new features please \[upgrade\]\(https://github.com/gitlabhq/gitlabhq/tree/master/doc/update). If you still experience issues at that time please open a new issue following our issue tracker guidelines found in the \[contributing guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#issue-tracker-guidelines).
|
||||
Thanks for the issue report. This issue has already been fixed in newer versions of GitLab. Due to the size of this project and our limited resources we are only able to support the latest stable release as outlined in our \[contributing guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#issue-tracker). In order to get this bug fix and enjoy many new features please \[upgrade\]\(https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update). If you still experience issues at that time please open a new issue following our issue tracker guidelines found in the \[contributing guidelines\]\(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#issue-tracker-guidelines).
|
||||
|
||||
### Improperly formatted merge request
|
||||
|
||||
|
@ -104,3 +104,10 @@ This merge request has been closed because a request for more information has no
|
|||
### Accepting merge requests
|
||||
|
||||
Is there a request on [the feature request forum](http://feedback.gitlab.com/forums/176466-general) that is similar to this? If so, can you make a comment with a link to it? Please be aware that new functionality that is not marked [accepting merge/pull requests](http://feedback.gitlab.com/forums/176466-general/status/796455) on the forum might not make it into GitLab. You might be asked to make changes and even after implementing them your feature might still be declined. If you want to reduce the chance of this happening please have a discussion in the forum first.
|
||||
|
||||
### Only accepting merge requests with green tests
|
||||
|
||||
We can only accept a merge request if all the tests are green. I've just
|
||||
restarted the build. When the tests are still not passing after this restart and
|
||||
you're sure that is does not have anything to do with your code changes, please
|
||||
rebase with master to see if that solves the issue.
|
||||
|
|
2
Procfile
|
@ -1,2 +1,2 @@
|
|||
web: bundle exec unicorn_rails -p ${PORT:="3000"} -E ${RAILS_ENV:="development"} -c ${UNICORN_CONFIG:="config/unicorn.rb"}
|
||||
worker: bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,common,default,gitlab_shell
|
||||
worker: bundle exec sidekiq -q post_receive -q mailer -q archive_repo -q system_hook -q project_web_hook -q gitlab_shell -q common -q default
|
||||
|
|
122
README.md
|
@ -1,124 +1,90 @@
|
|||
# GitLab
|
||||
# ![logo](https://about.gitlab.com/images/gitlab_logo.png) GitLab
|
||||
|
||||
## Open source software to collaborate on code
|
||||
|
||||
![logo](https://gitlab.com/gitlab-org/gitlab-ce/raw/master/public/gitlab_logo.png)
|
||||
|
||||
![animated-screenshots](https://gist.github.com/fnkr/2f9badd56bfe0ed04ee7/raw/4f48806fbae97f556c2f78d8c2d299c04500cb0d/compiled.gif)
|
||||
![Animated screenshots](https://about.gitlab.com/images/animated/compiled.gif)
|
||||
|
||||
- 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
|
||||
- Used by more than 100,000 organizations, GitLab is the most popular solution to manage Git repositories on-premises
|
||||
- Completely free and open source (MIT Expat license)
|
||||
- Powered by Ruby on Rails
|
||||
- Powered by [Ruby on Rails](https://github.com/rails/rails)
|
||||
|
||||
## Editions
|
||||
|
||||
There are two editions of GitLab.
|
||||
*GitLab [Community Edition](https://about.gitlab.com/features/) (CE)* is available without any costs under an MIT license.
|
||||
|
||||
*GitLab Enterprise Edition (EE)* includes [extra features](https://about.gitlab.com/features/#compare) that are most useful for organizations with more than 100 users.
|
||||
To get access to the EE and support please [become a subscriber](https://about.gitlab.com/pricing/).
|
||||
|
||||
## Canonical source
|
||||
|
||||
- The source of GitLab Community Edition is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/) and there are mirrors to make [contributing](CONTRIBUTING.md) as easy as possible.
|
||||
The source of GitLab Community Edition is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/) and there are mirrors to make [contributing](CONTRIBUTING.md) as easy as possible.
|
||||
|
||||
## Code status
|
||||
|
||||
- [![build status](https://ci.gitlab.org/projects/1/status.png?ref=master)](https://ci.gitlab.org/projects/1?ref=master) on ci.gitlab.org (master branch)
|
||||
|
||||
- [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.png)](https://codeclimate.com/github/gitlabhq/gitlabhq)
|
||||
- [![Build Status](https://semaphoreapp.com/api/v1/projects/2f1a5809-418b-4cc2-a1f4-819607579fe7/243338/badge.png)](https://semaphoreapp.com/gitlabhq/gitlabhq)
|
||||
|
||||
- [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq)
|
||||
- [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.svg)](https://codeclimate.com/github/gitlabhq/gitlabhq)
|
||||
|
||||
- [![PullReview stats](https://www.pullreview.com/gitlab/gitlab-org/gitlab-ce/badges/master.svg?)](https://www.pullreview.com/gitlab.gitlab.com/gitlab-org/gitlab-ce/reviews/master)
|
||||
- [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq?branch=master)
|
||||
|
||||
## Website
|
||||
|
||||
On [www.gitlab.com](https://www.gitlab.com/) you can find more information about:
|
||||
On [about.gitlab.com](https://about.gitlab.com/) you can find more information about:
|
||||
|
||||
- [Subscriptions](https://www.gitlab.com/subscription/)
|
||||
- [Consultancy](https://www.gitlab.com/consultancy/)
|
||||
- [Community](https://www.gitlab.com/community/)
|
||||
- [Hosted GitLab.com](https://www.gitlab.com/gitlab-com/) use GitLab as a free service
|
||||
- [GitLab Enterprise Edition](https://www.gitlab.com/gitlab-ee/) with additional features aimed at larger organizations.
|
||||
- [GitLab CI](https://www.gitlab.com/gitlab-ci/) a continuous integration (CI) server that is easy to integrate with GitLab.
|
||||
|
||||
## Third-party applications
|
||||
|
||||
Access GitLab from multiple platforms with applications below.
|
||||
These applications are maintained by contributors, GitLab B.V. does not offer support for them.
|
||||
|
||||
- [iPhone app](http://gitlabcontrol.com/)
|
||||
- [Android app](https://play.google.com/store/apps/details?id=com.bd.gitlab&hl=en)
|
||||
- [Chrome app](https://chrome.google.com/webstore/detail/chrome-gitlab-notifier/eageapgbnjicdjjihgclpclilenjbobi)
|
||||
- [Command line client](https://github.com/drewblessing/gitlab-cli)
|
||||
- [Ruby API wrapper](https://github.com/NARKOZ/gitlab)
|
||||
- [Subscriptions](https://about.gitlab.com/subscription/)
|
||||
- [Consultancy](https://about.gitlab.com/consultancy/)
|
||||
- [Community](https://about.gitlab.com/community/)
|
||||
- [Hosted GitLab.com](https://about.gitlab.com/gitlab-com/) use GitLab as a free service
|
||||
- [GitLab Enterprise Edition](https://about.gitlab.com/gitlab-ee/) with additional features aimed at larger organizations.
|
||||
- [GitLab CI](https://about.gitlab.com/gitlab-ci/) a continuous integration (CI) server that is easy to integrate with GitLab.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Ubuntu/Debian/CentOS/RHEL**
|
||||
- ruby 2.0+
|
||||
- git 1.7.10+
|
||||
- redis 2.0+
|
||||
GitLab requires the following software:
|
||||
|
||||
- Ubuntu/Debian/CentOS/RHEL
|
||||
- Ruby (MRI) 2.0 or 2.1
|
||||
- Git 1.7.10+
|
||||
- Redis 2.0+
|
||||
- MySQL or PostgreSQL
|
||||
|
||||
** More details are in the [requirements doc](doc/install/requirements.md).
|
||||
Please see the [requirements documentation](doc/install/requirements.md) for system requirements and more information about the supported operating systems.
|
||||
|
||||
## Installation
|
||||
|
||||
Please see [the installation page on the GitLab website](https://www.gitlab.com/installation/).
|
||||
The recommended way to install GitLab is using the provided [Omnibus packages](https://about.gitlab.com/downloads/). Compared to an installation from source, this is faster and less error prone. Just select your operating system, download the respective package (Debian or RPM) and install it using the system's package manager.
|
||||
|
||||
### New versions
|
||||
There are various other options to install GitLab, please refer to the [installation page on the GitLab website](https://about.gitlab.com/installation/) for more information.
|
||||
|
||||
Since 2011 a minor or major version of GitLab is released on the 22nd of every month. Patch and security releases come out when needed. New features are detailed on the [blog](https://www.gitlab.com/blog/) and in the [changelog](CHANGELOG). For more information about the release process see the release [documentation](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/release). Features that will likely be in the next releases can be found on the [feature request forum](http://feedback.gitlab.com/forums/176466-general) with the status [started](http://feedback.gitlab.com/forums/176466-general/status/796456) and [completed](http://feedback.gitlab.com/forums/176466-general/status/796457).
|
||||
You can access a new installation with the login **`root`** and password **`5iveL!fe`**, after login you are required to set a unique password.
|
||||
|
||||
### Upgrading
|
||||
## Third-party applications
|
||||
|
||||
For updating the the Omnibus installation please see the [update documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md). For manual installations there is an [upgrader script](doc/update/upgrader.md) and there are [upgrade guides](doc/update).
|
||||
There are a lot of [third-party applications integrating with GitLab](https://about.gitlab.com/applications/). These include GUI Git clients, mobile applications and API wrappers for various languages.
|
||||
|
||||
## Run in production mode
|
||||
## GitLab release cycle
|
||||
|
||||
The Installation guide contains instructions on how to download an init script and run it automatically on boot. You can also start the init script manually:
|
||||
Since 2011 a minor or major version of GitLab is released on the 22nd of every month. Patch and security releases are published when needed. New features are detailed on the [blog](https://about.gitlab.com/blog/) and in the [changelog](CHANGELOG). For more information about the release process see the [release documentation](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/release). Features that will likely be in the next releases can be found on the [feature request forum](http://feedback.gitlab.com/forums/176466-general) with the status [started](http://feedback.gitlab.com/forums/176466-general/status/796456) and [completed](http://feedback.gitlab.com/forums/176466-general/status/796457).
|
||||
|
||||
sudo service gitlab start
|
||||
## Upgrading
|
||||
|
||||
or by directly calling the script:
|
||||
|
||||
sudo /etc/init.d/gitlab start
|
||||
|
||||
Please login with `root` / `5iveL!fe`
|
||||
For updating the Omnibus installation please see the [update documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md). For installations from source there is an [upgrader script](doc/update/upgrader.md) and there are [upgrade guides](doc/update) detailing all necessary commands to migrate to the next version.
|
||||
|
||||
## Install a development environment
|
||||
|
||||
We recommend setting up your development environment with [the cookbook](https://gitlab.com/gitlab-org/cookbook-gitlab/blob/master/README.md#installation). If you do not use the cookbook you might need to copy the example development unicorn configuration file
|
||||
To work on GitLab itself, we recommend setting up your development environment with [the GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit).
|
||||
If you do not use the GitLab Development Kit you need to install and setup all the dependencies yourself, this is a lot of work and error prone.
|
||||
One small thing you also have to do when installing it yourself is to copy the example development unicorn configuration file:
|
||||
|
||||
cp config/unicorn.rb.example.development config/unicorn.rb
|
||||
|
||||
## Run in development mode
|
||||
|
||||
Start it with [Foreman](https://github.com/ddollar/foreman)
|
||||
|
||||
bundle exec foreman start -p 3000
|
||||
|
||||
or start each component separately:
|
||||
|
||||
bundle exec rails s
|
||||
bin/background_jobs start
|
||||
|
||||
And surf to [localhost:3000](http://localhost:3000/) and login with `root` / `5iveL!fe`.
|
||||
|
||||
## Run the tests
|
||||
|
||||
- Run all tests:
|
||||
|
||||
bundle exec rake test
|
||||
|
||||
- [RSpec](http://rspec.info/) unit and functional tests.
|
||||
|
||||
All RSpec tests: `bundle exec rake spec`
|
||||
|
||||
Single RSpec file: `bundle exec rspec spec/controllers/commit_controller_spec.rb`
|
||||
|
||||
- [Spinach](https://github.com/codegram/spinach) integration tests.
|
||||
|
||||
All Spinach tests: `bundle exec rake spinach`
|
||||
|
||||
Single Spinach test: `bundle exec spinach features/project/issues/milestones.feature`
|
||||
Instructions on how to start GitLab and how to run the tests can be found in the [development section of the GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit#development).
|
||||
|
||||
## Documentation
|
||||
|
||||
|
@ -126,7 +92,7 @@ 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.
|
||||
Please see [Getting help for GitLab](https://about.gitlab.com/getting-help/) on our website for the many options to get help.
|
||||
|
||||
## Is it any good?
|
||||
|
||||
|
@ -135,4 +101,4 @@ Please see [Getting help for GitLab](https://www.gitlab.com/getting-help/) on ou
|
|||
## 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.
|
||||
[These people](https://twitter.com/gitlab/favorites) seem to like it.
|
||||
|
|
2
VERSION
|
@ -1 +1 @@
|
|||
7.2.1
|
||||
7.10.0
|
BIN
app/assets/images/authbuttons/bitbucket_64.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.1 KiB |
BIN
app/assets/images/authbuttons/gitlab_64.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 90 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 367 B |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 691 B After Width: | Height: | Size: 418 B |
BIN
app/assets/images/gitorious-logo-black.png
Normal file
After Width: | Height: | Size: 809 B |
BIN
app/assets/images/gitorious-logo-blue.png
Normal file
After Width: | Height: | Size: 495 B |
Before Width: | Height: | Size: 1,019 B After Width: | Height: | Size: 726 B |
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 704 B After Width: | Height: | Size: 621 B |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 942 B |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
app/assets/images/solarized-light-scheme-preview.png
Normal file
After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 231 B |
Before Width: | Height: | Size: 50 B After Width: | Height: | Size: 49 B |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 3.7 KiB |
|
@ -1,4 +1,4 @@
|
|||
class Activities
|
||||
class @Activities
|
||||
constructor: ->
|
||||
Pager.init 20, true
|
||||
$(".event_filter_link").bind "click", (event) =>
|
||||
|
@ -12,7 +12,7 @@ class Activities
|
|||
|
||||
|
||||
toggleFilter: (sender) ->
|
||||
sender.parent().toggleClass "inactive"
|
||||
sender.parent().toggleClass "active"
|
||||
event_filters = $.cookie("event_filter")
|
||||
filter = sender.attr("id").split("_")[0]
|
||||
if event_filters
|
||||
|
@ -27,5 +27,3 @@ class Activities
|
|||
event_filters.splice index, 1
|
||||
|
||||
$.cookie "event_filter", event_filters.join(","), { path: '/' }
|
||||
|
||||
@Activities = Activities
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Admin
|
||||
class @Admin
|
||||
constructor: ->
|
||||
$('input#user_force_random_password').on 'change', (elem) ->
|
||||
elems = $('#user_password, #user_password_confirmation')
|
||||
|
@ -46,10 +46,8 @@ class Admin
|
|||
modal.hide()
|
||||
$('.change-owner-link').show()
|
||||
|
||||
$('li.users_project').bind 'ajax:success', ->
|
||||
$('li.project_member').bind 'ajax:success', ->
|
||||
Turbolinks.visit(location.href)
|
||||
|
||||
$('li.users_group').bind 'ajax:success', ->
|
||||
$('li.group_member').bind 'ajax:success', ->
|
||||
Turbolinks.visit(location.href)
|
||||
|
||||
@Admin = Admin
|
||||
|
|
|
@ -1,44 +1,24 @@
|
|||
@Api =
|
||||
users_path: "/api/:version/users.json"
|
||||
user_path: "/api/:version/users/:id.json"
|
||||
notes_path: "/api/:version/projects/:id/notes.json"
|
||||
groups_path: "/api/:version/groups.json"
|
||||
group_path: "/api/:version/groups/:id.json"
|
||||
namespaces_path: "/api/:version/namespaces.json"
|
||||
project_users_path: "/api/:version/projects/:id/users.json"
|
||||
|
||||
# Get 20 (depends on api) recent notes
|
||||
# and sort the ascending from oldest to newest
|
||||
notes: (project_id, callback) ->
|
||||
url = Api.buildUrl(Api.notes_path)
|
||||
url = url.replace(':id', project_id)
|
||||
|
||||
$.ajax(
|
||||
url: url,
|
||||
data:
|
||||
private_token: gon.api_token
|
||||
gfm: true
|
||||
recent: true
|
||||
dataType: "json"
|
||||
).done (notes) ->
|
||||
notes.sort (a, b) ->
|
||||
return a.id - b.id
|
||||
callback(notes)
|
||||
|
||||
user: (user_id, callback) ->
|
||||
url = Api.buildUrl(Api.user_path)
|
||||
url = url.replace(':id', user_id)
|
||||
group: (group_id, callback) ->
|
||||
url = Api.buildUrl(Api.group_path)
|
||||
url = url.replace(':id', group_id)
|
||||
|
||||
$.ajax(
|
||||
url: url
|
||||
data:
|
||||
private_token: gon.api_token
|
||||
dataType: "json"
|
||||
).done (user) ->
|
||||
callback(user)
|
||||
).done (group) ->
|
||||
callback(group)
|
||||
|
||||
# Return users list. Filtered by query
|
||||
# Only active users retrieved
|
||||
users: (query, callback) ->
|
||||
url = Api.buildUrl(Api.users_path)
|
||||
# Return groups list. Filtered by query
|
||||
# Only active groups retrieved
|
||||
groups: (query, skip_ldap, callback) ->
|
||||
url = Api.buildUrl(Api.groups_path)
|
||||
|
||||
$.ajax(
|
||||
url: url
|
||||
|
@ -46,27 +26,9 @@
|
|||
private_token: gon.api_token
|
||||
search: query
|
||||
per_page: 20
|
||||
active: true
|
||||
dataType: "json"
|
||||
).done (users) ->
|
||||
callback(users)
|
||||
|
||||
# Return project users list. Filtered by query
|
||||
# Only active users retrieved
|
||||
projectUsers: (project_id, query, callback) ->
|
||||
url = Api.buildUrl(Api.project_users_path)
|
||||
url = url.replace(':id', project_id)
|
||||
|
||||
$.ajax(
|
||||
url: url
|
||||
data:
|
||||
private_token: gon.api_token
|
||||
search: query
|
||||
per_page: 20
|
||||
active: true
|
||||
dataType: "json"
|
||||
).done (users) ->
|
||||
callback(users)
|
||||
).done (groups) ->
|
||||
callback(groups)
|
||||
|
||||
# Return namespaces list. Filtered by query
|
||||
namespaces: (query, callback) ->
|
||||
|
|
|
@ -15,22 +15,32 @@
|
|||
#= require jquery.atwho
|
||||
#= require jquery.scrollTo
|
||||
#= require jquery.blockUI
|
||||
#= require turbolinks
|
||||
#= require jquery.turbolinks
|
||||
#= require jquery.sticky-kit.min
|
||||
#= require turbolinks
|
||||
#= require autosave
|
||||
#= require bootstrap
|
||||
#= require select2
|
||||
#= require raphael
|
||||
#= require g.raphael-min
|
||||
#= require g.bar-min
|
||||
#= require chart-lib.min
|
||||
#= require branch-graph
|
||||
#= require highlight.pack
|
||||
#= require ace/ace
|
||||
#= require ace/ext-searchbox
|
||||
#= require d3
|
||||
#= require underscore
|
||||
#= require nprogress
|
||||
#= require nprogress-turbolinks
|
||||
#= require dropzone
|
||||
#= require semantic-ui/sidebar
|
||||
#= require mousetrap
|
||||
#= require mousetrap/pause
|
||||
#= require shortcuts
|
||||
#= require shortcuts_navigation
|
||||
#= require shortcuts_dashboard_navigation
|
||||
#= require shortcuts_issueable
|
||||
#= require shortcuts_network
|
||||
#= require cal-heatmap
|
||||
#= require_tree .
|
||||
|
||||
window.slugify = (text) ->
|
||||
|
@ -41,12 +51,6 @@ window.ajaxGet = (url) ->
|
|||
|
||||
window.showAndHide = (selector) ->
|
||||
|
||||
window.errorMessage = (message) ->
|
||||
ehtml = $("<p>")
|
||||
ehtml.addClass("error_message")
|
||||
ehtml.html(message)
|
||||
ehtml
|
||||
|
||||
window.split = (val) ->
|
||||
return val.split( /,\s*/ )
|
||||
|
||||
|
@ -54,7 +58,7 @@ window.extractLast = (term) ->
|
|||
return split( term ).pop()
|
||||
|
||||
window.rstrip = (val) ->
|
||||
return val.replace(/\s+$/, '')
|
||||
return if val then val.replace(/\s+$/, '') else val
|
||||
|
||||
# Disable button if text field is empty
|
||||
window.disableButtonIfEmptyField = (field_selector, button_selector) ->
|
||||
|
@ -72,24 +76,18 @@ window.disableButtonIfEmptyField = (field_selector, button_selector) ->
|
|||
# Disable button if any input field with given selector is empty
|
||||
window.disableButtonIfAnyEmptyField = (form, form_selector, button_selector) ->
|
||||
closest_submit = form.find(button_selector)
|
||||
empty = false
|
||||
updateButtons = ->
|
||||
filled = true
|
||||
form.find('input').filter(form_selector).each ->
|
||||
empty = true if rstrip($(this).val()) is ""
|
||||
filled = rstrip($(this).val()) != "" || !$(this).attr('required')
|
||||
|
||||
if empty
|
||||
closest_submit.disable()
|
||||
else
|
||||
if filled
|
||||
closest_submit.enable()
|
||||
|
||||
form.keyup ->
|
||||
empty = false
|
||||
form.find('input').filter(form_selector).each ->
|
||||
empty = true if rstrip($(this).val()) is ""
|
||||
|
||||
if empty
|
||||
closest_submit.disable()
|
||||
else
|
||||
closest_submit.enable()
|
||||
closest_submit.disable()
|
||||
|
||||
updateButtons()
|
||||
form.keyup(updateButtons)
|
||||
|
||||
window.sanitize = (str) ->
|
||||
return str.replace(/<(?:.|\n)*?>/gm, '')
|
||||
|
@ -105,8 +103,17 @@ window.unbindEvents = ->
|
|||
$(document).unbind('scroll')
|
||||
$(document).off('scroll')
|
||||
|
||||
window.shiftWindow = ->
|
||||
scrollBy 0, -50
|
||||
|
||||
document.addEventListener("page:fetch", unbindEvents)
|
||||
|
||||
# Scroll the window to avoid the topnav bar
|
||||
# https://github.com/twitter/bootstrap/issues/1768
|
||||
if location.hash
|
||||
setTimeout shiftWindow, 1
|
||||
window.addEventListener "hashchange", shiftWindow
|
||||
|
||||
$ ->
|
||||
# Click a .one_click_select field, select the contents
|
||||
$(".one_click_select").on 'click', -> $(@).select()
|
||||
|
@ -117,6 +124,13 @@ $ ->
|
|||
# Initialize select2 selects
|
||||
$('select.select2').select2(width: 'resolve', dropdownAutoWidth: true)
|
||||
|
||||
# Close select2 on escape
|
||||
$('.js-select2').bind 'select2-close', ->
|
||||
setTimeout ( ->
|
||||
$('.select2-container-active').removeClass('select2-container-active')
|
||||
$(':focus').blur()
|
||||
), 1
|
||||
|
||||
# Initialize tooltips
|
||||
$('.has_tooltip').tooltip()
|
||||
|
||||
|
@ -134,7 +148,6 @@ $ ->
|
|||
if (flash = $(".flash-container")).length > 0
|
||||
flash.click -> $(@).fadeOut()
|
||||
flash.show()
|
||||
setTimeout (-> flash.fadeOut()), 5000
|
||||
|
||||
# Disable form buttons while a form is submitting
|
||||
$('body').on 'ajax:complete, ajax:beforeSend, submit', 'form', (e) ->
|
||||
|
@ -149,20 +162,6 @@ $ ->
|
|||
# Show/Hide the profile menu when hovering the account box
|
||||
$('.account-box').hover -> $(@).toggleClass('hover')
|
||||
|
||||
# Focus search field by pressing 's' key
|
||||
$(document).keypress (e) ->
|
||||
# Don't do anything if typing in an input
|
||||
return if $(e.target).is(":input")
|
||||
|
||||
switch e.which
|
||||
when 115
|
||||
$("#search").focus()
|
||||
e.preventDefault()
|
||||
when 63
|
||||
new Shortcuts()
|
||||
e.preventDefault()
|
||||
|
||||
|
||||
# Commit show suppressed diff
|
||||
$(".diff-content").on "click", ".supp_diff_link", ->
|
||||
$(@).next('table').show()
|
||||
|
@ -170,12 +169,19 @@ $ ->
|
|||
|
||||
# Show/hide comments on diff
|
||||
$("body").on "click", ".js-toggle-diff-comments", (e) ->
|
||||
$(@).find('i').
|
||||
toggleClass('icon-chevron-down').
|
||||
toggleClass('icon-chevron-up')
|
||||
$(@).toggleClass('active')
|
||||
$(@).closest(".diff-file").find(".notes_holder").toggle()
|
||||
e.preventDefault()
|
||||
|
||||
$(document).on "click", '.js-confirm-danger', (e) ->
|
||||
e.preventDefault()
|
||||
btn = $(e.target)
|
||||
text = btn.data("confirm-danger-message")
|
||||
form = btn.closest("form")
|
||||
new ConfirmDangerModal(form, text)
|
||||
|
||||
new Aside()
|
||||
|
||||
(($) ->
|
||||
# Disable an element and add the 'disabled' Bootstrap class
|
||||
$.fn.extend disable: ->
|
||||
|
|
17
app/assets/javascripts/aside.js.coffee
Normal file
|
@ -0,0 +1,17 @@
|
|||
class @Aside
|
||||
constructor: ->
|
||||
$(document).off "click", "a.show-aside"
|
||||
$(document).on "click", 'a.show-aside', (e) ->
|
||||
e.preventDefault()
|
||||
btn = $(e.currentTarget)
|
||||
icon = btn.find('i')
|
||||
console.log('1')
|
||||
|
||||
if icon.hasClass('fa-angle-left')
|
||||
btn.parent().find('section').hide()
|
||||
btn.parent().find('aside').fadeIn()
|
||||
icon.removeClass('fa-angle-left').addClass('fa-angle-right')
|
||||
else
|
||||
btn.parent().find('aside').hide()
|
||||
btn.parent().find('section').fadeIn()
|
||||
icon.removeClass('fa-angle-right').addClass('fa-angle-left')
|
39
app/assets/javascripts/autosave.js.coffee
Normal file
|
@ -0,0 +1,39 @@
|
|||
class @Autosave
|
||||
constructor: (field, key) ->
|
||||
@field = field
|
||||
|
||||
key = key.join("/") if key.join?
|
||||
@key = "autosave/#{key}"
|
||||
|
||||
@field.data "autosave", this
|
||||
|
||||
@restore()
|
||||
|
||||
@field.on "input", => @save()
|
||||
|
||||
restore: ->
|
||||
return unless window.localStorage?
|
||||
|
||||
try
|
||||
text = window.localStorage.getItem @key
|
||||
catch
|
||||
return
|
||||
|
||||
@field.val text if text?.length > 0
|
||||
@field.trigger "input"
|
||||
|
||||
save: ->
|
||||
return unless window.localStorage?
|
||||
|
||||
text = @field.val()
|
||||
if text?.length > 0
|
||||
try
|
||||
window.localStorage.setItem @key, text
|
||||
else
|
||||
@reset()
|
||||
|
||||
reset: ->
|
||||
return unless window.localStorage?
|
||||
|
||||
try
|
||||
window.localStorage.removeItem @key
|
21
app/assets/javascripts/behaviors/taskable.js.coffee
Normal file
|
@ -0,0 +1,21 @@
|
|||
window.updateTaskState = (taskableType) ->
|
||||
objType = taskableType.data
|
||||
isChecked = $(this).prop("checked")
|
||||
if $(this).is(":checked")
|
||||
stateEvent = "task_check"
|
||||
else
|
||||
stateEvent = "task_uncheck"
|
||||
|
||||
taskableUrl = $("form.edit-" + objType).first().attr("action")
|
||||
taskableNum = taskableUrl.match(/\d+$/)
|
||||
taskNum = 0
|
||||
$("li.task-list-item input:checkbox").each( (index, e) =>
|
||||
if e == this
|
||||
taskNum = index + 1
|
||||
)
|
||||
|
||||
$.ajax
|
||||
type: "PATCH"
|
||||
url: taskableUrl
|
||||
data: objType + "[state_event]=" + stateEvent +
|
||||
"&" + objType + "[task_num]=" + taskNum
|
|
@ -8,7 +8,7 @@ $ ->
|
|||
#
|
||||
$("body").on "click", ".js-toggle-button", (e) ->
|
||||
$(@).find('i').
|
||||
toggleClass('icon-chevron-down').
|
||||
toggleClass('icon-chevron-up')
|
||||
toggleClass('fa fa-chevron-down').
|
||||
toggleClass('fa fa-chevron-up')
|
||||
$(@).closest(".js-toggle-container").find(".js-toggle-content").toggle()
|
||||
e.preventDefault()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class BlobView
|
||||
class @BlobView
|
||||
constructor: ->
|
||||
# handle multi-line select
|
||||
handleMultiSelect = (e) ->
|
||||
|
@ -26,7 +26,7 @@ class BlobView
|
|||
unless isNaN first_line
|
||||
$("#tree-content-holder .highlight .line").removeClass("hll")
|
||||
$("#LC#{line}").addClass("hll") for line in [first_line..last_line]
|
||||
$.scrollTo("#L#{first_line}") unless e?
|
||||
$.scrollTo("#L#{first_line}", offset: -50) unless e?
|
||||
|
||||
# parse selected lines from hash
|
||||
# always return first and last line (initialized to NaN)
|
||||
|
@ -71,6 +71,3 @@ class BlobView
|
|||
|
||||
# Highlight the correct lines when the hash part of the URL changes
|
||||
$(window).on("hashchange", highlightBlobLines)
|
||||
|
||||
|
||||
@BlobView = BlobView
|
44
app/assets/javascripts/blob/edit_blob.js.coffee
Normal file
|
@ -0,0 +1,44 @@
|
|||
class @EditBlob
|
||||
constructor: (assets_path, mode)->
|
||||
ace.config.set "modePath", assets_path + '/ace'
|
||||
ace.config.loadModule "ace/ext/searchbox"
|
||||
if mode
|
||||
ace_mode = mode
|
||||
editor = ace.edit("editor")
|
||||
editor.focus()
|
||||
@editor = editor
|
||||
|
||||
if ace_mode
|
||||
editor.getSession().setMode "ace/mode/" + ace_mode
|
||||
|
||||
disableButtonIfEmptyField "#commit_message", ".js-commit-button"
|
||||
$(".js-commit-button").click ->
|
||||
$("#file-content").val editor.getValue()
|
||||
$(".file-editor form").submit()
|
||||
return false
|
||||
|
||||
editModePanes = $(".js-edit-mode-pane")
|
||||
editModeLinks = $(".js-edit-mode a")
|
||||
editModeLinks.click (event) ->
|
||||
event.preventDefault()
|
||||
currentLink = $(this)
|
||||
paneId = currentLink.attr("href")
|
||||
currentPane = editModePanes.filter(paneId)
|
||||
editModeLinks.parent().removeClass "active hover"
|
||||
currentLink.parent().addClass "active hover"
|
||||
editModePanes.hide()
|
||||
if paneId is "#preview"
|
||||
currentPane.fadeIn 200
|
||||
$.post currentLink.data("preview-url"),
|
||||
content: editor.getValue()
|
||||
, (response) ->
|
||||
currentPane.empty().append response
|
||||
return
|
||||
|
||||
else
|
||||
currentPane.fadeIn 200
|
||||
editor.focus()
|
||||
return
|
||||
|
||||
editor: ->
|
||||
return @editor
|
21
app/assets/javascripts/blob/new_blob.js.coffee
Normal file
|
@ -0,0 +1,21 @@
|
|||
class @NewBlob
|
||||
constructor: (assets_path, mode)->
|
||||
ace.config.set "modePath", assets_path + '/ace'
|
||||
ace.config.loadModule "ace/ext/searchbox"
|
||||
if mode
|
||||
ace_mode = mode
|
||||
editor = ace.edit("editor")
|
||||
editor.focus()
|
||||
@editor = editor
|
||||
|
||||
if ace_mode
|
||||
editor.getSession().setMode "ace/mode/" + ace_mode
|
||||
|
||||
disableButtonIfEmptyField "#commit_message", ".js-commit-button"
|
||||
$(".js-commit-button").click ->
|
||||
$("#file-content").val editor.getValue()
|
||||
$(".file-editor form").submit()
|
||||
return false
|
||||
|
||||
editor: ->
|
||||
return @editor
|
|
@ -1,4 +1,4 @@
|
|||
class BranchGraph
|
||||
class @BranchGraph
|
||||
constructor: (@element, @options) ->
|
||||
@preparedCommits = {}
|
||||
@mtime = 0
|
||||
|
@ -90,11 +90,15 @@ class BranchGraph
|
|||
|
||||
renderPartialGraph: ->
|
||||
start = Math.floor((@element.scrollTop() - @offsetY) / @unitTime) - 10
|
||||
start = 0 if start < 0
|
||||
if start < 0
|
||||
isGraphEdge = true
|
||||
start = 0
|
||||
end = start + 40
|
||||
end = @commits.length if @commits.length < end
|
||||
if @commits.length < end
|
||||
isGraphEdge = true
|
||||
end = @commits.length
|
||||
|
||||
if @prev_start == -1 or Math.abs(@prev_start - start) > 10
|
||||
if @prev_start == -1 or Math.abs(@prev_start - start) > 10 or isGraphEdge
|
||||
i = start
|
||||
|
||||
@prev_start = start
|
||||
|
@ -120,24 +124,33 @@ class BranchGraph
|
|||
@top.toFront()
|
||||
|
||||
bindEvents: ->
|
||||
drag = {}
|
||||
element = @element
|
||||
|
||||
$(element).scroll (event) =>
|
||||
@renderPartialGraph()
|
||||
|
||||
$(window).on
|
||||
keydown: (event) =>
|
||||
# left
|
||||
element.scrollLeft element.scrollLeft() - 50 if event.keyCode is 37
|
||||
# top
|
||||
element.scrollTop element.scrollTop() - 50 if event.keyCode is 38
|
||||
# right
|
||||
element.scrollLeft element.scrollLeft() + 50 if event.keyCode is 39
|
||||
# bottom
|
||||
element.scrollTop element.scrollTop() + 50 if event.keyCode is 40
|
||||
scrollDown: =>
|
||||
@element.scrollTop @element.scrollTop() + 50
|
||||
@renderPartialGraph()
|
||||
|
||||
scrollUp: =>
|
||||
@element.scrollTop @element.scrollTop() - 50
|
||||
@renderPartialGraph()
|
||||
|
||||
scrollLeft: =>
|
||||
@element.scrollLeft @element.scrollLeft() - 50
|
||||
@renderPartialGraph()
|
||||
|
||||
scrollRight: =>
|
||||
@element.scrollLeft @element.scrollLeft() + 50
|
||||
@renderPartialGraph()
|
||||
|
||||
scrollBottom: =>
|
||||
@element.scrollTop @element.find('svg').height()
|
||||
|
||||
scrollTop: =>
|
||||
@element.scrollTop 0
|
||||
|
||||
appendLabel: (x, y, commit) ->
|
||||
return unless commit.refs
|
||||
|
||||
|
@ -325,5 +338,3 @@ Raphael::textWrap = (t, width) ->
|
|||
b = t.getBBox()
|
||||
h = Math.abs(b.y2) - Math.abs(b.y) + 1
|
||||
t.attr y: b.y + h
|
||||
|
||||
@BranchGraph = BranchGraph
|
||||
|
|
38
app/assets/javascripts/calendar.js.coffee
Normal file
|
@ -0,0 +1,38 @@
|
|||
class @Calendar
|
||||
options =
|
||||
month: "short"
|
||||
day: "numeric"
|
||||
year: "numeric"
|
||||
|
||||
constructor: (timestamps, starting_year, starting_month, calendar_activities_path) ->
|
||||
cal = new CalHeatMap()
|
||||
cal.init
|
||||
itemName: ["contribution"]
|
||||
data: timestamps
|
||||
start: new Date(starting_year, starting_month)
|
||||
domainLabelFormat: "%b"
|
||||
id: "cal-heatmap"
|
||||
domain: "month"
|
||||
subDomain: "day"
|
||||
range: 12
|
||||
tooltip: true
|
||||
label:
|
||||
position: "top"
|
||||
legend: [
|
||||
0
|
||||
10
|
||||
20
|
||||
30
|
||||
]
|
||||
legendCellPadding: 3
|
||||
onClick: (date, count) ->
|
||||
formated_date = date.getFullYear() + "-" + (date.getMonth()+1) + "-" + date.getDate()
|
||||
$.ajax
|
||||
url: calendar_activities_path
|
||||
data:
|
||||
date: formated_date
|
||||
cache: false
|
||||
dataType: "html"
|
||||
success: (data) ->
|
||||
$(".user-calendar-activities").html data
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
@Chart =
|
||||
labels: []
|
||||
values: []
|
||||
|
||||
init: (labels, values, title) ->
|
||||
r = Raphael('activity-chart')
|
||||
|
||||
fin = ->
|
||||
@flag = r.popup(@bar.x, @bar.y, @bar.value or "0").insertBefore(this)
|
||||
|
||||
fout = ->
|
||||
@flag.animate
|
||||
opacity: 0, 300, -> @remove()
|
||||
|
||||
r.text(160, 10, title).attr font: "13px sans-serif"
|
||||
r.barchart(
|
||||
10, 20, 560, 200,
|
||||
[values],
|
||||
{colors:["#456"]}
|
||||
).label(labels, true)
|
||||
.hover(fin, fout)
|
|
@ -1,6 +1,4 @@
|
|||
class Commit
|
||||
class @Commit
|
||||
constructor: ->
|
||||
$('.files .diff-file').each ->
|
||||
new CommitFile(this)
|
||||
|
||||
@Commit = Commit
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
class CommitFile
|
||||
class @CommitFile
|
||||
|
||||
constructor: (file) ->
|
||||
if $('.image', file).length
|
||||
new ImageFile(file)
|
||||
|
||||
@CommitFile = CommitFile
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class ImageFile
|
||||
class @ImageFile
|
||||
|
||||
# Width where images must fits in, for 2-up this gets divided by 2
|
||||
@availWidth = 900
|
||||
|
@ -124,5 +124,3 @@ class ImageFile
|
|||
else
|
||||
img.on 'load', =>
|
||||
callback.call(this, domImg.naturalWidth, domImg.naturalHeight)
|
||||
|
||||
@ImageFile = ImageFile
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class CommitsList
|
||||
class @CommitsList
|
||||
@data =
|
||||
ref: null
|
||||
limit: 0
|
||||
|
@ -53,5 +53,3 @@ class CommitsList
|
|||
@disable
|
||||
callback: =>
|
||||
this.getOld()
|
||||
|
||||
this.CommitsList = CommitsList
|
||||
|
|
18
app/assets/javascripts/confirm_danger_modal.js.coffee
Normal file
|
@ -0,0 +1,18 @@
|
|||
class @ConfirmDangerModal
|
||||
constructor: (form, text) ->
|
||||
@form = form
|
||||
$('.js-confirm-text').text(text || '')
|
||||
$('.js-confirm-danger-input').val('')
|
||||
$('#modal-confirm-danger').modal('show')
|
||||
project_path = $('.js-confirm-danger-match').text()
|
||||
submit = $('.js-confirm-danger-submit')
|
||||
submit.disable()
|
||||
|
||||
$('.js-confirm-danger-input').on 'input', ->
|
||||
if rstrip($(@).val()) is project_path
|
||||
submit.enable()
|
||||
else
|
||||
submit.disable()
|
||||
|
||||
$('.js-confirm-danger-submit').on 'click', =>
|
||||
@form.submit()
|
|
@ -1,33 +1,3 @@
|
|||
class Dashboard
|
||||
class @Dashboard
|
||||
constructor: ->
|
||||
@initSidebarTab()
|
||||
|
||||
$(".dash-filter").keyup ->
|
||||
terms = $(this).val()
|
||||
uiBox = $(this).parents('.panel').first()
|
||||
if terms == "" || terms == undefined
|
||||
uiBox.find(".dash-list li").show()
|
||||
else
|
||||
uiBox.find(".dash-list li").each (index) ->
|
||||
name = $(this).find(".filter-title").text()
|
||||
|
||||
if name.toLowerCase().search(terms.toLowerCase()) == -1
|
||||
$(this).hide()
|
||||
else
|
||||
$(this).show()
|
||||
|
||||
|
||||
|
||||
initSidebarTab: ->
|
||||
key = "dashboard_sidebar_filter"
|
||||
|
||||
# store selection in cookie
|
||||
$('.dash-sidebar-tabs a').on 'click', (e) ->
|
||||
$.cookie(key, $(e.target).attr('id'))
|
||||
|
||||
# show tab from cookie
|
||||
sidebar_filter = $.cookie(key)
|
||||
$("#" + sidebar_filter).tab('show') if sidebar_filter
|
||||
|
||||
|
||||
@Dashboard = Dashboard
|
||||
new ProjectsList()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
class Diff
|
||||
class @Diff
|
||||
UNFOLD_COUNT = 20
|
||||
constructor: ->
|
||||
$(document).off('click', '.js-unfold')
|
||||
$(document).on('click', '.js-unfold', (event) =>
|
||||
target = $(event.target)
|
||||
unfoldBottom = target.hasClass('js-unfold-bottom')
|
||||
|
@ -41,6 +42,3 @@ class Diff
|
|||
lines = line.children().slice(0, 2)
|
||||
line_numbers = ($(l).attr('data-linenumber') for l in lines)
|
||||
(parseInt(line_number) for line_number in line_numbers)
|
||||
|
||||
|
||||
@Diff = Diff
|
||||
|
|
|
@ -4,7 +4,6 @@ $ ->
|
|||
class Dispatcher
|
||||
constructor: () ->
|
||||
@initSearch()
|
||||
@initHighlight()
|
||||
@initPageScripts()
|
||||
|
||||
initPageScripts: ->
|
||||
|
@ -15,50 +14,137 @@ class Dispatcher
|
|||
return false
|
||||
|
||||
path = page.split(':')
|
||||
shortcut_handler = null
|
||||
|
||||
switch page
|
||||
when 'projects:issues:index'
|
||||
Issues.init()
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
when 'projects:issues:show'
|
||||
new Issue()
|
||||
shortcut_handler = new ShortcutsIssueable()
|
||||
new ZenMode()
|
||||
when 'projects:milestones:show'
|
||||
new Milestone()
|
||||
when 'projects:issues:new'
|
||||
when 'projects:milestones:new', 'projects:milestones:edit'
|
||||
new ZenMode()
|
||||
when 'projects:compare:show'
|
||||
new Diff()
|
||||
when 'projects:issues:new','projects:issues:edit'
|
||||
GitLab.GfmAutoComplete.setup()
|
||||
when 'projects:merge_requests:new'
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
new ZenMode()
|
||||
new DropzoneInput($('.issue-form'))
|
||||
if page == 'projects:issues:new'
|
||||
new IssuableForm($('.issue-form'))
|
||||
when 'projects:merge_requests:new', 'projects:merge_requests:edit'
|
||||
GitLab.GfmAutoComplete.setup()
|
||||
new Diff()
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
new ZenMode()
|
||||
new DropzoneInput($('.merge-request-form'))
|
||||
if page == 'projects:merge_requests:new'
|
||||
new IssuableForm($('.merge-request-form'))
|
||||
when 'projects:merge_requests:show'
|
||||
new Diff()
|
||||
shortcut_handler = new ShortcutsIssueable()
|
||||
new ZenMode()
|
||||
when "projects:merge_requests:diffs"
|
||||
new Diff()
|
||||
new ZenMode()
|
||||
when 'projects:merge_requests:index'
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
MergeRequests.init()
|
||||
when 'dashboard:show'
|
||||
new Dashboard()
|
||||
new Activities()
|
||||
when 'dashboard:projects:starred'
|
||||
new Activities()
|
||||
new ProjectsList()
|
||||
when 'projects:commit:show'
|
||||
new Commit()
|
||||
new Diff()
|
||||
when 'groups:show', 'projects:show'
|
||||
new ZenMode()
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
when 'projects:commits:show'
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
when 'projects:show'
|
||||
new Activities()
|
||||
when 'projects:new', 'projects:edit'
|
||||
new Project()
|
||||
when 'projects:teams:members:index'
|
||||
new TeamMembers()
|
||||
when 'groups:members'
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
when 'groups:show'
|
||||
new Activities()
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
new ProjectsList()
|
||||
when 'groups:group_members:index'
|
||||
new GroupMembers()
|
||||
new UsersSelect()
|
||||
when 'projects:project_members:index'
|
||||
new ProjectMembers()
|
||||
new UsersSelect()
|
||||
when 'groups:new', 'groups:edit', 'admin:groups:edit'
|
||||
new GroupAvatar()
|
||||
when 'projects:tree:show'
|
||||
new TreeView()
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
when 'projects:blob:show'
|
||||
new BlobView()
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
when 'projects:labels:new', 'projects:labels:edit'
|
||||
new Labels()
|
||||
when 'projects:network:show'
|
||||
# Ensure we don't create a particular shortcut handler here. This is
|
||||
# already created, where the network graph is created.
|
||||
shortcut_handler = true
|
||||
when 'projects:forks:new'
|
||||
new ProjectFork()
|
||||
when 'users:show'
|
||||
new User()
|
||||
new Activities()
|
||||
when 'admin:users:show'
|
||||
new ProjectsList()
|
||||
|
||||
switch path.first()
|
||||
when 'admin' then new Admin()
|
||||
when 'admin'
|
||||
new Admin()
|
||||
switch path[1]
|
||||
when 'groups'
|
||||
new UsersSelect()
|
||||
when 'projects'
|
||||
new Wikis() if path[1] == 'wikis'
|
||||
new NamespaceSelect()
|
||||
when 'dashboard'
|
||||
shortcut_handler = new ShortcutsDashboardNavigation()
|
||||
when 'profiles'
|
||||
new Profile()
|
||||
when 'projects'
|
||||
new Project()
|
||||
new ProjectAvatar()
|
||||
switch path[1]
|
||||
when 'compare'
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
when 'edit'
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
new ProjectNew()
|
||||
when 'new'
|
||||
new ProjectNew()
|
||||
when 'show'
|
||||
new ProjectShow()
|
||||
when 'issues', 'merge_requests'
|
||||
new UsersSelect()
|
||||
when 'wikis'
|
||||
new Wikis()
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
new ZenMode()
|
||||
new DropzoneInput($('.wiki-form'))
|
||||
when 'snippets', 'labels', 'graphs'
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
when 'project_members', 'deploy_keys', 'hooks', 'services', 'protected_branches'
|
||||
shortcut_handler = new ShortcutsNavigation()
|
||||
|
||||
|
||||
# If we haven't installed a custom shortcut handler, install the default one
|
||||
if not shortcut_handler
|
||||
new Shortcuts()
|
||||
|
||||
initSearch: ->
|
||||
opts = $('.search-autocomplete-opts')
|
||||
path = opts.data('autocomplete-path')
|
||||
|
@ -66,10 +152,3 @@ class Dispatcher
|
|||
project_ref = opts.data('autocomplete-project-ref')
|
||||
|
||||
new SearchAutocomplete(path, project_id, project_ref)
|
||||
|
||||
initHighlight: ->
|
||||
$('.highlight pre code').each (i, e) ->
|
||||
$(e).html($.map($(e).html().split("\n"), (line, i) ->
|
||||
"<span class='line' id='LC" + (i + 1) + "'>" + line + "</span>"
|
||||
).join("\n"))
|
||||
hljs.highlightBlock(e)
|
||||
|
|
243
app/assets/javascripts/dropzone_input.js.coffee
Normal file
|
@ -0,0 +1,243 @@
|
|||
class @DropzoneInput
|
||||
constructor: (form) ->
|
||||
Dropzone.autoDiscover = false
|
||||
alertClass = "alert alert-danger alert-dismissable div-dropzone-alert"
|
||||
alertAttr = "class=\"close\" data-dismiss=\"alert\"" + "aria-hidden=\"true\""
|
||||
divHover = "<div class=\"div-dropzone-hover\"></div>"
|
||||
divSpinner = "<div class=\"div-dropzone-spinner\"></div>"
|
||||
divAlert = "<div class=\"" + alertClass + "\"></div>"
|
||||
iconPaperclip = "<i class=\"fa fa-paperclip div-dropzone-icon\"></i>"
|
||||
iconSpinner = "<i class=\"fa fa-spinner fa-spin div-dropzone-icon\"></i>"
|
||||
btnAlert = "<button type=\"button\"" + alertAttr + ">×</button>"
|
||||
project_uploads_path = window.project_uploads_path or null
|
||||
max_file_size = gon.max_file_size or 10
|
||||
|
||||
form_textarea = $(form).find("textarea.markdown-area")
|
||||
form_textarea.wrap "<div class=\"div-dropzone\"></div>"
|
||||
form_textarea.bind 'paste', (event) =>
|
||||
handlePaste(event)
|
||||
|
||||
form_dropzone = $(form).find('.div-dropzone')
|
||||
form_dropzone.parent().addClass "div-dropzone-wrapper"
|
||||
form_dropzone.append divHover
|
||||
$(".div-dropzone-hover").append iconPaperclip
|
||||
form_dropzone.append divSpinner
|
||||
$(".div-dropzone-spinner").append iconSpinner
|
||||
$(".div-dropzone-spinner").css
|
||||
"opacity": 0
|
||||
"display": "none"
|
||||
|
||||
# Preview button
|
||||
$(document).off "click", ".js-md-preview-button"
|
||||
$(document).on "click", ".js-md-preview-button", (e) ->
|
||||
###
|
||||
Shows the Markdown preview.
|
||||
|
||||
Lets the server render GFM into Html and displays it.
|
||||
###
|
||||
e.preventDefault()
|
||||
form = $(this).closest("form")
|
||||
# toggle tabs
|
||||
form.find(".js-md-write-button").parent().removeClass "active"
|
||||
form.find(".js-md-preview-button").parent().addClass "active"
|
||||
|
||||
# toggle content
|
||||
form.find(".md-write-holder").hide()
|
||||
form.find(".md-preview-holder").show()
|
||||
|
||||
preview = form.find(".js-md-preview")
|
||||
mdText = form.find(".markdown-area").val()
|
||||
if mdText.trim().length is 0
|
||||
preview.text "Nothing to preview."
|
||||
else
|
||||
preview.text "Loading..."
|
||||
$.post($(this).data("url"),
|
||||
md_text: mdText
|
||||
).success (previewData) ->
|
||||
preview.html previewData
|
||||
|
||||
# Write button
|
||||
$(document).off "click", ".js-md-write-button"
|
||||
$(document).on "click", ".js-md-write-button", (e) ->
|
||||
###
|
||||
Shows the Markdown textarea.
|
||||
###
|
||||
e.preventDefault()
|
||||
form = $(this).closest("form")
|
||||
# toggle tabs
|
||||
form.find(".js-md-write-button").parent().addClass "active"
|
||||
form.find(".js-md-preview-button").parent().removeClass "active"
|
||||
|
||||
# toggle content
|
||||
form.find(".md-write-holder").show()
|
||||
form.find(".md-preview-holder").hide()
|
||||
|
||||
dropzone = form_dropzone.dropzone(
|
||||
url: project_uploads_path
|
||||
dictDefaultMessage: ""
|
||||
clickable: true
|
||||
paramName: "file"
|
||||
maxFilesize: max_file_size
|
||||
uploadMultiple: false
|
||||
headers:
|
||||
"X-CSRF-Token": $("meta[name=\"csrf-token\"]").attr("content")
|
||||
|
||||
previewContainer: false
|
||||
|
||||
processing: ->
|
||||
$(".div-dropzone-alert").alert "close"
|
||||
|
||||
dragover: ->
|
||||
form_textarea.addClass "div-dropzone-focus"
|
||||
form.find(".div-dropzone-hover").css "opacity", 0.7
|
||||
return
|
||||
|
||||
dragleave: ->
|
||||
form_textarea.removeClass "div-dropzone-focus"
|
||||
form.find(".div-dropzone-hover").css "opacity", 0
|
||||
return
|
||||
|
||||
drop: ->
|
||||
form_textarea.removeClass "div-dropzone-focus"
|
||||
form.find(".div-dropzone-hover").css "opacity", 0
|
||||
form_textarea.focus()
|
||||
return
|
||||
|
||||
success: (header, response) ->
|
||||
child = $(dropzone[0]).children("textarea")
|
||||
$(child).val $(child).val() + formatLink(response.link) + "\n"
|
||||
return
|
||||
|
||||
error: (temp, errorMessage) ->
|
||||
errorAlert = $(form).find('.error-alert')
|
||||
checkIfMsgExists = errorAlert.children().length
|
||||
if checkIfMsgExists is 0
|
||||
errorAlert.append divAlert
|
||||
$(".div-dropzone-alert").append btnAlert + errorMessage
|
||||
return
|
||||
|
||||
sending: ->
|
||||
form_dropzone.find(".div-dropzone-spinner").css
|
||||
"opacity": 0.7
|
||||
"display": "inherit"
|
||||
return
|
||||
|
||||
complete: ->
|
||||
$(".dz-preview").remove()
|
||||
$(".markdown-area").trigger "input"
|
||||
$(".div-dropzone-spinner").css
|
||||
"opacity": 0
|
||||
"display": "none"
|
||||
return
|
||||
)
|
||||
|
||||
child = $(dropzone[0]).children("textarea")
|
||||
|
||||
formatLink = (link) ->
|
||||
text = "[#{link.alt}](#{link.url})"
|
||||
text = "!#{text}" if link.is_image
|
||||
text
|
||||
|
||||
handlePaste = (event) ->
|
||||
pasteEvent = event.originalEvent
|
||||
if pasteEvent.clipboardData and pasteEvent.clipboardData.items
|
||||
image = isImage(pasteEvent)
|
||||
if image
|
||||
event.preventDefault()
|
||||
|
||||
filename = getFilename(pasteEvent) or "image.png"
|
||||
text = "{{" + filename + "}}"
|
||||
pasteText(text)
|
||||
uploadFile image.getAsFile(), filename
|
||||
|
||||
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
|
||||
form_textarea.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 "file", item, filename
|
||||
$.ajax
|
||||
url: project_uploads_path
|
||||
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) ->
|
||||
form.find(".div-dropzone-spinner").css
|
||||
"opacity": 0.7
|
||||
"display": "inherit"
|
||||
|
||||
closeSpinner = ->
|
||||
form.find(".div-dropzone-spinner").css
|
||||
"opacity": 0
|
||||
"display": "none"
|
||||
|
||||
showError = (message) ->
|
||||
errorAlert = $(form).find('.error-alert')
|
||||
checkIfMsgExists = errorAlert.children().length
|
||||
if checkIfMsgExists is 0
|
||||
errorAlert.append divAlert
|
||||
$(".div-dropzone-alert").append btnAlert + message
|
||||
|
||||
closeAlertMessage = ->
|
||||
form.find(".div-dropzone-alert").alert "close"
|
||||
|
||||
form.find(".markdown-selector").click (e) ->
|
||||
e.preventDefault()
|
||||
$(@).closest('.gfm-form').find('.div-dropzone').click()
|
||||
return
|
||||
|
||||
formatLink: (link) ->
|
||||
text = "[#{link.alt}](#{link.url})"
|
||||
text = "!#{text}" if link.is_image
|
||||
text
|
|
@ -1,4 +1,4 @@
|
|||
class Flash
|
||||
class @Flash
|
||||
constructor: (message, type)->
|
||||
flash = $(".flash-container")
|
||||
flash.html("")
|
||||
|
@ -10,6 +10,3 @@ class Flash
|
|||
|
||||
flash.click -> $(@).fadeOut()
|
||||
flash.show()
|
||||
setTimeout (-> flash.fadeOut()), 5000
|
||||
|
||||
@Flash = Flash
|
||||
|
|
9
app/assets/javascripts/group_avatar.js.coffee
Normal file
|
@ -0,0 +1,9 @@
|
|||
class @GroupAvatar
|
||||
constructor: ->
|
||||
$('.js-choose-group-avatar-button').bind "click", ->
|
||||
form = $(this).closest("form")
|
||||
form.find(".js-group-avatar-input").click()
|
||||
$('.js-group-avatar-input').bind "change", ->
|
||||
form = $(this).closest("form")
|
||||
filename = $(this).val().replace(/^.*[\\\/]/, '')
|
||||
form.find(".js-avatar-filename").text(filename)
|
|
@ -1,17 +1,4 @@
|
|||
class GroupMembers
|
||||
class @GroupMembers
|
||||
constructor: ->
|
||||
$('li.users_group').bind 'ajax:success', ->
|
||||
$('li.group_member').bind 'ajax:success', ->
|
||||
$(this).fadeOut()
|
||||
|
||||
@GroupMembers = GroupMembers
|
||||
|
||||
$ ->
|
||||
# avatar
|
||||
$('.js-choose-group-avatar-button').bind "click", ->
|
||||
form = $(this).closest("form")
|
||||
form.find(".js-group-avatar-input").click()
|
||||
|
||||
$('.js-group-avatar-input').bind "change", ->
|
||||
form = $(this).closest("form")
|
||||
filename = $(this).val().replace(/^.*[\\\/]/, '')
|
||||
form.find(".js-avatar-filename").text(filename)
|
||||
|
|
41
app/assets/javascripts/groups_select.js.coffee
Normal file
|
@ -0,0 +1,41 @@
|
|||
class @GroupsSelect
|
||||
constructor: ->
|
||||
$('.ajax-groups-select').each (i, select) =>
|
||||
skip_ldap = $(select).hasClass('skip_ldap')
|
||||
|
||||
$(select).select2
|
||||
placeholder: "Search for a group"
|
||||
multiple: $(select).hasClass('multiselect')
|
||||
minimumInputLength: 0
|
||||
query: (query) ->
|
||||
Api.groups query.term, skip_ldap, (groups) ->
|
||||
data = { results: groups }
|
||||
query.callback(data)
|
||||
|
||||
initSelection: (element, callback) ->
|
||||
id = $(element).val()
|
||||
if id isnt ""
|
||||
Api.group(id, callback)
|
||||
|
||||
|
||||
formatResult: (args...) =>
|
||||
@formatResult(args...)
|
||||
formatSelection: (args...) =>
|
||||
@formatSelection(args...)
|
||||
dropdownCssClass: "ajax-groups-dropdown"
|
||||
escapeMarkup: (m) -> # we do not want to escape markup since we are displaying html in results
|
||||
m
|
||||
|
||||
formatResult: (group) ->
|
||||
if group.avatar_url
|
||||
avatar = group.avatar_url
|
||||
else
|
||||
avatar = gon.default_avatar_url
|
||||
|
||||
"<div class='group-result'>
|
||||
<div class='group-name'>#{group.name}</div>
|
||||
<div class='group-path'>#{group.path}</div>
|
||||
</div>"
|
||||
|
||||
formatSelection: (group) ->
|
||||
group.name
|
35
app/assets/javascripts/importer_status.js.coffee
Normal file
|
@ -0,0 +1,35 @@
|
|||
class @ImporterStatus
|
||||
constructor: (@jobs_url, @import_url) ->
|
||||
this.initStatusPage()
|
||||
this.setAutoUpdate()
|
||||
|
||||
initStatusPage: ->
|
||||
$(".js-add-to-import").click (event) =>
|
||||
new_namespace = null
|
||||
tr = $(event.currentTarget).closest("tr")
|
||||
id = tr.attr("id").replace("repo_", "")
|
||||
if tr.find(".import-target input").length > 0
|
||||
new_namespace = tr.find(".import-target input").prop("value")
|
||||
tr.find(".import-target").empty().append(new_namespace + "/" + tr.find(".import-target").data("project_name"))
|
||||
$.post @import_url, {repo_id: id, new_namespace: new_namespace}, dataType: 'script'
|
||||
|
||||
$(".js-import-all").click (event) =>
|
||||
$(".js-add-to-import").each ->
|
||||
$(this).click()
|
||||
|
||||
setAutoUpdate: ->
|
||||
setInterval (=>
|
||||
$.get @jobs_url, (data) =>
|
||||
$.each data, (i, job) =>
|
||||
job_item = $("#project_" + job.id)
|
||||
status_field = job_item.find(".job-status")
|
||||
|
||||
if job.import_status == 'finished'
|
||||
job_item.removeClass("active").addClass("success")
|
||||
status_field.html('<span><i class="fa fa-check"></i> done</span>')
|
||||
else if job.import_status == 'started'
|
||||
status_field.html("<i class='fa fa-spinner fa-spin'></i> started")
|
||||
else
|
||||
status_field.html(job.import_status)
|
||||
|
||||
), 4000
|
28
app/assets/javascripts/issuable_form.js.coffee
Normal file
|
@ -0,0 +1,28 @@
|
|||
class @IssuableForm
|
||||
constructor: (@form) ->
|
||||
@titleField = @form.find("input[name*='[title]']")
|
||||
@descriptionField = @form.find("textarea[name*='[description]']")
|
||||
|
||||
return unless @titleField.length && @descriptionField.length
|
||||
|
||||
@initAutosave()
|
||||
|
||||
@form.on "submit", @resetAutosave
|
||||
@form.on "click", ".btn-cancel", @resetAutosave
|
||||
|
||||
initAutosave: ->
|
||||
new Autosave @titleField, [
|
||||
document.location.pathname,
|
||||
document.location.search,
|
||||
"title"
|
||||
]
|
||||
|
||||
new Autosave @descriptionField, [
|
||||
document.location.pathname,
|
||||
document.location.search,
|
||||
"description"
|
||||
]
|
||||
|
||||
resetAutosave: =>
|
||||
@titleField.data("autosave").reset()
|
||||
@descriptionField.data("autosave").reset()
|
|
@ -1,9 +1,24 @@
|
|||
class Issue
|
||||
class @Issue
|
||||
constructor: ->
|
||||
$('.edit-issue.inline-update input[type="submit"]').hide()
|
||||
$(".issue-box .inline-update").on "change", "select", ->
|
||||
$(".context .inline-update").on "change", "select", ->
|
||||
$(this).submit()
|
||||
$(".issue-box .inline-update").on "change", "#issue_assignee_id", ->
|
||||
$(".context .inline-update").on "change", "#issue_assignee_id", ->
|
||||
$(this).submit()
|
||||
|
||||
@Issue = Issue
|
||||
if $("a.btn-close").length
|
||||
$("li.task-list-item input:checkbox").prop("disabled", false)
|
||||
|
||||
$('.task-list-item input:checkbox').off('change')
|
||||
$('.task-list-item input:checkbox').change('issue', updateTaskState)
|
||||
|
||||
$('.issue-details').waitForImages ->
|
||||
$('.issuable-affix').affix offset:
|
||||
top: ->
|
||||
@top = ($('.issuable-affix').offset().top - 70)
|
||||
bottom: ->
|
||||
@bottom = $('.footer').outerHeight(true)
|
||||
$('.issuable-affix').on 'affix.bs.affix', ->
|
||||
$(@).width($(@).outerWidth())
|
||||
.on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
|
||||
$(@).width('')
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
$(this).html totalIssues + 1
|
||||
else
|
||||
$(this).html totalIssues - 1
|
||||
$("body").on "click", ".issues-filters .dropdown-menu a", ->
|
||||
$("body").on "click", ".issues-other-filters .dropdown-menu a", ->
|
||||
$('.issues-list').block(
|
||||
message: null,
|
||||
overlayCSS:
|
||||
|
@ -43,23 +43,29 @@
|
|||
|
||||
$(".selected_issue").bind "change", Issues.checkChanged
|
||||
|
||||
|
||||
# Make sure we trigger ajax request only after user stop typing
|
||||
initSearch: ->
|
||||
form = $("#issue_search_form")
|
||||
last_terms = ""
|
||||
@timer = null
|
||||
$("#issue_search").keyup ->
|
||||
terms = $(this).val()
|
||||
unless terms is last_terms
|
||||
last_terms = terms
|
||||
if terms.length >= 2 or terms.length is 0
|
||||
clearTimeout(@timer)
|
||||
@timer = setTimeout(Issues.filterResults, 500)
|
||||
|
||||
filterResults: =>
|
||||
form = $("#issue_search_form")
|
||||
search = $("#issue_search").val()
|
||||
$('.issues-holder').css("opacity", '0.5')
|
||||
issues_url = form.attr('action') + '? '+ form.serialize()
|
||||
|
||||
$.ajax
|
||||
type: "GET"
|
||||
url: location.href
|
||||
data: "issue_search=" + terms
|
||||
url: form.attr('action')
|
||||
data: form.serialize()
|
||||
complete: ->
|
||||
$(".loading").hide()
|
||||
$('.issues-holder').css("opacity", '1.0')
|
||||
success: (data) ->
|
||||
$('.issues-holder').html(data.html)
|
||||
# Change url so if user reload a page - search results are saved
|
||||
History.replaceState {page: issues_url}, document.title, issues_url
|
||||
Issues.reload()
|
||||
dataType: "json"
|
||||
|
||||
|
@ -71,9 +77,9 @@
|
|||
ids.push $(value).attr("data-id")
|
||||
|
||||
$("#update_issues_ids").val ids
|
||||
$(".issues-filters").hide()
|
||||
$(".issues-other-filters").hide()
|
||||
$(".issues_bulk_update").show()
|
||||
else
|
||||
$("#update_issues_ids").val []
|
||||
$(".issues_bulk_update").hide()
|
||||
$(".issues-filters").show()
|
||||
$(".issues-other-filters").show()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Labels
|
||||
class @Labels
|
||||
constructor: ->
|
||||
form = $('.label-form')
|
||||
@setupLabelForm(form)
|
||||
|
@ -31,5 +31,3 @@ class Labels
|
|||
# Notify the form, that color has changed
|
||||
$('.label-form').trigger('keyup')
|
||||
e.preventDefault()
|
||||
|
||||
@Labels = Labels
|
||||
|
|
|
@ -1,196 +0,0 @@
|
|||
formatLink = (str) ->
|
||||
"![" + str.alt + "](" + str.url + ")"
|
||||
|
||||
$(document).ready ->
|
||||
alertClass = "alert alert-danger alert-dismissable div-dropzone-alert"
|
||||
alertAttr = "class=\"close\" data-dismiss=\"alert\"" + "aria-hidden=\"true\""
|
||||
divHover = "<div class=\"div-dropzone-hover\"></div>"
|
||||
divSpinner = "<div class=\"div-dropzone-spinner\"></div>"
|
||||
divAlert = "<div class=\"" + alertClass + "\"></div>"
|
||||
iconPicture = "<i class=\"icon-picture div-dropzone-icon\"></i>"
|
||||
iconSpinner = "<i class=\"icon-spinner icon-spin div-dropzone-icon\"></i>"
|
||||
btnAlert = "<button type=\"button\"" + alertAttr + ">×</button>"
|
||||
project_image_path_upload = window.project_image_path_upload or null
|
||||
|
||||
$("textarea.markdown-area").wrap "<div class=\"div-dropzone\"></div>"
|
||||
|
||||
$(".div-dropzone").parent().addClass "div-dropzone-wrapper"
|
||||
|
||||
$(".div-dropzone").append divHover
|
||||
$(".div-dropzone-hover").append iconPicture
|
||||
$(".div-dropzone").append divSpinner
|
||||
$(".div-dropzone-spinner").append iconSpinner
|
||||
$(".div-dropzone-spinner").css
|
||||
"opacity": 0
|
||||
"display": "none"
|
||||
|
||||
dropzone = $(".div-dropzone").dropzone(
|
||||
url: project_image_path_upload
|
||||
dictDefaultMessage: ""
|
||||
clickable: true
|
||||
paramName: "markdown_img"
|
||||
maxFilesize: 10
|
||||
uploadMultiple: false
|
||||
acceptedFiles: "image/jpg,image/jpeg,image/gif,image/png"
|
||||
headers:
|
||||
"X-CSRF-Token": $("meta[name=\"csrf-token\"]").attr("content")
|
||||
|
||||
previewContainer: false
|
||||
|
||||
processing: ->
|
||||
$(".div-dropzone-alert").alert "close"
|
||||
|
||||
dragover: ->
|
||||
$(".div-dropzone > textarea").addClass "div-dropzone-focus"
|
||||
$(".div-dropzone-hover").css "opacity", 0.7
|
||||
return
|
||||
|
||||
dragleave: ->
|
||||
$(".div-dropzone > textarea").removeClass "div-dropzone-focus"
|
||||
$(".div-dropzone-hover").css "opacity", 0
|
||||
return
|
||||
|
||||
drop: ->
|
||||
$(".div-dropzone > textarea").removeClass "div-dropzone-focus"
|
||||
$(".div-dropzone-hover").css "opacity", 0
|
||||
$(".div-dropzone > textarea").focus()
|
||||
return
|
||||
|
||||
success: (header, response) ->
|
||||
child = $(dropzone[0]).children("textarea")
|
||||
$(child).val $(child).val() + formatLink(response.link) + "\n"
|
||||
return
|
||||
|
||||
error: (temp, errorMessage) ->
|
||||
checkIfMsgExists = $(".error-alert").children().length
|
||||
if checkIfMsgExists is 0
|
||||
$(".error-alert").append divAlert
|
||||
$(".div-dropzone-alert").append btnAlert + errorMessage
|
||||
return
|
||||
|
||||
sending: ->
|
||||
$(".div-dropzone-spinner").css
|
||||
"opacity": 0.7
|
||||
"display": "inherit"
|
||||
return
|
||||
|
||||
complete: ->
|
||||
$(".dz-preview").remove()
|
||||
$(".markdown-area").trigger "input"
|
||||
$(".div-dropzone-spinner").css
|
||||
"opacity": 0
|
||||
"display": "none"
|
||||
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
|
||||
"display": "inherit"
|
||||
|
||||
closeSpinner = ->
|
||||
$(".div-dropzone-spinner").css
|
||||
"opacity": 0
|
||||
"display": "none"
|
||||
|
||||
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()
|
||||
$(@).closest(".div-dropzone-wrapper").find(".div-dropzone").click()
|
||||
return
|
||||
|
||||
return
|
|
@ -1,4 +1,4 @@
|
|||
class MergeRequest
|
||||
class @MergeRequest
|
||||
constructor: (@opts) ->
|
||||
@initContextWidget()
|
||||
this.$el = $('.merge-request')
|
||||
|
@ -15,8 +15,21 @@ class MergeRequest
|
|||
|
||||
modal = $('#modal_merge_info').modal(show: false)
|
||||
|
||||
disableButtonIfEmptyField '#merge_commit_message', '.accept_merge_request'
|
||||
disableButtonIfEmptyField '#commit_message', '.accept_merge_request'
|
||||
|
||||
if $("a.btn-close").length
|
||||
$("li.task-list-item input:checkbox").prop("disabled", false)
|
||||
|
||||
$('.merge-request-details').waitForImages ->
|
||||
$('.issuable-affix').affix offset:
|
||||
top: ->
|
||||
@top = ($('.issuable-affix').offset().top - 70)
|
||||
bottom: ->
|
||||
@bottom = $('.footer').outerHeight(true)
|
||||
$('.issuable-affix').on 'affix.bs.affix', ->
|
||||
$(@).width($(@).outerWidth())
|
||||
.on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
|
||||
$(@).width('')
|
||||
|
||||
# Local jQuery finder
|
||||
$: (selector) ->
|
||||
|
@ -24,9 +37,9 @@ class MergeRequest
|
|||
|
||||
initContextWidget: ->
|
||||
$('.edit-merge_request.inline-update input[type="submit"]').hide()
|
||||
$(".issue-box .inline-update").on "change", "select", ->
|
||||
$(".context .inline-update").on "change", "select", ->
|
||||
$(this).submit()
|
||||
$(".issue-box .inline-update").on "change", "#merge_request_assignee_id", ->
|
||||
$(".context .inline-update").on "change", "#merge_request_assignee_id", ->
|
||||
$(this).submit()
|
||||
|
||||
initMergeWidget: ->
|
||||
|
@ -40,6 +53,8 @@ class MergeRequest
|
|||
if @opts.ci_enable
|
||||
$.get @opts.url_to_ci_check, (data) =>
|
||||
this.showCiState data.status
|
||||
if data.coverage
|
||||
this.showCiCoverage data.coverage
|
||||
, 'json'
|
||||
|
||||
bindEvents: ->
|
||||
|
@ -70,6 +85,9 @@ class MergeRequest
|
|||
this.$('.remove_source_branch_in_progress').hide()
|
||||
this.$('.remove_source_branch_widget.failed').show()
|
||||
|
||||
$('.task-list-item input:checkbox').off('change')
|
||||
$('.task-list-item input:checkbox').change('merge_request', updateTaskState)
|
||||
|
||||
activateTab: (action) ->
|
||||
this.$('.merge-request-tabs li').removeClass 'active'
|
||||
this.$('.tab-content').hide()
|
||||
|
@ -78,6 +96,10 @@ class MergeRequest
|
|||
this.$('.merge-request-tabs .diffs-tab').addClass 'active'
|
||||
this.loadDiff() unless @diffs_loaded
|
||||
this.$('.diffs').show()
|
||||
$(".diff-header").trigger("sticky_kit:recalc")
|
||||
when 'commits'
|
||||
this.$('.merge-request-tabs .commits-tab').addClass 'active'
|
||||
this.$('.commits').show()
|
||||
else
|
||||
this.$('.merge-request-tabs .notes-tab').addClass 'active'
|
||||
this.$('.notes').show()
|
||||
|
@ -88,26 +110,28 @@ class MergeRequest
|
|||
|
||||
showCiState: (state) ->
|
||||
$('.ci_widget').hide()
|
||||
allowed_states = ["failed", "running", "pending", "success"]
|
||||
allowed_states = ["failed", "canceled", "running", "pending", "success"]
|
||||
if state in allowed_states
|
||||
$('.ci_widget.ci-' + state).show()
|
||||
switch state
|
||||
when "failed", "canceled"
|
||||
@setMergeButtonClass('btn-danger')
|
||||
when "running", "pending"
|
||||
@setMergeButtonClass('btn-warning')
|
||||
else
|
||||
$('.ci_widget.ci-error').show()
|
||||
@setMergeButtonClass('btn-danger')
|
||||
|
||||
switch state
|
||||
when "success"
|
||||
$('.mr-state-widget').addClass("panel-success")
|
||||
when "failed"
|
||||
$('.mr-state-widget').addClass("panel-danger")
|
||||
when "running", "pending"
|
||||
$('.mr-state-widget').addClass("panel-warning")
|
||||
|
||||
|
||||
showCiCoverage: (coverage) ->
|
||||
cov_html = $('<span>')
|
||||
cov_html.addClass('ci-coverage')
|
||||
cov_html.text('Coverage ' + coverage + '%')
|
||||
$('.ci_widget:visible').append(cov_html)
|
||||
|
||||
loadDiff: (event) ->
|
||||
$.ajax
|
||||
type: 'GET'
|
||||
url: this.$('.merge-request-tabs .diffs-tab a').attr('href')
|
||||
url: this.$('.merge-request-tabs .diffs-tab a').attr('href') + ".json"
|
||||
beforeSend: =>
|
||||
this.$('.mr-loading-status .loading').show()
|
||||
complete: =>
|
||||
|
@ -126,4 +150,17 @@ class MergeRequest
|
|||
this.$('.merge-in-progress').hide()
|
||||
this.$('.automerge_widget.already_cannot_be_merged').show()
|
||||
|
||||
this.MergeRequest = MergeRequest
|
||||
setMergeButtonClass: (css_class) ->
|
||||
$('.accept_merge_request').removeClass("btn-create").addClass(css_class)
|
||||
|
||||
mergeInProgress: ->
|
||||
$.ajax
|
||||
type: 'GET'
|
||||
url: $('.merge-request').data('url')
|
||||
success: (data) =>
|
||||
switch data.state
|
||||
when 'merged'
|
||||
location.reload()
|
||||
else
|
||||
setTimeout(merge_request.mergeInProgress, 3000)
|
||||
dataType: 'json'
|
||||
|
|
|
@ -1,8 +1,35 @@
|
|||
#
|
||||
# * Filter merge requests
|
||||
#
|
||||
@merge_requestsPage = ->
|
||||
$('#assignee_id').select2()
|
||||
$('#milestone_id').select2()
|
||||
$('#milestone_id, #assignee_id').on 'change', ->
|
||||
$(this).closest('form').submit()
|
||||
@MergeRequests =
|
||||
init: ->
|
||||
MergeRequests.initSearch()
|
||||
|
||||
# Make sure we trigger ajax request only after user stop typing
|
||||
initSearch: ->
|
||||
@timer = null
|
||||
$("#issue_search").keyup ->
|
||||
clearTimeout(@timer)
|
||||
@timer = setTimeout(MergeRequests.filterResults, 500)
|
||||
|
||||
filterResults: =>
|
||||
form = $("#issue_search_form")
|
||||
search = $("#issue_search").val()
|
||||
$('.merge-requests-holder').css("opacity", '0.5')
|
||||
issues_url = form.attr('action') + '? '+ form.serialize()
|
||||
|
||||
$.ajax
|
||||
type: "GET"
|
||||
url: form.attr('action')
|
||||
data: form.serialize()
|
||||
complete: ->
|
||||
$('.merge-requests-holder').css("opacity", '1.0')
|
||||
success: (data) ->
|
||||
$('.merge-requests-holder').html(data.html)
|
||||
# Change url so if user reload a page - search results are saved
|
||||
History.replaceState {page: issues_url}, document.title, issues_url
|
||||
MergeRequests.reload()
|
||||
dataType: "json"
|
||||
|
||||
reload: ->
|
||||
$('#filter_issue_search').val($('#issue_search').val())
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Milestone
|
||||
class @Milestone
|
||||
@updateIssue: (li, issue_url, data) ->
|
||||
$.ajax
|
||||
type: "PUT"
|
||||
|
@ -49,6 +49,13 @@ class Milestone
|
|||
data: data
|
||||
success: (data) ->
|
||||
if data.saved == true
|
||||
if data.assignee_avatar_url
|
||||
img_tag = $('<img/>')
|
||||
img_tag.attr('src', data.assignee_avatar_url)
|
||||
img_tag.addClass('avatar s16')
|
||||
$(li).find('.assignee-icon').html(img_tag)
|
||||
else
|
||||
$(li).find('.assignee-icon').html('')
|
||||
$(li).effect 'highlight'
|
||||
else
|
||||
new Flash("Issue update failed", 'alert')
|
||||
|
@ -115,5 +122,3 @@ class Milestone
|
|||
Milestone.updateMergeRequest(ui.item, merge_request_url, data)
|
||||
|
||||
).disableSelection()
|
||||
|
||||
@Milestone = Milestone
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
$ ->
|
||||
class @NamespaceSelect
|
||||
constructor: ->
|
||||
namespaceFormatResult = (namespace) ->
|
||||
markup = "<div class='namespace-result'>"
|
||||
markup += "<span class='namespace-kind'>" + namespace.kind + "</span>"
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
class Network
|
||||
class @Network
|
||||
constructor: (opts) ->
|
||||
$("#filter_ref").click ->
|
||||
$(this).closest('form').submit()
|
||||
|
||||
branch_graph = new BranchGraph($(".network-graph"), opts)
|
||||
@branch_graph = new BranchGraph($(".network-graph"), opts)
|
||||
|
||||
vph = $(window).height() - 250
|
||||
$('.network-graph').css 'height': (vph + 'px')
|
||||
|
||||
@Network = Network
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Notes
|
||||
class @Notes
|
||||
@interval: null
|
||||
|
||||
constructor: (notes_url, note_ids, last_fetched_at) ->
|
||||
|
@ -6,6 +6,7 @@ class Notes
|
|||
@notes_url = gon.relative_url_root + @notes_url if gon.relative_url_root?
|
||||
@note_ids = note_ids
|
||||
@last_fetched_at = last_fetched_at
|
||||
@noteable_url = document.URL
|
||||
@initRefresh()
|
||||
@setupMainTargetNoteForm()
|
||||
@cleanBinding()
|
||||
|
@ -23,23 +24,21 @@ class Notes
|
|||
$(document).on "click", ".js-note-edit", @showEditForm
|
||||
$(document).on "click", ".note-edit-cancel", @cancelEdit
|
||||
|
||||
# Reopen and close actions for Issue/MR combined with note form submit
|
||||
$(document).on "click", ".js-note-target-reopen", @targetReopen
|
||||
$(document).on "click", ".js-note-target-close", @targetClose
|
||||
$(document).on "click", ".js-comment-button", @updateCloseButton
|
||||
$(document).on "keyup", ".js-note-text", @updateTargetButtons
|
||||
|
||||
# remove a note (in general)
|
||||
$(document).on "click", ".js-note-delete", @removeNote
|
||||
|
||||
# delete note attachment
|
||||
$(document).on "click", ".js-note-attachment-delete", @removeAttachment
|
||||
|
||||
# Preview button
|
||||
$(document).on "click", ".js-note-preview-button", @previewNote
|
||||
|
||||
# Preview button
|
||||
$(document).on "click", ".js-note-write-button", @writeNote
|
||||
|
||||
# reset main target form after submit
|
||||
$(document).on "ajax:complete", ".js-main-target-form", @resetMainTargetForm
|
||||
|
||||
# attachment button
|
||||
$(document).on "click", ".js-choose-note-attachment-button", @chooseNoteAttachment
|
||||
$(document).on "ajax:complete", ".js-main-target-form", @reenableTargetFormSubmitButton
|
||||
$(document).on "ajax:success", ".js-main-target-form", @resetMainTargetForm
|
||||
|
||||
# update the file name when an attachment is selected
|
||||
$(document).on "change", ".js-note-attachment-input", @updateFormAttachment
|
||||
|
@ -57,8 +56,10 @@ class Notes
|
|||
$(document).on "visibilitychange", @visibilityChange
|
||||
|
||||
@notes_forms = '.js-main-target-form textarea, .js-discussion-note-form textarea'
|
||||
$(document).on('keypress', @notes_forms, (e)->
|
||||
if e.keyCode == 10 || (e.ctrlKey && e.keyCode == 13)
|
||||
# Chrome doesn't fire keypress or keyup for Command+Enter, so we need keydown.
|
||||
$(document).on('keydown', @notes_forms, (e) ->
|
||||
return if e.originalEvent.repeat
|
||||
if e.keyCode == 10 || ((e.metaKey || e.ctrlKey) && e.keyCode == 13)
|
||||
$(@).parents('form').submit()
|
||||
)
|
||||
|
||||
|
@ -70,15 +71,15 @@ class Notes
|
|||
$(document).off "click", ".note-edit-cancel"
|
||||
$(document).off "click", ".js-note-delete"
|
||||
$(document).off "click", ".js-note-attachment-delete"
|
||||
$(document).off "click", ".js-note-preview-button"
|
||||
$(document).off "click", ".js-note-write-button"
|
||||
$(document).off "ajax:complete", ".js-main-target-form"
|
||||
$(document).off "click", ".js-choose-note-attachment-button"
|
||||
$(document).off "ajax:success", ".js-main-target-form"
|
||||
$(document).off "click", ".js-discussion-reply-button"
|
||||
$(document).off "click", ".js-add-diff-note-button"
|
||||
$(document).off "visibilitychange"
|
||||
$(document).off "keypress", @notes_forms
|
||||
|
||||
$(document).off "keydown", @notes_forms
|
||||
$(document).off "keyup", ".js-note-text"
|
||||
$(document).off "click", ".js-note-target-reopen"
|
||||
$(document).off "click", ".js-note-target-close"
|
||||
|
||||
initRefresh: ->
|
||||
clearInterval(Notes.interval)
|
||||
|
@ -87,7 +88,8 @@ class Notes
|
|||
, 15000
|
||||
|
||||
refresh: ->
|
||||
@getContent() unless document.hidden
|
||||
unless document.hidden or (@noteable_url != document.URL)
|
||||
@getContent()
|
||||
|
||||
getContent: ->
|
||||
$.ajax
|
||||
|
@ -112,10 +114,6 @@ class Notes
|
|||
if @isNewNote(note)
|
||||
@note_ids.push(note.id)
|
||||
$('ul.main-notes-list').append(note.html)
|
||||
code = "#note_" + note.id + " .highlight pre code"
|
||||
$(code).each (i, e) ->
|
||||
hljs.highlightBlock(e)
|
||||
|
||||
|
||||
###
|
||||
Check if note does not exists on page
|
||||
|
@ -155,47 +153,6 @@ class Notes
|
|||
# cleanup after successfully creating a diff/discussion note
|
||||
@removeDiscussionNoteForm(form)
|
||||
|
||||
###
|
||||
Shows write note textarea.
|
||||
###
|
||||
writeNote: (e) ->
|
||||
e.preventDefault()
|
||||
form = $(this).closest("form")
|
||||
# toggle tabs
|
||||
form.find(".js-note-write-button").parent().addClass "active"
|
||||
form.find(".js-note-preview-button").parent().removeClass "active"
|
||||
|
||||
# toggle content
|
||||
form.find(".note-write-holder").show()
|
||||
form.find(".note-preview-holder").hide()
|
||||
|
||||
###
|
||||
Shows the note preview.
|
||||
|
||||
Lets the server render GFM into Html and displays it.
|
||||
###
|
||||
previewNote: (e) ->
|
||||
e.preventDefault()
|
||||
form = $(this).closest("form")
|
||||
# toggle tabs
|
||||
form.find(".js-note-write-button").parent().removeClass "active"
|
||||
form.find(".js-note-preview-button").parent().addClass "active"
|
||||
|
||||
# toggle content
|
||||
form.find(".note-write-holder").hide()
|
||||
form.find(".note-preview-holder").show()
|
||||
|
||||
preview = form.find(".js-note-preview")
|
||||
noteText = form.find(".js-note-text").val()
|
||||
if noteText.trim().length is 0
|
||||
preview.text "Nothing to preview."
|
||||
else
|
||||
preview.text "Loading..."
|
||||
$.post($(this).data("url"),
|
||||
note: noteText
|
||||
).success (previewData) ->
|
||||
preview.html previewData
|
||||
|
||||
###
|
||||
Called in response the main target form has been successfully submitted.
|
||||
|
||||
|
@ -210,17 +167,15 @@ class Notes
|
|||
form.find(".js-errors").remove()
|
||||
|
||||
# reset text and preview
|
||||
form.find(".js-note-write-button").click()
|
||||
form.find(".js-md-write-button").click()
|
||||
form.find(".js-note-text").val("").trigger "input"
|
||||
|
||||
###
|
||||
Called when clicking the "Choose File" button.
|
||||
form.find(".js-note-text").data("autosave").reset()
|
||||
|
||||
Opens the file selection dialog.
|
||||
###
|
||||
chooseNoteAttachment: ->
|
||||
form = $(this).closest("form")
|
||||
form.find(".js-note-attachment-input").click()
|
||||
reenableTargetFormSubmitButton: ->
|
||||
form = $(".js-main-target-form")
|
||||
|
||||
form.find(".js-note-text").trigger "input"
|
||||
|
||||
###
|
||||
Shows the main form and does some setup on it.
|
||||
|
@ -258,23 +213,34 @@ class Notes
|
|||
setupNoteForm: (form) ->
|
||||
disableButtonIfEmptyField form.find(".js-note-text"), form.find(".js-comment-button")
|
||||
form.removeClass "js-new-note-form"
|
||||
form.find('.div-dropzone').remove()
|
||||
|
||||
# setup preview buttons
|
||||
form.find(".js-note-write-button, .js-note-preview-button").tooltip placement: "left"
|
||||
previewButton = form.find(".js-note-preview-button")
|
||||
form.find(".js-note-text").on "input", ->
|
||||
form.find(".js-md-write-button, .js-md-preview-button").tooltip placement: "left"
|
||||
previewButton = form.find(".js-md-preview-button")
|
||||
|
||||
textarea = form.find(".js-note-text")
|
||||
|
||||
textarea.on "input", ->
|
||||
if $(this).val().trim() isnt ""
|
||||
previewButton.removeClass("turn-off").addClass "turn-on"
|
||||
else
|
||||
previewButton.removeClass("turn-on").addClass "turn-off"
|
||||
|
||||
new Autosave textarea, [
|
||||
"Note"
|
||||
form.find("#note_commit_id").val()
|
||||
form.find("#note_line_code").val()
|
||||
form.find("#note_noteable_type").val()
|
||||
form.find("#note_noteable_id").val()
|
||||
]
|
||||
|
||||
# remove notify commit author checkbox for non-commit notes
|
||||
form.find(".js-notify-commit-author").remove() if form.find("#note_noteable_type").val() isnt "Commit"
|
||||
GitLab.GfmAutoComplete.setup()
|
||||
new DropzoneInput(form)
|
||||
form.show()
|
||||
|
||||
|
||||
###
|
||||
Called in response to the new note form being submitted
|
||||
|
||||
|
@ -298,11 +264,10 @@ class Notes
|
|||
Updates the current note field.
|
||||
###
|
||||
updateNote: (xhr, note, status) =>
|
||||
note_li = $("#note_" + note.id)
|
||||
note_li = $(".note-row-" + note.id)
|
||||
note_li.replaceWith(note.html)
|
||||
code = "#note_" + note.id + " .highlight pre code"
|
||||
$(code).each (i, e) ->
|
||||
hljs.highlightBlock(e)
|
||||
note_li.find('.note-edit-form').hide()
|
||||
note_li.find('.note-body > .note-text').show()
|
||||
|
||||
###
|
||||
Called in response to clicking the edit note link
|
||||
|
@ -314,12 +279,20 @@ class Notes
|
|||
showEditForm: (e) ->
|
||||
e.preventDefault()
|
||||
note = $(this).closest(".note")
|
||||
note.find(".note-text").hide()
|
||||
note.find(".note-body > .note-text").hide()
|
||||
note.find(".note-header").hide()
|
||||
base_form = note.find(".note-edit-form")
|
||||
form = base_form.clone().insertAfter(base_form)
|
||||
form.addClass('current-note-edit-form')
|
||||
form.find('.div-dropzone').remove()
|
||||
|
||||
# Show the attachment delete link
|
||||
note.find(".js-note-attachment-delete").show()
|
||||
|
||||
# Setup markdown form
|
||||
GitLab.GfmAutoComplete.setup()
|
||||
form = note.find(".note-edit-form")
|
||||
new DropzoneInput(form)
|
||||
|
||||
form.show()
|
||||
textarea = form.find("textarea")
|
||||
textarea.focus()
|
||||
|
@ -333,9 +306,9 @@ class Notes
|
|||
cancelEdit: (e) ->
|
||||
e.preventDefault()
|
||||
note = $(this).closest(".note")
|
||||
note.find(".note-text").show()
|
||||
note.find(".js-note-attachment-delete").hide()
|
||||
note.find(".note-edit-form").hide()
|
||||
note.find(".note-body > .note-text").show()
|
||||
note.find(".note-header").show()
|
||||
note.find(".current-note-edit-form").remove()
|
||||
|
||||
###
|
||||
Called in response to deleting a note of any kind.
|
||||
|
@ -367,7 +340,7 @@ class Notes
|
|||
removeAttachment: ->
|
||||
note = $(this).closest(".note")
|
||||
note.find(".note-attachment").remove()
|
||||
note.find(".note-text").show()
|
||||
note.find(".note-body > .note-text").show()
|
||||
note.find(".js-note-attachment-delete").hide()
|
||||
note.find(".note-edit-form").hide()
|
||||
|
||||
|
@ -406,30 +379,6 @@ class Notes
|
|||
form.find(".js-note-text").focus()
|
||||
form.addClass "js-discussion-note-form"
|
||||
|
||||
###
|
||||
General note form setup.
|
||||
|
||||
deactivates the submit button when text is empty
|
||||
hides the preview button when text is empty
|
||||
setup GFM auto complete
|
||||
show the form
|
||||
###
|
||||
setupNoteForm: (form) =>
|
||||
disableButtonIfEmptyField form.find(".js-note-text"), form.find(".js-comment-button")
|
||||
form.removeClass "js-new-note-form"
|
||||
form.removeClass "js-new-note-form"
|
||||
GitLab.GfmAutoComplete.setup()
|
||||
|
||||
# setup preview buttons
|
||||
previewButton = form.find(".js-note-preview-button")
|
||||
form.find(".js-note-text").on "input", ->
|
||||
if $(this).val().trim() isnt ""
|
||||
previewButton.removeClass("turn-off").addClass "turn-on"
|
||||
else
|
||||
previewButton.removeClass("turn-on").addClass "turn-off"
|
||||
|
||||
form.show()
|
||||
|
||||
###
|
||||
Called when clicking on the "add a comment" button on the side of a diff line.
|
||||
|
||||
|
@ -438,7 +387,7 @@ class Notes
|
|||
###
|
||||
addDiffNote: (e) =>
|
||||
e.preventDefault()
|
||||
link = e.target
|
||||
link = e.currentTarget
|
||||
form = $(".js-new-note-form")
|
||||
row = $(link).closest("tr")
|
||||
nextRow = row.next()
|
||||
|
@ -465,6 +414,8 @@ class Notes
|
|||
removeDiscussionNoteForm: (form)->
|
||||
row = form.closest("tr")
|
||||
|
||||
form.find(".js-note-text").data("autosave").reset()
|
||||
|
||||
# show the reply button (will only work for replies)
|
||||
form.prev(".js-discussion-reply-button").show()
|
||||
if row.is(".js-temp-notes-holder")
|
||||
|
@ -482,7 +433,7 @@ class Notes
|
|||
@removeDiscussionNoteForm(form)
|
||||
|
||||
updateVotes: ->
|
||||
(new NotesVotes).updateVotes()
|
||||
true
|
||||
|
||||
###
|
||||
Called after an attachment file has been selected.
|
||||
|
@ -502,4 +453,29 @@ class Notes
|
|||
visibilityChange: =>
|
||||
@refresh()
|
||||
|
||||
@Notes = Notes
|
||||
targetReopen: (e) =>
|
||||
@submitNoteForm($(e.target).parents('form'))
|
||||
|
||||
targetClose: (e) =>
|
||||
@submitNoteForm($(e.target).parents('form'))
|
||||
|
||||
submitNoteForm: (form) =>
|
||||
noteText = form.find(".js-note-text").val()
|
||||
if noteText.trim().length > 0
|
||||
form.submit()
|
||||
|
||||
updateCloseButton: (e) =>
|
||||
textarea = $(e.target)
|
||||
form = textarea.parents('form')
|
||||
form.find('.js-note-target-close').text('Close')
|
||||
|
||||
updateTargetButtons: (e) =>
|
||||
textarea = $(e.target)
|
||||
form = textarea.parents('form')
|
||||
|
||||
if textarea.val().trim().length > 0
|
||||
form.find('.js-note-target-reopen').text('Comment & reopen')
|
||||
form.find('.js-note-target-close').text('Comment & close')
|
||||
else
|
||||
form.find('.js-note-target-reopen').text('Reopen')
|
||||
form.find('.js-note-target-close').text('Close')
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
class NotesVotes
|
||||
updateVotes: ->
|
||||
votes = $("#votes .votes")
|
||||
notes = $("#notes-list .note .vote")
|
||||
|
||||
# only update if there is a vote display
|
||||
if votes.size()
|
||||
upvotes = notes.filter(".upvote").size()
|
||||
downvotes = notes.filter(".downvote").size()
|
||||
votesCount = upvotes + downvotes
|
||||
upvotesPercent = (if votesCount then (100.0 / votesCount * upvotes) else 0)
|
||||
downvotesPercent = (if votesCount then (100.0 - upvotesPercent) else 0)
|
||||
|
||||
# change vote bar lengths
|
||||
votes.find(".bar-success").css "width", upvotesPercent + "%"
|
||||
votes.find(".bar-danger").css "width", downvotesPercent + "%"
|
||||
|
||||
# replace vote numbers
|
||||
votes.find(".upvotes").text votes.find(".upvotes").text().replace(/\d+/, upvotes)
|
||||
votes.find(".downvotes").text votes.find(".downvotes").text().replace(/\d+/, downvotes)
|
||||
|
||||
@NotesVotes = NotesVotes
|
|
@ -1,4 +1,5 @@
|
|||
$ ->
|
||||
class @Profile
|
||||
constructor: ->
|
||||
$('.edit_user .application-theme input, .edit_user .code-preview-theme input').click ->
|
||||
# Submit the form
|
||||
$('.edit_user').submit()
|
||||
|
@ -26,5 +27,3 @@ $ ->
|
|||
form = $(this).closest("form")
|
||||
filename = $(this).val().replace(/^.*[\\\/]/, '')
|
||||
form.find(".js-avatar-filename").text(filename)
|
||||
|
||||
$('.profile-groups-avatars').tooltip("placement": "top")
|
||||
|
|
|
@ -1,33 +1,5 @@
|
|||
class Project
|
||||
class @Project
|
||||
constructor: ->
|
||||
$('.project-edit-container').on 'ajax:before', =>
|
||||
$('.project-edit-container').hide()
|
||||
$('.save-project-loader').show()
|
||||
|
||||
@initEvents()
|
||||
|
||||
|
||||
initEvents: ->
|
||||
disableButtonIfEmptyField '#project_name', '.project-submit'
|
||||
|
||||
$('#project_issues_enabled').change ->
|
||||
if ($(this).is(':checked') == true)
|
||||
$('#project_issues_tracker').removeAttr('disabled')
|
||||
else
|
||||
$('#project_issues_tracker').attr('disabled', 'disabled')
|
||||
|
||||
$('#project_issues_tracker').change()
|
||||
|
||||
$('#project_issues_tracker').change ->
|
||||
if ($(this).val() == gon.default_issues_tracker || $(this).is(':disabled'))
|
||||
$('#project_issues_tracker_id').attr('disabled', 'disabled')
|
||||
else
|
||||
$('#project_issues_tracker_id').removeAttr('disabled')
|
||||
|
||||
|
||||
@Project = Project
|
||||
|
||||
$ ->
|
||||
# Git clone panel switcher
|
||||
scope = $ '.git-clone-holder'
|
||||
if scope.length > 0
|
||||
|
@ -44,10 +16,11 @@ $ ->
|
|||
$('.hide-no-ssh-message').on 'click', (e) ->
|
||||
path = '/'
|
||||
$.cookie('hide_no_ssh_message', 'false', { path: path })
|
||||
$(@).parents('.no-ssh-key-message').hide()
|
||||
$(@).parents('.no-ssh-key-message').remove()
|
||||
e.preventDefault()
|
||||
|
||||
$('.project-side .star').on 'ajax:success', (e, data, status, xhr) ->
|
||||
$(@).toggleClass('on').find('.count').html(data.star_count)
|
||||
.on 'ajax:error', (e, xhr, status, error) ->
|
||||
new Flash('Star toggle failed. Try again later.', 'alert')
|
||||
$('.hide-no-password-message').on 'click', (e) ->
|
||||
path = '/'
|
||||
$.cookie('hide_no_password_message', 'false', { path: path })
|
||||
$(@).parents('.no-password-message').remove()
|
||||
e.preventDefault()
|
||||
|
|
9
app/assets/javascripts/project_avatar.js.coffee
Normal file
|
@ -0,0 +1,9 @@
|
|||
class @ProjectAvatar
|
||||
constructor: ->
|
||||
$('.js-choose-project-avatar-button').bind 'click', ->
|
||||
form = $(this).closest('form')
|
||||
form.find('.js-project-avatar-input').click()
|
||||
$('.js-project-avatar-input').bind 'change', ->
|
||||
form = $(this).closest('form')
|
||||
filename = $(this).val().replace(/^.*[\\\/]/, '')
|
||||
form.find('.js-avatar-filename').text(filename)
|
5
app/assets/javascripts/project_fork.js.coffee
Normal file
|
@ -0,0 +1,5 @@
|
|||
class @ProjectFork
|
||||
constructor: ->
|
||||
$('.fork-thumbnail a').on 'click', ->
|
||||
$('.fork-namespaces').hide()
|
||||
$('.save-project-loader').show()
|
|
@ -1,7 +1,5 @@
|
|||
class ProjectImport
|
||||
class @ProjectImport
|
||||
constructor: ->
|
||||
setTimeout ->
|
||||
Turbolinks.visit(location.href)
|
||||
, 5000
|
||||
|
||||
@ProjectImport = ProjectImport
|
||||
|
|
4
app/assets/javascripts/project_members.js.coffee
Normal file
|
@ -0,0 +1,4 @@
|
|||
class @ProjectMembers
|
||||
constructor: ->
|
||||
$('li.project_member').bind 'ajax:success', ->
|
||||
$(this).fadeOut()
|
11
app/assets/javascripts/project_new.js.coffee
Normal file
|
@ -0,0 +1,11 @@
|
|||
class @ProjectNew
|
||||
constructor: ->
|
||||
$('.project-edit-container').on 'ajax:before', =>
|
||||
$('.project-edit-container').hide()
|
||||
$('.save-project-loader').show()
|
||||
|
||||
@initEvents()
|
||||
|
||||
|
||||
initEvents: ->
|
||||
disableButtonIfEmptyField '#project_name', '.project-submit'
|
15
app/assets/javascripts/project_show.js.coffee
Normal file
|
@ -0,0 +1,15 @@
|
|||
class @ProjectShow
|
||||
constructor: ->
|
||||
$('.project-home-panel .star').on 'ajax:success', (e, data, status, xhr) ->
|
||||
$(@).toggleClass('on').find('.count').html(data.star_count)
|
||||
.on 'ajax:error', (e, xhr, status, error) ->
|
||||
new Flash('Star toggle failed. Try again later.', 'alert')
|
||||
|
||||
$("a[data-toggle='tab']").on "shown.bs.tab", (e) ->
|
||||
$.cookie "default_view", $(e.target).attr("href"), { expires: 30, path: '/' }
|
||||
|
||||
defaultView = $.cookie("default_view")
|
||||
if defaultView
|
||||
$("a[href=" + defaultView + "]").tab "show"
|
||||
else
|
||||
$("a[data-toggle='tab']:first").tab "show"
|
|
@ -1,59 +0,0 @@
|
|||
@projectUsersSelect =
|
||||
init: ->
|
||||
$('.ajax-project-users-select').each (i, select) ->
|
||||
project_id = $(select).data('project-id') || $('body').data('project-id')
|
||||
|
||||
$(select).select2
|
||||
placeholder: $(select).data('placeholder') || "Search for a user"
|
||||
multiple: $(select).hasClass('multiselect')
|
||||
minimumInputLength: 0
|
||||
query: (query) ->
|
||||
Api.projectUsers project_id, query.term, (users) ->
|
||||
data = { results: users }
|
||||
|
||||
nullUser = {
|
||||
name: 'Unassigned',
|
||||
avatar: null,
|
||||
username: 'none',
|
||||
id: ''
|
||||
}
|
||||
|
||||
data.results.unshift(nullUser)
|
||||
|
||||
query.callback(data)
|
||||
|
||||
initSelection: (element, callback) ->
|
||||
id = $(element).val()
|
||||
if id isnt ""
|
||||
Api.user(id, callback)
|
||||
|
||||
|
||||
formatResult: projectUsersSelect.projectUserFormatResult
|
||||
formatSelection: projectUsersSelect.projectUserFormatSelection
|
||||
dropdownCssClass: "ajax-project-users-dropdown"
|
||||
dropdownAutoWidth: true
|
||||
escapeMarkup: (m) -> # we do not want to escape markup since we are displaying html in results
|
||||
m
|
||||
|
||||
projectUserFormatResult: (user) ->
|
||||
if user.avatar_url
|
||||
avatar = user.avatar_url
|
||||
else
|
||||
avatar = gon.default_avatar_url
|
||||
|
||||
if user.id == ''
|
||||
avatarMarkup = ''
|
||||
else
|
||||
avatarMarkup = "<div class='user-image'><img class='avatar s24' src='#{avatar}'></div>"
|
||||
|
||||
"<div class='user-result'>
|
||||
#{avatarMarkup}
|
||||
<div class='user-name'>#{user.name}</div>
|
||||
<div class='user-username'>#{user.username}</div>
|
||||
</div>"
|
||||
|
||||
projectUserFormatSelection: (user) ->
|
||||
user.name
|
||||
|
||||
$ ->
|
||||
projectUsersSelect.init()
|
24
app/assets/javascripts/projects_list.js.coffee
Normal file
|
@ -0,0 +1,24 @@
|
|||
class @ProjectsList
|
||||
constructor: ->
|
||||
$(".projects-list .js-expand").on 'click', (e) ->
|
||||
e.preventDefault()
|
||||
list = $(this).closest('.projects-list')
|
||||
list.find("li").show()
|
||||
list.find("li.bottom").hide()
|
||||
|
||||
$(".projects-list-filter").keyup ->
|
||||
terms = $(this).val()
|
||||
uiBox = $(this).closest('.panel')
|
||||
if terms == "" || terms == undefined
|
||||
uiBox.find(".projects-list li").show()
|
||||
else
|
||||
uiBox.find(".projects-list li").each (index) ->
|
||||
name = $(this).find(".filter-title").text()
|
||||
|
||||
if name.toLowerCase().search(terms.toLowerCase()) == -1
|
||||
$(this).hide()
|
||||
else
|
||||
$(this).show()
|
||||
uiBox.find(".projects-list li.bottom").hide()
|
||||
|
||||
|