diff --git a/.gitignore b/.gitignore
index 7e621d26..72abdd52 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,11 +20,9 @@ config/database.yml
config/initializers/omniauth.rb
config/unicorn.rb
config/resque.yml
-config/aws.yml
db/data.yml
.idea
.DS_Store
.chef
vendor/bundle/*
rails_best_practices_output.html
-doc/code/*
diff --git a/.rspec b/.rspec
index 5902dd3a..53607ea5 100644
--- a/.rspec
+++ b/.rspec
@@ -1 +1 @@
---colour --drb
+--colour
diff --git a/.travis.yml b/.travis.yml
index 609f2967..6d39488d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,7 @@
language: ruby
env:
- - DB=mysql TRAVIS=true
+ - DB=postgresql
+ - DB=mysql
before_install:
- sudo apt-get install libicu-dev -y
- gem install charlock_holmes -v="0.6.9"
@@ -8,7 +9,7 @@ branches:
only:
- 'master'
rvm:
- - 1.9.3-p392
+ - 1.9.3-p327
services:
- mysql
- postgresql
diff --git a/CHANGELOG b/CHANGELOG
index 872661d4..2d05a51e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,54 +1,3 @@
-v 5.1.0
- - You can login with email or username now
- - Corrected project transfer rollback when repository cannot be moved
- - Move both repo and wiki when project transfer requrested
- - Admin area: project editing was removed from admin namespace
- - Access: admin user has now access to any project.
-
-v 5.0.0
- - Replaced gitolite with gitlab-shell
- - Removed gitolite-related libraries
- - State machine added
- - Setup gitlab as git user
- - Internal API
- - Show team tab for empty projects
- - Import repository feature
- - Updated rails
- - Use lambda for scopes
- - Redesign admin area -> users
- - Redesign admin area -> user
- - Secure link to file attachments
- - Add validations for Group and Team names
- - Restyle team page for project
- - Update capybara, rspec-rails, poltergeist to recent versions
- - Wiki on git using Gollum
- - Added Solarized Dark theme for code review
- - Dont show user emails in autocomplete lists, profile pages
- - Added settings tab for group, team, project
- - Replace user popup with icons in header
- - Handle project moving with gitlab-shell
- - Added select2-rails for selectboxes with ajax data load
- - Fixed search field on projects page
- - Added teams to search autocomplete
- - Move groups and teams on dashboard sidebar to sub-tabs
- - API: improved return codes and docs. (Felix Gilcher, Sebastian Ziebell)
- - Redesign wall to be more like chat
- - Snippets, Wall features are disabled by default for new projects
-
-v 4.2.0
- - Teams
- - User show page. Via /u/username
- - Show help contents on pages for better navigation
- - Async gitolite calls
- - added satellites logs
- - can_create_group, can_create_team booleans for User
- - Process web hooks async
- - GFM: Fix images escaped inside links
- - Network graph improved
- - Switchable branches for network graph
- - API: Groups
- - Fixed project download
-
v 4.1.0
- Optional Sign-Up
- Discussions
@@ -63,7 +12,7 @@ v 4.1.0
- cleanup rake tasks
- fix backup/restore
- scss cleanup
- - show preview for note images
+ - show preview for note images
- improved network-graph
- get rid of app/roles/
- added new classes Team, Repository
@@ -77,7 +26,7 @@ v 4.1.0
v 4.0.0
- Remove project code and path from API. Use id instead
- Return valid clonable url to repo for web hook
- - Fixed backup issue
+ - Fixed backup issue
- Reorganized settings
- Fixed commits compare
- Refactored scss
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f322a81c..00304dd3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,53 +1,26 @@
+# Contact & support
+
+If you want quick help, head over to our [Support Forum](https://groups.google.com/forum/#!forum/gitlabhq).
+Otherwise you can follow our [Issue Submission Guide](https://github.com/gitlabhq/gitlabhq/wiki/Issue-Submission-Guide) for a more systematic and thorough guide to solving your issues.
+
+
+
# Contribute to GitLab
-This guide details how to use pull requests and the issues to improve GitLab.
+## Recipes
-## Closing policy for pull requests and issues
+We collect user submitted installation scripts and config file templates for platforms we don't support officially.
+We believe there is merit in allowing a certain amount of diversity.
+You can get and submit your solution to running/configuring GitLab with your favorite OS/distro, database, web server, cloud hoster, configuration management tool, etc.
-Pull requests and issues not in line with the guidelines listed in this document will be closed with just a link to this paragraph. GitLab is a popular open source project and the capacity to deal with issues and pull requests is limited. To get support for your problems please use other channels as detailed in [the getting help section of the readme](https://github.com/gitlabhq/gitlabhq#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/).
+Help us improve the collection of [GitLab Recipes](https://github.com/gitlabhq/gitlab-recipes/)
-## Pull requests
-We welcome pull request with improvements to GitLab code and/or documentation. The issues we would really like a pull request for are listed with the [status 'accepting merge/pull requests' on our feedback forum](http://feedback.gitlab.com/forums/176466-general/status/796455) but other improvements are also welcome.
+## Feature suggestions
-### Pull request guidelines
+Follow the [Issue Submission Guide](https://github.com/gitlabhq/gitlabhq/wiki/Issue-Submission-Guide) and support other peoples ideas or propose your own.
- If you can please submit a pull request with the fix including tests. The workflow to make a pull request is as follows:
-1. Fork the project on GitHub
-1. Create a feature branch
-1. Write tests and code
-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 pull request
+## Code
-We will accept pull requests if:
-
-* The code has proper tests and all tests pass
-* It can be merged without problems (if not please use: git rebase master)
-* It doesn't break any existing functionality
-* It's quality code that conforms to the [Rails style guide](https://github.com/bbatsov/rails-style-guide) and best practices
-* The description includes a motive for your change and the method you used to achieve it
-* It keeps the GitLab code base clean and well structured
-* We think other users will need the same functionality
-* If it makes changes to the UI the pull request should include screenshots
-
-For examples of feedback on pull requests please look at already [closed pull requests](https://github.com/gitlabhq/gitlabhq/pulls?direction=desc&page=1&sort=created&state=closed).
-
-## Issue tracker
-
-The [issue tracker](https://github.com/gitlabhq/gitlabhq/issues) is only for obvious bugs or misbehavior in the master branch of GitLab. When submitting an issue please conform to the issue submission guidelines listed below.
-
-Please send a pull request with a tested solution or a pull request with a failing test instead of opening an issue if you can. If you're unsure where to post, post to the [Support Forum](https://groups.google.com/forum/#!forum/gitlabhq) first. There are a lot of helpful GitLab users there who may be able to help you quickly. If your particular issue turns out to be a bug, it will find its way from there.
-
-### Issue tracker guidelines
-
-**Search** for similar entries before submitting your own, there's a good chance somebody else had the same issue or idea. Show your support with `:+1:` and/or join the discussion.
-
-* Summarize your issue in one sentence (what goes wrong, what did you expect to happen)
-* Describe your issue in detail
-* How can we reproduce the issue on the [GitLab Vagrant virtual machine](https://github.com/gitlabhq/gitlab-vagrant-vm) (start with: vagrant destroy && vagrant up && vagrant ssh)
-* Add the last commit sha1 of the GitLab version you used to replicate the issue
-* Add logs or screen shots when possible
-* Link to the line of code that might be responsible for the problem
-* Describe your setup (use relevant parts from `sudo -u gitlab -H bundle exec rake gitlab:env:info`)
+Follow our [Developer Guide](https://github.com/gitlabhq/gitlabhq/wiki/Developer-Guide) to set you up for hacking on GitLab.
diff --git a/Capfile.example b/Capfile.example
deleted file mode 100644
index 8863835d..00000000
--- a/Capfile.example
+++ /dev/null
@@ -1,4 +0,0 @@
-load 'deploy'
-load 'deploy/assets'
-require 'bundler/capistrano'
-load 'config/deploy'
diff --git a/Gemfile b/Gemfile
index 01e3b0f2..96b5bb6a 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,4 +1,4 @@
-source "https://rubygems.org"
+source "http://rubygems.org"
def darwin_only(require_as)
RUBY_PLATFORM.include?('darwin') && require_as
@@ -8,26 +8,23 @@ def linux_only(require_as)
RUBY_PLATFORM.include?('linux') && require_as
end
-gem "rails", "3.2.13"
+gem "rails", "3.2.11"
# Supported DBs
gem "mysql2", group: :mysql
gem "pg", group: :postgres
# Auth
-gem "devise"
-gem 'omniauth', "~> 1.1.3"
+gem "devise", "~> 2.1.0"
+gem 'omniauth', "~> 1.1.1"
gem 'omniauth-google-oauth2'
gem 'omniauth-twitter'
gem 'omniauth-github'
-# Extracting information from a git repository
-# Since gollum requires grit we cannot use gitlab-grit gem name any more. Use grit instead
-gem "grit", '~> 2.5.0', git: 'https://github.com/gitlabhq/grit.git', ref: '42297cdcee16284d2e4eff23d41377f52fc28b9d'
-gem 'grit_ext', '~> 0.8.1'
-
-# Ruby/Rack Git Smart-HTTP Server Handler
-gem 'gitlab-grack', '~> 1.0.0', require: 'grack'
+# GITLAB patched libs
+gem "grit", git: "https://github.com/gitlabhq/grit.git", ref: '7f35cb98ff17d534a07e3ce6ec3d580f67402837'
+gem 'grack', git: "https://github.com/gitlabhq/grack.git", ref: 'ba46f3b0845c6a09d488ae6abdce6ede37e227e8'
+gem 'grit_ext', git: "https://github.com/gitlabhq/grit_ext.git", ref: '8e6afc2da821354774aa4d1ee8a1aa2082f84a3e'
# LDAP Auth
gem 'gitlab_omniauth-ldap', '1.0.2', require: "omniauth-ldap"
@@ -35,31 +32,30 @@ gem 'gitlab_omniauth-ldap', '1.0.2', require: "omniauth-ldap"
# Dump db to yml file. Mostly used to migrate from sqlite to mysql
gem 'gitlab_yaml_db', '1.0.0', require: "yaml_db"
+# Gitolite client (for work with gitolite-admin repo)
+gem "gitolite", '1.1.0'
+
# Syntax highlighter
-gem "gitlab-pygments.rb", '~> 0.3.2', require: 'pygments.rb'
+gem "pygments.rb", git: "https://github.com/gitlabhq/pygments.rb.git", branch: "master"
# Language detection
gem "github-linguist", "~> 2.3.4" , require: "linguist"
# API
-gem "grape", "~> 0.3.1"
-gem "grape-entity", "~> 0.2.0"
+gem "grape", "~> 0.2.1"
# Format dates and times
# based on human-friendly examples
gem "stamp"
-# Enumeration fields
-gem 'enumerize'
-
# Pagination
gem "kaminari", "~> 0.14.1"
# HAML
-gem "haml-rails"
+gem "haml-rails", "~> 0.3.5"
# Files attachments
-gem "carrierwave"
+gem "carrierwave", "~> 0.7.1"
# Authorization
gem "six"
@@ -75,21 +71,18 @@ gem "redcarpet", "~> 2.2.2"
gem "github-markup", "~> 0.7.4", require: 'github/markup'
# Servers
-gem "unicorn"
-
-# State machine
-gem "state_machine"
+gem "unicorn", "~> 4.4.0"
# Issue tags
gem "acts-as-taggable-on", "2.3.3"
# Decorators
-gem "draper"
+gem "draper", "~> 0.18.0"
# Background jobs
gem 'slim'
-gem 'sinatra', require: nil
-gem 'sidekiq'
+gem 'sinatra', :require => nil
+gem 'sidekiq', '2.6.4'
# HTTP requests
gem "httparty"
@@ -100,20 +93,10 @@ gem "colored"
# GitLab settings
gem 'settingslogic'
-# Wiki
-# - Use latest master to resolve Gem dependency with Pygemnts
-# github-linquist needs pygments 0.4.2 but Gollum 2.4.11
-# requires pygments 0.3.2. The latest master Gollum has been updated
-# to use pygments 0.4.2. Change this after next Gollum release.
-gem "gollum", "~> 2.4.0", git: "https://github.com/gollum/gollum.git", ref: "5dcd3c8c8f"
-
# Misc
gem "foreman"
gem "git"
-# Cache
-gem "redis-rails"
-
group :assets do
gem "sass-rails", "~> 3.2.5"
gem "coffee-rails", "~> 3.2.2"
@@ -121,7 +104,6 @@ group :assets do
gem "therubyracer"
gem 'chosen-rails', "0.9.8"
- gem 'select2-rails'
gem 'jquery-atwho-rails', "0.1.7"
gem "jquery-rails", "2.1.3"
gem "jquery-ui-rails", "2.0.2"
@@ -130,7 +112,6 @@ group :assets do
gem 'bootstrap-sass', "2.2.1.1"
gem "font-awesome-sass-rails", "~> 3.0.0"
gem "gemoji", "~> 1.2.1", require: 'emoji/railtie'
- gem "gon"
end
group :development do
@@ -152,14 +133,13 @@ group :development do
end
group :development, :test do
- gem 'coveralls', require: false
gem 'rails-dev-tweaks'
gem 'spinach-rails'
gem "rspec-rails"
gem "capybara"
gem "pry"
gem "awesome_print"
- gem "database_cleaner"
+ gem "database_cleaner", ref: "f89c34300e114be99532f14c115b2799a3380ac6", git: "https://github.com/bmabey/database_cleaner.git"
gem "launchy"
gem 'factory_girl_rails'
@@ -173,9 +153,7 @@ group :development, :test do
gem 'rb-inotify', require: linux_only('rb-inotify')
# PhantomJS driver for Capybara
- gem 'poltergeist', '1.1.0'
-
- gem 'spork', '~> 1.0rc'
+ gem 'poltergeist', git: 'https://github.com/jonleighton/poltergeist.git', ref: '5c2e092001074a8cf09f332d3714e9ba150bc8ca'
end
group :test do
@@ -187,5 +165,5 @@ group :test do
end
group :production do
- gem "gitlab_meta", '5.0'
+ gem "gitlab_meta", '4.0'
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 586b7bda..7bf31c95 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,3 +1,10 @@
+GIT
+ remote: https://github.com/bmabey/database_cleaner.git
+ revision: f89c34300e114be99532f14c115b2799a3380ac6
+ ref: f89c34300e114be99532f14c115b2799a3380ac6
+ specs:
+ database_cleaner (0.9.1)
+
GIT
remote: https://github.com/ctran/annotate_models.git
revision: be4e26825b521f0b2d86b181e2dff89901aa9b1e
@@ -6,16 +13,41 @@ GIT
activerecord (>= 2.3.0)
rake (>= 0.8.7)
+GIT
+ remote: https://github.com/gitlabhq/grack.git
+ revision: ba46f3b0845c6a09d488ae6abdce6ede37e227e8
+ ref: ba46f3b0845c6a09d488ae6abdce6ede37e227e8
+ specs:
+ grack (1.0.0)
+ rack (~> 1.4.1)
+
GIT
remote: https://github.com/gitlabhq/grit.git
- revision: 42297cdcee16284d2e4eff23d41377f52fc28b9d
- ref: 42297cdcee16284d2e4eff23d41377f52fc28b9d
+ revision: 7f35cb98ff17d534a07e3ce6ec3d580f67402837
+ ref: 7f35cb98ff17d534a07e3ce6ec3d580f67402837
specs:
grit (2.5.0)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
posix-spawn (~> 0.3.6)
+GIT
+ remote: https://github.com/gitlabhq/grit_ext.git
+ revision: 8e6afc2da821354774aa4d1ee8a1aa2082f84a3e
+ ref: 8e6afc2da821354774aa4d1ee8a1aa2082f84a3e
+ specs:
+ grit_ext (0.6.1)
+ charlock_holmes (~> 0.6.9)
+
+GIT
+ remote: https://github.com/gitlabhq/pygments.rb.git
+ revision: db1da0343adf86b49bdc3add04d02d2e80438d38
+ branch: master
+ specs:
+ pygments.rb (0.3.2)
+ posix-spawn (~> 0.3.6)
+ yajl-ruby (~> 1.1.0)
+
GIT
remote: https://github.com/gitlabhq/raphael-rails.git
revision: cb2c92a040b9b941a5f1aa1ea866cc26e944fe58
@@ -23,89 +55,84 @@ GIT
raphael-rails (2.1.0)
GIT
- remote: https://github.com/gollum/gollum.git
- revision: 5dcd3c8c8f68158e43ff79861279088ee56d0ebe
- ref: 5dcd3c8c8f
+ remote: https://github.com/jonleighton/poltergeist.git
+ revision: 5c2e092001074a8cf09f332d3714e9ba150bc8ca
+ ref: 5c2e092001074a8cf09f332d3714e9ba150bc8ca
specs:
- gollum (2.4.11)
- github-markdown (~> 0.5.3)
- github-markup (>= 0.7.5, < 1.0.0)
- grit (~> 2.5.0)
- mustache (>= 0.99.4, < 1.0.0)
- nokogiri (~> 1.5.6)
- pygments.rb (~> 0.4.2)
- sanitize (~> 2.0.3)
- sinatra (~> 1.3.5)
- stringex (~> 1.5.1)
- useragent (~> 0.4.16)
+ poltergeist (1.0.2)
+ capybara (~> 1.1)
+ childprocess (~> 0.3)
+ faye-websocket (~> 0.4, >= 0.4.4)
+ http_parser.rb (~> 0.5.3)
+ multi_json (~> 1.0)
GEM
- remote: https://rubygems.org/
+ remote: http://rubygems.org/
specs:
- actionmailer (3.2.13)
- actionpack (= 3.2.13)
- mail (~> 2.5.3)
- actionpack (3.2.13)
- activemodel (= 3.2.13)
- activesupport (= 3.2.13)
+ actionmailer (3.2.11)
+ actionpack (= 3.2.11)
+ mail (~> 2.4.4)
+ actionpack (3.2.11)
+ activemodel (= 3.2.11)
+ activesupport (= 3.2.11)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
- rack (~> 1.4.5)
+ rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
- activemodel (3.2.13)
- activesupport (= 3.2.13)
+ activemodel (3.2.11)
+ activesupport (= 3.2.11)
builder (~> 3.0.0)
- activerecord (3.2.13)
- activemodel (= 3.2.13)
- activesupport (= 3.2.13)
+ activerecord (3.2.11)
+ activemodel (= 3.2.11)
+ activesupport (= 3.2.11)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.2.13)
- activemodel (= 3.2.13)
- activesupport (= 3.2.13)
- activesupport (3.2.13)
- i18n (= 0.6.1)
+ activeresource (3.2.11)
+ activemodel (= 3.2.11)
+ activesupport (= 3.2.11)
+ activesupport (3.2.11)
+ i18n (~> 0.6)
multi_json (~> 1.0)
acts-as-taggable-on (2.3.3)
rails (~> 3.0)
addressable (2.3.2)
arel (3.0.2)
awesome_print (1.1.0)
- backports (2.6.7)
+ backports (2.6.5)
bcrypt-ruby (3.0.1)
better_errors (0.3.2)
coderay (>= 1.0.0)
erubis (>= 2.7.0)
- binding_of_caller (0.7.1)
- debug_inspector (>= 0.0.1)
+ binding_of_caller (0.6.8)
+ blankslate (3.1.2)
bootstrap-sass (2.2.1.1)
sass (~> 3.2)
builder (3.0.4)
- capybara (2.0.2)
+ capybara (1.1.3)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
- xpath (~> 1.0.0)
- carrierwave (0.8.0)
+ xpath (~> 0.1.4)
+ carrierwave (0.7.1)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
celluloid (0.12.4)
facter (>= 1.6.12)
timers (>= 1.0.0)
charlock_holmes (0.6.9)
- childprocess (0.3.8)
- ffi (~> 1.0, >= 1.0.11)
+ childprocess (0.3.6)
+ ffi (~> 1.0, >= 1.0.6)
chosen-rails (0.9.8)
railties (~> 3.0)
thor (~> 0.14)
code_analyzer (0.3.1)
sexp_processor
- coderay (1.0.9)
+ coderay (1.0.8)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
@@ -116,53 +143,41 @@ GEM
colored (1.2)
colorize (0.5.8)
connection_pool (1.0.0)
- coveralls (0.6.2)
- colorize
- multi_json (~> 1.3)
- rest-client
- simplecov (>= 0.7)
- thor
- crack (0.3.2)
+ crack (0.3.1)
daemons (1.1.9)
- database_cleaner (0.9.1)
- debug_inspector (0.0.2)
- descendants_tracker (0.0.1)
- devise (2.2.3)
+ devise (2.1.2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
- diff-lcs (1.2.1)
- draper (1.1.0)
- actionpack (>= 3.0)
- activesupport (>= 3.0)
- request_store (~> 1.0.3)
+ diff-lcs (1.1.3)
+ draper (0.18.0)
+ actionpack (~> 3.2)
+ activesupport (~> 3.2)
email_spec (1.4.0)
launchy (~> 2.1)
mail (~> 2.2)
- enumerize (0.5.1)
- activesupport (>= 3.2)
erubis (2.7.0)
escape_utils (0.2.4)
eventmachine (1.0.0)
execjs (1.4.0)
multi_json (~> 1.0)
- facter (1.6.18)
+ facter (1.6.17)
factory_girl (4.1.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.1.0)
factory_girl (~> 4.1.0)
railties (>= 3.0.0)
- faraday (0.8.6)
+ faraday (0.8.4)
multipart-post (~> 1.1)
- faye-websocket (0.4.7)
+ faye-websocket (0.4.6)
eventmachine (>= 0.12.0)
ffaker (1.15.0)
- ffi (1.4.0)
+ ffi (1.1.5)
font-awesome-sass-rails (3.0.0.1)
railties (>= 3.1.1)
sass-rails (>= 3.1.1)
- foreman (0.61.0)
+ foreman (0.60.2)
thor (>= 0.13.6)
gemoji (1.2.1)
gherkin-ruby (0.2.1)
@@ -172,62 +187,54 @@ GEM
escape_utils (~> 0.2.3)
mime-types (~> 1.19)
pygments.rb (>= 0.2.13)
- github-markdown (0.5.3)
- github-markup (0.7.5)
- gitlab-grack (1.0.0)
- rack (~> 1.4.1)
- gitlab-pygments.rb (0.3.2)
- posix-spawn (~> 0.3.6)
- yajl-ruby (~> 1.1.0)
- gitlab_meta (5.0)
+ github-markup (0.7.4)
+ gitlab_meta (4.0)
gitlab_omniauth-ldap (1.0.2)
net-ldap (~> 0.2.2)
omniauth (~> 1.0)
pyu-ruby-sasl (~> 0.0.3.1)
rubyntlm (~> 0.1.1)
gitlab_yaml_db (1.0.0)
- gon (4.0.2)
- grape (0.3.2)
+ gitolite (1.1.0)
+ gratr19 (~> 0.4.4.1)
+ grit (~> 2.5.0)
+ hashery (~> 1.5.0)
+ grape (0.2.2)
activesupport
- builder
- hashie (>= 1.2.0)
+ hashie (~> 1.2)
multi_json (>= 1.3.2)
- multi_xml (>= 0.5.2)
+ multi_xml
rack
rack-accept
rack-mount
virtus
- grape-entity (0.2.0)
- activesupport
- multi_json (>= 1.3.2)
- grit_ext (0.8.1)
- charlock_holmes (~> 0.6.9)
+ gratr19 (0.4.4.1)
growl (1.0.3)
- guard (1.6.2)
- listen (>= 0.6.0)
+ guard (1.5.4)
+ listen (>= 0.4.2)
lumberjack (>= 1.0.2)
pry (>= 0.9.10)
- terminal-table (>= 1.4.3)
thor (>= 0.14.6)
- guard-rspec (2.5.1)
+ guard-rspec (2.1.2)
guard (>= 1.1)
rspec (~> 2.11)
guard-spinach (0.0.2)
guard (>= 1.1)
spinach
- haml (4.0.0)
- tilt
- haml-rails (0.4)
+ haml (3.1.7)
+ haml-rails (0.3.5)
actionpack (>= 3.1, < 4.1)
activesupport (>= 3.1, < 4.1)
- haml (>= 3.1, < 4.1)
+ haml (~> 3.1)
railties (>= 3.1, < 4.1)
+ hashery (1.5.0)
+ blankslate
hashie (1.2.0)
hike (1.2.1)
http_parser.rb (0.5.3)
- httparty (0.10.2)
+ httparty (0.9.0)
multi_json (~> 1.0)
- multi_xml (>= 0.5.2)
+ multi_xml
httpauth (0.2.0)
i18n (0.6.1)
journey (1.0.4)
@@ -238,46 +245,47 @@ GEM
jquery-ui-rails (2.0.2)
jquery-rails
railties (>= 3.1.0)
- json (1.7.7)
+ json (1.7.6)
jwt (0.1.5)
multi_json (>= 1.0)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
- kgio (2.8.0)
+ kgio (2.7.4)
launchy (2.1.2)
addressable (~> 2.3)
letter_opener (1.0.0)
launchy (>= 2.0.4)
- libv8 (3.11.8.17)
- listen (0.7.3)
- lumberjack (1.0.3)
- mail (2.5.3)
+ libv8 (3.3.10.4)
+ libwebsocket (0.1.6)
+ websocket
+ listen (0.5.3)
+ lumberjack (1.0.2)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.1)
- mime-types (1.21)
+ mime-types (1.19)
modernizr (2.6.2)
sprockets (~> 2.0)
- multi_json (1.7.2)
- multi_xml (0.5.3)
+ multi_json (1.5.0)
+ multi_xml (0.5.1)
multipart-post (1.1.5)
- mustache (0.99.4)
mysql2 (0.3.11)
net-ldap (0.2.2)
- nokogiri (1.5.6)
+ nokogiri (1.5.5)
oauth (0.4.7)
- oauth2 (0.8.1)
+ oauth2 (0.8.0)
faraday (~> 0.8)
httpauth (~> 0.1)
jwt (~> 0.1.4)
multi_json (~> 1.0)
rack (~> 1.2)
- omniauth (1.1.3)
+ omniauth (1.1.1)
hashie (~> 1.2)
rack
- omniauth-github (1.1.0)
+ omniauth-github (1.0.3)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-google-oauth2 (0.1.13)
@@ -294,23 +302,17 @@ GEM
omniauth-oauth (~> 1.0)
orm_adapter (0.4.0)
pg (0.14.1)
- poltergeist (1.1.0)
- capybara (~> 2.0, >= 2.0.1)
- faye-websocket (~> 0.4, >= 0.4.4)
- http_parser.rb (~> 0.5.3)
polyglot (0.3.3)
posix-spawn (0.3.6)
- pry (0.9.12)
+ progressbar (0.12.0)
+ pry (0.9.10)
coderay (~> 1.0.5)
method_source (~> 0.8)
- slop (~> 3.4)
- pygments.rb (0.4.2)
- posix-spawn (~> 0.3.6)
- yajl-ruby (~> 1.1.0)
+ slop (~> 3.3.1)
pyu-ruby-sasl (0.0.3.3)
quiet_assets (1.0.1)
railties (~> 3.1)
- rack (1.4.5)
+ rack (1.4.3)
rack-accept (0.4.5)
rack (>= 0.4)
rack-cache (1.2)
@@ -319,91 +321,68 @@ GEM
rack (>= 1.1.3)
rack-mount (0.8.3)
rack (>= 1.0.0)
- rack-protection (1.4.0)
+ rack-protection (1.3.2)
rack
- rack-ssl (1.3.3)
+ rack-ssl (1.3.2)
rack
rack-test (0.6.2)
rack (>= 1.0)
- rails (3.2.13)
- actionmailer (= 3.2.13)
- actionpack (= 3.2.13)
- activerecord (= 3.2.13)
- activeresource (= 3.2.13)
- activesupport (= 3.2.13)
+ rails (3.2.11)
+ actionmailer (= 3.2.11)
+ actionpack (= 3.2.11)
+ activerecord (= 3.2.11)
+ activeresource (= 3.2.11)
+ activesupport (= 3.2.11)
bundler (~> 1.0)
- railties (= 3.2.13)
+ railties (= 3.2.11)
rails-dev-tweaks (0.6.1)
actionpack (~> 3.1)
railties (~> 3.1)
- rails_best_practices (1.13.4)
+ rails_best_practices (1.13.2)
activesupport
awesome_print
code_analyzer
colored
erubis
i18n
- ruby-progressbar
- railties (3.2.13)
- actionpack (= 3.2.13)
- activesupport (= 3.2.13)
+ progressbar
+ railties (3.2.11)
+ actionpack (= 3.2.11)
+ activesupport (= 3.2.11)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
raindrops (0.10.0)
- rake (10.0.4)
+ rake (10.0.3)
rb-fsevent (0.9.2)
rb-inotify (0.8.8)
ffi (>= 0.5.0)
- rdoc (3.12.2)
+ rdoc (3.12)
json (~> 1.4)
redcarpet (2.2.2)
- redis (3.0.3)
- redis-actionpack (3.2.3)
- actionpack (~> 3.2.3)
- redis-rack (~> 1.4.0)
- redis-store (~> 1.1.0)
- redis-activesupport (3.2.3)
- activesupport (~> 3.2.3)
- redis-store (~> 1.1.0)
+ redis (3.0.2)
redis-namespace (1.2.1)
redis (~> 3.0.0)
- redis-rack (1.4.2)
- rack (~> 1.4.1)
- redis-store (~> 1.1.0)
- redis-rails (3.2.3)
- redis-actionpack (~> 3.2.3)
- redis-activesupport (~> 3.2.3)
- redis-store (~> 1.1.0)
- redis-store (1.1.3)
- redis (>= 2.2.0)
- ref (1.0.4)
- request_store (1.0.5)
- rest-client (1.6.7)
- mime-types (>= 1.16)
- rspec (2.13.0)
- rspec-core (~> 2.13.0)
- rspec-expectations (~> 2.13.0)
- rspec-mocks (~> 2.13.0)
- rspec-core (2.13.1)
- rspec-expectations (2.13.0)
- diff-lcs (>= 1.1.3, < 2.0)
- rspec-mocks (2.13.0)
- rspec-rails (2.13.0)
+ rspec (2.12.0)
+ rspec-core (~> 2.12.0)
+ rspec-expectations (~> 2.12.0)
+ rspec-mocks (~> 2.12.0)
+ rspec-core (2.12.0)
+ rspec-expectations (2.12.0)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.12.0)
+ rspec-rails (2.12.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
- rspec-core (~> 2.13.0)
- rspec-expectations (~> 2.13.0)
- rspec-mocks (~> 2.13.0)
- ruby-progressbar (1.0.2)
+ rspec-core (~> 2.12.0)
+ rspec-expectations (~> 2.12.0)
+ rspec-mocks (~> 2.12.0)
rubyntlm (0.1.1)
rubyzip (0.9.9)
- sanitize (2.0.3)
- nokogiri (>= 1.4.4, < 1.6)
- sass (3.2.7)
- sass-rails (3.2.6)
+ sass (3.2.5)
+ sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
@@ -413,19 +392,16 @@ GEM
seed-fu (2.2.0)
activerecord (~> 3.1)
activesupport (~> 3.1)
- select2-rails (3.3.1)
- sass-rails (>= 3.2)
- thor (~> 0.14)
- selenium-webdriver (2.30.0)
+ selenium-webdriver (2.26.0)
childprocess (>= 0.2.5)
+ libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
- websocket (~> 1.0.4)
- settingslogic (2.0.9)
- sexp_processor (4.2.0)
+ settingslogic (2.0.8)
+ sexp_processor (4.1.3)
shoulda-matchers (1.3.0)
activesupport (>= 3.0.0)
- sidekiq (2.8.0)
+ sidekiq (2.6.4)
celluloid (~> 0.12.0)
connection_pool (~> 1.0)
multi_json (~> 1)
@@ -435,66 +411,59 @@ GEM
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
- sinatra (1.3.5)
- rack (~> 1.4)
- rack-protection (~> 1.3)
+ sinatra (1.3.3)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
six (0.2.0)
slim (1.3.6)
temple (~> 0.5.5)
tilt (~> 1.3.3)
- slop (3.4.4)
- spinach (0.7.0)
+ slop (3.3.3)
+ spinach (0.5.2)
colorize
gherkin-ruby (~> 0.2.0)
- spinach-rails (0.2.0)
- capybara (~> 2.0.0)
+ spinach-rails (0.1.8)
+ capybara (~> 1)
railties (>= 3)
spinach (>= 0.4)
- spork (1.0.0rc3)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- stamp (0.5.0)
- state_machine (1.1.2)
- stringex (1.5.1)
+ stamp (0.3.0)
temple (0.5.5)
- terminal-table (1.4.5)
test_after_commit (0.0.1)
- therubyracer (0.11.4)
- libv8 (~> 3.11.8.12)
- ref
+ therubyracer (0.10.2)
+ libv8 (~> 3.3.10)
thin (1.5.0)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
- thor (0.18.0)
- tilt (1.3.6)
- timers (1.1.0)
+ thor (0.16.0)
+ tilt (1.3.3)
+ timers (1.0.2)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.37)
+ tzinfo (0.3.35)
uglifier (1.3.0)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
- unicorn (4.6.2)
+ unicorn (4.4.0)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
- useragent (0.4.16)
- virtus (0.5.4)
+ virtus (0.5.2)
backports (~> 2.6.1)
- descendants_tracker (~> 0.0.1)
warden (1.2.1)
rack (>= 1.0)
webmock (1.9.0)
addressable (>= 2.2.7)
crack (>= 0.1.7)
- websocket (1.0.7)
- xpath (1.0.0)
+ websocket (1.0.2)
+ xpath (0.1.4)
nokogiri (~> 1.3)
yajl-ruby (1.1.0)
@@ -509,16 +478,14 @@ DEPENDENCIES
binding_of_caller
bootstrap-sass (= 2.2.1.1)
capybara
- carrierwave
+ carrierwave (~> 0.7.1)
chosen-rails (= 0.9.8)
coffee-rails (~> 3.2.2)
colored
- coveralls
- database_cleaner
- devise
- draper
+ database_cleaner!
+ devise (~> 2.1.0)
+ draper (~> 0.18.0)
email_spec
- enumerize
factory_girl_rails
ffaker
font-awesome-sass-rails (~> 3.0.0)
@@ -527,21 +494,18 @@ DEPENDENCIES
git
github-linguist (~> 2.3.4)
github-markup (~> 0.7.4)
- gitlab-grack (~> 1.0.0)
- gitlab-pygments.rb (~> 0.3.2)
- gitlab_meta (= 5.0)
+ gitlab_meta (= 4.0)
gitlab_omniauth-ldap (= 1.0.2)
gitlab_yaml_db (= 1.0.0)
- gollum (~> 2.4.0)!
- gon
- grape (~> 0.3.1)
- grape-entity (~> 0.2.0)
- grit (~> 2.5.0)!
- grit_ext (~> 0.8.1)
+ gitolite (= 1.1.0)
+ grack!
+ grape (~> 0.2.1)
+ grit!
+ grit_ext!
growl
guard-rspec
guard-spinach
- haml-rails
+ haml-rails (~> 0.3.5)
httparty
jquery-atwho-rails (= 0.1.7)
jquery-rails (= 2.1.3)
@@ -551,42 +515,39 @@ DEPENDENCIES
letter_opener
modernizr (= 2.6.2)
mysql2
- omniauth (~> 1.1.3)
+ omniauth (~> 1.1.1)
omniauth-github
omniauth-google-oauth2
omniauth-twitter
pg
- poltergeist (= 1.1.0)
+ poltergeist!
pry
+ pygments.rb!
quiet_assets (~> 1.0.1)
rack-mini-profiler
- rails (= 3.2.13)
+ rails (= 3.2.11)
rails-dev-tweaks
rails_best_practices
raphael-rails!
rb-fsevent
rb-inotify
redcarpet (~> 2.2.2)
- redis-rails
rspec-rails
sass-rails (~> 3.2.5)
sdoc
seed-fu
- select2-rails
settingslogic
shoulda-matchers (= 1.3.0)
- sidekiq
+ sidekiq (= 2.6.4)
simplecov
sinatra
six
slim
spinach-rails
- spork (~> 1.0rc)
stamp
- state_machine
test_after_commit
therubyracer
thin
uglifier (~> 1.3.0)
- unicorn
+ unicorn (~> 4.4.0)
webmock
diff --git a/Procfile b/Procfile
index 66ca562f..21dfade1 100644
--- a/Procfile
+++ b/Procfile
@@ -1,2 +1,2 @@
web: bundle exec unicorn_rails -p $PORT
-worker: bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,common,default,gitlab_shell
+worker: bundle exec sidekiq -q post_receive,mailer,system_hook,common,default
diff --git a/README.md b/README.md
index 3ab4c051..1a43be13 100644
--- a/README.md
+++ b/README.md
@@ -1,161 +1,45 @@
-## GitLab: self hosted Git management software
+# Welcome to GitLab [](https://travis-ci.org/gitlabhq/gitlabhq) [](https://travis-ci.org/gitlabhq/grit) [](https://codeclimate.com/github/gitlabhq/gitlabhq) [](https://gemnasium.com/gitlabhq/gitlabhq)
-
+GitLab is a free project and repository management application
-### GitLab allows you to
- * keep your code secure on your own server
- * manage repositories, users and access permissions
- * communicate through issues, line-comments and wiki pages
- * perform code review with merge requests
+
-### GitLab is
+## Application details
-* powered by Ruby on Rails
-* completely free and open source (MIT license)
-* used by more than 10.000 organizations to keep their code secure
+* based on Ruby on Rails
+* distributed under the MIT License
+* works with gitolite
-### Code status
+## Requirements
-* [](http://ci.gitlab.org/projects/1?ref=master) ci.gitlab.org (master branch)
-
-* [](https://travis-ci.org/gitlabhq/gitlabhq) travis-ci.org (master branch)
-
-* [](https://codeclimate.com/github/gitlabhq/gitlabhq)
-
-* [](https://gemnasium.com/gitlabhq/gitlabhq)
-
-* [](https://coveralls.io/r/gitlabhq/gitlabhq)
-
-### Resources
-
-* GitLab.org community site: [Homepage](http://gitlab.org) [Screenshots](http://gitlab.org/screenshots/) [Blog](http://blog.gitlab.org/) [Demo](http://demo.gitlabhq.com/users/sign_in)
-
-* GitLab.com commercial services: [Homepage](http://www.gitlab.com/) [Subscription](http://www.gitlab.com/subscription/) [Consultancy](http://www.gitlab.com/consultancy/) [GitLab Cloud](http://www.gitlab.com/cloud/) [Blog](http://blog.gitlab.com/)
-
-* GitLab CI: [Readme](https://github.com/gitlabhq/gitlab-ci/blob/master/README.md) of the GitLab open-source continuous integration server
-
-### Requirements
-
-* Ubuntu/Debian**
-* ruby 1.9.3
+* Ubuntu/Debian
+* ruby 1.9.3+
* MySQL
* git
-* gitlab-shell
+* gitolite
* redis
-** More details are in the [requirements doc](https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/requirements.md)
+## Install
-### Installation
+Checkout wiki pages for installation information, migration, etc.
-#### Official production installation
+## Community
-Follow the installation guide for production server.
+[Google Group](https://groups.google.com/group/gitlabhq)
-* [Installation guide for latest stable release (5.0)](https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/installation.md) - **Recommended**
+## Contacts
-* [Installation guide for the current master branch (5.1)](https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md)
+Twitter:
+ * @gitlabhq
+ * @dzaporozhets
-#### Official development installation
+Email
-If you want to contribute, please first read our [Contributing Guidelines](https://github.com/gitlabhq/gitlabhq/blob/master/CONTRIBUTING.md) and then we suggest you to use the Vagrant virtual machine project to get an environment working with all dependencies.
+ * m@gitlabhq.com
-* [Vagrant virtual machine](https://github.com/gitlabhq/gitlab-vagrant-vm)
+## Contribute
-
-#### Unsupported production installation
-
-* [GitLab recipes](https://github.com/gitlabhq/gitlab-recipes) for setup on different platforms
-
-* [Unofficial installation guides](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Unofficial-Installation-Guides)
-
-* [BitNami one-click installers](http://bitnami.com/stack/gitlab)
-
-* [TurnKey Linux virtual appliance](http://www.turnkeylinux.org/gitlab)
-
-
-### New versions and upgrading
-
-Each month on the 22th a new version is released together with an upgrade guide.
-
-* [Upgrade guides](https://github.com/gitlabhq/gitlabhq/wiki)
-
-* [Changelog](https://github.com/gitlabhq/gitlabhq/blob/master/CHANGELOG)
-
-* [Roadmap](https://github.com/gitlabhq/gitlabhq/blob/master/ROADMAP.md)
-
-
-### Getting started
-
-1. The Installation guide contains instructions to download an init script and run that on boot. With the init script you can also start GitLab
-
- sudo service gitlab start
-
- or
-
- sudo /etc/init.d/gitlab restart
-
-2. Start it with [Foreman](https://github.com/ddollar/foreman) in development mode
-
- bundle exec foreman start -p 3000
-
- or start it manually
-
- bundle exec rails s
- bundle exec rake sidekiq:start
-
-### Running the tests
-
-* Seed the database
-
- bundle exec rake db:setup RAILS_ENV=test
- bundle exec rake db:seed_fu RAILS_ENV=test
-
-* Run all tests
-
- bundle exec rake gitlab:test
-
-* Rspec unit and functional tests
-
- bundle exec rake spec
-
-* Spinach integration tests
-
- bundle exec rake spinach
-
-
-### GitLab interfaces
-
-* [GitLab API](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/README.md)
-
-* [Rake tasks](https://github.com/gitlabhq/gitlabhq/tree/master/doc/raketasks)
-
-* [Directory structure](https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/structure.md)
-
-* [Databases](https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/databases.md)
-
-
-### Getting help
-
-* [Troubleshooting guide](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide) contains solutions to common problems.
-
-* [Support forum](https://groups.google.com/forum/#!forum/gitlabhq) is the best place to ask questions. For example you can use it if you have questions about: permission denied errors, invisible repos, can't clone/pull/push or with web hooks that don't fire. Please search for similar issues before posting your own, there's a good chance somebody else had the same issue you have now and had it resolved. There are a lot of helpful GitLab users there who may be able to help you quickly. If your particular issue turns out to be a bug, it will find its way from there to a fix.
-
-* [Feedback and suggestions forum](http://gitlab.uservoice.com/forums/176466-general) is the place to propose and discuss new features for GitLab.
-
-* [Support subscription](http://www.gitlab.com/subscription/) connect you to the knowledge of GitLab experts that will resolve your issues and answer your questions.
-
-* [Consultancy](http://www.gitlab.com/consultancy/) allows you hire GitLab exports for installations, upgrades and customizations.
-
-* [Contributing guide](https://github.com/gitlabhq/gitlabhq/blob/master/CONTRIBUTING.md) describes how to submit pull requests and issues. Pull requests and issues not in line with the guidelines in this document will be closed without comment.
-
-
-### Getting in touch
-
-* [Core team](https://github.com/gitlabhq?tab=members)
-
-* [Contributors](https://github.com/gitlabhq/gitlabhq/graphs/contributors)
-
-* [Leader](https://github.com/randx)
-
-* [Contact page](http://gitlab.org/contact/)
+[Developer Guide](https://github.com/gitlabhq/gitlabhq/wiki/Developer-Guide)
+Want to help - send a pull request.
+We'll accept good pull requests.
diff --git a/ROADMAP.md b/ROADMAP.md
index 9c4bd2db..acfd2ede 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -1,5 +1,13 @@
## GitLab Roadmap
-### v5.1 April 22
+### v4.3 March 22
+
+* Jenkins CI integration service
+* Usability improvements
+* Notification improvements
+
+### v4.2 February 22
+
+* Campfire integration service
+* Teams
-* Not decided yet.
diff --git a/VERSION b/VERSION
index 52df2a23..ee74734a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.1.0pre
+4.1.0
diff --git a/app/assets/fonts/OFL.txt b/app/assets/fonts/OFL.txt
new file mode 100644
index 00000000..3ce219f0
--- /dev/null
+++ b/app/assets/fonts/OFL.txt
@@ -0,0 +1,92 @@
+Copyright (c) 2010, Jan Gerner (post@yanone.de)
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/app/assets/fonts/YanoneKaffeesatz-Light.ttf b/app/assets/fonts/YanoneKaffeesatz-Light.ttf
new file mode 100644
index 00000000..5026d3bd
Binary files /dev/null and b/app/assets/fonts/YanoneKaffeesatz-Light.ttf differ
diff --git a/app/assets/images/home_icon.PNG b/app/assets/images/home_icon.PNG
new file mode 100644
index 00000000..b1d60d59
Binary files /dev/null and b/app/assets/images/home_icon.PNG differ
diff --git a/app/assets/images/icon-attachment.png b/app/assets/images/icon-attachment.png
new file mode 100644
index 00000000..168ad8dc
Binary files /dev/null and b/app/assets/images/icon-attachment.png differ
diff --git a/app/assets/images/logo-black.png b/app/assets/images/logo-black.png
deleted file mode 100644
index 6567f2e5..00000000
Binary files a/app/assets/images/logo-black.png and /dev/null differ
diff --git a/app/assets/images/logo-white.png b/app/assets/images/logo-white.png
deleted file mode 100644
index ecec2405..00000000
Binary files a/app/assets/images/logo-white.png and /dev/null differ
diff --git a/app/assets/images/logo_dark.png b/app/assets/images/logo_dark.png
new file mode 100644
index 00000000..4a3e3391
Binary files /dev/null and b/app/assets/images/logo_dark.png differ
diff --git a/app/assets/images/logo_white.png b/app/assets/images/logo_white.png
new file mode 100644
index 00000000..e3415816
Binary files /dev/null and b/app/assets/images/logo_white.png differ
diff --git a/app/assets/images/onion_skin_sprites.gif b/app/assets/images/onion_skin_sprites.gif
deleted file mode 100644
index 85d20260..00000000
Binary files a/app/assets/images/onion_skin_sprites.gif and /dev/null differ
diff --git a/app/assets/images/solarized_dark.png b/app/assets/images/solarized_dark.png
deleted file mode 100644
index 728964bc..00000000
Binary files a/app/assets/images/solarized_dark.png and /dev/null differ
diff --git a/app/assets/images/swipemode_sprites.gif b/app/assets/images/swipemode_sprites.gif
deleted file mode 100644
index 327b3c31..00000000
Binary files a/app/assets/images/swipemode_sprites.gif and /dev/null differ
diff --git a/app/assets/javascripts/api.js.coffee b/app/assets/javascripts/api.js.coffee
deleted file mode 100644
index ca721517..00000000
--- a/app/assets/javascripts/api.js.coffee
+++ /dev/null
@@ -1,53 +0,0 @@
-@Api =
- users_path: "/api/:version/users.json"
- user_path: "/api/:version/users/:id.json"
- notes_path: "/api/:version/projects/:id/notes.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)
-
- $.ajax(
- url: url
- data:
- private_token: gon.api_token
- dataType: "json"
- ).done (user) ->
- callback(user)
-
- # Return users list. Filtered by query
- # Only active users retrieved
- users: (query, callback) ->
- url = Api.buildUrl(Api.users_path)
-
- $.ajax(
- url: url
- data:
- private_token: gon.api_token
- search: query
- per_page: 20
- active: true
- dataType: "json"
- ).done (users) ->
- callback(users)
-
- buildUrl: (url) ->
- return url.replace(':version', gon.api_version)
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index adb4009f..49effdf9 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -17,7 +17,6 @@
//= require bootstrap
//= require modernizr
//= require chosen-jquery
-//= require select2
//= require raphael
//= require g.raphael-min
//= require g.bar-min
diff --git a/app/assets/javascripts/behaviors/toggler_behavior.coffee b/app/assets/javascripts/behaviors/toggler_behavior.coffee
index d2181e7b..3fefbf8e 100644
--- a/app/assets/javascripts/behaviors/toggler_behavior.coffee
+++ b/app/assets/javascripts/behaviors/toggler_behavior.coffee
@@ -3,11 +3,3 @@ $ ->
container = $(@).closest(".js-toggler-container")
container.toggleClass("on")
-
- $("body").on "click", ".js-toggle-visibility-link", (e) ->
- $(@).find('i').
- toggleClass('icon-chevron-down').
- toggleClass('icon-chevron-up')
- container = $(".js-toggle-visibility-container")
- container.toggleClass("hide")
- e.preventDefault()
diff --git a/app/assets/javascripts/branch-graph.js.coffee b/app/assets/javascripts/branch-graph.js.coffee
deleted file mode 100644
index 2a668de2..00000000
--- a/app/assets/javascripts/branch-graph.js.coffee
+++ /dev/null
@@ -1,309 +0,0 @@
-class BranchGraph
- constructor: (@element, @options) ->
- @preparedCommits = {}
- @mtime = 0
- @mspace = 0
- @parents = {}
- @colors = ["#000"]
- @offsetX = 120
- @offsetY = 20
- @unitTime = 30
- @unitSpace = 10
- @load()
-
- load: ->
- $.ajax
- url: @options.url
- method: "get"
- dataType: "json"
- success: $.proxy((data) ->
- $(".loading", @element).hide()
- @prepareData data.days, data.commits
- @buildGraph()
- , this)
-
- prepareData: (@days, @commits) ->
- @collectParents()
-
- for c in @commits
- c.isParent = true if c.id of @parents
- @preparedCommits[c.id] = c
-
- @collectColors()
-
- collectParents: ->
- for c in @commits
- @mtime = Math.max(@mtime, c.time)
- @mspace = Math.max(@mspace, c.space)
- for p in c.parents
- @parents[p[0]] = true
- @mspace = Math.max(@mspace, p[1])
-
- collectColors: ->
- k = 0
- while k < @mspace
- @colors.push Raphael.getColor(.8)
- # Skipping a few colors in the spectrum to get more contrast between colors
- Raphael.getColor()
- Raphael.getColor()
- k++
-
- buildGraph: ->
- graphHeight = $(@element).height()
- graphWidth = $(@element).width()
- ch = Math.max(graphHeight, @offsetY + @unitTime * @mtime + 150)
- cw = Math.max(graphWidth, @offsetX + @unitSpace * @mspace + 300)
- @r = r = Raphael(@element.get(0), cw, ch)
- top = r.set()
- cuday = 0
- cumonth = ""
- barHeight = Math.max(graphHeight, @unitTime * @days.length + 320)
-
- r.rect(0, 0, 26, barHeight).attr fill: "#222"
- r.rect(26, 0, 20, barHeight).attr fill: "#444"
-
- for day, mm in @days
- if cuday isnt day[0]
- # Dates
- r.text(36, @offsetY + @unitTime * mm, day[0])
- .attr(
- font: "12px Monaco, monospace"
- fill: "#DDD"
- )
- cuday = day[0]
-
- if cumonth isnt day[1]
- # Months
- r.text(13, @offsetY + @unitTime * mm, day[1])
- .attr(
- font: "12px Monaco, monospace"
- fill: "#EEE"
- )
- cumonth = day[1]
-
- for commit in @commits
- x = @offsetX + @unitSpace * (@mspace - commit.space)
- y = @offsetY + @unitTime * commit.time
-
- @drawDot(x, y, commit)
-
- @drawLines(x, y, commit)
-
- @appendLabel(x, y, commit.refs) if commit.refs
-
- @appendAnchor(top, commit, x, y)
-
- @markCommit(x, y, commit, graphHeight)
-
- top.toFront()
- @bindEvents()
-
- bindEvents: ->
- drag = {}
- element = @element
- dragger = (event) ->
- element.scrollLeft drag.sl - (event.clientX - drag.x)
- element.scrollTop drag.st - (event.clientY - drag.y)
-
- element.on mousedown: (event) ->
- drag =
- x: event.clientX
- y: event.clientY
- st: element.scrollTop()
- sl: element.scrollLeft()
- $(window).on "mousemove", dragger
-
- $(window).on
- mouseup: ->
- $(window).off "mousemove", dragger
- 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
-
- appendLabel: (x, y, refs) ->
- r = @r
- shortrefs = refs
- # Truncate if longer than 15 chars
- shortrefs = shortrefs.substr(0, 15) + "…" if shortrefs.length > 17
- text = r.text(x + 4, y, shortrefs).attr(
- "text-anchor": "start"
- font: "10px Monaco, monospace"
- fill: "#FFF"
- title: refs
- )
- textbox = text.getBBox()
- # Create rectangle based on the size of the textbox
- rect = r.rect(x, y - 7, textbox.width + 5, textbox.height + 5, 4).attr(
- fill: "#000"
- "fill-opacity": .5
- stroke: "none"
- )
- triangle = r.path(["M", x - 5, y, "L", x - 15, y - 4, "L", x - 15, y + 4, "Z"]).attr(
- fill: "#000"
- "fill-opacity": .5
- stroke: "none"
- )
-
- label = r.set(rect, text)
- label.transform(["t", -rect.getBBox().width - 15, 0])
-
- # Set text to front
- text.toFront()
-
- appendAnchor: (top, commit, x, y) ->
- r = @r
- options = @options
- anchor = r.circle(x, y, 10).attr(
- fill: "#000"
- opacity: 0
- cursor: "pointer"
- ).click(->
- window.open options.commit_url.replace("%s", commit.id), "_blank"
- ).hover(->
- @tooltip = r.commitTooltip(x + 5, y, commit)
- top.push @tooltip.insertBefore(this)
- , ->
- @tooltip and @tooltip.remove() and delete @tooltip
- )
- top.push anchor
-
- drawDot: (x, y, commit) ->
- r = @r
- r.circle(x, y, 3).attr(
- fill: @colors[commit.space]
- stroke: "none"
- )
- r.rect(@offsetX + @unitSpace * @mspace + 10, y - 10, 20, 20).attr(
- fill: "url(#{commit.author.icon})"
- stroke: @colors[commit.space]
- "stroke-width": 2
- )
- r.text(@offsetX + @unitSpace * @mspace + 35, y, commit.message.split("\n")[0]).attr(
- "text-anchor": "start"
- font: "14px Monaco, monospace"
- )
-
- drawLines: (x, y, commit) ->
- r = @r
- for parent, i in commit.parents
- parentCommit = @preparedCommits[parent[0]]
- parentY = @offsetY + @unitTime * parentCommit.time
- parentX1 = @offsetX + @unitSpace * (@mspace - parentCommit.space)
- parentX2 = @offsetX + @unitSpace * (@mspace - parent[1])
-
- # Set line color
- if parentCommit.space <= commit.space
- color = @colors[commit.space]
-
- else
- color = @colors[parentCommit.space]
-
- # Build line shape
- if parent[1] is commit.space
- offset = [0, 5]
- arrow = "l-2,5,4,0,-2,-5,0,5"
-
- else if parent[1] < commit.space
- offset = [3, 3]
- arrow = "l5,0,-2,4,-3,-4,4,2"
-
- else
- offset = [-3, 3]
- arrow = "l-5,0,2,4,3,-4,-4,2"
-
- # Start point
- route = ["M", x + offset[0], y + offset[1]]
-
- # Add arrow if not first parent
- if i > 0
- route.push(arrow)
-
- # Circumvent if overlap
- if commit.space isnt parentCommit.space or commit.space isnt parent[1]
- route.push(
- "L", parentX2, y + 10,
- "L", parentX2, parentY - 5,
- )
-
- # End point
- route.push("L", parentX1, parentY)
-
- r
- .path(route)
- .attr(
- stroke: color
- "stroke-width": 2)
-
- markCommit: (x, y, commit, graphHeight) ->
- if commit.id is @options.commit_id
- r = @r
- r.path(["M", x + 5, y, "L", x + 15, y + 4, "L", x + 15, y - 4, "Z"]).attr(
- fill: "#000"
- "fill-opacity": .5
- stroke: "none"
- )
- # Displayed in the center
- @element.scrollTop(y - graphHeight / 2)
-
-Raphael::commitTooltip = (x, y, commit) ->
- boxWidth = 300
- boxHeight = 200
- icon = @image(commit.author.icon, x, y, 20, 20)
- nameText = @text(x + 25, y + 10, commit.author.name)
- idText = @text(x, y + 35, commit.id)
- messageText = @text(x, y + 50, commit.message)
- textSet = @set(icon, nameText, idText, messageText).attr(
- "text-anchor": "start"
- font: "12px Monaco, monospace"
- )
- nameText.attr(
- font: "14px Arial"
- "font-weight": "bold"
- )
-
- idText.attr fill: "#AAA"
- @textWrap messageText, boxWidth - 50
- rect = @rect(x - 10, y - 10, boxWidth, 100, 4).attr(
- fill: "#FFF"
- stroke: "#000"
- "stroke-linecap": "round"
- "stroke-width": 2
- )
- tooltip = @set(rect, textSet)
- rect.attr(
- height: tooltip.getBBox().height + 10
- width: tooltip.getBBox().width + 10
- )
-
- tooltip.transform ["t", 20, 20]
- tooltip
-
-Raphael::textWrap = (t, width) ->
- content = t.attr("text")
- abc = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
- t.attr text: abc
- letterWidth = t.getBBox().width / abc.length
- t.attr text: content
- words = content.split(" ")
- x = 0
- s = []
-
- for word in words
- if x + (word.length * letterWidth) > width
- s.push "\n"
- x = 0
- x += word.length * letterWidth
- s.push word + " "
-
- t.attr text: s.join("")
- b = t.getBBox()
- h = Math.abs(b.y2) - Math.abs(b.y) + 1
- t.attr y: b.y + h
-
-@BranchGraph = BranchGraph
diff --git a/app/assets/javascripts/commit/file.js.coffee b/app/assets/javascripts/commit/file.js.coffee
deleted file mode 100644
index a45ee58d..00000000
--- a/app/assets/javascripts/commit/file.js.coffee
+++ /dev/null
@@ -1,7 +0,0 @@
-class CommitFile
-
- constructor: (file) ->
- if $('.image', file).length
- new ImageFile(file)
-
-this.CommitFile = CommitFile
\ No newline at end of file
diff --git a/app/assets/javascripts/commit/image-file.js.coffee b/app/assets/javascripts/commit/image-file.js.coffee
deleted file mode 100644
index f901a9e2..00000000
--- a/app/assets/javascripts/commit/image-file.js.coffee
+++ /dev/null
@@ -1,128 +0,0 @@
-class ImageFile
-
- # Width where images must fits in, for 2-up this gets divided by 2
- @availWidth = 900
- @viewModes = ['two-up', 'swipe']
-
- constructor: (@file) ->
- # Determine if old and new file has same dimensions, if not show 'two-up' view
- this.requestImageInfo $('.two-up.view .frame.deleted img', @file), (deletedWidth, deletedHeight) =>
- this.requestImageInfo $('.two-up.view .frame.added img', @file), (width, height) =>
- if width == deletedWidth && height == deletedHeight
- this.initViewModes()
- else
- this.initView('two-up')
-
- initViewModes: ->
- viewMode = ImageFile.viewModes[0]
-
- $('.view-modes', @file).removeClass 'hide'
- $('.view-modes-menu', @file).on 'click', 'li', (event) =>
- unless $(event.currentTarget).hasClass('active')
- this.activateViewMode(event.currentTarget.className)
-
- this.activateViewMode(viewMode)
-
- activateViewMode: (viewMode) ->
- $('.view-modes-menu li', @file)
- .removeClass('active')
- .filter(".#{viewMode}").addClass 'active'
- $(".view:visible:not(.#{viewMode})", @file).fadeOut 200, =>
- $(".view.#{viewMode}", @file).fadeIn(200)
- this.initView viewMode
-
- initView: (viewMode) ->
- this.views[viewMode].call(this)
-
- prepareFrames = (view) ->
- maxWidth = 0
- maxHeight = 0
- $('.frame', view).each (index, frame) =>
- width = $(frame).width()
- height = $(frame).height()
- maxWidth = if width > maxWidth then width else maxWidth
- maxHeight = if height > maxHeight then height else maxHeight
- .css
- width: maxWidth
- height: maxHeight
-
- [maxWidth, maxHeight]
-
- views:
- 'two-up': ->
- $('.two-up.view .wrap', @file).each (index, wrap) =>
- $('img', wrap).each ->
- currentWidth = $(this).width()
- if currentWidth > ImageFile.availWidth / 2
- $(this).width ImageFile.availWidth / 2
-
- this.requestImageInfo $('img', wrap), (width, height) ->
- $('.image-info .meta-width', wrap).text "#{width}px"
- $('.image-info .meta-height', wrap).text "#{height}px"
- $('.image-info', wrap).removeClass('hide')
-
- 'swipe': ->
- maxWidth = 0
- maxHeight = 0
-
- $('.swipe.view', @file).each (index, view) =>
-
- [maxWidth, maxHeight] = prepareFrames(view)
-
- $('.swipe-frame', view).css
- width: maxWidth + 16
- height: maxHeight + 28
-
- $('.swipe-wrap', view).css
- width: maxWidth + 1
- height: maxHeight + 2
-
- $('.swipe-bar', view).css
- left: 0
- .draggable
- axis: 'x'
- containment: 'parent'
- drag: (event) ->
- $('.swipe-wrap', view).width (maxWidth + 1) - $(this).position().left
- stop: (event) ->
- $('.swipe-wrap', view).width (maxWidth + 1) - $(this).position().left
-
- 'onion-skin': ->
- maxWidth = 0
- maxHeight = 0
-
- dragTrackWidth = $('.drag-track', @file).width() - $('.dragger', @file).width()
-
- $('.onion-skin.view', @file).each (index, view) =>
-
- [maxWidth, maxHeight] = prepareFrames(view)
-
- $('.onion-skin-frame', view).css
- width: maxWidth + 16
- height: maxHeight + 28
-
- $('.swipe-wrap', view).css
- width: maxWidth + 1
- height: maxHeight + 2
-
- $('.dragger', view).css
- left: dragTrackWidth
- .draggable
- axis: 'x'
- containment: 'parent'
- drag: (event) ->
- $('.frame.added', view).css('opacity', $(this).position().left / dragTrackWidth)
- stop: (event) ->
- $('.frame.added', view).css('opacity', $(this).position().left / dragTrackWidth)
-
-
-
- requestImageInfo: (img, callback) ->
- domImg = img.get(0)
- if domImg.complete
- callback.call(this, domImg.naturalWidth, domImg.naturalHeight)
- else
- img.on 'load', =>
- callback.call(this, domImg.naturalWidth, domImg.naturalHeight)
-
-this.ImageFile = ImageFile
\ No newline at end of file
diff --git a/app/assets/javascripts/commits.js b/app/assets/javascripts/commits.js
new file mode 100644
index 00000000..b31fe485
--- /dev/null
+++ b/app/assets/javascripts/commits.js
@@ -0,0 +1,59 @@
+var CommitsList = {
+ ref:null,
+ limit:0,
+ offset:0,
+ disable:false,
+
+ init:
+ function(ref, limit) {
+ $(".day-commits-table li.commit").live('click', function(e){
+ if(e.target.nodeName != "A") {
+ location.href = $(this).attr("url");
+ e.stopPropagation();
+ return false;
+ }
+ });
+
+ this.ref=ref;
+ this.limit=limit;
+ this.offset=limit;
+ this.initLoadMore();
+ $('.loading').show();
+ },
+
+ getOld:
+ function() {
+ $('.loading').show();
+ $.ajax({
+ type: "GET",
+ url: location.href,
+ data: "limit=" + this.limit + "&offset=" + this.offset + "&ref=" + this.ref,
+ complete: function(){ $('.loading').hide()},
+ dataType: "script"});
+ },
+
+ append:
+ function(count, html) {
+ $("#commits_list").append(html);
+ if(count > 0) {
+ this.offset += count;
+ } else {
+ this.disable = true;
+ }
+ },
+
+ initLoadMore:
+ function() {
+ $(document).endlessScroll({
+ bottomPixels: 400,
+ fireDelay: 1000,
+ fireOnce:true,
+ ceaseFire: function() {
+ return CommitsList.disable;
+ },
+ callback: function(i) {
+ CommitsList.getOld();
+ }
+ });
+ }
+}
diff --git a/app/assets/javascripts/commits.js.coffee b/app/assets/javascripts/commits.js.coffee
deleted file mode 100644
index 47d6fcf8..00000000
--- a/app/assets/javascripts/commits.js.coffee
+++ /dev/null
@@ -1,54 +0,0 @@
-class CommitsList
- @data =
- ref: null
- limit: 0
- offset: 0
- @disable = false
-
- @showProgress: ->
- $('.loading').show()
-
- @hideProgress: ->
- $('.loading').hide()
-
- @init: (ref, limit) ->
- $(".day-commits-table li.commit").live 'click', (event) ->
- if event.target.nodeName != "A"
- location.href = $(this).attr("url")
- e.stopPropagation()
- return false
-
- @data.ref = ref
- @data.limit = limit
- @data.offset = limit
-
- this.initLoadMore()
- this.showProgress();
-
- @getOld: ->
- this.showProgress()
- $.ajax
- type: "GET"
- url: location.href
- data: @data
- complete: this.hideProgress
- dataType: "script"
-
- @append: (count, html) ->
- $("#commits-list").append(html)
- if count > 0
- @data.offset += count
- else
- @disable = true
-
- @initLoadMore: ->
- $(document).endlessScroll
- bottomPixels: 400
- fireDelay: 1000
- fireOnce: true
- ceaseFire: =>
- @disable
- callback: =>
- this.getOld()
-
-this.CommitsList = CommitsList
\ No newline at end of file
diff --git a/app/assets/javascripts/dashboard.js.coffee b/app/assets/javascripts/dashboard.js.coffee
index 4189c90b..f15d09dd 100644
--- a/app/assets/javascripts/dashboard.js.coffee
+++ b/app/assets/javascripts/dashboard.js.coffee
@@ -1,15 +1,14 @@
window.dashboardPage = ->
Pager.init 20, true
- initSidebarTab()
$(".event_filter_link").bind "click", (event) ->
event.preventDefault()
toggleFilter $(this)
reloadActivities()
-
+
reloadActivities = ->
$(".content_list").html ''
Pager.init 20, true
-
+
toggleFilter = (sender) ->
sender.parent().toggleClass "inactive"
event_filters = $.cookie("event_filter")
@@ -18,22 +17,11 @@ toggleFilter = (sender) ->
event_filters = event_filters.split(",")
else
event_filters = new Array()
-
+
index = event_filters.indexOf(filter)
if index is -1
event_filters.push filter
else
event_filters.splice index, 1
-
+
$.cookie "event_filter", event_filters.join(",")
-
-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
diff --git a/app/assets/javascripts/extensions/jquery.js.coffee b/app/assets/javascripts/extensions/jquery.js.coffee
deleted file mode 100644
index 8a997fe3..00000000
--- a/app/assets/javascripts/extensions/jquery.js.coffee
+++ /dev/null
@@ -1,9 +0,0 @@
-$.fn.showAndHide = ->
- $(@).show().
- delay(3000).
- fadeOut()
-
-$.fn.enableButton = ->
- $(@).removeAttr('disabled').
- removeClass('disabled')
-
diff --git a/app/assets/javascripts/lib/jquery.timeago.js b/app/assets/javascripts/lib/jquery.timeago.js
deleted file mode 100644
index cc17aa7d..00000000
--- a/app/assets/javascripts/lib/jquery.timeago.js
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * Timeago is a jQuery plugin that makes it easy to support automatically
- * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
- *
- * @name timeago
- * @version 1.1.0
- * @requires jQuery v1.2.3+
- * @author Ryan McGeary
- * @license MIT License - http://www.opensource.org/licenses/mit-license.php
- *
- * For usage and examples, visit:
- * http://timeago.yarp.com/
- *
- * Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
- */
-
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['jquery'], factory);
- } else {
- // Browser globals
- factory(jQuery);
- }
-}(function ($) {
- $.timeago = function(timestamp) {
- if (timestamp instanceof Date) {
- return inWords(timestamp);
- } else if (typeof timestamp === "string") {
- return inWords($.timeago.parse(timestamp));
- } else if (typeof timestamp === "number") {
- return inWords(new Date(timestamp));
- } else {
- return inWords($.timeago.datetime(timestamp));
- }
- };
- var $t = $.timeago;
-
- $.extend($.timeago, {
- settings: {
- refreshMillis: 60000,
- allowFuture: false,
- strings: {
- prefixAgo: null,
- prefixFromNow: null,
- suffixAgo: "ago",
- suffixFromNow: "from now",
- seconds: "less than a minute",
- minute: "about a minute",
- minutes: "%d minutes",
- hour: "about an hour",
- hours: "about %d hours",
- day: "a day",
- days: "%d days",
- month: "about a month",
- months: "%d months",
- year: "about a year",
- years: "%d years",
- wordSeparator: " ",
- numbers: []
- }
- },
- inWords: function(distanceMillis) {
- var $l = this.settings.strings;
- var prefix = $l.prefixAgo;
- var suffix = $l.suffixAgo;
- if (this.settings.allowFuture) {
- if (distanceMillis < 0) {
- prefix = $l.prefixFromNow;
- suffix = $l.suffixFromNow;
- }
- }
-
- var seconds = Math.abs(distanceMillis) / 1000;
- var minutes = seconds / 60;
- var hours = minutes / 60;
- var days = hours / 24;
- var years = days / 365;
-
- function substitute(stringOrFunction, number) {
- var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
- var value = ($l.numbers && $l.numbers[number]) || number;
- return string.replace(/%d/i, value);
- }
-
- var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
- seconds < 90 && substitute($l.minute, 1) ||
- minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
- minutes < 90 && substitute($l.hour, 1) ||
- hours < 24 && substitute($l.hours, Math.round(hours)) ||
- hours < 42 && substitute($l.day, 1) ||
- days < 30 && substitute($l.days, Math.round(days)) ||
- days < 45 && substitute($l.month, 1) ||
- days < 365 && substitute($l.months, Math.round(days / 30)) ||
- years < 1.5 && substitute($l.year, 1) ||
- substitute($l.years, Math.round(years));
-
- var separator = $l.wordSeparator || "";
- if ($l.wordSeparator === undefined) { separator = " "; }
- return $.trim([prefix, words, suffix].join(separator));
- },
- parse: function(iso8601) {
- var s = $.trim(iso8601);
- s = s.replace(/\.\d+/,""); // remove milliseconds
- s = s.replace(/-/,"/").replace(/-/,"/");
- s = s.replace(/T/," ").replace(/Z/," UTC");
- s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
- return new Date(s);
- },
- datetime: function(elem) {
- var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") : $(elem).attr("title");
- return $t.parse(iso8601);
- },
- isTime: function(elem) {
- // jQuery's `is()` doesn't play well with HTML5 in IE
- return $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
- }
- });
-
- // functions that can be called via $(el).timeago('action')
- // init is default when no action is given
- // functions are called with context of a single element
- var functions = {
- init: function(){
- var refresh_el = $.proxy(refresh, this);
- refresh_el();
- var $s = $t.settings;
- if ($s.refreshMillis > 0) {
- setInterval(refresh_el, $s.refreshMillis);
- }
- },
- update: function(time){
- $(this).data('timeago', { datetime: $t.parse(time) });
- refresh.apply(this);
- }
- };
-
- $.fn.timeago = function(action, options) {
- var fn = action ? functions[action] : functions.init;
- if(!fn){
- throw new Error("Unknown function name '"+ action +"' for timeago");
- }
- // each over objects here and call the requested function
- this.each(function(){
- fn.call(this, options);
- });
- return this;
- };
-
- function refresh() {
- var data = prepareData(this);
- if (!isNaN(data.datetime)) {
- $(this).text(inWords(data.datetime));
- }
- return this;
- }
-
- function prepareData(element) {
- element = $(element);
- if (!element.data("timeago")) {
- element.data("timeago", { datetime: $t.datetime(element) });
- var text = $.trim(element.text());
- if (text.length > 0 && !($t.isTime(element) && element.attr("title"))) {
- element.attr("title", text);
- }
- }
- return element.data("timeago");
- }
-
- function inWords(date) {
- return $t.inWords(distance(date));
- }
-
- function distance(date) {
- return (new Date().getTime() - date.getTime());
- }
-
- // fix for IE6 suckage
- document.createElement("abbr");
- document.createElement("time");
-}));
diff --git a/app/assets/javascripts/lib/md5.js b/app/assets/javascripts/lib/md5.js
deleted file mode 100644
index b63716ea..00000000
--- a/app/assets/javascripts/lib/md5.js
+++ /dev/null
@@ -1,211 +0,0 @@
-function md5 (str) {
- // http://kevin.vanzonneveld.net
- // + original by: Webtoolkit.info (http://www.webtoolkit.info/)
- // + namespaced by: Michael White (http://getsprink.com)
- // + tweaked by: Jack
- // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
- // + input by: Brett Zamir (http://brett-zamir.me)
- // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
- // - depends on: utf8_encode
- // * example 1: md5('Kevin van Zonneveld');
- // * returns 1: '6e658d4bfcb59cc13f96c14450ac40b9'
- var xl;
-
- var rotateLeft = function (lValue, iShiftBits) {
- return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
- };
-
- var addUnsigned = function (lX, lY) {
- var lX4, lY4, lX8, lY8, lResult;
- lX8 = (lX & 0x80000000);
- lY8 = (lY & 0x80000000);
- lX4 = (lX & 0x40000000);
- lY4 = (lY & 0x40000000);
- lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
- if (lX4 & lY4) {
- return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
- }
- if (lX4 | lY4) {
- if (lResult & 0x40000000) {
- return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
- } else {
- return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
- }
- } else {
- return (lResult ^ lX8 ^ lY8);
- }
- };
-
- var _F = function (x, y, z) {
- return (x & y) | ((~x) & z);
- };
- var _G = function (x, y, z) {
- return (x & z) | (y & (~z));
- };
- var _H = function (x, y, z) {
- return (x ^ y ^ z);
- };
- var _I = function (x, y, z) {
- return (y ^ (x | (~z)));
- };
-
- var _FF = function (a, b, c, d, x, s, ac) {
- a = addUnsigned(a, addUnsigned(addUnsigned(_F(b, c, d), x), ac));
- return addUnsigned(rotateLeft(a, s), b);
- };
-
- var _GG = function (a, b, c, d, x, s, ac) {
- a = addUnsigned(a, addUnsigned(addUnsigned(_G(b, c, d), x), ac));
- return addUnsigned(rotateLeft(a, s), b);
- };
-
- var _HH = function (a, b, c, d, x, s, ac) {
- a = addUnsigned(a, addUnsigned(addUnsigned(_H(b, c, d), x), ac));
- return addUnsigned(rotateLeft(a, s), b);
- };
-
- var _II = function (a, b, c, d, x, s, ac) {
- a = addUnsigned(a, addUnsigned(addUnsigned(_I(b, c, d), x), ac));
- return addUnsigned(rotateLeft(a, s), b);
- };
-
- var convertToWordArray = function (str) {
- var lWordCount;
- var lMessageLength = str.length;
- var lNumberOfWords_temp1 = lMessageLength + 8;
- var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64;
- var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
- var lWordArray = new Array(lNumberOfWords - 1);
- var lBytePosition = 0;
- var lByteCount = 0;
- while (lByteCount < lMessageLength) {
- lWordCount = (lByteCount - (lByteCount % 4)) / 4;
- lBytePosition = (lByteCount % 4) * 8;
- lWordArray[lWordCount] = (lWordArray[lWordCount] | (str.charCodeAt(lByteCount) << lBytePosition));
- lByteCount++;
- }
- lWordCount = (lByteCount - (lByteCount % 4)) / 4;
- lBytePosition = (lByteCount % 4) * 8;
- lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
- lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
- lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
- return lWordArray;
- };
-
- var wordToHex = function (lValue) {
- var wordToHexValue = "",
- wordToHexValue_temp = "",
- lByte, lCount;
- for (lCount = 0; lCount <= 3; lCount++) {
- lByte = (lValue >>> (lCount * 8)) & 255;
- wordToHexValue_temp = "0" + lByte.toString(16);
- wordToHexValue = wordToHexValue + wordToHexValue_temp.substr(wordToHexValue_temp.length - 2, 2);
- }
- return wordToHexValue;
- };
-
- var x = [],
- k, AA, BB, CC, DD, a, b, c, d, S11 = 7,
- S12 = 12,
- S13 = 17,
- S14 = 22,
- S21 = 5,
- S22 = 9,
- S23 = 14,
- S24 = 20,
- S31 = 4,
- S32 = 11,
- S33 = 16,
- S34 = 23,
- S41 = 6,
- S42 = 10,
- S43 = 15,
- S44 = 21;
-
- str = this.utf8_encode(str);
- x = convertToWordArray(str);
- a = 0x67452301;
- b = 0xEFCDAB89;
- c = 0x98BADCFE;
- d = 0x10325476;
-
- xl = x.length;
- for (k = 0; k < xl; k += 16) {
- AA = a;
- BB = b;
- CC = c;
- DD = d;
- a = _FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
- d = _FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
- c = _FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
- b = _FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
- a = _FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
- d = _FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
- c = _FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
- b = _FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
- a = _FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
- d = _FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
- c = _FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
- b = _FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
- a = _FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
- d = _FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
- c = _FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
- b = _FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
- a = _GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
- d = _GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
- c = _GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
- b = _GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
- a = _GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
- d = _GG(d, a, b, c, x[k + 10], S22, 0x2441453);
- c = _GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
- b = _GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
- a = _GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
- d = _GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
- c = _GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
- b = _GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
- a = _GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
- d = _GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
- c = _GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
- b = _GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
- a = _HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
- d = _HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
- c = _HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
- b = _HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
- a = _HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
- d = _HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
- c = _HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
- b = _HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
- a = _HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
- d = _HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
- c = _HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
- b = _HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
- a = _HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
- d = _HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
- c = _HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
- b = _HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
- a = _II(a, b, c, d, x[k + 0], S41, 0xF4292244);
- d = _II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
- c = _II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
- b = _II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
- a = _II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
- d = _II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
- c = _II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
- b = _II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
- a = _II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
- d = _II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
- c = _II(c, d, a, b, x[k + 6], S43, 0xA3014314);
- b = _II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
- a = _II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
- d = _II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
- c = _II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
- b = _II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
- a = addUnsigned(a, AA);
- b = addUnsigned(b, BB);
- c = addUnsigned(c, CC);
- d = addUnsigned(d, DD);
- }
-
- var temp = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
-
- return temp.toLowerCase();
-}
diff --git a/app/assets/javascripts/lib/utf8_encode.js b/app/assets/javascripts/lib/utf8_encode.js
deleted file mode 100644
index 39ffe44d..00000000
--- a/app/assets/javascripts/lib/utf8_encode.js
+++ /dev/null
@@ -1,70 +0,0 @@
-function utf8_encode (argString) {
- // http://kevin.vanzonneveld.net
- // + original by: Webtoolkit.info (http://www.webtoolkit.info/)
- // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
- // + improved by: sowberry
- // + tweaked by: Jack
- // + bugfixed by: Onno Marsman
- // + improved by: Yves Sucaet
- // + bugfixed by: Onno Marsman
- // + bugfixed by: Ulrich
- // + bugfixed by: Rafal Kukawski
- // + improved by: kirilloid
- // + bugfixed by: kirilloid
- // * example 1: utf8_encode('Kevin van Zonneveld');
- // * returns 1: 'Kevin van Zonneveld'
-
- if (argString === null || typeof argString === "undefined") {
- return "";
- }
-
- var string = (argString + ''); // .replace(/\r\n/g, "\n").replace(/\r/g, "\n");
- var utftext = '',
- start, end, stringl = 0;
-
- start = end = 0;
- stringl = string.length;
- for (var n = 0; n < stringl; n++) {
- var c1 = string.charCodeAt(n);
- var enc = null;
-
- if (c1 < 128) {
- end++;
- } else if (c1 > 127 && c1 < 2048) {
- enc = String.fromCharCode(
- (c1 >> 6) | 192,
- ( c1 & 63) | 128
- );
- } else if (c1 & 0xF800 != 0xD800) {
- enc = String.fromCharCode(
- (c1 >> 12) | 224,
- ((c1 >> 6) & 63) | 128,
- ( c1 & 63) | 128
- );
- } else { // surrogate pairs
- if (c1 & 0xFC00 != 0xD800) { throw new RangeError("Unmatched trail surrogate at " + n); }
- var c2 = string.charCodeAt(++n);
- if (c2 & 0xFC00 != 0xDC00) { throw new RangeError("Unmatched lead surrogate at " + (n-1)); }
- c1 = ((c1 & 0x3FF) << 10) + (c2 & 0x3FF) + 0x10000;
- enc = String.fromCharCode(
- (c1 >> 18) | 240,
- ((c1 >> 12) & 63) | 128,
- ((c1 >> 6) & 63) | 128,
- ( c1 & 63) | 128
- );
- }
- if (enc !== null) {
- if (end > start) {
- utftext += string.slice(start, end);
- }
- utftext += enc;
- start = end = n + 1;
- }
- }
-
- if (end > start) {
- utftext += string.slice(start, stringl);
- }
-
- return utftext;
-}
diff --git a/app/assets/javascripts/main.js.coffee b/app/assets/javascripts/main.js.coffee
index 39ec86e6..f6c398c0 100644
--- a/app/assets/javascripts/main.js.coffee
+++ b/app/assets/javascripts/main.js.coffee
@@ -7,8 +7,6 @@ window.slugify = (text) ->
window.ajaxGet = (url) ->
$.ajax({type: "GET", url: url, dataType: "script"})
-window.showAndHide = (selector) ->
-
window.errorMessage = (message) ->
ehtml = $("
")
ehtml.addClass("error_message")
@@ -34,22 +32,10 @@ window.disableButtonIfEmptyField = (field_selector, button_selector) ->
else
closest_submit.enable()
-window.sanitize = (str) ->
- return str.replace(/<(?:.|\n)*?>/gm, '')
-
-window.linkify = (str) ->
- exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig
- return str.replace(exp,"$1 ")
-
-
$ ->
# Click a .one_click_select field, select the contents
$(".one_click_select").on 'click', -> $(@).select()
- # Click a .appear-link, appear-data fadeout
- $(".appear-link").on 'click', ->
- $('.appear-data').fadeIn()
-
# Initialize chosen selects
$('select.chosen').chosen()
@@ -59,17 +45,11 @@ $ ->
# Bottom tooltip
$('.has_bottom_tooltip').tooltip(placement: 'bottom')
- # Form submitter
- $('.trigger-submit').on 'change', ->
- $(@).parents('form').submit()
-
- $("abbr.timeago").timeago()
-
# Flash
- if (flash = $(".flash-container")).length > 0
- flash.click -> $(@).fadeOut()
- flash.show()
- setTimeout (-> flash.fadeOut()), 3000
+ if (flash = $("#flash-container")).length > 0
+ flash.click -> $(@).slideUp("slow")
+ flash.slideDown "slow"
+ setTimeout (-> flash.slideUp("slow")), 3000
# Disable form buttons while a form is submitting
$('body').on 'ajax:complete, ajax:beforeSend, submit', 'form', (e) ->
diff --git a/app/assets/javascripts/merge_requests.js.coffee b/app/assets/javascripts/merge_requests.js.coffee
index 890ca400..9c9cc613 100644
--- a/app/assets/javascripts/merge_requests.js.coffee
+++ b/app/assets/javascripts/merge_requests.js.coffee
@@ -1,6 +1,6 @@
#
# * Filter merge requests
-#
+#
@merge_requestsPage = ->
$('#assignee_id').chosen()
$('#milestone_id').chosen()
@@ -8,16 +8,16 @@
$(this).closest('form').submit()
class MergeRequest
-
+
constructor: (@opts) ->
this.$el = $('.merge-request')
@diffs_loaded = false
@commits_loaded = false
-
+
this.activateTab(@opts.action)
-
+
this.bindEvents()
-
+
this.initMergeWidget()
this.$('.show-all-commits').on 'click', =>
this.showAllCommits()
@@ -27,11 +27,11 @@ class MergeRequest
this.$el.find(selector)
initMergeWidget: ->
- this.showState( @opts.current_status )
-
+ this.showState( @opts.current_state )
+
if this.$('.automerge_widget').length and @opts.check_enable
$.get @opts.url_to_automerge_check, (data) =>
- this.showState( data.merge_status )
+ this.showState( data.state )
, 'json'
if @opts.ci_enable
@@ -42,12 +42,12 @@ class MergeRequest
bindEvents: ->
this.$('.nav-tabs').on 'click', 'a', (event) =>
a = $(event.currentTarget)
-
+
href = a.attr('href')
History.replaceState {path: href}, document.title, href
-
+
event.preventDefault()
-
+
this.$('.nav-tabs').on 'click', 'li', (event) =>
this.activateTab($(event.currentTarget).data('action'))
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index f5005ec2..8a7e08dd 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -4,15 +4,31 @@ var NoteList = {
target_params: null,
target_id: 0,
target_type: null,
+ top_id: 0,
+ bottom_id: 0,
+ loading_more_disabled: false,
+ reversed: false,
init: function(tid, tt, path) {
NoteList.notes_path = path + ".js";
NoteList.target_id = tid;
NoteList.target_type = tt;
+ NoteList.reversed = $("#notes-list").is(".reversed");
NoteList.target_params = "target_type=" + NoteList.target_type + "&target_id=" + NoteList.target_id;
NoteList.setupMainTargetNoteForm();
+ if(NoteList.reversed) {
+ var form = $(".js-main-target-form");
+ form.find(".buttons, .note_options").hide();
+ var textarea = form.find(".js-note-text");
+ textarea.css("height", "40px");
+ textarea.on("focus", function(){
+ textarea.css("height", "80px");
+ form.find(".buttons, .note_options").show();
+ });
+ }
+
// get initial set of notes
NoteList.getContent();
@@ -311,7 +327,7 @@ var NoteList = {
/**
- * Gets an initial set of notes.
+ * Gets an inital set of notes.
*/
getContent: function() {
$.ajax({
@@ -328,10 +344,127 @@ var NoteList = {
* Replaces the content of #notes-list with the given html.
*/
setContent: function(newNoteIds, html) {
+ NoteList.top_id = newNoteIds.first();
+ NoteList.bottom_id = newNoteIds.last();
$("#notes-list").html(html);
+
+ // for the wall
+ if (NoteList.reversed) {
+ // init infinite scrolling
+ NoteList.initLoadMore();
+
+ // init getting new notes
+ NoteList.initRefreshNew();
+ }
},
+ /**
+ * Handle loading more notes when scrolling to the bottom of the page.
+ * The id of the last note in the list is in NoteList.bottom_id.
+ *
+ * Set up refreshing only new notes after all notes have been loaded.
+ */
+
+
+ /**
+ * Initializes loading more notes when scrolling to the bottom of the page.
+ */
+ initLoadMore: function() {
+ $(document).endlessScroll({
+ bottomPixels: 400,
+ fireDelay: 1000,
+ fireOnce:true,
+ ceaseFire: function() {
+ return NoteList.loading_more_disabled;
+ },
+ callback: function(i) {
+ NoteList.getMore();
+ }
+ });
+ },
+
+ /**
+ * Gets an additional set of notes.
+ */
+ getMore: function() {
+ // only load more notes if there are no "new" notes
+ $('.loading').show();
+ $.ajax({
+ url: NoteList.notes_path,
+ data: NoteList.target_params + "&loading_more=1&" + (NoteList.reversed ? "before_id" : "after_id") + "=" + NoteList.bottom_id,
+ complete: function(){ $('.js-notes-busy').removeClass("loading")},
+ beforeSend: function() { $('.js-notes-busy').addClass("loading") },
+ dataType: "script"
+ });
+ },
+
+ /**
+ * Called in response to getMore().
+ * Append notes to #notes-list.
+ */
+ appendMoreNotes: function(newNoteIds, html) {
+ var lastNewNoteId = newNoteIds.last();
+ if(lastNewNoteId != NoteList.bottom_id) {
+ NoteList.bottom_id = lastNewNoteId;
+ $("#notes-list").append(html);
+ }
+ },
+
+ /**
+ * Called in response to getMore().
+ * Disables loading more notes when scrolling to the bottom of the page.
+ */
+ finishedLoadingMore: function() {
+ NoteList.loading_more_disabled = true;
+
+ // make sure we are up to date
+ NoteList.updateVotes();
+ },
+
+
+ /**
+ * Handle refreshing and adding of new notes.
+ *
+ * New notes are all notes that are created after the site has been loaded.
+ * The "old" notes are in #notes-list the "new" ones will be in #new-notes-list.
+ * The id of the last "old" note is in NoteList.bottom_id.
+ */
+
+
+ /**
+ * Initializes getting new notes every n seconds.
+ *
+ * Note: only used on wall.
+ */
+ initRefreshNew: function() {
+ setInterval("NoteList.getNew()", 10000);
+ },
+
+ /**
+ * Gets the new set of notes.
+ *
+ * Note: only used on wall.
+ */
+ getNew: function() {
+ $.ajax({
+ url: NoteList.notes_path,
+ data: NoteList.target_params + "&loading_new=1&after_id=" + (NoteList.reversed ? NoteList.top_id : NoteList.bottom_id),
+ dataType: "script"
+ });
+ },
+
+ /**
+ * Called in response to getNew().
+ * Replaces the content of #new-notes-list with the given html.
+ *
+ * Note: only used on wall.
+ */
+ replaceNewNotes: function(newNoteIds, html) {
+ $("#new-notes-list").html(html);
+ NoteList.updateVotes();
+ },
+
/**
* Adds a single common note to #notes-list.
*/
@@ -364,6 +497,15 @@ var NoteList = {
$.proxy(NoteList.removeDiscussionNoteForm, form).call();
},
+ /**
+ * Adds a single wall note to #new-notes-list.
+ *
+ * Note: only used on wall.
+ */
+ appendNewWallNote: function(id, html) {
+ $("#new-notes-list").prepend(html);
+ },
+
/**
* Called in response the main target form has been successfully submitted.
*
diff --git a/app/assets/javascripts/pager.js b/app/assets/javascripts/pager.js
new file mode 100644
index 00000000..7edd6bd6
--- /dev/null
+++ b/app/assets/javascripts/pager.js
@@ -0,0 +1,56 @@
+var Pager = {
+ limit:0,
+ offset:0,
+ disable:false,
+
+ init:
+ function(limit, preload) {
+ this.limit=limit;
+
+ if(preload) {
+ this.offset = 0;
+ this.getOld();
+ } else {
+ this.offset = limit;
+ }
+
+ this.initLoadMore();
+ },
+
+ getOld:
+ function() {
+ $('.loading').show();
+ $.ajax({
+ type: "GET",
+ url: location.href,
+ data: "limit=" + this.limit + "&offset=" + this.offset,
+ complete: function(){ $('.loading').hide()},
+ dataType: "script"});
+ },
+
+ append:
+ function(count, html) {
+ $(".content_list").append(html);
+ if(count > 0) {
+ this.offset += count;
+ } else {
+ this.disable = true;
+ }
+ },
+
+ initLoadMore:
+ function() {
+ $(document).endlessScroll({
+ bottomPixels: 400,
+ fireDelay: 1000,
+ fireOnce:true,
+ ceaseFire: function() {
+ return Pager.disable;
+ },
+ callback: function(i) {
+ $('.loading').show();
+ Pager.getOld();
+ }
+ });
+ }
+}
diff --git a/app/assets/javascripts/pager.js.coffee b/app/assets/javascripts/pager.js.coffee
deleted file mode 100644
index 5f606acd..00000000
--- a/app/assets/javascripts/pager.js.coffee
+++ /dev/null
@@ -1,42 +0,0 @@
-@Pager =
- limit: 0
- offset: 0
- disable: false
- init: (limit, preload) ->
- @limit = limit
- if preload
- @offset = 0
- @getOld()
- else
- @offset = limit
- @initLoadMore()
-
- getOld: ->
- $(".loading").show()
- $.ajax
- type: "GET"
- url: location.href
- data: "limit=" + @limit + "&offset=" + @offset
- complete: ->
- $(".loading").hide()
-
- dataType: "script"
-
- append: (count, html) ->
- $(".content_list").append html
- if count > 0
- @offset += count
- else
- @disable = true
-
- initLoadMore: ->
- $(document).endlessScroll
- bottomPixels: 400
- fireDelay: 1000
- fireOnce: true
- ceaseFire: ->
- Pager.disable
-
- callback: (i) ->
- $(".loading").show()
- Pager.getOld()
diff --git a/app/assets/javascripts/profile.js.coffee b/app/assets/javascripts/profile.js.coffee
index 213133bc..42207a39 100644
--- a/app/assets/javascripts/profile.js.coffee
+++ b/app/assets/javascripts/profile.js.coffee
@@ -15,8 +15,6 @@ $ ->
$(this).find('.update-failed').hide()
$('.update-username form').on 'ajax:complete', ->
- $(this).find('.btn-save').enableButton()
+ $(this).find('.save-btn').removeAttr('disabled')
+ $(this).find('.save-btn').removeClass('disabled')
$(this).find('.loading-gif').hide()
-
- $('.update-notifications').on 'ajax:complete', ->
- $(this).find('.btn-save').enableButton()
diff --git a/app/assets/javascripts/projects.js.coffee b/app/assets/javascripts/projects.js.coffee
index 24106c61..d03a487c 100644
--- a/app/assets/javascripts/projects.js.coffee
+++ b/app/assets/javascripts/projects.js.coffee
@@ -18,18 +18,3 @@ $ ->
# Ref switcher
$('.project-refs-select').on 'change', ->
$(@).parents('form').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')
-
diff --git a/app/assets/javascripts/tree.js.coffee b/app/assets/javascripts/tree.js.coffee
index 10d0df70..5003f9b0 100644
--- a/app/assets/javascripts/tree.js.coffee
+++ b/app/assets/javascripts/tree.js.coffee
@@ -6,12 +6,17 @@ $ ->
$('span.log_loading:first').removeClass('hide')
$('#tree-slider .tree-item-file-name a, .breadcrumb li > a').live "click", ->
- $("#tree-content-holder").hide("slide", { direction: "left" }, 400)
+ $("#tree-content-holder").hide("slide", { direction: "left" }, 150)
# Make the entire tree-item row clickable, but not if clicking another link (like a commit message)
$("#tree-slider .tree-item").live 'click', (e) ->
$('.tree-item-file-name a', this).trigger('click') if (e.target.nodeName != "A")
-
+
+ # Show/Hide the loading spinner
+ $('#tree-slider .tree-item-file-name a, .breadcrumb a, .project-refs-form').live
+ "ajax:beforeSend": -> $('.tree_progress').addClass("loading")
+ "ajax:complete": -> $('.tree_progress').removeClass("loading")
+
# Maintain forward/back history while browsing the file tree
((window) ->
History = window.History
@@ -28,12 +33,7 @@ $ ->
History.Adapter.bind window, 'statechange', ->
state = History.getState()
- $.ajax({
- url: state.url,
- dataType: 'script',
- beforeSend: -> $('.tree_progress').addClass("loading"),
- complete: -> $('.tree_progress').removeClass("loading")
- })
+ window.ajaxGet(state.url)
)(window)
# See if there are lines selected
diff --git a/app/assets/javascripts/users_select.js.coffee b/app/assets/javascripts/users_select.js.coffee
deleted file mode 100644
index f9e523ea..00000000
--- a/app/assets/javascripts/users_select.js.coffee
+++ /dev/null
@@ -1,36 +0,0 @@
-$ ->
- userFormatResult = (user) ->
- avatar = gon.gravatar_url
- avatar = avatar.replace('%{hash}', md5(user.email))
- avatar = avatar.replace('%{size}', '24')
-
- markup = "
"
- markup += "
"
- markup += "
" + user.name + "
"
- markup += "
" + user.username + "
"
- markup += "
"
- markup
-
- userFormatSelection = (user) ->
- user.name
-
- $('.ajax-users-select').select2
- placeholder: "Search for a user"
- multiple: $('.ajax-users-select').hasClass('multiselect')
- minimumInputLength: 0
- query: (query) ->
- Api.users query.term, (users) ->
- data = { results: users }
- query.callback(data)
-
- initSelection: (element, callback) ->
- id = $(element).val()
- if id isnt ""
- Api.user(id, callback)
-
-
- formatResult: userFormatResult
- formatSelection: userFormatSelection
- dropdownCssClass: "ajax-users-dropdown"
- escapeMarkup: (m) -> # we do not want to escape markup since we are displaying html in results
- m
diff --git a/app/assets/javascripts/wall.js.coffee b/app/assets/javascripts/wall.js.coffee
deleted file mode 100644
index e2fca3dd..00000000
--- a/app/assets/javascripts/wall.js.coffee
+++ /dev/null
@@ -1,83 +0,0 @@
-@Wall =
- note_ids: []
- project_id: null
-
- init: (project_id) ->
- Wall.project_id = project_id
- Wall.getContent()
- Wall.initRefresh()
- Wall.initForm()
-
- #
- # Gets an initial set of notes.
- #
- getContent: ->
- Api.notes Wall.project_id, (notes) ->
- $.each notes, (i, note) ->
- # render note if it not present in loaded list
- # or skip if rendered
- if $.inArray(note.id, Wall.note_ids) == -1
- Wall.note_ids.push(note.id)
- Wall.renderNote(note)
- Wall.scrollDown()
- $("abbr.timeago").timeago()
-
- initRefresh: ->
- setInterval("Wall.refresh()", 10000)
-
- refresh: ->
- Wall.getContent()
-
- scrollDown: ->
- notes = $('ul.notes')
- $('body, html').scrollTop(notes.height())
-
- initForm: ->
- form = $('.wall-note-form')
- form.find("#target_type").val('wall')
-
- form.on 'ajax:success', ->
- Wall.refresh()
- form.find(".js-note-text").val("").trigger("input")
-
- form.on 'ajax:complete', ->
- form.find(".js-comment-button").removeAttr('disabled')
- form.find(".js-comment-button").removeClass('disabled')
-
- form.on "click", ".js-choose-note-attachment-button", ->
- form.find(".js-note-attachment-input").click()
-
- form.on "change", ".js-note-attachment-input", ->
- filename = $(this).val().replace(/^.*[\\\/]/, '')
- form.find(".js-attachment-filename").text(filename)
-
- form.find('.note_text').keydown (e) ->
- if e.ctrlKey && e.keyCode == 13
- form.find('.js-comment-button').submit()
-
- form.show()
-
- renderNote: (note) ->
- template = Wall.noteTemplate()
- template = template.replace('{{author_name}}', note.author.name)
- template = template.replace('{{created_at}}', note.created_at)
- template = template.replace('{{text}}', linkify(sanitize(note.body)))
-
- if note.attachment
- file = '' + note.attachment + ' '
- else
- file = ''
- template = template.replace('{{file}}', file)
-
-
- $('ul.notes').append(template)
-
- noteTemplate: ->
- return '
- {{author_name}}
-
- {{text}}
- {{file}}
-
- {{created_at}}
- '
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index fd15d5c6..6b500b88 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -5,7 +5,6 @@
*= require jquery.ui.gitlab
*= require jquery.atwho
*= require chosen
- *= require select2
*= require_self
*/
@@ -15,7 +14,7 @@
@import "gitlab_bootstrap.scss";
@import "common.scss";
-@import "selects.scss";
+@import "ref_select.scss";
@import "sections/header.scss";
@import "sections/nav.scss";
@@ -34,12 +33,9 @@
@import "sections/login.scss";
@import "sections/editor.scss";
@import "sections/admin.scss";
-@import "sections/wiki.scss";
-@import "sections/wall.scss";
@import "highlight/white.scss";
@import "highlight/dark.scss";
-@import "highlight/solarized_dark.scss";
/**
* UI themes:
diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss
index 4e7aa968..db077048 100644
--- a/app/assets/stylesheets/common.scss
+++ b/app/assets/stylesheets/common.scss
@@ -1,5 +1,5 @@
html {
- overflow-y: scroll;
+ overflow-y: scroll;
}
/** LAYOUT **/
@@ -67,17 +67,27 @@ table a code {
}
/** FLASH message **/
-.flash-container {
+#flash-container {
+ height: 50px;
+ position: fixed;
+ z-index: 10001;
+ top: 0px;
+ width: 100%;
+ margin-bottom: 15px;
+ overflow: hidden;
+ background: white;
+ cursor: pointer;
+ border-bottom: 1px solid #ccc;
+ text-align: center;
display: none;
- .alert {
- cursor: pointer;
- margin: 0;
- text-align: center;
- border-radius: 0;
- span {
- font-size: 14px;
- }
+ h4 {
+ color: #666;
+ font-size: 18px;
+ line-height: 38px;
+ padding-top: 5px;
+ margin: 2px;
+ font-weight: normal;
}
}
@@ -173,6 +183,17 @@ ul.breadcrumb {
font-weight: bold;
font-size: 14px;
}
+
+ .arrow {
+ background: url("images.png") no-repeat -85px -77px;
+ width: 19px;
+ height: 16px;
+ float: left;
+ position: relative;
+ left: -10px;
+ padding: 0;
+ margin: 0;
+ }
}
input[type=text] {
@@ -182,6 +203,10 @@ input[type=text] {
}
}
+input.git_clone_url {
+ width: 325px;
+}
+
.merge-request-form-holder {
select {
width: 300px;
@@ -252,20 +277,8 @@ p.time {
}
}
-.search-holder {
- label, input {
- height: 30px;
- padding: 0;
- font-size: 14px;
- }
- label {
- line-height: 30px;
- color: #666;
- }
-}
-
.highlight_word {
- border-bottom: 2px solid #F90;
+ background: #EEDC94;
}
.status_info {
@@ -313,6 +326,10 @@ li.note {
li {
border-bottom:none !important;
}
+ .file {
+ padding-left: 20px;
+ background:url("icon-attachment.png") no-repeat left center;
+ }
}
}
@@ -539,19 +556,3 @@ img.emoji {
vertical-align: middle;
width: 20px;
}
-
-.appear-data {
- display: none;
-}
-
-.label-branch {
- @include border-radius(4px);
- padding: 2px 4px;
- border: none;
- font-size: 14px;
- background: #474D57;
- color: #fff;
- font-family: $monospace_font;
- text-shadow: 0 1px 1px #111;
- font-weight: normal;
-}
diff --git a/app/assets/stylesheets/gitlab_bootstrap.scss b/app/assets/stylesheets/gitlab_bootstrap.scss
index 2ad1bf94..f53e0e50 100644
--- a/app/assets/stylesheets/gitlab_bootstrap.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap.scss
@@ -17,8 +17,6 @@ $baseLineHeight: 18px !default;
@import "gitlab_bootstrap/variables.scss";
@import "gitlab_bootstrap/fonts.scss";
@import "gitlab_bootstrap/mixins.scss";
-@import "gitlab_bootstrap/avatar.scss";
-@import "gitlab_bootstrap/nav.scss";
@import "gitlab_bootstrap/common.scss";
@import "gitlab_bootstrap/typography.scss";
@import "gitlab_bootstrap/buttons.scss";
diff --git a/app/assets/stylesheets/gitlab_bootstrap/avatar.scss b/app/assets/stylesheets/gitlab_bootstrap/avatar.scss
deleted file mode 100644
index de1fb155..00000000
--- a/app/assets/stylesheets/gitlab_bootstrap/avatar.scss
+++ /dev/null
@@ -1,8 +0,0 @@
-/** AVATARS **/
-img.avatar { float: left; margin-right: 12px; width: 40px; border: 1px solid #ddd; padding: 1px; }
-img.avatar.s16 { width: 16px; height: 16px; margin-right: 6px; }
-img.avatar.s24 { width: 24px; height: 24px; margin-right: 8px; }
-img.avatar.s32 { width: 32px; height: 32px; margin-right: 10px; }
-img.avatar.s90 { width: 90px; height: 90px; margin-right: 15px; }
-img.lil_av { padding-left: 4px; padding-right: 3px; }
-img.small { width: 80px; }
diff --git a/app/assets/stylesheets/gitlab_bootstrap/blocks.scss b/app/assets/stylesheets/gitlab_bootstrap/blocks.scss
index 842e7a08..8cb1c045 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/blocks.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/blocks.scss
@@ -20,15 +20,6 @@
background: #FFF;
}
- &.ui-box-danger {
- .title {
- @include linear-gradient(#F26E5E, #bd362f);
- color: #fff;
- text-shadow: 0 1px 1px #900;
- font-weight: bold;
- }
- }
-
img { max-width: 100%; }
pre {
@@ -43,6 +34,13 @@
padding: 15px;
word-wrap: break-word;
+ pre {
+ background: none !important;
+ margin: 0;
+ border: none;
+ padding: 0;
+ }
+
.clearfix {
margin: 0;
}
@@ -97,12 +95,7 @@
form {
margin-bottom: 0;
- margin-top: 0;
- }
-
- .btn {
- position: relative;
- top: -2px;
+ margin-top: 3px;
}
.nav-pills {
@@ -151,23 +144,4 @@
text-decoration: underline;
}
}
-
- .form-holder {
- padding-top: 20px;
- form {
- margin-bottom: 0;
- legend {
- text-indent: 10px;
- }
- .form-actions {
- margin-bottom: 0;
- }
- }
- }
-}
-
-.tab-pane {
- .ui-box {
- margin: 3px 3px 25px 3px;
- }
}
diff --git a/app/assets/stylesheets/gitlab_bootstrap/buttons.scss b/app/assets/stylesheets/gitlab_bootstrap/buttons.scss
index 03497e32..674481e2 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/buttons.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/buttons.scss
@@ -1,16 +1,17 @@
.btn {
- @include linear-gradient(#f1f1f1, #e1e1e1);
- text-shadow: 0 1px 1px #FFF;
+ @include linear-gradient(#f7f7f7, #d5d5d5);
border-color: #BBB;
-
&:hover {
- background: #f1f1f1;
- @include linear-gradient(#fAfAfA, #f1f1f1);
- border-color: #AAA;
+ @include bg-gray-gradient;
+ border-color: #bbb;
color: #333;
}
- &.btn-primary {
+ &.btn-white {
+ background: #FFF;
+ }
+
+ &.primary {
background: #2a79A3;
@include linear-gradient(#47A7b7, #2585b5);
border-color: #2A79A3;
@@ -57,18 +58,21 @@
}
}
- &.btn-create {
+ &.save-btn {
@extend .wide;
- @extend .success;
+ @extend .primary;
}
- &.btn-save {
- @extend .wide;
- @extend .btn-primary;
+ &.cancel-btn {
+ float: right;
}
- &.btn-close,
- &.btn-remove {
+ &.wide {
+ padding-left: 30px;
+ padding-right: 30px;
+ }
+
+ &.danger {
@extend .btn-danger;
border-color: #BD362F;
@@ -78,13 +82,8 @@
}
}
- &.btn-cancel {
- float: right;
- }
-
- &.wide {
- padding-left: 20px;
- padding-right: 20px;
+ &.danger {
+ @extend .btn-danger;
}
&.small {
@@ -96,7 +95,7 @@
background-color: #ccc;
}
- &.btn-tiny {
+ &.very_small {
font-size: 11px;
padding: 2px 6px;
line-height: 16px;
diff --git a/app/assets/stylesheets/gitlab_bootstrap/common.scss b/app/assets/stylesheets/gitlab_bootstrap/common.scss
index 6bdd1652..2b3d14ab 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/common.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/common.scss
@@ -2,7 +2,6 @@
.cgray { color:gray }
.cred { color:#D12F19 }
.cgreen { color:#4a2 }
-.cblue { color:#29A }
.cblack { color:#111 }
.cdark { color:#444 }
.cwhite { color:#fff!important }
@@ -10,6 +9,7 @@
/** COMMON CLASSES **/
.left { float:left }
+.right { float:right!important }
.append-bottom-10 { margin-bottom:10px }
.append-bottom-20 { margin-bottom:20px }
.prepend-top-10 { margin-top:10px }
@@ -21,17 +21,80 @@
.hint { font-style: italic; color: #999; }
.light { color: #888 }
.tiny { font-weight: normal }
-.vtop { vertical-align: top; }
+/** PILLS & TABS**/
+.nav-pills {
+ .active a {
+ background: $primary_color;
+ }
-/** ALERT MESSAGES **/
-.alert.alert-disabled {
- background: #EEE;
- color: #777;
- border-color: #DDD;
+ > li > a {
+ @include border-radius(0);
+ }
+ &.nav-stacked {
+ > li > a {
+ border-left: 4px solid #EEE;
+ padding: 12px;
+ }
+ > .active > a {
+ border-color: #29B;
+ border-radius: 0;
+ background: #F1F1F1;
+ color: $style_color;
+ font-weight: bold;
+ }
+ }
}
-.well { padding: 15px; }
+.nav-pills > .active > a > i[class^="icon-"] { background: inherit; }
+
+
+
+/**
+ * nav-tabs
+ *
+ */
+.nav-tabs > li > a, .nav-pills > li > a { color: $style_color; }
+.nav.nav-tabs {
+ li {
+ > a {
+ padding: 8px 20px;
+ margin-right: 7px;
+ line-height: 20px;
+ border-color: #EEE;
+ color: #888;
+ border-bottom: 1px solid #ddd;
+ .badge {
+ background-color: #eee;
+ color: #888;
+ text-shadow: 0 1px 1px #fff;
+ }
+ i[class^="icon-"] {
+ line-height: 14px;
+ }
+ }
+ &.active {
+ > a {
+ border-color: #CCC;
+ border-bottom: 1px solid #fff;
+ color: #333;
+ }
+ }
+ }
+}
+
+/** ALERT MESSAGES **/
+.alert-message { @extend .alert; }
+.alert-messag.success { @extend .alert-success; }
+.alert-message.error { @extend .alert-error; }
+
+/** AVATARS **/
+img.avatar { float: left; margin-right: 12px; width: 40px; border: 1px solid #ddd; padding: 1px; }
+img.avatar.s16 { width: 16px; height: 16px; margin-right: 6px; }
+img.avatar.s24 { width: 24px; height: 24px; margin-right: 8px; }
+img.avatar.s32 { width: 32px; height: 32px; margin-right: 10px; }
+img.lil_av { padding-left: 4px; padding-right: 3px; }
+img.small { width: 80px; }
/** HELPERS **/
.nothing_here_message {
@@ -73,7 +136,3 @@ fieldset legend { font-size: 17px; }
border-bottom: 2px solid $style_color;
}
}
-
-.tab-content {
- overflow: visible;
-}
diff --git a/app/assets/stylesheets/gitlab_bootstrap/files.scss b/app/assets/stylesheets/gitlab_bootstrap/files.scss
index d0bf3bdd..865a10e1 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/files.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/files.scss
@@ -135,7 +135,7 @@
pre {
border: none;
border-radius: 0;
- font-family: $monospace_font;
+ font-family: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace;
font-size: 12px !important;
line-height: 16px !important;
margin: 0;
@@ -162,7 +162,6 @@
color: #666;
padding: 10px 6px 10px 0;
text-align: right;
- background: #EEE;
a {
color: #666;
diff --git a/app/assets/stylesheets/gitlab_bootstrap/fonts.scss b/app/assets/stylesheets/gitlab_bootstrap/fonts.scss
index 8cc99864..b4217fa9 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/fonts.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/fonts.scss
@@ -1,2 +1,7 @@
+@font-face{
+ font-family: Yanone;
+ src: font-url('YanoneKaffeesatz-Light.ttf');
+}
+
/** Typo **/
-$monospace_font: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono', 'lucida console', monospace;
+$monospace: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono', 'lucida console', monospace;
diff --git a/app/assets/stylesheets/gitlab_bootstrap/mixins.scss b/app/assets/stylesheets/gitlab_bootstrap/mixins.scss
index 2f83ca0c..9b1e2f2c 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/mixins.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/mixins.scss
@@ -24,14 +24,6 @@
background-image: -o-linear-gradient($from, $to);
}
-@mixin transition($transition) {
- -webkit-transition: $transition;
- -moz-transition: $transition;
- -ms-transition: $transition;
- -o-transition: $transition;
- transition: $transition;
-}
-
/**
* Prefilled mixins
* Mixins with fixed values
@@ -70,19 +62,8 @@
@mixin header-font {
color: $style_color;
text-shadow: 0 1px 1px #FFF;
- font-size: 18px;
- line-height: 40px;
+ font-family: 'Yanone', sans-serif;
+ font-size: 26px;
+ line-height: 42px;
font-weight: normal;
- letter-spacing: -1px;
-}
-
-@mixin md-typography {
- code { padding: 0 4px; }
- p { font-size: 13px; }
- h1 { font-size: 26px; line-height: 40px; margin: 10px 0;}
- h2 { font-size: 22px; line-height: 40px; margin: 10px 0;}
- h3 { font-size: 18px; line-height: 40px; margin: 10px 0;}
- h4 { font-size: 16px; line-height: 20px; margin: 10px 0;}
- h5 { font-size: 14px; line-height: 20px; margin: 10px 0;}
- h6 { font-size: 12px; line-height: 20px; margin: 10px 0;}
}
diff --git a/app/assets/stylesheets/gitlab_bootstrap/nav.scss b/app/assets/stylesheets/gitlab_bootstrap/nav.scss
deleted file mode 100644
index 2eaef61c..00000000
--- a/app/assets/stylesheets/gitlab_bootstrap/nav.scss
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * nav-pills
- *
- */
-.nav-pills {
- .active a {
- background: $primary_color;
- }
-
- > li > a {
- @include border-radius(0);
- }
- &.nav-stacked {
- > li > a {
- border-left: 4px solid #EEE;
- padding: 12px;
- }
- > .active > a {
- border-color: #29B;
- border-radius: 0;
- background: #F1F1F1;
- color: $style_color;
- font-weight: bold;
- }
- }
-}
-
-.nav-pills > .active > a > i[class^="icon-"] { background: inherit; }
-
-
-
-/**
- * nav-tabs
- *
- */
-.nav-tabs > li > a, .nav-pills > li > a { color: $style_color; }
-.nav.nav-tabs {
- li {
- > a {
- padding: 8px 20px;
- margin-right: 7px;
- line-height: 20px;
- border-color: #EEE;
- color: #888;
- border-bottom: 1px solid #ddd;
- .badge {
- background-color: #eee;
- color: #888;
- text-shadow: 0 1px 1px #fff;
- }
- i[class^="icon-"] {
- line-height: 14px;
- }
- }
- &.active {
- > a {
- border-color: #CCC;
- border-bottom: 1px solid #fff;
- color: #333;
- }
- }
- }
-
- &.nav-small-tabs > li > a { padding: 6px 9px; }
-}
diff --git a/app/assets/stylesheets/gitlab_bootstrap/tables.scss b/app/assets/stylesheets/gitlab_bootstrap/tables.scss
index f46ae91b..7a9eac82 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/tables.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/tables.scss
@@ -11,12 +11,6 @@ table {
}
}
- &.headless {
- tr:first-child td{
- border-top: 1px solid #CCC;
- }
- }
-
th {
font-weight: bold;
vertical-align: middle;
diff --git a/app/assets/stylesheets/gitlab_bootstrap/typography.scss b/app/assets/stylesheets/gitlab_bootstrap/typography.scss
index 1f0c4802..e74a0de1 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/typography.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/typography.scss
@@ -21,7 +21,7 @@ h6 {
/** CODE **/
pre {
- font-family: $monospace_font;
+ font-family:'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace;
&.dark {
background: #333;
@@ -79,7 +79,7 @@ a:focus {
}
.monospace {
- font-family: $monospace_font;
+ font-family: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace;
}
/**
@@ -87,15 +87,16 @@ a:focus {
*
*/
.wiki {
- @include md-typography;
-
font-size: 13px;
- line-height: 20px;
+ code { padding: 0 4px; }
+ p { font-size: 13px; }
+ h1 { font-size: 32px; line-height: 40px; margin: 10px 0;}
+ h2 { font-size: 26px; line-height: 40px; margin: 10px 0;}
+ h3 { font-size: 22px; line-height: 40px; margin: 10px 0;}
+ h4 { font-size: 18px; line-height: 20px; margin: 10px 0;}
+ h5 { font-size: 14px; line-height: 20px; margin: 10px 0;}
+ h6 { font-size: 12px; line-height: 20px; margin: 10px 0;}
.white .highlight pre { background: #f5f5f5; }
ul { margin: 0 0 9px 25px !important; }
}
-
-.md {
- @include md-typography;
-}
diff --git a/app/assets/stylesheets/gitlab_bootstrap/variables.scss b/app/assets/stylesheets/gitlab_bootstrap/variables.scss
index aeabe7ad..869eb168 100644
--- a/app/assets/stylesheets/gitlab_bootstrap/variables.scss
+++ b/app/assets/stylesheets/gitlab_bootstrap/variables.scss
@@ -1,13 +1,5 @@
-/**
- * General Colors
- */
+/** Colors **/
$primary_color: #2FA0BB;
$link_color: #3A89A3;
$style_color: #474D57;
$hover: #D9EDF7;
-
-/**
- * Commit Diff Colors
- */
-$added: #63c363;
-$deleted: #f77;
diff --git a/app/assets/stylesheets/highlight/dark.scss b/app/assets/stylesheets/highlight/dark.scss
index 4196ea7a..6018ff70 100644
--- a/app/assets/stylesheets/highlight/dark.scss
+++ b/app/assets/stylesheets/highlight/dark.scss
@@ -1,7 +1,8 @@
.black .highlight {
+ background-color: #333;
pre {
- background-color: #333;
color: #eee;
+ background: inherit;
}
.hll { display: block; background-color: darken($hover, 65%) }
diff --git a/app/assets/stylesheets/highlight/solarized_dark.scss b/app/assets/stylesheets/highlight/solarized_dark.scss
deleted file mode 100644
index 3f215b4e..00000000
--- a/app/assets/stylesheets/highlight/solarized_dark.scss
+++ /dev/null
@@ -1,77 +0,0 @@
-.solarized-dark .highlight {
- pre {
- background-color: #002B36;
- color: #eee;
- }
-
- .hll { background-color: #073642 }
- .c { color: #586E75 } /* Comment */
- .err { color: #93A1A1 } /* Error */
- .g { color: #93A1A1 } /* Generic */
- .k { color: #859900 } /* Keyword */
- .l { color: #93A1A1 } /* Literal */
- .n { color: #93A1A1 } /* Name */
- .o { color: #859900 } /* Operator */
- .x { color: #CB4B16 } /* Other */
- .p { color: #93A1A1 } /* Punctuation */
- .cm { color: #586E75 } /* Comment.Multiline */
- .cp { color: #859900 } /* Comment.Preproc */
- .c1 { color: #586E75 } /* Comment.Single */
- .cs { color: #859900 } /* Comment.Special */
- .gd { color: #2AA198 } /* Generic.Deleted */
- .ge { color: #93A1A1; font-style: italic } /* Generic.Emph */
- .gr { color: #DC322F } /* Generic.Error */
- .gh { color: #CB4B16 } /* Generic.Heading */
- .gi { color: #859900 } /* Generic.Inserted */
- .go { color: #93A1A1 } /* Generic.Output */
- .gp { color: #93A1A1 } /* Generic.Prompt */
- .gs { color: #93A1A1; font-weight: bold } /* Generic.Strong */
- .gu { color: #CB4B16 } /* Generic.Subheading */
- .gt { color: #93A1A1 } /* Generic.Traceback */
- .kc { color: #CB4B16 } /* Keyword.Constant */
- .kd { color: #268BD2 } /* Keyword.Declaration */
- .kn { color: #859900 } /* Keyword.Namespace */
- .kp { color: #859900 } /* Keyword.Pseudo */
- .kr { color: #268BD2 } /* Keyword.Reserved */
- .kt { color: #DC322F } /* Keyword.Type */
- .ld { color: #93A1A1 } /* Literal.Date */
- .m { color: #2AA198 } /* Literal.Number */
- .s { color: #2AA198 } /* Literal.String */
- .na { color: #93A1A1 } /* Name.Attribute */
- .nb { color: #B58900 } /* Name.Builtin */
- .nc { color: #268BD2 } /* Name.Class */
- .no { color: #CB4B16 } /* Name.Constant */
- .nd { color: #268BD2 } /* Name.Decorator */
- .ni { color: #CB4B16 } /* Name.Entity */
- .ne { color: #CB4B16 } /* Name.Exception */
- .nf { color: #268BD2 } /* Name.Function */
- .nl { color: #93A1A1 } /* Name.Label */
- .nn { color: #93A1A1 } /* Name.Namespace */
- .nx { color: #93A1A1 } /* Name.Other */
- .py { color: #93A1A1 } /* Name.Property */
- .nt { color: #268BD2 } /* Name.Tag */
- .nv { color: #268BD2 } /* Name.Variable */
- .ow { color: #859900 } /* Operator.Word */
- .w { color: #93A1A1 } /* Text.Whitespace */
- .mf { color: #2AA198 } /* Literal.Number.Float */
- .mh { color: #2AA198 } /* Literal.Number.Hex */
- .mi { color: #2AA198 } /* Literal.Number.Integer */
- .mo { color: #2AA198 } /* Literal.Number.Oct */
- .sb { color: #586E75 } /* Literal.String.Backtick */
- .sc { color: #2AA198 } /* Literal.String.Char */
- .sd { color: #93A1A1 } /* Literal.String.Doc */
- .s2 { color: #2AA198 } /* Literal.String.Double */
- .se { color: #CB4B16 } /* Literal.String.Escape */
- .sh { color: #93A1A1 } /* Literal.String.Heredoc */
- .si { color: #2AA198 } /* Literal.String.Interpol */
- .sx { color: #2AA198 } /* Literal.String.Other */
- .sr { color: #DC322F } /* Literal.String.Regex */
- .s1 { color: #2AA198 } /* Literal.String.Single */
- .ss { color: #2AA198 } /* Literal.String.Symbol */
- .bp { color: #268BD2 } /* Name.Builtin.Pseudo */
- .vc { color: #268BD2 } /* Name.Variable.Class */
- .vg { color: #268BD2 } /* Name.Variable.Global */
- .vi { color: #268BD2 } /* Name.Variable.Instance */
- .il { color: #2AA198 } /* Literal.Number.Integer.Long */
-}
-
diff --git a/app/assets/stylesheets/selects.scss b/app/assets/stylesheets/ref_select.scss
similarity index 67%
rename from app/assets/stylesheets/selects.scss
rename to app/assets/stylesheets/ref_select.scss
index 07f7db75..284d1c32 100644
--- a/app/assets/stylesheets/selects.scss
+++ b/app/assets/stylesheets/ref_select.scss
@@ -1,18 +1,3 @@
-.ajax-users-select {
- width: 400px;
-}
-
-.user-result {
- .user-image {
- float: left;
- }
- .user-name {
- }
- .user-username {
- color: #999;
- }
-}
-
/** Branch/tag selector **/
.project-refs-form {
margin: 0;
@@ -103,26 +88,3 @@
}
}
}
-
-/** Select2 styling **/
-.select2-container .select2-choice {
- background: #f1f1f1;
- background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, whitesmoke), to(#e1e1e1));
- background-image: -webkit-linear-gradient(whitesmoke 6.6%, #e1e1e1);
- background-image: -moz-linear-gradient(whitesmoke 6.6%, #e1e1e1);
- background-image: -o-linear-gradient(whitesmoke 6.6%, #e1e1e1);
-}
-
-.select2-container .select2-choice div {
- border: none;
- background: none;
-}
-
-.select2-drop {
- padding-top: 8px;
-}
-
-.select2-no-results, .select2-searching {
- padding: 7px;
- color: #666;
-}
diff --git a/app/assets/stylesheets/sections/commits.scss b/app/assets/stylesheets/sections/commits.scss
index 1e564188..c60aae49 100644
--- a/app/assets/stylesheets/sections/commits.scss
+++ b/app/assets/stylesheets/sections/commits.scss
@@ -1,5 +1,7 @@
/**
- * Commit file
+ *
+ * COMMIT SHOw
+ *
*/
.commit-committer-link,
.commit-author-link {
@@ -10,11 +12,11 @@
}
}
-.file {
+.diff_file {
border: 1px solid #CCC;
margin-bottom: 1em;
- .header {
+ .diff_file_header {
@extend .clearfix;
padding: 5px 5px 5px 10px;
color: #555;
@@ -26,35 +28,32 @@
background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf);
background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf);
- a{
- color: $style_color;
- }
-
> span {
- font-family: $monospace_font;
+ font-family: $monospace;
font-size: 14px;
line-height: 30px;
}
- a.view-file{
+ a.view-commit{
font-weight: bold;
}
.commit-short-id{
- font-family: $monospace_font;
+ font-family: $monospace;
font-size: smaller;
}
.file-mode{
- font-family: $monospace_font;
+ font-family: $monospace;
}
}
- .content {
+ .diff_file_content {
overflow: auto;
overflow-y: hidden;
- background: #FFF;
+ background: #fff;
color: #333;
font-size: 12px;
+ font-family: $monospace;
.old{
span.idiff{
background-color: #FAA;
@@ -67,277 +66,117 @@
}
table {
- font-family: $monospace_font;
- border: none;
- margin: 0px;
- padding: 0px;
td {
line-height: 18px;
+ }
+ }
+ }
+ .diff_file_content_image {
+ background: #eee;
+ text-align: center;
+ .image {
+ display: inline-block;
+ margin: 50px;
+ max-width: 400px;
+
+ img{
+ background: url('trans_bg.gif');
+ }
+
+ &.diff_removed {
+ img{
+ border: 1px solid #C00;
+ }
+ }
+
+ &.diff_added {
+ img{
+ border: 1px solid #0C0;
+ }
+ }
+
+ .image-info{
+ margin: 5px 0 0 0;
+ }
+ }
+
+ &.img_compared {
+ .image {
+ max-width: 300px;
+ }
+ }
+ }
+}
+
+.diff_file_content{
+ table {
+ border: none;
+ margin: 0px;
+ padding: 0px;
+ tr {
+ td {
font-size: 12px;
}
}
- .old_line, .new_line {
- margin: 0px;
- padding: 0px;
- border: none;
- background: #EEE;
- color: #666;
- padding: 0px 5px;
- border-right: 1px solid #ccc;
- text-align: right;
- min-width: 35px;
- max-width: 35px;
+ }
+ .new_line,
+ .old_line,
+ .notes_line {
+ margin:0px;
+ padding:0px;
+ border:none;
+ background:#EEE;
+ color:#666;
+ padding: 0px 5px;
+ border-right: 1px solid #ccc;
+ text-align: right;
+ min-width: 35px;
+ max-width: 35px;
+ width: 35px;
+ moz-user-select: none;
+ -khtml-user-select: none;
+ user-select: none;
+
+ a {
+ float: left;
width: 35px;
- @include user-select(none);
- a {
- float: left;
- width: 35px;
- font-weight: normal;
- color: #666;
- &:hover {
- text-decoration: underline;
- }
- }
- }
- .line_content {
- display: block;
- white-space: pre;
- height: 18px;
- margin: 0px;
- padding: 0px;
- border: none;
- &.new {
- background: #CFD;
- }
- &.old {
- background: #FDD;
- }
- &.matched {
- color: #ccc;
- background: #fafafa;
- }
- }
- }
- .image {
- background: #ddd;
- text-align: center;
- padding: 30px;
- .wrap{
- display: inline-block;
- }
-
- .frame {
- display: inline-block;
- background-color: #fff;
- line-height: 0;
- img{
- border: 1px solid #FFF;
- background: url('trans_bg.gif');
- }
- &.deleted {
- border: 1px solid $deleted;
- }
-
- &.added {
- border: 1px solid $added;
- }
- }
- .image-info{
- font-size: 12px;
- margin: 5px 0 0 0;
- color: grey;
- }
-
- .view.swipe{
- position: relative;
-
- .swipe-frame{
- display: block;
- margin: auto;
- position: relative;
- }
- .swipe-wrap{
- overflow: hidden;
- border-left: 1px solid #999;
- position: absolute;
- display: block;
- top: 13px;
- right: 7px;
- }
- .frame{
- top: 0;
- right: 0;
- position: absolute;
- &.deleted{
- margin: 0;
- display: block;
- top: 13px;
- right: 7px;
- }
- }
- .swipe-bar{
- display: block;
- height: 100%;
- width: 15px;
- z-index: 100;
- position: absolute;
- cursor: pointer;
- &:hover{
- .top-handle{
- background-position: -15px 3px;
- }
- .bottom-handle{
- background-position: -15px -11px;
- }
- };
- .top-handle{
- display: block;
- height: 14px;
- width: 15px;
- position: absolute;
- top: 0px;
- background: url('swipemode_sprites.gif') 0 3px no-repeat;
- }
- .bottom-handle{
- display: block;
- height: 14px;
- width: 15px;
- position: absolute;
- bottom: 0px;
- background: url('swipemode_sprites.gif') 0 -11px no-repeat;
- }
- }
- } //.view.swipe
- .view.onion-skin{
- .onion-skin-frame{
- display: block;
- margin: auto;
- position: relative;
- }
- .frame.added, .frame.deleted {
- position: absolute;
- display: block;
- top: 0px;
- left: 0px;
- }
- .controls{
- display: block;
- height: 14px;
- width: 300px;
- z-index: 100;
- position: absolute;
- bottom: 0px;
- left: 50%;
- margin-left: -150px;
-
- .drag-track{
- display: block;
- position: absolute;
- left: 12px;
- height: 10px;
- width: 276px;
- background: url('onion_skin_sprites.gif') -4px -20px repeat-x;
- }
-
- .dragger {
- display: block;
- position: absolute;
- left: 0px;
- top: 0px;
- height: 14px;
- width: 14px;
- background: url('onion_skin_sprites.gif') 0px -34px repeat-x;
- cursor: pointer;
- }
-
- .transparent {
- display: block;
- position: absolute;
- top: 2px;
- right: 0px;
- height: 10px;
- width: 10px;
- background: url('onion_skin_sprites.gif') -2px 0px no-repeat;
- }
-
- .opaque {
- display: block;
- position: absolute;
- top: 2px;
- left: 0px;
- height: 10px;
- width: 10px;
- background: url('onion_skin_sprites.gif') -2px -10px no-repeat;
- }
- }
- } //.view.onion-skin
- }
- .view-modes{
-
- padding: 10px;
- text-align: center;
-
- background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf));
- background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf);
- background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf);
- background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf);
-
- ul, li{
- list-style: none;
- margin: 0;
- padding: 0;
- display: inline-block;
- }
-
- li{
- color: grey;
- border-left: 1px solid #c1c1c1;
- padding: 0 12px 0 16px;
- cursor: pointer;
- &:first-child{
- border-left: none;
- }
- &:hover{
+ font-weight: normal;
+ color: #666;
+ &:hover {
text-decoration: underline;
}
- &.active{
- &:hover{
- text-decoration: none;
- }
- cursor: default;
- color: #333;
- }
- &.disabled{
- display: none;
- }
+ }
+ }
+ .line_content {
+ white-space: pre;
+ height: 14px;
+ margin: 0px;
+ padding: 0px;
+ border: none;
+ &.new {
+ background: #CFD;
+ }
+ &.old {
+ background: #FDD;
+ }
+ &.matched {
+ color: #ccc;
+ background: #fafafa;
}
}
}
/** COMMIT BLOCK **/
-.commit-title{
- display: block;
-}
-.commit-title{
- margin-bottom: 10px;
-}
-.commit-author, .commit-committer{
- display: block;
- color: #999;
- font-weight: normal;
- font-style: italic;
-}
-.commit-author strong, .commit-committer strong{
- font-weight: bold;
- font-style: normal;
-}
+.commit-title{display: block;}
+.commit-title{margin-bottom: 10px}
+.commit-author, .commit-committer{display: block;color: #999; font-weight: normal; font-style: italic;}
+.commit-author strong, .commit-committer strong{font-weight: bold; font-style: normal;}
-/**
- * COMMIT ROW
- */
+/** COMMIT ROW **/
.commit {
.browse_code_link_holder {
+ @extend .span2;
float: right;
}
@@ -360,10 +199,11 @@
float: left;
@extend .lined;
min-width: 65px;
- font-family: $monospace_font;
+ font-family: $monospace;
}
}
+.diff_file_header a,
.file-stats a {
color: $style_color;
}
@@ -397,7 +237,7 @@
font-size: 13px;
background: #474D57;
color: #fff;
- font-family: $monospace_font;
+ font-family: $monospace;
}
@@ -413,9 +253,3 @@
padding: 4px;
background-color: #EEE;
}
-
-.commit-description {
- background: none;
- border: none;
- margin: 0;
-}
diff --git a/app/assets/stylesheets/sections/events.scss b/app/assets/stylesheets/sections/events.scss
index 94e1d0b6..7472cb09 100644
--- a/app/assets/stylesheets/sections/events.scss
+++ b/app/assets/stylesheets/sections/events.scss
@@ -48,24 +48,17 @@
color: #666;
}
.event-note {
+ padding-top: 5px;
+ padding-left: 5px;
+ display: inline-block;
color: #555;
- margin-top: 5px;
- margin-left: 40px;
-
- .note-file-attach {
- .note-image-attach {
- margin-top: 4px;
- margin-left: 0px;
- max-width: 200px;
- }
- }
}
.event-note-icon {
color: #777;
float: left;
font-size: 16px;
- line-height: 16px;
- margin-right: 5px;
+ line-height: 18px;
+ margin: 5px;
}
}
.avatar {
@@ -134,7 +127,7 @@
.btn-new-mr {
@extend .btn-info;
@extend .small;
- @extend .pull-right;
+ @extend .right;
margin: -3px;
}
}
diff --git a/app/assets/stylesheets/sections/graph.scss b/app/assets/stylesheets/sections/graph.scss
index 7da00719..5800098a 100644
--- a/app/assets/stylesheets/sections/graph.scss
+++ b/app/assets/stylesheets/sections/graph.scss
@@ -12,7 +12,7 @@
.graph {
background: #f1f1f1;
cursor: move;
- height: 500px;
+ height: 70%;
overflow: hidden;
}
}
diff --git a/app/assets/stylesheets/sections/header.scss b/app/assets/stylesheets/sections/header.scss
index 14e4cef0..048a3ffc 100644
--- a/app/assets/stylesheets/sections/header.scss
+++ b/app/assets/stylesheets/sections/header.scss
@@ -5,16 +5,15 @@
header {
&.navbar-gitlab {
.navbar-inner {
- height: 40px;
- padding: 3px;
+ height: 45px;
+ padding: 5px;
background: #F1F1F1;
- filter: none;
.nav > li > a {
color: $style_color;
text-shadow: 0 1px 0 #fff;
- font-size: 16px;
- padding: 10px;
+ font-size: 18px;
+ padding: 11px;
}
/** NAV block with links and profile **/
@@ -26,6 +25,7 @@ header {
}
z-index: 10;
+ /*height: 60px;*/
/**
*
@@ -34,7 +34,7 @@ header {
*/
.app_logo {
float: left;
- margin-right: 9px;
+ margin-right: 15px;
position: relative;
top: -5px;
padding-top: 5px;
@@ -42,11 +42,10 @@ header {
a {
float: left;
padding: 0px;
- margin: 0 6px;
+ margin: 0 10px;
h1 {
- background: url('logo-black.png') no-repeat center 1px;
- background-size: 38px;
+ background: url('logo_dark.png') no-repeat 0px 2px;
float: left;
height: 40px;
width: 40px;
@@ -68,27 +67,19 @@ header {
position: relative;
float: left;
margin: 0;
- margin-left: 10px;
+ margin-left: 15px;
@include header-font;
}
- .profile-pic {
- position: relative;
- top: -4px;
- img {
- width: 26px;
- @include border-radius(4px);
- }
- }
-
/**
*
* Search box
*
*/
.search {
- margin-right: 10px;
+ margin-right: 45px;
margin-left: 10px;
+ margin-top: 2px;
.search-input {
@extend .span2;
@@ -100,13 +91,121 @@ header {
@include border-radius(3px);
border: 1px solid #c6c6c6;
box-shadow: none;
- @include transition(all 0.15s ease-in 0s);
&:focus {
@extend .span3;
}
}
}
+ /**
+ *
+ * Account box
+ *
+ */
+ .account-box {
+ position: absolute;
+ right: 0;
+ top: 6px;
+ z-index: 10000;
+ width: 128px;
+ font-size: 11px;
+ float: right;
+ display: block;
+ cursor: pointer;
+ img {
+ @include border-radius(3px);
+ right: 5px;
+ position: absolute;
+ width: 28px;
+ height: 28px;
+ display: block;
+ top: 1px;
+ &:after {
+ content: " ";
+ display: block;
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ float: right;
+ @include border-radius(5px);
+ border: 1px solid rgba(255, 255, 255, 0.1);
+ border-bottom: 0;
+ background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, 0.15)), to(rgba(0, 0, 0, 0.25))),
+ -webkit-gradient(linear, left top, right bottom, color-stop(0, rgba(255, 255, 255, 0)), color-stop(0.5, rgba(255, 255, 255, 0.1)), color-stop(0.501, rgba(255, 255, 255, 0)), color-stop(1, rgba(255, 255, 255, 0)));
+ background: -moz-linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)),
+ -moz-linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0));
+ background: linear-gradient(top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.25)),
+ linear-gradient(left top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0));
+ -webkit-background-origin: border-box;
+ -moz-background-origin: border;
+ background-origin: border-box; } } }
+
+ .account-box {
+ &.hover {
+ height: 138px; }
+ &:hover > .account-links {
+ display: block; } }
+
+ .account-links {
+ @include border-radius(5px);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ position: relative;
+ &:before {
+ content: ".";
+ width: 0;
+ height: 0;
+ position: absolute;
+ border: 5px solid transparent;
+ border-color: rgba(255, 255, 255, 0);
+ border-bottom-color: #555;
+ text-indent: -9999px;
+ top: -10px;
+ line-height: 0;
+ right: 10px;
+ z-index: 10; }
+ background: #555;
+ display: none;
+ z-index: 100000;
+ @include border-radius(4px);
+ width: 130px;
+ position: absolute;
+ right: 5px;
+ top: 38px;
+ margin-top: 0;
+ float: right;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ a {
+ color: #fff;
+ padding: 12px 15px;
+ display: block;
+ text-shadow: none;
+ border-bottom: 1px solid #666;
+ font-size: 12px;
+ &:hover {
+ color: #fff;
+ background: #333;
+ }
+ }
+ }
+
+ .account-box.hover .arrow-up {
+ top: 41px;
+ right: 6px;
+ position: absolute; }
+
+ .account-links a {
+ &:first-child {
+ @include border-radius(5px 5px 0 0);
+ }
+ &:last-child {
+ @include border-radius(0 0 5px 5px);
+ border-bottom: 0;
+ }
+ }
+
+
/*
* Dark header
@@ -129,7 +228,6 @@ header {
.search-input {
background-color: #D2D5DA;
background-color: rgba(255, 255, 255, 0.5);
- border: 1px solid #AAA;
&:focus {
background-color: white;
@@ -142,17 +240,13 @@ header {
.app_logo {
a {
h1 {
- background: url('logo-white.png') no-repeat center 1px;
- background-size: 38px;
+ background: url('logo_white.png') no-repeat center center;
color: #fff;
text-shadow: 0 1px 1px #111;
}
}
}
.project_name {
- a {
- color: #FFF;
- }
color: #fff;
text-shadow: 0 1px 1px #111;
}
@@ -167,11 +261,11 @@ header {
.separator {
float: left;
- height: 46px;
+ height: 60px;
width: 1px;
background: white;
border-left: 1px solid #DDD;
- margin-top: -3px;
+ margin-top: -10px;
margin-left: 10px;
margin-right: 10px;
}
diff --git a/app/assets/stylesheets/sections/login.scss b/app/assets/stylesheets/sections/login.scss
index e3fe0b43..7536abff 100644
--- a/app/assets/stylesheets/sections/login.scss
+++ b/app/assets/stylesheets/sections/login.scss
@@ -1,7 +1,7 @@
/* Login Page */
-body.login-page{
- background: #EEE;
- .container .content { padding-top: 5%; }
+body.login-page{
+ padding-top: 10%;
+ background: #f1f1f1;
}
.login-box{
diff --git a/app/assets/stylesheets/sections/merge_requests.scss b/app/assets/stylesheets/sections/merge_requests.scss
index 4cca0083..5225a242 100644
--- a/app/assets/stylesheets/sections/merge_requests.scss
+++ b/app/assets/stylesheets/sections/merge_requests.scss
@@ -70,6 +70,16 @@ li.merge_request {
@extend .append-bottom-10;
}
+.label_branch {
+ @include border-radius(4px);
+ padding: 2px 4px;
+ border: none;
+ font-size: 14px;
+ background: #474D57;
+ color: #fff;
+ font-family: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace;
+}
+
.mr_source_commit,
.mr_target_commit {
.commit {
diff --git a/app/assets/stylesheets/sections/nav.scss b/app/assets/stylesheets/sections/nav.scss
index 514b0b7c..bc19bc75 100644
--- a/app/assets/stylesheets/sections/nav.scss
+++ b/app/assets/stylesheets/sections/nav.scss
@@ -1,64 +1,70 @@
-.main-nav {
+/*
+ * Main Menu of Application
+ *
+ */
+ul.main_menu {
+ margin: auto;
margin: 30px 0;
margin-top: 10px;
- border-bottom: 1px solid #E1E1E1;
-
- ul {
- margin: auto;
- height: 39px;
+ border-bottom: 1px solid #DDD;
+ height: 37px;
+ position: relative;
+ overflow: hidden;
+ .count {
position: relative;
- top: 3px;
- overflow: hidden;
- .count {
- position: relative;
- top: -1px;
- display: inline-block;
- height: 15px;
- margin: 0 0 0 5px;
- padding: 0 8px 1px 8px;
- height: auto;
- font-size: 0.82em;
- line-height: 14px;
- text-align: center;
- color: #777;
- }
- .label {
- background: $hover;
- text-shadow: none;
- color: $style_color;
- }
- li {
- list-style-type: none;
- margin: 0;
- display: table-cell;
- width: 1%;
- &.active {
- border-bottom: 3px solid #777;
- a {
- color: $style_color;
- font-weight: bolder;
- }
+ top: -1px;
+ display: inline-block;
+ height: 15px;
+ margin: 0 0 0 5px;
+ padding: 0 8px 1px 8px;
+ height: auto;
+ font-size: 0.82em;
+ line-height: 14px;
+ text-align: center;
+ color: #777;
+ }
+ .label {
+ background: $hover;
+ text-shadow: none;
+ color: $style_color;
+ }
+ li {
+ list-style-type: none;
+ margin: 0;
+ display: table-cell;
+ width: 1%;
+ &.active {
+ border-bottom: 2px solid #474D57;
+ a {
+ color: $style_color;
}
+ }
- &.home {
- a {
- i {
- font-size: 20px;
- position: relative;
- top: 4px;
- }
+ &.home {
+ a {
+ background: url(home_icon.PNG) no-repeat center center;
+ text-indent:-9999px;
+ min-width: 20px;
+ img {
+ position: relative;
+ top: 4px;
}
}
}
- a {
- display: block;
- text-align: center;
- font-weight: normal;
- height: 36px;
- line-height: 34px;
- color: #777;
- text-shadow: 0 1px 1px white;
- padding: 0 10px;
- }
+ }
+ a {
+ display: block;
+ text-align: center;
+ font-weight: normal;
+ height: 35px;
+ line-height: 36px;
+ color: #777;
+ text-shadow: 0 1px 1px white;
+ padding: 0 10px;
}
}
+/*
+ * End of Main Menu
+ *
+ */
+
diff --git a/app/assets/stylesheets/sections/notes.scss b/app/assets/stylesheets/sections/notes.scss
index a8628fc5..a7fadd4f 100644
--- a/app/assets/stylesheets/sections/notes.scss
+++ b/app/assets/stylesheets/sections/notes.scss
@@ -40,13 +40,13 @@ ul.notes {
.discussion-body {
margin-left: 50px;
- .file,
+ .diff_file,
.discussion-hidden,
.notes {
@extend .borders;
background-color: #F9F9F9;
}
- .file .notes {
+ .diff_file .notes {
/* reset */
background: inherit;
border: none;
@@ -81,9 +81,16 @@ ul.notes {
.attachment {
font-size: 14px;
margin-top: -20px;
+
+ .icon-attachment {
+ @extend .icon-paper-clip;
+ font-size: 24px;
+ position: relative;
+ text-align: right;
+ top: 6px;
+ }
}
.note-body {
- @include md-typography;
margin-left: 45px;
}
.note-header {
@@ -102,7 +109,7 @@ ul.notes {
}
}
-.file .notes_holder {
+.diff_file .notes_holder {
font-family: $sansFontFamily;
font-size: 13px;
line-height: 18px;
@@ -127,6 +134,8 @@ ul.notes {
}
}
+
+
/**
* Actions for Discussions/Notes
*/
@@ -162,7 +171,7 @@ ul.notes {
}
}
}
-.file .note .note-actions {
+.diff_file .note .note-actions {
right: 0;
top: 0;
}
@@ -173,7 +182,7 @@ ul.notes {
* Line note button on the side of diffs
*/
-.file tr.line_holder {
+.diff_file tr.line_holder {
.add-diff-note {
background: url("diff_note_add.png") no-repeat left 0;
height: 22px;
@@ -192,7 +201,7 @@ ul.notes {
}
}
- // "show" the icon also if we just hover somewhere over the line
+ // "show" the icon also if we just hover somwhere over the line
&:hover > td {
background: $hover !important;
@@ -203,25 +212,25 @@ ul.notes {
}
}
+
+
/**
* Note Form
*/
-.comment-btn {
- @extend .btn-create;
-}
+.comment-btn,
.reply-btn {
- @extend .btn-primary;
+ @extend .save-btn;
}
-.file .content tr.line_holder:hover > td { background: $hover !important; }
-.file .content tr.line_holder:hover > td .line_note_link {
- opacity: 1.0;
- filter: alpha(opacity=100);
-}
-.file,
+.diff_file,
.discussion {
.new_note {
margin: 8px 5px 8px 0;
+
+ .note_options {
+ // because of the smaller width and the extra "cancel" button
+ margin-top: 8px;
+ }
}
}
.new_note {
@@ -234,6 +243,37 @@ ul.notes {
.clearfix {
margin-bottom: 0;
}
+ .note_options {
+ h6 {
+ @extend .left;
+ line-height: 20px;
+ padding-right: 16px;
+ padding-bottom: 16px;
+ }
+ label {
+ padding: 0;
+ }
+
+ .attachment {
+ @extend .right;
+ position: relative;
+ width: 350px;
+ height: 50px;
+ margin:0 0 5px !important;
+
+ // hide the actual file field
+ input {
+ display: none;
+ }
+
+ .choose-btn {
+ float: right;
+ }
+ }
+ .notify_options {
+ @extend .right;
+ }
+ }
.note_text_and_preview {
// makes the "absolute" position for links relative to this
position: relative;
@@ -272,30 +312,3 @@ ul.notes {
@extend .thumbnail;
margin-left: 45px;
}
-
-
-.common-note-form {
- margin: 0;
- height: 140px;
- background: #F9F9F9;
- padding: 3px;
- padding-bottom: 25px;
- border: 1px solid #DDD;
-}
-
-
-.note-form-actions {
- background: #F9F9F9;
- height: 45px;
- padding: 0 5px;
-
- .note-form-option {
- margin-top: 10px;
- margin-left: 30px;
- @extend .pull-left;
- }
-
- .js-notify-commit-author {
- float: left;
- }
-}
diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss
index b6b1423e..4bdc56d2 100644
--- a/app/assets/stylesheets/sections/projects.scss
+++ b/app/assets/stylesheets/sections/projects.scss
@@ -4,10 +4,10 @@
}
.side {
- @extend .pull-right;
+ @extend .right;
- .ui-box {
- margin: 3px;
+ .groups_box,
+ .projects_box {
> .title {
padding: 2px 15px;
}
@@ -81,7 +81,6 @@
border: 1px solid #BBB;
box-shadow: none;
margin-left: -1px;
- background: #FFF;
}
}
@@ -117,20 +116,3 @@ ul.nav.nav-projects-tabs {
}
}
}
-
-.team_member_row form {
- margin: 0px;
-}
-
-.public-projects {
- li {
- margin-top: 8px;
- margin-bottom: 5px;
- border-bottom: 1px solid #eee;
-
- .description {
- margin-left: 22px;
- color: #aaa;
- }
- }
-}
diff --git a/app/assets/stylesheets/sections/tree.scss b/app/assets/stylesheets/sections/tree.scss
index def440c7..0ba68e50 100644
--- a/app/assets/stylesheets/sections/tree.scss
+++ b/app/assets/stylesheets/sections/tree.scss
@@ -102,7 +102,3 @@
}
}
-.tree-ref-holder {
- float: left;
- margin-top: 5px;
-}
diff --git a/app/assets/stylesheets/sections/wall.scss b/app/assets/stylesheets/sections/wall.scss
deleted file mode 100644
index d6ac08fc..00000000
--- a/app/assets/stylesheets/sections/wall.scss
+++ /dev/null
@@ -1,55 +0,0 @@
-.wall-page {
- .wall-note-form {
- @extend .span12;
-
- margin: 0;
- height: 140px;
- background: #F9F9F9;
- position: fixed;
- bottom: 0px;
- padding: 3px;
- padding-bottom: 25px;
- border: 1px solid #DDD;
- }
-
- .notes {
- margin-bottom: 160px;
- background: #FFE;
- border: 1px solid #EED;
-
- > li {
- @extend .clearfix;
- border-bottom: 1px solid #EED;
- padding: 10px;
- }
-
- .wall-author {
- color: #666;
- float: left;
- font-size: 12px;
- width: 120px;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- }
-
- .wall-text {
- border-left: 1px solid #CCC;
- margin-left: 10px;
- padding-left: 10px;
- float: left;
- width: 75%;
- }
-
- .wall-file {
- margin-left: 8px;
- background: #EEE;
- }
-
- abbr {
- float: right;
- color: #AAA;
- border: none;
- }
- }
-}
diff --git a/app/assets/stylesheets/sections/wiki.scss b/app/assets/stylesheets/sections/wiki.scss
deleted file mode 100644
index 175911d7..00000000
--- a/app/assets/stylesheets/sections/wiki.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-h3.page_title .edit-wiki-header {
- width: 780px;
- margin-left: auto;
- margin-right: auto;
- padding-right: 7px;
-}
diff --git a/app/assets/stylesheets/themes/ui_mars.scss b/app/assets/stylesheets/themes/ui_mars.scss
index a2b8c21e..0a78c5c0 100644
--- a/app/assets/stylesheets/themes/ui_mars.scss
+++ b/app/assets/stylesheets/themes/ui_mars.scss
@@ -8,27 +8,66 @@
*
*/
.ui_mars {
+
/*
* Application Header
*
*/
header {
- @extend .header-dark;
+
&.navbar-gitlab {
.navbar-inner {
- background: #474D57;
- border-bottom: 1px solid #373D47;
- .app_logo {
- &:hover {
- background-color: #373D47;
- }
+ background: #474D57 url('bg-header.png') repeat-x bottom;
+ border-bottom: 1px solid #444;
+
+ .nav > li > a {
+ color: #eee;
+ text-shadow: 0 1px 0 #444;
}
}
}
- .separator {
- background: #31363E;
- border-left: 1px solid #666;
+ .search {
+ float: right;
+ margin-right: 45px;
+ .search-input {
+ border: 1px solid rgba(0, 0, 0, 0.7);
+ background-color: #D2D5DA;
+ background-color: rgba(255, 255, 255, 0.5);
+
+ &:focus {
+ background-color: white;
+ }
+ }
+ }
+ .search-input::-webkit-input-placeholder {
+ color: #666;
+ }
+ .app_logo {
+ a {
+ h1 {
+ background: url('logo_white.png') no-repeat center center;
+ color: #eee;
+ text-shadow: 0 1px 1px #111;
+ }
+ }
+ &:hover {
+ background-color: #41464e;
+ }
+ }
+ .project_name {
+ color: #eee;
+ text-shadow: 0 1px 1px #111;
}
}
+
+ .separator {
+ background: #31363E;
+ border-left: 1px solid #666;
+ }
+
+ /*
+ * End of Application Header
+ *
+ */
}
diff --git a/app/contexts/commit_load_context.rb b/app/contexts/commit_load_context.rb
index 2cf5420d..1f23f633 100644
--- a/app/contexts/commit_load_context.rb
+++ b/app/contexts/commit_load_context.rb
@@ -12,6 +12,7 @@ class CommitLoadContext < BaseContext
commit = project.repository.commit(params[:id])
if commit
+ commit = CommitDecorator.decorate(commit)
line_notes = project.notes.for_commit_id(commit.id).inline
result[:commit] = commit
diff --git a/app/contexts/issues_list_context.rb b/app/contexts/issues_list_context.rb
index 0765b30c..0cc73f99 100644
--- a/app/contexts/issues_list_context.rb
+++ b/app/contexts/issues_list_context.rb
@@ -7,13 +7,12 @@ class IssuesListContext < BaseContext
@issues = case params[:status]
when issues_filter[:all] then @project.issues
when issues_filter[:closed] then @project.issues.closed
- when issues_filter[:to_me] then @project.issues.assigned(current_user)
- when issues_filter[:by_me] then @project.issues.authored(current_user)
+ when issues_filter[:to_me] then @project.issues.opened.assigned(current_user)
else @project.issues.opened
end
@issues = @issues.tagged_with(params[:label_name]) if params[:label_name].present?
- @issues = @issues.includes(:author, :project)
+ @issues = @issues.includes(:author, :project).order("updated_at")
# Filter by specific assignee_id (or lack thereof)?
if params[:assignee_id].present?
diff --git a/app/contexts/merge_requests_load_context.rb b/app/contexts/merge_requests_load_context.rb
index fde04085..4ec66cd9 100644
--- a/app/contexts/merge_requests_load_context.rb
+++ b/app/contexts/merge_requests_load_context.rb
@@ -14,7 +14,7 @@ class MergeRequestsLoadContext < BaseContext
end
merge_requests = merge_requests.page(params[:page]).per(20)
- merge_requests = merge_requests.includes(:author, :project).order("created_at desc")
+ merge_requests = merge_requests.includes(:author, :project).order("closed, created_at desc")
# Filter by specific assignee_id (or lack thereof)?
if params[:assignee_id].present?
diff --git a/app/contexts/notes/create_context.rb b/app/contexts/notes/create_context.rb
index 36ea76ff..1367dff4 100644
--- a/app/contexts/notes/create_context.rb
+++ b/app/contexts/notes/create_context.rb
@@ -3,6 +3,8 @@ module Notes
def execute
note = project.notes.new(params[:note])
note.author = current_user
+ note.notify = params[:notify].present?
+ note.notify_author = params[:notify_author].present?
note.save
note
end
diff --git a/app/contexts/notes/load_context.rb b/app/contexts/notes/load_context.rb
index 234e9ac3..e3875e1d 100644
--- a/app/contexts/notes/load_context.rb
+++ b/app/contexts/notes/load_context.rb
@@ -3,6 +3,8 @@ module Notes
def execute
target_type = params[:target_type]
target_id = params[:target_id]
+ after_id = params[:after_id]
+ before_id = params[:before_id]
@notes = case target_type
@@ -14,6 +16,17 @@ module Notes
project.merge_requests.find(target_id).mr_and_commit_notes.inc_author.fresh
when "snippet"
project.snippets.find(target_id).notes.fresh
+ when "wall"
+ # this is the only case, where the order is DESC
+ project.notes.common.inc_author_project.order("created_at DESC, id DESC").limit(50)
+ end
+
+ @notes = if after_id
+ @notes.where("id > ?", after_id)
+ elsif before_id
+ @notes.where("id < ?", before_id)
+ else
+ @notes
end
end
end
diff --git a/app/contexts/projects/create_context.rb b/app/contexts/projects/create_context.rb
index 56c4e1c5..e644d89a 100644
--- a/app/contexts/projects/create_context.rb
+++ b/app/contexts/projects/create_context.rb
@@ -32,26 +32,16 @@ module Projects
@project.namespace_id = current_user.namespace_id
end
- # Disable less important features by default
- @project.wall_enabled = false
- @project.snippets_enabled = false
+ Project.transaction do
+ @project.creator = current_user
+ @project.save!
- @project.creator = current_user
+ # Add user as project master
+ @project.users_projects.create!(project_access: UsersProject::MASTER, user: current_user)
- # Import project from cloneable resource
- if @project.valid? && @project.import_url.present?
- shell = Gitlab::Shell.new
- if shell.import_repository(@project.path_with_namespace, @project.import_url)
- # We should create satellite for imported repo
- @project.satellite.create unless @project.satellite.exists?
- true
- else
- @project.errors.add(:import_url, 'cannot clone repo')
- end
- end
-
- if @project.save
- @project.users_projects.create(project_access: UsersProject::MASTER, user: current_user)
+ # when project saved no team member exist so
+ # project repository should be updated after first user add
+ @project.update_repository
end
@project
diff --git a/app/contexts/projects/transfer_context.rb b/app/contexts/projects/transfer_context.rb
deleted file mode 100644
index aed396a5..00000000
--- a/app/contexts/projects/transfer_context.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-module Projects
- class TransferContext < BaseContext
- def execute(role = :default)
- namespace_id = params[:project].delete(:namespace_id)
- allowed_transfer = can?(current_user, :change_namespace, project) || role == :admin
-
- if allowed_transfer && namespace_id.present?
- if namespace_id == Namespace.global_id
- if project.namespace.present?
- # Transfer to global namespace from anyone
- project.transfer(nil)
- end
- elsif namespace_id.to_i != project.namespace_id
- # Transfer to someone namespace
- namespace = Namespace.find(namespace_id)
- project.transfer(namespace)
- end
- end
-
- rescue ProjectTransferService::TransferError => ex
- project.reload
- project.errors.add(:namespace_id, ex.message)
- false
- end
- end
-end
-
diff --git a/app/contexts/projects/update_context.rb b/app/contexts/projects/update_context.rb
index 40385fa6..e5d09b7d 100644
--- a/app/contexts/projects/update_context.rb
+++ b/app/contexts/projects/update_context.rb
@@ -1,8 +1,24 @@
module Projects
class UpdateContext < BaseContext
def execute(role = :default)
- params[:project].delete(:namespace_id)
+ namespace_id = params[:project].delete(:namespace_id)
params[:project].delete(:public) unless can?(current_user, :change_public_mode, project)
+
+ allowed_transfer = can?(current_user, :change_namespace, project) || role == :admin
+
+ if allowed_transfer && namespace_id.present?
+ if namespace_id == Namespace.global_id
+ if project.namespace.present?
+ # Transfer to global namespace from anyone
+ project.transfer(nil)
+ end
+ elsif namespace_id.to_i != project.namespace_id
+ # Transfer to someone namespace
+ namespace = Namespace.find(namespace_id)
+ project.transfer(namespace)
+ end
+ end
+
project.update_attributes(params[:project], as: role)
end
end
diff --git a/app/contexts/test_hook_context.rb b/app/contexts/test_hook_context.rb
index 63eda6c7..d2d82a52 100644
--- a/app/contexts/test_hook_context.rb
+++ b/app/contexts/test_hook_context.rb
@@ -1,7 +1,8 @@
class TestHookContext < BaseContext
def execute
hook = project.hooks.find(params[:id])
- data = GitPushService.new.sample_data(project, current_user)
+ commits = project.repository.commits(project.default_branch, nil, 3)
+ data = project.post_receive_data(commits.last.id, commits.first.id, "refs/heads/#{project.default_branch}", current_user)
hook.execute(data)
end
end
diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb
index 3c27b861..f97c56b0 100644
--- a/app/controllers/admin/dashboard_controller.rb
+++ b/app/controllers/admin/dashboard_controller.rb
@@ -1,4 +1,4 @@
-class Admin::DashboardController < Admin::ApplicationController
+class Admin::DashboardController < AdminController
def index
@projects = Project.order("created_at DESC").limit(10)
@users = User.order("created_at DESC").limit(10)
diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb
index f552fb59..90dbda3e 100644
--- a/app/controllers/admin/groups_controller.rb
+++ b/app/controllers/admin/groups_controller.rb
@@ -1,4 +1,4 @@
-class Admin::GroupsController < Admin::ApplicationController
+class Admin::GroupsController < AdminController
before_filter :group, only: [:edit, :show, :update, :destroy, :project_update, :project_teams_update]
def index
diff --git a/app/controllers/admin/hooks_controller.rb b/app/controllers/admin/hooks_controller.rb
index c5bf76f8..91a1d633 100644
--- a/app/controllers/admin/hooks_controller.rb
+++ b/app/controllers/admin/hooks_controller.rb
@@ -1,4 +1,4 @@
-class Admin::HooksController < Admin::ApplicationController
+class Admin::HooksController < AdminController
def index
@hooks = SystemHook.all
@hook = SystemHook.new
diff --git a/app/controllers/admin/logs_controller.rb b/app/controllers/admin/logs_controller.rb
index b999018d..28c321a9 100644
--- a/app/controllers/admin/logs_controller.rb
+++ b/app/controllers/admin/logs_controller.rb
@@ -1,2 +1,2 @@
-class Admin::LogsController < Admin::ApplicationController
+class Admin::LogsController < AdminController
end
diff --git a/app/controllers/admin/projects/application_controller.rb b/app/controllers/admin/projects/application_controller.rb
deleted file mode 100644
index b3f1539f..00000000
--- a/app/controllers/admin/projects/application_controller.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# Provides a base class for Admin controllers to subclass
-#
-# Automatically sets the layout and ensures an administrator is logged in
-class Admin::Projects::ApplicationController < Admin::ApplicationController
-
- protected
-
- def project
- @project ||= Project.find_with_namespace(params[:project_id])
- end
-end
diff --git a/app/controllers/admin/projects/members_controller.rb b/app/controllers/admin/projects/members_controller.rb
deleted file mode 100644
index d9c0d572..00000000
--- a/app/controllers/admin/projects/members_controller.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-class Admin::Projects::MembersController < Admin::Projects::ApplicationController
- def edit
- @member = team_member
- @project = project
- @team_member_relation = team_member_relation
- end
-
- def update
- if team_member_relation.update_attributes(params[:team_member])
- redirect_to [:admin, project], notice: 'Project Access was successfully updated.'
- else
- render action: "edit"
- end
- end
-
- def destroy
- team_member_relation.destroy
-
- redirect_to :back
- end
-
- private
-
- def team_member
- @member ||= project.users.find_by_username(params[:id])
- end
-
- def team_member_relation
- team_member.users_projects.find_by_project_id(project)
- end
-
-end
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb
index bbb80cbb..fc2793a7 100644
--- a/app/controllers/admin/projects_controller.rb
+++ b/app/controllers/admin/projects_controller.rb
@@ -1,4 +1,4 @@
-class Admin::ProjectsController < Admin::ApplicationController
+class Admin::ProjectsController < AdminController
before_filter :project, only: [:edit, :show, :update, :destroy, :team_update]
def index
@@ -19,6 +19,34 @@ class Admin::ProjectsController < Admin::ApplicationController
@users = @users.all
end
+ def edit
+ end
+
+ def team_update
+ @project.team.add_users_ids(params[:user_ids], params[:project_access])
+
+ redirect_to [:admin, @project], notice: 'Project was successfully updated.'
+ end
+
+ def update
+ status = Projects::UpdateContext.new(project, current_user, params).execute(:admin)
+
+ if status
+ redirect_to [:admin, @project], notice: 'Project was successfully updated.'
+ else
+ render action: "edit"
+ end
+ end
+
+ def destroy
+ # Delete team first in order to prevent multiple gitolite calls
+ @project.team.truncate
+
+ @project.destroy
+
+ redirect_to admin_projects_path, notice: 'Project was successfully deleted.'
+ end
+
protected
def project
diff --git a/app/controllers/admin/resque_controller.rb b/app/controllers/admin/resque_controller.rb
index 7d489ab4..9d8e7e30 100644
--- a/app/controllers/admin/resque_controller.rb
+++ b/app/controllers/admin/resque_controller.rb
@@ -1,4 +1,4 @@
-class Admin::ResqueController < Admin::ApplicationController
+class Admin::ResqueController < AdminController
def show
end
end
diff --git a/app/controllers/admin/team_members_controller.rb b/app/controllers/admin/team_members_controller.rb
new file mode 100644
index 00000000..07320805
--- /dev/null
+++ b/app/controllers/admin/team_members_controller.rb
@@ -0,0 +1,22 @@
+class Admin::TeamMembersController < AdminController
+ def edit
+ @admin_team_member = UsersProject.find(params[:id])
+ end
+
+ def update
+ @admin_team_member = UsersProject.find(params[:id])
+
+ if @admin_team_member.update_attributes(params[:team_member])
+ redirect_to [:admin, @admin_team_member.project], notice: 'Project Access was successfully updated.'
+ else
+ render action: "edit"
+ end
+ end
+
+ def destroy
+ @admin_team_member = UsersProject.find(params[:id])
+ @admin_team_member.destroy
+
+ redirect_to :back
+ end
+end
diff --git a/app/controllers/admin/teams/application_controller.rb b/app/controllers/admin/teams/application_controller.rb
deleted file mode 100644
index 87108214..00000000
--- a/app/controllers/admin/teams/application_controller.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# Provides a base class for Admin controllers to subclass
-#
-# Automatically sets the layout and ensures an administrator is logged in
-class Admin::Teams::ApplicationController < Admin::ApplicationController
-
- private
-
- def user_team
- @team = UserTeam.find_by_path(params[:team_id])
- end
-end
diff --git a/app/controllers/admin/teams/members_controller.rb b/app/controllers/admin/teams/members_controller.rb
deleted file mode 100644
index e6469874..00000000
--- a/app/controllers/admin/teams/members_controller.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-class Admin::Teams::MembersController < Admin::Teams::ApplicationController
- def new
- @users = User.potential_team_members(user_team)
- @users = UserDecorator.decorate_collection @users
- end
-
- def create
- unless params[:user_ids].blank?
- user_ids = params[:user_ids]
- access = params[:default_project_access]
- is_admin = params[:group_admin]
- user_team.add_members(user_ids, access, is_admin)
- end
-
- redirect_to admin_team_path(user_team), notice: 'Members was successfully added into Team of users.'
- end
-
- def edit
- team_member
- end
-
- def update
- options = {default_projects_access: params[:default_project_access], group_admin: params[:group_admin]}
- if user_team.update_membership(team_member, options)
- redirect_to admin_team_path(user_team), notice: "Membership for #{team_member.name} was successfully updated in Team of users."
- else
- render :edit
- end
- end
-
- def destroy
- user_team.remove_member(team_member)
- redirect_to admin_team_path(user_team), notice: "Member #{team_member.name} was successfully removed from Team of users."
- end
-
- protected
-
- def team_member
- @member ||= user_team.members.find_by_username(params[:id])
- end
-end
diff --git a/app/controllers/admin/teams/projects_controller.rb b/app/controllers/admin/teams/projects_controller.rb
deleted file mode 100644
index 8584a188..00000000
--- a/app/controllers/admin/teams/projects_controller.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-class Admin::Teams::ProjectsController < Admin::Teams::ApplicationController
- def new
- @projects = Project.scoped
- @projects = @projects.without_team(user_team) if user_team.projects.any?
- #@projects.reject!(&:empty_repo?)
- end
-
- def create
- unless params[:project_ids].blank?
- project_ids = params[:project_ids]
- access = params[:greatest_project_access]
- user_team.assign_to_projects(project_ids, access)
- end
-
- redirect_to admin_team_path(user_team), notice: 'Team of users was successfully assgned to projects.'
- end
-
- def edit
- team_project
- end
-
- def update
- if user_team.update_project_access(team_project, params[:greatest_project_access])
- redirect_to admin_team_path(user_team), notice: 'Access was successfully updated.'
- else
- render :edit
- end
- end
-
- def destroy
- user_team.resign_from_project(team_project)
- redirect_to admin_team_path(user_team), notice: 'Team of users was successfully reassigned from project.'
- end
-
- protected
-
- def team_project
- @project ||= user_team.projects.find_with_namespace(params[:id])
- end
-
-end
diff --git a/app/controllers/admin/teams_controller.rb b/app/controllers/admin/teams_controller.rb
deleted file mode 100644
index 786957cb..00000000
--- a/app/controllers/admin/teams_controller.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-class Admin::TeamsController < Admin::ApplicationController
- def index
- @teams = UserTeam.order('name ASC')
- @teams = @teams.search(params[:name]) if params[:name].present?
- @teams = @teams.page(params[:page]).per(20)
- end
-
- def show
- user_team
- end
-
- def new
- @team = UserTeam.new
- end
-
- def edit
- user_team
- end
-
- def create
- @team = UserTeam.new(params[:user_team])
- @team.path = @team.name.dup.parameterize if @team.name
- @team.owner = current_user
-
- if @team.save
- redirect_to admin_team_path(@team), notice: 'Team of users was successfully created.'
- else
- render action: "new"
- end
- end
-
- def update
- user_team_params = params[:user_team].dup
- owner_id = user_team_params.delete(:owner_id)
-
- if owner_id
- user_team.owner = User.find(owner_id)
- end
-
- if user_team.update_attributes(user_team_params)
- redirect_to admin_team_path(user_team), notice: 'Team of users was successfully updated.'
- else
- render action: "edit"
- end
- end
-
- def destroy
- user_team.destroy
-
- redirect_to admin_teams_path, notice: 'Team of users was successfully deleted.'
- end
-
- protected
-
- def user_team
- @team ||= UserTeam.find_by_path(params[:id])
- end
-
-end
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 20cb13e7..8669f5d1 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -1,6 +1,4 @@
-class Admin::UsersController < Admin::ApplicationController
- before_filter :admin_user, only: [:show, :edit, :update, :destroy]
-
+class Admin::UsersController < AdminController
def index
@admin_users = User.scoped
@admin_users = @admin_users.filter(params[:filter])
@@ -9,22 +7,25 @@ class Admin::UsersController < Admin::ApplicationController
end
def show
- # Projects user can be added to
- @not_in_projects = Project.scoped
- @not_in_projects = @not_in_projects.without_user(admin_user) if admin_user.authorized_projects.present?
+ @admin_user = User.find(params[:id])
- # Projects he already own or joined
- @projects = admin_user.authorized_projects.where('projects.id in (?)', admin_user.authorized_projects.map(&:id))
+ @projects = if @admin_user.authorized_projects.empty?
+ Project
+ else
+ Project.without_user(@admin_user)
+ end.all
end
def team_update
+ @admin_user = User.find(params[:id])
+
UsersProject.add_users_into_projects(
params[:project_ids],
- [admin_user.id],
+ [@admin_user.id],
params[:project_access]
)
- redirect_to [:admin, admin_user], notice: 'Teams were successfully updated.'
+ redirect_to [:admin, @admin_user], notice: 'Teams were successfully updated.'
end
@@ -33,11 +34,13 @@ class Admin::UsersController < Admin::ApplicationController
end
def edit
- admin_user
+ @admin_user = User.find(params[:id])
end
def block
- if admin_user.block
+ @admin_user = User.find(params[:id])
+
+ if @admin_user.block
redirect_to :back, alert: "Successfully blocked"
else
redirect_to :back, alert: "Error occured. User was not blocked"
@@ -45,7 +48,9 @@ class Admin::UsersController < Admin::ApplicationController
end
def unblock
- if admin_user.activate
+ @admin_user = User.find(params[:id])
+
+ if @admin_user.update_attribute(:blocked, false)
redirect_to :back, alert: "Successfully unblocked"
else
redirect_to :back, alert: "Error occured. User was not unblocked"
@@ -77,36 +82,30 @@ class Admin::UsersController < Admin::ApplicationController
params[:user].delete(:password_confirmation)
end
- admin_user.admin = (admin && admin.to_i > 0)
+ @admin_user = User.find(params[:id])
+ @admin_user.admin = (admin && admin.to_i > 0)
respond_to do |format|
- if admin_user.update_attributes(params[:user], as: :admin)
- format.html { redirect_to [:admin, admin_user], notice: 'User was successfully updated.' }
+ if @admin_user.update_attributes(params[:user], as: :admin)
+ format.html { redirect_to [:admin, @admin_user], notice: 'User was successfully updated.' }
format.json { head :ok }
else
- # restore username to keep form action url.
- admin_user.username = params[:id]
format.html { render action: "edit" }
- format.json { render json: admin_user.errors, status: :unprocessable_entity }
+ format.json { render json: @admin_user.errors, status: :unprocessable_entity }
end
end
end
def destroy
- if admin_user.personal_projects.count > 0
+ @admin_user = User.find(params[:id])
+ if @admin_user.personal_projects.count > 0
redirect_to admin_users_path, alert: "User is a project owner and can't be removed." and return
end
- admin_user.destroy
+ @admin_user.destroy
respond_to do |format|
- format.html { redirect_to admin_users_path }
+ format.html { redirect_to admin_users_url }
format.json { head :ok }
end
end
-
- protected
-
- def admin_user
- @admin_user ||= User.find_by_username!(params[:id])
- end
end
diff --git a/app/controllers/admin/application_controller.rb b/app/controllers/admin_controller.rb
similarity index 82%
rename from app/controllers/admin/application_controller.rb
rename to app/controllers/admin_controller.rb
index 6a8f20f6..bce9f692 100644
--- a/app/controllers/admin/application_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -1,7 +1,7 @@
# Provides a base class for Admin controllers to subclass
#
# Automatically sets the layout and ensures an administrator is logged in
-class Admin::ApplicationController < ApplicationController
+class AdminController < ApplicationController
layout 'admin'
before_filter :authenticate_admin!
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 32b12466..3457a1ab 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -4,13 +4,16 @@ class ApplicationController < ActionController::Base
before_filter :set_current_user_for_observers
before_filter :add_abilities
before_filter :dev_tools if Rails.env == 'development'
- before_filter :default_headers
- before_filter :add_gon_variables
protect_from_forgery
helper_method :abilities, :can?
+ rescue_from Gitlab::Gitolite::AccessDenied do |exception|
+ log_exception(exception)
+ render "errors/gitolite", layout: "errors", status: 500
+ end
+
rescue_from Encoding::CompatibilityError do |exception|
log_exception(exception)
render "errors/encoding", layout: "errors", status: 500
@@ -30,7 +33,7 @@ class ApplicationController < ActionController::Base
end
def reject_blocked!
- if current_user && current_user.blocked?
+ if current_user && current_user.blocked
sign_out current_user
flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
redirect_to new_user_session_path
@@ -38,7 +41,7 @@ class ApplicationController < ActionController::Base
end
def after_sign_in_path_for resource
- if resource.is_a?(User) && resource.respond_to?(:blocked?) && resource.blocked?
+ if resource.is_a?(User) && resource.respond_to?(:blocked) && resource.blocked
sign_out resource
flash[:alert] = "Your account is blocked. Retry when an admin unblock it."
new_user_session_path
@@ -91,18 +94,6 @@ class ApplicationController < ActionController::Base
return access_denied! unless can?(current_user, :download_code, project)
end
- def authorize_create_team!
- return access_denied! unless can?(current_user, :create_team, nil)
- end
-
- def authorize_manage_user_team!
- return access_denied! unless user_team.present? && can?(current_user, :manage_user_team, user_team)
- end
-
- def authorize_admin_user_team!
- return access_denied! unless user_team.present? && can?(current_user, :admin_user_team, user_team)
- end
-
def access_denied!
render "errors/access_denied", layout: "errors", status: 404
end
@@ -144,16 +135,4 @@ class ApplicationController < ActionController::Base
def dev_tools
Rack::MiniProfiler.authorize_request
end
-
- def default_headers
- headers['X-Frame-Options'] = 'DENY'
- headers['X-XSS-Protection'] = '1; mode=block'
- end
-
- def add_gon_variables
- gon.default_issues_tracker = Project.issues_tracker.default_value
- gon.api_version = Gitlab::API.version
- gon.api_token = current_user.private_token if current_user
- gon.gravatar_url = request.ssl? ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
- end
end
diff --git a/app/controllers/blame_controller.rb b/app/controllers/blame_controller.rb
index 310b567c..37d7245c 100644
--- a/app/controllers/blame_controller.rb
+++ b/app/controllers/blame_controller.rb
@@ -7,7 +7,10 @@ class BlameController < ProjectResourceController
before_filter :authorize_code_access!
before_filter :require_non_empty_project
+ before_filter :assign_ref_vars
+
def show
- @blame = Gitlab::Git::Blame.new(project.repository, @commit.id, @path)
+ @repo = @project.repo
+ @blame = Grit::Blob.blame(@repo, @commit.id, @path)
end
end
diff --git a/app/controllers/blob_controller.rb b/app/controllers/blob_controller.rb
index 530b72fe..d4a45d95 100644
--- a/app/controllers/blob_controller.rb
+++ b/app/controllers/blob_controller.rb
@@ -7,6 +7,8 @@ class BlobController < ProjectResourceController
before_filter :authorize_code_access!
before_filter :require_non_empty_project
+ before_filter :assign_ref_vars
+
def show
if @tree.is_blob?
send_data(
diff --git a/app/controllers/commits_controller.rb b/app/controllers/commits_controller.rb
index cde1f459..534ae1ed 100644
--- a/app/controllers/commits_controller.rb
+++ b/app/controllers/commits_controller.rb
@@ -13,6 +13,7 @@ class CommitsController < ProjectResourceController
@limit, @offset = (params[:limit] || 40), (params[:offset] || 0)
@commits = @repo.commits(@ref, @path, @limit, @offset)
+ @commits = CommitDecorator.decorate(@commits)
respond_to do |format|
format.html # index.html.erb
diff --git a/app/controllers/compare_controller.rb b/app/controllers/compare_controller.rb
index 750e9c23..ae20f9c0 100644
--- a/app/controllers/compare_controller.rb
+++ b/app/controllers/compare_controller.rb
@@ -8,13 +8,15 @@ class CompareController < ProjectResourceController
end
def show
- compare = Gitlab::Git::Compare.new(project.repository, params[:from], params[:to])
+ result = Commit.compare(project, params[:from], params[:to])
- @commits = compare.commits
- @commit = compare.commit
- @diffs = compare.diffs
- @refs_are_same = compare.same
+ @commits = result[:commits]
+ @commit = result[:commit]
+ @diffs = result[:diffs]
+ @refs_are_same = result[:same]
@line_notes = []
+
+ @commits = CommitDecorator.decorate(@commits)
end
def create
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index 91a67985..c0ec4708 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -1,15 +1,24 @@
class DashboardController < ApplicationController
respond_to :html
- before_filter :load_projects
- before_filter :event_filter, only: :show
+ before_filter :projects
+ before_filter :event_filter, only: :index
+
+ def index
+ @groups = current_user.authorized_groups
- def show
- @groups = current_user.authorized_groups.sort_by(&:human_name)
@has_authorized_projects = @projects.count > 0
- @teams = current_user.authorized_teams
- @projects_count = @projects.count
- @projects = @projects.limit(20)
+
+ @projects = case params[:scope]
+ when 'personal' then
+ @projects.personal(current_user)
+ when 'joined' then
+ @projects.joined(current_user)
+ else
+ @projects
+ end
+
+ @projects = @projects.page(params[:page]).per(30)
@events = Event.in_projects(current_user.authorized_projects.pluck(:id))
@events = @event_filter.apply_filter(@events)
@@ -24,20 +33,6 @@ class DashboardController < ApplicationController
end
end
- def projects
- @projects = case params[:scope]
- when 'personal' then
- @projects.personal(current_user)
- when 'joined' then
- @projects.joined(current_user)
- else
- @projects
- end
-
- @projects = @projects.search(params[:search]) if params[:search].present?
- @projects = @projects.page(params[:page]).per(30)
- end
-
# Get authored or assigned open merge requests
def merge_requests
@merge_requests = current_user.cared_merge_requests
@@ -60,7 +55,7 @@ class DashboardController < ApplicationController
protected
- def load_projects
+ def projects
@projects = current_user.authorized_projects.sorted_by_activity
end
diff --git a/app/controllers/edit_tree_controller.rb b/app/controllers/edit_tree_controller.rb
deleted file mode 100644
index aae983aa..00000000
--- a/app/controllers/edit_tree_controller.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-# Controller for edit a repository's file
-class EditTreeController < ProjectResourceController
- include ExtractsPath
-
- # Authorize
- before_filter :authorize_read_project!
- before_filter :authorize_code_access!
- before_filter :require_non_empty_project
-
- before_filter :edit_requirements, only: [:edit, :update]
-
- def show
- @last_commit = @project.repository.last_commit_for(@ref, @path).sha
- end
-
- def update
- edit_file_action = Gitlab::Satellite::EditFileAction.new(current_user, @project, @ref, @path)
- updated_successfully = edit_file_action.commit!(
- params[:content],
- params[:commit_message],
- params[:last_commit]
- )
-
- if updated_successfully
- redirect_to project_tree_path(@project, @id), notice: "Your changes have been successfully commited"
- else
- flash[:notice] = "Your changes could not be commited, because the file has been changed"
- render :edit
- end
- end
-
- private
-
- def edit_requirements
- unless @tree.is_blob? && @tree.text?
- redirect_to project_tree_path(@project, @id), notice: "You can only edit text files"
- end
-
- allowed = if project.protected_branch? @ref
- can?(current_user, :push_code_to_protected_branches, project)
- else
- can?(current_user, :push_code, project)
- end
-
- return access_denied! unless allowed
- end
-end
diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb
index a0c8a000..e998d723 100644
--- a/app/controllers/errors_controller.rb
+++ b/app/controllers/errors_controller.rb
@@ -1,2 +1,5 @@
class ErrorsController < ApplicationController
+ def githost
+ render "errors/gitolite"
+ end
end
diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb
deleted file mode 100644
index 3cd2e773..00000000
--- a/app/controllers/files_controller.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class FilesController < ApplicationController
- def download
- note = Note.find(params[:id])
-
- if can?(current_user, :read_project, note.project)
- uploader = note.attachment
- send_file uploader.file.path, disposition: 'attachment'
- else
- not_found!
- end
- end
-end
-
diff --git a/app/controllers/graph_controller.rb b/app/controllers/graph_controller.rb
deleted file mode 100644
index b4bf9565..00000000
--- a/app/controllers/graph_controller.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-class GraphController < ProjectResourceController
- include ExtractsPath
- include ApplicationHelper
-
- # Authorize
- before_filter :authorize_read_project!
- before_filter :authorize_code_access!
- before_filter :require_non_empty_project
-
- def show
- if params.has_key?(:q)
- if params[:q].blank?
- redirect_to project_graph_path(@project, params[:id])
- return
- end
-
- @q = params[:q]
- @commit = @project.repository.commit(@q) || @commit
- end
-
- respond_to do |format|
- format.html
-
- format.json do
- @graph = Network::Graph.new(project, @ref, @commit)
- end
- end
- end
-end
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index bdf3567f..c25fc32a 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -1,32 +1,12 @@
class GroupsController < ApplicationController
respond_to :html
- layout 'group', except: [:new, :create]
+ layout 'group'
- before_filter :group, except: [:new, :create]
+ before_filter :group
+ before_filter :projects
# Authorize
- before_filter :authorize_read_group!, except: [:new, :create]
- before_filter :authorize_admin_group!, only: [:edit, :update, :destroy]
- before_filter :authorize_create_group!, only: [:new, :create]
-
- # Load group projects
- before_filter :projects, except: [:new, :create]
-
- def new
- @group = Group.new
- end
-
- def create
- @group = Group.new(params[:group])
- @group.path = @group.name.dup.parameterize if @group.name
- @group.owner = current_user
-
- if @group.save
- redirect_to @group, notice: 'Group was successfully created.'
- else
- render action: "new"
- end
- end
+ before_filter :authorize_read_group!
def show
@events = Event.in_projects(project_ids).limit(20).offset(params[:offset] || 0)
@@ -59,6 +39,15 @@ class GroupsController < ApplicationController
end
end
+ def search
+ result = SearchContext.new(project_ids, params).execute
+
+ @projects = result[:projects]
+ @merge_requests = result[:merge_requests]
+ @issues = result[:issues]
+ @wiki_pages = result[:wiki_pages]
+ end
+
def people
@project = group.projects.find(params[:project_id]) if params[:project_id]
@users = @project ? @project.users : group.users
@@ -76,32 +65,6 @@ class GroupsController < ApplicationController
redirect_to people_group_path(@group), notice: 'Users was successfully added.'
end
- def edit
- end
-
- def update
- group_params = params[:group].dup
- owner_id =group_params.delete(:owner_id)
-
- if owner_id
- @group.owner = User.find(owner_id)
- @group.save
- end
-
- if @group.update_attributes(group_params)
- redirect_to @group, notice: 'Group was successfully updated.'
- else
- render action: "edit"
- end
- end
-
- def destroy
- @group.truncate_teams
- @group.destroy
-
- redirect_to root_path, notice: 'Group was removed.'
- end
-
protected
def group
@@ -122,16 +85,4 @@ class GroupsController < ApplicationController
return render_404
end
end
-
- def authorize_create_group!
- unless can?(current_user, :create_group, nil)
- return render_404
- end
- end
-
- def authorize_admin_group!
- unless can?(current_user, :manage_group, group)
- return render_404
- end
- end
end
diff --git a/app/controllers/merge_requests_controller.rb b/app/controllers/merge_requests_controller.rb
index 1950ebb2..ab6bf595 100644
--- a/app/controllers/merge_requests_controller.rb
+++ b/app/controllers/merge_requests_controller.rb
@@ -1,5 +1,3 @@
-require 'gitlab/satellite/satellite'
-
class MergeRequestsController < ProjectResourceController
before_filter :module_enabled
before_filter :merge_request, only: [:edit, :update, :show, :commits, :diffs, :automerge, :automerge_check, :ci_status]
@@ -75,15 +73,14 @@ class MergeRequestsController < ProjectResourceController
if @merge_request.unchecked?
@merge_request.check_if_can_be_merged
end
- render json: {merge_status: @merge_request.merge_status_name}
+ render json: {state: @merge_request.human_state}
rescue Gitlab::SatelliteNotExistError
- render json: {merge_status: :no_satellite}
+ render json: {state: :no_satellite}
end
def automerge
- return access_denied! unless allowed_to_merge?
-
- if @merge_request.opened? && @merge_request.can_be_merged?
+ return access_denied! unless can?(current_user, :accept_mr, @project)
+ if @merge_request.open? && @merge_request.can_be_merged?
@merge_request.should_remove_source_branch = params[:should_remove_source_branch]
@merge_request.automerge!(current_user)
@status = true
@@ -94,10 +91,12 @@ class MergeRequestsController < ProjectResourceController
def branch_from
@commit = @repository.commit(params[:ref])
+ @commit = CommitDecorator.decorate(@commit)
end
def branch_to
@commit = @repository.commit(params[:ref])
+ @commit = CommitDecorator.decorate(@commit)
end
def ci_status
@@ -126,12 +125,12 @@ class MergeRequestsController < ProjectResourceController
end
def validates_merge_request
- # Show git not found page if target branch doesn't exist
- return invalid_mr unless @project.repository.branch_names.include?(@merge_request.target_branch)
+ # Show git not found page if target branch doesnt exist
+ return git_not_found! unless @project.repo.heads.map(&:name).include?(@merge_request.target_branch)
- # Show git not found page if source branch doesn't exist
+ # Show git not found page if source branch doesnt exist
# and there is no saved commits between source & target branch
- return invalid_mr if !@project.repository.branch_names.include?(@merge_request.source_branch) && @merge_request.commits.blank?
+ return git_not_found! if !@project.repo.heads.map(&:name).include?(@merge_request.source_branch) && @merge_request.commits.blank?
end
def define_show_vars
@@ -141,23 +140,6 @@ class MergeRequestsController < ProjectResourceController
# Get commits from repository
# or from cache if already merged
@commits = @merge_request.commits
-
- @allowed_to_merge = allowed_to_merge?
- @show_merge_controls = @merge_request.opened? && @commits.any? && @allowed_to_merge
- end
-
- def allowed_to_merge?
- action = if project.protected_branch?(@merge_request.target_branch)
- :push_code_to_protected_branches
- else
- :push_code
- end
-
- can?(current_user, action, @project)
- end
-
- def invalid_mr
- # Render special view for MR with removed source or target branch
- render 'invalid'
+ @commits = CommitDecorator.decorate(@commits)
end
end
diff --git a/app/controllers/milestones_controller.rb b/app/controllers/milestones_controller.rb
index cdac28c1..a0c824e8 100644
--- a/app/controllers/milestones_controller.rb
+++ b/app/controllers/milestones_controller.rb
@@ -12,7 +12,7 @@ class MilestonesController < ProjectResourceController
def index
@milestones = case params[:f]
- when 'all'; @project.milestones.order("state, due_date DESC")
+ when 'all'; @project.milestones.order("closed, due_date DESC")
when 'closed'; @project.milestones.closed.order("due_date DESC")
else @project.milestones.active.order("due_date ASC")
end
@@ -32,7 +32,7 @@ class MilestonesController < ProjectResourceController
def show
@issues = @milestone.issues
- @users = UserDecorator.decorate_collection(@milestone.participants)
+ @users = UserDecorator.decorate(@milestone.participants)
@merge_requests = @milestone.merge_requests
respond_to do |format|
diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb
deleted file mode 100644
index e44e0aa8..00000000
--- a/app/controllers/notifications_controller.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class NotificationsController < ApplicationController
- layout 'profile'
-
- def show
- @notification = current_user.notification
- @projects = current_user.authorized_projects
- end
-
- def update
- current_user.notification_level = params[:notification_level]
- @saved = current_user.save
- end
-end
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb
index 6fa114a4..051a6664 100644
--- a/app/controllers/profiles_controller.rb
+++ b/app/controllers/profiles_controller.rb
@@ -1,6 +1,4 @@
class ProfilesController < ApplicationController
- include ActionView::Helpers::SanitizeHelper
-
before_filter :user
layout 'profile'
@@ -14,7 +12,7 @@ class ProfilesController < ApplicationController
end
def update
- if @user.update_attributes(user_attributes)
+ if @user.update_attributes(params[:user])
flash[:notice] = "Profile was successfully updated"
else
flash[:alert] = "Failed to update profile"
@@ -67,17 +65,4 @@ class ProfilesController < ApplicationController
def user
@user = current_user
end
-
- def user_attributes
- user_attributes = params[:user]
-
- # Sanitize user input because we dont have strict
- # validation for this fields
- %w(name skype linkedin twitter bio).each do |attr|
- value = user_attributes[attr]
- user_attributes[attr] = sanitize(value) if value.present?
- end
-
- user_attributes
- end
end
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb
deleted file mode 100644
index 7e4776d2..00000000
--- a/app/controllers/projects/application_controller.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class Projects::ApplicationController < ApplicationController
-
- before_filter :authorize_admin_team_member!
-
- protected
-
- def user_team
- @team ||= UserTeam.find_by_path(params[:id])
- end
-
-end
diff --git a/app/controllers/projects/teams_controller.rb b/app/controllers/projects/teams_controller.rb
deleted file mode 100644
index 17e73673..00000000
--- a/app/controllers/projects/teams_controller.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-class Projects::TeamsController < Projects::ApplicationController
-
- def available
- @teams = current_user.is_admin? ? UserTeam.scoped : current_user.user_teams
- @teams = @teams.without_project(project)
- unless @teams.any?
- redirect_to project_team_index_path(project), notice: "No available teams for assigment."
- end
- end
-
- def assign
- unless params[:team_id].blank?
- team = UserTeam.find(params[:team_id])
- access = params[:greatest_project_access]
- team.assign_to_project(project, access)
- end
- redirect_to project_team_index_path(project)
- end
-
- def resign
- team = project.user_teams.find_by_path(params[:id])
- team.resign_from_project(project)
-
- redirect_to project_team_index_path(project)
- end
-
-end
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 8e55aa01..368737d1 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -1,10 +1,12 @@
+require Rails.root.join('lib', 'gitlab', 'graph', 'json_builder')
+
class ProjectsController < ProjectResourceController
skip_before_filter :project, only: [:new, :create]
skip_before_filter :repository, only: [:new, :create]
# Authorize
before_filter :authorize_read_project!, except: [:index, :new, :create]
- before_filter :authorize_admin_project!, only: [:edit, :update, :destroy, :transfer]
+ before_filter :authorize_admin_project!, only: [:edit, :update, :destroy]
before_filter :require_non_empty_project, only: [:blob, :tree, :graph]
layout 'application', only: [:new, :create]
@@ -17,7 +19,7 @@ class ProjectsController < ProjectResourceController
end
def create
- @project = ::Projects::CreateContext.new(current_user, params[:project]).execute
+ @project = Projects::CreateContext.new(current_user, params[:project]).execute
respond_to do |format|
flash[:notice] = 'Project was successfully created.' if @project.saved?
@@ -33,7 +35,7 @@ class ProjectsController < ProjectResourceController
end
def update
- status = ::Projects::UpdateContext.new(project, current_user, params).execute
+ status = Projects::UpdateContext.new(project, current_user, params).execute
respond_to do |format|
if status
@@ -45,10 +47,10 @@ class ProjectsController < ProjectResourceController
format.js
end
end
- end
- def transfer
- ::Projects::TransferContext.new(project, current_user, params).execute
+ rescue Project::TransferError => ex
+ @error = ex
+ render :update_failed
end
def show
@@ -57,21 +59,53 @@ class ProjectsController < ProjectResourceController
respond_to do |format|
format.html do
- if @project.empty_repo?
- render "projects/empty"
- else
+ if @project.repository && !@project.repository.empty?
@last_push = current_user.recent_push(@project.id)
render :show
+ else
+ render "projects/empty"
end
end
format.js
end
end
+ def files
+ @notes = @project.notes.where("attachment != 'NULL'").order("created_at DESC").limit(100)
+ end
+
+ #
+ # Wall
+ #
+
+ def wall
+ return render_404 unless @project.wall_enabled
+
+ @target_type = :wall
+ @target_id = nil
+ @note = @project.notes.new
+
+ respond_to do |format|
+ format.html
+ end
+ end
+
+ def graph
+ respond_to do |format|
+ format.html
+ format.json do
+ graph = Gitlab::Graph::JsonBuilder.new(project)
+ render :json => graph.to_json
+ end
+ end
+ end
+
def destroy
return access_denied! unless can?(current_user, :remove_project, project)
+ # Delete team first in order to prevent multiple gitolite calls
project.team.truncate
+
project.destroy
respond_to do |format|
diff --git a/app/controllers/public/projects_controller.rb b/app/controllers/public/projects_controller.rb
index b929b23e..4108fe5f 100644
--- a/app/controllers/public/projects_controller.rb
+++ b/app/controllers/public/projects_controller.rb
@@ -6,7 +6,7 @@ class Public::ProjectsController < ApplicationController
layout 'public'
def index
- @projects = Project.public_only
+ @projects = Project.public
@projects = @projects.includes(:namespace).order("namespaces.path, projects.name ASC").page(params[:page]).per(20)
end
end
diff --git a/app/controllers/refs_controller.rb b/app/controllers/refs_controller.rb
index eb8d1e19..09d9eb51 100644
--- a/app/controllers/refs_controller.rb
+++ b/app/controllers/refs_controller.rb
@@ -13,8 +13,6 @@ class RefsController < ProjectResourceController
format.html do
new_path = if params[:destination] == "tree"
project_tree_path(@project, (@ref + "/" + params[:path]))
- elsif params[:destination] == "graph"
- project_graph_path(@project, @ref)
else
project_commits_path(@project, @ref)
end
@@ -34,6 +32,7 @@ class RefsController < ProjectResourceController
@logs = contents.map do |content|
file = params[:path] ? File.join(params[:path], content.name) : content.name
last_commit = @repo.commits(@commit.id, file, 1).last
+ last_commit = CommitDecorator.decorate(last_commit)
{
file_name: content.name,
commit: last_commit
@@ -48,7 +47,9 @@ class RefsController < ProjectResourceController
@repo = project.repository
@commit = @repo.commit(@ref)
+ @commit = CommitDecorator.decorate(@commit)
@tree = Tree.new(@commit.tree, @ref, params[:path])
+ @tree = TreeDecorator.new(@tree)
@hex_path = Digest::SHA1.hexdigest(params[:path] || "")
if params[:path]
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 507a5c20..cbac7613 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -1,28 +1,9 @@
class RegistrationsController < Devise::RegistrationsController
before_filter :signup_enabled?
- def destroy
- if current_user.owned_projects.count > 0
- redirect_to account_profile_path, alert: "Remove projects and groups before removing account." and return
- end
- current_user.destroy
-
- respond_to do |format|
- format.html { redirect_to new_user_session_path, notice: "Account successfully removed." }
- end
- end
-
- protected
-
- def build_resource(hash=nil)
- super
- self.resource.projects_limit = Gitlab.config.gitlab.default_projects_limit
- self.resource
- end
-
private
def signup_enabled?
redirect_to new_user_session_path unless Gitlab.config.gitlab.signup_enabled
end
-end
+end
\ No newline at end of file
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index bbd67df6..a2329239 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -1,18 +1,6 @@
class SearchController < ApplicationController
def show
- project_id = params[:project_id]
- group_id = params[:group_id]
-
- project_ids = current_user.authorized_projects.map(&:id)
-
- if group_id.present?
- group_project_ids = Group.find(group_id).projects.map(&:id)
- project_ids.select! { |id| group_project_ids.include?(id)}
- elsif project_id.present?
- project_ids.select! { |id| id == project_id.to_i}
- end
-
- result = SearchContext.new(project_ids, params).execute
+ result = SearchContext.new(current_user.authorized_projects.map(&:id), params).execute
@projects = result[:projects]
@merge_requests = result[:merge_requests]
diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb
index 25a06501..d0df469b 100644
--- a/app/controllers/services_controller.rb
+++ b/app/controllers/services_controller.rb
@@ -26,7 +26,8 @@ class ServicesController < ProjectResourceController
end
def test
- data = GitPushService.new.sample_data(project, current_user)
+ commits = project.repository.commits(project.default_branch, nil, 3)
+ data = project.post_receive_data(commits.last.id, commits.first.id, "refs/heads/#{project.default_branch}", current_user)
@service = project.gitlab_ci_service
@service.execute(data)
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb
index a2e22a67..26898abf 100644
--- a/app/controllers/snippets_controller.rb
+++ b/app/controllers/snippets_controller.rb
@@ -1,5 +1,4 @@
class SnippetsController < ProjectResourceController
- before_filter :module_enabled
before_filter :snippet, only: [:show, :edit, :destroy, :update, :raw]
# Allow read any snippet
@@ -85,8 +84,4 @@ class SnippetsController < ProjectResourceController
def authorize_admin_snippet!
return render_404 unless can?(current_user, :admin_snippet, @snippet)
end
-
- def module_enabled
- return render_404 unless @project.snippets_enabled
- end
end
diff --git a/app/controllers/team_members_controller.rb b/app/controllers/team_members_controller.rb
index ba55648a..8378a845 100644
--- a/app/controllers/team_members_controller.rb
+++ b/app/controllers/team_members_controller.rb
@@ -4,19 +4,19 @@ class TeamMembersController < ProjectResourceController
before_filter :authorize_admin_project!, except: [:index, :show]
def index
- @team = @project.users_projects.scoped
- @team = @team.send(params[:type]) if %w(masters developers reporters guests).include?(params[:type])
- @team = @team.sort_by(&:project_access).reverse.group_by(&:project_access)
+ end
- @assigned_teams = @project.user_team_project_relationships
+ def show
+ @team_member = project.users_projects.find(params[:id])
+ @events = @team_member.user.recent_events.where(:project_id => @project.id).limit(7)
end
def new
- @user_project_relation = project.users_projects.new
+ @team_member = project.users_projects.new
end
def create
- users = User.where(id: params[:user_ids].split(','))
+ users = User.where(id: params[:user_ids])
@project.team << [users, params[:project_access]]
@@ -28,18 +28,18 @@ class TeamMembersController < ProjectResourceController
end
def update
- @user_project_relation = project.users_projects.find_by_user_id(member)
- @user_project_relation.update_attributes(params[:team_member])
+ @team_member = project.users_projects.find(params[:id])
+ @team_member.update_attributes(params[:team_member])
- unless @user_project_relation.valid?
+ unless @team_member.valid?
flash[:alert] = "User should have at least one role"
end
redirect_to project_team_index_path(@project)
end
def destroy
- @user_project_relation = project.users_projects.find_by_user_id(member)
- @user_project_relation.destroy
+ @team_member = project.users_projects.find(params[:id])
+ @team_member.destroy
respond_to do |format|
format.html { redirect_to project_team_index_path(@project) }
@@ -54,10 +54,4 @@ class TeamMembersController < ProjectResourceController
redirect_to project_team_members_path(project), notice: notice
end
-
- protected
-
- def member
- @member ||= User.find_by_username(params[:id])
- end
end
diff --git a/app/controllers/teams/application_controller.rb b/app/controllers/teams/application_controller.rb
deleted file mode 100644
index fc232026..00000000
--- a/app/controllers/teams/application_controller.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class Teams::ApplicationController < ApplicationController
-
- layout 'user_team'
-
- before_filter :authorize_manage_user_team!
-
- protected
-
- def user_team
- @team ||= UserTeam.find_by_path(params[:team_id])
- end
-
-end
diff --git a/app/controllers/teams/members_controller.rb b/app/controllers/teams/members_controller.rb
deleted file mode 100644
index f87d422f..00000000
--- a/app/controllers/teams/members_controller.rb
+++ /dev/null
@@ -1,54 +0,0 @@
-class Teams::MembersController < Teams::ApplicationController
-
- skip_before_filter :authorize_manage_user_team!, only: [:index]
-
- def index
- @members = user_team.members
- end
-
- def new
- @users = User.potential_team_members(user_team)
- @users = UserDecorator.decorate_collection @users
- end
-
- def create
- unless params[:user_ids].blank?
- user_ids = params[:user_ids].split(',')
- access = params[:default_project_access]
- is_admin = params[:group_admin]
- user_team.add_members(user_ids, access, is_admin)
- end
-
- redirect_to team_members_path(user_team), notice: 'Members was successfully added into Team of users.'
- end
-
- def edit
- team_member
- end
-
- def update
- member_params = params[:team_member]
-
- options = {
- default_projects_access: member_params[:permission],
- group_admin: member_params[:group_admin]
- }
-
- if user_team.update_membership(team_member, options)
- redirect_to team_members_path(user_team), notice: "Membership for #{team_member.name} was successfully updated in Team of users."
- else
- render :edit
- end
- end
-
- def destroy
- user_team.remove_member(team_member)
- redirect_to team_path(user_team), notice: "Member #{team_member.name} was successfully removed from Team of users."
- end
-
- protected
-
- def team_member
- @member ||= user_team.members.find_by_username(params[:id])
- end
-end
diff --git a/app/controllers/teams/projects_controller.rb b/app/controllers/teams/projects_controller.rb
deleted file mode 100644
index 81ffa238..00000000
--- a/app/controllers/teams/projects_controller.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-class Teams::ProjectsController < Teams::ApplicationController
- def create
- redirect_to :back if params[:project_ids].blank?
-
- project_ids = params[:project_ids]
- access = params[:greatest_project_access]
-
- # Reject non-allowed projects
- allowed_project_ids = current_user.owned_projects.map(&:id)
- project_ids.select! { |id| allowed_project_ids.include?(id.to_i) }
-
- # Assign projects to team
- user_team.assign_to_projects(project_ids, access)
-
- redirect_to edit_team_path(user_team), notice: 'Team of users was successfully assigned to projects.'
- end
-
- def edit
- team_project
- end
-
- def update
- if user_team.update_project_access(team_project, params[:greatest_project_access])
- redirect_to edit_team_path(user_team), notice: 'Access was successfully updated.'
- else
- render :edit
- end
- end
-
- def destroy
- user_team.resign_from_project(team_project)
- redirect_to team_projects_path(user_team), notice: 'Team of users was successfully reassigned from project.'
- end
-
- private
-
- def team_project
- @project ||= user_team.projects.find_with_namespace(params[:id])
- end
-end
diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb
deleted file mode 100644
index 26c1d84f..00000000
--- a/app/controllers/teams_controller.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-class TeamsController < ApplicationController
- # Authorize
- before_filter :authorize_create_team!, only: [:new, :create]
- before_filter :authorize_manage_user_team!, only: [:edit, :update]
- before_filter :authorize_admin_user_team!, only: [:destroy]
-
- before_filter :user_team, except: [:new, :create]
-
- layout 'user_team', except: [:new, :create]
-
- def show
- projects
- @events = Event.in_projects(user_team.project_ids).limit(20).offset(params[:offset] || 0)
- end
-
- def edit
- projects
- @avaliable_projects = current_user.admin? ? Project.without_team(user_team) : current_user.owned_projects.without_team(user_team)
- end
-
- def update
- if user_team.update_attributes(params[:user_team])
- redirect_to team_path(user_team)
- else
- render action: :edit
- end
- end
-
- def destroy
- user_team.destroy
- redirect_to dashboard_path
- end
-
- def new
- @team = UserTeam.new
- end
-
- def create
- @team = UserTeam.new(params[:user_team])
- @team.owner = current_user unless params[:owner]
- @team.path = @team.name.dup.parameterize if @team.name
-
- if @team.save
- # Add current user as Master to the team
- @team.add_members([current_user.id], UsersProject::MASTER, true)
-
- redirect_to team_path(@team)
- else
- render action: :new
- end
- end
-
- # Get authored or assigned open merge requests
- def merge_requests
- projects
- @merge_requests = MergeRequest.of_user_team(user_team)
- @merge_requests = FilterContext.new(@merge_requests, params).execute
- @merge_requests = @merge_requests.recent.page(params[:page]).per(20)
- end
-
- # Get only assigned issues
- def issues
- projects
- @issues = Issue.of_user_team(user_team)
- @issues = FilterContext.new(@issues, params).execute
- @issues = @issues.recent.page(params[:page]).per(20)
- @issues = @issues.includes(:author, :project)
- end
-
- protected
-
- def projects
- @projects ||= user_team.projects.sorted_by_activity
- end
-
- def user_team
- @team ||= current_user.authorized_teams.find_by_path(params[:id])
- end
-end
diff --git a/app/controllers/tree_controller.rb b/app/controllers/tree_controller.rb
index a03ea3ff..2151bd7c 100644
--- a/app/controllers/tree_controller.rb
+++ b/app/controllers/tree_controller.rb
@@ -7,6 +7,9 @@ class TreeController < ProjectResourceController
before_filter :authorize_code_access!
before_filter :require_non_empty_project
+ before_filter :assign_ref_vars
+ before_filter :edit_requirements, only: [:edit, :update]
+
def show
@hex_path = Digest::SHA1.hexdigest(@path)
@logs_path = logs_file_project_ref_path(@project, @ref, @path)
@@ -17,4 +20,40 @@ class TreeController < ProjectResourceController
format.js { no_cache_headers }
end
end
+
+ def edit
+ @last_commit = @project.repository.last_commit_for(@ref, @path).sha
+ end
+
+ def update
+ edit_file_action = Gitlab::Satellite::EditFileAction.new(current_user, @project, @ref, @path)
+ updated_successfully = edit_file_action.commit!(
+ params[:content],
+ params[:commit_message],
+ params[:last_commit]
+ )
+
+ if updated_successfully
+ redirect_to project_tree_path(@project, @id), notice: "Your changes have been successfully commited"
+ else
+ flash[:notice] = "Your changes could not be commited, because the file has been changed"
+ render :edit
+ end
+ end
+
+ private
+
+ def edit_requirements
+ unless @tree.is_blob? && @tree.text?
+ redirect_to project_tree_path(@project, @id), notice: "You can only edit text files"
+ end
+
+ allowed = if project.protected_branch? @ref
+ can?(current_user, :push_code_to_protected_branches, project)
+ else
+ can?(current_user, :push_code, project)
+ end
+
+ return access_denied! unless allowed
+ end
end
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
deleted file mode 100644
index e027057f..00000000
--- a/app/controllers/users_controller.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-class UsersController < ApplicationController
- def show
- @user = User.find_by_username!(params[:username])
- @projects = @user.authorized_projects.where('projects.id in (?)', current_user.authorized_projects.map(&:id))
- @events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20)
- end
-end
diff --git a/app/controllers/walls_controller.rb b/app/controllers/walls_controller.rb
deleted file mode 100644
index 5993a5e2..00000000
--- a/app/controllers/walls_controller.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-class WallsController < ProjectResourceController
- before_filter :module_enabled
-
- respond_to :js, :html
-
- def show
- @note = @project.notes.new
-
- respond_to do |format|
- format.html
- end
- end
-
- protected
-
- def module_enabled
- return render_404 unless @project.wall_enabled
- end
-end
-
diff --git a/app/controllers/wikis_controller.rb b/app/controllers/wikis_controller.rb
index 940b1e97..69280291 100644
--- a/app/controllers/wikis_controller.rb
+++ b/app/controllers/wikis_controller.rb
@@ -2,94 +2,58 @@ class WikisController < ProjectResourceController
before_filter :authorize_read_wiki!
before_filter :authorize_write_wiki!, only: [:edit, :create, :history]
before_filter :authorize_admin_wiki!, only: :destroy
- before_filter :load_gollum_wiki
def pages
- @wiki_pages = @gollum_wiki.pages
+ @wiki_pages = @project.wikis.group(:slug).ordered
end
def show
- @wiki = @gollum_wiki.find_page(params[:id], params[:version_id])
+ @most_recent_wiki = @project.wikis.where(slug: params[:id]).ordered.first
+ if params[:version_id]
+ @wiki = @project.wikis.find(params[:version_id])
+ else
+ @wiki = @most_recent_wiki
+ end
if @wiki
render 'show'
else
- return render('empty') unless can?(current_user, :write_wiki, @project)
- @wiki = WikiPage.new(@gollum_wiki)
- @wiki.title = params[:id]
-
- render 'edit'
+ if can?(current_user, :write_wiki, @project)
+ @wiki = @project.wikis.new(slug: params[:id])
+ render 'edit'
+ else
+ render 'empty'
+ end
end
end
def edit
- @wiki = @gollum_wiki.find_page(params[:id])
- end
-
- def update
- @wiki = @gollum_wiki.find_page(params[:id])
-
- return render('empty') unless can?(current_user, :write_wiki, @project)
-
- if @wiki.update(content, format, message)
- redirect_to [@project, @wiki], notice: 'Wiki was successfully updated.'
- else
- render 'edit'
- end
+ @wiki = @project.wikis.where(slug: params[:id]).ordered.first
+ @wiki = Wiki.regenerate_from @wiki
end
def create
- @wiki = WikiPage.new(@gollum_wiki)
+ @wiki = @project.wikis.new(params[:wiki])
+ @wiki.user = current_user
- if @wiki.create(wiki_params)
- redirect_to project_wiki_path(@project, @wiki), notice: 'Wiki was successfully updated.'
- else
- render action: "edit"
+ respond_to do |format|
+ if @wiki.save
+ format.html { redirect_to [@project, @wiki], notice: 'Wiki was successfully updated.' }
+ else
+ format.html { render action: "edit" }
+ end
end
end
def history
- unless @wiki = @gollum_wiki.find_page(params[:id])
- redirect_to project_wiki_path(@project, :home), notice: "Page not found"
- end
+ @wiki_pages = @project.wikis.where(slug: params[:id]).ordered
end
def destroy
- @wiki = @gollum_wiki.find_page(params[:id])
- @wiki.delete if @wiki
- redirect_to project_wiki_path(@project, :home), notice: "Page was successfully deleted"
+ @wikis = @project.wikis.where(slug: params[:id]).delete_all
+
+ respond_to do |format|
+ format.html { redirect_to project_wiki_path(@project, :index), notice: "Page was successfully deleted" }
+ end
end
-
- def git_access
- end
-
- private
-
- def load_gollum_wiki
- @gollum_wiki = GollumWiki.new(@project, current_user)
-
- # Call #wiki to make sure the Wiki Repo is initialized
- @gollum_wiki.wiki
- rescue GollumWiki::CouldNotCreateWikiError => ex
- flash[:notice] = "Could not create Wiki Repository at this time. Please try again later."
- redirect_to @project
- return false
- end
-
- def wiki_params
- params[:wiki].slice(:title, :content, :format, :message)
- end
-
- def content
- params[:wiki][:content]
- end
-
- def format
- params[:wiki][:format]
- end
-
- def message
- params[:wiki][:message]
- end
-
end
diff --git a/app/decorators/application_decorator.rb b/app/decorators/application_decorator.rb
index b805b347..3023699e 100644
--- a/app/decorators/application_decorator.rb
+++ b/app/decorators/application_decorator.rb
@@ -1,28 +1,27 @@
-class ApplicationDecorator < Draper::Decorator
- delegate_all
+class ApplicationDecorator < Draper::Base
# Lazy Helpers
# PRO: Call Rails helpers without the h. proxy
# ex: number_to_currency(model.price)
# CON: Add a bazillion methods into your decorator's namespace
# and probably sacrifice performance/memory
- #
+ #
# Enable them by uncommenting this line:
# lazy_helpers
# Shared Decorations
# Consider defining shared methods common to all your models.
- #
+ #
# Example: standardize the formatting of timestamps
#
# def formatted_timestamp(time)
- # h.content_tag :span, time.strftime("%a %m/%d/%y"),
- # class: 'timestamp'
+ # h.content_tag :span, time.strftime("%a %m/%d/%y"),
+ # class: 'timestamp'
# end
- #
+ #
# def created_at
# formatted_timestamp(model.created_at)
# end
- #
+ #
# def updated_at
# formatted_timestamp(model.updated_at)
# end
diff --git a/app/decorators/commit_decorator.rb b/app/decorators/commit_decorator.rb
new file mode 100644
index 00000000..a066b2e4
--- /dev/null
+++ b/app/decorators/commit_decorator.rb
@@ -0,0 +1,92 @@
+class CommitDecorator < ApplicationDecorator
+ decorates :commit
+
+ # Returns a string describing the commit for use in a link title
+ #
+ # Example
+ #
+ # "Commit: Alex Denisov - Project git clone panel"
+ def link_title
+ "Commit: #{author_name} - #{title}"
+ end
+
+ # Returns the commits title.
+ #
+ # Usually, the commit title is the first line of the commit message.
+ # In case this first line is longer than 80 characters, it is cut off
+ # after 70 characters and ellipses (`&hellp;`) are appended.
+ def title
+ title = safe_message
+
+ return no_commit_message if title.blank?
+
+ title_end = title.index(/\n/)
+ if (!title_end && title.length > 80) || (title_end && title_end > 80)
+ title[0..69] << "…".html_safe
+ else
+ title.split(/\n/, 2).first
+ end
+ end
+
+ # Returns the commits description
+ #
+ # cut off, ellipses (`&hellp;`) are prepended to the commit message.
+ def description
+ description = safe_message
+
+ title_end = description.index(/\n/)
+ if (!title_end && description.length > 80) || (title_end && title_end > 80)
+ "…".html_safe << description[70..-1]
+ else
+ description.split(/\n/, 2)[1].try(:chomp)
+ end
+ end
+
+ # Returns a link to the commit author. If the author has a matching user and
+ # is a member of the current @project it will link to the team member page.
+ # Otherwise it will link to the author email as specified in the commit.
+ #
+ # options:
+ # avatar: true will prepend the avatar image
+ # size: size of the avatar image in px
+ def author_link(options = {})
+ person_link(options.merge source: :author)
+ end
+
+ # Just like #author_link but for the committer.
+ def committer_link(options = {})
+ person_link(options.merge source: :committer)
+ end
+
+ protected
+
+ def no_commit_message
+ "--no commit message"
+ end
+
+ # Private: Returns a link to a person. If the person has a matching user and
+ # is a member of the current @project it will link to the team member page.
+ # Otherwise it will link to the person email as specified in the commit.
+ #
+ # options:
+ # source: one of :author or :committer
+ # avatar: true will prepend the avatar image
+ # size: size of the avatar image in px
+ def person_link(options = {})
+ source_name = send "#{options[:source]}_name".to_sym
+ source_email = send "#{options[:source]}_email".to_sym
+ text = if options[:avatar]
+ avatar = h.image_tag h.gravatar_icon(source_email, options[:size]), class: "avatar #{"s#{options[:size]}" if options[:size]}", width: options[:size], alt: ""
+ %Q{#{avatar} #{source_name} }
+ else
+ source_name
+ end
+ team_member = @project.try(:team_member_by_name_or_email, source_name, source_email)
+
+ if team_member.nil?
+ h.mail_to source_email, text.html_safe, class: "commit-#{options[:source]}-link"
+ else
+ h.link_to text, h.project_team_member_path(@project, team_member), class: "commit-#{options[:source]}-link"
+ end
+ end
+end
diff --git a/app/decorators/tree_decorator.rb b/app/decorators/tree_decorator.rb
new file mode 100644
index 00000000..0e760f97
--- /dev/null
+++ b/app/decorators/tree_decorator.rb
@@ -0,0 +1,33 @@
+class TreeDecorator < ApplicationDecorator
+ decorates :tree
+
+ def breadcrumbs(max_links = 2)
+ if path
+ part_path = ""
+ parts = path.split("\/")
+
+ yield('..', nil) if parts.count > max_links
+
+ parts.each do |part|
+ part_path = File.join(part_path, part) unless part_path.empty?
+ part_path = part if part_path.empty?
+
+ next unless parts.last(2).include?(part) if parts.count > max_links
+ yield(part, h.tree_join(ref, part_path))
+ end
+ end
+ end
+
+ def up_dir?
+ path.present?
+ end
+
+ def up_dir_path
+ file = File.join(path, "..")
+ h.tree_join(ref, file)
+ end
+
+ def readme
+ @readme ||= contents.find { |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }
+ end
+end
diff --git a/app/helpers/admin/teams/members_helper.rb b/app/helpers/admin/teams/members_helper.rb
deleted file mode 100644
index 58b9f189..00000000
--- a/app/helpers/admin/teams/members_helper.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-module Admin::Teams::MembersHelper
- def member_since(team, member)
- team.user_team_user_relationships.find_by_user_id(member).created_at
- end
-end
diff --git a/app/helpers/admin/teams/projects_helper.rb b/app/helpers/admin/teams/projects_helper.rb
deleted file mode 100644
index b97cc403..00000000
--- a/app/helpers/admin/teams/projects_helper.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-module Admin::Teams::ProjectsHelper
- def assigned_since(team, project)
- team.user_team_project_relationships.find_by_project_id(project).created_at
- end
-end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index cb9cb1a3..6478982c 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -72,9 +72,8 @@ module ApplicationHelper
end
def search_autocomplete_source
- projects = current_user.authorized_projects.map { |p| { label: "project: #{simple_sanitize(p.name_with_namespace)}", url: project_path(p) } }
- groups = current_user.authorized_groups.map { |group| { label: "group: #{simple_sanitize(group.name)}", url: group_path(group) } }
- teams = current_user.authorized_teams.map { |team| { label: "team: #{simple_sanitize(team.name)}", url: team_path(team) } }
+ projects = current_user.authorized_projects.map { |p| { label: p.name_with_namespace, url: project_path(p) } }
+ groups = current_user.authorized_groups.map { |group| { label: " #{group.name}", url: group_path(group) } }
default_nav = [
{ label: "My Profile", url: profile_path },
@@ -84,33 +83,33 @@ module ApplicationHelper
]
help_nav = [
- { label: "help: API Help", url: help_api_path },
- { label: "help: Markdown Help", url: help_markdown_path },
- { label: "help: Permissions Help", url: help_permissions_path },
- { label: "help: Public Access Help", url: help_public_access_path },
- { label: "help: Rake Tasks Help", url: help_raketasks_path },
- { label: "help: SSH Keys Help", url: help_ssh_path },
- { label: "help: System Hooks Help", url: help_system_hooks_path },
- { label: "help: Web Hooks Help", url: help_web_hooks_path },
- { label: "help: Workflow Help", url: help_workflow_path },
+ { label: "API Help", url: help_api_path },
+ { label: "Markdown Help", url: help_markdown_path },
+ { label: "Permissions Help", url: help_permissions_path },
+ { label: "Public Access Help", url: help_public_access_path },
+ { label: "Rake Tasks Help", url: help_raketasks_path },
+ { label: "SSH Keys Help", url: help_ssh_path },
+ { label: "System Hooks Help", url: help_system_hooks_path },
+ { label: "Web Hooks Help", url: help_web_hooks_path },
+ { label: "Workflow Help", url: help_workflow_path },
]
project_nav = []
- if @project && @project.repository.exists? && @project.repository.root_ref
+ if @project && @project.repository && @project.repository.root_ref
project_nav = [
- { label: "#{simple_sanitize(@project.name_with_namespace)} - Issues", url: project_issues_path(@project) },
- { label: "#{simple_sanitize(@project.name_with_namespace)} - Commits", url: project_commits_path(@project, @ref || @project.repository.root_ref) },
- { label: "#{simple_sanitize(@project.name_with_namespace)} - Merge Requests", url: project_merge_requests_path(@project) },
- { label: "#{simple_sanitize(@project.name_with_namespace)} - Milestones", url: project_milestones_path(@project) },
- { label: "#{simple_sanitize(@project.name_with_namespace)} - Snippets", url: project_snippets_path(@project) },
- { label: "#{simple_sanitize(@project.name_with_namespace)} - Team", url: project_team_index_path(@project) },
- { label: "#{simple_sanitize(@project.name_with_namespace)} - Tree", url: project_tree_path(@project, @ref || @project.repository.root_ref) },
- { label: "#{simple_sanitize(@project.name_with_namespace)} - Wall", url: project_wall_path(@project) },
- { label: "#{simple_sanitize(@project.name_with_namespace)} - Wiki", url: project_wikis_path(@project) },
+ { label: "#{@project.name} Issues", url: project_issues_path(@project) },
+ { label: "#{@project.name} Commits", url: project_commits_path(@project, @ref || @project.repository.root_ref) },
+ { label: "#{@project.name} Merge Requests", url: project_merge_requests_path(@project) },
+ { label: "#{@project.name} Milestones", url: project_milestones_path(@project) },
+ { label: "#{@project.name} Snippets", url: project_snippets_path(@project) },
+ { label: "#{@project.name} Team", url: project_team_index_path(@project) },
+ { label: "#{@project.name} Tree", url: project_tree_path(@project, @ref || @project.repository.root_ref) },
+ { label: "#{@project.name} Wall", url: wall_project_path(@project) },
+ { label: "#{@project.name} Wiki", url: project_wikis_path(@project) },
]
end
- [groups, teams, projects, default_nav, project_nav, help_nav].flatten.to_json
+ [groups, projects, default_nav, project_nav, help_nav].flatten.to_json
end
def emoji_autocomplete_source
@@ -128,13 +127,7 @@ module ApplicationHelper
end
def user_color_scheme_class
- case current_user.color_scheme_id
- when 1 then 'white'
- when 2 then 'black'
- when 3 then 'solarized-dark'
- else
- 'white'
- end
+ current_user.dark_scheme ? :black : :white
end
def show_last_push_widget?(event)
@@ -165,20 +158,8 @@ module ApplicationHelper
alt: "Sign in with #{provider.to_s.titleize}")
end
- def simple_sanitize str
- sanitize(str, tags: %w(a span))
- end
-
def image_url(source)
- # prevent relative_root_path being added twice (it's part of root_url and path_to_image)
- root_url.sub(/#{root_path}$/, path_to_image(source))
+ root_url + path_to_image(source)
end
-
alias_method :url_to_image, :image_url
-
- def users_select_tag(id, opts = {})
- css_class = "ajax-users-select"
- css_class << " multiselect" if opts[:multiple]
- hidden_field_tag(id, '', class: css_class)
- end
end
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 95ca294c..4b5d8bd9 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -1,20 +1,4 @@
module CommitsHelper
- # Returns a link to the commit author. If the author has a matching user and
- # is a member of the current @project it will link to the team member page.
- # Otherwise it will link to the author email as specified in the commit.
- #
- # options:
- # avatar: true will prepend the avatar image
- # size: size of the avatar image in px
- def commit_author_link(commit, options = {})
- commit_person_link(commit, options.merge(source: :author))
- end
-
- # Just like #author_link but for the committer.
- def commit_committer_link(commit, options = {})
- commit_person_link(commit, options.merge(source: :committer))
- end
-
def identification_type(line)
if line[0] == "+"
"new"
@@ -73,43 +57,20 @@ module CommitsHelper
end
end
- def each_diff_line_near(diff, index, expected_line_code)
- max_number_of_lines = 16
-
- prev_match_line = nil
- prev_lines = []
-
- each_diff_line(diff, index) do |full_line, type, line_code, line_new, line_old|
- line = [full_line, type, line_code, line_new, line_old]
- if line_code != expected_line_code
- if type == "match"
- prev_lines.clear
- prev_match_line = line
- else
- prev_lines.push(line)
- prev_lines.shift if prev_lines.length >= max_number_of_lines
- end
- else
- yield(prev_match_line) if !prev_match_line.nil?
- prev_lines.each { |ln| yield(ln) }
- yield(line)
- break
- end
- end
- end
-
def image_diff_class(diff)
if diff.deleted_file
- "deleted"
+ "diff_removed"
elsif diff.new_file
- "added"
+ "diff_added"
else
nil
end
end
def commit_to_html commit
- escape_javascript(render 'commits/commit', commit: commit)
+ if commit.model
+ escape_javascript(render 'commits/commit', commit: commit)
+ end
end
def diff_line_content(line)
@@ -119,58 +80,4 @@ module CommitsHelper
line
end
end
-
- # Breadcrumb links for a Project and, if applicable, a tree path
- def commits_breadcrumbs
- return unless @project && @ref
-
- # Add the root project link and the arrow icon
- crumbs = content_tag(:li) do
- content_tag(:span, nil, class: 'arrow') +
- link_to(@project.name, project_commits_path(@project, @ref))
- end
-
- if @path
- parts = @path.split('/')
-
- parts.each_with_index do |part, i|
- crumbs += content_tag(:span, '/', class: 'divider')
- crumbs += content_tag(:li) do
- # The text is just the individual part, but the link needs all the parts before it
- link_to part, project_commits_path(@project, tree_join(@ref, parts[0..i].join('/')))
- end
- end
- end
-
- crumbs.html_safe
- end
-
- protected
-
- # Private: Returns a link to a person. If the person has a matching user and
- # is a member of the current @project it will link to the team member page.
- # Otherwise it will link to the person email as specified in the commit.
- #
- # options:
- # source: one of :author or :committer
- # avatar: true will prepend the avatar image
- # size: size of the avatar image in px
- def commit_person_link(commit, options = {})
- source_name = commit.send "#{options[:source]}_name".to_sym
- source_email = commit.send "#{options[:source]}_email".to_sym
- text = if options[:avatar]
- avatar = image_tag(gravatar_icon(source_email, options[:size]), class: "avatar #{"s#{options[:size]}" if options[:size]}", width: options[:size], alt: "")
- %Q{#{avatar} #{source_name} }
- else
- source_name
- end
-
- user = User.where('name like ? or email like ?', source_name, source_email).first
-
- if user.nil?
- mail_to(source_email, text.html_safe, class: "commit-#{options[:source]}-link")
- else
- link_to(text.html_safe, user_path(user), class: "commit-#{options[:source]}-link")
- end
- end
end
diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb
index e3be07c9..0baa5b41 100644
--- a/app/helpers/dashboard_helper.rb
+++ b/app/helpers/dashboard_helper.rb
@@ -9,9 +9,9 @@ module DashboardHelper
case entity
when 'issue' then
- issues_dashboard_path(options)
+ dashboard_issues_path(options)
when 'merge_request'
- merge_requests_dashboard_path(options)
+ dashboard_merge_requests_path(options)
end
end
@@ -27,6 +27,6 @@ module DashboardHelper
items.opened
end
- items.cared(current_user).count
+ items.where(assignee_id: current_user.id).count
end
end
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb
index 38374e33..f4d9b17b 100644
--- a/app/helpers/events_helper.rb
+++ b/app/helpers/events_helper.rb
@@ -1,9 +1,10 @@
module EventsHelper
def link_to_author(event)
- author = event.author
+ project = event.project
+ tm = project.team_member_by_id(event.author_id) if project
- if author
- link_to author.name, user_path(author.username)
+ if tm
+ link_to event.author_name, project_team_member_path(project, tm)
else
event.author_name
end
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb
index 375f8861..111982e9 100644
--- a/app/helpers/gitlab_markdown_helper.rb
+++ b/app/helpers/gitlab_markdown_helper.rb
@@ -13,13 +13,7 @@ module GitlabMarkdownHelper
def link_to_gfm(body, url, html_options = {})
return "" if body.blank?
- escaped_body = if body =~ /^\ .*?}m) do |match|
"#{match}#{link_to("", url, html_options)[0..-5]}" # "".length +1
@@ -49,12 +43,4 @@ module GitlabMarkdownHelper
@markdown.render(text).html_safe
end
-
- def render_wiki_content(wiki_page)
- if wiki_page.format == :markdown
- markdown(wiki_page.content)
- else
- wiki_page.formatted_content.html_safe
- end
- end
end
diff --git a/app/helpers/graph_helper.rb b/app/helpers/graph_helper.rb
deleted file mode 100644
index ca7d823a..00000000
--- a/app/helpers/graph_helper.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-module GraphHelper
- def get_refs(commit)
- refs = ""
- refs += commit.refs.collect{|r|r.name}.join(" ") if commit.refs
-
- # append note count
- notes = @project.notes.for_commit_id(commit.id)
- refs += "[#{notes.count}]" if notes.any?
-
- refs
- end
-
- def parents_zip_spaces(parents, parent_spaces)
- ids = parents.map { |p| p.id }
- ids.zip(parent_spaces)
- end
-end
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 70ebbdd3..2825787f 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -6,7 +6,7 @@ module IssuesHelper
def issue_css_classes issue
classes = "issue"
- classes << " closed" if issue.closed?
+ classes << " closed" if issue.closed
classes << " today" if issue.today?
classes
end
@@ -27,7 +27,6 @@ module IssuesHelper
all: "all",
closed: "closed",
to_me: "assigned-to-me",
- by_me: "created-by-me",
open: "open"
}
end
@@ -41,51 +40,4 @@ module IssuesHelper
def issues_active_milestones
@project.milestones.active.order("id desc").all
end
-
- def url_for_project_issues
- return "" if @project.nil?
-
- if @project.used_default_issues_tracker?
- project_issues_filter_path(@project)
- else
- url = Gitlab.config.issues_tracker[@project.issues_tracker]["project_url"]
- url.gsub(':project_id', @project.id.to_s)
- .gsub(':issues_tracker_id', @project.issues_tracker_id.to_s)
- end
- end
-
- def url_for_new_issue
- return "" if @project.nil?
-
- if @project.used_default_issues_tracker?
- url = new_project_issue_path project_id: @project
- else
- url = Gitlab.config.issues_tracker[@project.issues_tracker]["new_issue_url"]
- url.gsub(':project_id', @project.id.to_s)
- .gsub(':issues_tracker_id', @project.issues_tracker_id.to_s)
- end
- end
-
- def url_for_issue(issue_id)
- return "" if @project.nil?
-
- if @project.used_default_issues_tracker?
- url = project_issue_url project_id: @project, id: issue_id
- else
- url = Gitlab.config.issues_tracker[@project.issues_tracker]["issues_url"]
- url.gsub(':id', issue_id.to_s)
- .gsub(':project_id', @project.id.to_s)
- .gsub(':issues_tracker_id', @project.issues_tracker_id.to_s)
- end
- end
-
- def title_for_issue(issue_id)
- return "" if @project.nil?
-
- if @project.used_default_issues_tracker? && issue = @project.issues.where(id: issue_id).first
- issue.title
- else
- ""
- end
- end
end
diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb
index 155d03d1..ca0a89c3 100644
--- a/app/helpers/merge_requests_helper.rb
+++ b/app/helpers/merge_requests_helper.rb
@@ -12,7 +12,7 @@ module MergeRequestsHelper
def mr_css_classes mr
classes = "merge_request"
- classes << " closed" if mr.closed?
+ classes << " closed" if mr.closed
classes << " merged" if mr.merged?
classes
end
diff --git a/app/helpers/namespaces_helper.rb b/app/helpers/namespaces_helper.rb
index a9a6c786..6d0c6c98 100644
--- a/app/helpers/namespaces_helper.rb
+++ b/app/helpers/namespaces_helper.rb
@@ -10,8 +10,8 @@ module NamespacesHelper
global_opts = ["Global", [['/', Namespace.global_id]] ]
- group_opts = ["Groups", groups.sort_by(&:human_name).map {|g| [g.human_name, g.id]} ]
- users_opts = [ "Users", users.sort_by(&:human_name).map {|u| [u.human_name, u.id]} ]
+ group_opts = ["Groups", groups.map {|g| [g.human_name, g.id]} ]
+ users_opts = [ "Users", users.map {|u| [u.human_name, u.id]} ]
options = []
options << global_opts if current_user.admin
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb
index fbd0f01e..7a0ed251 100644
--- a/app/helpers/notes_helper.rb
+++ b/app/helpers/notes_helper.rb
@@ -1,7 +1,8 @@
module NotesHelper
# Helps to distinguish e.g. commit notes in mr notes list
def note_for_main_target?(note)
- (@target_type.camelize == note.noteable_type && !note.for_diff_line?)
+ note.for_wall? ||
+ (@target_type.camelize == note.noteable_type && !note.for_diff_line?)
end
def note_target_fields
diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb
deleted file mode 100644
index 7342393a..00000000
--- a/app/helpers/notifications_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module NotificationsHelper
-end
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index e6427ea8..158925ba 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -1,6 +1,10 @@
module ProjectsHelper
- def remove_from_project_team_message(project, user)
- "You are going to remove #{user.name} from #{project.name} project team. Are you sure?"
+ def grouper_project_members(project)
+ @project.users_projects.sort_by(&:project_access).reverse.group_by(&:project_access)
+ end
+
+ def remove_from_team_message(project, member)
+ "You are going to remove #{member.user_name} from #{project.name}. Are you sure?"
end
def link_to_project project
@@ -32,14 +36,22 @@ module ProjectsHelper
author_html = author_html.html_safe
- link_to(author_html, user_path(author), class: "author_link").html_safe
+ tm = project.team_member_by_id(author)
+
+ if tm
+ link_to author_html, project_team_member_path(project, tm), class: "author_link"
+ else
+ author_html
+ end.html_safe
+ end
+
+ def tm_path team_member
+ project_team_member_path(@project, team_member)
end
def project_title project
if project.group
- content_tag :span do
- link_to(simple_sanitize(project.group.name), group_path(project.group)) + " / " + project.name
- end
+ project.name_with_namespace
else
project.name
end
diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb
index d2be4b1a..d52d8af6 100644
--- a/app/helpers/tab_helper.rb
+++ b/app/helpers/tab_helper.rb
@@ -39,12 +39,7 @@ module TabHelper
# Returns a list item element String
def nav_link(options = {}, &block)
if path = options.delete(:path)
- if path.respond_to?(:each)
- c = path.map { |p| p.split('#').first }
- a = path.map { |p| p.split('#').last }
- else
- c, a, _ = path.split('#')
- end
+ c, a, _ = path.split('#')
else
c = options.delete(:controller)
a = options.delete(:action)
@@ -73,9 +68,11 @@ module TabHelper
end
def project_tab_class
- return "active" if current_page?(controller: "projects", action: :edit, id: @project)
+ [:show, :files, :edit, :update].each do |action|
+ return "active" if current_page?(controller: "projects", action: action, id: @project)
+ end
- if ['services', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name
+ if ['snippets', 'services', 'hooks', 'deploy_keys', 'team_members'].include? controller.controller_name
"active"
end
end
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index 1cba9476..0f2b695e 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -13,15 +13,13 @@ module TreeHelper
tree += render partial: 'tree/tree_item', collection: folders, locals: {type: 'folder'} if folders.present?
files.each do |f|
- html = if f.respond_to?(:url)
- # Object is a Submodule
- render partial: 'tree/submodule_item', object: f
- else
- # Object is a Blob
- render partial: 'tree/tree_item', object: f, locals: {type: 'file'}
- end
-
- tree += html if html.present?
+ if f.respond_to?(:url)
+ # Object is a Submodule
+ tree += render partial: 'tree/submodule_item', object: f
+ else
+ # Object is a Blob
+ tree += render partial: 'tree/tree_item', object: f, locals: {type: 'file'}
+ end
end
tree.html_safe
@@ -70,26 +68,28 @@ module TreeHelper
end
end
- def tree_breadcrumbs(tree, max_links = 2)
- if tree.path
- part_path = ""
- parts = tree.path.split("\/")
+ # Breadcrumb links for a Project and, if applicable, a tree path
+ def breadcrumbs
+ return unless @project && @ref
- yield('..', nil) if parts.count > max_links
+ # Add the root project link and the arrow icon
+ crumbs = content_tag(:li) do
+ content_tag(:span, nil, class: 'arrow') +
+ link_to(@project.name, project_commits_path(@project, @ref))
+ end
- parts.each do |part|
- part_path = File.join(part_path, part) unless part_path.empty?
- part_path = part if part_path.empty?
+ if @path
+ parts = @path.split('/')
- next unless parts.last(2).include?(part) if parts.count > max_links
- yield(part, tree_join(tree.ref, part_path))
+ parts.each_with_index do |part, i|
+ crumbs += content_tag(:span, '/', class: 'divider')
+ crumbs += content_tag(:li) do
+ # The text is just the individual part, but the link needs all the parts before it
+ link_to part, project_commits_path(@project, tree_join(@ref, parts[0..i].join('/')))
+ end
end
end
- end
- def up_dir_path tree
- file = File.join(tree.path, "..")
- tree_join(tree.ref, file)
+ crumbs.html_safe
end
-
end
diff --git a/app/helpers/user_teams_helper.rb b/app/helpers/user_teams_helper.rb
deleted file mode 100644
index 2055bb3c..00000000
--- a/app/helpers/user_teams_helper.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-module UserTeamsHelper
- def team_filter_path(entity, options={})
- exist_opts = {
- status: params[:status],
- project_id: params[:project_id],
- }
-
- options = exist_opts.merge(options)
-
- case entity
- when 'issue' then
- issues_team_path(@team, options)
- when 'merge_request'
- merge_requests_team_path(@team, options)
- end
- end
-
- def grouped_user_team_members(team)
- team.user_team_user_relationships.sort_by(&:permission).reverse.group_by(&:permission)
- end
-
- def remove_from_user_team_message(team, member)
- "You are going to remove #{member.name} from #{team.name}. Are you sure?"
- end
-
-end
diff --git a/app/mailers/emails/issues.rb b/app/mailers/emails/issues.rb
deleted file mode 100644
index 79731b60..00000000
--- a/app/mailers/emails/issues.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-module Emails
- module Issues
- def new_issue_email(recipient_id, issue_id)
- @issue = Issue.find(issue_id)
- @project = @issue.project
- mail(to: recipient(recipient_id), subject: subject("new issue ##{@issue.id}", @issue.title))
- end
-
- def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id)
- @issue = Issue.find(issue_id)
- @previous_assignee ||= User.find(previous_assignee_id)
- @project = @issue.project
- mail(to: recipient(recipient_id), subject: subject("changed issue ##{@issue.id}", @issue.title))
- end
-
- def closed_issue_email(recipient_id, issue_id, updated_by_user_id)
- @issue = Issue.find issue_id
- @project = @issue.project
- @updated_by = User.find updated_by_user_id
- mail(to: recipient(recipient_id),
- subject: subject("Closed issue ##{@issue.id}", @issue.title))
- end
-
- def issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id)
- @issue = Issue.find issue_id
- @issue_status = status
- @project = @issue.project
- @updated_by = User.find updated_by_user_id
- mail(to: recipient(recipient_id),
- subject: subject("changed issue ##{@issue.id}", @issue.title))
- end
- end
-end
diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb
deleted file mode 100644
index 806f1b01..00000000
--- a/app/mailers/emails/merge_requests.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-module Emails
- module MergeRequests
- def new_merge_request_email(recipient_id, merge_request_id)
- @merge_request = MergeRequest.find(merge_request_id)
- @project = @merge_request.project
- mail(to: recipient(recipient_id), subject: subject("new merge request !#{@merge_request.id}", @merge_request.title))
- end
-
- def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id)
- @merge_request = MergeRequest.find(merge_request_id)
- @previous_assignee ||= User.find(previous_assignee_id)
- @project = @merge_request.project
- mail(to: recipient(recipient_id), subject: subject("changed merge request !#{@merge_request.id}", @merge_request.title))
- end
-
- def closed_merge_request_email(recipient_id, merge_request_id, updated_by_user_id)
- @merge_request = MergeRequest.find(merge_request_id)
- @project = @merge_request.project
- @updated_by = User.find updated_by_user_id
- mail(to: recipient(recipient_id), subject: subject("Closed merge request !#{@merge_request.id}", @merge_request.title))
- end
-
- def merged_merge_request_email(recipient_id, merge_request_id)
- @merge_request = MergeRequest.find(merge_request_id)
- @project = @merge_request.project
- mail(to: recipient(recipient_id), subject: subject("Accepted merge request !#{@merge_request.id}", @merge_request.title))
- end
- end
-end
diff --git a/app/mailers/emails/notes.rb b/app/mailers/emails/notes.rb
deleted file mode 100644
index 769b6e0b..00000000
--- a/app/mailers/emails/notes.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-module Emails
- module Notes
- def note_commit_email(recipient_id, note_id)
- @note = Note.find(note_id)
- @commit = @note.noteable
- @project = @note.project
- mail(to: recipient(recipient_id), subject: subject("note for commit #{@commit.short_id}", @commit.title))
- end
-
- def note_issue_email(recipient_id, note_id)
- @note = Note.find(note_id)
- @issue = @note.noteable
- @project = @note.project
- mail(to: recipient(recipient_id), subject: subject("note for issue ##{@issue.id}"))
- end
-
- def note_merge_request_email(recipient_id, note_id)
- @note = Note.find(note_id)
- @merge_request = @note.noteable
- @project = @note.project
- mail(to: recipient(recipient_id), subject: subject("note for merge request !#{@merge_request.id}"))
- end
-
- def note_wall_email(recipient_id, note_id)
- @note = Note.find(note_id)
- @project = @note.project
- mail(to: recipient(recipient_id), subject: subject("note on wall"))
- end
- end
-end
diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb
deleted file mode 100644
index dcd894bb..00000000
--- a/app/mailers/emails/projects.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-module Emails
- module Projects
- def project_access_granted_email(user_project_id)
- @users_project = UsersProject.find user_project_id
- @project = @users_project.project
- mail(to: @users_project.user.email,
- subject: subject("access to project was granted"))
- end
-
-
- def project_was_moved_email(user_project_id)
- @users_project = UsersProject.find user_project_id
- @project = @users_project.project
- mail(to: @users_project.user.email,
- subject: subject("project was moved"))
- end
- end
-end
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index a5aa97ab..c672940a 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -1,8 +1,4 @@
class Notify < ActionMailer::Base
- include Emails::Issues
- include Emails::MergeRequests
- include Emails::Notes
- include Emails::Projects
add_template_helper ApplicationHelper
add_template_helper GitlabMarkdownHelper
@@ -14,22 +10,117 @@ class Notify < ActionMailer::Base
default from: Gitlab.config.gitlab.email_from
- # Just send email with 3 seconds delay
- def self.delay
- delay_for(2.seconds)
+
+
+ #
+ # Issue
+ #
+
+ def new_issue_email(issue_id)
+ @issue = Issue.find(issue_id)
+ @project = @issue.project
+ mail(to: @issue.assignee_email, subject: subject("new issue ##{@issue.id}", @issue.title))
end
+ def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id)
+ @issue = Issue.find(issue_id)
+ @previous_assignee ||= User.find(previous_assignee_id)
+ @project = @issue.project
+ mail(to: recipient(recipient_id), subject: subject("changed issue ##{@issue.id}", @issue.title))
+ end
+
+ def issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id)
+ @issue = Issue.find issue_id
+ @issue_status = status
+ @project = @issue.project
+ @updated_by = User.find updated_by_user_id
+ mail(to: recipient(recipient_id),
+ subject: subject("changed issue ##{@issue.id}", @issue.title))
+ end
+
+
+
+ #
+ # Merge Request
+ #
+
+ def new_merge_request_email(merge_request_id)
+ @merge_request = MergeRequest.find(merge_request_id)
+ @project = @merge_request.project
+ mail(to: @merge_request.assignee_email, subject: subject("new merge request !#{@merge_request.id}", @merge_request.title))
+ end
+
+ def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id)
+ @merge_request = MergeRequest.find(merge_request_id)
+ @previous_assignee ||= User.find(previous_assignee_id)
+ @project = @merge_request.project
+ mail(to: recipient(recipient_id), subject: subject("changed merge request !#{@merge_request.id}", @merge_request.title))
+ end
+
+
+
+ #
+ # Note
+ #
+
+ def note_commit_email(recipient_id, note_id)
+ @note = Note.find(note_id)
+ @commit = @note.noteable
+ @commit = CommitDecorator.decorate(@commit)
+ @project = @note.project
+ mail(to: recipient(recipient_id), subject: subject("note for commit #{@commit.short_id}", @commit.title))
+ end
+
+ def note_issue_email(recipient_id, note_id)
+ @note = Note.find(note_id)
+ @issue = @note.noteable
+ @project = @note.project
+ mail(to: recipient(recipient_id), subject: subject("note for issue ##{@issue.id}"))
+ end
+
+ def note_merge_request_email(recipient_id, note_id)
+ @note = Note.find(note_id)
+ @merge_request = @note.noteable
+ @project = @note.project
+ mail(to: recipient(recipient_id), subject: subject("note for merge request !#{@merge_request.id}"))
+ end
+
+ def note_wall_email(recipient_id, note_id)
+ @note = Note.find(note_id)
+ @project = @note.project
+ mail(to: recipient(recipient_id), subject: subject("note on wall"))
+ end
+
+
+ #
+ # Project
+ #
+
+ def project_access_granted_email(user_project_id)
+ @users_project = UsersProject.find user_project_id
+ @project = @users_project.project
+ mail(to: @users_project.user.email,
+ subject: subject("access to project was granted"))
+ end
+
+
+ def project_was_moved_email(user_project_id)
+ @users_project = UsersProject.find user_project_id
+ @project = @users_project.project
+ mail(to: @users_project.user.email,
+ subject: subject("project was moved"))
+ end
+
+ #
+ # User
+ #
+
def new_user_email(user_id, password)
@user = User.find(user_id)
@password = password
mail(to: @user.email, subject: subject("Account was created for you"))
end
- def new_ssh_key_email(key_id)
- @key = Key.find(key_id)
- @user = @key.user
- mail(to: @user.email, subject: subject("SSH key was added to your account"))
- end
private
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 5b49104d..9d33501f 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -1,25 +1,15 @@
class Ability
class << self
- def allowed(user, subject)
- return [] unless user.kind_of?(User)
-
+ def allowed(object, subject)
case subject.class.name
- when "Project" then project_abilities(user, subject)
- when "Issue" then issue_abilities(user, subject)
- when "Note" then note_abilities(user, subject)
- when "Snippet" then snippet_abilities(user, subject)
- when "MergeRequest" then merge_request_abilities(user, subject)
- when "Group", "Namespace" then group_abilities(user, subject)
- when "UserTeam" then user_team_abilities(user, subject)
+ when "Project" then project_abilities(object, subject)
+ when "Issue" then issue_abilities(object, subject)
+ when "Note" then note_abilities(object, subject)
+ when "Snippet" then snippet_abilities(object, subject)
+ when "MergeRequest" then merge_request_abilities(object, subject)
+ when "Group", "Namespace" then group_abilities(object, subject)
else []
- end.concat(global_abilities(user))
- end
-
- def global_abilities(user)
- rules = []
- rules << :create_group if user.can_create_group
- rules << :create_team if user.can_create_team
- rules
+ end
end
def project_abilities(user, project)
@@ -41,7 +31,7 @@ class Ability
rules << project_guest_rules
end
- if project.owner == user || user.admin?
+ if project.owner == user
rules << project_admin_rules
end
@@ -91,6 +81,7 @@ class Ability
:admin_team_member,
:admin_merge_request,
:admin_note,
+ :accept_mr,
:admin_wiki,
:admin_project
]
@@ -119,22 +110,6 @@ class Ability
rules.flatten
end
- def user_team_abilities user, team
- rules = []
-
- # Only group owner and administrators can manage team
- if team.owner == user || team.admin?(user) || user.admin?
- rules << [ :manage_user_team ]
- end
-
- if team.owner == user || user.admin?
- rules << [ :admin_user_team ]
- end
-
- rules.flatten
- end
-
-
[:issue, :note, :snippet, :merge_request].each do |name|
define_method "#{name}_abilities" do |user, subject|
if subject.author == user
diff --git a/app/models/commit.rb b/app/models/commit.rb
index e3363350..17d41f27 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -8,70 +8,161 @@ class Commit
#
DIFF_SAFE_SIZE = 100
- def self.decorate(commits)
- commits.map { |c| self.new(c) }
+ attr_accessor :commit, :head, :refs
+
+ delegate :message, :authored_date, :committed_date, :parents, :sha,
+ :date, :committer, :author, :diffs, :tree, :id, :stats,
+ :to_patch, to: :commit
+
+ class << self
+ def find_or_first(repo, commit_id = nil, root_ref)
+ commit = if commit_id
+ repo.commit(commit_id)
+ else
+ repo.commits(root_ref).first
+ end
+
+ Commit.new(commit) if commit
+ end
+
+ def fresh_commits(repo, n = 10)
+ commits = repo.heads.map do |h|
+ repo.commits(h.name, n).map { |c| Commit.new(c, h) }
+ end.flatten.uniq { |c| c.id }
+
+ commits.sort! do |x, y|
+ y.committed_date <=> x.committed_date
+ end
+
+ commits[0...n]
+ end
+
+ def commits_with_refs(repo, n = 20)
+ commits = repo.branches.map { |ref| Commit.new(ref.commit, ref) }
+
+ commits.sort! do |x, y|
+ y.committed_date <=> x.committed_date
+ end
+
+ commits[0..n]
+ end
+
+ def commits_since(repo, date)
+ commits = repo.heads.map do |h|
+ repo.log(h.name, nil, since: date).each { |c| Commit.new(c, h) }
+ end.flatten.uniq { |c| c.id }
+
+ commits.sort! do |x, y|
+ y.committed_date <=> x.committed_date
+ end
+
+ commits
+ end
+
+ def commits(repo, ref, path = nil, limit = nil, offset = nil)
+ if path
+ repo.log(ref, path, max_count: limit, skip: offset)
+ elsif limit && offset
+ repo.commits(ref, limit, offset)
+ else
+ repo.commits(ref)
+ end.map{ |c| Commit.new(c) }
+ end
+
+ def commits_between(repo, from, to)
+ repo.commits_between(from, to).map { |c| Commit.new(c) }
+ end
+
+ def compare(project, from, to)
+ result = {
+ commits: [],
+ diffs: [],
+ commit: nil,
+ same: false
+ }
+
+ return result unless from && to
+
+ first = project.repository.commit(to.try(:strip))
+ last = project.repository.commit(from.try(:strip))
+
+ if first && last
+ result[:same] = (first.id == last.id)
+ result[:commits] = project.repo.commits_between(last.id, first.id).map {|c| Commit.new(c)}
+ result[:diffs] = project.repo.diff(last.id, first.id) rescue []
+ result[:commit] = Commit.new(first)
+ end
+
+ result
+ end
end
- attr_accessor :raw
-
- def initialize(raw_commit)
+ def initialize(raw_commit, head = nil)
raise "Nil as raw commit passed" unless raw_commit
- @raw = raw_commit
+ @commit = raw_commit
+ @head = head
end
- def id
- @raw.id
+ def short_id(length = 10)
+ id.to_s[0..length]
end
- # Returns a string describing the commit for use in a link title
- #
- # Example
- #
- # "Commit: Alex Denisov - Project git clone panel"
- def link_title
- "Commit: #{author_name} - #{title}"
+ def safe_message
+ @safe_message ||= message
end
- # Returns the commits title.
+ def created_at
+ committed_date
+ end
+
+ def author_email
+ author.email
+ end
+
+ def author_name
+ author.name
+ end
+
+ # Was this commit committed by a different person than the original author?
+ def different_committer?
+ author_name != committer_name || author_email != committer_email
+ end
+
+ def committer_name
+ committer.name
+ end
+
+ def committer_email
+ committer.email
+ end
+
+ def prev_commit
+ @prev_commit ||= if parents.present?
+ Commit.new(parents.first)
+ else
+ nil
+ end
+ end
+
+ def prev_commit_id
+ prev_commit.try :id
+ end
+
+ # Shows the diff between the commit's parent and the commit.
#
- # Usually, the commit title is the first line of the commit message.
- # In case this first line is longer than 80 characters, it is cut off
- # after 70 characters and ellipses (`&hellp;`) are appended.
- def title
- title = safe_message
+ # Cuts out the header and stats from #to_patch and returns only the diff.
+ def to_diff
+ # see Grit::Commit#show
+ patch = to_patch
- return no_commit_message if title.blank?
-
- title_end = title.index(/\n/)
- if (!title_end && title.length > 80) || (title_end && title_end > 80)
- title[0..69] << "…".html_safe
- else
- title.split(/\n/, 2).first
+ # discard lines before the diff
+ lines = patch.split("\n")
+ while !lines.first.start_with?("diff --git") do
+ lines.shift
end
- end
-
- # Returns the commits description
- #
- # cut off, ellipses (`&hellp;`) are prepended to the commit message.
- def description
- description = safe_message
-
- title_end = description.index(/\n/)
- if (!title_end && description.length > 80) || (title_end && title_end > 80)
- "…".html_safe << description[70..-1]
- else
- description.split(/\n/, 2)[1].try(:chomp)
- end
- end
-
- def method_missing(m, *args, &block)
- @raw.send(m, *args, &block)
- end
-
- def respond_to?(method)
- return true if @raw.respond_to?(method)
-
- super
+ lines.pop if lines.last =~ /^[\d.]+$/ # Git version
+ lines.pop if lines.last == "-- " # end of diff
+ lines.join("\n")
end
end
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 85337583..d1717d3b 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -17,13 +17,13 @@ module Issuable
validates :project, presence: true
validates :author, presence: true
validates :title, presence: true, length: { within: 0..255 }
+ validates :closed, inclusion: { in: [true, false] }
- scope :opened, -> { with_state(:opened) }
- scope :closed, -> { with_state(:closed) }
+ scope :opened, where(closed: false)
+ scope :closed, where(closed: true)
scope :of_group, ->(group) { where(project_id: group.project_ids) }
- scope :of_user_team, ->(team) { where(project_id: team.project_ids, assignee_id: team.member_ids) }
scope :assigned, ->(u) { where(assignee_id: u.id)}
- scope :recent, -> { order("created_at DESC") }
+ scope :recent, order("created_at DESC")
delegate :name,
:email,
@@ -61,6 +61,14 @@ module Issuable
assignee_id_changed?
end
+ def is_being_closed?
+ closed_changed? && closed
+ end
+
+ def is_being_reopened?
+ closed_changed? && !closed
+ end
+
#
# Votes
#
diff --git a/app/models/event.rb b/app/models/event.rb
index ae14454c..d0ba6154 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -20,15 +20,15 @@ class Event < ActiveRecord::Base
default_scope where("author_id IS NOT NULL")
- CREATED = 1
- UPDATED = 2
- CLOSED = 3
- REOPENED = 4
- PUSHED = 5
- COMMENTED = 6
- MERGED = 7
- JOINED = 8 # User joined project
- LEFT = 9 # User left project
+ Created = 1
+ Updated = 2
+ Closed = 3
+ Reopened = 4
+ Pushed = 5
+ Commented = 6
+ Merged = 7
+ Joined = 8 # User joined project
+ Left = 9 # User left project
delegate :name, :email, to: :author, prefix: true, allow_nil: true
delegate :title, to: :issue, prefix: true, allow_nil: true
@@ -42,16 +42,16 @@ class Event < ActiveRecord::Base
serialize :data
# Scopes
- scope :recent, -> { order("created_at DESC") }
- scope :code_push, -> { where(action: PUSHED) }
+ scope :recent, order("created_at DESC")
+ scope :code_push, where(action: Pushed)
scope :in_projects, ->(project_ids) { where(project_id: project_ids).recent }
class << self
def determine_action(record)
if [Issue, MergeRequest].include? record.class
- Event::CREATED
+ Event::Created
elsif record.kind_of? Note
- Event::COMMENTED
+ Event::Commented
end
end
end
@@ -79,19 +79,19 @@ class Event < ActiveRecord::Base
end
def push?
- action == self.class::PUSHED && valid_push?
+ action == self.class::Pushed && valid_push?
end
def merged?
- action == self.class::MERGED
+ action == self.class::Merged
end
def closed?
- action == self.class::CLOSED
+ action == self.class::Closed
end
def reopened?
- action == self.class::REOPENED
+ action == self.class::Reopened
end
def milestone?
@@ -111,11 +111,11 @@ class Event < ActiveRecord::Base
end
def joined?
- action == JOINED
+ action == Joined
end
def left?
- action == LEFT
+ action == Left
end
def membership_changed?
@@ -130,6 +130,10 @@ class Event < ActiveRecord::Base
target if target_type == "MergeRequest"
end
+ def author
+ @author ||= User.find(author_id)
+ end
+
def action_name
if closed?
"closed"
diff --git a/app/models/gollum_wiki.rb b/app/models/gollum_wiki.rb
deleted file mode 100644
index 16e801c1..00000000
--- a/app/models/gollum_wiki.rb
+++ /dev/null
@@ -1,121 +0,0 @@
-class GollumWiki
-
- MARKUPS = {
- "Markdown" => :markdown,
- "RDoc" => :rdoc
- }
-
- class CouldNotCreateWikiError < StandardError; end
-
- # Returns a string describing what went wrong after
- # an operation fails.
- attr_reader :error_message
-
- def initialize(project, user = nil)
- @project = project
- @user = user
- end
-
- def path_with_namespace
- @project.path_with_namespace + ".wiki"
- end
-
- def url_to_repo
- gitlab_shell.url_to_repo(path_with_namespace)
- end
-
- def ssh_url_to_repo
- url_to_repo
- end
-
- def http_url_to_repo
- http_url = [Gitlab.config.gitlab.url, "/", path_with_namespace, ".git"].join('')
- end
-
- # Returns the Gollum::Wiki object.
- def wiki
- @wiki ||= begin
- Gollum::Wiki.new(path_to_repo)
- rescue Grit::NoSuchPathError
- create_repo!
- end
- end
-
- # Returns an Array of Gitlab WikiPage instances or an
- # empty Array if this Wiki has no pages.
- def pages
- wiki.pages.map { |page| WikiPage.new(self, page, true) }
- end
-
- # Returns the last 30 Commit objects across the entire
- # repository.
- def recent_history
- Gitlab::Git::Commit.fresh_commits(wiki.repo, 30)
- end
-
- # Finds a page within the repository based on a tile
- # or slug.
- #
- # title - The human readable or parameterized title of
- # the page.
- #
- # Returns an initialized WikiPage instance or nil
- def find_page(title, version = nil)
- if page = wiki.page(title, version)
- WikiPage.new(self, page, true)
- else
- nil
- end
- end
-
- def create_page(title, content, format = :markdown, message = nil)
- commit = commit_details(:created, message, title)
-
- wiki.write_page(title, format, content, commit)
- rescue Gollum::DuplicatePageError => e
- @error_message = "Duplicate page: #{e.message}"
- return false
- end
-
- def update_page(page, content, format = :markdown, message = nil)
- commit = commit_details(:updated, message, page.title)
-
- wiki.update_page(page, page.name, format, content, commit)
- end
-
- def delete_page(page, message = nil)
- wiki.delete_page(page, commit_details(:deleted, message, page.title))
- end
-
- private
-
- def create_repo!
- if init_repo(path_with_namespace)
- Gollum::Wiki.new(path_to_repo)
- else
- raise CouldNotCreateWikiError
- end
- end
-
- def init_repo(path_with_namespace)
- gitlab_shell.add_repository(path_with_namespace)
- end
-
- def commit_details(action, message = nil, title = nil)
- commit_message = message || default_message(action, title)
-
- {email: @user.email, name: @user.name, message: commit_message}
- end
-
- def default_message(action, title)
- "#{@user.username} #{action} page: #{title}"
- end
-
- def gitlab_shell
- @gitlab_shell ||= Gitlab::Shell.new
- end
-
- def path_to_repo
- @path_to_repo ||= File.join(Gitlab.config.gitlab_shell.repos_path, "#{path_with_namespace}.git")
- end
-end
diff --git a/app/models/group.rb b/app/models/group.rb
index 5d838d2b..8ba92980 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -2,14 +2,13 @@
#
# Table name: namespaces
#
-# id :integer not null, primary key
-# name :string(255) not null
-# path :string(255) not null
-# owner_id :integer not null
-# created_at :datetime not null
-# updated_at :datetime not null
-# type :string(255)
-# description :string(255) default(""), not null
+# id :integer not null, primary key
+# name :string(255) not null
+# path :string(255) not null
+# owner_id :integer not null
+# created_at :datetime not null
+# updated_at :datetime not null
+# type :string(255)
#
class Group < Namespace
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 54d9af7e..40a6c015 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -9,49 +9,24 @@
# project_id :integer
# created_at :datetime not null
# updated_at :datetime not null
+# closed :boolean default(FALSE), not null
# position :integer default(0)
# branch_name :string(255)
# description :text
# milestone_id :integer
-# state :string(255)
#
class Issue < ActiveRecord::Base
include Issuable
- attr_accessible :title, :assignee_id, :position, :description,
- :milestone_id, :label_list, :author_id_of_changes,
- :state_event
+ attr_accessible :title, :assignee_id, :closed, :position, :description,
+ :milestone_id, :label_list, :author_id_of_changes
acts_as_taggable_on :labels
- class << self
- def cared(user)
- where('assignee_id = :user', user: user.id)
- end
+ validates :description, length: { within: 0..10000 }
- def authored(user)
- where('author_id = :user', user: user.id)
- end
-
- def open_for(user)
- opened.assigned(user)
- end
- end
-
- state_machine :state, initial: :opened do
- event :close do
- transition [:reopened, :opened] => :closed
- end
-
- event :reopen do
- transition closed: :reopened
- end
-
- state :opened
-
- state :reopened
-
- state :closed
+ def self.open_for(user)
+ opened.assigned(user)
end
end
diff --git a/app/models/key.rb b/app/models/key.rb
index 53eee511..2bf50f56 100644
--- a/app/models/key.rb
+++ b/app/models/key.rb
@@ -21,10 +21,11 @@ class Key < ActiveRecord::Base
attr_accessible :key, :title
before_validation :strip_white_space
+ before_save :set_identifier
validates :title, presence: true, length: { within: 0..255 }
- validates :key, presence: true, length: { within: 0..5000 }, format: { :with => /ssh-.{3} / }, uniqueness: true
- validate :fingerprintable_key
+ validates :key, presence: true, length: { within: 0..5000 }, format: { :with => /ssh-.{3} / }
+ validate :unique_key, :fingerprintable_key
delegate :name, :email, to: :user, prefix: true
@@ -32,9 +33,17 @@ class Key < ActiveRecord::Base
self.key = self.key.strip unless self.key.blank?
end
+ def unique_key
+ query = Key.where(key: key)
+ query = query.where('(project_id IS NULL OR project_id = ?)', project_id) if project_id
+ if (query.count > 0)
+ errors.add :key, 'already exist.'
+ end
+ end
+
def fingerprintable_key
return true unless key # Don't test if there is no key.
-
+ # `ssh-keygen -lf /dev/stdin <<< "#{key}"` errors with: redirection unexpected
file = Tempfile.new('key_file')
begin
file.puts key
@@ -44,11 +53,19 @@ class Key < ActiveRecord::Base
file.close
file.unlink # deletes the temp file
end
- errors.add(:key, "can't be fingerprinted") if $?.exitstatus != 0
+ errors.add(:key, "can't be fingerprinted") if fingerprint_output.match("failed")
+ end
+
+ def set_identifier
+ if is_deploy_key
+ self.identifier = "deploy_#{Digest::MD5.hexdigest(key)}"
+ else
+ self.identifier = "#{user.identifier}_#{Time.now.to_i}"
+ end
end
def is_deploy_key
- !!project_id
+ true if project_id
end
# projects that has this key
@@ -60,7 +77,7 @@ class Key < ActiveRecord::Base
end
end
- def shell_id
- "key-#{self.id}"
+ def last_deploy?
+ Key.where(identifier: identifier).count == 0
end
end
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 6ce94417..b6ea85f6 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -9,13 +9,14 @@
# author_id :integer
# assignee_id :integer
# title :string(255)
+# closed :boolean default(FALSE), not null
# created_at :datetime not null
# updated_at :datetime not null
# st_commits :text(2147483647)
# st_diffs :text(2147483647)
+# merged :boolean default(FALSE), not null
+# state :integer default(1), not null
# milestone_id :integer
-# state :string(255)
-# merge_status :string(255)
#
require Rails.root.join("app/models/commit")
@@ -24,74 +25,44 @@ require Rails.root.join("lib/static_model")
class MergeRequest < ActiveRecord::Base
include Issuable
- BROKEN_DIFF = "--broken-diff"
-
- attr_accessible :title, :assignee_id, :target_branch, :source_branch, :milestone_id,
- :author_id_of_changes, :state_event
+ attr_accessible :title, :assignee_id, :closed, :target_branch, :source_branch, :milestone_id,
+ :author_id_of_changes
attr_accessor :should_remove_source_branch
- state_machine :state, initial: :opened do
- event :close do
- transition [:reopened, :opened] => :closed
- end
+ BROKEN_DIFF = "--broken-diff"
- event :merge do
- transition [:reopened, :opened] => :merged
- end
-
- event :reopen do
- transition closed: :reopened
- end
-
- state :opened
-
- state :reopened
-
- state :closed
-
- state :merged
- end
-
- state_machine :merge_status, initial: :unchecked do
- event :mark_as_unchecked do
- transition [:can_be_merged, :cannot_be_merged] => :unchecked
- end
-
- event :mark_as_mergeable do
- transition unchecked: :can_be_merged
- end
-
- event :mark_as_unmergeable do
- transition unchecked: :cannot_be_merged
- end
-
- state :unchecked
-
- state :can_be_merged
-
- state :cannot_be_merged
- end
+ UNCHECKED = 1
+ CAN_BE_MERGED = 2
+ CANNOT_BE_MERGED = 3
serialize :st_commits
serialize :st_diffs
validates :source_branch, presence: true
validates :target_branch, presence: true
- validate :validate_branches
+ validate :validate_branches
- scope :merged, -> { with_state(:merged) }
- scope :by_branch, ->(branch_name) { where("source_branch LIKE :branch OR target_branch LIKE :branch", branch: branch_name) }
- scope :cared, ->(user) { where('assignee_id = :user OR author_id = :user', user: user.id) }
- scope :by_milestone, ->(milestone) { where(milestone_id: milestone) }
+ def self.find_all_by_branch(branch_name)
+ where("source_branch LIKE :branch OR target_branch LIKE :branch", branch: branch_name)
+ end
- # Closed scope for merge request should return
- # both merged and closed mr's
- scope :closed, -> { with_states(:closed, :merged) }
+ def self.find_all_by_milestone(milestone)
+ where("milestone_id = :milestone_id", milestone_id: milestone)
+ end
+
+ def human_state
+ states = {
+ CAN_BE_MERGED => "can_be_merged",
+ CANNOT_BE_MERGED => "cannot_be_merged",
+ UNCHECKED => "unchecked"
+ }
+ states[self.state]
+ end
def validate_branches
if target_branch == source_branch
- errors.add :branch_conflict, "You can not use same branch for source and target branches"
+ errors.add :base, "You can not use same branch for source and target branches"
end
end
@@ -100,12 +71,26 @@ class MergeRequest < ActiveRecord::Base
self.reloaded_diffs
end
+ def unchecked?
+ state == UNCHECKED
+ end
+
+ def mark_as_unchecked
+ self.state = UNCHECKED
+ self.save
+ end
+
+ def can_be_merged?
+ state == CAN_BE_MERGED
+ end
+
def check_if_can_be_merged
- if Gitlab::Satellite::MergeAction.new(self.author, self).can_be_merged?
- mark_as_mergeable
- else
- mark_as_unmergeable
- end
+ self.state = if Gitlab::Satellite::MergeAction.new(self.author, self).can_be_merged?
+ CAN_BE_MERGED
+ else
+ CANNOT_BE_MERGED
+ end
+ self.save
end
def diffs
@@ -113,7 +98,7 @@ class MergeRequest < ActiveRecord::Base
end
def reloaded_diffs
- if opened? && unmerged_diffs.any?
+ if open? && unmerged_diffs.any?
self.st_diffs = unmerged_diffs
self.save
end
@@ -143,41 +128,44 @@ class MergeRequest < ActiveRecord::Base
commits.first
end
+ def merged?
+ merged && merge_event
+ end
+
def merge_event
- self.project.events.where(target_id: self.id, target_type: "MergeRequest", action: Event::MERGED).last
+ self.project.events.where(target_id: self.id, target_type: "MergeRequest", action: Event::Merged).last
end
def closed_event
- self.project.events.where(target_id: self.id, target_type: "MergeRequest", action: Event::CLOSED).last
+ self.project.events.where(target_id: self.id, target_type: "MergeRequest", action: Event::Closed).last
end
def commits
- if st_commits.present?
- # check if merge request commits are valid
- if st_commits.first.respond_to?(:short_id)
- st_commits
- else
- # if commits are invalid - simply reload it from repo
- reloaded_commits
- end
- else
- []
- end
+ st_commits || []
end
def probably_merged?
unmerged_commits.empty? &&
- commits.any? && opened?
+ commits.any? && open?
+ end
+
+ def open?
+ !closed
+ end
+
+ def mark_as_merged!
+ self.merged = true
+ self.closed = true
+ save
+ end
+
+ def mark_as_unmergable
+ self.state = CANNOT_BE_MERGED
+ self.save
end
def reloaded_commits
- if opened? && unmerged_commits.any?
- # we need to reset st_commits field first
- # in order to prevent internal rails comparison
- self.st_commits = []
- save
-
- # Then we can safely write unmerged commits
+ if open? && unmerged_commits.any?
self.st_commits = unmerged_commits
save
end
@@ -185,15 +173,22 @@ class MergeRequest < ActiveRecord::Base
end
def unmerged_commits
- self.project.repository.
+ self.project.repo.
commits_between(self.target_branch, self.source_branch).
+ map {|c| Commit.new(c)}.
sort_by(&:created_at).
reverse
end
def merge!(user_id)
- self.author_id_of_changes = user_id
- self.merge
+ self.mark_as_merged!
+ Event.create(
+ project: self.project,
+ action: Event::Merged,
+ target_id: self.id,
+ target_type: "MergeRequest",
+ author_id: user_id
+ )
end
def automerge!(current_user)
@@ -202,7 +197,7 @@ class MergeRequest < ActiveRecord::Base
true
end
rescue
- mark_as_unmergeable
+ self.mark_as_unmergable
false
end
diff --git a/app/models/milestone.rb b/app/models/milestone.rb
index 2a9b9e44..8b4c895d 100644
--- a/app/models/milestone.rb
+++ b/app/models/milestone.rb
@@ -7,38 +7,25 @@
# project_id :integer not null
# description :text
# due_date :date
+# closed :boolean default(FALSE), not null
# created_at :datetime not null
# updated_at :datetime not null
-# state :string(255)
#
class Milestone < ActiveRecord::Base
- attr_accessible :title, :description, :due_date, :state_event, :author_id_of_changes
+ attr_accessible :title, :description, :due_date, :closed, :author_id_of_changes
attr_accessor :author_id_of_changes
belongs_to :project
has_many :issues
has_many :merge_requests
- scope :active, -> { with_state(:active) }
- scope :closed, -> { with_state(:closed) }
+ scope :active, where(closed: false)
+ scope :closed, where(closed: true)
validates :title, presence: true
validates :project, presence: true
-
- state_machine :state, initial: :active do
- event :close do
- transition active: :closed
- end
-
- event :activate do
- transition closed: :active
- end
-
- state :closed
-
- state :active
- end
+ validates :closed, inclusion: { in: [true, false] }
def expired?
if due_date
@@ -81,13 +68,17 @@ class Milestone < ActiveRecord::Base
end
def can_be_closed?
- active? && issues.opened.count.zero?
+ open? && issues.opened.count.zero?
end
def is_empty?
total_items_count.zero?
end
+ def open?
+ !closed
+ end
+
def author_id
author_id_of_changes
end
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index cb7164ea..ad04d0ef 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -2,41 +2,37 @@
#
# Table name: namespaces
#
-# id :integer not null, primary key
-# name :string(255) not null
-# path :string(255) not null
-# owner_id :integer not null
-# created_at :datetime not null
-# updated_at :datetime not null
-# type :string(255)
-# description :string(255) default(""), not null
+# id :integer not null, primary key
+# name :string(255) not null
+# path :string(255) not null
+# owner_id :integer not null
+# created_at :datetime not null
+# updated_at :datetime not null
+# type :string(255)
#
class Namespace < ActiveRecord::Base
- include Gitlab::ShellAdapter
-
- attr_accessible :name, :description, :path
+ attr_accessible :name, :path
has_many :projects, dependent: :destroy
belongs_to :owner, class_name: "User"
- validates :owner, presence: true
- validates :name, presence: true, uniqueness: true,
- length: { within: 0..255 },
- format: { with: Gitlab::Regex.name_regex,
- message: "only letters, digits, spaces & '_' '-' '.' allowed." }
- validates :description, length: { within: 0..255 }
+ validates :name, presence: true, uniqueness: true
validates :path, uniqueness: true, presence: true, length: { within: 1..255 },
format: { with: Gitlab::Regex.path_regex,
message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" }
+ validates :owner, presence: true
delegate :name, to: :owner, allow_nil: true, prefix: true
after_create :ensure_dir_exist
- after_update :move_dir, if: :path_changed?
+ after_update :move_dir
+ after_commit :update_gitolite, on: :update, if: :require_update_gitolite
after_destroy :rm_dir
- scope :root, -> { where('type IS NULL') }
+ scope :root, where('type IS NULL')
+
+ attr_accessor :require_update_gitolite
def self.search query
where("name LIKE :query OR path LIKE :query", query: "%#{query}%")
@@ -55,34 +51,54 @@ class Namespace < ActiveRecord::Base
end
def ensure_dir_exist
- gitlab_shell.add_namespace(path)
+ unless dir_exists?
+ FileUtils.mkdir( namespace_full_path, mode: 0770 )
+ end
end
- def rm_dir
- gitlab_shell.rm_namespace(path)
+ def dir_exists?
+ File.exists?(namespace_full_path)
+ end
+
+ def namespace_full_path
+ @namespace_full_path ||= File.join(Gitlab.config.gitolite.repos_path, path)
end
def move_dir
- if gitlab_shell.mv_namespace(path_was, path)
- # If repositories moved successfully we need to remove old satellites
- # and send update instructions to users.
- # However we cannot allow rollback since we moved namespace dir
- # So we basically we mute exceptions in next actions
- begin
- gitlab_shell.rm_satellites(path_was)
- send_update_instructions
- rescue
- # Returning false does not rolback after_* transaction but gives
- # us information about failing some of tasks
- false
+ if path_changed?
+ old_path = File.join(Gitlab.config.gitolite.repos_path, path_was)
+ new_path = File.join(Gitlab.config.gitolite.repos_path, path)
+ if File.exists?(new_path)
+ raise "Already exists"
+ end
+
+
+ begin
+ # Remove satellite when moving repo
+ if path_was.present?
+ satellites_path = File.join(Gitlab.config.satellites.path, path_was)
+ FileUtils.rm_r( satellites_path, force: true )
+ end
+
+ FileUtils.mv( old_path, new_path )
+ send_update_instructions
+ @require_update_gitolite = true
+ rescue Exception => e
+ raise "Namespace move error #{old_path} #{new_path}"
end
- else
- # if we cannot move namespace directory we should rollback
- # db changes in order to prevent out of sync between db and fs
- raise Exception.new('namespace directory cannot be moved')
end
end
+ def update_gitolite
+ @require_update_gitolite = false
+ projects.each(&:update_repository)
+ end
+
+ def rm_dir
+ dir_path = File.join(Gitlab.config.gitolite.repos_path, path)
+ FileUtils.rm_r( dir_path, force: true )
+ end
+
def send_update_instructions
projects.each(&:send_move_instructions)
end
diff --git a/app/models/network/commit.rb b/app/models/network/commit.rb
deleted file mode 100644
index 3cd0c015..00000000
--- a/app/models/network/commit.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-require "grit"
-
-module Network
- class Commit
- include ActionView::Helpers::TagHelper
-
- attr_reader :refs
- attr_accessor :time, :spaces, :parent_spaces
-
- def initialize(raw_commit, refs)
- @commit = Gitlab::Git::Commit.new(raw_commit)
- @time = -1
- @spaces = []
- @parent_spaces = []
- @refs = refs || []
- end
-
- def method_missing(m, *args, &block)
- @commit.send(m, *args, &block)
- end
-
- def space
- if @spaces.size > 0
- @spaces.first
- else
- 0
- end
- end
-
- def parents(map)
- @commit.parents.map do |p|
- if map.include?(p.id)
- map[p.id]
- end
- end
- .compact
- end
- end
-end
diff --git a/app/models/network/graph.rb b/app/models/network/graph.rb
deleted file mode 100644
index 2957adbf..00000000
--- a/app/models/network/graph.rb
+++ /dev/null
@@ -1,286 +0,0 @@
-require "grit"
-
-module Network
- class Graph
- attr_reader :days, :commits, :map
-
- def self.max_count
- @max_count ||= 650
- end
-
- def initialize project, ref, commit
- @project = project
- @ref = ref
- @commit = commit
- @repo = project.repo
-
- @commits = collect_commits
- @days = index_commits
- end
-
- protected
-
- # Get commits from repository
- #
- def collect_commits
- refs_cache = build_refs_cache
-
- find_commits(count_to_display_commit_in_center)
- .map do |commit|
- # Decorate with app/model/network/commit.rb
- Network::Commit.new(commit, refs_cache[commit.id])
- end
- end
-
- # Method is adding time and space on the
- # list of commits. As well as returns date list
- # corelated with time set on commits.
- #
- # @return [Array] list of commit dates corelated with time on commits
- def index_commits
- days = []
- @map = {}
- @reserved = {}
-
- @commits.each_with_index do |c,i|
- c.time = i
- days[i] = c.committed_date
- @map[c.id] = c
- @reserved[i] = []
- end
-
- commits_sort_by_ref.each do |commit|
- place_chain(commit)
- end
-
- # find parent spaces for not overlap lines
- @commits.each do |c|
- c.parent_spaces.concat(find_free_parent_spaces(c))
- end
-
- days
- end
-
- # Skip count that the target commit is displayed in center.
- def count_to_display_commit_in_center
- offset = -1
- skip = 0
- while offset == -1
- tmp_commits = find_commits(skip)
- if tmp_commits.size > 0
- index = tmp_commits.index do |c|
- c.id == @commit.id
- end
-
- if index
- # Find the target commit
- offset = index + skip
- else
- skip += self.class.max_count
- end
- else
- # Cant't find the target commit in the repo.
- offset = 0
- end
- end
-
- if self.class.max_count / 2 < offset then
- # get max index that commit is displayed in the center.
- offset - self.class.max_count / 2
- else
- 0
- end
- end
-
- def find_commits(skip = 0)
- Grit::Commit.find_all(
- @repo,
- nil,
- {
- date_order: true,
- max_count: self.class.max_count,
- skip: skip
- }
- )
- end
-
- def commits_sort_by_ref
- @commits.sort do |a,b|
- if include_ref?(a)
- -1
- elsif include_ref?(b)
- 1
- else
- b.committed_date <=> a.committed_date
- end
- end
- end
-
- def include_ref?(commit)
- heads = commit.refs.select do |ref|
- ref.is_a?(Grit::Head) or ref.is_a?(Grit::Remote) or ref.is_a?(Grit::Tag)
- end
-
- heads.map! do |head|
- head.name
- end
-
- heads.include?(@ref)
- end
-
- def find_free_parent_spaces(commit)
- spaces = []
-
- commit.parents(@map).each do |parent|
- range = commit.time..parent.time
-
- space = if commit.space >= parent.space then
- find_free_parent_space(range, parent.space, -1, commit.space)
- else
- find_free_parent_space(range, commit.space, -1, parent.space)
- end
-
- mark_reserved(range, space)
- spaces << space
- end
-
- spaces
- end
-
- def find_free_parent_space(range, space_base, space_step, space_default)
- if is_overlap?(range, space_default) then
- find_free_space(range, space_step, space_base, space_default)
- else
- space_default
- end
- end
-
- def is_overlap?(range, overlap_space)
- range.each do |i|
- if i != range.first &&
- i != range.last &&
- @commits[i].spaces.include?(overlap_space) then
-
- return true;
- end
- end
-
- false
- end
-
- # Add space mark on commit and its parents
- #
- # @param [::Commit] the commit object.
- def place_chain(commit, parent_time = nil)
- leaves = take_left_leaves(commit)
- if leaves.empty?
- return
- end
-
- time_range = leaves.first.time..leaves.last.time
- space_base = get_space_base(leaves)
- space = find_free_space(time_range, 2, space_base)
- leaves.each do |l|
- l.spaces << space
- # Also add space to parent
- l.parents(@map).each do |parent|
- if parent.space > 0
- parent.spaces << space
- end
- end
- end
-
- # and mark it as reserved
- if parent_time.nil?
- min_time = leaves.first.time
- else
- min_time = parent_time + 1
- end
-
- max_time = leaves.last.time
- leaves.last.parents(@map).each do |parent|
- if max_time < parent.time
- max_time = parent.time
- end
- end
- mark_reserved(min_time..max_time, space)
-
- # Visit branching chains
- leaves.each do |l|
- parents = l.parents(@map).select{|p| p.space.zero?}
- for p in parents
- place_chain(p, l.time)
- end
- end
- end
-
- def get_space_base(leaves)
- space_base = 1
- parents = leaves.last.parents(@map)
- if parents.size > 0
- if parents.first.space > 0
- space_base = parents.first.space
- end
- end
- space_base
- end
-
- def mark_reserved(time_range, space)
- for day in time_range
- @reserved[day].push(space)
- end
- end
-
- def find_free_space(time_range, space_step, space_base = 1, space_default = nil)
- space_default ||= space_base
-
- reserved = []
- for day in time_range
- reserved += @reserved[day]
- end
- reserved.uniq!
-
- space = space_default
- while reserved.include?(space) do
- space += space_step
- if space < space_base then
- space_step *= -1
- space = space_base + space_step
- end
- end
-
- space
- end
-
- # Takes most left subtree branch of commits
- # which don't have space mark yet.
- #
- # @param [::Commit] the commit object.
- #
- # @return [Array] list of branch commits
- def take_left_leaves(raw_commit)
- commit = @map[raw_commit.id]
- leaves = []
- leaves.push(commit) if commit.space.zero?
-
- while true
- return leaves if commit.parents(@map).count.zero?
-
- commit = commit.parents(@map).first
-
- return leaves unless commit.space.zero?
-
- leaves.push(commit)
- end
- end
-
- def build_refs_cache
- refs_cache = {}
- @repo.refs.each do |ref|
- refs_cache[ref.commit.id] = [] unless refs_cache.include?(ref.commit.id)
- refs_cache[ref.commit.id] << ref
- end
- refs_cache
- end
- end
-end
diff --git a/app/models/note.rb b/app/models/note.rb
index f26420ca..ded126b4 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -22,6 +22,9 @@ class Note < ActiveRecord::Base
attr_accessible :note, :noteable, :noteable_id, :noteable_type, :project_id,
:attachment, :line_code, :commit_id
+ attr_accessor :notify
+ attr_accessor :notify_author
+
belongs_to :project
belongs_to :noteable, polymorphic: true
belongs_to :author, class_name: "User"
@@ -40,8 +43,8 @@ class Note < ActiveRecord::Base
# Scopes
scope :for_commit_id, ->(commit_id) { where(noteable_type: "Commit", commit_id: commit_id) }
- scope :inline, -> { where("line_code IS NOT NULL") }
- scope :not_inline, -> { where("line_code IS NULL") }
+ scope :inline, where("line_code IS NOT NULL")
+ scope :not_inline, where("line_code IS NULL")
scope :common, ->{ where(noteable_type: ["", nil]) }
scope :fresh, ->{ order("created_at ASC, id ASC") }
@@ -135,11 +138,19 @@ class Note < ActiveRecord::Base
super
end
# Temp fix to prevent app crash
- # if note commit id doesn't exist
+ # if note commit id doesnt exist
rescue
nil
end
+ def notify
+ @notify ||= false
+ end
+
+ def notify_author
+ @notify_author ||= false
+ end
+
# Returns true if this is an upvote note,
# otherwise false is returned
def upvote?
diff --git a/app/models/notification.rb b/app/models/notification.rb
deleted file mode 100644
index bfd1e2cf..00000000
--- a/app/models/notification.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-class Notification
- #
- # Notification levels
- #
- N_DISABLED = 0
- N_PARTICIPATING = 1
- N_WATCH = 2
-
- attr_accessor :user
-
- def self.notification_levels
- [N_DISABLED, N_PARTICIPATING, N_WATCH]
- end
-
- def initialize(user)
- @user = user
- end
-
- def disabled?
- user.notification_level == N_DISABLED
- end
-
- def participating?
- user.notification_level == N_PARTICIPATING
- end
-
- def watch?
- user.notification_level == N_WATCH
- end
-end
diff --git a/app/models/project.rb b/app/models/project.rb
index 0263ffef..fa38093b 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -8,6 +8,7 @@
# description :text
# created_at :datetime not null
# updated_at :datetime not null
+# private_flag :boolean default(TRUE), not null
# creator_id :integer
# default_branch :string(255)
# issues_enabled :boolean default(TRUE), not null
@@ -15,51 +16,44 @@
# merge_requests_enabled :boolean default(TRUE), not null
# wiki_enabled :boolean default(TRUE), not null
# namespace_id :integer
-# public :boolean default(FALSE), not null
-# issues_tracker :string(255) default("gitlab"), not null
-# issues_tracker_id :string(255)
-# snippets_enabled :boolean default(TRUE), not null
#
require "grit"
class Project < ActiveRecord::Base
- include Gitlab::ShellAdapter
- extend Enumerize
+ include Gitolited
- attr_accessible :name, :path, :description, :default_branch, :issues_tracker,
- :issues_enabled, :wall_enabled, :merge_requests_enabled, :snippets_enabled, :issues_tracker_id,
- :wiki_enabled, :public, :import_url, as: [:default, :admin]
+ class TransferError < StandardError; end
+
+ attr_accessible :name, :path, :description, :default_branch, :issues_enabled,
+ :wall_enabled, :merge_requests_enabled, :wiki_enabled, :public, as: [:default, :admin]
attr_accessible :namespace_id, :creator_id, as: :admin
- attr_accessor :import_url
+ attr_accessor :error_code
# Relations
- belongs_to :creator, foreign_key: "creator_id", class_name: "User"
- belongs_to :group, foreign_key: "namespace_id", conditions: "type = 'Group'"
+ belongs_to :group, foreign_key: "namespace_id", conditions: "type = 'Group'"
belongs_to :namespace
- has_one :last_event, class_name: 'Event', order: 'events.created_at DESC', foreign_key: 'project_id'
- has_one :gitlab_ci_service, dependent: :destroy
-
- has_many :events, dependent: :destroy
- has_many :merge_requests, dependent: :destroy
- has_many :issues, dependent: :destroy, order: "state DESC, created_at DESC"
- has_many :milestones, dependent: :destroy
- has_many :users_projects, dependent: :destroy
- has_many :notes, dependent: :destroy
- has_many :snippets, dependent: :destroy
- has_many :deploy_keys, dependent: :destroy, class_name: "Key", foreign_key: "project_id"
- has_many :hooks, dependent: :destroy, class_name: "ProjectHook"
- has_many :wikis, dependent: :destroy
- has_many :protected_branches, dependent: :destroy
- has_many :user_team_project_relationships, dependent: :destroy
+ belongs_to :creator,
+ class_name: "User",
+ foreign_key: "creator_id"
has_many :users, through: :users_projects
- has_many :user_teams, through: :user_team_project_relationships
- has_many :user_team_user_relationships, through: :user_teams
- has_many :user_teams_members, through: :user_team_user_relationships
+ has_many :events, dependent: :destroy
+ has_many :merge_requests, dependent: :destroy
+ has_many :issues, dependent: :destroy, order: "closed, created_at DESC"
+ has_many :milestones, dependent: :destroy
+ has_many :users_projects, dependent: :destroy
+ has_many :notes, dependent: :destroy
+ has_many :snippets, dependent: :destroy
+ has_many :deploy_keys, dependent: :destroy, foreign_key: "project_id", class_name: "Key"
+ has_many :hooks, dependent: :destroy, class_name: "ProjectHook"
+ has_many :wikis, dependent: :destroy
+ has_many :protected_branches, dependent: :destroy
+ has_one :last_event, class_name: 'Event', order: 'events.created_at DESC', foreign_key: 'project_id'
+ has_one :gitlab_ci_service, dependent: :destroy
delegate :name, to: :owner, allow_nil: true, prefix: true
@@ -74,29 +68,20 @@ class Project < ActiveRecord::Base
message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" }
validates :issues_enabled, :wall_enabled, :merge_requests_enabled,
:wiki_enabled, inclusion: { in: [true, false] }
- validates :issues_tracker_id, length: { within: 0..255 }
validates_uniqueness_of :name, scope: :namespace_id
validates_uniqueness_of :path, scope: :namespace_id
- validates :import_url,
- format: { with: URI::regexp(%w(http https)), message: "should be a valid url" },
- if: :import?
-
validate :check_limit, :repo_name
# Scopes
scope :without_user, ->(user) { where("id NOT IN (:ids)", ids: user.authorized_projects.map(&:id) ) }
scope :not_in_group, ->(group) { where("id NOT IN (:ids)", ids: group.project_ids ) }
- scope :without_team, ->(team) { team.projects.present? ? where("id NOT IN (:ids)", ids: team.projects.map(&:id)) : scoped }
- scope :in_team, ->(team) { where("id IN (:ids)", ids: team.projects.map(&:id)) }
scope :in_namespace, ->(namespace) { where(namespace_id: namespace.id) }
scope :sorted_by_activity, ->() { order("(SELECT max(events.created_at) FROM events WHERE events.project_id = projects.id) DESC") }
scope :personal, ->(user) { where(namespace_id: user.namespace_id) }
scope :joined, ->(user) { where("namespace_id != ?", user.namespace_id) }
- scope :public_only, -> { where(public: true) }
-
- enumerize :issues_tracker, :in => (Gitlab.config.issues_tracker.keys).append(:gitlab), :default => :gitlab
+ scope :public, where(public: true)
class << self
def abandoned
@@ -108,7 +93,7 @@ class Project < ActiveRecord::Base
end
def with_push
- includes(:events).where('events.action = ?', Event::PUSHED)
+ includes(:events).where('events.action = ?', Event::Pushed)
end
def active
@@ -137,31 +122,37 @@ class Project < ActiveRecord::Base
end
def team
- @team ||= ProjectTeam.new(self)
+ @team ||= Team.new(self)
end
def repository
- @repository ||= Repository.new(path_with_namespace, default_branch)
+ if path
+ @repository ||= Repository.new(path_with_namespace, default_branch)
+ else
+ nil
+ end
+ rescue Grit::NoSuchPathError
+ nil
+ end
+
+ def git_error?
+ error_code == :gitolite
end
def saved?
- id && persisted?
- end
-
- def import?
- import_url.present?
+ id && valid?
end
def check_limit
unless creator.can_create_project?
- errors[:limit_reached] << ("Your own projects limit is #{creator.projects_limit}! Please contact administrator to increase it")
+ errors[:base] << ("Your own projects limit is #{creator.projects_limit}! Please contact administrator to increase it")
end
rescue
errors[:base] << ("Can't check your ability to create project")
end
def repo_name
- denied_paths = %w(admin dashboard groups help profile projects search)
+ denied_paths = %w(gitolite-admin admin dashboard groups help profile projects search)
if denied_paths.include?(path)
errors.add(:path, "like #{path} is not allowed")
@@ -200,22 +191,6 @@ class Project < ActiveRecord::Base
issues.tag_counts_on(:labels)
end
- def issue_exists?(issue_id)
- if used_default_issues_tracker?
- self.issues.where(id: issue_id).first.present?
- else
- true
- end
- end
-
- def used_default_issues_tracker?
- self.issues_tracker == Project.issues_tracker.default_value
- end
-
- def can_have_issues_tracker_id?
- self.issues_enabled && !self.used_default_issues_tracker?
- end
-
def services
[gitlab_ci_service].compact
end
@@ -262,6 +237,34 @@ class Project < ActiveRecord::Base
users_projects.find_by_user_id(user_id)
end
+ def transfer(new_namespace)
+ Project.transaction do
+ old_namespace = namespace
+ self.namespace = new_namespace
+
+ old_dir = old_namespace.try(:path) || ''
+ new_dir = new_namespace.try(:path) || ''
+
+ old_repo = if old_dir.present?
+ File.join(old_dir, self.path)
+ else
+ self.path
+ end
+
+ if Project.where(path: self.path, namespace_id: new_namespace.try(:id)).present?
+ raise TransferError.new("Project with same path in target namespace already exists")
+ end
+
+ Gitlab::ProjectMover.new(self, old_dir, new_dir).execute
+
+ gitolite.move_repository(old_repo, self)
+
+ save!
+ end
+ rescue Gitlab::ProjectMover::ProjectMoveError => ex
+ raise Project::TransferError.new(ex.message)
+ end
+
def name_with_namespace
@name_with_namespace ||= begin
if namespace
@@ -284,12 +287,55 @@ class Project < ActiveRecord::Base
end
end
- def transfer(new_namespace)
- ProjectTransferService.new.transfer(self, new_namespace)
+ # This method will be called after each post receive and only if the provided
+ # user is present in GitLab.
+ #
+ # All callbacks for post receive should be placed here.
+ def trigger_post_receive(oldrev, newrev, ref, user)
+ data = post_receive_data(oldrev, newrev, ref, user)
+
+ # Create push event
+ self.observe_push(data)
+
+ if push_to_branch? ref, oldrev
+ # Close merged MR
+ self.update_merge_requests(oldrev, newrev, ref, user)
+
+ # Execute web hooks
+ self.execute_hooks(data.dup)
+
+ # Execute project services
+ self.execute_services(data.dup)
+ end
+
+ # Create satellite
+ self.satellite.create unless self.satellite.exists?
+
+ # Discover the default branch, but only if it hasn't already been set to
+ # something else
+ if repository && default_branch.nil?
+ update_attributes(default_branch: self.repository.discover_default_branch)
+ end
+ end
+
+ def push_to_branch? ref, oldrev
+ ref_parts = ref.split('/')
+
+ # Return if this is not a push to a branch (e.g. new commits)
+ !(ref_parts[1] !~ /heads/ || oldrev == "00000000000000000000000000000000")
+ end
+
+ def observe_push(data)
+ Event.create(
+ project: self,
+ action: Event::Pushed,
+ data: data,
+ author_id: data[:user_id]
+ )
end
def execute_hooks(data)
- hooks.each { |hook| hook.async_execute(data) }
+ hooks.each { |hook| hook.execute(data) }
end
def execute_services(data)
@@ -300,12 +346,68 @@ class Project < ActiveRecord::Base
end
end
- def discover_default_branch
- # Discover the default branch, but only if it hasn't already been set to
- # something else
- if repository && default_branch.nil?
- update_attributes(default_branch: self.repository.discover_default_branch)
+ # Produce a hash of post-receive data
+ #
+ # data = {
+ # before: String,
+ # after: String,
+ # ref: String,
+ # user_id: String,
+ # user_name: String,
+ # repository: {
+ # name: String,
+ # url: String,
+ # description: String,
+ # homepage: String,
+ # },
+ # commits: Array,
+ # total_commits_count: Fixnum
+ # }
+ #
+ def post_receive_data(oldrev, newrev, ref, user)
+
+ push_commits = repository.commits_between(oldrev, newrev)
+
+ # Total commits count
+ push_commits_count = push_commits.size
+
+ # Get latest 20 commits ASC
+ push_commits_limited = push_commits.last(20)
+
+ # Hash to be passed as post_receive_data
+ data = {
+ before: oldrev,
+ after: newrev,
+ ref: ref,
+ user_id: user.id,
+ user_name: user.name,
+ repository: {
+ name: name,
+ url: url_to_repo,
+ description: description,
+ homepage: web_url,
+ },
+ commits: [],
+ total_commits_count: push_commits_count
+ }
+
+ # For perfomance purposes maximum 20 latest commits
+ # will be passed as post receive hook data.
+ #
+ push_commits_limited.each do |commit|
+ data[:commits] << {
+ id: commit.id,
+ message: commit.safe_message,
+ timestamp: commit.date.xmlschema,
+ url: "#{Gitlab.config.gitlab.url}/#{path_with_namespace}/commit/#{commit.id}",
+ author: {
+ name: commit.author_name,
+ email: commit.author_email
+ }
+ }
end
+
+ data
end
def update_merge_requests(oldrev, newrev, ref, user)
@@ -314,7 +416,7 @@ class Project < ActiveRecord::Base
c_ids = self.repository.commits_between(oldrev, newrev).map(&:id)
# Update code for merge requests
- mrs = self.merge_requests.opened.by_branch(branch_name).all
+ mrs = self.merge_requests.opened.find_all_by_branch(branch_name).all
mrs.each { |merge_request| merge_request.reload_code; merge_request.mark_as_unchecked }
# Close merge requests
@@ -326,18 +428,14 @@ class Project < ActiveRecord::Base
end
def valid_repo?
- repository.exists?
+ repo
rescue
errors.add(:path, "Invalid repository path")
false
end
def empty_repo?
- !repository.exists? || repository.empty?
- end
-
- def ensure_satellite_exists
- self.satellite.create unless self.satellite.exists?
+ !repository || repository.empty?
end
def satellite
@@ -349,33 +447,34 @@ class Project < ActiveRecord::Base
end
def url_to_repo
- gitlab_shell.url_to_repo(path_with_namespace)
+ gitolite.url_to_repo(path_with_namespace)
end
def namespace_dir
namespace.try(:path) || ''
end
+ def update_repository
+ gitolite.update_repository(self)
+ end
+
+ def destroy_repository
+ gitolite.remove_repository(self)
+ end
+
def repo_exists?
- @repo_exists ||= repository.exists?
+ @repo_exists ||= (repository && repository.branches.present?)
rescue
@repo_exists = false
end
def open_branches
- all_branches = repository.branches
-
- if protected_branches.present?
- all_branches.reject! do |branch|
- protected_branches_names.include?(branch.name)
- end
- end
-
- all_branches
- end
-
- def protected_branches_names
- @protected_branches_names ||= protected_branches.map(&:name)
+ if protected_branches.empty?
+ self.repo.heads
+ else
+ pnames = protected_branches.map(&:name)
+ self.repo.heads.reject { |h| pnames.include?(h.name) }
+ end.sort_by(&:name)
end
def root_ref?(branch)
@@ -390,13 +489,8 @@ class Project < ActiveRecord::Base
http_url = [Gitlab.config.gitlab.url, "/", path_with_namespace, ".git"].join('')
end
- def project_access_human(member)
- project_user_relation = self.users_projects.find_by_user_id(member.id)
- self.class.access_options.key(project_user_relation.project_access)
- end
-
# Check if current branch name is marked as protected in the system
def protected_branch? branch_name
- protected_branches_names.include?(branch_name)
+ protected_branches.map(&:name).include?(branch_name)
end
end
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb
index 16379720..3308caf3 100644
--- a/app/models/protected_branch.rb
+++ b/app/models/protected_branch.rb
@@ -10,7 +10,7 @@
#
class ProtectedBranch < ActiveRecord::Base
- include Gitlab::ShellAdapter
+ include Gitolited
attr_accessible :name
@@ -18,6 +18,13 @@ class ProtectedBranch < ActiveRecord::Base
validates :name, presence: true
validates :project, presence: true
+ after_save :update_repository
+ after_destroy :update_repository
+
+ def update_repository
+ gitolite.update_repository(project)
+ end
+
def commit
project.repository.commit(self.name)
end
diff --git a/app/models/repository.rb b/app/models/repository.rb
index ed600e29..9032905c 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -1,45 +1,169 @@
class Repository
- attr_accessor :raw_repository
+ # Repository directory name with namespace direcotry
+ # Examples:
+ # gitlab/gitolite
+ # diaspora
+ #
+ attr_accessor :path_with_namespace
- def initialize(path_with_namespace, default_branch)
- @raw_repository = Gitlab::Git::Repository.new(path_with_namespace, default_branch)
- rescue Gitlab::Git::Repository::NoRepository
- nil
+ # Grit repo object
+ attr_accessor :repo
+
+ # Default branch in the repository
+ attr_accessor :root_ref
+
+ def initialize(path_with_namespace, root_ref = 'master')
+ @root_ref = root_ref || "master"
+ @path_with_namespace = path_with_namespace
+
+ # Init grit repo object
+ repo
end
- def exists?
- raw_repository
+ def raw
+ repo
end
- def empty?
- raw_repository.empty?
+ def path_to_repo
+ @path_to_repo ||= File.join(Gitlab.config.gitolite.repos_path, "#{path_with_namespace}.git")
end
- def commit(id = nil)
- commit = raw_repository.commit(id)
- commit = Commit.new(commit) if commit
- commit
+ def repo
+ @repo ||= Grit::Repo.new(path_to_repo)
+ end
+
+ def commit(commit_id = nil)
+ Commit.find_or_first(repo, commit_id, root_ref)
+ end
+
+ def fresh_commits(n = 10)
+ Commit.fresh_commits(repo, n)
+ end
+
+ def commits_with_refs(n = 20)
+ Commit.commits_with_refs(repo, n)
+ end
+
+ def commits_since(date)
+ Commit.commits_since(repo, date)
end
def commits(ref, path = nil, limit = nil, offset = nil)
- commits = raw_repository.commits(ref, path, limit, offset)
- commits = Commit.decorate(commits) if commits.present?
- commits
+ Commit.commits(repo, ref, path, limit, offset)
end
- def commits_between(target, source)
- commits = raw_repository.commits_between(target, source)
- commits = Commit.decorate(commits) if commits.present?
- commits
+ def last_commit_for(ref, path = nil)
+ commits(ref, path, 1).first
end
- def method_missing(m, *args, &block)
- raw_repository.send(m, *args, &block)
+ def commits_between(from, to)
+ Commit.commits_between(repo, from, to)
end
- def respond_to?(method)
- return true if raw_repository.respond_to?(method)
+ def has_post_receive_file?
+ !!hook_file
+ end
- super
+ def valid_post_receive_file?
+ valid_hook_file == hook_file
+ end
+
+ def valid_hook_file
+ @valid_hook_file ||= File.read(Rails.root.join('lib', 'hooks', 'post-receive'))
+ end
+
+ def hook_file
+ @hook_file ||= begin
+ hook_path = File.join(path_to_repo, 'hooks', 'post-receive')
+ File.read(hook_path) if File.exists?(hook_path)
+ end
+ end
+
+ # Returns an Array of branch names
+ def branch_names
+ repo.branches.collect(&:name).sort
+ end
+
+ # Returns an Array of Branches
+ def branches
+ repo.branches.sort_by(&:name)
+ end
+
+ # Returns an Array of tag names
+ def tag_names
+ repo.tags.collect(&:name).sort.reverse
+ end
+
+ # Returns an Array of Tags
+ def tags
+ repo.tags.sort_by(&:name).reverse
+ end
+
+ # Returns an Array of branch and tag names
+ def ref_names
+ [branch_names + tag_names].flatten
+ end
+
+ def heads
+ @heads ||= repo.heads
+ end
+
+ def tree(fcommit, path = nil)
+ fcommit = commit if fcommit == :head
+ tree = fcommit.tree
+ path ? (tree / path) : tree
+ end
+
+ def has_commits?
+ !!commit
+ rescue Grit::NoSuchPathError
+ false
+ end
+
+ def empty?
+ !has_commits?
+ end
+
+ # Discovers the default branch based on the repository's available branches
+ #
+ # - If no branches are present, returns nil
+ # - If one branch is present, returns its name
+ # - If two or more branches are present, returns the one that has a name
+ # matching root_ref (default_branch or 'master' if default_branch is nil)
+ def discover_default_branch
+ if branch_names.length == 0
+ nil
+ elsif branch_names.length == 1
+ branch_names.first
+ else
+ branch_names.select { |v| v == root_ref }.first
+ end
+ end
+
+ # Archive Project to .tar.gz
+ #
+ # Already packed repo archives stored at
+ # app_root/tmp/repositories/project_name/project_name-commit-id.tag.gz
+ #
+ def archive_repo(ref)
+ ref = ref || self.root_ref
+ commit = self.commit(ref)
+ return nil unless commit
+
+ # Build file path
+ file_name = self.path_with_namespace.gsub("/","_") + "-" + commit.id.to_s + ".tar.gz"
+ storage_path = Rails.root.join("tmp", "repositories")
+ file_path = File.join(storage_path, file_name)
+
+ # Put files into a directory before archiving
+ prefix = self.path_with_namespace + "/"
+
+ # Create file if not exists
+ unless File.exists?(file_path)
+ FileUtils.mkdir_p storage_path
+ file = self.repo.archive_to_file(ref, prefix, file_path)
+ end
+
+ file_path
end
end
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index c4ee35e0..8d7eb788 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -28,12 +28,12 @@ class Snippet < ActiveRecord::Base
validates :project, presence: true
validates :title, presence: true, length: { within: 0..255 }
validates :file_name, presence: true, length: { within: 0..255 }
- validates :content, presence: true
+ validates :content, presence: true, length: { within: 0..10000 }
# Scopes
- scope :fresh, -> { order("created_at DESC") }
- scope :non_expired, -> { where(["expires_at IS NULL OR expires_at > ?", Time.current]) }
- scope :expired, -> { where(["expires_at IS NOT NULL AND expires_at < ?", Time.current]) }
+ scope :fresh, order("created_at DESC")
+ scope :non_expired, where(["expires_at IS NULL OR expires_at > ?", Time.current])
+ scope :expired, where(["expires_at IS NOT NULL AND expires_at < ?", Time.current])
def self.content_types
[
diff --git a/app/models/system_hook.rb b/app/models/system_hook.rb
index 5cdf0466..5f1bd647 100644
--- a/app/models/system_hook.rb
+++ b/app/models/system_hook.rb
@@ -12,4 +12,13 @@
#
class SystemHook < WebHook
+ def self.all_hooks_fire(data)
+ SystemHook.all.each do |sh|
+ sh.async_execute data
+ end
+ end
+
+ def async_execute(data)
+ Sidekiq::Client.enqueue(SystemHookWorker, id, data)
+ end
end
diff --git a/app/models/project_team.rb b/app/models/team.rb
similarity index 72%
rename from app/models/project_team.rb
rename to app/models/team.rb
index f3e5c0e5..f235d20e 100644
--- a/app/models/project_team.rb
+++ b/app/models/team.rb
@@ -1,4 +1,4 @@
-class ProjectTeam
+class Team
attr_accessor :project
def initialize(project)
@@ -21,10 +21,6 @@ class ProjectTeam
end
end
- def get_tm user_id
- project.users_projects.find_by_user_id(user_id)
- end
-
def add_user(user, access)
add_users_ids([user.id], access)
end
@@ -66,6 +62,28 @@ class ProjectTeam
members.masters.map(&:user)
end
+ def repository_readers
+ repository_members[UsersProject::REPORTER]
+ end
+
+ def repository_writers
+ repository_members[UsersProject::DEVELOPER]
+ end
+
+ def repository_masters
+ repository_members[UsersProject::MASTER]
+ end
+
+ def repository_members
+ keys = Hash.new {|h,k| h[k] = [] }
+ UsersProject.select("keys.identifier, project_access").
+ joins(user: :keys).where(project_id: project.id).
+ each {|row| keys[row.project_access] << [row.identifier] }
+
+ keys[UsersProject::REPORTER] += project.deploy_keys.pluck(:identifier)
+ keys
+ end
+
def import(source_project)
target_project = project
@@ -90,6 +108,7 @@ class ProjectTeam
source_team.each do |tm|
tm.save
end
+ target_project.update_repository
end
true
diff --git a/app/models/tree.rb b/app/models/tree.rb
index 4b6c5b13..96395a42 100644
--- a/app/models/tree.rb
+++ b/app/models/tree.rb
@@ -26,12 +26,4 @@ class Tree
def empty?
data.blank?
end
-
- def up_dir?
- path.present?
- end
-
- def readme
- @readme ||= contents.find { |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }
- end
end
diff --git a/app/models/user.rb b/app/models/user.rb
index dcbf5812..d66ce411 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -22,18 +22,15 @@
# linkedin :string(255) default(""), not null
# twitter :string(255) default(""), not null
# authentication_token :string(255)
+# dark_scheme :boolean default(FALSE), not null
# theme_id :integer default(1), not null
# bio :string(255)
+# blocked :boolean default(FALSE), not null
# failed_attempts :integer default(0)
# locked_at :datetime
# extern_uid :string(255)
# provider :string(255)
# username :string(255)
-# can_create_group :boolean default(TRUE), not null
-# can_create_team :boolean default(TRUE), not null
-# state :string(255)
-# color_scheme_id :integer default(1), not null
-# notification_level :integer default(1), not null
#
class User < ActiveRecord::Base
@@ -41,67 +38,27 @@ class User < ActiveRecord::Base
:recoverable, :rememberable, :trackable, :validatable, :omniauthable, :registerable
attr_accessible :email, :password, :password_confirmation, :remember_me, :bio, :name, :username,
- :skype, :linkedin, :twitter, :color_scheme_id, :theme_id, :force_random_password,
+ :skype, :linkedin, :twitter, :dark_scheme, :theme_id, :force_random_password,
:extern_uid, :provider, as: [:default, :admin]
- attr_accessible :projects_limit, :can_create_team, :can_create_group, as: :admin
+ attr_accessible :projects_limit, as: :admin
attr_accessor :force_random_password
- # Virtual attribute for authenticating by either username or email
- attr_accessor :login
-
- # Add login to attr_accessible
- attr_accessible :login
-
-
- #
- # Relations
- #
-
# Namespace for personal projects
- has_one :namespace,
- dependent: :destroy,
- foreign_key: :owner_id,
- class_name: "Namespace",
- conditions: 'type IS NULL'
-
- # Profile
- has_many :keys, dependent: :destroy
-
- # Groups
+ has_one :namespace, class_name: "Namespace", foreign_key: :owner_id, conditions: 'type IS NULL', dependent: :destroy
has_many :groups, class_name: "Group", foreign_key: :owner_id
- # Teams
- has_many :own_teams,
- class_name: "UserTeam",
- foreign_key: :owner_id,
- dependent: :destroy
+ has_many :keys, dependent: :destroy
+ has_many :users_projects, dependent: :destroy
+ has_many :issues, foreign_key: :author_id, dependent: :destroy
+ has_many :notes, foreign_key: :author_id, dependent: :destroy
+ has_many :merge_requests, foreign_key: :author_id, dependent: :destroy
+ has_many :events, class_name: "Event", foreign_key: :author_id, dependent: :destroy
+ has_many :recent_events, class_name: "Event", foreign_key: :author_id, order: "id DESC"
+ has_many :assigned_issues, class_name: "Issue", foreign_key: :assignee_id, dependent: :destroy
+ has_many :assigned_merge_requests, class_name: "MergeRequest", foreign_key: :assignee_id, dependent: :destroy
- has_many :user_team_user_relationships, dependent: :destroy
- has_many :user_teams, through: :user_team_user_relationships
- has_many :user_team_project_relationships, through: :user_teams
- has_many :team_projects, through: :user_team_project_relationships
-
- # Projects
- has_many :users_projects, dependent: :destroy
- has_many :issues, dependent: :destroy, foreign_key: :author_id
- has_many :notes, dependent: :destroy, foreign_key: :author_id
- has_many :merge_requests, dependent: :destroy, foreign_key: :author_id
- has_many :events, dependent: :destroy, foreign_key: :author_id, class_name: "Event"
- has_many :assigned_issues, dependent: :destroy, foreign_key: :assignee_id, class_name: "Issue"
- has_many :assigned_merge_requests, dependent: :destroy, foreign_key: :assignee_id, class_name: "MergeRequest"
- has_many :projects, through: :users_projects
-
- has_many :recent_events,
- class_name: "Event",
- foreign_key: :author_id,
- order: "id DESC"
-
- #
- # Validations
- #
validates :name, presence: true
- validates :email, presence: true, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/ }
validates :bio, length: { within: 0..255 }
validates :extern_uid, allow_blank: true, uniqueness: {scope: :provider}
validates :projects_limit, presence: true, numericality: {greater_than_or_equal_to: 0}
@@ -109,9 +66,6 @@ class User < ActiveRecord::Base
format: { with: Gitlab::Regex.username_regex,
message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" }
- validates :notification_level,
- inclusion: { in: Notification.notification_levels },
- presence: true
validate :namespace_uniq, if: ->(user) { user.username_changed? }
@@ -121,46 +75,16 @@ class User < ActiveRecord::Base
delegate :path, to: :namespace, allow_nil: true, prefix: true
- state_machine :state, initial: :active do
- after_transition any => :blocked do |user, transition|
- # Remove user from all projects and
- user.users_projects.find_each do |membership|
- return false unless membership.destroy
- end
- end
-
- event :block do
- transition active: :blocked
- end
-
- event :activate do
- transition blocked: :active
- end
- end
-
# Scopes
- scope :admins, -> { where(admin: true) }
- scope :blocked, -> { with_state(:blocked) }
- scope :active, -> { with_state(:active) }
- scope :alphabetically, -> { order('name ASC') }
- scope :in_team, ->(team){ where(id: team.member_ids) }
- scope :not_in_team, ->(team){ where('users.id NOT IN (:ids)', ids: team.member_ids) }
- scope :potential_team_members, ->(team) { team.members.any? ? active.not_in_team(team) : active }
+ scope :admins, where(admin: true)
+ scope :blocked, where(blocked: true)
+ scope :active, where(blocked: false)
+ scope :alphabetically, order('name ASC')
#
# Class methods
#
class << self
- # Devise method overriden to allow sing in with email or username
- def find_for_database_authentication(warden_conditions)
- conditions = warden_conditions.dup
- if login = conditions.delete(:login)
- where(conditions).where(["lower(username) = :value OR lower(email) = :value", { value: login.downcase }]).first
- else
- where(conditions).first
- end
- end
-
def filter filter_name
case filter_name
when "admins"; self.admins
@@ -200,22 +124,13 @@ class User < ActiveRecord::Base
end
def search query
- where("name LIKE :query OR email LIKE :query OR username LIKE :query", query: "%#{query}%")
+ where("name LIKE :query or email LIKE :query", query: "%#{query}%")
end
end
#
# Instance methods
#
-
- def to_param
- username
- end
-
- def notification
- @notification ||= Notification.new(self)
- end
-
def generate_password
if self.force_random_password
self.password = self.password_confirmation = Devise.friendly_token.first(8)
@@ -281,6 +196,17 @@ class User < ActiveRecord::Base
UsersProject.where(project_id: authorized_projects.map(&:id), user_id: self.id)
end
+ # Returns a string for use as a Gitolite user identifier
+ #
+ # Note that Gitolite 2.x requires the following pattern for users:
+ #
+ # ^@?[0-9a-zA-Z][0-9a-zA-Z._\@+-]*$
+ def identifier
+ # Replace non-word chars with underscores, then make sure it starts with
+ # valid chars
+ email.gsub(/\W/, '_').gsub(/\A([\W\_])+/, '')
+ end
+
def is_admin?
admin
end
@@ -294,11 +220,11 @@ class User < ActiveRecord::Base
end
def can_create_project?
- projects_limit > owned_projects.count
+ projects_limit > personal_projects.count
end
def can_create_group?
- can?(:create_group, nil)
+ is_admin?
end
def abilities
@@ -322,7 +248,18 @@ class User < ActiveRecord::Base
end
def cared_merge_requests
- MergeRequest.cared(self)
+ MergeRequest.where("author_id = :id or assignee_id = :id", id: self.id)
+ end
+
+ # Remove user from all projects and
+ # set blocked attribute to true
+ def block
+ users_projects.find_each do |membership|
+ return false unless membership.destroy
+ end
+
+ self.blocked = true
+ save
end
def projects_limit_percent
@@ -350,23 +287,4 @@ class User < ActiveRecord::Base
def namespace_id
namespace.try :id
end
-
- def authorized_teams
- @authorized_teams ||= begin
- ids = []
- ids << UserTeam.with_member(self).pluck('user_teams.id')
- ids << UserTeam.created_by(self).pluck('user_teams.id')
- ids.flatten
-
- UserTeam.where(id: ids)
- end
- end
-
- def owned_teams
- UserTeam.where(owner_id: self.id)
- end
-
- def name_with_username
- "#{name} (#{username})"
- end
end
diff --git a/app/models/user_team.rb b/app/models/user_team.rb
deleted file mode 100644
index 5de2ac6a..00000000
--- a/app/models/user_team.rb
+++ /dev/null
@@ -1,117 +0,0 @@
-# == Schema Information
-#
-# Table name: user_teams
-#
-# id :integer not null, primary key
-# name :string(255)
-# path :string(255)
-# owner_id :integer
-# created_at :datetime not null
-# updated_at :datetime not null
-# description :string(255) default(""), not null
-#
-
-class UserTeam < ActiveRecord::Base
- attr_accessible :name, :description, :owner_id, :path
-
- belongs_to :owner, class_name: User
-
- has_many :user_team_project_relationships, dependent: :destroy
- has_many :user_team_user_relationships, dependent: :destroy
-
- has_many :projects, through: :user_team_project_relationships
- has_many :members, through: :user_team_user_relationships, source: :user
-
- validates :owner, presence: true
- validates :name, presence: true, uniqueness: true,
- length: { within: 0..255 },
- format: { with: Gitlab::Regex.name_regex,
- message: "only letters, digits, spaces & '_' '-' '.' allowed." }
- validates :description, length: { within: 0..255 }
- validates :path, uniqueness: true, presence: true, length: { within: 1..255 },
- format: { with: Gitlab::Regex.path_regex,
- message: "only letters, digits & '_' '-' '.' allowed. Letter should be first" }
-
- scope :with_member, ->(user){ joins(:user_team_user_relationships).where(user_team_user_relationships: {user_id: user.id}) }
- scope :with_project, ->(project){ joins(:user_team_project_relationships).where(user_team_project_relationships: {project_id: project})}
- scope :without_project, ->(project){ where("user_teams.id NOT IN (:ids)", ids: (a = with_project(project); a.blank? ? 0 : a))}
- scope :created_by, ->(user){ where(owner_id: user) }
-
- class << self
- def search query
- where("name LIKE :query OR path LIKE :query", query: "%#{query}%")
- end
-
- def global_id
- 'GLN'
- end
-
- def access_roles
- UsersProject.access_roles
- end
- end
-
- def to_param
- path
- end
-
- def assign_to_projects(projects, access)
- projects.each do |project|
- assign_to_project(project, access)
- end
- end
-
- def assign_to_project(project, access)
- Gitlab::UserTeamManager.assign(self, project, access)
- end
-
- def resign_from_project(project)
- Gitlab::UserTeamManager.resign(self, project)
- end
-
- def add_members(users, access, group_admin)
- # reject existing users
- users.reject! { |id| member_ids.include?(id.to_i) }
-
- users.each do |user|
- add_member(user, access, group_admin)
- end
- end
-
- def add_member(user, access, group_admin)
- Gitlab::UserTeamManager.add_member_into_team(self, user, access, group_admin)
- end
-
- def remove_member(user)
- Gitlab::UserTeamManager.remove_member_from_team(self, user)
- end
-
- def update_membership(user, options)
- Gitlab::UserTeamManager.update_team_user_membership(self, user, options)
- end
-
- def update_project_access(project, permission)
- Gitlab::UserTeamManager.update_project_greates_access(self, project, permission)
- end
-
- def max_project_access(project)
- user_team_project_relationships.find_by_project_id(project).greatest_access
- end
-
- def human_max_project_access(project)
- self.class.access_roles.invert[max_project_access(project)]
- end
-
- def default_projects_access(member)
- user_team_user_relationships.find_by_user_id(member).permission
- end
-
- def human_default_projects_access(member)
- self.class.access_roles.invert[default_projects_access(member)]
- end
-
- def admin?(member)
- user_team_user_relationships.with_user(member).first.group_admin?
- end
-
-end
diff --git a/app/models/user_team_project_relationship.rb b/app/models/user_team_project_relationship.rb
deleted file mode 100644
index 991510be..00000000
--- a/app/models/user_team_project_relationship.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# == Schema Information
-#
-# Table name: user_team_project_relationships
-#
-# id :integer not null, primary key
-# project_id :integer
-# user_team_id :integer
-# greatest_access :integer
-# created_at :datetime not null
-# updated_at :datetime not null
-#
-
-class UserTeamProjectRelationship < ActiveRecord::Base
- attr_accessible :greatest_access, :project_id, :user_team_id
-
- belongs_to :user_team
- belongs_to :project
-
- validates :project, presence: true
- validates :user_team, presence: true
- validate :check_greatest_access
-
- scope :with_project, ->(project){ where(project_id: project.id) }
-
- def team_name
- user_team.name
- end
-
- def human_max_access
- UserTeam.access_roles.key(greatest_access)
- end
-
- private
-
- def check_greatest_access
- errors.add(:base, :incorrect_access_code) unless correct_access?
- end
-
- def correct_access?
- return false if greatest_access.blank?
- return true if UsersProject.access_roles.has_value?(greatest_access)
- false
- end
-end
diff --git a/app/models/user_team_user_relationship.rb b/app/models/user_team_user_relationship.rb
deleted file mode 100644
index 1f7e2625..00000000
--- a/app/models/user_team_user_relationship.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-# == Schema Information
-#
-# Table name: user_team_user_relationships
-#
-# id :integer not null, primary key
-# user_id :integer
-# user_team_id :integer
-# group_admin :boolean
-# permission :integer
-# created_at :datetime not null
-# updated_at :datetime not null
-#
-
-class UserTeamUserRelationship < ActiveRecord::Base
- attr_accessible :group_admin, :permission, :user_id, :user_team_id
-
- belongs_to :user_team
- belongs_to :user
-
- validates :user_team, presence: true
- validates :user, presence: true
-
- scope :with_user, ->(user) { where(user_id: user.id) }
-
- def user_name
- user.name
- end
-
- def access_human
- UsersProject.access_roles.invert[permission]
- end
-end
diff --git a/app/models/users_project.rb b/app/models/users_project.rb
index c32edf38..79146289 100644
--- a/app/models/users_project.rb
+++ b/app/models/users_project.rb
@@ -11,7 +11,7 @@
#
class UsersProject < ActiveRecord::Base
- include Gitlab::ShellAdapter
+ include Gitolited
GUEST = 10
REPORTER = 20
@@ -25,21 +25,21 @@ class UsersProject < ActiveRecord::Base
attr_accessor :skip_git
+ after_save :update_repository, unless: :skip_git?
+ after_destroy :update_repository, unless: :skip_git?
+
validates :user, presence: true
validates :user_id, uniqueness: { scope: [:project_id], message: "already exists in project" }
validates :project_access, inclusion: { in: [GUEST, REPORTER, DEVELOPER, MASTER] }, presence: true
validates :project, presence: true
- delegate :name, :username, :email, to: :user, prefix: true
-
- scope :guests, -> { where(project_access: GUEST) }
- scope :reporters, -> { where(project_access: REPORTER) }
- scope :developers, -> { where(project_access: DEVELOPER) }
- scope :masters, -> { where(project_access: MASTER) }
+ delegate :name, :email, to: :user, prefix: true
+ scope :guests, where(project_access: GUEST)
+ scope :reporters, where(project_access: REPORTER)
+ scope :developers, where(project_access: DEVELOPER)
+ scope :masters, where(project_access: MASTER)
scope :in_project, ->(project) { where(project_id: project.id) }
- scope :in_projects, ->(projects) { where(project_id: projects.map { |p| p.id }) }
- scope :with_user, ->(user) { where(user_id: user.id) }
class << self
@@ -79,6 +79,7 @@ class UsersProject < ActiveRecord::Base
users_project.save
end
end
+ Gitlab::Gitolite.new.update_repositories(Project.where(id: project_ids))
end
true
@@ -93,6 +94,7 @@ class UsersProject < ActiveRecord::Base
users_project.skip_git = true
users_project.destroy
end
+ Gitlab::Gitolite.new.update_repositories(Project.where(id: project_ids))
end
true
@@ -123,6 +125,10 @@ class UsersProject < ActiveRecord::Base
end
end
+ def update_repository
+ gitolite.update_repository(project)
+ end
+
def project_access_human
Project.access_options.key(self.project_access)
end
diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb
index 3f22b108..df58fa93 100644
--- a/app/models/web_hook.rb
+++ b/app/models/web_hook.rb
@@ -28,18 +28,10 @@ class WebHook < ActiveRecord::Base
WebHook.post(url, body: data.to_json, headers: { "Content-Type" => "application/json" })
else
post_url = url.gsub("#{parsed_url.userinfo}@", "")
- auth = {
- username: URI.decode(parsed_url.user),
- password: URI.decode(parsed_url.password),
- }
WebHook.post(post_url,
body: data.to_json,
headers: {"Content-Type" => "application/json"},
- basic_auth: auth)
+ basic_auth: {username: parsed_url.user, password: parsed_url.password})
end
end
-
- def async_execute(data)
- Sidekiq::Client.enqueue(ProjectWebHookWorker, id, data)
- end
end
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb
deleted file mode 100644
index 497d69e8..00000000
--- a/app/models/wiki_page.rb
+++ /dev/null
@@ -1,181 +0,0 @@
-class WikiPage
- include ActiveModel::Validations
- include ActiveModel::Conversion
- include StaticModel
- extend ActiveModel::Naming
-
- def self.primary_key
- 'slug'
- end
-
- def self.model_name
- ActiveModel::Name.new(self, nil, 'wiki')
- end
-
- def to_key
- [:slug]
- end
-
- validates :title, presence: true
- validates :content, presence: true
-
- # The Gitlab GollumWiki instance.
- attr_reader :wiki
-
- # The raw Gollum::Page instance.
- attr_reader :page
-
- # The attributes Hash used for storing and validating
- # new Page values before writing to the Gollum repository.
- attr_accessor :attributes
-
- def initialize(wiki, page = nil, persisted = false)
- @wiki = wiki
- @page = page
- @persisted = persisted
- @attributes = {}.with_indifferent_access
-
- set_attributes if persisted?
- end
-
- # The escaped URL path of this page.
- def slug
- @attributes[:slug]
- end
-
- alias :to_param :slug
-
- # The formatted title of this page.
- def title
- @attributes[:title] || ""
- end
-
- # Sets the title of this page.
- def title=(new_title)
- @attributes[:title] = new_title
- end
-
- # The raw content of this page.
- def content
- @attributes[:content]
- end
-
- # The processed/formatted content of this page.
- def formatted_content
- @attributes[:formatted_content]
- end
-
- # The markup format for the page.
- def format
- @attributes[:format] || :markdown
- end
-
- # The commit message for this page version.
- def message
- version.try(:message)
- end
-
- # The Gitlab Commit instance for this page.
- def version
- return nil unless persisted?
-
- @version ||= Commit.new(Gitlab::Git::Commit.new(@page.version))
- end
-
- # Returns an array of Gitlab Commit instances.
- def versions
- return [] unless persisted?
-
- @page.versions.map { |v| Commit.new(Gitlab::Git::Commit.new(v)) }
- end
-
- # Returns the Date that this latest version was
- # created on.
- def created_at
- @page.version.date
- end
-
- # Returns boolean True or False if this instance
- # is an old version of the page.
- def historical?
- @page.historical?
- end
-
- # Returns boolean True or False if this instance
- # has been fully saved to disk or not.
- def persisted?
- @persisted == true
- end
-
- # Creates a new Wiki Page.
- #
- # attr - Hash of attributes to set on the new page.
- # :title - The title for the new page.
- # :content - The raw markup content.
- # :format - Optional symbol representing the
- # content format. Can be any type
- # listed in the GollumWiki::MARKUPS
- # Hash.
- # :message - Optional commit message to set on
- # the new page.
- #
- # Returns the String SHA1 of the newly created page
- # or False if the save was unsuccessful.
- def create(attr = {})
- @attributes.merge!(attr)
-
- save :create_page, title, content, format, message
- end
-
- # Updates an existing Wiki Page, creating a new version.
- #
- # new_content - The raw markup content to replace the existing.
- # format - Optional symbol representing the content format.
- # See GollumWiki::MARKUPS Hash for available formats.
- # message - Optional commit message to set on the new version.
- #
- # Returns the String SHA1 of the newly created page
- # or False if the save was unsuccessful.
- def update(new_content = "", format = :markdown, message = nil)
- @attributes[:content] = new_content
- @attributes[:format] = format
-
- save :update_page, @page, content, format, message
- end
-
- # Destroys the WIki Page.
- #
- # Returns boolean True or False.
- def delete
- if wiki.delete_page(@page)
- true
- else
- false
- end
- end
-
- private
-
- def set_attributes
- attributes[:slug] = @page.escaped_url_path
- attributes[:title] = @page.title
- attributes[:content] = @page.raw_data
- attributes[:formatted_content] = @page.formatted_data
- attributes[:format] = @page.format
- end
-
- def save(method, *args)
- if valid? && wiki.send(method, *args)
- @page = wiki.wiki.paged(title)
-
- set_attributes
-
- @persisted = true
- else
- errors.add(:base, wiki.error_message) if wiki.error_message
- @persisted = false
- end
- @persisted
- end
-
-end
diff --git a/app/observers/activity_observer.rb b/app/observers/activity_observer.rb
index ee3e4629..c188e572 100644
--- a/app/observers/activity_observer.rb
+++ b/app/observers/activity_observer.rb
@@ -1,15 +1,12 @@
-class ActivityObserver < BaseObserver
+class ActivityObserver < ActiveRecord::Observer
observe :issue, :merge_request, :note, :milestone
def after_create(record)
event_author_id = record.author_id
- if record.kind_of?(Note)
- # Skip system status notes like 'status changed to close'
- return true if record.note.include?("_Status changed to ")
-
- # Skip wall notes to prevent spaming of dashboard
- return true if record.noteable_type.blank?
+ # Skip status notes
+ if record.kind_of?(Note) && record.note.include?("_Status changed to ")
+ return true
end
if event_author_id
@@ -23,37 +20,15 @@ class ActivityObserver < BaseObserver
end
end
- def after_close(record, transition)
- Event.create(
- project: record.project,
- target_id: record.id,
- target_type: record.class.name,
- action: Event::CLOSED,
- author_id: record.author_id_of_changes
- )
- end
-
- def after_reopen(record, transition)
- Event.create(
- project: record.project,
- target_id: record.id,
- target_type: record.class.name,
- action: Event::REOPENED,
- author_id: record.author_id_of_changes
- )
- end
-
- def after_merge(record, transition)
- # Since MR can be merged via sidekiq
- # to prevent event duplication do this check
- return true if record.merge_event
-
- Event.create(
- project: record.project,
- target_id: record.id,
- target_type: record.class.name,
- action: Event::MERGED,
- author_id: record.author_id_of_changes
- )
+ def after_save(record)
+ if record.changed.include?("closed") && record.author_id_of_changes
+ Event.create(
+ project: record.project,
+ target_id: record.id,
+ target_type: record.class.name,
+ action: (record.closed ? Event::Closed : Event::Reopened),
+ author_id: record.author_id_of_changes
+ )
+ end
end
end
diff --git a/app/observers/base_observer.rb b/app/observers/base_observer.rb
deleted file mode 100644
index 182d3b7b..00000000
--- a/app/observers/base_observer.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class BaseObserver < ActiveRecord::Observer
- def notification
- NotificationService.new
- end
-
- def log_info message
- Gitlab::AppLogger.info message
- end
-end
diff --git a/app/observers/issue_observer.rb b/app/observers/issue_observer.rb
index 03ce4b95..262d0f89 100644
--- a/app/observers/issue_observer.rb
+++ b/app/observers/issue_observer.rb
@@ -1,30 +1,33 @@
-class IssueObserver < BaseObserver
+class IssueObserver < ActiveRecord::Observer
cattr_accessor :current_user
def after_create(issue)
- notification.new_issue(issue, current_user)
- end
-
- def after_close(issue, transition)
- notification.close_issue(issue, current_user)
-
- create_note(issue)
- end
-
- def after_reopen(issue, transition)
- create_note(issue)
+ if issue.assignee && issue.assignee != current_user
+ Notify.delay.new_issue_email(issue.id)
+ end
end
def after_update(issue)
- if issue.is_being_reassigned?
- notification.reassigned_issue(issue, current_user)
+ send_reassigned_email(issue) if issue.is_being_reassigned?
+
+ status = nil
+ status = 'closed' if issue.is_being_closed?
+ status = 'reopened' if issue.is_being_reopened?
+ if status
+ Note.create_status_change_note(issue, current_user, status)
+ [issue.author, issue.assignee].compact.each do |recipient|
+ Notify.delay.issue_status_changed_email(recipient.id, issue.id, status, current_user.id)
+ end
end
end
protected
- # Create issue note with service comment like 'Status changed to closed'
- def create_note(issue)
- Note.create_status_change_note(issue, current_user, issue.state)
+ def send_reassigned_email(issue)
+ recipient_ids = [issue.assignee_id, issue.assignee_id_was].keep_if {|id| id && id != current_user.id }
+
+ recipient_ids.each do |recipient_id|
+ Notify.delay.reassigned_issue_email(recipient_id, issue.id, issue.assignee_id_was)
+ end
end
end
diff --git a/app/observers/key_observer.rb b/app/observers/key_observer.rb
index 28fef55a..bf5fa647 100644
--- a/app/observers/key_observer.rb
+++ b/app/observers/key_observer.rb
@@ -1,19 +1,12 @@
-class KeyObserver < BaseObserver
- def after_save(key)
- GitlabShellWorker.perform_async(
- :add_key,
- key.shell_id,
- key.key
- )
+class KeyObserver < ActiveRecord::Observer
+ include Gitolited
- notification.new_key(key)
+ def after_save(key)
+ gitolite.set_key(key.identifier, key.key, key.projects)
end
def after_destroy(key)
- GitlabShellWorker.perform_async(
- :remove_key,
- key.shell_id,
- key.key,
- )
+ return if key.is_deploy_key && !key.last_deploy?
+ gitolite.remove_key(key.identifier, key.projects)
end
end
diff --git a/app/observers/merge_request_observer.rb b/app/observers/merge_request_observer.rb
index d0dfad88..6d3c2bdd 100644
--- a/app/observers/merge_request_observer.rb
+++ b/app/observers/merge_request_observer.rb
@@ -1,25 +1,31 @@
-class MergeRequestObserver < BaseObserver
+class MergeRequestObserver < ActiveRecord::Observer
cattr_accessor :current_user
def after_create(merge_request)
- notification.new_merge_request(merge_request, current_user)
- end
-
- def after_close(merge_request, transition)
- Note.create_status_change_note(merge_request, current_user, merge_request.state)
-
- notification.close_mr(merge_request, current_user)
- end
-
- def after_merge(merge_request, transition)
- notification.merge_mr(merge_request)
- end
-
- def after_reopen(merge_request, transition)
- Note.create_status_change_note(merge_request, current_user, merge_request.state)
+ if merge_request.assignee && merge_request.assignee != current_user
+ Notify.delay.new_merge_request_email(merge_request.id)
+ end
end
def after_update(merge_request)
- notification.reassigned_merge_request(merge_request, current_user) if merge_request.is_being_reassigned?
+ send_reassigned_email(merge_request) if merge_request.is_being_reassigned?
+
+ status = nil
+ status = 'closed' if merge_request.is_being_closed?
+ status = 'reopened' if merge_request.is_being_reopened?
+ if status
+ Note.create_status_change_note(merge_request, current_user, status)
+ end
+ end
+
+ protected
+
+ def send_reassigned_email(merge_request)
+ recipients_ids = merge_request.assignee_id_was, merge_request.assignee_id
+ recipients_ids.delete current_user.id
+
+ recipients_ids.each do |recipient_id|
+ Notify.delay.reassigned_merge_request_email(recipient_id, merge_request.id, merge_request.assignee_id_was)
+ end
end
end
diff --git a/app/observers/note_observer.rb b/app/observers/note_observer.rb
index 7b79161c..3f6d1dfc 100644
--- a/app/observers/note_observer.rb
+++ b/app/observers/note_observer.rb
@@ -1,5 +1,37 @@
-class NoteObserver < BaseObserver
+class NoteObserver < ActiveRecord::Observer
+
def after_create(note)
- notification.new_note(note)
+ send_notify_mails(note)
+ end
+
+ protected
+
+ def send_notify_mails(note)
+ if note.notify
+ notify_team(note)
+ elsif note.notify_author
+ # Notify only author of resource
+ Notify.delay.note_commit_email(note.commit_author.id, note.id)
+ else
+ # Otherwise ignore it
+ nil
+ end
+ end
+
+ # Notifies the whole team except the author of note
+ def notify_team(note)
+ # Note: wall posts are not "attached" to anything, so fall back to "Wall"
+ noteable_type = note.noteable_type.presence || "Wall"
+ notify_method = "note_#{noteable_type.underscore}_email".to_sym
+
+ if Notify.respond_to? notify_method
+ team_without_note_author(note).map do |u|
+ Notify.delay.send(notify_method, u.id, note.id)
+ end
+ end
+ end
+
+ def team_without_note_author(note)
+ note.project.users.reject { |u| u.id == note.author.id }
end
end
diff --git a/app/observers/project_observer.rb b/app/observers/project_observer.rb
index 7d7ecdd3..b1c69456 100644
--- a/app/observers/project_observer.rb
+++ b/app/observers/project_observer.rb
@@ -1,11 +1,6 @@
-class ProjectObserver < BaseObserver
+class ProjectObserver < ActiveRecord::Observer
def after_create(project)
- GitlabShellWorker.perform_async(
- :add_repository,
- project.path_with_namespace
- )
-
- log_info("#{project.owner.name} created a new project \"#{project.name_with_namespace}\"")
+ project.update_repository
end
def after_update(project)
@@ -13,18 +8,18 @@ class ProjectObserver < BaseObserver
end
def after_destroy(project)
- GitlabShellWorker.perform_async(
- :remove_repository,
- project.path_with_namespace
- )
-
- GitlabShellWorker.perform_async(
- :remove_repository,
- project.path_with_namespace + ".wiki"
- )
-
- project.satellite.destroy
-
log_info("Project \"#{project.name}\" was removed")
+
+ project.destroy_repository
+ end
+
+ def after_create project
+ log_info("#{project.owner.name} created a new project \"#{project.name}\"")
+ end
+
+ protected
+
+ def log_info message
+ Gitlab::AppLogger.info message
end
end
diff --git a/app/observers/system_hook_observer.rb b/app/observers/system_hook_observer.rb
index 3a649fd5..312cd2b3 100644
--- a/app/observers/system_hook_observer.rb
+++ b/app/observers/system_hook_observer.rb
@@ -1,11 +1,67 @@
-class SystemHookObserver < BaseObserver
+class SystemHookObserver < ActiveRecord::Observer
observe :user, :project, :users_project
-
+
def after_create(model)
- SystemHooksService.execute_hooks_for(model, :create)
+ if model.kind_of? Project
+ SystemHook.all_hooks_fire({
+ event_name: "project_create",
+ name: model.name,
+ path: model.path,
+ project_id: model.id,
+ owner_name: model.owner.name,
+ owner_email: model.owner.email,
+ created_at: model.created_at
+ })
+ elsif model.kind_of? User
+ SystemHook.all_hooks_fire({
+ event_name: "user_create",
+ name: model.name,
+ email: model.email,
+ created_at: model.created_at
+ })
+
+ elsif model.kind_of? UsersProject
+ SystemHook.all_hooks_fire({
+ event_name: "user_add_to_team",
+ project_name: model.project.name,
+ project_path: model.project.path,
+ project_id: model.project_id,
+ user_name: model.user.name,
+ user_email: model.user.email,
+ project_access: model.repo_access_human,
+ created_at: model.created_at
+ })
+
+ end
end
def after_destroy(model)
- SystemHooksService.execute_hooks_for(model, :destroy)
+ if model.kind_of? Project
+ SystemHook.all_hooks_fire({
+ event_name: "project_destroy",
+ name: model.name,
+ path: model.path,
+ project_id: model.id,
+ owner_name: model.owner.name,
+ owner_email: model.owner.email,
+ })
+ elsif model.kind_of? User
+ SystemHook.all_hooks_fire({
+ event_name: "user_destroy",
+ name: model.name,
+ email: model.email
+ })
+
+ elsif model.kind_of? UsersProject
+ SystemHook.all_hooks_fire({
+ event_name: "user_remove_from_team",
+ project_name: model.project.name,
+ project_path: model.project.path,
+ project_id: model.project_id,
+ user_name: model.user.name,
+ user_email: model.user.email,
+ project_access: model.repo_access_human
+ })
+ end
end
end
diff --git a/app/observers/user_observer.rb b/app/observers/user_observer.rb
index 6bb3c471..c1179ed7 100644
--- a/app/observers/user_observer.rb
+++ b/app/observers/user_observer.rb
@@ -1,8 +1,8 @@
-class UserObserver < BaseObserver
+class UserObserver < ActiveRecord::Observer
def after_create(user)
log_info("User \"#{user.name}\" (#{user.email}) was created")
- notification.new_user(user)
+ Notify.delay.new_user_email(user.id, user.password)
end
def after_destroy user
@@ -18,4 +18,10 @@ class UserObserver < BaseObserver
end
end
end
+
+ protected
+
+ def log_info message
+ Gitlab::AppLogger.info message
+ end
end
diff --git a/app/observers/users_project_observer.rb b/app/observers/users_project_observer.rb
index ca9649c7..b969d6a1 100644
--- a/app/observers/users_project_observer.rb
+++ b/app/observers/users_project_observer.rb
@@ -1,26 +1,21 @@
-class UsersProjectObserver < BaseObserver
+class UsersProjectObserver < ActiveRecord::Observer
def after_commit(users_project)
return if users_project.destroyed?
+ Notify.delay.project_access_granted_email(users_project.id)
end
def after_create(users_project)
Event.create(
project_id: users_project.project.id,
- action: Event::JOINED,
+ action: Event::Joined,
author_id: users_project.user.id
)
-
- notification.new_team_member(users_project)
- end
-
- def after_update(users_project)
- notification.update_team_member(users_project)
end
def after_destroy(users_project)
Event.create(
project_id: users_project.project.id,
- action: Event::LEFT,
+ action: Event::Left,
author_id: users_project.user.id
)
end
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb
deleted file mode 100644
index 383e6398..00000000
--- a/app/services/git_push_service.rb
+++ /dev/null
@@ -1,125 +0,0 @@
-class GitPushService
- attr_accessor :project, :user, :push_data
-
- # This method will be called after each git update
- # and only if the provided user and project is present in GitLab.
- #
- # All callbacks for post receive action should be placed here.
- #
- # Now this method do next:
- # 1. Ensure project satellite exists
- # 2. Update merge requests
- # 3. Execute project web hooks
- # 4. Execute project services
- # 5. Create Push Event
- #
- def execute(project, user, oldrev, newrev, ref)
- @project, @user = project, user
-
- # Collect data for this git push
- @push_data = post_receive_data(oldrev, newrev, ref)
-
- create_push_event
-
- project.ensure_satellite_exists
- project.discover_default_branch
- project.repository.expire_cache
-
- if push_to_branch?(ref, oldrev)
- project.update_merge_requests(oldrev, newrev, ref, @user)
- project.execute_hooks(@push_data.dup)
- project.execute_services(@push_data.dup)
- end
- end
-
- # This method provide a sample data
- # generated with post_receive_data method
- # for given project
- #
- def sample_data(project, user)
- @project, @user = project, user
- commits = project.repository.commits(project.default_branch, nil, 3)
- post_receive_data(commits.last.id, commits.first.id, "refs/heads/#{project.default_branch}")
- end
-
- protected
-
- def create_push_event
- Event.create(
- project: project,
- action: Event::PUSHED,
- data: push_data,
- author_id: push_data[:user_id]
- )
- end
-
- # Produce a hash of post-receive data
- #
- # data = {
- # before: String,
- # after: String,
- # ref: String,
- # user_id: String,
- # user_name: String,
- # repository: {
- # name: String,
- # url: String,
- # description: String,
- # homepage: String,
- # },
- # commits: Array,
- # total_commits_count: Fixnum
- # }
- #
- def post_receive_data(oldrev, newrev, ref)
- push_commits = project.repository.commits_between(oldrev, newrev)
-
- # Total commits count
- push_commits_count = push_commits.size
-
- # Get latest 20 commits ASC
- push_commits_limited = push_commits.last(20)
-
- # Hash to be passed as post_receive_data
- data = {
- before: oldrev,
- after: newrev,
- ref: ref,
- user_id: user.id,
- user_name: user.name,
- repository: {
- name: project.name,
- url: project.url_to_repo,
- description: project.description,
- homepage: project.web_url,
- },
- commits: [],
- total_commits_count: push_commits_count
- }
-
- # For performance purposes maximum 20 latest commits
- # will be passed as post receive hook data.
- #
- push_commits_limited.each do |commit|
- data[:commits] << {
- id: commit.id,
- message: commit.safe_message,
- timestamp: commit.date.xmlschema,
- url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/commit/#{commit.id}",
- author: {
- name: commit.author_name,
- email: commit.author_email
- }
- }
- end
-
- data
- end
-
- def push_to_branch? ref, oldrev
- ref_parts = ref.split('/')
-
- # Return if this is not a push to a branch (e.g. new commits)
- !(ref_parts[1] !~ /heads/ || oldrev == "00000000000000000000000000000000")
- end
-end
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
deleted file mode 100644
index f8779fd5..00000000
--- a/app/services/notification_service.rb
+++ /dev/null
@@ -1,197 +0,0 @@
-# NotificationService class
-#
-# Used for notifing users with emails about different events
-#
-# Ex.
-# NotificationService.new.new_issue(issue, current_user)
-#
-class NotificationService
- # Always notify user about ssh key added
- # only if ssh key is not deploy key
- #
- # This is security email so it will be sent
- # even if user disabled notifications
- def new_key(key)
- if key.user
- Notify.delay.new_ssh_key_email(key.id)
- end
- end
-
- # When create an issue we should send next emails:
- #
- # * issue assignee if his notification level is not Disabled
- # * project team members with notification level higher then Participating
- #
- def new_issue(issue, current_user)
- new_resource_email(issue, 'new_issue_email')
- end
-
- # When we close an issue we should send next emails:
- #
- # * issue author if his notification level is not Disabled
- # * issue assignee if his notification level is not Disabled
- # * project team members with notification level higher then Participating
- #
- def close_issue(issue, current_user)
- close_resource_email(issue, current_user, 'closed_issue_email')
- end
-
- # When we reassign an issue we should send next emails:
- #
- # * issue old assignee if his notification level is not Disabled
- # * issue new assignee if his notification level is not Disabled
- #
- def reassigned_issue(issue, current_user)
- reassign_resource_email(issue, current_user, 'reassigned_issue_email')
- end
-
-
- # When create a merge request we should send next emails:
- #
- # * mr assignee if his notification level is not Disabled
- #
- def new_merge_request(merge_request, current_user)
- new_resource_email(merge_request, 'new_merge_request_email')
- end
-
- # When we reassign a merge_request we should send next emails:
- #
- # * merge_request old assignee if his notification level is not Disabled
- # * merge_request assignee if his notification level is not Disabled
- #
- def reassigned_merge_request(merge_request, current_user)
- reassign_resource_email(merge_request, current_user, 'reassigned_merge_request_email')
- end
-
- # When we close a merge request we should send next emails:
- #
- # * merge_request author if his notification level is not Disabled
- # * merge_request assignee if his notification level is not Disabled
- # * project team members with notification level higher then Participating
- #
- def close_mr(merge_request, current_user)
- close_resource_email(merge_request, current_user, 'closed_merge_request_email')
- end
-
- # When we merge a merge request we should send next emails:
- #
- # * merge_request author if his notification level is not Disabled
- # * merge_request assignee if his notification level is not Disabled
- # * project team members with notification level higher then Participating
- #
- def merge_mr(merge_request)
- recipients = reject_muted_users([merge_request.author, merge_request.assignee])
- recipients = recipients.concat(project_watchers(merge_request.project)).uniq
-
- recipients.each do |recipient|
- Notify.delay.merged_merge_request_email(recipient.id, merge_request.id)
- end
- end
-
- # Notify new user with email after creation
- def new_user(user)
- # Dont email omniauth created users
- Notify.delay.new_user_email(user.id, user.password) unless user.extern_uid?
- end
-
- # Notify users on new note in system
- #
- # TODO: split on methods and refactor
- #
- def new_note(note)
- # ignore wall messages
- return true unless note.noteable_type.present?
-
- opts = { noteable_type: note.noteable_type, project_id: note.project_id }
-
- if note.commit_id.present?
- opts.merge!(commit_id: note.commit_id)
- recipients = [note.commit_author]
- else
- opts.merge!(noteable_id: note.noteable_id)
- target = note.noteable
- recipients = []
- recipients << target.assignee if target.respond_to?(:assignee)
- recipients << target.author if target.respond_to?(:author)
- end
-
- # Get users who left comment in thread
- recipients = recipients.concat(User.where(id: Note.where(opts).pluck(:author_id)))
-
- # Merge project watchers
- recipients = recipients.concat(project_watchers(note.project)).compact.uniq
-
- # Reject mutes users
- recipients = reject_muted_users(recipients)
-
- # Reject author
- recipients.delete(note.author)
-
- # build notify method like 'note_commit_email'
- notify_method = "note_#{note.noteable_type.underscore}_email".to_sym
-
- recipients.each do |recipient|
- Notify.delay.send(notify_method, recipient.id, note.id)
- end
- end
-
- def new_team_member(users_project)
- Notify.delay.project_access_granted_email(users_project.id)
- end
-
- def update_team_member(users_project)
- Notify.delay.project_access_granted_email(users_project.id)
- end
-
- protected
-
- # Get project users with WATCH notification level
- def project_watchers(project)
- project.users.where(notification_level: Notification::N_WATCH)
- end
-
- # Remove users with disabled notifications from array
- # Also remove duplications and nil recipients
- def reject_muted_users(users)
- users.compact.uniq.reject do |user|
- user.notification.disabled?
- end
- end
-
- def new_resource_email(target, method)
- recipients = reject_muted_users([target.assignee])
- recipients = recipients.concat(project_watchers(target.project)).uniq
- recipients.delete(target.author)
-
- recipients.each do |recipient|
- Notify.delay.send(method, recipient.id, target.id)
- end
- end
-
- def close_resource_email(target, current_user, method)
- recipients = reject_muted_users([target.author, target.assignee])
- recipients = recipients.concat(project_watchers(target.project)).uniq
- recipients.delete(current_user)
-
- recipients.each do |recipient|
- Notify.delay.send(method, recipient.id, target.id, current_user.id)
- end
- end
-
- def reassign_resource_email(target, current_user, method)
- recipients = User.where(id: [target.assignee_id, target.assignee_id_was])
-
- # Add watchers to email list
- recipients = recipients.concat(project_watchers(target.project))
-
- # reject users with disabled notifications
- recipients = reject_muted_users(recipients)
-
- # Reject me from recipients if I reassign an item
- recipients.delete(current_user)
-
- recipients.each do |recipient|
- Notify.delay.send(method, recipient.id, target.id, target.assignee_id_was)
- end
- end
-end
diff --git a/app/services/project_transfer_service.rb b/app/services/project_transfer_service.rb
deleted file mode 100644
index 3b8c4847..00000000
--- a/app/services/project_transfer_service.rb
+++ /dev/null
@@ -1,36 +0,0 @@
-# ProjectTransferService class
-#
-# Used for transfer project to another namespace
-#
-class ProjectTransferService
- include Gitlab::ShellAdapter
-
- class TransferError < StandardError; end
-
- attr_accessor :project
-
- def transfer(project, new_namespace)
- Project.transaction do
- old_path = project.path_with_namespace
- new_path = File.join(new_namespace.try(:path) || '', project.path)
-
- if Project.where(path: project.path, namespace_id: new_namespace.try(:id)).present?
- raise TransferError.new("Project with same path in target namespace already exists")
- end
-
- project.namespace = new_namespace
- project.save!
-
- # Move main repository
- unless gitlab_shell.mv_repository(old_path, new_path)
- raise TransferError.new('Cannot move project')
- end
-
- # Move wiki repo also if present
- gitlab_shell.mv_repository("#{old_path}.wiki", "#{new_path}.wiki")
-
- true
- end
- end
-end
-
diff --git a/app/services/system_hooks_service.rb b/app/services/system_hooks_service.rb
deleted file mode 100644
index 132bb14a..00000000
--- a/app/services/system_hooks_service.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-class SystemHooksService
- def self.execute_hooks_for(model, event)
- execute_hooks(build_event_data(model, event))
- end
-
- private
-
- def self.execute_hooks(data)
- SystemHook.all.each do |sh|
- async_execute_hook sh, data
- end
- end
-
- def self.async_execute_hook(hook, data)
- Sidekiq::Client.enqueue(SystemHookWorker, hook.id, data)
- end
-
- def self.build_event_data(model, event)
- data = {
- event_name: build_event_name(model, event),
- created_at: model.created_at
- }
-
- case model
- when Project
- data.merge!({
- name: model.name,
- path: model.path,
- project_id: model.id,
- owner_name: model.owner.name,
- owner_email: model.owner.email
- })
- when User
- data.merge!({
- name: model.name,
- email: model.email
- })
- when UsersProject
- data.merge!({
- project_name: model.project.name,
- project_path: model.project.path,
- project_id: model.project_id,
- user_name: model.user.name,
- user_email: model.user.email,
- project_access: model.repo_access_human
- })
- end
- end
-
- def self.build_event_name(model, event)
- case model
- when UsersProject
- return "user_add_to_team" if event == :create
- return "user_remove_from_team" if event == :destroy
- else
- "#{model.class.name.downcase}_#{event.to_s}"
- end
- end
-end
diff --git a/app/uploaders/attachment_uploader.rb b/app/uploaders/attachment_uploader.rb
index 200700b8..391731d9 100644
--- a/app/uploaders/attachment_uploader.rb
+++ b/app/uploaders/attachment_uploader.rb
@@ -8,23 +8,6 @@ class AttachmentUploader < CarrierWave::Uploader::Base
end
def image?
- img_ext = %w(png jpg jpeg)
- if file.respond_to?(:extension)
- img_ext.include?(file.extension)
- else
- # Not all CarrierWave storages respond to :extension
- ext = file.path.split('.').last
- img_ext.include?(ext)
- end
- rescue
- false
- end
-
- def secure_url
- if self.class.storage == CarrierWave::Storage::File
- "/files/#{model.class.to_s.underscore}/#{model.id}/#{file.filename}"
- else
- url
- end
+ %w(png jpg jpeg).include?(file.extension)
end
end
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml
index 46a87629..9a5e7ede 100644
--- a/app/views/admin/dashboard/index.html.haml
+++ b/app/views/admin/dashboard/index.html.haml
@@ -6,7 +6,7 @@
= link_to admin_projects_path do
%h1= Project.count
%hr
- = link_to 'New Project', new_project_path, class: "btn btn-small"
+ = link_to 'New Project', new_project_path, class: "btn small"
.span4
.ui-box
%h5.title Groups
@@ -14,7 +14,7 @@
= link_to admin_groups_path do
%h1= Group.count
%hr
- = link_to 'New Group', new_admin_group_path, class: "btn btn-small"
+ = link_to 'New Group', new_admin_group_path, class: "btn small"
.span4
.ui-box
%h5.title Users
@@ -22,7 +22,7 @@
= link_to admin_users_path do
%h1= User.count
%hr
- = link_to 'New User', new_admin_user_path, class: "btn btn-small"
+ = link_to 'New User', new_admin_user_path, class: "btn small"
.row
.span4
@@ -31,7 +31,7 @@
- @projects.each do |project|
%p
= link_to project.name_with_namespace, [:admin, project]
- %span.light.pull-right
+ %span.light.right
= time_ago_in_words project.created_at
ago
@@ -42,7 +42,7 @@
%p
= link_to [:admin, user] do
= user.name
- %span.light.pull-right
+ %span.light.right
= time_ago_in_words user.created_at
ago
@@ -51,25 +51,25 @@
%hr
%p
Issues
- %span.light.pull-right
+ %span.light.right
= Issue.count
%p
Merge Requests
- %span.light.pull-right
+ %span.light.right
= MergeRequest.count
%p
Notes
- %span.light.pull-right
+ %span.light.right
= Note.count
%p
Snippets
- %span.light.pull-right
+ %span.light.right
= Snippet.count
%p
SSH Keys
- %span.light.pull-right
+ %span.light.right
= Key.count
%p
Milestones
- %span.light.pull-right
+ %span.light.right
= Milestone.count
diff --git a/app/views/admin/groups/edit.html.haml b/app/views/admin/groups/edit.html.haml
index bb1398f6..901d07e7 100644
--- a/app/views/admin/groups/edit.html.haml
+++ b/app/views/admin/groups/edit.html.haml
@@ -1,8 +1,8 @@
-%h3.page_title Edit Group
+%h3.page_title Rename Group
%hr
= form_for [:admin, @group] do |f|
- if @group.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
%span= @group.errors.full_messages.first
.clearfix.group_name_holder
= f.label :name do
@@ -10,10 +10,7 @@
.input
= f.text_field :name, placeholder: "Example Group", class: "xxlarge"
- .clearfix.group-description-holder
- = f.label :description, "Details"
- .input
- = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
+
.clearfix.group_name_holder
= f.label :path do
@@ -27,5 +24,5 @@
%li It will change the git path to repositories under this group.
.form-actions
- = f.submit 'Edit group', class: "btn btn-remove"
- = link_to 'Cancel', admin_groups_path, class: "btn btn-cancel"
+ = f.submit 'Rename group', class: "btn danger"
+ = link_to 'Cancel', admin_groups_path, class: "btn cancel-btn"
diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml
index 0029cc78..49acedc8 100644
--- a/app/views/admin/groups/index.html.haml
+++ b/app/views/admin/groups/index.html.haml
@@ -4,11 +4,11 @@
allows you to keep projects organized.
Use groups for uniting related projects.
- = link_to 'New Group', new_admin_group_path, class: "btn btn-small pull-right"
+ = link_to 'New Group', new_admin_group_path, class: "btn small right"
%br
= form_tag admin_groups_path, method: :get, class: 'form-inline' do
= text_field_tag :name, params[:name], class: "xlarge"
- = submit_tag "Search", class: "btn submit btn-primary"
+ = submit_tag "Search", class: "btn submit primary"
%table
%thead
@@ -16,7 +16,6 @@
%th
Name
%i.icon-sort-down
- %th Description
%th Path
%th Projects
%th Owner
@@ -26,12 +25,11 @@
%tr
%td
%strong= link_to group.name, [:admin, group]
- %td= truncate group.description
%td= group.path
%td= group.projects.count
%td
- = link_to group.owner_name, admin_user_path(group.owner)
+ = link_to group.owner_name, admin_user_path(group.owner_id)
%td.bgred
- = link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-small"
- = link_to 'Destroy', [:admin, group], confirm: "REMOVE #{group.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
+ = link_to 'Rename', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn small"
+ = link_to 'Destroy', [:admin, group], confirm: "REMOVE #{group.name}? Are you sure?", method: :delete, class: "btn small danger"
= paginate @groups, theme: "admin"
diff --git a/app/views/admin/groups/new.html.haml b/app/views/admin/groups/new.html.haml
index 3fa63e1b..6ff0e781 100644
--- a/app/views/admin/groups/new.html.haml
+++ b/app/views/admin/groups/new.html.haml
@@ -2,21 +2,15 @@
%hr
= form_for [:admin, @group] do |f|
- if @group.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
%span= @group.errors.full_messages.first
.clearfix
= f.label :name do
Group name is
.input
= f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
- .clearfix.group-description-holder
- = f.label :description, "Details"
- .input
- = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
-
- .form-actions
- = f.submit 'Create group', class: "btn btn-primary"
-
+
+ = f.submit 'Create group', class: "btn primary"
%hr
.padded
%ul
diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml
index 63ea78fd..0a25b125 100644
--- a/app/views/admin/groups/show.html.haml
+++ b/app/views/admin/groups/show.html.haml
@@ -14,28 +14,22 @@
%td
= @group.name
- = link_to edit_admin_group_path(@group), class: "btn btn-small pull-right" do
+ = link_to edit_admin_group_path(@group), class: "btn btn-small right" do
%i.icon-edit
- Edit
- %tr
- %td
- %b
- Description:
- %td
- = @group.description
+ Rename
%tr
%td
%b
Path:
%td
- %span.monospace= File.join(Gitlab.config.gitlab_shell.repos_path, @group.path)
+ %span.monospace= File.join(Gitlab.config.gitolite.repos_path, @group.path)
%tr
%td
%b
Owner:
%td
= @group.owner_name
- .pull-right
+ .right
= link_to "#", class: "btn btn-small change-owner-link" do
%i.icon-edit
Change owner
@@ -48,7 +42,7 @@
= form_for [:admin, @group] do |f|
= f.select :owner_id, User.all.map { |user| [user.name, user.id] }, {}, {class: 'chosen'}
%div
- = f.submit 'Change Owner', class: "btn btn-remove"
+ = f.submit 'Change Owner', class: "btn danger"
= link_to "Cancel", "#", class: "btn change-owner-cancel-link"
- if @group.projects.any?
@@ -69,7 +63,7 @@
%span.monospace= project.path_with_namespace + ".git"
%td= project.users.count
%td.bgred
- = link_to 'Transfer project to global namespace', remove_project_admin_group_path(@group, project_id: project.id), confirm: 'Remove project from group and move to global namespace. Are you sure?', method: :delete, class: "btn btn-remove small"
+ = link_to 'Transfer project to global namespace', remove_project_admin_group_path(@group, project_id: project.id), confirm: 'Remove project from group and move to global namespace. Are you sure?', method: :delete, class: "btn danger small"
= form_tag project_teams_update_admin_group_path(@group), id: "new_team_member", class: "bulk_import", method: :put do
%table.zebra-striped
@@ -78,23 +72,22 @@
%th Users
%th Project Access:
- - @group.users.each do |user|
- - next unless user
- %tr{class: "user_#{user.id}"}
- %td.name= link_to user.name, admin_user_path(user)
+ - @group.users.each do |u|
+ %tr{class: "user_#{u.id}"}
+ %td.name= link_to u.name, admin_user_path(u)
%td.projects_access
- - user.authorized_projects.in_namespace(@group).each do |project|
- - u_p = user.users_projects.in_project(project).first
+ - u.authorized_projects.in_namespace(@group).each do |project|
+ - u_p = u.users_projects.in_project(project).first
- next unless u_p
%span
- = project.name_with_namespace
- = link_to "(#{ u_p.project_access_human })", edit_admin_project_member_path(project, user)
+ = project.name
+ = link_to "(#{ u_p.project_access_human })", edit_admin_team_member_path(u_p)
%tr
%td.input= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5'
%td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"}
%tr
- %td= submit_tag 'Add user to projects in group', class: "btn btn-primary"
+ %td= submit_tag 'Add user to projects in group', class: "btn primary"
%td
Read more about project permissions
%strong= link_to "here", help_permissions_path, class: "vlink"
@@ -116,7 +109,7 @@
.input
= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5'
.form-actions
- = submit_tag 'Add', class: "btn btn-primary"
+ = submit_tag 'Add', class: "btn primary"
:javascript
$(function(){
diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml
index acbf7a10..f17355fb 100644
--- a/app/views/admin/hooks/index.html.haml
+++ b/app/views/admin/hooks/index.html.haml
@@ -7,7 +7,7 @@
= form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-inline' } do |f|
-if @hook.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
- @hook.errors.full_messages.each do |msg|
%p= msg
.clearfix
@@ -15,7 +15,7 @@
.input
= f.text_field :url, class: "text_field xxlarge"
- = f.submit "Add System Hook", class: "btn btn-primary"
+ = f.submit "Add System Hook", class: "btn primary"
%hr
-if @hooks.any?
@@ -33,7 +33,7 @@
%td
= link_to admin_hook_path(hook) do
%strong= hook.url
- = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small pull-right"
+ = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn small right"
%td POST
%td
- = link_to 'Remove', admin_hook_path(hook), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small pull-right"
+ = link_to 'Remove', admin_hook_path(hook), confirm: 'Are you sure?', method: :delete, class: "danger btn small right"
diff --git a/app/views/admin/logs/show.html.haml b/app/views/admin/logs/show.html.haml
index fef72186..c8be2ffa 100644
--- a/app/views/admin/logs/show.html.haml
+++ b/app/views/admin/logs/show.html.haml
@@ -8,14 +8,14 @@
%li
= link_to "sidekiq.log", "#sidekiq", 'data-toggle' => 'tab'
-%p.light To prevent performance issues admin logs output the last 2000 lines
+%p.light To prevent perfomance issues admin logs output the last 2000 lines
.tab-content
.tab-pane.active#githost
.file_holder#README
.file_title
%i.icon-file
githost.log
- .pull-right
+ .right
= link_to '#', class: 'log-bottom' do
%i.icon-arrow-down
Scroll down
@@ -29,7 +29,7 @@
.file_title
%i.icon-file
application.log
- .pull-right
+ .right
= link_to '#', class: 'log-bottom' do
%i.icon-arrow-down
Scroll down
@@ -43,7 +43,7 @@
.file_title
%i.icon-file
production.log
- .pull-right
+ .right
= link_to '#', class: 'log-bottom' do
%i.icon-arrow-down
Scroll down
@@ -57,7 +57,7 @@
.file_title
%i.icon-file
sidekiq.log
- .pull-right
+ .right
= link_to '#', class: 'log-bottom' do
%i.icon-arrow-down
Scroll down
diff --git a/app/views/admin/projects/_form.html.haml b/app/views/admin/projects/_form.html.haml
new file mode 100644
index 00000000..0c7cf68e
--- /dev/null
+++ b/app/views/admin/projects/_form.html.haml
@@ -0,0 +1,77 @@
+= form_for [:admin, project] do |f|
+ -if project.errors.any?
+ .alert-message.block-message.error
+ %ul
+ - project.errors.full_messages.each do |msg|
+ %li= msg
+
+ .clearfix.project_name_holder
+ = f.label :name do
+ Project name is
+ .input
+ = f.text_field :name, placeholder: "Example Project", class: "xxlarge"
+
+ - if project.repo_exists?
+ %fieldset.adv_settings
+ %legend Advanced settings:
+ .clearfix
+ = f.label :path do
+ Path
+ .input
+ = text_field_tag :ppath, @project.repository.path_to_repo, class: "xlarge", disabled: true
+
+ .clearfix
+ = f.label :default_branch, "Default Branch"
+ .input= f.select(:default_branch, @project.repository.heads.map(&:name), {}, style: "width:210px;")
+
+ %fieldset.adv_settings
+ %legend Features:
+
+ .clearfix
+ = f.label :issues_enabled, "Issues"
+ .input= f.check_box :issues_enabled
+
+ .clearfix
+ = f.label :merge_requests_enabled, "Merge Requests"
+ .input= f.check_box :merge_requests_enabled
+
+ .clearfix
+ = f.label :wall_enabled, "Wall"
+ .input= f.check_box :wall_enabled
+
+ .clearfix
+ = f.label :wiki_enabled, "Wiki"
+ .input= f.check_box :wiki_enabled
+
+ %fieldset.features
+ %legend Public mode:
+ .clearfix
+ = f.label :public do
+ %span Allow public http clone
+ .input= f.check_box :public
+
+ %fieldset.features
+ %legend Transfer:
+ .control-group
+ = f.label :namespace_id do
+ %span Namespace
+ .controls
+ = f.select :namespace_id, namespaces_options(@project.namespace_id, :all), {}, {class: 'chosen'}
+ %br
+ %ul.prepend-top-10.cred
+ %li Be careful. Changing project namespace can have unintended side effects
+ %li You can transfer project only to namespaces you can manage
+ %li You will need to update your local repositories to point to the new location.
+
+
+ .actions
+ = f.submit 'Save Project', class: "btn save-btn"
+ = link_to 'Cancel', admin_projects_path, class: "btn cancel-btn"
+
+
+
+:javascript
+ $(function(){
+ new Projects();
+ })
+
diff --git a/app/views/admin/projects/edit.html.haml b/app/views/admin/projects/edit.html.haml
new file mode 100644
index 00000000..7b59a0cc
--- /dev/null
+++ b/app/views/admin/projects/edit.html.haml
@@ -0,0 +1,3 @@
+%h3.page_title #{@project.name} → Edit project
+%hr
+= render 'form', project: @project
diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml
index 82d5fdcd..e47cda76 100644
--- a/app/views/admin/projects/index.html.haml
+++ b/app/views/admin/projects/index.html.haml
@@ -1,6 +1,6 @@
%h3.page_title
Projects
- = link_to 'New Project', new_project_path, class: "btn btn-small pull-right"
+ = link_to 'New Project', new_project_path, class: "btn small right"
%hr
@@ -37,7 +37,7 @@
.form-actions
- = submit_tag "Search", class: "btn submit btn-primary"
+ = submit_tag "Search", class: "btn submit primary"
= link_to "Reset", admin_projects_path, class: "btn"
.span8
.ui-box
@@ -51,9 +51,9 @@
- else
%i.icon-lock.cgreen
= link_to project.name_with_namespace, [:admin, project]
- .pull-right
- = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
- = link_to 'Destroy', [project], confirm: "REMOVE #{project.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
+ .right
+ = link_to 'Edit', edit_admin_project_path(project), id: "edit_#{dom_id(project)}", class: "btn small"
+ = link_to 'Destroy', [:admin, project], confirm: "REMOVE #{project.name}? Are you sure?", method: :delete, class: "btn small danger"
- if @projects.blank?
%p.nothing_here_message 0 projects matches
- else
diff --git a/app/views/admin/projects/members/_form.html.haml b/app/views/admin/projects/members/_form.html.haml
deleted file mode 100644
index 80412029..00000000
--- a/app/views/admin/projects/members/_form.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-= form_for @team_member_relation, as: :team_member, url: admin_project_member_path(@project, @member) do |f|
- -if @team_member_relation.errors.any?
- .alert.alert-error
- %ul
- - @team_member_relation.errors.full_messages.each do |msg|
- %li= msg
-
- .clearfix
- %label Project Access:
- .input
- = f.select :project_access, options_for_select(Project.access_options, @team_member_relation.project_access), {}, class: "project-access-select chosen span3"
-
- %br
- .actions
- = f.submit 'Save', class: "btn btn-primary"
- = link_to 'Cancel', :back, class: "btn"
diff --git a/app/views/admin/projects/members/edit.html.haml b/app/views/admin/projects/members/edit.html.haml
deleted file mode 100644
index 2d76deb2..00000000
--- a/app/views/admin/projects/members/edit.html.haml
+++ /dev/null
@@ -1,8 +0,0 @@
-%p.slead
- Edit access for
- = link_to @member.name, admin_user_path(@member)
- in
- = link_to @project.name_with_namespace, admin_project_path(@project)
-
-%hr
-= render 'form'
diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml
index 92b89601..8e0d8232 100644
--- a/app/views/admin/projects/show.html.haml
+++ b/app/views/admin/projects/show.html.haml
@@ -1,90 +1,153 @@
%h3.page_title
Project: #{@project.name_with_namespace}
- = link_to edit_project_path(@project), class: "btn pull-right" do
+ = link_to edit_admin_project_path(@project), class: "btn right" do
%i.icon-edit
Edit
-%hr
-.row
- .span6
- .ui-box
- %h5.title
- Project info:
- %ul.well-list
- %li
- %span.light Name:
- %strong= @project.name
- %li
- %span.light Namespace:
- %strong
- - if @project.namespace
- = link_to @project.namespace.human_name, [:admin, @project.group || @project.owner]
- - else
- Global
- %li
- %span.light Owned by:
- %strong
- - if @project.owner
- = link_to @project.owner_name, admin_user_path(@project.owner)
- - else
- (deleted)
- %li
- %span.light Created by:
- %strong
- = @project.creator.try(:name) || '(deleted)'
+- if @repository && @repository.has_commits?
+ - if !@repository.has_post_receive_file?
+ %br
+ .alert.alert-error
+ %span
+ %strong Project has commits but missing post-receive file.
+ %br
+ If you exported project manually - make a link of post-receive hook file from gitolite to project repository
+ - elsif !@repository.valid_post_receive_file?
+ %br
+ .alert.alert-error
+ %span
+ %strong Project has invalid post-receive file.
+ %br
+ 1. Make sure your gitolite instace has latest post-receive file.
+ %br
+ 2. Make a link of post-receive hook file from gitolite to project repository
- %li
- %span.light Created at:
- %strong
- = @project.created_at.stamp("March 1, 1999")
- %li
- %span.light http:
- %strong
- = link_to @project.http_url_to_repo
- %li
- %span.light ssh:
- %strong
- = link_to @project.ssh_url_to_repo
- - if @project.repository.exists?
- %li
- %span.light fs:
- %strong
- = @repository.path_to_repo
+%br
+%table.zebra-striped
+ %thead
+ %tr
+ %th Project
+ %th
+ %tr
+ %td
+ %b
+ Name:
+ %td
+ = @project.name
+ %tr
+ %td
+ %b
+ Namespace:
+ %td
+ - if @project.namespace
+ = @project.namespace.human_name
+ - else
+ Global
+ %tr
+ %td
+ %b
+ Owned by:
+ %td
+ - if @project.owner
+ = link_to @project.owner_name, admin_user_path(@project.owner)
+ - else
+ (deleted)
+ %tr
+ %td
+ %b
+ Created by:
+ %td
+ = @project.creator.try(:name) || '(deleted)'
+ %tr
+ %td
+ %b
+ Created at:
+ %td
+ = @project.created_at.stamp("March 1, 1999")
+ %tr
+ %td
+ %b
+ Smart HTTP:
+ %td
+ = link_to @project.http_url_to_repo
+ %tr
+ %td
+ %b
+ SSH:
+ %td
+ = link_to @project.ssh_url_to_repo
+ - if @project.public
+ %tr.bgred
+ %td
+ %b
+ Public Read-Only Code access:
+ %td
+ = check_box_tag 'public', nil, @project.public
- %li
- %span.light last commit:
- %strong
- = last_commit(@project)
- - else
- %li
- %span.light repository:
- %strong.cred
- does not exist
+- if @repository
+ %table.zebra-striped
+ %thead
+ %tr
+ %th Repository
+ %th
+ %tr
+ %td
+ %b
+ FS Path:
+ %td
+ %code= @repository.path_to_repo
+ %tr
+ %td
+ %b
+ Last commit at:
+ %td
+ = last_commit(@project)
+ %tr
+ %td
+ %b
+ Post Receive File:
+ %td
+ = check_box_tag :post_receive_file, 1, @repository.has_post_receive_file?, disabled: true
- %li
- %span.light access:
- %strong
- - if @project.public
- %span.cblue
- %i.icon-share
- Public
- - else
- %span.cgreen
- %i.icon-lock
- Private
- .span6
- .ui-box
- %h5.title
- Team
- %small
- (#{@project.users.count})
- = link_to project_team_index_path(@project), class: "btn btn-tiny" do
- %i.icon-edit
- Edit Team
- %ul.well-list.team_members
- - @project.users.each do |tm|
- %li
- %strong
- = link_to tm.name, admin_user_path(tm)
- %span.pull-right.light= @project.project_access_human(tm)
+%br
+%h5
+ Team
+ %small
+ (#{@project.users_projects.count})
+%br
+%table.zebra-striped
+ %thead
+ %tr
+ %th Name
+ %th Project Access
+ %th Repository Access
+ %th
+
+ - @project.users_projects.each do |tm|
+ %tr
+ %td
+ = link_to tm.user_name, admin_user_path(tm.user)
+ %td= tm.project_access_human
+ %td= link_to 'Edit Access', edit_admin_team_member_path(tm), class: "btn small"
+ %td= link_to 'Remove from team', admin_team_member_path(tm), confirm: 'Are you sure?', method: :delete, class: "btn danger small"
+
+%br
+%h5 Add new team member
+%br
+= form_tag team_update_admin_project_path(@project), class: "bulk_import", method: :put do
+ %table.zebra-striped
+ %thead
+ %tr
+ %th Users
+ %th Project Access:
+
+ %tr
+ %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5'
+ %td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"}
+
+ %tr
+ %td= submit_tag 'Add', class: "btn primary"
+ %td
+ Read more about project permissions
+ %strong= link_to "here", help_permissions_path, class: "vlink"
diff --git a/app/views/admin/projects/team.html.haml b/app/views/admin/projects/team.html.haml
new file mode 100644
index 00000000..e69de29b
diff --git a/app/views/admin/team_members/_form.html.haml b/app/views/admin/team_members/_form.html.haml
new file mode 100644
index 00000000..9cd94fdd
--- /dev/null
+++ b/app/views/admin/team_members/_form.html.haml
@@ -0,0 +1,16 @@
+= form_for @admin_team_member, as: :team_member, url: admin_team_member_path(@admin_team_member) do |f|
+ -if @admin_team_member.errors.any?
+ .alert-message.block-message.error
+ %ul
+ - @admin_team_member.errors.full_messages.each do |msg|
+ %li= msg
+
+ .clearfix
+ %label Project Access:
+ .input
+ = f.select :project_access, options_for_select(Project.access_options, @admin_team_member.project_access), {}, class: "project-access-select chosen span3"
+
+ %br
+ .actions
+ = f.submit 'Save', class: "btn primary"
+ = link_to 'Cancel', :back, class: "btn"
diff --git a/app/views/admin/team_members/edit.html.haml b/app/views/admin/team_members/edit.html.haml
new file mode 100644
index 00000000..aea9bd70
--- /dev/null
+++ b/app/views/admin/team_members/edit.html.haml
@@ -0,0 +1,8 @@
+%p.slead
+ Edit access for
+ = link_to @admin_team_member.user_name, admin_user_path(@admin_team_member)
+ in
+ = link_to @admin_team_member.project.name_with_namespace, admin_project_path(@admin_team_member)
+
+%hr
+= render 'form'
diff --git a/app/views/admin/teams/edit.html.haml b/app/views/admin/teams/edit.html.haml
deleted file mode 100644
index 0a3d993b..00000000
--- a/app/views/admin/teams/edit.html.haml
+++ /dev/null
@@ -1,28 +0,0 @@
-%h3.page_title Edit Team
-%hr
-= form_for @team, url: admin_team_path(@team), method: :put do |f|
- - if @team.errors.any?
- .alert.alert-error
- %span= @team.errors.full_messages.first
- .clearfix.team_name_holder
- = f.label :name do
- Team name is
- .input
- = f.text_field :name, placeholder: "Example Team", class: "xxlarge"
-
- .clearfix.team-description-holder
- = f.label :description, "Details"
- .input
- = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
-
- .clearfix.team_name_holder
- = f.label :path do
- %span.cred Team path is
- .input
- = f.text_field :path, placeholder: "example-team", class: "xxlarge danger"
- %ul.cred
- %li It will change web url for access team and team projects.
-
- .form-actions
- = f.submit 'Edit team', class: "btn btn-remove"
- = link_to 'Cancel', admin_teams_path, class: "btn btn-cancel"
diff --git a/app/views/admin/teams/index.html.haml b/app/views/admin/teams/index.html.haml
deleted file mode 100644
index 3690d6d9..00000000
--- a/app/views/admin/teams/index.html.haml
+++ /dev/null
@@ -1,43 +0,0 @@
-%h3.page_title
- Teams
- %small
- simple Teams description
-
- = link_to 'New Team', new_admin_team_path, class: "btn btn-small pull-right"
- %br
-
-= form_tag admin_teams_path, method: :get, class: 'form-inline' do
- = text_field_tag :name, params[:name], class: "xlarge"
- = submit_tag "Search", class: "btn submit btn-primary"
-
-%table
- %thead
- %tr
- %th
- Name
- %i.icon-sort-down
- %th Description
- %th Path
- %th Projects
- %th Members
- %th Owner
- %th.cred Danger Zone!
-
- - @teams.each do |team|
- %tr
- %td
- %strong= link_to team.name, admin_team_path(team)
- %td= truncate team.description
- %td= team.path
- %td= team.projects.count
- %td= team.members.count
- %td
- - if team.owner
- = link_to team.owner.name, admin_user_path(team.owner)
- - else
- (deleted)
- %td.bgred
- = link_to 'Edit', edit_admin_team_path(team), id: "edit_#{dom_id(team)}", class: "btn btn-small"
- = link_to 'Destroy', admin_team_path(team), confirm: "REMOVE #{team.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
-
-= paginate @teams, theme: "admin"
diff --git a/app/views/admin/teams/members/_form.html.haml b/app/views/admin/teams/members/_form.html.haml
deleted file mode 100644
index f1388aab..00000000
--- a/app/views/admin/teams/members/_form.html.haml
+++ /dev/null
@@ -1,20 +0,0 @@
-= form_tag admin_team_member_path(@team, @member), method: :put do
- -if @member.errors.any?
- .alert.alert-error
- %ul
- - @member.errors.full_messages.each do |msg|
- %li= msg
-
- .clearfix
- %label Default access for Team projects:
- .input
- = select_tag :default_project_access, options_for_select(UserTeam.access_roles, @team.default_projects_access(@member)), class: "project-access-select chosen span3"
- .clearfix
- %label Team admin?
- .input
- = check_box_tag :group_admin, true, @team.admin?(@member)
-
- %br
- .actions
- = submit_tag 'Save', class: "btn btn-primary"
- = link_to 'Cancel', :back, class: "btn"
diff --git a/app/views/admin/teams/members/edit.html.haml b/app/views/admin/teams/members/edit.html.haml
deleted file mode 100644
index a82847ee..00000000
--- a/app/views/admin/teams/members/edit.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-%h3
- Edit access #{@member.name} in #{@team.name} team
-
-%hr
-%table.zebra-striped
- %tr
- %td User:
- %td= @member.name
- %tr
- %td Team:
- %td= @team.name
- %tr
- %td Since:
- %td= member_since(@team, @member).stamp("Nov 11, 2010")
-
-= render 'form'
diff --git a/app/views/admin/teams/members/new.html.haml b/app/views/admin/teams/members/new.html.haml
deleted file mode 100644
index d3929cb7..00000000
--- a/app/views/admin/teams/members/new.html.haml
+++ /dev/null
@@ -1,29 +0,0 @@
-%h3.page_title
- Team: #{@team.name}
-
-%fieldset
- %legend Members (#{@team.members.count})
- = form_tag admin_team_members_path(@team), id: "team_members", class: "bulk_import", method: :post do
- %table#members_list
- %thead
- %tr
- %th User name
- %th Default project access
- %th Team access
- %th
- - @team.members.each do |member|
- %tr.member
- %td
- = link_to [:admin, member] do
- = member.name
- %small= "(#{member.email})"
- %td= @team.human_default_projects_access(member)
- %td= @team.admin?(member) ? "Admin" : "Member"
- %td
- %tr
- %td= select_tag :user_ids, options_from_collection_for_select(@users , :id, :name_with_username), multiple: true, data: {placeholder: 'Select users'}, class: 'chosen span5'
- %td= select_tag :default_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" }
- %td
- %span= check_box_tag :group_admin
- %span Admin?
- %td= submit_tag 'Add', class: "btn btn-primary", id: :add_members_to_team
diff --git a/app/views/admin/teams/new.html.haml b/app/views/admin/teams/new.html.haml
deleted file mode 100644
index 1c90cb20..00000000
--- a/app/views/admin/teams/new.html.haml
+++ /dev/null
@@ -1,26 +0,0 @@
-%h3.page_title New Team
-%hr
-= form_for @team, url: admin_teams_path do |f|
- - if @team.errors.any?
- .alert.alert-error
- %span= @team.errors.full_messages.first
- .clearfix
- = f.label :name do
- Team name is
- .input
- = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
-
- .clearfix.team-description-holder
- = f.label :description, "Details"
- .input
- = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
-
- .form-actions
- = f.submit 'Create team', class: "btn btn-primary"
-
- %hr
- .padded
- %ul
- %li All created teams are public (users can view who enter into team and which project are assigned for this team)
- %li People within a team see only projects they have access to
- %li You will be able to assign existing projects for team
diff --git a/app/views/admin/teams/projects/_form.html.haml b/app/views/admin/teams/projects/_form.html.haml
deleted file mode 100644
index 5b79d518..00000000
--- a/app/views/admin/teams/projects/_form.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-= form_tag admin_team_project_path(@team, @project), method: :put do
- -if @project.errors.any?
- .alert.alert-error
- %ul
- - @project.errors.full_messages.each do |msg|
- %li= msg
-
- .clearfix
- %label Max access for Team members:
- .input
- = select_tag :greatest_project_access, options_for_select(UserTeam.access_roles, @team.max_project_access(@project)), class: "project-access-select chosen span3"
-
- %br
- .actions
- = submit_tag 'Save', class: "btn btn-primary"
- = link_to 'Cancel', :back, class: "btn"
diff --git a/app/views/admin/teams/projects/edit.html.haml b/app/views/admin/teams/projects/edit.html.haml
deleted file mode 100644
index b91a4982..00000000
--- a/app/views/admin/teams/projects/edit.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-%h3
- Edit max access in #{@project.name} for #{@team.name} team
-
-%hr
-%table.zebra-striped
- %tr
- %td Project:
- %td= @project.name
- %tr
- %td Team:
- %td= @team.name
- %tr
- %td Since:
- %td= assigned_since(@team, @project).stamp("Nov 11, 2010")
-
-= render 'form'
diff --git a/app/views/admin/teams/projects/new.html.haml b/app/views/admin/teams/projects/new.html.haml
deleted file mode 100644
index b60dad35..00000000
--- a/app/views/admin/teams/projects/new.html.haml
+++ /dev/null
@@ -1,23 +0,0 @@
-%h3.page_title
- Team: #{@team.name}
-
-%fieldset
- %legend Projects (#{@team.projects.count})
- = form_tag admin_team_projects_path(@team), id: "assign_projects", class: "bulk_import", method: :post do
- %table#projects_list
- %thead
- %tr
- %th Project name
- %th Max access
- %th
- - @team.projects.each do |project|
- %tr.project
- %td
- = link_to project.name_with_namespace, [:admin, project]
- %td
- %span= @team.human_max_project_access(project)
- %td
- %tr
- %td= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5'
- %td= select_tag :greatest_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" }
- %td= submit_tag 'Add', class: "btn btn-primary", id: :assign_projects_to_team
diff --git a/app/views/admin/teams/show.html.haml b/app/views/admin/teams/show.html.haml
deleted file mode 100644
index abdfada8..00000000
--- a/app/views/admin/teams/show.html.haml
+++ /dev/null
@@ -1,107 +0,0 @@
-%h3.page_title
- Team: #{@team.name}
-
-%br
-%table.zebra-striped
- %thead
- %tr
- %th Team
- %th
- %tr
- %td
- %b
- Name:
- %td
- = @team.name
-
- = link_to edit_admin_team_path(@team), class: "btn btn-small pull-right" do
- %i.icon-edit
- Edit
- %tr
- %td
- %b
- Description:
- %td
- = @team.description
- %tr
- %td
- %b
- Owner:
- %td
- = @team.owner.name
- .pull-right
- = link_to "#", class: "btn btn-small change-owner-link" do
- %i.icon-edit
- Change owner
-
- %tr.change-owner-holder.hide
- %td.bgred
- %b.cred
- New Owner:
- %td.bgred
- = form_for @team, url: admin_team_path(@team) do |f|
- = f.select :owner_id, User.all.map { |user| [user.name, user.id] }, {}, {class: 'chosen'}
- %div
- = f.submit 'Change Owner', class: "btn btn-remove"
- = link_to "Cancel", "#", class: "btn change-owner-cancel-link"
-
-%fieldset
- %legend
- Members (#{@team.members.count})
- %span= link_to 'Add members', new_admin_team_member_path(@team), class: "btn btn-primary btn-small pull-right", id: :add_members_to_team
- - if @team.members.any?
- %table#members_list
- %thead
- %tr
- %th User name
- %th Default project access
- %th Team access
- %th.cred.span3 Danger Zone!
- - @team.members.each do |member|
- %tr.member{ class: "user_#{member.id}"}
- %td
- = link_to [:admin, member] do
- = member.name
- %small= "(#{member.email})"
- %td= @team.human_default_projects_access(member)
- %td= @team.admin?(member) ? "Admin" : "Member"
- %td.bgred
- = link_to 'Edit', edit_admin_team_member_path(@team, member), class: "btn btn-small"
-
- = link_to 'Remove', admin_team_member_path(@team, member), confirm: 'Remove member from team. Are you sure?', method: :delete, class: "btn btn-remove btn-small", id: "remove_member_#{member.id}"
-
-%fieldset
- %legend
- Projects (#{@team.projects.count})
- %span= link_to 'Add projects', new_admin_team_project_path(@team), class: "btn btn-primary btn-small pull-right", id: :assign_projects_to_team
- - if @team.projects.any?
- %table#projects_list
- %thead
- %tr
- %th Project name
- %th Max access
- %th.cred.span3 Danger Zone!
- - @team.projects.each do |project|
- %tr.project
- %td
- = link_to project.name_with_namespace, [:admin, project]
- %td
- %span= @team.human_max_project_access(project)
- %td.bgred
- = link_to 'Edit', edit_admin_team_project_path(@team, project), class: "btn btn-small"
-
- = link_to 'Relegate', admin_team_project_path(@team, project), confirm: 'Remove project from team. Are you sure?', method: :delete, class: "btn btn-remove small", id: "relegate_project_#{project.id}"
-
-:javascript
- $(function(){
- var modal = $('.change-owner-holder');
- $('.change-owner-link').bind("click", function(){
- $(this).hide();
- modal.show();
- });
- $('.change-owner-cancel-link').bind("click", function(){
- modal.hide();
- $('.change-owner-link').show();
- })
- })
-
diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml
index 1d1fe341..45195152 100644
--- a/app/views/admin/users/_form.html.haml
+++ b/app/views/admin/users/_form.html.haml
@@ -11,17 +11,17 @@
.clearfix
= f.label :name
.input
- = f.text_field :name, required: true, autocomplete: "off"
+ = f.text_field :name, required: true
%span.help-inline * required
.clearfix
= f.label :username
.input
- = f.text_field :username, required: true, autocomplete: "off"
+ = f.text_field :username, required: true
%span.help-inline * required
.clearfix
= f.label :email
.input
- = f.text_field :email, required: true, autocomplete: "off"
+ = f.text_field :email, required: true
%span.help-inline * required
%fieldset
@@ -46,14 +46,6 @@
= f.label :projects_limit
.input= f.number_field :projects_limit
- .clearfix
- = f.label :can_create_group
- .input= f.check_box :can_create_group
-
- .clearfix
- = f.label :can_create_team
- .input= f.check_box :can_create_team
-
.clearfix
= f.label :admin do
%strong.cred Administrator
@@ -61,12 +53,12 @@
.span4
- unless @admin_user.new_record?
.alert.alert-error
- - if @admin_user.blocked?
+ - if @admin_user.blocked
%p This user is blocked and is not able to login to GitLab
- = link_to 'Unblock User', unblock_admin_user_path(@admin_user), method: :put, class: "btn btn-small"
+ = link_to 'Unblock User', unblock_admin_user_path(@admin_user), method: :put, class: "btn small"
- else
%p Blocked users will be removed from all projects & will not be able to login to GitLab.
- = link_to 'Block User', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove"
+ = link_to 'Block User', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small danger"
%fieldset
%legend Profile
.clearfix
@@ -80,8 +72,8 @@
.input= f.text_field :twitter
.actions
- = f.submit 'Save', class: "btn btn-save"
+ = f.submit 'Save', class: "btn save-btn"
- if @admin_user.new_record?
- = link_to 'Cancel', admin_users_path, class: "btn btn-cancel"
+ = link_to 'Cancel', admin_users_path, class: "btn cancel-btn"
- else
- = link_to 'Cancel', admin_user_path(@admin_user), class: "btn btn-cancel"
+ = link_to 'Cancel', admin_user_path(@admin_user), class: "btn cancel-btn"
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index 9da2871e..87290abe 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -1,62 +1,58 @@
%h3.page_title
Users
- = link_to 'New User', new_admin_user_path, class: "btn btn-small pull-right"
+ = link_to 'New User', new_admin_user_path, class: "btn small right"
%br
-.row
- .span3
- .admin-filter
- = form_tag admin_users_path, method: :get, class: 'form-inline' do
- = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'search-text-input span2'
- = button_tag type: 'submit', class: 'btn' do
- %i.icon-search
- %ul.nav.nav-pills.nav-stacked
- %li{class: "#{'active' unless params[:filter]}"}
- = link_to admin_users_path do
- Active
- %small.pull-right= User.active.count
- %li{class: "#{'active' if params[:filter] == "admins"}"}
- = link_to admin_users_path(filter: "admins") do
- Admins
- %small.pull-right= User.admins.count
- %li{class: "#{'active' if params[:filter] == "blocked"}"}
- = link_to admin_users_path(filter: "blocked") do
- Blocked
- %small.pull-right= User.blocked.count
- %li{class: "#{'active' if params[:filter] == "wop"}"}
- = link_to admin_users_path(filter: "wop") do
- Without projects
- %small.pull-right= User.without_projects.count
- %hr
- = link_to 'Reset', admin_users_path, class: "btn btn-cancel"
+= form_tag admin_users_path, method: :get, class: 'form-inline' do
+ = text_field_tag :name, params[:name], class: "xlarge"
+ = submit_tag "Search", class: "btn submit primary"
+%ul.nav.nav-tabs
+ %li{class: "#{'active' unless params[:filter]}"}
+ = link_to admin_users_path do
+ Active
+ %span.badge= User.active.count
+ %li{class: "#{'active' if params[:filter] == "admins"}"}
+ = link_to admin_users_path(filter: "admins") do
+ Admins
+ %span.badge= User.admins.count
+ %li{class: "#{'active' if params[:filter] == "blocked"}"}
+ = link_to admin_users_path(filter: "blocked") do
+ Blocked
+ %span.badge= User.blocked.count
+ %li{class: "#{'active' if params[:filter] == "wop"}"}
+ = link_to admin_users_path(filter: "wop") do
+ Without projects
+ %span.badge= User.without_projects.count
- .span9
- .ui-box
- %h5.title
- Users (#{@admin_users.total_count})
- %ul.well-list
- - @admin_users.each do |user|
- %li
- - if user.blocked?
- %i.icon-lock.cred
- - else
- %i.icon-user.cgreen
- = link_to user.name, [:admin, user]
- - if user.admin?
- %strong.cred (Admin)
- - if user == current_user
- %span.cred It's you!
- .pull-right
- %span.light
- %i.icon-envelope
- = mail_to user.email, user.email, class: 'light'
-
- = link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-small"
- - unless user == current_user
- - if user.blocked?
- = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-small success"
- - else
- = link_to 'Block', block_admin_user_path(user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove"
- = link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn btn-small btn-remove"
- %li.bottom
- = paginate @admin_users, theme: "gitlab"
+%table
+ %thead
+ %tr
+ %th Admin
+ %th
+ Name
+ %i.icon-sort-down
+ %th Username
+ %th Email
+ %th Projects
+ %th Edit
+ %th.cred Danger Zone!
+
+ - @admin_users.each do |user|
+ %tr
+ %td= check_box_tag "admin", 1, user.admin, disabled: :disabled
+ %td= link_to user.name, [:admin, user]
+ %td= user.username
+ %td= user.email
+ %td= user.users_projects.count
+ %td= link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn small"
+ %td.bgred
+ - if user == current_user
+ %span.cred It's you!
+ - else
+ - if user.blocked
+ = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn small success"
+ - else
+ = link_to 'Block', block_admin_user_path(user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small danger"
+ = link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn small danger"
+
+= paginate @admin_users, theme: "admin"
diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml
index b813f859..a3be6614 100644
--- a/app/views/admin/users/show.html.haml
+++ b/app/views/admin/users/show.html.haml
@@ -1,94 +1,127 @@
-.row
- .span6
- %h3.page_title
- = image_tag gravatar_icon(@admin_user.email, 90), class: "avatar s90"
- = @admin_user.name
- - if @admin_user.blocked?
- %span.cred (Blocked)
- - if @admin_user.admin
- %span.cred (Admin)
- .pull-right
- = link_to edit_admin_user_path(@admin_user), class: "btn pull-right" do
- %i.icon-edit
- Edit
- %br
- %small @#{@admin_user.username}
- %br
- %small member since #{@admin_user.created_at.stamp("Nov 12, 2031")}
- .clearfix
- %hr
- %p
- %span.btn.btn-small
- %i.icon-envelope
- = mail_to @admin_user.email
- - unless @admin_user == current_user
- - if @admin_user.blocked?
- = link_to 'Unblock', unblock_admin_user_path(@admin_user), method: :put, class: "btn btn-small success"
- - else
- = link_to 'Block', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove"
- = link_to 'Destroy', [:admin, @admin_user], confirm: "USER #{@admin_user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn btn-small btn-remove"
- %hr
- %h5
- Add User to Projects
- %small
+%h3.page_title
+ User: #{@admin_user.name}
+ - if @admin_user.blocked
+ %small Blocked
+ - if @admin_user.admin
+ %small Administrator
+ = link_to edit_admin_user_path(@admin_user), class: "btn right" do
+ %i.icon-edit
+ Edit
+
+%br
+
+%table.zebra-striped
+ %thead
+ %tr
+ %th Profile
+ %th
+ %tr
+ %td
+ %b
+ Email:
+ %td
+ = @admin_user.email
+ %tr
+ %td
+ %b
+ Username:
+ %td
+ = @admin_user.username
+ %tr
+ %td
+ %b
+ Admin:
+ %td= check_box_tag "admin", 1, @admin_user.admin, disabled: :disabled
+ %tr
+ %td
+ %b
+ Blocked:
+ %td= check_box_tag "blocked", 1, @admin_user.blocked, disabled: :disabled
+ %tr
+ %td
+ %b
+ Created at:
+ %td
+ = @admin_user.created_at.stamp("March 1, 1999")
+ %tr
+ %td
+ %b
+ Projects limit:
+ %td
+ = @admin_user.projects_limit
+ - unless @admin_user.skype.empty?
+ %tr
+ %td
+ %b
+ Skype:
+ %td
+ = @admin_user.skype
+ - unless @admin_user.linkedin.empty?
+ %tr
+ %td
+ %b
+ Linkedin:
+ %td
+ = @admin_user.linkedin
+ - unless @admin_user.twitter.empty?
+ %tr
+ %td
+ %b
+ Twitter:
+ %td
+ = @admin_user.twitter
+
+%br
+%h5 Add User to Projects
+%br
+= form_tag team_update_admin_user_path(@admin_user), class: "bulk_import", method: :put do
+ %table
+ %thead
+ %tr
+ %th Projects
+ %th Project Access:
+
+ %tr
+ %td= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5'
+ %td= select_tag :project_access, options_for_select(Project.access_options), class: "project-access-select chosen span3"
+
+ %tr
+ %td= submit_tag 'Add', class: "btn primary"
+ %td
Read more about project permissions
%strong= link_to "here", help_permissions_path, class: "vlink"
- %br
- = form_tag team_update_admin_user_path(@admin_user), class: "bulk_import", method: :put do
- .control-group
- = label_tag :project_ids, "Projects", class: 'control-label'
- .controls
- = select_tag :project_ids, options_from_collection_for_select(@not_in_projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span3'
- .control-group
- = label_tag :project_access, "Project Access", class: 'control-label'
- .controls
- = select_tag :project_access, options_for_select(Project.access_options), class: "project-access-select chosen span3"
+%br
- .form-actions
- = submit_tag 'Add', class: "btn btn-create"
- .pull-right
- %br
+- if @admin_user.groups.present?
+ %h5 Owner of groups:
+ %br
- - if @admin_user.owned_groups.present?
- .ui-box
- %h5.title Owned groups:
- %ul.well-list
- - @admin_user.groups.each do |group|
- %li
- %strong= link_to group.name, admin_group_path(group)
+ %table.zebra-striped
+ %thead
+ %tr
+ %th Name
- - if @admin_user.owned_teams.present?
- .ui-box
- %h5.title Owned teams:
- %ul.well-list
- - @admin_user.owned_teams.each do |team|
- %li
- %strong= link_to team.name, admin_team_path(team)
+ - @admin_user.groups.each do |group|
+ %tr
+ %td= link_to group.name, admin_group_path(group)
- .span6
- = render 'users/profile', user: @admin_user
- .ui-box
- %h5.title Projects (#{@projects.count})
- %ul.well-list
- - @projects.each do |project|
- %li
- = link_to admin_project_path(project), class: dom_class(project) do
- - if project.namespace
- = project.namespace.human_name
- \/
- %strong.well-title
- = truncate(project.name, length: 45)
- %span.pull-right.light
- - if project.owner == @admin_user
- %i.icon-wrench
- - tm = project.team.get_tm(@admin_user.id)
- - if tm
- = tm.project_access_human
- = link_to edit_admin_project_member_path(project, tm.user), class: "btn btn-small" do
- %i.icon-edit
- = link_to admin_project_member_path(project, tm.user), confirm: 'Are you sure?', method: :delete, class: "btn btn-small btn-remove" do
- %i.icon-remove
- %p.light
- %i.icon-wrench
- – user is a project owner
+- if @admin_user.authorized_projects.present?
+ %h5 Authorized Projects:
+ %br
+
+ %table.zebra-striped
+ %thead
+ %tr
+ %th Name
+ %th Project Access
+ %th
+ %th
+
+ - @admin_user.tm_in_authorized_projects.each do |tm|
+ - project = tm.project
+ %tr
+ %td= link_to project.name_with_namespace, admin_project_path(project)
+ %td= tm.project_access_human
+ %td= link_to 'Edit Access', edit_admin_team_member_path(tm), class: "btn small"
+ %td= link_to 'Remove from team', admin_team_member_path(tm), confirm: 'Are you sure?', method: :delete, class: "btn small danger"
diff --git a/app/views/blame/_head.html.haml b/app/views/blame/_head.html.haml
index 3a883829..85da1805 100644
--- a/app/views/blame/_head.html.haml
+++ b/app/views/blame/_head.html.haml
@@ -1,2 +1,7 @@
-%div.tree-ref-holder
- = render 'shared/ref_switcher', destination: 'tree', path: params[:path]
+%ul.nav.nav-tabs
+ %li
+ = render partial: 'shared/ref_switcher', locals: {destination: 'tree', path: params[:path]}
+ = nav_link(controller: :refs) do
+ = link_to 'Source', project_tree_path(@project, @ref)
+ %li.right
+ = render "shared/clone_panel"
diff --git a/app/views/blame/show.html.haml b/app/views/blame/show.html.haml
index 96d153e6..36d81e6a 100644
--- a/app/views/blame/show.html.haml
+++ b/app/views/blame/show.html.haml
@@ -3,10 +3,10 @@
#tree-holder.tree-holder
%ul.breadcrumb
%li
- %i.icon-angle-right
+ %span.arrow
= link_to project_tree_path(@project, @ref) do
= @project.name
- - tree_breadcrumbs(@tree, 6) do |link|
+ - @tree.breadcrumbs(6) do |link|
\/
%li= link
.clear
@@ -22,13 +22,13 @@
%table
- current_line = 1
- @blame.each do |commit, lines|
- - commit = Commit.new(commit)
+ - commit = CommitDecorator.decorate(Commit.new(commit))
%tr
%td.blame-commit
%span.commit
= link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"
- = commit_author_link(commit, avatar: true, size: 16)
+ = commit.author_link avatar: true, size: 16
= link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title"
%td.lines.blame-numbers
@@ -39,10 +39,8 @@
- else
- lines.each do |line|
= current_line
- \
- current_line += 1
%td.lines
%pre
- lines.each do |line|
= line
- \
diff --git a/app/views/commit/huge_commit.html.haml b/app/views/commit/huge_commit.html.haml
index 7f0bcf38..ba97a7c5 100644
--- a/app/views/commit/huge_commit.html.haml
+++ b/app/views/commit/huge_commit.html.haml
@@ -1,3 +1,3 @@
= render "commits/commit_box"
-.alert.alert-error
+.alert-message.block-message.error
%h4 Commit diffs are too big to be displayed
diff --git a/app/views/commit/show.html.haml b/app/views/commit/show.html.haml
index 48fb44a9..f920534e 100644
--- a/app/views/commit/show.html.haml
+++ b/app/views/commit/show.html.haml
@@ -1,18 +1,29 @@
-= render "commit_box"
+= render "commits/commit_box"
-- unless @commit.has_zero_stats?
- %p.pull-right.cgray
- This commit has
- %span.cgreen #{@commit.stats.additions} additions
- and
- %span.cred #{@commit.stats.deletions} deletions
+%p.right.cgray
+ This commit has
+ %span.cgreen #{@commit.stats.additions} additions
+ and
+ %span.cred #{@commit.stats.deletions} deletions
= render "commits/diffs", diffs: @commit.diffs
= render "notes/notes_with_form"
:javascript
$(function(){
- $('.files .file').each(function(){
- new CommitFile(this);
+ var w, h;
+ $('.diff_file').each(function(){
+ $('.image.diff_removed img', this).on('load', $.proxy(function(event){
+ var w = event.currentTarget.naturalWidth
+ , h = event.currentTarget.naturalHeight;
+ $('.image.diff_removed .image-info', this).append(' | W: ' + w + 'px | H: ' + h + 'px');
+ }, this));
+ $('.image.diff_added img', this).on('load', $.proxy(function(event){
+ var w = event.currentTarget.naturalWidth
+ , h = event.currentTarget.naturalHeight;
+ $('.image.diff_added .image-info', this).append(' | W: ' + w + 'px | H: ' + h + 'px');
+ }, this));
+
});
+
});
diff --git a/app/views/commits/_commit.html.haml b/app/views/commits/_commit.html.haml
index 65d92030..eb0312d0 100644
--- a/app/views/commits/_commit.html.haml
+++ b/app/views/commits/_commit.html.haml
@@ -4,11 +4,11 @@
%strong= link_to "Browse Code »", project_tree_path(@project, commit), class: "right"
%p
= link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"
- = commit_author_link(commit, avatar: true, size: 24)
+ = commit.author_link avatar: true, size: 24
- = link_to_gfm truncate(commit.title, length: 70), project_commit_path(@project, commit.id), class: "row_title"
+ = link_to_gfm truncate(commit.title, length: 50), project_commit_path(@project, commit.id), class: "row_title"
- %time.committed_ago{ datetime: commit.committed_date, title: commit.committed_date.stamp("Aug 21, 2011 9:23pm") }
+ %span.committed_ago
= time_ago_in_words(commit.committed_date)
ago
diff --git a/app/views/commit/_commit_box.html.haml b/app/views/commits/_commit_box.html.haml
similarity index 91%
rename from app/views/commit/_commit_box.html.haml
rename to app/views/commits/_commit_box.html.haml
index 64679177..0544a1d1 100644
--- a/app/views/commit/_commit_box.html.haml
+++ b/app/views/commits/_commit_box.html.haml
@@ -1,6 +1,6 @@
.ui-box.ui-box-show
.ui-box-head
- .pull-right
+ .right
- if @notes_count > 0
%span.btn.disabled.grouped
%i.icon-comment
@@ -13,7 +13,7 @@
%ul.dropdown-menu
%li= link_to "Email Patches", project_commit_path(@project, @commit, format: :patch)
%li= link_to "Plain Diff", project_commit_path(@project, @commit, format: :diff)
- = link_to project_tree_path(@project, @commit), class: "btn btn-primary grouped" do
+ = link_to project_tree_path(@project, @commit), class: "btn primary grouped" do
%span Browse Code »
%h3.commit-title.page_title
= gfm escape_once(@commit.title)
@@ -24,14 +24,14 @@
.row
.span5
.author
- = commit_author_link(@commit, avatar: true, size: 32)
+ = @commit.author_link avatar: true, size: 32
authored
%time{title: @commit.authored_date.stamp("Aug 21, 2011 9:23pm")}
#{time_ago_in_words(@commit.authored_date)} ago
- if @commit.different_committer?
.committer
→
- = commit_committer_link(@commit)
+ = @commit.committer_link
committed
%time{title: @commit.committed_date.stamp("Aug 21, 2011 9:23pm")}
#{time_ago_in_words(@commit.committed_date)} ago
diff --git a/app/views/commits/_commits.html.haml b/app/views/commits/_commits.html.haml
index 869d1f9c..0dc6664c 100644
--- a/app/views/commits/_commits.html.haml
+++ b/app/views/commits/_commits.html.haml
@@ -1,6 +1,6 @@
-- @commits.group_by { |c| c.committed_date.to_date }.sort.reverse.each do |day, commits|
+- @commits.group_by { |c| c.committed_date.to_date }.each do |day, commits|
%div.ui-box
%h5.title
%i.icon-calendar
- %span= day.stamp("28 Aug, 2010")
+ = day.stamp("28 Aug, 2010")
%ul.well-list= render commits
diff --git a/app/views/commits/_diffs.html.haml b/app/views/commits/_diffs.html.haml
index b2da4796..7fe45aa2 100644
--- a/app/views/commits/_diffs.html.haml
+++ b/app/views/commits/_diffs.html.haml
@@ -1,7 +1,7 @@
- if @suppress_diff
- .alert.alert-block
+ .alert-message.block-message
%p
- %strong Warning! Large commit with more than #{Commit::DIFF_SAFE_SIZE} files changed.
+ %strong Warning! Large commit with more then #{Commit::DIFF_SAFE_SIZE} files changed.
%p To prevent performance issue we rejected diff information.
%p
But if you still want to see diff
@@ -12,38 +12,50 @@
.file-stats
= render "commits/diff_head", diffs: diffs
-.files
- - unless @suppress_diff
- - diffs.each_with_index do |diff, i|
- - next if diff.diff.empty?
- - file = (@commit.tree / diff.new_path)
- - file = (@commit.prev_commit.tree / diff.old_path) unless file
- - next unless file
- .file{id: "diff-#{i}"}
- .header
- - if diff.deleted_file
- %span= diff.old_path
+- unless @suppress_diff
+ - diffs.each_with_index do |diff, i|
+ - next if diff.diff.empty?
+ - file = (@commit.tree / diff.new_path)
+ - file = (@commit.prev_commit.tree / diff.old_path) unless file
+ - next unless file
+ .diff_file{id: "diff-#{i}"}
+ .diff_file_header
+ - if diff.deleted_file
+ %span= diff.old_path
- - if @commit.prev_commit
- = link_to project_tree_path(@project, tree_join(@commit.prev_commit_id, diff.new_path)), {:class => 'btn btn-tiny pull-right view-file'} do
- View file @
- %span.commit-short-id= @commit.short_id(6)
- - else
- %span= diff.new_path
- - if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode
- %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
-
- = link_to project_tree_path(@project, tree_join(@commit.id, diff.new_path)), {:class => 'btn btn-tiny pull-right view-file'} do
+ - if @commit.prev_commit
+ = link_to project_tree_path(@project, tree_join(@commit.prev_commit_id, diff.new_path)), {:class => 'btn right view-commit'} do
View file @
%span.commit-short-id= @commit.short_id(6)
+ - else
+ %span= diff.new_path
+ - if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode
+ %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
- .content
- -# Skipp all non non-supported blobs
- - next unless file.respond_to?('text?')
- - if file.text?
- = render "commits/text_file", diff: diff, index: i
- - elsif file.image?
- - old_file = (@commit.prev_commit.tree / diff.old_path) if !@commit.prev_commit.nil?
- = render "commits/image", diff: diff, old_file: old_file, file: file, index: i
+ = link_to project_tree_path(@project, tree_join(@commit.id, diff.new_path)), {:class => 'btn very_small right view-commit'} do
+ View file @
+ %span.commit-short-id= @commit.short_id(6)
+
+ %br/
+ .diff_file_content
+ -# Skip all non-supported blobs
+ - next unless file.respond_to?('text?')
+ - if file.text?
+ = render "commits/text_diff", diff: diff, index: i
+ - elsif file.image?
+ - old_file = (@commit.prev_commit.tree / diff.old_path) if !@commit.prev_commit.nil?
+ - if diff.renamed_file || diff.new_file || diff.deleted_file
+ .diff_file_content_image
+ .image{class: image_diff_class(diff)}
+ %img{src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
+ %div.image-info= "#{number_to_human_size file.size}"
- else
- %p.nothing_here_message No preview for this file type
+ .diff_file_content_image.img_compared
+ .image.diff_removed
+ %img{src: "data:#{file.mime_type};base64,#{Base64.encode64(old_file.data)}"}
+ %div.image-info= "#{number_to_human_size file.size}"
+ .image.diff_added
+ %img{src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
+ %div.image-info= "#{number_to_human_size file.size}"
+ - else
+ %p.nothing_here_message No preview for this file type
diff --git a/app/views/commits/_head.html.haml b/app/views/commits/_head.html.haml
index 20b9195c..a5f3fdf5 100644
--- a/app/views/commits/_head.html.haml
+++ b/app/views/commits/_head.html.haml
@@ -22,6 +22,7 @@
- if current_controller?(:commits) && current_user.private_token
- %li.pull-right
- = link_to project_commits_path(@project, @ref, {format: :atom, private_token: current_user.private_token}), title: "Feed" do
- %i.icon-rss
+ %li.right
+ %span.rss-icon
+ = link_to project_commits_path(@project, @ref, {format: :atom, private_token: current_user.private_token}), title: "Feed" do
+ = image_tag "rss_ui.png", title: "feed"
diff --git a/app/views/commits/_image.html.haml b/app/views/commits/_image.html.haml
deleted file mode 100644
index db02fa33..00000000
--- a/app/views/commits/_image.html.haml
+++ /dev/null
@@ -1,63 +0,0 @@
-- if diff.renamed_file || diff.new_file || diff.deleted_file
- .image
- %span.wrap
- .frame{class: image_diff_class(diff)}
- %img{src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
- %p.image-info= "#{number_to_human_size file.size}"
-- else
- .image
- %div.two-up.view
- %span.wrap
- .frame.deleted
- %a{href: project_tree_path(@project, tree_join(@commit.id, diff.old_path))}
- %img{src: "data:#{old_file.mime_type};base64,#{Base64.encode64(old_file.data)}"}
- %p.image-info.hide
- %span.meta-filesize= "#{number_to_human_size old_file.size}"
- |
- %b W:
- %span.meta-width
- |
- %b H:
- %span.meta-height
- %span.wrap
- .frame.added
- %a{href: project_tree_path(@project, tree_join(@commit.id, diff.new_path))}
- %img{src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
- %p.image-info.hide
- %span.meta-filesize= "#{number_to_human_size file.size}"
- |
- %b W:
- %span.meta-width
- |
- %b H:
- %span.meta-height
-
- %div.swipe.view.hide
- .swipe-frame
- .frame.deleted
- %img{src: "data:#{old_file.mime_type};base64,#{Base64.encode64(old_file.data)}"}
- .swipe-wrap
- .frame.added
- %img{src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
- %span.swipe-bar
- %span.top-handle
- %span.bottom-handle
-
- %div.onion-skin.view.hide
- .onion-skin-frame
- .frame.deleted
- %img{src: "data:#{old_file.mime_type};base64,#{Base64.encode64(old_file.data)}"}
- .frame.added
- %img{src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
- .controls
- .transparent
- .drag-track
- .dragger{:style => "left: 0px;"}
- .opaque
-
-
- .view-modes.hide
- %ul.view-modes-menu
- %li.two-up{data: {mode: 'two-up'}} 2-up
- %li.swipe{data: {mode: 'swipe'}} Swipe
- %li.onion-skin{data: {mode: 'onion-skin'}} Onion skin
\ No newline at end of file
diff --git a/app/views/commits/_text_file.html.haml b/app/views/commits/_text_diff.html.haml
similarity index 95%
rename from app/views/commits/_text_file.html.haml
rename to app/views/commits/_text_diff.html.haml
index 760fd07e..8afad96b 100644
--- a/app/views/commits/_text_file.html.haml
+++ b/app/views/commits/_text_diff.html.haml
@@ -2,7 +2,7 @@
- if too_big
%a.supp_diff_link Diff suppressed. Click to show
-%table.text-file{class: "#{'hide' if too_big}"}
+%table{class: "#{'hide' if too_big}"}
- each_diff_line(diff, index) do |line, type, line_code, line_new, line_old|
%tr.line_holder{ id: line_code }
- if type == "match"
diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml
index 586b21df..9451a038 100644
--- a/app/views/commits/show.html.haml
+++ b/app/views/commits/show.html.haml
@@ -2,10 +2,10 @@
- if @path.present?
%ul.breadcrumb
- = commits_breadcrumbs
+ = breadcrumbs
%div{id: dom_id(@project)}
- #commits-list= render "commits"
+ #commits_list= render "commits"
.clear
.loading{ style: "display:none;"}
diff --git a/app/views/compare/_form.html.haml b/app/views/compare/_form.html.haml
index ef80cd4a..0915782d 100644
--- a/app/views/compare/_form.html.haml
+++ b/app/views/compare/_form.html.haml
@@ -2,9 +2,9 @@
- unless params[:to]
%p.slead
Fill input field with commit id like
- %code.label-branch 4eedf23
+ %code.label_branch 4eedf23
or branch/tag name like
- %code.label-branch master
+ %code.label_branch master
and press compare button for commits list, code diff.
%br
@@ -19,7 +19,7 @@
= text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge"
.pull-left
- = submit_tag "Compare", class: "btn btn-primary wide commits-compare-btn"
+ = submit_tag "Compare", class: "btn primary wide commits-compare-btn"
- if @refs_are_same
.alert
%span Refs are the same
diff --git a/app/views/compare/show.html.haml b/app/views/compare/show.html.haml
index 56c4a113..d8ea3727 100644
--- a/app/views/compare/show.html.haml
+++ b/app/views/compare/show.html.haml
@@ -6,17 +6,11 @@
= render "form"
-- if @commits.size > 100
- .alert.alert-block
- %p
- %strong Warning! This comparison include 100+ commits.
- %p To prevent performance issue we dont show diff information.
-
- if @commits.present?
%div.ui-box
%h5.title
Commits (#{@commits.count})
- %ul.well-list= render Commit.decorate(@commits)
+ %ul.well-list= render @commits
- unless @diffs.empty?
%h4 Diff
diff --git a/app/views/dashboard/_filter.html.haml b/app/views/dashboard/_filter.html.haml
index df4447cd..4624af79 100644
--- a/app/views/dashboard/_filter.html.haml
+++ b/app/views/dashboard/_filter.html.haml
@@ -1,6 +1,6 @@
= form_tag dashboard_filter_path(entity), method: 'get' do
%fieldset.dashboard-search-filter
- = search_field_tag "search", params[:search], { id: 'filter_search', placeholder: 'Search', class: 'search-text-input' }
+ = search_field_tag "search", params[:search], { placeholder: 'Search', class: 'search-text-input' }
= button_tag type: 'submit', class: 'btn' do
%i.icon-search
@@ -25,9 +25,9 @@
%li{class: ("active" if params[:project_id] == project.id.to_s)}
= link_to dashboard_filter_path(entity, project_id: project.id) do
= project.name_with_namespace
- %small.pull-right= entities_per_project(project, entity)
+ %small.right= entities_per_project(project, entity)
%fieldset
%hr
- = link_to "Reset", dashboard_filter_path(entity), class: 'btn pull-right'
+ = link_to "Reset", dashboard_filter_path(entity), class: 'btn right'
diff --git a/app/views/dashboard/_groups.html.haml b/app/views/dashboard/_groups.html.haml
index 2fedf87a..7f544406 100644
--- a/app/views/dashboard/_groups.html.haml
+++ b/app/views/dashboard/_groups.html.haml
@@ -1,24 +1,20 @@
-.ui-box
+.groups_box
%h5.title
Groups
- %span.light
+ %small
(#{groups.count})
- if current_user.can_create_group?
- %span.pull-right
- = link_to new_group_path, class: "btn btn-small" do
+ %span.right
+ = link_to new_admin_group_path, class: "btn very_small info" do
%i.icon-plus
New Group
%ul.well-list
- groups.each do |group|
%li
= link_to group_path(id: group.path), class: dom_class(group) do
- %strong.well-title
- = truncate(group.name, length: 35)
+ %strong.well-title= truncate(group.name, length: 35)
%span.arrow
→
%span.last_activity
- %strong Owner:
- %span= group.owner_name
- - if groups.blank?
- %li
- %h3.nothing_here_message You have no groups yet.
+ %strong Projects:
+ %span= current_user.authorized_projects.where(namespace_id: group.id).count
diff --git a/app/views/dashboard/_projects.html.haml b/app/views/dashboard/_projects.html.haml
index a106e83e..6c1304ee 100644
--- a/app/views/dashboard/_projects.html.haml
+++ b/app/views/dashboard/_projects.html.haml
@@ -1,13 +1,20 @@
-.ui-box
+.projects_box
%h5.title
Projects
- %span.light
- (#{@projects_count})
+ %small
+ (#{projects.total_count})
- if current_user.can_create_project?
- %span.pull-right
- = link_to new_project_path, class: "btn btn-small" do
+ %span.right
+ = link_to new_project_path, class: "btn very_small info" do
%i.icon-plus
New Project
+ %ul.nav.nav-projects-tabs
+ = nav_tab :scope, nil do
+ = link_to "All", dashboard_path
+ = nav_tab :scope, 'personal' do
+ = link_to "Personal", dashboard_path(scope: 'personal')
+ = nav_tab :scope, 'joined' do
+ = link_to "Joined", dashboard_path(scope: 'joined')
%ul.well-list
- projects.each do |project|
@@ -26,6 +33,4 @@
- if projects.blank?
%li
%h3.nothing_here_message There are no projects here.
- - if @projects_count > 20
- %li.bottom
- %strong= link_to "show all projects", projects_dashboard_path
+ .bottom= paginate projects, theme: "gitlab"
diff --git a/app/views/dashboard/_sidebar.html.haml b/app/views/dashboard/_sidebar.html.haml
index 876a5b61..9830cdf4 100644
--- a/app/views/dashboard/_sidebar.html.haml
+++ b/app/views/dashboard/_sidebar.html.haml
@@ -1,25 +1,11 @@
-%ul.nav.nav-tabs.dash-sidebar-tabs
- %li.active
- = link_to 'Projects', '#projects', 'data-toggle' => 'tab', id: 'sidebar-projects-tab'
- %li
- = link_to 'Groups', '#groups', 'data-toggle' => 'tab', id: 'sidebar-groups-tab'
- %li
- = link_to 'Teams', '#teams', 'data-toggle' => 'tab', id: 'sidebar-teams-tab'
-
-.tab-content
- .tab-pane.active#projects
- = render "projects", projects: @projects
- .tab-pane#groups
- = render "groups", groups: @groups
- .tab-pane#teams
- = render "teams", teams: @teams
-
-.prepend-top-20
+- if @groups.present?
+ = render "groups", groups: @groups
+= render "projects", projects: @projects
+%div
%span.rss-icon
= link_to dashboard_path(:atom, { private_token: current_user.private_token }) do
- %strong
- %i.icon-rss
- News Feed
+ = image_tag "rss_ui.png", title: "feed"
+ %strong News Feed
%hr
.gitlab-promo
diff --git a/app/views/dashboard/_teams.html.haml b/app/views/dashboard/_teams.html.haml
deleted file mode 100644
index 95d87f50..00000000
--- a/app/views/dashboard/_teams.html.haml
+++ /dev/null
@@ -1,23 +0,0 @@
-.ui-box.teams-box
- %h5.title
- Teams
- %span.light
- (#{teams.count})
- %span.pull-right
- = link_to new_team_path, class: "btn btn-small" do
- %i.icon-plus
- New Team
- %ul.well-list
- - teams.each do |team|
- %li
- = link_to team_path(id: team.path), class: dom_class(team) do
- %strong.well-title= truncate(team.name, length: 35)
- %span.pull-right.light
- - if team.owner == current_user
- %i.icon-wrench
- - tm = current_user.user_team_user_relationships.find_by_user_team_id(team.id)
- - if tm
- = tm.access_human
- - if teams.blank?
- %li
- %h3.nothing_here_message You have no teams yet.
diff --git a/app/views/dashboard/_zero_authorized_projects.html.haml b/app/views/dashboard/_zero_authorized_projects.html.haml
index 4b0d0d68..d1676ed1 100644
--- a/app/views/dashboard/_zero_authorized_projects.html.haml
+++ b/app/views/dashboard/_zero_authorized_projects.html.haml
@@ -6,7 +6,7 @@
= current_user.projects_limit
projects. Click on button below to add a new one
.link_holder
- = link_to new_project_path, class: "btn btn-primary" do
+ = link_to new_project_path, class: "btn primary" do
New Project »
- else
If you will be added to project - it will be displayed here
diff --git a/app/views/dashboard/show.atom.builder b/app/views/dashboard/index.atom.builder
similarity index 87%
rename from app/views/dashboard/show.atom.builder
rename to app/views/dashboard/index.atom.builder
index 29b2e4a2..2bb42a65 100644
--- a/app/views/dashboard/show.atom.builder
+++ b/app/views/dashboard/index.atom.builder
@@ -1,8 +1,8 @@
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "Dashboard feed#{" - #{current_user.name}" if current_user.name.present?}"
- xml.link :href => dashboard_url(:atom), :rel => "self", :type => "application/atom+xml"
- xml.link :href => dashboard_url, :rel => "alternate", :type => "text/html"
+ xml.link :href => projects_url(:atom), :rel => "self", :type => "application/atom+xml"
+ xml.link :href => projects_url, :rel => "alternate", :type => "text/html"
xml.id projects_url
xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any?
diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/index.html.haml
similarity index 100%
rename from app/views/dashboard/show.html.haml
rename to app/views/dashboard/index.html.haml
diff --git a/app/views/dashboard/show.js.haml b/app/views/dashboard/index.js.haml
similarity index 100%
rename from app/views/dashboard/show.js.haml
rename to app/views/dashboard/index.js.haml
diff --git a/app/views/dashboard/issues.atom.builder b/app/views/dashboard/issues.atom.builder
index 0f0f3466..28bdc5ed 100644
--- a/app/views/dashboard/issues.atom.builder
+++ b/app/views/dashboard/issues.atom.builder
@@ -1,9 +1,9 @@
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{current_user.name} issues"
- xml.link :href => issues_dashboard_url(:atom, :private_token => current_user.private_token), :rel => "self", :type => "application/atom+xml"
- xml.link :href => issues_dashboard_url(:private_token => current_user.private_token), :rel => "alternate", :type => "text/html"
- xml.id issues_dashboard_url(:private_token => current_user.private_token)
+ xml.link :href => dashboard_issues_url(:atom, :private_token => current_user.private_token), :rel => "self", :type => "application/atom+xml"
+ xml.link :href => dashboard_issues_url(:private_token => current_user.private_token), :rel => "alternate", :type => "text/html"
+ xml.id dashboard_issues_url(:private_token => current_user.private_token)
xml.updated @issues.first.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") if @issues.any?
@issues.each do |issue|
diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml
index 539c5765..307d0d85 100644
--- a/app/views/dashboard/issues.html.haml
+++ b/app/views/dashboard/issues.html.haml
@@ -1,7 +1,7 @@
%h3.page_title
Issues
%small (assigned to you)
- %small.pull-right #{@issues.total_count} issues
+ %small.right #{@issues.total_count} issues
%hr
@@ -17,7 +17,7 @@
= link_to_project project
%ul.well-list.issues_table
- group[1].each do |issue|
- = render issue
+ = render(partial: 'issues/show', locals: {issue: issue})
%hr
= paginate @issues, theme: "gitlab"
- else
diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml
index a311729d..0c4d6e0a 100644
--- a/app/views/dashboard/merge_requests.html.haml
+++ b/app/views/dashboard/merge_requests.html.haml
@@ -1,7 +1,7 @@
%h3.page_title
Merge Requests
%small (authored by or assigned to you)
- %small.pull-right #{@merge_requests.total_count} merge requests
+ %small.right #{@merge_requests.total_count} merge requests
%hr
.row
diff --git a/app/views/dashboard/projects.html.haml b/app/views/dashboard/projects.html.haml
deleted file mode 100644
index 29a16d61..00000000
--- a/app/views/dashboard/projects.html.haml
+++ /dev/null
@@ -1,63 +0,0 @@
-%h3.page_title
- Projects
- %span
- (#{@projects.total_count})
- - if current_user.can_create_project?
- %span.pull-right
- = link_to new_project_path, class: "btn btn-tiny info" do
- %i.icon-plus
- New Project
-
-
-%hr
-.row
- .span3
- %ul.nav.nav-pills.nav-stacked
- = nav_tab :scope, nil do
- = link_to "All", projects_dashboard_path
- = nav_tab :scope, 'personal' do
- = link_to "Personal", projects_dashboard_path(scope: 'personal')
- = nav_tab :scope, 'joined' do
- = link_to "Joined", projects_dashboard_path(scope: 'joined')
-
- .span9
- = form_tag projects_dashboard_path, method: 'get' do
- %fieldset.dashboard-search-filter
- = hidden_field_tag "scope", params[:scope]
- = search_field_tag "search", params[:search], { id: 'dashboard_projects_search', placeholder: 'Search', class: 'left input-xxlarge'}
- = button_tag type: 'submit', class: 'btn' do
- %i.icon-search
-
- %ul.well-list
- - @projects.each do |project|
- %li.clearfix
- .clearfix
- %h5
- = link_to project_path(project), class: dom_class(project) do
- - if project.namespace
- = project.namespace.human_name
- \/
- %strong
- = truncate(project.name, length: 45)
- .pull-right.light
- - if project.owner == current_user
- %i.icon-wrench
- - tm = project.team.get_tm(current_user.id)
- - if tm
- %strong= tm.project_access_human
- .clearfix
- .left
- - if project.description.present?
- %span.light= project.description
-
- .pull-right.light
- %small.light
- Last activity #{project_last_activity(project)}
-
- - if @projects.blank?
- %li
- %h3.nothing_here_message There are no projects here.
- .bottom
- %hr
- = paginate @projects, theme: "gitlab"
-
diff --git a/app/views/deploy_keys/_form.html.haml b/app/views/deploy_keys/_form.html.haml
index 5fb83021..6beba562 100644
--- a/app/views/deploy_keys/_form.html.haml
+++ b/app/views/deploy_keys/_form.html.haml
@@ -1,7 +1,7 @@
%div
= form_for [@project, @key], url: project_deploy_keys_path do |f|
-if @key.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
%ul
- @key.errors.full_messages.each do |msg|
%li= msg
@@ -18,6 +18,6 @@
= link_to "here", help_ssh_path
.actions
- = f.submit 'Save', class: "btn-save btn"
- = link_to "Cancel", project_deploy_keys_path(@project), class: "btn btn-cancel"
+ = f.submit 'Save', class: "save-btn btn"
+ = link_to "Cancel", project_deploy_keys_path(@project), class: "btn cancel-btn"
diff --git a/app/views/deploy_keys/_show.html.haml b/app/views/deploy_keys/_show.html.haml
index 63505435..a5314ae9 100644
--- a/app/views/deploy_keys/_show.html.haml
+++ b/app/views/deploy_keys/_show.html.haml
@@ -8,5 +8,5 @@
= time_ago_in_words(key.created_at)
ago
%td
- = link_to 'Remove', project_deploy_key_path(key.project, key), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove delete-key btn-small pull-right"
+ = link_to 'Remove', project_deploy_key_path(key.project, key), confirm: 'Are you sure?', method: :delete, class: "danger btn delete-key small right"
diff --git a/app/views/deploy_keys/index.html.haml b/app/views/deploy_keys/index.html.haml
index 80d30e1c..b9c654a1 100644
--- a/app/views/deploy_keys/index.html.haml
+++ b/app/views/deploy_keys/index.html.haml
@@ -1,10 +1,10 @@
-= render "projects/settings_nav"
+= render "repositories/head"
%p.slead
Deploy keys allow read-only access to repository. It matches perfectly for CI, staging or production servers.
- if can? current_user, :admin_project, @project
- = link_to new_project_deploy_key_path(@project), class: "btn btn-small", title: "New Deploy Key" do
+ = link_to new_project_deploy_key_path(@project), class: "btn small", title: "New Deploy Key" do
Add Deploy Key
- if @keys.any?
%table
diff --git a/app/views/deploy_keys/new.html.haml b/app/views/deploy_keys/new.html.haml
index 0bbea1eb..e973cb7d 100644
--- a/app/views/deploy_keys/new.html.haml
+++ b/app/views/deploy_keys/new.html.haml
@@ -1,4 +1,4 @@
-= render "projects/settings_nav"
+= render "repositories/head"
%h3.page_title New Deploy key
%hr
diff --git a/app/views/deploy_keys/show.html.haml b/app/views/deploy_keys/show.html.haml
index 0a9f376d..c94cf10d 100644
--- a/app/views/deploy_keys/show.html.haml
+++ b/app/views/deploy_keys/show.html.haml
@@ -1,5 +1,4 @@
-= render "projects/settings_nav"
-
+= render "repositories/head"
%h3.page_title
Deploy key:
= @key.title
@@ -11,5 +10,5 @@
← To keys list
%hr
%pre= @key.key
-.pull-right
- = link_to 'Remove', project_deploy_key_path(@key.project, @key), confirm: 'Are you sure?', method: :delete, class: "btn-remove btn delete-key"
+.right
+ = link_to 'Remove', project_deploy_key_path(@key.project, @key), confirm: 'Are you sure?', method: :delete, class: "danger btn delete-key"
diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml
index e5800025..31d35567 100644
--- a/app/views/devise/passwords/edit.html.haml
+++ b/app/views/devise/passwords/edit.html.haml
@@ -8,5 +8,5 @@
%div
= f.password_field :password_confirmation, class: "text bottom", placeholder: "Confirm new password"
%div
- = f.submit "Change my password", class: "btn btn-primary"
- .pull-right= render partial: "devise/shared/links"
+ = f.submit "Change my password", class: "btn primary"
+ .right= render partial: "devise/shared/links"
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb
index 0e39f318..860d67d1 100644
--- a/app/views/devise/passwords/new.html.erb
+++ b/app/views/devise/passwords/new.html.erb
@@ -1,9 +1,9 @@
-<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: "login-box", method: :post }) do |f| %>
- <%= image_tag "login-logo.png", width: "304", height: "66", class: "login-logo", alt: "Login Logo" %>
+<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :class => "login-box", :method => :post }) do |f| %>
+ <%= image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo" %>
<%= devise_error_messages! %>
- <%= f.email_field :email, placeholder: "Email", class: "text" %>
+ <%= f.email_field :email, :placeholder => "Email", :class => "text" %>
- <%= f.submit "Reset password", class: "btn-primary btn" %>
- <%= link_to "Sign in", new_session_path(resource_name), class: "btn" %>
+ <%= f.submit "Reset password", :class => "primary btn" %>
+ <%= link_to "Sign in", new_session_path(resource_name), :class => "btn" %>
<% end %>
diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml
index 12b04382..81eb2622 100644
--- a/app/views/devise/registrations/new.html.haml
+++ b/app/views/devise/registrations/new.html.haml
@@ -1,18 +1,19 @@
-= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "login-box" }) do |f|
- = image_tag "login-logo.png", width: "304", height: "66", class: "login-logo", alt: "Login Logo"
+= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "login-box" }) do |f|
+ = image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo"
= devise_error_messages!
%div
- = f.text_field :name, class: "text top", placeholder: "Name", required: true
+ = f.text_field :name, :class => "text top", :placeholder => "Name", :required => true
%div
- = f.text_field :username, class: "text middle", placeholder: "Username", required: true
+ = f.text_field :username, :class => "text middle", :placeholder => "Username", :required => true
%div
- = f.email_field :email, class: "text middle", placeholder: "Email", required: true
+ = f.email_field :email, :class => "text middle", :placeholder => "Email", :required => true
%div
- = f.password_field :password, class: "text middle", placeholder: "Password", required: true
+ = f.password_field :password, :class => "text middle", :placeholder => "Password", :required => true
%div
- = f.password_field :password_confirmation, class: "text bottom", placeholder: "Confirm password", required: true
+ = f.password_field :password_confirmation, :class => "text bottom", :placeholder => "Confirm password", :required => true
%div
- = f.submit "Sign up", class: "btn-create btn"
+ = f.submit "Sign up", :class => "primary btn wide"
+ %br
%hr
= link_to "Sign in", new_session_path(resource_name)
- = link_to "Forgot your password?", new_password_path(resource_name), class: "pull-right"
+ = link_to "Forgot your password?", new_password_path(resource_name), :class => "right"
diff --git a/app/views/devise/sessions/_new_ldap.html.haml b/app/views/devise/sessions/_new_ldap.html.haml
index eb8c5194..4233aa61 100644
--- a/app/views/devise/sessions/_new_ldap.html.haml
+++ b/app/views/devise/sessions/_new_ldap.html.haml
@@ -1,13 +1,13 @@
= form_tag(user_omniauth_callback_path(:ldap), :class => "login-box", :id => 'new_ldap_user' ) do
= image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo"
- = text_field_tag :username, nil, {:class => "text top", :placeholder => "LDAP Login", :autofocus => "autofocus"}
+ = text_field_tag :username, nil, {:class => "text top", :placeholder => "LDAP Login"}
= password_field_tag :password, nil, {:class => "text bottom", :placeholder => "Password"}
%br/
- = submit_tag "LDAP Sign in", :class => "btn-primary btn"
+ = submit_tag "LDAP Sign in", :class => "primary btn"
- if devise_mapping.omniauthable?
- (resource_class.omniauth_providers - [:ldap]).each do |provider|
%hr/
- = link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), :class => "btn btn-primary"
+ = link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), :class => "btn primary"
%br/
%hr/
%a#other_form_toggle{:href => "#", :onclick => "javascript:$('#new_user').toggle();"} Other Sign in
@@ -24,6 +24,6 @@
= f.check_box :remember_me
%span Remember me
%br/
- = f.submit "Sign in", :class => "btn-primary btn"
- .pull-right
+ = f.submit "Sign in", :class => "primary btn"
+ .right
= render :partial => "devise/shared/links"
diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml
index 5e93ab18..0983f315 100644
--- a/app/views/devise/sessions/new.html.haml
+++ b/app/views/devise/sessions/new.html.haml
@@ -1,28 +1,28 @@
- if ldap_enable?
- = render partial: 'devise/sessions/new_ldap'
+ = render :partial => 'devise/sessions/new_ldap'
- else
- = form_for(resource, as: resource_name, url: session_path(resource_name), html: { class: "login-box" }) do |f|
- = image_tag "login-logo.png", width: "304", height: "66", class: "login-logo", alt: "Login Logo"
- = f.text_field :login, class: "text top", placeholder: "Username or Email", autofocus: "autofocus"
- = f.password_field :password, class: "text bottom", placeholder: "Password"
+ = form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "login-box" }) do |f|
+ = image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo"
+ = f.email_field :email, :class => "text top", :placeholder => "Email", :autofocus => "autofocus"
+ = f.password_field :password, :class => "text bottom", :placeholder => "Password"
- if devise_mapping.rememberable?
.clearfix.inputs-list
- %label.checkbox.remember_me{for: "user_remember_me"}
+ %label.checkbox.remember_me{:for => "user_remember_me"}
= f.check_box :remember_me
%span Remember me
%br/
- = f.submit "Sign in", class: "btn-create btn"
- .pull-right
- = link_to "Forgot your password?", new_password_path(resource_name), class: "btn"
+ = f.submit "Sign in", :class => "primary btn wide"
+ .right
+ = link_to "Forgot your password?", new_password_path(resource_name), :class => "btn"
+ %br/
%br/
- if Gitlab.config.gitlab.signup_enabled
%hr/
Don't have an account?
= link_to "Sign up", new_registration_path(resource_name)
+ .clearfix
- if devise_mapping.omniauthable? && resource_class.omniauth_providers.present?
- %hr
%div
- %span Sign in with:
- resource_class.omniauth_providers.each do |provider|
%span
= link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider)
diff --git a/app/views/errors/gitolite.html.haml b/app/views/errors/gitolite.html.haml
new file mode 100644
index 00000000..33ea8c1a
--- /dev/null
+++ b/app/views/errors/gitolite.html.haml
@@ -0,0 +1,25 @@
+%h1.http_status_code 500
+%h3.page_title GitLab was unable to access your Gitolite system.
+%hr
+
+.git_error_tips
+ %h4 Tips for Administrator:
+ %ol
+ %li
+ %p
+ Check git logs in admin area
+ %li
+ %p
+ Check config/gitlab.yml for correct settings.
+ %li
+ %p
+ Diagnostic tool:
+ %pre
+ bundle exec rake gitlab:check RAILS_ENV=production
+ %li
+ %p
+ Permissions:
+ %pre
+ = preserve do
+ sudo chown -R git:git #{Gitlab.config.gitolite.repos_path}
+ sudo chmod -R ug+rwXs #{Gitlab.config.gitolite.repos_path}
diff --git a/app/views/events/_commit.html.haml b/app/views/events/_commit.html.haml
index f2f2d47e..ea417aa9 100644
--- a/app/views/events/_commit.html.haml
+++ b/app/views/events/_commit.html.haml
@@ -1,3 +1,4 @@
+- commit = CommitDecorator.decorate(commit)
%li.commit
%p
= link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id"
diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml
index e2bf54ea..191aed07 100644
--- a/app/views/events/_event.html.haml
+++ b/app/views/events/_event.html.haml
@@ -1,16 +1,15 @@
- if event.proper?
%div.event-item
- %span.cgray.pull-right
+ %span.cgray.right
#{time_ago_in_words(event.created_at)} ago.
- = cache event do
- = image_tag gravatar_icon(event.author_email), class: "avatar s24"
+ = image_tag gravatar_icon(event.author_email), class: "avatar s24"
- - if event.push?
- = render "events/event/push", event: event
- .clearfix
- - elsif event.note?
- = render "events/event/note", event: event
- - else
- = render "events/event/common", event: event
+ - if event.push?
+ = render "events/event/push", event: event
+ .clearfix
+ - elsif event.note?
+ = render "events/event/note", event: event
+ - else
+ = render "events/event/common", event: event
diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml
index 8bcfa95f..ef5035fc 100644
--- a/app/views/events/event/_note.html.haml
+++ b/app/views/events/event/_note.html.haml
@@ -11,7 +11,7 @@
#{event.note_target_type} ##{truncate event.note_target_id}
- elsif event.wall_note?
- = link_to 'wall', project_wall_path(event.project)
+ = link_to 'wall', wall_project_path(event.project)
- else
%strong (deleted)
at
@@ -21,15 +21,6 @@
= event.project_name
.event-body
- .event-note
- .md
- %i.icon-comment-alt.event-note-icon
- = sanitize(markdown(truncate(event.target.note, length: 150)), tags: %w(a img b pre p))
- - note = event.target
- - if note.attachment.url
- = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do
- - if note.attachment.image?
- = image_tag note.attachment.url, class: 'note-image-attach'
- - else
- %i.icon-paper-clip
- = note.attachment_identifier
+ %i.icon-comment-alt.event-note-icon
+ %span.event-note
+ = markdown truncate(event.target.note, length: 70)
diff --git a/app/views/graph/_head.html.haml b/app/views/graph/_head.html.haml
deleted file mode 100644
index fba9a958..00000000
--- a/app/views/graph/_head.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-%h3.page_title Project Network Graph
-%hr
-
-.clearfix
- .pull-left
- = render partial: 'shared/ref_switcher', locals: {destination: 'graph', path: @path}
-
- .search.pull-right
- = form_tag project_graph_path(@project, params[:id]), method: :get do |f|
- .control-group
- = label_tag :search , "Looking for commit:", class: 'control-label light'
- .controls
- = text_field_tag :q, @q, placeholder: "Input SHA", class: "search-input xlarge"
- = button_tag type: 'submit', class: 'btn vtop' do
- %i.icon-search
-
diff --git a/app/views/graph/show.json.erb b/app/views/graph/show.json.erb
deleted file mode 100644
index 529d5849..00000000
--- a/app/views/graph/show.json.erb
+++ /dev/null
@@ -1,23 +0,0 @@
-<% self.formats = ["html"] %>
-
-<%= raw(
- {
- days: @graph.days.compact.map { |d| [d.day, d.strftime("%b")] },
- commits: @graph.commits.map do |c|
- {
- parents: parents_zip_spaces(c.parents(@graph.map), c.parent_spaces),
- author: {
- name: c.author.name,
- email: c.author.email,
- icon: gravatar_icon(c.author.email, 20)
- },
- time: c.time,
- space: c.spaces.first,
- refs: get_refs(c),
- id: c.sha,
- date: c.date,
- message: c.message,
- }
- end
- }.to_json
-) %>
diff --git a/app/views/groups/_filter.html.haml b/app/views/groups/_filter.html.haml
index 5c66f977..c8b0ad0f 100644
--- a/app/views/groups/_filter.html.haml
+++ b/app/views/groups/_filter.html.haml
@@ -25,11 +25,9 @@
%li{class: ("active" if params[:project_id] == project.id.to_s)}
= link_to group_filter_path(entity, project_id: project.id) do
= project.name_with_namespace
- %small.pull-right= entities_per_project(project, entity)
- - if @projects.blank?
- %p.nothing_here_message This group has no projects yet
+ %small.right= entities_per_project(project, entity)
%fieldset
%hr
- = link_to "Reset", group_filter_path(entity), class: 'btn pull-right'
+ = link_to "Reset", group_filter_path(entity), class: 'btn right'
diff --git a/app/views/groups/_new_group_member.html.haml b/app/views/groups/_new_group_member.html.haml
index 9cdbea60..2d599816 100644
--- a/app/views/groups/_new_group_member.html.haml
+++ b/app/views/groups/_new_group_member.html.haml
@@ -14,5 +14,5 @@
.form-actions
= hidden_field_tag :redirect_to, people_group_path(@group)
- = f.submit 'Add', class: "btn btn-save"
+ = f.submit 'Add', class: "btn save-btn"
diff --git a/app/views/groups/_new_member.html.haml b/app/views/groups/_new_member.html.haml
index b3424b01..89ac05e7 100644
--- a/app/views/groups/_new_member.html.haml
+++ b/app/views/groups/_new_member.html.haml
@@ -14,5 +14,5 @@
.form-actions
= hidden_field_tag :redirect_to, people_group_path(@group, project_id: @project.id)
- = f.submit 'Add', class: "btn btn-save"
+ = f.submit 'Add', class: "btn save-btn"
diff --git a/app/views/groups/_people_filter.html.haml b/app/views/groups/_people_filter.html.haml
index ee63743e..79a1b01a 100644
--- a/app/views/groups/_people_filter.html.haml
+++ b/app/views/groups/_people_filter.html.haml
@@ -6,11 +6,9 @@
%li{class: ("active" if params[:project_id] == project.id.to_s)}
= link_to people_group_path(@group, project_id: project.id) do
= project.name_with_namespace
- %small.pull-right= project.users.count
- - if @projects.blank?
- %p.nothing_here_message This group has no projects yet
+ %small.right= project.users.count
%fieldset
%hr
- = link_to "Reset", people_group_path(@group), class: 'btn pull-right'
+ = link_to "Reset", people_group_path(@group), class: 'btn right'
diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml
index bf1a624b..040d1ae9 100644
--- a/app/views/groups/_projects.html.haml
+++ b/app/views/groups/_projects.html.haml
@@ -1,11 +1,11 @@
-.ui-box
+.projects_box
%h5.title
Projects
%small
(#{projects.count})
- if can? current_user, :manage_group, @group
- %span.pull-right
- = link_to new_project_path(namespace_id: @group.id), class: "btn btn-tiny info" do
+ %span.right
+ = link_to new_project_path(namespace_id: @group.id), class: "btn very_small info" do
%i.icon-plus
New Project
%ul.well-list
diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml
deleted file mode 100644
index eb4f324b..00000000
--- a/app/views/groups/edit.html.haml
+++ /dev/null
@@ -1,75 +0,0 @@
-.row
- .span3
- %ul.nav.nav-pills.nav-stacked
- %li.active
- = link_to 'Projects', '#tab-projects', 'data-toggle' => 'tab'
- %li
- = link_to 'Edit Group', '#tab-edit', 'data-toggle' => 'tab'
- %li
- = link_to 'Transfer', '#tab-transfer', 'data-toggle' => 'tab'
- %li
- = link_to 'Remove', '#tab-remove', 'data-toggle' => 'tab'
-
- .span9
- .tab-content
- .tab-pane.active#tab-projects
- .ui-box
- %h5.title Projects
- %ul.well-list
- - @group.projects.each do |project|
- %li
- - if project.public
- %i.icon-share
- - else
- %i.icon-lock.cgreen
- = link_to project.name_with_namespace, project
- .pull-right
- = link_to 'Team', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
- = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
- = link_to 'Remove', project, confirm: "REMOVE #{project.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
- - if @group.projects.blank?
- %p.nothing_here_message This group has no projects yet
-
- .tab-pane#tab-edit
- .ui-box
- %h5.title Edit Group
- %div.form-holder
- = form_for @group do |f|
- - if @group.errors.any?
- .alert.alert-error
- %span= @group.errors.full_messages.first
- .clearfix
- = f.label :name do
- Group name is
- .input
- = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
-
- .clearfix.group-description-holder
- = f.label :description, "Details"
- .input
- = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
-
- .form-actions
- = f.submit 'Save group', class: "btn btn-save"
-
- .tab-pane#tab-transfer
- .ui-box.ui-box-danger
- %h5.title Transfer group
- .ui-box-body
- %p
- Transferring group will cause loss of admin control over group and all child projects
- = form_for @group do |f|
- = users_select_tag(:'group[owner_id]')
- %hr
- = f.submit 'Transfer group', class: "btn btn-small btn-remove"
-
- .tab-pane#tab-remove
- .ui-box.ui-box-danger
- %h5.title Remove group
- .ui-box-body
- %p
- Remove of group will cause removing all child projects and resources.
- %p
- %strong Removed group can not be restored!
-
- = link_to 'Remove Group', @group, confirm: 'Removed group can not be restored! Are you sure?', method: :delete, class: "btn btn-remove btn-small"
diff --git a/app/views/groups/issues.atom.builder b/app/views/groups/issues.atom.builder
index 701747bd..5bd07bcd 100644
--- a/app/views/groups/issues.atom.builder
+++ b/app/views/groups/issues.atom.builder
@@ -1,9 +1,9 @@
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{@user.name} issues"
- xml.link :href => issues_dashboard_url(:atom, :private_token => @user.private_token), :rel => "self", :type => "application/atom+xml"
- xml.link :href => issues_dashboard_url(:private_token => @user.private_token), :rel => "alternate", :type => "text/html"
- xml.id issues_dashboard_url(:private_token => @user.private_token)
+ xml.link :href => dashboard_issues_url(:atom, :private_token => @user.private_token), :rel => "self", :type => "application/atom+xml"
+ xml.link :href => dashboard_issues_url(:private_token => @user.private_token), :rel => "alternate", :type => "text/html"
+ xml.id dashboard_issues_url(:private_token => @user.private_token)
xml.updated @issues.first.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") if @issues.any?
@issues.each do |issue|
diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml
index 96aa2a16..9e8642f3 100644
--- a/app/views/groups/issues.html.haml
+++ b/app/views/groups/issues.html.haml
@@ -1,7 +1,7 @@
%h3.page_title
Issues
%small (assigned to you)
- %small.pull-right #{@issues.total_count} issues
+ %small.right #{@issues.total_count} issues
%hr
.row
@@ -16,7 +16,7 @@
= link_to_project project
%ul.well-list.issues_table
- group[1].each do |issue|
- = render issue
+ = render(partial: 'issues/show', locals: {issue: issue})
%hr
= paginate @issues, theme: "gitlab"
- else
diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml
index a311729d..0c4d6e0a 100644
--- a/app/views/groups/merge_requests.html.haml
+++ b/app/views/groups/merge_requests.html.haml
@@ -1,7 +1,7 @@
%h3.page_title
Merge Requests
%small (authored by or assigned to you)
- %small.pull-right #{@merge_requests.total_count} merge requests
+ %small.right #{@merge_requests.total_count} merge requests
%hr
.row
diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml
deleted file mode 100644
index 36ee4922..00000000
--- a/app/views/groups/new.html.haml
+++ /dev/null
@@ -1,28 +0,0 @@
-%h3.page_title New Group
-%hr
-= form_for @group do |f|
- - if @group.errors.any?
- .alert.alert-error
- %span= @group.errors.full_messages.first
- .clearfix
- = f.label :name do
- Group name is
- .input
- = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left"
-
- .clearfix.group-description-holder
- = f.label :description, "Details"
- .input
- = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
-
- .form-actions
- = f.submit 'Create group', class: "btn btn-create"
-
-
- .padded
- %ul
- %li Group is kind of directory for several projects
- %li All created groups are private
- %li People within a group see only projects they have access to
- %li All projects of group will be stored in group directory
- %li You will be able to move existing projects into group
diff --git a/app/views/groups/people.html.haml b/app/views/groups/people.html.haml
index 3e4eb082..0bceeaa3 100644
--- a/app/views/groups/people.html.haml
+++ b/app/views/groups/people.html.haml
@@ -16,5 +16,5 @@
%strong= user.name
%span.cgray= user.email
- if @group.owner == user
- %span.btn.btn-small.disabled.pull-right Group Owner
+ %span.btn.btn-small.disabled.right Group Owner
diff --git a/app/views/groups/search.html.haml b/app/views/groups/search.html.haml
new file mode 100644
index 00000000..1ba4707a
--- /dev/null
+++ b/app/views/groups/search.html.haml
@@ -0,0 +1,9 @@
+= form_tag search_group_path(@group), method: :get, class: 'form-inline' do |f|
+ .padded
+ = label_tag :search do
+ %strong Looking for
+ .input
+ = search_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge search-text-input", id: "dashboard_search"
+ = submit_tag 'Search', class: "btn primary wide"
+- if params[:search].present?
+ = render 'search/result'
diff --git a/app/views/groups/show.atom.builder b/app/views/groups/show.atom.builder
index 5f2999c3..9aa52ea5 100644
--- a/app/views/groups/show.atom.builder
+++ b/app/views/groups/show.atom.builder
@@ -1,8 +1,8 @@
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
- xml.title "Group feed - #{@group.name}"
- xml.link :href => group_path(@group, :atom), :rel => "self", :type => "application/atom+xml"
- xml.link :href => group_path(@group), :rel => "alternate", :type => "text/html"
+ xml.title "Dashboard feed#{" - #{current_user.name}" if current_user.name.present?}"
+ xml.link :href => projects_url(:atom), :rel => "self", :type => "application/atom+xml"
+ xml.link :href => projects_url, :rel => "alternate", :type => "text/html"
xml.id projects_url
xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any?
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml
index adf249f6..84dd17c0 100644
--- a/app/views/groups/show.html.haml
+++ b/app/views/groups/show.html.haml
@@ -1,7 +1,7 @@
.projects
.activities.span8
= render "events/event_last_push", event: @last_push
- = link_to dashboard_path, class: 'btn btn-tiny' do
+ = link_to dashboard_path, class: 'btn very_small' do
← To dashboard
%span.cgray You will only see events from projects in this group
@@ -12,15 +12,12 @@
%p.nothing_here_message Project activity will be displayed here
.loading.hide
.side.span4
- - if @group.description.present?
- .description.well.light
- = @group.description
= render "projects", projects: @projects
- .prepend-top-20
- = link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed" do
- %strong
- %i.icon-rss
- News Feed
+ %div
+ %span.rss-icon
+ = link_to dashboard_path(:atom, { private_token: current_user.private_token }) do
+ = image_tag "rss_ui.png", title: "feed"
+ %strong News Feed
%hr
.gitlab-promo
diff --git a/app/views/help/_layout.html.haml b/app/views/help/_layout.html.haml
deleted file mode 100644
index fa5e3a30..00000000
--- a/app/views/help/_layout.html.haml
+++ /dev/null
@@ -1,34 +0,0 @@
-.row
- .span3{:"data-spy" => 'affix'}
- .ui-box
- .title
- %h5 Help
- %ul.well-list
- %li
- %strong= link_to "Workflow", help_workflow_path
- %li
- %strong= link_to "SSH keys", help_ssh_path
-
- %li
- %strong= link_to "GitLab Markdown", help_markdown_path
-
- %li
- %strong= link_to "Permissions", help_permissions_path
-
- %li
- %strong= link_to "API", help_api_path
-
- %li
- %strong= link_to "Web Hooks", help_web_hooks_path
-
- %li
- %strong= link_to "Rake Tasks", help_raketasks_path
-
- %li
- %strong= link_to "System Hooks", help_system_hooks_path
-
- %li
- %strong= link_to "Public Access", help_public_access_path
-
- .span9.pull-right
- = yield
diff --git a/app/views/help/api.html.haml b/app/views/help/api.html.haml
index 0c502ada..3f16637d 100644
--- a/app/views/help/api.html.haml
+++ b/app/views/help/api.html.haml
@@ -1,116 +1,107 @@
-= render layout: 'help/layout' do
- %h3.page_title API
- %br
+%h3.page_title API
+.back_link
+ = link_to help_path do
+ ← to index
+%br
- %ul.nav.nav-tabs.log-tabs.nav-small-tabs
- %li.active
- = link_to "README", "#README", 'data-toggle' => 'tab'
- %li
- = link_to "Projects", "#projects", 'data-toggle' => 'tab'
- %li
- = link_to "Snippets", "#snippets", 'data-toggle' => 'tab'
- %li
- = link_to "Repositories", "#repositories", 'data-toggle' => 'tab'
- %li
- = link_to "Users", "#users", 'data-toggle' => 'tab'
- %li
- = link_to "Session", "#session", 'data-toggle' => 'tab'
- %li
- = link_to "Issues", "#issues", 'data-toggle' => 'tab'
- %li
- = link_to "Milestones", "#milestones", 'data-toggle' => 'tab'
- %li
- = link_to "Notes", "#notes", 'data-toggle' => 'tab'
- %li
- = link_to "System Hooks", "#system_hooks", 'data-toggle' => 'tab'
+%ul.nav.nav-tabs.log-tabs
+ %li.active
+ = link_to "README", "#README", 'data-toggle' => 'tab'
+ %li
+ = link_to "Projects", "#projects", 'data-toggle' => 'tab'
+ %li
+ = link_to "Snippets", "#snippets", 'data-toggle' => 'tab'
+ %li
+ = link_to "Repositories", "#repositories", 'data-toggle' => 'tab'
+ %li
+ = link_to "Users", "#users", 'data-toggle' => 'tab'
+ %li
+ = link_to "Session", "#session", 'data-toggle' => 'tab'
+ %li
+ = link_to "Issues", "#issues", 'data-toggle' => 'tab'
+ %li
+ = link_to "Milestones", "#milestones", 'data-toggle' => 'tab'
+ %li
+ = link_to "Notes", "#notes", 'data-toggle' => 'tab'
- .tab-content
- .tab-pane.active#README
- .file_holder
- .file_title
- %i.icon-file
- README
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "api", "README.md"))
+.tab-content
+ .tab-pane.active#README
+ .file_holder
+ .file_title
+ %i.icon-file
+ README
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "api", "README.md"))
- .tab-pane#projects
- .file_holder
- .file_title
- %i.icon-file
- Projects
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "api", "projects.md"))
+ .tab-pane#projects
+ .file_holder
+ .file_title
+ %i.icon-file
+ Projects
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "api", "projects.md"))
- .tab-pane#snippets
- .file_holder
- .file_title
- %i.icon-file
- Projects Snippets
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "api", "snippets.md"))
+ .tab-pane#snippets
+ .file_holder
+ .file_title
+ %i.icon-file
+ Projects Snippets
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "api", "snippets.md"))
- .tab-pane#repositories
- .file_holder
- .file_title
- %i.icon-file
- Projects
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "api", "repositories.md"))
+ .tab-pane#repositories
+ .file_holder
+ .file_title
+ %i.icon-file
+ Projects
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "api", "repositories.md"))
- .tab-pane#users
- .file_holder
- .file_title
- %i.icon-file
- Users
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "api", "users.md"))
+ .tab-pane#users
+ .file_holder
+ .file_title
+ %i.icon-file
+ Users
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "api", "users.md"))
- .tab-pane#session
- .file_holder
- .file_title
- %i.icon-file
- Session
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "api", "session.md"))
+ .tab-pane#session
+ .file_holder
+ .file_title
+ %i.icon-file
+ Session
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "api", "session.md"))
- .tab-pane#issues
- .file_holder
- .file_title
- %i.icon-file
- Issues
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "api", "issues.md"))
+ .tab-pane#issues
+ .file_holder
+ .file_title
+ %i.icon-file
+ Issues
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "api", "issues.md"))
- .tab-pane#milestones
- .file_holder
- .file_title
- %i.icon-file
- Milestones
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "api", "milestones.md"))
+ .tab-pane#milestones
+ .file_holder
+ .file_title
+ %i.icon-file
+ Milestones
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "api", "milestones.md"))
- .tab-pane#notes
- .file_holder
- .file_title
- %i.icon-file
- Notes
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "api", "notes.md"))
-
- .tab-pane#system_hooks
- .file_holder
- .file_title
- %i.icon-file
- System Hooks
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "api", "system_hooks.md"))
+ .tab-pane#notes
+ .file_holder
+ .file_title
+ %i.icon-file
+ Notes
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "api", "notes.md"))
diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml
index ffea654d..28791b32 100644
--- a/app/views/help/index.html.haml
+++ b/app/views/help/index.html.haml
@@ -1,13 +1,13 @@
%h3.page_title
GITLAB
- .pull-right
- %span= Gitlab::VERSION
- %small= Gitlab::REVISION
+ .right
+ %span= Gitlab::Version
+ %small= Gitlab::Revision
%hr
%p.lead
Self Hosted Git Management
%br
- Fast, secure and stable solution based on Ruby on Rails.
+ Fast, secure and stable solution based on Ruby on Rails & Gitolite.
%br
@@ -22,7 +22,7 @@
= mail_to Gitlab.config.gitlab.support_email, "support contact"
%li
Use the
- = link_to "search bar", '#', onclick: "$('#search').focus();"
+ = link_to "search bar", '#', onclick: "$("#search").focus();"
on the top of this page
%li
Ask in our
diff --git a/app/views/help/markdown.html.haml b/app/views/help/markdown.html.haml
index 92c1e49b..0419f7c1 100644
--- a/app/views/help/markdown.html.haml
+++ b/app/views/help/markdown.html.haml
@@ -1,127 +1,129 @@
-= render layout: 'help/layout' do
- %h3.page_title GitLab Flavored Markdown
- %br
+%h3.page_title GitLab Flavored Markdown
+.back_link
+ = link_to help_path do
+ ← to index
+%hr
- .row
- .span8
+.row
+ .span8
+ %p
+ For GitLab we developed something we call "GitLab Flavored Markdown" (GFM).
+ It extends the standard Markdown in a few significant ways adds some useful functionality.
+
+ %p You can use GFM in:
+ %ul
+ %li commit messages
+ %li comments
+ %li wall posts
+ %li issues
+ %li merge requests
+ %li milestones
+ %li wiki pages
+
+ .span4
+ .alert.alert-info
%p
- For GitLab we developed something we call "GitLab Flavored Markdown" (GFM).
- It extends the standard Markdown in a few significant ways adds some useful functionality.
+ If you're not already familiar with Markdown, you should spend 15 minutes and go over the excellent
+ %strong= link_to "Markdown Syntax Guide", "http://daringfireball.net/projects/markdown/syntax"
+ at Daring Fireball.
- %p You can use GFM in:
- %ul
- %li commit messages
- %li comments
- %li wall posts
- %li issues
- %li merge requests
- %li milestones
- %li wiki pages
+.row
+ .span8
+ %h3 Differences from traditional Markdown
- .span4
- .alert.alert-info
- %p
- If you're not already familiar with Markdown, you should spend 15 minutes and go over the excellent
- %strong= link_to "Markdown Syntax Guide", "http://daringfireball.net/projects/markdown/syntax"
- at Daring Fireball.
+ %h4 Newlines
- .row
- .span8
- %h3 Differences from traditional Markdown
+ %p
+ The biggest difference that GFM introduces is in the handling of linebreaks.
+ With traditional Markdown you can hard wrap paragraphs of text and they will be combined into a single paragraph. We find this to be the cause of a huge number of unintentional formatting errors.
+ GFM treats newlines in paragraph-like content as real line breaks, which is probably what you intended.
- %h4 Newlines
+ %p The next paragraph contains two phrases separated by a single newline character:
+ %pre= "Roses are red\nViolets are blue"
+ %p becomes
+ = markdown "Roses are red\nViolets are blue"
+
+ %h4 Multiple underscores in words
+
+ %p
+ It is not reasonable to italicize just part of a word, especially when you're dealing with code and names often appear with multiple underscores.
+ Therefore, GFM ignores multiple underscores in words.
+
+ %pre= "perform_complicated_task\ndo_this_and_do_that_and_another_thing"
+ %p becomes
+ = markdown "perform_complicated_task\ndo_this_and_do_that_and_another_thing"
+
+ %h4 URL autolinking
+
+ %p
+ GFM will autolink standard URLs you copy and paste into your text.
+ So if you want to link to a URL (instead of a textual link), you can simply put the URL in verbatim and it will be turned into a link to that URL.
+
+ %h4 Fenced code blocks
+
+ %p
+ Markdown converts text with four spaces at the front of each line to code blocks.
+ GFM supports that, but we also support fenced blocks.
+ Just wrap your code blocks in ```
and you won't need to indent manually to trigger a code block.
+
+ %pre= %Q{```ruby\nrequire 'redcarpet'\nmarkdown = Redcarpet.new("Hello World!")\nputs markdown.to_html\n```}
+ %p becomes
+ = markdown %Q{```ruby\nrequire 'redcarpet'\nmarkdown = Redcarpet.new("Hello World!")\nputs markdown.to_html\n```}
+
+ %h4 Emoji
+
+.row
+ .span8
+ :ruby
+ puts markdown %Q{Sometimes you want to be :cool: and add some :sparkles: to your :speech_balloon:. Well we have a :gift: for you:
+
+ :exclamation: You can use emoji anywhere GFM is supported. :sunglasses:
+
+ You can use it to point out a :bug: or warn about :monkey:patches. And if someone improves your really :snail: code, send them a :bouquet: or some :candy:. People will :heart: you for that.
+
+ If you are :new: to this, don't be :fearful:. You can easily join the emoji :circus_tent:. All you need to do is to :book: up on the supported codes.
+ }
+
+ .span4
+ .alert.alert-info
%p
- The biggest difference that GFM introduces is in the handling of linebreaks.
- With traditional Markdown you can hard wrap paragraphs of text and they will be combined into a single paragraph. We find this to be the cause of a huge number of unintentional formatting errors.
- GFM treats newlines in paragraph-like content as real line breaks, which is probably what you intended.
+ Consult the
+ %strong= link_to "Emoji Cheat Sheet", "http://www.emoji-cheat-sheet.com/"
+ for a list of all supported emoji codes.
+.row
+ .span8
+ %h4 Special GitLab references
- %p The next paragraph contains two phrases separated by a single newline character:
- %pre= "Roses are red\nViolets are blue"
- %p becomes
- = markdown "Roses are red\nViolets are blue"
+ %p
+ GFM recognizes special references.
+ You can easily reference e.g. a team member, an issue or a commit within a project.
+ GFM will turn that reference into a link so you can navigate between them easily.
- %h4 Multiple underscores in words
+ %p GFM will recognize the following references:
+ %ul
+ %li
+ %code @foo
+ for team members
+ %li
+ %code #123
+ for issues
+ %li
+ %code !123
+ for merge request
+ %li
+ %code $123
+ for snippets
+ %li
+ %code 1234567
+ for commits
- %p
- It is not reasonable to italicize just part of a word, especially when you're dealing with code and names often appear with multiple underscores.
- Therefore, GFM ignores multiple underscores in words.
-
- %pre= "perform_complicated_task\ndo_this_and_do_that_and_another_thing"
- %p becomes
- = markdown "perform_complicated_task\ndo_this_and_do_that_and_another_thing"
-
- %h4 URL autolinking
-
- %p
- GFM will autolink standard URLs you copy and paste into your text.
- So if you want to link to a URL (instead of a textual link), you can simply put the URL in verbatim and it will be turned into a link to that URL.
-
- %h4 Fenced code blocks
-
- %p
- Markdown converts text with four spaces at the front of each line to code blocks.
- GFM supports that, but we also support fenced blocks.
- Just wrap your code blocks in ```
and you won't need to indent manually to trigger a code block.
-
- %pre= %Q{```ruby\nrequire 'redcarpet'\nmarkdown = Redcarpet.new("Hello World!")\nputs markdown.to_html\n```}
- %p becomes
- = markdown %Q{```ruby\nrequire 'redcarpet'\nmarkdown = Redcarpet.new("Hello World!")\nputs markdown.to_html\n```}
-
- %h4 Emoji
-
- .row
- .span8
- :ruby
- puts markdown %Q{Sometimes you want to be :cool: and add some :sparkles: to your :speech_balloon:. Well we have a :gift: for you:
-
- :exclamation: You can use emoji anywhere GFM is supported. :sunglasses:
-
- You can use it to point out a :bug: or warn about :monkey:patches. And if someone improves your really :snail: code, send them a :bouquet: or some :candy:. People will :heart: you for that.
-
- If you are :new: to this, don't be :fearful:. You can easily join the emoji :circus_tent:. All you need to do is to :book: up on the supported codes.
- }
-
- .span4
- .alert.alert-info
- %p
- Consult the
- %strong= link_to "Emoji Cheat Sheet", "http://www.emoji-cheat-sheet.com/"
- for a list of all supported emoji codes.
-
- .row
- .span8
- %h4 Special GitLab references
-
- %p
- GFM recognizes special references.
- You can easily reference e.g. a team member, an issue or a commit within a project.
- GFM will turn that reference into a link so you can navigate between them easily.
-
- %p GFM will recognize the following references:
- %ul
- %li
- %code @foo
- for team members
- %li
- %code #123
- for issues
- %li
- %code !123
- for merge request
- %li
- %code $123
- for snippets
- %li
- %code 1234567
- for commits
-
- -# this example will only be shown if the user has a project with at least one issue
- - if @project = current_user.authorized_projects.first
- - if issue = @project.issues.first
- %p For example in your #{link_to @project.name, project_path(@project)} project, writing:
- %pre= "This is related to ##{issue.id}. @#{current_user.username} is working on solving it."
- %p becomes:
- = markdown "This is related to ##{issue.id}. @#{current_user.username} is working on solving it."
- - @project = nil # Prevent this from bubbling up to page title
+ -# this example will only be shown if the user has a project with at least one issue
+ - if @project = current_user.authorized_projects.first
+ - if issue = @project.issues.first
+ %p For example in your #{link_to @project.name, project_path(@project)} project, writing:
+ %pre= "This is related to ##{issue.id}. @#{current_user.name} is working on solving it."
+ %p becomes:
+ = markdown "This is related to ##{issue.id}. @#{current_user.name} is working on solving it."
+ - @project = nil # Prevent this from bubbling up to page title
diff --git a/app/views/help/permissions.html.haml b/app/views/help/permissions.html.haml
index 2075753e..b56251f3 100644
--- a/app/views/help/permissions.html.haml
+++ b/app/views/help/permissions.html.haml
@@ -1,66 +1,68 @@
-= render layout: 'help/layout' do
- %h3.page_title Permissions
- %br
+%h3.page_title Permissions
+.back_link
+ = link_to help_path do
+ ← to index
+%hr
- %fieldset
- %legend Guest
- %ul
- %li Create new issue
- %li Leave comments
- %li Write on project wall
+%fieldset
+ %legend Guest
+ %ul
+ %li Create new issue
+ %li Leave comments
+ %li Write on project wall
- %fieldset
- %legend Reporter
- %ul
- %li Create new issue
- %li Leave comments
- %li Write on project wall
- %li Pull project code
- %li Download project
- %li Create a code snippets
+%fieldset
+ %legend Reporter
+ %ul
+ %li Create new issue
+ %li Leave comments
+ %li Write on project wall
+ %li Pull project code
+ %li Download project
+ %li Create a code snippets
- %fieldset
- %legend Developer
- %ul
- %li Create new issue
- %li Leave comments
- %li Write on project wall
- %li Pull project code
- %li Download project
- %li Create new merge request
- %li Create a code snippets
- %li Create new branches
- %li Push to non-protected branches
- %li Remove non-protected branches
- %li Add tags
- %li Write a wiki
+%fieldset
+ %legend Developer
+ %ul
+ %li Create new issue
+ %li Leave comments
+ %li Write on project wall
+ %li Pull project code
+ %li Download project
+ %li Create new merge request
+ %li Create a code snippets
+ %li Create new branches
+ %li Push to non-protected branches
+ %li Remove non-protected branches
+ %li Add tags
+ %li Write a wiki
- %fieldset
- %legend Master
- %ul
- %li Create new issue
- %li Leave comments
- %li Write on project wall
- %li Pull project code
- %li Download project
- %li Create new merge request
- %li Create a code snippets
- %li Create new branches
- %li Push to non-protected branches
- %li Remove non-protected branches
- %li Add tags
- %li Write a wiki
- %li Add new team members
- %li Push to protected branches
- %li Remove protected branches
- %li Push with force option
- %li Edit project
- %li Add Deploy Keys to project
- %li Configure Project Hooks
+%fieldset
+ %legend Master
+ %ul
+ %li Create new issue
+ %li Leave comments
+ %li Write on project wall
+ %li Pull project code
+ %li Download project
+ %li Create new merge request
+ %li Create a code snippets
+ %li Create new branches
+ %li Push to non-protected branches
+ %li Remove non-protected branches
+ %li Add tags
+ %li Write a wiki
+ %li Add new team members
+ %li Push to protected branches
+ %li Remove protected branches
+ %li Push with force option
+ %li Edit project
+ %li Add Deploy Keys to project
+ %li Configure Project Hooks
- %fieldset
- %legend Owner
- %ul
- %li Transfer project to another namespace
- %li Remove project
+%fieldset
+ %legend Owner
+ %ul
+ %li Transfer project to another namespace
+ %li Remove project
diff --git a/app/views/help/public_access.html.haml b/app/views/help/public_access.html.haml
index 66de17a3..60d8d597 100644
--- a/app/views/help/public_access.html.haml
+++ b/app/views/help/public_access.html.haml
@@ -1,16 +1,18 @@
-= render layout: 'help/layout' do
- %h3.page_title Public Access
- %br
+%h3.page_title Public Access
+.back_link
+ = link_to help_path do
+ ← to index
+%hr
- %p
- GitLab allows you to open selected projects to be accessed publicly.
- These projects will be clonable
- %em without any
- authentication.
- Also they will be listed on the #{link_to "public access directory", public_root_path}.
+%p
+ GitLab allows you to open selected projects to be accessed publicly.
+ These projects will be clonable
+ %em without any
+ authentication.
+ Also they will be listed on the #{link_to "public access directory", public_root_path}.
- %ol
- %li Go to your project dashboard
- %li Click on the "Edit" tab
- %li Select "Public clone access"
+%ol
+ %li Go to your project dashboard
+ %li Click on the "Edit" tab
+ %li Select "Public clone access"
diff --git a/app/views/help/raketasks.html.haml b/app/views/help/raketasks.html.haml
index bcc874fc..f015451a 100644
--- a/app/views/help/raketasks.html.haml
+++ b/app/views/help/raketasks.html.haml
@@ -1,64 +1,66 @@
-= render layout: 'help/layout' do
- %h3.page_title GitLab Rake Tasks
- %br
+%h3.page_title GitLab Rake Tasks
+.back_link
+ = link_to help_path do
+ ← to index
+%hr
- %p.slead
- GitLab provides some specific rake tasks to enable special features or perform maintenance tasks.
+%p.slead
+ GitLab provides some specific rake tasks to enable special features or perform maintenance tasks.
- %ul.nav.nav-tabs.log-tabs
- %li.active
- = link_to "Features", "#features", 'data-toggle' => 'tab'
- %li
- = link_to "Maintenance", "#maintenance", 'data-toggle' => 'tab'
- %li
- = link_to "User Management", "#user_management", 'data-toggle' => 'tab'
- %li
- = link_to "Backup & Restore", "#backup_restore", 'data-toggle' => 'tab'
- %li
- = link_to "Cleanup", "#cleanup", 'data-toggle' => 'tab'
+%ul.nav.nav-tabs.log-tabs
+ %li.active
+ = link_to "Features", "#features", 'data-toggle' => 'tab'
+ %li
+ = link_to "Maintenance", "#maintenance", 'data-toggle' => 'tab'
+ %li
+ = link_to "User Management", "#user_management", 'data-toggle' => 'tab'
+ %li
+ = link_to "Backup & Restore", "#backup_restore", 'data-toggle' => 'tab'
+ %li
+ = link_to "Cleanup", "#cleanup", 'data-toggle' => 'tab'
- .tab-content
- .tab-pane.active#features
- .file_holder
- .file_title
- %i.icon-file
- Features
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "raketasks", "features.md"))
+.tab-content
+ .tab-pane.active#features
+ .file_holder
+ .file_title
+ %i.icon-file
+ Features
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "raketasks", "features.md"))
- .tab-pane#maintenance
- .file_holder
- .file_title
- %i.icon-file
- Maintenance
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "raketasks", "maintenance.md"))
+ .tab-pane#maintenance
+ .file_holder
+ .file_title
+ %i.icon-file
+ Maintenance
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "raketasks", "maintenance.md"))
- .tab-pane#user_management
- .file_holder
- .file_title
- %i.icon-file
- User Management
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "raketasks", "user_management.md"))
+ .tab-pane#user_management
+ .file_holder
+ .file_title
+ %i.icon-file
+ User Management
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "raketasks", "user_management.md"))
- .tab-pane#cleanup
- .file_holder
- .file_title
- %i.icon-file
- Cleanup
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "raketasks", "cleanup.md"))
+ .tab-pane#cleanup
+ .file_holder
+ .file_title
+ %i.icon-file
+ Cleanup
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "raketasks", "cleanup.md"))
- .tab-pane#backup_restore
- .file_holder
- .file_title
- %i.icon-file
- Backup & Restore
- .file_content.wiki
- = preserve do
- = markdown File.read(Rails.root.join("doc", "raketasks", "backup_restore.md"))
+ .tab-pane#backup_restore
+ .file_holder
+ .file_title
+ %i.icon-file
+ Backup & Restore
+ .file_content.wiki
+ = preserve do
+ = markdown File.read(Rails.root.join("doc", "raketasks", "backup_restore.md"))
diff --git a/app/views/help/ssh.html.haml b/app/views/help/ssh.html.haml
index 11441597..3f082333 100644
--- a/app/views/help/ssh.html.haml
+++ b/app/views/help/ssh.html.haml
@@ -1,23 +1,25 @@
-= render layout: 'help/layout' do
- %h3.page_title SSH Keys
- %br
+%h3.page_title SSH Keys
+.back_link
+ = link_to help_path do
+ ← to index
+%hr
- %p.slead
- SSH key allows you to establish a secure connection between your computer and GitLab
+%p.slead
+ SSH key allows you to establish a secure connection between your computer and GitLab
- %p.slead
- To generate a new SSH key just open your terminal and use code below.
+%p.slead
+ To generate a new SSH key just open your terminal and use code below.
- %pre.dark
- ssh-keygen -t rsa -C "#{current_user.email}"
+%pre.dark
+ ssh-keygen -t rsa -C "#{current_user.email}"
- \# Creates a new ssh key using the provided email
- \# Generating public/private rsa key pair...
+ \# Creates a new ssh key using the provided email
+ \# Generating public/private rsa key pair...
- %p.slead
- Next just use code below to dump your public key and add to GitLab SSH Keys
+%p.slead
+ Next just use code below to dump your public key and add to GitLab SSH Keys
- %pre.dark
- cat ~/.ssh/id_rsa.pub
+%pre.dark
+ cat ~/.ssh/id_rsa.pub
- \# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....
+ \# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....
diff --git a/app/views/help/system_hooks.html.haml b/app/views/help/system_hooks.html.haml
index c49011a2..c25b60de 100644
--- a/app/views/help/system_hooks.html.haml
+++ b/app/views/help/system_hooks.html.haml
@@ -1,12 +1,14 @@
-= render layout: 'help/layout' do
- %h3.page_title System hooks
- %br
+%h3 System hooks
+.back_link
+ = link_to :back do
+ ← back
+%hr
- %p.slead
- Your GitLab instance can perform HTTP POST requests on the following events: create_project, delete_project, create_user, delete_user, change_team_member.
- %br
- %br
- System Hooks can be used, e.g. for logging or changing information in a LDAP server.
- %br
- %h5 Hooks request example:
- = render "admin/hooks/data_ex"
+%p.slead
+ Your GitLab instance can perform HTTP POST requests on the following events: create_project, delete_project, create_user, delete_user, change_team_member.
+ %br
+ %br
+ System Hooks can be used, e.g. for logging or changing information in a LDAP server.
+ %br
+%h5 Hooks request example:
+= render "admin/hooks/data_ex"
diff --git a/app/views/help/web_hooks.html.haml b/app/views/help/web_hooks.html.haml
index 09745f73..65036613 100644
--- a/app/views/help/web_hooks.html.haml
+++ b/app/views/help/web_hooks.html.haml
@@ -1,13 +1,15 @@
-= render layout: 'help/layout' do
- %h3.page_title Web hooks
+%h3.page_title Web hooks
+.back_link
+ = link_to help_path do
+ ← to index
+%hr
+
+%p.slead
+ Every GitLab project can trigger a web server whenever the repo is pushed to.
%br
-
- %p.slead
- Every GitLab project can trigger a web server whenever the repo is pushed to.
- %br
- Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
- %br
- GitLab will send POST request with commits information on every push.
- %h5 Hooks request example:
- = render "hooks/data_ex"
+ Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
+ %br
+ GitLab will send POST request with commits information on every push.
+%h5 Hooks request example:
+= render "hooks/data_ex"
diff --git a/app/views/help/workflow.html.haml b/app/views/help/workflow.html.haml
index 495b7c6e..6062ca09 100644
--- a/app/views/help/workflow.html.haml
+++ b/app/views/help/workflow.html.haml
@@ -1,38 +1,40 @@
-= render layout: 'help/layout' do
- %h3.page_title Workflow
- %br
+%h3.page_title Workflow
+.back_link
+ = link_to help_path do
+ ← to index
+%hr
- %ol.help
- %li
- %p Clone project
- .bash
- %pre.dark
- git clone git@example.com:project-name.git
+%ol.help
+ %li
+ %p Clone project
+ .bash
+ %pre.dark
+ git clone git@example.com:project-name.git
- %li
- %p Create branch with your feature
- .bash
- %pre.dark
- git checkout -b $feature_name
+ %li
+ %p Create branch with your feature
+ .bash
+ %pre.dark
+ git checkout -b $feature_name
- %li
- %p Write code. Commit changes
- .bash
- %pre.dark
- git commit -am "My feature is ready"
+ %li
+ %p Write code. Commit changes
+ .bash
+ %pre.dark
+ git commit -am "My feature is ready"
- %li
- %p Push your branch to GitLab
- .bash
- %pre.dark
- git push origin $feature_name
+ %li
+ %p Push your branch to GitLab
+ .bash
+ %pre.dark
+ git push origin $feature_name
- %li
- %p Review your code on Commits page
+ %li
+ %p Review your code on Commits page
- %li
- %p Create a merge request
+ %li
+ %p Create a merge request
- %li
- %p Your team lead will review code & merge it to main branch
+ %li
+ %p Your team lead will review code & merge it to main branch
diff --git a/app/views/hooks/index.html.haml b/app/views/hooks/index.html.haml
index 3155dd32..1fcf6e1c 100644
--- a/app/views/hooks/index.html.haml
+++ b/app/views/hooks/index.html.haml
@@ -1,4 +1,4 @@
-= render "projects/settings_nav"
+= render "projects/project_head"
- if can? current_user, :admin_project, @project
.alert.alert-info
@@ -10,7 +10,7 @@
= form_for [@project, @hook], as: :hook, url: project_hooks_path(@project), html: { class: 'form-inline' } do |f|
-if @hook.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
- @hook.errors.full_messages.each do |msg|
%p= msg
.clearfix
@@ -18,7 +18,7 @@
.input
= f.text_field :url, class: "text_field xxlarge"
- = f.submit "Add Web Hook", class: "btn btn-create"
+ = f.submit "Add Web Hook", class: "btn primary"
%hr
-if @hooks.any?
@@ -37,6 +37,6 @@
→
%span.monospace= hook.url
%td
- .pull-right
- = link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped"
- = link_to 'Remove', project_hook_path(@project, hook), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small grouped"
+ .right
+ = link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn small grouped"
+ = link_to 'Remove', project_hook_path(@project, hook), confirm: 'Are you sure?', method: :delete, class: "danger btn small grouped"
diff --git a/app/views/issues/_filter.html.haml b/app/views/issues/_filter.html.haml
index b621f11b..779e55bb 100644
--- a/app/views/issues/_filter.html.haml
+++ b/app/views/issues/_filter.html.haml
@@ -6,10 +6,7 @@
Open
%li{class: ("active" if params[:status] == 'assigned-to-me')}
= link_to project_issues_path(@project, status: 'assigned-to-me') do
- Assigned to me
- %li{class: ("active" if params[:status] == 'created-by-me')}
- = link_to project_issues_path(@project, status: 'created-by-me') do
- Created by me
+ Assigned To Me
%li{class: ("active" if params[:status] == 'closed')}
= link_to project_issues_path(@project, status: 'closed') do
Closed
@@ -19,5 +16,5 @@
%fieldset
%hr
- = link_to "Reset", project_issues_path(@project), class: 'btn pull-right'
+ = link_to "Reset", project_issues_path(@project), class: 'btn right'
diff --git a/app/views/issues/_form.html.haml b/app/views/issues/_form.html.haml
index 6d7613a7..bef235f2 100644
--- a/app/views/issues/_form.html.haml
+++ b/app/views/issues/_form.html.haml
@@ -2,7 +2,7 @@
%h3.page_title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
= form_for [@project, @issue] do |f|
-if @issue.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
- @issue.errors.full_messages.each do |msg|
%span= msg
%br
@@ -44,12 +44,12 @@
.actions
- if @issue.new_record?
- = f.submit 'Submit new issue', class: "btn btn-create"
+ = f.submit 'Submit new issue', class: "btn success"
-else
- = f.submit 'Save changes', class: "btn-save btn"
+ = f.submit 'Save changes', class: "save-btn btn"
- cancel_path = @issue.new_record? ? project_issues_path(@project) : project_issue_path(@project, @issue)
- = link_to "Cancel", cancel_path, class: 'btn btn-cancel'
+ = link_to "Cancel", cancel_path, class: 'btn cancel-btn'
diff --git a/app/views/issues/_head.html.haml b/app/views/issues/_head.html.haml
index 44d14d5c..4294503c 100644
--- a/app/views/issues/_head.html.haml
+++ b/app/views/issues/_head.html.haml
@@ -5,6 +5,7 @@
= link_to 'Milestones', project_milestones_path(@project), class: "tab"
= nav_link(controller: :labels) do
= link_to 'Labels', project_labels_path(@project), class: "tab"
- %li.pull-right
- = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do
- %i.icon-rss
+ %li.right
+ %span.rss-icon
+ = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do
+ = image_tag "rss_ui.png", title: "feed"
diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml
index dc7db906..8821dbb8 100644
--- a/app/views/issues/_issues.html.haml
+++ b/app/views/issues/_issues.html.haml
@@ -1,9 +1,10 @@
-= render @issues
+- @issues.each do |issue|
+ = render(partial: 'issues/show', locals: {issue: issue})
- if @issues.present?
%li.bottom
.left= paginate @issues, remote: true, theme: "gitlab"
- .pull-right
+ .right
%span.issue_counter #{@issues.total_count}
issues for this filter
- else
diff --git a/app/views/issues/_issue.html.haml b/app/views/issues/_show.html.haml
similarity index 77%
rename from app/views/issues/_issue.html.haml
rename to app/views/issues/_show.html.haml
index 3d1ecd43..dcef901c 100644
--- a/app/views/issues/_issue.html.haml
+++ b/app/views/issues/_show.html.haml
@@ -2,17 +2,17 @@
- if controller.controller_name == 'issues'
.issue_check
= check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue)
- .pull-right
+ .right
- if issue.notes.any?
- %span.btn.btn-small.disabled.grouped
+ %span.btn.small.disabled.grouped
%i.icon-comment
= issue.notes.count
- if can? current_user, :modify_issue, issue
- - if issue.closed?
- = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-small grouped reopen_issue", remote: true
+ - if issue.closed
+ = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {closed: false }, status_only: true), method: :put, class: "btn small grouped reopen_issue", remote: true
- else
- = link_to 'Close', project_issue_path(issue.project, issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-small grouped close_issue", remote: true
- = link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link grouped" do
+ = link_to 'Close', project_issue_path(issue.project, issue, issue: {closed: true }, status_only: true), method: :put, class: "btn small grouped close_issue", remote: true
+ = link_to edit_project_issue_path(issue.project, issue), class: "btn small edit-issue-link grouped" do
%i.icon-edit
Edit
diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml
index 875f29e2..d5c29c78 100644
--- a/app/views/issues/index.html.haml
+++ b/app/views/issues/index.html.haml
@@ -3,16 +3,16 @@
%h3.page_title
Issues
%span (#{@issues.total_count} )
- .pull-right
+ .right
.span5
- if can? current_user, :write_issue, @project
- = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-primary pull-right", title: "New Issue", id: "new_issue_link" do
+ = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "right btn primary", title: "New Issue", id: "new_issue_link" do
%i.icon-plus
New Issue
- = form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: 'pull-right' do
+ = form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: :right do
= hidden_field_tag :project_id, @project.id, { id: 'project_id' }
= hidden_field_tag :status, params[:status]
- = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search span3 pull-right neib search-text-input' }
+ = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search span3 right neib search-text-input' }
.clearfix
@@ -33,7 +33,7 @@
= select_tag('update[milestone_id]', options_from_collection_for_select(issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
= hidden_field_tag 'update[issues_ids]', []
= hidden_field_tag :status, params[:status]
- = button_tag "Save", class: "btn update_selected_issues btn-small btn-save"
+ = button_tag "Save", class: "btn update_selected_issues btn-small save-btn"
.issues_filters
= form_tag project_issues_path(@project), method: :get do
= select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), prompt: "Labels")
diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml
index 70f94e52..6bf78929 100644
--- a/app/views/issues/show.html.haml
+++ b/app/views/issues/show.html.haml
@@ -5,18 +5,18 @@
created at
= @issue.created_at.stamp("Aug 21, 2011")
- %span.pull-right
- - if can?(current_user, :modify_issue, @issue)
- - if @issue.closed?
- = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped reopen_issue"
+ %span.right
+ - if can?(current_user, :admin_project, @project) || @issue.author == current_user
+ - if @issue.closed
+ = link_to 'Reopen', project_issue_path(@project, @issue, issue: {closed: false }, status_only: true), method: :put, class: "btn grouped reopen_issue"
- else
- = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue"
-
+ = link_to 'Close', project_issue_path(@project, @issue, issue: {closed: true }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue"
+ - if can?(current_user, :admin_project, @project) || @issue.author == current_user
= link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do
%i.icon-edit
Edit
-.pull-right
+.right
.span3#votes= render 'votes/votes_block', votable: @issue
.back_link
@@ -27,7 +27,7 @@
.ui-box.ui-box-show
.ui-box-head
%h4.box-title
- - if @issue.closed?
+ - if @issue.closed
.error.status_info Closed
= gfm escape_once(@issue.title)
@@ -42,7 +42,7 @@
%cite.cgray and attached to milestone
%strong= link_to_gfm truncate(milestone.title, length: 20), project_milestone_path(milestone.project, milestone)
- .pull-right
+ .right
- @issue.labels.each do |label|
%span.label
%i.icon-tag
@@ -55,11 +55,5 @@
= preserve do
= markdown @issue.description
-- content_for :note_actions do
- - if can?(current_user, :modify_issue, @issue)
- - if @issue.closed?
- = link_to 'Reopen Issue', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped reopen_issue"
- - else
- = link_to 'Close Issue', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue"
.voting_notes#notes= render "notes/notes_with_form"
diff --git a/app/views/keys/_form.html.haml b/app/views/keys/_form.html.haml
index fe26216b..26700803 100644
--- a/app/views/keys/_form.html.haml
+++ b/app/views/keys/_form.html.haml
@@ -1,7 +1,7 @@
%div
= form_for @key do |f|
-if @key.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
%ul
- @key.errors.full_messages.each do |msg|
%li= msg
@@ -19,6 +19,6 @@
.actions
- = f.submit 'Save', class: "btn btn-save"
- = link_to "Cancel", keys_path, class: "btn btn-cancel"
+ = f.submit 'Save', class: "btn save-btn"
+ = link_to "Cancel", keys_path, class: "btn cancel-btn"
diff --git a/app/views/keys/_show.html.haml b/app/views/keys/_show.html.haml
index 52bbea6f..9d4485cf 100644
--- a/app/views/keys/_show.html.haml
+++ b/app/views/keys/_show.html.haml
@@ -8,5 +8,5 @@
= time_ago_in_words(key.created_at)
ago
%td
- = link_to 'Remove', key, confirm: 'Are you sure?', method: :delete, class: "btn btn-small btn-remove delete-key pull-right"
+ = link_to 'Remove', key, confirm: 'Are you sure?', method: :delete, class: "btn small danger delete-key right"
diff --git a/app/views/keys/index.html.haml b/app/views/keys/index.html.haml
index 7730b344..f5a8283a 100644
--- a/app/views/keys/index.html.haml
+++ b/app/views/keys/index.html.haml
@@ -1,6 +1,6 @@
%h3.page_title
SSH Keys
- = link_to "Add new", new_key_path, class: "btn pull-right"
+ = link_to "Add new", new_key_path, class: "btn right"
%hr
%p.slead
diff --git a/app/views/keys/show.html.haml b/app/views/keys/show.html.haml
index 059fe5e5..a8cba6c8 100644
--- a/app/views/keys/show.html.haml
+++ b/app/views/keys/show.html.haml
@@ -10,5 +10,5 @@
%hr
%pre= @key.key
-.pull-right
- = link_to 'Remove', @key, confirm: 'Are you sure?', method: :delete, class: "btn btn-remove delete-key"
+.right
+ = link_to 'Remove', @key, confirm: 'Are you sure?', method: :delete, class: "btn danger delete-key"
diff --git a/app/views/labels/_label.html.haml b/app/views/labels/_label.html.haml
index 027b041d..6e223e8e 100644
--- a/app/views/labels/_label.html.haml
+++ b/app/views/labels/_label.html.haml
@@ -2,7 +2,7 @@
%strong
%i.icon-tag
= label.name
- .pull-right
+ .right
= link_to project_issues_path(label_name: label.name) do
%strong
= pluralize(label.count, 'issue')
diff --git a/app/views/layouts/_flash.html.haml b/app/views/layouts/_flash.html.haml
index a3bed593..9961ce8d 100644
--- a/app/views/layouts/_flash.html.haml
+++ b/app/views/layouts/_flash.html.haml
@@ -1,8 +1,3 @@
-.flash-container
- - if alert
- .alert
- %span= alert
-
- - elsif notice
- .alert.alert-info
- %span= notice
+- if text = alert || notice
+ #flash-container
+ %h4= text
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index eb83fd2f..4b4f5da3 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -7,7 +7,6 @@
= stylesheet_link_tag "application"
= javascript_include_tag "application"
= csrf_meta_tags
- = include_gon
-# Atom feed
- if current_user
diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml
index 8f6873e1..f4b2228a 100644
--- a/app/views/layouts/_head_panel.html.haml
+++ b/app/views/layouts/_head_panel.html.haml
@@ -8,11 +8,6 @@
%span.separator
%h1.project_name= title
%ul.nav
- %li
- = render "layouts/search"
- %li
- = link_to public_root_path, title: "Public area", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
- %i.icon-globe
- if current_user.is_admin?
%li
= link_to admin_root_path, title: "Admin area", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do
@@ -22,14 +17,22 @@
= link_to new_project_path, title: "Create New Project", class: 'has_bottom_tooltip', 'data-original-title' => 'New project' do
%i.icon-plus
%li
- = link_to profile_path, title: "My Profile", class: 'has_bottom_tooltip', 'data-original-title' => 'Your profile' do
+ = link_to profile_path, title: "Your Profile", class: 'has_bottom_tooltip', 'data-original-title' => 'Your profile' do
%i.icon-user
+ %li.separator
%li
- = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do
- %i.icon-signout
+ = render "layouts/search"
%li
- = link_to current_user, class: "profile-pic" do
- = image_tag gravatar_icon(current_user.email, 26)
+ .account-box
+ = link_to profile_path, class: "pic" do
+ = image_tag gravatar_icon(current_user.email)
+ .account-links
+ = link_to profile_path, class: "username" do
+ %i.icon-user.icon-white
+ My profile
+ = link_to destroy_user_session_path, class: "logout", method: :delete do
+ %i.icon-signout.icon-white
+ Logout
= render "layouts/init_auto_complete"
diff --git a/app/views/layouts/_search.html.haml b/app/views/layouts/_search.html.haml
index c484af04..7ea90798 100644
--- a/app/views/layouts/_search.html.haml
+++ b/app/views/layouts/_search.html.haml
@@ -1,8 +1,6 @@
.search
= form_tag search_path, method: :get, class: 'navbar-form pull-left' do |f|
= text_field_tag "search", nil, placeholder: "Search", class: "search-input"
- = hidden_field_tag :group_id, @group.try(:id)
- = hidden_field_tag :project_id, @project.try(:id)
:javascript
$(function(){
diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml
index abe3f2ea..a60e7feb 100644
--- a/app/views/layouts/admin.html.haml
+++ b/app/views/layouts/admin.html.haml
@@ -2,10 +2,23 @@
%html{ lang: "en"}
= render "layouts/head", title: "Admin area"
%body{class: "#{app_theme} admin"}
- = render "layouts/head_panel", title: "Admin area"
= render "layouts/flash"
- %nav.main-nav
- .container= render 'layouts/nav/admin'
-
+ = render "layouts/head_panel", title: "Admin area"
.container
+ %ul.main_menu
+ = nav_link(controller: :dashboard, html_options: {class: 'home'}) do
+ = link_to "Stats", admin_root_path
+ = nav_link(controller: :projects) do
+ = link_to "Projects", admin_projects_path
+ = nav_link(controller: :groups) do
+ = link_to "Groups", admin_groups_path
+ = nav_link(controller: :users) do
+ = link_to "Users", admin_users_path
+ = nav_link(controller: :logs) do
+ = link_to "Logs", admin_logs_path
+ = nav_link(controller: :hooks) do
+ = link_to "Hooks", admin_hooks_path
+ = nav_link(controller: :resque) do
+ = link_to "Background Jobs", admin_resque_path
+
.content= yield
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 4e683140..88da5c98 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -2,10 +2,23 @@
%html{ lang: "en"}
= render "layouts/head", title: "Dashboard"
%body{class: "#{app_theme} application"}
- = render "layouts/head_panel", title: "Dashboard"
= render "layouts/flash"
- %nav.main-nav
- .container= render 'layouts/nav/dashboard'
-
+ = render "layouts/head_panel", title: "Dashboard"
.container
+ %ul.main_menu
+ = nav_link(path: 'dashboard#index', html_options: {class: 'home'}) do
+ = link_to "Home", root_path, title: "Home"
+ = nav_link(path: 'dashboard#issues') do
+ = link_to dashboard_issues_path do
+ Issues
+ %span.count= current_user.assigned_issues.opened.count
+ = nav_link(path: 'dashboard#merge_requests') do
+ = link_to dashboard_merge_requests_path do
+ Merge Requests
+ %span.count= current_user.cared_merge_requests.opened.count
+ = nav_link(path: 'search#show') do
+ = link_to "Search", search_path
+ = nav_link(controller: :help) do
+ = link_to "Help", help_path
+
.content= yield
diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml
index a9758f19..36c6b4c6 100644
--- a/app/views/layouts/devise.html.haml
+++ b/app/views/layouts/devise.html.haml
@@ -3,6 +3,4 @@
= render "layouts/head"
%body.ui_basic.login-page
= render "layouts/flash"
- .container
- .content
- = yield
+ .container= yield
diff --git a/app/views/layouts/errors.html.haml b/app/views/layouts/errors.html.haml
index b9395873..3554d88f 100644
--- a/app/views/layouts/errors.html.haml
+++ b/app/views/layouts/errors.html.haml
@@ -2,8 +2,8 @@
%html{ lang: "en"}
= render "layouts/head", title: "Error"
%body{class: "#{app_theme} application"}
- = render "layouts/head_panel", title: ""
= render "layouts/flash"
+ = render "layouts/head_panel", title: ""
.container
.content
%center.padded.prepend-top-20
diff --git a/app/views/layouts/group.html.haml b/app/views/layouts/group.html.haml
index 8296b8ae..f47e8b3e 100644
--- a/app/views/layouts/group.html.haml
+++ b/app/views/layouts/group.html.haml
@@ -2,10 +2,23 @@
%html{ lang: "en"}
= render "layouts/head", title: "#{@group.name}"
%body{class: "#{app_theme} application"}
- = render "layouts/head_panel", title: "group: #{@group.name}"
= render "layouts/flash"
- %nav.main-nav
- .container= render 'layouts/nav/group'
-
+ = render "layouts/head_panel", title: "#{@group.name}"
.container
+ %ul.main_menu
+ = nav_link(path: 'groups#show', html_options: {class: 'home'}) do
+ = link_to "Home", group_path(@group), title: "Home"
+ = nav_link(path: 'groups#issues') do
+ = link_to issues_group_path(@group) do
+ Issues
+ %span.count= current_user.assigned_issues.opened.of_group(@group).count
+ = nav_link(path: 'groups#merge_requests') do
+ = link_to merge_requests_group_path(@group) do
+ Merge Requests
+ %span.count= current_user.cared_merge_requests.opened.of_group(@group).count
+ = nav_link(path: 'groups#search') do
+ = link_to "Search", search_group_path(@group)
+ = nav_link(path: 'groups#people') do
+ = link_to "People", people_group_path(@group)
+
.content= yield
diff --git a/app/views/layouts/nav/_admin.html.haml b/app/views/layouts/nav/_admin.html.haml
deleted file mode 100644
index ca77c26e..00000000
--- a/app/views/layouts/nav/_admin.html.haml
+++ /dev/null
@@ -1,19 +0,0 @@
-%ul
- = nav_link(controller: :dashboard, html_options: {class: 'home'}) do
- = link_to admin_root_path, title: "Stats" do
- %i.icon-home
- = nav_link(controller: :projects) do
- = link_to "Projects", admin_projects_path
- = nav_link(controller: :teams) do
- = link_to "Teams", admin_teams_path
- = nav_link(controller: :groups) do
- = link_to "Groups", admin_groups_path
- = nav_link(controller: :users) do
- = link_to "Users", admin_users_path
- = nav_link(controller: :logs) do
- = link_to "Logs", admin_logs_path
- = nav_link(controller: :hooks) do
- = link_to "Hooks", admin_hooks_path
- = nav_link(controller: :resque) do
- = link_to "Background Jobs", admin_resque_path
-
diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml
deleted file mode 100644
index 2ac35050..00000000
--- a/app/views/layouts/nav/_dashboard.html.haml
+++ /dev/null
@@ -1,20 +0,0 @@
-%ul
- = nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do
- = link_to root_path, title: "Home" do
- %i.icon-home
- = nav_link(path: 'dashboard#projects') do
- = link_to projects_dashboard_path do
- Projects
- = nav_link(path: 'dashboard#issues') do
- = link_to issues_dashboard_path do
- Issues
- %span.count= current_user.assigned_issues.opened.count
- = nav_link(path: 'dashboard#merge_requests') do
- = link_to merge_requests_dashboard_path do
- Merge Requests
- %span.count= current_user.cared_merge_requests.opened.count
- = nav_link(path: 'search#show') do
- = link_to "Search", search_path
- = nav_link(controller: :help) do
- = link_to "Help", help_path
-
diff --git a/app/views/layouts/nav/_group.html.haml b/app/views/layouts/nav/_group.html.haml
deleted file mode 100644
index f3cdb5ac..00000000
--- a/app/views/layouts/nav/_group.html.haml
+++ /dev/null
@@ -1,20 +0,0 @@
-%ul
- = nav_link(path: 'groups#show', html_options: {class: 'home'}) do
- = link_to group_path(@group), title: "Home" do
- %i.icon-home
- = nav_link(path: 'groups#issues') do
- = link_to issues_group_path(@group) do
- Issues
- %span.count= current_user.assigned_issues.opened.of_group(@group).count
- = nav_link(path: 'groups#merge_requests') do
- = link_to merge_requests_group_path(@group) do
- Merge Requests
- %span.count= current_user.cared_merge_requests.opened.of_group(@group).count
- = nav_link(path: 'groups#people') do
- = link_to "People", people_group_path(@group)
-
- - if can?(current_user, :manage_group, @group)
- = nav_link(path: 'groups#edit') do
- = link_to edit_group_path(@group), class: "tab " do
- Settings
-
diff --git a/app/views/layouts/nav/_profile.html.haml b/app/views/layouts/nav/_profile.html.haml
deleted file mode 100644
index e5e4b27c..00000000
--- a/app/views/layouts/nav/_profile.html.haml
+++ /dev/null
@@ -1,17 +0,0 @@
-%ul
- = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do
- = link_to profile_path, title: "Profile" do
- %i.icon-home
- = nav_link(path: 'profiles#account') do
- = link_to "Account", account_profile_path
- = nav_link(controller: :notifications) do
- = link_to "Notifications", profile_notifications_path
- = nav_link(controller: :keys) do
- = link_to keys_path do
- SSH Keys
- %span.count= current_user.keys.count
- = nav_link(path: 'profiles#design') do
- = link_to "Design", design_profile_path
- = nav_link(path: 'profiles#history') do
- = link_to "History", history_profile_path
-
diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml
deleted file mode 100644
index ec3da964..00000000
--- a/app/views/layouts/nav/_project.html.haml
+++ /dev/null
@@ -1,43 +0,0 @@
-%ul
- = nav_link(path: 'projects#show', html_options: {class: "home"}) do
- = link_to project_path(@project), title: "Project" do
- %i.icon-home
-
- - unless @project.empty_repo?
- - if can? current_user, :download_code, @project
- = nav_link(controller: %w(tree blob blame)) do
- = link_to 'Files', project_tree_path(@project, @ref || @repository.root_ref)
- = nav_link(controller: %w(commit commits compare repositories protected_branches)) do
- = link_to "Commits", project_commits_path(@project, @ref || @repository.root_ref)
- = nav_link(controller: %w(graph)) do
- = link_to "Network", project_graph_path(@project, @ref || @repository.root_ref)
-
- - if @project.issues_enabled
- = nav_link(controller: %w(issues milestones labels)) do
- = link_to url_for_project_issues do
- Issues
- - if @project.used_default_issues_tracker?
- %span.count.issue_counter= @project.issues.opened.count
-
- - if @project.repo_exists? && @project.merge_requests_enabled
- = nav_link(controller: :merge_requests) do
- = link_to project_merge_requests_path(@project) do
- Merge Requests
- %span.count.merge_counter= @project.merge_requests.opened.count
-
- - if @project.wiki_enabled
- = nav_link(controller: :wikis) do
- = link_to 'Wiki', project_wiki_path(@project, :home)
-
- - if @project.wall_enabled
- = nav_link(controller: :walls) do
- = link_to 'Wall', project_wall_path(@project)
-
- - if @project.snippets_enabled
- = nav_link(controller: :snippets) do
- = link_to 'Snippets', project_snippets_path(@project)
-
- - if can? current_user, :admin_project, @project
- = nav_link(html_options: {class: "#{project_tab_class}"}) do
- = link_to edit_project_path(@project), class: "stat-tab tab " do
- Settings
diff --git a/app/views/layouts/nav/_team.html.haml b/app/views/layouts/nav/_team.html.haml
deleted file mode 100644
index 415e4510..00000000
--- a/app/views/layouts/nav/_team.html.haml
+++ /dev/null
@@ -1,25 +0,0 @@
-%ul
- = nav_link(path: 'teams#show', html_options: {class: 'home'}) do
- = link_to team_path(@team), title: "Home" do
- %i.icon-home
-
- = nav_link(path: 'teams#issues') do
- = link_to issues_team_path(@team) do
- Issues
- %span.count= Issue.opened.of_user_team(@team).count
-
- = nav_link(path: 'teams#merge_requests') do
- = link_to merge_requests_team_path(@team) do
- Merge Requests
- %span.count= MergeRequest.opened.of_user_team(@team).count
-
- = nav_link(controller: [:members]) do
- = link_to team_members_path(@team), class: "team-tab tab" do
- Members
- %span.count= @team.members.count
-
- - if can? current_user, :admin_user_team, @team
- = nav_link(path: 'teams#edit') do
- = link_to edit_team_path(@team), class: "stat-tab tab " do
- Settings
-
diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml
index f88abeca..3db1f59b 100644
--- a/app/views/layouts/notify.html.haml
+++ b/app/views/layouts/notify.html.haml
@@ -4,19 +4,29 @@
%title
GitLab
- %body
- %h1{style: "background: #EEE; border-bottom: 1px solid #DDD; color: #474D57; font: normal 20px Helvetica, Arial, sans-serif; margin: 0; padding: 5px 10px; line-height: 32px; font-size: 16px;"}
- GitLab
- - if @project
- \|
- = link_to @project.name_with_namespace, project_url(@project), style: 'color: #29B; text-decoration: none'
- %table{align: "left", border: "0", cellpadding: "0", cellspacing: "0", style: "padding: 10px 0;", width: "100%"}
+ %body{bgcolor: "#EAEAEA", style: "margin: 0; padding: 0; background: #EAEAEA"}
+ %table{align: "center", border: "0", cellpadding: "0", cellspacing: "0", style: "padding: 35px 0; background: #EAEAEA;", width: "100%"}
%tr
- %td{align: "left", style: "margin: 0; padding: 10px;"}
- = yield
- %br
- %tr
- %td{align: "left", style: "margin: 0; padding: 10px;"}
- %p{style: "font-size:small;color:#777"}
- - if @project
- You're receiving this notification because you are a member of the #{@project.name_with_namespace} project team.
+ %td{align: "center", style: "margin: 0; padding: 0; background: #EAEAEA;"}
+ %table.header{align: "center", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; background:#333", width: "600"}
+ %tr
+ %td{style: "font-size: 0px;", width: "20"}
+ \
+ %td{align: "left", style: "padding: 10px 0", width: "580"}
+ %h1{style: "color: #BBBBBB; font: normal 20px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 32px;"}
+ GITLAB
+ - if @project
+ \/ #{@project.name_with_namespace}
+ %table{align: "center", bgcolor: "#fff", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; background: #fff;", width: "600"}
+ %tr= yield
+ %tr
+ %td{align: "left", colspan: "2", height: "3", style: "padding: font-size: 0; line-height: 0; height: 3px;", width: "600"}
+ %table.footer{align: "center", border: "0", cellpadding: "0", cellspacing: "0", style: "font-family: Helvetica, Arial, sans-serif; line-height: 10px;", width: "600"}
+ %tr
+ %td{align: "center", style: "padding: 5px 0 10px; font-size: 11px; color:#7d7a7a; margin: 0; line-height: 1.2;font-family: Helvetica, Arial, sans-serif;", valign: "top"}
+ %br
+ %p{style: "font-size: 11px; color:#7d7a7a; margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif;"}
+ You're receiving this notification because you are a member of the
+ - if @project
+ #{@project.name_with_namespace}
+ project team.
diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml
index 535f94c4..7852ed6f 100644
--- a/app/views/layouts/profile.html.haml
+++ b/app/views/layouts/profile.html.haml
@@ -2,10 +2,21 @@
%html{ lang: "en"}
= render "layouts/head", title: "Profile"
%body{class: "#{app_theme} profile"}
- = render "layouts/head_panel", title: "Profile"
= render "layouts/flash"
- %nav.main-nav
- .container= render 'layouts/nav/profile'
-
+ = render "layouts/head_panel", title: "Profile"
.container
+ %ul.main_menu
+ = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do
+ = link_to "Profile", profile_path
+ = nav_link(path: 'profiles#account') do
+ = link_to "Account", account_profile_path
+ = nav_link(controller: :keys) do
+ = link_to keys_path do
+ SSH Keys
+ %span.count= current_user.keys.count
+ = nav_link(path: 'profiles#design') do
+ = link_to "Design", design_profile_path
+ = nav_link(path: 'profiles#history') do
+ = link_to "History", history_profile_path
+
.content= yield
diff --git a/app/views/layouts/project_resource.html.haml b/app/views/layouts/project_resource.html.haml
index 7b0d4789..14671c5c 100644
--- a/app/views/layouts/project_resource.html.haml
+++ b/app/views/layouts/project_resource.html.haml
@@ -2,13 +2,45 @@
%html{ lang: "en"}
= render "layouts/head", title: @project.name_with_namespace
%body{class: "#{app_theme} project"}
- = render "layouts/head_panel", title: project_title(@project)
= render "layouts/flash"
+ = render "layouts/head_panel", title: project_title(@project)
- if can?(current_user, :download_code, @project)
= render 'shared/no_ssh'
- %nav.main-nav
- .container= render 'layouts/nav/project'
-
+ - unless @project.users.include?(current_user)
+ = render 'shared/not_in_team'
.container
+ %ul.main_menu
+ = nav_link(html_options: {class: "home #{project_tab_class}"}) do
+ = link_to @project.path, project_path(@project), title: "Project"
+
+ - if @project.repo_exists?
+ - if can? current_user, :download_code, @project
+ = nav_link(controller: %w(tree blob blame)) do
+ = link_to 'Files', project_tree_path(@project, @ref || @repository.root_ref)
+ = nav_link(controller: %w(commit commits compare repositories protected_branches)) do
+ = link_to "Commits", project_commits_path(@project, @ref || @repository.root_ref)
+ = nav_link(path: 'projects#graph') do
+ = link_to "Network", graph_project_path(@project)
+
+ - if @project.issues_enabled
+ = nav_link(controller: %w(issues milestones labels)) do
+ = link_to project_issues_filter_path(@project) do
+ Issues
+ %span.count.issue_counter= @project.issues.opened.count
+
+ - if @project.repo_exists? && @project.merge_requests_enabled
+ = nav_link(controller: :merge_requests) do
+ = link_to project_merge_requests_path(@project) do
+ Merge Requests
+ %span.count.merge_counter= @project.merge_requests.opened.count
+
+ - if @project.wall_enabled
+ = nav_link(path: 'projects#wall') do
+ = link_to 'Wall', wall_project_path(@project)
+
+ - if @project.wiki_enabled
+ = nav_link(controller: :wikis) do
+ = link_to 'Wiki', project_wiki_path(@project, :index)
+
.content= yield
diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml
index 435250b6..fa368e9b 100644
--- a/app/views/layouts/public.html.haml
+++ b/app/views/layouts/public.html.haml
@@ -10,7 +10,7 @@
= link_to root_path, class: "home" do
%h1 GITLAB
%span.separator
- %h1.project_name Public Projects
+ %h1.project_name Public Projects
.container
.content
.prepend-top-20
diff --git a/app/views/layouts/user_team.html.haml b/app/views/layouts/user_team.html.haml
deleted file mode 100644
index f2ead9d2..00000000
--- a/app/views/layouts/user_team.html.haml
+++ /dev/null
@@ -1,11 +0,0 @@
-!!! 5
-%html{ lang: "en"}
- = render "layouts/head", title: "#{@team.name}"
- %body{class: "#{app_theme} application"}
- = render "layouts/head_panel", title: "team: #{@team.name}"
- = render "layouts/flash"
- %nav.main-nav
- .container= render 'layouts/nav/team'
-
- .container
- .content= yield
diff --git a/app/views/merge_requests/_filter.html.haml b/app/views/merge_requests/_filter.html.haml
index 4b48306e..86148fbc 100644
--- a/app/views/merge_requests/_filter.html.haml
+++ b/app/views/merge_requests/_filter.html.haml
@@ -16,5 +16,5 @@
%fieldset
%hr
- = link_to "Reset", project_merge_requests_path(@project), class: 'btn pull-right'
+ = link_to "Reset", project_merge_requests_path(@project), class: 'btn right'
diff --git a/app/views/merge_requests/_form.html.haml b/app/views/merge_requests/_form.html.haml
index 6d64988c..9a4f0617 100644
--- a/app/views/merge_requests/_form.html.haml
+++ b/app/views/merge_requests/_form.html.haml
@@ -1,6 +1,6 @@
= form_for [@project, @merge_request], html: { class: "#{controller.action_name}-merge-request form-horizontal" } do |f|
-if @merge_request.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
%ul
- @merge_request.errors.full_messages.each do |msg|
%li= msg
@@ -13,7 +13,7 @@
.mr_branch_box
%h5.cgray From (Head Branch)
.body
- .padded= f.select(:source_branch, @repository.branch_names, { include_blank: "Select branch" }, {class: 'chosen span4'})
+ .padded= f.select(:source_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'})
.mr_source_commit
.span2
@@ -22,7 +22,7 @@
.mr_branch_box
%h5.cgray To (Base Branch)
.body
- .padded= f.select(:target_branch, @repository.branch_names, { include_blank: "Select branch" }, {class: 'chosen span4'})
+ .padded= f.select(:target_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'})
.mr_target_commit
%fieldset
@@ -51,19 +51,19 @@
.form-actions
- if @merge_request.new_record?
- = f.submit 'Submit merge request', class: "btn btn-create"
+ = f.submit 'Submit merge request', class: "btn success"
-else
- = f.submit 'Save changes', class: "btn btn-save"
+ = f.submit 'Save changes', class: "save-btn btn"
- if @merge_request.new_record?
- = link_to project_merge_requests_path(@project), class: "btn btn-cancel" do
+ = link_to project_merge_requests_path(@project), class: "btn cancel-btn" do
Cancel
- else
- = link_to project_merge_request_path(@project, @merge_request), class: "btn btn-cancel" do
+ = link_to project_merge_request_path(@project, @merge_request), class: "btn cancel-btn" do
Cancel
:javascript
$(function(){
- disableButtonIfEmptyField("#merge_request_title", ".btn-save");
+ disableButtonIfEmptyField("#merge_request_title", ".save-btn");
var source_branch = $("#merge_request_source_branch")
, target_branch = $("#merge_request_target_branch");
diff --git a/app/views/merge_requests/_merge_request.html.haml b/app/views/merge_requests/_merge_request.html.haml
index 09c55d98..7369f3dd 100644
--- a/app/views/merge_requests/_merge_request.html.haml
+++ b/app/views/merge_requests/_merge_request.html.haml
@@ -1,20 +1,20 @@
%li{ class: mr_css_classes(merge_request) }
- .pull-right
+ .right
.left
- if merge_request.merged?
- %span.btn.btn-small.disabled.grouped
+ %span.btn.small.disabled.grouped
%strong
%i.icon-ok
= "MERGED"
- if merge_request.notes.any?
- %span.btn.btn-small.disabled.grouped
+ %span.btn.small.disabled.grouped
%i.icon-comment
= merge_request.mr_and_commit_notes.count
- if merge_request.milestone_id?
- %span.btn.btn-small.disabled.grouped
+ %span.btn.small.disabled.grouped
%i.icon-time
= merge_request.milestone.title
- %span.btn.btn-small.disabled.grouped
+ %span.btn.small.disabled.grouped
= merge_request.source_branch
→
= merge_request.target_branch
diff --git a/app/views/merge_requests/_show.html.haml b/app/views/merge_requests/_show.html.haml
index 08b80172..cefd33c0 100644
--- a/app/views/merge_requests/_show.html.haml
+++ b/app/views/merge_requests/_show.html.haml
@@ -29,10 +29,10 @@
$(function(){
merge_request = new MergeRequest({
url_to_automerge_check: "#{automerge_check_project_merge_request_path(@project, @merge_request)}",
- check_enable: #{@merge_request.unchecked? ? "true" : "false"},
+ check_enable: #{@merge_request.state == MergeRequest::UNCHECKED ? "true" : "false"},
url_to_ci_check: "#{ci_status_project_merge_request_path(@project, @merge_request)}",
ci_enable: #{@project.gitlab_ci? ? "true" : "false"},
- current_status: "#{@merge_request.merge_status_name}",
+ current_state: "#{@merge_request.human_state}",
action: "#{controller.action_name}"
});
});
diff --git a/app/views/merge_requests/index.html.haml b/app/views/merge_requests/index.html.haml
index 3073c8f6..61c32b53 100644
--- a/app/views/merge_requests/index.html.haml
+++ b/app/views/merge_requests/index.html.haml
@@ -1,5 +1,5 @@
- if can? current_user, :write_merge_request, @project
- = link_to new_project_merge_request_path(@project), class: "pull-right btn btn-primary", title: "New Merge Request" do
+ = link_to new_project_merge_request_path(@project), class: "right btn primary", title: "New Merge Request" do
%i.icon-plus
New Merge Request
%h3.page_title
@@ -28,8 +28,8 @@
- if @merge_requests.present?
%li.bottom
.left= paginate @merge_requests, theme: "gitlab"
- .pull-right
- %span.cgray.pull-right #{@merge_requests.total_count} merge requests for this filter
+ .right
+ %span.cgray.right #{@merge_requests.total_count} merge requests for this filter
:javascript
$(merge_requestsPage);
diff --git a/app/views/merge_requests/invalid.html.haml b/app/views/merge_requests/invalid.html.haml
deleted file mode 100644
index a73bef9e..00000000
--- a/app/views/merge_requests/invalid.html.haml
+++ /dev/null
@@ -1,17 +0,0 @@
-.merge-request
- = render "merge_requests/show/mr_title"
- = render "merge_requests/show/mr_box"
-
- .alert.alert-error
- %h5
- %i.icon-exclamation-sign
- We cannot find
- %span.label-branch= @merge_request.source_branch
- or
- %span.label-branch= @merge_request.target_branch
- branches in the repository.
- %p
- Maybe it was removed or never pushed.
- %p
- Please close Merge Request or change branches with existing one
-
diff --git a/app/views/merge_requests/show/_mr_accept.html.haml b/app/views/merge_requests/show/_mr_accept.html.haml
index ac97f632..128ffe76 100644
--- a/app/views/merge_requests/show/_mr_accept.html.haml
+++ b/app/views/merge_requests/show/_mr_accept.html.haml
@@ -1,9 +1,9 @@
-- unless @allowed_to_merge
- .alert
- %strong You don't have enough permissions to merge this MR
+- unless can?(current_user, :accept_mr, @project)
+ .alert-message
+ %strong Only masters can accept MR
-- if @show_merge_controls
+- if @merge_request.open? && @commits.any? && can?(current_user, :accept_mr, @project)
.automerge_widget.can_be_merged{style: "display:none"}
.alert.alert-success
%span
@@ -29,14 +29,14 @@
%strong This repository does not have satellite. Ask administrator to fix this issue
.automerge_widget.cannot_be_merged{style: "display:none"}
- .alert.alert-disabled
+ .alert.alert-info
%span
- = link_to "Show how to merge", "#", class: "how_to_merge_link btn btn-small padded", title: "How To Merge"
+ = link_to "Show how to merge", "#", class: "how_to_merge_link btn small padded", title: "How To Merge"
%strong This request can't be merged with GitLab. You should do it manually
.automerge_widget.unchecked
- .alert
+ .alert-message
%strong
%i.icon-refresh
Checking for ability to automatically merge…
@@ -46,7 +46,5 @@
%strong This merge request already can not be merged. Try to reload page.
.merge-in-progress.hide
- %span.cgray
- %i.icon-refresh.icon-spin
-
- Merge is in progress. Please wait. Page will be automatically reloaded.
+ %span.cgray Merge is in progress. Please wait. Page will be automatically reloaded.
+ = image_tag "ajax_loader.gif"
diff --git a/app/views/merge_requests/show/_mr_box.html.haml b/app/views/merge_requests/show/_mr_box.html.haml
index 3b54f613..644d7fcc 100644
--- a/app/views/merge_requests/show/_mr_box.html.haml
+++ b/app/views/merge_requests/show/_mr_box.html.haml
@@ -1,11 +1,11 @@
.ui-box.ui-box-show
.ui-box-head
%h4.box-title
- - if @merge_request.merged?
+ - if @merge_request.merged
.error.status_info
%i.icon-ok
Merged
- - elsif @merge_request.closed?
+ - elsif @merge_request.closed
.error.status_info Closed
= gfm escape_once(@merge_request.title)
@@ -21,14 +21,14 @@
%strong= link_to_gfm truncate(milestone.title, length: 20), project_milestone_path(milestone.project, milestone)
- - if @merge_request.closed?
+ - if @merge_request.closed
.ui-box-bottom
- %span
- Closed by #{link_to_member(@project, @merge_request.closed_event.author)}
- %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
- - if @merge_request.merged?
- .ui-box-bottom
- %span
- Merged by #{link_to_member(@project, @merge_request.merge_event.author)}
- %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago.
+ - if @merge_request.merged?
+ %span
+ Merged by #{link_to_member(@project, @merge_request.merge_event.author)}
+ %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago.
+ - elsif @merge_request.closed_event
+ %span
+ Closed by #{link_to_member(@project, @merge_request.closed_event.author)}
+ %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
diff --git a/app/views/merge_requests/show/_mr_ci.html.haml b/app/views/merge_requests/show/_mr_ci.html.haml
index a8faa6ba..d46b606e 100644
--- a/app/views/merge_requests/show/_mr_ci.html.haml
+++ b/app/views/merge_requests/show/_mr_ci.html.haml
@@ -1,4 +1,4 @@
-- if @merge_request.opened? && @commits.any?
+- if @merge_request.open? && @commits.any?
.ci_widget.ci-success{style: "display:none"}
.alert.alert-success
%i.icon-ok
@@ -23,7 +23,7 @@
= link_to "Build page", ci_build_details_path(@merge_request)
.ci_widget
- .alert
+ .alert-message
%strong
%i.icon-refresh
Checking for CI status for #{@merge_request.last_commit_short_sha}
diff --git a/app/views/merge_requests/show/_mr_title.html.haml b/app/views/merge_requests/show/_mr_title.html.haml
index 24285c27..c2ffe8e3 100644
--- a/app/views/merge_requests/show/_mr_title.html.haml
+++ b/app/views/merge_requests/show/_mr_title.html.haml
@@ -1,13 +1,13 @@
%h3.page_title
= "Merge Request ##{@merge_request.id}:"
- %span.label-branch= @merge_request.source_branch
+ %span.label_branch= @merge_request.source_branch
→
- %span.label-branch= @merge_request.target_branch
+ %span.label_branch= @merge_request.target_branch
- %span.pull-right
+ %span.right
- if can?(current_user, :modify_merge_request, @merge_request)
- - if @merge_request.opened?
+ - if @merge_request.open?
.left.btn-group
%a.btn.grouped.dropdown-toggle{ data: {toggle: :dropdown} }
%i.icon-download-alt
@@ -17,13 +17,13 @@
%li= link_to "Email Patches", project_merge_request_path(@project, @merge_request, format: :patch)
%li= link_to "Plain Diff", project_merge_request_path(@project, @merge_request, format: :diff)
- = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :close }), method: :put, class: "btn grouped btn-close", title: "Close merge request"
+ = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {closed: true }, status_only: true), method: :put, class: "btn grouped danger", title: "Close merge request"
= link_to edit_project_merge_request_path(@project, @merge_request), class: "btn grouped" do
%i.icon-edit
Edit
-.pull-right
+.right
.span3#votes= render 'votes/votes_block', votable: @merge_request
.back_link
diff --git a/app/views/milestones/_form.html.haml b/app/views/milestones/_form.html.haml
index fbaf64a3..1c496a93 100644
--- a/app/views/milestones/_form.html.haml
+++ b/app/views/milestones/_form.html.haml
@@ -7,7 +7,7 @@
= form_for [@project, @milestone], html: {class: "new_milestone form-horizontal"} do |f|
-if @milestone.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
%ul
- @milestone.errors.full_messages.each do |msg|
%li= msg
@@ -32,16 +32,16 @@
.form-actions
- if @milestone.new_record?
- = f.submit 'Create milestone', class: "btn-save btn"
- = link_to "Cancel", project_milestones_path(@project), class: "btn btn-cancel"
+ = f.submit 'Create milestone', class: "save-btn btn"
+ = link_to "Cancel", project_milestones_path(@project), class: "btn cancel-btn"
-else
- = f.submit 'Save changes', class: "btn-save btn"
- = link_to "Cancel", project_milestone_path(@project, @milestone), class: "btn btn-cancel"
+ = f.submit 'Save changes', class: "save-btn btn"
+ = link_to "Cancel", project_milestone_path(@project, @milestone), class: "btn cancel-btn"
:javascript
$(function() {
- disableButtonIfEmptyField("#milestone_title", ".btn-save");
+ disableButtonIfEmptyField("#milestone_title", ".save-btn");
$( ".datepicker" ).datepicker({
dateFormat: "yy-mm-dd",
onSelect: function(dateText, inst) { $("#milestone_due_date").val(dateText) }
diff --git a/app/views/milestones/_milestone.html.haml b/app/views/milestones/_milestone.html.haml
index 8a3727c6..3864792f 100644
--- a/app/views/milestones/_milestone.html.haml
+++ b/app/views/milestones/_milestone.html.haml
@@ -1,12 +1,12 @@
-%li{class: "milestone milestone-#{milestone.closed? ? 'closed' : 'open'}", id: dom_id(milestone) }
- .pull-right
- - if can?(current_user, :admin_milestone, milestone.project) and milestone.active?
- = link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link grouped" do
+%li{class: "milestone milestone-#{milestone.closed ? 'closed' : 'open'}", id: dom_id(milestone) }
+ .right
+ - if can?(current_user, :admin_milestone, milestone.project) and milestone.open?
+ = link_to edit_project_milestone_path(milestone.project, milestone), class: "btn small edit-milestone-link grouped" do
%i.icon-edit
Edit
%h4
= link_to_gfm truncate(milestone.title, length: 100), project_milestone_path(milestone.project, milestone)
- - if milestone.expired? and not milestone.closed?
+ - if milestone.expired? and not milestone.closed
%span.cred (Expired)
%small
= milestone.expires_at
diff --git a/app/views/milestones/index.html.haml b/app/views/milestones/index.html.haml
index b78f1705..3089595f 100644
--- a/app/views/milestones/index.html.haml
+++ b/app/views/milestones/index.html.haml
@@ -3,7 +3,7 @@
%h3.page_title
Milestones
- if can? current_user, :admin_milestone, @project
- = link_to "New Milestone", new_project_milestone_path(@project), class: "pull-right btn btn-small", title: "New Milestone"
+ = link_to "New Milestone", new_project_milestone_path(@project), class: "right btn small", title: "New Milestone"
%br
%div.ui-box
.title
diff --git a/app/views/milestones/show.html.haml b/app/views/milestones/show.html.haml
index e1808a20..fc7ae51f 100644
--- a/app/views/milestones/show.html.haml
+++ b/app/views/milestones/show.html.haml
@@ -8,14 +8,14 @@
= link_to project_milestones_path(@project) do
← To milestones list
.span6
- .pull-right
- - unless @milestone.closed?
- = link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn btn-small grouped", title: "New Issue" do
+ .right
+ - unless @milestone.closed
+ = link_to new_project_issue_path(@project, issue: { milestone_id: @milestone.id }), class: "btn small grouped", title: "New Issue" do
%i.icon-plus
New Issue
= link_to 'Browse Issues', project_issues_path(@milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link small grouped"
- if can?(current_user, :admin_milestone, @project)
- = link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-small grouped" do
+ = link_to edit_project_milestone_path(@project, @milestone), class: "btn small grouped" do
%i.icon-edit
Edit
@@ -25,12 +25,12 @@
%hr
%p
%span All issues for this milestone are closed. You may close milestone now.
- = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-remove"
+ = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {closed: true }), method: :put, class: "btn small danger"
.ui-box.ui-box-show
.ui-box-head
%h4.box-title
- - if @milestone.closed?
+ - if @milestone.closed
.error.status_info Closed
- elsif @milestone.expired?
.error.status_info Expired
@@ -43,7 +43,7 @@
#{@milestone.closed_items_count} closed
–
#{@milestone.open_items_count} open
- %span.pull-right= @milestone.expires_at
+ %span.right= @milestone.expires_at
.progress.progress-info
.bar{style: "width: #{@milestone.percent_complete}%;"}
@@ -63,7 +63,7 @@
%li=link_to('All Issues', '#')
%ul.well-list
- @issues.each do |issue|
- %li{data: {closed: issue.closed?}}
+ %li{data: {closed: issue.closed}}
= link_to [@project, issue] do
%span.badge.badge-info ##{issue.id}
–
@@ -77,7 +77,7 @@
%li=link_to('All Merge Requests', '#')
%ul.well-list
- @merge_requests.each do |merge_request|
- %li{data: {closed: merge_request.closed? || merge_request.merged?}}
+ %li{data: {closed: merge_request.closed}}
= link_to [@project, merge_request] do
%span.badge.badge-info ##{merge_request.id}
–
@@ -87,7 +87,7 @@
%h6 Participants:
%div
- @users.each do |user|
- = link_to user, class: 'float-link' do
+ = link_to tm_path(user.tm_of(@project)), class: 'float-link' do
= user.avatar_image
= user.name
diff --git a/app/views/notes/_discussion.html.haml b/app/views/notes/_discussion.html.haml
index 24cb4228..a9a11fc2 100644
--- a/app/views/notes/_discussion.html.haml
+++ b/app/views/notes/_discussion.html.haml
@@ -38,7 +38,7 @@
- if note.for_diff_line?
- if note.diff
.content
- .file= render "notes/discussion_diff", discussion_notes: discussion_notes, note: note
+ .diff_file= render "notes/discussion_diff", discussion_notes: discussion_notes, note: note
- else
= link_to 'show outdated discussion', '#', class: 'js-show-outdated-discussion'
%div.hide.outdated-discussion
diff --git a/app/views/notes/_discussion_diff.html.haml b/app/views/notes/_discussion_diff.html.haml
index 20bdb3f3..93ab59c7 100644
--- a/app/views/notes/_discussion_diff.html.haml
+++ b/app/views/notes/_discussion_diff.html.haml
@@ -1,5 +1,5 @@
- diff = note.diff
-.header
+.diff_file_header
- if diff.deleted_file
%span= diff.old_path
- else
@@ -7,9 +7,9 @@
- if diff.a_mode && diff.b_mode && diff.a_mode != diff.b_mode
%span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
%br/
-.content
+.diff_file_content
%table
- - each_diff_line_near(diff, note.diff_file_index, note.line_code) do |line, type, line_code, line_new, line_old|
+ - each_diff_line(diff, note.diff_file_index) do |line, type, line_code, line_new, line_old|
%tr.line_holder{ id: line_code }
- if type == "match"
%td.old_line= "..."
@@ -22,3 +22,4 @@
- if line_code == note.line_code
= render "notes/diff_notes_with_reply", notes: discussion_notes
+ - break # cut off diff after notes
diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml
index 7add2921..d094119a 100644
--- a/app/views/notes/_form.html.haml
+++ b/app/views/notes/_form.html.haml
@@ -1,4 +1,4 @@
-= form_for [@project, @note], remote: true, html: { multipart: true, id: nil, class: "new_note js-new-note-form common-note-form" } do |f|
+= form_for [@project, @note], remote: true, html: { multipart: true, id: nil, class: "new_note js-new-note-form" } do |f|
= note_target_fields
= f.hidden_field :commit_id
@@ -15,23 +15,30 @@
= f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input turn-on'
.note_preview.js-note-preview.turn-off
+ .buttons
+ = f.submit 'Add Comment', class: "btn comment-btn grouped js-comment-button"
+ %a.btn.grouped.js-close-discussion-note-form Cancel
.hint
- .pull-right Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
+ .right Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
.clearfix
- .note-form-actions
- .buttons
- = f.submit 'Add Comment', class: "btn comment-btn grouped js-comment-button"
- = yield(:note_actions)
+ .note_options
+ .attachment
+ %h6 Attachment:
+ .file_name.js-attachment-filename File name...
+ %a.choose-btn.btn.small.js-choose-note-attachment-button Choose File ...
+ .hint Any file up to 10 MB
- %a.btn.grouped.js-close-discussion-note-form Cancel
+ = f.file_field :attachment, class: "js-note-attachment-input"
- .note-form-option
- %a.choose-btn.btn.btn-small.js-choose-note-attachment-button
- %i.icon-paper-clip
- %span Choose File ...
-
- %span.file_name.js-attachment-filename File name...
- = f.file_field :attachment, class: "js-note-attachment-input hide"
+ .notify_options
+ %h6 Notify via email:
+ = label_tag :notify do
+ = check_box_tag :notify, 1, !@note.for_commit?
+ Project team
- .clearfix
+ .js-notify-commit-author
+ = label_tag :notify_author do
+ = check_box_tag :notify_author, 1 , @note.for_commit?
+ Commit author
+ .clearfix
diff --git a/app/views/notes/_note.html.haml b/app/views/notes/_note.html.haml
index b355e2a0..9efeb563 100644
--- a/app/views/notes/_note.html.haml
+++ b/app/views/notes/_note.html.haml
@@ -30,8 +30,8 @@
- if note.attachment.url
- if note.attachment.image?
= image_tag note.attachment.url, class: 'note-image-attach'
- .attachment.pull-right
- = link_to note.attachment.secure_url, target: "_blank" do
- %i.icon-paper-clip
+ .attachment.right
+ = link_to note.attachment.url, target: "_blank" do
+ %i.icon-attachment
= note.attachment_identifier
.clear
diff --git a/app/views/notes/_reversed_notes_with_form.html.haml b/app/views/notes/_reversed_notes_with_form.html.haml
new file mode 100644
index 00000000..bb583b8c
--- /dev/null
+++ b/app/views/notes/_reversed_notes_with_form.html.haml
@@ -0,0 +1,12 @@
+.js-main-target-form
+- if can? current_user, :write_note, @project
+ = render "notes/form"
+
+%ul#new-notes-list.reversed.notes
+%ul#notes-list.reversed.notes
+.notes-busy.js-notes-busy
+
+:javascript
+ $(function(){
+ NoteList.init("#{@target_id}", "#{@target_type}", "#{project_notes_path(@project)}");
+ });
diff --git a/app/views/notes/create.js.haml b/app/views/notes/create.js.haml
index 43e79c69..c573d406 100644
--- a/app/views/notes/create.js.haml
+++ b/app/views/notes/create.js.haml
@@ -2,7 +2,10 @@
var noteHtml = "#{escape_javascript(render "notes/note", note: @note)}";
- if note_for_main_target?(@note)
- NoteList.appendNewNote(#{@note.id}, noteHtml);
+ - if @note.for_wall?
+ NoteList.appendNewWallNote(#{@note.id}, noteHtml);
+ - else
+ NoteList.appendNewNote(#{@note.id}, noteHtml);
- else
:plain
var firstDiscussionNoteHtml = "#{escape_javascript(render "notes/diff_notes_with_reply", notes: [@note])}";
@@ -15,4 +18,4 @@
- if note_for_main_target?(@note)
NoteList.errorsOnForm(errorsHtml);
- else
- NoteList.errorsOnForm(errorsHtml, "#{@note.discussion_id}");
+ NoteList.errorsOnForm(errorsHtml, "#{@note.discussion_id}");
\ No newline at end of file
diff --git a/app/views/notes/index.js.haml b/app/views/notes/index.js.haml
index 826862b1..f0826100 100644
--- a/app/views/notes/index.js.haml
+++ b/app/views/notes/index.js.haml
@@ -1,4 +1,15 @@
- unless @notes.blank?
var notesHtml = "#{escape_javascript(render 'notes/notes')}";
- new_note_ids = @notes.map(&:id)
- NoteList.setContent(#{new_note_ids}, notesHtml);
+ - if loading_more_notes?
+ NoteList.appendMoreNotes(#{new_note_ids}, notesHtml);
+
+ - elsif loading_new_notes?
+ NoteList.replaceNewNotes(#{new_note_ids}, notesHtml);
+
+ - else
+ NoteList.setContent(#{new_note_ids}, notesHtml);
+
+- else
+ - if loading_more_notes?
+ NoteList.finishedLoadingMore();
diff --git a/app/views/notifications/show.html.haml b/app/views/notifications/show.html.haml
deleted file mode 100644
index d8ab93b8..00000000
--- a/app/views/notifications/show.html.haml
+++ /dev/null
@@ -1,68 +0,0 @@
-%h3.page_title Setup your notification level
-
-%br
-
-%p.light
- %strong Disabled
- – You will not get any notifications via email
-%p.light
- %strong Participating
- – You will receive only notifications from related resources(ex. from assigned issue or your commit)
-%p.light
- %strong Watch
- – You will receive all notifications from projects in which you participate
-%hr
-
-= form_tag profile_notifications_path, method: :put, remote: true, class: 'update-notifications' do
- %ul.well-list
- %li
- .row
- .span4
- %h5 Global
- .span7
- = label_tag do
- = radio_button_tag :notification_level, Notification::N_DISABLED, @notification.disabled?
- %span Disabled
-
- = label_tag do
- = radio_button_tag :notification_level, Notification::N_PARTICIPATING, @notification.participating?
- %span Participating
-
- = label_tag do
- = radio_button_tag :notification_level, Notification::N_WATCH, @notification.watch?
- %span Watch
-
-
- = link_to '#', class: 'js-toggle-visibility-link' do
- %h6.btn.btn-tiny
- %i.icon-chevron-down
- %span Per project notifications settings
- %ul.well-list.js-toggle-visibility-container.hide
- - @projects.each do |project|
- %li
- .row
- .span4
- %span
- = project.name_with_namespace
- .span7
- = label_tag do
- = radio_button_tag :"notification_level[#{project.id}]", Notification::N_DISABLED, @notification.disabled?, disabled: true
- %span Disabled
-
- = label_tag do
- = radio_button_tag :"notification_level[#{project.id}]", Notification::N_PARTICIPATING, @notification.participating?, disabled: true
- %span Participating
-
- = label_tag do
- = radio_button_tag :"notification_level[#{project.id}]", Notification::N_WATCH, @notification.watch?, disabled: true
- %span Watch
-
-
- .form-actions
- = submit_tag 'Save', class: 'btn btn-save'
- %span.update-success.cgreen.hide
- %i.icon-ok
- Saved
- %span.update-failed.cred.hide
- %i.icon-remove
- Failed
diff --git a/app/views/notifications/update.js.haml b/app/views/notifications/update.js.haml
deleted file mode 100644
index 4468004a..00000000
--- a/app/views/notifications/update.js.haml
+++ /dev/null
@@ -1,7 +0,0 @@
-- if @saved
- :plain
- $('.update-notifications .update-success').showAndHide();
-- else
- :plain
- $('.update-notifications .update-failed').showAndHide();
-
diff --git a/app/views/notify/_note_message.html.haml b/app/views/notify/_note_message.html.haml
deleted file mode 100644
index 88c4df55..00000000
--- a/app/views/notify/_note_message.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-%p
- %strong #{@note.author_name}
- left next message:
-
-%cite{style: 'color: #666'}
- = markdown(@note.note)
diff --git a/app/views/notify/closed_issue_email.html.haml b/app/views/notify/closed_issue_email.html.haml
deleted file mode 100644
index 23ccc453..00000000
--- a/app/views/notify/closed_issue_email.html.haml
+++ /dev/null
@@ -1,5 +0,0 @@
-%p
- = "Issue was closed by #{@updated_by.name}"
-%p
- = "Issue ##{@issue.id}"
- = link_to_gfm truncate(@issue.title, length: 45), project_issue_url(@issue.project, @issue), title: @issue.title
diff --git a/app/views/notify/closed_issue_email.text.haml b/app/views/notify/closed_issue_email.text.haml
deleted file mode 100644
index 0cca3215..00000000
--- a/app/views/notify/closed_issue_email.text.haml
+++ /dev/null
@@ -1,3 +0,0 @@
-= "Issue was closed by #{@updated_by.name}"
-
-Issue ##{@issue.id}: #{project_issue_url(@issue.project, @issue)}
diff --git a/app/views/notify/closed_merge_request_email.html.haml b/app/views/notify/closed_merge_request_email.html.haml
deleted file mode 100644
index 0c6c79e0..00000000
--- a/app/views/notify/closed_merge_request_email.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-%p
- = "Merge Request #{@merge_request.id} was closed by #{@updated_by.name}"
-%p
- = link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.project, @merge_request)
-%p
- Branches: #{@merge_request.source_branch} → #{@merge_request.target_branch}
-%p
- Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
-
diff --git a/app/views/notify/closed_merge_request_email.text.haml b/app/views/notify/closed_merge_request_email.text.haml
deleted file mode 100644
index ee4648e3..00000000
--- a/app/views/notify/closed_merge_request_email.text.haml
+++ /dev/null
@@ -1,8 +0,0 @@
-= "Merge Request #{@merge_request.id} was closed by #{@updated_by.name}"
-
-Merge Request url: #{project_merge_request_url(@merge_request.project, @merge_request)}
-
-Branches: #{@merge_request.source_branch} - #{@merge_request.target_branch}
-
-Author: #{@merge_request.author_name}
-Assignee: #{@merge_request.assignee_name}
diff --git a/app/views/notify/issue_status_changed_email.html.haml b/app/views/notify/issue_status_changed_email.html.haml
index 4cdb7099..27168eef 100644
--- a/app/views/notify/issue_status_changed_email.html.haml
+++ b/app/views/notify/issue_status_changed_email.html.haml
@@ -1,5 +1,16 @@
-%p
- = "Issue was #{@issue_status} by #{@updated_by.name}"
-%p
- = "Issue ##{@issue.id}"
- = link_to_gfm truncate(@issue.title, length: 45), project_issue_url(@issue.project, @issue), title: @issue.title
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{width: "21"}
+ %td
+ %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
+ = "Issue was #{@issue_status} by #{@updated_by.name}"
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{align: "left", style: "padding: 20px 0 0;"}
+ %p{style: "color:#646464 !important; line-height: 26px; font-size: 16px; font-family: Helvetica, Arial, sans-serif; "}
+ = "Issue ##{@issue.id}"
+ = link_to_gfm truncate(@issue.title, length: 45), project_issue_url(@issue.project, @issue), title: @issue.title
+ %br
+
diff --git a/app/views/notify/issue_status_changed_email.text.erb b/app/views/notify/issue_status_changed_email.text.erb
deleted file mode 100644
index bbca3474..00000000
--- a/app/views/notify/issue_status_changed_email.text.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-Issue was <%= @issue_status %> by <%= @updated_by.name %>
-
-Issue <%= @issue.id %>: <%= url_for(project_issue_url(@issue.project, @issue)) %>
-
diff --git a/app/views/notify/merged_merge_request_email.html.haml b/app/views/notify/merged_merge_request_email.html.haml
deleted file mode 100644
index 2b8cc030..00000000
--- a/app/views/notify/merged_merge_request_email.html.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-%p
- = "Merge Request #{@merge_request.id} was merged"
-%p
- = link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.project, @merge_request)
-%p
- Branches: #{@merge_request.source_branch} → #{@merge_request.target_branch}
-%p
- Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
-
diff --git a/app/views/notify/merged_merge_request_email.text.haml b/app/views/notify/merged_merge_request_email.text.haml
deleted file mode 100644
index 91c23360..00000000
--- a/app/views/notify/merged_merge_request_email.text.haml
+++ /dev/null
@@ -1,8 +0,0 @@
-= "Merge Request #{@merge_request.id} was merged"
-
-Merge Request Url: #{project_merge_request_url(@merge_request.project, @merge_request)}
-
-Branches: #{@merge_request.source_branch} - #{@merge_request.target_branch}
-
-Author: #{@merge_request.author_name}
-Assignee: #{@merge_request.assignee_name}
diff --git a/app/views/notify/new_issue_email.html.haml b/app/views/notify/new_issue_email.html.haml
index f11c8506..3cb53513 100644
--- a/app/views/notify/new_issue_email.html.haml
+++ b/app/views/notify/new_issue_email.html.haml
@@ -1,9 +1,15 @@
-%p
- New Issue was created.
-%p
- = "Issue ##{@issue.id}"
- = link_to_gfm truncate(@issue.title, length: 45), project_issue_url(@issue.project, @issue), title: @issue.title
-%p
- Author: #{@issue.author_name}
-%p
- Assignee: #{@issue.assignee_name}
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{width: "21"}
+ %td
+ %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
+ New Issue was created and assigned to you.
+ %td{width: "21"}
+ %tr
+ %td{width: "21"}
+ %td{align: "left", style: "padding: 20px 0 0;"}
+ %p{style: "color:#646464 !important; line-height: 26px; font-size: 16px; font-family: Helvetica, Arial, sans-serif; "}
+ = "Issue ##{@issue.id}"
+ = link_to_gfm truncate(@issue.title, length: 45), project_issue_url(@issue.project, @issue), title: @issue.title
+ %br
diff --git a/app/views/notify/new_issue_email.text.erb b/app/views/notify/new_issue_email.text.erb
deleted file mode 100644
index 9907ca83..00000000
--- a/app/views/notify/new_issue_email.text.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-New Issue was created.
-
-Issue <%= @issue.id %>: <%= url_for(project_issue_url(@issue.project, @issue)) %>
-Author: <%= @issue.author_name %>
-Asignee: <%= @issue.assignee_name %>
diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml
index 0f1cfff5..990d4d2a 100644
--- a/app/views/notify/new_merge_request_email.html.haml
+++ b/app/views/notify/new_merge_request_email.html.haml
@@ -1,9 +1,19 @@
-%p
- = "New Merge Request !#{@merge_request.id}"
-%p
- = link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.project, @merge_request)
-%p
- Branches: #{@merge_request.source_branch} → #{@merge_request.target_branch}
-%p
- Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{align: "left", style: "padding: 20px 0 0;"}
+ %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
+ = "New Merge Request !#{@merge_request.id}"
+ %p{style: "color:#646464 !important; line-height: 26px; font-size: 16px; font-family: Helvetica, Arial, sans-serif; "}
+ = link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.project, @merge_request)
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{style: "padding: 15px 0 15px;", valign: "top"}
+ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
+ Branches: #{@merge_request.source_branch} → #{@merge_request.target_branch}
+ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
+ Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
+ %td
diff --git a/app/views/notify/new_merge_request_email.text.erb b/app/views/notify/new_merge_request_email.text.erb
deleted file mode 100644
index 3393d838..00000000
--- a/app/views/notify/new_merge_request_email.text.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-New Merge Request <%= @merge_request.id %>
-
-<%= url_for(project_merge_request_url(@merge_request.project, @merge_request)) %>
-
-
-Branches: <%= @merge_request.source_branch %> to <%= @merge_request.target_branch %>
-Author: <%= @merge_request.author_name %>
-Asignee: <%= @merge_request.assignee_name %>
-
diff --git a/app/views/notify/new_ssh_key_email.html.haml b/app/views/notify/new_ssh_key_email.html.haml
deleted file mode 100644
index 57f4297e..00000000
--- a/app/views/notify/new_ssh_key_email.html.haml
+++ /dev/null
@@ -1,10 +0,0 @@
-%p
- Hi #{@user.name}!
-%p
- A new public key was added to your account:
-%p
- title:
- %code= @key.title
-%p
- If this key was added in error, you can remove here:
- = link_to "SSH Keys", keys_url
diff --git a/app/views/notify/new_ssh_key_email.text.erb b/app/views/notify/new_ssh_key_email.text.erb
deleted file mode 100644
index 71974eab..00000000
--- a/app/views/notify/new_ssh_key_email.text.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-Hi <%= @user.name %>!
-
-A new public key was added to your account:
-
-title.................. <%= @key.title %>
-
-If this key was added in error, you can remove here: <%= keys_url %>
diff --git a/app/views/notify/new_user_email.html.haml b/app/views/notify/new_user_email.html.haml
index 8606dc6a..e8e97355 100644
--- a/app/views/notify/new_user_email.html.haml
+++ b/app/views/notify/new_user_email.html.haml
@@ -1,16 +1,27 @@
-%p
- Hi #{@user['name']}!
-%p
- - if Gitlab.config.gitlab.signup_enabled
- Account has been created successfully.
- - else
- Administrator created account for you. Now you are a member of company GitLab application.
-%p
- login..........................................
- %code= @user['email']
-%p
- - unless Gitlab.config.gitlab.signup_enabled
- password..................................
- %code= @password
-%p
- = link_to "Click here to login", root_url
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{align: "left", style: "padding: 20px 0 0;"}
+ %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
+ Hi #{@user['name']}!
+ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
+ - if Gitlab.config.gitlab.signup_enabled
+ Account has been created successfully.
+ - else
+ Administrator created account for you. Now you are a member of company GitLab application.
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{style: "padding: 15px 0 15px;", valign: "top"}
+ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 28px; font-size: 16px;font-family: Helvetica, Arial, sans-serif; "}
+ login..........................................
+ %code= @user['email']
+ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 28px; font-size: 16px;font-family: Helvetica, Arial, sans-serif; "}
+ - unless Gitlab.config.gitlab.signup_enabled
+ password..................................
+ %code= @password
+ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 28px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
+ = link_to "Click here to login", root_url
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+
diff --git a/app/views/notify/new_user_email.text.erb b/app/views/notify/new_user_email.text.erb
deleted file mode 100644
index 94072d7f..00000000
--- a/app/views/notify/new_user_email.text.erb
+++ /dev/null
@@ -1,10 +0,0 @@
-Hi <%= @user.name %>!
-
-Administrator created account for you. Now you are a member of company GitLab application.
-
-login.................. <%= @user.email %>
-<% unless Gitlab.config.gitlab.signup_enabled %>
- password............... <%= @password %>
-<% end %>
-
-Click here to login: <%= url_for(root_url) %>
diff --git a/app/views/notify/note_commit_email.html.haml b/app/views/notify/note_commit_email.html.haml
index 620b258f..e87f9c12 100644
--- a/app/views/notify/note_commit_email.html.haml
+++ b/app/views/notify/note_commit_email.html.haml
@@ -1,5 +1,23 @@
-%p
- = "New comment for Commit #{@commit.short_id}"
- = link_to_gfm truncate(@commit.title, length: 16), project_commit_url(@note.project, id: @commit.id, anchor: "note_#{@note.id}")
-= render 'note_message'
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{align: "left", style: "padding: 20px 0 0;"}
+ %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
+ = "New comment for Commit #{@commit.short_id}"
+ = link_to_gfm truncate(@commit.title, length: 16), project_commit_url(@note.project, id: @commit.id, anchor: "note_#{@note.id}")
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{style: "padding: 15px 0 15px;", valign: "top"}
+ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
+ %a{href: "#", style: "color: #0eb6ce; text-decoration: none;"} #{@note.author_name}
+ left next message:
+ %br
+ %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"}
+ %tr
+ %td{valign: "top"}
+ %div{ style: "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
+ = markdown(@note.note)
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
diff --git a/app/views/notify/note_commit_email.text.erb b/app/views/notify/note_commit_email.text.erb
deleted file mode 100644
index aab8e5cf..00000000
--- a/app/views/notify/note_commit_email.text.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-New comment for Commit <%= @commit.short_id %>
-
-<%= url_for(project_commit_url(@note.project, id: @commit.id, anchor: "note_#{@note.id}")) %>
-
-
-Author: <%= @note.author_name %>
-
-<%= @note.note %>
-
diff --git a/app/views/notify/note_issue_email.html.haml b/app/views/notify/note_issue_email.html.haml
index ca133126..832f5df4 100644
--- a/app/views/notify/note_issue_email.html.haml
+++ b/app/views/notify/note_issue_email.html.haml
@@ -1,4 +1,23 @@
-%p
- = "New comment for Issue ##{@issue.id}"
- = link_to_gfm truncate(@issue.title, length: 35), project_issue_url(@issue.project, @issue, anchor: "note_#{@note.id}")
-= render 'note_message'
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{align: "left", style: "padding: 20px 0 0;"}
+ %h2{style: "color:#646464 !important; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
+ = "New comment for Issue ##{@issue.id}"
+ = link_to_gfm truncate(@issue.title, length: 35), project_issue_url(@issue.project, @issue, anchor: "note_#{@note.id}")
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{style: "padding: 15px 0 15px;", valign: "top"}
+ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
+ %a{href: "#", style: "color: #0eb6ce; text-decoration: none;"} #{@note.author_name}
+ left next message:
+ %br
+ %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"}
+ %tr
+ %td{valign: "top"}
+ %div{ style: "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
+ = markdown(@note.note)
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+
diff --git a/app/views/notify/note_issue_email.text.erb b/app/views/notify/note_issue_email.text.erb
deleted file mode 100644
index a476b286..00000000
--- a/app/views/notify/note_issue_email.text.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-New comment for Issue <%= @issue.id %>
-
-<%= url_for(project_issue_url(@issue.project, @issue, anchor: "note_#{@note.id}")) %>
-
-
-Author: <%= @note.author_name %>
-
-<%= @note.note %>
-
diff --git a/app/views/notify/note_merge_request_email.html.haml b/app/views/notify/note_merge_request_email.html.haml
index 4f97867e..3857f2f0 100644
--- a/app/views/notify/note_merge_request_email.html.haml
+++ b/app/views/notify/note_merge_request_email.html.haml
@@ -1,8 +1,27 @@
-%p
- - if @note.for_diff_line?
- = link_to "New comment on diff", diffs_project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}")
- - else
- = link_to "New comment", project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}")
- for Merge Request ##{@merge_request.id}
- %cite "#{truncate(@merge_request.title, length: 20)}"
-= render 'note_message'
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{width: "21"}
+ %td
+ %h2{style: "color:#646464; font-weight: normal;"}
+ - if @note.for_diff_line?
+ = link_to "New comment on diff", diffs_project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}")
+ - else
+ = link_to "New comment", project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}")
+ for Merge Request ##{@merge_request.id}
+ %cite "#{truncate(@merge_request.title, length: 20)}"
+ %td{width: "21"}
+ %tr
+ %td{width: "21"}
+ %td
+ %p
+ %strong #{@note.author_name}
+ left next message:
+ %br
+ %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"}
+ %tr
+ %td{valign: "top"}
+ %div{ style: "background:#f5f5f5; padding:10px 20px;border:1px solid #ddd" }
+ = markdown(@note.note)
+ %td{width: "21"}
+
diff --git a/app/views/notify/note_merge_request_email.text.erb b/app/views/notify/note_merge_request_email.text.erb
deleted file mode 100644
index 26c73bda..00000000
--- a/app/views/notify/note_merge_request_email.text.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-New comment for Merge Request <%= @merge_request.id %>
-
-<%= url_for(project_merge_request_url(@merge_request.project, @merge_request, anchor: "note_#{@note.id}")) %>
-
-
-<%= @note.author_name %>
-
-<%= @note.note %>
-
diff --git a/app/views/notify/note_wall_email.html.haml b/app/views/notify/note_wall_email.html.haml
index 92200e83..0661c580 100644
--- a/app/views/notify/note_wall_email.html.haml
+++ b/app/views/notify/note_wall_email.html.haml
@@ -1,5 +1,22 @@
-%p
- New message on
- = link_to "Project Wall", project_wall_url(@note.project, anchor: "note_#{@note.id}")
-
-= render 'note_message'
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{align: "left", style: "padding: 20px 0 0;"}
+ %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
+ New message on
+ = link_to "Project Wall", wall_project_url(@note.project, anchor: "note_#{@note.id}")
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{style: "padding: 15px 0 15px;", valign: "top"}
+ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
+ %a{href: "#", style: "color: #0eb6ce; text-decoration: none;"} #{@note.author_name}
+ left next message:
+ %br
+ %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"}
+ %tr
+ %td{valign: "top"}
+ %div{ style: "background:#f5f5f5; padding:20px;border:1px solid #ddd" }
+ = markdown(@note.note)
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
diff --git a/app/views/notify/note_wall_email.text.erb b/app/views/notify/note_wall_email.text.erb
deleted file mode 100644
index 97910d5e..00000000
--- a/app/views/notify/note_wall_email.text.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-New message on the project wall <%= @note.project %>
-
-<%= url_for(project_wall_url(@note.project, anchor: "note_#{@note.id}")) %>
-
-
-<%= @note.author_name %>
-
-<%= @note.note %>
-
diff --git a/app/views/notify/project_access_granted_email.html.haml b/app/views/notify/project_access_granted_email.html.haml
index b4b44eaf..11117bf0 100644
--- a/app/views/notify/project_access_granted_email.html.haml
+++ b/app/views/notify/project_access_granted_email.html.haml
@@ -1,5 +1,15 @@
-%p
- = "You have been granted #{@users_project.project_access_human} access to project"
-%p
- = link_to project_url(@project) do
- = @project.name_with_namespace
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{width: "21"}
+ %td
+ %h2{style: "color:#646464;" }
+ = "You have been granted #{@users_project.project_access_human} access to project"
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %tr
+ %td{width: "21"}
+ %td
+ %h3
+ = link_to project_url(@project) do
+ = @project.name_with_namespace
+ %br
diff --git a/app/views/notify/project_access_granted_email.text.erb b/app/views/notify/project_access_granted_email.text.erb
deleted file mode 100644
index 077c3b8a..00000000
--- a/app/views/notify/project_access_granted_email.text.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-
-You have been granted <%= @users_project.project_access_human %> access to project <%= @project.name_with_namespace %>
-
-<%= url_for(project_url(@project)) %>
diff --git a/app/views/notify/project_was_moved_email.html.haml b/app/views/notify/project_was_moved_email.html.haml
index 3e761c43..222bd0fe 100644
--- a/app/views/notify/project_was_moved_email.html.haml
+++ b/app/views/notify/project_was_moved_email.html.haml
@@ -1,11 +1,25 @@
-%p
- = "Project was moved to another location"
-%p
- The project is now located under
- = link_to project_url(@project) do
- = @project.name_with_namespace
-%p
- To update the remote url in your local repository run:
-%p{ style: "background:#f5f5f5; padding:10px; border:1px solid #ddd" }
- git remote set-url origin #{@project.ssh_url_to_repo}
-%br
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #555; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{width: "21"}
+ %td
+ %h2
+ = "Project was moved to another location"
+ %td{width: "21"}
+ %tr
+ %td{width: "21"}
+ %td
+ %p
+ The project is now located under
+ = link_to project_url(@project) do
+ = @project.name_with_namespace
+ %p
+ To update the remote url in your local repository run:
+ %br
+ %table{border: "0", cellpadding: "0", cellspacing: "0", width: "558"}
+ %tr
+ %td{valign: "top"}
+ %p{ style: "background:#f5f5f5; padding:10px; border:1px solid #ddd" }
+ git remote set-url origin #{@project.ssh_url_to_repo}
+ %br
+ %td{ width: "21"}
diff --git a/app/views/notify/project_was_moved_email.text.erb b/app/views/notify/project_was_moved_email.text.erb
deleted file mode 100644
index 9c41073f..00000000
--- a/app/views/notify/project_was_moved_email.text.erb
+++ /dev/null
@@ -1,8 +0,0 @@
-Project was moved to another location
-
-The project is now located under
-<%= project_url(@project) %>
-
-
-To update the remote url in your local repository run:
- git remote set-url origin <%= @project.ssh_url_to_repo %>
diff --git a/app/views/notify/reassigned_issue_email.html.haml b/app/views/notify/reassigned_issue_email.html.haml
index 018f20bf..bc2d6f70 100644
--- a/app/views/notify/reassigned_issue_email.html.haml
+++ b/app/views/notify/reassigned_issue_email.html.haml
@@ -1,9 +1,16 @@
-%p
- = "Reassigned Issue ##{@issue.id}"
- = link_to_gfm truncate(@issue.title, length: 30), project_issue_url(@issue.project, @issue)
-%p
- Assignee changed from
- %strong #{@previous_assignee.name}
- to
- %strong #{@issue.assignee_name}
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td
+ %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
+ = "Reassigned Issue ##{@issue.id}"
+ = link_to_gfm truncate(@issue.title, length: 30), project_issue_url(@issue.project, @issue)
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{style: "padding: 15px 0 15px;", valign: "top"}
+ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
+ Assignee changed from #{@previous_assignee.name} to #{@issue.assignee_name}
+ %td
diff --git a/app/views/notify/reassigned_issue_email.text.erb b/app/views/notify/reassigned_issue_email.text.erb
deleted file mode 100644
index 49704418..00000000
--- a/app/views/notify/reassigned_issue_email.text.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-Reassigned Issue <%= @issue.id %>
-
-<%= url_for(project_issue_url(@issue.project, @issue)) %>
-
-
-Assignee changed from <%= @previous_assignee.name %> to <%= @issue.assignee_name %>
-
diff --git a/app/views/notify/reassigned_merge_request_email.html.haml b/app/views/notify/reassigned_merge_request_email.html.haml
index 9039bc8b..8f7308b3 100644
--- a/app/views/notify/reassigned_merge_request_email.html.haml
+++ b/app/views/notify/reassigned_merge_request_email.html.haml
@@ -1,8 +1,16 @@
-%p
- = "Reassigned Merge Request !#{@merge_request.id}"
- = link_to_gfm truncate(@merge_request.title, length: 30), project_merge_request_url(@merge_request.project, @merge_request)
-%p
- Assignee changed from
- %strong #{@previous_assignee.name}
- to
- %strong #{@merge_request.assignee_name}
+%td.content{align: "left", style: "font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;", valign: "top", width: "600"}
+ %table{border: "0", cellpadding: "0", cellspacing: "0", style: "color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;", width: "600"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{align: "left", style: "padding: 20px 0 0;"}
+ %h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
+ = "Reassigned Merge Request !#{@merge_request.id}"
+ = link_to_gfm truncate(@merge_request.title, length: 30), project_merge_request_url(@merge_request.project, @merge_request)
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %tr
+ %td{style: "font-size: 1px; line-height: 1px;", width: "21"}
+ %td{style: "padding: 15px 0 15px;", valign: "top"}
+ %p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
+ Assignee changed from #{@previous_assignee.name} to #{@merge_request.assignee_name}
+ %td
+
diff --git a/app/views/notify/reassigned_merge_request_email.text.erb b/app/views/notify/reassigned_merge_request_email.text.erb
deleted file mode 100644
index 1af4ab55..00000000
--- a/app/views/notify/reassigned_merge_request_email.text.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-Reassigned Merge Request <%= @merge_request.id %>
-
-<%= url_for(project_merge_request_url(@merge_request.project, @merge_request)) %>
-
-
-Assignee changed from <%= @previous_assignee.name %> to <%= @merge_request.assignee_name %>
-
diff --git a/app/views/profiles/account.html.haml b/app/views/profiles/account.html.haml
index b20d5c7a..ea9bcb64 100644
--- a/app/views/profiles/account.html.haml
+++ b/app/views/profiles/account.html.haml
@@ -9,10 +9,10 @@
-%fieldset.update-token
+%fieldset
%legend
Private token
- %span.cred.pull-right
+ %span.cred.right
keep it secret!
.padded
= form_for @user, url: reset_private_token_profile_path, method: :put do |f|
@@ -24,18 +24,18 @@
%p.cgray
- if current_user.private_token
= text_field_tag "token", current_user.private_token, class: "xxlarge large_text"
- = f.submit 'Reset', confirm: "Are you sure?", class: "btn btn-primary btn-build-token"
+ = f.submit 'Reset', confirm: "Are you sure?", class: "btn primary btn-build-token"
- else
%span You don`t have one yet. Click generate to fix it.
= f.submit 'Generate', class: "btn success btn-build-token"
-%fieldset.update-password
+%fieldset
%legend Password
= form_for @user, url: update_password_profile_path, method: :put do |f|
.padded
%p.slead After successful password update you will be redirected to login page where you should login with new password
-if @user.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
@@ -49,7 +49,7 @@
= f.password_field :password_confirmation, required: true
.clearfix
.input
- = f.submit 'Save password', class: "btn btn-save"
+ = f.submit 'Save password', class: "btn save-btn"
@@ -57,7 +57,7 @@
%fieldset.update-username
%legend
Username
- %small.cred.pull-right
+ %small.cred.right
Changing your username can have unintended side effects!
= form_for @user, url: update_username_profile_path, method: :put, remote: true do |f|
.padded
@@ -76,12 +76,6 @@
%li It will change web url for personal projects.
%li It will change the git path to repositories for personal projects.
.input
- = f.submit 'Save username', class: "btn btn-save"
+ = f.submit 'Save username', class: "btn save-btn"
+
-- if Gitlab.config.gitlab.signup_enabled
- %fieldset.remove-account
- %legend
- Remove account
- %small.cred.pull-right
- Before removing the account you must remove all projects!
- = link_to 'Delete account', user_registration_path, confirm: "REMOVE #{current_user.name}? Are you sure?", method: :delete, class: "btn btn-remove delete-key btn-small pull-right"
diff --git a/app/views/profiles/design.html.haml b/app/views/profiles/design.html.haml
index 77068dab..f4b50677 100644
--- a/app/views/profiles/design.html.haml
+++ b/app/views/profiles/design.html.haml
@@ -43,15 +43,10 @@
= label_tag do
.prev
= image_tag "white.png"
- = f.radio_button :color_scheme_id, 1
- White
+ = f.radio_button :dark_scheme, false
+ White code preview
= label_tag do
.prev
= image_tag "dark.png"
- = f.radio_button :color_scheme_id, 2
- Dark
- = label_tag do
- .prev
- = image_tag "solarized_dark.png"
- = f.radio_button :color_scheme_id, 3
- Solarized Dark
+ = f.radio_button :dark_scheme, true
+ Dark code preview
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index 9cab3ba5..687463b6 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -6,7 +6,7 @@
%small
= @user.email
- .pull-right
+ .right
= link_to destroy_user_session_path, class: "logout", method: :delete do
%small
%i.icon-signout
@@ -15,7 +15,7 @@
= form_for @user, url: profile_path, method: :put, html: { class: "edit_user form-horizontal" } do |f|
-if @user.errors.any?
- %div.alert.alert-error
+ %div.alert-message.block-message.error
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
@@ -31,22 +31,8 @@
.controls
= f.text_field :email, class: "input-xlarge", required: true
%span.help-block We also use email for avatar detection.
- .control-group
- = f.label :skype, class: "control-label"
- .controls= f.text_field :skype, class: "input-xlarge"
- .control-group
- = f.label :linkedin, class: "control-label"
- .controls= f.text_field :linkedin, class: "input-xlarge"
- .control-group
- = f.label :twitter, class: "control-label"
- .controls= f.text_field :twitter, class: "input-xlarge"
- .control-group
- = f.label :bio, class: "control-label"
- .controls
- = f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250
- %span.help-block Tell us about yourself in fewer than 250 characters.
- .span5.pull-right
+ .span5.right
%fieldset.tips
%legend Tips:
%ul
@@ -61,23 +47,29 @@
%p
You can login through #{@user.provider.titleize}!
= link_to "click here to change", account_profile_path
- - if current_user.can_create_group?
- %li
- %p
- Need a group for several dependent projects?
- = link_to new_group_path, class: "btn btn-tiny" do
- Create a group
- - if current_user.can_create_team?
- %li
- %p
- Want to share a team between projects?
- = link_to new_team_path, class: "btn btn-tiny" do
- Create a team
+
+ .row
+ .span7
+ .control-group
+ = f.label :skype, class: "control-label"
+ .controls= f.text_field :skype, class: "input-xlarge"
+ .control-group
+ = f.label :linkedin, class: "control-label"
+ .controls= f.text_field :linkedin, class: "input-xlarge"
+ .control-group
+ = f.label :twitter, class: "control-label"
+ .controls= f.text_field :twitter, class: "input-xlarge"
+ .control-group
+ = f.label :bio, class: "control-label"
+ .controls
+ = f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250
+ %span.help-block Tell us about yourself in fewer than 250 characters.
+ .span5.right
%fieldset
%legend
Personal projects:
- %small.pull-right
- %span= current_user.owned_projects.count
+ %small.right
+ %span= current_user.personal_projects.count
of
%span= current_user.projects_limit
.padded
@@ -87,10 +79,9 @@
%fieldset
%legend
SSH public keys:
- %span.pull-right
- = link_to pluralize(current_user.keys.count, 'key'), keys_path
+ %strong.right= link_to current_user.keys.count, keys_path
.padded
- = link_to "Add Public Key", new_key_path, class: "btn btn-small"
+ = link_to "Add Public Key", new_key_path, class: "btn small"
.form-actions
- = f.submit 'Save', class: "btn btn-save"
+ = f.submit 'Save', class: "btn save-btn"
diff --git a/app/views/projects/_clone_panel.html.haml b/app/views/projects/_clone_panel.html.haml
index 9a2be429..2962ad98 100644
--- a/app/views/projects/_clone_panel.html.haml
+++ b/app/views/projects/_clone_panel.html.haml
@@ -2,8 +2,8 @@
.row
.span7
.form-horizontal= render "shared/clone_panel"
- .span4.pull-right
- .pull-right
+ .span4.right
+ .right
- unless @project.empty_repo?
- if can? current_user, :download_code, @project
= link_to archive_project_repository_path(@project), class: "btn-small btn grouped" do
@@ -13,5 +13,5 @@
= link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn-small btn grouped" do
Merge Request
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
- = link_to url_for_new_issue, title: "New Issue", class: "btn-small btn grouped" do
+ = link_to new_project_issue_path(@project), title: "New Issue", class: "btn-small btn grouped" do
Issue
diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml
index 4d51e10d..b582adc9 100644
--- a/app/views/projects/_form.html.haml
+++ b/app/views/projects/_form.html.haml
@@ -1,140 +1,85 @@
-.row
- .span3
- %ul.nav.nav-pills.nav-stacked
- %li.active
- = link_to 'Settings', '#tab-settings', 'data-toggle' => 'tab'
- %li
- = link_to 'Transfer', '#tab-transfer', 'data-toggle' => 'tab'
- %li
- = link_to 'Remove', '#tab-remove', 'data-toggle' => 'tab'
-
- .span9
- .tab-content
- .tab-pane.active#tab-settings
- .ui-box.white
- %h5.title Settings:
- .form-holder
- = form_for(@project, remote: true) do |f|
- - if @project.errors.any?
- .alert.alert-error
- %ul
- - @project.errors.full_messages.each do |msg|
- %li= msg
-
- %fieldset
- .clearfix.project_name_holder
- = f.label :name do
- Project name is
- .input
- = f.text_field :name, placeholder: "Example Project", class: "span5"
+= form_for(@project, remote: true) do |f|
+ - if @project.errors.any?
+ .alert-message.block-message.error
+ %ul
+ - @project.errors.full_messages.each do |msg|
+ %li= msg
+ .clearfix.project_name_holder
+ = f.label :name do
+ Project name is
+ .input
+ = f.text_field :name, placeholder: "Example Project", class: "xxlarge"
+ - unless @repository.heads.empty?
+ .clearfix
+ = f.label :default_branch, "Default Branch"
+ .input= f.select(:default_branch, @repository.heads.map(&:name), {}, style: "width:210px;")
- .clearfix
- = f.label :description do
- Project description
- %span.light (optional)
- .input
- = f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250
+ %fieldset.features
+ %legend Features:
- - unless @project.empty_repo?
- .clearfix
- = f.label :default_branch, "Default Branch"
- .input= f.select(:default_branch, @repository.branch_names, {})
+ .control-group
+ = f.label :issues_enabled, "Issues", class: 'control-label'
+ .controls
+ = f.check_box :issues_enabled
+ %span.descr Lightweight issue tracking system for this project
+
+ .control-group
+ = f.label :merge_requests_enabled, "Merge Requests", class: 'control-label'
+ .controls
+ = f.check_box :merge_requests_enabled
+ %span.descr Submit changes to be merged upstream.
+
+ .control-group
+ = f.label :wall_enabled, "Wall", class: 'control-label'
+ .controls
+ = f.check_box :wall_enabled
+ %span.descr Simple chat system for broadcasting inside project
+
+ .control-group
+ = f.label :wiki_enabled, "Wiki", class: 'control-label'
+ .controls
+ = f.check_box :wiki_enabled
+ %span.descr Pages for project documentation
+
+ - if can? current_user, :change_public_mode, @project
+ %fieldset.features
+ %legend
+ %i.icon-share
+ Public mode:
+ .control-group
+ = f.label :public, class: 'control-label' do
+ %span Public clone access
+ .controls
+ = f.check_box :public
+ %span.descr
+ If checked, this project can be cloned
+ %em without any
+ authentification.
+ It will also be listed on the #{link_to "public access directory", public_root_path}.
- - if can?(current_user, :change_public_mode, @project)
- %fieldset.public-mode
- %legend
- Public mode:
- .control-group
- = f.label :public, class: 'control-label' do
- %span Public clone access
- .controls
- = f.check_box :public
- %span.descr
- If checked, this project can be cloned
- %em without any
- authentication.
- It will also be listed on the #{link_to "public access directory", public_root_path}.
-
- %fieldset.features
- %legend
- Features:
- .control-group
- = f.label :issues_enabled, "Issues", class: 'control-label'
- .controls
- = f.check_box :issues_enabled
- %span.descr Lightweight issue tracking system for this project
-
- - if Project.issues_tracker.values.count > 1
- .control-group
- = f.label :issues_tracker, "Issues tracker", class: 'control-label'
- .input= f.select(:issues_tracker, Project.issues_tracker.values, {}, { disabled: !@project.issues_enabled })
-
- .clearfix
- = f.label :issues_tracker_id, "Project name or id in issues tracker", class: 'control-label'
- .input= f.text_field :issues_tracker_id, disabled: !@project.can_have_issues_tracker_id?
-
- .control-group
- = f.label :merge_requests_enabled, "Merge Requests", class: 'control-label'
- .controls
- = f.check_box :merge_requests_enabled
- %span.descr Submit changes to be merged upstream.
-
- .control-group
- = f.label :wiki_enabled, "Wiki", class: 'control-label'
- .controls
- = f.check_box :wiki_enabled
- %span.descr Pages for project documentation
-
- .control-group
- = f.label :wall_enabled, "Wall", class: 'control-label'
- .controls
- = f.check_box :wall_enabled
- %span.descr Simple chat system for broadcasting inside project
-
- .control-group
- = f.label :snippets_enabled, "Snippets", class: 'control-label'
- .controls
- = f.check_box :snippets_enabled
- %span.descr Share code pastes with others out of git repository
+ - if can? current_user, :change_namespace, @project
+ %fieldset.features
+ %legend Transfer:
+ .control-group
+ = f.label :namespace_id do
+ %span Namespace
+ .controls
+ = f.select :namespace_id, namespaces_options(@project.namespace_id || Namespace::global_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'}
+ %br
+ %ul.prepend-top-10.cred
+ %li Be careful. Changing project namespace can have unintended side effects
+ %li You can transfer project only to namespaces you can manage
+ %li You will need to update your local repositories to point to the new location.
- .form-actions
- = f.submit 'Save', class: "btn btn-save"
+ %br
- .tab-pane#tab-transfer
- - if can?(current_user, :change_namespace, @project)
- .ui-box.ui-box-danger
- %h5.title Transfer project
- .errors-holder
- .form-holder
- = form_for(@project, url: transfer_project_path(@project), remote: true, html: { class: 'transfer-project' }) do |f|
- .control-group
- = f.label :namespace_id do
- %span Namespace
- .controls
- .clearfix
- = f.select :namespace_id, namespaces_options(@project.namespace_id || Namespace::global_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'}
- %ul
- %li Be careful. Changing project namespace can have unintended side effects
- %li You can transfer project only to namespaces you can manage
- %li You will need to update your local repositories to point to the new location.
- .form-actions
- = f.submit 'Transfer', class: "btn btn-remove"
- - else
- %p.nothing_here_message Only project owner can transfer a project
-
- .tab-pane#tab-remove
- - if can?(current_user, :remove_project, @project)
- .ui-box.ui-box-danger
- %h5.title Remove project
- .ui-box-body
- %p
- Remove of project will cause removing repository and all related resources like issues, merge requests etc.
- %p
- %strong Removed project can not be restored!
-
- = link_to 'Remove project', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn btn-remove btn-small"
- - else
- %p.nothing_here_message Only project owner can remove a project
+ .actions
+ = f.submit 'Save', class: "btn save-btn"
+ = link_to 'Cancel', @project, class: "btn"
+ - unless @project.new_record?
+ - if can?(current_user, :remove_project, @project)
+ .right
+ = link_to 'Remove Project', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn danger"
diff --git a/app/views/projects/_new_form.html.haml b/app/views/projects/_new_form.html.haml
index b6503636..131a4de4 100644
--- a/app/views/projects/_new_form.html.haml
+++ b/app/views/projects/_new_form.html.haml
@@ -1,13 +1,13 @@
= form_for(@project, remote: true) do |f|
- if @project.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
%span= @project.errors.full_messages.first
.clearfix.project_name_holder
= f.label :name do
Project name is
.input
= f.text_field :name, placeholder: "Example Project", class: "xxlarge"
- = f.submit 'Create project', class: "btn btn-create project-submit"
+ = f.submit 'Create project', class: "btn success project-submit"
- if current_user.can_select_namespace?
.clearfix
@@ -15,34 +15,6 @@
%span Namespace
.input
= f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen'}
-
-
- .clearfix
- .input
- = link_to "#", class: 'appear-link' do
- %i.icon-upload-alt
- %span Import existing repository?
- .clearfix.appear-data
- = f.label :import_url do
- %span Import existing repo
- .input
- = f.text_field :import_url, class: 'xlarge', placeholder: 'https://github.com/randx/six.git'
- .light
- URL must be clonable
-
- %p.padded
- New projects are private by default. You choose who can see the project and commit to repository.
%hr
-
- - if current_user.can_create_group?
- .clearfix
- .input.light
- Need a group for several dependent projects?
- = link_to new_group_path, class: "btn btn-tiny" do
- Create a group
- - if current_user.can_create_team?
- .clearfix
- .input.light
- Want to share a project between team?
- = link_to new_team_path, class: "btn btn-tiny" do
- Create a team
+ %p.padded
+ All created project are private. You choose who can see project and commit to repository.
diff --git a/app/views/projects/_project_head.html.haml b/app/views/projects/_project_head.html.haml
new file mode 100644
index 00000000..94052650
--- /dev/null
+++ b/app/views/projects/_project_head.html.haml
@@ -0,0 +1,31 @@
+%ul.nav.nav-tabs
+ = nav_link(path: 'projects#show') do
+ = link_to project_path(@project), class: "activities-tab tab" do
+ %i.icon-home
+ Show
+ = nav_link(controller: :team_members) do
+ = link_to project_team_index_path(@project), class: "team-tab tab" do
+ %i.icon-user
+ Team
+ = nav_link(path: 'projects#files') do
+ = link_to 'Attachments', files_project_path(@project), class: "files-tab tab"
+ = nav_link(controller: :snippets) do
+ = link_to 'Snippets', project_snippets_path(@project), class: "snippets-tab tab"
+
+ - if can? current_user, :admin_project, @project
+ = nav_link(controller: :deploy_keys, html_options: {class: 'right'}) do
+ = link_to project_deploy_keys_path(@project) do
+ %span
+ Deploy Keys
+ = nav_link(controller: :hooks, html_options: {class: 'right'}) do
+ = link_to project_hooks_path(@project) do
+ %span
+ Hooks
+ = nav_link(controller: :services, html_options: {class: 'right'}) do
+ = link_to project_services_path(@project) do
+ %span
+ Services
+ = nav_link(path: 'projects#edit', html_options: {class: 'right'}) do
+ = link_to edit_project_path(@project), class: "stat-tab tab " do
+ %i.icon-edit
+ Edit
diff --git a/app/views/projects/_settings_nav.html.haml b/app/views/projects/_settings_nav.html.haml
deleted file mode 100644
index acaa03f9..00000000
--- a/app/views/projects/_settings_nav.html.haml
+++ /dev/null
@@ -1,21 +0,0 @@
-%ul.nav.nav-tabs
- = nav_link(path: 'projects#edit') do
- = link_to edit_project_path(@project), class: "stat-tab tab " do
- %i.icon-edit
- Edit
- = nav_link(controller: [:team_members, :teams]) do
- = link_to project_team_index_path(@project), class: "team-tab tab" do
- %i.icon-user
- Team
- = nav_link(controller: :deploy_keys) do
- = link_to project_deploy_keys_path(@project) do
- %span
- Deploy Keys
- = nav_link(controller: :hooks) do
- = link_to project_hooks_path(@project) do
- %span
- Hooks
- = nav_link(controller: :services) do
- = link_to project_services_path(@project) do
- %span
- Services
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index 394522bf..fdd537da 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -1,5 +1,4 @@
-= render "projects/settings_nav"
-
+= render "project_head"
.project_edit_holder
%h3.page_title Edit Project
%hr
diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml
index b1795b30..52dff687 100644
--- a/app/views/projects/empty.html.haml
+++ b/app/views/projects/empty.html.haml
@@ -4,14 +4,14 @@
%fieldset
%legend Git global setup:
%pre.dark
- :preserve
+ = preserve do
git config --global user.name "#{current_user.name}"
git config --global user.email "#{current_user.email}"
%fieldset
%legend Create Repository
%pre.dark
- :preserve
+ = preserve do
mkdir #{@project.path}
cd #{@project.path}
git init
@@ -24,11 +24,11 @@
%fieldset
%legend Existing Git Repo?
%pre.dark
- :preserve
+ = preserve do
cd existing_git_repo
git remote add origin #{@project.url_to_repo}
git push -u origin master
- if can? current_user, :remove_project, @project
.prepend-top-20
- = link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn btn-remove pull-right"
+ = link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger right"
diff --git a/app/views/projects/files.html.haml b/app/views/projects/files.html.haml
new file mode 100644
index 00000000..d1083083
--- /dev/null
+++ b/app/views/projects/files.html.haml
@@ -0,0 +1,22 @@
+= render "project_head"
+- unless @notes.empty?
+ %table
+ %thead
+ %tr
+ %th File name
+ %th
+
+ - @notes.each do |note|
+ %tr
+ %td
+ %a{href: note.attachment.url}
+ = image_tag gravatar_icon(note.author_email), class: "avatar s24"
+ = note.attachment_identifier
+ %td
+ Added
+ = time_ago_in_words(note.created_at)
+ ago
+- else
+ %p.slead All files attached to project wall, issues etc will be displayed here
+
+
diff --git a/app/views/graph/show.html.haml b/app/views/projects/graph.html.haml
similarity index 50%
rename from app/views/graph/show.html.haml
rename to app/views/projects/graph.html.haml
index e45aca1d..4e0b0e36 100644
--- a/app/views/graph/show.html.haml
+++ b/app/views/projects/graph.html.haml
@@ -1,4 +1,5 @@
-= render "head"
+%h3.page_title Project Network Graph
+%br
.graph_holder
%h4
%small You can move around the graph by using the arrow keys.
@@ -9,9 +10,7 @@
var branch_graph;
$(function(){
branch_graph = new BranchGraph($("#holder"), {
- url: '#{project_graph_path(@project, @ref, q: @q, format: :json)}',
- commit_url: '#{project_commit_path(@project, 'ae45ca32').gsub("ae45ca32", "%s")}',
- ref: '#{@ref}',
- commit_id: '#{@commit.id}'
+ url: '#{url_for controller: 'projects', action: 'graph', format: :json}',
+ commit_url: '#{url_for controller: 'projects', action: 'show'}/commits/%s'
});
});
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 824d4daf..2c4f55eb 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -1,32 +1,8 @@
+= render "project_head"
= render 'clone_panel'
= render "events/event_last_push", event: @last_push
+.content_list= render @events
+.loading.hide
-.row
- .span9
- .content_list= render @events
- .loading.hide
- .span3
- .ui-box.white
- .padded
- %h3.page_title
- = @project.name
- - if @project.description.present?
- %p.light= @project.description
-
- %hr
- %p
- Access level:
- - if @project.public
- %span.cblue
- %i.icon-share
- Public
- - else
- %span.cgreen
- %i.icon-lock
- Private
-
- %p Repo Size: #{@project.repository.size} MB
- %p Created at: #{@project.created_at.stamp('Aug 22, 2013')}
- %p Owner: #{link_to @project.owner_name, @project.owner}
:javascript
$(function(){ Pager.init(20); });
diff --git a/app/views/projects/teams/available.html.haml b/app/views/projects/teams/available.html.haml
deleted file mode 100644
index 29fe8ed2..00000000
--- a/app/views/projects/teams/available.html.haml
+++ /dev/null
@@ -1,22 +0,0 @@
-= render "projects/settings_nav"
-
-%h3.page_title
- = "Assign project to team of users"
-%hr
-%p.slead
- Read more about assign to team of users #{link_to "here", '#', class: 'vlink'}.
-= form_tag assign_project_teams_path(@project), method: 'post' do
- %p.slead Choose Team of users you want to assign:
- .padded
- = label_tag :team_id, "Team"
- .input= select_tag(:team_id, options_from_collection_for_select(@teams, :id, :name), prompt: "Select team", class: "chosen xxlarge", required: true)
- %p.slead Choose greatest user acces in team you want to assign:
- .padded
- = label_tag :team_ids, "Permission"
- .input= select_tag :greatest_project_access, options_for_select(UserTeam.access_roles), {class: "project-access-select chosen span3" }
-
-
- .actions
- = submit_tag 'Assign', class: "btn btn-create"
- = link_to "Cancel", project_team_index_path(@project), class: "btn btn-cancel"
-
diff --git a/app/views/projects/transfer.js.haml b/app/views/projects/transfer.js.haml
deleted file mode 100644
index 10b0de98..00000000
--- a/app/views/projects/transfer.js.haml
+++ /dev/null
@@ -1,7 +0,0 @@
-- if @project.errors[:namespace_id].present?
- :plain
- $("#tab-transfer .errors-holder").replaceWith(errorMessage('#{escape_javascript(@project.errors[:namespace_id].first)}'));
- $("#tab-transfer .form-actions input").removeAttr('disabled').removeClass('disabled');
-- else
- :plain
- location.href = "#{edit_project_path(@project)}";
diff --git a/app/views/projects/update_failed.js.haml b/app/views/projects/update_failed.js.haml
new file mode 100644
index 00000000..a3ac5f40
--- /dev/null
+++ b/app/views/projects/update_failed.js.haml
@@ -0,0 +1,2 @@
+:plain
+ $(".save-project-loader").replaceWith(errorMessage('#{escape_javascript(@error.message)}'));
diff --git a/app/views/projects/wall.html.haml b/app/views/projects/wall.html.haml
new file mode 100644
index 00000000..82b565de
--- /dev/null
+++ b/app/views/projects/wall.html.haml
@@ -0,0 +1,2 @@
+%div.wall_page
+ = render "notes/reversed_notes_with_form"
diff --git a/app/views/protected_branches/index.html.haml b/app/views/protected_branches/index.html.haml
index 15644de5..c1ecceda 100644
--- a/app/views/protected_branches/index.html.haml
+++ b/app/views/protected_branches/index.html.haml
@@ -14,7 +14,7 @@
- if can? current_user, :admin_project, @project
= form_for [@project, @protected_branch] do |f|
-if @protected_branch.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
%ul
- @protected_branch.errors.full_messages.each do |msg|
%li= msg
@@ -24,7 +24,7 @@
.span3
= f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "chosen span3"})
- = f.submit 'Protect', class: "btn-primary btn"
+ = f.submit 'Protect', class: "primary btn"
- unless @branches.empty?
%table
@@ -51,4 +51,4 @@
(branch was removed from repository)
%td
- if can? current_user, :admin_project, @project
- = link_to 'Unprotect', [@project, branch], confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small"
+ = link_to 'Unprotect', [@project, branch], confirm: 'Are you sure?', method: :delete, class: "danger btn small"
diff --git a/app/views/public/projects/index.html.haml b/app/views/public/projects/index.html.haml
index b50484f6..afdd4c5f 100644
--- a/app/views/public/projects/index.html.haml
+++ b/app/views/public/projects/index.html.haml
@@ -1,20 +1,16 @@
%h3.page_title
- Projects (#{@projects.total_count})
+ Projects
%small with read-only access
%hr
-.public-projects
- %ul.unstyled
- - @projects.each do |project|
- %li.clearfix
- %h5
- %i.icon-share
- = project.name_with_namespace
- .pull-right
- %pre.dark.tiny git clone #{project.http_url_to_repo}
- %p.description
- = project.description
- - unless @projects.present?
- %h3.nothing_here_message No public projects
+%ul.unstyled
+ - @projects.each do |project|
+ %li.clearfix
+ %h5
+ %i.icon-share
+ = project.name_with_namespace
+ .right
+ %pre.dark.tiny git clone #{project.http_url_to_repo}
- = paginate @projects, theme: "admin"
+
+= paginate @projects, theme: "admin"
diff --git a/app/views/repositories/_branch.html.haml b/app/views/repositories/_branch.html.haml
index dd91e14b..a6faa5fd 100644
--- a/app/views/repositories/_branch.html.haml
+++ b/app/views/repositories/_branch.html.haml
@@ -1,4 +1,5 @@
-- commit = Commit.new(Gitlab::Git::Commit.new(branch.commit))
+- commit = Commit.new(branch.commit)
+- commit = CommitDecorator.decorate(commit)
%tr
%td
= link_to project_commits_path(@project, branch.name) do
diff --git a/app/views/repositories/_feed.html.haml b/app/views/repositories/_feed.html.haml
index 6bb75265..44380133 100644
--- a/app/views/repositories/_feed.html.haml
+++ b/app/views/repositories/_feed.html.haml
@@ -1,4 +1,5 @@
- commit = update
+- commit = CommitDecorator.new(commit)
%tr
%td
= link_to project_commits_path(@project, commit.head.name) do
@@ -14,6 +15,6 @@
= image_tag gravatar_icon(commit.author_email), class: "", width: 16
= gfm escape_once(truncate(commit.title, length: 40))
%td
- %span.pull-right.cgray
+ %span.right.cgray
= time_ago_in_words(commit.committed_date)
ago
diff --git a/app/views/repositories/_head.html.haml b/app/views/repositories/_head.html.haml
new file mode 100644
index 00000000..bc96f306
--- /dev/null
+++ b/app/views/repositories/_head.html.haml
@@ -0,0 +1 @@
+= render "projects/project_head"
diff --git a/app/views/repositories/stats.html.haml b/app/views/repositories/stats.html.haml
index dde35ea3..bdf047f1 100644
--- a/app/views/repositories/stats.html.haml
+++ b/app/views/repositories/stats.html.haml
@@ -23,7 +23,7 @@
= image_tag gravatar_icon(author.email, 16), class: 'avatar s16'
= author.name
%small.light= author.email
- .pull-right
+ .right
= author.commits
diff --git a/app/views/repositories/tags.html.haml b/app/views/repositories/tags.html.haml
index 2d311124..d4b8bbe1 100644
--- a/app/views/repositories/tags.html.haml
+++ b/app/views/repositories/tags.html.haml
@@ -7,7 +7,8 @@
%th Last commit
%th
- @tags.each do |tag|
- - commit = Commit.new(Gitlab::Git::Commit.new(tag.commit))
+ - commit = Commit.new(tag.commit)
+ - commit = CommitDecorator.decorate(commit)
%tr
%td
%strong
diff --git a/app/views/search/_filter.html.haml b/app/views/search/_filter.html.haml
deleted file mode 100644
index a523fa25..00000000
--- a/app/views/search/_filter.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-%fieldset
- %legend Groups:
- .clearfix
- = select_tag 'group_id', options_from_collection_for_select(current_user.authorized_groups, :id, :name, params[:group_id]), prompt: 'All', include_blank: true, class: 'trigger-submit chosen'
-
-
-%fieldset
- %legend Teams:
- .clearfix
- = select_tag 'team_id', options_from_collection_for_select(current_user.authorized_teams, :id, :name, params[:team_id]), prompt: 'All', include_blank: true, class: 'trigger-submit chosen'
-
-%fieldset
- %legend Projects:
- .clearfix
- = select_tag 'project_id', options_from_collection_for_select(current_user.authorized_projects, :id, :name_with_namespace, params[:project_id]), prompt: 'All', include_blank: true, class: 'trigger-submit chosen'
-
diff --git a/app/views/search/_result.html.haml b/app/views/search/_result.html.haml
index bfa46075..79bed4f7 100644
--- a/app/views/search/_result.html.haml
+++ b/app/views/search/_result.html.haml
@@ -1,38 +1,83 @@
-%fieldset
- %legend
- Search results
- %span.cgray (#{@projects.count + @merge_requests.count + @issues.count + @wiki_pages.count})
+%br
+%h3.page_title
+ Search results
+ %span.cgray (#{@projects.count + @merge_requests.count + @issues.count + @wiki_pages.count})
+%hr
.search_results
- %ul.well-list
- - @projects.each do |project|
- %li
- project:
- = link_to project do
- %strong.term= project.name_with_namespace
- - @merge_requests.each do |merge_request|
- %li
- merge request:
- = link_to [merge_request.project, merge_request] do
- %span ##{merge_request.id}
- %strong.term
- = truncate merge_request.title, length: 50
- %span.light (#{merge_request.project.name_with_namespace})
- - @issues.each do |issue|
- %li
- issue:
- = link_to [issue.project, issue] do
- %span ##{issue.id}
- %strong.term
- = truncate issue.title, length: 50
- %span.light (#{issue.project.name_with_namespace})
- - @wiki_pages.each do |wiki_page|
- %li
- wiki:
- = link_to project_wiki_path(wiki_page.project, wiki_page) do
- %strong.term
- = truncate wiki_page.title, length: 50
- %span.light (#{wiki_page.project.name_with_namespace})
-
+ .row
+ .span6
+ %table
+ %thead
+ %tr
+ %th Projects
+ %tbody
+ - @projects.each do |project|
+ %tr
+ %td
+ = link_to project do
+ %strong.term= project.name_with_namespace
+ %small.cgray
+ last activity at
+ = project.last_activity_date.stamp("Aug 25, 2011")
+ - if @projects.blank?
+ %tr
+ %td
+ %h4.nothing_here_message No Projects
+ %br
+ %table
+ %thead
+ %tr
+ %th Merge Requests
+ %tbody
+ - @merge_requests.each do |merge_request|
+ %tr
+ %td
+ = link_to [merge_request.project, merge_request] do
+ %span.badge.badge-info ##{merge_request.id}
+ –
+ %strong.term= truncate merge_request.title, length: 50
+ %strong.right
+ %span.label= merge_request.project.name
+ - if @merge_requests.blank?
+ %tr
+ %td
+ %h4.nothing_here_message No Merge Requests
+ .span6
+ %table
+ %thead
+ %tr
+ %th Issues
+ %tbody
+ - @issues.each do |issue|
+ %tr
+ %td
+ = link_to [issue.project, issue] do
+ %span.badge.badge-info ##{issue.id}
+ –
+ %strong.term= truncate issue.title, length: 40
+ %strong.right
+ %span.label= issue.project.name
+ - if @issues.blank?
+ %tr
+ %td
+ %h4.nothing_here_message No Issues
+ .span6
+ %table
+ %thead
+ %tr
+ %th Wiki
+ %tbody
+ - @wiki_pages.each do |wiki_page|
+ %tr
+ %td
+ = link_to project_wiki_path(wiki_page.project, wiki_page) do
+ %strong.term= truncate wiki_page.title, length: 40
+ %strong.right
+ %span.label= wiki_page.project.name
+ - if @wiki_pages.blank?
+ %tr
+ %td
+ %h4.nothing_here_message No wiki pages
:javascript
$(function() {
$(".search_results .term").highlight("#{escape_javascript(params[:search])}");
diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml
index 5914c22d..aa0d6d70 100644
--- a/app/views/search/show.html.haml
+++ b/app/views/search/show.html.haml
@@ -1,15 +1,9 @@
= form_tag search_path, method: :get, class: 'form-inline' do |f|
- .search-holder
+ .padded
= label_tag :search do
- %span Looking for
+ %strong Looking for
.input
= search_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge search-text-input", id: "dashboard_search"
- = submit_tag 'Search', class: "btn btn-primary wide"
- .clearfix
- .row
- .span3
- = render 'filter', f: f
- .span9
- .results
- - if params[:search].present?
- = render 'search/result'
+ = submit_tag 'Search', class: "btn primary wide"
+- if params[:search].present?
+ = render 'search/result'
diff --git a/app/views/services/_gitlab_ci.html.haml b/app/views/services/_gitlab_ci.html.haml
index dfde6438..649c5cc4 100644
--- a/app/views/services/_gitlab_ci.html.haml
+++ b/app/views/services/_gitlab_ci.html.haml
@@ -1,7 +1,7 @@
%h3.page_title
GitLab CI
%small Continuous integration server from GitLab
- .pull-right
+ .right
- if @service.active
%small.cgreen Enabled
- else
@@ -16,7 +16,7 @@
%hr
= form_for(@service, :as => :service, :url => project_service_path(@project, :gitlab_ci), :method => :put) do |f|
- if @service.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
%ul
- @service.errors.full_messages.each do |msg|
%li= msg
@@ -40,7 +40,7 @@
.form-actions
- = f.submit 'Save', class: 'btn btn-save'
+ = f.submit 'Save', class: 'btn save-btn'
- if @service.valid? && @service.active
= link_to 'Test settings', test_project_service_path(@project), class: 'btn btn-small'
diff --git a/app/views/services/edit.html.haml b/app/views/services/edit.html.haml
index 0c63a7ed..d893847f 100644
--- a/app/views/services/edit.html.haml
+++ b/app/views/services/edit.html.haml
@@ -1,3 +1,2 @@
-= render "projects/settings_nav"
-
+= render "projects/project_head"
= render 'gitlab_ci'
diff --git a/app/views/services/index.html.haml b/app/views/services/index.html.haml
index eb2f8d0c..2c94f965 100644
--- a/app/views/services/index.html.haml
+++ b/app/views/services/index.html.haml
@@ -1,5 +1,4 @@
-= render "projects/settings_nav"
-
+= render "projects/project_head"
%h3.page_title Services
%br
@@ -9,7 +8,7 @@
= link_to edit_project_service_path(@project, :gitlab_ci) do
GitLab CI
%small Continuous integration server from GitLab
- .pull-right
+ .right
- if @gitlab_ci_service.try(:active)
%small.cgreen
%i.icon-ok
@@ -22,11 +21,11 @@
%h4
Jenkins CI
%small An extendable open source continuous integration server
- .pull-right
+ .right
%small Not implemented yet
%li.disabled
%h4
Campfire
%small Web-based group chat tool
- .pull-right
+ .right
%small Not implemented yet
diff --git a/app/views/shared/_clone_panel.html.haml b/app/views/shared/_clone_panel.html.haml
index bd9ca729..7b5de4a6 100644
--- a/app/views/shared/_clone_panel.html.haml
+++ b/app/views/shared/_clone_panel.html.haml
@@ -1,4 +1,5 @@
.input-prepend.project_clone_holder
%button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH
%button{class: "btn", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.gitlab.protocol.upcase
- = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select input-xxlarge", readonly: true
+
+ = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select input-xxlarge"
diff --git a/app/views/shared/_not_in_team.html.haml b/app/views/shared/_not_in_team.html.haml
new file mode 100644
index 00000000..0d003bde
--- /dev/null
+++ b/app/views/shared/_not_in_team.html.haml
@@ -0,0 +1,2 @@
+%p.error_message.centered
+ You won't be able to use git over ssh until you join project on #{link_to 'team page', project_team_index_path(@project)}
diff --git a/app/views/snippets/_blob.html.haml b/app/views/snippets/_blob.html.haml
index 017a33b3..ed518300 100644
--- a/app/views/snippets/_blob.html.haml
+++ b/app/views/snippets/_blob.html.haml
@@ -3,7 +3,7 @@
%i.icon-file
%strong= @snippet.file_name
%span.options
- = link_to "raw", raw_project_snippet_path(@project, @snippet), class: "btn btn-tiny", target: "_blank"
+ = link_to "raw", raw_project_snippet_path(@project, @snippet), class: "btn very_small", target: "_blank"
.file_content.code
- unless @snippet.content.empty?
%div{class: user_color_scheme_class}
diff --git a/app/views/snippets/_form.html.haml b/app/views/snippets/_form.html.haml
index 77162cdc..baef737b 100644
--- a/app/views/snippets/_form.html.haml
+++ b/app/views/snippets/_form.html.haml
@@ -4,7 +4,7 @@
.snippet-form-holder
= form_for [@project, @snippet] do |f|
-if @snippet.errors.any?
- .alert.alert-error
+ .alert-message.block-message.error
%ul
- @snippet.errors.full_messages.each do |msg|
%li= msg
@@ -27,10 +27,10 @@
= f.hidden_field :content, class: 'snippet-file-content'
.form-actions
- = f.submit 'Save', class: "btn-save btn"
+ = f.submit 'Save', class: "save-btn btn"
= link_to "Cancel", project_snippets_path(@project), class: " btn"
- unless @snippet.new_record?
- .pull-right= link_to 'Destroy', [@project, @snippet], confirm: 'Are you sure?', method: :delete, class: "btn pull-right danger delete-snippet", id: "destroy_snippet_#{@snippet.id}"
+ .right= link_to 'Destroy', [@project, @snippet], confirm: 'Are you sure?', method: :delete, class: "btn right danger delete-snippet", id: "destroy_snippet_#{@snippet.id}"
:javascript
diff --git a/app/views/snippets/edit.html.haml b/app/views/snippets/edit.html.haml
index f81c0b8b..8afaf46e 100644
--- a/app/views/snippets/edit.html.haml
+++ b/app/views/snippets/edit.html.haml
@@ -1 +1,2 @@
+= render "projects/project_head"
= render "snippets/form"
diff --git a/app/views/snippets/index.html.haml b/app/views/snippets/index.html.haml
index bacf23d8..7b8f94de 100644
--- a/app/views/snippets/index.html.haml
+++ b/app/views/snippets/index.html.haml
@@ -1,9 +1,11 @@
+= render "projects/project_head"
+
%h3.page_title
Snippets
%small share code pastes with others out of git repository
- if can? current_user, :write_snippet, @project
- = link_to new_project_snippet_path(@project), class: "btn btn-small add_new pull-right", title: "New Snippet" do
+ = link_to new_project_snippet_path(@project), class: "btn small add_new right", title: "New Snippet" do
Add new snippet
%br
%table
diff --git a/app/views/snippets/new.html.haml b/app/views/snippets/new.html.haml
index f81c0b8b..8afaf46e 100644
--- a/app/views/snippets/new.html.haml
+++ b/app/views/snippets/new.html.haml
@@ -1 +1,2 @@
+= render "projects/project_head"
= render "snippets/form"
diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml
index 12534edf..02022185 100644
--- a/app/views/snippets/show.html.haml
+++ b/app/views/snippets/show.html.haml
@@ -1,8 +1,10 @@
+= render "projects/project_head"
+
%h3.page_title
= @snippet.title
%small= @snippet.file_name
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
- = link_to "Edit", edit_project_snippet_path(@project, @snippet), class: "btn btn-small pull-right", title: 'Edit Snippet'
+ = link_to "Edit", edit_project_snippet_path(@project, @snippet), class: "btn small right"
%br
%div= render 'blob'
diff --git a/app/views/team_members/_assigned_team.html.haml b/app/views/team_members/_assigned_team.html.haml
deleted file mode 100644
index 51a31a64..00000000
--- a/app/views/team_members/_assigned_team.html.haml
+++ /dev/null
@@ -1,10 +0,0 @@
-%li{id: dom_id(team), class: "user_team_row team_#{team.id}"}
- .pull-right
- - if can?(current_user, :admin_team_member, @project)
- = link_to resign_project_team_path(@project, team), method: :delete, confirm: "Are you sure?", class: "btn btn-remove btn-tiny" do
- %i.icon-minus.icon-white
-
- %strong= link_to team.name, team_path(team), title: team.name, class: "dark"
- %br
- %small.cgray Members: #{team.members.count}
- %small.cgray Max access: #{team_relation.human_max_access}
diff --git a/app/views/team_members/_assigned_teams.html.haml b/app/views/team_members/_assigned_teams.html.haml
deleted file mode 100644
index 91c6d8f7..00000000
--- a/app/views/team_members/_assigned_teams.html.haml
+++ /dev/null
@@ -1,4 +0,0 @@
-.ui-box
- %ul.well-list
- - assigned_teams.sort_by(&:team_name).each do |team_relation|
- = render "team_members/assigned_team", team_relation: team_relation, team: team_relation.user_team
diff --git a/app/views/team_members/_form.html.haml b/app/views/team_members/_form.html.haml
index 4e8f6770..a963e462 100644
--- a/app/views/team_members/_form.html.haml
+++ b/app/views/team_members/_form.html.haml
@@ -1,24 +1,23 @@
%h3.page_title
= "New Team member(s)"
%hr
-= form_for @user_project_relation, as: :team_member, url: project_team_members_path(@project) do |f|
- -if @user_project_relation.errors.any?
- .alert.alert-error
+= form_for @team_member, as: :team_member, url: project_team_members_path(@project, @team_member) do |f|
+ -if @team_member.errors.any?
+ .alert-message.block-message.error
%ul
- - @user_project_relation.errors.full_messages.each do |msg|
+ - @team_member.errors.full_messages.each do |msg|
%li= msg
%h6 1. Choose people you want in the team
.clearfix
= f.label :user_ids, "People"
- .input
- = users_select_tag(:user_ids, multiple: true)
+ .input= select_tag(:user_ids, options_from_collection_for_select(User.active.not_in_project(@project).alphabetically, :id, :name), {data: {placeholder: "Select users"}, class: "chosen xxlarge", multiple: true})
%h6 2. Set access level for them
.clearfix
= f.label :project_access, "Project Access"
- .input= select_tag :project_access, options_for_select(Project.access_options, @user_project_relation.project_access), class: "project-access-select chosen"
+ .input= select_tag :project_access, options_for_select(Project.access_options, @team_member.project_access), class: "project-access-select chosen"
.actions
- = f.submit 'Add users', class: "btn btn-create"
- = link_to "Cancel", project_team_index_path(@project), class: "btn btn-cancel"
+ = f.submit 'Save', class: "btn save-btn"
+ = link_to "Cancel", project_team_index_path(@project), class: "btn cancel-btn"
diff --git a/app/views/team_members/_show.html.haml b/app/views/team_members/_show.html.haml
new file mode 100644
index 00000000..8082f47f
--- /dev/null
+++ b/app/views/team_members/_show.html.haml
@@ -0,0 +1,28 @@
+- user = member.user
+- allow_admin = can? current_user, :admin_project, @project
+%li{id: dom_id(member), class: "team_member_row user_#{user.id}"}
+ .row
+ .span6
+ = link_to project_team_member_path(@project, member), title: user.name, class: "dark" do
+ = image_tag gravatar_icon(user.email, 40), class: "avatar s32"
+ = link_to project_team_member_path(@project, member), title: user.name, class: "dark" do
+ %strong= truncate(user.name, lenght: 40)
+ %br
+ %small.cgray= user.email
+
+ .span5.right
+ - if allow_admin
+ .left
+ = form_for(member, as: :team_member, url: project_team_member_path(@project, member)) do |f|
+ = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2"
+ .right
+ - if current_user == user
+ %span.btn.disabled This is you!
+ - if @project.namespace_owner == user
+ %span.btn.disabled.success Owner
+ - elsif user.blocked
+ %span.btn.disabled.blocked Blocked
+ - elsif allow_admin
+ = link_to project_team_member_path(project_id: @project, id: member.id), confirm: remove_from_team_message(@project, member), method: :delete, class: "very_small btn danger" do
+ %i.icon-minus.icon-white
+
diff --git a/app/views/team_members/_team.html.haml b/app/views/team_members/_team.html.haml
index 2ec8c1a8..365d9b65 100644
--- a/app/views/team_members/_team.html.haml
+++ b/app/views/team_members/_team.html.haml
@@ -1,8 +1,16 @@
-- team.each do |access, members|
+- grouper_project_members(@project).each do |access, members|
.ui-box
%h5.title
= Project.access_options.key(access).pluralize
%small= members.size
%ul.well-list
- - members.sort_by(&:user_name).each do |team_member|
- = render 'team_members/team_member', member: team_member
+ - members.sort_by(&:user_name).each do |up|
+ = render(partial: 'team_members/show', locals: {member: up})
+
+
+:javascript
+ $(function(){
+ $('.repo-access-select, .project-access-select').live("change", function() {
+ $(this.form).submit();
+ });
+ })
diff --git a/app/views/team_members/_team_member.html.haml b/app/views/team_members/_team_member.html.haml
deleted file mode 100644
index 2b0709be..00000000
--- a/app/views/team_members/_team_member.html.haml
+++ /dev/null
@@ -1,27 +0,0 @@
-- user = member.user
-- allow_admin = can? current_user, :admin_project, @project
-%li{id: dom_id(user), class: "team_member_row user_#{user.id}"}
- .row
- .span4
- = link_to user, title: user.name, class: "dark" do
- = image_tag gravatar_icon(user.email, 32), class: "avatar s32"
- %strong= truncate(user.name, lenght: 40)
- %br
- %small.cgray= user.username
-
- .span4.pull-right
- - if allow_admin
- .left
- = form_for(member, as: :team_member, url: project_team_member_path(@project, member.user)) do |f|
- = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit"
- .pull-right
- - if current_user == user
- %span.label This is you!
- - if @project.namespace_owner == user
- %span.label Owner
- - elsif user.blocked?
- %span.label Blocked
- - elsif allow_admin
- = link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from team' do
- %i.icon-minus.icon-white
-
diff --git a/app/views/team_members/create.js.haml b/app/views/team_members/create.js.haml
index b7dff35a..d5ae5d0c 100644
--- a/app/views/team_members/create.js.haml
+++ b/app/views/team_members/create.js.haml
@@ -1,4 +1,4 @@
-- if @user_project_relation.valid?
+- if @team_member.valid?
:plain
$("#new_team_member").hide("slide", { direction: "right" }, 150, function(){
$("#team-table").show("slide", { direction: "left" }, 150, function() {
diff --git a/app/views/team_members/import.html.haml b/app/views/team_members/import.html.haml
index 0f7175b9..de82f416 100644
--- a/app/views/team_members/import.html.haml
+++ b/app/views/team_members/import.html.haml
@@ -1,10 +1,10 @@
-= render "projects/settings_nav"
+= render "projects/project_head"
%h3.page_title
= "Import team from another project"
%hr
%p.slead
- Read more about project team import #{link_to "here", '#', class: 'vlink'}.
+ Read more about team import #{link_to "here", '#', class: 'vlink'}.
= form_tag apply_import_project_team_members_path(@project), method: 'post' do
%p.slead Choose project you want to use as team source:
.padded
@@ -12,6 +12,6 @@
.input= select_tag(:source_project_id, options_from_collection_for_select(current_user.authorized_projects, :id, :name_with_namespace), prompt: "Select project", class: "chosen xxlarge", required: true)
.actions
- = submit_tag 'Import', class: "btn btn-save"
- = link_to "Cancel", project_team_index_path(@project), class: "btn btn-cancel"
+ = submit_tag 'Import', class: "btn save-btn"
+ = link_to "Cancel", project_team_index_path(@project), class: "btn cancel-btn"
diff --git a/app/views/team_members/index.html.haml b/app/views/team_members/index.html.haml
index 50d44bcd..e413c81b 100644
--- a/app/views/team_members/index.html.haml
+++ b/app/views/team_members/index.html.haml
@@ -1,56 +1,20 @@
-= render "projects/settings_nav"
+= render "projects/project_head"
%h3.page_title
Team Members
- (#{@project.users.count})
+ (#{@project.users_projects.count})
%small
Read more about project permissions
%strong= link_to "here", help_permissions_path, class: "vlink"
- if can? current_user, :admin_team_member, @project
- %span.pull-right
- = link_to import_project_team_members_path(@project), class: "btn btn-small grouped", title: "Import team from another project" do
+ %span.right
+ = link_to import_project_team_members_path(@project), class: "btn small grouped", title: "Import team from another project" do
Import team from another project
- = link_to available_project_teams_path(@project), class: "btn btn-small grouped", title: "Assign project to team of users" do
- Assign project to Team of users
- = link_to new_project_team_member_path(@project), class: "btn btn-primary small grouped", title: "New Team Member" do
+ = link_to new_project_team_member_path(@project), class: "btn success small grouped", title: "New Team Member" do
New Team Member
-
%hr
+
.clearfix
-.row
- .span3
- %ul.nav.nav-pills.nav-stacked
- %li{class: ("active" if !params[:type])}
- = link_to project_team_members_path(type: nil) do
- All
- %li{class: ("active" if params[:type] == 'masters')}
- = link_to project_team_members_path(type: 'masters') do
- Masters
- %span.pull-right= @project.users_projects.masters.count
- %li{class: ("active" if params[:type] == 'developers')}
- = link_to project_team_members_path(type: 'developers') do
- Developers
- %span.pull-right= @project.users_projects.developers.count
- %li{class: ("active" if params[:type] == 'reporters')}
- = link_to project_team_members_path(type: 'reporters') do
- Reporters
- %span.pull-right= @project.users_projects.reporters.count
- %li{class: ("active" if params[:type] == 'guests')}
- = link_to project_team_members_path(type: 'guests') do
- Guests
- %span.pull-right= @project.users_projects.guests.count
-
- - if @assigned_teams.present?
- %h5
- Assigned teams
- (#{@project.user_teams.count})
- %div
- = render "team_members/assigned_teams", assigned_teams: @assigned_teams
-
- .span9
- %div.team-table
- = render "team_members/team", team: @team
-
-
-
+%div.team-table
+ = render partial: "team_members/team", locals: {project: @project}
diff --git a/app/views/team_members/new.html.haml b/app/views/team_members/new.html.haml
index 7e20f50d..40eb4ceb 100644
--- a/app/views/team_members/new.html.haml
+++ b/app/views/team_members/new.html.haml
@@ -1,2 +1,2 @@
-= render "projects/settings_nav"
+= render "projects/project_head"
= render "team_members/form"
diff --git a/app/views/team_members/show.html.haml b/app/views/team_members/show.html.haml
new file mode 100644
index 00000000..4008e8bd
--- /dev/null
+++ b/app/views/team_members/show.html.haml
@@ -0,0 +1,60 @@
+- allow_admin = can? current_user, :admin_project, @project
+- user = @team_member.user
+
+.team_member_show
+ - if can? current_user, :admin_project, @project
+ = link_to 'Remove from team', project_team_member_path(project_id: @project, id: @team_member.id), confirm: 'Are you sure?', method: :delete, class: "right btn danger"
+ .profile_avatar_holder
+ = image_tag gravatar_icon(user.email, 60), class: "borders"
+ %h3.page_title
+ = user.name
+ %small (@#{user.username})
+
+ %hr
+ .back_link
+ %br
+ = link_to project_team_index_path(@project), class: "" do
+ ← To team list
+ %br
+ .row
+ .span6
+ %table.lite
+ %tr
+ %td Email
+ %td= mail_to user.email
+ %tr
+ %td Skype
+ %td= user.skype
+ - unless user.linkedin.blank?
+ %tr
+ %td LinkedIn
+ %td= user.linkedin
+ - unless user.twitter.blank?
+ %tr
+ %td Twitter
+ %td= user.twitter
+ - unless user.bio.blank?
+ %tr
+ %td Bio
+ %td= user.bio
+ .span6
+ %table.lite
+ %tr
+ %td Member since
+ %td= @team_member.created_at.stamp("Aug 21, 2011")
+ %tr
+ %td
+ Project Access:
+ %small (#{link_to "read more", help_permissions_path, class: "vlink"})
+ %td
+ = form_for(@team_member, as: :team_member, url: project_team_member_path(@project, @team_member)) do |f|
+ = f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, class: "project-access-select", disabled: !allow_admin
+ %hr
+ = render @events
+:javascript
+ $(function(){
+ $('.repo-access-select, .project-access-select').live("change", function() {
+ $(this.form).submit();
+ });
+ })
+
diff --git a/app/views/team_members/update.js.haml b/app/views/team_members/update.js.haml
index c68fe957..6d7f8816 100644
--- a/app/views/team_members/update.js.haml
+++ b/app/views/team_members/update.js.haml
@@ -1,6 +1,6 @@
-- if @user_project_relation.valid?
+- if @team_member.valid?
:plain
- $("##{dom_id(@user_project_relation)}").effect("highlight", {color: "#529214"}, 1000);;
+ $("##{dom_id(@team_member)}").effect("highlight", {color: "#529214"}, 1000);;
- else
:plain
- $("##{dom_id(@user_project_relation)}").effect("highlight", {color: "#D12F19"}, 1000);;
+ $("##{dom_id(@team_member)}").effect("highlight", {color: "#D12F19"}, 1000);;
diff --git a/app/views/teams/_filter.html.haml b/app/views/teams/_filter.html.haml
deleted file mode 100644
index f461fcad..00000000
--- a/app/views/teams/_filter.html.haml
+++ /dev/null
@@ -1,33 +0,0 @@
-= form_tag team_filter_path(entity), method: 'get' do
- %fieldset.dashboard-search-filter
- = search_field_tag "search", params[:search], { placeholder: 'Search', class: 'search-text-input' }
- = button_tag type: 'submit', class: 'btn' do
- %i.icon-search
-
- %fieldset
- %legend Status:
- %ul.nav.nav-pills.nav-stacked
- %li{class: ("active" if !params[:status])}
- = link_to team_filter_path(entity, status: nil) do
- Open
- %li{class: ("active" if params[:status] == 'closed')}
- = link_to team_filter_path(entity, status: 'closed') do
- Closed
- %li{class: ("active" if params[:status] == 'all')}
- = link_to team_filter_path(entity, status: 'all') do
- All
-
- %fieldset
- %legend Projects:
- %ul.nav.nav-pills.nav-stacked
- - @projects.each do |project|
- - unless entities_per_project(project, entity).zero?
- %li{class: ("active" if params[:project_id] == project.id.to_s)}
- = link_to team_filter_path(entity, project_id: project.id) do
- = project.name_with_namespace
- %small.pull-right= entities_per_project(project, entity)
-
- %fieldset
- %hr
- = link_to "Reset", team_filter_path(entity), class: 'btn pull-right'
-
diff --git a/app/views/teams/_projects.html.haml b/app/views/teams/_projects.html.haml
deleted file mode 100644
index d0061aa2..00000000
--- a/app/views/teams/_projects.html.haml
+++ /dev/null
@@ -1,22 +0,0 @@
-.ui-box
- %h5.title
- Projects
- %small
- (#{projects.count})
- - if can? current_user, :manage_user_team, @team
- %span.pull-right
- = link_to edit_team_path(@team), class: "btn btn-tiny info" do
- %i.icon-plus
- Assign Project
- %ul.well-list
- - if projects.blank?
- %p.nothing_here_message This team has no projects yet
- - projects.each do |project|
- %li
- = link_to project_path(project), class: dom_class(project) do
- %strong.well-title= truncate(project.name_with_namespace, length: 40)
- %span.arrow
- →
- %span.last_activity
- %strong Last activity:
- %span= project_last_activity(project)
diff --git a/app/views/teams/edit.html.haml b/app/views/teams/edit.html.haml
deleted file mode 100644
index c9d573ea..00000000
--- a/app/views/teams/edit.html.haml
+++ /dev/null
@@ -1,73 +0,0 @@
-.row
- .span3
- %ul.nav.nav-pills.nav-stacked
- %li.active
- = link_to 'Projects', '#tab-projects', 'data-toggle' => 'tab'
- %li
- = link_to 'Edit Team', '#tab-edit', 'data-toggle' => 'tab'
- %li
- = link_to 'Remove', '#tab-remove', 'data-toggle' => 'tab'
-
- .span9
- .tab-content
- .tab-pane.active#tab-projects
- .ui-box.projects-table
- %h5.title Projects
- %ul.well-list
- - @projects.each do |project|
- %li
- - if project.public
- %i.icon-share
- - else
- %i.icon-lock.cgreen
- = link_to project.name_with_namespace, project
- .pull-right
- = link_to 'Edit max access', edit_team_project_path(@team, project), class: "btn btn-small"
- = link_to 'Relegate', team_project_path(@team, project), confirm: 'Remove project from team and move to global namespace. Are you sure?', method: :delete, class: "btn btn-remove small"
- .form-holder
- = form_tag team_projects_path(@team), id: "assign_projects", class: "bulk_import", method: :post do
- %table.headless
- %tr
- %td= select_tag :project_ids, options_from_collection_for_select(@avaliable_projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span4'
- %td= select_tag :greatest_project_access, options_for_select(UserTeam.access_roles), {class: "project-access-select chosen" }
- %td= submit_tag 'Add Project', class: "btn btn-create", id: :assign_projects_to_team
-
-
- .tab-pane#tab-edit
- .ui-box
- %h5.title Edit Team
- %div.form-holder
- = form_for @team, url: team_path(@team) do |f|
- - if @team.errors.any?
- .alert.alert-error
- %span= @team.errors.full_messages.first
- .clearfix
- = f.label :name do
- Team name is
- .input
- = f.text_field :name, placeholder: "Ex. OpenSource", class: "xlarge left"
-
- .clearfix.team-description-holder
- = f.label :description, "Details"
- .input
- = f.text_area :description, maxlength: 250, class: "xlarge js-gfm-input", rows: 4
-
- .clearfix
- = f.label :path do
- Team path is
- .input
- = f.text_field :path, placeholder: "opensource", class: "xlarge left"
-
- .form-actions
- = f.submit 'Save team changes', class: "btn btn-primary"
-
- .tab-pane#tab-remove
- .ui-box.ui-box-danger
- %h5.title Remove team
- .ui-box-body
- %p
- Remove of team will cause removing members access to projects.
- %p
- %strong Removed team can not be restored!
-
- = link_to 'Remove team', team_path(@team), method: :delete, confirm: "You are sure?", class: "btn btn-remove btn-small"
diff --git a/app/views/teams/issues.html.haml b/app/views/teams/issues.html.haml
deleted file mode 100644
index 5b17c5d4..00000000
--- a/app/views/teams/issues.html.haml
+++ /dev/null
@@ -1,23 +0,0 @@
-%h3.page_title
- Issues
- %small (in Team projects assigned to Team members)
- %small.pull-right #{@issues.total_count} issues
-
-%hr
-.row
- .span3
- = render 'filter', entity: 'issue'
- .span9
- - if @issues.any?
- - @issues.group_by(&:project).each do |group|
- %div.ui-box
- - @project = group[0]
- %h5.title
- = link_to_project @project
- %ul.well-list.issues_table
- - group[1].each do |issue|
- = render issue
- %hr
- = paginate @issues, theme: "gitlab"
- - else
- %p.nothing_here_message Nothing to show here
diff --git a/app/views/teams/members/_form.html.haml b/app/views/teams/members/_form.html.haml
deleted file mode 100644
index c22ee783..00000000
--- a/app/views/teams/members/_form.html.haml
+++ /dev/null
@@ -1,20 +0,0 @@
-= form_tag admin_team_member_path(@team, @member), method: :put do
- -if @member.errors.any?
- .alert.alert-error
- %ul
- - @member.errors.full_messages.each do |msg|
- %li= msg
-
- .clearfix
- %label Default access for Team projects:
- .input
- = select_tag :default_project_access, options_for_select(UserTeam.access_roles, @team.default_projects_access(@member)), class: "project-access-select chosen span3"
- .clearfix
- %label Team admin?
- .input
- = check_box_tag :group_admin, true, @team.admin?(@member)
-
- %br
- .actions
- = submit_tag 'Save', class: "btn btn-save"
- = link_to 'Cancel', :back, class: "btn"
diff --git a/app/views/teams/members/_show.html.haml b/app/views/teams/members/_show.html.haml
deleted file mode 100644
index 1a323043..00000000
--- a/app/views/teams/members/_show.html.haml
+++ /dev/null
@@ -1,30 +0,0 @@
-- user = member.user
-- allow_admin = can? current_user, :manage_user_team, @team
-%li{id: dom_id(member), class: "team_member_row user_#{user.id}"}
- .row
- .span5
- = link_to user_path(user.username), title: user.name, class: "dark" do
- = image_tag gravatar_icon(user.email, 40), class: "avatar s32"
- = link_to user_path(user.username), title: user.name, class: "dark" do
- %strong= truncate(user.name, lenght: 40)
- %br
- %small.cgray= user.username
-
- .span4
- - if allow_admin
- = form_for(member, as: :team_member, url: team_member_path(@team, user)) do |f|
- = f.select :permission, options_for_select(UsersProject.access_roles, @team.default_projects_access(user)), {}, class: "medium trigger-submit"
- %br
- = label_tag do
- = f.check_box :group_admin, class: 'trigger-submit'
- %span Admin access
- .pull-right
- - if current_user == user
- %span.btn.disabled This is you!
- - if @team.owner == user
- %span.btn.disabled Owner
- - elsif user.blocked?
- %span.btn.disabled.blocked Blocked
- - elsif allow_admin
- = link_to team_member_path(@team, user), confirm: remove_from_user_team_message(@team, user), method: :delete, class: "btn-tiny btn btn-remove", title: "Remove from team" do
- %i.icon-minus.icon-white
diff --git a/app/views/teams/members/_team.html.haml b/app/views/teams/members/_team.html.haml
deleted file mode 100644
index d8afc1fa..00000000
--- a/app/views/teams/members/_team.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-- grouped_user_team_members(@team).each do |access, members|
- .ui-box
- %h5.title
- = Project.access_options.key(access).pluralize
- %small= members.size
- %ul.well-list
- - members.sort_by(&:user_name).each do |up|
- = render(partial: 'teams/members/show', locals: {member: up})
-
-
-:javascript
- $(function(){
- $('.repo-access-select, .project-access-select').live("change", function() {
- $(this.form).submit();
- });
- })
diff --git a/app/views/teams/members/edit.html.haml b/app/views/teams/members/edit.html.haml
deleted file mode 100644
index 37588049..00000000
--- a/app/views/teams/members/edit.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-%h3.page_title
- Edit access #{@member.name} in #{@team.name} team
-
-%hr
-%table.zebra-striped
- %tr
- %td User:
- %td= @member.name
- %tr
- %td Team:
- %td= @team.name
- %tr
- %td Since:
- %td= member_since(@team, @member).stamp("Nov 11, 2010")
-
-= render 'form'
diff --git a/app/views/teams/members/index.html.haml b/app/views/teams/members/index.html.haml
deleted file mode 100644
index 87438266..00000000
--- a/app/views/teams/members/index.html.haml
+++ /dev/null
@@ -1,17 +0,0 @@
-%h3.page_title
- Team Members
- (#{@members.count})
- %small
- Read more about project permissions
- %strong= link_to "here", help_permissions_path, class: "vlink"
-
- - if can? current_user, :manage_user_team, @team
- %span.pull-right
- = link_to new_team_member_path(@team), class: "btn btn-primary small grouped", title: "New Team Member" do
- New Team Member
-%hr
-
-
-.clearfix
-%div.team-table
- = render partial: "teams/members/team", locals: {project: @team}
diff --git a/app/views/teams/members/new.html.haml b/app/views/teams/members/new.html.haml
deleted file mode 100644
index 9b9b3cef..00000000
--- a/app/views/teams/members/new.html.haml
+++ /dev/null
@@ -1,29 +0,0 @@
-%h3.page_title
- Team: #{@team.name}
-
-%fieldset
- %legend Members (#{@team.members.count})
- = form_tag team_members_path(@team), id: "team_members", class: "bulk_import", method: :post do
- %table#members_list
- %thead
- %tr
- %th User name
- %th Default project access
- %th Team access
- %th
- - @team.members.each do |member|
- %tr.member
- %td
- = member.name
- %small= "(#{member.username})"
- %td= @team.human_default_projects_access(member)
- %td= @team.admin?(member) ? "Admin" : "Member"
- %td
- %tr
- %td
- = users_select_tag(:user_ids, multiple: true)
- %td= select_tag :default_project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3" }
- %td
- %span= check_box_tag :group_admin
- %span Admin?
- %td= submit_tag 'Add User', class: "btn btn-create", id: :add_members_to_team
diff --git a/app/views/teams/merge_requests.html.haml b/app/views/teams/merge_requests.html.haml
deleted file mode 100644
index 417d1aa6..00000000
--- a/app/views/teams/merge_requests.html.haml
+++ /dev/null
@@ -1,24 +0,0 @@
-%h3.page_title
- Merge Requests
- %small (authored by or assigned to Team members)
- %small.pull-right #{@merge_requests.total_count} merge requests
-
-%hr
-.row
- .span3
- = render 'filter', entity: 'merge_request'
- .span9
- - if @merge_requests.any?
- - @merge_requests.group_by(&:project).each do |group|
- .ui-box
- - @project = group[0]
- %h5.title
- = link_to_project @project
- %ul.well-list
- - group[1].each do |merge_request|
- = render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request})
- %hr
- = paginate @merge_requests, theme: "gitlab"
-
- - else
- %h3.nothing_here_message Nothing to show here
diff --git a/app/views/teams/new.html.haml b/app/views/teams/new.html.haml
deleted file mode 100644
index 99d30821..00000000
--- a/app/views/teams/new.html.haml
+++ /dev/null
@@ -1,39 +0,0 @@
-%h3.page_title New Team
-%hr
-= form_for @team, url: teams_path do |f|
- - if @team.errors.any?
- .alert.alert-error
- %span= @team.errors.full_messages.first
- .clearfix
- = f.label :name do
- Team name is
- .input
- = f.text_field :name, placeholder: "Ex. Ruby Developers", class: "xxlarge left"
-
- .clearfix.team-description-holder
- = f.label :description, "Details"
- .input
- = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
-
- .form-actions
- = f.submit 'Create team', class: "btn btn-create"
-
- .padded
- %ul
- %li All created teams are public (users can view who enter into team and which project are assigned for this team)
- %li People within a team see only projects they have access to
- %li You will be able to assign existing projects for team
- %hr
-
- - if current_user.can_create_group?
- .clearfix
- .input.light
- Need a group for several dependent projects?
- = link_to new_group_path, class: "btn btn-tiny" do
- Create a group
- - if current_user.can_create_project?
- .clearfix
- .input.light
- Want to create a project?
- = link_to new_project_path, class: "btn btn-tiny" do
- Create a project
diff --git a/app/views/teams/projects/_form.html.haml b/app/views/teams/projects/_form.html.haml
deleted file mode 100644
index d2c89b0c..00000000
--- a/app/views/teams/projects/_form.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-= form_tag team_project_path(@team, @project), method: :put do
- -if @project.errors.any?
- .alert.alert-error
- %ul
- - @project.errors.full_messages.each do |msg|
- %li= msg
-
- .clearfix
- %label Max access for Team members:
- .input
- = select_tag :greatest_project_access, options_for_select(UserTeam.access_roles, @team.max_project_access(@project)), class: "project-access-select chosen span3"
-
- %br
- .actions
- = submit_tag 'Save', class: "btn btn-save"
- = link_to 'Cancel', :back, class: "btn btn-cancel"
diff --git a/app/views/teams/projects/edit.html.haml b/app/views/teams/projects/edit.html.haml
deleted file mode 100644
index 82c7d734..00000000
--- a/app/views/teams/projects/edit.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-%h3.page_title
- Edit max access in #{link_to @project.name_with_namespace, @project} for #{link_to(@team.name, team_path(@team))} team
-
-%hr
-
-= render 'form'
diff --git a/app/views/teams/show.atom.builder b/app/views/teams/show.atom.builder
deleted file mode 100644
index bb0f666e..00000000
--- a/app/views/teams/show.atom.builder
+++ /dev/null
@@ -1,29 +0,0 @@
-xml.instruct!
-xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
- xml.title "Team feed - #{@team.name}"
- xml.link :href => team_url(@team, :atom), :rel => "self", :type => "application/atom+xml"
- xml.link :href => team_url(@team), :rel => "alternate", :type => "text/html"
- xml.id projects_url
- xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any?
-
- @events.each do |event|
- if event.proper?
- event = EventDecorator.decorate(event)
- xml.entry do
- event_link = event.feed_url
- event_title = event.feed_title
-
- xml.id "tag:#{request.host},#{event.created_at.strftime("%Y-%m-%d")}:#{event.id}"
- xml.link :href => event_link
- xml.title truncate(event_title, :length => 80)
- xml.updated event.created_at.strftime("%Y-%m-%dT%H:%M:%SZ")
- xml.media :thumbnail, :width => "40", :height => "40", :url => gravatar_icon(event.author_email)
- xml.author do |author|
- xml.name event.author_name
- xml.email event.author_email
- end
- xml.summary event_title
- end
- end
- end
-end
diff --git a/app/views/teams/show.html.haml b/app/views/teams/show.html.haml
deleted file mode 100644
index 2eb0283e..00000000
--- a/app/views/teams/show.html.haml
+++ /dev/null
@@ -1,31 +0,0 @@
-.projects
- .activities.span8
- = link_to dashboard_path, class: 'btn btn-tiny' do
- ← To dashboard
-
- %span.cgray Events and projects are filtered in scope of team
- %hr
- - if @events.any?
- .content_list
- - else
- %p.nothing_here_message Projects activity will be displayed here
- .loading.hide
- .side.span4
- - if @team.description.present?
- .description.well.light
- = @team.description
- = render "projects", projects: @projects
- .prepend-top-20
- = link_to team_path(@team, { format: :atom, private_token: current_user.private_token }), title: "Feed" do
- %strong
- %i.icon-rss
- News Feed
-
- %hr
- .gitlab-promo
- = link_to "Homepage", "http://gitlabhq.com"
- = link_to "Blog", "http://blog.gitlabhq.com"
- = link_to "@gitlabhq", "https://twitter.com/gitlabhq"
-
-:javascript
- $(function(){ Pager.init(20, true); });
diff --git a/app/views/teams/show.js.haml b/app/views/teams/show.js.haml
deleted file mode 100644
index 7e5a148e..00000000
--- a/app/views/teams/show.js.haml
+++ /dev/null
@@ -1,2 +0,0 @@
-:plain
- Pager.append(#{@events.count}, "#{escape_javascript(render(@events))}");
diff --git a/app/views/tree/_blob_actions.html.haml b/app/views/tree/_blob_actions.html.haml
index 1d55a4ff..21334ea1 100644
--- a/app/views/tree/_blob_actions.html.haml
+++ b/app/views/tree/_blob_actions.html.haml
@@ -1,12 +1,12 @@
.btn-group.tree-btn-group
-# only show edit link for text files
- if @tree.text?
- = link_to "edit", project_edit_tree_path(@project, @id), class: "btn btn-tiny", disabled: !allowed_tree_edit?
- = link_to "raw", project_blob_path(@project, @id), class: "btn btn-tiny", target: "_blank"
+ = link_to "edit", edit_project_tree_path(@project, @id), class: "btn very_small", disabled: !allowed_tree_edit?
+ = link_to "raw", project_blob_path(@project, @id), class: "btn very_small", target: "_blank"
-# only show normal/blame view links for text files
- if @tree.text?
- if current_page? project_blame_path(@project, @id)
- = link_to "normal view", project_tree_path(@project, @id), class: "btn btn-tiny"
+ = link_to "normal view", project_tree_path(@project, @id), class: "btn very_small"
- else
- = link_to "blame", project_blame_path(@project, @id), class: "btn btn-tiny"
- = link_to "history", project_commits_path(@project, @id), class: "btn btn-tiny"
+ = link_to "blame", project_blame_path(@project, @id), class: "btn very_small"
+ = link_to "history", project_commits_path(@project, @id), class: "btn very_small"
diff --git a/app/views/tree/_head.html.haml b/app/views/tree/_head.html.haml
new file mode 100644
index 00000000..f14526cf
--- /dev/null
+++ b/app/views/tree/_head.html.haml
@@ -0,0 +1,7 @@
+%ul.nav.nav-tabs
+ %li
+ = render partial: 'shared/ref_switcher', locals: {destination: 'tree', path: @path}
+ = nav_link(controller: :tree) do
+ = link_to 'Source', project_tree_path(@project, @ref)
+ %li.right
+ = render "shared/clone_panel"
diff --git a/app/views/tree/_tree.html.haml b/app/views/tree/_tree.html.haml
index caab6e45..c2842959 100644
--- a/app/views/tree/_tree.html.haml
+++ b/app/views/tree/_tree.html.haml
@@ -1,9 +1,9 @@
%ul.breadcrumb
%li
- %i.icon-angle-right
+ %span.arrow
= link_to project_tree_path(@project, @ref) do
- = @project.path
- - tree_breadcrumbs(tree, 6) do |title, path|
+ = @project.name
+ - tree.breadcrumbs(6) do |title, path|
\/
%li
- if path
@@ -11,6 +11,9 @@
- else
= link_to title, '#'
+.clear
+%div.tree_progress
+
%div#tree-content-holder.tree-content-holder
- if tree.is_blob?
= render "tree/blob", blob: tree
@@ -21,13 +24,13 @@
%th Name
%th Last Update
%th Last Commit
- %th= link_to "history", project_commits_path(@project, @id), class: "btn btn-tiny pull-right"
+ %th= link_to "history", project_commits_path(@project, @id), class: "btn very_small right"
- if tree.up_dir?
%tr.tree-item
%td.tree-item-file-name
= image_tag "file_empty.png", size: '16x16'
- = link_to "..", project_tree_path(@project, up_dir_path(tree))
+ = link_to "..", project_tree_path(@project, tree.up_dir_path)
%td
%td
%td
@@ -37,8 +40,6 @@
- if tree.readme
= render "tree/readme", readme: tree.readme
-%div.tree_progress
-
- unless tree.is_blob?
:javascript
// Load last commit log for each file in tree
diff --git a/app/views/tree/_tree_commit_column.html.haml b/app/views/tree/_tree_commit_column.html.haml
index 7ae2582c..9d02132b 100644
--- a/app/views/tree/_tree_commit_column.html.haml
+++ b/app/views/tree/_tree_commit_column.html.haml
@@ -1,2 +1,2 @@
-%span.tree_author= commit_author_link(commit, avatar: true)
+%span.tree_author= commit.author_link avatar: true
= link_to_gfm truncate(commit.title, length: 80), project_commit_path(@project, commit.id), class: "tree-commit-link"
diff --git a/app/views/edit_tree/show.html.haml b/app/views/tree/edit.html.haml
similarity index 86%
rename from app/views/edit_tree/show.html.haml
rename to app/views/tree/edit.html.haml
index 211396ba..adee68a0 100644
--- a/app/views/edit_tree/show.html.haml
+++ b/app/views/tree/edit.html.haml
@@ -1,5 +1,5 @@
.file-editor
- = form_tag(project_edit_tree_path(@project, @id), method: :put, class: "form-horizontal") do
+ = form_tag(project_tree_path(@project, @id), method: :put, class: "form-horizontal") do
.file_holder
.file_title
%i.icon-file
@@ -10,7 +10,7 @@
%strong= @ref
%span.options
.btn-group.tree-btn-group
- = link_to "Cancel", project_tree_path(@project, @id), class: "btn btn-tiny btn-cancel", confirm: "Are you sure?"
+ = link_to "Cancel", project_tree_path(@project, @id), class: "btn very_small cancel-btn", confirm: "Are you sure?"
.file_content.code
%pre#editor= @tree.data
@@ -27,7 +27,7 @@
.message
to branch
%strong= @ref
- = link_to "Cancel", project_tree_path(@project, @id), class: "btn btn-cancel", confirm: "Are you sure?"
+ = link_to "Cancel", project_tree_path(@project, @id), class: "btn cancel-btn", confirm: "Are you sure?"
:javascript
var ace_mode = "#{@tree.language.try(:ace_mode)}";
diff --git a/app/views/tree/show.html.haml b/app/views/tree/show.html.haml
index 0f7692ab..a4034f22 100644
--- a/app/views/tree/show.html.haml
+++ b/app/views/tree/show.html.haml
@@ -1,4 +1,3 @@
-%div.tree-ref-holder
- = render 'shared/ref_switcher', destination: 'tree', path: @path
+= render "head"
%div#tree-holder.tree-holder
= render "tree", tree: @tree
diff --git a/app/views/tree/show.js.haml b/app/views/tree/show.js.haml
index a01d4917..fadd5e22 100644
--- a/app/views/tree/show.js.haml
+++ b/app/views/tree/show.js.haml
@@ -1,7 +1,7 @@
:plain
// Load Files list
$("#tree-holder").html("#{escape_javascript(render(partial: "tree", locals: {tree: @tree}))}");
- $("#tree-content-holder").show("slide", { direction: "right" }, 400);
+ $("#tree-content-holder").show("slide", { direction: "right" }, 150);
$('.project-refs-form #path').val("#{@path}");
// Load last commit log for each file in tree
diff --git a/app/views/users/_profile.html.haml b/app/views/users/_profile.html.haml
deleted file mode 100644
index fba3660b..00000000
--- a/app/views/users/_profile.html.haml
+++ /dev/null
@@ -1,23 +0,0 @@
-.ui-box
- %h5.title
- Profile
- %ul.well-list
- %li
- %span.light Member since
- %strong= user.created_at.stamp("Aug 21, 2011")
- - unless user.skype.blank?
- %li
- %span.light Skype:
- %strong= user.skype
- - unless user.linkedin.blank?
- %li
- %span.light LinkedIn:
- %strong= user.linkedin
- - unless user.twitter.blank?
- %li
- %span.light Twitter:
- %strong= user.twitter
- - unless user.bio.blank?
- %li
- %span.light Bio:
- %span= user.bio
diff --git a/app/views/users/_projects.html.haml b/app/views/users/_projects.html.haml
deleted file mode 100644
index 4bee2f0c..00000000
--- a/app/views/users/_projects.html.haml
+++ /dev/null
@@ -1,20 +0,0 @@
-.ui-box
- %h5.title Projects
- %ul.well-list
- - @projects.each do |project|
- %li
- = link_to project_path(project), class: dom_class(project) do
- - if project.namespace
- = project.namespace.human_name
- \/
- %strong.well-title
- = truncate(project.name, length: 45)
- %span.pull-right.light
- - if project.owner == user
- %i.icon-wrench
- - tm = project.team.get_tm(user.id)
- - if tm
- = tm.project_access_human
-%p.light
- %i.icon-wrench
- – user is a project owner
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
deleted file mode 100644
index 10bd90b1..00000000
--- a/app/views/users/show.html.haml
+++ /dev/null
@@ -1,21 +0,0 @@
-.row
- .span8
- %h3.page_title
- = image_tag gravatar_icon(@user.email, 90), class: "avatar s90"
- = @user.name
- - if @user == current_user
- .pull-right
- = link_to profile_path, class: 'btn btn-small' do
- %i.icon-edit
- Edit Profile
- %br
- %small #{@user.username}
- %br
- %small member since #{@user.created_at.stamp("Nov 12, 2031")}
- .clearfix
- %hr
- %h5 Recent events
- = render @events
- .span4
- = render 'profile', user: @user
- = render 'projects', user: @user
diff --git a/app/views/walls/show.html.haml b/app/views/walls/show.html.haml
deleted file mode 100644
index 139e66f5..00000000
--- a/app/views/walls/show.html.haml
+++ /dev/null
@@ -1,28 +0,0 @@
-%div.wall-page
- %ul.notes
-
- - if can? current_user, :write_note, @project
- .note-form-holder
- = form_for [@project, @note], remote: true, html: { multipart: true, id: nil, class: "new_note wall-note-form" } do |f|
- = note_target_fields
- .note_text_and_preview
- = f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input turn-on'
- .note-form-actions
- .buttons
- = f.submit 'Add Comment', class: "btn comment-btn grouped js-comment-button"
-
- .note-form-option
- %a.choose-btn.btn.btn-small.js-choose-note-attachment-button
- %i.icon-paper-clip
- %span Choose File ...
-
- %span.file_name.js-attachment-filename File name...
- = f.file_field :attachment, class: "js-note-attachment-input hide"
-
- .hint.pull-right CTRL + Enter to send message
- .clearfix
-
-:javascript
- $(function(){
- Wall.init(#{@project.id});
- });
diff --git a/app/views/wikis/_form.html.haml b/app/views/wikis/_form.html.haml
index 7cf08815..9eb2a571 100644
--- a/app/views/wikis/_form.html.haml
+++ b/app/views/wikis/_form.html.haml
@@ -8,12 +8,9 @@
.ui-box.ui-box-show
.ui-box-head
- %h3.page_title
- .edit-wiki-header
- = @wiki.title.titleize
- = f.hidden_field :title, value: @wiki.title
- = f.select :format, options_for_select(GollumWiki::MARKUPS, {selected: @wiki.format}), {}, class: "pull-right input-medium"
- = f.label :format, class: "pull-right", style: "padding-right: 20px;"
+ = f.label :title
+ .input= f.text_field :title, class: 'span8'
+ = f.hidden_field :slug
.ui-box-body
.input
%span.cgray
@@ -25,12 +22,6 @@
.ui-box-bottom
= f.label :content
.input= f.text_area :content, class: 'span8 js-gfm-input'
- .ui-box-bottom
- = f.label :commit_message
- .input= f.text_field :message, class: 'span8'
.actions
- = f.submit 'Save', class: "btn-save btn"
- - if @wiki && @wiki.persisted?
- = link_to "Cancel", project_wiki_path(@project, @wiki), class: "btn btn-cancel"
- - else
- = link_to "Cancel", project_wiki_path(@project, :home), class: "btn btn-cancel"
+ = f.submit 'Save', class: "save-btn btn"
+ = link_to "Cancel", project_wiki_path(@project, :index), class: "btn cancel-btn"
diff --git a/app/views/wikis/_main_links.html.haml b/app/views/wikis/_main_links.html.haml
deleted file mode 100644
index cb8ccf81..00000000
--- a/app/views/wikis/_main_links.html.haml
+++ /dev/null
@@ -1,8 +0,0 @@
-%span.pull-right
- - if (@wiki && @wiki.persisted?)
- = link_to history_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do
- Page History
- - if can?(current_user, :write_wiki, @project)
- = link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do
- %i.icon-edit
- Edit
diff --git a/app/views/wikis/_nav.html.haml b/app/views/wikis/_nav.html.haml
deleted file mode 100644
index 0dffdd8f..00000000
--- a/app/views/wikis/_nav.html.haml
+++ /dev/null
@@ -1,19 +0,0 @@
-%ul.nav.nav-tabs
- = nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do
- = link_to 'Home', project_wiki_path(@project, :home)
-
- = nav_link(path: 'wikis#pages') do
- = link_to 'Pages', pages_project_wikis_path(@project)
-
- = nav_link(path: 'wikis#git_access') do
- = link_to git_access_project_wikis_path(@project) do
- %i.icon-download-alt
- Git Access
-
- - if can?(current_user, :write_wiki, @project)
- %li.pull-right
- = link_to '#', class: "add-new-wiki" do
- %i.icon-plus
- New Page
-
-= render 'wikis/new'
diff --git a/app/views/wikis/_new.html.haml b/app/views/wikis/_new.html.haml
deleted file mode 100644
index 50b40bff..00000000
--- a/app/views/wikis/_new.html.haml
+++ /dev/null
@@ -1,25 +0,0 @@
-%div#modal-new-wiki.modal.hide
- .modal-header
- %a.close{href: "#"} ×
- %h3 New Wiki Page
- .modal-body
- = label_tag :new_wiki_path do
- %span Page slug
- = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'input-xlarge'
- .modal-footer
- = link_to 'Build', '#', class: 'build-new-wiki btn btn-create'
-
-:javascript
- $(function(){
- var modal = $('#modal-new-wiki').modal({modal: true, show:false});
- $('.add-new-wiki').bind("click", function(){
- modal.show();
- });
- $('.build-new-wiki').bind("click", function(){
- location.href = "#{project_wikis_path(@project)}/" + $('#new_wiki_path').val();
- });
- $('.modal-header .close').bind("click", function(){
- modal.hide();
- })
- })
-
diff --git a/app/views/wikis/edit.html.haml b/app/views/wikis/edit.html.haml
index 7441ceff..8f6b457f 100644
--- a/app/views/wikis/edit.html.haml
+++ b/app/views/wikis/edit.html.haml
@@ -1,10 +1,8 @@
-= render 'wikis/nav'
-%h3.page_title
- Editing page
- = render partial: 'main_links'
+%h3.page_title Editing page
+%hr
= render 'form'
-.pull-right
- - if @wiki.persisted? && can?(current_user, :admin_wiki, @project)
- = link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete, class: "btn btn-small btn-remove" do
- Delete this page
+.right
+ - if can? current_user, :admin_wiki, @project
+ = link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete, class: "btn small danger" do
+ Delete this page
\ No newline at end of file
diff --git a/app/views/wikis/git_access.html.haml b/app/views/wikis/git_access.html.haml
deleted file mode 100644
index 58c8aa06..00000000
--- a/app/views/wikis/git_access.html.haml
+++ /dev/null
@@ -1,37 +0,0 @@
-= render 'wikis/nav'
-%h3.page_title
- Git Access
- %strong= @gollum_wiki.path_with_namespace
- = render partial: 'main_links'
-
-%br
-.content
- .project_clone_panel
- .row
- .span7
- .form-horizontal
- .input-prepend.project_clone_holder
- %button{class: "btn active", :"data-clone" => @gollum_wiki.ssh_url_to_repo} SSH
- %button{class: "btn", :"data-clone" => @gollum_wiki.http_url_to_repo}= Gitlab.config.gitlab.protocol.upcase
- = text_field_tag :project_clone, @gollum_wiki.url_to_repo, class: "one_click_select input-xxlarge", readonly: true
- .git-empty
- %fieldset
- %legend Install Gollum:
- %pre.dark
- :preserve
- gem install gollum
-
- %legend Clone Your Wiki:
- %pre.dark
- :preserve
- git clone #{@gollum_wiki.path_with_namespace}.git
- cd #{@gollum_wiki.path_with_namespace}
-
- %legend Start Gollum And Edit Locally:
- %pre.dark
- :preserve
- gollum
- == Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin
- >> Thin web server (v1.5.0 codename Knife)
- >> Maximum connections set to 1024
- >> Listening on 0.0.0.0:4567, CTRL+C to stop
diff --git a/app/views/wikis/history.html.haml b/app/views/wikis/history.html.haml
index f4946ed0..18df8e1d 100644
--- a/app/views/wikis/history.html.haml
+++ b/app/views/wikis/history.html.haml
@@ -1,31 +1,23 @@
-= render 'wikis/nav'
%h3.page_title
- %span.light History for
- = @wiki.title.titleize
- = render partial: 'main_links'
+ %span.cgray History for
+ = @wiki_pages.first.title
%br
%table
%thead
%tr
%th Page version
- %th Author
- %th Commit Message
%th Last updated
- %th Format
+ %th Updated by
%tbody
- - @wiki.versions.each do |version|
- - commit = version
+ - @wiki_pages.each_with_index do |wiki_page, i|
%tr
- %td
- = link_to project_wiki_path(@project, @wiki, version_id: commit.id) do
- = commit.short_id
- %td
- = commit_author_link(commit, avatar: true, size: 24)
- %td
- = commit.title
- %td
- = time_ago_in_words(version.date)
- ago
%td
%strong
- = @wiki.page.wiki.page(@wiki.page.name, commit.id).try(:format)
+ = link_to project_wiki_path(@project, wiki_page, version_id: wiki_page.id) do
+ Version
+ = @wiki_pages.count - i
+ %td
+ = wiki_page.created_at.to_s(:short)
+ (#{time_ago_in_words(wiki_page.created_at)}
+ ago)
+ %td= link_to_member(@project, wiki_page.user)
diff --git a/app/views/wikis/pages.html.haml b/app/views/wikis/pages.html.haml
index 95d5eef1..2e0f091c 100644
--- a/app/views/wikis/pages.html.haml
+++ b/app/views/wikis/pages.html.haml
@@ -1,25 +1,20 @@
-= render 'wikis/nav'
-%h3.page_title
- All Pages
- = render partial: 'main_links'
+%h3.page_title All Pages
%br
%table
%thead
%tr
%th Title
- %th Format
+ %th Slug
%th Last updated
%th Updated by
%tbody
- @wiki_pages.each do |wiki_page|
%tr
%td
- %strong= link_to wiki_page.title.titleize, project_wiki_path(@project, wiki_page)
- %td
- %strong= wiki_page.format
+ %strong= link_to wiki_page.title, project_wiki_path(@project, wiki_page)
+ %td= wiki_page.slug
%td
= wiki_page.created_at.to_s(:short) do
(#{time_ago_in_words(wiki_page.created_at)}
ago)
- %td
- = commit_author_link(wiki_page.version, avatar: true, size: 24)
+ %td= link_to_member(@project, wiki_page.user)
diff --git a/app/views/wikis/show.html.haml b/app/views/wikis/show.html.haml
index b237bc52..d3bd58bb 100644
--- a/app/views/wikis/show.html.haml
+++ b/app/views/wikis/show.html.haml
@@ -1,9 +1,16 @@
-= render 'wikis/nav'
%h3.page_title
- = @wiki.title.titleize
- = render partial: 'main_links'
+ = @wiki.title
+ %span.right
+ = link_to pages_project_wikis_path(@project), class: "btn small grouped" do
+ Pages
+ - if can? current_user, :write_wiki, @project
+ = link_to history_project_wiki_path(@project, @wiki), class: "btn small grouped" do
+ History
+ = link_to edit_project_wiki_path(@project, @wiki), class: "btn small grouped" do
+ %i.icon-edit
+ Edit
%br
-- if @wiki.historical?
+- if @wiki != @most_recent_wiki
.warning_message
This is an old version of this page.
You can view the #{link_to "most recent version", project_wiki_path(@project, @wiki)} or browse the #{link_to "history", history_project_wiki_path(@project, @wiki)}.
@@ -11,6 +18,6 @@
.file_holder
.file_content.wiki
= preserve do
- = render_wiki_content(@wiki)
+ = markdown @wiki.content
-%p.time Last edited by #{commit_author_link(@wiki.version, avatar: true, size: 16)} #{time_ago_in_words @wiki.created_at} ago
+%p.time Last edited by #{link_to_member @project, @wiki.user}, #{time_ago_in_words @wiki.created_at} ago
diff --git a/app/workers/gitlab_shell_worker.rb b/app/workers/gitlab_shell_worker.rb
deleted file mode 100644
index cfeda88b..00000000
--- a/app/workers/gitlab_shell_worker.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-class GitlabShellWorker
- include Sidekiq::Worker
- include Gitlab::ShellAdapter
-
- sidekiq_options queue: :gitlab_shell
-
- def perform(action, *arg)
- gitlab_shell.send(action, *arg)
- end
-end
diff --git a/app/workers/post_receive.rb b/app/workers/post_receive.rb
index 72cef0fd..e74379a6 100644
--- a/app/workers/post_receive.rb
+++ b/app/workers/post_receive.rb
@@ -4,44 +4,24 @@ class PostReceive
sidekiq_options queue: :post_receive
def perform(repo_path, oldrev, newrev, ref, identifier)
-
- if repo_path.start_with?(Gitlab.config.gitlab_shell.repos_path.to_s)
- repo_path.gsub!(Gitlab.config.gitlab_shell.repos_path.to_s, "")
- else
- Gitlab::GitLogger.error("POST-RECEIVE: Check gitlab.yml config for correct gitlab_shell.repos_path variable. \"#{Gitlab.config.gitlab_shell.repos_path}\" does not match \"#{repo_path}\"")
- end
-
+ repo_path.gsub!(Gitlab.config.gitolite.repos_path.to_s, "")
repo_path.gsub!(/.git$/, "")
repo_path.gsub!(/^\//, "")
project = Project.find_with_namespace(repo_path)
+ return false if project.nil?
- if project.nil?
- Gitlab::GitLogger.error("POST-RECEIVE: Triggered hook for non-existing project with full path \"#{repo_path} \"")
- return false
+ # Ignore push from non-gitlab users
+ user = if identifier.eql? Gitlab.config.gitolite.admin_key
+ email = project.repository.commit(newrev).author.email rescue nil
+ User.find_by_email(email) if email
+ elsif /^[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}$/.match(identifier)
+ User.find_by_email(identifier)
+ else
+ Key.find_by_identifier(identifier).try(:user)
end
+ return false unless user
- user = if identifier.blank?
- # Local push from gitlab
- email = project.repository.commit(newrev).author.email rescue nil
- User.find_by_email(email) if email
-
- elsif identifier =~ /\Auser-\d+\Z/
- # git push over http
- user_id = identifier.gsub("user-", "")
- User.find_by_id(user_id)
-
- elsif identifier =~ /\Akey-\d+\Z/
- # git push over ssh
- key_id = identifier.gsub("key-", "")
- Key.find_by_id(key_id).try(:user)
- end
-
- unless user
- Gitlab::GitLogger.error("POST-RECEIVE: Triggered hook for non-existing user \"#{identifier} \"")
- return false
- end
-
- GitPushService.new.execute(project, user, oldrev, newrev, ref)
+ project.trigger_post_receive(oldrev, newrev, ref, user)
end
end
diff --git a/app/workers/project_web_hook_worker.rb b/app/workers/project_web_hook_worker.rb
deleted file mode 100644
index 9f9b9b1d..00000000
--- a/app/workers/project_web_hook_worker.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class ProjectWebHookWorker
- include Sidekiq::Worker
-
- sidekiq_options queue: :project_web_hook
-
- def perform(hook_id, data)
- WebHook.find(hook_id).execute data
- end
-end
diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql
index 4a4aa346..0e873d2b 100644
--- a/config/database.yml.postgresql
+++ b/config/database.yml.postgresql
@@ -6,7 +6,7 @@ production:
encoding: unicode
database: gitlabhq_production
pool: 5
- username: git
+ username: postgres
password:
# host: localhost
# port: 5432
diff --git a/config/deploy.rb.example b/config/deploy.rb.example
deleted file mode 100644
index ddce4671..00000000
--- a/config/deploy.rb.example
+++ /dev/null
@@ -1,72 +0,0 @@
-set :domain, 'set application domain here'
-set :db_adapter, 'mysql' # or postgres
-set :mount_point, '/'
-set :application, 'gitlabhq'
-set :user, 'git'
-set :rails_env, 'production'
-set :deploy_to, "/home/#{user}/apps/#{application}"
-set :bundle_without, %w[development test] + (%w[mysql postgres] - [db_adapter])
-set :asset_env, "RAILS_GROUPS=assets RAILS_RELATIVE_URL_ROOT=#{mount_point.sub /\/+\Z/, ''}"
-
-set :use_sudo, false
-default_run_options[:pty] = true
-
-# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
-set :scm, :git
-set :repository, "git@#{domain}:#{application}.git"
-set :deploy_via, :remote_cache
-
-# Alternatively, you can deploy via copy, if you don't have gitlab in git
-#set :scm, :none
-#set :repository, '.'
-#set :deploy_via, :copy
-
-server domain, :app, :web, :db, primary: true
-
-namespace :foreman do
- desc 'Export the Procfile to Ubuntu upstart scripts'
- task :export, roles: :app do
- foreman_export = "foreman export upstart /etc/init -f Procfile -a #{application} -u #{user} -l #{shared_path}/log/foreman"
- run "cd #{release_path} && #{sudo} #{fetch :bundle_cmd, 'bundle'} exec #{foreman_export}"
- end
-
- desc 'Start the application services'
- task :start, roles: :app do
- run "#{sudo} service #{application} start"
- end
-
- desc 'Stop the application services'
- task :stop, roles: :app do
- run "#{sudo} service #{application} stop"
- end
-
- desc 'Restart the application services'
- task :restart, roles: :app do
- run "#{sudo} service #{application} restart"
- end
-end
-
-namespace :deploy do
- desc 'Start the application services'
- task :start, roles: :app do
- foreman.start
- end
-
- desc 'Stop the application services'
- task :stop, roles: :app do
- foreman.stop
- end
-
- desc 'Restart the application services'
- task :restart, roles: :app do
- foreman.restart
- end
-end
-
-after 'deploy:cold' do
- run "cd #{release_path} && #{rake} gitlab:setup force=yes RAILS_ENV=#{rails_env}"
- deploy.restart
-end
-
-after 'deploy:update', 'foreman:export' # Export foreman scripts
-#after 'deploy:update', 'foreman:restart' # Restart application scripts
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 6ae0324f..52fb8877 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -40,7 +40,7 @@ Gitlab::Application.configure do
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production
- config.cache_store = :redis_store
+ config.cache_store = :memory_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 90d04b39..4b2f69ab 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -1,165 +1,133 @@
# # # # # # # # # # # # # # # # # #
-# GitLab application config file #
+# Gitlab application config file #
# # # # # # # # # # # # # # # # # #
#
# How to use:
# 1. copy file as gitlab.yml
# 2. Replace gitlab -> host with your domain
-# 3. Replace gitlab -> email_from
+# 3. Replace gitolite -> ssh_host with your domain
+# 4. Replace gitlab -> email_from
-production: &base
- #
- # 1. GitLab app settings
- # ==========================
+#
+# 1. GitLab app settings
+# ==========================
- ## GitLab settings
- gitlab:
- ## Web server settings
- host: localhost
- port: 80
- https: false
- # Uncomment and customize to run in non-root path
- # Note that ENV['RAILS_RELATIVE_URL_ROOT'] in config/unicorn.rb may need to be changed
- # relative_url_root: /gitlab
+## GitLab settings
+gitlab:
+ ## Web server settings
+ host: localhost
+ port: 80
+ https: false
+ # Uncomment and customize to run in non-root path
+ # Note that ENV['RAILS_RELATIVE_URL_ROOT'] in config/unicorn.rb may need to be changed
+ # relative_url_root: /gitlab
- # Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
- # user: git
+ # Uncomment and customize if you can't use the default user to run GitLab (default: 'gitlab')
+ # user: user123
- ## Email settings
- # Email address used in the "From" field in mails sent by GitLab
- email_from: gitlab@localhost
+ ## Email settings
+ # Email address used in the "From" field in mails sent by GitLab
+ email_from: gitlab@localhost
- # Email address of your support contact (default: same as email_from)
- support_email: support@localhost
+ # Email address of your support contanct (default: same as email_from)
+ support_email: support@localhost
- ## Project settings
- default_projects_limit: 10
- # signup_enabled: true # default: false - Account passwords are not sent via the email if signup is enabled.
- # username_changing_enabled: false # default: true - User can change her username/namespace
+ ## Project settings
+ default_projects_limit: 10
+ # signup_enabled: true # default: false - Account passwords are not sent via the email if signup is enabled.
+ # username_changing_enabled: false # default: true - User can change her username/namespace
-
- ## External issues trackers
- issues_tracker:
- # redmine:
- # ## If not nil, link 'Issues' on project page will be replaced with this
- # ## Use placeholders:
- # ## :project_id - GitLab project identifier
- # ## :issues_tracker_id - Project Name or Id in external issue tracker
- # project_url: "http://redmine.sample/projects/:issues_tracker_id"
- #
- # ## If not nil, links from /#\d/ entities from commit messages will replaced with this
- # ## Use placeholders:
- # ## :project_id - GitLab project identifier
- # ## :issues_tracker_id - Project Name or Id in external issue tracker
- # ## :id - Issue id (from commit messages)
- # issues_url: "http://redmine.sample/issues/:id"
- #
- # ## If not nil, linkis to creating new issues will be replaced with this
- # ## Use placeholders:
- # ## :project_id - GitLab project identifier
- # ## :issues_tracker_id - Project Name or Id in external issue tracker
- # new_issue_url: "http://redmine.sample/projects/:issues_tracker_id/issues/new"
-
- ## Gravatar
- gravatar:
- enabled: true # Use user avatar image from Gravatar.com (default: true)
- # plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
- # ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
+## Gravatar
+gravatar:
+ enabled: true # Use user avatar images from Gravatar.com (default: true)
+ # plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
+ # ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
- #
- # 2. Auth settings
- # ==========================
+#
+# 2. Auth settings
+# ==========================
- ## LDAP settings
- ldap:
- enabled: false
- host: '_your_ldap_server'
- base: '_the_base_where_you_search_for_users'
- port: 636
- uid: 'sAMAccountName'
- method: 'ssl' # "ssl" or "plain"
- bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
- password: '_the_password_of_the_bind_user'
+## LDAP settings
+ldap:
+ enabled: false
+ host: '_your_ldap_server'
+ base: '_the_base_where_you_search_for_users'
+ port: 636
+ uid: 'sAMAccountName'
+ method: 'ssl' # "ssl" or "plain"
+ bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
+ password: '_the_password_of_the_bind_user'
- ## OmniAuth settings
- omniauth:
- # Allow login via Twitter, Google, etc. using OmniAuth providers
- enabled: false
+## Omniauth settings
+omniauth:
+ # Enable ability for users
+ # Allow logging in via Twitter, Google, etc. using Omniauth providers
+ enabled: false
- # CAUTION!
- # This allows users to login without having a user account first (default: false).
- # User accounts will be created automatically when authentication was successful.
- allow_single_sign_on: false
- # Locks down those users until they have been cleared by the admin (default: true).
- block_auto_created_users: true
-
- ## Auth providers
- # Uncomment the following lines and fill in the data of the auth provider you want to use
- # If your favorite auth provider is not listed you can use others:
- # see https://github.com/gitlabhq/gitlabhq/wiki/Using-Custom-Omniauth-Providers
- # The 'app_id' and 'app_secret' parameters are always passed as the first two
- # arguments, followed by optional 'args' which can be either a hash or an array.
- providers:
- # - { name: 'google_oauth2', app_id: 'YOUR APP ID',
- # app_secret: 'YOUR APP SECRET',
- # args: { access_type: 'offline', approval_prompt: '' } }
- # - { name: 'twitter', app_id: 'YOUR APP ID',
- # app_secret: 'YOUR APP SECRET'}
- # - { name: 'github', app_id: 'YOUR APP ID',
- # app_secret: 'YOUR APP SECRET' }
-
-
-
- #
- # 3. Advanced settings
- # ==========================
-
- # GitLab Satellites
- satellites:
- # Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
- path: /home/git/gitlab-satellites/
-
- ## Backup settings
- backup:
- path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
- # keep_time: 604800 # default: 0 (forever) (in seconds)
-
- ## GitLab Shell settings
- gitlab_shell:
- # REPOS_PATH MUST NOT BE A SYMLINK!!!
- repos_path: /home/git/repositories/
- hooks_path: /home/git/gitlab-shell/hooks/
-
- # Git over HTTP
- upload_pack: true
- receive_pack: true
-
- # If you use non-standard ssh port you need to specify it
- # ssh_port: 22
-
- ## Git settings
# CAUTION!
- # Use the default values unless you really know what you are doing
- git:
- bin_path: /usr/bin/git
- # Max size of a git object (e.g. a commit), in bytes
- # This value can be increased if you have very large commits
- max_size: 5242880 # 5.megabytes
- # Git timeout to read a commit, in seconds
- timeout: 10
+ # This allows users to login without having a user account first (default: false)
+ # User accounts will be created automatically when authentication was successful.
+ allow_single_sign_on: false
+ # Locks down those users until they have been cleared by the admin (default: true)
+ block_auto_created_users: true
-development:
- <<: *base
+ ## Auth providers
+ # Uncomment the lines and fill in the data of the auth provider you want to use
+ # If your favorite auth provider is not listed you can user others:
+ # see https://github.com/gitlabhq/gitlabhq/wiki/Using-Custom-Omniauth-Providers
+ # The 'app_id' and 'app_secret' parameters are always passed as the first two
+ # arguments, followed by optional 'args' which can be either a hash or an array.
+ providers:
+ # - { name: 'google_oauth2', app_id: 'YOUR APP ID',
+ # app_secret: 'YOUR APP SECRET',
+ # args: { access_type: 'offline', approval_prompt: '' } }
+ # - { name: 'twitter', app_id: 'YOUR APP ID',
+ # app_secret: 'YOUR APP SECRET'}
+ # - { name: 'github', app_id: 'YOUR APP ID',
+ # app_secret: 'YOUR APP SECRET' }
-test:
- <<: *base
- issues_tracker:
- redmine:
- project_url: "http://redmine/projects/:issues_tracker_id"
- issues_url: "http://redmine/:project_id/:issues_tracker_id/:id"
- new_issue_url: "http://redmine/projects/:issues_tracker_id/insues/new"
-staging:
- <<: *base
+
+#
+# 3. Advanced settings
+# ==========================
+
+# GitLab Satellites
+satellites:
+ # Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
+ path: /home/gitlab/gitlab-satellites/
+
+## Backup settings
+backup:
+ path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
+ # keep_time: 604800 # default: 0 (forever) (in seconds)
+
+## Gitolite settings
+gitolite:
+ admin_uri: git@localhost:gitolite-admin
+ # repos_path must not be a symlink
+ repos_path: /home/git/repositories/
+ hooks_path: /home/git/.gitolite/hooks/
+ admin_key: gitlab
+ upload_pack: true
+ receive_pack: true
+ ssh_user: git
+ ssh_host: localhost
+ # ssh_port: 22
+ # config_file: gitolite.conf
+
+ # Uncomment and customize if you can't use the default group to own the repositories and run Gitolite (default: same as the 'ssh_user' above)
+ # owner_group: group123
+
+## Git settings
+# CAUTION!
+# Use the default values unless you really know what you are doing
+git:
+ bin_path: /usr/bin/git
+ # Max size of git object like commit, in bytes
+ # This value can be increased if you have a very large commits
+ max_size: 5242880 # 5.megabytes
+ # Git timeout to read commit, in seconds
+ timeout: 10
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index ac35eef4..0334b35e 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -1,6 +1,5 @@
class Settings < Settingslogic
source "#{Rails.root}/config/gitlab.yml"
- namespace Rails.env
class << self
def gitlab_on_non_standard_port?
@@ -9,11 +8,11 @@ class Settings < Settingslogic
private
- def build_gitlab_shell_ssh_path_prefix
- if gitlab_shell.ssh_port != 22
- "ssh://#{gitlab_shell.ssh_user}@#{gitlab_shell.ssh_host}:#{gitlab_shell.ssh_port}/"
+ def build_gitolite_ssh_path_prefix
+ if gitolite.ssh_port != 22
+ "ssh://#{gitolite.ssh_user}@#{gitolite.ssh_host}:#{gitolite.ssh_port}/"
else
- "#{gitlab_shell.ssh_user}@#{gitlab_shell.ssh_host}:"
+ "#{gitolite.ssh_user}@#{gitolite.ssh_host}:"
end
end
@@ -42,57 +41,43 @@ Settings['omniauth'] ||= Settingslogic.new({})
Settings.omniauth['enabled'] = false if Settings.omniauth['enabled'].nil?
Settings.omniauth['providers'] ||= []
-Settings['issues_tracker'] ||= {}
-
-#
-# GitLab
-#
Settings['gitlab'] ||= Settingslogic.new({})
Settings.gitlab['default_projects_limit'] ||= 10
Settings.gitlab['host'] ||= 'localhost'
Settings.gitlab['https'] = false if Settings.gitlab['https'].nil?
Settings.gitlab['port'] ||= Settings.gitlab.https ? 443 : 80
-Settings.gitlab['relative_url_root'] ||= ENV['RAILS_RELATIVE_URL_ROOT'] || ''
+Settings.gitlab['relative_url_root'] ||= ''
Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}"
Settings.gitlab['support_email'] ||= Settings.gitlab.email_from
Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url)
-Settings.gitlab['user'] ||= 'git'
+Settings.gitlab['user'] ||= 'gitlab'
Settings.gitlab['signup_enabled'] ||= false
Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil?
-#
-# Gravatar
-#
Settings['gravatar'] ||= Settingslogic.new({})
Settings.gravatar['enabled'] = true if Settings.gravatar['enabled'].nil?
Settings.gravatar['plain_url'] ||= 'http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm'
Settings.gravatar['ssl_url'] ||= 'https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm'
-#
-# GitLab Shell
-#
-Settings['gitlab_shell'] ||= Settingslogic.new({})
-Settings.gitlab_shell['hooks_path'] ||= '/home/git/gitlab-shell/hooks/'
-Settings.gitlab_shell['receive_pack'] = true if Settings.gitlab_shell['receive_pack'].nil?
-Settings.gitlab_shell['upload_pack'] = true if Settings.gitlab_shell['upload_pack'].nil?
-Settings.gitlab_shell['repos_path'] ||= '/home/git/repositories/'
-Settings.gitlab_shell['ssh_host'] ||= (Settings.gitlab.host || 'localhost')
-Settings.gitlab_shell['ssh_port'] ||= 22
-Settings.gitlab_shell['ssh_user'] ||= Settings.gitlab.user
-Settings.gitlab_shell['owner_group'] ||= Settings.gitlab.user
-Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.send(:build_gitlab_shell_ssh_path_prefix)
+Settings['gitolite'] ||= Settingslogic.new({})
+Settings.gitolite['admin_key'] ||= 'gitlab'
+Settings.gitolite['admin_uri'] ||= 'git@localhost:gitolite-admin'
+Settings.gitolite['config_file'] ||= 'gitolite.conf'
+Settings.gitolite['hooks_path'] ||= '/home/git/share/gitolite/hooks/'
+Settings.gitolite['receive_pack'] = true if Settings.gitolite['receive_pack'].nil?
+Settings.gitolite['upload_pack'] = true if Settings.gitolite['upload_pack'].nil?
+Settings.gitolite['repos_path'] ||= '/home/git/repositories/'
+Settings.gitolite['ssh_host'] ||= (Settings.gitlab.host || 'localhost')
+Settings.gitolite['ssh_port'] ||= 22
+Settings.gitolite['ssh_user'] ||= 'git'
+Settings.gitolite['owner_group'] ||= Settings.gitolite.ssh_user
+Settings.gitolite['ssh_path_prefix'] ||= Settings.send(:build_gitolite_ssh_path_prefix)
-#
-# Backup
-#
Settings['backup'] ||= Settingslogic.new({})
Settings.backup['keep_time'] ||= 0
Settings.backup['path'] = File.expand_path(Settings.backup['path'] || "tmp/backups/", Rails.root)
-#
-# Git
-#
Settings['git'] ||= Settingslogic.new({})
Settings.git['max_size'] ||= 5242880 # 5.megabytes
Settings.git['bin_path'] ||= '/usr/bin/git'
diff --git a/config/initializers/2_app.rb b/config/initializers/2_app.rb
index 27a0c0ff..748f15a1 100644
--- a/config/initializers/2_app.rb
+++ b/config/initializers/2_app.rb
@@ -1,6 +1,6 @@
module Gitlab
- VERSION = File.read(Rails.root.join("VERSION")).strip
- REVISION = `git log --pretty=format:'%h' -n 1`
+ Version = File.read(Rails.root.join("VERSION"))
+ Revision = `git log --pretty=format:'%h' -n 1`
def self.config
Settings
diff --git a/config/initializers/4_sidekiq.rb b/config/initializers/4_sidekiq.rb
index c90d3762..6abe6e74 100644
--- a/config/initializers/4_sidekiq.rb
+++ b/config/initializers/4_sidekiq.rb
@@ -4,19 +4,19 @@ config_file = Rails.root.join('config', 'resque.yml')
resque_url = if File.exists?(config_file)
YAML.load_file(config_file)[Rails.env]
else
- "redis://localhost:6379"
+ "localhost:6379"
end
Sidekiq.configure_server do |config|
config.redis = {
- url: resque_url,
+ url: "redis://#{resque_url}",
namespace: 'resque:gitlab'
}
end
Sidekiq.configure_client do |config|
config.redis = {
- url: resque_url,
+ url: "redis://#{resque_url}",
namespace: 'resque:gitlab'
}
end
diff --git a/config/initializers/5_backend.rb b/config/initializers/5_backend.rb
index 7c2e7f39..85f747ac 100644
--- a/config/initializers/5_backend.rb
+++ b/config/initializers/5_backend.rb
@@ -1,8 +1,5 @@
# GIT over HTTP
require Rails.root.join("lib", "gitlab", "backend", "grack_auth")
-# GIT over SSH
-require Rails.root.join("lib", "gitlab", "backend", "shell")
-
-# GitLab shell adapter
-require Rails.root.join("lib", "gitlab", "backend", "shell_adapter")
+# GITOLITE backend
+require Rails.root.join("lib", "gitlab", "backend", "gitolite")
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 5714407f..97946c54 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -23,7 +23,7 @@ Devise.setup do |config|
# session. If you need permissions, you should implement that in a before filter.
# You can also supply a hash where the value is a boolean determining whether
# or not authentication should be aborted when the value is not present.
- config.authentication_keys = [ :login ]
+ # config.authentication_keys = [ :email ]
# Configure parameters from the request object used for authentication. Each entry
# given should be a request method and it will automatically be passed to the
@@ -99,7 +99,7 @@ Devise.setup do |config|
# ==> Configuration for :validatable
# Range for password length. Default is 6..128.
- config.password_length = 6..128
+ # config.password_length = 6..128
# Email regex used to validate email formats. It simply asserts that
# an one (and only one) @ exists in the given string. This is mainly
diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml
index 275273a0..3b763cf4 100644
--- a/config/locales/devise.en.yml
+++ b/config/locales/devise.en.yml
@@ -17,7 +17,6 @@ en:
unauthenticated: 'You need to sign in before continuing.'
unconfirmed: 'You have to confirm your account before continuing.'
locked: 'Your account is locked.'
- not_found_in_database: 'Invalid email or password.'
invalid: 'Invalid email or password.'
invalid_token: 'Invalid authentication token.'
timeout: 'Your session expired, please sign in again to continue.'
diff --git a/config/resque.yml.example b/config/resque.yml.example
index 3c7ad0e5..cd3d4874 100644
--- a/config/resque.yml.example
+++ b/config/resque.yml.example
@@ -1,3 +1,3 @@
-development: redis://localhost:6379
-test: redis://localhost:6379
-production: redis://redis.example.com:6379
+development: localhost:6379
+test: localhost:6379
+production: redis.example.com:6379
diff --git a/config/routes.rb b/config/routes.rb
index 61a604b9..00ff3f63 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -8,7 +8,6 @@ Gitlab::Application.routes.draw do
# API
require 'api'
- Gitlab::API.logger Rails.logger
mount Gitlab::API => '/api'
constraint = lambda { |request| request.env["warden"].authenticate? and request.env['warden'].user.admin? }
@@ -19,10 +18,10 @@ Gitlab::Application.routes.draw do
# Enable Grack support
mount Grack::Bundle.new({
git_path: Gitlab.config.git.bin_path,
- project_root: Gitlab.config.gitlab_shell.repos_path,
- upload_pack: Gitlab.config.gitlab_shell.upload_pack,
- receive_pack: Gitlab.config.gitlab_shell.receive_pack
- }), at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }
+ project_root: Gitlab.config.gitolite.repos_path,
+ upload_pack: Gitlab.config.gitolite.upload_pack,
+ receive_pack: Gitlab.config.gitolite.receive_pack
+ }), at: '/', constraints: lambda { |request| /[-\/\w\.-]+\.git\//.match(request.path_info) }
#
# Help
@@ -46,23 +45,17 @@ Gitlab::Application.routes.draw do
root to: "projects#index"
end
- #
- # Attachments serving
- #
- get 'files/:type/:id/:filename' => 'files#download', constraints: { id: /\d+/, type: /[a-z]+/, filename: /.+/ }
-
#
# Admin Area
#
namespace :admin do
- resources :users, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ } do
+ resources :users do
member do
put :team_update
put :block
put :unblock
end
end
-
resources :groups, constraints: { id: /[^\/]+/ } do
member do
put :project_update
@@ -70,27 +63,18 @@ Gitlab::Application.routes.draw do
delete :remove_project
end
end
-
- resources :teams, constraints: { id: /[^\/]+/ } do
- scope module: :teams do
- resources :members, only: [:edit, :update, :destroy, :new, :create]
- resources :projects, only: [:edit, :update, :destroy, :new, :create], constraints: { id: /[a-zA-Z.\/0-9_\-]+/ }
+ resources :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ }, except: [:new, :create] do
+ member do
+ get :team
+ put :team_update
end
end
-
+ resources :team_members, only: [:edit, :update, :destroy]
resources :hooks, only: [:index, :create, :destroy] do
get :test
end
-
resource :logs, only: [:show]
resource :resque, controller: 'resque', only: [:show]
-
- resources :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ }, only: [:index, :show] do
- scope module: :projects, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ } do
- resources :members, only: [:edit, :update, :destroy]
- end
- end
-
root to: "dashboard#index"
end
@@ -110,30 +94,22 @@ Gitlab::Application.routes.draw do
put :reset_private_token
put :update_username
end
-
- resource :notifications
end
resources :keys
- match "/u/:username" => "users#show", as: :user, constraints: { username: /.*/ }
-
-
#
# Dashboard Area
#
- resource :dashboard, controller: "dashboard" do
- member do
- get :projects
- get :issues
- get :merge_requests
- end
- end
+ get "dashboard" => "dashboard#index"
+ get "dashboard/issues" => "dashboard#issues"
+ get "dashboard/merge_requests" => "dashboard#merge_requests"
+
#
# Groups Area
#
- resources :groups, constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/} do
+ resources :groups, constraints: { id: /[^\/]+/ }, only: [:show] do
member do
get :issues
get :merge_requests
@@ -143,20 +119,6 @@ Gitlab::Application.routes.draw do
end
end
- #
- # Teams Area
- #
- resources :teams, constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/} do
- member do
- get :issues
- get :merge_requests
- end
- scope module: :teams do
- resources :members, only: [:index, :new, :create, :edit, :update, :destroy]
- resources :projects, only: [:index, :new, :create, :edit, :update, :destroy], constraints: { id: /[a-zA-Z.0-9_\-\/]+/ }
- end
- end
-
resources :projects, constraints: { id: /[^\/]+/ }, only: [:new, :create]
devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, registrations: :registrations }
@@ -164,27 +126,25 @@ Gitlab::Application.routes.draw do
#
# Project Area
#
- resources :projects, constraints: { id: /(?:[a-zA-Z.0-9_\-]+\/)?[a-zA-Z.0-9_\-]+/ }, except: [:new, :create, :index], path: "/" do
+ resources :projects, constraints: { id: /[a-zA-Z.0-9_\-\/]+/ }, except: [:new, :create, :index], path: "/" do
member do
- put :transfer
+ get "wall"
+ get "graph"
+ get "files"
end
- resources :blob, only: [:show], constraints: {id: /.+/}
- resources :tree, only: [:show], constraints: {id: /.+/, format: /(html|js)/ }
- resources :edit_tree, only: [:show, :update], constraints: {id: /.+/}, path: 'edit'
+ resources :tree, only: [:show, :edit, :update], constraints: {id: /.+/}
resources :commit, only: [:show], constraints: {id: /[[:alnum:]]{6,40}/}
- resources :commits, only: [:show], constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
+ resources :commits, only: [:show], constraints: {id: /.+/}
resources :compare, only: [:index, :create]
resources :blame, only: [:show], constraints: {id: /.+/}
- resources :graph, only: [:show], constraints: {id: /(?:[^.]|\.(?!json$))+/, format: /json/}
+ resources :blob, only: [:show], constraints: {id: /.+/}
match "/compare/:from...:to" => "compare#show", as: "compare",
:via => [:get, :post], constraints: {from: /.+/, to: /.+/}
resources :wikis, only: [:show, :edit, :destroy, :create] do
collection do
get :pages
- put ':id' => 'wikis#update'
- get :git_access
end
member do
@@ -192,12 +152,6 @@ Gitlab::Application.routes.draw do
end
end
- resource :wall, only: [:show] do
- member do
- get 'notes'
- end
- end
-
resource :repository do
member do
get "branches"
@@ -281,18 +235,6 @@ Gitlab::Application.routes.draw do
end
end
- scope module: :projects do
- resources :teams, only: [] do
- collection do
- get :available
- post :assign
- end
- member do
- delete :resign
- end
- end
- end
-
resources :notes, only: [:index, :create, :destroy] do
collection do
post :preview
@@ -300,5 +242,5 @@ Gitlab::Application.routes.draw do
end
end
- root to: "dashboard#show"
+ root to: "dashboard#index"
end
diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example
index 75945182..4852cd65 100644
--- a/config/unicorn.rb.example
+++ b/config/unicorn.rb.example
@@ -2,7 +2,7 @@
# note that config/gitlab.yml web path should also be changed
# ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab"
-app_dir = File.expand_path '../../', __FILE__
+app_dir = "/home/gitlab/gitlab/"
worker_processes 2
working_directory app_dir
@@ -30,7 +30,7 @@ end
before_fork do |server, worker|
- # the following is highly recommended for Rails + "preload_app true"
+ # the following is highly recomended for Rails + "preload_app true"
# as there's no need for the master process to hold a connection
defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
diff --git a/db/fixtures/development/01_admin.rb b/db/fixtures/development/001_admin.rb
similarity index 100%
rename from db/fixtures/development/01_admin.rb
rename to db/fixtures/development/001_admin.rb
diff --git a/db/fixtures/development/04_project.rb b/db/fixtures/development/002_project.rb
similarity index 81%
rename from db/fixtures/development/04_project.rb
rename to db/fixtures/development/002_project.rb
index 9904c48e..e50ab5d9 100644
--- a/db/fixtures/development/04_project.rb
+++ b/db/fixtures/development/002_project.rb
@@ -1,3 +1,9 @@
+Group.seed(:id, [
+ { id: 99, name: "GitLab", path: 'gitlab', owner_id: 1 },
+ { id: 100, name: "Brightbox", path: 'brightbox', owner_id: 1 },
+ { id: 101, name: "KDE", path: 'kde', owner_id: 1 },
+])
+
Project.seed(:id, [
# Global
diff --git a/db/fixtures/development/05_users.rb b/db/fixtures/development/003_users.rb
similarity index 100%
rename from db/fixtures/development/05_users.rb
rename to db/fixtures/development/003_users.rb
diff --git a/db/fixtures/development/06_teams.rb b/db/fixtures/development/004_teams.rb
similarity index 66%
rename from db/fixtures/development/06_teams.rb
rename to db/fixtures/development/004_teams.rb
index 9fbf21a0..7a8f9139 100644
--- a/db/fixtures/development/06_teams.rb
+++ b/db/fixtures/development/004_teams.rb
@@ -1,3 +1,5 @@
+UsersProject.skip_callback(:save, :after, :update_repository)
+
Gitlab::Seeder.quiet do
(1..300).each do |i|
@@ -19,4 +21,9 @@ Gitlab::Seeder.quiet do
print('.')
end
end
+
+UsersProject.set_callback(:save, :after, :update_repository)
+
+puts "\nRebuild gitolite\n".yellow
+Project.all.each(&:update_repository)
puts "OK".green
diff --git a/db/fixtures/development/07_milestones.rb b/db/fixtures/development/005_milestones.rb
similarity index 100%
rename from db/fixtures/development/07_milestones.rb
rename to db/fixtures/development/005_milestones.rb
diff --git a/db/fixtures/development/08_wall.rb b/db/fixtures/development/006_wall.rb
similarity index 100%
rename from db/fixtures/development/08_wall.rb
rename to db/fixtures/development/006_wall.rb
diff --git a/db/fixtures/development/09_issues.rb b/db/fixtures/development/007_issues.rb
similarity index 91%
rename from db/fixtures/development/09_issues.rb
rename to db/fixtures/development/007_issues.rb
index cd9b2b3e..8978db47 100644
--- a/db/fixtures/development/09_issues.rb
+++ b/db/fixtures/development/007_issues.rb
@@ -16,7 +16,7 @@ Gitlab::Seeder.quiet do
project_id: project.id,
author_id: user_id,
assignee_id: user_id,
- state: ['opened', 'closed'].sample,
+ closed: [true, false].sample,
milestone: project.milestones.sample,
title: Faker::Lorem.sentence(6)
}])
diff --git a/db/fixtures/development/10_merge_requests.rb b/db/fixtures/development/008_merge_requests.rb
similarity index 92%
rename from db/fixtures/development/10_merge_requests.rb
rename to db/fixtures/development/008_merge_requests.rb
index 6d111b26..9904b4a1 100644
--- a/db/fixtures/development/10_merge_requests.rb
+++ b/db/fixtures/development/008_merge_requests.rb
@@ -17,7 +17,7 @@ Gitlab::Seeder.quiet do
project_id: project.id,
author_id: user_id,
assignee_id: user_id,
- state: ['opened', 'closed'].sample,
+ closed: [true, false].sample,
milestone: project.milestones.sample,
title: Faker::Lorem.sentence(6)
}])
diff --git a/db/fixtures/development/02_source_code.rb b/db/fixtures/development/009_source_code.rb
similarity index 66%
rename from db/fixtures/development/02_source_code.rb
rename to db/fixtures/development/009_source_code.rb
index a0a46c9e..a64b905e 100644
--- a/db/fixtures/development/02_source_code.rb
+++ b/db/fixtures/development/009_source_code.rb
@@ -1,4 +1,4 @@
-root = Gitlab.config.gitlab_shell.repos_path
+root = Gitlab.config.gitolite.repos_path
projects = [
{ path: 'underscore.git', git: 'https://github.com/documentcloud/underscore.git' },
@@ -13,17 +13,19 @@ projects = [
projects.each do |project|
project_path = File.join(root, project[:path])
- if File.exists?(project_path)
- print '-'
- next
- end
+ next if File.exists?(project_path)
- if system("/home/git/gitlab-shell/bin/gitlab-projects import-project #{project[:path]} #{project[:git]}")
- print '.'
- else
- print 'F'
+ cmds = [
+ "cd #{root} && sudo -u git -H git clone --bare #{project[:git]} ./#{project[:path]}",
+ "sudo ln -s ./lib/hooks/post-receive #{project_path}/hooks/post-receive",
+ "sudo chown git:git -R #{project_path}",
+ "sudo chmod 770 -R #{project_path}",
+ ]
+
+ cmds.each do |cmd|
+ puts cmd.yellow
+ `#{cmd}`
end
end
puts "OK".green
-
diff --git a/db/fixtures/development/11_keys.rb b/db/fixtures/development/010_keys.rb
similarity index 100%
rename from db/fixtures/development/11_keys.rb
rename to db/fixtures/development/010_keys.rb
diff --git a/db/fixtures/development/03_group.rb b/db/fixtures/development/03_group.rb
deleted file mode 100644
index 01174a4b..00000000
--- a/db/fixtures/development/03_group.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-Group.seed(:id, [
- { id: 99, name: "GitLab", path: 'gitlab', owner_id: 1 },
- { id: 100, name: "Brightbox", path: 'brightbox', owner_id: 1 },
- { id: 101, name: "KDE", path: 'kde', owner_id: 1 },
-])
diff --git a/db/migrate/20121219183753_create_user_teams.rb b/db/migrate/20121219183753_create_user_teams.rb
deleted file mode 100644
index 65c4d053..00000000
--- a/db/migrate/20121219183753_create_user_teams.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class CreateUserTeams < ActiveRecord::Migration
- def change
- create_table :user_teams do |t|
- t.string :name
- t.string :path
- t.integer :owner_id
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20121220064104_create_user_team_project_relationships.rb b/db/migrate/20121220064104_create_user_team_project_relationships.rb
deleted file mode 100644
index 8eb654c8..00000000
--- a/db/migrate/20121220064104_create_user_team_project_relationships.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class CreateUserTeamProjectRelationships < ActiveRecord::Migration
- def change
- create_table :user_team_project_relationships do |t|
- t.integer :project_id
- t.integer :user_team_id
- t.integer :greatest_access
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20121220064453_create_user_team_user_relationships.rb b/db/migrate/20121220064453_create_user_team_user_relationships.rb
deleted file mode 100644
index 7783b0ae..00000000
--- a/db/migrate/20121220064453_create_user_team_user_relationships.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class CreateUserTeamUserRelationships < ActiveRecord::Migration
- def change
- create_table :user_team_user_relationships do |t|
- t.integer :user_id
- t.integer :user_team_id
- t.boolean :group_admin
- t.integer :permission
-
- t.timestamps
- end
- end
-end
diff --git a/db/migrate/20130123114545_add_issues_tracker_to_project.rb b/db/migrate/20130123114545_add_issues_tracker_to_project.rb
deleted file mode 100644
index 288d0f07..00000000
--- a/db/migrate/20130123114545_add_issues_tracker_to_project.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddIssuesTrackerToProject < ActiveRecord::Migration
- def change
- add_column :projects, :issues_tracker, :string, default: :gitlab, null: false
- end
-end
diff --git a/db/migrate/20130125090214_add_user_permissions.rb b/db/migrate/20130125090214_add_user_permissions.rb
deleted file mode 100644
index 38b5f439..00000000
--- a/db/migrate/20130125090214_add_user_permissions.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-class AddUserPermissions < ActiveRecord::Migration
- def up
- add_column :users, :can_create_group, :boolean, default: true, null: false
- add_column :users, :can_create_team, :boolean, default: true, null: false
- end
-
- def down
- remove_column :users, :can_create_group
- remove_column :users, :can_create_team
- end
-end
diff --git a/db/migrate/20130131070232_remove_private_flag_from_project.rb b/db/migrate/20130131070232_remove_private_flag_from_project.rb
deleted file mode 100644
index 5754db11..00000000
--- a/db/migrate/20130131070232_remove_private_flag_from_project.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemovePrivateFlagFromProject < ActiveRecord::Migration
- def up
- remove_column :projects, :private_flag
- end
-
- def down
- add_column :projects, :private_flag, :boolean, default: true, null: false
- end
-end
diff --git a/db/migrate/20130206084024_add_description_to_namsespace.rb b/db/migrate/20130206084024_add_description_to_namsespace.rb
deleted file mode 100644
index ef02e489..00000000
--- a/db/migrate/20130206084024_add_description_to_namsespace.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddDescriptionToNamsespace < ActiveRecord::Migration
- def change
- add_column :namespaces, :description, :string, default: '', null: false
- end
-end
diff --git a/db/migrate/20130207104426_add_description_to_teams.rb b/db/migrate/20130207104426_add_description_to_teams.rb
deleted file mode 100644
index 6d037779..00000000
--- a/db/migrate/20130207104426_add_description_to_teams.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddDescriptionToTeams < ActiveRecord::Migration
- def change
- add_column :user_teams, :description, :string, default: '', null: false
- end
-end
diff --git a/db/migrate/20130211085435_add_issues_tracker_id_to_project.rb b/db/migrate/20130211085435_add_issues_tracker_id_to_project.rb
deleted file mode 100644
index 71763d18..00000000
--- a/db/migrate/20130211085435_add_issues_tracker_id_to_project.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddIssuesTrackerIdToProject < ActiveRecord::Migration
- def change
- add_column :projects, :issues_tracker_id, :string
- end
-end
diff --git a/db/migrate/20130214154045_rename_state_to_merge_status_in_milestone.rb b/db/migrate/20130214154045_rename_state_to_merge_status_in_milestone.rb
deleted file mode 100644
index 23797fe1..00000000
--- a/db/migrate/20130214154045_rename_state_to_merge_status_in_milestone.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class RenameStateToMergeStatusInMilestone < ActiveRecord::Migration
- def change
- rename_column :merge_requests, :state, :merge_status
- end
-end
diff --git a/db/migrate/20130218140952_add_state_to_issue.rb b/db/migrate/20130218140952_add_state_to_issue.rb
deleted file mode 100644
index 062103d0..00000000
--- a/db/migrate/20130218140952_add_state_to_issue.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddStateToIssue < ActiveRecord::Migration
- def change
- add_column :issues, :state, :string
- end
-end
diff --git a/db/migrate/20130218141038_add_state_to_merge_request.rb b/db/migrate/20130218141038_add_state_to_merge_request.rb
deleted file mode 100644
index ac4108ee..00000000
--- a/db/migrate/20130218141038_add_state_to_merge_request.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddStateToMergeRequest < ActiveRecord::Migration
- def change
- add_column :merge_requests, :state, :string
- end
-end
diff --git a/db/migrate/20130218141117_add_state_to_milestone.rb b/db/migrate/20130218141117_add_state_to_milestone.rb
deleted file mode 100644
index c8403910..00000000
--- a/db/migrate/20130218141117_add_state_to_milestone.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddStateToMilestone < ActiveRecord::Migration
- def change
- add_column :milestones, :state, :string
- end
-end
diff --git a/db/migrate/20130218141258_convert_closed_to_state_in_issue.rb b/db/migrate/20130218141258_convert_closed_to_state_in_issue.rb
deleted file mode 100644
index 9fa96203..00000000
--- a/db/migrate/20130218141258_convert_closed_to_state_in_issue.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-class ConvertClosedToStateInIssue < ActiveRecord::Migration
- def up
- Issue.transaction do
- Issue.where(closed: true).update_all(state: :closed)
- Issue.where(closed: false).update_all(state: :opened)
- end
- end
-
- def down
- Issue.transaction do
- Issue.where(state: :closed).update_all(closed: true)
- end
- end
-end
diff --git a/db/migrate/20130218141327_convert_closed_to_state_in_merge_request.rb b/db/migrate/20130218141327_convert_closed_to_state_in_merge_request.rb
deleted file mode 100644
index ebb7ae58..00000000
--- a/db/migrate/20130218141327_convert_closed_to_state_in_merge_request.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-class ConvertClosedToStateInMergeRequest < ActiveRecord::Migration
- def up
- MergeRequest.transaction do
- MergeRequest.where(closed: true, merged: true).update_all(state: :merged)
- MergeRequest.where(closed: true, merged: false).update_all(state: :closed)
- MergeRequest.where(closed: false).update_all(state: :opened)
- end
- end
-
- def down
- MergeRequest.transaction do
- MergeRequest.where(state: :closed).update_all(closed: true)
- MergeRequest.where(state: :merged).update_all(closed: true, merged: true)
- end
- end
-end
diff --git a/db/migrate/20130218141344_convert_closed_to_state_in_milestone.rb b/db/migrate/20130218141344_convert_closed_to_state_in_milestone.rb
deleted file mode 100644
index 1978ea89..00000000
--- a/db/migrate/20130218141344_convert_closed_to_state_in_milestone.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-class ConvertClosedToStateInMilestone < ActiveRecord::Migration
- def up
- Milestone.transaction do
- Milestone.where(closed: true).update_all(state: :closed)
- Milestone.where(closed: false).update_all(state: :active)
- end
- end
-
- def down
- Milestone.transaction do
- Milestone.where(state: :closed).update_all(closed: true)
- end
- end
-end
diff --git a/db/migrate/20130218141444_remove_merged_from_merge_request.rb b/db/migrate/20130218141444_remove_merged_from_merge_request.rb
deleted file mode 100644
index a7bd82f5..00000000
--- a/db/migrate/20130218141444_remove_merged_from_merge_request.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemoveMergedFromMergeRequest < ActiveRecord::Migration
- def up
- remove_column :merge_requests, :merged
- end
-
- def down
- add_column :merge_requests, :merged, :boolean, default: true, null: false
- end
-end
diff --git a/db/migrate/20130218141507_remove_closed_from_issue.rb b/db/migrate/20130218141507_remove_closed_from_issue.rb
deleted file mode 100644
index 95cc0642..00000000
--- a/db/migrate/20130218141507_remove_closed_from_issue.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemoveClosedFromIssue < ActiveRecord::Migration
- def up
- remove_column :issues, :closed
- end
-
- def down
- add_column :issues, :closed, :boolean
- end
-end
diff --git a/db/migrate/20130218141536_remove_closed_from_merge_request.rb b/db/migrate/20130218141536_remove_closed_from_merge_request.rb
deleted file mode 100644
index 37183593..00000000
--- a/db/migrate/20130218141536_remove_closed_from_merge_request.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemoveClosedFromMergeRequest < ActiveRecord::Migration
- def up
- remove_column :merge_requests, :closed
- end
-
- def down
- add_column :merge_requests, :closed, :boolean
- end
-end
diff --git a/db/migrate/20130218141554_remove_closed_from_milestone.rb b/db/migrate/20130218141554_remove_closed_from_milestone.rb
deleted file mode 100644
index e8dae4a1..00000000
--- a/db/migrate/20130218141554_remove_closed_from_milestone.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemoveClosedFromMilestone < ActiveRecord::Migration
- def up
- remove_column :milestones, :closed
- end
-
- def down
- add_column :milestones, :closed, :boolean
- end
-end
diff --git a/db/migrate/20130220124204_add_new_merge_status_to_merge_request.rb b/db/migrate/20130220124204_add_new_merge_status_to_merge_request.rb
deleted file mode 100644
index d78bd0ae..00000000
--- a/db/migrate/20130220124204_add_new_merge_status_to_merge_request.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddNewMergeStatusToMergeRequest < ActiveRecord::Migration
- def change
- add_column :merge_requests, :new_merge_status, :string
- end
-end
diff --git a/db/migrate/20130220125544_convert_merge_status_in_merge_request.rb b/db/migrate/20130220125544_convert_merge_status_in_merge_request.rb
deleted file mode 100644
index b310b35e..00000000
--- a/db/migrate/20130220125544_convert_merge_status_in_merge_request.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-class ConvertMergeStatusInMergeRequest < ActiveRecord::Migration
- def up
- MergeRequest.transaction do
- MergeRequest.where(merge_status: 1).update_all("new_merge_status = 'unchecked'")
- MergeRequest.where(merge_status: 2).update_all("new_merge_status = 'can_be_merged'")
- MergeRequest.where(merge_status: 3).update_all("new_merge_status = 'cannot_be_merged'")
- end
- end
-
- def down
- MergeRequest.transaction do
- MergeRequest.where(new_merge_status: :unchecked).update_all("merge_status = 1")
- MergeRequest.where(new_merge_status: :can_be_merged).update_all("merge_status = 2")
- MergeRequest.where(new_merge_status: :cannot_be_merged).update_all("merge_status = 3")
- end
- end
-end
diff --git a/db/migrate/20130220125545_remove_merge_status_from_merge_request.rb b/db/migrate/20130220125545_remove_merge_status_from_merge_request.rb
deleted file mode 100644
index 9083183b..00000000
--- a/db/migrate/20130220125545_remove_merge_status_from_merge_request.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemoveMergeStatusFromMergeRequest < ActiveRecord::Migration
- def up
- remove_column :merge_requests, :merge_status
- end
-
- def down
- add_column :merge_requests, :merge_status, :integer
- end
-end
diff --git a/db/migrate/20130220133245_rename_new_merge_status_to_merge_status_in_milestone.rb b/db/migrate/20130220133245_rename_new_merge_status_to_merge_status_in_milestone.rb
deleted file mode 100644
index 3f8f38dc..00000000
--- a/db/migrate/20130220133245_rename_new_merge_status_to_merge_status_in_milestone.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class RenameNewMergeStatusToMergeStatusInMilestone < ActiveRecord::Migration
- def change
- rename_column :merge_requests, :new_merge_status, :merge_status
- end
-end
diff --git a/db/migrate/20130304104623_add_state_to_user.rb b/db/migrate/20130304104623_add_state_to_user.rb
deleted file mode 100644
index 8154c210..00000000
--- a/db/migrate/20130304104623_add_state_to_user.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddStateToUser < ActiveRecord::Migration
- def change
- add_column :users, :state, :string
- end
-end
diff --git a/db/migrate/20130304104740_convert_blocked_to_state.rb b/db/migrate/20130304104740_convert_blocked_to_state.rb
deleted file mode 100644
index e8d5257a..00000000
--- a/db/migrate/20130304104740_convert_blocked_to_state.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-class ConvertBlockedToState < ActiveRecord::Migration
- def up
- User.transaction do
- User.where(blocked: true).update_all(state: :blocked)
- User.where(blocked: false).update_all(state: :active)
- end
- end
-
- def down
- User.transaction do
- User.where(state: :blocked).update_all(blocked: :true)
- end
- end
-end
diff --git a/db/migrate/20130304105317_remove_blocked_from_user.rb b/db/migrate/20130304105317_remove_blocked_from_user.rb
deleted file mode 100644
index e0104745..00000000
--- a/db/migrate/20130304105317_remove_blocked_from_user.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-class RemoveBlockedFromUser < ActiveRecord::Migration
- def up
- remove_column :users, :blocked
- end
-
- def down
- add_column :users, :blocked, :boolean
- end
-end
diff --git a/db/migrate/20130315124931_user_color_scheme.rb b/db/migrate/20130315124931_user_color_scheme.rb
deleted file mode 100644
index fe139e32..00000000
--- a/db/migrate/20130315124931_user_color_scheme.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class UserColorScheme < ActiveRecord::Migration
- def up
- add_column :users, :color_scheme_id, :integer, null: false, default: 1
- User.where(dark_scheme: true).update_all(color_scheme_id: 2)
- remove_column :users, :dark_scheme
- end
-
- def down
- add_column :users, :dark_scheme, :boolean, null: false, default: false
- remove_column :users, :color_scheme_id
- end
-end
diff --git a/db/migrate/20130318212250_add_snippets_to_features.rb b/db/migrate/20130318212250_add_snippets_to_features.rb
deleted file mode 100644
index ad0b4434..00000000
--- a/db/migrate/20130318212250_add_snippets_to_features.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddSnippetsToFeatures < ActiveRecord::Migration
- def change
- add_column :projects, :snippets_enabled, :boolean, null: false, default: true
- end
-end
diff --git a/db/migrate/20130325173941_add_notification_level_to_user.rb b/db/migrate/20130325173941_add_notification_level_to_user.rb
deleted file mode 100644
index 9f466e38..00000000
--- a/db/migrate/20130325173941_add_notification_level_to_user.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddNotificationLevelToUser < ActiveRecord::Migration
- def change
- add_column :users, :notification_level, :integer, null: false, default: 1
- end
-end
diff --git a/db/schema.rb b/db/schema.rb
index 3c8b9eae..4b3a2243 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130325173941) do
+ActiveRecord::Schema.define(:version => 20130110172407) do
create_table "events", :force => true do |t|
t.string "target_type"
@@ -37,17 +37,18 @@ ActiveRecord::Schema.define(:version => 20130325173941) do
t.integer "assignee_id"
t.integer "author_id"
t.integer "project_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.boolean "closed", :default => false, :null => false
t.integer "position", :default => 0
t.string "branch_name"
t.text "description"
t.integer "milestone_id"
- t.string "state"
end
add_index "issues", ["assignee_id"], :name => "index_issues_on_assignee_id"
add_index "issues", ["author_id"], :name => "index_issues_on_author_id"
+ add_index "issues", ["closed"], :name => "index_issues_on_closed"
add_index "issues", ["created_at"], :name => "index_issues_on_created_at"
add_index "issues", ["milestone_id"], :name => "index_issues_on_milestone_id"
add_index "issues", ["project_id"], :name => "index_issues_on_project_id"
@@ -68,23 +69,25 @@ ActiveRecord::Schema.define(:version => 20130325173941) do
add_index "keys", ["user_id"], :name => "index_keys_on_user_id"
create_table "merge_requests", :force => true do |t|
- t.string "target_branch", :null => false
- t.string "source_branch", :null => false
- t.integer "project_id", :null => false
+ t.string "target_branch", :null => false
+ t.string "source_branch", :null => false
+ t.integer "project_id", :null => false
t.integer "author_id"
t.integer "assignee_id"
t.string "title"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.boolean "closed", :default => false, :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.text "st_commits", :limit => 2147483647
t.text "st_diffs", :limit => 2147483647
+ t.boolean "merged", :default => false, :null => false
+ t.integer "state", :default => 1, :null => false
t.integer "milestone_id"
- t.string "state"
- t.string "merge_status"
end
add_index "merge_requests", ["assignee_id"], :name => "index_merge_requests_on_assignee_id"
add_index "merge_requests", ["author_id"], :name => "index_merge_requests_on_author_id"
+ add_index "merge_requests", ["closed"], :name => "index_merge_requests_on_closed"
add_index "merge_requests", ["created_at"], :name => "index_merge_requests_on_created_at"
add_index "merge_requests", ["milestone_id"], :name => "index_merge_requests_on_milestone_id"
add_index "merge_requests", ["project_id"], :name => "index_merge_requests_on_project_id"
@@ -93,26 +96,25 @@ ActiveRecord::Schema.define(:version => 20130325173941) do
add_index "merge_requests", ["title"], :name => "index_merge_requests_on_title"
create_table "milestones", :force => true do |t|
- t.string "title", :null => false
- t.integer "project_id", :null => false
+ t.string "title", :null => false
+ t.integer "project_id", :null => false
t.text "description"
t.date "due_date"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.string "state"
+ t.boolean "closed", :default => false, :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
add_index "milestones", ["due_date"], :name => "index_milestones_on_due_date"
add_index "milestones", ["project_id"], :name => "index_milestones_on_project_id"
create_table "namespaces", :force => true do |t|
- t.string "name", :null => false
- t.string "path", :null => false
- t.integer "owner_id", :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.string "name", :null => false
+ t.string "path", :null => false
+ t.integer "owner_id", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.string "type"
- t.string "description", :default => "", :null => false
end
add_index "namespaces", ["name"], :name => "index_namespaces_on_name"
@@ -143,19 +145,17 @@ ActiveRecord::Schema.define(:version => 20130325173941) do
t.string "name"
t.string "path"
t.text "description"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.boolean "private_flag", :default => true, :null => false
t.integer "creator_id"
t.string "default_branch"
- t.boolean "issues_enabled", :default => true, :null => false
- t.boolean "wall_enabled", :default => true, :null => false
- t.boolean "merge_requests_enabled", :default => true, :null => false
- t.boolean "wiki_enabled", :default => true, :null => false
+ t.boolean "issues_enabled", :default => true, :null => false
+ t.boolean "wall_enabled", :default => true, :null => false
+ t.boolean "merge_requests_enabled", :default => true, :null => false
+ t.boolean "wiki_enabled", :default => true, :null => false
t.integer "namespace_id"
- t.boolean "public", :default => false, :null => false
- t.string "issues_tracker", :default => "gitlab", :null => false
- t.string "issues_tracker_id"
- t.boolean "snippets_enabled", :default => true, :null => false
+ t.boolean "public", :default => false, :null => false
end
add_index "projects", ["creator_id"], :name => "index_projects_on_owner_id"
@@ -213,32 +213,6 @@ ActiveRecord::Schema.define(:version => 20130325173941) do
t.string "name"
end
- create_table "user_team_project_relationships", :force => true do |t|
- t.integer "project_id"
- t.integer "user_team_id"
- t.integer "greatest_access"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "user_team_user_relationships", :force => true do |t|
- t.integer "user_id"
- t.integer "user_team_id"
- t.boolean "group_admin"
- t.integer "permission"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "user_teams", :force => true do |t|
- t.string "name"
- t.string "path"
- t.integer "owner_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- t.string "description", :default => "", :null => false
- end
-
create_table "users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :default => "", :null => false
@@ -259,21 +233,19 @@ ActiveRecord::Schema.define(:version => 20130325173941) do
t.string "linkedin", :default => "", :null => false
t.string "twitter", :default => "", :null => false
t.string "authentication_token"
+ t.boolean "dark_scheme", :default => false, :null => false
t.integer "theme_id", :default => 1, :null => false
t.string "bio"
+ t.boolean "blocked", :default => false, :null => false
t.integer "failed_attempts", :default => 0
t.datetime "locked_at"
t.string "extern_uid"
t.string "provider"
t.string "username"
- t.boolean "can_create_group", :default => true, :null => false
- t.boolean "can_create_team", :default => true, :null => false
- t.string "state"
- t.integer "color_scheme_id", :default => 1, :null => false
- t.integer "notification_level", :default => 1, :null => false
end
add_index "users", ["admin"], :name => "index_users_on_admin"
+ add_index "users", ["blocked"], :name => "index_users_on_blocked"
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
add_index "users", ["extern_uid", "provider"], :name => "index_users_on_extern_uid_and_provider", :unique => true
add_index "users", ["name"], :name => "index_users_on_name"
diff --git a/doc/api/README.md b/doc/api/README.md
index c4d44c52..477429c9 100644
--- a/doc/api/README.md
+++ b/doc/api/README.md
@@ -1,6 +1,6 @@
# GitLab API
-All API requests require authentication. You need to pass a `private_token` parameter by url or header. If passed as header, the header name must be "PRIVATE-TOKEN" (capital and with dash instead of underscore). You can find or reset your private token in your profile.
+All API requests require authentication. You need to pass a `private_token` parameter by url or header. You can find or reset your private token in your profile.
If no, or an invalid, `private_token` is provided then an error message will be returned with status code 401:
@@ -10,7 +10,7 @@ If no, or an invalid, `private_token` is provided then an error message will be
}
```
-API requests should be prefixed with `api` and the API version. The API version is defined in `lib/api.rb`.
+API requests should be prefixed with `api` and the API version. The API version is equal to the GitLab major version number, which is defined in `lib/api.rb`.
Example of a valid API request:
@@ -18,48 +18,8 @@ Example of a valid API request:
GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U
```
-Example for a valid API request using curl and authentication via header:
-
-```
-curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" "http://example.com/api/v3/projects"
-```
-
-
The API uses JSON to serialize data. You don't need to specify `.json` at the end of API URL.
-
-
-## Status codes
-
-The API is designed to return different status codes according to context and action. In this way
-if a request results in an error the caller is able to get insight into what went wrong, e.g.
-status code `400 Bad Request` is returned if a required attribute is missing from the request.
-The following list gives an overview of how the API functions generally behave.
-
-API request types:
-
-* `GET` requests access one or more resources and return the result as JSON
-* `POST` requests return `201 Created` if the resource is successfully created and return the newly created resource as JSON
-* `GET`, `PUT` and `DELETE` return `200 Ok` if the resource is accessed, modified or deleted successfully, the (modified) result is returned as JSON
-* `DELETE` requests are designed to be idempotent, meaning a request a resource still returns `200 Ok` even it was deleted before or is not available. The reasoning behind it is the user is not really interested if the resource existed before or not.
-
-
-The following list shows the possible return codes for API requests.
-
-Return values:
-
-* `200 Ok` - The `GET`, `PUT` or `DELETE` request was successful, the resource(s) itself is returned as JSON
-* `201 Created` - The `POST` request was successful and the resource is returned as JSON
-* `400 Bad Request` - A required attribute of the API request is missing, e.g. the title of an issue is not given
-* `401 Unauthorized` - The user is not authenticated, a valid user token is necessary, see above
-* `403 Forbidden` - The request is not allowed, e.g. the user is not allowed to delete a project
-* `404 Not Found` - A resource could not be accessed, e.g. an ID for a resource could not be found
-* `405 Method Not Allowed` - The request is not supported
-* `409 Conflict` - A conflicting resource already exists, e.g. creating a project with a name that already exists
-* `500 Server Error` - While handling the request something went wrong on the server side
-
-
-
#### Pagination
When listing resources you can pass the following parameters:
@@ -72,10 +32,8 @@ When listing resources you can pass the following parameters:
+ [Users](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/users.md)
+ [Session](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/session.md)
+ [Projects](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/projects.md)
-+ [Groups](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/groups.md)
+ [Snippets](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/snippets.md)
+ [Repositories](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/repositories.md)
+ [Issues](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/issues.md)
+ [Milestones](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/milestones.md)
+ [Notes](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/notes.md)
-+ [System Hooks](https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/system_hooks.md)
diff --git a/doc/api/groups.md b/doc/api/groups.md
deleted file mode 100644
index e9702ea2..00000000
--- a/doc/api/groups.md
+++ /dev/null
@@ -1,57 +0,0 @@
-## List project groups
-
-Get a list of groups. (As user: my groups, as admin: all groups)
-
-```
-GET /groups
-```
-
-```json
-[
- {
- "id": 1,
- "name": "Foobar Group",
- "path": "foo-bar",
- "owner_id": 18
- }
-]
-```
-
-
-## Details of a group
-
-Get all details of a group.
-
-```
-GET /groups/:id
-```
-
-Parameters:
-
-+ `id` (required) - The ID of a group
-
-
-## New group
-
-Creates a new project group. Available only for admin.
-
-```
-POST /groups
-```
-
-Parameters:
-
-+ `name` (required) - The name of the group
-+ `path` (required) - The path of the group
-
-## Transfer project to group
-
-Transfer a project to the Group namespace. Available only for admin
-
-```
-POST /groups/:id/projects/:project_id
-```
-
-Parameters:
-+ `id` (required) - The ID of a group
-+ `project_id (required) - The ID of a project
diff --git a/doc/api/issues.md b/doc/api/issues.md
index a8ae7401..0383b676 100644
--- a/doc/api/issues.md
+++ b/doc/api/issues.md
@@ -1,7 +1,6 @@
## List issues
-Get all issues created by authenticed user. This function takes pagination parameters
-`page` and `per_page` to restrict the list of issues.
+Get all issues created by authenticed user.
```
GET /issues
@@ -69,11 +68,9 @@ GET /issues
]
```
-
## List project issues
-Get a list of project issues. This function accepts pagination parameters `page` and `per_page`
-to return the list of project issues.
+Get a list of project issues.
```
GET /projects/:id/issues
@@ -83,10 +80,9 @@ Parameters:
+ `id` (required) - The ID of a project
-
## Single issue
-Gets a single project issue.
+Get a project issue.
```
GET /projects/:id/issues/:issue_id
@@ -137,10 +133,9 @@ Parameters:
}
```
-
## New issue
-Creates a new project issue.
+Create a new project issue.
```
POST /projects/:id/issues
@@ -155,10 +150,11 @@ Parameters:
+ `milestone_id` (optional) - The ID of a milestone to assign issue
+ `labels` (optional) - Comma-separated label names for an issue
+Will return created issue with status `201 Created` on success, or `404 Not found` on fail.
## Edit issue
-Updates an existing project issue. This function is also used to mark an issue as closed.
+Update an existing project issue.
```
PUT /projects/:id/issues/:issue_id
@@ -175,19 +171,5 @@ Parameters:
+ `labels` (optional) - Comma-separated label names for an issue
+ `closed` (optional) - The state of an issue (0 = false, 1 = true)
-
-## Delete existing issue (**Deprecated**)
-
-The function is deprecated and returns a `405 Method Not Allowed`
-error if called. An issue gets now closed and is done by calling `PUT /projects/:id/issues/:issue_id` with
-parameter `closed` set to 1.
-
-```
-DELETE /projects/:id/issues/:issue_id
-```
-
-Parameters:
-
-+ `id` (required) - The project ID
-+ `issue_id` (required) - The ID of the issue
+Will return updated issue with status `200 OK` on success, or `404 Not found` on fail.
diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md
index 111c5211..525c55d1 100644
--- a/doc/api/merge_requests.md
+++ b/doc/api/merge_requests.md
@@ -1,7 +1,6 @@
## List merge requests
-Get all merge requests for this project. This function takes pagination parameters
-`page` and `per_page` to restrict the list of merge requests.
+Get all MR for this project.
```
GET /projects/:id/merge_requests
@@ -41,10 +40,9 @@ Parameters:
]
```
+## Show MR
-## Get single MR
-
-Shows information about a single merge request.
+Show information about MR.
```
GET /projects/:id/merge_request/:merge_request_id
@@ -86,7 +84,7 @@ Parameters:
## Create MR
-Creates a new merge request.
+Create MR.
```
POST /projects/:id/merge_requests
@@ -128,10 +126,9 @@ Parameters:
}
```
-
## Update MR
-Updates an existing merge request. You can change branches, title, or even close the MR.
+Update MR. You can change branches, title, or even close the MR.
```
PUT /projects/:id/merge_request/:merge_request_id
@@ -175,11 +172,9 @@ Parameters:
}
}
```
-
-
## Post comment to MR
-Adds a comment to a merge request.
+Post comment to MR
```
POST /projects/:id/merge_request/:merge_request_id/comments
@@ -188,9 +183,10 @@ POST /projects/:id/merge_request/:merge_request_id/comments
Parameters:
+ `id` (required) - The ID of a project
-+ `merge_request_id` (required) - ID of merge request
++ `merge_request_id` (required) - ID of MR
+ `note` (required) - Text of comment
+Will return created note with status `201 Created` on success, or `404 Not found` on fail.
```json
{
diff --git a/doc/api/milestones.md b/doc/api/milestones.md
index 92a29cee..b997e839 100644
--- a/doc/api/milestones.md
+++ b/doc/api/milestones.md
@@ -1,6 +1,6 @@
## List project milestones
-Returns a list of project milestones.
+Get a list of project milestones.
```
GET /projects/:id/milestones
@@ -10,10 +10,9 @@ Parameters:
+ `id` (required) - The ID of a project
+## Single milestone
-## Get single milestone
-
-Gets a single project milestone.
+Get a single project milestone.
```
GET /projects/:id/milestones/:milestone_id
@@ -24,10 +23,9 @@ Parameters:
+ `id` (required) - The ID of a project
+ `milestone_id` (required) - The ID of a project milestone
+## New milestone
-## Create new milestone
-
-Creates a new project milestone.
+Create a new project milestone.
```
POST /projects/:id/milestones
@@ -36,14 +34,14 @@ POST /projects/:id/milestones
Parameters:
+ `id` (required) - The ID of a project
++ `milestone_id` (required) - The ID of a project milestone
+ `title` (required) - The title of an milestone
+ `description` (optional) - The description of the milestone
+ `due_date` (optional) - The due date of the milestone
-
## Edit milestone
-Updates an existing project milestone.
+Update an existing project milestone.
```
PUT /projects/:id/milestones/:milestone_id
@@ -57,4 +55,3 @@ Parameters:
+ `description` (optional) - The description of a milestone
+ `due_date` (optional) - The due date of the milestone
+ `closed` (optional) - The status of the milestone
-
diff --git a/doc/api/notes.md b/doc/api/notes.md
index 4b57f636..bb33efb8 100644
--- a/doc/api/notes.md
+++ b/doc/api/notes.md
@@ -1,4 +1,4 @@
-## Wall
+## List notes
### List project wall notes
@@ -30,40 +30,9 @@ Parameters:
+ `id` (required) - The ID of a project
+### List issue notes
-### Get single wall note
-
-Returns a single wall note.
-
-```
-GET /projects/:id/notes/:note_id
-```
-
-Parameters:
-
-+ `id` (required) - The ID of a project
-+ `note_id` (required) - The ID of a wall note
-
-
-### Create new wall note
-
-Creates a new wall note.
-
-```
-POST /projects/:id/notes
-```
-
-Parameters:
-
-+ `id` (required) - The ID of a project
-+ `body` (required) - The content of a note
-
-
-## Issues
-
-### List project issue notes
-
-Gets a list of all notes for a single issue.
+Get a list of issue notes.
```
GET /projects/:id/issues/:issue_id/notes
@@ -74,13 +43,40 @@ Parameters:
+ `id` (required) - The ID of a project
+ `issue_id` (required) - The ID of an issue
+### List snippet notes
-### Get single issue note
-
-Returns a single note for a specific project issue
+Get a list of snippet notes.
```
-GET /projects/:id/issues/:issue_id/notes/:note_id
+GET /projects/:id/snippets/:snippet_id/notes
+```
+
+Parameters:
+
++ `id` (required) - The ID of a project
++ `snippet_id` (required) - The ID of a snippet
+
+## Single note
+
+### Single wall note
+
+Get a wall note.
+
+```
+GET /projects/:id/notes/:note_id
+```
+
+Parameters:
+
++ `id` (required) - The ID of a project
++ `note_id` (required) - The ID of a wall note
+
+### Single issue note
+
+Get an issue note.
+
+```
+GET /projects/:id/issues/:issue_id/:notes/:note_id
```
Parameters:
@@ -89,10 +85,41 @@ Parameters:
+ `issue_id` (required) - The ID of a project issue
+ `note_id` (required) - The ID of an issue note
+### Single snippet note
-### Create new issue note
+Get a snippet note.
-Creates a new note to a single project issue.
+```
+GET /projects/:id/issues/:snippet_id/:notes/:note_id
+```
+
+Parameters:
+
++ `id` (required) - The ID of a project
++ `snippet_id` (required) - The ID of a project snippet
++ `note_id` (required) - The ID of an snippet note
+
+## New note
+
+### New wall note
+
+Create a new wall note.
+
+```
+POST /projects/:id/notes
+```
+
+Parameters:
+
++ `id` (required) - The ID of a project
++ `body` (required) - The content of a note
+
+Will return created note with status `201 Created` on success, or `404 Not found` on fail.
+
+
+### New issue note
+
+Create a new issue note.
```
POST /projects/:id/issues/:issue_id/notes
@@ -104,41 +131,11 @@ Parameters:
+ `issue_id` (required) - The ID of an issue
+ `body` (required) - The content of a note
+Will return created note with status `201 Created` on success, or `404 Not found` on fail.
-## Snippets
+### New snippet note
-### List all snippet notes
-
-Gets a list of all notes for a single snippet. Snippet notes are comments users can post to a snippet.
-
-```
-GET /projects/:id/snippets/:snippet_id/notes
-```
-
-Parameters:
-
-+ `id` (required) - The ID of a project
-+ `snippet_id` (required) - The ID of a project snippet
-
-
-### Get single snippet note
-
-Returns a single note for a given snippet.
-
-```
-GET /projects/:id/snippets/:snippet_id/notes/:note_id
-```
-
-Parameters:
-
-+ `id` (required) - The ID of a project
-+ `snippet_id` (required) - The ID of a project snippet
-+ `note_id` (required) - The ID of an snippet note
-
-
-### Create new snippet note
-
-Creates a new note for a single snippet. Snippet notes are comments users can post to a snippet.
+Create a new snippet note.
```
POST /projects/:id/snippets/:snippet_id/notes
@@ -150,49 +147,4 @@ Parameters:
+ `snippet_id` (required) - The ID of an snippet
+ `body` (required) - The content of a note
-
-## Merge Requests
-
-### List all merge request notes
-
-Gets a list of all notes for a single merge request.
-
-```
-GET /projects/:id/merge_requests/:merge_request_id/notes
-```
-
-Parameters:
-
-+ `id` (required) - The ID of a project
-+ `merge_request_id` (required) - The ID of a project merge request
-
-
-### Get single merge request note
-
-Returns a single note for a given merge request.
-
-```
-GET /projects/:id/merge_requests/:merge_request_id/notes/:note_id
-```
-
-Parameters:
-
-+ `id` (required) - The ID of a project
-+ `merge_request_id` (required) - The ID of a project merge request
-+ `note_id` (required) - The ID of a merge request note
-
-
-### Create new merge request note
-
-Creates a new note for a single merge request.
-
-```
-POST /projects/:id/merge_requests/:merge_request_id/notes
-```
-
-Parameters:
-
-+ `id` (required) - The ID of a project
-+ `merge_request_id` (required) - The ID of a merge request
-+ `body` (required) - The content of a note
-
+Will return created note with status `201 Created` on success, or `404 Not found` on fail.
diff --git a/doc/api/projects.md b/doc/api/projects.md
index d6a9a885..41128675 100644
--- a/doc/api/projects.md
+++ b/doc/api/projects.md
@@ -1,6 +1,4 @@
-## Projects
-
-### List projects
+## List projects
Get a list of projects owned by the authenticated user.
@@ -23,9 +21,7 @@ GET /projects
"blocked": false,
"created_at": "2012-05-23T08:00:58Z"
},
- "public": true,
- "path": "rails",
- "path_with_namespace": "rails/rails",
+ "private": true,
"issues_enabled": false,
"merge_requests_enabled": false,
"wall_enabled": true,
@@ -45,9 +41,7 @@ GET /projects
"blocked": false,
"created_at": "2012-05-23T08:00:58Z"
},
- "public": true,
- "path": "gitlab",
- "path_with_namespace": "randx/gitlab",
+ "private": true,
"issues_enabled": true,
"merge_requests_enabled": true,
"wall_enabled": true,
@@ -57,11 +51,9 @@ GET /projects
]
```
+## Single project
-### Get single project
-
-Get a specific project, identified by project ID or NAME, which is owned by the authentication user.
-Currently namespaced projects cannot retrieved by name.
+Get a specific project, identified by project ID, which is owned by the authentication user.
```
GET /projects/:id
@@ -69,7 +61,7 @@ GET /projects/:id
Parameters:
-+ `id` (required) - The ID or NAME of a project
++ `id` (required) - The ID of a project
```json
{
@@ -85,9 +77,7 @@ Parameters:
"blocked": false,
"created_at": "2012-05-23T08:00:58Z"
},
- "public": true,
- "path": "gitlab",
- "path_with_namespace": "randx/gitlab",
+ "private": true,
"issues_enabled": true,
"merge_requests_enabled": true,
"wall_enabled": true,
@@ -96,10 +86,9 @@ Parameters:
}
```
+## Create project
-### Create project
-
-Creates new project owned by user.
+Create new project owned by user
```
POST /projects
@@ -115,42 +104,10 @@ Parameters:
+ `merge_requests_enabled` (optional) - enabled by default
+ `wiki_enabled` (optional) - enabled by default
-**Project access levels**
+Will return created project with status `201 Created` on success, or `404 Not
+found` on fail.
-The project access levels are defined in the `user_project.rb` class. Currently, these levels are recoginized:
-
-```
- GUEST = 10
- REPORTER = 20
- DEVELOPER = 30
- MASTER = 40
-```
-
-
-### Create project for user
-
-Creates a new project owned by user. Available only for admins.
-
-```
-POST /projects/user/:user_id
-```
-
-Parameters:
-
-+ `user_id` (required) - user_id of owner
-+ `name` (required) - new project name
-+ `description` (optional) - short project description
-+ `default_branch` (optional) - 'master' by default
-+ `issues_enabled` (optional) - enabled by default
-+ `wall_enabled` (optional) - enabled by default
-+ `merge_requests_enabled` (optional) - enabled by default
-+ `wiki_enabled` (optional) - enabled by default
-
-
-
-## Team members
-
-### List project team members
+## List project team members
Get a list of project team members.
@@ -160,13 +117,12 @@ GET /projects/:id/members
Parameters:
-+ `id` (required) - The ID or NAME of a project
-+ `query` (optional) - Query string to search for members
++ `id` (required) - The ID of a project
++ `query` - Query string
+## Get project team member
-### Get project team member
-
-Gets a project team member.
+Get a project team member.
```
GET /projects/:id/members/:user_id
@@ -174,11 +130,12 @@ GET /projects/:id/members/:user_id
Parameters:
-+ `id` (required) - The ID or NAME of a project
++ `id` (required) - The ID of a project
+ `user_id` (required) - The ID of a user
```json
{
+
"id": 1,
"username": "john_smith",
"email": "john@example.com",
@@ -189,12 +146,9 @@ Parameters:
}
```
+## Add project team member
-### Add project team member
-
-Adds a user to a project team. This is an idempotent method and can be called multiple times
-with the same parameters. Adding team membership to a user that is already a member does not
-affect the existing membership.
+Add a user to a project team.
```
POST /projects/:id/members
@@ -202,14 +156,15 @@ POST /projects/:id/members
Parameters:
-+ `id` (required) - The ID or NAME of a project
++ `id` (required) - The ID of a project
+ `user_id` (required) - The ID of a user to add
+ `access_level` (required) - Project access level
+Will return status `201 Created` on success, or `404 Not found` on fail.
-### Edit project team member
+## Edit project team member
-Updates project team member to a specified access level.
+Update project team member to specified access level.
```
PUT /projects/:id/members/:user_id
@@ -217,12 +172,13 @@ PUT /projects/:id/members/:user_id
Parameters:
-+ `id` (required) - The ID or NAME of a project
++ `id` (required) - The ID of a project
+ `user_id` (required) - The ID of a team member
+ `access_level` (required) - Project access level
+Will return status `200 OK` on success, or `404 Not found` on fail.
-### Remove project team member
+## Remove project team member
Removes user from project team.
@@ -232,20 +188,14 @@ DELETE /projects/:id/members/:user_id
Parameters:
-+ `id` (required) - The ID or NAME of a project
++ `id` (required) - The ID of a project
+ `user_id` (required) - The ID of a team member
-This method is idempotent and can be called multiple times with the same parameters.
-Revoking team membership for a user who is not currently a team member is considered success.
-Please note that the returned JSON currently differs slightly. Thus you should not
-rely on the returned JSON structure.
+Status code `200` will be returned on success.
+## List project hooks
-## Hooks
-
-### List project hooks
-
-Get list of project hooks.
+Get list for project hooks
```
GET /projects/:id/hooks
@@ -253,12 +203,13 @@ GET /projects/:id/hooks
Parameters:
-+ `id` (required) - The ID or NAME of a project
++ `id` (required) - The ID of a project
+Will return hooks with status `200 OK` on success, or `404 Not found` on fail.
-### Get project hook
+## Get project hook
-Get a specific hook for project.
+Get hook for project
```
GET /projects/:id/hooks/:hook_id
@@ -266,21 +217,14 @@ GET /projects/:id/hooks/:hook_id
Parameters:
-+ `id` (required) - The ID or NAME of a project
++ `id` (required) - The ID of a project
+ `hook_id` (required) - The ID of a project hook
-```json
-{
- "id": 1,
- "url": "http://example.com/hook",
- "created_at": "2012-10-12T17:04:47Z"
-}
-```
+Will return hook with status `200 OK` on success, or `404 Not found` on fail.
+## Add project hook
-### Add project hook
-
-Adds a hook to project.
+Add hook to project
```
POST /projects/:id/hooks
@@ -288,13 +232,14 @@ POST /projects/:id/hooks
Parameters:
-+ `id` (required) - The ID or NAME of a project
++ `id` (required) - The ID of a project
+ `url` (required) - The hook URL
+Will return status `201 Created` on success, or `404 Not found` on fail.
-### Edit project hook
+## Edit project hook
-Edits a hook for project.
+Edit hook for project
```
PUT /projects/:id/hooks/:hook_id
@@ -302,205 +247,24 @@ PUT /projects/:id/hooks/:hook_id
Parameters:
-+ `id` (required) - The ID or NAME of a project
++ `id` (required) - The ID of a project
+ `hook_id` (required) - The ID of a project hook
+ `url` (required) - The hook URL
+Will return status `201 Created` on success, or `404 Not found` on fail.
-### Delete project hook
-Removes a hook from project. This is an idempotent method and can be called multiple times.
-Either the hook is available or not.
+## Delete project hook
+
+Delete hook from project
```
-DELETE /projects/:id/hooks/
+DELETE /projects/:id/hooks
```
Parameters:
-+ `id` (required) - The ID or NAME of a project
++ `id` (required) - The ID of a project
+ `hook_id` (required) - The ID of hook to delete
-Note the JSON response differs if the hook is available or not. If the project hook
-is available before it is returned in the JSON response or an empty response is returned.
-
-
-## Branches
-
-### List branches
-
-Lists all branches of a project.
-
-```
-GET /projects/:id/repository/branches
-```
-
-Parameters:
-
-+ `id` (required) - The ID of the project
-
-
-### List single branch
-
-Lists a specific branch of a project.
-
-```
-GET /projects/:id/repository/branches/:branch
-```
-
-Parameters:
-
-+ `id` (required) - The ID of the project.
-+ `branch` (required) - The name of the branch.
-
-
-### Protect single branch
-
-Protects a single branch of a project.
-
-```
-PUT /projects/:id/repository/branches/:branch/protect
-```
-
-Parameters:
-
-+ `id` (required) - The ID of the project.
-+ `branch` (required) - The name of the branch.
-
-
-### Unprotect single branch
-
-Unprotects a single branch of a project.
-
-```
-PUT /projects/:id/repository/branches/:branch/unprotect
-```
-
-Parameters:
-
-+ `id` (required) - The ID of the project.
-+ `branch` (required) - The name of the branch.
-
-
-### List tags
-
-Lists all tags of a project.
-
-```
-GET /projects/:id/repository/tags
-```
-
-Parameters:
-
-+ `id` (required) - The ID of the project
-
-
-### List commits
-
-Lists all commits with pagination. If the optional `ref_name` name is not given the commits of
-the default branch (usually master) are returned.
-
-```
-GET /projects/:id/repository/commits
-```
-
-Parameters:
-
-+ `id` (required) - The Id of the project
-+ `ref_name` (optional) - The name of a repository branch or tag
-+ `page` (optional) - The page of commits to return (`0` default)
-+ `per_page` (optional) - The number of commits per page (`20` default)
-
-Returns values:
-
-+ `200 Ok` on success and a list with commits
-+ `404 Not Found` if project with id or the branch with `ref_name` not found
-
-
-
-## Deploy Keys
-
-### List deploy keys
-
-Get a list of a project's deploy keys.
-
-```
-GET /projects/:id/keys
-```
-
-Parameters:
-
-+ `id` (required) - The ID of the project
-
-```json
-[
- {
- "id": 1,
- "title" : "Public key"
- "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4
- 596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4
- soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
- },
- {
- "id": 3,
- "title" : "Another Public key"
- "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4
- 596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4
- soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0="
- }
-]
-```
-
-
-### Single deploy key
-
-Get a single key.
-
-```
-GET /projects/:id/keys/:key_id
-```
-
-Parameters:
-
-+ `id` (required) - The ID of the project
-+ `key_id` (required) - The ID of the deploy key
-
-```json
-{
- "id": 1,
- "title" : "Public key"
- "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4
- 596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4
- soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0="
-}
-```
-
-
-### Add deploy key
-
-Creates a new deploy key for a project.
-
-```
-POST /projects/:id/keys
-```
-
-Parameters:
-
-+ `id` (required) - The ID of the project
-+ `title` (required) - New deploy key's title
-+ `key` (required) - New deploy key
-
-
-### Delete deploy key
-
-Delete a deploy key from a project
-
-```
-DELETE /projects/:id/keys/:key_id
-```
-
-Parameters:
-
-+ `id` (required) - The ID of the project
-+ `key_id` (required) - The ID of the deploy key
-
+Will return status `200 OK` on success, or `404 Not found` on fail.
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index 90fda387..685797ad 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -1,4 +1,4 @@
-## List repository branches
+## Project repository branches
Get a list of repository branches from a project, sorted by name alphabetically.
@@ -33,14 +33,12 @@ Parameters:
},
"authored_date": "2012-06-27T05:51:39-07:00",
"committed_date": "2012-06-28T03:44:20-07:00"
- },
- "protected": true
+ }
}
]
```
-
-## Get single repository branch
+## Project repository branch
Get a single project repository branch.
@@ -75,97 +73,11 @@ Parameters:
},
"authored_date": "2012-06-27T05:51:39-07:00",
"committed_date": "2012-06-28T03:44:20-07:00"
- },
- "protected": true
+ }
}
```
-
-## Protect repository branch
-
-Protects a single project repository branch. This is an idempotent function, protecting an already
-protected repository branch still returns a `200 Ok` status code.
-
-```
-PUT /projects/:id/repository/branches/:branch/protect
-```
-
-Parameters:
-
-+ `id` (required) - The ID of a project
-+ `branch` (required) - The name of the branch
-
-```json
-{
- "name": "master",
- "commit": {
- "id": "7b5c3cc8be40ee161ae89a06bba6229da1032a0c",
- "parents": [
- {
- "id": "4ad91d3c1144c406e50c7b33bae684bd6837faf8"
- }
- ],
- "tree": "46e82de44b1061621357f24c05515327f2795a95",
- "message": "add projects API",
- "author": {
- "name": "John Smith",
- "email": "john@example.com"
- },
- "committer": {
- "name": "John Smith",
- "email": "john@example.com"
- },
- "authored_date": "2012-06-27T05:51:39-07:00",
- "committed_date": "2012-06-28T03:44:20-07:00"
- },
- "protected": true
-}
-```
-
-
-## Unprotect repository branch
-
-Unprotects a single project repository branch. This is an idempotent function, unprotecting an already
-unprotected repository branch still returns a `200 Ok` status code.
-
-```
-PUT /projects/:id/repository/branches/:branch/unprotect
-```
-
-Parameters:
-
-+ `id` (required) - The ID of a project
-+ `branch` (required) - The name of the branch
-
-```json
-{
- "name": "master",
- "commit": {
- "id": "7b5c3cc8be40ee161ae89a06bba6229da1032a0c",
- "parents": [
- {
- "id": "4ad91d3c1144c406e50c7b33bae684bd6837faf8"
- }
- ],
- "tree": "46e82de44b1061621357f24c05515327f2795a95",
- "message": "add projects API",
- "author": {
- "name": "John Smith",
- "email": "john@example.com"
- },
- "committer": {
- "name": "John Smith",
- "email": "john@example.com"
- },
- "authored_date": "2012-06-27T05:51:39-07:00",
- "committed_date": "2012-06-28T03:44:20-07:00"
- },
- "protected": false
-}
-```
-
-
-## List project repository tags
+## Project repository tags
Get a list of repository tags from a project, sorted by name in reverse alphabetical order.
@@ -198,14 +110,12 @@ Parameters:
},
"authored_date": "2012-05-28T04:42:42-07:00",
"committed_date": "2012-05-28T04:42:42-07:00"
- },
- "protected": null
+ }
}
]
```
-
-## List repository commits
+## Project repository commits
Get a list of repository commits in a project.
@@ -216,7 +126,7 @@ GET /projects/:id/repository/commits
Parameters:
+ `id` (required) - The ID of a project
-+ `ref_name` (optional) - The name of a repository branch or tag or if not given the default branch
++ `ref_name` (optional) - The name of a repository branch or tag
```json
[
@@ -239,7 +149,6 @@ Parameters:
]
```
-
## Raw blob content
Get the raw file contents for a file.
@@ -253,3 +162,5 @@ Parameters:
+ `id` (required) - The ID of a project
+ `sha` (required) - The commit or branch name
+ `filepath` (required) - The path the file
+
+Will return the raw file contents.
diff --git a/doc/api/session.md b/doc/api/session.md
index d68788d5..c7e57aac 100644
--- a/doc/api/session.md
+++ b/doc/api/session.md
@@ -17,17 +17,7 @@ Parameters:
"email": "john@example.com",
"name": "John Smith",
"private_token": "dd34asd13as",
- "blocked": false,
"created_at": "2012-05-23T08:00:58Z",
- "bio": null,
- "skype": "",
- "linkedin": "",
- "twitter": "",
- "dark_scheme": false,
- "theme_id": 1
- "is_admin": false,
- "can_create_group" : true,
- "can_create_team" : true,
- "can_create_project" : true
+ "blocked": true
}
```
diff --git a/doc/api/snippets.md b/doc/api/snippets.md
index 04ea367d..ceb8a63d 100644
--- a/doc/api/snippets.md
+++ b/doc/api/snippets.md
@@ -10,10 +10,9 @@ Parameters:
+ `id` (required) - The ID of a project
-
## Single snippet
-Get a single project snippet.
+Get a project snippet.
```
GET /projects/:id/snippets/:snippet_id
@@ -43,10 +42,22 @@ Parameters:
}
```
+## Snippet content
-## Create new snippet
+Get a raw project snippet.
-Creates a new project snippet. The user must have permission to create new snippets.
+```
+GET /projects/:id/snippets/:snippet_id/raw
+```
+
+Parameters:
+
++ `id` (required) - The ID of a project
++ `snippet_id` (required) - The ID of a project's snippet
+
+## New snippet
+
+Create a new project snippet.
```
POST /projects/:id/snippets
@@ -60,10 +71,11 @@ Parameters:
+ `lifetime` (optional) - The expiration date of a snippet
+ `code` (required) - The content of a snippet
+Will return created snippet with status `201 Created` on success, or `404 Not found` on fail.
-## Update snippet
+## Edit snippet
-Updates an existing project snippet. The user must have permission to change an existing snippet.
+Update an existing project snippet.
```
PUT /projects/:id/snippets/:snippet_id
@@ -78,11 +90,11 @@ Parameters:
+ `lifetime` (optional) - The expiration date of a snippet
+ `code` (optional) - The content of a snippet
+Will return updated snippet with status `200 OK` on success, or `404 Not found` on fail.
## Delete snippet
-Deletes an existing project snippet. This is an idempotent function and deleting a non-existent
-snippet still returns a `200 Ok` status code.
+Delete existing project snippet.
```
DELETE /projects/:id/snippets/:snippet_id
@@ -93,16 +105,5 @@ Parameters:
+ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project's snippet
+Status code `200` will be returned on success.
-## Snippet content
-
-Returns the raw project snippet as plain text.
-
-```
-GET /projects/:id/snippets/:snippet_id/raw
-```
-
-Parameters:
-
-+ `id` (required) - The ID of a project
-+ `snippet_id` (required) - The ID of a project's snippet
diff --git a/doc/api/system_hooks.md b/doc/api/system_hooks.md
deleted file mode 100644
index dca22c43..00000000
--- a/doc/api/system_hooks.md
+++ /dev/null
@@ -1,49 +0,0 @@
-All methods require admin authorization.
-
-## List system hooks
-
-Get list of system hooks
-
-```
-GET /hooks
-```
-
-Parameters:
-
-+ **none**
-
-
-## Add new system hook hook
-
-```
-POST /hooks
-```
-
-Parameters:
-
-+ `url` (required) - The hook URL
-
-
-## Test system hook
-
-```
-GET /hooks/:id
-```
-
-Parameters:
-
-+ `id` (required) - The ID of hook
-
-
-## Delete system hook
-
-Deletes a system hook. This is an idempotent API function and returns `200 Ok` even if the hook
-is not available. If the hook is deleted it is also returned as JSON.
-
-```
-DELETE /hooks/:id
-```
-
-Parameters:
-
-+ `id` (required) - The ID of hook
diff --git a/doc/api/users.md b/doc/api/users.md
index c05bcb3e..200c0e06 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -20,8 +20,6 @@ GET /users
"linkedin": "",
"twitter": "",
"dark_scheme": false,
- "extern_uid": "john.smith",
- "provider": "provider_name",
"theme_id": 1
},
{
@@ -36,14 +34,11 @@ GET /users
"linkedin": "",
"twitter": "",
"dark_scheme": true,
- "extern_uid": "jack.smith",
- "provider": "provider_name",
"theme_id": 1
}
]
```
-
## Single user
Get a single user.
@@ -69,80 +64,33 @@ Parameters:
"linkedin": "",
"twitter": "",
"dark_scheme": false,
- "extern_uid": "john.smith",
- "provider": "provider_name",
"theme_id": 1
}
```
-
## User creation
-
-Creates a new user. Note only administrators can create new users.
+Create user. Available only for admin
```
POST /users
```
Parameters:
-
-+ `email` (required) - Email
-+ `password` (required) - Password
-+ `username` (required) - Username
-+ `name` (required) - Name
-+ `skype` (optional) - Skype ID
-+ `linkedin` (optional) - Linkedin
-+ `twitter` (optional) - Twitter account
-+ `projects_limit` (optional) - Number of projects user can create
-+ `extern_uid` (optional) - External UID
-+ `provider` (optional) - External provider name
-+ `bio` (optional) - User's bio
-
-
-## User modification
-
-Modifies an existing user. Only administrators can change attributes of a user.
-
-```
-PUT /users/:id
-```
-
-Parameters:
-
-+ `email` - Email
-+ `username` - Username
-+ `name` - Name
-+ `password` - Password
++ `email` (required) - Email
++ `password` (required) - Password
++ `username` (required) - Username
++ `name` (required) - Name
+ `skype` - Skype ID
+ `linkedin` - Linkedin
+ `twitter` - Twitter account
-+ `projects_limit` - Limit projects each user can create
-+ `extern_uid` - External UID
-+ `provider` - External provider name
-+ `bio` - User's bio
-
-Note, at the moment this method does only return a 404 error, even in cases where a 409 (Conflict) would
-be more appropriate, e.g. when renaming the email address to some exsisting one.
-
-
-## User deletion
-
-Deletes a user. Available only for administrators. This is an idempotent function, calling this function
-for a non-existent user id still returns a status code `200 Ok`. The JSON response differs if the user
-was actually deleted or not. In the former the user is returned and in the latter not.
-
-```
-DELETE /users/:id
-```
-
-Parameters:
-
-+ `id` (required) - The ID of the user
++ `projects_limit` - Number of projects user can create
+Will return created user with status `201 Created` on success, or `404 Not
+found` on fail.
## Current user
-Gets currently authenticated user.
+Get currently authenticated user.
```
GET /user
@@ -154,7 +102,6 @@ GET /user
"username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
- "private_token": "dd34asd13as",
"blocked": false,
"created_at": "2012-05-23T08:00:58Z",
"bio": null,
@@ -163,14 +110,9 @@ GET /user
"twitter": "",
"dark_scheme": false,
"theme_id": 1
- "is_admin": false,
- "can_create_group" : true,
- "can_create_team" : true,
- "can_create_project" : true
}
```
-
## List SSH keys
Get a list of currently authenticated user's SSH keys.
@@ -198,11 +140,6 @@ GET /user/keys
]
```
-Parameters:
-
-+ **none**
-
-
## Single SSH key
Get a single key.
@@ -224,11 +161,9 @@ Parameters:
soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0="
}
```
-
-
## Add SSH key
-Creates a new key owned by the currently authenticated user.
+Create new key owned by currently authenticated user
```
POST /user/keys
@@ -239,28 +174,12 @@ Parameters:
+ `title` (required) - new SSH Key's title
+ `key` (required) - new SSH key
-
-## Add SSH key for user
-
-Create new key owned by specified user. Available only for admin
-
-```
-POST /users/:id/keys
-```
-
-Parameters:
-
-+ `id` (required) - id of specified user
-+ `title` (required) - new SSH Key's title
-+ `key` (required) - new SSH key
-
Will return created key with status `201 Created` on success, or `404 Not
found` on fail.
## Delete SSH key
-Deletes key owned by currently authenticated user. This is an idempotent function and calling it on a key that is already
-deleted or not available results in `200 Ok`.
+Delete key owned by currently authenticated user
```
DELETE /user/keys/:id
@@ -270,3 +189,4 @@ Parameters:
+ `id` (required) - SSH key ID
+Will return `200 OK` on success, or `404 Not Found` on fail.
diff --git a/doc/code/apple-touch-icon.png b/doc/code/apple-touch-icon.png
new file mode 100644
index 00000000..50f98b0f
Binary files /dev/null and b/doc/code/apple-touch-icon.png differ
diff --git a/doc/code/classes/Ability.html b/doc/code/classes/Ability.html
new file mode 100644
index 00000000..c50e5d3e
--- /dev/null
+++ b/doc/code/classes/Ability.html
@@ -0,0 +1,507 @@
+
+
+
+
+ Ability
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Ability
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ G
+
+
+
+
+ P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
allowed (object, subject)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def allowed (object , subject )
+ case subject .class .name
+ when "Project" then project_abilities (object , subject )
+ when "Issue" then issue_abilities (object , subject )
+ when "Note" then note_abilities (object , subject )
+ when "Snippet" then snippet_abilities (object , subject )
+ when "MergeRequest" then merge_request_abilities (object , subject )
+ when "Group" then group_abilities (object , subject )
+ else []
+ end
+end
+
+
+
+
+
+
+
+
+
group_abilities (user, group)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def group_abilities user , group
+ rules = []
+
+ rules << [
+ :manage_group
+ ] if group .owner == user
+
+ rules .flatten
+end
+
+
+
+
+
+
+
+
+
project_abilities (user, project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_abilities (user , project )
+ rules = []
+
+
+ if project .master_access_for? (user )
+ rules << project_master_rules
+
+ elsif project .dev_access_for? (user )
+ rules << project_dev_rules
+
+ elsif project .report_access_for? (user )
+ rules << project_report_rules
+
+ elsif project .guest_access_for? (user )
+ rules << project_guest_rules
+ end
+
+ if project .namespace
+
+
+ if project .namespace .owner == user
+ rules << project_admin_rules
+ end
+ else
+
+
+ if project .owner == user
+ rules << project_admin_rules
+ end
+ end
+
+
+ rules .flatten
+end
+
+
+
+
+
+
+
+
+
project_admin_rules ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_admin_rules
+ project_master_rules + [
+ :change_namespace ,
+ :rename_project ,
+ :remove_project
+ ]
+end
+
+
+
+
+
+
+
+
+
project_dev_rules ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_dev_rules
+ project_report_rules + [
+ :write_wiki ,
+ :push_code
+ ]
+end
+
+
+
+
+
+
+
+
+
project_guest_rules ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_guest_rules
+ [
+ :read_project ,
+ :read_wiki ,
+ :read_issue ,
+ :read_milestone ,
+ :read_snippet ,
+ :read_team_member ,
+ :read_merge_request ,
+ :read_note ,
+ :write_project ,
+ :write_issue ,
+ :write_note
+ ]
+end
+
+
+
+
+
+
+
+
+
project_master_rules ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_master_rules
+ project_dev_rules + [
+ :push_code_to_protected_branches ,
+ :modify_issue ,
+ :modify_snippet ,
+ :modify_merge_request ,
+ :admin_issue ,
+ :admin_milestone ,
+ :admin_snippet ,
+ :admin_team_member ,
+ :admin_merge_request ,
+ :admin_note ,
+ :accept_mr ,
+ :admin_wiki ,
+ :admin_project
+ ]
+end
+
+
+
+
+
+
+
+
+
project_report_rules ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_report_rules
+ project_guest_rules + [
+ :download_code ,
+ :write_merge_request ,
+ :write_snippet
+ ]
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Account.html b/doc/code/classes/Account.html
new file mode 100644
index 00000000..21119cc8
--- /dev/null
+++ b/doc/code/classes/Account.html
@@ -0,0 +1,1032 @@
+
+
+
+
+ Account
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Account
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+ F
+
+
+
+
+ I
+
+
+
+
+ L
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
abilities ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def abilities
+ @abilities ||= begin
+ abilities = Six .new
+ abilities << Ability
+ abilities
+ end
+end
+
+
+
+
+
+
+
+
+
authorized_groups ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorized_groups
+ @authorized_groups ||= begin
+ groups = Group .where (id : self .projects .pluck (:namespace_id )).all
+ groups = groups + self .groups
+ groups .uniq
+ end
+end
+
+
+
+
+
+
+
+
+
authorized_projects ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorized_projects
+ Project .authorized_for (self )
+end
+
+
+
+
+
+
+
+
+
+
+
Remove user from all projects and set blocked attribute to true
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def block
+ users_projects .find_each do | membership |
+ return false unless membership .destroy
+ end
+
+ self .blocked = true
+ save
+end
+
+
+
+
+
+
+
+
+
can? (action, subject)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def can? action , subject
+ abilities .allowed? (self , action , subject )
+end
+
+
+
+
+
+
+
+
+
can_create_group? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def can_create_group?
+ is_admin?
+end
+
+
+
+
+
+
+
+
+
can_create_project? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def can_create_project?
+ projects_limit > my_own_projects .count
+end
+
+
+
+
+
+
+
+
+
cared_merge_requests ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def cared_merge_requests
+ MergeRequest .where ("author_id = :id or assignee_id = :id" , id : self .id )
+end
+
+
+
+
+
+
+
+
+
first_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def first_name
+ name .split .first unless name .blank?
+end
+
+
+
+
+
+
+
+
+
identifier ()
+
+
Link
+
+
+
+
+
Returns a string for use as a Gitolite user identifier
+
+
Note that Gitolite 2.x requires the following
+pattern for users:
+
+
^@?[0-9a-zA-Z][0-9a-zA-Z._\@+-]*$
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def identifier
+
+
+ email .gsub (%r\W/ , '_' ).gsub (%r\A([\W\_])+/ , '' )
+end
+
+
+
+
+
+
+
+
+
is_admin? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def is_admin?
+ admin
+end
+
+
+
+
+
+
+
+
+
last_activity_project ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def last_activity_project
+ projects .first
+end
+
+
+
+
+
+
+
+
+
my_own_projects ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def my_own_projects
+ Project .personal (self )
+end
+
+
+
+
+
+
+
+
+
namespace_id ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def namespace_id
+ namespace .try :id
+end
+
+
+
+
+
+
+
+
+
namespaces ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def namespaces
+ namespaces = []
+
+
+ namespaces << self .namespace if self .namespace
+
+
+ namespaces += if admin
+ Group .all
+ else
+ groups .all
+ end
+ namespaces
+end
+
+
+
+
+
+
+
+
+
project_ids ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_ids
+ projects .map (&:id )
+end
+
+
+
+
+
+
+
+
+
projects_limit_percent ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def projects_limit_percent
+ return 100 if projects_limit .zero?
+ (my_own_projects .count .to_f / projects_limit ) * 100
+end
+
+
+
+
+
+
+
+
+
projects_sorted_by_activity ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def projects_sorted_by_activity
+ projects .sorted_by_activity
+end
+
+
+
+
+
+
+
+
+
recent_push (project_id = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def recent_push project_id = nil
+
+ events = recent_events .code_push .where ("created_at > ?" , Time .now - 2 .hours )
+ events = events .where (project_id : project_id ) if project_id
+
+
+ events = events .recent .limit (1 ).first
+end
+
+
+
+
+
+
+
+
+
require_ssh_key? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def require_ssh_key?
+ keys .count == 0
+end
+
+
+
+
+
+
+
+
+
several_namespaces? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def several_namespaces?
+ namespaces .size > 1
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ActiveRecord.html b/doc/code/classes/ActiveRecord.html
new file mode 100644
index 00000000..fdf88c1c
--- /dev/null
+++ b/doc/code/classes/ActiveRecord.html
@@ -0,0 +1,79 @@
+
+
+
+
+ ActiveRecord
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ ActiveRecord
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters.html b/doc/code/classes/ActiveRecord/ConnectionAdapters.html
new file mode 100644
index 00000000..ec389166
--- /dev/null
+++ b/doc/code/classes/ActiveRecord/ConnectionAdapters.html
@@ -0,0 +1,86 @@
+
+
+
+
+ ActiveRecord::ConnectionAdapters
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ ActiveRecord::ConnectionAdapters
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html b/doc/code/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html
new file mode 100644
index 00000000..2c8d740a
--- /dev/null
+++ b/doc/code/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html
@@ -0,0 +1,167 @@
+
+
+
+
+ ActiveRecord::ConnectionAdapters::Mysql2Adapter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ActiveRecord::ConnectionAdapters::Mysql2Adapter
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
execute (*args)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute (*args )
+ execute_without_retry (*args )
+rescue ActiveRecord :: StatementInvalid => e
+ if e .message =~ %rserver has gone away/
+ warn "Server timed out, retrying"
+ reconnect!
+ retry
+ else
+ raise e
+ end
+end
+
+
+
+
+
+
+
+
+
execute_without_retry (*args)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html b/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html
new file mode 100644
index 00000000..0ee82105
--- /dev/null
+++ b/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html
@@ -0,0 +1,191 @@
+
+
+
+
+ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
add_column_with_limit_filter (table_name, column_name, type, options = {})
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def add_column_with_limit_filter (table_name , column_name , type , options = {})
+ options .delete (:limit ) if type == :text
+ add_column_without_limit_filter (table_name , column_name , type , options )
+end
+
+
+
+
+
+
+
+
+
change_column_with_limit_filter (table_name, column_name, type, options = {})
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def change_column_with_limit_filter (table_name , column_name , type , options = {})
+ options .delete (:limit ) if type == :text
+ change_column_without_limit_filter (table_name , column_name , type , options )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/TableDefinition.html b/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/TableDefinition.html
new file mode 100644
index 00000000..f2ea0db4
--- /dev/null
+++ b/doc/code/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter/TableDefinition.html
@@ -0,0 +1,135 @@
+
+
+
+
+ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::TableDefinition
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::TableDefinition
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
text (*args)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def text (*args )
+ options = args .extract_options!
+ options .delete (:limit )
+ column_names = args
+ type = :text
+ column_names .each { | name | column (name , type , options ) }
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ActivityObserver.html b/doc/code/classes/ActivityObserver.html
new file mode 100644
index 00000000..31f4982e
--- /dev/null
+++ b/doc/code/classes/ActivityObserver.html
@@ -0,0 +1,194 @@
+
+
+
+
+ ActivityObserver
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ActivityObserver
+
+ <
+
+ ActiveRecord::Observer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
after_create (record)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_create (record )
+ event_author_id = record .author_id
+
+
+ if record .kind_of? (Note ) && record .note .include? ("_Status changed to " )
+ return true
+ end
+
+ if event_author_id
+ Event .create (
+ project : record .project ,
+ target_id : record .id ,
+ target_type : record .class .name ,
+ action : Event .determine_action (record ),
+ author_id : event_author_id
+ )
+ end
+end
+
+
+
+
+
+
+
+
+
after_save (record)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_save (record )
+ if record .changed .include? ("closed" ) && record .author_id_of_changes
+ Event .create (
+ project : record .project ,
+ target_id : record .id ,
+ target_type : record .class .name ,
+ action : (record .closed ? Event :: Closed : Event :: Reopened ),
+ author_id : record .author_id_of_changes
+ )
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Admin.html b/doc/code/classes/Admin.html
new file mode 100644
index 00000000..ba82287d
--- /dev/null
+++ b/doc/code/classes/Admin.html
@@ -0,0 +1,114 @@
+
+
+
+
+ Admin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Admin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Admin/DashboardController.html b/doc/code/classes/Admin/DashboardController.html
new file mode 100644
index 00000000..02643b7f
--- /dev/null
+++ b/doc/code/classes/Admin/DashboardController.html
@@ -0,0 +1,139 @@
+
+
+
+
+ Admin::DashboardController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Admin::DashboardController
+
+ <
+
+ AdminController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ I
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @projects = Project .order ("created_at DESC" ).limit (10 )
+ @users = User .order ("created_at DESC" ).limit (10 )
+
+ @resque_accessible = true
+ @workers = Resque .workers
+ @pending_jobs = Resque .size (:post_receive )
+
+rescue Redis :: InheritedError
+ @resque_accessible = false
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Admin/GroupsController.html b/doc/code/classes/Admin/GroupsController.html
new file mode 100644
index 00000000..b3651e8b
--- /dev/null
+++ b/doc/code/classes/Admin/GroupsController.html
@@ -0,0 +1,586 @@
+
+
+
+
+ Admin::GroupsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Admin::GroupsController
+
+ <
+
+ AdminController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @group = Group .new (params [:group ])
+ @group .path = @group .name .dup .parameterize if @group .name
+ @group .owner = current_user
+
+ if @group .save
+ redirect_to [:admin , @group ], notice : 'Group was successfully created.'
+ else
+ render action : "new"
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ @group .truncate_teams
+
+ @group .destroy
+
+ redirect_to admin_groups_path , notice : 'Group was successfully deleted.'
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @groups = Group .order ('name ASC' )
+ @groups = @groups .search (params [:name ]) if params [:name ].present?
+ @groups = @groups .page (params [:page ]).per (20 )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new
+ @group = Group .new
+end
+
+
+
+
+
+
+
+
+
project_teams_update ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_teams_update
+ @group .add_users_to_project_teams (params [:user_ids ], params [:project_access ])
+ redirect_to [:admin , @group ], notice : 'Users was successfully added.'
+end
+
+
+
+
+
+
+
+
+
project_update ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_update
+ project_ids = params [:project_ids ]
+
+ Project .where (id : project_ids ).each do | project |
+ project .transfer (@group )
+ end
+
+ redirect_to :back , notice : 'Group was successfully updated.'
+end
+
+
+
+
+
+
+
+
+
remove_project ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def remove_project
+ @project = Project .find (params [:project_id ])
+ @project .transfer (nil )
+
+ redirect_to :back , notice : 'Group was successfully updated.'
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @projects = Project .scoped
+ @projects = @projects .not_in_group (@group ) if @group .projects .present?
+ @projects = @projects .all
+ @projects .reject! (&:empty_repo? )
+
+ @users = User .active
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ group_params = params [:group ].dup
+ owner_id =group_params .delete (:owner_id )
+
+ if owner_id
+ @group .owner = User .find (owner_id )
+ end
+
+ if @group .update_attributes (group_params )
+ redirect_to [:admin , @group ], notice : 'Group was successfully updated.'
+ else
+ render action : "edit"
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Admin/HooksController.html b/doc/code/classes/Admin/HooksController.html
new file mode 100644
index 00000000..1d56fbc7
--- /dev/null
+++ b/doc/code/classes/Admin/HooksController.html
@@ -0,0 +1,294 @@
+
+
+
+
+ Admin::HooksController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ I
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @hook = SystemHook .new (params [:hook ])
+
+ if @hook .save
+ redirect_to admin_hooks_path , notice : 'Hook was successfully created.'
+ else
+ @hooks = SystemHook .all
+ render :index
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ @hook = SystemHook .find (params [:id ])
+ @hook .destroy
+
+ redirect_to admin_hooks_path
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @hooks = SystemHook .all
+ @hook = SystemHook .new
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def test
+ @hook = SystemHook .find (params [:hook_id ])
+ data = {
+ event_name : "project_create" ,
+ name : "Ruby" ,
+ path : "ruby" ,
+ project_id : 1 ,
+ owner_name : "Someone" ,
+ owner_email : "example@gitlabhq.com"
+ }
+ @hook .execute (data )
+
+ redirect_to :back
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Admin/LogsController.html b/doc/code/classes/Admin/LogsController.html
new file mode 100644
index 00000000..8782d95f
--- /dev/null
+++ b/doc/code/classes/Admin/LogsController.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Admin::LogsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Admin/ProjectsController.html b/doc/code/classes/Admin/ProjectsController.html
new file mode 100644
index 00000000..1a0bd492
--- /dev/null
+++ b/doc/code/classes/Admin/ProjectsController.html
@@ -0,0 +1,436 @@
+
+
+
+
+ Admin::ProjectsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Admin::ProjectsController
+
+ <
+
+ AdminController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ P
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+
+ @project .truncate_team
+
+ @project .destroy
+
+ redirect_to admin_projects_path , notice : 'Project was successfully deleted.'
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @projects = Project .scoped
+ @projects = @projects .where (namespace_id : params [:namespace_id ]) if params [:namespace_id ].present?
+ @projects = @projects .where (namespace_id : nil ) if params [:namespace_id ] == Namespace .global_id
+ @projects = @projects .search (params [:name ]) if params [:name ].present?
+ @projects = @projects .includes (:namespace ).order ("namespaces.path, projects.name ASC" ).page (params [:page ]).per (20 )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @users = User .active
+ @users = @users .not_in_project (@project ) if @project .users .present?
+ @users = @users .all
+end
+
+
+
+
+
+
+
+
+
team_update ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def team_update
+ @project .add_users_ids_to_team (params [:user_ids ], params [:project_access ])
+
+ redirect_to [:admin , @project ], notice : 'Project was successfully updated.'
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ status = ProjectUpdateContext .new (project , current_user , params ).execute (:admin )
+
+ if status
+ redirect_to [:admin , @project ], notice : 'Project was successfully updated.'
+ else
+ render action : "edit"
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project
+ id = params [:project_id ] || params [:id ]
+
+ @project = Project .find_with_namespace (id )
+ @project || render_404
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Admin/ResqueController.html b/doc/code/classes/Admin/ResqueController.html
new file mode 100644
index 00000000..52cb2f87
--- /dev/null
+++ b/doc/code/classes/Admin/ResqueController.html
@@ -0,0 +1,130 @@
+
+
+
+
+ Admin::ResqueController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Admin::ResqueController
+
+ <
+
+ AdminController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Admin/TeamMembersController.html b/doc/code/classes/Admin/TeamMembersController.html
new file mode 100644
index 00000000..b055f509
--- /dev/null
+++ b/doc/code/classes/Admin/TeamMembersController.html
@@ -0,0 +1,234 @@
+
+
+
+
+ Admin::TeamMembersController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Admin::TeamMembersController
+
+ <
+
+ AdminController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ @admin_team_member = UsersProject .find (params [:id ])
+ @admin_team_member .destroy
+
+ redirect_to :back
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def edit
+ @admin_team_member = UsersProject .find (params [:id ])
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ @admin_team_member = UsersProject .find (params [:id ])
+
+ if @admin_team_member .update_attributes (params [:team_member ])
+ redirect_to [:admin , @admin_team_member .project ], notice : 'Project Access was successfully updated.'
+ else
+ render action : "edit"
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Admin/UsersController.html b/doc/code/classes/Admin/UsersController.html
new file mode 100644
index 00000000..cfe1e514
--- /dev/null
+++ b/doc/code/classes/Admin/UsersController.html
@@ -0,0 +1,616 @@
+
+
+
+
+ Admin::UsersController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ N
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def block
+ @admin_user = User .find (params [:id ])
+
+ if @admin_user .block
+ redirect_to :back , alert : "Successfully blocked"
+ else
+ redirect_to :back , alert : "Error occured. User was not blocked"
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ admin = params [:user ].delete ("admin" )
+
+ @admin_user = User .new (params [:user ], as : :admin )
+ @admin_user .admin = (admin && admin .to_i > 0 )
+
+ respond_to do | format |
+ if @admin_user .save
+ format .html { redirect_to [:admin , @admin_user ], notice : 'User was successfully created.' }
+ format .json { render json : @admin_user , status : :created , location : @admin_user }
+ else
+ format .html { render action : "new" }
+ format .json { render json : @admin_user .errors , status : :unprocessable_entity }
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ @admin_user = User .find (params [:id ])
+ if @admin_user .my_own_projects .count > 0
+ redirect_to admin_users_path , alert : "User is a project owner and can't be removed." and return
+ end
+ @admin_user .destroy
+
+ respond_to do | format |
+ format .html { redirect_to admin_users_url }
+ format .json { head :ok }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def edit
+ @admin_user = User .find (params [:id ])
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @admin_users = User .scoped
+ @admin_users = @admin_users .filter (params [:filter ])
+ @admin_users = @admin_users .search (params [:name ]) if params [:name ].present?
+ @admin_users = @admin_users .alphabetically .page (params [:page ])
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new
+ @admin_user = User .new ({ projects_limit : Gitlab .config .gitlab .default_projects_limit }, as : :admin )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @admin_user = User .find (params [:id ])
+
+ @projects = if @admin_user .projects .empty?
+ Project
+ else
+ Project .without_user (@admin_user )
+ end .all
+end
+
+
+
+
+
+
+
+
+
team_update ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def team_update
+ @admin_user = User .find (params [:id ])
+
+ UsersProject .user_bulk_import (
+ @admin_user ,
+ params [:project_ids ],
+ params [:project_access ]
+ )
+
+ redirect_to [:admin , @admin_user ], notice : 'Teams were successfully updated.'
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def unblock
+ @admin_user = User .find (params [:id ])
+
+ if @admin_user .update_attribute (:blocked , false )
+ redirect_to :back , alert : "Successfully unblocked"
+ else
+ redirect_to :back , alert : "Error occured. User was not unblocked"
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ admin = params [:user ].delete ("admin" )
+
+ if params [:user ][:password ].blank?
+ params [:user ].delete (:password )
+ params [:user ].delete (:password_confirmation )
+ end
+
+ @admin_user = User .find (params [:id ])
+ @admin_user .admin = (admin && admin .to_i > 0 )
+
+ respond_to do | format |
+ if @admin_user .update_attributes (params [:user ], as : :admin )
+ format .html { redirect_to [:admin , @admin_user ], notice : 'User was successfully updated.' }
+ format .json { head :ok }
+ else
+ format .html { render action : "edit" }
+ format .json { render json : @admin_user .errors , status : :unprocessable_entity }
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/AdminController.html b/doc/code/classes/AdminController.html
new file mode 100644
index 00000000..629a30fe
--- /dev/null
+++ b/doc/code/classes/AdminController.html
@@ -0,0 +1,140 @@
+
+
+
+
+ AdminController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Provides a base class for Admin controllers to
+subclass
+
+
Automatically sets the layout and ensures an administrator is logged in
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
authenticate_admin! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authenticate_admin!
+ return render_404 unless current_user .is_admin?
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ApplicationController.html b/doc/code/classes/ApplicationController.html
new file mode 100644
index 00000000..f1c3bed9
--- /dev/null
+++ b/doc/code/classes/ApplicationController.html
@@ -0,0 +1,942 @@
+
+
+
+
+ ApplicationController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ApplicationController
+
+ <
+
+ ActionController::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ G
+
+
+
+
+ L
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
abilities ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def abilities
+ @abilities ||= Six .new
+end
+
+
+
+
+
+
+
+
+
access_denied! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def access_denied!
+ render "errors/access_denied" , layout : "errors" , status : 404
+end
+
+
+
+
+
+
+
+
+
add_abilities ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def add_abilities
+ abilities << Ability
+end
+
+
+
+
+
+
+
+
+
after_sign_in_path_for (resource)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_sign_in_path_for resource
+ if resource .is_a? (User ) && resource .respond_to? (:blocked ) && resource .blocked
+ sign_out resource
+ flash [:alert ] = "Your account is blocked. Retry when an admin unblock it."
+ new_user_session_path
+ else
+ super
+ end
+end
+
+
+
+
+
+
+
+
+
authorize_code_access! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorize_code_access!
+ return access_denied! unless can? (current_user , :download_code , project )
+end
+
+
+
+
+
+
+
+
+
authorize_project! (action)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorize_project! (action )
+ return access_denied! unless can? (current_user , action , project )
+end
+
+
+
+
+
+
+
+
+
can? (object, action, subject)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def can? (object , action , subject )
+ abilities .allowed? (object , action , subject )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
git_not_found! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def git_not_found!
+ render "errors/git_not_found" , layout : "errors" , status : 404
+end
+
+
+
+
+
+
+
+
+
log_exception (exception)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def log_exception (exception )
+ application_trace = ActionDispatch :: ExceptionWrapper .new (env , exception ).application_trace
+ application_trace .map! { | t | " #{t}\n" }
+ logger .error "\n#{exception.class.name} (#{exception.message}):\n#{application_trace.join}"
+end
+
+
+
+
+
+
+
+
+
method_missing (method_sym, *arguments, &block)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def method_missing (method_sym , *arguments , &block )
+ if method_sym .to_s =~ %r^authorize_(.*)!$/
+ authorize_project! ($1 .to_sym )
+ else
+ super
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
not_found! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def not_found!
+ render "errors/not_found" , layout : "errors" , status : 404
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project
+ id = params [:project_id ] || params [:id ]
+
+ @project = Project .find_with_namespace (id )
+
+ if @project and can? (current_user , :read_project , @project )
+ @project
+ else
+ @project = nil
+ render_404
+ end
+end
+
+
+
+
+
+
+
+
+
reject_blocked! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def reject_blocked!
+ if current_user && current_user .blocked
+ sign_out current_user
+ flash [:alert ] = "Your account is blocked. Retry when an admin unblock it."
+ redirect_to new_user_session_path
+ end
+end
+
+
+
+
+
+
+
+
+
render_403 ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def render_403
+ render file : Rails .root .join ("public" , "403" ), layout : false , status : "403"
+end
+
+
+
+
+
+
+
+
+
render_404 ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def render_404
+ render file : Rails .root .join ("public" , "404" ), layout : false , status : "404"
+end
+
+
+
+
+
+
+
+
+
require_non_empty_project ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def require_non_empty_project
+ redirect_to @project if @project .empty_repo?
+end
+
+
+
+
+
+
+
+
+
set_current_user_for_observers ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def set_current_user_for_observers
+ MergeRequestObserver .current_user = current_user
+ IssueObserver .current_user = current_user
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ApplicationDecorator.html b/doc/code/classes/ApplicationDecorator.html
new file mode 100644
index 00000000..348cf42a
--- /dev/null
+++ b/doc/code/classes/ApplicationDecorator.html
@@ -0,0 +1,76 @@
+
+
+
+
+ ApplicationDecorator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ApplicationDecorator
+
+ <
+
+ Draper::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ApplicationHelper.html b/doc/code/classes/ApplicationHelper.html
new file mode 100644
index 00000000..2c3a82bb
--- /dev/null
+++ b/doc/code/classes/ApplicationHelper.html
@@ -0,0 +1,890 @@
+
+
+
+
+ ApplicationHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ ApplicationHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ E
+
+
+
+
+ G
+
+
+
+
+ H
+
+
+
+
+ L
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+ U
+
+
+
+
+ W
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
app_theme ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def app_theme
+ Gitlab :: Theme .css_class_by_id (current_user .try (:theme_id ))
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
current_action? (*args)
+
+
Link
+
+
+
+
+
Check if a partcular action is the current one
+
+
args - One or more action names to check
+
+
Examples
+
+
+current_action? (:new )
+current_action? (:create )
+current_action? (:new , :create )
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def current_action? (*args )
+ args .any? { | v | v .to_s .downcase == action_name }
+end
+
+
+
+
+
+
+
+
+
current_controller? (*args)
+
+
Link
+
+
+
+
+
Check if a particular controller is the current one
+
+
args - One or more controller names to check
+
+
Examples
+
+
+current_controller? (:tree )
+current_controller? (:commits )
+current_controller? (:commits , :tree )
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def current_controller? (*args )
+ args .any? { | v | v .to_s .downcase == controller .controller_name }
+end
+
+
+
+
+
+
+
+
+
emoji_autocomplete_source ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def emoji_autocomplete_source
+
+
+ Emoji .names .to_s
+end
+
+
+
+
+
+
+
+
+
gravatar_icon (user_email = '', size = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def gravatar_icon (user_email = '' , size = nil )
+ size = 40 if size .nil? || size <= 0
+
+ if ! Gitlab .config .gravatar .enabled || user_email .blank?
+ 'no_avatar.png'
+ else
+ gravatar_url = request .ssl? ? Gitlab .config .gravatar .ssl_url : Gitlab .config .gravatar .plain_url
+ user_email .strip!
+ sprintf (gravatar_url , {:hash => Digest :: MD5 .hexdigest (user_email .downcase ), :email => URI .escape (user_email ), :size => size })
+ end
+end
+
+
+
+
+
+
+
+
+
grouped_options_refs (destination = :tree)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def grouped_options_refs (destination = :tree )
+ options = [
+ ["Branch" , @project .branch_names ],
+ [ "Tag" , @project .tag_names ]
+ ]
+
+
+
+ if (@ref && ! options .flatten .include? (@ref ) &&
+ @ref =~ %r^[0-9a-zA-Z]{6,52}$/ )
+ options << ["Commit" , [@ref ]]
+ end
+
+ grouped_options_for_select (options , @ref || @project .default_branch )
+end
+
+
+
+
+
+
+
+
+
hexdigest (string)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def hexdigest (string )
+ Digest :: SHA1 .hexdigest string
+end
+
+
+
+
+
+
+
+
+
last_commit (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def last_commit (project )
+ if project .repo_exists?
+ time_ago_in_words (project .commit .committed_date ) + " ago"
+ else
+ "Never"
+ end
+rescue
+ "Never"
+end
+
+
+
+
+
+
+
+
+
ldap_enable? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def ldap_enable?
+ Devise .omniauth_providers .include? (:ldap )
+end
+
+
+
+
+
+
+
+
+
project_last_activity (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_last_activity project
+ activity = project .last_activity
+ if activity && activity .created_at
+ time_ago_in_words (activity .created_at ) + " ago"
+ else
+ "Never"
+ end
+end
+
+
+
+
+
+
+
+
+
request_protocol ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def request_protocol
+ request .ssl? ? "https" : "http"
+end
+
+
+
+
+
+
+
+
+
search_autocomplete_source ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def search_autocomplete_source
+ projects = current_user .authorized_projects .map { | p | { label : p .name_with_namespace , url : project_path (p ) } }
+ groups = current_user .authorized_groups .map { | group | { label : "<group> #{group.name}" , url : group_path (group ) } }
+
+ default_nav = [
+ { label : "My Profile" , url : profile_path },
+ { label : "My SSH Keys" , url : keys_path },
+ { label : "My Dashboard" , url : root_path },
+ { label : "Admin Section" , url : admin_root_path },
+ ]
+
+ help_nav = [
+ { label : "Workflow Help" , url : help_workflow_path },
+ { label : "Permissions Help" , url : help_permissions_path },
+ { label : "Web Hooks Help" , url : help_web_hooks_path },
+ { label : "System Hooks Help" , url : help_system_hooks_path },
+ { label : "API Help" , url : help_api_path },
+ { label : "Markdown Help" , url : help_markdown_path },
+ { label : "SSH Keys Help" , url : help_ssh_path },
+ { label : "Gitlab Rake Tasks Help" , url : help_raketasks_path },
+ ]
+
+ project_nav = []
+ if @project && ! @project .new_record?
+ project_nav = [
+ { label : "#{@project.name} Issues" , url : project_issues_path (@project ) },
+ { label : "#{@project.name} Commits" , url : project_commits_path (@project , @ref || @project .root_ref ) },
+ { label : "#{@project.name} Merge Requests" , url : project_merge_requests_path (@project ) },
+ { label : "#{@project.name} Milestones" , url : project_milestones_path (@project ) },
+ { label : "#{@project.name} Snippets" , url : project_snippets_path (@project ) },
+ { label : "#{@project.name} Team" , url : project_team_index_path (@project ) },
+ { label : "#{@project.name} Tree" , url : project_tree_path (@project , @ref || @project .root_ref ) },
+ { label : "#{@project.name} Wall" , url : wall_project_path (@project ) },
+ { label : "#{@project.name} Wiki" , url : project_wikis_path (@project ) },
+ ]
+ end
+
+ [groups , projects , default_nav , project_nav , help_nav ].flatten .to_json
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
user_color_scheme_class ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def user_color_scheme_class
+ current_user .dark_scheme ? :black : :white
+end
+
+
+
+
+
+
+
+
+
web_app_url ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def web_app_url
+ "#{request_protocol}://#{Gitlab.config.gitlab.host}/"
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/AttachmentUploader.html b/doc/code/classes/AttachmentUploader.html
new file mode 100644
index 00000000..79bc7c98
--- /dev/null
+++ b/doc/code/classes/AttachmentUploader.html
@@ -0,0 +1,132 @@
+
+
+
+
+ AttachmentUploader
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ AttachmentUploader
+
+ <
+
+ CarrierWave::Uploader::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
store_dir ()
+
+
Link
+
+
+
+
+
Override the directory where uploaded files will be stored. This is a
+sensible default for uploaders that are meant to be mounted:
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def store_dir
+ "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Authority.html b/doc/code/classes/Authority.html
new file mode 100644
index 00000000..fc93f4be
--- /dev/null
+++ b/doc/code/classes/Authority.html
@@ -0,0 +1,528 @@
+
+
+
+
+ Authority
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Authority
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ D
+
+
+
+
+ G
+
+
+
+
+ M
+
+
+
+
+ R
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
add_access (user, *access)
+
+
Link
+
+
+
+
+
Compatible with all access rights Should be rewrited for new access rights
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def add_access (user , *access )
+ access = if access .include? (:admin )
+ { project_access : UsersProject :: MASTER }
+ elsif access .include? (:write )
+ { project_access : UsersProject :: DEVELOPER }
+ else
+ { project_access : UsersProject :: REPORTER }
+ end
+ opts = { user : user }
+ opts .merge! (access )
+ users_projects .create (opts )
+end
+
+
+
+
+
+
+
+
+
allow_read_for? (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def allow_read_for? (user )
+ ! users_projects .where (user_id : user .id ).empty?
+end
+
+
+
+
+
+
+
+
+
dev_access_for? (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def dev_access_for? (user )
+ ! users_projects .where (user_id : user .id , project_access : [UsersProject :: DEVELOPER , UsersProject :: MASTER ]).empty?
+end
+
+
+
+
+
+
+
+
+
guest_access_for? (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def guest_access_for? (user )
+ ! users_projects .where (user_id : user .id ).empty?
+end
+
+
+
+
+
+
+
+
+
master_access_for? (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def master_access_for? (user )
+ ! users_projects .where (user_id : user .id , project_access : [UsersProject :: MASTER ]).empty?
+end
+
+
+
+
+
+
+
+
+
report_access_for? (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def report_access_for? (user )
+ ! users_projects .where (user_id : user .id , project_access : [UsersProject :: REPORTER , UsersProject :: DEVELOPER , UsersProject :: MASTER ]).empty?
+end
+
+
+
+
+
+
+
+
+
repository_masters ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def repository_masters
+ keys = Key .joins ({user : :users_projects }).
+ where ("users_projects.project_id = ? AND users_projects.project_access = ?" , id , UsersProject :: MASTER )
+ keys .map (&:identifier )
+end
+
+
+
+
+
+
+
+
+
repository_readers ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def repository_readers
+ keys = Key .joins ({user : :users_projects }).
+ where ("users_projects.project_id = ? AND users_projects.project_access = ?" , id , UsersProject :: REPORTER )
+ keys .map (&:identifier ) + deploy_keys .map (&:identifier )
+end
+
+
+
+
+
+
+
+
+
repository_writers ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def repository_writers
+ keys = Key .joins ({user : :users_projects }).
+ where ("users_projects.project_id = ? AND users_projects.project_access = ?" , id , UsersProject :: DEVELOPER )
+ keys .map (&:identifier )
+end
+
+
+
+
+
+
+
+
+
reset_access (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def reset_access (user )
+ users_projects .where (project_id : self .id , user_id : user .id ).destroy if self .id
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/BaseContext.html b/doc/code/classes/BaseContext.html
new file mode 100644
index 00000000..3fbc76bf
--- /dev/null
+++ b/doc/code/classes/BaseContext.html
@@ -0,0 +1,261 @@
+
+
+
+
+ BaseContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ BaseContext
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ N
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ current_user
+
+
+
+
+
+ [RW]
+
+ params
+
+
+
+
+
+ [RW]
+
+ project
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (project, user, params)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (project , user , params )
+ @project , @current_user , @params = project , user , params .dup
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
abilities ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def abilities
+ @abilities ||= begin
+ abilities = Six .new
+ abilities << Ability
+ abilities
+ end
+end
+
+
+
+
+
+
+
+
+
can? (object, action, subject)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def can? (object , action , subject )
+ abilities .allowed? (object , action , subject )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/BlameController.html b/doc/code/classes/BlameController.html
new file mode 100644
index 00000000..2d641cb0
--- /dev/null
+++ b/doc/code/classes/BlameController.html
@@ -0,0 +1,152 @@
+
+
+
+
+ BlameController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Controller for viewing a file’s blame
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ S
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @repo = @project .repo
+ @blame = Grit :: Blob .blame (@repo , @commit .id , @path )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/BlobController.html b/doc/code/classes/BlobController.html
new file mode 100644
index 00000000..22df013f
--- /dev/null
+++ b/doc/code/classes/BlobController.html
@@ -0,0 +1,160 @@
+
+
+
+
+ BlobController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Controller for viewing a file’s blame
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ S
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ if @tree .is_blob?
+ send_data (
+ @tree .data ,
+ type : @tree .mime_type ,
+ disposition : 'inline' ,
+ filename : @tree .name
+ )
+ else
+ not_found!
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Commit.html b/doc/code/classes/Commit.html
new file mode 100644
index 00000000..15369b89
--- /dev/null
+++ b/doc/code/classes/Commit.html
@@ -0,0 +1,1077 @@
+
+
+
+
+ Commit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Commit
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ F
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Constants
+
+
+
+ DIFF_SAFE_SIZE
+ =
+ 100
+
+
+
+
+ Safe amount of files with diffs in one commit to render Used to prevent 500
+error on huge commits by suppressing diff
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ commit
+
+
+
+
+
+ [RW]
+
+ head
+
+
+
+
+
+ [RW]
+
+ refs
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
commits (repo, ref, path = nil, limit = nil, offset = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits (repo , ref , path = nil , limit = nil , offset = nil )
+ if path
+ repo .log (ref , path , max_count : limit , skip : offset )
+ elsif limit && offset
+ repo .commits (ref , limit , offset )
+ else
+ repo .commits (ref )
+ end .map { | c | Commit .new (c ) }
+end
+
+
+
+
+
+
+
+
+
commits_between (repo, from, to)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits_between (repo , from , to )
+ repo .commits_between (from , to ).map { | c | Commit .new (c ) }
+end
+
+
+
+
+
+
+
+
+
commits_since (repo, date)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits_since (repo , date )
+ commits = repo .heads .map do | h |
+ repo .log (h .name , nil , since : date ).each { | c | Commit .new (c , h ) }
+ end .flatten .uniq { | c | c .id }
+
+ commits .sort! do | x , y |
+ y .committed_date <=> x .committed_date
+ end
+
+ commits
+end
+
+
+
+
+
+
+
+
+
commits_with_refs (repo, n = 20)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits_with_refs (repo , n = 20 )
+ commits = repo .branches .map { | ref | Commit .new (ref .commit , ref ) }
+
+ commits .sort! do | x , y |
+ y .committed_date <=> x .committed_date
+ end
+
+ commits [0 .. n ]
+end
+
+
+
+
+
+
+
+
+
compare (project, from, to)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def compare (project , from , to )
+ result = {
+ commits : [],
+ diffs : [],
+ commit : nil ,
+ same : false
+ }
+
+ return result unless from && to
+
+ first = project .commit (to .try (:strip ))
+ last = project .commit (from .try (:strip ))
+
+ if first && last
+ result [:same ] = (first .id == last .id )
+ result [:commits ] = project .repo .commits_between (last .id , first .id ).map {| c | Commit .new (c )}
+ result [:diffs ] = project .repo .diff (last .id , first .id ) rescue []
+ result [:commit ] = Commit .new (first )
+ end
+
+ result
+end
+
+
+
+
+
+
+
+
+
find_or_first (repo, commit_id = nil, root_ref)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def find_or_first (repo , commit_id = nil , root_ref )
+ commit = if commit_id
+ repo .commit (commit_id )
+ else
+ repo .commits (root_ref ).first
+ end
+
+ Commit .new (commit ) if commit
+end
+
+
+
+
+
+
+
+
+
fresh_commits (repo, n = 10)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def fresh_commits (repo , n = 10 )
+ commits = repo .heads .map do | h |
+ repo .commits (h .name , n ).map { | c | Commit .new (c , h ) }
+ end .flatten .uniq { | c | c .id }
+
+ commits .sort! do | x , y |
+ y .committed_date <=> x .committed_date
+ end
+
+ commits [0 ... n ]
+end
+
+
+
+
+
+
+
+
+
new (raw_commit, head = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (raw_commit , head = nil )
+ @commit = raw_commit
+ @head = head
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
author_email ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def author_email
+ author .email
+end
+
+
+
+
+
+
+
+
+
author_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def author_name
+ author .name
+end
+
+
+
+
+
+
+
+
+
committer_email ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def committer_email
+ committer .email
+end
+
+
+
+
+
+
+
+
+
committer_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def committer_name
+ committer .name
+end
+
+
+
+
+
+
+
+
+
created_at ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def created_at
+ committed_date
+end
+
+
+
+
+
+
+
+
+
different_committer? ()
+
+
Link
+
+
+
+
+
Was this commit committed by a different person than the original author?
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def different_committer?
+ author_name != committer_name || author_email != committer_email
+end
+
+
+
+
+
+
+
+
+
parents_count ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def parents_count
+ parents && parents .count || 0
+end
+
+
+
+
+
+
+
+
+
prev_commit ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def prev_commit
+ parents .try :first
+end
+
+
+
+
+
+
+
+
+
prev_commit_id ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def prev_commit_id
+ prev_commit .try :id
+end
+
+
+
+
+
+
+
+
+
safe_message ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def safe_message
+ @safe_message ||= message
+end
+
+
+
+
+
+
+
+
+
short_id (length = 10)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def short_id (length = 10 )
+ id .to_s [0 .. length ]
+end
+
+
+
+
+
+
+
+
+
+
+
Shows the diff between the commit’s parent and the commit.
+
+
Cuts out the header and stats from to_patch and returns only the diff.
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def to_diff
+
+ patch = to_patch
+
+
+ lines = patch .split ("\n" )
+ while ! lines .first .start_with? ("diff --git" ) do
+ lines .shift
+ end
+ lines .pop if lines .last =~ %r^[\d.]+$/
+ lines .pop if lines .last == "-- "
+ lines .join ("\n" )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/CommitController.html b/doc/code/classes/CommitController.html
new file mode 100644
index 00000000..5f0bbe9e
--- /dev/null
+++ b/doc/code/classes/CommitController.html
@@ -0,0 +1,160 @@
+
+
+
+
+ CommitController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ result = CommitLoadContext .new (project , current_user , params ).execute
+
+ @commit = result [:commit ]
+ git_not_found! unless @commit
+
+ @suppress_diff = result [:suppress_diff ]
+ @note = result [:note ]
+ @line_notes = result [:line_notes ]
+ @notes_count = result [:notes_count ]
+ @comments_allowed = true
+
+ respond_to do | format |
+ format .html do
+ if result [:status ] == :huge_commit
+ render "huge_commit" and return
+ end
+ end
+
+ format .diff { render text : @commit .to_diff }
+ format .patch { render text : @commit .to_patch }
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/CommitDecorator.html b/doc/code/classes/CommitDecorator.html
new file mode 100644
index 00000000..90630578
--- /dev/null
+++ b/doc/code/classes/CommitDecorator.html
@@ -0,0 +1,472 @@
+
+
+
+
+ CommitDecorator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ L
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
author_link (options = {})
+
+
Link
+
+
+
+
+
Returns a link to the commit author. If the author has a matching user and
+is a member of the current @project it will link to the team member page.
+Otherwise it will link to the author email as specified in the commit.
+
+
options:
+
+
avatar: true will prepend the avatar image
+size: size of the avatar image in px
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def author_link (options = {})
+ person_link (options .merge source : :author )
+end
+
+
+
+
+
+
+
+
+
committer_link (options = {})
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def committer_link (options = {})
+ person_link (options .merge source : :committer )
+end
+
+
+
+
+
+
+
+
+
description ()
+
+
Link
+
+
+
+
+
Returns the commits description
+
+
cut off, ellipses (`&hellp;`) are prepended to the commit message.
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def description
+ description = safe_message
+
+ title_end = description .index (%r\n/ )
+ if (! title_end && description .length > 80 ) || (title_end && title_end > 80 )
+ "…" .html_safe << description [70 .. -1 ]
+ else
+ description .split (%r\n/ , 2 )[1 ].try (:chomp )
+ end
+end
+
+
+
+
+
+
+
+
+
link_title ()
+
+
Link
+
+
+
+
+
Returns a string describing the commit for use in a link title
+
+
Example
+
+
"Commit: Alex Denisov - Project git clone panel"
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def link_title
+ "Commit: #{author_name} - #{title}"
+end
+
+
+
+
+
+
+
+
+
+
+
Returns the commits title.
+
+
Usually, the commit title is the first line of the commit message. In case
+this first line is longer than 80 characters, it is cut off after 70
+characters and ellipses (`&hellp;`) are appended.
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def title
+ title = safe_message
+
+ return no_commit_message if title .blank?
+
+ title_end = title .index (%r\n/ )
+ if (! title_end && title .length > 80 ) || (title_end && title_end > 80 )
+ title [0 .. 69 ] << "…" .html_safe
+ else
+ title .split (%r\n/ , 2 ).first
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
no_commit_message ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def no_commit_message
+ "--no commit message"
+end
+
+
+
+
+
+
+
+
+
person_link (options = {})
+
+
Link
+
+
+
+
+
Private: Returns a link to a person. If the person has a matching user and
+is a member of the current @project it will link to the team member page.
+Otherwise it will link to the person email as specified in the commit.
+
+
options:
+
+
source: one of :author or :committer
+avatar: true will prepend the avatar image
+size: size of the avatar image in px
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def person_link (options = {})
+ source_name = send "#{options[:source]}_name" .to_sym
+ source_email = send "#{options[:source]}_email" .to_sym
+ text = if options [:avatar ]
+ avatar = h .image_tag h .gravatar_icon (source_email , options [:size ]), class : "avatar #{"s#{options[:size]}" if options[:size]}" , width : options [:size ], alt : ""
+ %Q{#{avatar} <span class="commit-#{options[:source]}-name">#{source_name}</span>}
+ else
+ source_name
+ end
+ team_member = @project .try (:team_member_by_name_or_email , source_name , source_email )
+
+ if team_member .nil?
+ h .mail_to source_email , text .html_safe , class : "commit-#{options[:source]}-link"
+ else
+ h .link_to text , h .project_team_member_path (@project , team_member ), class : "commit-#{options[:source]}-link"
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/CommitLoadContext.html b/doc/code/classes/CommitLoadContext.html
new file mode 100644
index 00000000..82c04feb
--- /dev/null
+++ b/doc/code/classes/CommitLoadContext.html
@@ -0,0 +1,159 @@
+
+
+
+
+ CommitLoadContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ CommitLoadContext
+
+ <
+
+ BaseContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute
+ result = {
+ commit : nil ,
+ suppress_diff : false ,
+ line_notes : [],
+ notes_count : 0 ,
+ note : nil ,
+ status : :ok
+ }
+
+ commit = project .commit (params [:id ])
+
+ if commit
+ commit = CommitDecorator .decorate (commit )
+ line_notes = project .commit_line_notes (commit )
+
+ result [:commit ] = commit
+ result [:note ] = project .build_commit_note (commit )
+ result [:line_notes ] = line_notes
+ result [:notes_count ] = line_notes .count + project .commit_notes (commit ).count
+
+ begin
+ result [:suppress_diff ] = true if commit .diffs .size > Commit :: DIFF_SAFE_SIZE && ! params [:force_show_diff ]
+ rescue Grit :: Git :: GitTimeout
+ result [:suppress_diff ] = true
+ result [:status ] = :huge_commit
+ end
+ end
+
+ result
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/CommitsController.html b/doc/code/classes/CommitsController.html
new file mode 100644
index 00000000..53d32967
--- /dev/null
+++ b/doc/code/classes/CommitsController.html
@@ -0,0 +1,155 @@
+
+
+
+
+ CommitsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ S
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @repo = @project .repo
+ @limit , @offset = (params [:limit ] || 40 ), (params [:offset ] || 0 )
+
+ @commits = @project .commits (@ref , @path , @limit , @offset )
+ @commits = CommitDecorator .decorate (@commits )
+
+ respond_to do | format |
+ format .html
+ format .js
+ format .atom { render layout : false }
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/CommitsHelper.html b/doc/code/classes/CommitsHelper.html
new file mode 100644
index 00000000..4e4addfb
--- /dev/null
+++ b/doc/code/classes/CommitsHelper.html
@@ -0,0 +1,409 @@
+
+
+
+
+ CommitsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ CommitsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
build_line_anchor (index, line_new, line_old)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def build_line_anchor (index , line_new , line_old )
+ "#{index}_#{line_old}_#{line_new}"
+end
+
+
+
+
+
+
+
+
+
commit_to_html (commit)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit_to_html commit
+ if commit .model
+ escape_javascript (render 'commits/commit' , commit : commit )
+ end
+end
+
+
+
+
+
+
+
+
+
diff_line_content (line)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def diff_line_content (line )
+ if line .blank?
+ " "
+ else
+ line
+ end
+end
+
+
+
+
+
+
+
+
+
each_diff_line (diff_arr, index)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def each_diff_line (diff_arr , index )
+ line_old = 1
+ line_new = 1
+ type = nil
+
+ lines_arr = :: Gitlab :: InlineDiff .processing diff_arr
+ lines_arr .each do | line |
+ next if line .match (%r^\-\-\- \/dev\/null/ )
+ next if line .match (%r^\+\+\+ \/dev\/null/ )
+ next if line .match (%r^\-\-\- a/ )
+ next if line .match (%r^\+\+\+ b/ )
+
+ full_line = html_escape (line .gsub (%r\n/ , '' ))
+ full_line = :: Gitlab :: InlineDiff .replace_markers full_line
+
+ if line .match (%r^@@ -/ )
+ type = "match"
+
+ line_old = line .match (%r\-[0-9]*/ )[0 ].to_i .abs rescue 0
+ line_new = line .match (%r\+[0-9]*/ )[0 ].to_i .abs rescue 0
+
+ next if line_old == 1 && line_new == 1
+ yield (full_line , type , nil , nil , nil )
+ next
+ else
+ type = identification_type (line )
+ line_code = build_line_anchor (index , line_new , line_old )
+ yield (full_line , type , line_code , line_new , line_old )
+ end
+
+
+ if line [0 ] == "+"
+ line_new += 1
+ elsif line [0 ] == "-"
+ line_old += 1
+ else
+ line_new += 1
+ line_old += 1
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
identification_type (line)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def identification_type (line )
+ if line [0 ] == "+"
+ "new"
+ elsif line [0 ] == "-"
+ "old"
+ else
+ nil
+ end
+end
+
+
+
+
+
+
+
+
+
image_diff_class (diff)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def image_diff_class (diff )
+ if diff .deleted_file
+ "diff_removed"
+ elsif diff .new_file
+ "diff_added"
+ else
+ nil
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/CompareController.html b/doc/code/classes/CompareController.html
new file mode 100644
index 00000000..3db60f96
--- /dev/null
+++ b/doc/code/classes/CompareController.html
@@ -0,0 +1,232 @@
+
+
+
+
+ CompareController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ I
+
+
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ redirect_to project_compare_path (@project , params [:from ], params [:to ])
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ result = Commit .compare (project , params [:from ], params [:to ])
+
+ @commits = result [:commits ]
+ @commit = result [:commit ]
+ @diffs = result [:diffs ]
+ @refs_are_same = result [:same ]
+ @line_notes = []
+
+ @commits = CommitDecorator .decorate (@commits )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/DashboardController.html b/doc/code/classes/DashboardController.html
new file mode 100644
index 00000000..ae8b126d
--- /dev/null
+++ b/doc/code/classes/DashboardController.html
@@ -0,0 +1,411 @@
+
+
+
+
+ DashboardController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ M
+
+
+
+
+ P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @groups = current_user .authorized_groups
+
+ @has_authorized_projects = @projects .count > 0
+
+ @projects = case params [:scope ]
+ when 'personal' then
+ @projects .personal (current_user )
+ when 'joined' then
+ @projects .joined (current_user )
+ else
+ @projects
+ end
+
+ @projects = @projects .page (params [:page ]).per (30 )
+
+ @events = Event .in_projects (current_user .project_ids )
+ @events = @event_filter .apply_filter (@events )
+ @events = @events .limit (20 ).offset (params [:offset ] || 0 )
+
+ @last_push = current_user .recent_push
+
+ respond_to do | format |
+ format .html
+ format .js
+ format .atom { render layout : false }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
Get only assigned issues
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def issues
+ @issues = current_user .assigned_issues
+ @issues = dashboard_filter (@issues )
+ @issues = @issues .recent .page (params [:page ]).per (20 )
+ @issues = @issues .includes (:author , :project )
+
+ respond_to do | format |
+ format .html
+ format .atom { render layout : false }
+ end
+end
+
+
+
+
+
+
+
+
+
merge_requests ()
+
+
Link
+
+
+
+
+
Get authored or assigned open merge requests
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def merge_requests
+ @merge_requests = current_user .cared_merge_requests
+ @merge_requests = dashboard_filter (@merge_requests )
+ @merge_requests = @merge_requests .recent .page (params [:page ]).per (20 )
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
dashboard_filter (items)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def dashboard_filter items
+ if params [:project_id ]
+ items = items .where (project_id : params [:project_id ])
+ end
+
+ if params [:search ].present?
+ items = items .search (params [:search ])
+ end
+
+ case params [:status ]
+ when 'closed'
+ items .closed
+ when 'all'
+ items
+ else
+ items .opened
+ end
+end
+
+
+
+
+
+
+
+
+
event_filter ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def event_filter
+ @event_filter ||= EventFilter .new (params [:event_filter ])
+end
+
+
+
+
+
+
+
+
+
projects ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def projects
+ @projects = current_user .authorized_projects .sorted_by_activity
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/DashboardHelper.html b/doc/code/classes/DashboardHelper.html
new file mode 100644
index 00000000..6fcb426c
--- /dev/null
+++ b/doc/code/classes/DashboardHelper.html
@@ -0,0 +1,195 @@
+
+
+
+
+ DashboardHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ DashboardHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
dashboard_filter_path (entity, options={})
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def dashboard_filter_path (entity , options ={})
+ exist_opts = {
+ status : params [:status ],
+ project_id : params [:project_id ],
+ }
+
+ options = exist_opts .merge (options )
+
+ case entity
+ when 'issue' then
+ dashboard_issues_path (options )
+ when 'merge_request'
+ dashboard_merge_requests_path (options )
+ end
+end
+
+
+
+
+
+
+
+
+
entities_per_project (project, entity)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def entities_per_project project , entity
+ items = project .items_for (entity )
+
+ items = case params [:status ]
+ when 'closed'
+ items .closed
+ when 'all'
+ items
+ else
+ items .opened
+ end
+
+ items .where (assignee_id : current_user .id ).count
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/DeployKeysController.html b/doc/code/classes/DeployKeysController.html
new file mode 100644
index 00000000..952d295c
--- /dev/null
+++ b/doc/code/classes/DeployKeysController.html
@@ -0,0 +1,332 @@
+
+
+
+
+ DeployKeysController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ I
+
+
+
+
+ N
+
+
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @key = @project .deploy_keys .new (params [:key ])
+ if @key .save
+ redirect_to project_deploy_keys_path (@project )
+ else
+ render "new"
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ @key = @project .deploy_keys .find (params [:id ])
+ @key .destroy
+
+ respond_to do | format |
+ format .html { redirect_to project_deploy_keys_url }
+ format .js { render nothing : true }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @keys = @project .deploy_keys .all
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new
+ @key = @project .deploy_keys .new
+
+ respond_with (@key )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @key = @project .deploy_keys .find (params [:id ])
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ErrorsController.html b/doc/code/classes/ErrorsController.html
new file mode 100644
index 00000000..b03cc04c
--- /dev/null
+++ b/doc/code/classes/ErrorsController.html
@@ -0,0 +1,131 @@
+
+
+
+
+ ErrorsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ G
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def githost
+ render "errors/gitolite"
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Event.html b/doc/code/classes/Event.html
new file mode 100644
index 00000000..608db599
--- /dev/null
+++ b/doc/code/classes/Event.html
@@ -0,0 +1,1266 @@
+
+
+
+
+ Event
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Event
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: events
+
+
id :integer not null, primary key
+target_type :string(255)
+target_id :integer
+title :string(255)
+data :text
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+action :integer
+author_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ I
+
+
+
+
+ J
+
+
+
+
+ L
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Constants
+
+
+
+ Created
+ =
+ 1
+
+
+
+
+
+
+
+
+
+ Updated
+ =
+ 2
+
+
+
+
+
+
+
+
+
+ Closed
+ =
+ 3
+
+
+
+
+
+
+
+
+
+ Reopened
+ =
+ 4
+
+
+
+
+
+
+
+
+
+ Pushed
+ =
+ 5
+
+
+
+
+
+
+
+
+
+ Commented
+ =
+ 6
+
+
+
+
+
+
+
+
+
+ Merged
+ =
+ 7
+
+
+
+
+
+
+
+
+
+ Joined
+ =
+ 8
+
+
+
+
+
+
+
+
+
+ Left
+ =
+ 9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
determine_action (record)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def determine_action (record )
+ if [Issue , MergeRequest ].include? record .class
+ Event :: Created
+ elsif record .kind_of? Note
+ Event :: Commented
+ end
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
action_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def action_name
+ if closed?
+ "closed"
+ elsif merged?
+ "merged"
+ elsif joined?
+ 'joined'
+ elsif left?
+ 'left'
+ else
+ "opened"
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def author
+ @author ||= User .find (author_id )
+end
+
+
+
+
+
+
+
+
+
changed_issue? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def changed_issue?
+ target_type == "Issue" &&
+ [Closed , Reopened ].include? (action )
+end
+
+
+
+
+
+
+
+
+
changed_merge_request? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def changed_merge_request?
+ target_type == "MergeRequest" &&
+ [Closed , Reopened ].include? (action )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def closed?
+ action == self .class :: Closed
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def issue
+ target if target_type == "Issue"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def issue?
+ target_type == "Issue"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def joined?
+ action == Joined
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def left?
+ action == Left
+end
+
+
+
+
+
+
+
+
+
membership_changed? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def membership_changed?
+ joined? || left?
+end
+
+
+
+
+
+
+
+
+
merge_request ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def merge_request
+ target if target_type == "MergeRequest"
+end
+
+
+
+
+
+
+
+
+
merge_request? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def merge_request?
+ target_type == "MergeRequest"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def merged?
+ action == self .class :: Merged
+end
+
+
+
+
+
+
+
+
+
milestone? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def milestone?
+ target_type == "Milestone"
+end
+
+
+
+
+
+
+
+
+
new_issue? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new_issue?
+ target_type == "Issue" &&
+ action == Created
+end
+
+
+
+
+
+
+
+
+
new_merge_request? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new_merge_request?
+ target_type == "MergeRequest" &&
+ action == Created
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note?
+ target_type == "Note"
+end
+
+
+
+
+
+
+
+
+
project_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_name
+ if project
+ project .name
+ else
+ "(deleted project)"
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def proper?
+ if push?
+ true
+ elsif membership_changed?
+ true
+ else
+ (issue? || merge_request? || note? || milestone? ) && target
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def push?
+ action == self .class :: Pushed && valid_push?
+end
+
+
+
+
+
+
+
+
+
reopened? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def reopened?
+ action == self .class :: Reopened
+end
+
+
+
+
+
+
+
+
+
target_title ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def target_title
+ target .try :title
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/EventDecorator.html b/doc/code/classes/EventDecorator.html
new file mode 100644
index 00000000..1fdf7f5c
--- /dev/null
+++ b/doc/code/classes/EventDecorator.html
@@ -0,0 +1,240 @@
+
+
+
+
+ EventDecorator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ F
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
feed_summary ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def feed_summary
+ if self .issue?
+ h .render "events/event_issue" , issue : self .issue
+ elsif self .push?
+ h .render "events/event_push" , event : self
+ end
+end
+
+
+
+
+
+
+
+
+
feed_title ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def feed_title
+ if self .issue?
+ "#{self.author_name} #{self.action_name} issue ##{self.target_id}: #{self.issue_title} at #{self.project.name}"
+ elsif self .merge_request?
+ "#{self.author_name} #{self.action_name} MR ##{self.target_id}: #{self.merge_request_title} at #{self.project.name}"
+ elsif self .push?
+ "#{self.author_name} #{self.push_action_name} #{self.ref_type} #{self.ref_name} at #{self.project.name}"
+ elsif self .membership_changed?
+ "#{self.author_name} #{self.action_name} #{self.project.name}"
+ else
+ ""
+ end
+end
+
+
+
+
+
+
+
+
+
feed_url ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def feed_url
+ if self .issue?
+ h .project_issue_url (self .project , self .issue )
+ elsif self .merge_request?
+ h .project_merge_request_url (self .project , self .merge_request )
+
+ elsif self .push?
+ if self .push_with_commits?
+ if self .commits_count > 1
+ h .project_compare_url (self .project , :from => self .parent_commit .id , :to => self .last_commit .id )
+ else
+ h .project_commit_url (self .project , :id => self .last_commit .id )
+ end
+ else
+ h .project_commits_url (self .project , self .ref_name )
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/EventFilter.html b/doc/code/classes/EventFilter.html
new file mode 100644
index 00000000..5bf01133
--- /dev/null
+++ b/doc/code/classes/EventFilter.html
@@ -0,0 +1,543 @@
+
+
+
+
+ EventFilter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ EventFilter
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ O
+
+
+
+
+ P
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ params
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
default_filter ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def default_filter
+ %w{ push issues merge_requests team}
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def merged
+ 'merged'
+end
+
+
+
+
+
+
+
+
+
new (params)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize params
+ @params = if params
+ params .dup
+ else
+ []
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def push
+ 'push'
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def team
+ 'team'
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
active? (key)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def active? key
+ params .include? key
+end
+
+
+
+
+
+
+
+
+
apply_filter (events)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def apply_filter events
+ return events unless params .present?
+
+ filter = params .dup
+
+ actions = []
+ actions << Event :: Pushed if filter .include? 'push'
+ actions << Event :: Merged if filter .include? 'merged'
+
+ if filter .include? 'team'
+ actions << Event :: Joined
+ actions << Event :: Left
+ end
+
+ actions << Event :: Commented if filter .include? 'comments'
+
+ events = events .where (action : actions )
+end
+
+
+
+
+
+
+
+
+
options (key)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def options key
+ filter = params .dup
+
+ if filter .include? key
+ filter .delete key
+ else
+ filter << key
+ end
+
+ filter
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/EventsHelper.html b/doc/code/classes/EventsHelper.html
new file mode 100644
index 00000000..7c7041c6
--- /dev/null
+++ b/doc/code/classes/EventsHelper.html
@@ -0,0 +1,289 @@
+
+
+
+
+ EventsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ EventsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+ L
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
event_action_name (event)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def event_action_name (event )
+ target = if event .target_type
+ event .target_type .titleize .downcase
+ else
+ 'project'
+ end
+
+ [event .action_name , target ].join (" " )
+end
+
+
+
+
+
+
+
+
+
event_filter_link (key, tooltip)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def event_filter_link key , tooltip
+ key = key .to_s
+
+ filter = @event_filter .options key
+
+ inactive = if @event_filter .active? key
+ nil
+ else
+ 'inactive'
+ end
+
+ content_tag :div , class : "filter_icon #{inactive}" do
+ link_to dashboard_path (event_filter : filter ), class : 'has_tooltip' , 'data-original-title' => tooltip do
+ image_tag "event_filter_#{key}.png"
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
event_image (event)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def event_image event
+ event_image_path = if event .push?
+ "event_push.png"
+ elsif event .merged?
+ "event_mr_merged.png"
+ end
+
+ return nil unless event_image_path
+
+ content_tag :div , class : 'event_icon' do
+ image_tag event_image_path
+ end
+end
+
+
+
+
+
+
+
+
+
link_to_author (event)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def link_to_author (event )
+ project = event .project
+ tm = project .team_member_by_id (event .author_id ) if project
+
+ if tm
+ link_to event .author_name , project_team_member_path (project , tm )
+ else
+ event .author_name
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ExtractsPath.html b/doc/code/classes/ExtractsPath.html
new file mode 100644
index 00000000..0b8c0c26
--- /dev/null
+++ b/doc/code/classes/ExtractsPath.html
@@ -0,0 +1,300 @@
+
+
+
+
+ ExtractsPath
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ ExtractsPath
+
+
+
+
+
+
+
+
+
+
Module providing methods for dealing with separating a tree-ish string and
+a file path string when combined in a request parameter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
assign_ref_vars ()
+
+
Link
+
+
+
+
+
Assigns common instance variables for views working with Git tree-ish
+objects
+
+
Assignments are:
+
+@id - A string representing the joined ref and path
+
+@ref - A string representing the ref (e.g., the branch, tag, or commit
+SHA)
+
+@path - A string representing the filesystem path
+
+@commit - A CommitDecorator representing
+the commit from the given ref
+
+@tree - A TreeDecorator representing the
+tree at the given ref/path
+
+
+
If the :id parameter appears to be requesting a specific response format,
+that will be handled as well.
+
+
Automatically renders `not_found!` if a valid tree path could not be
+resolved (e.g., when a user inserts an invalid path or ref).
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def assign_ref_vars
+
+ if params [:id ].ends_with? ('.atom' )
+ params [:id ].gsub! (%r\.atom$/ , '' )
+ request .format = :atom
+ end
+
+ @ref , @path = extract_ref (request .fullpath )
+
+ @id = File .join (@ref , @path )
+
+ @commit = CommitDecorator .decorate (@project .commit (@ref ))
+
+ @tree = Tree .new (@commit .tree , @project , @ref , @path )
+ @tree = TreeDecorator .new (@tree )
+
+ raise InvalidPathError if @tree .invalid?
+rescue NoMethodError , InvalidPathError
+ not_found!
+end
+
+
+
+
+
+
+
+
+
+
+
Given a string containing both a Git tree-ish, such as a branch or tag, and
+a filesystem path joined by forward slashes, attempts to separate the two.
+
+
Expects a @project instance variable to contain the active project. This is
+used to check the input against a list of valid repository refs.
+
+
Examples
+
+
+extract_ref ('master' )
+
+
+extract_ref ('master' )
+
+
+extract_ref ("f4b14494ef6abf3d144c28e4af0c20143383e062/CHANGELOG" )
+
+
+extract_ref ("v2.0.0/README.md" )
+
+
+extract_ref ('/gitlab/vagrant/tree/master/app/models/project.rb' )
+
+
+extract_ref ('issues/1234/app/models/project.rb' )
+
+
+
+extract_ref ('non/existent/branch/README.md' )
+
+
+
+
Returns an Array where the first value is the tree-ish and the second is
+the path
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ExtractsPath/InvalidPathError.html b/doc/code/classes/ExtractsPath/InvalidPathError.html
new file mode 100644
index 00000000..67632e3b
--- /dev/null
+++ b/doc/code/classes/ExtractsPath/InvalidPathError.html
@@ -0,0 +1,82 @@
+
+
+
+
+ ExtractsPath::InvalidPathError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ExtractsPath::InvalidPathError
+
+ <
+
+ StandardError
+
+
+
+
+
+
+
+
+
+
+
+
Raised when given an invalid file path
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/FileSizeValidator.html b/doc/code/classes/FileSizeValidator.html
new file mode 100644
index 00000000..b1da2752
--- /dev/null
+++ b/doc/code/classes/FileSizeValidator.html
@@ -0,0 +1,376 @@
+
+
+
+
+ FileSizeValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ FileSizeValidator
+
+ <
+
+ ActiveModel::EachValidator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ H
+
+
+
+
+ N
+
+
+
+
+ V
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Constants
+
+
+
+ MESSAGES
+ =
+ { is: :wrong_size, minimum: :size_too_small, maximum: :size_too_big }.freeze
+
+
+
+
+
+
+
+
+
+ CHECKS
+ =
+ { is: :==, minimum: :>=, maximum: :<= }.freeze
+
+
+
+
+
+
+
+
+
+ DEFAULT_TOKENIZER
+ =
+ lambda { |value| value.split(//) }
+
+
+
+
+
+
+
+
+
+ RESERVED_OPTIONS
+ =
+ [:minimum, :maximum, :within, :is, :tokenizer, :too_short, :too_long]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (options)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (options )
+ if range = (options .delete (:in ) || options .delete (:within ))
+ raise ArgumentError , ":in and :within must be a Range" unless range .is_a? (Range )
+ options [:minimum ], options [:maximum ] = range .begin , range .end
+ options [:maximum ] -= 1 if range .exclude_end?
+ end
+
+ super
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
check_validity! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def check_validity!
+ keys = CHECKS .keys & options .keys
+
+ if keys .empty?
+ raise ArgumentError , 'Range unspecified. Specify the :within, :maximum, :minimum, or :is option.'
+ end
+
+ keys .each do | key |
+ value = options [key ]
+
+ unless value .is_a? (Integer ) && value >= 0
+ raise ArgumentError , ":#{key} must be a nonnegative Integer"
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def help
+ Helper .instance
+end
+
+
+
+
+
+
+
+
+
validate_each (record, attribute, value)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def validate_each (record , attribute , value )
+ raise (ArgumentError , "A CarrierWave::Uploader::Base object was expected" ) unless value .kind_of? CarrierWave :: Uploader :: Base
+
+ value = (options [:tokenizer ] || DEFAULT_TOKENIZER ).call (value ) if value .kind_of? (String )
+
+ CHECKS .each do | key , validity_check |
+ next unless check_value = options [key ]
+
+ value ||= [] if key == :maximum
+
+ value_size = value .size
+ next if value_size .send (validity_check , check_value )
+
+ errors_options = options .except (*RESERVED_OPTIONS )
+ errors_options [:file_size ] = help .number_to_human_size check_value
+
+ default_message = options [MESSAGES [key ]]
+ errors_options [:message ] ||= default_message if default_message
+
+ record .errors .add (attribute , MESSAGES [key ], errors_options )
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/FileSizeValidator/Helper.html b/doc/code/classes/FileSizeValidator/Helper.html
new file mode 100644
index 00000000..c11d89b3
--- /dev/null
+++ b/doc/code/classes/FileSizeValidator/Helper.html
@@ -0,0 +1,94 @@
+
+
+
+
+ FileSizeValidator::Helper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ FileSizeValidator::Helper
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+ Singleton
+
+
+
+
+
+ ActionView::Helpers::NumberHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/GitHost.html b/doc/code/classes/GitHost.html
new file mode 100644
index 00000000..52ea8b32
--- /dev/null
+++ b/doc/code/classes/GitHost.html
@@ -0,0 +1,125 @@
+
+
+
+
+ GitHost
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ GitHost
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ G
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
git_host ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def git_host
+ Gitlab :: Gitolite .new
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab.html b/doc/code/classes/Gitlab.html
new file mode 100644
index 00000000..5127be6e
--- /dev/null
+++ b/doc/code/classes/Gitlab.html
@@ -0,0 +1,265 @@
+
+
+
+
+ Gitlab
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Gitlab
+
+
+
+
+
+
+
+
+
+
ProjectMover class
+
+
Used for moving project repositories from one subdir to another
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/API.html b/doc/code/classes/Gitlab/API.html
new file mode 100644
index 00000000..fe2ccc76
--- /dev/null
+++ b/doc/code/classes/Gitlab/API.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::API
+
+ <
+
+ Grape::API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/APIHelpers.html b/doc/code/classes/Gitlab/APIHelpers.html
new file mode 100644
index 00000000..603443dd
--- /dev/null
+++ b/doc/code/classes/Gitlab/APIHelpers.html
@@ -0,0 +1,703 @@
+
+
+
+
+ Gitlab::APIHelpers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Gitlab::APIHelpers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ F
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
attributes_for_keys (keys)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def attributes_for_keys (keys )
+ attrs = {}
+ keys .each do | key |
+ attrs [key ] = params [key ] if params [key ].present?
+ end
+ attrs
+end
+
+
+
+
+
+
+
+
+
authenticate! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authenticate!
+ unauthorized! unless current_user
+end
+
+
+
+
+
+
+
+
+
authenticated_as_admin! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authenticated_as_admin!
+ forbidden! unless current_user .is_admin?
+end
+
+
+
+
+
+
+
+
+
authorize! (action, subject)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorize! action , subject
+ unless abilities .allowed? (current_user , action , subject )
+ forbidden!
+ end
+end
+
+
+
+
+
+
+
+
+
can? (object, action, subject)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def can? (object , action , subject )
+ abilities .allowed? (object , action , subject )
+end
+
+
+
+
+
+
+
+
+
current_user ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def current_user
+ @current_user ||= User .find_by_authentication_token (params [:private_token ] || env ["HTTP_PRIVATE_TOKEN" ])
+end
+
+
+
+
+
+
+
+
+
find_project ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def find_project
+ project = Project .find_by_id (params [:id ]) || Project .find_with_namespace (params [:id ])
+
+ if project && can? (current_user , :read_project , project )
+ project
+ else
+ nil
+ end
+end
+
+
+
+
+
+
+
+
+
forbidden! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def forbidden!
+ render_api_error! ('403 Forbidden' , 403 )
+end
+
+
+
+
+
+
+
+
+
not_allowed! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def not_allowed!
+ render_api_error! ('Method Not Allowed' , 405 )
+end
+
+
+
+
+
+
+
+
+
not_found! (resource = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def not_found! (resource = nil )
+ message = ["404" ]
+ message << resource if resource
+ message << "Not Found"
+ render_api_error! (message .join (' ' ), 404 )
+end
+
+
+
+
+
+
+
+
+
paginate (object)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def paginate (object )
+ object .page (params [:page ]).per (params [:per_page ].to_i )
+end
+
+
+
+
+
+
+
+
+
render_api_error! (message, status)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def render_api_error! (message , status )
+ error! ({'message' => message }, status )
+end
+
+
+
+
+
+
+
+
+
unauthorized! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def unauthorized!
+ render_api_error! ('401 Unauthorized' , 401 )
+end
+
+
+
+
+
+
+
+
+
user_project ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def user_project
+ @project ||= find_project
+ @project || not_found!
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/AppLogger.html b/doc/code/classes/Gitlab/AppLogger.html
new file mode 100644
index 00000000..2f4dc534
--- /dev/null
+++ b/doc/code/classes/Gitlab/AppLogger.html
@@ -0,0 +1,173 @@
+
+
+
+
+ Gitlab::AppLogger
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ F
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
file_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .file_name
+ 'application.log'
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Application.html b/doc/code/classes/Gitlab/Application.html
new file mode 100644
index 00000000..c8a1e3c2
--- /dev/null
+++ b/doc/code/classes/Gitlab/Application.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Application
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Application
+
+ <
+
+ Rails::Application
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Auth.html b/doc/code/classes/Gitlab/Auth.html
new file mode 100644
index 00000000..4eeb3fec
--- /dev/null
+++ b/doc/code/classes/Gitlab/Auth.html
@@ -0,0 +1,315 @@
+
+
+
+
+ Gitlab::Auth
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Auth
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ F
+
+
+
+
+ L
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
create_from_omniauth (auth, ldap = false)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create_from_omniauth (auth , ldap = false )
+ provider = auth .provider
+ uid = auth .info .uid || auth .uid
+ name = auth .info .name .force_encoding ("utf-8" )
+ email = auth .info .email .downcase unless auth .info .email .nil?
+
+ ldap_prefix = ldap ? '(LDAP) ' : ''
+ raise OmniAuth :: Error , "#{ldap_prefix}#{provider} does not provide an email" " address" if auth .info .email .blank?
+
+ log .info "#{ldap_prefix}Creating user from #{provider} login" " {uid => #{uid}, name => #{name}, email => #{email}}"
+ password = Devise .friendly_token [0 , 8 ].downcase
+ @user = User .new ({
+ extern_uid : uid ,
+ provider : provider ,
+ name : name ,
+ username : email .match (%r^[^@]*/ )[0 ],
+ email : email ,
+ password : password ,
+ password_confirmation : password ,
+ projects_limit : Gitlab .config .gitlab .default_projects_limit ,
+ }, as : :admin )
+ if Gitlab .config .omniauth ['block_auto_created_users' ] && ! ldap
+ @user .blocked = true
+ end
+ @user .save!
+ @user
+end
+
+
+
+
+
+
+
+
+
find_for_ldap_auth (auth, signed_in_resource = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def find_for_ldap_auth (auth , signed_in_resource = nil )
+ uid = auth .info .uid
+ provider = auth .provider
+ email = auth .info .email .downcase unless auth .info .email .nil?
+ raise OmniAuth :: Error , "LDAP accounts must provide an uid and email address" if uid .nil? or email .nil?
+
+ if @user = User .find_by_extern_uid_and_provider (uid , provider )
+ @user
+ elsif @user = User .find_by_email (email )
+ log .info "Updating legacy LDAP user #{email} with extern_uid => #{uid}"
+ @user .update_attributes (:extern_uid => uid , :provider => provider )
+ @user
+ else
+ create_from_omniauth (auth , true )
+ end
+end
+
+
+
+
+
+
+
+
+
find_or_new_for_omniauth (auth)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def find_or_new_for_omniauth (auth )
+ provider , uid = auth .provider , auth .uid
+ email = auth .info .email .downcase unless auth .info .email .nil?
+
+ if @user = User .find_by_provider_and_extern_uid (provider , uid )
+ @user
+ elsif @user = User .find_by_email (email )
+ @user .update_attributes (:extern_uid => uid , :provider => provider )
+ @user
+ else
+ if Gitlab .config .omniauth ['allow_single_sign_on' ]
+ @user = create_from_omniauth (auth )
+ @user
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def log
+ Gitlab :: AppLogger
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities.html b/doc/code/classes/Gitlab/Entities.html
new file mode 100644
index 00000000..8cb9ed35
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities.html
@@ -0,0 +1,151 @@
+
+
+
+
+ Gitlab::Entities
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Gitlab::Entities
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/Hook.html b/doc/code/classes/Gitlab/Entities/Hook.html
new file mode 100644
index 00000000..a42cc91d
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/Hook.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::Hook
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::Hook
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/Issue.html b/doc/code/classes/Gitlab/Entities/Issue.html
new file mode 100644
index 00000000..432c6f4b
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/Issue.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::Issue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::Issue
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/MRNote.html b/doc/code/classes/Gitlab/Entities/MRNote.html
new file mode 100644
index 00000000..e05a43b8
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/MRNote.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::MRNote
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::MRNote
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/MergeRequest.html b/doc/code/classes/Gitlab/Entities/MergeRequest.html
new file mode 100644
index 00000000..e6807716
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/MergeRequest.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::MergeRequest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::MergeRequest
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/Milestone.html b/doc/code/classes/Gitlab/Entities/Milestone.html
new file mode 100644
index 00000000..3c375faa
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/Milestone.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::Milestone
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::Milestone
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/Note.html b/doc/code/classes/Gitlab/Entities/Note.html
new file mode 100644
index 00000000..f0ba6567
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/Note.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::Note
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::Note
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/Project.html b/doc/code/classes/Gitlab/Entities/Project.html
new file mode 100644
index 00000000..a111b19f
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/Project.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::Project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::Project
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/ProjectMember.html b/doc/code/classes/Gitlab/Entities/ProjectMember.html
new file mode 100644
index 00000000..151abf27
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/ProjectMember.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::ProjectMember
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/ProjectSnippet.html b/doc/code/classes/Gitlab/Entities/ProjectSnippet.html
new file mode 100644
index 00000000..61259d0c
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/ProjectSnippet.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::ProjectSnippet
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::ProjectSnippet
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/RepoCommit.html b/doc/code/classes/Gitlab/Entities/RepoCommit.html
new file mode 100644
index 00000000..3d181a6f
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/RepoCommit.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::RepoCommit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::RepoCommit
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/RepoObject.html b/doc/code/classes/Gitlab/Entities/RepoObject.html
new file mode 100644
index 00000000..ee6a10e7
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/RepoObject.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::RepoObject
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::RepoObject
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/SSHKey.html b/doc/code/classes/Gitlab/Entities/SSHKey.html
new file mode 100644
index 00000000..cbc4d1a3
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/SSHKey.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::SSHKey
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::SSHKey
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/User.html b/doc/code/classes/Gitlab/Entities/User.html
new file mode 100644
index 00000000..5c296676
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/User.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::User
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::User
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/UserBasic.html b/doc/code/classes/Gitlab/Entities/UserBasic.html
new file mode 100644
index 00000000..a17b808d
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/UserBasic.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::UserBasic
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Entities::UserBasic
+
+ <
+
+ Grape::Entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Entities/UserLogin.html b/doc/code/classes/Gitlab/Entities/UserLogin.html
new file mode 100644
index 00000000..d73be2ca
--- /dev/null
+++ b/doc/code/classes/Gitlab/Entities/UserLogin.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Entities::UserLogin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/GitLogger.html b/doc/code/classes/Gitlab/GitLogger.html
new file mode 100644
index 00000000..19018c0f
--- /dev/null
+++ b/doc/code/classes/Gitlab/GitLogger.html
@@ -0,0 +1,173 @@
+
+
+
+
+ Gitlab::GitLogger
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ F
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
file_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .file_name
+ 'githost.log'
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/GitStats.html b/doc/code/classes/Gitlab/GitStats.html
new file mode 100644
index 00000000..fabe18bb
--- /dev/null
+++ b/doc/code/classes/Gitlab/GitStats.html
@@ -0,0 +1,506 @@
+
+
+
+
+ Gitlab::GitStats
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::GitStats
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+ F
+
+
+
+
+ G
+
+
+
+
+ N
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ ref
+
+
+
+
+
+ [RW]
+
+ repo
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (repo, ref)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize repo , ref
+ @repo , @ref = repo , ref
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authors
+ @authors ||= collect_authors
+end
+
+
+
+
+
+
+
+
+
authors_count ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authors_count
+ authors .size
+end
+
+
+
+
+
+
+
+
+
commits_count ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits_count
+ @commits_count ||= repo .commit_count (ref )
+end
+
+
+
+
+
+
+
+
+
files_count ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def files_count
+ args = [ref , '-r' , '--name-only' ]
+ repo .git .run (nil , 'ls-tree' , nil , {}, args ).split ("\n" ).count
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def graph
+ @graph ||= build_graph
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
build_graph (n = 4)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def build_graph n = 4
+ from , to = (Date .today - n .weeks ), Date .today
+ args = ['--all' , "--since=#{from.to_s(:date)}" , '--format=%ad' ]
+ rev_list = repo .git .run (nil , 'rev-list' , nil , {}, args ).split ("\n" )
+
+ commits_dates = rev_list .values_at (* rev_list .each_index .select {| i | i .odd? })
+ commits_dates = commits_dates .map { | date_str | Time .parse (date_str ).to_date .to_s (:date ) }
+
+ commits_per_day = from .upto (to ).map do | day |
+ commits_dates .count (day .to_date .to_s (:date ))
+ end
+
+ OpenStruct .new (
+ labels : from .upto (to ).map { | day | day .stamp ('Aug 23' ) },
+ commits : commits_per_day ,
+ weeks : n
+ )
+end
+
+
+
+
+
+
+
+
+
collect_authors ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def collect_authors
+ shortlog = repo .git .shortlog ({e : true , s : true }, ref )
+
+ authors = []
+
+ lines = shortlog .split ("\n" )
+
+ lines .each do | line |
+ data = line .split ("\t" )
+ commits = data .first
+ author = Grit :: Actor .from_string (data .last )
+
+ authors << OpenStruct .new (
+ name : author .name ,
+ email : author .email ,
+ commits : commits .to_i
+ )
+ end
+
+ authors .sort_by (&:commits ).reverse
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Gitolite.html b/doc/code/classes/Gitlab/Gitolite.html
new file mode 100644
index 00000000..8cf9c58c
--- /dev/null
+++ b/doc/code/classes/Gitlab/Gitolite.html
@@ -0,0 +1,536 @@
+
+
+
+
+ Gitlab::Gitolite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Gitolite
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ E
+
+
+
+
+ M
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def config
+ Gitlab :: GitoliteConfig .new
+end
+
+
+
+
+
+
+
+
+
create_repository (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
enable_automerge ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def enable_automerge
+ config .admin_all_repo!
+end
+
+
+
+
+
+
+
+
+
move_repository (old_repo, project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def move_repository (old_repo , project )
+ config .apply do | config |
+ config .clean_repo (old_repo )
+ config .update_project (project )
+ end
+end
+
+
+
+
+
+
+
+
+
remove_key (key_id, projects)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def remove_key key_id , projects
+ config .apply do | config |
+ config .rm_key (key_id )
+ config .update_projects (projects )
+ end
+end
+
+
+
+
+
+
+
+
+
remove_repository (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def remove_repository project
+ config .destroy_project! (project )
+end
+
+
+
+
+
+
+
+
+
set_key (key_id, key_content, projects)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def set_key key_id , key_content , projects
+ config .apply do | config |
+ config .write_key (key_id , key_content )
+ config .update_projects (projects )
+ end
+end
+
+
+
+
+
+
+
+
+
update_repositories (projects)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_repositories projects
+ config .apply do | config |
+ config .update_projects (projects )
+ end
+end
+
+
+
+
+
+
+
+
+
update_repository (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_repository project
+ config .update_project! (project )
+end
+
+
+
+
+
+
+
+
+
url_to_repo (path)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def url_to_repo path
+ Gitlab .config .gitolite .ssh_path_prefix + "#{path}.git"
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Gitolite/AccessDenied.html b/doc/code/classes/Gitlab/Gitolite/AccessDenied.html
new file mode 100644
index 00000000..8a45dae1
--- /dev/null
+++ b/doc/code/classes/Gitlab/Gitolite/AccessDenied.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::Gitolite::AccessDenied
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Gitolite::AccessDenied
+
+ <
+
+ StandardError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/GitoliteConfig.html b/doc/code/classes/Gitlab/GitoliteConfig.html
new file mode 100644
index 00000000..11026f5c
--- /dev/null
+++ b/doc/code/classes/Gitlab/GitoliteConfig.html
@@ -0,0 +1,810 @@
+
+
+
+
+ Gitlab::GitoliteConfig
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::GitoliteConfig
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ L
+
+
+
+
+ R
+
+
+
+
+ U
+
+
+
+
+ W
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [R]
+
+ conf
+
+
+
+
+
+ [R]
+
+ config_tmp_dir
+
+
+
+
+
+ [R]
+
+ ga_repo
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
admin_all_repo ()
+
+
Link
+
+
+
+
+
Enable access to all repos for gitolite admin. We use it for accept merge
+request feature
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def admin_all_repo
+ owner_name = Gitlab .config .gitolite .admin_key
+
+
+ repo_name = "@all"
+ repo = if conf .has_repo? (repo_name )
+ conf .get_repo (repo_name )
+ else
+ :: Gitolite :: Config :: Repo .new (repo_name )
+ end
+
+ repo .add_permission ("RW+" , "" , owner_name )
+ conf .add_repo (repo , true )
+end
+
+
+
+
+
+
+
+
+
admin_all_repo! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def admin_all_repo!
+ apply { | config | config .admin_all_repo }
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def apply
+ Timeout :: timeout (30 ) do
+ File .open (Rails .root .join ('tmp' , "gitlabhq-gitolite.lock" ), "w+" ) do | f |
+ begin
+
+
+ f .flock (File :: LOCK_EX )
+
+
+
+ pull (config_tmp_dir )
+
+
+
+ @conf = ga_repo .config
+
+
+
+
+ yield (self )
+
+
+
+
+ ga_repo .save
+
+
+
+ push (config_tmp_dir )
+ ensure
+
+
+
+ FileUtils .rm_rf (File .join (config_tmp_dir , 'gitolite' ))
+
+
+ FileUtils .rm_rf (config_tmp_dir )
+
+
+
+ f .flock (File :: LOCK_UN )
+ end
+ end
+ end
+rescue PullError => ex
+ log ("Pull error -> " + ex .message )
+ raise Gitolite :: AccessDenied , ex .message
+
+rescue PushError => ex
+ log ("Push error -> " + " " + ex .message )
+ raise Gitolite :: AccessDenied , ex .message
+
+rescue Exception => ex
+ log (ex .class .name + " " + ex .message )
+ raise Gitolite :: AccessDenied .new ("gitolite timeout" )
+end
+
+
+
+
+
+
+
+
+
clean_repo (repo_name)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def clean_repo repo_name
+ conf .rm_repo (repo_name )
+end
+
+
+
+
+
+
+
+
+
destroy_project (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy_project (project )
+ FileUtils .rm_rf (project .path_to_repo )
+ conf .rm_repo (project .path_with_namespace )
+end
+
+
+
+
+
+
+
+
+
destroy_project! (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy_project! (project )
+ apply do | config |
+ config .destroy_project (project )
+ end
+end
+
+
+
+
+
+
+
+
+
log (message)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def log message
+ Gitlab :: GitLogger .error (message )
+end
+
+
+
+
+
+
+
+
+
rm_key (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def rm_key (user )
+ key_path = File .join (config_tmp_dir , 'gitolite/keydir' , "#{user}.pub" )
+ ga_key = :: Gitolite :: SSHKey .from_file (key_path )
+ ga_repo .rm_key (ga_key )
+end
+
+
+
+
+
+
+
+
+
update_project (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_project (project )
+ repo = update_project_config (project , conf )
+ conf .add_repo (repo , true )
+end
+
+
+
+
+
+
+
+
+
update_project! ( project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_project! ( project )
+ apply do | config |
+ config .update_project (project )
+ end
+end
+
+
+
+
+
+
+
+
+
update_project_config (project, conf)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_project_config (project , conf )
+ repo_name = project .path_with_namespace
+
+ repo = if conf .has_repo? (repo_name )
+ conf .get_repo (repo_name )
+ else
+ :: Gitolite :: Config :: Repo .new (repo_name )
+ end
+
+ name_readers = project .repository_readers
+ name_writers = project .repository_writers
+ name_masters = project .repository_masters
+
+ pr_br = project .protected_branches .map (&:name ).join ("$ " )
+
+ repo .clean_permissions
+
+
+ unless name_writers .blank? || pr_br .blank?
+ repo .add_permission ("-" , pr_br .strip + "$ " , name_writers )
+ end
+
+
+ repo .add_permission ("R" , "" , name_readers ) unless name_readers .blank?
+
+
+ repo .add_permission ("RW+" , "" , name_writers ) unless name_writers .blank?
+ repo .add_permission ("RW+" , "" , name_masters ) unless name_masters .blank?
+
+
+ repo .set_git_config ("core.sharedRepository" , "0660" )
+
+ repo
+end
+
+
+
+
+
+
+
+
+
update_projects (projects)
+
+
Link
+
+
+
+
+
Updates many projects and uses project.path_with_namespace as the repo path
+An order of magnitude faster than #update_project
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_projects (projects )
+ projects .each do | project |
+ repo = update_project_config (project , conf )
+ conf .add_repo (repo , true )
+ end
+end
+
+
+
+
+
+
+
+
+
write_key (id, key)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def write_key (id , key )
+ File .open (File .join (config_tmp_dir , 'gitolite/keydir' ,"#{id}.pub" ), 'w' ) do | f |
+ f .write (key .gsub (%r\n/ ,'' ))
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/GitoliteConfig/PullError.html b/doc/code/classes/Gitlab/GitoliteConfig/PullError.html
new file mode 100644
index 00000000..35c46f38
--- /dev/null
+++ b/doc/code/classes/Gitlab/GitoliteConfig/PullError.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::GitoliteConfig::PullError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::GitoliteConfig::PullError
+
+ <
+
+ StandardError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/GitoliteConfig/PushError.html b/doc/code/classes/Gitlab/GitoliteConfig/PushError.html
new file mode 100644
index 00000000..53efe1e8
--- /dev/null
+++ b/doc/code/classes/Gitlab/GitoliteConfig/PushError.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::GitoliteConfig::PushError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::GitoliteConfig::PushError
+
+ <
+
+ StandardError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Graph.html b/doc/code/classes/Gitlab/Graph.html
new file mode 100644
index 00000000..e0827c84
--- /dev/null
+++ b/doc/code/classes/Gitlab/Graph.html
@@ -0,0 +1,88 @@
+
+
+
+
+ Gitlab::Graph
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Gitlab::Graph
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Graph/Commit.html b/doc/code/classes/Gitlab/Graph/Commit.html
new file mode 100644
index 00000000..0198b3f0
--- /dev/null
+++ b/doc/code/classes/Gitlab/Graph/Commit.html
@@ -0,0 +1,337 @@
+
+
+
+
+ Gitlab::Graph::Commit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Graph::Commit
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+ ActionView::Helpers::TagHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ refs
+
+
+
+
+
+ [RW]
+
+ space
+
+
+
+
+
+ [RW]
+
+ time
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (commit)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (commit )
+ @_commit = commit
+ @time = -1
+ @space = 0
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
add_refs (ref_cache, repo)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def add_refs (ref_cache , repo )
+ if ref_cache .empty?
+ repo .refs .each do | ref |
+ ref_cache [ref .commit .id ] ||= []
+ ref_cache [ref .commit .id ] << ref
+ end
+ end
+ @refs = ref_cache [@_commit .id ] if ref_cache .include? (@_commit .id )
+ @refs ||= []
+end
+
+
+
+
+
+
+
+
+
method_missing (m, *args, &block)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def method_missing (m , *args , &block )
+ @_commit .send (m , *args , &block )
+end
+
+
+
+
+
+
+
+
+
to_graph_hash ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def to_graph_hash
+ h = {}
+ h [:parents ] = self .parents .collect do | p |
+ [p .id ,0 ,0 ]
+ end
+ h [:author ] = author .name
+ h [:time ] = time
+ h [:space ] = space
+ h [:refs ] = refs .collect {| r | r .name }.join (" " ) unless refs .nil?
+ h [:id ] = sha
+ h [:date ] = date
+ h [:message ] = message
+ h [:login ] = author .email
+ h
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Graph/JsonBuilder.html b/doc/code/classes/Gitlab/Graph/JsonBuilder.html
new file mode 100644
index 00000000..b410947b
--- /dev/null
+++ b/doc/code/classes/Gitlab/Graph/JsonBuilder.html
@@ -0,0 +1,707 @@
+
+
+
+
+ Gitlab::Graph::JsonBuilder
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Graph::JsonBuilder
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+ F
+
+
+
+
+ I
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ commits
+
+
+
+
+
+ [RW]
+
+ days
+
+
+
+
+
+ [RW]
+
+ ref_cache
+
+
+
+
+
+ [RW]
+
+ repo
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
max_count ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .max_count
+ @max_count ||= 650
+end
+
+
+
+
+
+
+
+
+
new (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize project
+ @project = project
+ @repo = project .repo
+ @ref_cache = {}
+
+ @commits = collect_commits
+ @days = index_commits
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
to_json (*args)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def to_json (*args )
+ {
+ days : @days .compact .map { | d | [d .day , d .strftime ("%b" )] },
+ commits : @commits .map (&:to_graph_hash )
+ }.to_json (*args )
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
base_space (leaves, map)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def base_space (leaves , map )
+ parents = []
+ leaves .each do | l |
+ parents .concat l .parents .collect .select {| p | map .include? p .id and map [p .id ].space .nonzero? }
+ end
+
+ space = parents .map {| p | map [p .id ].space }.max || 0
+ space += 1
+end
+
+
+
+
+
+
+
+
+
collect_commits ()
+
+
Link
+
+
+
+
+
Get commits from repository
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def collect_commits
+ @commits = Grit :: Commit .find_all (repo , nil , {max_count : self .class .max_count }).dup
+
+
+ @commits .map! { | commit | :: Commit .new (commit ) }
+
+
+ @commits .map! { | commit | Gitlab :: Graph :: Commit .new (commit ) }
+
+
+ @commits .each { | commit | commit .add_refs (ref_cache , repo ) }
+
+ @commits
+end
+
+
+
+
+
+
+
+
+
find_free_space (leaves, map)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def find_free_space (leaves , map )
+ time_range = leaves .last .time .. leaves .first .time
+ reserved = []
+ for day in time_range
+ reserved += @_reserved [day ]
+ end
+ space = base_space (leaves , map )
+ while reserved .include? space do
+ space += 1
+ end
+ space
+end
+
+
+
+
+
+
+
+
+
index_commits ()
+
+
Link
+
+
+
+
+
Method is adding time and space on the list of commits. As well as returns
+date list corelated with time set on commits.
+
+
@param [Array<Graph::Commit>] comits to index
+
+
@return [Array<TimeDate>] list of commit dates corelated with time on
+commits
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index_commits
+ days , heads = [], []
+ map = {}
+
+ commits .reverse .each_with_index do | c ,i |
+ c .time = i
+ days [i ] = c .committed_date
+ map [c .id ] = c
+ heads += c .refs unless c .refs .nil?
+ end
+
+ heads .select! {| h | h .is_a? Grit :: Head or h .is_a? Grit :: Remote }
+
+ heads .sort! do | a ,b |
+ if a .name == "master"
+ -1
+ elsif b .name == "master"
+ 1
+ else
+ b .commit .committed_date <=> a .commit .committed_date
+ end
+ end
+
+ @_reserved = {}
+ days .each_index do | i |
+ @_reserved [i ] = []
+ end
+
+ heads .each do | h |
+ if map .include? h .commit .id then
+ place_chain (map [h .commit .id ], map )
+ end
+ end
+
+ days
+end
+
+
+
+
+
+
+
+
+
mark_reserved (time_range, space)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def mark_reserved (time_range , space )
+ for day in time_range
+ @_reserved [day ].push (space )
+ end
+end
+
+
+
+
+
+
+
+
+
place_chain (commit, map, parent_time = nil)
+
+
Link
+
+
+
+
+
Add space mark on commit and its parents
+
+
@param [Graph::Commit] the commit object. @param
+[Hash<String,Graph::Commit>] map of commits
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def place_chain (commit , map , parent_time = nil )
+ leaves = take_left_leaves (commit , map )
+ if leaves .empty?
+ return
+ end
+ space = find_free_space (leaves , map )
+ leaves .each {| l | l .space = space }
+
+ min_time = leaves .last .time
+ parents = leaves .last .parents .collect
+ parents .each do | p |
+ if map .include? p .id
+ parent = map [p .id ]
+ if parent .time < min_time
+ min_time = parent .time
+ end
+ end
+ end
+ if parent_time .nil?
+ max_time = leaves .first .time
+ else
+ max_time = parent_time - 1
+ end
+ mark_reserved (min_time .. max_time , space )
+
+
+ leaves .each do | l |
+ parents = l .parents .collect .select {| p | map .include? p .id and map [p .id ].space .zero? }
+ for p in parents
+ place_chain (map [p .id ], map , l .time )
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
take_left_leaves (commit, map)
+
+
Link
+
+
+
+
+
Takes most left subtree branch of commits which don’t have space mark yet.
+
+
@param [Graph::Commit] the commit object. @param
+[Hash<String,Graph::Commit>] map of commits
+
+
@return [Array<Graph::Commit>] list of branch commits
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def take_left_leaves (commit , map )
+ leaves = []
+ leaves .push (commit ) if commit .space .zero?
+
+ while true
+ return leaves if commit .parents .count .zero?
+ return leaves unless map .include? commit .parents .first .id
+
+ commit = map [commit .parents .first .id ]
+
+ return leaves unless commit .space .zero?
+
+ leaves .push (commit )
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/InlineDiff.html b/doc/code/classes/Gitlab/InlineDiff.html
new file mode 100644
index 00000000..cd04b7d0
--- /dev/null
+++ b/doc/code/classes/Gitlab/InlineDiff.html
@@ -0,0 +1,299 @@
+
+
+
+
+ Gitlab::InlineDiff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::InlineDiff
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ #
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Constants
+
+
+
+ START
+ =
+ "#!idiff-start!#"
+
+
+
+
+
+
+
+
+
+ FINISH
+ =
+ "#!idiff-finish!#"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
_indexes_of_changed_lines (diff_arr)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def _indexes_of_changed_lines diff_arr
+ chain_of_first_symbols = ""
+ diff_arr .each_with_index do | line , i |
+ chain_of_first_symbols += line [0 ]
+ end
+ chain_of_first_symbols .gsub! (%r[^\-\+]/ , "#" )
+
+ offset = 0
+ indexes = []
+ while index = chain_of_first_symbols .index ("#-+#" , offset )
+ indexes << index
+ offset = index + 1
+ end
+ indexes
+end
+
+
+
+
+
+
+
+
+
processing (diff_arr)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def processing diff_arr
+ indexes = _indexes_of_changed_lines diff_arr
+
+ indexes .each do | index |
+ first_line = diff_arr [index + 1 ]
+ second_line = diff_arr [index + 2 ]
+ max_length = [first_line .size , second_line .size ].max
+
+ first_the_same_symbols = 0
+ (0 .. max_length + 1 ).each do | i |
+ first_the_same_symbols = i - 1
+ if first_line [i ] != second_line [i ] && i > 0
+ break
+ end
+ end
+ first_token = first_line [0 .. first_the_same_symbols ][1 .. -1 ]
+ diff_arr [index + 1 ].sub! (first_token , first_token + START )
+ diff_arr [index + 2 ].sub! (first_token , first_token + START )
+ last_the_same_symbols = 0
+ (1 .. max_length + 1 ).each do | i |
+ last_the_same_symbols = - i
+ shortest_line = second_line .size > first_line .size ? first_line : second_line
+ if ( first_line [- i ] != second_line [- i ] ) || "#{first_token}#{START}" .size == shortest_line [1 .. - i ].size
+ break
+ end
+ end
+ last_the_same_symbols += 1
+ last_token = first_line [last_the_same_symbols .. -1 ]
+ diff_arr [index + 1 ].sub! (%r#{Regexp.escape(last_token)}$/ , FINISH + last_token )
+ diff_arr [index + 2 ].sub! (%r#{Regexp.escape(last_token)}$/ , FINISH + last_token )
+ end
+ diff_arr
+end
+
+
+
+
+
+
+
+
+
replace_markers (line)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def replace_markers line
+ line .gsub! (START , "<span class='idiff'>" )
+ line .gsub! (FINISH , "</span>" )
+ line
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Issues.html b/doc/code/classes/Gitlab/Issues.html
new file mode 100644
index 00000000..91c6dead
--- /dev/null
+++ b/doc/code/classes/Gitlab/Issues.html
@@ -0,0 +1,82 @@
+
+
+
+
+ Gitlab::Issues
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Issues
+
+ <
+
+ Grape::API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Logger.html b/doc/code/classes/Gitlab/Logger.html
new file mode 100644
index 00000000..2c523c19
--- /dev/null
+++ b/doc/code/classes/Gitlab/Logger.html
@@ -0,0 +1,315 @@
+
+
+
+
+ Gitlab::Logger
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Logger
+
+ <
+
+ Logger
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ B
+
+
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ R
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .build
+ new (Rails .root .join ("log" , file_name ))
+end
+
+
+
+
+
+
+
+
+
error (message)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .error (message )
+ build .error (message )
+end
+
+
+
+
+
+
+
+
+
info (message)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .info (message )
+ build .info (message )
+end
+
+
+
+
+
+
+
+
+
read_latest ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .read_latest
+ path = Rails .root .join ("log" , file_name )
+ self .build unless File .exist? (path )
+ logs = %xtail -n 2000 #{path}` .split ("\n" )
+end
+
+
+
+
+
+
+
+
+
read_latest_for (filename)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .read_latest_for filename
+ path = Rails .root .join ("log" , filename )
+ logs = %xtail -n 2000 #{path}` .split ("\n" )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Markdown.html b/doc/code/classes/Gitlab/Markdown.html
new file mode 100644
index 00000000..45d853f3
--- /dev/null
+++ b/doc/code/classes/Gitlab/Markdown.html
@@ -0,0 +1,258 @@
+
+
+
+
+ Gitlab::Markdown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Gitlab::Markdown
+
+
+
+
+
+
+
+
+
+
Custom parser for GitLab-flavored Markdown
+
+
It replaces references in the text with links to the appropriate items in
+GitLab.
+
+
Supported reference formats are:
+
+
* @foo for team members
+* #123 for issues
+* !123 for merge requests
+* $123 for snippets
+* 123456 for commits
+
+
It also parses Emoji codes to insert images. See www.emoji-cheat-sheet.com/ for
+a list of the supported icons.
+
+
Examples
+
+
>> gfm ("Hey @david, can you fix this?" )
+=> "Hey <a href=" / gitlab / team_members / 1 ">@david</a>, can you fix this?"
+
+>> gfm ("Commit 35d5f7c closes #1234" )
+=> "Commit <a href=" / gitlab / commits / 35 d5f7c ">35d5f7c</a> closes <a href=" / gitlab / issues / 1234 ">#1234</a>"
+
+>> gfm (":trollface:" )
+=> "<img alt=\":trollface:\" class=\"emoji\" src=\"/images/trollface.png" title =\":trollface:\" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ G
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Constants
+
+
+
+ REFERENCE_PATTERN
+ =
+ %r{
+(?<prefix>\W)? # Prefix
+( # Reference
+@(?<user>[a-zA-Z][a-zA-Z0-9_\-\.]*) # User name
+|\#(?<issue>\d+) # Issue ID
+|!(?<merge_request>\d+) # MR ID
+|\$(?<snippet>\d+) # Snippet ID
+|(?<commit>[\h]{6,40}) # Commit ID
+)
+(?<suffix>\W)? # Suffix
+}x.freeze
+
+
+
+
+
+
+
+
+
+ TYPES
+ =
+ [:user, :issue, :merge_request, :snippet, :commit].freeze
+
+
+
+
+
+
+
+
+
+ EMOJI_PATTERN
+ =
+ %r{(:(\S+):)}.freeze
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [R]
+
+ html_options
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
gfm (text, html_options = {})
+
+
Link
+
+
+
+
+
Public: Parse the provided text with GitLab-Flavored Markdown
+
+
text - the source text #html_options - extra
+options for the reference links as given to link_to
+
+
Note: reference links will only be generated if @project is set
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def gfm (text , html_options = {})
+ return text if text .nil?
+
+
+
+
+ text = text .dup .to_str
+
+ @html_options = html_options
+
+
+
+ extractions = {}
+ text .gsub! (%r{<pre>.*?</pre>|<code>.*?</code>} ) do | match |
+ md5 = Digest :: MD5 .hexdigest (match )
+ extractions [md5 ] = match
+ "{gfm-extraction-#{md5}}"
+ end
+
+
+
+ text = parse (text )
+
+
+ text .gsub! (%r\{gfm-extraction-(\h{32})\}/ ) do
+ extractions [$1 ]
+ end
+
+ sanitize text .html_safe , attributes : ActionView :: Base .sanitized_allowed_attributes + %w(id class)
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/MergeRequests.html b/doc/code/classes/Gitlab/MergeRequests.html
new file mode 100644
index 00000000..556f2b01
--- /dev/null
+++ b/doc/code/classes/Gitlab/MergeRequests.html
@@ -0,0 +1,82 @@
+
+
+
+
+ Gitlab::MergeRequests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::MergeRequests
+
+ <
+
+ Grape::API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Milestones.html b/doc/code/classes/Gitlab/Milestones.html
new file mode 100644
index 00000000..4226dab3
--- /dev/null
+++ b/doc/code/classes/Gitlab/Milestones.html
@@ -0,0 +1,82 @@
+
+
+
+
+ Gitlab::Milestones
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Milestones
+
+ <
+
+ Grape::API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Notes.html b/doc/code/classes/Gitlab/Notes.html
new file mode 100644
index 00000000..90d3e7af
--- /dev/null
+++ b/doc/code/classes/Gitlab/Notes.html
@@ -0,0 +1,100 @@
+
+
+
+
+ Gitlab::Notes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Notes
+
+ <
+
+ Grape::API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Constants
+
+
+
+ NOTEABLE_TYPES
+ =
+ [Issue, Snippet]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/ProjectMover.html b/doc/code/classes/Gitlab/ProjectMover.html
new file mode 100644
index 00000000..d13cf13d
--- /dev/null
+++ b/doc/code/classes/Gitlab/ProjectMover.html
@@ -0,0 +1,290 @@
+
+
+
+
+ Gitlab::ProjectMover
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::ProjectMover
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+ L
+
+
+
+
+ N
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [R]
+
+ new_dir
+
+
+
+
+
+ [R]
+
+ old_dir
+
+
+
+
+
+ [R]
+
+ project
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (project, old_dir, new_dir)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (project , old_dir , new_dir )
+ @project = project
+ @old_dir = old_dir
+ @new_dir = new_dir
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute
+
+ new_dir_path = File .join (Gitlab .config .gitolite .repos_path , new_dir )
+ system ("mkdir -m 770 #{new_dir_path}" ) unless File .exists? (new_dir_path )
+
+ old_path = File .join (Gitlab .config .gitolite .repos_path , old_dir , "#{project.path}.git" )
+ new_path = File .join (new_dir_path , "#{project.path}.git" )
+
+ if File .exists? new_path
+ raise ProjectMoveError .new ("Destination #{new_path} already exists" )
+ end
+
+ if system ("mv #{old_path} #{new_path}" )
+ log_info "Project #{project.name} was moved from #{old_path} to #{new_path}"
+ true
+ else
+ message = "Project #{project.name} cannot be moved from #{old_path} to #{new_path}"
+ log_info "Error! #{message}"
+ raise ProjectMoveError .new (message )
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
log_info (message)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def log_info message
+ Gitlab :: AppLogger .info message
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/ProjectMover/ProjectMoveError.html b/doc/code/classes/Gitlab/ProjectMover/ProjectMoveError.html
new file mode 100644
index 00000000..0071ba0c
--- /dev/null
+++ b/doc/code/classes/Gitlab/ProjectMover/ProjectMoveError.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Gitlab::ProjectMover::ProjectMoveError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::ProjectMover::ProjectMoveError
+
+ <
+
+ StandardError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Projects.html b/doc/code/classes/Gitlab/Projects.html
new file mode 100644
index 00000000..9005134e
--- /dev/null
+++ b/doc/code/classes/Gitlab/Projects.html
@@ -0,0 +1,82 @@
+
+
+
+
+ Gitlab::Projects
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Projects
+
+ <
+
+ Grape::API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Regex.html b/doc/code/classes/Gitlab/Regex.html
new file mode 100644
index 00000000..674df322
--- /dev/null
+++ b/doc/code/classes/Gitlab/Regex.html
@@ -0,0 +1,261 @@
+
+
+
+
+ Gitlab::Regex
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Gitlab::Regex
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ D
+
+
+
+
+ P
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
path_regex ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def path_regex
+ default_regex
+end
+
+
+
+
+
+
+
+
+
project_name_regex ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_name_regex
+ %r\A[a-zA-Z][a-zA-Z0-9_\-\. ]*\z/
+end
+
+
+
+
+
+
+
+
+
username_regex ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def username_regex
+ default_regex
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
default_regex ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def default_regex
+ %r\A[a-zA-Z][a-zA-Z0-9_\-\.]*\z/
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Satellite.html b/doc/code/classes/Gitlab/Satellite.html
new file mode 100644
index 00000000..943bbf8e
--- /dev/null
+++ b/doc/code/classes/Gitlab/Satellite.html
@@ -0,0 +1,102 @@
+
+
+
+
+ Gitlab::Satellite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Gitlab::Satellite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Satellite/Action.html b/doc/code/classes/Gitlab/Satellite/Action.html
new file mode 100644
index 00000000..abe7411e
--- /dev/null
+++ b/doc/code/classes/Gitlab/Satellite/Action.html
@@ -0,0 +1,305 @@
+
+
+
+
+ Gitlab::Satellite::Action
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Satellite::Action
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ I
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Constants
+
+
+
+ DEFAULT_OPTIONS
+ =
+ { git_timeout: 30.seconds }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ options
+
+
+
+
+
+ [RW]
+
+ project
+
+
+
+
+
+ [RW]
+
+ user
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (user, project, options = {})
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (user , project , options = {})
+ @options = DEFAULT_OPTIONS .merge (options )
+ @project = project
+ @user = user
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
in_locked_and_timed_satellite ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def in_locked_and_timed_satellite
+ Grit :: Git .with_timeout (options [:git_timeout ]) do
+ project .satellite .lock do
+ return yield project .satellite .repo
+ end
+ end
+rescue Errno :: ENOMEM => ex
+ Gitlab :: GitLogger .error (ex .message )
+ return false
+rescue Grit :: Git :: GitTimeout => ex
+ Gitlab :: GitLogger .error (ex .message )
+ return false
+end
+
+
+
+
+
+
+
+
+
prepare_satellite! (repo)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def prepare_satellite! (repo )
+ project .satellite .clear_and_update!
+
+ repo .git .config ({}, "user.name" , user .name )
+ repo .git .config ({}, "user.email" , user .email )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Satellite/EditFileAction.html b/doc/code/classes/Gitlab/Satellite/EditFileAction.html
new file mode 100644
index 00000000..3a35aa22
--- /dev/null
+++ b/doc/code/classes/Gitlab/Satellite/EditFileAction.html
@@ -0,0 +1,284 @@
+
+
+
+
+ Gitlab::Satellite::EditFileAction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Satellite::EditFileAction
+
+ <
+
+ Action
+
+
+
+
+
+
+
+
+
+
+
+
GitLab server-side file update and commit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ N
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ file_path
+
+
+
+
+
+ [RW]
+
+ ref
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (user, project, ref, file_path)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (user , project , ref , file_path )
+ super user , project , git_timeout : 10 .seconds
+ @file_path = file_path
+ @ref = ref
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
commit! (content, commit_message, last_commit)
+
+
Link
+
+
+
+
+
Updates the files content and creates a new commit for it
+
+
Returns false if the ref has been updated while editing the file Returns
+false if commiting the change fails Returns false if pushing from the
+satellite to Gitolite failed or was rejected
+Returns true otherwise
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit! (content , commit_message , last_commit )
+ return false unless can_edit? (last_commit )
+
+ in_locked_and_timed_satellite do | repo |
+ prepare_satellite! (repo )
+
+
+ repo .git .checkout ({raise : true , timeout : true , b : true }, ref , "origin/#{ref}" )
+
+
+ file_path_in_satellite = File .join (repo .working_dir , file_path )
+ File .open (file_path_in_satellite , 'w' ) { | f | f .write (content ) }
+
+
+
+ repo .git .commit (raise : true , timeout : true , a : true , m : commit_message )
+
+
+
+
+ repo .git .push ({raise : true , timeout : true }, :origin , ref )
+
+
+ true
+ end
+rescue Grit :: Git :: CommandFailed => ex
+ Gitlab :: GitLogger .error (ex .message )
+ false
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
can_edit? (last_commit)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def can_edit? (last_commit )
+ current_last_commit = @project .last_commit_for (ref , file_path ).sha
+ last_commit == current_last_commit
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Satellite/MergeAction.html b/doc/code/classes/Gitlab/Satellite/MergeAction.html
new file mode 100644
index 00000000..064c4f06
--- /dev/null
+++ b/doc/code/classes/Gitlab/Satellite/MergeAction.html
@@ -0,0 +1,274 @@
+
+
+
+
+ Gitlab::Satellite::MergeAction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Satellite::MergeAction
+
+ <
+
+ Action
+
+
+
+
+
+
+
+
+
+
+
+
GitLab server-side merge
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ merge_request
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (user, merge_request)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (user , merge_request )
+ super user , merge_request .project
+ @merge_request = merge_request
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
can_be_merged? ()
+
+
Link
+
+
+
+
+
Checks if a merge request can be executed without user interaction
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def can_be_merged?
+ in_locked_and_timed_satellite do | merge_repo |
+ merge_in_satellite! (merge_repo )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
Merges the source branch into the target branch in the satellite and pushes
+it back to Gitolite . It also removes the
+source branch if requested in the merge request.
+
+
Returns false if the merge produced conflicts Returns false if pushing from
+the satellite to Gitolite failed or was
+rejected Returns true otherwise
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def merge!
+ in_locked_and_timed_satellite do | merge_repo |
+ if merge_in_satellite! (merge_repo )
+
+
+ merge_repo .git .push ({raise : true , timeout : true }, :origin , merge_request .target_branch )
+
+
+ if merge_request .should_remove_source_branch && ! project .root_ref? (merge_request .source_branch )
+
+ merge_repo .git .push ({raise : true , timeout : true }, :origin , ":#{merge_request.source_branch}" )
+ end
+
+
+ true
+ end
+ end
+rescue Grit :: Git :: CommandFailed => ex
+ Gitlab :: GitLogger .error (ex .message )
+ false
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Satellite/Satellite.html b/doc/code/classes/Gitlab/Satellite/Satellite.html
new file mode 100644
index 00000000..86d82e6a
--- /dev/null
+++ b/doc/code/classes/Gitlab/Satellite/Satellite.html
@@ -0,0 +1,506 @@
+
+
+
+
+ Gitlab::Satellite::Satellite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Satellite::Satellite
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ E
+
+
+
+
+ L
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Constants
+
+
+
+ PARKING_BRANCH
+ =
+ "__parking_branch"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ project
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (project )
+ @project = project
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
clear_and_update! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def clear_and_update!
+ raise "Satellite doesn't exist" unless exists?
+
+ delete_heads!
+ clear_working_dir!
+ update_from_source!
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ create_cmd = "git clone #{project.url_to_repo} #{path}"
+ if system (create_cmd )
+ true
+ else
+ Gitlab :: GitLogger .error ("Failed to create satellite for #{project.name_with_namespace}" )
+ false
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def exists?
+ File .exists? path
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def lock
+ raise "Satellite doesn't exist" unless exists?
+
+ File .open (lock_file , "w+" ) do | f |
+ f .flock (File :: LOCK_EX )
+
+ Dir .chdir (path ) do
+ return yield
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
lock_file ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def lock_file
+ Rails .root .join ("tmp" , "satellite_#{project.id}.lock" )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def path
+ Rails .root .join ("tmp" , "repo_satellites" , project .path_with_namespace )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def repo
+ raise "Satellite doesn't exist" unless exists?
+
+ @repo ||= Grit :: Repo .new (path )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Seeder.html b/doc/code/classes/Gitlab/Seeder.html
new file mode 100644
index 00000000..a62c96a5
--- /dev/null
+++ b/doc/code/classes/Gitlab/Seeder.html
@@ -0,0 +1,134 @@
+
+
+
+
+ Gitlab::Seeder
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Seeder
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ Q
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .quiet
+ SeedFu .quiet = true
+ yield
+ SeedFu .quiet = false
+ puts "\nOK" .green
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Session.html b/doc/code/classes/Gitlab/Session.html
new file mode 100644
index 00000000..ad14adc0
--- /dev/null
+++ b/doc/code/classes/Gitlab/Session.html
@@ -0,0 +1,82 @@
+
+
+
+
+ Gitlab::Session
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Session
+
+ <
+
+ Grape::API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Theme.html b/doc/code/classes/Gitlab/Theme.html
new file mode 100644
index 00000000..8f918b35
--- /dev/null
+++ b/doc/code/classes/Gitlab/Theme.html
@@ -0,0 +1,141 @@
+
+
+
+
+ Gitlab::Theme
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Theme
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
css_class_by_id (id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .css_class_by_id (id )
+ themes = {
+ 1 => "ui_basic" ,
+ 2 => "ui_mars" ,
+ 3 => "ui_modern" ,
+ 4 => "ui_gray" ,
+ 5 => "ui_color"
+ }
+
+ id ||= 1
+
+ return themes [id ]
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Gitlab/Users.html b/doc/code/classes/Gitlab/Users.html
new file mode 100644
index 00000000..50ba3131
--- /dev/null
+++ b/doc/code/classes/Gitlab/Users.html
@@ -0,0 +1,82 @@
+
+
+
+
+ Gitlab::Users
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Gitlab::Users
+
+ <
+
+ Grape::API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/GitlabCiService.html b/doc/code/classes/GitlabCiService.html
new file mode 100644
index 00000000..a56f614f
--- /dev/null
+++ b/doc/code/classes/GitlabCiService.html
@@ -0,0 +1,371 @@
+
+
+
+
+ GitlabCiService
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ GitlabCiService
+
+ <
+
+ Service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: services
+
+
id :integer not null, primary key
+type :string(255)
+title :string(255)
+token :string(255)
+project_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+active :boolean default(FALSE), not null
+project_url :string(255)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
activated? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def activated?
+ active
+end
+
+
+
+
+
+
+
+
+
build_page (sha)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def build_page sha
+ project_url + "/builds/#{sha}"
+end
+
+
+
+
+
+
+
+
+
commit_badge_path (sha)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit_badge_path sha
+ project_url + "/status?sha=#{sha}"
+end
+
+
+
+
+
+
+
+
+
commit_status (sha)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit_status sha
+ response = HTTParty .get (commit_status_path (sha ))
+
+ if response .code == 200 and response ["status" ]
+ response ["status" ]
+ else
+ :error
+ end
+end
+
+
+
+
+
+
+
+
+
commit_status_path (sha)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit_status_path sha
+ project_url + "/builds/#{sha}/status.json?token=#{token}"
+end
+
+
+
+
+
+
+
+
+
compose_service_hook ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def compose_service_hook
+ hook = service_hook || build_service_hook
+ hook .url = [project_url , "/build" , "?token=#{token}" ].join ("" )
+ hook .save
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/GitlabMarkdownHelper.html b/doc/code/classes/GitlabMarkdownHelper.html
new file mode 100644
index 00000000..32ae5f82
--- /dev/null
+++ b/doc/code/classes/GitlabMarkdownHelper.html
@@ -0,0 +1,222 @@
+
+
+
+
+ GitlabMarkdownHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ GitlabMarkdownHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ L
+
+
+
+
+ M
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
link_to_gfm (body, url, html_options = {})
+
+
Link
+
+
+
+
+
Use this in places where you would normally use link_to(gfm(…), …).
+
+
It solves a problem occurring with nested links (i.e. “<a>outer text
+<a>gfm ref</a> more outer text</a>”). This will not be
+interpreted as intended. Browsers will parse something like “<a>outer
+text </a><a>gfm ref</a> more outer text” (notice the last
+part is not linked any more). #link_to_gfm
+corrects that. It wraps all parts to explicitly produce the correct linking
+behavior (i.e. “<a>outer text </a><a>gfm
+ref</a><a> more outer text</a>”).
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def link_to_gfm (body , url , html_options = {})
+ return "" if body .blank?
+
+ gfm_body = gfm (escape_once (body ), html_options )
+
+ gfm_body .gsub! (%r{<a.*?>.*?</a>} ) do | match |
+ "</a>#{match}#{link_to("", url, html_options)[0..-5]}"
+ end
+
+ link_to (gfm_body .html_safe , url , html_options )
+end
+
+
+
+
+
+
+
+
+
markdown (text)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def markdown (text )
+ unless @markdown
+ gitlab_renderer = Redcarpet :: Render :: GitlabHTML .new (self ,
+
+ filter_html : true ,
+ with_toc_data : true ,
+ hard_wrap : true )
+ @markdown = Redcarpet :: Markdown .new (gitlab_renderer ,
+
+ no_intra_emphasis : true ,
+ tables : true ,
+ fenced_code_blocks : true ,
+ autolink : true ,
+ strikethrough : true ,
+ lax_html_blocks : true ,
+ space_after_headers : true ,
+ superscript : true )
+ end
+
+ @markdown .render (text ).html_safe
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Grack.html b/doc/code/classes/Grack.html
new file mode 100644
index 00000000..9261c356
--- /dev/null
+++ b/doc/code/classes/Grack.html
@@ -0,0 +1,81 @@
+
+
+
+
+ Grack
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Grack
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Grack/Auth.html b/doc/code/classes/Grack/Auth.html
new file mode 100644
index 00000000..a1350e2f
--- /dev/null
+++ b/doc/code/classes/Grack/Auth.html
@@ -0,0 +1,419 @@
+
+
+
+
+ Grack::Auth
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Grack::Auth
+
+ <
+
+ Rack::Auth::Basic
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ V
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ project
+
+
+
+
+
+ [RW]
+
+ user
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
can? (object, action, subject)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def can? (object , action , subject )
+ abilities .allowed? (object , action , subject )
+end
+
+
+
+
+
+
+
+
+
current_ref ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def current_ref
+ if @env ["HTTP_CONTENT_ENCODING" ] =~ %rgzip/
+ input = Zlib :: GzipReader .new (@request .body ).read
+ else
+ input = @request .body .read
+ end
+
+ @request .body .rewind
+ %rrefs\/heads\/([\w\.-]+)/ .match (input ).to_a .first
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def valid?
+
+ login , password = @auth .credentials
+
+ self .user = User .find_by_email (login ) || User .find_by_username (login )
+
+ return false unless user .try (:valid_password? , password )
+
+ email = user .email
+
+
+ ENV ['GL_USER' ] = email
+
+ ENV ['GL_BYPASS_UPDATE_HOOK' ] = "true"
+
+
+ if m = %r^\/([\w\.\/-]+)\.git/ .match (@request .path_info ).to_a
+ self .project = Project .find_with_namespace (m .last )
+ return false unless project
+ end
+
+
+ if @request .get?
+ validate_get_request
+ elsif @request .post?
+ validate_post_request
+ else
+ false
+ end
+end
+
+
+
+
+
+
+
+
+
validate_get_request ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def validate_get_request
+ can? (user , :download_code , project )
+end
+
+
+
+
+
+
+
+
+
validate_post_request ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def validate_post_request
+ if @request .path_info .end_with? ('git-upload-pack' )
+ can? (user , :download_code , project )
+ elsif @request .path_info .end_with? ('git-receive-pack' )
+ action = if project .protected_branch? (current_ref )
+ :push_code_to_protected_branches
+ else
+ :push_code
+ end
+
+ can? (user , action , project )
+ else
+ false
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
abilities ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def abilities
+ @abilities ||= begin
+ abilities = Six .new
+ abilities << Ability
+ abilities
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Group.html b/doc/code/classes/Group.html
new file mode 100644
index 00000000..cf61c3ea
--- /dev/null
+++ b/doc/code/classes/Group.html
@@ -0,0 +1,294 @@
+
+
+
+
+ Group
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Group
+
+ <
+
+ Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: namespaces
+
+
id :integer not null, primary key
+name :string(255) not null
+path :string(255) not null
+owner_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ H
+
+
+
+
+ T
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
add_users_to_project_teams (user_ids, project_access)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def add_users_to_project_teams (user_ids , project_access )
+ UsersProject .add_users_into_projects (
+ projects .map (&:id ),
+ user_ids ,
+ project_access
+ )
+end
+
+
+
+
+
+
+
+
+
human_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def human_name
+ name
+end
+
+
+
+
+
+
+
+
+
truncate_teams ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def truncate_teams
+ UsersProject .truncate_teams (project_ids )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def users
+ users = User .joins (:users_projects ).where (users_projects : {project_id : project_ids })
+ users = users << owner
+ users .uniq
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/GroupsController.html b/doc/code/classes/GroupsController.html
new file mode 100644
index 00000000..dbca1708
--- /dev/null
+++ b/doc/code/classes/GroupsController.html
@@ -0,0 +1,566 @@
+
+
+
+
+ GroupsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ G
+
+
+
+
+ I
+
+
+
+
+ M
+
+
+
+
+ P
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
Get only assigned issues
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def issues
+ @user = current_user
+ @issues = current_user .assigned_issues .opened
+ @issues = @issues .of_group (@group ).recent .page (params [:page ]).per (20 )
+ @issues = @issues .includes (:author , :project )
+
+ respond_to do | format |
+ format .html
+ format .atom { render layout : false }
+ end
+end
+
+
+
+
+
+
+
+
+
merge_requests ()
+
+
Link
+
+
+
+
+
Get authored or assigned open merge requests
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def merge_requests
+ @merge_requests = current_user .cared_merge_requests .opened
+ @merge_requests = @merge_requests .of_group (@group ).recent .page (params [:page ]).per (20 )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def people
+ @project = group .projects .find (params [:project_id ]) if params [:project_id ]
+ @users = @project ? @project .users : group .users
+ @users .sort_by! (&:name )
+
+ if @project
+ @team_member = @project .users_projects .new
+ else
+ @team_member = UsersProject .new
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def search
+ result = SearchContext .new (project_ids , params ).execute
+
+ @projects = result [:projects ]
+ @merge_requests = result [:merge_requests ]
+ @issues = result [:issues ]
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @events = Event .in_projects (project_ids ).limit (20 ).offset (params [:offset ] || 0 )
+ @last_push = current_user .recent_push
+
+ respond_to do | format |
+ format .html
+ format .js
+ format .atom { render layout : false }
+ end
+end
+
+
+
+
+
+
+
+
+
team_members ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def team_members
+ @group .add_users_to_project_teams (params [:user_ids ], params [:project_access ])
+ redirect_to people_group_path (@group ), notice : 'Users was successfully added.'
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
authorize_read_group! ()
+
+
Link
+
+
+
+
+
Dont allow unauthorized access to group
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorize_read_group!
+ unless projects .present? or can? (current_user , :manage_group , @group )
+ return render_404
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def group
+ @group ||= Group .find_by_path (params [:id ])
+end
+
+
+
+
+
+
+
+
+
project_ids ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_ids
+ projects .map (&:id )
+end
+
+
+
+
+
+
+
+
+
projects ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def projects
+ @projects ||= group .projects .authorized_for (current_user ).sorted_by_activity
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/HelpController.html b/doc/code/classes/HelpController.html
new file mode 100644
index 00000000..fbb76563
--- /dev/null
+++ b/doc/code/classes/HelpController.html
@@ -0,0 +1,130 @@
+
+
+
+
+ HelpController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ I
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/HooksController.html b/doc/code/classes/HooksController.html
new file mode 100644
index 00000000..511e05f0
--- /dev/null
+++ b/doc/code/classes/HooksController.html
@@ -0,0 +1,286 @@
+
+
+
+
+ HooksController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ I
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @hook = @project .hooks .new (params [:hook ])
+ @hook .save
+
+ if @hook .valid?
+ redirect_to project_hooks_path (@project )
+ else
+ @hooks = @project .hooks .all
+ render :index
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ @hook = @project .hooks .find (params [:id ])
+ @hook .destroy
+
+ redirect_to project_hooks_path (@project )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @hooks = @project .hooks .all
+ @hook = ProjectHook .new
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def test
+ TestHookContext .new (project , current_user , params ).execute
+
+ redirect_to :back
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Issue.html b/doc/code/classes/Issue.html
new file mode 100644
index 00000000..6f71ea72
--- /dev/null
+++ b/doc/code/classes/Issue.html
@@ -0,0 +1,174 @@
+
+
+
+
+ Issue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Issue
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: issues
+
+
id :integer not null, primary key
+title :string(255)
+assignee_id :integer
+author_id :integer
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+closed :boolean default(FALSE), not null
+position :integer default(0)
+branch_name :string(255)
+description :text
+milestone_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ O
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
open_for (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .open_for (user )
+ opened .assigned (user )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/IssueCommonality.html b/doc/code/classes/IssueCommonality.html
new file mode 100644
index 00000000..7398308a
--- /dev/null
+++ b/doc/code/classes/IssueCommonality.html
@@ -0,0 +1,356 @@
+
+
+
+
+ IssueCommonality
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ IssueCommonality
+
+
+
+
+
+
+
+
+
+
Contains common functionality shared between Issues and MergeRequests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
Methods
+
+
+ I
+
+
+
+
+ N
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
is_assigned? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def is_assigned?
+ ! ! assignee_id
+end
+
+
+
+
+
+
+
+
+
is_being_closed? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def is_being_closed?
+ closed_changed? && closed
+end
+
+
+
+
+
+
+
+
+
is_being_reassigned? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def is_being_reassigned?
+ assignee_id_changed?
+end
+
+
+
+
+
+
+
+
+
is_being_reopened? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def is_being_reopened?
+ closed_changed? && ! closed
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new?
+ today? && created_at == updated_at
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def today?
+ Date .today == created_at .to_date
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/IssueCommonality/ClassMethods.html b/doc/code/classes/IssueCommonality/ClassMethods.html
new file mode 100644
index 00000000..5c3ca9b2
--- /dev/null
+++ b/doc/code/classes/IssueCommonality/ClassMethods.html
@@ -0,0 +1,125 @@
+
+
+
+
+ IssueCommonality::ClassMethods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ IssueCommonality::ClassMethods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
search (query)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def search (query )
+ where ("title like :query" , query : "%#{query}%" )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/IssueObserver.html b/doc/code/classes/IssueObserver.html
new file mode 100644
index 00000000..1600c0f0
--- /dev/null
+++ b/doc/code/classes/IssueObserver.html
@@ -0,0 +1,236 @@
+
+
+
+
+ IssueObserver
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ IssueObserver
+
+ <
+
+ ActiveRecord::Observer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
after_create (issue)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_create (issue )
+ if issue .assignee && issue .assignee != current_user
+ Notify .new_issue_email (issue .id ).deliver
+ end
+end
+
+
+
+
+
+
+
+
+
after_update (issue)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_update (issue )
+ send_reassigned_email (issue ) if issue .is_being_reassigned?
+
+ status = nil
+ status = 'closed' if issue .is_being_closed?
+ status = 'reopened' if issue .is_being_reopened?
+ if status
+ Note .create_status_change_note (issue , current_user , status )
+ [issue .author , issue .assignee ].compact .each do | recipient |
+ Notify .issue_status_changed_email (recipient .id , issue .id , status , current_user .id ).deliver
+ end
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
send_reassigned_email (issue)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def send_reassigned_email (issue )
+ recipient_ids = [issue .assignee_id , issue .assignee_id_was ].keep_if {| id | id && id != current_user .id }
+
+ recipient_ids .each do | recipient_id |
+ Notify .reassigned_issue_email (recipient_id , issue .id , issue .assignee_id_was ).deliver
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/IssuesBulkUpdateContext.html b/doc/code/classes/IssuesBulkUpdateContext.html
new file mode 100644
index 00000000..0214d217
--- /dev/null
+++ b/doc/code/classes/IssuesBulkUpdateContext.html
@@ -0,0 +1,149 @@
+
+
+
+
+ IssuesBulkUpdateContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ IssuesBulkUpdateContext
+
+ <
+
+ BaseContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute
+ update_data = params [:update ]
+
+ issues_ids = update_data [:issues_ids ].split ("," )
+ milestone_id = update_data [:milestone_id ]
+ assignee_id = update_data [:assignee_id ]
+ status = update_data [:status ]
+
+ opts = {}
+ opts [:milestone_id ] = milestone_id if milestone_id .present?
+ opts [:assignee_id ] = assignee_id if assignee_id .present?
+ opts [:closed ] = (status == "closed" ) if status .present?
+
+ issues = Issue .where (id : issues_ids ).all
+ issues = issues .select { | issue | can? (current_user , :modify_issue , issue ) }
+ issues .each { | issue | issue .update_attributes (opts ) }
+ {
+ count : issues .count ,
+ success : ! issues .count .zero?
+ }
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/IssuesController.html b/doc/code/classes/IssuesController.html
new file mode 100644
index 00000000..1e18d7a8
--- /dev/null
+++ b/doc/code/classes/IssuesController.html
@@ -0,0 +1,761 @@
+
+
+
+
+ IssuesController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ S
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
bulk_update ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def bulk_update
+ result = IssuesBulkUpdateContext .new (project , current_user , params ).execute
+ redirect_to :back , notice : "#{result[:count]} issues updated"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @issue = @project .issues .new (params [:issue ])
+ @issue .author = current_user
+ @issue .save
+
+ respond_to do | format |
+ format .html do
+ if @issue .valid?
+ redirect_to project_issue_path (@project , @issue )
+ else
+ render :new
+ end
+ end
+ format .js
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def edit
+ respond_with (@issue )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @issues = issues_filtered
+ @issues = @issues .page (params [:page ]).per (20 )
+
+ respond_to do | format |
+ format .html
+ format .js
+ format .atom { render layout : false }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new
+ @issue = @project .issues .new (params [:issue ])
+ respond_with (@issue )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def search
+ terms = params ['terms' ]
+
+ @issues = issues_filtered
+ @issues = @issues .where ("title LIKE ?" , "%#{terms}%" ) unless terms .blank?
+ @issues = @issues .page (params [:page ]).per (100 )
+
+ render partial : 'issues'
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @note = @project .notes .new (noteable : @issue )
+
+ respond_to do | format |
+ format .html
+ format .js
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def sort
+ return render_404 unless can? (current_user , :admin_issue , @project )
+
+ @issues = @project .issues .where (id : params ['issue' ])
+ @issues .each do | issue |
+ issue .position = params ['issue' ].index (issue .id .to_s ) + 1
+ issue .save
+ end
+
+ render nothing : true
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ @issue .update_attributes (params [:issue ].merge (author_id_of_changes : current_user .id ))
+
+ respond_to do | format |
+ format .js
+ format .html do
+ if @issue .valid?
+ redirect_to [@project , @issue ]
+ else
+ render :edit
+ end
+ end
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
authorize_admin_issue! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorize_admin_issue!
+ return render_404 unless can? (current_user , :admin_issue , @issue )
+end
+
+
+
+
+
+
+
+
+
authorize_modify_issue! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorize_modify_issue!
+ return render_404 unless can? (current_user , :modify_issue , @issue )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def issue
+ @issue ||= @project .issues .find (params [:id ])
+end
+
+
+
+
+
+
+
+
+
issues_filtered ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def issues_filtered
+ @issues = IssuesListContext .new (project , current_user , params ).execute
+end
+
+
+
+
+
+
+
+
+
module_enabled ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def module_enabled
+ return render_404 unless @project .issues_enabled
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/IssuesHelper.html b/doc/code/classes/IssuesHelper.html
new file mode 100644
index 00000000..7b751045
--- /dev/null
+++ b/doc/code/classes/IssuesHelper.html
@@ -0,0 +1,401 @@
+
+
+
+
+ IssuesHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ IssuesHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ I
+
+
+
+
+ L
+
+
+
+
+ P
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
issue_css_classes (issue)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def issue_css_classes issue
+ classes = "issue"
+ classes << " closed" if issue .closed
+ classes << " today" if issue .today?
+ classes
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
issues_active_milestones ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def issues_active_milestones
+ @project .milestones .active .order ("id desc" ).all
+end
+
+
+
+
+
+
+
+
+
issues_filter ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def issues_filter
+ {
+ all : "all" ,
+ closed : "closed" ,
+ to_me : "assigned-to-me" ,
+ open : "open"
+ }
+end
+
+
+
+
+
+
+
+
+
labels_autocomplete_source ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def labels_autocomplete_source
+ labels = @project .issues_labels .order ('count DESC' )
+ labels = labels .map { | l | { label : l .name , value : l .name } }
+ labels .to_json
+end
+
+
+
+
+
+
+
+
+
project_issues_filter_path (project, params = {})
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_issues_filter_path project , params = {}
+ params [:f ] ||= cookies ['issue_filter' ]
+ project_issues_path project , params
+end
+
+
+
+
+
+
+
+
+
unassigned_filter ()
+
+
Link
+
+
+
+
+
Returns an OpenStruct object suitable for use by
+options_from_collection_for_select
to allow filtering issues
+by an unassigned User or Milestone
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def unassigned_filter
+
+ OpenStruct .new (id : 0 , title : 'Unspecified' , name : 'Unassigned' )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/IssuesListContext.html b/doc/code/classes/IssuesListContext.html
new file mode 100644
index 00000000..0298ec75
--- /dev/null
+++ b/doc/code/classes/IssuesListContext.html
@@ -0,0 +1,179 @@
+
+
+
+
+ IssuesListContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ IssuesListContext
+
+ <
+
+ BaseContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ issues
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute
+ @issues = case params [:f ]
+ when issues_filter [:all ] then @project .issues
+ when issues_filter [:closed ] then @project .issues .closed
+ when issues_filter [:to_me ] then @project .issues .opened .assigned (current_user )
+ else @project .issues .opened
+ end
+
+ @issues = @issues .tagged_with (params [:label_name ]) if params [:label_name ].present?
+ @issues = @issues .includes (:author , :project ).order ("updated_at" )
+
+
+ if params [:assignee_id ].present?
+ @issues = @issues .where (assignee_id : (params [:assignee_id ] == '0' ? nil : params [:assignee_id ]))
+ end
+
+
+ if params [:milestone_id ].present?
+ @issues = @issues .where (milestone_id : (params [:milestone_id ] == '0' ? nil : params [:milestone_id ]))
+ end
+
+ @issues
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Key.html b/doc/code/classes/Key.html
new file mode 100644
index 00000000..0935e486
--- /dev/null
+++ b/doc/code/classes/Key.html
@@ -0,0 +1,429 @@
+
+
+
+
+ Key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Key
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ F
+
+
+
+
+ I
+
+
+
+
+ L
+
+
+
+
+ P
+
+
+
+
+ S
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
fingerprintable_key ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def fingerprintable_key
+ return true unless key
+
+ file = Tempfile .new ('key_file' )
+ begin
+ file .puts key
+ file .rewind
+ fingerprint_output = %xssh-keygen -lf #{file.path} 2>&1`
+ ensure
+ file .close
+ file .unlink
+ end
+ errors .add (:key , "can't be fingerprinted" ) if fingerprint_output .match ("failed" )
+end
+
+
+
+
+
+
+
+
+
is_deploy_key ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def is_deploy_key
+ true if project_id
+end
+
+
+
+
+
+
+
+
+
last_deploy? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def last_deploy?
+ Key .where (identifier : identifier ).count == 0
+end
+
+
+
+
+
+
+
+
+
projects ()
+
+
Link
+
+
+
+
+
projects that has this key
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def projects
+ if is_deploy_key
+ [project ]
+ else
+ user .projects
+ end
+end
+
+
+
+
+
+
+
+
+
set_identifier ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def set_identifier
+ if is_deploy_key
+ self .identifier = "deploy_#{Digest::MD5.hexdigest(key)}"
+ else
+ self .identifier = "#{user.identifier}_#{Time.now.to_i}"
+ end
+end
+
+
+
+
+
+
+
+
+
strip_white_space ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def strip_white_space
+ self .key = self .key .strip unless self .key .blank?
+end
+
+
+
+
+
+
+
+
+
unique_key ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def unique_key
+ query = Key .where (key : key )
+ query = query .where ('(project_id IS NULL OR project_id = ?)' , project_id ) if project_id
+ if (query .count > 0 )
+ errors .add :key , 'already exist.'
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/KeyObserver.html b/doc/code/classes/KeyObserver.html
new file mode 100644
index 00000000..1044ea2f
--- /dev/null
+++ b/doc/code/classes/KeyObserver.html
@@ -0,0 +1,186 @@
+
+
+
+
+ KeyObserver
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ KeyObserver
+
+ <
+
+ ActiveRecord::Observer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
after_destroy (key)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_destroy (key )
+ return if key .is_deploy_key && ! key .last_deploy?
+ git_host .remove_key (key .identifier , key .projects )
+end
+
+
+
+
+
+
+
+
+
after_save (key)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_save (key )
+ git_host .set_key (key .identifier , key .key , key .projects )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/KeysController.html b/doc/code/classes/KeysController.html
new file mode 100644
index 00000000..9caccb75
--- /dev/null
+++ b/doc/code/classes/KeysController.html
@@ -0,0 +1,330 @@
+
+
+
+
+ KeysController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ I
+
+
+
+
+ N
+
+
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @key = current_user .keys .new (params [:key ])
+ @key .save
+
+ respond_with (@key )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ @key = current_user .keys .find (params [:id ])
+ @key .destroy
+
+ respond_to do | format |
+ format .html { redirect_to keys_url }
+ format .js { render nothing : true }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @keys = current_user .keys .all
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new
+ @key = current_user .keys .new
+
+ respond_with (@key )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @key = current_user .keys .find (params [:id ])
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/LabelsController.html b/doc/code/classes/LabelsController.html
new file mode 100644
index 00000000..53d54c6b
--- /dev/null
+++ b/doc/code/classes/LabelsController.html
@@ -0,0 +1,180 @@
+
+
+
+
+ LabelsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ I
+
+
+
+
+ M
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @labels = @project .issues_labels .order ('count DESC' )
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
module_enabled ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def module_enabled
+ return render_404 unless @project .issues_enabled
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/MergeRequest.html b/doc/code/classes/MergeRequest.html
new file mode 100644
index 00000000..cd404609
--- /dev/null
+++ b/doc/code/classes/MergeRequest.html
@@ -0,0 +1,1569 @@
+
+
+
+
+ MergeRequest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ MergeRequest
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ F
+
+
+
+
+ H
+
+
+
+
+ L
+
+
+
+
+ M
+
+
+
+
+ O
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ T
+
+
+
+
+ U
+
+
+
+
+ V
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Constants
+
+
+
+ BROKEN_DIFF
+ =
+ "--broken-diff"
+
+
+
+
+
+
+
+
+
+ UNCHECKED
+ =
+ 1
+
+
+
+
+
+
+
+
+
+ CAN_BE_MERGED
+ =
+ 2
+
+
+
+
+
+
+
+
+
+ CANNOT_BE_MERGED
+ =
+ 3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ should_remove_source_branch
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
find_all_by_branch (branch_name)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .find_all_by_branch (branch_name )
+ where ("source_branch LIKE :branch OR target_branch LIKE :branch" , branch : branch_name )
+end
+
+
+
+
+
+
+
+
+
find_all_by_milestone (milestone)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .find_all_by_milestone (milestone )
+ where ("milestone_id = :milestone_id" , milestone_id : milestone )
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
automerge! (current_user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def automerge! (current_user )
+ if Gitlab :: Satellite :: MergeAction .new (current_user , self ).merge! && self .unmerged_commits .empty?
+ self .merge! (current_user .id )
+ true
+ end
+rescue
+ self .mark_as_unmergable
+ false
+end
+
+
+
+
+
+
+
+
+
broken_diffs? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def broken_diffs?
+ diffs == [BROKEN_DIFF ]
+end
+
+
+
+
+
+
+
+
+
can_be_merged? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def can_be_merged?
+ state == CAN_BE_MERGED
+end
+
+
+
+
+
+
+
+
+
check_if_can_be_merged ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def check_if_can_be_merged
+ self .state = if Gitlab :: Satellite :: MergeAction .new (self .author , self ).can_be_merged?
+ CAN_BE_MERGED
+ else
+ CANNOT_BE_MERGED
+ end
+ self .save
+end
+
+
+
+
+
+
+
+
+
closed_event ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def closed_event
+ self .project .events .where (target_id : self .id , target_type : "MergeRequest" , action : Event :: Closed ).last
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits
+ st_commits || []
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def diffs
+ st_diffs || []
+end
+
+
+
+
+
+
+
+
+
human_state ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def human_state
+ states = {
+ CAN_BE_MERGED => "can_be_merged" ,
+ CANNOT_BE_MERGED => "cannot_be_merged" ,
+ UNCHECKED => "unchecked"
+ }
+ states [self .state ]
+end
+
+
+
+
+
+
+
+
+
last_commit ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def last_commit
+ commits .first
+end
+
+
+
+
+
+
+
+
+
last_commit_short_sha ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def last_commit_short_sha
+ @last_commit_short_sha ||= last_commit .sha [0 .. 10 ]
+end
+
+
+
+
+
+
+
+
+
mark_as_merged! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def mark_as_merged!
+ self .merged = true
+ self .closed = true
+ save
+end
+
+
+
+
+
+
+
+
+
mark_as_unchecked ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def mark_as_unchecked
+ self .state = UNCHECKED
+ self .save
+end
+
+
+
+
+
+
+
+
+
mark_as_unmergable ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def mark_as_unmergable
+ self .state = CANNOT_BE_MERGED
+ self .save
+end
+
+
+
+
+
+
+
+
+
merge! (user_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def merge! (user_id )
+ self .mark_as_merged!
+ Event .create (
+ project : self .project ,
+ action : Event :: Merged ,
+ target_id : self .id ,
+ target_type : "MergeRequest" ,
+ author_id : user_id
+ )
+end
+
+
+
+
+
+
+
+
+
merge_event ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def merge_event
+ self .project .events .where (target_id : self .id , target_type : "MergeRequest" , action : Event :: Merged ).last
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def merged?
+ merged && merge_event
+end
+
+
+
+
+
+
+
+
+
mr_and_commit_notes ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def mr_and_commit_notes
+ commit_ids = commits .map (&:id )
+ Note .where ("(noteable_type = 'MergeRequest' AND noteable_id = :mr_id) OR (noteable_type = 'Commit' AND commit_id IN (:commit_ids))" , mr_id : id , commit_ids : commit_ids )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def open?
+ ! closed
+end
+
+
+
+
+
+
+
+
+
probably_merged? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def probably_merged?
+ unmerged_commits .empty? &&
+ commits .any? && open?
+end
+
+
+
+
+
+
+
+
+
reload_code ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def reload_code
+ self .reloaded_commits
+ self .reloaded_diffs
+end
+
+
+
+
+
+
+
+
+
reloaded_commits ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def reloaded_commits
+ if open? && unmerged_commits .any?
+ self .st_commits = unmerged_commits
+ save
+ end
+ commits
+end
+
+
+
+
+
+
+
+
+
reloaded_diffs ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def reloaded_diffs
+ if open? && unmerged_diffs .any?
+ self .st_diffs = unmerged_diffs
+ self .save
+ end
+
+rescue Grit :: Git :: GitTimeout
+ self .st_diffs = [BROKEN_DIFF ]
+ self .save
+end
+
+
+
+
+
+
+
+
+
+
+
Returns the raw diff for this merge request
+
+
see “git diff”
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def to_diff
+ project .repo .git .native (:diff , {timeout : 30 , raise : true }, "#{target_branch}...#{source_branch}" )
+end
+
+
+
+
+
+
+
+
+
to_patch ()
+
+
Link
+
+
+
+
+
Returns the commit as a series of email patches.
+
+
see “git format-patch”
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def to_patch
+ project .repo .git .format_patch ({timeout : 30 , raise : true , stdout : true }, "#{target_branch}..#{source_branch}" )
+end
+
+
+
+
+
+
+
+
+
unchecked? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def unchecked?
+ state == UNCHECKED
+end
+
+
+
+
+
+
+
+
+
unmerged_commits ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def unmerged_commits
+ self .project .repo .
+ commits_between (self .target_branch , self .source_branch ).
+ map {| c | Commit .new (c )}.
+ sort_by (&:created_at ).
+ reverse
+end
+
+
+
+
+
+
+
+
+
unmerged_diffs ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def unmerged_diffs
+
+
+
+ common_commit = project .repo .git .native (:merge_base , {}, [target_branch , source_branch ]).strip
+ diffs = project .repo .diff (common_commit , source_branch )
+end
+
+
+
+
+
+
+
+
+
valid_diffs? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def valid_diffs?
+ ! broken_diffs?
+end
+
+
+
+
+
+
+
+
+
validate_branches ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def validate_branches
+ if target_branch == source_branch
+ errors .add :base , "You can not use same branch for source and target branches"
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/MergeRequestObserver.html b/doc/code/classes/MergeRequestObserver.html
new file mode 100644
index 00000000..364e0346
--- /dev/null
+++ b/doc/code/classes/MergeRequestObserver.html
@@ -0,0 +1,234 @@
+
+
+
+
+ MergeRequestObserver
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ MergeRequestObserver
+
+ <
+
+ ActiveRecord::Observer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
after_create (merge_request)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_create (merge_request )
+ if merge_request .assignee && merge_request .assignee != current_user
+ Notify .new_merge_request_email (merge_request .id ).deliver
+ end
+end
+
+
+
+
+
+
+
+
+
after_update (merge_request)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_update (merge_request )
+ send_reassigned_email (merge_request ) if merge_request .is_being_reassigned?
+
+ status = nil
+ status = 'closed' if merge_request .is_being_closed?
+ status = 'reopened' if merge_request .is_being_reopened?
+ if status
+ Note .create_status_change_note (merge_request , current_user , status )
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
send_reassigned_email (merge_request)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def send_reassigned_email (merge_request )
+ recipients_ids = merge_request .assignee_id_was , merge_request .assignee_id
+ recipients_ids .delete current_user .id
+
+ recipients_ids .each do | recipient_id |
+ Notify .reassigned_merge_request_email (recipient_id , merge_request .id , merge_request .assignee_id_was ).deliver
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/MergeRequestsController.html b/doc/code/classes/MergeRequestsController.html
new file mode 100644
index 00000000..4cf181fa
--- /dev/null
+++ b/doc/code/classes/MergeRequestsController.html
@@ -0,0 +1,932 @@
+
+
+
+
+ MergeRequestsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ S
+
+
+
+
+ U
+
+
+
+
+ V
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
automerge ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def automerge
+ return access_denied! unless can? (current_user , :accept_mr , @project )
+ if @merge_request .open? && @merge_request .can_be_merged?
+ @merge_request .should_remove_source_branch = params [:should_remove_source_branch ]
+ @merge_request .automerge! (current_user )
+ @status = true
+ else
+ @status = false
+ end
+end
+
+
+
+
+
+
+
+
+
automerge_check ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def automerge_check
+ if @merge_request .unchecked?
+ @merge_request .check_if_can_be_merged
+ end
+ render json : {state : @merge_request .human_state }
+end
+
+
+
+
+
+
+
+
+
branch_from ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def branch_from
+ @commit = project .commit (params [:ref ])
+ @commit = CommitDecorator .decorate (@commit )
+end
+
+
+
+
+
+
+
+
+
branch_to ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def branch_to
+ @commit = project .commit (params [:ref ])
+ @commit = CommitDecorator .decorate (@commit )
+end
+
+
+
+
+
+
+
+
+
ci_status ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def ci_status
+ status = project .gitlab_ci_service .commit_status (merge_request .last_commit .sha )
+ response = { status : status }
+
+ render json : response
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @merge_request = @project .merge_requests .new (params [:merge_request ])
+ @merge_request .author = current_user
+
+ if @merge_request .save
+ @merge_request .reload_code
+ redirect_to [@project , @merge_request ], notice : 'Merge request was successfully created.'
+ else
+ render action : "new"
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def diffs
+ @diffs = @merge_request .diffs
+ @commit = @merge_request .last_commit
+
+ @comments_allowed = true
+ @line_notes = @merge_request .notes .where ("line_code is not null" )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @merge_requests = MergeRequestsLoadContext .new (project , current_user , params ).execute
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new
+ @merge_request = @project .merge_requests .new (params [:merge_request ])
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ respond_to do | format |
+ format .html
+ format .js
+
+ format .diff { render text : @merge_request .to_diff }
+ format .patch { render text : @merge_request .to_patch }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ if @merge_request .update_attributes (params [:merge_request ].merge (author_id_of_changes : current_user .id ))
+ @merge_request .reload_code
+ @merge_request .mark_as_unchecked
+ redirect_to [@project , @merge_request ], notice : 'Merge request was successfully updated.'
+ else
+ render action : "edit"
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
authorize_admin_merge_request! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorize_admin_merge_request!
+ return render_404 unless can? (current_user , :admin_merge_request , @merge_request )
+end
+
+
+
+
+
+
+
+
+
authorize_modify_merge_request! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorize_modify_merge_request!
+ return render_404 unless can? (current_user , :modify_merge_request , @merge_request )
+end
+
+
+
+
+
+
+
+
+
define_show_vars ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def define_show_vars
+
+ @note = @project .notes .new (noteable : @merge_request )
+
+
+
+ @commits = @merge_request .commits
+ @commits = CommitDecorator .decorate (@commits )
+end
+
+
+
+
+
+
+
+
+
merge_request ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def merge_request
+ @merge_request ||= @project .merge_requests .find (params [:id ])
+end
+
+
+
+
+
+
+
+
+
module_enabled ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def module_enabled
+ return render_404 unless @project .merge_requests_enabled
+end
+
+
+
+
+
+
+
+
+
validates_merge_request ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def validates_merge_request
+
+ return git_not_found! unless @project .repo .heads .map (&:name ).include? (@merge_request .target_branch )
+
+
+
+ return git_not_found! if ! @project .repo .heads .map (&:name ).include? (@merge_request .source_branch ) && @merge_request .commits .blank?
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/MergeRequestsHelper.html b/doc/code/classes/MergeRequestsHelper.html
new file mode 100644
index 00000000..33725cf7
--- /dev/null
+++ b/doc/code/classes/MergeRequestsHelper.html
@@ -0,0 +1,229 @@
+
+
+
+
+ MergeRequestsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ MergeRequestsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
ci_build_details_path (merge_request)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def ci_build_details_path merge_request
+ merge_request .project .gitlab_ci_service .build_page (merge_request .last_commit .sha )
+end
+
+
+
+
+
+
+
+
+
mr_css_classes (mr)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def mr_css_classes mr
+ classes = "merge_request"
+ classes << " closed" if mr .closed
+ classes << " merged" if mr .merged?
+ classes
+end
+
+
+
+
+
+
+
+
+
new_mr_path_from_push_event (event)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new_mr_path_from_push_event (event )
+ new_project_merge_request_path (
+ event .project ,
+ merge_request : {
+ source_branch : event .branch_name ,
+ target_branch : event .project .root_ref ,
+ title : event .branch_name .titleize
+ }
+ )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/MergeRequestsLoadContext.html b/doc/code/classes/MergeRequestsLoadContext.html
new file mode 100644
index 00000000..5e2501c7
--- /dev/null
+++ b/doc/code/classes/MergeRequestsLoadContext.html
@@ -0,0 +1,162 @@
+
+
+
+
+ MergeRequestsLoadContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ MergeRequestsLoadContext
+
+ <
+
+ BaseContext
+
+
+
+
+
+
+
+
+
+
+
+
Build collection of Merge Requests based on filtering passed via params for
+@project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute
+ type = params [:f ]
+
+ merge_requests = project .merge_requests
+
+ merge_requests = case type
+ when 'all' then merge_requests
+ when 'closed' then merge_requests .closed
+ when 'assigned-to-me' then merge_requests .opened .assigned (current_user )
+ else merge_requests .opened
+ end
+
+ merge_requests = merge_requests .page (params [:page ]).per (20 )
+ merge_requests = merge_requests .includes (:author , :project ).order ("closed, created_at desc" )
+
+
+ if params [:assignee_id ].present?
+ merge_requests = merge_requests .where (assignee_id : (params [:assignee_id ] == '0' ? nil : params [:assignee_id ]))
+ end
+
+
+ if params [:milestone_id ].present?
+ merge_requests = merge_requests .where (milestone_id : (params [:milestone_id ] == '0' ? nil : params [:milestone_id ]))
+ end
+
+ merge_requests
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Milestone.html b/doc/code/classes/Milestone.html
new file mode 100644
index 00000000..5f275210
--- /dev/null
+++ b/doc/code/classes/Milestone.html
@@ -0,0 +1,616 @@
+
+
+
+
+ Milestone
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Milestone
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: milestones
+
+
id :integer not null, primary key
+title :string(255) not null
+project_id :integer not null
+description :text
+due_date :date
+closed :boolean default(FALSE), not null
+created_at :datetime not null
+updated_at :datetime not null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ O
+
+
+
+
+ P
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ author_id_of_changes
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
author_id ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def author_id
+ author_id_of_changes
+end
+
+
+
+
+
+
+
+
+
can_be_closed? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def can_be_closed?
+ open? && issues .opened .count .zero?
+end
+
+
+
+
+
+
+
+
+
closed_items_count ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def closed_items_count
+ self .issues .closed .count + self .merge_requests .closed .count
+end
+
+
+
+
+
+
+
+
+
expired? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def expired?
+ if due_date
+ due_date .past?
+ else
+ false
+ end
+end
+
+
+
+
+
+
+
+
+
expires_at ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def expires_at
+ if due_date
+ if due_date .past?
+ "expired at #{due_date.stamp("Aug 21, 2011")}"
+ else
+ "expires at #{due_date.stamp("Aug 21, 2011")}"
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
is_empty? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def is_empty?
+ total_items_count .zero?
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def open?
+ ! closed
+end
+
+
+
+
+
+
+
+
+
open_items_count ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def open_items_count
+ self .issues .opened .count + self .merge_requests .opened .count
+end
+
+
+
+
+
+
+
+
+
participants ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def participants
+ User .where (id : issues .pluck (:assignee_id ))
+end
+
+
+
+
+
+
+
+
+
percent_complete ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def percent_complete
+ ((closed_items_count * 100 ) / total_items_count ).abs
+rescue ZeroDivisionError
+ 100
+end
+
+
+
+
+
+
+
+
+
total_items_count ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def total_items_count
+ self .issues .count + self .merge_requests .count
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/MilestonesController.html b/doc/code/classes/MilestonesController.html
new file mode 100644
index 00000000..48a3beb6
--- /dev/null
+++ b/doc/code/classes/MilestonesController.html
@@ -0,0 +1,589 @@
+
+
+
+
+ MilestonesController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ S
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @milestone = @project .milestones .new (params [:milestone ])
+ @milestone .author_id_of_changes = current_user .id
+
+ if @milestone .save
+ redirect_to project_milestone_path (@project , @milestone )
+ else
+ render "new"
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ return access_denied! unless can? (current_user , :admin_milestone , @milestone )
+
+ @milestone .destroy
+
+ respond_to do | format |
+ format .html { redirect_to project_milestones_path }
+ format .js { render nothing : true }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def edit
+ respond_with (@milestone )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @milestones = case params [:f ]
+ when 'all' ; @project .milestones .order ("closed, due_date DESC" )
+ when 'closed' ; @project .milestones .closed .order ("due_date DESC" )
+ else @project .milestones .active .order ("due_date ASC" )
+ end
+
+ @milestones = @milestones .includes (:project )
+ @milestones = @milestones .page (params [:page ]).per (20 )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new
+ @milestone = @project .milestones .new
+ respond_with (@milestone )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @issues = @milestone .issues
+ @users = UserDecorator .decorate (@milestone .participants )
+ @merge_requests = @milestone .merge_requests
+
+ respond_to do | format |
+ format .html
+ format .js
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ @milestone .update_attributes (params [:milestone ].merge (author_id_of_changes : current_user .id ))
+
+ respond_to do | format |
+ format .js
+ format .html do
+ if @milestone .valid?
+ redirect_to [@project , @milestone ]
+ else
+ render :edit
+ end
+ end
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
authorize_admin_milestone! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorize_admin_milestone!
+ return render_404 unless can? (current_user , :admin_milestone , @project )
+end
+
+
+
+
+
+
+
+
+
milestone ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def milestone
+ @milestone ||= @project .milestones .find (params [:id ])
+end
+
+
+
+
+
+
+
+
+
module_enabled ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def module_enabled
+ return render_404 unless @project .issues_enabled
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Namespace.html b/doc/code/classes/Namespace.html
new file mode 100644
index 00000000..02c9b7e4
--- /dev/null
+++ b/doc/code/classes/Namespace.html
@@ -0,0 +1,629 @@
+
+
+
+
+ Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Namespace
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: namespaces
+
+
id :integer not null, primary key
+name :string(255) not null
+path :string(255) not null
+owner_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ G
+
+
+
+
+ H
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
global_id ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .global_id
+ 'GLN'
+end
+
+
+
+
+
+
+
+
+
search (query)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .search query
+ where ("name LIKE :query OR path LIKE :query" , query : "%#{query}%" )
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
dir_exists? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def dir_exists?
+ File .exists? (namespace_full_path )
+end
+
+
+
+
+
+
+
+
+
ensure_dir_exist ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def ensure_dir_exist
+ unless dir_exists?
+ system ("mkdir -m 770 #{namespace_full_path}" )
+ end
+end
+
+
+
+
+
+
+
+
+
human_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def human_name
+ owner_name
+end
+
+
+
+
+
+
+
+
+
move_dir ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def move_dir
+ if path_changed?
+ old_path = File .join (Gitlab .config .gitolite .repos_path , path_was )
+ new_path = File .join (Gitlab .config .gitolite .repos_path , path )
+ if File .exists? (new_path )
+ raise "Already exists"
+ end
+
+ if system ("mv #{old_path} #{new_path}" )
+ send_update_instructions
+ @require_update_gitolite = true
+ else
+ raise "Namespace move error #{old_path} #{new_path}"
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
namespace_full_path ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def namespace_full_path
+ @namespace_full_path ||= File .join (Gitlab .config .gitolite .repos_path , path )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def rm_dir
+ dir_path = File .join (Gitlab .config .gitolite .repos_path , path )
+ system ("rm -rf #{dir_path}" )
+end
+
+
+
+
+
+
+
+
+
send_update_instructions ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def send_update_instructions
+ projects .each (&:send_move_instructions )
+end
+
+
+
+
+
+
+
+
+
to_param ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def to_param
+ path
+end
+
+
+
+
+
+
+
+
+
update_gitolite ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_gitolite
+ @require_update_gitolite = false
+ projects .each (&:update_repository )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/NamespacedProject.html b/doc/code/classes/NamespacedProject.html
new file mode 100644
index 00000000..976338e8
--- /dev/null
+++ b/doc/code/classes/NamespacedProject.html
@@ -0,0 +1,344 @@
+
+
+
+
+ NamespacedProject
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ NamespacedProject
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def chief
+ if namespace
+ namespace_owner
+ else
+ owner
+ end
+end
+
+
+
+
+
+
+
+
+
name_with_namespace ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def name_with_namespace
+ @name_with_namespace ||= begin
+ if namespace
+ namespace .human_name + " / " + name
+ else
+ name
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
namespace_owner ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def namespace_owner
+ namespace .try (:owner )
+end
+
+
+
+
+
+
+
+
+
path_with_namespace ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def path_with_namespace
+ if namespace
+ namespace .path + '/' + path
+ else
+ path
+ end
+end
+
+
+
+
+
+
+
+
+
transfer (new_namespace)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def transfer (new_namespace )
+ Project .transaction do
+ old_namespace = namespace
+ self .namespace = new_namespace
+
+ old_dir = old_namespace .try (:path ) || ''
+ new_dir = new_namespace .try (:path ) || ''
+
+ old_repo = if old_dir .present?
+ File .join (old_dir , self .path )
+ else
+ self .path
+ end
+
+ if Project .where (path : self .path , namespace_id : new_namespace .try (:id )).present?
+ raise TransferError .new ("Project with same path in target namespace already exists" )
+ end
+
+ Gitlab :: ProjectMover .new (self , old_dir , new_dir ).execute
+
+ git_host .move_repository (old_repo , self )
+
+ save!
+ end
+rescue Gitlab :: ProjectMover :: ProjectMoveError => ex
+ raise Project :: TransferError .new (ex .message )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/NamespacesHelper.html b/doc/code/classes/NamespacesHelper.html
new file mode 100644
index 00000000..28d485d9
--- /dev/null
+++ b/doc/code/classes/NamespacesHelper.html
@@ -0,0 +1,146 @@
+
+
+
+
+ NamespacesHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ NamespacesHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ N
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
namespaces_options (selected = :current_user, scope = :default)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def namespaces_options (selected = :current_user , scope = :default )
+ groups = current_user .namespaces .select {| n | n .type == 'Group' }
+
+ users = if scope == :all
+ Namespace .root
+ else
+ current_user .namespaces .reject {| n | n .type == 'Group' }
+ end
+
+ global_opts = ["Global" , [['/' , Namespace .global_id ]] ]
+ group_opts = ["Groups" , groups .map {| g | [g .human_name , g .id ]} ]
+ users_opts = [ "Users" , users .map {| u | [u .human_name , u .id ]} ]
+
+ options = []
+ options << global_opts if current_user .admin
+ options << group_opts
+ options << users_opts
+
+ if selected == :current_user && current_user .namespace
+ selected = current_user .namespace .id
+ end
+
+ grouped_options_for_select (options , selected )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Note.html b/doc/code/classes/Note.html
new file mode 100644
index 00000000..4ec1c4dc
--- /dev/null
+++ b/doc/code/classes/Note.html
@@ -0,0 +1,536 @@
+
+
+
+
+ Note
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Note
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ F
+
+
+
+
+ N
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ notify
+
+
+
+
+
+ [RW]
+
+ notify_author
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
create_status_change_note (noteable, author, status)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .create_status_change_note (noteable , author , status )
+ create ({
+ noteable : noteable ,
+ project : noteable .project ,
+ author : author ,
+ note : "_Status changed to #{status}_"
+ }, without_protection : true )
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
commit_author ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit_author
+ @commit_author ||=
+ project .users .find_by_email (noteable .author_email ) ||
+ project .users .find_by_name (noteable .author_name )
+rescue
+ nil
+end
+
+
+
+
+
+
+
+
+
downvote? ()
+
+
Link
+
+
+
+
+
Returns true if this is a downvote note, otherwise false is returned
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def downvote?
+ note .start_with? ('-1' ) || note .start_with? (':-1:' )
+end
+
+
+
+
+
+
+
+
+
for_commit? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def for_commit?
+ noteable_type == "Commit"
+end
+
+
+
+
+
+
+
+
+
for_diff_line? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def for_diff_line?
+ line_code .present?
+end
+
+
+
+
+
+
+
+
+
noteable ()
+
+
Link
+
+
+
+
+
override to return commits, which are not active record
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def noteable
+ if for_commit?
+ project .commit (commit_id )
+ else
+ super
+ end
+
+
+rescue
+ nil
+end
+
+
+
+
+
+
+
+
+
noteable_type_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def noteable_type_name
+ if noteable_type .present?
+ noteable_type .downcase
+ else
+ "wall"
+ end
+end
+
+
+
+
+
+
+
+
+
notify_only_author? (user)
+
+
Link
+
+
+
+
+
Check if we can notify commit author with email about our comment
+
+
If commit author email exist in project and commit author is not passed
+user we can send email to him
+
+
params:
+
+
user - current user
+
+
return:
+
+
Boolean
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def notify_only_author? (user )
+ for_commit? && commit_author &&
+ commit_author .email != user .email
+end
+
+
+
+
+
+
+
+
+
+
+
Returns true if this is an upvote note, otherwise false is returned
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def upvote?
+ note .start_with? ('+1' ) || note .start_with? (':+1:' )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/NoteEvent.html b/doc/code/classes/NoteEvent.html
new file mode 100644
index 00000000..0817d170
--- /dev/null
+++ b/doc/code/classes/NoteEvent.html
@@ -0,0 +1,380 @@
+
+
+
+
+ NoteEvent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ NoteEvent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ N
+
+
+
+
+ W
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
note_commit? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note_commit?
+ target .noteable_type == "Commit"
+end
+
+
+
+
+
+
+
+
+
note_commit_id ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note_commit_id
+ target .commit_id
+end
+
+
+
+
+
+
+
+
+
note_short_commit_id ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note_short_commit_id
+ note_commit_id [0 .. 8 ]
+end
+
+
+
+
+
+
+
+
+
note_target ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note_target
+ target .noteable
+end
+
+
+
+
+
+
+
+
+
note_target_id ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note_target_id
+ if note_commit?
+ target .commit_id
+ else
+ target .noteable_id .to_s
+ end
+end
+
+
+
+
+
+
+
+
+
note_target_type ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note_target_type
+ if target .noteable_type .present?
+ target .noteable_type .titleize
+ else
+ "Wall"
+ end .downcase
+end
+
+
+
+
+
+
+
+
+
wall_note? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def wall_note?
+ target .noteable_type .blank?
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/NoteObserver.html b/doc/code/classes/NoteObserver.html
new file mode 100644
index 00000000..cc0e5156
--- /dev/null
+++ b/doc/code/classes/NoteObserver.html
@@ -0,0 +1,290 @@
+
+
+
+
+ NoteObserver
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ NoteObserver
+
+ <
+
+ ActiveRecord::Observer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ N
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
after_create (note)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_create (note )
+ send_notify_mails (note )
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
notify_team (note)
+
+
Link
+
+
+
+
+
Notifies the whole team except the author of note
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def notify_team (note )
+
+ noteable_type = note .noteable_type .presence || "Wall"
+ notify_method = "note_#{noteable_type.underscore}_email" .to_sym
+
+ if Notify .respond_to? notify_method
+ team_without_note_author (note ).map do | u |
+ Notify .send (notify_method , u .id , note .id ).deliver
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
send_notify_mails (note)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def send_notify_mails (note )
+ if note .notify
+ notify_team (note )
+ elsif note .notify_author
+
+ Notify .note_commit_email (note .commit_author .id , note .id ).deliver
+ else
+
+ nil
+ end
+end
+
+
+
+
+
+
+
+
+
team_without_note_author (note)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def team_without_note_author (note )
+ note .project .users .reject { | u | u .id == note .author .id }
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Notes.html b/doc/code/classes/Notes.html
new file mode 100644
index 00000000..19b8dd38
--- /dev/null
+++ b/doc/code/classes/Notes.html
@@ -0,0 +1,88 @@
+
+
+
+
+ Notes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Notes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Notes/CreateContext.html b/doc/code/classes/Notes/CreateContext.html
new file mode 100644
index 00000000..adb3a46f
--- /dev/null
+++ b/doc/code/classes/Notes/CreateContext.html
@@ -0,0 +1,136 @@
+
+
+
+
+ Notes::CreateContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Notes::CreateContext
+
+ <
+
+ BaseContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute
+ note = project .notes .new (params [:note ])
+ note .author = current_user
+ note .notify = true if params [:notify ] == '1'
+ note .notify_author = true if params [:notify_author ] == '1'
+ note .save
+ note
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Notes/LoadContext.html b/doc/code/classes/Notes/LoadContext.html
new file mode 100644
index 00000000..24731bc4
--- /dev/null
+++ b/doc/code/classes/Notes/LoadContext.html
@@ -0,0 +1,157 @@
+
+
+
+
+ Notes::LoadContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Notes::LoadContext
+
+ <
+
+ BaseContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute
+ target_type = params [:target_type ]
+ target_id = params [:target_id ]
+ after_id = params [:after_id ]
+ before_id = params [:before_id ]
+
+
+ @notes = case target_type
+ when "commit"
+ project .commit_notes (project .commit (target_id )).fresh .limit (20 )
+ when "issue"
+ project .issues .find (target_id ).notes .inc_author .fresh .limit (20 )
+ when "merge_request"
+ project .merge_requests .find (target_id ).mr_and_commit_notes .inc_author .fresh .limit (20 )
+ when "snippet"
+ project .snippets .find (target_id ).notes .fresh
+ when "wall"
+
+ project .common_notes .order ("created_at DESC, id DESC" ).limit (50 )
+ end
+
+ @notes = if after_id
+ @notes .where ("id > ?" , after_id )
+ elsif before_id
+ @notes .where ("id < ?" , before_id )
+ else
+ @notes
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/NotesController.html b/doc/code/classes/NotesController.html
new file mode 100644
index 00000000..12cc98fa
--- /dev/null
+++ b/doc/code/classes/NotesController.html
@@ -0,0 +1,338 @@
+
+
+
+
+ NotesController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ I
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @note = Notes :: CreateContext .new (project , current_user , params ).execute
+
+ respond_to do | format |
+ format .html {redirect_to :back }
+ format .js
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ @note = @project .notes .find (params [:id ])
+ return access_denied! unless can? (current_user , :admin_note , @note )
+ @note .destroy
+
+ respond_to do | format |
+ format .js { render nothing : true }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ notes
+ if params [:target_type ] == "merge_request"
+ @mixed_targets = true
+ @main_target_type = params [:target_type ].camelize
+ end
+
+ respond_with (@notes )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def preview
+ render text : view_context .markdown (params [:note ])
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def notes
+ @notes = Notes :: LoadContext .new (project , current_user , params ).execute
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/NotesHelper.html b/doc/code/classes/NotesHelper.html
new file mode 100644
index 00000000..39ff6794
--- /dev/null
+++ b/doc/code/classes/NotesHelper.html
@@ -0,0 +1,258 @@
+
+
+
+
+ NotesHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ NotesHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ L
+
+
+
+
+ N
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
link_to_commit_diff_line_note (note)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def link_to_commit_diff_line_note (note )
+ commit = note .noteable
+ diff_index , diff_old_line , diff_new_line = note .line_code .split ('_' )
+
+ link_file = commit .diffs [diff_index .to_i ].new_path
+ link_line = diff_new_line
+
+ link_to "#{link_file}:L#{link_line}" , project_commit_path (@project , commit , anchor : note .line_code )
+end
+
+
+
+
+
+
+
+
+
loading_more_notes? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def loading_more_notes?
+ params [:loading_more ].present?
+end
+
+
+
+
+
+
+
+
+
loading_new_notes? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def loading_new_notes?
+ params [:loading_new ].present?
+end
+
+
+
+
+
+
+
+
+
note_for_main_target? (note)
+
+
Link
+
+
+
+
+
Helps to distinguish e.g. commit notes in mr notes list
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note_for_main_target? (note )
+ ! @mixed_targets || @main_target_type == note .noteable_type
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Notify.html b/doc/code/classes/Notify.html
new file mode 100644
index 00000000..ea740381
--- /dev/null
+++ b/doc/code/classes/Notify.html
@@ -0,0 +1,639 @@
+
+
+
+
+ Notify
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Notify
+
+ <
+
+ ActionMailer::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ I
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+ Resque::Mailer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
issue_status_changed_email (recipient_id, issue_id, status, updated_by_user_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def issue_status_changed_email (recipient_id , issue_id , status , updated_by_user_id )
+ @issue = Issue .find issue_id
+ @issue_status = status
+ @project = @issue .project
+ @updated_by = User .find updated_by_user_id
+ mail (to : recipient (recipient_id ),
+ subject : subject ("changed issue ##{@issue.id}" , @issue .title ))
+end
+
+
+
+
+
+
+
+
+
new_issue_email (issue_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new_issue_email (issue_id )
+ @issue = Issue .find (issue_id )
+ @project = @issue .project
+ mail (to : @issue .assignee_email , subject : subject ("new issue ##{@issue.id}" , @issue .title ))
+end
+
+
+
+
+
+
+
+
+
new_merge_request_email (merge_request_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new_merge_request_email (merge_request_id )
+ @merge_request = MergeRequest .find (merge_request_id )
+ @project = @merge_request .project
+ mail (to : @merge_request .assignee_email , subject : subject ("new merge request !#{@merge_request.id}" , @merge_request .title ))
+end
+
+
+
+
+
+
+
+
+
new_user_email (user_id, password)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new_user_email (user_id , password )
+ @user = User .find (user_id )
+ @password = password
+ mail (to : @user .email , subject : subject ("Account was created for you" ))
+end
+
+
+
+
+
+
+
+
+
note_commit_email (recipient_id, note_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note_commit_email (recipient_id , note_id )
+ @note = Note .find (note_id )
+ @commit = @note .noteable
+ @commit = CommitDecorator .decorate (@commit )
+ @project = @note .project
+ mail (to : recipient (recipient_id ), subject : subject ("note for commit #{@commit.short_id}" , @commit .title ))
+end
+
+
+
+
+
+
+
+
+
note_issue_email (recipient_id, note_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note_issue_email (recipient_id , note_id )
+ @note = Note .find (note_id )
+ @issue = @note .noteable
+ @project = @note .project
+ mail (to : recipient (recipient_id ), subject : subject ("note for issue ##{@issue.id}" ))
+end
+
+
+
+
+
+
+
+
+
note_merge_request_email (recipient_id, note_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note_merge_request_email (recipient_id , note_id )
+ @note = Note .find (note_id )
+ @merge_request = @note .noteable
+ @project = @note .project
+ mail (to : recipient (recipient_id ), subject : subject ("note for merge request !#{@merge_request.id}" ))
+end
+
+
+
+
+
+
+
+
+
note_wall_email (recipient_id, note_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def note_wall_email (recipient_id , note_id )
+ @note = Note .find (note_id )
+ @project = @note .project
+ mail (to : recipient (recipient_id ), subject : subject )
+end
+
+
+
+
+
+
+
+
+
project_access_granted_email (user_project_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_access_granted_email (user_project_id )
+ @users_project = UsersProject .find user_project_id
+ @project = @users_project .project
+ mail (to : @users_project .user .email ,
+ subject : subject ("access to project was granted" ))
+end
+
+
+
+
+
+
+
+
+
project_was_moved_email (user_project_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_was_moved_email (user_project_id )
+ @users_project = UsersProject .find user_project_id
+ @project = @users_project .project
+ mail (to : @users_project .user .email ,
+ subject : subject ("project was moved" ))
+end
+
+
+
+
+
+
+
+
+
reassigned_issue_email (recipient_id, issue_id, previous_assignee_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def reassigned_issue_email (recipient_id , issue_id , previous_assignee_id )
+ @issue = Issue .find (issue_id )
+ @previous_assignee ||= User .find (previous_assignee_id )
+ @project = @issue .project
+ mail (to : recipient (recipient_id ), subject : subject ("changed issue ##{@issue.id}" , @issue .title ))
+end
+
+
+
+
+
+
+
+
+
reassigned_merge_request_email (recipient_id, merge_request_id, previous_assignee_id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def reassigned_merge_request_email (recipient_id , merge_request_id , previous_assignee_id )
+ @merge_request = MergeRequest .find (merge_request_id )
+ @previous_assignee ||= User .find (previous_assignee_id )
+ @project = @merge_request .project
+ mail (to : recipient (recipient_id ), subject : subject ("changed merge request !#{@merge_request.id}" , @merge_request .title ))
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Object.html b/doc/code/classes/Object.html
new file mode 100644
index 00000000..5ebc2dcd
--- /dev/null
+++ b/doc/code/classes/Object.html
@@ -0,0 +1,88 @@
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Object
+
+ <
+
+ BasicObject
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+ Linguist::BlobHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/OmniauthCallbacksController.html b/doc/code/classes/OmniauthCallbacksController.html
new file mode 100644
index 00000000..5f54fc02
--- /dev/null
+++ b/doc/code/classes/OmniauthCallbacksController.html
@@ -0,0 +1,188 @@
+
+
+
+
+ OmniauthCallbacksController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ OmniauthCallbacksController
+
+ <
+
+ Devise::OmniauthCallbacksController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ F
+
+
+
+
+ L
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
failure_message ()
+
+
Link
+
+
+
+
+
Extend the standard message generation to accept our custom exception
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def failure_message
+ exception = env ["omniauth.error" ]
+ error = exception .error_reason if exception .respond_to? (:error_reason )
+ error ||= exception .error if exception .respond_to? (:error )
+ error ||= exception .message if exception .respond_to? (:message )
+ error ||= env ["omniauth.error.type" ].to_s
+ error .to_s .humanize if error
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def ldap
+
+ @user = User .find_for_ldap_auth (request .env ["omniauth.auth" ], current_user )
+ if @user .persisted?
+ @user .remember_me = true
+ end
+ sign_in_and_redirect @user
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/PostReceive.html b/doc/code/classes/PostReceive.html
new file mode 100644
index 00000000..d078e65e
--- /dev/null
+++ b/doc/code/classes/PostReceive.html
@@ -0,0 +1,149 @@
+
+
+
+
+ PostReceive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ PostReceive
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ProfileHelper.html b/doc/code/classes/ProfileHelper.html
new file mode 100644
index 00000000..edab6952
--- /dev/null
+++ b/doc/code/classes/ProfileHelper.html
@@ -0,0 +1,127 @@
+
+
+
+
+ ProfileHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ ProfileHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ O
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
oauth_active_class (provider)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def oauth_active_class provider
+ if current_user .provider == provider .to_s
+ 'active'
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ProfilesController.html b/doc/code/classes/ProfilesController.html
new file mode 100644
index 00000000..faf4874a
--- /dev/null
+++ b/doc/code/classes/ProfilesController.html
@@ -0,0 +1,513 @@
+
+
+
+
+ ProfilesController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ D
+
+
+
+
+ H
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def history
+ @events = current_user .recent_events .page (params [:page ]).per (20 )
+end
+
+
+
+
+
+
+
+
+
reset_private_token ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def reset_private_token
+ if current_user .reset_authentication_token!
+ flash [:notice ] = "Token was successfully updated"
+ end
+
+ redirect_to account_profile_path
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ if @user .update_attributes (params [:user ])
+ flash [:notice ] = "Profile was successfully updated"
+ else
+ flash [:alert ] = "Failed to update profile"
+ end
+
+ respond_to do | format |
+ format .html { redirect_to :back }
+ format .js
+ end
+end
+
+
+
+
+
+
+
+
+
update_password ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_password
+ params [:user ].reject! { | k , v | k != "password" && k != "password_confirmation" }
+
+ if @user .update_attributes (params [:user ])
+ flash [:notice ] = "Password was successfully updated. Please login with it"
+ redirect_to new_user_session_path
+ else
+ render 'account'
+ end
+end
+
+
+
+
+
+
+
+
+
update_username ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_username
+ @user .update_attributes (username : params [:user ][:username ])
+
+ respond_to do | format |
+ format .js
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Project.html b/doc/code/classes/Project.html
new file mode 100644
index 00000000..00428548
--- /dev/null
+++ b/doc/code/classes/Project.html
@@ -0,0 +1,1392 @@
+
+
+
+
+ Project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Project
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+ F
+
+
+
+
+ G
+
+
+
+
+ I
+
+
+
+
+ L
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+ W
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ error_code
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
access_options ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def access_options
+ UsersProject .access_roles
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def active
+ joins (:issues , :notes , :merge_requests ).order ("issues.created_at, notes.created_at, merge_requests.created_at DESC" )
+end
+
+
+
+
+
+
+
+
+
authorized_for (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorized_for user
+ projects = includes (:users_projects , :namespace )
+ projects = projects .where ("users_projects.user_id = :user_id or projects.owner_id = :user_id or namespaces.owner_id = :user_id" , user_id : user .id )
+end
+
+
+
+
+
+
+
+
+
create_by_user (params, user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create_by_user (params , user )
+ namespace_id = params .delete (:namespace_id )
+
+ project = Project .new params
+
+ Project .transaction do
+
+
+
+
+
+
+ project .path = project .name .dup .parameterize
+
+ project .owner = user
+
+
+
+ if namespace_id != Namespace .global_id
+ project .namespace_id = user .namespace_id
+
+ if namespace_id
+ group = Group .find_by_id (namespace_id )
+ if user .can? :manage_group , group
+ project .namespace_id = namespace_id
+ end
+ end
+ end
+
+ project .save!
+
+
+ project .users_projects .create! (project_access : UsersProject :: MASTER , user : user )
+
+
+
+ project .update_repository
+ end
+
+ project
+rescue Gitlab :: Gitolite :: AccessDenied => ex
+ project .error_code = :gitolite
+ project
+rescue => ex
+ project .error_code = :db
+ project .errors .add (:base , "Can't save project. Please try again later" )
+ project
+end
+
+
+
+
+
+
+
+
+
find_with_namespace (id)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def find_with_namespace (id )
+ if id .include? ("/" )
+ id = id .split ("/" )
+ namespace_id = Namespace .find_by_path (id .first ).id
+ where (namespace_id : namespace_id ).find_by_path (id .second )
+ else
+ where (path : id , namespace_id : nil ).last
+ end
+end
+
+
+
+
+
+
+
+
+
search (query)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def search query
+ where ("projects.name LIKE :query OR projects.path LIKE :query" , query : "%#{query}%" )
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
build_commit_note (commit)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def build_commit_note (commit )
+ notes .new (commit_id : commit .id , noteable_type : "Commit" )
+end
+
+
+
+
+
+
+
+
+
check_limit ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def check_limit
+ unless owner .can_create_project?
+ errors [:base ] << ("Your own projects limit is #{owner.projects_limit}! Please contact administrator to increase it" )
+ end
+rescue
+ errors [:base ] << ("Can't check your ability to create project" )
+end
+
+
+
+
+
+
+
+
+
+
+
For compatibility with old code
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def code
+ path
+end
+
+
+
+
+
+
+
+
+
commit_line_notes (commit)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit_line_notes (commit )
+ notes .where (commit_id : commit .id , noteable_type : "Commit" ).where ("line_code IS NOT NULL" )
+end
+
+
+
+
+
+
+
+
+
commit_notes (commit)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit_notes (commit )
+ notes .where (commit_id : commit .id , noteable_type : "Commit" , line_code : nil )
+end
+
+
+
+
+
+
+
+
+
common_notes ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def common_notes
+ notes .where (noteable_type : ["" , nil ]).inc_author_project
+end
+
+
+
+
+
+
+
+
+
git_error? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def git_error?
+ error_code == :gitolite
+end
+
+
+
+
+
+
+
+
+
gitlab_ci? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def gitlab_ci?
+ gitlab_ci_service && gitlab_ci_service .active
+end
+
+
+
+
+
+
+
+
+
issues_labels ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def issues_labels
+ issues .tag_counts_on (:labels )
+end
+
+
+
+
+
+
+
+
+
items_for (entity)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def items_for entity
+ case entity
+ when 'issue' then
+ issues
+ when 'merge_request' then
+ merge_requests
+ end
+end
+
+
+
+
+
+
+
+
+
last_activity ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def last_activity
+ last_event
+end
+
+
+
+
+
+
+
+
+
last_activity_date ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def last_activity_date
+ last_event .try (:created_at ) || updated_at
+end
+
+
+
+
+
+
+
+
+
private? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def private?
+ private_flag
+end
+
+
+
+
+
+
+
+
+
project_id ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_id
+ self .id
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def public?
+ ! private_flag
+end
+
+
+
+
+
+
+
+
+
repo_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def repo_name
+ denied_paths = %w(gitolite-admin admin dashboard groups help profile projects search)
+
+ if denied_paths .include? (path )
+ errors .add (:path , "like #{path} is not allowed" )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def saved?
+ id && valid?
+end
+
+
+
+
+
+
+
+
+
send_move_instructions ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def send_move_instructions
+ self .users_projects .each do | member |
+ Notify .project_was_moved_email (member .id ).deliver
+ end
+end
+
+
+
+
+
+
+
+
+
services ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def services
+ [gitlab_ci_service ].compact
+end
+
+
+
+
+
+
+
+
+
to_param ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def to_param
+ if namespace
+ namespace .path + "/" + path
+ else
+ path
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def web_url
+ [Gitlab .config .gitlab .url , path_with_namespace ].join ("/" )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Project/TransferError.html b/doc/code/classes/Project/TransferError.html
new file mode 100644
index 00000000..2d0be3a4
--- /dev/null
+++ b/doc/code/classes/Project/TransferError.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Project::TransferError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Project::TransferError
+
+ <
+
+ StandardError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ProjectHook.html b/doc/code/classes/ProjectHook.html
new file mode 100644
index 00000000..3fa9c759
--- /dev/null
+++ b/doc/code/classes/ProjectHook.html
@@ -0,0 +1,92 @@
+
+
+
+
+ ProjectHook
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ProjectHook
+
+ <
+
+ WebHook
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: web_hooks
+
+
id :integer not null, primary key
+url :string(255)
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255) default("ProjectHook")
+service_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ProjectObserver.html b/doc/code/classes/ProjectObserver.html
new file mode 100644
index 00000000..bf2292a5
--- /dev/null
+++ b/doc/code/classes/ProjectObserver.html
@@ -0,0 +1,262 @@
+
+
+
+
+ ProjectObserver
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ProjectObserver
+
+ <
+
+ ActiveRecord::Observer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ L
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
after_create (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_create (project )
+ project .update_repository
+end
+
+
+
+
+
+
+
+
+
after_destroy (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_destroy (project )
+ log_info ("Project \"#{project.name}\" was removed" )
+
+ project .destroy_repository
+end
+
+
+
+
+
+
+
+
+
after_update (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_update (project )
+ project .send_move_instructions if project .namespace_id_changed?
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
log_info (message)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def log_info message
+ Gitlab :: AppLogger .info message
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ProjectResourceController.html b/doc/code/classes/ProjectResourceController.html
new file mode 100644
index 00000000..757055ab
--- /dev/null
+++ b/doc/code/classes/ProjectResourceController.html
@@ -0,0 +1,76 @@
+
+
+
+
+ ProjectResourceController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ProjectUpdateContext.html b/doc/code/classes/ProjectUpdateContext.html
new file mode 100644
index 00000000..3fe3f4d6
--- /dev/null
+++ b/doc/code/classes/ProjectUpdateContext.html
@@ -0,0 +1,148 @@
+
+
+
+
+ ProjectUpdateContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ProjectUpdateContext
+
+ <
+
+ BaseContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
execute (role = :default)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute (role = :default )
+ namespace_id = params [:project ].delete (:namespace_id )
+
+ allowed_transfer = can? (current_user , :change_namespace , project ) || role == :admin
+
+ if allowed_transfer && namespace_id .present?
+ if namespace_id == Namespace .global_id
+ if project .namespace .present?
+
+ project .transfer (nil )
+ end
+ elsif namespace_id .to_i != project .namespace_id
+
+ namespace = Namespace .find (namespace_id )
+ project .transfer (namespace )
+ end
+ end
+
+ project .update_attributes (params [:project ], as : role )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ProjectsController.html b/doc/code/classes/ProjectsController.html
new file mode 100644
index 00000000..3cc6dd07
--- /dev/null
+++ b/doc/code/classes/ProjectsController.html
@@ -0,0 +1,566 @@
+
+
+
+
+ ProjectsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ F
+
+
+
+
+ G
+
+
+
+
+ N
+
+
+
+
+ S
+
+
+
+
+ U
+
+
+
+
+ W
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @project = Project .create_by_user (params [:project ], current_user )
+
+ respond_to do | format |
+ flash [:notice ] = 'Project was successfully created.' if @project .saved?
+ format .html do
+ if @project .saved?
+ redirect_to @project
+ else
+ render action : "new"
+ end
+ end
+ format .js
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ return access_denied! unless can? (current_user , :remove_project , project )
+
+
+ project .truncate_team
+
+ project .destroy
+
+ respond_to do | format |
+ format .html { redirect_to root_path }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def files
+ @notes = @project .notes .where ("attachment != 'NULL'" ).order ("created_at DESC" ).limit (100 )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def graph
+ respond_to do | format |
+ format .html
+ format .json do
+ graph = Gitlab :: Graph :: JsonBuilder .new (project )
+ render :json => graph .to_json
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new
+ @project = Project .new
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ limit = (params [:limit ] || 20 ).to_i
+ @events = @project .events .recent .limit (limit ).offset (params [:offset ] || 0 )
+
+ respond_to do | format |
+ format .html do
+ unless @project .empty_repo?
+ @last_push = current_user .recent_push (@project .id )
+ render :show
+ else
+ render "projects/empty"
+ end
+ end
+ format .js
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ status = ProjectUpdateContext .new (project , current_user , params ).execute
+
+ respond_to do | format |
+ if status
+ flash [:notice ] = 'Project was successfully updated.'
+ format .html { redirect_to edit_project_path (project ), notice : 'Project was successfully updated.' }
+ format .js
+ else
+ format .html { render action : "edit" }
+ format .js
+ end
+ end
+
+rescue Project :: TransferError => ex
+ @error = ex
+ render :update_failed
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def wall
+ return render_404 unless @project .wall_enabled
+ @note = Note .new
+
+ respond_to do | format |
+ format .html
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ProjectsHelper.html b/doc/code/classes/ProjectsHelper.html
new file mode 100644
index 00000000..a2084279
--- /dev/null
+++ b/doc/code/classes/ProjectsHelper.html
@@ -0,0 +1,384 @@
+
+
+
+
+ ProjectsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ ProjectsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ G
+
+
+
+
+ L
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
grouper_project_members (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def grouper_project_members (project )
+ @project .users_projects .sort_by (&:project_access ).reverse .group_by (&:project_access )
+end
+
+
+
+
+
+
+
+
+
link_to_member (project, author)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def link_to_member (project , author )
+ return "(deleted)" unless author
+
+
+ avatar = image_tag (gravatar_icon (author .try (:email )), width : 16 , class : "lil_av" )
+
+
+ name = content_tag :strong , author .name , class : 'author'
+
+ author_html = avatar + name
+
+ tm = project .team_member_by_id (author )
+
+ content_tag :span , class : 'member-link' do
+ if tm
+ link_to author_html , project_team_member_path (project , tm ), class : "author_link"
+ else
+ author_html
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
link_to_project (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def link_to_project project
+ link_to project do
+ title = content_tag (:strong , project .name )
+
+ if project .namespace
+ namespace = content_tag (:span , "#{project.namespace.human_name} / " , class : 'tiny' )
+ title = namespace + title
+ end
+
+ title
+ end
+end
+
+
+
+
+
+
+
+
+
project_title (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_title project
+ if project .group
+ project .name_with_namespace
+ else
+ project .name
+ end
+end
+
+
+
+
+
+
+
+
+
remove_from_team_message (project, member)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def remove_from_team_message (project , member )
+ "You are going to remove #{member.user_name} from #{project.name}. Are you sure?"
+end
+
+
+
+
+
+
+
+
+
tm_path (team_member)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def tm_path team_member
+ project_team_member_path (@project , team_member )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ProtectedBranch.html b/doc/code/classes/ProtectedBranch.html
new file mode 100644
index 00000000..c5399ed4
--- /dev/null
+++ b/doc/code/classes/ProtectedBranch.html
@@ -0,0 +1,206 @@
+
+
+
+
+ ProtectedBranch
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ProtectedBranch
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: protected_branches
+
+
id :integer not null, primary key
+project_id :integer not null
+name :string(255) not null
+created_at :datetime not null
+updated_at :datetime not null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit
+ project .commit (self .name )
+end
+
+
+
+
+
+
+
+
+
update_repository ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_repository
+ git_host .update_repository (project )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ProtectedBranchesController.html b/doc/code/classes/ProtectedBranchesController.html
new file mode 100644
index 00000000..f1175852
--- /dev/null
+++ b/doc/code/classes/ProtectedBranchesController.html
@@ -0,0 +1,232 @@
+
+
+
+
+ ProtectedBranchesController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ I
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @project .protected_branches .create (params [:protected_branch ])
+ redirect_to project_protected_branches_path (@project )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ @project .protected_branches .find (params [:id ]).destroy
+
+ respond_to do | format |
+ format .html { redirect_to project_protected_branches_path }
+ format .js { render nothing : true }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @branches = @project .protected_branches .all
+ @protected_branch = @project .protected_branches .new
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/PushEvent.html b/doc/code/classes/PushEvent.html
new file mode 100644
index 00000000..8b74ebee
--- /dev/null
+++ b/doc/code/classes/PushEvent.html
@@ -0,0 +1,959 @@
+
+
+
+
+ PushEvent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ PushEvent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+ L
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ T
+
+
+
+
+ V
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def branch?
+ data [:ref ]["refs/heads" ]
+end
+
+
+
+
+
+
+
+
+
branch_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def branch_name
+ @branch_name ||= data [:ref ].gsub ("refs/heads/" , "" )
+end
+
+
+
+
+
+
+
+
+
commit_from ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit_from
+ data [:before ]
+end
+
+
+
+
+
+
+
+
+
commit_to ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit_to
+ data [:after ]
+end
+
+
+
+
+
+
+
+
+
+
+
Max 20 commits from push DESC
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits
+ @commits ||= data [:commits ].map { | commit | project .commit (commit [:id ]) }.reverse
+end
+
+
+
+
+
+
+
+
+
commits_count ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits_count
+ data [:total_commits_count ] || commits .count || 0
+end
+
+
+
+
+
+
+
+
+
last_commit ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def last_commit
+ project .commit (commit_to )
+rescue => ex
+ nil
+end
+
+
+
+
+
+
+
+
+
last_push_to_non_root? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def last_push_to_non_root?
+ branch? && project .default_branch != branch_name
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def md_ref?
+ ! (rm_ref? || new_ref? )
+end
+
+
+
+
+
+
+
+
+
new_branch? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new_branch?
+ commit_from =~ %r^00000/
+end
+
+
+
+
+
+
+
+
+
new_ref? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new_ref?
+ commit_from =~ %r^00000/
+end
+
+
+
+
+
+
+
+
+
parent_commit ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def parent_commit
+ project .commit (commit_from )
+rescue => ex
+ nil
+end
+
+
+
+
+
+
+
+
+
push_action_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def push_action_name
+ if new_ref?
+ "pushed new"
+ elsif rm_ref?
+ "deleted"
+ else
+ "pushed to"
+ end
+end
+
+
+
+
+
+
+
+
+
push_with_commits? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def push_with_commits?
+ md_ref? && commits .any? && parent_commit && last_commit
+rescue Grit :: NoSuchPathError
+ false
+end
+
+
+
+
+
+
+
+
+
ref_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def ref_name
+ if tag?
+ tag_name
+ else
+ branch_name
+ end
+end
+
+
+
+
+
+
+
+
+
ref_type ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def ref_type
+ tag? ? "tag" : "branch"
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def rm_ref?
+ commit_to =~ %r^00000/
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def tag?
+ data [:ref ]["refs/tags" ]
+end
+
+
+
+
+
+
+
+
+
tag_name ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def tag_name
+ @tag_name ||= data [:ref ].gsub ("refs/tags/" , "" )
+end
+
+
+
+
+
+
+
+
+
valid_push? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def valid_push?
+ data [:ref ]
+rescue => ex
+ false
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/PushObserver.html b/doc/code/classes/PushObserver.html
new file mode 100644
index 00000000..f747fb4a
--- /dev/null
+++ b/doc/code/classes/PushObserver.html
@@ -0,0 +1,512 @@
+
+
+
+
+ PushObserver
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ PushObserver
+
+
+
+
+
+
+
+
+
+
Includes methods for handling Git Push events
+
+
Triggered by PostReceive job
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+ O
+
+
+
+
+ P
+
+
+
+
+ T
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
execute_hooks (data)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute_hooks (data )
+ hooks .each { | hook | hook .execute (data ) }
+end
+
+
+
+
+
+
+
+
+
execute_services (data)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute_services (data )
+ services .each do | service |
+
+
+ service .execute (data ) if service .active
+ end
+end
+
+
+
+
+
+
+
+
+
observe_push (data)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def observe_push (data )
+ Event .create (
+ project : self ,
+ action : Event :: Pushed ,
+ data : data ,
+ author_id : data [:user_id ]
+ )
+end
+
+
+
+
+
+
+
+
+
post_receive_data (oldrev, newrev, ref, user)
+
+
Link
+
+
+
+
+
Produce a hash of post-receive data
+
+
data = {
+
+
before: String,
+after: String,
+ref: String,
+user_id: String,
+user_name: String,
+repository: {
+ name: String,
+ url: String,
+ description: String,
+ homepage: String,
+},
+commits: Array,
+total_commits_count: Fixnum
+
+
}
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def post_receive_data (oldrev , newrev , ref , user )
+
+ push_commits = commits_between (oldrev , newrev )
+
+
+ push_commits_count = push_commits .size
+
+
+ push_commits_limited = push_commits .last (20 )
+
+
+ data = {
+ before : oldrev ,
+ after : newrev ,
+ ref : ref ,
+ user_id : user .id ,
+ user_name : user .name ,
+ repository : {
+ name : name ,
+ url : url_to_repo ,
+ description : description ,
+ homepage : web_url ,
+ },
+ commits : [],
+ total_commits_count : push_commits_count
+ }
+
+
+
+
+ push_commits_limited .each do | commit |
+ data [:commits ] << {
+ id : commit .id ,
+ message : commit .safe_message ,
+ timestamp : commit .date .xmlschema ,
+ url : "#{Gitlab.config.gitlab.url}/#{path_with_namespace}/commit/#{commit.id}" ,
+ author : {
+ name : commit .author_name ,
+ email : commit .author_email
+ }
+ }
+ end
+
+ data
+end
+
+
+
+
+
+
+
+
+
push_to_branch? (ref, oldrev)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def push_to_branch? ref , oldrev
+ ref_parts = ref .split ('/' )
+
+
+ ! (ref_parts [1 ] !~ %rheads/ || oldrev == "00000000000000000000000000000000" )
+end
+
+
+
+
+
+
+
+
+
trigger_post_receive (oldrev, newrev, ref, user)
+
+
Link
+
+
+
+
+
This method will be called after each post receive and only if the provided
+user is present in GitLab.
+
+
All callbacks for post receive should be placed here.
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def trigger_post_receive (oldrev , newrev , ref , user )
+ data = post_receive_data (oldrev , newrev , ref , user )
+
+
+ self .observe_push (data )
+
+ if push_to_branch? ref , oldrev
+
+ self .update_merge_requests (oldrev , newrev , ref , user )
+
+
+ self .execute_hooks (data .dup )
+
+
+ self .execute_services (data .dup )
+ end
+
+
+ self .satellite .create unless self .satellite .exists?
+
+
+
+ if default_branch .nil?
+ update_attributes (default_branch : discover_default_branch )
+ end
+end
+
+
+
+
+
+
+
+
+
update_merge_requests (oldrev, newrev, ref, user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_merge_requests (oldrev , newrev , ref , user )
+ return true unless ref =~ %rheads/
+ branch_name = ref .gsub ("refs/heads/" , "" )
+ c_ids = self .commits_between (oldrev , newrev ).map (&:id )
+
+
+ mrs = self .merge_requests .opened .find_all_by_branch (branch_name ).all
+ mrs .each { | merge_request | merge_request .reload_code ; merge_request .mark_as_unchecked }
+
+
+ mrs = self .merge_requests .opened .where (target_branch : branch_name ).all
+ mrs = mrs .select (&:last_commit ).select { | mr | c_ids .include? (mr .last_commit .id ) }
+ mrs .each { | merge_request | merge_request .merge! (user .id ) }
+
+ true
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Redcarpet.html b/doc/code/classes/Redcarpet.html
new file mode 100644
index 00000000..e1b53d96
--- /dev/null
+++ b/doc/code/classes/Redcarpet.html
@@ -0,0 +1,79 @@
+
+
+
+
+ Redcarpet
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Redcarpet
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Redcarpet/Render.html b/doc/code/classes/Redcarpet/Render.html
new file mode 100644
index 00000000..29a76394
--- /dev/null
+++ b/doc/code/classes/Redcarpet/Render.html
@@ -0,0 +1,79 @@
+
+
+
+
+ Redcarpet::Render
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Redcarpet::Render
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Redcarpet/Render/GitlabHTML.html b/doc/code/classes/Redcarpet/Render/GitlabHTML.html
new file mode 100644
index 00000000..664207dd
--- /dev/null
+++ b/doc/code/classes/Redcarpet/Render/GitlabHTML.html
@@ -0,0 +1,264 @@
+
+
+
+
+ Redcarpet::Render::GitlabHTML
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Redcarpet::Render::GitlabHTML
+
+ <
+
+ Redcarpet::Render::HTML
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ B
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [R]
+
+ h
+
+
+
+
+
+ [R]
+
+ template
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (template, options = {})
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (template , options = {})
+ @template = template
+ @project = @template .instance_variable_get ("@project" )
+ super options
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
block_code (code, language)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+ def block_code (code , language )
+ options = { options : {encoding : 'utf-8' } }
+ options .merge! (lexer : language .downcase ) if Pygments :: Lexer .find (language )
+
+
+
+
+
+
+
+
+ "
+ <div class="#{h.user_color_scheme_class}">#{Pygments.highlight(code, options)}</div>
+
+"
+ end
+
+
+
+
+
+
+
+
+
postprocess (full_document)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def postprocess (full_document )
+ h .gfm (full_document )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/RefsController.html b/doc/code/classes/RefsController.html
new file mode 100644
index 00000000..971b8fcb
--- /dev/null
+++ b/doc/code/classes/RefsController.html
@@ -0,0 +1,313 @@
+
+
+
+
+ RefsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ D
+
+
+
+
+ L
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
logs_tree ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def logs_tree
+ contents = @tree .contents
+ @logs = contents .map do | content |
+ file = params [:path ] ? File .join (params [:path ], content .name ) : content .name
+ last_commit = @project .commits (@commit .id , file , 1 ).last
+ last_commit = CommitDecorator .decorate (last_commit )
+ {
+ file_name : content .name ,
+ commit : last_commit
+ }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def switch
+ respond_to do | format |
+ format .html do
+ new_path = if params [:destination ] == "tree"
+ project_tree_path (@project , @ref )
+ else
+ project_commits_path (@project , @ref )
+ end
+
+ redirect_to new_path
+ end
+ format .js do
+ @ref = params [:ref ]
+ define_tree_vars
+ render "tree"
+ end
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
define_tree_vars ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def define_tree_vars
+ params [:path ] = nil if params [:path ].blank?
+
+ @repo = project .repo
+ @commit = project .commit (@ref )
+ @commit = CommitDecorator .decorate (@commit )
+ @tree = Tree .new (@commit .tree , project , @ref , params [:path ])
+ @tree = TreeDecorator .new (@tree )
+ @hex_path = Digest :: SHA1 .hexdigest (params [:path ] || "" )
+
+ if params [:path ]
+ @logs_path = logs_file_project_ref_path (@project , @ref , params [:path ])
+ else
+ @logs_path = logs_tree_project_ref_path (@project , @ref )
+ end
+rescue
+ return render_404
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def ref
+ @ref = params [:id ] || params [:ref ]
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/RepositoriesController.html b/doc/code/classes/RepositoriesController.html
new file mode 100644
index 00000000..cd661646
--- /dev/null
+++ b/doc/code/classes/RepositoriesController.html
@@ -0,0 +1,325 @@
+
+
+
+
+ RepositoriesController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ B
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def archive
+ unless can? (current_user , :download_code , @project )
+ render_404 and return
+ end
+
+
+ file_path = @project .archive_repo (params [:ref ])
+
+ if file_path
+
+ send_file file_path
+ else
+ render_404
+ end
+end
+
+
+
+
+
+
+
+
+
branches ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def branches
+ @branches = @project .branches
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @activities = @project .commits_with_refs (20 )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def stats
+ @stats = Gitlab :: GitStats .new (@project .repo , @project .root_ref )
+ @graph = @stats .graph
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Repository.html b/doc/code/classes/Repository.html
new file mode 100644
index 00000000..a6266790
--- /dev/null
+++ b/doc/code/classes/Repository.html
@@ -0,0 +1,1737 @@
+
+
+
+
+ Repository
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Repository
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ B
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ F
+
+
+
+
+ H
+
+
+
+
+ L
+
+
+
+
+ N
+
+
+
+
+ O
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+ U
+
+
+
+
+ V
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
archive_repo (ref)
+
+
Link
+
+
+
+
+
Archive Project to .tar.gz
+
+
Already packed repo archives stored at
+app_root/tmp/repositories/project_name/project_name-commit-id.tag.gz
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def archive_repo (ref )
+ ref = ref || self .root_ref
+ commit = self .commit (ref )
+ return nil unless commit
+
+
+ file_name = self .path + "-" + commit .id .to_s + ".tar.gz"
+ storage_path = Rails .root .join ("tmp" , "repositories" , self .path_with_namespace )
+ file_path = File .join (storage_path , file_name )
+
+
+ prefix = self .path + "/"
+
+
+ unless File .exists? (file_path )
+ FileUtils .mkdir_p storage_path
+ file = self .repo .archive_to_file (ref , prefix , file_path )
+ end
+
+ file_path
+end
+
+
+
+
+
+
+
+
+
branch_names ()
+
+
Link
+
+
+
+
+
Returns an Array of branch names
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def branch_names
+ repo .branches .collect (&:name ).sort
+end
+
+
+
+
+
+
+
+
+
branches ()
+
+
Link
+
+
+
+
+
Returns an Array of Branches
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def branches
+ repo .branches .sort_by (&:name )
+end
+
+
+
+
+
+
+
+
+
commit (commit_id = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commit (commit_id = nil )
+ Commit .find_or_first (repo , commit_id , root_ref )
+end
+
+
+
+
+
+
+
+
+
commits (ref, path = nil, limit = nil, offset = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits (ref , path = nil , limit = nil , offset = nil )
+ Commit .commits (repo , ref , path , limit , offset )
+end
+
+
+
+
+
+
+
+
+
commits_between (from, to)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits_between (from , to )
+ Commit .commits_between (repo , from , to )
+end
+
+
+
+
+
+
+
+
+
commits_since (date)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits_since (date )
+ Commit .commits_since (repo , date )
+end
+
+
+
+
+
+
+
+
+
commits_with_refs (n = 20)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def commits_with_refs (n = 20 )
+ Commit .commits_with_refs (repo , n )
+end
+
+
+
+
+
+
+
+
+
destroy_repository ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy_repository
+ git_host .remove_repository (self )
+end
+
+
+
+
+
+
+
+
+
discover_default_branch ()
+
+
Link
+
+
+
+
+
Discovers the default branch based on the repository’s available branches
+
+If no branches are present, returns nil
+
+If one branch is present, returns its name
+
+If two or more branches are present, returns the one that has a name
+matching #root_ref
+(default_branch or ‘master’ if default_branch is nil)
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def discover_default_branch
+ if branch_names .length == 0
+ nil
+ elsif branch_names .length == 1
+ branch_names .first
+ else
+ branch_names .select { | v | v == root_ref }.first
+ end
+end
+
+
+
+
+
+
+
+
+
empty_repo? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def empty_repo?
+ ! repo_exists? || ! has_commits?
+end
+
+
+
+
+
+
+
+
+
fresh_commits (n = 10)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def fresh_commits (n = 10 )
+ Commit .fresh_commits (repo , n )
+end
+
+
+
+
+
+
+
+
+
has_commits? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def has_commits?
+ ! ! commit
+rescue Grit :: NoSuchPathError
+ false
+end
+
+
+
+
+
+
+
+
+
has_post_receive_file? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def has_post_receive_file?
+ ! ! hook_file
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def heads
+ @heads ||= repo .heads
+end
+
+
+
+
+
+
+
+
+
hook_file ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def hook_file
+ @hook_file ||= begin
+ hook_path = File .join (path_to_repo , 'hooks' , 'post-receive' )
+ File .read (hook_path ) if File .exists? (hook_path )
+ end
+end
+
+
+
+
+
+
+
+
+
http_url_to_repo ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def http_url_to_repo
+ http_url = [Gitlab .config .gitlab .url , "/" , path_with_namespace , ".git" ].join ('' )
+end
+
+
+
+
+
+
+
+
+
last_commit_for (ref, path = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def last_commit_for (ref , path = nil )
+ commits (ref , path , 1 ).first
+end
+
+
+
+
+
+
+
+
+
namespace_dir ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def namespace_dir
+ namespace .try (:path ) || ''
+end
+
+
+
+
+
+
+
+
+
open_branches ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def open_branches
+ if protected_branches .empty?
+ self .repo .heads
+ else
+ pnames = protected_branches .map (&:name )
+ self .repo .heads .reject { | h | pnames .include? (h .name ) }
+ end .sort_by (&:name )
+end
+
+
+
+
+
+
+
+
+
path_to_repo ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def path_to_repo
+ File .join (Gitlab .config .gitolite .repos_path , "#{path_with_namespace}.git" )
+end
+
+
+
+
+
+
+
+
+
protected_branch? (branch_name)
+
+
Link
+
+
+
+
+
Check if current branch name is marked as protected in the system
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def protected_branch? branch_name
+ protected_branches .map (&:name ).include? (branch_name )
+end
+
+
+
+
+
+
+
+
+
ref_names ()
+
+
Link
+
+
+
+
+
Returns an Array of branch and tag names
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def ref_names
+ [branch_names + tag_names ].flatten
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def repo
+ @repo ||= Grit :: Repo .new (path_to_repo )
+end
+
+
+
+
+
+
+
+
+
repo_exists? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def repo_exists?
+ @repo_exists ||= (repo && ! repo .branches .empty? )
+rescue
+ @repo_exists = false
+end
+
+
+
+
+
+
+
+
+
root_ref ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def root_ref
+ default_branch || "master"
+end
+
+
+
+
+
+
+
+
+
root_ref? (branch)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def root_ref? (branch )
+ root_ref == branch
+end
+
+
+
+
+
+
+
+
+
satellite ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def satellite
+ @satellite ||= Gitlab :: Satellite :: Satellite .new (self )
+end
+
+
+
+
+
+
+
+
+
ssh_url_to_repo ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def ssh_url_to_repo
+ url_to_repo
+end
+
+
+
+
+
+
+
+
+
tag_names ()
+
+
Link
+
+
+
+
+
Returns an Array of tag names
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def tag_names
+ repo .tags .collect (&:name ).sort .reverse
+end
+
+
+
+
+
+
+
+
+
+
+
Returns an Array of Tags
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
tree (fcommit, path = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def tree (fcommit , path = nil )
+ fcommit = commit if fcommit == :head
+ tree = fcommit .tree
+ path ? (tree / path ) : tree
+end
+
+
+
+
+
+
+
+
+
update_repository ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_repository
+ git_host .update_repository (self )
+end
+
+
+
+
+
+
+
+
+
url_to_repo ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def url_to_repo
+ git_host .url_to_repo (path_with_namespace )
+end
+
+
+
+
+
+
+
+
+
valid_hook_file ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def valid_hook_file
+ @valid_hook_file ||= File .read (Rails .root .join ('lib' , 'hooks' , 'post-receive' ))
+end
+
+
+
+
+
+
+
+
+
valid_post_receive_file? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def valid_post_receive_file?
+ valid_hook_file == hook_file
+end
+
+
+
+
+
+
+
+
+
valid_repo? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def valid_repo?
+ repo
+rescue
+ errors .add (:path , "Invalid repository path" )
+ false
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ResqueAuthentication.html b/doc/code/classes/ResqueAuthentication.html
new file mode 100644
index 00000000..ec3fc9e4
--- /dev/null
+++ b/doc/code/classes/ResqueAuthentication.html
@@ -0,0 +1,182 @@
+
+
+
+
+ ResqueAuthentication
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ResqueAuthentication
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ N
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (app )
+ @app = app
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def call (env )
+ account = env ['warden' ].authenticate! (:database_authenticatable , :rememberable , scope : :user )
+ raise "Access denied" if ! account .admin?
+ @app .call (env )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/SearchContext.html b/doc/code/classes/SearchContext.html
new file mode 100644
index 00000000..b8ecb2e7
--- /dev/null
+++ b/doc/code/classes/SearchContext.html
@@ -0,0 +1,262 @@
+
+
+
+
+ SearchContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ SearchContext
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+ N
+
+
+
+
+ R
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ params
+
+
+
+
+
+ [RW]
+
+ project_ids
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (project_ids, params)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (project_ids , params )
+ @project_ids , @params = project_ids , params .dup
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute
+ query = params [:search ]
+
+ return result unless query .present?
+
+ result [:projects ] = Project .where (id : project_ids ).search (query ).limit (10 )
+ result [:merge_requests ] = MergeRequest .where (project_id : project_ids ).search (query ).limit (10 )
+ result [:issues ] = Issue .where (project_id : project_ids ).search (query ).limit (10 )
+ result [:wiki_pages ] = Wiki .where (project_id : project_ids ).search (query ).limit (10 )
+ result
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def result
+ @result ||= {
+ projects : [],
+ merge_requests : [],
+ issues : [],
+ wiki_pages : []
+ }
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/SearchController.html b/doc/code/classes/SearchController.html
new file mode 100644
index 00000000..5f26c934
--- /dev/null
+++ b/doc/code/classes/SearchController.html
@@ -0,0 +1,136 @@
+
+
+
+
+ SearchController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ result = SearchContext .new (current_user .project_ids , params ).execute
+
+ @projects = result [:projects ]
+ @merge_requests = result [:merge_requests ]
+ @issues = result [:issues ]
+ @wiki_pages = result [:wiki_pages ]
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Service.html b/doc/code/classes/Service.html
new file mode 100644
index 00000000..f4973cb3
--- /dev/null
+++ b/doc/code/classes/Service.html
@@ -0,0 +1,94 @@
+
+
+
+
+ Service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Service
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: services
+
+
id :integer not null, primary key
+type :string(255)
+title :string(255)
+token :string(255)
+project_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+active :boolean default(FALSE), not null
+project_url :string(255)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ServiceHook.html b/doc/code/classes/ServiceHook.html
new file mode 100644
index 00000000..faff9256
--- /dev/null
+++ b/doc/code/classes/ServiceHook.html
@@ -0,0 +1,92 @@
+
+
+
+
+ ServiceHook
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ ServiceHook
+
+ <
+
+ WebHook
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: web_hooks
+
+
id :integer not null, primary key
+url :string(255)
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255) default("ProjectHook")
+service_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/ServicesController.html b/doc/code/classes/ServicesController.html
new file mode 100644
index 00000000..c0165b09
--- /dev/null
+++ b/doc/code/classes/ServicesController.html
@@ -0,0 +1,287 @@
+
+
+
+
+ ServicesController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ T
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def edit
+ @service = @project .gitlab_ci_service
+
+
+ @service = @project .create_gitlab_ci_service unless @service
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @gitlab_ci_service = @project .gitlab_ci_service
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def test
+ commits = project .commits (project .default_branch , nil , 3 )
+ data = project .post_receive_data (commits .last .id , commits .first .id , "refs/heads/#{project.default_branch}" , current_user )
+
+ @service = project .gitlab_ci_service
+ @service .execute (data )
+
+ redirect_to :back
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ @service = @project .gitlab_ci_service
+
+ if @service .update_attributes (params [:service ])
+ redirect_to edit_project_service_path (@project , :gitlab_ci )
+ else
+ render 'edit'
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Settings.html b/doc/code/classes/Settings.html
new file mode 100644
index 00000000..05219228
--- /dev/null
+++ b/doc/code/classes/Settings.html
@@ -0,0 +1,131 @@
+
+
+
+
+ Settings
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Settings
+
+ <
+
+ Settingslogic
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ G
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
gitlab_on_non_standard_port? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def gitlab_on_non_standard_port?
+ ! [443 , 80 ].include? (gitlab .port .to_i )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Snippet.html b/doc/code/classes/Snippet.html
new file mode 100644
index 00000000..a71f1316
--- /dev/null
+++ b/doc/code/classes/Snippet.html
@@ -0,0 +1,402 @@
+
+
+
+
+ Snippet
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Snippet
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: snippets
+
+
id :integer not null, primary key
+title :string(255)
+content :text
+author_id :integer not null
+project_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+file_name :string(255)
+expires_at :datetime
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ M
+
+
+
+
+ N
+
+
+
+
+ S
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+ Linguist::BlobHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
content_types ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .content_types
+ [
+ ".rb" , ".py" , ".pl" , ".scala" , ".c" , ".cpp" , ".java" ,
+ ".haml" , ".html" , ".sass" , ".scss" , ".xml" , ".php" , ".erb" ,
+ ".js" , ".sh" , ".coffee" , ".yml" , ".md"
+ ]
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def data
+ content
+end
+
+
+
+
+
+
+
+
+
expired? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def expired?
+ expires_at && expires_at < Time .current
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def name
+ file_name
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/SnippetsController.html b/doc/code/classes/SnippetsController.html
new file mode 100644
index 00000000..fd7e0fe6
--- /dev/null
+++ b/doc/code/classes/SnippetsController.html
@@ -0,0 +1,611 @@
+
+
+
+
+ SnippetsController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ N
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @snippet = @project .snippets .new (params [:snippet ])
+ @snippet .author = current_user
+ @snippet .save
+
+ if @snippet .valid?
+ redirect_to [@project , @snippet ]
+ else
+ respond_with (@snippet )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ return access_denied! unless can? (current_user , :admin_snippet , @snippet )
+
+ @snippet .destroy
+
+ redirect_to project_snippets_path (@project )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def index
+ @snippets = @project .snippets .fresh
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new
+ @snippet = @project .snippets .new
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def raw
+ send_data (
+ @snippet .content ,
+ type : "text/plain" ,
+ disposition : 'inline' ,
+ filename : @snippet .file_name
+ )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @note = @project .notes .new (noteable : @snippet )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ @snippet .update_attributes (params [:snippet ])
+
+ if @snippet .valid?
+ redirect_to [@project , @snippet ]
+ else
+ respond_with (@snippet )
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
authorize_admin_snippet! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorize_admin_snippet!
+ return render_404 unless can? (current_user , :admin_snippet , @snippet )
+end
+
+
+
+
+
+
+
+
+
authorize_modify_snippet! ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def authorize_modify_snippet!
+ return render_404 unless can? (current_user , :modify_snippet , @snippet )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def snippet
+ @snippet ||= @project .snippets .find (params [:id ])
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/SnippetsHelper.html b/doc/code/classes/SnippetsHelper.html
new file mode 100644
index 00000000..4230a0cc
--- /dev/null
+++ b/doc/code/classes/SnippetsHelper.html
@@ -0,0 +1,131 @@
+
+
+
+
+ SnippetsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ SnippetsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ L
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
lifetime_select_options ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def lifetime_select_options
+ options = [
+ ['forever' , nil ],
+ ['1 day' , "#{Date.current + 1.day}" ],
+ ['1 week' , "#{Date.current + 1.week}" ],
+ ['1 month' , "#{Date.current + 1.month}" ]
+ ]
+ options_for_select (options )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/StaticModel.html b/doc/code/classes/StaticModel.html
new file mode 100644
index 00000000..46ead776
--- /dev/null
+++ b/doc/code/classes/StaticModel.html
@@ -0,0 +1,377 @@
+
+
+
+
+ StaticModel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ StaticModel
+
+
+
+
+
+
+
+
+
+
Provides an ActiveRecord-like interface to a model whose data is not
+persisted to a database.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
Methods
+
+
+ #
+
+
+
+
+
+ == ,
+
+
+
+
+ []
+
+
+
+
+
+ D
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def == (other )
+ if other .is_a? StaticModel
+ id == other .id
+ else
+ super
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
Used by AR for fetching attributes
+
+
Pass it along if we respond to it.
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def [] (key )
+ send (key ) if respond_to? (key )
+end
+
+
+
+
+
+
+
+
+
destroyed? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroyed?
+ false
+end
+
+
+
+
+
+
+
+
+
new_record? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new_record?
+ false
+end
+
+
+
+
+
+
+
+
+
persisted? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def persisted?
+ false
+end
+
+
+
+
+
+
+
+
+
to_param ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def to_param
+ id
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/StaticModel/ClassMethods.html b/doc/code/classes/StaticModel/ClassMethods.html
new file mode 100644
index 00000000..38508f6d
--- /dev/null
+++ b/doc/code/classes/StaticModel/ClassMethods.html
@@ -0,0 +1,172 @@
+
+
+
+
+ StaticModel::ClassMethods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ StaticModel::ClassMethods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ B
+
+
+
+
+ P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
base_class ()
+
+
Link
+
+
+
+
+
Used by ActiveRecord’s polymorphic association to set object_type
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def base_class
+ self
+end
+
+
+
+
+
+
+
+
+
primary_key ()
+
+
Link
+
+
+
+
+
Used by ActiveRecord’s polymorphic association to set object_id
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def primary_key
+ 'id'
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/SystemHook.html b/doc/code/classes/SystemHook.html
new file mode 100644
index 00000000..4f1ce71f
--- /dev/null
+++ b/doc/code/classes/SystemHook.html
@@ -0,0 +1,191 @@
+
+
+
+
+ SystemHook
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ SystemHook
+
+ <
+
+ WebHook
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: web_hooks
+
+
id :integer not null, primary key
+url :string(255)
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255) default("ProjectHook")
+service_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
all_hooks_fire (data)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .all_hooks_fire (data )
+ SystemHook .all .each do | sh |
+ sh .async_execute data
+ end
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
async_execute (data)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def async_execute (data )
+ Resque .enqueue (SystemHookWorker , id , data )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/SystemHookObserver.html b/doc/code/classes/SystemHookObserver.html
new file mode 100644
index 00000000..24609a5c
--- /dev/null
+++ b/doc/code/classes/SystemHookObserver.html
@@ -0,0 +1,227 @@
+
+
+
+
+ SystemHookObserver
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ SystemHookObserver
+
+ <
+
+ ActiveRecord::Observer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
after_create (model)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_create (model )
+ if model .kind_of? Project
+ SystemHook .all_hooks_fire ({
+ event_name : "project_create" ,
+ name : model .name ,
+ path : model .path ,
+ project_id : model .id ,
+ owner_name : model .owner .name ,
+ owner_email : model .owner .email ,
+ created_at : model .created_at
+ })
+ elsif model .kind_of? User
+ SystemHook .all_hooks_fire ({
+ event_name : "user_create" ,
+ name : model .name ,
+ email : model .email ,
+ created_at : model .created_at
+ })
+
+ elsif model .kind_of? UsersProject
+ SystemHook .all_hooks_fire ({
+ event_name : "user_add_to_team" ,
+ project_name : model .project .name ,
+ project_path : model .project .path ,
+ project_id : model .project_id ,
+ user_name : model .user .name ,
+ user_email : model .user .email ,
+ project_access : model .repo_access_human ,
+ created_at : model .created_at
+ })
+
+ end
+end
+
+
+
+
+
+
+
+
+
after_destroy (model)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_destroy (model )
+ if model .kind_of? Project
+ SystemHook .all_hooks_fire ({
+ event_name : "project_destroy" ,
+ name : model .name ,
+ path : model .path ,
+ project_id : model .id ,
+ owner_name : model .owner .name ,
+ owner_email : model .owner .email ,
+ })
+ elsif model .kind_of? User
+ SystemHook .all_hooks_fire ({
+ event_name : "user_destroy" ,
+ name : model .name ,
+ email : model .email
+ })
+
+ elsif model .kind_of? UsersProject
+ SystemHook .all_hooks_fire ({
+ event_name : "user_remove_from_team" ,
+ project_name : model .project .name ,
+ project_path : model .project .path ,
+ project_id : model .project_id ,
+ user_name : model .user .name ,
+ user_email : model .user .email ,
+ project_access : model .repo_access_human
+ })
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/SystemHookWorker.html b/doc/code/classes/SystemHookWorker.html
new file mode 100644
index 00000000..9c114ba6
--- /dev/null
+++ b/doc/code/classes/SystemHookWorker.html
@@ -0,0 +1,131 @@
+
+
+
+
+ SystemHookWorker
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ SystemHookWorker
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/TabHelper.html b/doc/code/classes/TabHelper.html
new file mode 100644
index 00000000..c7b4c790
--- /dev/null
+++ b/doc/code/classes/TabHelper.html
@@ -0,0 +1,346 @@
+
+
+
+
+ TabHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ TabHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ B
+
+
+
+
+ N
+
+
+
+
+ P
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
branches_tab_class ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def branches_tab_class
+ if current_page? (branches_project_repository_path (@project )) ||
+ current_controller? (:protected_branches ) ||
+ current_page? (project_repository_path (@project ))
+ 'active'
+ end
+end
+
+
+
+
+
+
+
+
+
nav_link (options = {}, &block)
+
+
Link
+
+
+
+
+
Navigation link helper
+
+
Returns an `li` element with an ‘active’ class if the supplied
+controller(s) and/or action(s) are currently active. The content of the
+element is the value passed to the block.
+
+
options - The options hash used to determine if the element is “active”
+(default: {})
+
+
:controller - One or more controller names to check (optional).
+:action - One or more action names to check (optional).
+:path - A shorthand path, such as 'dashboard#index', to check (optional).
+:html_options - Extra options to be passed to the list element (optional).
+
+
block - An optional block that will become the contents of the returned
+
+
`li` element.
+
+
When both :controller and :action are specified, BOTH must match in order
+to be marked as active. When only one is given, either can match.
+
+
Examples
+
+
+
+
+nav_link (controller : [:tree , :refs ], action : :edit ) { "Hello" }
+
+
+
+nav_link (controller : [:tree , :refs ]) { "Hello" }
+
+
+
+nav_link (path : 'tree#show' ) { "Hello" }
+
+
+
+nav_link (controller : :tree , html_options : {class : 'home' }) { "Hello" }
+
+
+
+
Returns a list item element String
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def nav_link (options = {}, &block )
+ if path = options .delete (:path )
+ c , a , _ = path .split ('#' )
+ else
+ c = options .delete (:controller )
+ a = options .delete (:action )
+ end
+
+ if c && a
+
+ klass = current_controller? (*c ) && current_action? (*a ) ? 'active' : ''
+ else
+
+ klass = current_controller? (*c ) || current_action? (*a ) ? 'active' : ''
+ end
+
+
+
+ o = options .delete (:html_options ) || {}
+ o [:class ] ||= ''
+ o [:class ] += ' ' + klass
+ o [:class ].strip!
+
+ if block_given?
+ content_tag (:li , capture (&block ), o )
+ else
+ content_tag (:li , nil , o )
+ end
+end
+
+
+
+
+
+
+
+
+
nav_tab (key, value, &block)
+
+
Link
+
+
+
+
+
Use #nav_tab for save
+controller/action but different params
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def nav_tab key , value , &block
+ o = {}
+ o [:class ] = ""
+ o [:class ] << " active" if params [key ] == value
+
+ if block_given?
+ content_tag (:li , capture (&block ), o )
+ else
+ content_tag (:li , nil , o )
+ end
+end
+
+
+
+
+
+
+
+
+
project_tab_class ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_tab_class
+ [:show , :files , :edit , :update ].each do | action |
+ return "active" if current_page? (controller : "projects" , action : action , id : @project )
+ end
+
+ if ['snippets' , 'services' , 'hooks' , 'deploy_keys' , 'team_members' ].include? controller .controller_name
+ "active"
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/TagsHelper.html b/doc/code/classes/TagsHelper.html
new file mode 100644
index 00000000..cf30b011
--- /dev/null
+++ b/doc/code/classes/TagsHelper.html
@@ -0,0 +1,170 @@
+
+
+
+
+ TagsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ TagsHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
tag_list (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def tag_list project
+ html = ''
+ project .tag_list .each do | tag |
+ html += link_to tag , tag_path (tag )
+ end
+
+ html .html_safe
+end
+
+
+
+
+
+
+
+
+
tag_path (tag)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def tag_path tag
+ "/tags/#{tag}"
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Team.html b/doc/code/classes/Team.html
new file mode 100644
index 00000000..08d2c07e
--- /dev/null
+++ b/doc/code/classes/Team.html
@@ -0,0 +1,470 @@
+
+
+
+
+ Team
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Team
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ D
+
+
+
+
+ T
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
add_user_id_to_team (user_id, access_role)
+
+
Link
+
+
+
+
+
Add user to project with passed access role by user id
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def add_user_id_to_team (user_id , access_role )
+ users_projects .create (
+ user_id : user_id ,
+ project_access : access_role
+ )
+end
+
+
+
+
+
+
+
+
+
add_user_to_team (user, access_role)
+
+
Link
+
+
+
+
+
Add user to project with passed access role
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def add_user_to_team (user , access_role )
+ add_user_id_to_team (user .id , access_role )
+end
+
+
+
+
+
+
+
+
+
add_users_ids_to_team (users_ids, access_role)
+
+
Link
+
+
+
+
+
Add multiple users to project with same access role by user ids
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def add_users_ids_to_team (users_ids , access_role )
+ UsersProject .bulk_import (self , users_ids , access_role )
+end
+
+
+
+
+
+
+
+
+
add_users_to_team (users, access_role)
+
+
Link
+
+
+
+
+
Add multiple users to project with same access role
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def add_users_to_team (users , access_role )
+ add_users_ids_to_team (users .map (&:id ), access_role )
+end
+
+
+
+
+
+
+
+
+
delete_users_ids_from_team (users_ids)
+
+
Link
+
+
+
+
+
Delete multiple users from project by user ids
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def delete_users_ids_from_team (users_ids )
+ UsersProject .bulk_delete (self , users_ids )
+end
+
+
+
+
+
+
+
+
+
team_member_by_id (user_id)
+
+
Link
+
+
+
+
+
Get Team Member record by user id
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def team_member_by_id (user_id )
+ users_projects .find_by_user_id (user_id )
+end
+
+
+
+
+
+
+
+
+
team_member_by_name_or_email (name = nil, email = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def team_member_by_name_or_email (name = nil , email = nil )
+ user = users .where ("name like ? or email like ?" , name , email ).first
+ users_projects .where (user : user ) if user
+end
+
+
+
+
+
+
+
+
+
truncate_team ()
+
+
Link
+
+
+
+
+
Remove all users from project team
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def truncate_team
+ UsersProject .truncate_team (self )
+end
+
+
+
+
+
+
+
+
+
update_users_ids_to_role (users_ids, access_role)
+
+
Link
+
+
+
+
+
Update multiple project users to same access role by user ids
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_users_ids_to_role (users_ids , access_role )
+ UsersProject .bulk_update (self , users_ids , access_role )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/TeamMembersController.html b/doc/code/classes/TeamMembersController.html
new file mode 100644
index 00000000..f411dfd1
--- /dev/null
+++ b/doc/code/classes/TeamMembersController.html
@@ -0,0 +1,438 @@
+
+
+
+
+ TeamMembersController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ I
+
+
+
+
+ N
+
+
+
+
+ S
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
apply_import ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def apply_import
+ giver = Project .find (params [:source_project_id ])
+ status = UsersProject .import_team (giver , project )
+ notice = status ? "Succesfully imported" : "Import failed"
+
+ redirect_to project_team_members_path (project ), notice : notice
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @project .add_users_ids_to_team (
+ params [:user_ids ],
+ params [:project_access ]
+ )
+
+ if params [:redirect_to ]
+ redirect_to params [:redirect_to ]
+ else
+ redirect_to project_team_index_path (@project )
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ @team_member = project .users_projects .find (params [:id ])
+ @team_member .destroy
+
+ respond_to do | format |
+ format .html { redirect_to project_team_index_path (@project ) }
+ format .js { render nothing : true }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def new
+ @team_member = project .users_projects .new
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @team_member = project .users_projects .find (params [:id ])
+ @events = @team_member .user .recent_events .where (:project_id => @project .id ).limit (7 )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ @team_member = project .users_projects .find (params [:id ])
+ @team_member .update_attributes (params [:team_member ])
+
+ unless @team_member .valid?
+ flash [:alert ] = "User should have at least one role"
+ end
+ redirect_to project_team_index_path (@project )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/TestHookContext.html b/doc/code/classes/TestHookContext.html
new file mode 100644
index 00000000..5b9b6478
--- /dev/null
+++ b/doc/code/classes/TestHookContext.html
@@ -0,0 +1,134 @@
+
+
+
+
+ TestHookContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ TestHookContext
+
+ <
+
+ BaseContext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute
+ hook = project .hooks .find (params [:id ])
+ commits = project .commits (project .default_branch , nil , 3 )
+ data = project .post_receive_data (commits .last .id , commits .first .id , "refs/heads/#{project.default_branch}" , current_user )
+ hook .execute (data )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Tree.html b/doc/code/classes/Tree.html
new file mode 100644
index 00000000..e71dfa3f
--- /dev/null
+++ b/doc/code/classes/Tree.html
@@ -0,0 +1,322 @@
+
+
+
+
+ Tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Tree
+
+ <
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+ I
+
+
+
+
+ N
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+ Linguist::BlobHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ path
+
+
+
+
+
+ [RW]
+
+ project
+
+
+
+
+
+ [RW]
+
+ ref
+
+
+
+
+
+ [RW]
+
+ tree
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
new (raw_tree, project, ref = nil, path = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def initialize (raw_tree , project , ref = nil , path = nil )
+ @project , @ref , @path = project , ref , path
+ @tree = if path .present?
+ raw_tree / path
+ else
+ raw_tree
+ end
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def empty?
+ data .blank?
+end
+
+
+
+
+
+
+
+
+
invalid? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def invalid?
+ tree .nil?
+end
+
+
+
+
+
+
+
+
+
is_blob? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def is_blob?
+ tree .is_a? (Grit :: Blob )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/TreeController.html b/doc/code/classes/TreeController.html
new file mode 100644
index 00000000..35c99bc0
--- /dev/null
+++ b/doc/code/classes/TreeController.html
@@ -0,0 +1,264 @@
+
+
+
+
+ TreeController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Controller for viewing a repository’s file structure
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+ S
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def edit
+ @last_commit = @project .last_commit_for (@ref , @path ).sha
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ @hex_path = Digest :: SHA1 .hexdigest (@path )
+ @logs_path = logs_file_project_ref_path (@project , @ref , @path )
+
+ respond_to do | format |
+ format .html
+
+ format .js { no_cache_headers }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update
+ edit_file_action = Gitlab :: Satellite :: EditFileAction .new (current_user , @project , @ref , @path )
+ updated_successfully = edit_file_action .commit! (
+ params [:content ],
+ params [:commit_message ],
+ params [:last_commit ]
+ )
+
+ if updated_successfully
+ redirect_to project_tree_path (@project , @id ), notice : "Your changes have been successfully commited"
+ else
+ flash [:notice ] = "Your changes could not be commited, because the file has been changed"
+ render :edit
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/TreeDecorator.html b/doc/code/classes/TreeDecorator.html
new file mode 100644
index 00000000..9b32e1c9
--- /dev/null
+++ b/doc/code/classes/TreeDecorator.html
@@ -0,0 +1,281 @@
+
+
+
+
+ TreeDecorator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ B
+
+
+
+
+ R
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
breadcrumbs (max_links = 2)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def breadcrumbs (max_links = 2 )
+ if path
+ part_path = ""
+ parts = path .split ("\/" )
+
+
+
+ yield (h .link_to (".." , "#" )) if parts .count > max_links
+
+ parts .each do | part |
+ part_path = File .join (part_path , part ) unless part_path .empty?
+ part_path = part if part_path .empty?
+
+ next unless parts .last (2 ).include? (part ) if parts .count > max_links
+ yield (h .link_to (h .truncate (part , length : 40 ), h .project_tree_path (project , h .tree_join (ref , part_path ))))
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def readme
+ @readme ||= contents .find { | c | c .is_a? (Grit :: Blob ) and c .name =~ %r^readme/ }
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def up_dir?
+ path .present?
+end
+
+
+
+
+
+
+
+
+
up_dir_path ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def up_dir_path
+ file = File .join (path , ".." )
+ h .project_tree_path (project , h .tree_join (ref , file ))
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/TreeHelper.html b/doc/code/classes/TreeHelper.html
new file mode 100644
index 00000000..a9ca7949
--- /dev/null
+++ b/doc/code/classes/TreeHelper.html
@@ -0,0 +1,541 @@
+
+
+
+
+ TreeHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ TreeHelper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ B
+
+
+
+
+ G
+
+
+
+
+ M
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
allowed_tree_edit? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def allowed_tree_edit?
+ if @project .protected_branch? @ref
+ can? (current_user , :push_code_to_protected_branches , @project )
+ else
+ can? (current_user , :push_code , @project )
+ end
+end
+
+
+
+
+
+
+
+
+
breadcrumbs ()
+
+
Link
+
+
+
+
+
Breadcrumb links for a Project and, if
+applicable, a tree path
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def breadcrumbs
+ return unless @project && @ref
+
+
+ crumbs = content_tag (:li ) do
+ content_tag (:span , nil , class : 'arrow' ) +
+ link_to (@project .name , project_commits_path (@project , @ref ))
+ end
+
+ if @path
+ parts = @path .split ('/' )
+
+ parts .each_with_index do | part , i |
+ crumbs += content_tag (:span , '/' , class : 'divider' )
+ crumbs += content_tag (:li ) do
+
+ link_to part , project_commits_path (@project , tree_join (@ref , parts [0 .. i ].join ('/' )))
+ end
+ end
+ end
+
+ crumbs .html_safe
+end
+
+
+
+
+
+
+
+
+
gitlab_markdown? (filename)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def gitlab_markdown? (filename )
+ filename .end_with? (*%w(.mdown .md .markdown) )
+end
+
+
+
+
+
+
+
+
+
markup? (filename)
+
+
Link
+
+
+
+
+
Public: Determines if a given filename is compatible with GitHub::Markup.
+
+
filename - Filename string to check
+
+
Returns boolean
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def markup? (filename )
+ filename .end_with? (*%w(.textile .rdoc .org .creole
+ .mediawiki .rst .asciidoc .pod) )
+end
+
+
+
+
+
+
+
+
+
plain_text_readme? (filename)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def plain_text_readme? filename
+ filename == 'README'
+end
+
+
+
+
+
+
+
+
+
render_tree (contents)
+
+
Link
+
+
+
+
+
Sorts a repository’s tree so that folders are before files and renders
+their corresponding partials
+
+
contents - A Grit::Tree object for the current tree
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def render_tree (contents )
+
+ folders , files = contents .partition { | v | v .kind_of? (Grit :: Tree ) }
+
+ tree = ""
+
+
+ tree += render partial : 'tree/tree_item' , collection : folders , locals : {type : 'folder' } if folders .present?
+
+ files .each do | f |
+ if f .respond_to? (:url )
+
+ tree += render partial : 'tree/submodule_item' , object : f
+ else
+
+ tree += render partial : 'tree/tree_item' , object : f , locals : {type : 'file' }
+ end
+ end
+
+ tree .html_safe
+end
+
+
+
+
+
+
+
+
+
tree_hex_class (content)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def tree_hex_class (content )
+ "file_#{hexdigest(content.name)}"
+end
+
+
+
+
+
+
+
+
+
tree_icon (type)
+
+
Link
+
+
+
+
+
Return an image icon depending on the file type
+
+
type - String type of the tree item; either ‘folder’ or ‘file’
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def tree_icon (type )
+ image = type == 'folder' ? 'file_dir.png' : 'file_txt.png'
+ image_tag (image , size : '16x16' )
+end
+
+
+
+
+
+
+
+
+
tree_join (*args)
+
+
Link
+
+
+
+
+
Simple shortcut to File.join
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def tree_join (*args )
+ File .join (*args )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/User.html b/doc/code/classes/User.html
new file mode 100644
index 00000000..661b143e
--- /dev/null
+++ b/doc/code/classes/User.html
@@ -0,0 +1,566 @@
+
+
+
+
+ User
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ User
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: users
+
+
id :integer not null, primary key
+email :string(255) default(""), not null
+encrypted_password :string(255) default(""), not null
+reset_password_token :string(255)
+reset_password_sent_at :datetime
+remember_created_at :datetime
+sign_in_count :integer default(0)
+current_sign_in_at :datetime
+last_sign_in_at :datetime
+current_sign_in_ip :string(255)
+last_sign_in_ip :string(255)
+created_at :datetime not null
+updated_at :datetime not null
+name :string(255)
+admin :boolean default(FALSE), not null
+projects_limit :integer default(10)
+skype :string(255) default(""), not null
+linkedin :string(255) default(""), not null
+twitter :string(255) default(""), not null
+authentication_token :string(255)
+dark_scheme :boolean default(FALSE), not null
+theme_id :integer default(1), not null
+bio :string(255)
+blocked :boolean default(FALSE), not null
+failed_attempts :integer default(0)
+locked_at :datetime
+extern_uid :string(255)
+provider :string(255)
+username :string(255)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ F
+
+
+
+
+ G
+
+
+
+
+ N
+
+
+
+
+ S
+
+
+
+
+ W
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ force_random_password
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
create_from_omniauth (auth, ldap = false)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create_from_omniauth (auth , ldap = false )
+ gitlab_auth .create_from_omniauth (auth , ldap )
+end
+
+
+
+
+
+
+
+
+
filter (filter_name)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def filter filter_name
+ case filter_name
+ when "admins" ; self .admins
+ when "blocked" ; self .blocked
+ when "wop" ; self .without_projects
+ else
+ self .active
+ end
+end
+
+
+
+
+
+
+
+
+
find_for_ldap_auth (auth, signed_in_resource = nil)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def find_for_ldap_auth (auth , signed_in_resource = nil )
+ gitlab_auth .find_for_ldap_auth (auth , signed_in_resource )
+end
+
+
+
+
+
+
+
+
+
find_or_new_for_omniauth (auth)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def find_or_new_for_omniauth (auth )
+ gitlab_auth .find_or_new_for_omniauth (auth )
+end
+
+
+
+
+
+
+
+
+
gitlab_auth ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def gitlab_auth
+ Gitlab :: Auth .new
+end
+
+
+
+
+
+
+
+
+
not_in_project (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def not_in_project (project )
+ if project .users .present?
+ where ("id not in (:ids)" , ids : project .users .map (&:id ) )
+ else
+ scoped
+ end
+end
+
+
+
+
+
+
+
+
+
search (query)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def search query
+ where ("name LIKE :query or email LIKE :query" , query : "%#{query}%" )
+end
+
+
+
+
+
+
+
+
+
without_projects ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def without_projects
+ where ('id NOT IN (SELECT DISTINCT(user_id) FROM users_projects)' )
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
generate_password ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def generate_password
+ if self .force_random_password
+ self .password = self .password_confirmation = Devise .friendly_token .first (8 )
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/UserDecorator.html b/doc/code/classes/UserDecorator.html
new file mode 100644
index 00000000..24ce4b76
--- /dev/null
+++ b/doc/code/classes/UserDecorator.html
@@ -0,0 +1,178 @@
+
+
+
+
+ UserDecorator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
avatar_image (size = 16)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def avatar_image size = 16
+ h .image_tag h .gravatar_icon (self .email , size ), class : "avatar #{"s#{size}"}" , width : size
+end
+
+
+
+
+
+
+
+
+
tm_of (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def tm_of (project )
+ project .team_member_by_id (self .id )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/UserObserver.html b/doc/code/classes/UserObserver.html
new file mode 100644
index 00000000..6899937a
--- /dev/null
+++ b/doc/code/classes/UserObserver.html
@@ -0,0 +1,268 @@
+
+
+
+
+ UserObserver
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ UserObserver
+
+ <
+
+ ActiveRecord::Observer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ L
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
after_create (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_create (user )
+ log_info ("User \"#{user.name}\" (#{user.email}) was created" )
+
+ Notify .new_user_email (user .id , user .password ).deliver
+end
+
+
+
+
+
+
+
+
+
after_destroy (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_destroy user
+ log_info ("User \"#{user.name}\" (#{user.email}) was removed" )
+end
+
+
+
+
+
+
+
+
+
after_save (user)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_save user
+ if user .username_changed?
+ if user .namespace
+ user .namespace .update_attributes (path : user .username )
+ else
+ user .create_namespace! (path : user .username , name : user .username )
+ end
+ end
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
log_info (message)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def log_info message
+ Gitlab :: AppLogger .info message
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/UsersProject.html b/doc/code/classes/UsersProject.html
new file mode 100644
index 00000000..76ae5125
--- /dev/null
+++ b/doc/code/classes/UsersProject.html
@@ -0,0 +1,871 @@
+
+
+
+
+ UsersProject
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ UsersProject
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: users_projects
+
+
id :integer not null, primary key
+user_id :integer not null
+project_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+project_access :integer default(0), not null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+ B
+
+
+
+
+ I
+
+
+
+
+ P
+
+
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+ U
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Constants
+
+
+
+ GUEST
+ =
+ 10
+
+
+
+
+
+
+
+
+
+ REPORTER
+ =
+ 20
+
+
+
+
+
+
+
+
+
+ DEVELOPER
+ =
+ 30
+
+
+
+
+
+
+
+
+
+ MASTER
+ =
+ 40
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Attributes
+
+
+
+
+ [RW]
+
+ skip_git
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
access_roles ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def access_roles
+ {
+ "Guest" => GUEST ,
+ "Reporter" => REPORTER ,
+ "Developer" => DEVELOPER ,
+ "Master" => MASTER
+ }
+end
+
+
+
+
+
+
+
+
+
add_users_into_projects (project_ids, user_ids, project_access)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def add_users_into_projects (project_ids , user_ids , project_access )
+ UsersProject .transaction do
+ project_ids .each do | project_id |
+ user_ids .each do | user_id |
+ users_project = UsersProject .new (project_access : project_access , user_id : user_id )
+ users_project .project_id = project_id
+ users_project .skip_git = true
+ users_project .save
+ end
+ end
+ Gitlab :: Gitolite .new .update_repositories (Project .where (id : project_ids ))
+ end
+
+ true
+rescue
+ false
+end
+
+
+
+
+
+
+
+
+
bulk_delete (project, user_ids)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def bulk_delete (project , user_ids )
+ UsersProject .transaction do
+ UsersProject .where (user_id : user_ids , project_id : project .id ).each do | users_project |
+ users_project .skip_git = true
+ users_project .destroy
+ end
+
+ project .update_repository
+ end
+end
+
+
+
+
+
+
+
+
+
bulk_import (project, user_ids, project_access)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def bulk_import (project , user_ids , project_access )
+ add_users_into_projects ([project .id ], user_ids , project_access )
+end
+
+
+
+
+
+
+
+
+
bulk_update (project, user_ids, project_access)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def bulk_update (project , user_ids , project_access )
+ UsersProject .transaction do
+ UsersProject .where (user_id : user_ids , project_id : project .id ).each do | users_project |
+ users_project .project_access = project_access
+ users_project .skip_git = true
+ users_project .save
+ end
+ project .update_repository
+ end
+end
+
+
+
+
+
+
+
+
+
import_team (source_project, target_project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def import_team (source_project , target_project )
+ source_team = source_project .users_projects .all
+ target_team = target_project .users_projects .all
+ target_user_ids = target_team .map (&:user_id )
+
+ source_team .reject! do | tm |
+
+ target_user_ids .include? (tm .user_id )
+ end
+
+ source_team .map! do | tm |
+ new_tm = tm .dup
+ new_tm .id = nil
+ new_tm .project_id = target_project .id
+ new_tm .skip_git = true
+ new_tm
+ end
+
+ UsersProject .transaction do
+ source_team .each do | tm |
+ tm .save
+ end
+ target_project .update_repository
+ end
+
+ true
+rescue
+ false
+end
+
+
+
+
+
+
+
+
+
truncate_team (project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def truncate_team project
+ truncate_teams [project .id ]
+end
+
+
+
+
+
+
+
+
+
truncate_teams (project_ids)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def truncate_teams (project_ids )
+ UsersProject .transaction do
+ users_projects = UsersProject .where (project_id : project_ids )
+ users_projects .each do | users_project |
+ users_project .skip_git = true
+ users_project .destroy
+ end
+ Gitlab :: Gitolite .new .update_repositories (Project .where (id : project_ids ))
+ end
+
+ true
+rescue
+ false
+end
+
+
+
+
+
+
+
+
+
user_bulk_import (user, project_ids, project_access)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def user_bulk_import (user , project_ids , project_access )
+ add_users_into_projects (project_ids , [user .id ], project_access )
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
project_access_human ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def project_access_human
+ Project .access_options .key (self .project_access )
+end
+
+
+
+
+
+
+
+
+
repo_access_human ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def repo_access_human
+ self .class .access_roles .invert [self .project_access ]
+end
+
+
+
+
+
+
+
+
+
role_access ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def role_access
+ project_access
+end
+
+
+
+
+
+
+
+
+
skip_git? ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def skip_git?
+ ! ! @skip_git
+end
+
+
+
+
+
+
+
+
+
update_repository ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def update_repository
+ git_host .update_repository (project )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/UsersProjectObserver.html b/doc/code/classes/UsersProjectObserver.html
new file mode 100644
index 00000000..50b02dc7
--- /dev/null
+++ b/doc/code/classes/UsersProjectObserver.html
@@ -0,0 +1,220 @@
+
+
+
+
+ UsersProjectObserver
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ UsersProjectObserver
+
+ <
+
+ ActiveRecord::Observer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ A
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
after_commit (users_project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_commit (users_project )
+ return if users_project .destroyed?
+ Notify .project_access_granted_email (users_project .id ).deliver
+end
+
+
+
+
+
+
+
+
+
after_create (users_project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_create (users_project )
+ Event .create (
+ project_id : users_project .project .id ,
+ action : Event :: Joined ,
+ author_id : users_project .user .id
+ )
+end
+
+
+
+
+
+
+
+
+
after_destroy (users_project)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def after_destroy (users_project )
+ Event .create (
+ project_id : users_project .project .id ,
+ action : Event :: Left ,
+ author_id : users_project .user .id
+ )
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Votes.html b/doc/code/classes/Votes.html
new file mode 100644
index 00000000..bb786a79
--- /dev/null
+++ b/doc/code/classes/Votes.html
@@ -0,0 +1,307 @@
+
+
+
+
+ Votes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Module
+ Votes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ D
+
+
+
+
+ U
+
+
+
+
+ V
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
downvotes ()
+
+
Link
+
+
+
+
+
Return the number of -1 comments (downvotes)
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def downvotes
+ notes .select (&:downvote? ).size
+end
+
+
+
+
+
+
+
+
+
downvotes_in_percent ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def downvotes_in_percent
+ if votes_count .zero?
+ 0
+ else
+ 100.0 - upvotes_in_percent
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
Return the number of +1 comments (upvotes)
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def upvotes
+ notes .select (&:upvote? ).size
+end
+
+
+
+
+
+
+
+
+
upvotes_in_percent ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def upvotes_in_percent
+ if votes_count .zero?
+ 0
+ else
+ 100.0 / votes_count * upvotes
+ end
+end
+
+
+
+
+
+
+
+
+
votes_count ()
+
+
Link
+
+
+
+
+
Return the total number of votes
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def votes_count
+ upvotes + downvotes
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/WebHook.html b/doc/code/classes/WebHook.html
new file mode 100644
index 00000000..54097dd3
--- /dev/null
+++ b/doc/code/classes/WebHook.html
@@ -0,0 +1,168 @@
+
+
+
+
+ WebHook
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ WebHook
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: web_hooks
+
+
id :integer not null, primary key
+url :string(255)
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255) default("ProjectHook")
+service_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ E
+
+
+
+
+
+
+
+
+
+
Included Modules
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
execute (data)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def execute (data )
+ parsed_url = URI .parse (url )
+ if parsed_url .userinfo .blank?
+ WebHook .post (url , body : data .to_json , headers : { "Content-Type" => "application/json" })
+ else
+ post_url = url .gsub ("#{parsed_url.userinfo}@" , "" )
+ WebHook .post (post_url ,
+ body : data .to_json ,
+ headers : {"Content-Type" => "application/json" },
+ basic_auth : {username : parsed_url .user , password : parsed_url .password })
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/Wiki.html b/doc/code/classes/Wiki.html
new file mode 100644
index 00000000..ab0fe9b2
--- /dev/null
+++ b/doc/code/classes/Wiki.html
@@ -0,0 +1,294 @@
+
+
+
+
+ Wiki
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Class
+ Wiki
+
+ <
+
+ ActiveRecord::Base
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Table name: wikis
+
+
id :integer not null, primary key
+title :string(255)
+content :text
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+slug :string(255)
+user_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ R
+
+
+
+
+ S
+
+
+
+
+ T
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class Public methods
+
+
+
+
+
search (query)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def search (query )
+ where ("title like :query OR content like :query" , query : "%#{query}%" )
+end
+
+
+
+
+
+
Class Protected methods
+
+
+
+
+
regenerate_from (wiki)
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def self .regenerate_from wiki
+ regenerated_field = [:slug , :content , :title ]
+
+ new_wiki = Wiki .new
+ regenerated_field .each do | field |
+ new_wiki .send ("#{field}=" , wiki .send (field ))
+ end
+ new_wiki
+end
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
to_param ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def to_param
+ slug
+end
+
+
+
+
+
+
Instance Protected methods
+
+
+
+
+
set_slug ()
+
+
Link
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def set_slug
+ self .slug = self .title .parameterize
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/classes/WikisController.html b/doc/code/classes/WikisController.html
new file mode 100644
index 00000000..3247d4f0
--- /dev/null
+++ b/doc/code/classes/WikisController.html
@@ -0,0 +1,397 @@
+
+
+
+
+ WikisController
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Methods
+
+
+ C
+
+
+
+
+ D
+
+
+
+
+ E
+
+
+
+
+ H
+
+
+
+
+ P
+
+
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Instance Public methods
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def create
+ @wiki = @project .wikis .new (params [:wiki ])
+ @wiki .user = current_user
+
+ respond_to do | format |
+ if @wiki .save
+ format .html { redirect_to [@project , @wiki ], notice : 'Wiki was successfully updated.' }
+ else
+ format .html { render action : "edit" }
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def destroy
+ @wikis = @project .wikis .where (slug : params [:id ]).delete_all
+
+ respond_to do | format |
+ format .html { redirect_to project_wiki_path (@project , :index ), notice : "Page was successfully deleted" }
+ end
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def edit
+ @wiki = @project .wikis .where (slug : params [:id ]).order ("created_at" ).last
+ @wiki = Wiki .regenerate_from @wiki
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def history
+ @wikis = @project .wikis .where (slug : params [:id ]).order ("created_at" )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def pages
+ @wikis = @project .wikis .group (:slug ).order ("created_at" )
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Source:
+ show
+
+
+
+
+def show
+ if params [:old_page_id ]
+ @wiki = @project .wikis .find (params [:old_page_id ])
+ else
+ @wiki = @project .wikis .where (slug : params [:id ]).order ("created_at" ).last
+ end
+
+ @note = @project .notes .new (noteable : @wiki )
+
+ if @wiki
+ render 'show'
+ else
+ if can? (current_user , :write_wiki , @project )
+ @wiki = @project .wikis .new (slug : params [:id ])
+ render 'edit'
+ else
+ render 'empty'
+ end
+ end
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/created.rid b/doc/code/created.rid
new file mode 100644
index 00000000..3177c0b3
--- /dev/null
+++ b/doc/code/created.rid
@@ -0,0 +1,155 @@
+Sun, 30 Dec 2012 14:41:56 +0200
+app/models/namespace.rb Sun, 30 Dec 2012 12:06:28 +0200
+app/models/ability.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/models/commit.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/models/gitlab_ci_service.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/models/system_hook.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/models/key.rb Thu, 27 Dec 2012 12:10:59 +0200
+app/models/note.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/models/project.rb Fri, 28 Dec 2012 09:30:09 +0200
+app/models/tree.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/models/milestone.rb Thu, 27 Dec 2012 11:32:29 +0200
+app/models/web_hook.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/models/protected_branch.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/models/project_hook.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/models/event.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/models/service_hook.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/models/service.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/models/snippet.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/models/merge_request.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/models/user.rb Sun, 30 Dec 2012 13:40:45 +0200
+app/models/group.rb Sun, 30 Dec 2012 14:25:46 +0200
+app/models/wiki.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/models/users_project.rb Sun, 30 Dec 2012 14:27:12 +0200
+app/models/issue.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/observers/system_hook_observer.rb Mon, 30 Jul 2012 09:40:22 +0300
+app/observers/note_observer.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/observers/users_project_observer.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/observers/project_observer.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/observers/user_observer.rb Sun, 30 Dec 2012 12:06:28 +0200
+app/observers/merge_request_observer.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/observers/activity_observer.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/observers/key_observer.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/observers/issue_observer.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/controllers/labels_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/projects_controller.rb Sun, 30 Dec 2012 13:33:32 +0200
+app/controllers/application_controller.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/controllers/keys_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/repositories_controller.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/controllers/services_controller.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/controllers/hooks_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/compare_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/merge_requests_controller.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/controllers/snippets_controller.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/controllers/help_controller.rb Wed, 29 Feb 2012 23:28:38 +0200
+app/controllers/omniauth_callbacks_controller.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/controllers/errors_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/blob_controller.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/controllers/wikis_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/refs_controller.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/controllers/notes_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/milestones_controller.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/controllers/search_controller.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/controllers/admin_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/team_members_controller.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/controllers/profiles_controller.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/controllers/dashboard_controller.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/controllers/admin/projects_controller.rb Sun, 30 Dec 2012 14:08:40 +0200
+app/controllers/admin/hooks_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/admin/resque_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/admin/logs_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/admin/team_members_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/admin/dashboard_controller.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/controllers/admin/users_controller.rb Sun, 30 Dec 2012 13:42:44 +0200
+app/controllers/admin/groups_controller.rb Sun, 30 Dec 2012 14:11:24 +0200
+app/controllers/commits_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/tree_controller.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/controllers/deploy_keys_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/blame_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/protected_branches_controller.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/controllers/commit_controller.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/controllers/groups_controller.rb Sun, 30 Dec 2012 12:42:35 +0200
+app/controllers/project_resource_controller.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/controllers/issues_controller.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/mailers/notify.rb Sun, 30 Dec 2012 12:06:28 +0200
+app/uploaders/attachment_uploader.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/helpers/snippets_helper.rb Fri, 02 Dec 2011 02:40:22 +0200
+app/helpers/events_helper.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/helpers/merge_requests_helper.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/helpers/tree_helper.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/helpers/namespaces_helper.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/helpers/projects_helper.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/helpers/tags_helper.rb Fri, 02 Dec 2011 02:40:22 +0200
+app/helpers/gitlab_markdown_helper.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/helpers/dashboard_helper.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/helpers/commits_helper.rb Thu, 27 Dec 2012 11:32:29 +0200
+app/helpers/application_helper.rb Sun, 30 Dec 2012 13:49:26 +0200
+app/helpers/issues_helper.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/helpers/tab_helper.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/helpers/profile_helper.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/helpers/notes_helper.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/contexts/project_update_context.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/contexts/test_hook_context.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/contexts/merge_requests_load_context.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/contexts/notes/create_context.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/contexts/notes/load_context.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/contexts/issues_bulk_update_context.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/contexts/issues_list_context.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/contexts/base_context.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/contexts/search_context.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/contexts/commit_load_context.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/roles/note_event.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/roles/push_observer.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/roles/account.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/roles/votes.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/roles/repository.rb Sun, 30 Dec 2012 12:24:50 +0200
+app/roles/git_host.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/roles/team.rb Sun, 30 Dec 2012 14:26:37 +0200
+app/roles/namespaced_project.rb Wed, 26 Dec 2012 10:56:36 +0200
+app/roles/authority.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/roles/push_event.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/roles/static_model.rb Mon, 29 Oct 2012 21:44:39 +0200
+app/roles/issue_commonality.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/decorators/commit_decorator.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/decorators/application_decorator.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/decorators/tree_decorator.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/decorators/event_decorator.rb Mon, 29 Oct 2012 21:33:47 +0200
+app/decorators/user_decorator.rb Sun, 23 Dec 2012 12:16:43 +0200
+app/assets/fonts/OFL.txt Thu, 27 Dec 2012 11:32:29 +0200
+app/workers/post_receive.rb Sun, 23 Dec 2012 14:02:47 +0200
+app/workers/system_hook_worker.rb Mon, 30 Jul 2012 09:40:23 +0300
+lib/extracts_path.rb Thu, 27 Dec 2012 11:32:29 +0200
+lib/file_size_validator.rb Mon, 29 Oct 2012 21:33:47 +0200
+lib/redcarpet/render/gitlab_html.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/gitlab/auth.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/gitlab/regex.rb Fri, 28 Dec 2012 09:30:09 +0200
+lib/gitlab/git_logger.rb Mon, 29 Oct 2012 21:33:47 +0200
+lib/gitlab/satellite/merge_action.rb Sun, 23 Dec 2012 12:16:43 +0200
+lib/gitlab/satellite/satellite.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/gitlab/satellite/edit_file_action.rb Sun, 23 Dec 2012 12:16:43 +0200
+lib/gitlab/satellite/action.rb Sun, 23 Dec 2012 12:16:43 +0200
+lib/gitlab/backend/grack_auth.rb Sun, 30 Dec 2012 12:06:28 +0200
+lib/gitlab/backend/gitolite_config.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/gitlab/backend/gitolite.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/gitlab/logger.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/gitlab/markdown.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/gitlab/app_logger.rb Mon, 29 Oct 2012 21:33:47 +0200
+lib/gitlab/seeder.rb Sun, 23 Dec 2012 12:16:43 +0200
+lib/gitlab/git_stats.rb Sun, 23 Dec 2012 12:16:43 +0200
+lib/gitlab/project_mover.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/gitlab/graph/commit.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/gitlab/graph/json_builder.rb Thu, 27 Dec 2012 11:32:29 +0200
+lib/gitlab/theme.rb Sun, 23 Dec 2012 12:16:43 +0200
+lib/gitlab/inline_diff.rb Mon, 29 Oct 2012 21:33:47 +0200
+lib/hooks/post-receive Sun, 23 Dec 2012 14:02:47 +0200
+lib/api/projects.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/api/merge_requests.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/api/users.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/api/session.rb Mon, 29 Oct 2012 21:33:47 +0200
+lib/api/notes.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/api/helpers.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/api/entities.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/api/milestones.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/api/issues.rb Sun, 23 Dec 2012 14:02:47 +0200
+lib/event_filter.rb Sun, 23 Dec 2012 12:16:43 +0200
+lib/api.rb Sun, 23 Dec 2012 14:02:47 +0200
diff --git a/doc/code/css/github.css b/doc/code/css/github.css
new file mode 100644
index 00000000..bd778a76
--- /dev/null
+++ b/doc/code/css/github.css
@@ -0,0 +1,129 @@
+/*
+
+github.com style (c) Vasily Polovnyov
+
+*/
+
+pre code {
+ display: block; padding: 0.5em;
+ color: #000;
+ background: #f8f8ff
+}
+
+pre .comment,
+pre .template_comment,
+pre .diff .header,
+pre .javadoc {
+ color: #998;
+ font-style: italic
+}
+
+pre .keyword,
+pre .css .rule .keyword,
+pre .winutils,
+pre .javascript .title,
+pre .lisp .title,
+pre .subst {
+ color: #000;
+ font-weight: bold
+}
+
+pre .number,
+pre .hexcolor {
+ color: #40a070
+}
+
+pre .string,
+pre .tag .value,
+pre .phpdoc,
+pre .tex .formula {
+ color: #d14
+}
+
+pre .title,
+pre .id {
+ color: #900;
+ font-weight: bold
+}
+
+pre .javascript .title,
+pre .lisp .title,
+pre .subst {
+ font-weight: normal
+}
+
+pre .class .title,
+pre .haskell .label,
+pre .tex .command {
+ color: #458;
+ font-weight: bold
+}
+
+pre .tag,
+pre .tag .title,
+pre .rules .property,
+pre .django .tag .keyword {
+ color: #000080;
+ font-weight: normal
+}
+
+pre .attribute,
+pre .variable,
+pre .instancevar,
+pre .lisp .body {
+ color: #008080
+}
+
+pre .regexp {
+ color: #009926
+}
+
+pre .class {
+ color: #458;
+ font-weight: bold
+}
+
+pre .symbol,
+pre .ruby .symbol .string,
+pre .ruby .symbol .keyword,
+pre .ruby .symbol .keymethods,
+pre .lisp .keyword,
+pre .tex .special,
+pre .input_number {
+ color: #990073
+}
+
+pre .builtin,
+pre .built_in,
+pre .lisp .title {
+ color: #0086b3
+}
+
+pre .preprocessor,
+pre .pi,
+pre .doctype,
+pre .shebang,
+pre .cdata {
+ color: #999;
+ font-weight: bold
+}
+
+pre .deletion {
+ background: #fdd
+}
+
+pre .addition {
+ background: #dfd
+}
+
+pre .diff .change {
+ background: #0086b3
+}
+
+pre .chunk {
+ color: #aaa
+}
+
+pre .tex .formula {
+ opacity: 0.5;
+}
diff --git a/doc/code/css/main.css b/doc/code/css/main.css
new file mode 100755
index 00000000..7d5a913a
--- /dev/null
+++ b/doc/code/css/main.css
@@ -0,0 +1,333 @@
+body {
+ font-family: "Helvetica Neue", Arial, sans-serif;
+ background: #FFF;
+ color: #000;
+ margin: 0px;
+ font-size: 0.82em;
+ line-height: 1.25em;
+}
+
+a {
+ color: #00F;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #333;
+ background: #FE8;
+}
+
+p {
+ margin-bottom: 1em;
+}
+
+h1 {
+ font-size: 2.1em;
+ font-weight: normal;
+ line-height: 1.2em;
+ margin: 1.4em 0 0.7em 0;
+}
+
+h2 {
+ font-size: 1.6em;
+ margin: 1.8em 0 0.8em 0;
+ font-weight: normal;
+ line-height: 1.2em;
+}
+
+h3 {
+ font-size: 1.4em;
+ color:#555;
+ margin: 1.4em 0 0.7em 0;
+ font-weight: normal;
+}
+
+h4 {
+ margin: 1.4em 0 0.5em 0;
+ font-size: 1em;
+}
+
+table
+{
+ margin-bottom: 1em;
+}
+
+td, th
+{
+ padding: 0 0.7em 0.3em 0;
+}
+
+th
+{
+ font-weight: bold;
+}
+
+.clear
+{
+ clear: both;
+ width: 0; height: 0;
+}
+
+dt
+{
+ margin-bottom: 0.3em;
+ font-weight: bold;
+}
+
+dd
+{
+ margin-left: 2em;
+ margin-bottom: 1em;
+}
+
+dd p
+{
+ margin-top: 0.6em;
+}
+
+li
+{
+ margin: 0 0 0.5em 2em;
+}
+
+ul li
+{
+ list-style: disc;
+}
+
+ol li
+{
+ list-style: decimal;
+}
+
+.banner
+{
+ background: #EDF3FE;
+ border-bottom: 1px solid #ccc;
+ padding: 1em 2em 0.5em 2em;
+}
+.banner h1
+{
+ font-size: 1.2em;
+ margin: 0;
+}
+
+.banner h1 .type
+{
+ font-size: 0.833em;
+ display:block;
+}
+
+.banner h1 .type,
+.banner h1 .parent
+{
+ color: #666;
+}
+
+.banner ul
+{
+ margin-top: 0.3em;
+ margin-bottom: 0;
+ font-size: 0.85em;
+}
+
+.banner li
+{
+ list-style: none;
+ margin-left: 0;
+ margin-bottom: 0;
+}
+
+pre
+{
+ margin-bottom: 1em;
+}
+
+.methods dt
+{
+ width: 1em;
+ font-size: 1.5em;
+ color:#AAA;
+ position: absolute;
+ font-weight: normal;
+ margin: 0;
+}
+
+.methods dd
+{
+ margin-left: 2.5em;
+ min-height: 1.8em;
+ -height: 1.8em;
+ padding-bottom: 0.8em;
+}
+
+
+.methods ul li
+{
+ margin-right: 0.7em;
+ margin-left: 0;
+ list-style: none;
+ display: inline;
+}
+
+#content {
+ margin: 2em;
+ margin-left: 3.5em;
+ margin-right: 3.5em;
+}
+
+
+.sectiontitle {
+ margin-top: 2em;
+ margin-bottom: 1.3em;
+ margin-left: -1.2em;
+ font-size: 1.2em;
+ padding: 0 0 0.25em 0;
+ font-weight: bold;
+ border-bottom: 1px solid #000;
+}
+
+.contenttitle {
+ margin-top: 4em;
+ margin-bottom: 1.3em;
+ margin-left: -0.9em;
+ font-size: 1.6em;
+ padding: 0 0 0.25em 0;
+ font-weight: bold;
+}
+
+.attr-rw {
+ padding-right: 1em;
+ text-align: center;
+ color: #055;
+}
+
+.attr-name {
+ font-weight: bold;
+ padding-right: 1em;
+}
+
+.attr-desc {
+}
+
+tt {
+ font-size: 1.15em;
+}
+
+.attr-value {
+ font-family: monospace;
+ padding-left: 1em;
+ font-size: 1.15em;
+}
+
+.dyn-source {
+ display: none;
+ background: #fffde8;
+ color: #000;
+ border: #ffe0bb dotted 1px;
+ margin: 0.5em 2em 0.5em 0;
+ padding: 0.5em;
+}
+
+.dyn-source .cmt {
+ color: #00F;
+ font-style: italic;
+}
+
+.dyn-source .kw {
+ color: #070;
+ font-weight: bold;
+}
+
+.description pre {
+ padding: 0.5em;
+ border: #ffe0bb dotted 1px;
+ background: #fffde8;
+}
+
+.method {
+ margin-bottom: 2em;
+}
+.method .description,
+.method .sourcecode
+{
+ margin-left: 1.2em;
+}
+.method h4
+{
+ border-bottom: 1px dotted #999;
+ padding: 0 0 0.2em 0;
+ margin-bottom: 0.8em;
+ font-size: 1.1em;
+ color:#333;
+}
+.method .method-title {
+ border-bottom: 1px dotted #666;
+ padding: 0 0 0.15em 0;
+ margin: 0 0 0.5em 0;
+ font-size: 1.2em;
+ line-height: 1.25em;
+ position: relative;
+}
+
+.method .method-title a.permalink {
+ position: absolute;
+ font-size: 0.75em;
+ right: 0;
+}
+
+.method .sourcecode p.source-link {
+ text-indent: 0em;
+ margin-top: 0.5em;
+}
+
+.method .aka {
+ margin-top: 0.3em;
+ margin-left: 1em;
+ font-style: italic;
+ text-indent: 2em;
+}
+
+.method .source-link
+{
+ font-size: 0.85em;
+}
+
+.ruby-constant {
+ color: teal;
+}
+.ruby-keyword {
+ color: #000;
+ font-weight: bold
+}
+.ruby-title {
+ color: #900;
+ font-weight: bold;
+}
+.ruby-ivar {
+ color: teal;
+}
+.ruby-operator {
+ color: #000;
+ font-weight: bold
+}
+.ruby-identifier {
+ color: #000;
+}
+.ruby-string,
+.ruby-node {
+ color: #D14;
+}
+.ruby-comment {
+ color: #998;
+ font-style: italic;
+}
+.ruby-regexp {
+ color: #009926;
+}
+.ruby-value {
+ color: #990073;
+}
+.ruby-number {
+ color: #40A070;
+}
diff --git a/doc/code/css/panel.css b/doc/code/css/panel.css
new file mode 100755
index 00000000..9bd8027b
--- /dev/null
+++ b/doc/code/css/panel.css
@@ -0,0 +1,384 @@
+/* Panel (begin) */
+ .panel
+ {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ background: #FFF;
+ z-index: 2;
+ font-family: "Helvetica Neue", "Arial", sans-serif;
+ //zoom: 1;
+ }
+
+ .panel_tree .results,
+ .panel_results .tree
+ {
+ display: none;
+ }
+
+ /* Header with search box (begin) */
+ .panel .header
+ {
+ width: 100%;
+ height: 29px;
+ border-bottom: 1px solid #666;
+ position: relative;
+ left: 0; top: 0;
+ background: #e8e8e8;
+ }
+
+ .panel .header div
+ {
+ margin: 0 7px;
+ }
+ .panel .header table
+ {
+ height: 29px;
+ width: 100%;
+ }
+
+ .panel .header table td
+ {
+ vertical-align: middle;
+ text-align: middle;
+ }
+
+ .panel .header label
+ {
+ position: absolute;
+ font-size: 12px;
+ line-height: 29px;
+ margin-left: 3px;
+ color: #999;
+ cursor: text;
+ }
+
+ .panel .header table input
+ {
+ width: 100%;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ display: inline-block;
+ -webkit-appearance: searchfield;
+ height: 22px;
+ //height: auto;
+ }
+
+ /* Header with search box (end) */
+
+
+ /* Results (begin) */
+ .panel .result
+ {
+ position: absolute;
+ top: 30px;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ //height: expression((this.parentNode.offsetHeight - 31));
+ overflow-y: scroll;
+ overflow-x: hidden;
+ -overflow-y: hidden;
+ background: #EDF3FE url(../i/results_bg.png);
+ z-index: 2;
+ //zoom:1;
+ }
+
+ .panel .result ul
+ {
+ font-size: 0.8em;
+ width: 100%;
+ background: #EDF3FE url(../i/results_bg.png);
+ //zoom:1;
+ }
+
+ .panel .result ul li
+ {
+ height: 46px;
+ -height: 50px;
+ //display: inline;
+ //width: 100%;
+ //zoom: 1;
+ overflow: hidden;
+ padding: 4px 10px 0 10px;
+ cursor: pointer;
+ }
+
+ .panel .result ul li h1
+ {
+ font-size: 13px;
+ font-weight: normal;
+ color: #333;
+ margin-bottom: 2px;
+ white-space: nowrap;
+ }
+
+ .panel .result ul li p
+ {
+ font-size: 11px;
+ color: #333;
+ margin-bottom: 2px;
+ white-space: nowrap;
+ }
+
+ .panel .result ul li h1 i,
+ .panel .result ul li p.snippet
+ {
+ color: #999;
+ }
+
+ .panel .result ul li b
+ {
+ color: #000;
+ }
+
+ .panel .result ul li.current
+ {
+ background: #3875D7;
+ }
+
+ .panel .result ul li.current h1,
+ .panel .result ul li.current p
+ {
+ color: #DDD;
+ }
+
+ .panel .result ul li.current h1 i,
+ .panel .result ul li.current p.snippet
+ {
+ color: #AAA;
+ }
+
+ .panel .result ul li.current b
+ {
+ color: #FFF;
+ }
+
+
+ .panel .result ul li:hover,
+ .panel .result ul li.selected
+ {
+ background: #d0d0d0;
+ }
+
+ .panel .result ul li.current:hover
+ {
+ background: #2965C0;
+ }
+
+ .panel .result ul li .badge
+ {
+ margin-right: 0.4em;
+ margin-left: -0.2em;
+ padding: 0 0.2em;
+ color: #000;
+ border-radius: 3px;
+ }
+
+ .panel .result ul li .badge_1
+ {
+ background: #ACDBF4;
+ }
+
+ .panel .result ul li.current .badge_1
+ {
+ background: #97BFD7;
+ }
+
+ .panel .result ul li .badge_2
+ {
+ background: #ACF3C3;
+ }
+
+ .panel .result ul li.current .badge_2
+ {
+ background: #98D7AC;
+ }
+
+ .panel .result ul li .badge_3
+ {
+ background: #E0F3AC;
+ }
+
+ .panel .result ul li.current .badge_3
+ {
+ background: #C4D798;
+ }
+
+ .panel .result ul li .badge_4
+ {
+ background: #D7CA98;
+ }
+
+ .panel .result ul li.current .badge_4
+ {
+ background: #A6B0AC;
+ }
+
+ .panel .result ul li .badge_5
+ {
+ background: #F3C8AC;
+ }
+
+ .panel .result ul li.current .badge_5
+ {
+ background: #D7B198;
+ }
+
+ .panel .result ul li .badge_6
+ {
+ background: #F3ACC3;
+ }
+
+ .panel .result ul li.current .badge_6
+ {
+ background: #D798AB;
+ }
+
+ /* Results (end) */
+
+ /* Tree (begin) */ /**/
+ .panel .tree
+ {
+ position: absolute;
+ top: 30px;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ //zoom: 1;
+ //height: expression((this.parentNode.offsetHeight - 31));
+ overflow-y: scroll;
+ overflow-x: hidden;
+ -overflow-y: hidden;
+ background: #EDF3FE url(../i/tree_bg.png);
+ z-index: 30;
+ }
+
+ .panel .tree ul
+ {
+ background: #EDF3FE url(../i/tree_bg.png);
+ }
+
+ .panel .tree li
+ {
+ cursor: pointer;
+ overflow: hidden;
+ //height: 23px;
+ //display: inline;
+ //zoom: 1;
+ //width: 100%;
+ }
+
+
+ .panel .tree li .content
+ {
+ padding-left: 18px;
+ padding-top: 5px;
+ height: 18px;
+ overflow: hidden;
+ position: relative;
+ }
+
+ .panel .tree li .icon
+ {
+ width: 10px;
+ height: 9px;
+ background: url(../i/arrows.png);
+ background-position: 0 -9px;
+ position: absolute;
+ left: 1px;
+ top: 8px;
+ cursor: default;
+ }
+
+ .panel .tree li.closed .icon
+ {
+ background-position: 0 0;
+ }
+
+ .panel .tree ul li h1
+ {
+ font-size: 13px;
+ font-weight: normal;
+ color: #000;
+ margin-bottom: 2px;
+ white-space: nowrap;
+ }
+
+ .panel .tree ul li p
+ {
+ font-size: 11px;
+ color: #666;
+ margin-bottom: 2px;
+ white-space: nowrap;
+ }
+
+ .panel .tree ul li h1 i
+ {
+ color: #999;
+ font-style: normal;
+ }
+
+ .panel .tree ul li.empty
+ {
+ cursor: text;
+ }
+
+ .panel .tree ul li.empty h1,
+ .panel .tree ul li.empty p
+ {
+ color: #666;
+ font-style: italic;
+ }
+
+ .panel .tree ul li.current
+ {
+ background: #3875D7;
+ }
+
+ .panel .tree ul li.current .icon
+ {
+ background-position: -10px -9px;
+ }
+
+ .panel .tree ul li.current.closed .icon
+ {
+ background-position: -10px 0;
+ }
+
+ .panel .tree ul li.current h1
+ {
+ color: #FFF;
+ }
+
+ .panel .tree ul li.current p
+ {
+ color: #CCC;
+ }
+
+ .panel .tree ul li.current.empty h1,
+ .panel .tree ul li.current.empty p
+ {
+ color: #999;
+ }
+
+ .panel .tree ul li:hover
+ {
+ background: #d0d0d0;
+ }
+
+ .panel .tree ul li.current:hover
+ {
+ background: #2965C0;
+ }
+
+ .panel .tree .stopper
+ {
+ display: none;
+ }
+ /* Tree (end) */ /**/
+
+/* Panel (end) */
\ No newline at end of file
diff --git a/doc/code/css/reset.css b/doc/code/css/reset.css
new file mode 100755
index 00000000..da4a2394
--- /dev/null
+++ b/doc/code/css/reset.css
@@ -0,0 +1,48 @@
+/* http://meyerweb.com/eric/tools/css/reset/ */
+/* v1.0 | 20080212 */
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, font, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ font-size: 100%;
+ vertical-align: baseline;
+ background: transparent;
+}
+body {
+ line-height: 1;
+}
+ol, ul {
+ list-style: none;
+}
+blockquote, q {
+ quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+
+/* remember to highlight inserts somehow! */
+ins {
+ text-decoration: none;
+}
+del {
+ text-decoration: line-through;
+}
+
+/* tables still need 'cellspacing="0"' in the markup */
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
\ No newline at end of file
diff --git a/doc/code/favicon.ico b/doc/code/favicon.ico
new file mode 100644
index 00000000..e0e80cf8
Binary files /dev/null and b/doc/code/favicon.ico differ
diff --git a/doc/code/files/app/assets/fonts/OFL_txt.html b/doc/code/files/app/assets/fonts/OFL_txt.html
new file mode 100644
index 00000000..f873d9b2
--- /dev/null
+++ b/doc/code/files/app/assets/fonts/OFL_txt.html
@@ -0,0 +1,158 @@
+
+
+
+
+ OFL.txt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OFL.txt
+
+
+ app/assets/fonts/OFL.txt
+ Last modified: 2012-12-27 11:32:29 +0200
+
+
+
+
+
+
+
+
+
Copyright © 2010, Jan Gerner (post@yanone.de) This Font Software is
+licensed under the SIL Open Font License, Version 1.1. This license is
+copied below, and is also available with a FAQ at: scripts.sil.org/OFL
+
+
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+
+
+
PREAMBLE The goals of the Open Font License (OFL ) are to stimulate worldwide development of
+collaborative font projects, to support the font creation efforts of
+academic and linguistic communities, and to provide a free and open
+framework in which fonts may be shared and improved in partnership with
+others.
+
+
The OFL allows the licensed fonts to be used,
+studied, modified and redistributed freely as long as they are not sold by
+themselves. The fonts, including any derivative works, can be bundled,
+embedded, redistributed and/or sold with any software provided that any
+reserved names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply to any
+document created using the fonts or their derivatives.
+
+
DEFINITIONS “Font Software” refers to the set of files released by the
+Copyright Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+
“Reserved Font Name” refers to any names specified as such after the
+copyright statement(s).
+
+
“Original Version” refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+
“Modified Version” refers to any derivative made by adding to, deleting, or
+substituting – in part or in whole – any of the components of the Original
+Version, by changing formats or by porting the Font Software to a new
+environment.
+
+
“Author” refers to any designer, engineer, programmer, technical writer or
+other person who contributed to the Font Software.
+
+
PERMISSION & CONDITIONS Permission is hereby granted, free of charge,
+to any person obtaining a copy of the Font Software, to use, study, copy,
+merge, embed, modify, redistribute, and sell modified and unmodified copies
+of the Font Software, subject to the following conditions:
+
+
1) Neither the Font Software nor any of its individual components, in
+Original or Modified Versions, may be sold by itself.
+
+
2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be included
+either as stand-alone text files, human-readable headers or in the
+appropriate machine-readable metadata fields within text or binary files as
+long as those fields can be easily viewed by the user.
+
+
3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any Modified
+Version, except to acknowledge the contribution(s) of the Copyright
+Holder(s) and the Author(s) or with their explicit written permission.
+
+
5) The Font Software, modified or unmodified, in part or in whole, must be
+distributed entirely under this license, and must not be distributed under
+any other license. The requirement for fonts to remain under this license
+does not apply to any document created using the Font Software.
+
+
TERMINATION This license becomes null and void if any of the above
+conditions are not met.
+
+
DISCLAIMER THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS
+IN THE FONT SOFTWARE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/contexts/base_context_rb.html b/doc/code/files/app/contexts/base_context_rb.html
new file mode 100644
index 00000000..21416430
--- /dev/null
+++ b/doc/code/files/app/contexts/base_context_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ base_context.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ base_context.rb
+
+
+ app/contexts/base_context.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/contexts/commit_load_context_rb.html b/doc/code/files/app/contexts/commit_load_context_rb.html
new file mode 100644
index 00000000..c21f5e1b
--- /dev/null
+++ b/doc/code/files/app/contexts/commit_load_context_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ commit_load_context.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ commit_load_context.rb
+
+
+ app/contexts/commit_load_context.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/contexts/issues_bulk_update_context_rb.html b/doc/code/files/app/contexts/issues_bulk_update_context_rb.html
new file mode 100644
index 00000000..18b89d58
--- /dev/null
+++ b/doc/code/files/app/contexts/issues_bulk_update_context_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ issues_bulk_update_context.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issues_bulk_update_context.rb
+
+
+ app/contexts/issues_bulk_update_context.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/contexts/issues_list_context_rb.html b/doc/code/files/app/contexts/issues_list_context_rb.html
new file mode 100644
index 00000000..6d83a6b4
--- /dev/null
+++ b/doc/code/files/app/contexts/issues_list_context_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ issues_list_context.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issues_list_context.rb
+
+
+ app/contexts/issues_list_context.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/contexts/merge_requests_load_context_rb.html b/doc/code/files/app/contexts/merge_requests_load_context_rb.html
new file mode 100644
index 00000000..5f9c5462
--- /dev/null
+++ b/doc/code/files/app/contexts/merge_requests_load_context_rb.html
@@ -0,0 +1,86 @@
+
+
+
+
+ merge_requests_load_context.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ merge_requests_load_context.rb
+
+
+ app/contexts/merge_requests_load_context.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
Build collection of Merge Requests based on filtering passed via params for
+@project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/contexts/notes/create_context_rb.html b/doc/code/files/app/contexts/notes/create_context_rb.html
new file mode 100644
index 00000000..7cf9a67c
--- /dev/null
+++ b/doc/code/files/app/contexts/notes/create_context_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ create_context.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ create_context.rb
+
+
+ app/contexts/notes/create_context.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/contexts/notes/load_context_rb.html b/doc/code/files/app/contexts/notes/load_context_rb.html
new file mode 100644
index 00000000..84c7f143
--- /dev/null
+++ b/doc/code/files/app/contexts/notes/load_context_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ load_context.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ load_context.rb
+
+
+ app/contexts/notes/load_context.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/contexts/project_update_context_rb.html b/doc/code/files/app/contexts/project_update_context_rb.html
new file mode 100644
index 00000000..2712b358
--- /dev/null
+++ b/doc/code/files/app/contexts/project_update_context_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ project_update_context.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project_update_context.rb
+
+
+ app/contexts/project_update_context.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/contexts/search_context_rb.html b/doc/code/files/app/contexts/search_context_rb.html
new file mode 100644
index 00000000..85d7cc30
--- /dev/null
+++ b/doc/code/files/app/contexts/search_context_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ search_context.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ search_context.rb
+
+
+ app/contexts/search_context.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/contexts/test_hook_context_rb.html b/doc/code/files/app/contexts/test_hook_context_rb.html
new file mode 100644
index 00000000..ebb88998
--- /dev/null
+++ b/doc/code/files/app/contexts/test_hook_context_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ test_hook_context.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ test_hook_context.rb
+
+
+ app/contexts/test_hook_context.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/admin/dashboard_controller_rb.html b/doc/code/files/app/controllers/admin/dashboard_controller_rb.html
new file mode 100644
index 00000000..1fd4edd0
--- /dev/null
+++ b/doc/code/files/app/controllers/admin/dashboard_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ dashboard_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dashboard_controller.rb
+
+
+ app/controllers/admin/dashboard_controller.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/admin/groups_controller_rb.html b/doc/code/files/app/controllers/admin/groups_controller_rb.html
new file mode 100644
index 00000000..8fe6fc90
--- /dev/null
+++ b/doc/code/files/app/controllers/admin/groups_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ groups_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ groups_controller.rb
+
+
+ app/controllers/admin/groups_controller.rb
+ Last modified: 2012-12-30 14:11:24 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/admin/hooks_controller_rb.html b/doc/code/files/app/controllers/admin/hooks_controller_rb.html
new file mode 100644
index 00000000..221091a2
--- /dev/null
+++ b/doc/code/files/app/controllers/admin/hooks_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ hooks_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hooks_controller.rb
+
+
+ app/controllers/admin/hooks_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/admin/logs_controller_rb.html b/doc/code/files/app/controllers/admin/logs_controller_rb.html
new file mode 100644
index 00000000..27957990
--- /dev/null
+++ b/doc/code/files/app/controllers/admin/logs_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ logs_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ logs_controller.rb
+
+
+ app/controllers/admin/logs_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/admin/projects_controller_rb.html b/doc/code/files/app/controllers/admin/projects_controller_rb.html
new file mode 100644
index 00000000..2d611510
--- /dev/null
+++ b/doc/code/files/app/controllers/admin/projects_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ projects_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ projects_controller.rb
+
+
+ app/controllers/admin/projects_controller.rb
+ Last modified: 2012-12-30 14:08:40 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/admin/resque_controller_rb.html b/doc/code/files/app/controllers/admin/resque_controller_rb.html
new file mode 100644
index 00000000..742a9c7d
--- /dev/null
+++ b/doc/code/files/app/controllers/admin/resque_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ resque_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ resque_controller.rb
+
+
+ app/controllers/admin/resque_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/admin/team_members_controller_rb.html b/doc/code/files/app/controllers/admin/team_members_controller_rb.html
new file mode 100644
index 00000000..b821baff
--- /dev/null
+++ b/doc/code/files/app/controllers/admin/team_members_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ team_members_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ team_members_controller.rb
+
+
+ app/controllers/admin/team_members_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/admin/users_controller_rb.html b/doc/code/files/app/controllers/admin/users_controller_rb.html
new file mode 100644
index 00000000..c8188f7e
--- /dev/null
+++ b/doc/code/files/app/controllers/admin/users_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ users_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ users_controller.rb
+
+
+ app/controllers/admin/users_controller.rb
+ Last modified: 2012-12-30 13:42:44 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/admin_controller_rb.html b/doc/code/files/app/controllers/admin_controller_rb.html
new file mode 100644
index 00000000..78375592
--- /dev/null
+++ b/doc/code/files/app/controllers/admin_controller_rb.html
@@ -0,0 +1,88 @@
+
+
+
+
+ admin_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ admin_controller.rb
+
+
+ app/controllers/admin_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
Provides a base class for Admin
+controllers to subclass
+
+
Automatically sets the layout and ensures an administrator is logged in
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/application_controller_rb.html b/doc/code/files/app/controllers/application_controller_rb.html
new file mode 100644
index 00000000..f13dba25
--- /dev/null
+++ b/doc/code/files/app/controllers/application_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ application_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ application_controller.rb
+
+
+ app/controllers/application_controller.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/blame_controller_rb.html b/doc/code/files/app/controllers/blame_controller_rb.html
new file mode 100644
index 00000000..f0c34244
--- /dev/null
+++ b/doc/code/files/app/controllers/blame_controller_rb.html
@@ -0,0 +1,85 @@
+
+
+
+
+ blame_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ blame_controller.rb
+
+
+ app/controllers/blame_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
Controller for viewing a file’s blame
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/blob_controller_rb.html b/doc/code/files/app/controllers/blob_controller_rb.html
new file mode 100644
index 00000000..a5bdfad1
--- /dev/null
+++ b/doc/code/files/app/controllers/blob_controller_rb.html
@@ -0,0 +1,85 @@
+
+
+
+
+ blob_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ blob_controller.rb
+
+
+ app/controllers/blob_controller.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
Controller for viewing a file’s blame
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/commit_controller_rb.html b/doc/code/files/app/controllers/commit_controller_rb.html
new file mode 100644
index 00000000..a7189c86
--- /dev/null
+++ b/doc/code/files/app/controllers/commit_controller_rb.html
@@ -0,0 +1,89 @@
+
+
+
+
+ commit_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ commit_controller.rb
+
+
+ app/controllers/commit_controller.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/commits_controller_rb.html b/doc/code/files/app/controllers/commits_controller_rb.html
new file mode 100644
index 00000000..989e4cd8
--- /dev/null
+++ b/doc/code/files/app/controllers/commits_controller_rb.html
@@ -0,0 +1,87 @@
+
+
+
+
+ commits_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ commits_controller.rb
+
+
+ app/controllers/commits_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
Required Files
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/compare_controller_rb.html b/doc/code/files/app/controllers/compare_controller_rb.html
new file mode 100644
index 00000000..479fa869
--- /dev/null
+++ b/doc/code/files/app/controllers/compare_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ compare_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ compare_controller.rb
+
+
+ app/controllers/compare_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/dashboard_controller_rb.html b/doc/code/files/app/controllers/dashboard_controller_rb.html
new file mode 100644
index 00000000..ac7012f4
--- /dev/null
+++ b/doc/code/files/app/controllers/dashboard_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ dashboard_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dashboard_controller.rb
+
+
+ app/controllers/dashboard_controller.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/deploy_keys_controller_rb.html b/doc/code/files/app/controllers/deploy_keys_controller_rb.html
new file mode 100644
index 00000000..c0c598a2
--- /dev/null
+++ b/doc/code/files/app/controllers/deploy_keys_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ deploy_keys_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ deploy_keys_controller.rb
+
+
+ app/controllers/deploy_keys_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/errors_controller_rb.html b/doc/code/files/app/controllers/errors_controller_rb.html
new file mode 100644
index 00000000..bd2da28b
--- /dev/null
+++ b/doc/code/files/app/controllers/errors_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ errors_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ errors_controller.rb
+
+
+ app/controllers/errors_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/groups_controller_rb.html b/doc/code/files/app/controllers/groups_controller_rb.html
new file mode 100644
index 00000000..905f17b3
--- /dev/null
+++ b/doc/code/files/app/controllers/groups_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ groups_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ groups_controller.rb
+
+
+ app/controllers/groups_controller.rb
+ Last modified: 2012-12-30 12:42:35 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/help_controller_rb.html b/doc/code/files/app/controllers/help_controller_rb.html
new file mode 100644
index 00000000..0c41c81e
--- /dev/null
+++ b/doc/code/files/app/controllers/help_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ help_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ help_controller.rb
+
+
+ app/controllers/help_controller.rb
+ Last modified: 2012-02-29 23:28:38 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/hooks_controller_rb.html b/doc/code/files/app/controllers/hooks_controller_rb.html
new file mode 100644
index 00000000..8182569b
--- /dev/null
+++ b/doc/code/files/app/controllers/hooks_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ hooks_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hooks_controller.rb
+
+
+ app/controllers/hooks_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/issues_controller_rb.html b/doc/code/files/app/controllers/issues_controller_rb.html
new file mode 100644
index 00000000..1c198695
--- /dev/null
+++ b/doc/code/files/app/controllers/issues_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ issues_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issues_controller.rb
+
+
+ app/controllers/issues_controller.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/keys_controller_rb.html b/doc/code/files/app/controllers/keys_controller_rb.html
new file mode 100644
index 00000000..d88ed459
--- /dev/null
+++ b/doc/code/files/app/controllers/keys_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ keys_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ keys_controller.rb
+
+
+ app/controllers/keys_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/labels_controller_rb.html b/doc/code/files/app/controllers/labels_controller_rb.html
new file mode 100644
index 00000000..6b22a056
--- /dev/null
+++ b/doc/code/files/app/controllers/labels_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ labels_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ labels_controller.rb
+
+
+ app/controllers/labels_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/merge_requests_controller_rb.html b/doc/code/files/app/controllers/merge_requests_controller_rb.html
new file mode 100644
index 00000000..5dd462cc
--- /dev/null
+++ b/doc/code/files/app/controllers/merge_requests_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ merge_requests_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ merge_requests_controller.rb
+
+
+ app/controllers/merge_requests_controller.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/milestones_controller_rb.html b/doc/code/files/app/controllers/milestones_controller_rb.html
new file mode 100644
index 00000000..70eb9de7
--- /dev/null
+++ b/doc/code/files/app/controllers/milestones_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ milestones_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ milestones_controller.rb
+
+
+ app/controllers/milestones_controller.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/notes_controller_rb.html b/doc/code/files/app/controllers/notes_controller_rb.html
new file mode 100644
index 00000000..67e846be
--- /dev/null
+++ b/doc/code/files/app/controllers/notes_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ notes_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ notes_controller.rb
+
+
+ app/controllers/notes_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/omniauth_callbacks_controller_rb.html b/doc/code/files/app/controllers/omniauth_callbacks_controller_rb.html
new file mode 100644
index 00000000..1b5e8fa0
--- /dev/null
+++ b/doc/code/files/app/controllers/omniauth_callbacks_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ omniauth_callbacks_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ omniauth_callbacks_controller.rb
+
+
+ app/controllers/omniauth_callbacks_controller.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/profiles_controller_rb.html b/doc/code/files/app/controllers/profiles_controller_rb.html
new file mode 100644
index 00000000..0b085838
--- /dev/null
+++ b/doc/code/files/app/controllers/profiles_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ profiles_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ profiles_controller.rb
+
+
+ app/controllers/profiles_controller.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/project_resource_controller_rb.html b/doc/code/files/app/controllers/project_resource_controller_rb.html
new file mode 100644
index 00000000..e17be7ab
--- /dev/null
+++ b/doc/code/files/app/controllers/project_resource_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ project_resource_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project_resource_controller.rb
+
+
+ app/controllers/project_resource_controller.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/projects_controller_rb.html b/doc/code/files/app/controllers/projects_controller_rb.html
new file mode 100644
index 00000000..939eb71e
--- /dev/null
+++ b/doc/code/files/app/controllers/projects_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ projects_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ projects_controller.rb
+
+
+ app/controllers/projects_controller.rb
+ Last modified: 2012-12-30 13:33:32 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/protected_branches_controller_rb.html b/doc/code/files/app/controllers/protected_branches_controller_rb.html
new file mode 100644
index 00000000..1fca7134
--- /dev/null
+++ b/doc/code/files/app/controllers/protected_branches_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ protected_branches_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ protected_branches_controller.rb
+
+
+ app/controllers/protected_branches_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/refs_controller_rb.html b/doc/code/files/app/controllers/refs_controller_rb.html
new file mode 100644
index 00000000..207441f1
--- /dev/null
+++ b/doc/code/files/app/controllers/refs_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ refs_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ refs_controller.rb
+
+
+ app/controllers/refs_controller.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/repositories_controller_rb.html b/doc/code/files/app/controllers/repositories_controller_rb.html
new file mode 100644
index 00000000..eab4dd4d
--- /dev/null
+++ b/doc/code/files/app/controllers/repositories_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ repositories_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ repositories_controller.rb
+
+
+ app/controllers/repositories_controller.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/search_controller_rb.html b/doc/code/files/app/controllers/search_controller_rb.html
new file mode 100644
index 00000000..f47c3664
--- /dev/null
+++ b/doc/code/files/app/controllers/search_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ search_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ search_controller.rb
+
+
+ app/controllers/search_controller.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/services_controller_rb.html b/doc/code/files/app/controllers/services_controller_rb.html
new file mode 100644
index 00000000..de836e79
--- /dev/null
+++ b/doc/code/files/app/controllers/services_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ services_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ services_controller.rb
+
+
+ app/controllers/services_controller.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/snippets_controller_rb.html b/doc/code/files/app/controllers/snippets_controller_rb.html
new file mode 100644
index 00000000..662aef91
--- /dev/null
+++ b/doc/code/files/app/controllers/snippets_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ snippets_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ snippets_controller.rb
+
+
+ app/controllers/snippets_controller.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/team_members_controller_rb.html b/doc/code/files/app/controllers/team_members_controller_rb.html
new file mode 100644
index 00000000..c4784ecc
--- /dev/null
+++ b/doc/code/files/app/controllers/team_members_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ team_members_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ team_members_controller.rb
+
+
+ app/controllers/team_members_controller.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/tree_controller_rb.html b/doc/code/files/app/controllers/tree_controller_rb.html
new file mode 100644
index 00000000..1a21f186
--- /dev/null
+++ b/doc/code/files/app/controllers/tree_controller_rb.html
@@ -0,0 +1,85 @@
+
+
+
+
+ tree_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tree_controller.rb
+
+
+ app/controllers/tree_controller.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
Controller for viewing a repository’s file structure
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/controllers/wikis_controller_rb.html b/doc/code/files/app/controllers/wikis_controller_rb.html
new file mode 100644
index 00000000..bbebf05f
--- /dev/null
+++ b/doc/code/files/app/controllers/wikis_controller_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ wikis_controller.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ wikis_controller.rb
+
+
+ app/controllers/wikis_controller.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/decorators/application_decorator_rb.html b/doc/code/files/app/decorators/application_decorator_rb.html
new file mode 100644
index 00000000..5998d46d
--- /dev/null
+++ b/doc/code/files/app/decorators/application_decorator_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ application_decorator.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ application_decorator.rb
+
+
+ app/decorators/application_decorator.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/decorators/commit_decorator_rb.html b/doc/code/files/app/decorators/commit_decorator_rb.html
new file mode 100644
index 00000000..ef09e718
--- /dev/null
+++ b/doc/code/files/app/decorators/commit_decorator_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ commit_decorator.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ commit_decorator.rb
+
+
+ app/decorators/commit_decorator.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/decorators/event_decorator_rb.html b/doc/code/files/app/decorators/event_decorator_rb.html
new file mode 100644
index 00000000..156d6008
--- /dev/null
+++ b/doc/code/files/app/decorators/event_decorator_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ event_decorator.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ event_decorator.rb
+
+
+ app/decorators/event_decorator.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/decorators/tree_decorator_rb.html b/doc/code/files/app/decorators/tree_decorator_rb.html
new file mode 100644
index 00000000..0ca1f9ee
--- /dev/null
+++ b/doc/code/files/app/decorators/tree_decorator_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ tree_decorator.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tree_decorator.rb
+
+
+ app/decorators/tree_decorator.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/decorators/user_decorator_rb.html b/doc/code/files/app/decorators/user_decorator_rb.html
new file mode 100644
index 00000000..ab659f66
--- /dev/null
+++ b/doc/code/files/app/decorators/user_decorator_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ user_decorator.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ user_decorator.rb
+
+
+ app/decorators/user_decorator.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/application_helper_rb.html b/doc/code/files/app/helpers/application_helper_rb.html
new file mode 100644
index 00000000..72447215
--- /dev/null
+++ b/doc/code/files/app/helpers/application_helper_rb.html
@@ -0,0 +1,89 @@
+
+
+
+
+ application_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ application_helper.rb
+
+
+ app/helpers/application_helper.rb
+ Last modified: 2012-12-30 13:49:26 +0200
+
+
+
+
+
+
+
+
+
+
+
Required Files
+
+
+ digest/md5
+
+ uri
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/commits_helper_rb.html b/doc/code/files/app/helpers/commits_helper_rb.html
new file mode 100644
index 00000000..4d78fca9
--- /dev/null
+++ b/doc/code/files/app/helpers/commits_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ commits_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ commits_helper.rb
+
+
+ app/helpers/commits_helper.rb
+ Last modified: 2012-12-27 11:32:29 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/dashboard_helper_rb.html b/doc/code/files/app/helpers/dashboard_helper_rb.html
new file mode 100644
index 00000000..31389328
--- /dev/null
+++ b/doc/code/files/app/helpers/dashboard_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ dashboard_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dashboard_helper.rb
+
+
+ app/helpers/dashboard_helper.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/events_helper_rb.html b/doc/code/files/app/helpers/events_helper_rb.html
new file mode 100644
index 00000000..63903ce0
--- /dev/null
+++ b/doc/code/files/app/helpers/events_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ events_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ events_helper.rb
+
+
+ app/helpers/events_helper.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/gitlab_markdown_helper_rb.html b/doc/code/files/app/helpers/gitlab_markdown_helper_rb.html
new file mode 100644
index 00000000..9aada0e7
--- /dev/null
+++ b/doc/code/files/app/helpers/gitlab_markdown_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ gitlab_markdown_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gitlab_markdown_helper.rb
+
+
+ app/helpers/gitlab_markdown_helper.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/issues_helper_rb.html b/doc/code/files/app/helpers/issues_helper_rb.html
new file mode 100644
index 00000000..1e107ebf
--- /dev/null
+++ b/doc/code/files/app/helpers/issues_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ issues_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issues_helper.rb
+
+
+ app/helpers/issues_helper.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/merge_requests_helper_rb.html b/doc/code/files/app/helpers/merge_requests_helper_rb.html
new file mode 100644
index 00000000..556caad9
--- /dev/null
+++ b/doc/code/files/app/helpers/merge_requests_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ merge_requests_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ merge_requests_helper.rb
+
+
+ app/helpers/merge_requests_helper.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/namespaces_helper_rb.html b/doc/code/files/app/helpers/namespaces_helper_rb.html
new file mode 100644
index 00000000..2fb5aa1d
--- /dev/null
+++ b/doc/code/files/app/helpers/namespaces_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ namespaces_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ namespaces_helper.rb
+
+
+ app/helpers/namespaces_helper.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/notes_helper_rb.html b/doc/code/files/app/helpers/notes_helper_rb.html
new file mode 100644
index 00000000..a21a80fe
--- /dev/null
+++ b/doc/code/files/app/helpers/notes_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ notes_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ notes_helper.rb
+
+
+ app/helpers/notes_helper.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/profile_helper_rb.html b/doc/code/files/app/helpers/profile_helper_rb.html
new file mode 100644
index 00000000..d87776b9
--- /dev/null
+++ b/doc/code/files/app/helpers/profile_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ profile_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ profile_helper.rb
+
+
+ app/helpers/profile_helper.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/projects_helper_rb.html b/doc/code/files/app/helpers/projects_helper_rb.html
new file mode 100644
index 00000000..c388a481
--- /dev/null
+++ b/doc/code/files/app/helpers/projects_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ projects_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ projects_helper.rb
+
+
+ app/helpers/projects_helper.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/snippets_helper_rb.html b/doc/code/files/app/helpers/snippets_helper_rb.html
new file mode 100644
index 00000000..697e590e
--- /dev/null
+++ b/doc/code/files/app/helpers/snippets_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ snippets_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ snippets_helper.rb
+
+
+ app/helpers/snippets_helper.rb
+ Last modified: 2011-12-02 02:40:22 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/tab_helper_rb.html b/doc/code/files/app/helpers/tab_helper_rb.html
new file mode 100644
index 00000000..5bb3d629
--- /dev/null
+++ b/doc/code/files/app/helpers/tab_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ tab_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tab_helper.rb
+
+
+ app/helpers/tab_helper.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/tags_helper_rb.html b/doc/code/files/app/helpers/tags_helper_rb.html
new file mode 100644
index 00000000..074e404c
--- /dev/null
+++ b/doc/code/files/app/helpers/tags_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ tags_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tags_helper.rb
+
+
+ app/helpers/tags_helper.rb
+ Last modified: 2011-12-02 02:40:22 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/helpers/tree_helper_rb.html b/doc/code/files/app/helpers/tree_helper_rb.html
new file mode 100644
index 00000000..2d7bac33
--- /dev/null
+++ b/doc/code/files/app/helpers/tree_helper_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ tree_helper.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tree_helper.rb
+
+
+ app/helpers/tree_helper.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/mailers/notify_rb.html b/doc/code/files/app/mailers/notify_rb.html
new file mode 100644
index 00000000..86e17f0f
--- /dev/null
+++ b/doc/code/files/app/mailers/notify_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ notify.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ notify.rb
+
+
+ app/mailers/notify.rb
+ Last modified: 2012-12-30 12:06:28 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/ability_rb.html b/doc/code/files/app/models/ability_rb.html
new file mode 100644
index 00000000..cf22c56a
--- /dev/null
+++ b/doc/code/files/app/models/ability_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ ability.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ability.rb
+
+
+ app/models/ability.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/commit_rb.html b/doc/code/files/app/models/commit_rb.html
new file mode 100644
index 00000000..f48c8a6c
--- /dev/null
+++ b/doc/code/files/app/models/commit_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ commit.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ commit.rb
+
+
+ app/models/commit.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/event_rb.html b/doc/code/files/app/models/event_rb.html
new file mode 100644
index 00000000..0409518c
--- /dev/null
+++ b/doc/code/files/app/models/event_rb.html
@@ -0,0 +1,98 @@
+
+
+
+
+ event.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ event.rb
+
+
+ app/models/event.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: events
+
+
id :integer not null, primary key
+target_type :string(255)
+target_id :integer
+title :string(255)
+data :text
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+action :integer
+author_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+ CLASS
+ Event
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/gitlab_ci_service_rb.html b/doc/code/files/app/models/gitlab_ci_service_rb.html
new file mode 100644
index 00000000..69849529
--- /dev/null
+++ b/doc/code/files/app/models/gitlab_ci_service_rb.html
@@ -0,0 +1,97 @@
+
+
+
+
+ gitlab_ci_service.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gitlab_ci_service.rb
+
+
+ app/models/gitlab_ci_service.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: services
+
+
id :integer not null, primary key
+type :string(255)
+title :string(255)
+token :string(255)
+project_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+active :boolean default(FALSE), not null
+project_url :string(255)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/group_rb.html b/doc/code/files/app/models/group_rb.html
new file mode 100644
index 00000000..9606ee7b
--- /dev/null
+++ b/doc/code/files/app/models/group_rb.html
@@ -0,0 +1,95 @@
+
+
+
+
+ group.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ group.rb
+
+
+ app/models/group.rb
+ Last modified: 2012-12-30 14:25:46 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: namespaces
+
+
id :integer not null, primary key
+name :string(255) not null
+path :string(255) not null
+owner_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+ CLASS
+ Group
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/issue_rb.html b/doc/code/files/app/models/issue_rb.html
new file mode 100644
index 00000000..1cf1727c
--- /dev/null
+++ b/doc/code/files/app/models/issue_rb.html
@@ -0,0 +1,100 @@
+
+
+
+
+ issue.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue.rb
+
+
+ app/models/issue.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: issues
+
+
id :integer not null, primary key
+title :string(255)
+assignee_id :integer
+author_id :integer
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+closed :boolean default(FALSE), not null
+position :integer default(0)
+branch_name :string(255)
+description :text
+milestone_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+ CLASS
+ Issue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/key_rb.html b/doc/code/files/app/models/key_rb.html
new file mode 100644
index 00000000..8b703afe
--- /dev/null
+++ b/doc/code/files/app/models/key_rb.html
@@ -0,0 +1,104 @@
+
+
+
+
+ key.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ key.rb
+
+
+ app/models/key.rb
+ Last modified: 2012-12-27 12:10:59 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: keys
+
+
id :integer not null, primary key
+user_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+key :text
+title :string(255)
+identifier :string(255)
+project_id :integer
+
+
+
+
+
+
+
+
Required Files
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/merge_request_rb.html b/doc/code/files/app/models/merge_request_rb.html
new file mode 100644
index 00000000..11fbed2e
--- /dev/null
+++ b/doc/code/files/app/models/merge_request_rb.html
@@ -0,0 +1,103 @@
+
+
+
+
+ merge_request.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ merge_request.rb
+
+
+ app/models/merge_request.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: merge_requests
+
+
id :integer not null, primary key
+target_branch :string(255) not null
+source_branch :string(255) not null
+project_id :integer not null
+author_id :integer
+assignee_id :integer
+title :string(255)
+closed :boolean default(FALSE), not null
+created_at :datetime not null
+updated_at :datetime not null
+st_commits :text(2147483647)
+st_diffs :text(2147483647)
+merged :boolean default(FALSE), not null
+state :integer default(1), not null
+milestone_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/milestone_rb.html b/doc/code/files/app/models/milestone_rb.html
new file mode 100644
index 00000000..38ec8298
--- /dev/null
+++ b/doc/code/files/app/models/milestone_rb.html
@@ -0,0 +1,96 @@
+
+
+
+
+ milestone.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ milestone.rb
+
+
+ app/models/milestone.rb
+ Last modified: 2012-12-27 11:32:29 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: milestones
+
+
id :integer not null, primary key
+title :string(255) not null
+project_id :integer not null
+description :text
+due_date :date
+closed :boolean default(FALSE), not null
+created_at :datetime not null
+updated_at :datetime not null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/namespace_rb.html b/doc/code/files/app/models/namespace_rb.html
new file mode 100644
index 00000000..d0e97db6
--- /dev/null
+++ b/doc/code/files/app/models/namespace_rb.html
@@ -0,0 +1,95 @@
+
+
+
+
+ namespace.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ namespace.rb
+
+
+ app/models/namespace.rb
+ Last modified: 2012-12-30 12:06:28 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: namespaces
+
+
id :integer not null, primary key
+name :string(255) not null
+path :string(255) not null
+owner_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/note_rb.html b/doc/code/files/app/models/note_rb.html
new file mode 100644
index 00000000..6c7a6e21
--- /dev/null
+++ b/doc/code/files/app/models/note_rb.html
@@ -0,0 +1,108 @@
+
+
+
+
+ note.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ note.rb
+
+
+ app/models/note.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: notes
+
+
id :integer not null, primary key
+note :text
+noteable_id :string(255)
+noteable_type :string(255)
+author_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+project_id :integer
+attachment :string(255)
+line_code :string(255)
+
+
+
+
+
+
+
+
Required Files
+
+
+ carrierwave/orm/activerecord
+
+ file_size_validator
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/project_hook_rb.html b/doc/code/files/app/models/project_hook_rb.html
new file mode 100644
index 00000000..8756e2a3
--- /dev/null
+++ b/doc/code/files/app/models/project_hook_rb.html
@@ -0,0 +1,95 @@
+
+
+
+
+ project_hook.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project_hook.rb
+
+
+ app/models/project_hook.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: web_hooks
+
+
id :integer not null, primary key
+url :string(255)
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255) default("ProjectHook")
+service_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/project_rb.html b/doc/code/files/app/models/project_rb.html
new file mode 100644
index 00000000..739bb5c7
--- /dev/null
+++ b/doc/code/files/app/models/project_rb.html
@@ -0,0 +1,115 @@
+
+
+
+
+ project.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project.rb
+
+
+ app/models/project.rb
+ Last modified: 2012-12-28 09:30:09 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: projects
+
+
id :integer not null, primary key
+name :string(255)
+path :string(255)
+description :text
+created_at :datetime not null
+updated_at :datetime not null
+private_flag :boolean default(TRUE), not null
+owner_id :integer
+default_branch :string(255)
+issues_enabled :boolean default(TRUE), not null
+wall_enabled :boolean default(TRUE), not null
+merge_requests_enabled :boolean default(TRUE), not null
+wiki_enabled :boolean default(TRUE), not null
+namespace_id :integer
+
+
+
+
+
+
+
+
Required Files
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/protected_branch_rb.html b/doc/code/files/app/models/protected_branch_rb.html
new file mode 100644
index 00000000..496b4d21
--- /dev/null
+++ b/doc/code/files/app/models/protected_branch_rb.html
@@ -0,0 +1,93 @@
+
+
+
+
+ protected_branch.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ protected_branch.rb
+
+
+ app/models/protected_branch.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: protected_branches
+
+
id :integer not null, primary key
+project_id :integer not null
+name :string(255) not null
+created_at :datetime not null
+updated_at :datetime not null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/service_hook_rb.html b/doc/code/files/app/models/service_hook_rb.html
new file mode 100644
index 00000000..7fa375a2
--- /dev/null
+++ b/doc/code/files/app/models/service_hook_rb.html
@@ -0,0 +1,95 @@
+
+
+
+
+ service_hook.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ service_hook.rb
+
+
+ app/models/service_hook.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: web_hooks
+
+
id :integer not null, primary key
+url :string(255)
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255) default("ProjectHook")
+service_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/service_rb.html b/doc/code/files/app/models/service_rb.html
new file mode 100644
index 00000000..47b0f7fc
--- /dev/null
+++ b/doc/code/files/app/models/service_rb.html
@@ -0,0 +1,97 @@
+
+
+
+
+ service.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ service.rb
+
+
+ app/models/service.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: services
+
+
id :integer not null, primary key
+type :string(255)
+title :string(255)
+token :string(255)
+project_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+active :boolean default(FALSE), not null
+project_url :string(255)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/snippet_rb.html b/doc/code/files/app/models/snippet_rb.html
new file mode 100644
index 00000000..96016354
--- /dev/null
+++ b/doc/code/files/app/models/snippet_rb.html
@@ -0,0 +1,97 @@
+
+
+
+
+ snippet.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ snippet.rb
+
+
+ app/models/snippet.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: snippets
+
+
id :integer not null, primary key
+title :string(255)
+content :text
+author_id :integer not null
+project_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+file_name :string(255)
+expires_at :datetime
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/system_hook_rb.html b/doc/code/files/app/models/system_hook_rb.html
new file mode 100644
index 00000000..edccffd9
--- /dev/null
+++ b/doc/code/files/app/models/system_hook_rb.html
@@ -0,0 +1,95 @@
+
+
+
+
+ system_hook.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ system_hook.rb
+
+
+ app/models/system_hook.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: web_hooks
+
+
id :integer not null, primary key
+url :string(255)
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255) default("ProjectHook")
+service_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/tree_rb.html b/doc/code/files/app/models/tree_rb.html
new file mode 100644
index 00000000..89ca7611
--- /dev/null
+++ b/doc/code/files/app/models/tree_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ tree.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tree.rb
+
+
+ app/models/tree.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/user_rb.html b/doc/code/files/app/models/user_rb.html
new file mode 100644
index 00000000..18a35e06
--- /dev/null
+++ b/doc/code/files/app/models/user_rb.html
@@ -0,0 +1,117 @@
+
+
+
+
+ user.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ user.rb
+
+
+ app/models/user.rb
+ Last modified: 2012-12-30 13:40:45 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: users
+
+
id :integer not null, primary key
+email :string(255) default(""), not null
+encrypted_password :string(255) default(""), not null
+reset_password_token :string(255)
+reset_password_sent_at :datetime
+remember_created_at :datetime
+sign_in_count :integer default(0)
+current_sign_in_at :datetime
+last_sign_in_at :datetime
+current_sign_in_ip :string(255)
+last_sign_in_ip :string(255)
+created_at :datetime not null
+updated_at :datetime not null
+name :string(255)
+admin :boolean default(FALSE), not null
+projects_limit :integer default(10)
+skype :string(255) default(""), not null
+linkedin :string(255) default(""), not null
+twitter :string(255) default(""), not null
+authentication_token :string(255)
+dark_scheme :boolean default(FALSE), not null
+theme_id :integer default(1), not null
+bio :string(255)
+blocked :boolean default(FALSE), not null
+failed_attempts :integer default(0)
+locked_at :datetime
+extern_uid :string(255)
+provider :string(255)
+username :string(255)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/users_project_rb.html b/doc/code/files/app/models/users_project_rb.html
new file mode 100644
index 00000000..072ae905
--- /dev/null
+++ b/doc/code/files/app/models/users_project_rb.html
@@ -0,0 +1,94 @@
+
+
+
+
+ users_project.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ users_project.rb
+
+
+ app/models/users_project.rb
+ Last modified: 2012-12-30 14:27:12 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: users_projects
+
+
id :integer not null, primary key
+user_id :integer not null
+project_id :integer not null
+created_at :datetime not null
+updated_at :datetime not null
+project_access :integer default(0), not null
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/web_hook_rb.html b/doc/code/files/app/models/web_hook_rb.html
new file mode 100644
index 00000000..0fc97423
--- /dev/null
+++ b/doc/code/files/app/models/web_hook_rb.html
@@ -0,0 +1,95 @@
+
+
+
+
+ web_hook.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ web_hook.rb
+
+
+ app/models/web_hook.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: web_hooks
+
+
id :integer not null, primary key
+url :string(255)
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+type :string(255) default("ProjectHook")
+service_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/models/wiki_rb.html b/doc/code/files/app/models/wiki_rb.html
new file mode 100644
index 00000000..57d5a2a2
--- /dev/null
+++ b/doc/code/files/app/models/wiki_rb.html
@@ -0,0 +1,96 @@
+
+
+
+
+ wiki.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ wiki.rb
+
+
+ app/models/wiki.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
Table name: wikis
+
+
id :integer not null, primary key
+title :string(255)
+content :text
+project_id :integer
+created_at :datetime not null
+updated_at :datetime not null
+slug :string(255)
+user_id :integer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/observers/activity_observer_rb.html b/doc/code/files/app/observers/activity_observer_rb.html
new file mode 100644
index 00000000..2a78e1ab
--- /dev/null
+++ b/doc/code/files/app/observers/activity_observer_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ activity_observer.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ activity_observer.rb
+
+
+ app/observers/activity_observer.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/observers/issue_observer_rb.html b/doc/code/files/app/observers/issue_observer_rb.html
new file mode 100644
index 00000000..7f373bac
--- /dev/null
+++ b/doc/code/files/app/observers/issue_observer_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ issue_observer.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue_observer.rb
+
+
+ app/observers/issue_observer.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/observers/key_observer_rb.html b/doc/code/files/app/observers/key_observer_rb.html
new file mode 100644
index 00000000..9834dfc4
--- /dev/null
+++ b/doc/code/files/app/observers/key_observer_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ key_observer.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ key_observer.rb
+
+
+ app/observers/key_observer.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/observers/merge_request_observer_rb.html b/doc/code/files/app/observers/merge_request_observer_rb.html
new file mode 100644
index 00000000..5b779474
--- /dev/null
+++ b/doc/code/files/app/observers/merge_request_observer_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ merge_request_observer.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ merge_request_observer.rb
+
+
+ app/observers/merge_request_observer.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/observers/note_observer_rb.html b/doc/code/files/app/observers/note_observer_rb.html
new file mode 100644
index 00000000..e5a0e03c
--- /dev/null
+++ b/doc/code/files/app/observers/note_observer_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ note_observer.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ note_observer.rb
+
+
+ app/observers/note_observer.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/observers/project_observer_rb.html b/doc/code/files/app/observers/project_observer_rb.html
new file mode 100644
index 00000000..0a4b2b51
--- /dev/null
+++ b/doc/code/files/app/observers/project_observer_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ project_observer.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project_observer.rb
+
+
+ app/observers/project_observer.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/observers/system_hook_observer_rb.html b/doc/code/files/app/observers/system_hook_observer_rb.html
new file mode 100644
index 00000000..53e351ef
--- /dev/null
+++ b/doc/code/files/app/observers/system_hook_observer_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ system_hook_observer.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ system_hook_observer.rb
+
+
+ app/observers/system_hook_observer.rb
+ Last modified: 2012-07-30 09:40:22 +0300
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/observers/user_observer_rb.html b/doc/code/files/app/observers/user_observer_rb.html
new file mode 100644
index 00000000..d17f2409
--- /dev/null
+++ b/doc/code/files/app/observers/user_observer_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ user_observer.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ user_observer.rb
+
+
+ app/observers/user_observer.rb
+ Last modified: 2012-12-30 12:06:28 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/observers/users_project_observer_rb.html b/doc/code/files/app/observers/users_project_observer_rb.html
new file mode 100644
index 00000000..e427fc5b
--- /dev/null
+++ b/doc/code/files/app/observers/users_project_observer_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ users_project_observer.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ users_project_observer.rb
+
+
+ app/observers/users_project_observer.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/account_rb.html b/doc/code/files/app/roles/account_rb.html
new file mode 100644
index 00000000..9d8821be
--- /dev/null
+++ b/doc/code/files/app/roles/account_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ account.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ account.rb
+
+
+ app/roles/account.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/authority_rb.html b/doc/code/files/app/roles/authority_rb.html
new file mode 100644
index 00000000..d6d0437d
--- /dev/null
+++ b/doc/code/files/app/roles/authority_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ authority.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ authority.rb
+
+
+ app/roles/authority.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/git_host_rb.html b/doc/code/files/app/roles/git_host_rb.html
new file mode 100644
index 00000000..5a878fc0
--- /dev/null
+++ b/doc/code/files/app/roles/git_host_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ git_host.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ git_host.rb
+
+
+ app/roles/git_host.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/issue_commonality_rb.html b/doc/code/files/app/roles/issue_commonality_rb.html
new file mode 100644
index 00000000..bb787914
--- /dev/null
+++ b/doc/code/files/app/roles/issue_commonality_rb.html
@@ -0,0 +1,90 @@
+
+
+
+
+ issue_commonality.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issue_commonality.rb
+
+
+ app/roles/issue_commonality.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
Contains common functionality shared between Issues and MergeRequests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/namespaced_project_rb.html b/doc/code/files/app/roles/namespaced_project_rb.html
new file mode 100644
index 00000000..d15014b9
--- /dev/null
+++ b/doc/code/files/app/roles/namespaced_project_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ namespaced_project.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ namespaced_project.rb
+
+
+ app/roles/namespaced_project.rb
+ Last modified: 2012-12-26 10:56:36 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/note_event_rb.html b/doc/code/files/app/roles/note_event_rb.html
new file mode 100644
index 00000000..a32a7c94
--- /dev/null
+++ b/doc/code/files/app/roles/note_event_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ note_event.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ note_event.rb
+
+
+ app/roles/note_event.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/push_event_rb.html b/doc/code/files/app/roles/push_event_rb.html
new file mode 100644
index 00000000..6b0d320d
--- /dev/null
+++ b/doc/code/files/app/roles/push_event_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ push_event.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ push_event.rb
+
+
+ app/roles/push_event.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/push_observer_rb.html b/doc/code/files/app/roles/push_observer_rb.html
new file mode 100644
index 00000000..62203df1
--- /dev/null
+++ b/doc/code/files/app/roles/push_observer_rb.html
@@ -0,0 +1,88 @@
+
+
+
+
+ push_observer.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ push_observer.rb
+
+
+ app/roles/push_observer.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
Includes methods for handling Git Push events
+
+
Triggered by PostReceive
+job
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/repository_rb.html b/doc/code/files/app/roles/repository_rb.html
new file mode 100644
index 00000000..f9a847d6
--- /dev/null
+++ b/doc/code/files/app/roles/repository_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ repository.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ repository.rb
+
+
+ app/roles/repository.rb
+ Last modified: 2012-12-30 12:24:50 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/static_model_rb.html b/doc/code/files/app/roles/static_model_rb.html
new file mode 100644
index 00000000..c2355819
--- /dev/null
+++ b/doc/code/files/app/roles/static_model_rb.html
@@ -0,0 +1,91 @@
+
+
+
+
+ static_model.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ static_model.rb
+
+
+ app/roles/static_model.rb
+ Last modified: 2012-10-29 21:44:39 +0200
+
+
+
+
+
+
+
+
+
Provides an ActiveRecord-like interface to a model whose data is not
+persisted to a database.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/team_rb.html b/doc/code/files/app/roles/team_rb.html
new file mode 100644
index 00000000..5517f98d
--- /dev/null
+++ b/doc/code/files/app/roles/team_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ team.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ team.rb
+
+
+ app/roles/team.rb
+ Last modified: 2012-12-30 14:26:37 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+ MODULE
+ Team
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/roles/votes_rb.html b/doc/code/files/app/roles/votes_rb.html
new file mode 100644
index 00000000..a11bf506
--- /dev/null
+++ b/doc/code/files/app/roles/votes_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ votes.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ votes.rb
+
+
+ app/roles/votes.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+ MODULE
+ Votes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/uploaders/attachment_uploader_rb.html b/doc/code/files/app/uploaders/attachment_uploader_rb.html
new file mode 100644
index 00000000..27680fa1
--- /dev/null
+++ b/doc/code/files/app/uploaders/attachment_uploader_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ attachment_uploader.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ attachment_uploader.rb
+
+
+ app/uploaders/attachment_uploader.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/workers/post_receive_rb.html b/doc/code/files/app/workers/post_receive_rb.html
new file mode 100644
index 00000000..fd4e73bf
--- /dev/null
+++ b/doc/code/files/app/workers/post_receive_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ post_receive.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ post_receive.rb
+
+
+ app/workers/post_receive.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/app/workers/system_hook_worker_rb.html b/doc/code/files/app/workers/system_hook_worker_rb.html
new file mode 100644
index 00000000..e62abde0
--- /dev/null
+++ b/doc/code/files/app/workers/system_hook_worker_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ system_hook_worker.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ system_hook_worker.rb
+
+
+ app/workers/system_hook_worker.rb
+ Last modified: 2012-07-30 09:40:23 +0300
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/application_rb.html b/doc/code/files/config/application_rb.html
new file mode 100644
index 00000000..385b7b2f
--- /dev/null
+++ b/doc/code/files/config/application_rb.html
@@ -0,0 +1,92 @@
+
+
+
+
+ application.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ application.rb
+
+
+ config/application.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
Required Files
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/boot_rb.html b/doc/code/files/config/boot_rb.html
new file mode 100644
index 00000000..94a4a723
--- /dev/null
+++ b/doc/code/files/config/boot_rb.html
@@ -0,0 +1,78 @@
+
+
+
+
+ boot.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ boot.rb
+
+
+ config/boot.rb
+ Last modified: 2012-04-04 02:04:00 +0300
+
+
+
+
+
+
+
+
+
+
+
Required Files
+
+
+ rubygems
+
+ bundler/setup
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/environment_rb.html b/doc/code/files/config/environment_rb.html
new file mode 100644
index 00000000..2085b87a
--- /dev/null
+++ b/doc/code/files/config/environment_rb.html
@@ -0,0 +1,74 @@
+
+
+
+
+ environment.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ environment.rb
+
+
+ config/environment.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
Load the rails application
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/environments/development_rb.html b/doc/code/files/config/environments/development_rb.html
new file mode 100644
index 00000000..392c8250
--- /dev/null
+++ b/doc/code/files/config/environments/development_rb.html
@@ -0,0 +1,68 @@
+
+
+
+
+ development.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ development.rb
+
+
+ config/environments/development.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/environments/production_rb.html b/doc/code/files/config/environments/production_rb.html
new file mode 100644
index 00000000..6911c723
--- /dev/null
+++ b/doc/code/files/config/environments/production_rb.html
@@ -0,0 +1,68 @@
+
+
+
+
+ production.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ production.rb
+
+
+ config/environments/production.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/environments/test_rb.html b/doc/code/files/config/environments/test_rb.html
new file mode 100644
index 00000000..cfd57933
--- /dev/null
+++ b/doc/code/files/config/environments/test_rb.html
@@ -0,0 +1,68 @@
+
+
+
+
+ test.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ test.rb
+
+
+ config/environments/test.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/1_settings_rb.html b/doc/code/files/config/initializers/1_settings_rb.html
new file mode 100644
index 00000000..3e007ff6
--- /dev/null
+++ b/doc/code/files/config/initializers/1_settings_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ 1_settings.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1_settings.rb
+
+
+ config/initializers/1_settings.rb
+ Last modified: 2012-12-30 12:06:28 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/2_app_rb.html b/doc/code/files/config/initializers/2_app_rb.html
new file mode 100644
index 00000000..de791415
--- /dev/null
+++ b/doc/code/files/config/initializers/2_app_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ 2_app.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2_app.rb
+
+
+ config/initializers/2_app.rb
+ Last modified: 2012-07-30 09:40:23 +0300
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/3_grit_ext_rb.html b/doc/code/files/config/initializers/3_grit_ext_rb.html
new file mode 100644
index 00000000..6b42df4c
--- /dev/null
+++ b/doc/code/files/config/initializers/3_grit_ext_rb.html
@@ -0,0 +1,78 @@
+
+
+
+
+ 3_grit_ext.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3_grit_ext.rb
+
+
+ config/initializers/3_grit_ext.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
Required Files
+
+
+ grit
+
+ pygments
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/4_resque_rb.html b/doc/code/files/config/initializers/4_resque_rb.html
new file mode 100644
index 00000000..a96dd91f
--- /dev/null
+++ b/doc/code/files/config/initializers/4_resque_rb.html
@@ -0,0 +1,93 @@
+
+
+
+
+ 4_resque.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4_resque.rb
+
+
+ config/initializers/4_resque.rb
+ Last modified: 2012-12-27 11:32:29 +0200
+
+
+
+
+
+
+
+
+
Custom Redis configuration
+
+
+
+
+
+
+
+
Required Files
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/5_backend_rb.html b/doc/code/files/config/initializers/5_backend_rb.html
new file mode 100644
index 00000000..caaaf0db
--- /dev/null
+++ b/doc/code/files/config/initializers/5_backend_rb.html
@@ -0,0 +1,74 @@
+
+
+
+
+ 5_backend.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5_backend.rb
+
+
+ config/initializers/5_backend.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/backtrace_silencers_rb.html b/doc/code/files/config/initializers/backtrace_silencers_rb.html
new file mode 100644
index 00000000..65215d38
--- /dev/null
+++ b/doc/code/files/config/initializers/backtrace_silencers_rb.html
@@ -0,0 +1,74 @@
+
+
+
+
+ backtrace_silencers.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ backtrace_silencers.rb
+
+
+ config/initializers/backtrace_silencers.rb
+ Last modified: 2011-12-02 02:40:22 +0200
+
+
+
+
+
+
+
+
+
Be sure to restart your server when you modify this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/carrierwave_rb.html b/doc/code/files/config/initializers/carrierwave_rb.html
new file mode 100644
index 00000000..88aa2eec
--- /dev/null
+++ b/doc/code/files/config/initializers/carrierwave_rb.html
@@ -0,0 +1,68 @@
+
+
+
+
+ carrierwave.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ carrierwave.rb
+
+
+ config/initializers/carrierwave.rb
+ Last modified: 2012-02-29 23:28:39 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/connection_fix_rb.html b/doc/code/files/config/initializers/connection_fix_rb.html
new file mode 100644
index 00000000..936db6d6
--- /dev/null
+++ b/doc/code/files/config/initializers/connection_fix_rb.html
@@ -0,0 +1,103 @@
+
+
+
+
+ connection_fix.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ connection_fix.rb
+
+
+ config/initializers/connection_fix.rb
+ Last modified: 2012-07-02 23:07:19 +0300
+
+
+
+
+
+
+
+
+
from gist.github.com/238999
+
+
If your workers are inactive for a long period of time, they’ll lose their
+MySQL connection.
+
+
This hack ensures we re-connect whenever a connection is lost. Because,
+really. why not?
+
+
Stick this in RAILS_ROOT/config/initializers/connection_fix.rb (or
+somewhere similar)
+
+
From:
+
+
http://coderrr.wordpress.com/2009/01/08/activerecord-threading-issues-and-resolutions/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/devise_rb.html b/doc/code/files/config/initializers/devise_rb.html
new file mode 100644
index 00000000..596c954e
--- /dev/null
+++ b/doc/code/files/config/initializers/devise_rb.html
@@ -0,0 +1,83 @@
+
+
+
+
+ devise.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ devise.rb
+
+
+ config/initializers/devise.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
Use this hook to configure devise mailer, warden hooks and so forth. The
+first four configuration values can also be set straight in your models.
+
+
+
+
+
+
+
+
Required Files
+
+
+ devise/orm/active_record
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/gemoji_rb.html b/doc/code/files/config/initializers/gemoji_rb.html
new file mode 100644
index 00000000..0a015fb7
--- /dev/null
+++ b/doc/code/files/config/initializers/gemoji_rb.html
@@ -0,0 +1,75 @@
+
+
+
+
+ gemoji.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gemoji.rb
+
+
+ config/initializers/gemoji.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/inflections_rb.html b/doc/code/files/config/initializers/inflections_rb.html
new file mode 100644
index 00000000..7e3e29a5
--- /dev/null
+++ b/doc/code/files/config/initializers/inflections_rb.html
@@ -0,0 +1,74 @@
+
+
+
+
+ inflections.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ inflections.rb
+
+
+ config/initializers/inflections.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
Be sure to restart your server when you modify this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/kaminari_config_rb.html b/doc/code/files/config/initializers/kaminari_config_rb.html
new file mode 100644
index 00000000..6160d25e
--- /dev/null
+++ b/doc/code/files/config/initializers/kaminari_config_rb.html
@@ -0,0 +1,68 @@
+
+
+
+
+ kaminari_config.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ kaminari_config.rb
+
+
+ config/initializers/kaminari_config.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/mime_types_rb.html b/doc/code/files/config/initializers/mime_types_rb.html
new file mode 100644
index 00000000..5853380f
--- /dev/null
+++ b/doc/code/files/config/initializers/mime_types_rb.html
@@ -0,0 +1,74 @@
+
+
+
+
+ mime_types.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ mime_types.rb
+
+
+ config/initializers/mime_types.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
Be sure to restart your server when you modify this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/passenger_fix_rb.html b/doc/code/files/config/initializers/passenger_fix_rb.html
new file mode 100644
index 00000000..de812d93
--- /dev/null
+++ b/doc/code/files/config/initializers/passenger_fix_rb.html
@@ -0,0 +1,68 @@
+
+
+
+
+ passenger_fix.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ passenger_fix.rb
+
+
+ config/initializers/passenger_fix.rb
+ Last modified: 2012-12-27 12:08:52 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/postgresql_limit_fix_rb.html b/doc/code/files/config/initializers/postgresql_limit_fix_rb.html
new file mode 100644
index 00000000..e205ecf0
--- /dev/null
+++ b/doc/code/files/config/initializers/postgresql_limit_fix_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ postgresql_limit_fix.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ postgresql_limit_fix.rb
+
+
+ config/initializers/postgresql_limit_fix.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/secret_token_rb.html b/doc/code/files/config/initializers/secret_token_rb.html
new file mode 100644
index 00000000..8e4ed070
--- /dev/null
+++ b/doc/code/files/config/initializers/secret_token_rb.html
@@ -0,0 +1,74 @@
+
+
+
+
+ secret_token.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ secret_token.rb
+
+
+ config/initializers/secret_token.rb
+ Last modified: 2011-12-02 02:40:22 +0200
+
+
+
+
+
+
+
+
+
Be sure to restart your server when you modify this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/session_store_rb.html b/doc/code/files/config/initializers/session_store_rb.html
new file mode 100644
index 00000000..7105222d
--- /dev/null
+++ b/doc/code/files/config/initializers/session_store_rb.html
@@ -0,0 +1,74 @@
+
+
+
+
+ session_store.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ session_store.rb
+
+
+ config/initializers/session_store.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
Be sure to restart your server when you modify this file.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/initializers/wrap_parameters_rb.html b/doc/code/files/config/initializers/wrap_parameters_rb.html
new file mode 100644
index 00000000..704f6f02
--- /dev/null
+++ b/doc/code/files/config/initializers/wrap_parameters_rb.html
@@ -0,0 +1,77 @@
+
+
+
+
+ wrap_parameters.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ wrap_parameters.rb
+
+
+ config/initializers/wrap_parameters.rb
+ Last modified: 2011-12-02 02:40:22 +0200
+
+
+
+
+
+
+
+
+
Be sure to restart your server when you modify this file.
+
+
This file contains settings for ActionController::ParamsWrapper which is
+enabled by default.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/routes_rb.html b/doc/code/files/config/routes_rb.html
new file mode 100644
index 00000000..df59e4d7
--- /dev/null
+++ b/doc/code/files/config/routes_rb.html
@@ -0,0 +1,78 @@
+
+
+
+
+ routes.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ routes.rb
+
+
+ config/routes.rb
+ Last modified: 2012-12-30 12:06:28 +0200
+
+
+
+
+
+
+
+
+
+
+
Required Files
+
+
+ api
+
+ resque/server
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/config/unicorn_rb.html b/doc/code/files/config/unicorn_rb.html
new file mode 100644
index 00000000..14da5f0e
--- /dev/null
+++ b/doc/code/files/config/unicorn_rb.html
@@ -0,0 +1,68 @@
+
+
+
+
+ unicorn.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ unicorn.rb
+
+
+ config/unicorn.rb
+ Last modified: 2012-03-31 15:35:21 +0300
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/api/entities_rb.html b/doc/code/files/lib/api/entities_rb.html
new file mode 100644
index 00000000..da20f2d3
--- /dev/null
+++ b/doc/code/files/lib/api/entities_rb.html
@@ -0,0 +1,159 @@
+
+
+
+
+ entities.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ entities.rb
+
+
+ lib/api/entities.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/api/helpers_rb.html b/doc/code/files/lib/api/helpers_rb.html
new file mode 100644
index 00000000..e8d05b92
--- /dev/null
+++ b/doc/code/files/lib/api/helpers_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ helpers.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ helpers.rb
+
+
+ lib/api/helpers.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/api/issues_rb.html b/doc/code/files/lib/api/issues_rb.html
new file mode 100644
index 00000000..5aac1d3f
--- /dev/null
+++ b/doc/code/files/lib/api/issues_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ issues.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ issues.rb
+
+
+ lib/api/issues.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/api/merge_requests_rb.html b/doc/code/files/lib/api/merge_requests_rb.html
new file mode 100644
index 00000000..3fdcf008
--- /dev/null
+++ b/doc/code/files/lib/api/merge_requests_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ merge_requests.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ merge_requests.rb
+
+
+ lib/api/merge_requests.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/api/milestones_rb.html b/doc/code/files/lib/api/milestones_rb.html
new file mode 100644
index 00000000..a37be49c
--- /dev/null
+++ b/doc/code/files/lib/api/milestones_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ milestones.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ milestones.rb
+
+
+ lib/api/milestones.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/api/notes_rb.html b/doc/code/files/lib/api/notes_rb.html
new file mode 100644
index 00000000..3c540290
--- /dev/null
+++ b/doc/code/files/lib/api/notes_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ notes.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ notes.rb
+
+
+ lib/api/notes.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/api/projects_rb.html b/doc/code/files/lib/api/projects_rb.html
new file mode 100644
index 00000000..70af8a34
--- /dev/null
+++ b/doc/code/files/lib/api/projects_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ projects.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ projects.rb
+
+
+ lib/api/projects.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/api/session_rb.html b/doc/code/files/lib/api/session_rb.html
new file mode 100644
index 00000000..8faa1a53
--- /dev/null
+++ b/doc/code/files/lib/api/session_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ session.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ session.rb
+
+
+ lib/api/session.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/api/users_rb.html b/doc/code/files/lib/api/users_rb.html
new file mode 100644
index 00000000..7bf16c73
--- /dev/null
+++ b/doc/code/files/lib/api/users_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ users.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ users.rb
+
+
+ lib/api/users.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/api_rb.html b/doc/code/files/lib/api_rb.html
new file mode 100644
index 00000000..48b1b65c
--- /dev/null
+++ b/doc/code/files/lib/api_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ api.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ api.rb
+
+
+ lib/api.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/event_filter_rb.html b/doc/code/files/lib/event_filter_rb.html
new file mode 100644
index 00000000..7f54400a
--- /dev/null
+++ b/doc/code/files/lib/event_filter_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ event_filter.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ event_filter.rb
+
+
+ lib/event_filter.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/extracts_path_rb.html b/doc/code/files/lib/extracts_path_rb.html
new file mode 100644
index 00000000..11a0dd2d
--- /dev/null
+++ b/doc/code/files/lib/extracts_path_rb.html
@@ -0,0 +1,91 @@
+
+
+
+
+ extracts_path.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ extracts_path.rb
+
+
+ lib/extracts_path.rb
+ Last modified: 2012-12-27 11:32:29 +0200
+
+
+
+
+
+
+
+
+
Module providing methods for dealing with separating a tree-ish string and
+a file path string when combined in a request parameter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/file_size_validator_rb.html b/doc/code/files/lib/file_size_validator_rb.html
new file mode 100644
index 00000000..985c23a5
--- /dev/null
+++ b/doc/code/files/lib/file_size_validator_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ file_size_validator.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ file_size_validator.rb
+
+
+ lib/file_size_validator.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/app_logger_rb.html b/doc/code/files/lib/gitlab/app_logger_rb.html
new file mode 100644
index 00000000..c53c4e86
--- /dev/null
+++ b/doc/code/files/lib/gitlab/app_logger_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ app_logger.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ app_logger.rb
+
+
+ lib/gitlab/app_logger.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/auth_rb.html b/doc/code/files/lib/gitlab/auth_rb.html
new file mode 100644
index 00000000..651a1268
--- /dev/null
+++ b/doc/code/files/lib/gitlab/auth_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ auth.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ auth.rb
+
+
+ lib/gitlab/auth.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/backend/gitolite_config_rb.html b/doc/code/files/lib/gitlab/backend/gitolite_config_rb.html
new file mode 100644
index 00000000..b66613c3
--- /dev/null
+++ b/doc/code/files/lib/gitlab/backend/gitolite_config_rb.html
@@ -0,0 +1,106 @@
+
+
+
+
+ gitolite_config.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gitolite_config.rb
+
+
+ lib/gitlab/backend/gitolite_config.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
Required Files
+
+
+ gitolite
+
+ timeout
+
+ fileutils
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/backend/gitolite_rb.html b/doc/code/files/lib/gitlab/backend/gitolite_rb.html
new file mode 100644
index 00000000..d1743456
--- /dev/null
+++ b/doc/code/files/lib/gitlab/backend/gitolite_rb.html
@@ -0,0 +1,89 @@
+
+
+
+
+ gitolite.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gitolite.rb
+
+
+ lib/gitlab/backend/gitolite.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/backend/grack_auth_rb.html b/doc/code/files/lib/gitlab/backend/grack_auth_rb.html
new file mode 100644
index 00000000..db7541dd
--- /dev/null
+++ b/doc/code/files/lib/gitlab/backend/grack_auth_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ grack_auth.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ grack_auth.rb
+
+
+ lib/gitlab/backend/grack_auth.rb
+ Last modified: 2012-12-30 12:06:28 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/git_logger_rb.html b/doc/code/files/lib/gitlab/git_logger_rb.html
new file mode 100644
index 00000000..0e8e013f
--- /dev/null
+++ b/doc/code/files/lib/gitlab/git_logger_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ git_logger.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ git_logger.rb
+
+
+ lib/gitlab/git_logger.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/git_stats_rb.html b/doc/code/files/lib/gitlab/git_stats_rb.html
new file mode 100644
index 00000000..405a2c75
--- /dev/null
+++ b/doc/code/files/lib/gitlab/git_stats_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ git_stats.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ git_stats.rb
+
+
+ lib/gitlab/git_stats.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/graph/commit_rb.html b/doc/code/files/lib/gitlab/graph/commit_rb.html
new file mode 100644
index 00000000..1df6b794
--- /dev/null
+++ b/doc/code/files/lib/gitlab/graph/commit_rb.html
@@ -0,0 +1,97 @@
+
+
+
+
+ commit.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ commit.rb
+
+
+ lib/gitlab/graph/commit.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
Required Files
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/graph/json_builder_rb.html b/doc/code/files/lib/gitlab/graph/json_builder_rb.html
new file mode 100644
index 00000000..848bb0a1
--- /dev/null
+++ b/doc/code/files/lib/gitlab/graph/json_builder_rb.html
@@ -0,0 +1,97 @@
+
+
+
+
+ json_builder.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ json_builder.rb
+
+
+ lib/gitlab/graph/json_builder.rb
+ Last modified: 2012-12-27 11:32:29 +0200
+
+
+
+
+
+
+
+
+
+
+
Required Files
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/inline_diff_rb.html b/doc/code/files/lib/gitlab/inline_diff_rb.html
new file mode 100644
index 00000000..708dcefc
--- /dev/null
+++ b/doc/code/files/lib/gitlab/inline_diff_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ inline_diff.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ inline_diff.rb
+
+
+ lib/gitlab/inline_diff.rb
+ Last modified: 2012-10-29 21:33:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/logger_rb.html b/doc/code/files/lib/gitlab/logger_rb.html
new file mode 100644
index 00000000..8924ca8a
--- /dev/null
+++ b/doc/code/files/lib/gitlab/logger_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ logger.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ logger.rb
+
+
+ lib/gitlab/logger.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/markdown_rb.html b/doc/code/files/lib/gitlab/markdown_rb.html
new file mode 100644
index 00000000..bd5f5e2e
--- /dev/null
+++ b/doc/code/files/lib/gitlab/markdown_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ markdown.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ markdown.rb
+
+
+ lib/gitlab/markdown.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/project_mover_rb.html b/doc/code/files/lib/gitlab/project_mover_rb.html
new file mode 100644
index 00000000..6acee13f
--- /dev/null
+++ b/doc/code/files/lib/gitlab/project_mover_rb.html
@@ -0,0 +1,97 @@
+
+
+
+
+ project_mover.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ project_mover.rb
+
+
+ lib/gitlab/project_mover.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
ProjectMover class
+
+
Used for moving project repositories from one subdir to another
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/regex_rb.html b/doc/code/files/lib/gitlab/regex_rb.html
new file mode 100644
index 00000000..dfdab455
--- /dev/null
+++ b/doc/code/files/lib/gitlab/regex_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ regex.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ regex.rb
+
+
+ lib/gitlab/regex.rb
+ Last modified: 2012-12-28 09:30:09 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/satellite/action_rb.html b/doc/code/files/lib/gitlab/satellite/action_rb.html
new file mode 100644
index 00000000..3c1e8448
--- /dev/null
+++ b/doc/code/files/lib/gitlab/satellite/action_rb.html
@@ -0,0 +1,89 @@
+
+
+
+
+ action.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ action.rb
+
+
+ lib/gitlab/satellite/action.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/satellite/edit_file_action_rb.html b/doc/code/files/lib/gitlab/satellite/edit_file_action_rb.html
new file mode 100644
index 00000000..e4a473ec
--- /dev/null
+++ b/doc/code/files/lib/gitlab/satellite/edit_file_action_rb.html
@@ -0,0 +1,89 @@
+
+
+
+
+ edit_file_action.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ edit_file_action.rb
+
+
+ lib/gitlab/satellite/edit_file_action.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/satellite/merge_action_rb.html b/doc/code/files/lib/gitlab/satellite/merge_action_rb.html
new file mode 100644
index 00000000..6bbc8483
--- /dev/null
+++ b/doc/code/files/lib/gitlab/satellite/merge_action_rb.html
@@ -0,0 +1,89 @@
+
+
+
+
+ merge_action.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ merge_action.rb
+
+
+ lib/gitlab/satellite/merge_action.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/satellite/satellite_rb.html b/doc/code/files/lib/gitlab/satellite/satellite_rb.html
new file mode 100644
index 00000000..54c513f7
--- /dev/null
+++ b/doc/code/files/lib/gitlab/satellite/satellite_rb.html
@@ -0,0 +1,89 @@
+
+
+
+
+ satellite.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ satellite.rb
+
+
+ lib/gitlab/satellite/satellite.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/seeder_rb.html b/doc/code/files/lib/gitlab/seeder_rb.html
new file mode 100644
index 00000000..f02fde65
--- /dev/null
+++ b/doc/code/files/lib/gitlab/seeder_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ seeder.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ seeder.rb
+
+
+ lib/gitlab/seeder.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/gitlab/theme_rb.html b/doc/code/files/lib/gitlab/theme_rb.html
new file mode 100644
index 00000000..97dccfd7
--- /dev/null
+++ b/doc/code/files/lib/gitlab/theme_rb.html
@@ -0,0 +1,84 @@
+
+
+
+
+ theme.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ theme.rb
+
+
+ lib/gitlab/theme.rb
+ Last modified: 2012-12-23 12:16:43 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/hooks/post-receive.html b/doc/code/files/lib/hooks/post-receive.html
new file mode 100644
index 00000000..a99c19fa
--- /dev/null
+++ b/doc/code/files/lib/hooks/post-receive.html
@@ -0,0 +1,86 @@
+
+
+
+
+ post-receive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ post-receive
+
+
+ lib/hooks/post-receive
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
#!/usr/bin/env bash
+
+
# This file was placed here by GitLab. It makes sure that your pushed
+commits # will be processed properly.
+
+
while read oldrev newrev ref do
+
+
+repo_path =%xpwd`
+env - i redis - cli rpush "resque:gitlab:queue:post_receive" "{\"class\":\"PostReceive\",\"args\":[\"$repo_path\",\"$oldrev\",\"$newrev\",\"$ref\",\"$GL_USER\"]}" > %rdev/ ull 2 > &1
+
+
+
done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/files/lib/redcarpet/render/gitlab_html_rb.html b/doc/code/files/lib/redcarpet/render/gitlab_html_rb.html
new file mode 100644
index 00000000..33bb541b
--- /dev/null
+++ b/doc/code/files/lib/redcarpet/render/gitlab_html_rb.html
@@ -0,0 +1,79 @@
+
+
+
+
+ gitlab_html.rb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gitlab_html.rb
+
+
+ lib/redcarpet/render/gitlab_html.rb
+ Last modified: 2012-12-23 14:02:47 +0200
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Namespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/code/i/arrows.png b/doc/code/i/arrows.png
new file mode 100755
index 00000000..e54060f4
Binary files /dev/null and b/doc/code/i/arrows.png differ
diff --git a/doc/code/i/results_bg.png b/doc/code/i/results_bg.png
new file mode 100755
index 00000000..199ba692
Binary files /dev/null and b/doc/code/i/results_bg.png differ
diff --git a/doc/code/i/tree_bg.png b/doc/code/i/tree_bg.png
new file mode 100755
index 00000000..7d236633
Binary files /dev/null and b/doc/code/i/tree_bg.png differ
diff --git a/doc/code/index.html b/doc/code/index.html
new file mode 100644
index 00000000..c7011386
--- /dev/null
+++ b/doc/code/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+ RDoc Documentation
+
+
+
+
+
+
diff --git a/doc/code/js/highlight.pack.js b/doc/code/js/highlight.pack.js
new file mode 100755
index 00000000..01b59273
--- /dev/null
+++ b/doc/code/js/highlight.pack.js
@@ -0,0 +1 @@
+var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/"}while(x.length||y.length){var u=t().splice(0,1)[0];v+=l(w.substr(q,u.offset-q));q=u.offset;if(u.event=="start"){v+=r(u.node);s.push(u.node)}else{if(u.event=="stop"){var p=s.length;do{p--;var o=s[p];v+=(""+o.nodeName.toLowerCase()+">")}while(o!=u.node);s.splice(p,1);while(p'+l(K[0])+""}else{M+=l(K[0])}O=N.lR.lastIndex;K=N.lR.exec(L)}M+=l(L.substr(O,L.length-O));return M}function J(r,L){if(L.sL&&d[L.sL]){var K=f(L.sL,r);s+=K.keyword_count;return K.value}else{return E(r,L)}}function H(L,r){var K=L.cN?'':"";if(L.rB){p+=K;L.buffer=""}else{if(L.eB){p+=l(r)+K;L.buffer=""}else{p+=K;L.buffer=r}}B.push(L);A+=L.r}function D(N,K,P){var Q=B[B.length-1];if(P){p+=J(Q.buffer+N,Q);return false}var L=y(K,Q);if(L){p+=J(Q.buffer+N,Q);H(L,K);return L.rB}var r=v(B.length-1,K);if(r){var M=Q.cN?" ":"";if(Q.rE){p+=J(Q.buffer+N,Q)+M}else{if(Q.eE){p+=J(Q.buffer+N,Q)+M+l(K)}else{p+=J(Q.buffer+N+K,Q)+M}}while(r>1){M=B[B.length-2].cN?"":"";p+=M;r--;B.length--}var O=B[B.length-1];B.length--;B[B.length-1].buffer="";if(O.starts){H(O.starts,"")}return Q.rE}if(w(K,Q)){throw"Illegal"}}var G=d[I];var B=[G.dM];var A=0;var s=0;var p="";try{var u=0;G.dM.buffer="";do{var x=q(C,u);var t=D(x[0],x[1],x[2]);u+=x[0].length;if(!t){u+=x[1].length}}while(!x[2]);if(B.length>1){throw"Illegal"}return{language:I,r:A,keyword_count:s,value:p}}catch(F){if(F=="Illegal"){return{language:null,r:0,keyword_count:0,value:l(C)}}else{throw F}}}function h(){function o(t,s,u){if(t.compiled){return}if(!u){t.bR=c(s,t.b?t.b:"\\B|\\b");if(!t.e&&!t.eW){t.e="\\B|\\b"}if(t.e){t.eR=c(s,t.e)}}if(t.i){t.iR=c(s,t.i)}if(t.r==undefined){t.r=1}if(t.k){t.lR=c(s,t.l||hljs.IR,true)}for(var r in t.k){if(!t.k.hasOwnProperty(r)){continue}if(t.k[r] instanceof Object){t.kG=t.k}else{t.kG={keyword:t.k}}break}if(!t.c){t.c=[]}t.compiled=true;for(var q=0;qx.keyword_count+x.r){x=u}if(u.keyword_count+u.r>w.keyword_count+w.r){x=w;w=u}}}var s=t.className;if(!s.match(w.language)){s=s?(s+" "+w.language):w.language}var o=b(t);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=k(o,b(q),A)}if(y){w.value=w.value.replace(/^((<[^>]+>|\t)+)/gm,function(B,E,D,C){return E.replace(/\t/g,y)})}if(p){w.value=w.value.replace(/\n/g," ")}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){var q=t.parentNode;var v=document.createElement("div");v.innerHTML=""+w.value+"
";t=v.firstChild.firstChild;v.firstChild.cN=q.cN;q.parentNode.replaceChild(v.firstChild,q)}else{t.innerHTML=w.value}t.className=s;t.dataset={};t.dataset.result={language:w.language,kw:w.keyword_count,re:w.r};if(x&&x.language){t.dataset.second_best={language:x.language,kw:x.keyword_count,re:x.r}}}function j(){if(j.called){return}j.called=true;e();var q=document.getElementsByTagName("pre");for(var o=0;o|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.inherit=function(o,r){var q={};for(var p in o){q[p]=o[p]}if(r){for(var p in r){q[p]=r[p]}}return q}}();hljs.LANGUAGES.ruby=function(){var g="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var a="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var n={keyword:{and:1,"false":1,then:1,defined:1,module:1,"in":1,"return":1,redo:1,"if":1,BEGIN:1,retry:1,end:1,"for":1,"true":1,self:1,when:1,next:1,until:1,"do":1,begin:1,unless:1,END:1,rescue:1,nil:1,"else":1,"break":1,undef:1,not:1,"super":1,"class":1,"case":1,require:1,yield:1,alias:1,"while":1,ensure:1,elsif:1,or:1,def:1},keymethods:{__id__:1,__send__:1,abort:1,abs:1,"all?":1,allocate:1,ancestors:1,"any?":1,arity:1,assoc:1,at:1,at_exit:1,autoload:1,"autoload?":1,"between?":1,binding:1,binmode:1,"block_given?":1,call:1,callcc:1,caller:1,capitalize:1,"capitalize!":1,casecmp:1,"catch":1,ceil:1,center:1,chomp:1,"chomp!":1,chop:1,"chop!":1,chr:1,"class":1,class_eval:1,"class_variable_defined?":1,class_variables:1,clear:1,clone:1,close:1,close_read:1,close_write:1,"closed?":1,coerce:1,collect:1,"collect!":1,compact:1,"compact!":1,concat:1,"const_defined?":1,const_get:1,const_missing:1,const_set:1,constants:1,count:1,crypt:1,"default":1,default_proc:1,"delete":1,"delete!":1,delete_at:1,delete_if:1,detect:1,display:1,div:1,divmod:1,downcase:1,"downcase!":1,downto:1,dump:1,dup:1,each:1,each_byte:1,each_index:1,each_key:1,each_line:1,each_pair:1,each_value:1,each_with_index:1,"empty?":1,entries:1,eof:1,"eof?":1,"eql?":1,"equal?":1,"eval":1,exec:1,exit:1,"exit!":1,extend:1,fail:1,fcntl:1,fetch:1,fileno:1,fill:1,find:1,find_all:1,first:1,flatten:1,"flatten!":1,floor:1,flush:1,for_fd:1,foreach:1,fork:1,format:1,freeze:1,"frozen?":1,fsync:1,getc:1,gets:1,global_variables:1,grep:1,gsub:1,"gsub!":1,"has_key?":1,"has_value?":1,hash:1,hex:1,id:1,include:1,"include?":1,included_modules:1,index:1,indexes:1,indices:1,induced_from:1,inject:1,insert:1,inspect:1,instance_eval:1,instance_method:1,instance_methods:1,"instance_of?":1,"instance_variable_defined?":1,instance_variable_get:1,instance_variable_set:1,instance_variables:1,"integer?":1,intern:1,invert:1,ioctl:1,"is_a?":1,isatty:1,"iterator?":1,join:1,"key?":1,keys:1,"kind_of?":1,lambda:1,last:1,length:1,lineno:1,ljust:1,load:1,local_variables:1,loop:1,lstrip:1,"lstrip!":1,map:1,"map!":1,match:1,max:1,"member?":1,merge:1,"merge!":1,method:1,"method_defined?":1,method_missing:1,methods:1,min:1,module_eval:1,modulo:1,name:1,nesting:1,"new":1,next:1,"next!":1,"nil?":1,nitems:1,"nonzero?":1,object_id:1,oct:1,open:1,pack:1,partition:1,pid:1,pipe:1,pop:1,popen:1,pos:1,prec:1,prec_f:1,prec_i:1,print:1,printf:1,private_class_method:1,private_instance_methods:1,"private_method_defined?":1,private_methods:1,proc:1,protected_instance_methods:1,"protected_method_defined?":1,protected_methods:1,public_class_method:1,public_instance_methods:1,"public_method_defined?":1,public_methods:1,push:1,putc:1,puts:1,quo:1,raise:1,rand:1,rassoc:1,read:1,read_nonblock:1,readchar:1,readline:1,readlines:1,readpartial:1,rehash:1,reject:1,"reject!":1,remainder:1,reopen:1,replace:1,require:1,"respond_to?":1,reverse:1,"reverse!":1,reverse_each:1,rewind:1,rindex:1,rjust:1,round:1,rstrip:1,"rstrip!":1,scan:1,seek:1,select:1,send:1,set_trace_func:1,shift:1,singleton_method_added:1,singleton_methods:1,size:1,sleep:1,slice:1,"slice!":1,sort:1,"sort!":1,sort_by:1,split:1,sprintf:1,squeeze:1,"squeeze!":1,srand:1,stat:1,step:1,store:1,strip:1,"strip!":1,sub:1,"sub!":1,succ:1,"succ!":1,sum:1,superclass:1,swapcase:1,"swapcase!":1,sync:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,taint:1,"tainted?":1,tell:1,test:1,"throw":1,times:1,to_a:1,to_ary:1,to_f:1,to_hash:1,to_i:1,to_int:1,to_io:1,to_proc:1,to_s:1,to_str:1,to_sym:1,tr:1,"tr!":1,tr_s:1,"tr_s!":1,trace_var:1,transpose:1,trap:1,truncate:1,"tty?":1,type:1,ungetc:1,uniq:1,"uniq!":1,unpack:1,unshift:1,untaint:1,untrace_var:1,upcase:1,"upcase!":1,update:1,upto:1,"value?":1,values:1,values_at:1,warn:1,write:1,write_nonblock:1,"zero?":1,zip:1}};var h={cN:"yardoctag",b:"@[A-Za-z]+"};var d={cN:"comment",b:"#",e:"$",c:[h]};var c={cN:"comment",b:"^\\=begin",e:"^\\=end",c:[h],r:10};var b={cN:"comment",b:"^__END__",e:"\\n$"};var u={cN:"subst",b:"#\\{",e:"}",l:g,k:n};var p=[hljs.BE,u];var s={cN:"string",b:"'",e:"'",c:p,r:0};var r={cN:"string",b:'"',e:'"',c:p,r:0};var q={cN:"string",b:"%[qw]?\\(",e:"\\)",c:p,r:10};var o={cN:"string",b:"%[qw]?\\[",e:"\\]",c:p,r:10};var m={cN:"string",b:"%[qw]?{",e:"}",c:p,r:10};var l={cN:"string",b:"%[qw]?<",e:">",c:p,r:10};var k={cN:"string",b:"%[qw]?/",e:"/",c:p,r:10};var j={cN:"string",b:"%[qw]?%",e:"%",c:p,r:10};var i={cN:"string",b:"%[qw]?-",e:"-",c:p,r:10};var t={cN:"string",b:"%[qw]?\\|",e:"\\|",c:p,r:10};var e={cN:"function",b:"\\bdef\\s+",e:" |$|;",l:g,k:n,c:[{cN:"title",b:a,l:g,k:n},{cN:"params",b:"\\(",e:"\\)",l:g,k:n},d,c,b]};var f={cN:"identifier",b:g,l:g,k:n,r:0};var v=[d,c,b,s,r,q,o,m,l,k,j,i,t,{cN:"class",b:"\\b(class|module)\\b",e:"$|;",k:{"class":1,module:1},c:[{cN:"title",b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",r:0},{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+hljs.IR+"::)?"+hljs.IR}]},d,c,b]},e,{cN:"constant",b:"(::)?([A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[s,r,q,o,m,l,k,j,i,t,f],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"number",b:"\\?\\w"},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},f,{b:"("+hljs.RSR+")\\s*",c:[d,c,b,{cN:"regexp",b:"/",e:"/[a-z]*",i:"\\n",c:[hljs.BE]}],r:0}];u.c=v;e.c[1].c=v;return{dM:{l:g,k:n,c:v}}}();hljs.LANGUAGES.javascript={dM:{k:{keyword:{"in":1,"if":1,"for":1,"while":1,"finally":1,"var":1,"new":1,"function":1,"do":1,"return":1,"void":1,"else":1,"break":1,"catch":1,"instanceof":1,"with":1,"throw":1,"case":1,"default":1,"try":1,"this":1,"switch":1,"continue":1,"typeof":1,"delete":1},literal:{"true":1,"false":1,"null":1}},c:[hljs.ASM,hljs.QSM,hljs.CLCM,hljs.CBLCLM,hljs.CNM,{b:"("+hljs.RSR+"|case|return|throw)\\s*",k:{"return":1,"throw":1,"case":1},c:[hljs.CLCM,hljs.CBLCLM,{cN:"regexp",b:"/.*?[^\\\\/]/[gim]*"}],r:0},{cN:"function",b:"\\bfunction\\b",e:"{",k:{"function":1},c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[hljs.ASM,hljs.QSM,hljs.CLCM,hljs.CBLCLM]}]}]}};hljs.LANGUAGES.css=function(){var a={cN:"function",b:hljs.IR+"\\(",e:"\\)",c:[{eW:true,eE:true,c:[hljs.NM,hljs.ASM,hljs.QSM]}]};return{cI:true,dM:{i:"[=/|']",c:[hljs.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@font-face",l:"[a-z-]+",k:{"font-face":1}},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:{"import":1,page:1,media:1,charset:1},c:[a,hljs.ASM,hljs.QSM,hljs.NM]},{cN:"tag",b:hljs.IR,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[hljs.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[a,hljs.NM,hljs.QSM,hljs.ASM,hljs.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}}();hljs.LANGUAGES.xml=function(){var b="[A-Za-z0-9\\._:-]+";var a={eW:true,c:[{cN:"attribute",b:b,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,dM:{c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"",rE:true,sL:"css"}},{cN:"tag",b:"
+
+
+
+
+
+
+
+
+ index
+
+