[Notice] Announcing the End of Demo Server [Read me]
백기선 2013-10-30
Merge pull request #174 from alecsiel/yobi refs/heads/pull-request
@5a366079d5a2bad7e72c5813f0fd6d70837c205e
app/controllers/CodeApp.java
--- app/controllers/CodeApp.java
+++ app/controllers/CodeApp.java
@@ -70,8 +70,8 @@
      * @param branch 브랜치 이름
      * @param path 파일 경로
      */
-	public static Result codeBrowserWithBranch(String userName, String projectName, String branch, String path)
-	    throws UnsupportedOperationException, IOException, SVNException, GitAPIException, ServletException, Exception {
+    public static Result codeBrowserWithBranch(String userName, String projectName, String branch, String path)
+        throws UnsupportedOperationException, IOException, SVNException, GitAPIException, ServletException, Exception {
         Project project = ProjectApp.getProject(userName, projectName);
 
         if (!RepositoryService.VCS_GIT.equals(project.vcs) && !RepositoryService.VCS_SUBVERSION.equals(project.vcs)) {
@@ -93,14 +93,14 @@
         
         return ok(view.render(project, branches, recursiveData, branch, path));
     }
-	
-	/**
-	 * AJAX 호출로 지정한 프로젝트 지정한 경로의 정보를 얻고자 할 때 사용된다
-	 * 
-	 * @param userName 프로젝트 소유자 이름
-	 * @param projectName 프로젝트 이름
-	 * @param path 파일 또는 폴더의 경로
-	 */
+    
+    /**
+     * AJAX 호출로 지정한 프로젝트 지정한 경로의 정보를 얻고자 할 때 사용된다
+     * 
+     * @param userName 프로젝트 소유자 이름
+     * @param projectName 프로젝트 이름
+     * @param path 파일 또는 폴더의 경로
+     */
     public static Result ajaxRequest(String userName, String projectName, String path) throws Exception{
         PlayRepository repository = RepositoryService.getRepository(userName, projectName);
         ObjectNode fileInfo = repository.getMetaDataFromPath(path);
app/controllers/HelpApp.java
--- app/controllers/HelpApp.java
+++ app/controllers/HelpApp.java
@@ -5,7 +5,7 @@
 import views.html.help.*;
 
 public class HelpApp extends Controller {
-	public static Result help() {
-		return ok(toc.render("title.help"));
-	}
+    public static Result help() {
+        return ok(toc.render("title.help"));
+    }
 }
app/controllers/ProjectApp.java
--- app/controllers/ProjectApp.java
+++ app/controllers/ProjectApp.java
@@ -44,21 +44,21 @@
  */
 public class ProjectApp extends Controller {
 
-	private static final int LOGO_FILE_LIMIT_SIZE = 1024*1000*5; //5M
+    private static final int LOGO_FILE_LIMIT_SIZE = 1024*1000*5; //5M
 
-	/** 프로젝트 로고로 사용할 수 있는 이미지 확장자 */
+    /** 프로젝트 로고로 사용할 수 있는 이미지 확장자 */
     public static final String[] LOGO_TYPE = {"jpg", "jpeg", "png", "gif", "bmp"};
 
     /** 자동완성에서 보여줄 최대 프로젝트 개수 */
     private static final int MAX_FETCH_PROJECTS = 1000;
 
-	private static final int COMMIT_HISTORY_PAGE = 0;
+    private static final int COMMIT_HISTORY_PAGE = 0;
 
-	private static final int COMMIT_HISTORY_SHOW_LIMIT = 10;
+    private static final int COMMIT_HISTORY_SHOW_LIMIT = 10;
 
-	private static final int RECENLTY_ISSUE_SHOW_LIMIT = 10;
+    private static final int RECENLTY_ISSUE_SHOW_LIMIT = 10;
 
-	private static final int RECENLTY_POSTING_SHOW_LIMIT = 10;
+    private static final int RECENLTY_POSTING_SHOW_LIMIT = 10;
 
     private static final int RECENT_PULL_REQUEST_SHOW_LIMIT = 10;
 
@@ -100,7 +100,7 @@
 
         if (project == null) {
             return notFound(ErrorViews.NotFound.render("error.notfound"));
-			// No project matches given parameters'" + loginId + "' and project_name '" + projectName + "'"));
+            // No project matches given parameters'" + loginId + "' and project_name '" + projectName + "'"));
         }
 
         project.fixInvalidForkData();
@@ -113,9 +113,9 @@
 
         List<Commit> commits = null;
         try {
-			commits = repository.getHistory(COMMIT_HISTORY_PAGE, COMMIT_HISTORY_SHOW_LIMIT, null, null);
+            commits = repository.getHistory(COMMIT_HISTORY_PAGE, COMMIT_HISTORY_SHOW_LIMIT, null, null);
         } catch (NoHeadException e) {
-		// NOOP
+        // NOOP
         }
 
         List<Issue> issues = Issue.findRecentlyCreated(project, RECENLTY_ISSUE_SHOW_LIMIT);
@@ -127,7 +127,7 @@
         return ok(overview.render("title.projectHome", project, histories));
     }
 
-	/**
+    /**
      * 신규 프로젝트 생성 페이지로 이동한다.<p />
      *
      * 비로그인 상태({@link models.User#anonymous})이면 로그인 경고메세지와 함께 로그인페이지로 redirect 된다.<br />
@@ -273,9 +273,9 @@
      * @param filePart
      * @return {@code filePart}가 null이면 true, {@code filename}이 null이면 true, {@code fileLength}가 0 이하이면 true
      */
-	private static boolean isEmptyFilePart(FilePart filePart) {
-		return filePart == null || filePart.getFilename() == null || filePart.getFilename().length() <= 0;
-	}
+    private static boolean isEmptyFilePart(FilePart filePart) {
+        return filePart == null || filePart.getFilename() == null || filePart.getFilename().length() <= 0;
+    }
 
     /**
      * {@code filename}의 확장자를 체크하여 이미지인지 확인한다.<p />
@@ -321,7 +321,7 @@
     /**
      * 프로젝트를 삭제한다.<p />
      *
-	 * {@code loginId}와 {@code projectName}으로 프로젝트 정보를 가져온다.<br />
+     * {@code loginId}와 {@code projectName}으로 프로젝트 정보를 가져온다.<br />
      * 삭제 권한이 없을 경우는 경고 메시지와 함께 설정페이지로 redirect된다. <br />
      *
      * @param loginId the user login id
app/controllers/StatisticsApp.java
--- app/controllers/StatisticsApp.java
+++ app/controllers/StatisticsApp.java
@@ -7,11 +7,11 @@
 import views.html.project.statistics;
 
 public class StatisticsApp extends Controller {
-	public static Result statistics(String userName, String projectName) {
-		Project project = Project.findByOwnerAndProjectName(userName, projectName);
-		if (project == null) {
-		    return notFound(ErrorViews.NotFound.render("error.notfound"));
-		}
-		return ok(statistics.render("statistics", project));
-	}
+    public static Result statistics(String userName, String projectName) {
+        Project project = Project.findByOwnerAndProjectName(userName, projectName);
+        if (project == null) {
+            return notFound(ErrorViews.NotFound.render("error.notfound"));
+        }
+        return ok(statistics.render("statistics", project));
+    }
 }
app/models/AbstractPosting.java
--- app/models/AbstractPosting.java
+++ app/models/AbstractPosting.java
@@ -161,26 +161,26 @@
 
     public Resource asResource(final ResourceType type) {
         return new Resource() {
-	        @Override
-	        public String getId() {
-	            return id.toString();
-	        }
+            @Override
+            public String getId() {
+                return id.toString();
+            }
 
-	        @Override
-	        public Project getProject() {
-	            return project;
-	        }
+            @Override
+            public Project getProject() {
+                return project;
+            }
 
-	        @Override
-	        public ResourceType getType() {
+            @Override
+            public ResourceType getType() {
                 return type;
-	        }
+            }
 
             @Override
             public Long getAuthorId() {
                 return authorId;
             }
-	    };
+        };
     }
 
     /**
app/models/Issue.java
--- app/models/Issue.java
+++ app/models/Issue.java
@@ -253,13 +253,13 @@
     // FIXME 이것이 없이 테스트는 잘 작동하나, view에서 댓글이 달린 이슈들을 필터링하는 라디오버튼을 작동시에 이 메쏘드에서
     // 시행하는 동기화 작업 없이는 작동을 하지 않는다.
 
-	public boolean isOpen() {
-	    return this.state == State.OPEN;
-	}
+    public boolean isOpen() {
+        return this.state == State.OPEN;
+    }
 
-	public boolean isClosed() {
-	    return this.state == State.CLOSED;
-	}
+    public boolean isClosed() {
+        return this.state == State.CLOSED;
+    }
 
     @Override
     public Resource asResource() {
app/models/Milestone.java
--- app/models/Milestone.java
+++ app/models/Milestone.java
@@ -65,11 +65,11 @@
     }
 
     public int getNumClosedIssues() {
-    	return Issue.finder.where().eq("milestone", this).eq("state", State.CLOSED).findRowCount();
+        return Issue.finder.where().eq("milestone", this).eq("state", State.CLOSED).findRowCount();
     }
 
     public int getNumOpenIssues() {
-    	return Issue.finder.where().eq("milestone", this).eq("state", State.OPEN).findRowCount();
+        return Issue.finder.where().eq("milestone", this).eq("state", State.OPEN).findRowCount();
     }
 
     public List<Issue> sortedByNumberOfIssue(){
@@ -182,11 +182,11 @@
     public static List<Milestone> findMilestones(Long projectId,
                                                  State state, String sort, final Direction direction) {
 
-    	OrderParams orderParams = new OrderParams();
+        OrderParams orderParams = new OrderParams();
 
-    	if(!"completionRate".equals(sort)) {
-		orderParams.add(sort, direction);
-    	}
+        if(!"completionRate".equals(sort)) {
+        orderParams.add(sort, direction);
+        }
 
         SearchParams searchParams = new SearchParams().add("project.id", projectId, Matching.EQUALS);
         if(state != null && state != State.ALL) {
@@ -196,19 +196,19 @@
         List<Milestone> milestones = FinderTemplate.findBy(orderParams, searchParams, find);
 
         if("completionRate".equals(sort)) {
-        	Collections.sort(milestones, new Comparator<Milestone>() {
-				@Override
-				public int compare(Milestone o1, Milestone o2) {
-					int o1CompletionRate = o1.getCompletionRate();
-					int o2CompletionRate = o2.getCompletionRate();
+            Collections.sort(milestones, new Comparator<Milestone>() {
+                @Override
+                public int compare(Milestone o1, Milestone o2) {
+                    int o1CompletionRate = o1.getCompletionRate();
+                    int o2CompletionRate = o2.getCompletionRate();
 
-					if(direction == Direction.ASC) {
-				        return (o1CompletionRate < o2CompletionRate ? -1 : (o1CompletionRate == o2CompletionRate ? 0 : 1));
-					} else {
-						return (o1CompletionRate < o2CompletionRate ? 1 : (o1CompletionRate == o2CompletionRate ? 0 : -1));
-					}
-				}
-			});
+                    if(direction == Direction.ASC) {
+                        return (o1CompletionRate < o2CompletionRate ? -1 : (o1CompletionRate == o2CompletionRate ? 0 : 1));
+                    } else {
+                        return (o1CompletionRate < o2CompletionRate ? 1 : (o1CompletionRate == o2CompletionRate ? 0 : -1));
+                    }
+                }
+            });
         }
 
         return milestones;
app/models/support/Options.java
--- app/models/support/Options.java
+++ app/models/support/Options.java
@@ -3,11 +3,11 @@
 import java.util.*;
 
 public class Options extends LinkedHashMap<String, String> {
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public Options(String... args) {
-		for (int idx = 0; idx < args.length; idx++) {
-			this.put(String.valueOf(idx + 1), args[idx]);
-		}
-	}
+    public Options(String... args) {
+        for (int idx = 0; idx < args.length; idx++) {
+            this.put(String.valueOf(idx + 1), args[idx]);
+        }
+    }
 }
app/playRepository/FileDiff.java
--- app/playRepository/FileDiff.java
+++ app/playRepository/FileDiff.java
@@ -29,81 +29,81 @@
     /**
      * Get list of hunks
      *
-	 * @throws java.io.IOException
-	 */
-	public List<Hunk> getHunks()
-			throws IOException {
+     * @throws java.io.IOException
+     */
+    public List<Hunk> getHunks()
+            throws IOException {
 
         List<Hunk> hunks = new ArrayList<>();
 
-		for (int curIdx = 0; curIdx < editList.size();) {
+        for (int curIdx = 0; curIdx < editList.size();) {
             Hunk hunk = new Hunk();
-			Edit curEdit = editList.get(curIdx);
-			final int endIdx = findCombinedEnd(editList, curIdx);
-			final Edit endEdit = editList.get(endIdx);
+            Edit curEdit = editList.get(curIdx);
+            final int endIdx = findCombinedEnd(editList, curIdx);
+            final Edit endEdit = editList.get(endIdx);
 
-			int aCur = Math.max(0, curEdit.getBeginA() - context);
-			int bCur = Math.max(0, curEdit.getBeginB() - context);
-			final int aEnd = Math.min(a.size(), endEdit.getEndA() + context);
-			final int bEnd = Math.min(b.size(), endEdit.getEndB() + context);
+            int aCur = Math.max(0, curEdit.getBeginA() - context);
+            int bCur = Math.max(0, curEdit.getBeginB() - context);
+            final int aEnd = Math.min(a.size(), endEdit.getEndA() + context);
+            final int bEnd = Math.min(b.size(), endEdit.getEndB() + context);
 
             hunk.beginA = aCur;
             hunk.endA = aEnd;
             hunk.beginB = bCur;
             hunk.endB = bEnd;
 
-			while (aCur < aEnd || bCur < bEnd) {
-				if (aCur < curEdit.getBeginA() || endIdx + 1 < curIdx) {
+            while (aCur < aEnd || bCur < bEnd) {
+                if (aCur < curEdit.getBeginA() || endIdx + 1 < curIdx) {
                     hunk.lines.add(new DiffLine(this, DiffLineType.CONTEXT, aCur, bCur,
                             a.getString(aCur)));
-					isEndOfLineMissing = checkEndOfLineMissing(a, aCur);
-					aCur++;
-					bCur++;
-				} else if (aCur < curEdit.getEndA()) {
+                    isEndOfLineMissing = checkEndOfLineMissing(a, aCur);
+                    aCur++;
+                    bCur++;
+                } else if (aCur < curEdit.getEndA()) {
                     hunk.lines.add(new DiffLine(this, DiffLineType.REMOVE, aCur, bCur,
                             a.getString(aCur)));
                     isEndOfLineMissing = checkEndOfLineMissing(a, aCur);
-					aCur++;
-				} else if (bCur < curEdit.getEndB()) {
+                    aCur++;
+                } else if (bCur < curEdit.getEndB()) {
                     hunk.lines.add(new DiffLine(this, DiffLineType.ADD, aCur, bCur,
                             b.getString(bCur)));
                     isEndOfLineMissing = checkEndOfLineMissing(a, aCur);
-					bCur++;
-				}
+                    bCur++;
+                }
 
-				if (end(curEdit, aCur, bCur) && ++curIdx < editList.size())
-					curEdit = editList.get(curIdx);
-			}
+                if (end(curEdit, aCur, bCur) && ++curIdx < editList.size())
+                    curEdit = editList.get(curIdx);
+            }
 
             hunks.add(hunk);
-		}
+        }
 
         return hunks;
-	}
+    }
 
     private int findCombinedEnd(final List<Edit> edits, final int i) {
-		int end = i + 1;
-		while (end < edits.size()
-				&& (combineA(edits, end) || combineB(edits, end)))
-			end++;
-		return end - 1;
-	}
+        int end = i + 1;
+        while (end < edits.size()
+                && (combineA(edits, end) || combineB(edits, end)))
+            end++;
+        return end - 1;
+    }
 
     private boolean combineA(final List<Edit> e, final int i) {
-		return e.get(i).getBeginA() - e.get(i - 1).getEndA() <= 2 * context;
-	}
+        return e.get(i).getBeginA() - e.get(i - 1).getEndA() <= 2 * context;
+    }
 
-	private boolean combineB(final List<Edit> e, final int i) {
-		return e.get(i).getBeginB() - e.get(i - 1).getEndB() <= 2 * context;
-	}
+    private boolean combineB(final List<Edit> e, final int i) {
+        return e.get(i).getBeginB() - e.get(i - 1).getEndB() <= 2 * context;
+    }
 
-	private static boolean end(final Edit edit, final int a, final int b) {
-		return edit.getEndA() <= a && edit.getEndB() <= b;
-	}
+    private static boolean end(final Edit edit, final int a, final int b) {
+        return edit.getEndA() <= a && edit.getEndB() <= b;
+    }
 
     private boolean checkEndOfLineMissing(final RawText text, final int line) {
-		return line + 1 == text.size() && text.isMissingNewlineAtEnd();
-	}
+        return line + 1 == text.size() && text.isMissingNewlineAtEnd();
+    }
 
     /**
      * 주어진 줄 번호와 관련된 diff만 남기고 나머지는 모두 버린다.
app/utils/Constants.java
--- app/utils/Constants.java
+++ app/utils/Constants.java
@@ -1,9 +1,9 @@
 package utils;
 
 public class Constants {
-	public static final String WARNING = "warning";
-	public static final String INFO = "info";
-	public static final String SUCCESS = "success";
+    public static final String WARNING = "warning";
+    public static final String INFO = "info";
+    public static final String SUCCESS = "success";
 
     public static final String DEFAULT_LOGO_PATH = "public/uploadFiles/";
 
app/utils/MenuType.java
--- app/utils/MenuType.java
+++ app/utils/MenuType.java
@@ -1,7 +1,7 @@
 package utils;
 
 public enum MenuType {
-	SITE_HOME(1), NEW_PROJECT(2), PROJECTS(3), HELP(4), SITE_SETTING(5), USER(6),
+    SITE_HOME(1), NEW_PROJECT(2), PROJECTS(3), HELP(4), SITE_SETTING(5), USER(6),
     PROJECT_HOME(100), BOARD(101), CODE(102), ISSUE(103), TASK(104), PROJECT_SETTING(105), MILESTONE(106), PULL_REQUEST(107), NONE(0);
 
     private int type;
app/utils/TemplateHelper.scala
--- app/utils/TemplateHelper.scala
+++ app/utils/TemplateHelper.scala
@@ -80,7 +80,7 @@
   }
 
   def getJSPath(): String = {
-	routes.Assets.at("javascripts/").toString
+    routes.Assets.at("javascripts/").toString
   }
 
   def nullOrEquals(a: String, b: String) = (a == null || b == null) ||  a.equals(b)
app/views/code/history.scala.html
--- app/views/code/history.scala.html
+++ app/views/code/history.scala.html
@@ -165,7 +165,7 @@
                                 case (user: User, _, _) if !user.isAnonymous => {
 
                                     <a href="@routes.UserApp.userInfo(commit.getAuthor.loginId)" class="avatar-wrap">
-                                    @if( user.avatarUrl == UserApp.DEFAULT_AVATAR_URL ){
+                                    @if(user.avatarUrl == UserApp.DEFAULT_AVATAR_URL){
                                         @if(commit.getAuthorEmail != null) {
                                             <img src="@urlToPicture(commit.getAuthorEmail, 32)">
                                         } else {
app/views/issue/view.scala.html
--- app/views/issue/view.scala.html
+++ app/views/issue/view.scala.html
@@ -73,7 +73,7 @@
             @**<!--
             <div class="div btn-group btn-flat">
             @for(state <- Issue.availableStates){
-                @if( state.state == issue.state.state ){
+                @if(state.state == issue.state.state){
                 <a @if(isAllowed(UserApp.currentUser(), issue.asResource(), Operation.UPDATE)) {href="@routes.IssueApp.nextState(project.owner, project.name, issue.getNumber)"} class="btn active @isFirstState(issue.state) no-gradient">@Messages("issue.state." + issue.state.state)</a>
                 } else {
                 <a @if(isAllowed(UserApp.currentUser(), issue.asResource(), Operation.UPDATE)) {href="@routes.IssueApp.nextState(project.owner, project.name, issue.getNumber)"} class="btn no-gradient">@Messages("issue.state." + state.state)</a>
app/views/milestone/create.scala.html
--- app/views/milestone/create.scala.html
+++ app/views/milestone/create.scala.html
@@ -65,14 +65,14 @@
             contentType: 'application/json',
             url: "@routes.ProjectApp.mentionList(project.owner, project.name)",
             dataType: "json"
-        }).done(function( data ) {
+        }).done(function(data){ 
             memebrList.users = data;
             $("#contents").mention(memebrList);
         });
     }
 
     $("#contents" ).keypress(function(event){
-        if( event.which == 64 ){ // 64 = at
+        if(event.which == 64){ // 64 = at
             _findUserList();
         }
     });
@@ -91,4 +91,4 @@
 		});
 	});
 </script>
-}
(No newline at end of file)
+}
app/views/milestone/edit.scala.html
--- app/views/milestone/edit.scala.html
+++ app/views/milestone/edit.scala.html
@@ -70,14 +70,14 @@
             contentType: 'application/json',
             url: "@routes.ProjectApp.mentionList(project.owner, project.name)",
             dataType: "json"
-        }).done(function( data ) {
+        }).done(function(data){
             memebrList.users = data;
             $("#body").mention(memebrList);
         });
     }
 
     $("#contents" ).keypress(function(event){
-        if( event.which == 64 ){ // 64 = at
+        if(event.which == 64){ // 64 = at
             _findUserList();
         }
     });
@@ -96,4 +96,4 @@
         });
     });
 </script>
-}
(No newline at end of file)
+}
app/views/project/members.scala.html
--- app/views/project/members.scala.html
+++ app/views/project/members.scala.html
@@ -26,7 +26,7 @@
     <div class="bubble-wrap gray" style="overflow:visible">
         <ul class="members project">
             @for(member <- members){
-                @if( member.user != null){
+                @if(member.user != null){
 
             <li class="member">
                 <a href="@routes.UserApp.userInfo(member.user.loginId)" class="avatar-wrap large pull-left">
@@ -116,4 +116,4 @@
    });
 </script>
 
-}
(No newline at end of file)
+}
app/views/site/partial_pagination.scala.html
--- app/views/site/partial_pagination.scala.html
+++ app/views/site/partial_pagination.scala.html
@@ -25,7 +25,7 @@
             @makeLink(x + "", x)
         }
     } else {
-        @for( x <- (currentPageNum - pageNum/2 to currentPageNum + pageNum/2)){
+        @for(x <- (currentPageNum - pageNum/2 to currentPageNum + pageNum/2)){
             @makeLink(x + "", x)
         }
     }
@@ -43,4 +43,4 @@
     <li class="@if((page.getPageIndex + 1).equals(index)){active}">
       <a href="@(listUrl + "?pageNum=" + index)" pageNum="@index">@title</a>
     </li>
-}
(No newline at end of file)
+}
app/views/site/partial_paginationForUserList.scala.html
--- app/views/site/partial_paginationForUserList.scala.html
+++ app/views/site/partial_paginationForUserList.scala.html
@@ -25,7 +25,7 @@
             @makeLink(x + "", x)
         }
     } else {
-        @for( x <- (currentPageNum - pageNum/2 to currentPageNum + pageNum/2)){
+        @for(x <- (currentPageNum - pageNum/2 to currentPageNum + pageNum/2)){
             @makeLink(x + "", x)
         }
     }
@@ -43,4 +43,4 @@
     <li class="@if((page.getPageIndex + 1).equals(index)){active}">
       <a href="@routes.SiteApp.userList(index - 1)" pageNum="@index">@title</a>
     </li>
-}
(No newline at end of file)
+}
Add a comment
List