Commit Graph

321 Commits

Author SHA1 Message Date
Douwe Maan c81928cfa7 Include new URL helpers retroactively into includers of Gitlab::Routing 2017-07-07 10:43:37 -05:00
Douwe Maan 7c096f6847 Merge branch 'fix-routes-in-production-mode' into 'master'
Fix shorter route helpers in production environment

Closes #34741

See merge request !12675
2017-07-06 23:53:49 +00:00
Rémy Coutable 18326c2080 Improve & fix the performance bar UI and behavior 2017-07-06 19:37:31 +00:00
Sean McGivern 920f0159ca Fix shorter route helpers in production environment
I don't know exactly when Rails picks each module to use, but this seems to be
used by `app` in the console (for instance, `app.project_path` would fail
before, but works now).
2017-07-06 12:41:40 +01:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Annabel Dunstone Gray 1c38d32840 Resolve "Navigation - Move contextual navigation to sidebar" 2017-06-28 08:30:57 +00:00
Phil Hughes c5f25f6550 Top navigation redesign
Start of the new navigation by redesigning just the top navigation menu.
This is only shown when a cookie is set.

Part of #32794
2017-06-21 14:45:23 +01:00
Rémy Coutable 8a2d536ac3 Fix vendor/peek.js so that it can be bundled with Webpack
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-09 17:21:39 +02:00
Rémy Coutable f45094a485 Small adjustments
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-09 17:21:39 +02:00
Rémy Coutable d39ecf1ca7 New performance bar that can be enabled with the `p b` shortcut
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-09 17:21:39 +02:00
Alexis Reigel 3713a57fe8 add rss_token attribute to user model 2017-05-24 22:29:59 +02:00
Luke "Jared" Bennett 7e7f266139
Add test.js and test.css to disable animations during testing and include these in _head when testing 2017-05-15 16:34:04 +01:00
Grzegorz Bizon e66558839f Remove CI/CD models directory from `eager_load_paths`
CI/CD models are already located inside `CI` module, thus usual Rails
autoloading principles apply.

See https://github.com/rails/rails/issues/28854 for more details.
2017-05-09 14:11:49 +02:00
Ruben Davila 628d641b06 Disable FastGettext from translating AR attrs.
It isn't working fine when using POROs in forms like WikiPage,
the following error is being raised: undefined method `abstract_class?' for Object:Class
2017-05-04 01:58:57 -05:00
Tiago Botelho ecd75216c6 adds git terminal prompt env var to application rb 2017-04-03 23:08:17 +01:00
Eric Eastwood 2c230c82f2 Restore unicode-file-name images for legacy img emojis 2017-03-16 02:37:25 -05:00
Bob Van Landuyt 0c6e685f8c Move `ResolveDiscussions` into `concerns/issues` folder 2017-03-13 08:27:52 +01:00
Mike Greiling 85e0bbc4f8 move u2f library to webpack 2017-03-07 02:59:12 -06:00
Eric Eastwood e6fc0207cb Use native unicode emojis
- gl_emoji for falling back to image/css-sprite when the browser
   doesn't support an emoji
 - Markdown rendering (Banzai filter)
 - Autocomplete
 - Award emoji menu
    - Perceived perf
    - Immediate response because we now build client-side
 - Update `digests.json` generation in gemojione rake task to be more
   useful and  include `unicodeVersion`

MR: !9437

See issues

 - #26371
 - #27250
 - #22474
2017-03-06 12:54:46 -06:00
Filipa Lacerda 1ad1cdba96 Merge branch 'remove-vendored-raphael-library' into 'master'
Refactor network graph bundle to ES module syntax

See merge request !9696
2017-03-06 17:40:24 +00:00
Pawel Chojnacki 0ef8a64348 Remove unecessary calls to limit_user!, UniqueIps Middleware, and address MR review
- cleanup formating in haml
 - clarify time window is in seconds
 - cleanup straneous chunks in db/schema
 - rename count_uniqe_ips to update_and_return_ips_count
 - other
2017-03-06 15:41:25 +01:00
Pawel Chojnacki e5cf3f51fb Allow limiting logging in users from too many different IPs. 2017-03-06 15:41:24 +01:00
Mike Greiling 545397c6cb remove manually vendored raphael library in favor of node module 2017-03-05 14:25:40 -06:00
Mike Greiling 982dd5040b merge cropper library into profile_bundle 2017-03-03 16:54:20 -06:00
Robert Schilling f9788bc129 CORS: Whitelist pagination headers 2017-03-02 10:14:22 +01:00
Mike Greiling a2d837a371 add rack middleware to proxy webpack dev server 2017-02-01 16:23:26 -06:00
Mike Greiling 720650d2b0 precompile webpack assets when testing 2017-01-10 12:30:39 -06:00
Mike Greiling fe964cc235 migrate all javascript asset bundles and require syntax 2017-01-10 12:30:38 -06:00
Mike Greiling 4c5ff1d08e add webpack, webpack-rails, and webpack-dev-server along with a simple hello world test
Add the following line to GDK Procfile to play with it:

    webpack: exec support/exec-cd gitlab npm run dev-server
2017-01-06 10:21:01 -06:00
Hiroyuki Sato 21aefb4450 Add KaTeX fonts to assets paths and precompile 2016-12-22 06:03:49 +09:00
Bryce Johnson 27c613cb18 Remove unneeded bundle refs. 2016-12-21 18:29:10 +00:00
Bryce Johnson 3bbe19d39b Backport moving MR widget CI JS out of script tag. 2016-12-21 13:03:13 +01:00
Nick Thomas 7c2e16d053 Add xterm.js 2.1.0 and a wrapper class to the asset pipeline 2016-12-19 19:53:03 +00:00
Rémy Coutable ada8b026ef Merge branch 'rs-filter-params' into 'security'
Filter `incoming_email_token` and `runners_token` parameters

Closes https://dev.gitlab.org/gitlab/gitlabhq/issues/2676

See merge request !2045
2016-12-15 11:42:44 -03:00
Sean McGivern 4d1f583712 Merge branch 'katex-math' into 'master'
Render math in Asciidoc and Markdown with KaTeX using code blocks

Closes #13690 and #13180

See merge request !8003
2016-12-15 14:11:38 +00:00
Munken 2d170a20dc Render math in Asciidoc and Markdown with KaTeX using code blocks 2016-12-14 16:50:54 +00:00
Douwe Maan 6e1b52b8b9 Merge branch 'rs-filter-authentication_token' into 'security'
Add authentication_token to filter_parameters list

See merge request !2041
2016-12-08 21:23:09 -03:00
Filipa Lacerda 2c0f97cd1e Includes page specific JS 2016-11-16 11:57:51 +00:00
Phil Hughes 36a781a920 Create cycle analytics bundle
This prevents VueJS being included in application.js & therefore included on everypage
2016-10-28 15:56:12 +01:00
Yorick Peterse 97731760d7
Re-organize queues to use for Sidekiq
Dumping too many jobs in the same queue (e.g. the "default" queue) is a
dangerous setup. Jobs that take a long time to process can effectively
block any other work from being performed given there are enough of
these jobs.

Furthermore it becomes harder to monitor the jobs as a single queue
could contain jobs for different workers. In such a setup the only
reliable way of getting counts per job is to iterate over all jobs in a
queue, which is a rather time consuming process.

By using separate queues for various workers we have better control over
throughput, we can add weight to queues, and we can monitor queues
better. Some workers still use the same queue whenever their work is
related. For example, the various CI pipeline workers use the same
"pipeline" queue.

This commit includes a Rails migration that moves Sidekiq jobs from the
old queues to the new ones. This migration also takes care of doing the
inverse if ever needed. This does require downtime as otherwise new jobs
could be scheduled in the old queues after this migration completes.

This commit also includes an RSpec test that blacklists the use of the
"default" queue and ensures cron workers use the "cronjob" queue.

Fixes gitlab-org/gitlab-ce#23370
2016-10-21 18:17:07 +02:00
Alfredo Sumaran 3bace66970 Create protected branches bundle 2016-10-20 12:03:30 -05:00
Alfredo Sumaran a8ac9089af Refactor JS code
- Use a store base object to manage application state.
- Add a service to handle ajax requests.
- Load code only when needed
2016-10-13 14:16:35 -05:00
Rémy Coutable d51bb99a7e
Merge commit 'dev/security' into 'master'
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-06 08:33:11 +02:00
Jacob Vosmaer 437bebb0ff Don't send Private-Token headers to Sentry
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/22537
2016-10-04 16:57:01 +02:00
Rémy Coutable 923a1f7ace Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2016-09-29 19:02:59 +02:00
Paco Guzman 263c7f0bcc Use a ConnectionPool for Rails.cache on Sidekiq servers
It’s important to remember that connections on ConnectionPool are created 
when needed so if modify the objects later to create those connections weird 
things could happen

https://gitlab.com/gitlab-com/infrastructure/issues/464#note_15850653
2016-09-28 11:14:07 +02:00
Nick Thomas 3870138960 Set a restrictive CORS policy on the API for credentialed requests
Cross-origin requests can still be made, as long as the client doesn't
use the Rails session cookie to do so. Existing clients should not
be setting 'withCredentials: true', so this should be fine.
2016-09-26 13:05:01 +01:00
Nick Thomas ae5831500a Move Rack::Attack and Rack::Cors middlewares to be before Warden::Manager 2016-09-26 13:05:01 +01:00
Rubén Dávila Santos 73b4eecdde Revert "Merge branch '22364-rails-cache-redis-connection-pool' into 'master'"
This reverts merge request !6429
2016-09-22 00:08:08 +00:00
Paco Guzman 93d0243d53 Use a ConnectionPool for Rails.cache on Sidekiq servers 2016-09-20 12:36:23 +02:00
Jacob Schatz 8fc800cbcc Merge branch 'ace-ventura' into 'master'
Ace ventura

## What does this MR do?

Makes Ace only load when it's actually necessary. The only two places it seems to be used is for Snippets and the File (Blob) Editor.

Before minification or compression, this takes the application.js down from 2.2MB to 1.6MB, and also removes two inline scripts :D

Compressed/Minified: master: 317KB/1.1MB, ace-ventura: 220KB/771KB

## Are there points in the code the reviewer needs to double check?

That this doesn't just completely break anything.

## Why was this MR needed?

Ace is a big library, this allows us to only load it when necessary.

## What are the relevant issue numbers?

#14372

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4914
2016-08-19 17:06:30 +00:00
Connor Shea 0baaf490e2 Only load Ace on Snippets and file edit pages. 2016-08-18 21:48:10 +01:00
Connor Shea d8654744cd
Merge branch 'master' into diff-line-comment-vuejs 2016-08-17 12:10:09 -06:00
Phil Hughes 9172c45bdb Added simulate drag JS for tests 2016-08-17 17:12:47 +01:00
Phil Hughes 6478adf10c Hooked up JS to allow issues to be moved between columns 2016-08-17 17:12:47 +01:00
Douwe Maan c770201061 Merge branch 'master' into diff-line-comment-vuejs 2016-08-12 17:23:19 -05:00
Gabriel Mazetto 926cee002d Deduplicated resque.yml loading from several places
We will trust redis configuration params loading to Gitlab::RedisConfig.
2016-08-04 18:55:37 +02:00
Phil Hughes 6537a4a8fe Correctly resolves/unresolves discussions 2016-07-26 13:44:51 +01:00
Phil Hughes c926cdfa4f convert CS to JS 2016-07-26 11:56:36 +01:00
Phil Hughes af5fc6e24c Diff line comments resolve 2016-07-24 13:10:37 -06:00
Fatih Acet 812bb8b438 Merge branch 'rename-js-files' into 'master'
Replace namespace-specific application.js files with namespace-bundle.js files.

Following up on the per-page JavaScript improvements, I wanted to replace the use of `application.js` with `namespace-bundle.js` to prevent confusion when downloading more than one application.js file.

This is pretty much just for the sake of clarity.

cc: @alfredo1 

See merge request !5221
2016-07-20 12:26:53 +00:00
Connor Shea 6a06c5cfb9
Upgrade Gemojione from 2.6.1 to 3.0.1.
This adds the 2016 emoji as well as support for using SVG images instead of PNGs.

It also fixes a number of incorrectly categorized emoji and other minor issues.

Upgrade Rake task for Gemojione 3.0.0 and generate sprites.

Upgrade aliases.json by pulling down index.json from the gemojione repository and running the generate_aliases.rb file.

Changelog: https://github.com/jonathanwiesel/gemojione/blob/master/CHANGELOG.md#v301-2016-07-16

For the specific emoji added to the Unicode standard, see: http://emojione.com/releases/2.2.4/

Huge kudos to Jonathan Wiesel (@jonathanwiesel) for his work on the gemojione gem!
2016-07-18 10:40:16 -06:00
Connor Shea ec8a25ba0b
Replace namespace-specific application.js files with namespace-bundle.js files. 2016-07-15 14:42:28 -06:00
Timothy Andrew 4b33c4c6d1 Load Javascript U2F library selectively.
1. Only on supported Chrome versions

2. Mainly, this lets us simplify the javascript-based U2F check to
   `window.u2f`, where `window.u2f` can either be loaded from the GitLab
   server (for Chrome) or from the Firefox extension.

3. This is a better way to provide browser detection for U2F.
2016-07-14 08:19:09 +05:30
Connor Shea a99e5cd810
Split Cropper.js from the main JavaScript manifest. 2016-06-29 15:36:22 -06:00
Connor Shea 40db56a26c
Add precompilation for relevant assets. 2016-06-23 11:05:02 -06:00
Connor Shea 18e16e427d
Replace raphael-rails with raphael.js so it can be split from the rest of the JavaScript. The gem isn't maintained anymore anyway. Added a network folder with an application.js including raphael components, since that's the only page using it currently. 2016-06-10 09:28:07 -06:00
Connor Shea 026b7abc5a
Attempt to fix the user page. 2016-06-01 19:42:49 -06:00
Connor Shea 0256e68399
Remove d3 except for on pages where it's necessary. 2016-06-01 19:42:49 -06:00
Robert Speicher 3e3463218d New confirmation email 🔥 2016-05-25 16:56:06 -04:00
Jeroen van Baarsen fa7a682bb0 Merge branch 'fix-generator-templates-directory' into 'master'
Move generator templates to generator_templates/



See merge request !4217
2016-05-19 21:24:05 +00:00
Yorick Peterse 9429da3ae2
Move generator templates to generator_templates/
Since we eager load everything in lib/ putting ERB code in .rb files
will result in syntax errors. By moving the templates to
./generator_templates we can work around this.
2016-05-19 14:58:35 -05:00
Sean McGivern a9977f2b7a Syntax-highlight diffs in push emails
Based on:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/151
2016-05-17 13:23:17 +01:00
Rémy Coutable 5589dcf8db Fix a few places where autoloading would fail
- Fix naming of API::CommitStatuses
- Ensure we use require_dependency instead of require
- Ensure the namespace is right in lib/api/api.rb, otherwise, we
  might require Grape::API::Helpers which defines the `#params` method.
  This is to avoid requiring a file multiple times and getting an "Already
  initialized constant" error.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-10 11:51:19 +02:00
Stan Hu 6da3388569 Add eager load paths to help prevent dependency load issues with Sidekiq workers
Attempts to address #13521, #14825

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-10 11:51:19 +02:00
Connor Shea 8d3debe4cc
Add more parameters to the filter_parameters config.
Adds Sentry DSN, Webhooks, Deploy Keys, etc.

Alphabetized the parameters and included line breaks between each parameter. Easier to merge into EE if there are any differences.

This also seems to be the more popular syntax for adding new parameters, from what I can find.
2016-04-29 18:44:49 -06:00
Jacob Vosmaer cf669551f6 Put CACHE_NAMESPACE in the Gitlab::Redis module 2016-04-07 15:42:07 +02:00
Jacob Vosmaer 0163e27631 Add Gitlab::Redis connection pool 2016-04-04 17:00:09 +02:00
Douwe Maan a8aa59e96e Inline mailer CSS using premailer.
# Conflicts:
#	Gemfile.lock
2016-03-19 20:04:10 +01:00
Josh Frye 36ddca101e Filter import_url params because they may contain auth information. Fixes #14199 2016-03-10 21:22:46 -05:00
Jacob Vosmaer c46e6eff10 Parse config/resque.yml in one place only 2016-03-09 15:16:46 +01:00
Robert Speicher fcfdb23a23 Don't generate factories automatically 2016-03-04 15:26:51 -05:00
Artem Sidorenko 28ba8ed5f5 Use dedicated relative_url.rb initializer
in order to have it the same way like in omnibus
2016-02-29 21:17:48 +01:00
Douwe Maan ad12f11f3e Merge branch 'rs-emoji' into 'master'
Update Gemojione for new hotness 

Before | After
------ | -----
![Screen_Shot_2016-02-12_at_3.38.43_PM](/uploads/299e5ffe38c91657085741261a678f81/Screen_Shot_2016-02-12_at_3.38.43_PM.png) | ![Screen_Shot_2016-02-12_at_3.38.09_PM](/uploads/ccee29719a6445a9efd2498391a7eea0/Screen_Shot_2016-02-12_at_3.38.09_PM.png)

See merge request !2800
2016-02-19 08:11:02 +00:00
Jacob Vosmaer 9805fe1914 Use SCAN during 'rake cache:clear'
This allows 'rake cache:clear' to delete millions of keys without
choking. It requires Redis 2.8.0 or newer but we needed that already
anyway.
2016-02-18 16:55:19 +01:00
Robert Speicher fe13f58f3e Update Emoji asset path
Now that we're serving assets directly from the Gemojione gem's path,
the images are not in an `emoji/` sub-folder.
2016-02-12 15:34:20 -05:00
Achilleas Pipinellis 10aa99a30c Merge branch 'doc_relative_url' into 'master'
Add documentation on relative URL support

closes #12773

See merge request !2770
2016-02-10 10:51:18 +00:00
Achilleas Pipinellis 464cea7d48 Fix typos and grammar
[ci skip]
2016-02-10 12:43:19 +02:00
Achilleas Pipinellis b532109b97 Edit configuration files for relative URL support
[ci skip]
2016-02-09 16:59:42 +02:00
Kamil Trzcinski 4558bb1f4a Filter out variables from production logs
This prevents leakage of CI Secure Variables
2016-02-09 00:44:27 +01:00
Valery Sizov 7f214cee74 Migrate mailers to ActiveJob 2015-11-26 17:03:43 +02:00
Robert Speicher 5e01e1bb90 Use `methods: :any` in our rack-cors configuration
This was added in rack-cors 0.4.0 and allows all types of CORS requests
to the API.
2015-10-07 22:08:37 -04:00
Jacob Vosmaer 82bb5c5e03 Expire Rails cache entries after two weeks
This should help prevent endless Redis growth.
2015-07-15 13:53:40 +02:00
Robert Speicher c40f59d04f Add otp_attempt to filtered parameters 2015-05-09 17:32:49 -04:00
Douwe Maan ca9aca9279 Allow smb:// links in Markdown text. 2015-03-10 13:32:28 +01:00
Douwe Maan 8d1fa44f23 Filter private_token and password_confirmation params from logs.
Closes #1770.
2015-02-06 22:55:43 +01:00
Fred Chasen 1f5ecf6c50 use new hash syntax 2015-01-23 15:33:20 -05:00
Fred Chasen 13c4e25d6f Split up line and use single qoutes to declare Cors settings 2015-01-23 15:30:48 -05:00
Fred Chasen 85b3c87b7f Expose Link header in CORS Api calls 2015-01-23 14:57:48 -05:00
Ciro Santilli 33c9f05c6b Append in place for strings and arrays 2015-01-01 21:12:00 +01:00
Dmitriy Zaporozhets 8e7fa0c2a1
Use new gitlab-shell v2.3.0
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-11-18 17:15:51 +02:00
Dmitriy Zaporozhets f7bf892cca Revert "gitlab shell works if multiple rubies installed"
This reverts commit 533f4cdf30.
2014-11-18 17:14:36 +02:00
Ciro Santilli 533f4cdf30 gitlab shell works if multiple rubies installed
Before this it would fail because git hooks automatically prepend
things to the path, which can lead the wrong Ruby version to be called
in which dependencies are not installed.

To make sure that this is correct, the forked_merge_requests commented
out test that depends on this change was uncommented.

For that test to pass, it is also necessary to setup the mock server
on port 3001 under test_env.rb.
2014-11-18 11:38:23 +01:00
Dmitriy Zaporozhets 59c25eb215 Merge pull request #8122 from bbodenmiller/cleanup-time-zone
cleanup time zone settings
2014-10-30 16:46:36 +02:00
Dmitriy Zaporozhets 3220e191ae Merge pull request #7994 from cirosantilli/rm-unneeded-autoload-path
Remove unneeded app/finders config.autoload path
2014-10-22 16:56:07 +03:00
Ben Bodenmiller 3dbe0810f5 cleanup time zone settings
time zone settings moved to gitlab.yml in https://github.com/gitlabhq/gitlabhq/pull/8015
2014-10-21 13:36:09 -07:00
Sullivan SENECHAL 593a287c8d Add timezone configuration to gitlab.yml 2014-10-21 11:27:16 +02:00
Ciro Santilli 10783f4d7b Remove unneeded app/finders config.autoload path
Every directory under app/ is searched by default
2014-10-07 23:41:02 +02:00
Dmitriy Zaporozhets d29cbc70b2
Remove I18n.enforce_available_locales deprecation message
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-01 12:56:23 +03:00
Dmitriy Zaporozhets 38ed0deaac
Move hook models in separate dir
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-15 11:31:30 +03:00
Dmitriy Zaporozhets c69b8e0459
Huge replace of old users_project and users_group references
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-14 19:32:51 +03:00
Jacob Vosmaer 185e7681d2 Move cache setup to config/application.rb
Before this change we were trying to configure Rails.cache in an
initializer. It seems that by the time the initializers are loaded,
Rails.cache is already instantiated, so changing the settings does not
achieve anything anymore. This was causing Rails to default to a file
storage cache instead of the Redis cache, which in turn broke `rake
cache:clear`.
2014-08-29 11:38:21 +02:00
Dmitriy Zaporozhets 1dab15940d
Remove protected_atrributes gem and start moving to strong params
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-26 14:30:07 +03:00
Dmitriy Zaporozhets 2d87556847 Remove rails observers from application 2014-06-17 22:51:43 +03:00
Dmitriy Zaporozhets a90a201d0e Remove user observer 2014-06-17 22:32:35 +03:00
Dmitriy Zaporozhets a7d5052cd4 Remove SystemHook observer 2014-06-17 22:20:10 +03:00
Dmitriy Zaporozhets 6149dba518 Remove NotesObserver 2014-06-17 22:09:01 +03:00
Dmitriy Zaporozhets a7f3672b75 Remove project observer 2014-06-17 21:53:26 +03:00
Dmitriy Zaporozhets 9e3094b232 Remove UsersGroup observer 2014-06-17 21:36:40 +03:00
Dmitriy Zaporozhets b3a90aba41 Remove ProjectActivityCacheObserver 2014-06-17 21:23:43 +03:00
Dmitriy Zaporozhets c4b02642d2
Replace milestone observer with services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-10 18:07:52 +03:00
Marin Jankovski 636ec6d3a0 Update warnings about relative url support. 2014-05-13 17:59:08 +02:00
Dmitriy Zaporozhets 65cd9829ee
Remove MergeRequest observer
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 21:35:59 +03:00
Dmitriy Zaporozhets 6ae2529041
Remove KeysObserver
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 21:13:05 +03:00
Dmitriy Zaporozhets 3faa14e7a7 Merge branch 'reduce-observers' into 'master'
Move issue create/update code to services

Reduce observers role in GitLab code
2014-04-02 17:54:27 +00:00
Marin Jankovski 1ad79393ad Add print.css to asset precompile array. 2014-04-02 14:42:35 +02:00
Dmitriy Zaporozhets 0d41f6f0a3
Remove issue observer
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 15:37:57 +03:00
Dmitriy Zaporozhets ba87b76de1
Use EventCreateService for notes, merge requests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-25 15:08:25 +02:00
Dmitriy Zaporozhets 645e8d4705
Move services for collecting items to Finders
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-25 19:15:08 +02:00
Andrew Kumanyaev e139cc9e33 Add emoji images to asset load path. 2014-02-06 19:56:47 +03:00
Jeroen van Baarsen c466f4cc44 Fixed the I18n deprecation warning 2014-01-09 13:17:02 +01:00
Dmitriy Zaporozhets 2428a0b2dd
Add project_services dir to autoload path
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-17 12:58:44 +02:00
Dmitriy Zaporozhets 445f31c642
Add DELETE to api cors
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-11 17:59:37 +02:00
Dmitriy Zaporozhets ac5842d970 Migrate application to rails 4 step 1
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-10 12:11:26 +02:00
Crom (Thibaut CHARLES) 906c65b624 Merge branch 'master' of https://github.com/gitlabhq/gitlabhq
Conflicts:
	config/application.rb
	config/gitlab.yml.example
	config/unicorn.rb.example
2013-12-09 13:22:22 +00:00
Dmitriy Zaporozhets 6edb4c0634
Allow Cross-origin resource sharing for GitLab API
It will allow to write web applications on other domains to interact
with GitLab instances

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-05 10:29:45 +02:00
Sytse Sijbrandij b8cb7df761 Add warning back. 2013-11-29 08:57:45 +01:00
Sytse Sijbrandij 22d3aa4e32 Unsupported is unclear. 2013-11-28 07:57:56 +01:00
Marin Jankovski 3c8c06751c Enable rack_attack by default. 2013-11-06 13:10:59 +01:00
Crom (Thibaut CHARLES) 87fc35073a Fixed comments for running gitlab in a non-root path
- If you don't edit gitlab-shell/config.yml, you wnon't be able to push via SSH (as described here: http://stackoverflow.com/questions/15746336/gitlab-cant-push-code-to-server)
- If you don't re-run sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production, some icons won't be visible
2013-11-06 10:14:48 +00:00
Dmitriy Zaporozhets ac6180bcb0 Merge branch 'rack_attack' of /home/git/repositories/gitlab/gitlabhq 2013-10-01 08:14:05 +00:00
Marin Jankovski 055b60d420 Add documentation to help section, rack_attack as example 2013-09-30 11:10:46 +02:00
Thomas Misilo e99701fbfa Changed wording in application.rb and gitlab.yml.example to match unicorn.rb. This is for when using a non-root path 2013-09-29 13:46:02 -04:00
Marin Jankovski c562d290ea Enable rack attack and add a throttle. 2013-09-25 19:07:14 +02:00
Dmitriy Zaporozhets c1dd31cf8b Enable UsersGroup observer, Add group_member methods to NotificationService 2013-09-12 19:00:32 +03:00
Sytse Sijbrandij 63009af117 Relative root needs to be changed in three places. 2013-08-19 22:20:32 +02:00
Sytse Sijbrandij 6ec73fc9a6 Configure the relative path only one time. 2013-08-19 21:49:27 +02:00
amouhzi 39d8a64d25 Fixes grack authentification under relative_url_root
Ref: e6159b8725
Ref: https://github.com/gitlabhq/gitlabhq/pull/3204
Ref: https://github.com/gitlabhq/gitlabhq/issues/1228

Add Rails' variable in application.rb to support relative url

This variable is used by assets compilation and other modules.

Note that user needs to change application.rb too

Restrict session cookie to the relative path if set.

Ref: 2c2f1e3185

Fix Update attachment_uploader.rb bug with relative URL

See: 161afda3fa

Fix Wall relative bug with attachement files (javascript)
2013-08-15 21:25:09 +02:00
Andrey Kumanyaev 67ccc8b52a Replace old hashes with new 1.9 ruby hashes (rebase) 2013-05-05 18:01:10 +04:00
Andrey Kumanyaev 734d6fcdf0 Perfomance updating Project activity sort 2013-04-03 06:21:04 +04:00
Dmitriy Zaporozhets e65731bb7e Add concerns to autoload 2013-01-03 09:12:24 +02:00
Riyad Preukschas 527d223680 Update Rails config 2012-11-18 21:51:53 +01:00
Robb Kidd 16ceae895e Separate observing of Note and MergeRequests
* Move is_assigned? and is_being_xx? methods to IssueCommonality

  This is behavior merge requests have in common with issues. Moved
  methods to IssueCommonality role. Put specs directly into
  merge_request_spec because setup differs for issues and MRs
  specifically in the "closed" factory to use.

* Add MergeRequestObserver. Parallels IssueObserver in almost every way.

  Ripe for refactoring.

* Rename MailerObserver to NoteObserver

  With merge request observing moved out of MailerObserver, all that
  was left was Note logic. Renamed to NoteObserver, added tests and
  updated application config for new observer names. Refactored
  NoteObserver to use the note's author and not rely on current_user.

* Set current_user for MergeRequestObserver

  IssueObserver and MergeRequestObserver are the only observers that
  need a reference to the current_user that they cannot look up on
  the objects they are observing.
2012-10-10 17:59:25 -04:00
Nihad Abbasov 72395d7f6e no need to add fonts to assets path 2012-10-05 07:23:58 -07:00
Cyril 236fd1e63b all devise controller use devise layout 2012-09-29 13:06:53 +02:00
Cyril bdf317addc layout selected by controller name 2012-09-26 22:27:44 +02:00
Nihad Abbasov 83efcabc82 set activerecord whitelist_attributes to true 2012-09-26 11:18:35 -07:00
Alex Denisov 3c96d1f0e1 Send notification on update UserProject relation (access changed) 2012-08-27 00:32:03 +03:00
randx b2b88b2ff2 Added font for head panel. Major restyle for header 2012-08-20 22:51:37 +03:00
Valeriy Sizov d9cd6269e9 System Hooks: move callback to observer 2012-07-20 01:01:29 +03:00
randx 55f8338502 Merge branch 'separate_user_and_issue_observer_from_mail_observer' of https://github.com/robbkidd/gitlabhq into robbkidd-separate_user_and_issue_observer_from_mail_observer 2012-06-24 09:33:22 +03:00
Nihad Abbasov a21bda5ac9 load assets group to allow lazy compilation in production 2012-06-22 03:09:36 -07:00
Robb Kidd 88964132ed Extract observation of User to a UserObserver 2012-06-20 14:09:46 -04:00
Robb Kidd 6617eaaf9b Make IssueObserver handle issus, not MailerObserver 2012-06-20 14:09:46 -04:00
Nihad Abbasov d1953a2640 no need to extend assets path anymore
see 865cf830c4
2012-06-13 05:19:02 -07:00
Dmitriy Zaporozhets 0727edd8a0 Removed issues,mr delete buttons. Refactored models 2012-03-04 15:35:15 +02:00
Dmitriy Zaporozhets dcdb2fdfdb Observe issue, merge request, note creation - create event 2012-02-28 16:01:14 +02:00
Valery Sizov 7713f7fefb Notification refactoring 2011-12-17 15:58:35 +02:00
Nihad Abbasov 2db09ada72 extend assets path with jquery-ui images, so rails can find them 2011-10-27 16:14:46 +05:00
gitlabhq ec9e54ea94 gitosis error handle 2011-10-10 00:15:28 +03:00
gitlabhq 9ba1224867 init commit 2011-10-09 00:36:38 +03:00