Commit graph

53 commits

Author SHA1 Message Date
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
randx 679d0d6d76 Context refactoring. Move Issues list, Search logic to context 2012-10-09 22:09:46 +03:00
randx 63fe042d97 project.issues_labels method 2012-10-09 20:39:06 +03:00
Valeriy Sizov dc33f71b18 Merge pull request #1656 from zzet/refactoring
Refactoring
2012-10-09 01:17:38 -07:00
randx ce1b742b1e Group: new link on dashboard if admin. Fixed people count 2012-10-09 09:46:20 +03:00
Dmitriy Zaporozhets 26045d7a2c Merge pull request #1596 from riyad/fix-messages-for-deleted-things
Fix messages for deleted things on dashboard
2012-10-08 22:27:25 -07:00
Andrey Kumanyaev df7c52489a simple refactoring 2012-10-09 04:10:04 +04:00
Valeriy Sizov 76c4e83193 Minore code-style fixes 2012-10-04 13:40:40 +03:00
Dmitriy Zaporozhets d88332709c Fixed group issues/mr. Also speedup project list of admin area 2012-10-04 10:51:35 +03:00
Riyad Preukschas 2022ae69df Clarify deletion messages 2012-09-30 15:04:43 +02:00
Riyad Preukschas c2303737ba Fix double ref_type in push event when removing branch or tag 2012-09-30 00:53:04 +02:00
Robert Speicher afc4a75499 Use Rails.root.join where appropriate 2012-09-26 16:32:26 -04:00
Robert Speicher f8c02f6e39 Add branches and tags Repo methods
Simplifies the actions in RepositoriesController
2012-09-26 16:32:26 -04:00
Robert Speicher 2df3b310f9 Rename branches and tags Repo methods to branch_names and tag_names 2012-09-26 16:32:26 -04:00
Robert Speicher 9f0e80591a Fix Repository role spec 2012-09-26 16:32:25 -04:00
Robert Speicher b389247c02 Use Commit#show instead of Commits#show to view a single commit
Commits#show (plural) is going to be for showing commit history on a
specific path.
2012-09-26 16:32:21 -04:00
Robert Speicher ed26ecae0c Add branches method to Repository role 2012-09-26 16:32:20 -04:00
Nihad Abbasov 83efcabc82 set activerecord whitelist_attributes to true 2012-09-26 11:18:35 -07:00
Dmitriy Zaporozhets 4cc169d3ca Improve commits compare. Added tags to autocomplete. Dont look for commits if from & to are empty 2012-09-21 11:22:53 +03:00
Dmitriy Zaporozhets 40eec08c99 Merge pull request #1409 from riyad/update-votes
Update votes for issues and merge requests
2012-09-11 23:08:19 -07:00
Riyad Preukschas f7c70eaaed Add *votes_in_percent 2012-09-11 16:47:59 +02:00
Riyad Preukschas 7b0c7ae52c Add votes_count 2012-09-08 16:05:48 +02:00
Riyad Preukschas 2e0d5c2250 Add downvotes 2012-09-08 16:05:48 +02:00
Riyad Preukschas a2a0060034 Rename Upvote role to Votes 2012-09-08 16:05:48 +02:00
Nihad Abbasov 0b559cdece add validations for boolean attributes 2012-09-05 04:01:11 -07:00
Robert Speicher 443e23e61a Add Repository#discover_default_branch and add it to PushObserver 2012-09-05 01:01:20 -04:00
Robert Speicher a463353773 Add "empty_repo?" method to Repository role
Replaces two calls that this method simplifies
2012-09-04 12:05:21 -04:00
Robert Speicher d29827433d Update User#identifier to conform to Gitolite 2.x's user pattern
Also modifies the specs a bit because I can't help myself.

Closes #480
2012-09-04 00:20:17 -04:00
Robert Speicher 8db2a59d0b Add StaticModel role, and add it to Commit model
Instead of doing this:

    link_to(commit.id, project_commit_path(project, id: commit.id))
    Note.create(noteable_id: commit.id, noteable_type: "Commit", ...)

It lets us do this:

    link_to(commit.id, project_commit_path(project, commit))
    Note.create(noteable: commit, ...)
2012-09-02 13:40:07 -04:00
randx ad3a88cfd3 Prepared for gitolite v3 2012-08-29 02:03:04 +03:00
miks 2e76342d72 typo fixed 2012-09-08 12:37:23 +03:00
miks 2dc0519277 bulk access roles update/deletion added 2012-09-06 23:14:42 +03:00
randx 7cdc5b9e04 Use similar interface to access gitolite
Simplified gitolite handle logic
Stubn over monkeypatch
Stub only specific methods in Gitlab:Gitolite
Moved grach auth to lib
added specs for keys observer
removes SshKey role
2012-08-29 00:04:06 +03:00
Dmitriy Zaporozhets cb35a80e49 Merge pull request #993 from veprbl/fix_archiving_prefix
Download button: put files into a directory
2012-08-27 11:04:00 -07:00
randx f088eaa972 Refactoring & minor css changes 2012-08-21 21:26:56 +03:00
randx c625293b99 Handle post-receive files via gitolite, not gitlab 2012-08-21 20:14:06 +03:00
Robert Speicher 7754189187 Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
2012-08-10 18:25:15 -04:00
Robert Speicher b7f9b8223e Fix search class method for IssueCommonality
Also adds specs to the two affected classes that would have caught my
dumb mistake.
2012-08-09 13:45:12 -04:00
Robert Speicher f36f0dac9d Consolidate functionality shared between Issue and MergeRequest
Any associations, validations, delegates, scopes and methods that
were exactly the same in both Issue and MergeRequest models have been
moved to a new IssueCommonality module (role) that gets included by each
class.

There was actually quite a bit of duplication, because MergeRequests are
basically just specialized Issues.
2012-08-08 21:44:33 -04:00
Robert Speicher 7a4c958882 Add empty IssueCommonality module; include in Issue and MergeRequest 2012-08-08 21:26:56 -04:00
Dmitriy Zaporozhets 5926bbac12 Backend Refactoring 2012-07-31 08:32:49 +03:00
randx 2cf5a9efbc Better name for Project push methods module 2012-07-29 20:08:58 +03:00
tomykaira 03a2995e15 Fix #1009 Replace all special characters in user's identity 2012-07-28 22:05:25 +09:00
Dmitriy Zaporozhets 3063af5adc BaseContext
Controllers refactoring with contexts
Move commit compare logic to model
2012-07-20 08:39:34 +03:00
Valeriy Sizov 655418bed2 System hooks: fix broken tests 2012-07-19 00:25:10 +03:00
Valeriy Sizov 65dc68b35c Refactoring of hook functionality & bootsrap system hooks 2012-07-19 00:25:10 +03:00
Dmitriy Zaporozhets 9b337b8328 Epic: Gitlab configuration with default values 2012-07-02 21:51:48 +03:00
Saito 401340168c bypass gitolite update hook, and set an GL_USER variable. 2012-07-02 16:44:45 +08:00
Dmitry Kalinkin 87d2a763e6 fix archiving prefix 2012-06-27 21:21:44 +04:00
randx 77cf662034 Pushed widget improved 2012-06-21 18:41:22 +03:00