summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/gitblit/FederationClientLauncher.java54
-rw-r--r--src/com/gitblit/client/GitblitManagerLauncher.java112
-rw-r--r--src/main/config/checkstyle.xml108
-rw-r--r--src/main/distrib/data/certs/authority.conf7
-rw-r--r--src/main/distrib/data/certs/instructions.tmpl123
-rw-r--r--src/main/distrib/data/certs/mail.tmpl7
-rw-r--r--src/main/distrib/data/gitblit.properties1311
-rw-r--r--src/main/distrib/data/groovy/.gitignore1
-rw-r--r--src/main/distrib/data/groovy/blockpush.groovy94
-rw-r--r--src/main/distrib/data/groovy/jenkins.groovy76
-rw-r--r--src/main/distrib/data/groovy/localclone.groovy106
-rw-r--r--src/main/distrib/data/groovy/protect-refs.groovy113
-rw-r--r--src/main/distrib/data/groovy/sendmail-html.groovy516
-rw-r--r--src/main/distrib/data/groovy/sendmail.groovy176
-rw-r--r--src/main/distrib/data/groovy/thebuggenie.groovy88
-rw-r--r--src/main/distrib/data/projects.conf3
-rw-r--r--src/main/distrib/data/users.conf4
-rw-r--r--src/main/distrib/federation.properties83
-rw-r--r--src/main/distrib/groovy/fogbugz.groovy167
-rw-r--r--src/main/distrib/linux/add-indexed-branch.sh21
-rw-r--r--src/main/distrib/linux/authority.sh2
-rw-r--r--src/main/distrib/linux/gitblit-stop.sh2
-rw-r--r--src/main/distrib/linux/gitblit.sh2
-rw-r--r--src/main/distrib/linux/install-service-centos.sh3
-rw-r--r--src/main/distrib/linux/install-service-ubuntu.sh3
-rw-r--r--src/main/distrib/linux/java-proxy-config.sh25
-rw-r--r--src/main/distrib/linux/service-centos.sh51
-rw-r--r--src/main/distrib/linux/service-ubuntu.sh48
-rw-r--r--src/main/distrib/win/add-indexed-branch.cmd20
-rw-r--r--src/main/distrib/win/authority.cmd1
-rw-r--r--src/main/distrib/win/gitblit-stop.cmd1
-rw-r--r--src/main/distrib/win/gitblit.cmd1
-rw-r--r--src/main/distrib/win/installService.cmd38
-rw-r--r--src/main/distrib/win/uninstallService.cmd5
-rw-r--r--src/main/java/WEB-INF/reference.properties1311
-rw-r--r--src/main/java/WEB-INF/web.xml (renamed from src/WEB-INF/web.xml)0
-rw-r--r--src/main/java/com/gitblit/.gitignore (renamed from src/com/gitblit/.gitignore)0
-rw-r--r--src/main/java/com/gitblit/AccessRestrictionFilter.java (renamed from src/com/gitblit/AccessRestrictionFilter.java)0
-rw-r--r--src/main/java/com/gitblit/AddIndexedBranch.java (renamed from src/com/gitblit/AddIndexedBranch.java)0
-rw-r--r--src/main/java/com/gitblit/AuthenticationFilter.java (renamed from src/com/gitblit/AuthenticationFilter.java)0
-rw-r--r--src/main/java/com/gitblit/ConfigUserService.java (renamed from src/com/gitblit/ConfigUserService.java)0
-rw-r--r--src/main/java/com/gitblit/Constants.java (renamed from src/com/gitblit/Constants.java)51
-rw-r--r--src/main/java/com/gitblit/DownloadZipFilter.java (renamed from src/com/gitblit/DownloadZipFilter.java)0
-rw-r--r--src/main/java/com/gitblit/DownloadZipServlet.java (renamed from src/com/gitblit/DownloadZipServlet.java)0
-rw-r--r--src/main/java/com/gitblit/EnforceAuthenticationFilter.java102
-rw-r--r--src/main/java/com/gitblit/FederationClient.java (renamed from src/com/gitblit/FederationClient.java)2
-rw-r--r--src/main/java/com/gitblit/FederationPullExecutor.java (renamed from src/com/gitblit/FederationPullExecutor.java)0
-rw-r--r--src/main/java/com/gitblit/FederationServlet.java (renamed from src/com/gitblit/FederationServlet.java)0
-rw-r--r--src/main/java/com/gitblit/FileSettings.java (renamed from src/com/gitblit/FileSettings.java)0
-rw-r--r--src/main/java/com/gitblit/FileUserService.java (renamed from src/com/gitblit/FileUserService.java)0
-rw-r--r--src/main/java/com/gitblit/GCExecutor.java (renamed from src/com/gitblit/GCExecutor.java)0
-rw-r--r--src/main/java/com/gitblit/GitBlit.java (renamed from src/com/gitblit/GitBlit.java)0
-rw-r--r--src/main/java/com/gitblit/GitBlitException.java (renamed from src/com/gitblit/GitBlitException.java)0
-rw-r--r--src/main/java/com/gitblit/GitBlitServer.java (renamed from src/com/gitblit/GitBlitServer.java)0
-rw-r--r--src/main/java/com/gitblit/GitFilter.java (renamed from src/com/gitblit/GitFilter.java)0
-rw-r--r--src/main/java/com/gitblit/GitServlet.java (renamed from src/com/gitblit/GitServlet.java)0
-rw-r--r--src/main/java/com/gitblit/GitblitSslContextFactory.java (renamed from src/com/gitblit/GitblitSslContextFactory.java)0
-rw-r--r--src/main/java/com/gitblit/GitblitTrustManager.java (renamed from src/com/gitblit/GitblitTrustManager.java)0
-rw-r--r--src/main/java/com/gitblit/GitblitUserService.java (renamed from src/com/gitblit/GitblitUserService.java)0
-rw-r--r--src/main/java/com/gitblit/IStoredSettings.java (renamed from src/com/gitblit/IStoredSettings.java)0
-rw-r--r--src/main/java/com/gitblit/IUserService.java (renamed from src/com/gitblit/IUserService.java)0
-rw-r--r--src/main/java/com/gitblit/JsonServlet.java (renamed from src/com/gitblit/JsonServlet.java)0
-rw-r--r--src/main/java/com/gitblit/LdapUserService.java (renamed from src/com/gitblit/LdapUserService.java)0
-rw-r--r--src/main/java/com/gitblit/LuceneExecutor.java (renamed from src/com/gitblit/LuceneExecutor.java)0
-rw-r--r--src/main/java/com/gitblit/MailExecutor.java (renamed from src/com/gitblit/MailExecutor.java)0
-rw-r--r--src/main/java/com/gitblit/PagesFilter.java (renamed from src/com/gitblit/PagesFilter.java)0
-rw-r--r--src/main/java/com/gitblit/PagesServlet.java (renamed from src/com/gitblit/PagesServlet.java)0
-rw-r--r--src/main/java/com/gitblit/RedmineUserService.java (renamed from src/com/gitblit/RedmineUserService.java)0
-rw-r--r--src/main/java/com/gitblit/RobotsTxtServlet.java (renamed from src/com/gitblit/RobotsTxtServlet.java)0
-rw-r--r--src/main/java/com/gitblit/RpcFilter.java (renamed from src/com/gitblit/RpcFilter.java)0
-rw-r--r--src/main/java/com/gitblit/RpcServlet.java (renamed from src/com/gitblit/RpcServlet.java)0
-rw-r--r--src/main/java/com/gitblit/ServletRequestWrapper.java (renamed from src/com/gitblit/ServletRequestWrapper.java)0
-rw-r--r--src/main/java/com/gitblit/SyndicationFilter.java (renamed from src/com/gitblit/SyndicationFilter.java)0
-rw-r--r--src/main/java/com/gitblit/SyndicationServlet.java (renamed from src/com/gitblit/SyndicationServlet.java)0
-rw-r--r--src/main/java/com/gitblit/WebXmlSettings.java (renamed from src/com/gitblit/WebXmlSettings.java)0
-rw-r--r--src/main/java/com/gitblit/authority/AuthorityWorker.java (renamed from src/com/gitblit/authority/AuthorityWorker.java)0
-rw-r--r--src/main/java/com/gitblit/authority/CertificateStatus.java (renamed from src/com/gitblit/authority/CertificateStatus.java)0
-rw-r--r--src/main/java/com/gitblit/authority/CertificateStatusRenderer.java (renamed from src/com/gitblit/authority/CertificateStatusRenderer.java)0
-rw-r--r--src/main/java/com/gitblit/authority/CertificatesTableModel.java (renamed from src/com/gitblit/authority/CertificatesTableModel.java)0
-rw-r--r--src/main/java/com/gitblit/authority/DefaultOidsPanel.java (renamed from src/com/gitblit/authority/DefaultOidsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/authority/GitblitAuthority.java (renamed from src/com/gitblit/authority/GitblitAuthority.java)2
-rw-r--r--src/main/java/com/gitblit/authority/Launcher.java (renamed from src/com/gitblit/authority/GitblitAuthorityLauncher.java)86
-rw-r--r--src/main/java/com/gitblit/authority/NewCertificateConfig.java (renamed from src/com/gitblit/authority/NewCertificateConfig.java)0
-rw-r--r--src/main/java/com/gitblit/authority/NewClientCertificateDialog.java (renamed from src/com/gitblit/authority/NewClientCertificateDialog.java)0
-rw-r--r--src/main/java/com/gitblit/authority/NewSSLCertificateDialog.java (renamed from src/com/gitblit/authority/NewSSLCertificateDialog.java)0
-rw-r--r--src/main/java/com/gitblit/authority/RequestFocusListener.java (renamed from src/com/gitblit/authority/RequestFocusListener.java)0
-rw-r--r--src/main/java/com/gitblit/authority/UserCertificateConfig.java (renamed from src/com/gitblit/authority/UserCertificateConfig.java)0
-rw-r--r--src/main/java/com/gitblit/authority/UserCertificateModel.java (renamed from src/com/gitblit/authority/UserCertificateModel.java)0
-rw-r--r--src/main/java/com/gitblit/authority/UserCertificatePanel.java (renamed from src/com/gitblit/authority/UserCertificatePanel.java)0
-rw-r--r--src/main/java/com/gitblit/authority/UserCertificateTableModel.java (renamed from src/com/gitblit/authority/UserCertificateTableModel.java)0
-rw-r--r--src/main/java/com/gitblit/authority/UserOidsPanel.java (renamed from src/com/gitblit/authority/UserOidsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/authority/Utils.java (renamed from src/com/gitblit/authority/Utils.java)0
-rw-r--r--src/main/java/com/gitblit/authority/X509CertificateViewer.java (renamed from src/com/gitblit/authority/X509CertificateViewer.java)0
-rw-r--r--src/main/java/com/gitblit/build/Build.java (renamed from src/com/gitblit/build/Build.java)0
-rw-r--r--src/main/java/com/gitblit/build/BuildGhPages.java (renamed from src/com/gitblit/build/BuildGhPages.java)0
-rw-r--r--src/main/java/com/gitblit/build/BuildSite.java (renamed from src/com/gitblit/build/BuildSite.java)0
-rw-r--r--src/main/java/com/gitblit/build/BuildThumbnails.java (renamed from src/com/gitblit/build/BuildThumbnails.java)0
-rw-r--r--src/main/java/com/gitblit/build/BuildWebXml.java (renamed from src/com/gitblit/build/BuildWebXml.java)0
-rw-r--r--src/main/java/com/gitblit/client/BooleanCellRenderer.java (renamed from src/com/gitblit/client/BooleanCellRenderer.java)0
-rw-r--r--src/main/java/com/gitblit/client/BranchRenderer.java (renamed from src/com/gitblit/client/BranchRenderer.java)0
-rw-r--r--src/main/java/com/gitblit/client/ClosableTabComponent.java (renamed from src/com/gitblit/client/ClosableTabComponent.java)0
-rw-r--r--src/main/java/com/gitblit/client/DateCellRenderer.java (renamed from src/com/gitblit/client/DateCellRenderer.java)0
-rw-r--r--src/main/java/com/gitblit/client/EditRegistrationDialog.java (renamed from src/com/gitblit/client/EditRegistrationDialog.java)0
-rw-r--r--src/main/java/com/gitblit/client/EditRepositoryDialog.java (renamed from src/com/gitblit/client/EditRepositoryDialog.java)0
-rw-r--r--src/main/java/com/gitblit/client/EditTeamDialog.java (renamed from src/com/gitblit/client/EditTeamDialog.java)0
-rw-r--r--src/main/java/com/gitblit/client/EditUserDialog.java (renamed from src/com/gitblit/client/EditUserDialog.java)0
-rw-r--r--src/main/java/com/gitblit/client/FeedEntryTableModel.java (renamed from src/com/gitblit/client/FeedEntryTableModel.java)0
-rw-r--r--src/main/java/com/gitblit/client/FeedsPanel.java (renamed from src/com/gitblit/client/FeedsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/client/FeedsTableModel.java (renamed from src/com/gitblit/client/FeedsTableModel.java)0
-rw-r--r--src/main/java/com/gitblit/client/GitblitClient.java (renamed from src/com/gitblit/client/GitblitClient.java)0
-rw-r--r--src/main/java/com/gitblit/client/GitblitManager.java (renamed from src/com/gitblit/client/GitblitManager.java)2
-rw-r--r--src/main/java/com/gitblit/client/GitblitManagerLauncher.java (renamed from src/com/gitblit/Launcher.java)115
-rw-r--r--src/main/java/com/gitblit/client/GitblitPanel.java (renamed from src/com/gitblit/client/GitblitPanel.java)0
-rw-r--r--src/main/java/com/gitblit/client/GitblitRegistration.java (renamed from src/com/gitblit/client/GitblitRegistration.java)0
-rw-r--r--src/main/java/com/gitblit/client/GitblitWorker.java (renamed from src/com/gitblit/client/GitblitWorker.java)0
-rw-r--r--src/main/java/com/gitblit/client/HeaderPanel.java (renamed from src/com/gitblit/client/HeaderPanel.java)0
-rw-r--r--src/main/java/com/gitblit/client/IndicatorsRenderer.java (renamed from src/com/gitblit/client/IndicatorsRenderer.java)0
-rw-r--r--src/main/java/com/gitblit/client/JPalette.java (renamed from src/com/gitblit/client/JPalette.java)0
-rw-r--r--src/main/java/com/gitblit/client/MessageRenderer.java (renamed from src/com/gitblit/client/MessageRenderer.java)0
-rw-r--r--src/main/java/com/gitblit/client/NameRenderer.java (renamed from src/com/gitblit/client/NameRenderer.java)0
-rw-r--r--src/main/java/com/gitblit/client/PropertiesTableModel.java (renamed from src/com/gitblit/client/PropertiesTableModel.java)0
-rw-r--r--src/main/java/com/gitblit/client/RegistrantPermissionsPanel.java (renamed from src/com/gitblit/client/RegistrantPermissionsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/client/RegistrantPermissionsTableModel.java (renamed from src/com/gitblit/client/RegistrantPermissionsTableModel.java)0
-rw-r--r--src/main/java/com/gitblit/client/RegistrationsDialog.java (renamed from src/com/gitblit/client/RegistrationsDialog.java)0
-rw-r--r--src/main/java/com/gitblit/client/RegistrationsTableModel.java (renamed from src/com/gitblit/client/RegistrationsTableModel.java)0
-rw-r--r--src/main/java/com/gitblit/client/RepositoriesPanel.java (renamed from src/com/gitblit/client/RepositoriesPanel.java)0
-rw-r--r--src/main/java/com/gitblit/client/RepositoriesTableModel.java (renamed from src/com/gitblit/client/RepositoriesTableModel.java)0
-rw-r--r--src/main/java/com/gitblit/client/SearchDialog.java (renamed from src/com/gitblit/client/SearchDialog.java)0
-rw-r--r--src/main/java/com/gitblit/client/SettingCellRenderer.java (renamed from src/com/gitblit/client/SettingCellRenderer.java)0
-rw-r--r--src/main/java/com/gitblit/client/SettingPanel.java (renamed from src/com/gitblit/client/SettingPanel.java)0
-rw-r--r--src/main/java/com/gitblit/client/SettingsPanel.java (renamed from src/com/gitblit/client/SettingsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/client/SettingsTableModel.java (renamed from src/com/gitblit/client/SettingsTableModel.java)0
-rw-r--r--src/main/java/com/gitblit/client/StatusPanel.java (renamed from src/com/gitblit/client/StatusPanel.java)0
-rw-r--r--src/main/java/com/gitblit/client/SubscribedRepositoryRenderer.java (renamed from src/com/gitblit/client/SubscribedRepositoryRenderer.java)0
-rw-r--r--src/main/java/com/gitblit/client/SubscriptionsDialog.java (renamed from src/com/gitblit/client/SubscriptionsDialog.java)0
-rw-r--r--src/main/java/com/gitblit/client/TeamsPanel.java (renamed from src/com/gitblit/client/TeamsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/client/TeamsTableModel.java (renamed from src/com/gitblit/client/TeamsTableModel.java)0
-rw-r--r--src/main/java/com/gitblit/client/Translation.java (renamed from src/com/gitblit/client/Translation.java)0
-rw-r--r--src/main/java/com/gitblit/client/UsersPanel.java (renamed from src/com/gitblit/client/UsersPanel.java)0
-rw-r--r--src/main/java/com/gitblit/client/UsersTableModel.java (renamed from src/com/gitblit/client/UsersTableModel.java)0
-rw-r--r--src/main/java/com/gitblit/client/Utils.java (renamed from src/com/gitblit/client/Utils.java)0
-rw-r--r--src/main/java/com/gitblit/client/splash.png (renamed from src/com/gitblit/client/splash.png)bin11593 -> 11593 bytes
-rw-r--r--src/main/java/com/gitblit/fanout/FanoutClient.java (renamed from src/com/gitblit/fanout/FanoutClient.java)0
-rw-r--r--src/main/java/com/gitblit/fanout/FanoutConstants.java (renamed from src/com/gitblit/fanout/FanoutConstants.java)0
-rw-r--r--src/main/java/com/gitblit/fanout/FanoutNioService.java (renamed from src/com/gitblit/fanout/FanoutNioService.java)0
-rw-r--r--src/main/java/com/gitblit/fanout/FanoutService.java (renamed from src/com/gitblit/fanout/FanoutService.java)0
-rw-r--r--src/main/java/com/gitblit/fanout/FanoutServiceConnection.java (renamed from src/com/gitblit/fanout/FanoutServiceConnection.java)0
-rw-r--r--src/main/java/com/gitblit/fanout/FanoutSocketService.java (renamed from src/com/gitblit/fanout/FanoutSocketService.java)0
-rw-r--r--src/main/java/com/gitblit/fanout/FanoutStats.java (renamed from src/com/gitblit/fanout/FanoutStats.java)0
-rw-r--r--src/main/java/com/gitblit/models/Activity.java (renamed from src/com/gitblit/models/Activity.java)0
-rw-r--r--src/main/java/com/gitblit/models/AnnotatedLine.java (renamed from src/com/gitblit/models/AnnotatedLine.java)0
-rw-r--r--src/main/java/com/gitblit/models/FederationModel.java (renamed from src/com/gitblit/models/FederationModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/FederationProposal.java (renamed from src/com/gitblit/models/FederationProposal.java)0
-rw-r--r--src/main/java/com/gitblit/models/FederationSet.java (renamed from src/com/gitblit/models/FederationSet.java)0
-rw-r--r--src/main/java/com/gitblit/models/FeedEntryModel.java (renamed from src/com/gitblit/models/FeedEntryModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/FeedModel.java (renamed from src/com/gitblit/models/FeedModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/ForkModel.java (renamed from src/com/gitblit/models/ForkModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/GitNote.java (renamed from src/com/gitblit/models/GitNote.java)0
-rw-r--r--src/main/java/com/gitblit/models/GravatarProfile.java (renamed from src/com/gitblit/models/GravatarProfile.java)0
-rw-r--r--src/main/java/com/gitblit/models/IssueModel.java (renamed from src/com/gitblit/models/IssueModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/Metric.java (renamed from src/com/gitblit/models/Metric.java)0
-rw-r--r--src/main/java/com/gitblit/models/PathModel.java (renamed from src/com/gitblit/models/PathModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/ProjectModel.java (renamed from src/com/gitblit/models/ProjectModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/PushLogEntry.java (renamed from src/com/gitblit/models/PushLogEntry.java)0
-rw-r--r--src/main/java/com/gitblit/models/RefModel.java (renamed from src/com/gitblit/models/RefModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/RegistrantAccessPermission.java (renamed from src/com/gitblit/models/RegistrantAccessPermission.java)0
-rw-r--r--src/main/java/com/gitblit/models/RepositoryCommit.java (renamed from src/com/gitblit/models/RepositoryCommit.java)0
-rw-r--r--src/main/java/com/gitblit/models/RepositoryModel.java (renamed from src/com/gitblit/models/RepositoryModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/SearchResult.java (renamed from src/com/gitblit/models/SearchResult.java)0
-rw-r--r--src/main/java/com/gitblit/models/ServerSettings.java (renamed from src/com/gitblit/models/ServerSettings.java)0
-rw-r--r--src/main/java/com/gitblit/models/ServerStatus.java (renamed from src/com/gitblit/models/ServerStatus.java)4
-rw-r--r--src/main/java/com/gitblit/models/SettingModel.java (renamed from src/com/gitblit/models/SettingModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/SubmoduleModel.java (renamed from src/com/gitblit/models/SubmoduleModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/TeamModel.java (renamed from src/com/gitblit/models/TeamModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/TicketModel.java (renamed from src/com/gitblit/models/TicketModel.java)0
-rw-r--r--src/main/java/com/gitblit/models/UserModel.java (renamed from src/com/gitblit/models/UserModel.java)0
-rw-r--r--src/main/java/com/gitblit/utils/ActivityUtils.java (renamed from src/com/gitblit/utils/ActivityUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/ArrayUtils.java (renamed from src/com/gitblit/utils/ArrayUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/Base64.java (renamed from src/com/gitblit/utils/Base64.java)0
-rw-r--r--src/main/java/com/gitblit/utils/ByteFormat.java (renamed from src/com/gitblit/utils/ByteFormat.java)0
-rw-r--r--src/main/java/com/gitblit/utils/ClientLogger.java (renamed from src/com/gitblit/utils/ClientLogger.java)0
-rw-r--r--src/main/java/com/gitblit/utils/CompressionUtils.java (renamed from src/com/gitblit/utils/CompressionUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/ConnectionUtils.java (renamed from src/com/gitblit/utils/ConnectionUtils.java)0
-rw-r--r--[-rwxr-xr-x]src/main/java/com/gitblit/utils/ContainerUtils.java (renamed from src/com/gitblit/utils/ContainerUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/DeepCopier.java (renamed from src/com/gitblit/utils/DeepCopier.java)0
-rw-r--r--src/main/java/com/gitblit/utils/DiffUtils.java (renamed from src/com/gitblit/utils/DiffUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/FederationUtils.java (renamed from src/com/gitblit/utils/FederationUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/FileUtils.java (renamed from src/com/gitblit/utils/FileUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/GitBlitDiffFormatter.java (renamed from src/com/gitblit/utils/GitBlitDiffFormatter.java)0
-rw-r--r--src/main/java/com/gitblit/utils/GitWebDiffFormatter.java (renamed from src/com/gitblit/utils/GitWebDiffFormatter.java)0
-rw-r--r--src/main/java/com/gitblit/utils/HttpUtils.java (renamed from src/com/gitblit/utils/HttpUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/IssueUtils.java (renamed from src/com/gitblit/utils/IssueUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/JGitUtils.java (renamed from src/com/gitblit/utils/JGitUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/JsonUtils.java (renamed from src/com/gitblit/utils/JsonUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/MarkdownUtils.java (renamed from src/com/gitblit/utils/MarkdownUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/MetricUtils.java (renamed from src/com/gitblit/utils/MetricUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/ObjectCache.java (renamed from src/com/gitblit/utils/ObjectCache.java)0
-rw-r--r--src/main/java/com/gitblit/utils/PatchFormatter.java (renamed from src/com/gitblit/utils/PatchFormatter.java)0
-rw-r--r--src/main/java/com/gitblit/utils/PushLogUtils.java (renamed from src/com/gitblit/utils/PushLogUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/RpcUtils.java (renamed from src/com/gitblit/utils/RpcUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/StringUtils.java (renamed from src/com/gitblit/utils/StringUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/SyndicationUtils.java (renamed from src/com/gitblit/utils/SyndicationUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/TicgitUtils.java (renamed from src/com/gitblit/utils/TicgitUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/TimeUtils.java (renamed from src/com/gitblit/utils/TimeUtils.java)0
-rw-r--r--src/main/java/com/gitblit/utils/X509Utils.java (renamed from src/com/gitblit/utils/X509Utils.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/AuthorizationStrategy.java (renamed from src/com/gitblit/wicket/AuthorizationStrategy.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/ExternalImage.java (renamed from src/com/gitblit/wicket/ExternalImage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/GitBlitWebApp.java (renamed from src/com/gitblit/wicket/GitBlitWebApp.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/GitBlitWebApp.properties (renamed from src/com/gitblit/wicket/GitBlitWebApp.properties)0
-rw-r--r--src/main/java/com/gitblit/wicket/GitBlitWebApp_es.properties (renamed from src/com/gitblit/wicket/GitBlitWebApp_es.properties)0
-rw-r--r--[-rwxr-xr-x]src/main/java/com/gitblit/wicket/GitBlitWebApp_ja.properties (renamed from src/com/gitblit/wicket/GitBlitWebApp_ja.properties)0
-rw-r--r--src/main/java/com/gitblit/wicket/GitBlitWebApp_ko.properties (renamed from src/com/gitblit/wicket/GitBlitWebApp_ko.properties)0
-rw-r--r--src/main/java/com/gitblit/wicket/GitBlitWebApp_nl.properties (renamed from src/com/gitblit/wicket/GitBlitWebApp_nl.properties)0
-rw-r--r--src/main/java/com/gitblit/wicket/GitBlitWebApp_pl.properties (renamed from src/com/gitblit/wicket/GitBlitWebApp_pl.properties)0
-rw-r--r--src/main/java/com/gitblit/wicket/GitBlitWebApp_pt_BR.properties (renamed from src/com/gitblit/wicket/GitBlitWebApp_pt_BR.properties)0
-rw-r--r--src/main/java/com/gitblit/wicket/GitBlitWebApp_zh_CN.properties (renamed from src/com/gitblit/wicket/GitBlitWebApp_zh_CN.properties)0
-rw-r--r--src/main/java/com/gitblit/wicket/GitBlitWebSession.java (renamed from src/com/gitblit/wicket/GitBlitWebSession.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java (renamed from src/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/GitblitRedirectException.java (renamed from src/com/gitblit/wicket/GitblitRedirectException.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/PageRegistration.java (renamed from src/com/gitblit/wicket/PageRegistration.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/RequiresAdminRole.java (renamed from src/com/gitblit/wicket/RequiresAdminRole.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/SessionlessForm.java (renamed from src/com/gitblit/wicket/SessionlessForm.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/StringChoiceRenderer.java (renamed from src/com/gitblit/wicket/StringChoiceRenderer.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/WicketUtils.java (renamed from src/com/gitblit/wicket/WicketUtils.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/charting/GoogleChart.java (renamed from src/com/gitblit/wicket/charting/GoogleChart.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/charting/GoogleCharts.java (renamed from src/com/gitblit/wicket/charting/GoogleCharts.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/charting/GoogleLineChart.java (renamed from src/com/gitblit/wicket/charting/GoogleLineChart.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/charting/GooglePieChart.java (renamed from src/com/gitblit/wicket/charting/GooglePieChart.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ActivityPage.html (renamed from src/com/gitblit/wicket/pages/ActivityPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ActivityPage.java (renamed from src/com/gitblit/wicket/pages/ActivityPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BasePage.html (renamed from src/com/gitblit/wicket/pages/BasePage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BasePage.java (renamed from src/com/gitblit/wicket/pages/BasePage.java)2
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BlamePage.html (renamed from src/com/gitblit/wicket/pages/BlamePage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BlamePage.java (renamed from src/com/gitblit/wicket/pages/BlamePage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BlobDiffPage.html (renamed from src/com/gitblit/wicket/pages/BlobDiffPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BlobDiffPage.java (renamed from src/com/gitblit/wicket/pages/BlobDiffPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BlobPage.html (renamed from src/com/gitblit/wicket/pages/BlobPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BlobPage.java (renamed from src/com/gitblit/wicket/pages/BlobPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BranchesPage.html (renamed from src/com/gitblit/wicket/pages/BranchesPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/BranchesPage.java (renamed from src/com/gitblit/wicket/pages/BranchesPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ChangePasswordPage.html (renamed from src/com/gitblit/wicket/pages/ChangePasswordPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ChangePasswordPage.java (renamed from src/com/gitblit/wicket/pages/ChangePasswordPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/CommitDiffPage.html (renamed from src/com/gitblit/wicket/pages/CommitDiffPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java (renamed from src/com/gitblit/wicket/pages/CommitDiffPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/CommitPage.html (renamed from src/com/gitblit/wicket/pages/CommitPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/CommitPage.java (renamed from src/com/gitblit/wicket/pages/CommitPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/DocsPage.html (renamed from src/com/gitblit/wicket/pages/DocsPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/DocsPage.java (renamed from src/com/gitblit/wicket/pages/DocsPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.html (renamed from src/com/gitblit/wicket/pages/EditRepositoryPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java (renamed from src/com/gitblit/wicket/pages/EditRepositoryPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditTeamPage.html (renamed from src/com/gitblit/wicket/pages/EditTeamPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditTeamPage.java (renamed from src/com/gitblit/wicket/pages/EditTeamPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditUserPage.html (renamed from src/com/gitblit/wicket/pages/EditUserPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EditUserPage.java (renamed from src/com/gitblit/wicket/pages/EditUserPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage.html (renamed from src/com/gitblit/wicket/pages/EmptyRepositoryPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage.java (renamed from src/com/gitblit/wicket/pages/EmptyRepositoryPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_es.html (renamed from src/com/gitblit/wicket/pages/EmptyRepositoryPage_es.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_ko.html (renamed from src/com/gitblit/wicket/pages/EmptyRepositoryPage_ko.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_nl.html (renamed from src/com/gitblit/wicket/pages/EmptyRepositoryPage_nl.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_pl.html (renamed from src/com/gitblit/wicket/pages/EmptyRepositoryPage_pl.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_pt_BR.html (renamed from src/com/gitblit/wicket/pages/EmptyRepositoryPage_pt_BR.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_zh_CN.html (renamed from src/com/gitblit/wicket/pages/EmptyRepositoryPage_zh_CN.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/FederationPage.html (renamed from src/com/gitblit/wicket/pages/FederationPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/FederationPage.java (renamed from src/com/gitblit/wicket/pages/FederationPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/FederationRegistrationPage.html (renamed from src/com/gitblit/wicket/pages/FederationRegistrationPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/FederationRegistrationPage.java (renamed from src/com/gitblit/wicket/pages/FederationRegistrationPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ForkPage.html (renamed from src/com/gitblit/wicket/pages/ForkPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ForkPage.java (renamed from src/com/gitblit/wicket/pages/ForkPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ForksPage.html (renamed from src/com/gitblit/wicket/pages/ForksPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ForksPage.java (renamed from src/com/gitblit/wicket/pages/ForksPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/GitSearchPage.html (renamed from src/com/gitblit/wicket/pages/GitSearchPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/GitSearchPage.java (renamed from src/com/gitblit/wicket/pages/GitSearchPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/GravatarProfilePage.html (renamed from src/com/gitblit/wicket/pages/GravatarProfilePage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/GravatarProfilePage.java (renamed from src/com/gitblit/wicket/pages/GravatarProfilePage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/HistoryPage.html (renamed from src/com/gitblit/wicket/pages/HistoryPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/HistoryPage.java (renamed from src/com/gitblit/wicket/pages/HistoryPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/LogPage.html (renamed from src/com/gitblit/wicket/pages/LogPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/LogPage.java (renamed from src/com/gitblit/wicket/pages/LogPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/LogoutPage.html33
-rw-r--r--src/main/java/com/gitblit/wicket/pages/LogoutPage.java (renamed from src/com/gitblit/wicket/pages/LogoutPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.html (renamed from src/com/gitblit/wicket/pages/LuceneSearchPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java (renamed from src/com/gitblit/wicket/pages/LuceneSearchPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/MarkdownPage.html (renamed from src/com/gitblit/wicket/pages/MarkdownPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/MarkdownPage.java (renamed from src/com/gitblit/wicket/pages/MarkdownPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/MetricsPage.html (renamed from src/com/gitblit/wicket/pages/MetricsPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/MetricsPage.java (renamed from src/com/gitblit/wicket/pages/MetricsPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/PatchPage.html (renamed from src/com/gitblit/wicket/pages/PatchPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/PatchPage.java (renamed from src/com/gitblit/wicket/pages/PatchPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ProjectPage.html (renamed from src/com/gitblit/wicket/pages/ProjectPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ProjectPage.java (renamed from src/com/gitblit/wicket/pages/ProjectPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ProjectsPage.html (renamed from src/com/gitblit/wicket/pages/ProjectsPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ProjectsPage.java (renamed from src/com/gitblit/wicket/pages/ProjectsPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RawPage.java (renamed from src/com/gitblit/wicket/pages/RawPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RepositoriesPage.html (renamed from src/com/gitblit/wicket/pages/RepositoriesPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RepositoriesPage.java (renamed from src/com/gitblit/wicket/pages/RepositoriesPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RepositoryPage.html (renamed from src/com/gitblit/wicket/pages/RepositoryPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RepositoryPage.java (renamed from src/com/gitblit/wicket/pages/RepositoryPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ReviewProposalPage.html (renamed from src/com/gitblit/wicket/pages/ReviewProposalPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ReviewProposalPage.java (renamed from src/com/gitblit/wicket/pages/ReviewProposalPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RootPage.html (renamed from src/com/gitblit/wicket/pages/RootPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RootPage.java (renamed from src/com/gitblit/wicket/pages/RootPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RootSubPage.html (renamed from src/com/gitblit/wicket/pages/RootSubPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/RootSubPage.java (renamed from src/com/gitblit/wicket/pages/RootSubPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/SendProposalPage.html (renamed from src/com/gitblit/wicket/pages/SendProposalPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/SendProposalPage.java (renamed from src/com/gitblit/wicket/pages/SendProposalPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/SummaryPage.html (renamed from src/com/gitblit/wicket/pages/SummaryPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/SummaryPage.java (renamed from src/com/gitblit/wicket/pages/SummaryPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TagPage.html (renamed from src/com/gitblit/wicket/pages/TagPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TagPage.java (renamed from src/com/gitblit/wicket/pages/TagPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TagsPage.html (renamed from src/com/gitblit/wicket/pages/TagsPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TagsPage.java (renamed from src/com/gitblit/wicket/pages/TagsPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TicketPage.html (renamed from src/com/gitblit/wicket/pages/TicketPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TicketPage.java (renamed from src/com/gitblit/wicket/pages/TicketPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TicketsPage.html (renamed from src/com/gitblit/wicket/pages/TicketsPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TicketsPage.java (renamed from src/com/gitblit/wicket/pages/TicketsPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TreePage.html (renamed from src/com/gitblit/wicket/pages/TreePage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/TreePage.java (renamed from src/com/gitblit/wicket/pages/TreePage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/UserPage.html (renamed from src/com/gitblit/wicket/pages/UserPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/UserPage.java (renamed from src/com/gitblit/wicket/pages/UserPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/UsersPage.html (renamed from src/com/gitblit/wicket/pages/UsersPage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/UsersPage.java (renamed from src/com/gitblit/wicket/pages/UsersPage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-apollo.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-apollo.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-css.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-css.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-hs.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-hs.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-lisp.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-lisp.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-lua.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-lua.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-ml.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-ml.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-proto.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-proto.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-scala.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-scala.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-sql.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-sql.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-vb.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-vb.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-vhdl.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-vhdl.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-wiki.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-wiki.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/lang-yaml.js (renamed from src/com/gitblit/wicket/pages/prettify/lang-yaml.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/prettify.css (renamed from src/com/gitblit/wicket/pages/prettify/prettify.css)0
-rw-r--r--src/main/java/com/gitblit/wicket/pages/prettify/prettify.js (renamed from src/com/gitblit/wicket/pages/prettify/prettify.js)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/ActivityPanel.html (renamed from src/com/gitblit/wicket/panels/ActivityPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/ActivityPanel.java (renamed from src/com/gitblit/wicket/panels/ActivityPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/BasePanel.java (renamed from src/com/gitblit/wicket/panels/BasePanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/BranchesPanel.html (renamed from src/com/gitblit/wicket/panels/BranchesPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/BranchesPanel.java (renamed from src/com/gitblit/wicket/panels/BranchesPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/BulletListPanel.html (renamed from src/com/gitblit/wicket/panels/BulletListPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/BulletListPanel.java (renamed from src/com/gitblit/wicket/panels/BulletListPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/CommitHeaderPanel.html (renamed from src/com/gitblit/wicket/panels/CommitHeaderPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/CommitHeaderPanel.java (renamed from src/com/gitblit/wicket/panels/CommitHeaderPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/CommitLegendPanel.html (renamed from src/com/gitblit/wicket/panels/CommitLegendPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/CommitLegendPanel.java (renamed from src/com/gitblit/wicket/panels/CommitLegendPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.html (renamed from src/com/gitblit/wicket/panels/CompressedDownloadsPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java (renamed from src/com/gitblit/wicket/panels/CompressedDownloadsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/DropDownMenu.html (renamed from src/com/gitblit/wicket/panels/DropDownMenu.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/DropDownMenu.java (renamed from src/com/gitblit/wicket/panels/DropDownMenu.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/FederationProposalsPanel.html (renamed from src/com/gitblit/wicket/panels/FederationProposalsPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/FederationProposalsPanel.java (renamed from src/com/gitblit/wicket/panels/FederationProposalsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/FederationRegistrationsPanel.html (renamed from src/com/gitblit/wicket/panels/FederationRegistrationsPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/FederationRegistrationsPanel.java (renamed from src/com/gitblit/wicket/panels/FederationRegistrationsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/FederationTokensPanel.html (renamed from src/com/gitblit/wicket/panels/FederationTokensPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/FederationTokensPanel.java (renamed from src/com/gitblit/wicket/panels/FederationTokensPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/GravatarImage.html (renamed from src/com/gitblit/wicket/panels/GravatarImage.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/GravatarImage.java (renamed from src/com/gitblit/wicket/panels/GravatarImage.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/HistoryPanel.html (renamed from src/com/gitblit/wicket/panels/HistoryPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/HistoryPanel.java (renamed from src/com/gitblit/wicket/panels/HistoryPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/LinkPanel.html (renamed from src/com/gitblit/wicket/panels/LinkPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/LinkPanel.java (renamed from src/com/gitblit/wicket/panels/LinkPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/LogPanel.html (renamed from src/com/gitblit/wicket/panels/LogPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/LogPanel.java (renamed from src/com/gitblit/wicket/panels/LogPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/NavigationPanel.html (renamed from src/com/gitblit/wicket/panels/NavigationPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/NavigationPanel.java (renamed from src/com/gitblit/wicket/panels/NavigationPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/ObjectContainer.java (renamed from src/com/gitblit/wicket/panels/ObjectContainer.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/PagerPanel.html (renamed from src/com/gitblit/wicket/panels/PagerPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/PagerPanel.java (renamed from src/com/gitblit/wicket/panels/PagerPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/PathBreadcrumbsPanel.html (renamed from src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/PathBreadcrumbsPanel.java (renamed from src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.html (renamed from src/com/gitblit/wicket/panels/ProjectRepositoryPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java (renamed from src/com/gitblit/wicket/panels/ProjectRepositoryPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RefsPanel.html (renamed from src/com/gitblit/wicket/panels/RefsPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RefsPanel.java (renamed from src/com/gitblit/wicket/panels/RefsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.html (renamed from src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java (renamed from src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.html (renamed from src/com/gitblit/wicket/panels/RepositoriesPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.java (renamed from src/com/gitblit/wicket/panels/RepositoriesPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html (renamed from src/com/gitblit/wicket/panels/RepositoryUrlPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java (renamed from src/com/gitblit/wicket/panels/RepositoryUrlPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/SearchPanel.html (renamed from src/com/gitblit/wicket/panels/SearchPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/SearchPanel.java (renamed from src/com/gitblit/wicket/panels/SearchPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/ShockWaveComponent.java (renamed from src/com/gitblit/wicket/panels/ShockWaveComponent.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/TagsPanel.html (renamed from src/com/gitblit/wicket/panels/TagsPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/TagsPanel.java (renamed from src/com/gitblit/wicket/panels/TagsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/TeamsPanel.html (renamed from src/com/gitblit/wicket/panels/TeamsPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/TeamsPanel.java (renamed from src/com/gitblit/wicket/panels/TeamsPanel.java)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/UsersPanel.html (renamed from src/com/gitblit/wicket/panels/UsersPanel.html)0
-rw-r--r--src/main/java/com/gitblit/wicket/panels/UsersPanel.java (renamed from src/com/gitblit/wicket/panels/UsersPanel.java)0
-rw-r--r--src/main/java/log4j.properties (renamed from src/log4j.properties)0
-rw-r--r--src/main/resources/add_16x16.pngbin0 -> 698 bytes
-rw-r--r--src/main/resources/arrow_down.pngbin0 -> 189 bytes
-rw-r--r--src/main/resources/arrow_left.pngbin0 -> 371 bytes
-rw-r--r--src/main/resources/arrow_off.pngbin0 -> 178 bytes
-rw-r--r--src/main/resources/arrow_page.pngbin0 -> 191 bytes
-rw-r--r--src/main/resources/arrow_up.pngbin0 -> 189 bytes
-rw-r--r--src/main/resources/background.pngbin0 -> 561 bytes
-rw-r--r--src/main/resources/blank.pngbin0 -> 704 bytes
-rw-r--r--src/main/resources/book_16x16.pngbin0 -> 542 bytes
-rw-r--r--src/main/resources/bootstrap/css/bootstrap-responsive.css815
-rw-r--r--src/main/resources/bootstrap/css/bootstrap.css4983
-rw-r--r--src/main/resources/bootstrap/img/glyphicons-halflings-white.pngbin0 -> 8777 bytes
-rw-r--r--src/main/resources/bootstrap/img/glyphicons-halflings.pngbin0 -> 13826 bytes
-rw-r--r--src/main/resources/bootstrap/js/bootstrap.js1825
-rw-r--r--src/main/resources/bootstrap/js/jquery.js4
-rw-r--r--src/main/resources/bug_16x16.pngbin0 -> 790 bytes
-rw-r--r--src/main/resources/bullet_black.pngbin0 -> 315 bytes
-rw-r--r--src/main/resources/bullet_blue.pngbin0 -> 321 bytes
-rw-r--r--src/main/resources/bullet_delete.pngbin0 -> 333 bytes
-rw-r--r--src/main/resources/bullet_error.pngbin0 -> 368 bytes
-rw-r--r--src/main/resources/bullet_feed.pngbin0 -> 448 bytes
-rw-r--r--src/main/resources/bullet_green.pngbin0 -> 323 bytes
-rw-r--r--src/main/resources/bullet_key.pngbin0 -> 449 bytes
-rw-r--r--src/main/resources/bullet_orange.pngbin0 -> 321 bytes
-rw-r--r--src/main/resources/bullet_red.pngbin0 -> 323 bytes
-rw-r--r--src/main/resources/bullet_white.pngbin0 -> 296 bytes
-rw-r--r--src/main/resources/bullet_yellow.pngbin0 -> 320 bytes
-rw-r--r--src/main/resources/clipboard_13x13.pngbin0 -> 590 bytes
-rw-r--r--src/main/resources/clipboard_16x16.pngbin0 -> 715 bytes
-rw-r--r--src/main/resources/clippy.pngbin0 -> 561 bytes
-rw-r--r--src/main/resources/clippy.swfbin0 -> 5380 bytes
-rw-r--r--src/main/resources/cold_16x16.pngbin0 -> 599 bytes
-rw-r--r--src/main/resources/commit_branch_16x16.pngbin0 -> 655 bytes
-rw-r--r--src/main/resources/commit_changes_16x16.pngbin0 -> 674 bytes
-rw-r--r--src/main/resources/commit_divide_16x16.pngbin0 -> 651 bytes
-rw-r--r--src/main/resources/commit_join_16x16.pngbin0 -> 556 bytes
-rw-r--r--src/main/resources/commit_merge_16x16.pngbin0 -> 508 bytes
-rw-r--r--src/main/resources/commit_up_16x16.pngbin0 -> 391 bytes
-rw-r--r--src/main/resources/federated_16x16.pngbin0 -> 760 bytes
-rw-r--r--src/main/resources/feed_16x16.pngbin0 -> 625 bytes
-rw-r--r--src/main/resources/file_16x16.pngbin0 -> 416 bytes
-rw-r--r--src/main/resources/file_acrobat_16x16.pngbin0 -> 689 bytes
-rw-r--r--src/main/resources/file_c_16x16.pngbin0 -> 676 bytes
-rw-r--r--src/main/resources/file_code_16x16.pngbin0 -> 662 bytes
-rw-r--r--src/main/resources/file_cpp_16x16.pngbin0 -> 726 bytes
-rw-r--r--src/main/resources/file_cs_16x16.pngbin0 -> 779 bytes
-rw-r--r--src/main/resources/file_doc_16x16.pngbin0 -> 604 bytes
-rw-r--r--src/main/resources/file_excel_16x16.pngbin0 -> 703 bytes
-rw-r--r--src/main/resources/file_h_16x16.pngbin0 -> 635 bytes
-rw-r--r--src/main/resources/file_java_16x16.pngbin0 -> 716 bytes
-rw-r--r--src/main/resources/file_php_16x16.pngbin0 -> 432 bytes
-rw-r--r--src/main/resources/file_ppt_16x16.pngbin0 -> 648 bytes
-rw-r--r--src/main/resources/file_ruby_16x16.pngbin0 -> 670 bytes
-rw-r--r--src/main/resources/file_settings_16x16.pngbin0 -> 732 bytes
-rw-r--r--src/main/resources/file_vs_16x16.pngbin0 -> 756 bytes
-rw-r--r--src/main/resources/file_world_16x16.pngbin0 -> 749 bytes
-rw-r--r--src/main/resources/file_zip_16x16.pngbin0 -> 593 bytes
-rw-r--r--src/main/resources/folder_16x16.pngbin0 -> 632 bytes
-rw-r--r--src/main/resources/folder_star_16x16.pngbin0 -> 830 bytes
-rw-r--r--src/main/resources/folder_star_32x32.pngbin0 -> 1529 bytes
-rw-r--r--src/main/resources/fork_16x16.pngbin0 -> 380 bytes
-rw-r--r--src/main/resources/git-black-16x16.pngbin0 -> 371 bytes
-rw-r--r--src/main/resources/git-black.pngbin0 -> 4980 bytes
-rw-r--r--src/main/resources/git-black_210x210.pngbin0 -> 3811 bytes
-rw-r--r--src/main/resources/git-orange-16x16.pngbin0 -> 654 bytes
-rw-r--r--src/main/resources/gitblit.css1157
-rw-r--r--src/main/resources/gitblt-favicon.pngbin0 -> 534 bytes
-rw-r--r--src/main/resources/gitblt-logo.pngbin0 -> 3050 bytes
-rw-r--r--src/main/resources/gitblt2.pngbin0 -> 6543 bytes
-rw-r--r--src/main/resources/gitblt2_white.pngbin0 -> 4408 bytes
-rw-r--r--src/main/resources/gitblt_25.pngbin0 -> 3040 bytes
-rw-r--r--src/main/resources/gitblt_25_white.pngbin0 -> 2150 bytes
-rw-r--r--src/main/resources/gitweb-favicon.pngbin0 -> 164 bytes
-rw-r--r--src/main/resources/health_16x16.pngbin0 -> 569 bytes
-rw-r--r--src/main/resources/heart_16x16.pngbin0 -> 742 bytes
-rw-r--r--src/main/resources/information_16x16.pngbin0 -> 764 bytes
-rw-r--r--src/main/resources/lock_16x16.pngbin0 -> 689 bytes
-rw-r--r--src/main/resources/lock_go_16x16.pngbin0 -> 777 bytes
-rw-r--r--src/main/resources/lock_pull_16x16.pngbin0 -> 850 bytes
-rw-r--r--src/main/resources/login.mkd3
-rw-r--r--src/main/resources/login_es.mkd3
-rw-r--r--src/main/resources/login_ko.mkd3
-rw-r--r--src/main/resources/login_nl.mkd3
-rw-r--r--src/main/resources/login_pl.mkd3
-rw-r--r--src/main/resources/login_pt_br.mkd3
-rw-r--r--src/main/resources/login_zh_CN.mkd3
-rw-r--r--src/main/resources/mail_16x16.pngbin0 -> 530 bytes
-rw-r--r--src/main/resources/pixel.pngbin0 -> 178 bytes
-rw-r--r--src/main/resources/rosette_16x16.pngbin0 -> 646 bytes
-rw-r--r--src/main/resources/rosette_32x32.pngbin0 -> 1695 bytes
-rw-r--r--src/main/resources/script_16x16.pngbin0 -> 626 bytes
-rw-r--r--src/main/resources/search-icon.pngbin0 -> 395 bytes
-rw-r--r--src/main/resources/settings_16x16.pngbin0 -> 528 bytes
-rw-r--r--src/main/resources/settings_32x32.pngbin0 -> 1038 bytes
-rw-r--r--src/main/resources/shield_16x16.pngbin0 -> 704 bytes
-rw-r--r--src/main/resources/star_16x16.pngbin0 -> 611 bytes
-rw-r--r--src/main/resources/star_32x32.pngbin0 -> 1548 bytes
-rw-r--r--src/main/resources/tag_16x16.pngbin0 -> 604 bytes
-rw-r--r--src/main/resources/user_16x16.pngbin0 -> 601 bytes
-rw-r--r--src/main/resources/users_16x16.pngbin0 -> 918 bytes
-rw-r--r--src/main/resources/vcard_16x16.pngbin0 -> 642 bytes
-rw-r--r--src/main/resources/welcome.mkd3
-rw-r--r--src/main/resources/welcome_es.mkd3
-rw-r--r--src/main/resources/welcome_ko.mkd3
-rw-r--r--src/main/resources/welcome_nl.mkd3
-rw-r--r--src/main/resources/welcome_pl.mkd3
-rw-r--r--src/main/resources/welcome_pt_br.mkd3
-rw-r--r--src/main/resources/welcome_zh_CN.mkd3
-rw-r--r--src/site/.gitignore3
-rw-r--r--src/site/architecture.odgbin0 -> 15918 bytes
-rw-r--r--src/site/custom.less96
-rw-r--r--src/site/design.mkd84
-rw-r--r--src/site/fancybox/blank.gifbin0 -> 43 bytes
-rw-r--r--src/site/fancybox/fancy_close.pngbin0 -> 1517 bytes
-rw-r--r--src/site/fancybox/fancy_loading.pngbin0 -> 10195 bytes
-rw-r--r--src/site/fancybox/fancy_nav_left.pngbin0 -> 1446 bytes
-rw-r--r--src/site/fancybox/fancy_nav_right.pngbin0 -> 1454 bytes
-rw-r--r--src/site/fancybox/fancy_shadow_e.pngbin0 -> 107 bytes
-rw-r--r--src/site/fancybox/fancy_shadow_n.pngbin0 -> 106 bytes
-rw-r--r--src/site/fancybox/fancy_shadow_ne.pngbin0 -> 347 bytes
-rw-r--r--src/site/fancybox/fancy_shadow_nw.pngbin0 -> 324 bytes
-rw-r--r--src/site/fancybox/fancy_shadow_s.pngbin0 -> 111 bytes
-rw-r--r--src/site/fancybox/fancy_shadow_se.pngbin0 -> 352 bytes
-rw-r--r--src/site/fancybox/fancy_shadow_sw.pngbin0 -> 340 bytes
-rw-r--r--src/site/fancybox/fancy_shadow_w.pngbin0 -> 103 bytes
-rw-r--r--src/site/fancybox/fancy_title_left.pngbin0 -> 503 bytes
-rw-r--r--src/site/fancybox/fancy_title_main.pngbin0 -> 96 bytes
-rw-r--r--src/site/fancybox/fancy_title_over.pngbin0 -> 70 bytes
-rw-r--r--src/site/fancybox/fancy_title_right.pngbin0 -> 506 bytes
-rw-r--r--src/site/fancybox/fancybox-x.pngbin0 -> 203 bytes
-rw-r--r--src/site/fancybox/fancybox-y.pngbin0 -> 176 bytes
-rw-r--r--src/site/fancybox/fancybox.pngbin0 -> 15287 bytes
-rw-r--r--src/site/fancybox/jquery-1.4.3.min.js166
-rw-r--r--src/site/fancybox/jquery.easing-1.3.pack.js72
-rw-r--r--src/site/fancybox/jquery.fancybox-1.3.4.css359
-rw-r--r--src/site/fancybox/jquery.fancybox-1.3.4.js1156
-rw-r--r--src/site/fancybox/jquery.fancybox-1.3.4.pack.js46
-rw-r--r--src/site/fancybox/jquery.mousewheel-3.0.4.pack.js14
-rw-r--r--src/site/faq.mkd172
-rw-r--r--src/site/features.mkd78
-rw-r--r--src/site/federation.mkd339
-rw-r--r--src/site/federation.odgbin0 -> 12385 bytes
-rw-r--r--src/site/gitblit_logo_white.xcfbin0 -> 48611 bytes
-rw-r--r--src/site/openshift.mkd56
-rw-r--r--src/site/permissions_matrix.odsbin0 -> 18502 bytes
-rw-r--r--src/site/properties.mkd2
-rw-r--r--src/site/releasecurrent.mkd67
-rw-r--r--src/site/releasehistory.mkd488
-rw-r--r--src/site/releases.mkd550
-rw-r--r--src/site/resources/architecture.pngbin0 -> 30277 bytes
-rw-r--r--src/site/resources/fed_aggregation.pngbin0 -> 21532 bytes
-rw-r--r--src/site/resources/fed_mirror.pngbin0 -> 6897 bytes
-rw-r--r--src/site/resources/ldapSample.pngbin0 -> 34151 bytes
-rw-r--r--src/site/resources/permissions_matrix.pngbin0 -> 42519 bytes
-rw-r--r--src/site/resources/screenshots.js10
-rw-r--r--src/site/resources/stjude_150x150.gifbin0 -> 7573 bytes
-rw-r--r--src/site/roadmap.mkd31
-rw-r--r--src/site/rpc.mkd295
-rw-r--r--src/site/screenshots.mkd143
-rw-r--r--src/site/screenshots/00.pngbin0 -> 38869 bytes
-rw-r--r--src/site/screenshots/00b.pngbin0 -> 52501 bytes
-rw-r--r--src/site/screenshots/00c.pngbin0 -> 71400 bytes
-rw-r--r--src/site/screenshots/00d.pngbin0 -> 47116 bytes
-rw-r--r--src/site/screenshots/01.pngbin0 -> 28293 bytes
-rw-r--r--src/site/screenshots/01b.pngbin0 -> 25761 bytes
-rw-r--r--src/site/screenshots/01c.pngbin0 -> 23959 bytes
-rw-r--r--src/site/screenshots/02.pngbin0 -> 37563 bytes
-rw-r--r--src/site/screenshots/03.pngbin0 -> 62345 bytes
-rw-r--r--src/site/screenshots/04.pngbin0 -> 61605 bytes
-rw-r--r--src/site/screenshots/05.pngbin0 -> 42862 bytes
-rw-r--r--src/site/screenshots/06.pngbin0 -> 69286 bytes
-rw-r--r--src/site/screenshots/07.pngbin0 -> 40265 bytes
-rw-r--r--src/site/screenshots/08.pngbin0 -> 45167 bytes
-rw-r--r--src/site/screenshots/09.pngbin0 -> 55560 bytes
-rw-r--r--src/site/screenshots/10.pngbin0 -> 24418 bytes
-rw-r--r--src/site/screenshots/11.pngbin0 -> 39398 bytes
-rw-r--r--src/site/screenshots/12.pngbin0 -> 31019 bytes
-rw-r--r--src/site/screenshots/13.pngbin0 -> 30636 bytes
-rw-r--r--src/site/screenshots/14.pngbin0 -> 50325 bytes
-rw-r--r--src/site/screenshots/15.pngbin0 -> 34250 bytes
-rw-r--r--src/site/screenshots/image_processing.txt6
-rw-r--r--src/site/screenshots/m00.pngbin0 -> 53769 bytes
-rw-r--r--src/site/screenshots/m01.pngbin0 -> 68713 bytes
-rw-r--r--src/site/screenshots/m02.pngbin0 -> 64948 bytes
-rw-r--r--src/site/screenshots/m03.pngbin0 -> 71251 bytes
-rw-r--r--src/site/screenshots/m04.pngbin0 -> 33992 bytes
-rw-r--r--src/site/screenshots/m05.pngbin0 -> 41327 bytes
-rw-r--r--src/site/screenshots/m06.pngbin0 -> 45867 bytes
-rw-r--r--src/site/screenshots/m07.pngbin0 -> 42400 bytes
-rw-r--r--src/site/screenshots/m08.pngbin0 -> 38180 bytes
-rw-r--r--src/site/screenshots/m09.pngbin0 -> 37541 bytes
-rw-r--r--src/site/screenshots/m10.pngbin0 -> 26576 bytes
-rw-r--r--src/site/setup.mkd767
-rw-r--r--src/site/siteindex.mkd85
-rw-r--r--src/site/templates/atom.ftl2
-rw-r--r--src/site/templates/macros.ftl147
-rw-r--r--src/site/templates/releasecurrent.ftl25
-rw-r--r--src/site/templates/releasehistory.ftl21
-rw-r--r--src/site/templates/rss.ftl2
-rw-r--r--src/test/config/test-gitblit.properties88
-rw-r--r--src/test/config/test-ui-gitblit.properties1203
-rw-r--r--src/test/config/test-ui-users.conf44
-rw-r--r--src/test/config/test-users.conf8
-rw-r--r--src/test/java/com/gitblit/tests/ActivityTest.java34
-rw-r--r--src/test/java/com/gitblit/tests/ArrayUtilsTest.java67
-rw-r--r--src/test/java/com/gitblit/tests/Base64Test.java34
-rw-r--r--src/test/java/com/gitblit/tests/ByteFormatTest.java36
-rw-r--r--src/test/java/com/gitblit/tests/DiffUtilsTest.java129
-rw-r--r--src/test/java/com/gitblit/tests/FanoutServiceTest.java172
-rw-r--r--src/test/java/com/gitblit/tests/FederationTests.java166
-rw-r--r--src/test/java/com/gitblit/tests/FileUtilsTest.java86
-rw-r--r--src/test/java/com/gitblit/tests/GitBlitSuite.java232
-rw-r--r--src/test/java/com/gitblit/tests/GitBlitTest.java187
-rw-r--r--src/test/java/com/gitblit/tests/GitServletTest.java775
-rw-r--r--src/test/java/com/gitblit/tests/GroovyScriptTest.java399
-rw-r--r--src/test/java/com/gitblit/tests/IssuesTest.java231
-rw-r--r--src/test/java/com/gitblit/tests/JGitUtilsTest.java472
-rw-r--r--src/test/java/com/gitblit/tests/JsonUtilsTest.java61
-rw-r--r--src/test/java/com/gitblit/tests/LdapUserServiceTest.java174
-rw-r--r--src/test/java/com/gitblit/tests/LuceneExecutorTest.java181
-rw-r--r--src/test/java/com/gitblit/tests/MailTest.java41
-rw-r--r--src/test/java/com/gitblit/tests/MarkdownUtilsTest.java54
-rw-r--r--src/test/java/com/gitblit/tests/MetricUtilsTest.java54
-rw-r--r--src/test/java/com/gitblit/tests/ObjectCacheTest.java47
-rw-r--r--src/test/java/com/gitblit/tests/PermissionsTest.java2635
-rw-r--r--src/test/java/com/gitblit/tests/PushLogTest.java37
-rw-r--r--src/test/java/com/gitblit/tests/RedmineUserServiceTest.java72
-rw-r--r--src/test/java/com/gitblit/tests/RepositoryModelTest.java96
-rw-r--r--src/test/java/com/gitblit/tests/RpcTests.java382
-rw-r--r--src/test/java/com/gitblit/tests/StringUtilsTest.java160
-rw-r--r--src/test/java/com/gitblit/tests/SyndicationUtilsTest.java96
-rw-r--r--src/test/java/com/gitblit/tests/TicgitUtilsTest.java87
-rw-r--r--src/test/java/com/gitblit/tests/TimeUtilsTest.java111
-rw-r--r--src/test/java/com/gitblit/tests/UserServiceTest.java245
-rw-r--r--src/test/java/com/gitblit/tests/X509UtilsTest.java184
-rw-r--r--src/test/java/com/gitblit/tests/mock/MemorySettings.java50
-rw-r--r--src/test/java/com/gitblit/tests/resources/ldapUserServiceSampleData.ldif108
-rw-r--r--src/test/java/de/akquinet/devops/GitBlit4UITests.java25
-rw-r--r--src/test/java/de/akquinet/devops/GitBlitServer4UITests.java62
-rw-r--r--src/test/java/de/akquinet/devops/GitblitRunnable.java134
-rw-r--r--src/test/java/de/akquinet/devops/LaunchWithUITestConfig.java128
-rw-r--r--src/test/java/de/akquinet/devops/ManualUITestLaunch.java15
-rw-r--r--src/test/java/de/akquinet/devops/test/ui/TestUISuite.java33
-rw-r--r--src/test/java/de/akquinet/devops/test/ui/cases/UI_MultiAdminSupportTest.java93
-rw-r--r--src/test/java/de/akquinet/devops/test/ui/generic/AbstractUITest.java96
-rw-r--r--src/test/java/de/akquinet/devops/test/ui/view/Exp.java45
-rw-r--r--src/test/java/de/akquinet/devops/test/ui/view/GitblitDashboardView.java100
-rw-r--r--src/test/java/de/akquinet/devops/test/ui/view/GitblitPageView.java73
-rw-r--r--src/test/java/de/akquinet/devops/test/ui/view/RepoEditView.java158
-rw-r--r--src/test/java/de/akquinet/devops/test/ui/view/RepoListView.java130
642 files changed, 29263 insertions, 257 deletions
diff --git a/src/com/gitblit/FederationClientLauncher.java b/src/com/gitblit/FederationClientLauncher.java
deleted file mode 100644
index 80f5a3d9..00000000
--- a/src/com/gitblit/FederationClientLauncher.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2011 gitblit.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gitblit;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-
-import com.gitblit.build.Build;
-
-/**
- * Downloads dependencies and launches command-line Federation client.
- *
- * @author James Moger
- *
- */
-public class FederationClientLauncher {
-
- public static void main(String[] args) {
- // download federation client runtime dependencies
- Build.federationClient();
-
- File libFolder = new File("ext");
- List<File> jars = Launcher.findJars(libFolder.getAbsoluteFile());
-
- // sort the jars by name and then reverse the order so the newer version
- // of the library gets loaded in the event that this is an upgrade
- Collections.sort(jars);
- Collections.reverse(jars);
- for (File jar : jars) {
- try {
- Launcher.addJarFile(jar);
- } catch (IOException e) {
-
- }
- }
-
- FederationClient.main(args);
- }
-}
diff --git a/src/com/gitblit/client/GitblitManagerLauncher.java b/src/com/gitblit/client/GitblitManagerLauncher.java
deleted file mode 100644
index 9b6ee96b..00000000
--- a/src/com/gitblit/client/GitblitManagerLauncher.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2011 gitblit.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gitblit.client;
-
-import java.awt.Color;
-import java.awt.EventQueue;
-import java.awt.FontMetrics;
-import java.awt.Graphics2D;
-import java.awt.SplashScreen;
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-
-import com.gitblit.Constants;
-import com.gitblit.Launcher;
-import com.gitblit.build.Build;
-import com.gitblit.build.Build.DownloadListener;
-
-/**
- * Downloads dependencies and launches Gitblit Manager.
- *
- * @author James Moger
- *
- */
-public class GitblitManagerLauncher {
-
- public static void main(String[] args) {
- final SplashScreen splash = SplashScreen.getSplashScreen();
-
- DownloadListener downloadListener = new DownloadListener() {
- @Override
- public void downloading(String name) {
- updateSplash(splash, Translation.get("gb.downloading") + " " + name);
- }
- };
-
- // download rpc client runtime dependencies
- Build.manager(downloadListener);
-
- File libFolder = new File("ext");
- List<File> jars = Launcher.findJars(libFolder.getAbsoluteFile());
-
- // sort the jars by name and then reverse the order so the newer version
- // of the library gets loaded in the event that this is an upgrade
- Collections.sort(jars);
- Collections.reverse(jars);
- for (File jar : jars) {
- try {
- updateSplash(splash, Translation.get("gb.loading") + " " + jar.getName() + "...");
- Launcher.addJarFile(jar);
- } catch (IOException e) {
-
- }
- }
-
- updateSplash(splash, Translation.get("gb.starting") + " Gitblit Manager...");
- GitblitManager.main(args);
- }
-
- private static void updateSplash(final SplashScreen splash, final String string) {
- if (splash == null) {
- return;
- }
- try {
- EventQueue.invokeAndWait(new Runnable() {
- public void run() {
- Graphics2D g = splash.createGraphics();
- if (g != null) {
- // Splash is 320x120
- FontMetrics fm = g.getFontMetrics();
-
- // paint startup status
- g.setColor(Color.darkGray);
- int h = fm.getHeight() + fm.getMaxDescent();
- int x = 5;
- int y = 115;
- int w = 320 - 2 * x;
- g.fillRect(x, y - h, w, h);
- g.setColor(Color.lightGray);
- g.drawRect(x, y - h, w, h);
- g.setColor(Color.WHITE);
- int xw = fm.stringWidth(string);
- g.drawString(string, x + ((w - xw) / 2), y - 5);
-
- // paint version
- String ver = "v" + Constants.VERSION;
- int vw = g.getFontMetrics().stringWidth(ver);
- g.drawString(ver, 320 - vw - 5, 34);
- g.dispose();
- splash.update();
- }
- }
- });
- } catch (Throwable t) {
- t.printStackTrace();
- }
- }
-}
diff --git a/src/main/config/checkstyle.xml b/src/main/config/checkstyle.xml
new file mode 100644
index 00000000..ee45e7ef
--- /dev/null
+++ b/src/main/config/checkstyle.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+
+<!--
+ This configuration file was written by the eclipse-cs plugin
+ configuration editor
+-->
+<!--
+ Checkstyle-Configuration: gitblit Description: none
+-->
+<module name="Checker">
+ <property name="severity" value="warning" />
+ <module name="TreeWalker">
+ <property name="tabWidth" value="4" />
+ <module name="ConstantName" />
+ <module name="LocalFinalVariableName" />
+ <module name="LocalVariableName" />
+ <module name="MemberName" />
+ <module name="MethodName" />
+ <module name="PackageName" />
+ <module name="ParameterName" />
+ <module name="StaticVariableName" />
+ <module name="TypeName" />
+ <module name="AvoidStarImport" />
+ <module name="IllegalImport" />
+ <module name="RedundantImport" />
+ <module name="UnusedImports" />
+ <module name="EmptyForIteratorPad" />
+ <module name="MethodParamPad" />
+ <module name="NoWhitespaceAfter">
+ <property name="tokens"
+ value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS" />
+ </module>
+ <module name="NoWhitespaceBefore" />
+ <module name="OperatorWrap">
+ <property name="severity" value="ignore" />
+ <property name="tokens"
+ value="BAND,BOR,BSR,BXOR,COLON,DIV,EQUAL,GE,GT,LAND,LE,LITERAL_INSTANCEOF,LT,MINUS,MOD,NOT_EQUAL,SL,SR,STAR" />
+ <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity"
+ value="inherit" />
+ </module>
+ <module name="ParenPad" />
+ <module name="WhitespaceAfter" />
+ <module name="WhitespaceAround">
+ <property name="tokens"
+ value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS_ASSIGN,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND,WILDCARD_TYPE" />
+ </module>
+ <module name="ModifierOrder" />
+ <module name="RedundantModifier" />
+ <module name="LeftCurly">
+ <property name="tokens"
+ value="CTOR_DEF,INTERFACE_DEF,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_SWITCH,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,METHOD_DEF" />
+ </module>
+ <module name="NeedBraces" />
+ <module name="RightCurly" />
+ <module name="EmptyStatement" />
+ <module name="EqualsHashCode" />
+ <module name="IllegalInstantiation" />
+ <module name="RedundantThrows">
+ <property name="allowUnchecked" value="true" />
+ <property name="allowSubclasses" value="true" />
+ <property name="logLoadErrors" value="true" />
+ <property name="suppressLoadErrors" value="true" />
+ </module>
+ <module name="SimplifyBooleanExpression" />
+ <module name="SimplifyBooleanReturn" />
+ <module name="InterfaceIsType" />
+ <module name="ArrayTypeStyle" />
+ <module name="GenericIllegalRegexp">
+ <property name="severity" value="ignore" />
+ <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity"
+ value="inherit" />
+ </module>
+ <module name="TodoComment">
+ <property name="severity" value="ignore" />
+ <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity"
+ value="inherit" />
+ </module>
+ <module name="UpperEll" />
+ <module name="JavadocType" />
+ <module name="EmptyForInitializerPad" />
+ <module name="CovariantEquals" />
+ <module name="DefaultComesLast" />
+ <module name="DeclarationOrder" />
+ <module name="ExplicitInitialization" />
+ <module name="FallThrough" />
+ <module name="IllegalThrows" />
+ <module name="SuperClone" />
+ <module name="UnnecessaryParentheses" />
+ <module name="TrailingComment" />
+ <module name="PackageHtml">
+ <property name="severity" value="ignore" />
+ <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity"
+ value="inherit" />
+ </module>
+ </module>
+ <module name="FileTabCharacter">
+ <property name="severity" value="ignore" />
+ <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity"
+ value="inherit" />
+ </module>
+ <module name="NewlineAtEndOfFile">
+ <property name="severity" value="ignore" />
+ <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity"
+ value="inherit" />
+ </module>
+ <module name="Translation" />
+</module>
diff --git a/src/main/distrib/data/certs/authority.conf b/src/main/distrib/data/certs/authority.conf
new file mode 100644
index 00000000..575e9b1e
--- /dev/null
+++ b/src/main/distrib/data/certs/authority.conf
@@ -0,0 +1,7 @@
+[new]
+ duration = 365
+ organizationalUnit = Gitblit
+ organization = Gitblit
+ locality = Gitblit
+ stateProvince = NY
+ countryCode = US
diff --git a/src/main/distrib/data/certs/instructions.tmpl b/src/main/distrib/data/certs/instructions.tmpl
new file mode 100644
index 00000000..11ea78ff
--- /dev/null
+++ b/src/main/distrib/data/certs/instructions.tmpl
@@ -0,0 +1,123 @@
+********************************************************************************
+ Gitblit SSL Client Certificate for $serverHostname
+********************************************************************************
+
+ Hello $userDisplayname,
+
+ Your private key, public certificate, and the Gitblit Certificate Authority
+ certificate for $serverHostname are stored in $username.p12, a PKCS#12 certificate
+ store[1], and also in $username.pem, a PEM certificate store.
+
+ Both of these certificate stores are password-protected.
+ Password Hint: $storePasswordHint
+
+
+Git (All) Installation Instructions
+=============================================
+
+ The provided PEM file can be directly used by your git client.
+
+ git config [--global] http.sslCert path/to/$username.pem
+
+ The supplied PEM file is password-protected and you may be prompted for your
+ password multiple times during an exchange with Gitblit. If you desire a
+ password-less git client workflow then you will need to decrypt and export your
+ private key with OpenSSL[2] and then update your git config to use that key.
+
+ openssl rsa -in path/to/$username.pem -out path/to/$username.key
+ git config [--global] http.sslKey path/to/$username.key
+
+ Obviously, you should protect access to any decrypted private key.
+
+ NOTE:
+ Some older git clients may have trouble using the PEM file without explicitly
+ extracting the private key. This has been observed, for example, on Ubuntu 12.04
+ with git 1.7.9.5.
+
+
+Firefox (All) Installation Instructions
+=============================================
+
+ Firefox maintains it's own certificate store which is separate from the operating
+ system.
+
+ 1. Navigate to Options->Advanced->Encryption
+ 2. Click "View Certificates"
+ 3. Switch to the "Your Certificates" tab
+ 4. Click "Import..."
+ 5. Navigate your filesystem and select $username.p12
+ 6. At the password prompt enter the certificate store password
+ You have now imported your private key, public certificate, and the CA certificate
+ but now we must manually set the trust settings of the CA certificate.
+ 7. Switch to the "Authorities" tab
+ 8. Scroll down and find "Gitblit-> Gitblit Certificate Authority"
+ 9. Select it and click "Edit Trust..."
+ 10. Check "This certificate can identify websites" and click OK.
+
+
+Chrome/IE (Windows) Installation Instructions
+=============================================
+
+ On Windows, Chrome and IE share their certificate store so configuring one will
+ automatically apply for both.
+
+ IE
+ ------------------------------------
+ 1. Navigate to Internet Options->Content
+ 2. Click the "Certificates" button
+
+ Chrome
+ ------------------------------------
+ 1. Navigate to Settings->Show Advanced Settings->HTTP/SSL
+ 2. Click the "Manage Certificates..." button
+
+ Both (Windows)
+ ------------------------------------
+ 3. Switch to the "Personal" tab
+ 4. Click the "Import..." button
+ 5. Follow the Import Wizard instructions.
+ You will need to change the selected file filter when navigating to $username.p12
+ 6. At the password prompt enter the certificate store password
+ 7. Because both your personal certificate and the CA certifcate are stored in
+ $username.p12, you must choose "Automatically select the certificate store based on the type of certificate".
+ If you choose the default you will not install the CA certificate.
+
+
+Chrome (Linux) Installation Instructions
+=============================================
+
+ On Linux, Chrome maintains it's own certificate store.
+
+ 1. Navigate to Settings->Show Advanced Settings->HTTP/SSL
+ 2. Click the "Manage Certificates..." button
+ 3. Navigate your filesystem and select $username.p12
+ 4. At the password prompt enter the certificate store password
+ You have now imported your private key, public certificate, and the CA certificate
+ but now we must manually set the trust settings of the CA certificate.
+ 5. Switch to the "Authorities" tab
+ 6. Scroll down and find "Gitblit-> Gitblit Certificate Authority"
+ 7. Select it and click "Edit Trust..."
+ 8. Check "This certificate can identify websites" and click OK.
+
+
+Chrome/Safari (Mac OS X) Installation Instructions
+=============================================
+
+On Mac OS X, Chrome and Safari both use Keychain Access to store certificates
+so configuring one will automatically apply for both.
+
+ 1. Double-click $username.pem
+ 2. At the password prompt enter the certificate store password
+ You have now imported your private key, public certificate, and the CA certificate
+ but now we must manually set the trust settings of the CA certificate.
+ 3. Find the Gitblit Certificate Authority certificate, it should have a red
+ indicator meaning untrusted, and double-click it.
+ 4. Open the "Trust" disclosure triangle and change "When using this certificate"
+ to "Always Trust".
+ 5. Close the certificate view and enter your system password to save the changes
+ to your keychain.
+
+
+[1] PKCS#12 is one of the standard container formats for sharing private keys and
+ public certificates.
+[2] http://www.openssl.org
diff --git a/src/main/distrib/data/certs/mail.tmpl b/src/main/distrib/data/certs/mail.tmpl
new file mode 100644
index 00000000..463e124d
--- /dev/null
+++ b/src/main/distrib/data/certs/mail.tmpl
@@ -0,0 +1,7 @@
+ Hello $userDisplayname,
+
+ Your private key, public certificate, and the Gitblit Certificate Authority
+ certificate for $serverHostname are bundled together in the attached zip file.
+
+ There are also setup/installation instructions included in the zip for Git and
+ several major browsers to get you started. \ No newline at end of file
diff --git a/src/main/distrib/data/gitblit.properties b/src/main/distrib/data/gitblit.properties
new file mode 100644
index 00000000..a05f5d2d
--- /dev/null
+++ b/src/main/distrib/data/gitblit.properties
@@ -0,0 +1,1311 @@
+#
+# Gitblit Settings
+#
+
+# This settings file supports parameterization from the command-line for the
+# following command-line parameters:
+#
+# --baseFolder ${baseFolder} SINCE 1.2.1
+#
+# Settings that support ${baseFolder} parameter substitution are indicated with the
+# BASEFOLDER attribute. If the --baseFolder argument is unspecified, ${baseFolder}
+# and it's trailing / will be discarded from the setting value leaving a relative
+# path that is equivalent to pre-1.2.1 releases.
+#
+# e.g. "${baseFolder}/git" becomes "git", if --baseFolder is unspecified
+#
+# Git Servlet Settings
+#
+
+# Base folder for repositories.
+# This folder may contain bare and non-bare repositories but Gitblit will only
+# allow you to push to bare repositories.
+# Use forward slashes even on Windows!!
+# e.g. c:/gitrepos
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+# BASEFOLDER
+git.repositoriesFolder = ${baseFolder}/git
+
+# Build the available repository list at startup and cache this list for reuse.
+# This reduces disk io when presenting the repositories page, responding to rpcs,
+# etc, but it means that Gitblit will not automatically identify repositories
+# added or deleted by external tools.
+#
+# For this case you can use curl, wget, etc to issue an rpc request to clear the
+# cache (e.g. https://localhost/rpc?req=CLEAR_REPOSITORY_CACHE)
+#
+# SINCE 1.1.0
+git.cacheRepositoryList = true
+
+# Search the repositories folder subfolders for other repositories.
+# Repositories MAY NOT be nested (i.e. one repository within another)
+# but they may be grouped together in subfolders.
+# e.g. c:/gitrepos/libraries/mylibrary.git
+# c:/gitrepos/libraries/myotherlibrary.git
+#
+# SINCE 0.5.0
+git.searchRepositoriesSubfolders = true
+
+# Maximum number of folders to recurse into when searching for repositories.
+# The default value, -1, disables depth limits.
+#
+# SINCE 1.1.0
+git.searchRecursionDepth = -1
+
+# List of regex exclusion patterns to match against folders found in
+# *git.repositoriesFolder*.
+# Use forward slashes even on Windows!!
+# e.g. test/jgit\.git
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 1.1.0
+git.searchExclusions =
+
+# List of regex url patterns for extracting a repository name when locating
+# submodules.
+# e.g. git.submoduleUrlPatterns = .*?://github.com/(.*) will extract
+# *gitblit/gitblit.git* from *git://github.com/gitblit/gitblit.git*
+# If no matches are found then the submodule repository name is assumed to be
+# whatever trails the last / character. (e.g. gitblit.git).
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 1.1.0
+git.submoduleUrlPatterns = .*?://github.com/(.*)
+
+# Allow push/pull over http/https with JGit servlet.
+# If you do NOT want to allow Git clients to clone/push to Gitblit set this
+# to false. You might want to do this if you are only using ssh:// or git://.
+# If you set this false, consider changing the *web.otherUrls* setting to
+# indicate your clone/push urls.
+#
+# SINCE 0.5.0
+git.enableGitServlet = true
+
+# If you want to restrict all git servlet access to those with valid X509 client
+# certificates then set this value to true.
+#
+# SINCE 1.2.0
+git.requiresClientCertificate = false
+
+# Enforce date checks on client certificates to ensure that they are not being
+# used prematurely and that they have not expired.
+#
+# SINCE 1.2.0
+git.enforceCertificateValidity = true
+
+# List of OIDs to extract from a client certificate DN to map a certificate to
+# an account username.
+#
+# e.g. git.certificateUsernameOIDs = CN
+# e.g. git.certificateUsernameOIDs = FirstName LastName
+#
+# SPACE-DELIMITED
+# SINCE 1.2.0
+git.certificateUsernameOIDs = CN
+
+# Only serve/display bare repositories.
+# If there are non-bare repositories in git.repositoriesFolder and this setting
+# is true, they will be excluded from the ui.
+#
+# SINCE 0.9.0
+git.onlyAccessBareRepositories = false
+
+# Allow an authenticated user to create a destination repository on a push if
+# the repository does not already exist.
+#
+# Administrator accounts can create a repository in any project.
+# These repositories are created with the default access restriction and authorization
+# control values. The pushing account is set as the owner.
+#
+# Non-administrator accounts with the CREATE role may create personal repositories.
+# These repositories are created as VIEW restricted for NAMED users.
+# The pushing account is set as the owner.
+#
+# SINCE 1.2.0
+git.allowCreateOnPush = true
+
+# The default access restriction for new repositories.
+# Valid values are NONE, PUSH, CLONE, VIEW
+# NONE = anonymous view, clone, & push
+# PUSH = anonymous view & clone and authenticated push
+# CLONE = anonymous view, authenticated clone & push
+# VIEW = authenticated view, clone, & push
+#
+# SINCE 1.0.0
+git.defaultAccessRestriction = NONE
+
+# The default authorization control for new repositories.
+# Valid values are AUTHENTICATED and NAMED
+# AUTHENTICATED = any authenticated user is granted restricted access
+# NAMED = only named users/teams are granted restricted access
+#
+# SINCE 1.1.0
+git.defaultAuthorizationControl = NAMED
+
+# Enable JGit-based garbage collection. (!!EXPERIMENTAL!!)
+#
+# USE AT YOUR OWN RISK!
+#
+# If enabled, the garbage collection executor scans all repositories once a day
+# at the hour of your choosing. The GC executor will take each repository "offline",
+# one-at-a-time, to check if the repository satisfies it's GC trigger requirements.
+#
+# While the repository is offline it will be inaccessible from the web UI or from
+# any of the other services (git, rpc, rss, etc).
+#
+# Gitblit's GC Executor MAY NOT PLAY NICE with the other Git kids on the block,
+# especially on Windows systems, so if you are using other tools please coordinate
+# their usage with your GC Executor schedule or do not use this feature.
+#
+# The GC algorithm complex and the JGit team advises caution when using their
+# young implementation of GC.
+#
+# http://wiki.eclipse.org/EGit/New_and_Noteworthy/2.1#Garbage_Collector_and_Repository_Storage_Statistics
+#
+# EXPERIMENTAL
+# SINCE 1.2.0
+# RESTART REQUIRED
+git.enableGarbageCollection = false
+
+# Hour of the day for the GC Executor to scan repositories.
+# This value is in 24-hour time.
+#
+# SINCE 1.2.0
+git.garbageCollectionHour = 0
+
+# The default minimum total filesize of loose objects to trigger early garbage
+# collection.
+#
+# You may specify a custom threshold for a repository in the repository's settings.
+# Common unit suffixes of k, m, or g are supported.
+#
+# SINCE 1.2.0
+git.defaultGarbageCollectionThreshold = 500k
+
+# The default period, in days, between GCs for a repository. If the total filesize
+# of the loose object exceeds *git.garbageCollectionThreshold* or the repository's
+# custom threshold, this period will be short-circuited.
+#
+# e.g. if a repository collects 100KB of loose objects every day with a 500KB
+# threshold and a period of 7 days, it will take 5 days for the loose objects to
+# be collected, packed, and pruned.
+#
+# OR
+#
+# if a repository collects 10KB of loose objects every day with a 500KB threshold
+# and a period of 7 days, it will take the full 7 days for the loose objects to be
+# collected, packed, and pruned.
+#
+# You may specify a custom period for a repository in the repository's settings.
+#
+# The minimum value is 1 day since the GC Executor only runs once a day.
+#
+# SINCE 1.2.0
+git.defaultGarbageCollectionPeriod = 7
+
+# Number of bytes of a pack file to load into memory in a single read operation.
+# This is the "page size" of the JGit buffer cache, used for all pack access
+# operations. All disk IO occurs as single window reads. Setting this too large
+# may cause the process to load more data than is required; setting this too small
+# may increase the frequency of read() system calls.
+#
+# Default on JGit is 8 KiB on all platforms.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitWindowSize = 8k
+
+# Maximum number of bytes to load and cache in memory from pack files. If JGit
+# needs to access more than this many bytes it will unload less frequently used
+# windows to reclaim memory space within the process. As this buffer must be shared
+# with the rest of the JVM heap, it should be a fraction of the total memory available.
+#
+# The JGit team recommends setting this value larger than the size of your biggest
+# repository. This ensures you can serve most requests from memory.
+#
+# Default on JGit is 10 MiB on all platforms.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitLimit = 10m
+
+# Maximum number of bytes to reserve for caching base objects that multiple deltafied
+# objects reference. By storing the entire decompressed base object in a cache Git
+# is able to avoid unpacking and decompressing frequently used base objects multiple times.
+#
+# Default on JGit is 10 MiB on all platforms. You probably do not need to adjust
+# this value.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.deltaBaseCacheLimit = 10m
+
+# Maximum number of pack files to have open at once. A pack file must be opened
+# in order for any of its data to be available in a cached window.
+#
+# If you increase this to a larger setting you may need to also adjust the ulimit
+# on file descriptors for the host JVM, as Gitblit needs additional file descriptors
+# available for network sockets and other repository data manipulation.
+#
+# Default on JGit is 128 file descriptors on all platforms.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitOpenFiles = 128
+
+# Largest object size, in bytes, that JGit will allocate as a contiguous byte
+# array. Any file revision larger than this threshold will have to be streamed,
+# typically requiring the use of temporary files under $GIT_DIR/objects to implement
+# psuedo-random access during delta decompression.
+#
+# Servers with very high traffic should set this to be larger than the size of
+# their common big files. For example a server managing the Android platform
+# typically has to deal with ~10-12 MiB XML files, so 15 m would be a reasonable
+# setting in that environment. Setting this too high may cause the JVM to run out
+# of heap space when handling very big binary files, such as device firmware or
+# CD-ROM ISO images. Make sure to adjust your JVM heap accordingly.
+#
+# Default is 50 MiB on all platforms.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.streamFileThreshold = 50m
+
+# When true, JGit will use mmap() rather than malloc()+read() to load data from
+# pack files. The use of mmap can be problematic on some JVMs as the garbage
+# collector must deduce that a memory mapped segment is no longer in use before
+# a call to munmap() can be made by the JVM native code.
+#
+# In server applications (such as Gitblit) that need to access many pack files,
+# setting this to true risks artificially running out of virtual address space,
+# as the garbage collector cannot reclaim unused mapped spaces fast enough.
+#
+# Default on JGit is false. Although potentially slower, it yields much more
+# predictable behavior.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitMmap = false
+
+#
+# Groovy Integration
+#
+
+# Location of Groovy scripts to use for Pre and Post receive hooks.
+# Use forward slashes even on Windows!!
+# e.g. c:/groovy
+#
+# RESTART REQUIRED
+# SINCE 0.8.0
+# BASEFOLDER
+groovy.scriptsFolder = ${baseFolder}/groovy
+
+# Specify the directory Grape uses for downloading libraries.
+# http://groovy.codehaus.org/Grape
+#
+# RESTART REQUIRED
+# SINCE 1.0.0
+# BASEFOLDER
+groovy.grapeFolder = ${baseFolder}/groovy/grape
+
+# Scripts to execute on Pre-Receive.
+#
+# These scripts execute after an incoming push has been parsed and validated
+# but BEFORE the changes are applied to the repository. You might reject a
+# push in this script based on the repository and branch the push is attempting
+# to change.
+#
+# Script names are case-sensitive on case-sensitive file systems. You may omit
+# the traditional ".groovy" from this list if your file extension is ".groovy"
+#
+# NOTE:
+# These scripts are only executed when pushing to *Gitblit*, not to other Git
+# tooling you may be using. Also note that these scripts are shared between
+# repositories. These are NOT repository-specific scripts! Within the script
+# you may customize the control-flow for a specific repository by checking the
+# *repository* variable.
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.8.0
+groovy.preReceiveScripts =
+
+# Scripts to execute on Post-Receive.
+#
+# These scripts execute AFTER an incoming push has been applied to a repository.
+# You might trigger a continuous-integration build here or send a notification.
+#
+# Script names are case-sensitive on case-sensitive file systems. You may omit
+# the traditional ".groovy" from this list if your file extension is ".groovy"
+#
+# NOTE:
+# These scripts are only executed when pushing to *Gitblit*, not to other Git
+# tooling you may be using. Also note that these scripts are shared between
+# repositories. These are NOT repository-specific scripts! Within the script
+# you may customize the control-flow for a specific repository by checking the
+# *repository* variable.
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.8.0
+groovy.postReceiveScripts =
+
+# Repository custom fields for Groovy Hook mechanism
+#
+# List of key=label pairs of custom fields to prompt for in the Edit Repository
+# page. These keys are stored in the repository's git config file in the
+# section [gitblit "customFields"]. Key names are alphanumeric only. These
+# fields are intended to be used for the Groovy hook mechanism where a script
+# can adjust it's execution based on the custom fields stored in the repository
+# config.
+#
+# e.g. "commitMsgRegex=Commit Message Regular Expression" anotherProperty=Another
+#
+# SPACE-DELIMITED
+# SINCE 1.0.0
+groovy.customFields =
+
+#
+# Fanout Settings
+#
+
+# Fanout is a PubSub notification service that can be used by Sparkleshare
+# to eliminate repository change polling. The fanout service runs in a separate
+# thread on a separate port from the Gitblit http/https application.
+# This service is provided so that Sparkleshare may be used with Gitblit in
+# firewalled environments or where reliance on Sparkleshare's default notifications
+# server (notifications.sparkleshare.org) is unwanted.
+#
+# This service maintains an open socket connection from the client to the
+# Fanout PubSub service. This service may not work properly behind a proxy server.
+
+# Specify the interface for Fanout to bind it's service.
+# You may specify an ip or an empty value to bind to all interfaces.
+# Specifying localhost will result in Gitblit ONLY listening to requests to
+# localhost.
+#
+# SINCE 1.2.1
+# RESTART REQUIRED
+fanout.bindInterface = localhost
+
+# port for serving the Fanout PubSub service. <= 0 disables this service.
+# On Unix/Linux systems, ports < 1024 require root permissions.
+# Recommended value: 17000
+#
+# SINCE 1.2.1
+# RESTART REQUIRED
+fanout.port = 0
+
+# Use Fanout NIO service. If false, a multi-threaded socket service will be used.
+# Be advised, the socket implementation spawns a thread per connection plus the
+# connection acceptor thread. The NIO implementation is completely single-threaded.
+#
+# SINCE 1.2.1
+# RESTART REQUIRED
+fanout.useNio = true
+
+# Concurrent connection limit. <= 0 disables concurrent connection throttling.
+# If > 0, only the specified number of concurrent connections will be allowed
+# and all other connections will be rejected.
+#
+# SINCE 1.2.1
+# RESTART REQUIRED
+fanout.connectionLimit = 0
+
+#
+# Authentication Settings
+#
+
+# Require authentication to see everything but the admin pages
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.authenticateViewPages = false
+
+# If web.authenticateViewPages=true you may optionally require a client-side
+# basic authentication prompt instead of the standard form-based login.
+#
+# SINCE 1.3.0
+web.enforceHttpBasicAuthentication = false
+
+# Require admin authentication for the admin functions and pages
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.authenticateAdminPages = true
+
+# Allow Gitblit to store a cookie in the user's browser for automatic
+# authentication. The cookie is generated by the user service.
+#
+# SINCE 0.5.0
+web.allowCookieAuthentication = true
+
+# Config file for storing project metadata
+#
+# SINCE 1.2.0
+# BASEFOLDER
+web.projectsFile = ${baseFolder}/projects.conf
+
+# Either the full path to a user config file (users.conf)
+# OR the full path to a simple user properties file (users.properties)
+# OR a fully qualified class name that implements the IUserService interface.
+#
+# Alternative user services:
+# com.gitblit.LdapUserService
+# com.gitblit.RedmineUserService
+#
+# Any custom user service implementation must have a public default constructor.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+# BASEFOLDER
+realm.userService = ${baseFolder}/users.conf
+
+# How to store passwords.
+# Valid values are plain, md5, or combined-md5. md5 is the hash of password.
+# combined-md5 is the hash of username.toLowerCase()+password.
+# Default is md5.
+#
+# SINCE 0.5.0
+realm.passwordStorage = md5
+
+# Minimum valid length for a plain text password.
+# Default value is 5. Absolute minimum is 4.
+#
+# SINCE 0.5.0
+realm.minPasswordLength = 5
+
+#
+# Gitblit Web Settings
+#
+# If blank Gitblit is displayed.
+#
+# SINCE 0.5.0
+web.siteName =
+
+# If *web.authenticateAdminPages*=true, users with "admin" role can create
+# repositories, create users, and edit repository metadata.
+#
+# If *web.authenticateAdminPages*=false, any user can execute the aforementioned
+# functions.
+#
+# SINCE 0.5.0
+web.allowAdministration = true
+
+# Allows rpc clients to list repositories and possibly manage or administer the
+# Gitblit server, if the authenticated account has administrator permissions.
+# See *web.enableRpcManagement* and *web.enableRpcAdministration*.
+#
+# SINCE 0.7.0
+web.enableRpcServlet = true
+
+# Allows rpc clients to manage repositories and users of the Gitblit instance,
+# if the authenticated account has administrator permissions.
+# Requires *web.enableRpcServlet=true*.
+#
+# SINCE 0.7.0
+web.enableRpcManagement = false
+
+# Allows rpc clients to control the server settings and monitor the health of this
+# this Gitblit instance, if the authenticated account has administrator permissions.
+# Requires *web.enableRpcServlet=true* and *web.enableRpcManagement*.
+#
+# SINCE 0.7.0
+web.enableRpcAdministration = false
+
+# Full path to a configurable robots.txt file. With this file you can control
+# what parts of your Gitblit server respectable robots are allowed to traverse.
+# http://googlewebmastercentral.blogspot.com/2008/06/improving-on-robots-exclusion-protocol.html
+#
+# SINCE 1.0.0
+# BASEFOLDER
+web.robots.txt = ${baseFolder}/robots.txt
+
+# If true, the web ui layout will respond and adapt to the browser's dimensions.
+# if false, the web ui will use a 940px fixed-width layout.
+# http://twitter.github.com/bootstrap/scaffolding.html#responsive
+#
+# SINCE 1.0.0
+web.useResponsiveLayout = true
+
+# Allow Gravatar images to be displayed in Gitblit pages.
+#
+# SINCE 0.8.0
+web.allowGravatar = true
+
+# Allow dynamic zip downloads.
+#
+# SINCE 0.5.0
+web.allowZipDownloads = true
+
+# If *web.allowZipDownloads=true* the following formats will be displayed for
+# download compressed archive links:
+#
+# zip = standard .zip
+# tar = standard tar format (preserves *nix permissions and symlinks)
+# gz = gz-compressed tar
+# xz = xz-compressed tar
+# bzip2 = bzip2-compressed tar
+#
+# SPACE-DELIMITED
+# SINCE 1.2.0
+web.compressedDownloads = zip gz
+
+# Allow optional Lucene integration. Lucene indexing is an opt-in feature.
+# A repository may specify branches to index with Lucene instead of using Git
+# commit traversal. There are scenarios where you may want to completely disable
+# Lucene indexing despite a repository specifying indexed branches. One such
+# scenario is on a resource-constrained federated Gitblit mirror.
+#
+# SINCE 0.9.0
+web.allowLuceneIndexing = true
+
+# Allows an authenticated user to create forks of a repository
+#
+# set this to false if you want to disable all fork controls on the web site
+#
+web.allowForking = true
+
+# Controls the length of shortened commit hash ids
+#
+# SINCE 1.2.0
+web.shortCommitIdLength = 6
+
+# Use Clippy (Flash solution) to provide a copy-to-clipboard button.
+# If false, a button with a more primitive JavaScript-based prompt box will
+# offer a 3-step (click, ctrl+c, enter) copy-to-clipboard alternative.
+#
+# SINCE 0.8.0
+web.allowFlashCopyToClipboard = true
+
+# Default maximum number of commits that a repository may contribute to the
+# activity page, regardless of the selected duration. This setting may be valuable
+# for an extremely busy server. This value may also be configed per-repository
+# in Edit Repository. 0 disables this throttle.
+#
+# SINCE 1.2.0
+web.maxActivityCommits = 0
+
+# Default number of entries to include in RSS Syndication links
+#
+# SINCE 0.5.0
+web.syndicationEntries = 25
+
+# Show the size of each repository on the repositories page.
+# This requires recursive traversal of each repository folder. This may be
+# non-performant on some operating systems and/or filesystems.
+#
+# SINCE 0.5.2
+web.showRepositorySizes = true
+
+# List of custom regex expressions that can be displayed in the Filters menu
+# of the Repositories and Activity pages. Keep them very simple because you
+# are likely to run into encoding issues if they are too complex.
+#
+# Use !!! to separate the filters
+#
+# SINCE 0.8.0
+web.customFilters =
+
+# Show federation registrations (without token) and the current pull status
+# to non-administrator users.
+#
+# SINCE 0.6.0
+web.showFederationRegistrations = false
+
+# This is the message displayed when *web.authenticateViewPages=true*.
+# This can point to a file with Markdown content.
+# Specifying "gitblit" uses the internal login message.
+#
+# SINCE 0.7.0
+# BASEFOLDER
+web.loginMessage = gitblit
+
+# This is the message displayed above the repositories table.
+# This can point to a file with Markdown content.
+# Specifying "gitblit" uses the internal welcome message.
+#
+# SINCE 0.5.0
+# BASEFOLDER
+web.repositoriesMessage = gitblit
+
+# Ordered list of charsets/encodings to use when trying to display a blob.
+# If empty, UTF-8 and ISO-8859-1 are used. The server's default charset
+# is always appended to the encoding list. If all encodings fail to cleanly
+# decode the blob content, UTF-8 will be used with the standard malformed
+# input/unmappable character replacement strings.
+#
+# SPACE-DELIMITED
+# SINCE 1.0.0
+web.blobEncodings = UTF-8 ISO-8859-1
+
+# Manually set the default timezone to be used by Gitblit for display in the
+# web ui. This value is independent of the JVM timezone. Specifying a blank
+# value will default to the JVM timezone.
+# e.g. America/New_York, US/Pacific, UTC, Europe/Berlin
+#
+# SINCE 0.9.0
+# RESTART REQUIRED
+web.timezone =
+
+# Use the client timezone when formatting dates.
+# This uses AJAX to determine the browser's timezone and may require more
+# server overhead because a Wicket session is created. All Gitblit pages
+# attempt to be stateless, if possible.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.useClientTimezone = false
+
+# Time format
+# <http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html>
+#
+# SINCE 0.8.0
+web.timeFormat = HH:mm
+
+# Short date format
+# <http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html>
+#
+# SINCE 0.5.0
+web.datestampShortFormat = yyyy-MM-dd
+
+# Long date format
+#
+# SINCE 0.8.0
+web.datestampLongFormat = EEEE, MMMM d, yyyy
+
+# Long timestamp format
+# <http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html>
+#
+# SINCE 0.5.0
+web.datetimestampLongFormat = EEEE, MMMM d, yyyy HH:mm Z
+
+# Mount URL parameters
+# This setting controls if pretty or parameter URLs are used.
+# i.e.
+# if true:
+# http://localhost/commit/myrepo/abcdef
+# if false:
+# http://localhost/commit/?r=myrepo&h=abcdef
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.mountParameters = true
+
+# Some servlet containers (e.g. Tomcat >= 6.0.10) disallow '/' (%2F) encoding
+# in URLs as a security precaution for proxies. This setting tells Gitblit
+# to preemptively replace '/' with '*' or '!' for url string parameters.
+#
+# <https://issues.apache.org/jira/browse/WICKET-1303>
+# <http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10>
+# Add *-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true* to your
+# *CATALINA_OPTS* or to your JVM launch parameters
+#
+# SINCE 0.5.2
+web.forwardSlashCharacter = /
+
+# Show other URLs on the summary page for accessing your git repositories
+# Use spaces to separate urls. {0} is the token for the repository name.
+# e.g.
+# web.otherUrls = ssh://localhost/git/{0} git://localhost/git/{0}
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.otherUrls =
+
+# Choose how to present the repositories list.
+# grouped = group nested/subfolder repositories together (no sorting)
+# flat = flat list of repositories (sorting allowed)
+#
+# SINCE 0.5.0
+web.repositoryListType = grouped
+
+# If using a grouped repository list and there are repositories at the
+# root level of your repositories folder, you may specify the displayed
+# group name with this setting. This value is only used for web presentation.
+#
+# SINCE 0.5.0
+web.repositoryRootGroupName = main
+
+# Display the repository swatch color next to the repository name link in the
+# repositories list.
+#
+# SINCE 0.8.0
+web.repositoryListSwatches = true
+
+# Choose the diff presentation style: gitblt, gitweb, or plain
+#
+# SINCE 0.5.0
+web.diffStyle = gitblit
+
+# Control if email addresses are shown in web ui
+#
+# SINCE 0.5.0
+web.showEmailAddresses = true
+
+# Shows a combobox in the page links header with commit, committer, and author
+# search selection. Default search is commit.
+#
+# SINCE 0.5.0
+web.showSearchTypeSelection = false
+
+# Generates a line graph of repository activity over time on the Summary page.
+# This uses the Google Charts API.
+#
+# SINCE 0.5.0
+web.generateActivityGraph = true
+
+# The number of days to show on the activity page.
+# Value must exceed 0 else default of 14 is used
+#
+# SINCE 0.8.0
+web.activityDuration = 14
+
+# The number of commits to display on the summary page
+# Value must exceed 0 else default of 20 is used
+#
+# SINCE 0.5.0
+web.summaryCommitCount = 16
+
+# The number of tags/branches to display on the summary page.
+# -1 = all tags/branches
+# 0 = hide tags/branches
+# N = N tags/branches
+#
+# SINCE 0.5.0
+web.summaryRefsCount = 5
+
+# The number of items to show on a page before showing the first, prev, next
+# pagination links. A default if 50 is used for any invalid value.
+#
+# SINCE 0.5.0
+web.itemsPerPage = 50
+
+# Registered file extensions to ignore during Lucene indexing
+#
+# SPACE-DELIMITED
+# SINCE 0.9.0
+web.luceneIgnoreExtensions = 7z arc arj bin bmp dll doc docx exe gif gz jar jpg lib lzh odg odf odt pdf ppt png so swf xcf xls xlsx zip
+
+# Registered extensions for google-code-prettify
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.prettyPrintExtensions = c cpp cs css frm groovy htm html java js php pl prefs properties py rb scala sh sql xml vb
+
+# Registered extensions for markdown transformation
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.5.0
+web.markdownExtensions = md mkd markdown MD MKD
+
+# Image extensions
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.imageExtensions = bmp jpg gif png
+
+# Registered extensions for binary blobs
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.binaryExtensions = jar pdf tar.gz zip
+
+# Aggressive heap management will run the garbage collector on every generated
+# page. This slows down page generation a little but improves heap consumption.
+#
+# SINCE 0.5.0
+web.aggressiveHeapManagement = false
+
+# Run the webapp in debug mode
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.debugMode = false
+
+# Enable/disable global regex substitutions (i.e. shared across repositories)
+#
+# SINCE 0.5.0
+regex.global = true
+
+# Example global regex substitutions
+# Use !!! to separate the search pattern and the replace pattern
+# searchpattern!!!replacepattern
+# SINCE 0.5.0
+regex.global.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://somehost/bug/$3">Bug-Id: $3</a>
+# SINCE 0.5.0
+regex.global.changeid = \\b(Change-Id:\\s*)([A-Za-z0-9]*)\\b!!!<a href="http://somehost/changeid/$2">Change-Id: $2</a>
+
+# Example per-repository regex substitutions overrides global
+# SINCE 0.5.0
+regex.myrepository.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://elsewhere/bug/$3">Bug-Id: $3</a>
+
+#
+# Mail Settings
+# SINCE 0.6.0
+#
+# Mail settings are used to notify administrators of received federation proposals
+#
+
+# ip or hostname of smtp server
+#
+# SINCE 0.6.0
+mail.server =
+
+# port to use for smtp requests
+#
+# SINCE 0.6.0
+mail.port = 25
+
+# debug the mail executor
+#
+# SINCE 0.6.0
+mail.debug = false
+
+# if your smtp server requires authentication, supply the credentials here
+#
+# SINCE 0.6.0
+mail.username =
+# SINCE 0.6.0
+mail.password =
+
+# from address for generated emails
+#
+# SINCE 0.6.0
+mail.fromAddress =
+
+# List of email addresses for the Gitblit administrators
+#
+# SPACE-DELIMITED
+# SINCE 0.6.0
+mail.adminAddresses =
+
+# List of email addresses for sending push email notifications.
+#
+# This key currently requires use of the sendemail.groovy hook script.
+# If you set sendemail.groovy in *groovy.postReceiveScripts* then email
+# notifications for all repositories (regardless of access restrictions!)
+# will be sent to these addresses.
+#
+# SPACE-DELIMITED
+# SINCE 0.8.0
+mail.mailingLists =
+
+#
+# Federation Settings
+# SINCE 0.6.0
+#
+# A Gitblit federation is a way to backup one Gitblit instance to another.
+#
+# *git.enableGitServlet* must be true to use this feature.
+
+# Your federation name is used for federation status acknowledgments. If it is
+# unset, and you elect to send a status acknowledgment, your Gitblit instance
+# will be identified by its hostname, if available, else your internal ip address.
+# The source Gitblit instance will also append your external IP address to your
+# identification to differentiate multiple pulling systems behind a single proxy.
+#
+# SINCE 0.6.0
+federation.name =
+
+# Specify the passphrase of this Gitblit instance.
+#
+# An unspecified (empty) passphrase disables processing federation requests.
+#
+# This value can be anything you want: an integer, a sentence, an haiku, etc.
+# Keep the value simple, though, to avoid Java properties file encoding issues.
+#
+# Changing your passphrase will break any registrations you have established with other
+# Gitblit instances.
+#
+# CASE-SENSITIVE
+# SINCE 0.6.0
+# RESTART REQUIRED *(only to enable or disable federation)*
+federation.passphrase =
+
+# Control whether or not this Gitblit instance can receive federation proposals
+# from another Gitblit instance. Registering a federated Gitblit is a manual
+# process. Proposals help to simplify that process by allowing a remote Gitblit
+# instance to send your Gitblit instance the federation pull data.
+#
+# SINCE 0.6.0
+federation.allowProposals = false
+
+# The destination folder for cached federation proposals.
+# Use forward slashes even on Windows!!
+#
+# SINCE 0.6.0
+# BASEFOLDER
+federation.proposalsFolder = ${baseFolder}/proposals
+
+# The default pull frequency if frequency is unspecified on a registration
+#
+# SINCE 0.6.0
+federation.defaultFrequency = 60 mins
+
+# Federation Sets are named groups of repositories. The Federation Sets are
+# available for selection in the repository settings page. You can assign a
+# repository to one or more sets and then distribute the token for the set.
+# This allows you to grant federation pull access to a subset of your available
+# repositories. Tokens for federation sets only grant repository pull access.
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.6.0
+federation.sets =
+
+# Federation pull registrations
+# Registrations are read once, at startup.
+#
+# RESTART REQUIRED
+#
+# frequency:
+# The shortest frequency allowed is every 5 minutes
+# Decimal frequency values are cast to integers
+# Frequency values may be specified in mins, hours, or days
+# Values that can not be parsed or are unspecified default to *federation.defaultFrequency*
+#
+# folder:
+# if unspecified, the folder is *git.repositoriesFolder*
+# if specified, the folder is relative to *git.repositoriesFolder*
+#
+# bare:
+# if true, each repository will be created as a *bare* repository and will not
+# have a working directory.
+#
+# if false, each repository will be created as a normal repository suitable
+# for local work.
+#
+# mirror:
+# if true, each repository HEAD is reset to *origin/master* after each pull.
+# The repository will be flagged *isFrozen* after the initial clone.
+#
+# if false, each repository HEAD will point to the FETCH_HEAD of the initial
+# clone from the origin until pushed to or otherwise manipulated.
+#
+# mergeAccounts:
+# if true, remote accounts and their permissions are merged into your
+# users.properties file
+#
+# notifyOnError:
+# if true and the mail configuration is properly set, administrators will be
+# notified by email of pull failures
+#
+# include and exclude:
+# Space-delimited list of repositories to include or exclude from pull
+# may be * wildcard to include or exclude all
+# may use fuzzy match (e.g. org.eclipse.*)
+
+#
+# (Nearly) Perfect Mirror example
+#
+
+#federation.example1.url = https://go.gitblit.com
+#federation.example1.token = 6f3b8a24bf970f17289b234284c94f43eb42f0e4
+#federation.example1.frequency = 120 mins
+#federation.example1.folder =
+#federation.example1.bare = true
+#federation.example1.mirror = true
+#federation.example1.mergeAccounts = true
+
+#
+# Advanced Realm Settings
+#
+
+# URL of the LDAP server.
+# To use encrypted transport, use either ldaps:// URL for SSL or ldap+tls:// to
+# send StartTLS command.
+#
+# SINCE 1.0.0
+realm.ldap.server = ldap://localhost
+
+# Login username for LDAP searches.
+# If this value is unspecified, anonymous LDAP login will be used.
+#
+# e.g. mydomain\\username
+#
+# SINCE 1.0.0
+realm.ldap.username = cn=Directory Manager
+
+# Login password for LDAP searches.
+#
+# SINCE 1.0.0
+realm.ldap.password = password
+
+# The LdapUserService must be backed by another user service for standard user
+# and team management.
+# default: users.conf
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+# BASEFOLDER
+realm.ldap.backingUserService = ${baseFolder}/users.conf
+
+# Delegate team membership control to LDAP.
+#
+# If true, team user memberships will be specified by LDAP groups. This will
+# disable team selection in Edit User and user selection in Edit Team.
+#
+# If false, LDAP will only be used for authentication and Gitblit will maintain
+# team memberships with the *realm.ldap.backingUserService*.
+#
+# SINCE 1.0.0
+realm.ldap.maintainTeams = false
+
+# Root node for all LDAP users
+#
+# This is the root node from which subtree user searches will begin.
+# If blank, Gitblit will search ALL nodes.
+#
+# SINCE 1.0.0
+realm.ldap.accountBase = OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+# Filter criteria for LDAP users
+#
+# Query pattern to use when searching for a user account. This may be any valid
+# LDAP query expression, including the standard (&) and (|) operators.
+#
+# Variables may be injected via the ${variableName} syntax.
+# Recognized variables are:
+# ${username} - The text entered as the user name
+#
+# SINCE 1.0.0
+realm.ldap.accountPattern = (&(objectClass=person)(sAMAccountName=${username}))
+
+# Root node for all LDAP groups to be used as Gitblit Teams
+#
+# This is the root node from which subtree team searches will begin.
+# If blank, Gitblit will search ALL nodes.
+#
+# SINCE 1.0.0
+realm.ldap.groupBase = OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+# Filter criteria for LDAP groups
+#
+# Query pattern to use when searching for a team. This may be any valid
+# LDAP query expression, including the standard (&) and (|) operators.
+#
+# Variables may be injected via the ${variableName} syntax.
+# Recognized variables are:
+# ${username} - The text entered as the user name
+# ${dn} - The Distinguished Name of the user logged in
+#
+# All attributes from the LDAP User record are available. For example, if a user
+# has an attribute "fullName" set to "John", "(fn=${fullName})" will be
+# translated to "(fn=John)".
+#
+# SINCE 1.0.0
+realm.ldap.groupMemberPattern = (&(objectClass=group)(member=${dn}))
+
+# LDAP users or groups that should be given administrator privileges.
+#
+# Teams are specified with a leading '@' character. Groups with spaces in the
+# name can be entered as "@team name".
+#
+# e.g. realm.ldap.admins = john @git_admins "@git admins"
+#
+# SPACE-DELIMITED
+# SINCE 1.0.0
+realm.ldap.admins = @Git_Admins
+
+# Attribute(s) on the USER record that indicate their display (or full) name.
+# Leave blank for no mapping available in LDAP.
+#
+# This may be a single attribute, or a string of multiple attributes. Examples:
+# displayName - Uses the attribute 'displayName' on the user record
+# ${personalTitle}. ${givenName} ${surname} - Will concatenate the 3
+# attributes together, with a '.' after personalTitle
+#
+# SINCE 1.0.0
+realm.ldap.displayName = displayName
+
+# Attribute(s) on the USER record that indicate their email address.
+# Leave blank for no mapping available in LDAP.
+#
+# This may be a single attribute, or a string of multiple attributes. Examples:
+# email - Uses the attribute 'email' on the user record
+# ${givenName}.${surname}@gitblit.com -Will concatenate the 2 attributes
+# together with a '.' and '@' creating something like first.last@gitblit.com
+#
+# SINCE 1.0.0
+realm.ldap.email = email
+
+# Defines the cache period to be used when caching LDAP queries. This is currently
+# only used for LDAP user synchronization.
+#
+# Must be of the form '<long> <TimeUnit>' where <TimeUnit> is one of 'MILLISECONDS', 'SECONDS', 'MINUTES', 'HOURS', 'DAYS'
+# default: 2 MINUTES
+#
+# RESTART REQUIRED
+realm.ldap.ldapCachePeriod = 2 MINUTES
+
+# Defines whether to synchronize all LDAP users into the backing user service
+#
+# Valid values: true, false
+# If left blank, false is assumed
+realm.ldap.synchronizeUsers.enable = false
+
+# Defines whether to delete non-existent LDAP users from the backing user service
+# during synchronization. depends on realm.ldap.synchronizeUsers.enable = true
+#
+# Valid values: true, false
+# If left blank, true is assumed
+realm.ldap.synchronizeUsers.removeDeleted = true
+
+# Attribute on the USER record that indicate their username to be used in gitblit
+# when synchronizing users from LDAP
+# if blank, Gitblit will use uid
+# For MS Active Directory this may be sAMAccountName
+realm.ldap.uid = uid
+
+# The RedmineUserService must be backed by another user service for standard user
+# and team management.
+# default: users.conf
+#
+# RESTART REQUIRED
+# BASEFOLDER
+realm.redmine.backingUserService = ${baseFolder}/users.conf
+
+# URL of the Redmine.
+realm.redmine.url = http://example.com/redmine
+
+#
+# Server Settings
+#
+
+# The temporary folder to decompress the embedded gitblit webapp.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+# BASEFOLDER
+server.tempFolder = ${baseFolder}/temp
+
+# Use Jetty NIO connectors. If false, Jetty Socket connectors will be used.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.useNio = true
+
+# Context path for the GO application. You might want to change the context
+# path if running Gitblit behind a proxy layer such as mod_proxy.
+#
+# SINCE 0.7.0
+# RESTART REQUIRED
+server.contextPath = /
+
+# Standard http port to serve. <= 0 disables this connector.
+# On Unix/Linux systems, ports < 1024 require root permissions.
+# Recommended value: 80 or 8080
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpPort = 0
+
+# Secure/SSL https port to serve. <= 0 disables this connector.
+# On Unix/Linux systems, ports < 1024 require root permissions.
+# Recommended value: 443 or 8443
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpsPort = 8443
+
+# Port for serving an Apache JServ Protocol (AJP) 1.3 connector for integrating
+# Gitblit GO into an Apache HTTP server setup. <= 0 disables this connector.
+# Recommended value: 8009
+#
+# SINCE 0.9.0
+# RESTART REQUIRED
+server.ajpPort = 0
+
+# Specify the interface for Jetty to bind the standard connector.
+# You may specify an ip or an empty value to bind to all interfaces.
+# Specifying localhost will result in Gitblit ONLY listening to requests to
+# localhost.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpBindInterface = localhost
+
+# Specify the interface for Jetty to bind the secure connector.
+# You may specify an ip or an empty value to bind to all interfaces.
+# Specifying localhost will result in Gitblit ONLY listening to requests to
+# localhost.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpsBindInterface = localhost
+
+# Specify the interface for Jetty to bind the AJP connector.
+# You may specify an ip or an empty value to bind to all interfaces.
+# Specifying localhost will result in Gitblit ONLY listening to requests to
+# localhost.
+#
+# SINCE 0.9.0
+# RESTART REQUIRED
+server.ajpBindInterface = localhost
+
+# Alias of certificate to use for https/SSL serving. If blank the first
+# certificate found in the keystore will be used.
+#
+# SINCE 1.2.0
+# RESTART REQUIRED
+server.certificateAlias = localhost
+
+# Password for SSL keystore.
+# Keystore password and certificate password must match.
+# This is provided for convenience, its probably more secure to set this value
+# using the --storePassword command line parameter.
+#
+# If you are using the official JRE or JDK from Oracle you may not have the
+# JCE Unlimited Strength Jurisdiction Policy files bundled with your JVM. Because
+# of this, your store/key password can not exceed 7 characters. If you require
+# longer passwords you may need to install the JCE Unlimited Strength Jurisdiction
+# Policy files from Oracle.
+#
+# http://www.oracle.com/technetwork/java/javase/downloads/index.html
+#
+# Gitblit and the Gitblit Certificate Authority will both indicate if Unlimited
+# Strength encryption is available.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.storePassword = gitblit
+
+# If serving over https (recommended) you might consider requiring clients to
+# authenticate with ssl certificates. If enabled, only https clients with the
+# a valid client certificate will be able to access Gitblit.
+#
+# If disabled, client certificate authentication is optional and will be tried
+# first before falling-back to form authentication or basic authentication.
+#
+# Requiring client certificates to access any of Gitblit may be too extreme,
+# consider this carefully.
+#
+# SINCE 1.2.0
+# RESTART REQUIRED
+server.requireClientCertificates = false
+
+# Port for shutdown monitor to listen on.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.shutdownPort = 8081
diff --git a/src/main/distrib/data/groovy/.gitignore b/src/main/distrib/data/groovy/.gitignore
new file mode 100644
index 00000000..e58dc47f
--- /dev/null
+++ b/src/main/distrib/data/groovy/.gitignore
@@ -0,0 +1 @@
+/grape
diff --git a/src/main/distrib/data/groovy/blockpush.groovy b/src/main/distrib/data/groovy/blockpush.groovy
new file mode 100644
index 00000000..caef3306
--- /dev/null
+++ b/src/main/distrib/data/groovy/blockpush.groovy
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import java.text.MessageFormat;
+
+import com.gitblit.GitBlit
+import com.gitblit.models.RepositoryModel
+import com.gitblit.models.UserModel
+import org.eclipse.jgit.transport.ReceiveCommand
+import org.eclipse.jgit.transport.ReceiveCommand.Result
+import org.slf4j.Logger
+import com.gitblit.utils.ClientLogger
+
+/**
+ * Sample Gitblit Pre-Receive Hook: blockpush
+ *
+ * This script could and perhaps should be further developed to provide
+ * a full repository-branch permissions system similar to gitolite or gitosis.
+ *
+ * The Pre-Receive hook is executed after an incoming push has been parsed,
+ * validated, and objects have been written but BEFORE the refs are updated.
+ * This is the appropriate point to block a push for some reason.
+ *
+ * This script is only executed when pushing to *Gitblit*, not to other Git
+ * tooling you may be using.
+ *
+ * If this script is specified in *groovy.preReceiveScripts* of gitblit.properties
+ * or web.xml then it will be executed by any repository when it receives a
+ * push. If you choose to share your script then you may have to consider
+ * tailoring control-flow based on repository access restrictions.
+ *
+ * Scripts may also be specified per-repository in the repository settings page.
+ * Shared scripts will be excluded from this list of available scripts.
+ *
+ * This script is dynamically reloaded and it is executed within it's own
+ * exception handler so it will not crash another script nor crash Gitblit.
+ *
+ * If you want this hook script to fail and abort all subsequent scripts in the
+ * chain, "return false" at the appropriate failure points.
+ *
+ * Bound Variables:
+ * gitblit Gitblit Server com.gitblit.GitBlit
+ * repository Gitblit Repository com.gitblit.models.RepositoryModel
+ * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack
+ * user Gitblit User com.gitblit.models.UserModel
+ * commands JGit commands Collection<org.eclipse.jgit.transport.ReceiveCommand>
+ * url Base url for Gitblit String
+ * logger Logs messages to Gitblit org.slf4j.Logger
+ * clientLogger Logs messages to Git client com.gitblit.utils.ClientLogger
+ *
+ * Accessing Gitblit Custom Fields:
+ * def myCustomField = repository.customFields.myCustomField
+ *
+ */
+
+// Indicate we have started the script
+logger.info("blockpush hook triggered by ${user.username} for ${repository.name}: checking ${commands.size} commands")
+
+/*
+ * Example rejection of pushes to the master branch of example.git
+ */
+def blocked = false
+switch (repository.name) {
+ case 'ex@mple.git':
+ for (ReceiveCommand command : commands) {
+ def updatedRef = command.refName
+ if (updatedRef.equals('refs/heads/master')) {
+ // to reject a command set it's result to anything other than Result.NOT_ATTEMPTED
+ command.setResult(Result.REJECTED_OTHER_REASON, "You are not permitted to write to ${repository.name}:${updatedRef}")
+ blocked = true
+ }
+ }
+ break
+
+ default:
+ break
+}
+
+if (blocked) {
+ // return false to break the push hook chain
+ return false
+} \ No newline at end of file
diff --git a/src/main/distrib/data/groovy/jenkins.groovy b/src/main/distrib/data/groovy/jenkins.groovy
new file mode 100644
index 00000000..d76a3d66
--- /dev/null
+++ b/src/main/distrib/data/groovy/jenkins.groovy
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import com.gitblit.GitBlit
+import com.gitblit.Keys
+import com.gitblit.models.RepositoryModel
+import com.gitblit.models.UserModel
+import com.gitblit.utils.JGitUtils
+import org.eclipse.jgit.lib.Repository
+import org.eclipse.jgit.revwalk.RevCommit
+import org.eclipse.jgit.transport.ReceiveCommand
+import org.eclipse.jgit.transport.ReceiveCommand.Result
+import org.slf4j.Logger
+
+/**
+ * Sample Gitblit Post-Receive Hook: jenkins
+ *
+ * The Post-Receive hook is executed AFTER the pushed commits have been applied
+ * to the Git repository. This is the appropriate point to trigger an
+ * integration build or to send a notification.
+ *
+ * This script is only executed when pushing to *Gitblit*, not to other Git
+ * tooling you may be using.
+ *
+ * If this script is specified in *groovy.postReceiveScripts* of gitblit.properties
+ * or web.xml then it will be executed by any repository when it receives a
+ * push. If you choose to share your script then you may have to consider
+ * tailoring control-flow based on repository access restrictions.
+ *
+ * Scripts may also be specified per-repository in the repository settings page.
+ * Shared scripts will be excluded from this list of available scripts.
+ *
+ * This script is dynamically reloaded and it is executed within it's own
+ * exception handler so it will not crash another script nor crash Gitblit.
+ *
+ * Bound Variables:
+ * gitblit Gitblit Server com.gitblit.GitBlit
+ * repository Gitblit Repository com.gitblit.models.RepositoryModel
+ * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack
+ * user Gitblit User com.gitblit.models.UserModel
+ * commands JGit commands Collection<org.eclipse.jgit.transport.ReceiveCommand>
+ * url Base url for Gitblit String
+ * logger Logs messages to Gitblit org.slf4j.Logger
+ * clientLogger Logs messages to Git client com.gitblit.utils.ClientLogger
+ *
+ * Accessing Gitblit Custom Fields:
+ * def myCustomField = repository.customFields.myCustomField
+ *
+ */
+// Indicate we have started the script
+logger.info("jenkins hook triggered by ${user.username} for ${repository.name}")
+
+// This script requires Jenkins Git plugin 1.1.14 or later
+// http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/
+
+// define your jenkins url here or set groovy.jenkinsServer in
+// gitblit.properties or web.xml
+def jenkinsUrl = gitblit.getString('groovy.jenkinsServer', 'http://yourserver/jenkins')
+
+// define the trigger url
+def triggerUrl = jenkinsUrl + "/git/notifyCommit?url=$url/git/$repository.name"
+
+// trigger the build
+new URL(triggerUrl).getContent()
diff --git a/src/main/distrib/data/groovy/localclone.groovy b/src/main/distrib/data/groovy/localclone.groovy
new file mode 100644
index 00000000..49b7f8b3
--- /dev/null
+++ b/src/main/distrib/data/groovy/localclone.groovy
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2012 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import com.gitblit.GitBlit
+import com.gitblit.Keys
+import com.gitblit.models.RepositoryModel
+import com.gitblit.models.TeamModel
+import com.gitblit.models.UserModel
+import com.gitblit.utils.JGitUtils
+import com.gitblit.utils.StringUtils
+import java.text.SimpleDateFormat
+import org.eclipse.jgit.api.CloneCommand
+import org.eclipse.jgit.api.Git
+import org.eclipse.jgit.lib.Repository
+import org.eclipse.jgit.lib.Config
+import org.eclipse.jgit.revwalk.RevCommit
+import org.eclipse.jgit.transport.ReceiveCommand
+import org.eclipse.jgit.transport.ReceiveCommand.Result
+import org.eclipse.jgit.util.FileUtils
+import org.slf4j.Logger
+
+/**
+ * Sample Gitblit Post-Receive Hook: localclone
+ *
+ * The Post-Receive hook is executed AFTER the pushed commits have been applied
+ * to the Git repository. This is the appropriate point to trigger an
+ * integration build or to send a notification.
+ *
+ * This script is only executed when pushing to *Gitblit*, not to other Git
+ * tooling you may be using.
+ *
+ * If this script is specified in *groovy.postReceiveScripts* of gitblit.properties
+ * or web.xml then it will be executed by any repository when it receives a
+ * push. If you choose to share your script then you may have to consider
+ * tailoring control-flow based on repository access restrictions.
+ *
+ * Scripts may also be specified per-repository in the repository settings page.
+ * Shared scripts will be excluded from this list of available scripts.
+ *
+ * This script is dynamically reloaded and it is executed within it's own
+ * exception handler so it will not crash another script nor crash Gitblit.
+ *
+ * If you want this hook script to fail and abort all subsequent scripts in the
+ * chain, "return false" at the appropriate failure points.
+ *
+ * Bound Variables:
+ * gitblit Gitblit Server com.gitblit.GitBlit
+ * repository Gitblit Repository com.gitblit.models.RepositoryModel
+ * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack
+ * user Gitblit User com.gitblit.models.UserModel
+ * commands JGit commands Collection<org.eclipse.jgit.transport.ReceiveCommand>
+ * url Base url for Gitblit String
+ * logger Logs messages to Gitblit org.slf4j.Logger
+ * clientLogger Logs messages to Git client com.gitblit.utils.ClientLogger
+ *
+ * Accessing Gitblit Custom Fields:
+ * def myCustomField = repository.customFields.myCustomField
+ *
+ */
+
+// Indicate we have started the script
+logger.info("localclone hook triggered by ${user.username} for ${repository.name}")
+
+def rootFolder = 'c:/test'
+def bare = false
+def cloneAllBranches = true
+def cloneBranch = 'refs/heads/master'
+def includeSubmodules = true
+
+def repoName = repository.name
+def destinationFolder = new File(rootFolder, StringUtils.stripDotGit(repoName))
+def srcUrl = 'file://' + new File(GitBlit.getRepositoriesFolder(), repoName).absolutePath
+
+// delete any previous clone
+if (destinationFolder.exists()) {
+ FileUtils.delete(destinationFolder, FileUtils.RECURSIVE)
+}
+
+// clone the repository
+logger.info("cloning ${srcUrl} to ${destinationFolder}")
+CloneCommand cmd = Git.cloneRepository();
+cmd.setBare(bare)
+if (cloneAllBranches)
+ cmd.setCloneAllBranches(true)
+else
+ cmd.setBranch(cloneBranch)
+cmd.setCloneSubmodules(includeSubmodules)
+cmd.setURI(srcUrl)
+cmd.setDirectory(destinationFolder)
+Git git = cmd.call();
+git.repository.close()
+
+// report clone operation success back to pushing Git client
+clientLogger.info("${repoName} cloned to ${destinationFolder}") \ No newline at end of file
diff --git a/src/main/distrib/data/groovy/protect-refs.groovy b/src/main/distrib/data/groovy/protect-refs.groovy
new file mode 100644
index 00000000..b1b611f4
--- /dev/null
+++ b/src/main/distrib/data/groovy/protect-refs.groovy
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2012 Philip L. McMahon.
+ *
+ * Derived from blockpush.groovy, copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import com.gitblit.GitBlit
+import com.gitblit.models.RepositoryModel
+import com.gitblit.models.UserModel
+
+import org.eclipse.jgit.transport.ReceiveCommand
+import org.eclipse.jgit.transport.ReceiveCommand.Result
+import org.slf4j.Logger
+
+/**
+ * Sample Gitblit Pre-Receive Hook: protect-refs
+ *
+ * This script provides basic authorization of receive command types for a list
+ * of known ref patterns. Command types and unmatched ref patterns will be
+ * ignored, meaning this script has an "allow by default" policy.
+ *
+ * This script works best when a repository requires authentication on push, but
+ * can be used to enforce fast-forward commits or prohibit ref deletion by
+ * setting the *authorizedTeams* variable to an empty list and adding a ".+"
+ * entry to the *protectedRefs* list.
+ *
+ * The Pre-Receive hook is executed after an incoming push has been parsed,
+ * validated, and objects have been written but BEFORE the refs are updated.
+ * This is the appropriate point to block a push for some reason.
+ *
+ * This script is only executed when pushing to *Gitblit*, not to other Git
+ * tooling you may be using.
+ *
+ * If this script is specified in *groovy.preReceiveScripts* of gitblit.properties
+ * or web.xml then it will be executed by any repository when it receives a
+ * push. If you choose to share your script then you may have to consider
+ * tailoring control-flow based on repository access restrictions.
+ *
+ * Scripts may also be specified per-repository in the repository settings page.
+ * Shared scripts will be excluded from this list of available scripts.
+ *
+ * This script is dynamically reloaded and it is executed within it's own
+ * exception handler so it will not crash another script nor crash Gitblit.
+ *
+ * This script may reject one or more commands, but will never return false.
+ * Subsequent scripts, if any, will always be invoked.
+ *
+ * Bound Variables:
+ * gitblit Gitblit Server com.gitblit.GitBlit
+ * repository Gitblit Repository com.gitblit.models.RepositoryModel
+ * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack
+ * user Gitblit User com.gitblit.models.UserModel
+ * commands JGit commands Collection<org.eclipse.jgit.transport.ReceiveCommand>
+ * url Base url for Gitblit String
+ * logger Logs messages to Gitblit org.slf4j.Logger
+ * clientLogger Logs messages to Git client com.gitblit.utils.ClientLogger
+ *
+ * Accessing Gitblit Custom Fields:
+ * def myCustomField = repository.customFields.myCustomField
+ *
+ */
+
+// map of protected command types to returned results type
+// commands not included will skip authz check
+def protectedCmds = [
+ UPDATE_NONFASTFORWARD: Result.REJECTED_NONFASTFORWARD,
+ DELETE: Result.REJECTED_NODELETE
+]
+
+// list of regex patterns for protected refs
+def protectedRefs = [
+ "refs/heads/master",
+ "refs/tags/.+"
+]
+
+// teams which are authorized to perform protected commands on protected refs
+def authorizedTeams = [ "admins" ]
+
+for (ReceiveCommand command : commands) {
+ def updateType = command.type
+ def updatedRef = command.refName
+
+ // find first regex which matches updated ref, if any
+ def refPattern = protectedRefs.find { updatedRef.matches ~it }
+
+ // find rejection result for update type, if any
+ def result = protectedCmds[updateType.name()]
+
+ // command requires authz if ref is protected and has a mapped rejection result
+ if (refPattern && result) {
+
+ // verify user is a member of any authorized team
+ def team = authorizedTeams.find { user.isTeamMember it }
+ if (team) {
+ // don't adjust command result
+ logger.info "${user.username} authorized for ${updateType} of protected ref ${repository.name}:${updatedRef} (${command.oldId.name} -> ${command.newId.name})"
+ } else {
+ // mark command result as rejected
+ command.setResult(result, "${user.username} cannot ${updateType} protected ref ${repository.name}:${updatedRef} matching pattern ${refPattern}")
+ }
+ }
+}
diff --git a/src/main/distrib/data/groovy/sendmail-html.groovy b/src/main/distrib/data/groovy/sendmail-html.groovy
new file mode 100644
index 00000000..16920735
--- /dev/null
+++ b/src/main/distrib/data/groovy/sendmail-html.groovy
@@ -0,0 +1,516 @@
+/*
+ * Copyright 2012 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import com.gitblit.GitBlit
+import com.gitblit.Keys
+import com.gitblit.models.RepositoryModel
+import com.gitblit.models.TeamModel
+import com.gitblit.models.UserModel
+import com.gitblit.utils.JGitUtils
+import java.text.SimpleDateFormat
+
+import org.eclipse.jgit.api.Status;
+import org.eclipse.jgit.api.errors.JGitInternalException;
+import org.eclipse.jgit.diff.DiffEntry;
+import org.eclipse.jgit.diff.DiffFormatter;
+import org.eclipse.jgit.diff.RawTextComparator;
+import org.eclipse.jgit.diff.DiffEntry.ChangeType;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.IndexDiff;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Repository
+import org.eclipse.jgit.lib.Config
+import org.eclipse.jgit.patch.FileHeader;
+import org.eclipse.jgit.revwalk.RevCommit
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.transport.ReceiveCommand
+import org.eclipse.jgit.transport.ReceiveCommand.Result
+import org.eclipse.jgit.treewalk.FileTreeIterator;
+import org.eclipse.jgit.treewalk.EmptyTreeIterator;
+import org.eclipse.jgit.treewalk.CanonicalTreeParser;
+import org.eclipse.jgit.util.io.DisabledOutputStream;
+import org.slf4j.Logger
+import groovy.xml.MarkupBuilder
+
+import java.io.IOException;
+import java.security.MessageDigest
+
+
+/**
+ * Sample Gitblit Post-Receive Hook: sendmail-html
+ *
+ * The Post-Receive hook is executed AFTER the pushed commits have been applied
+ * to the Git repository. This is the appropriate point to trigger an
+ * integration build or to send a notification.
+ *
+ * This script is only executed when pushing to *Gitblit*, not to other Git
+ * tooling you may be using.
+ *
+ * If this script is specified in *groovy.postReceiveScripts* of gitblit.properties
+ * or web.xml then it will be executed by any repository when it receives a
+ * push. If you choose to share your script then you may have to consider
+ * tailoring control-flow based on repository access restrictions.
+ *
+ * Scripts may also be specified per-repository in the repository settings page.
+ * Shared scripts will be excluded from this list of available scripts.
+ *
+ * This script is dynamically reloaded and it is executed within it's own
+ * exception handler so it will not crash another script nor crash Gitblit.
+ *
+ * If you want this hook script to fail and abort all subsequent scripts in the
+ * chain, "return false" at the appropriate failure points.
+ *
+ * Bound Variables:
+ * gitblit Gitblit Server com.gitblit.GitBlit
+ * repository Gitblit Repository com.gitblit.models.RepositoryModel
+ * user Gitblit User com.gitblit.models.UserModel
+ * commands JGit commands Collection<org.eclipse.jgit.transport.ReceiveCommand>
+ * url Base url for Gitblit java.lang.String
+ * logger Logs messages to Gitblit org.slf4j.Logger
+ * clientLogger Logs messages to Git client com.gitblit.utils.ClientLogger
+ *
+ * Accessing Gitblit Custom Fields:
+ * def myCustomField = repository.customFields.myCustomField
+ *
+ */
+
+com.gitblit.models.UserModel userModel = user
+
+// Indicate we have started the script
+logger.info("sendmail-html hook triggered by ${user.username} for ${repository.name}")
+
+/*
+ * Primitive email notification.
+ * This requires the mail settings to be properly configured in Gitblit.
+ */
+
+Repository r = gitblit.getRepository(repository.name)
+
+// reuse existing repository config settings, if available
+Config config = r.getConfig()
+def mailinglist = config.getString('hooks', null, 'mailinglist')
+def emailprefix = config.getString('hooks', null, 'emailprefix')
+
+// set default values
+def toAddresses = []
+if (emailprefix == null) {
+ emailprefix = '[Gitblit]'
+}
+
+if (mailinglist != null) {
+ def addrs = mailinglist.split(/(,|\s)/)
+ toAddresses.addAll(addrs)
+}
+
+// add all mailing lists defined in gitblit.properties or web.xml
+toAddresses.addAll(GitBlit.getStrings(Keys.mail.mailingLists))
+
+// add all team mailing lists
+def teams = gitblit.getRepositoryTeams(repository)
+for (team in teams) {
+ TeamModel model = gitblit.getTeamModel(team)
+ if (model.mailingLists) {
+ toAddresses.addAll(model.mailingLists)
+ }
+}
+
+// add all mailing lists for the repository
+toAddresses.addAll(repository.mailingLists)
+
+// define the summary and commit urls
+def repo = repository.name
+def summaryUrl = url + "/summary?r=$repo"
+def baseCommitUrl = url + "/commit?r=$repo&h="
+def baseBlobDiffUrl = url + "/blobdiff/?r=$repo&h="
+def baseCommitDiffUrl = url + "/commitdiff/?r=$repo&h="
+def forwardSlashChar = gitblit.getString(Keys.web.forwardSlashCharacter, '/')
+
+if (gitblit.getBoolean(Keys.web.mountParameters, true)) {
+ repo = repo.replace('/', forwardSlashChar).replace('/', '%2F')
+ summaryUrl = url + "/summary/$repo"
+ baseCommitUrl = url + "/commit/$repo/"
+ baseBlobDiffUrl = url + "/blobdiff/$repo/"
+ baseCommitDiffUrl = url + "/commitdiff/$repo/"
+}
+
+class HtmlMailWriter {
+ Repository repository
+ def url
+ def baseCommitUrl
+ def baseCommitDiffUrl
+ def baseBlobDiffUrl
+ def mountParameters
+ def forwardSlashChar
+ def includeGravatar
+ def shortCommitIdLength
+ def commitCount = 0
+ def commands
+ def writer = new StringWriter();
+ def builder = new MarkupBuilder(writer)
+
+ def writeStyle() {
+ builder.style(type:"text/css", '''
+ .table td {
+ vertical-align: middle;
+ }
+ tr.noborder td {
+ border: none;
+ padding-top: 0px;
+ }
+ .gravatar-column {
+ width: 5%;
+ }
+ .author-column {
+ width: 20%;
+ }
+ .commit-column {
+ width: 5%;
+ }
+ .status-column {
+ width: 10%;
+ }
+ .table-disable-hover.table tbody tr:hover td,
+ .table-disable-hover.table tbody tr:hover th {
+ background-color: inherit;
+ }
+ .table-disable-hover.table-striped tbody tr:nth-child(odd):hover td,
+ .table-disable-hover.table-striped tbody tr:nth-child(odd):hover th {
+ background-color: #f9f9f9;
+ }
+ ''')
+ }
+
+ def writeBranchTitle(type, name, action, number) {
+ builder.div('class' : 'pageTitle') {
+ builder.span('class':'project') {
+ mkp.yield "$type "
+ span('class': 'repository', name )
+ if (number > 0) {
+ mkp.yield " $action ($number commits)"
+ } else {
+ mkp.yield " $action"
+ }
+ }
+ }
+ }
+
+ def writeBranchDeletedTitle(type, name) {
+ builder.div('class' : 'pageTitle', 'style':'color:red') {
+ builder.span('class':'project') {
+ mkp.yield "$type "
+ span('class': 'repository', name )
+ mkp.yield " deleted"
+ }
+ }
+ }
+
+ def commitUrl(RevCommit commit) {
+ "${baseCommitUrl}$commit.id.name"
+ }
+
+ def commitDiffUrl(RevCommit commit) {
+ "${baseCommitDiffUrl}$commit.id.name"
+ }
+
+ def encoded(String path) {
+ path.replace('/', forwardSlashChar).replace('/', '%2F')
+ }
+
+ def blobDiffUrl(objectId, path) {
+ if (mountParameters) {
+ // REST style
+ "${baseBlobDiffUrl}${objectId.name()}/${encoded(path)}"
+ } else {
+ "${baseBlobDiffUrl}${objectId.name()}&f=${path}"
+ }
+
+ }
+
+ def writeCommitTable(commits, includeChangedPaths=true) {
+ // Write commits table
+ builder.table('class':"table table-disable-hover") {
+ thead {
+ tr {
+ th(colspan: includeGravatar ? 2 : 1, "Author")
+ th( "Commit" )
+ th( "Message" )
+ }
+ }
+ tbody() {
+
+ // Write all the commits
+ for (commit in commits) {
+ writeCommit(commit)
+
+ if (includeChangedPaths) {
+ // Write detail on that particular commit
+ tr('class' : 'noborder') {
+ td (colspan: includeGravatar ? 3 : 2)
+ td (colspan:2) { writeStatusTable(commit) }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ def writeCommit(commit) {
+ def abbreviated = repository.newObjectReader().abbreviate(commit.id, shortCommitIdLength).name()
+ def author = commit.authorIdent.name
+ def email = commit.authorIdent.emailAddress
+ def message = commit.shortMessage
+ builder.tr {
+ if (includeGravatar) {
+ td('class':"gravatar-column") {
+ img(src:gravatarUrl(email), 'class':"gravatar")
+ }
+ }
+ td('class':"author-column", author)
+ td('class':"commit-column") {
+ a(href:commitUrl(commit)) {
+ span('class':"label label-info", abbreviated )
+ }
+ }
+ td {
+ mkp.yield message
+ a('class':'link', href:commitDiffUrl(commit), " [commitdiff]" )
+ }
+ }
+ }
+
+ def writeStatusLabel(style, tooltip) {
+ builder.span('class' : style, 'title' : tooltip )
+ }
+
+ def writeAddStatusLine(ObjectId id, FileHeader header) {
+ builder.td('class':'changeType') {
+ writeStatusLabel("addition", "addition")
+ }
+ builder.td {
+ a(href:blobDiffUrl(id, header.newPath), header.newPath)
+ }
+ }
+
+ def writeCopyStatusLine(ObjectId id, FileHeader header) {
+ builder.td('class':'changeType') {
+ writeStatusLabel("rename", "rename")
+ }
+ builder.td() {
+ a(href:blobDiffUrl(id, header.newPath), header.oldPath + " copied to " + header.newPath)
+ }
+ }
+
+ def writeDeleteStatusLine(ObjectId id, FileHeader header) {
+ builder.td('class':'changeType') {
+ writeStatusLabel("deletion", "deletion")
+ }
+ builder.td() {
+ a(href:blobDiffUrl(id, header.oldPath), header.oldPath)
+ }
+ }
+
+ def writeModifyStatusLine(ObjectId id, FileHeader header) {
+ builder.td('class':'changeType') {
+ writeStatusLabel("modification", "modification")
+ }
+ builder.td() {
+ a(href:blobDiffUrl(id, header.oldPath), header.oldPath)
+ }
+ }
+
+ def writeRenameStatusLine(ObjectId id, FileHeader header) {
+ builder.td('class':'changeType') {
+ writeStatusLabel("rename", "rename")
+ }
+ builder.td() {
+ mkp.yield header.oldPath
+ mkp.yieldUnescaped "<b> -&rt; </b>"
+ a(href:blobDiffUrl(id, header.newPath), header.newPath)
+ }
+ }
+
+ def writeStatusLine(ObjectId id, FileHeader header) {
+ builder.tr {
+ switch (header.changeType) {
+ case ChangeType.ADD:
+ writeAddStatusLine(id, header)
+ break;
+ case ChangeType.COPY:
+ writeCopyStatusLine(id, header)
+ break;
+ case ChangeType.DELETE:
+ writeDeleteStatusLine(id, header)
+ break;
+ case ChangeType.MODIFY:
+ writeModifyStatusLine(id, header)
+ break;
+ case ChangeType.RENAME:
+ writeRenameStatusLine(id, header)
+ break;
+ }
+ }
+ }
+
+ def writeStatusTable(RevCommit commit) {
+ DiffFormatter formatter = new DiffFormatter(DisabledOutputStream.INSTANCE)
+ formatter.setRepository(repository)
+ formatter.setDetectRenames(true)
+ formatter.setDiffComparator(RawTextComparator.DEFAULT);
+
+ def diffs
+ RevWalk rw = new RevWalk(repository)
+ if (commit.parentCount > 0) {
+ RevCommit parent = rw.parseCommit(commit.parents[0].id)
+ diffs = formatter.scan(parent.tree, commit.tree)
+ } else {
+ diffs = formatter.scan(new EmptyTreeIterator(),
+ new CanonicalTreeParser(null, rw.objectReader, commit.tree))
+ }
+ rw.dispose()
+ // Write status table
+ builder.table('class':"plain") {
+ tbody() {
+ for (DiffEntry entry in diffs) {
+ FileHeader header = formatter.toFileHeader(entry)
+ writeStatusLine(commit.id, header)
+ }
+ }
+ }
+ }
+
+
+ def md5(text) {
+
+ def digest = MessageDigest.getInstance("MD5")
+
+ //Quick MD5 of text
+ def hash = new BigInteger(1, digest.digest(text.getBytes()))
+ .toString(16)
+ .padLeft(32, "0")
+ hash.toString()
+ }
+
+ def gravatarUrl(email) {
+ def cleaned = email.trim().toLowerCase()
+ "http://www.gravatar.com/avatar/${md5(cleaned)}?s=30"
+ }
+
+ def writeNavbar() {
+ builder.div('class':"navbar navbar-fixed-top") {
+ div('class':"navbar-inner") {
+ div('class':"container") {
+ a('class':"brand", href:"${url}", title:"GitBlit") {
+ img(src:"${url}/gitblt_25_white.png",
+ width:"79",
+ height:"25",
+ 'class':"logo")
+ }
+ }
+ }
+ }
+ }
+
+ def write() {
+ builder.html {
+ head {
+ link(rel:"stylesheet", href:"${url}/bootstrap/css/bootstrap.css")
+ link(rel:"stylesheet", href:"${url}/gitblit.css")
+ link(rel:"stylesheet", href:"${url}/bootstrap/css/bootstrap-responsive.css")
+ writeStyle()
+ }
+ body {
+
+ writeNavbar()
+
+ div('class':"container") {
+
+ for (command in commands) {
+ def ref = command.refName
+ def refType = 'Branch'
+ if (ref.startsWith('refs/heads/')) {
+ ref = command.refName.substring('refs/heads/'.length())
+ } else if (ref.startsWith('refs/tags/')) {
+ ref = command.refName.substring('refs/tags/'.length())
+ refType = 'Tag'
+ }
+
+ switch (command.type) {
+ case ReceiveCommand.Type.CREATE:
+ def commits = JGitUtils.getRevLog(repository, command.oldId.name, command.newId.name).reverse()
+ commitCount += commits.size()
+ if (refType == 'Branch') {
+ // new branch
+ writeBranchTitle(refType, ref, "created", commits.size())
+ writeCommitTable(commits, true)
+ } else {
+ // new tag
+ writeBranchTitle(refType, ref, "created", 0)
+ writeCommitTable(commits, false)
+ }
+ break
+ case ReceiveCommand.Type.UPDATE:
+ def commits = JGitUtils.getRevLog(repository, command.oldId.name, command.newId.name).reverse()
+ commitCount += commits.size()
+ // fast-forward branch commits table
+ // Write header
+ writeBranchTitle(refType, ref, "updated", commits.size())
+ writeCommitTable(commits)
+ break
+ case ReceiveCommand.Type.UPDATE_NONFASTFORWARD:
+ def commits = JGitUtils.getRevLog(repository, command.oldId.name, command.newId.name).reverse()
+ commitCount += commits.size()
+ // non-fast-forward branch commits table
+ // Write header
+ writeBranchTitle(refType, ref, "updated [NON fast-forward]", commits.size())
+ writeCommitTable(commits)
+ break
+ case ReceiveCommand.Type.DELETE:
+ // deleted branch/tag
+ writeBranchDeletedTitle(refType, ref)
+ break
+ default:
+ break
+ }
+ }
+ }
+ }
+ }
+ writer.toString()
+ }
+
+}
+
+def mailWriter = new HtmlMailWriter()
+mailWriter.repository = r
+mailWriter.baseCommitUrl = baseCommitUrl
+mailWriter.baseBlobDiffUrl = baseBlobDiffUrl
+mailWriter.baseCommitDiffUrl = baseCommitDiffUrl
+mailWriter.forwardSlashChar = forwardSlashChar
+mailWriter.commands = commands
+mailWriter.url = url
+mailWriter.mountParameters = GitBlit.getBoolean(Keys.web.mountParameters, true)
+mailWriter.includeGravatar = GitBlit.getBoolean(Keys.web.allowGravatar, true)
+mailWriter.shortCommitIdLength = GitBlit.getInteger(Keys.web.shortCommitIdLength, 8)
+
+def content = mailWriter.write()
+
+// close the repository reference
+r.close()
+
+// tell Gitblit to send the message (Gitblit filters duplicate addresses)
+def repositoryName = repository.name.substring(0, repository.name.length() - 4)
+gitblit.sendHtmlMail("${emailprefix} ${userModel.displayName} pushed ${mailWriter.commitCount} commits => $repositoryName",
+ content,
+ toAddresses)
diff --git a/src/main/distrib/data/groovy/sendmail.groovy b/src/main/distrib/data/groovy/sendmail.groovy
new file mode 100644
index 00000000..c832bc64
--- /dev/null
+++ b/src/main/distrib/data/groovy/sendmail.groovy
@@ -0,0 +1,176 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import com.gitblit.GitBlit
+import com.gitblit.Keys
+import com.gitblit.models.RepositoryModel
+import com.gitblit.models.TeamModel
+import com.gitblit.models.UserModel
+import com.gitblit.utils.JGitUtils
+import java.text.SimpleDateFormat
+import org.eclipse.jgit.lib.Repository
+import org.eclipse.jgit.lib.Config
+import org.eclipse.jgit.revwalk.RevCommit
+import org.eclipse.jgit.transport.ReceiveCommand
+import org.eclipse.jgit.transport.ReceiveCommand.Result
+import org.slf4j.Logger
+
+/**
+ * Sample Gitblit Post-Receive Hook: sendmail
+ *
+ * The Post-Receive hook is executed AFTER the pushed commits have been applied
+ * to the Git repository. This is the appropriate point to trigger an
+ * integration build or to send a notification.
+ *
+ * This script is only executed when pushing to *Gitblit*, not to other Git
+ * tooling you may be using.
+ *
+ * If this script is specified in *groovy.postReceiveScripts* of gitblit.properties
+ * or web.xml then it will be executed by any repository when it receives a
+ * push. If you choose to share your script then you may have to consider
+ * tailoring control-flow based on repository access restrictions.
+ *
+ * Scripts may also be specified per-repository in the repository settings page.
+ * Shared scripts will be excluded from this list of available scripts.
+ *
+ * This script is dynamically reloaded and it is executed within it's own
+ * exception handler so it will not crash another script nor crash Gitblit.
+ *
+ * If you want this hook script to fail and abort all subsequent scripts in the
+ * chain, "return false" at the appropriate failure points.
+ *
+ * Bound Variables:
+ * gitblit Gitblit Server com.gitblit.GitBlit
+ * repository Gitblit Repository com.gitblit.models.RepositoryModel
+ * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack
+ * user Gitblit User com.gitblit.models.UserModel
+ * commands JGit commands Collection<org.eclipse.jgit.transport.ReceiveCommand>
+ * url Base url for Gitblit String
+ * logger Logs messages to Gitblit org.slf4j.Logger
+ * clientLogger Logs messages to Git client com.gitblit.utils.ClientLogger
+ *
+ * Accessing Gitblit Custom Fields:
+ * def myCustomField = repository.customFields.myCustomField
+ *
+ */
+
+// Indicate we have started the script
+logger.info("sendmail hook triggered by ${user.username} for ${repository.name}")
+
+/*
+ * Primitive email notification.
+ * This requires the mail settings to be properly configured in Gitblit.
+ */
+
+Repository r = gitblit.getRepository(repository.name)
+
+// reuse existing repository config settings, if available
+Config config = r.getConfig()
+def mailinglist = config.getString('hooks', null, 'mailinglist')
+def emailprefix = config.getString('hooks', null, 'emailprefix')
+
+// set default values
+def toAddresses = []
+if (emailprefix == null)
+emailprefix = '[Gitblit]'
+
+if (mailinglist != null) {
+ def addrs = mailinglist.split(/(,|\s)/)
+ toAddresses.addAll(addrs)
+}
+
+// add all mailing lists defined in gitblit.properties or web.xml
+toAddresses.addAll(gitblit.getStrings(Keys.mail.mailingLists))
+
+// add all team mailing lists
+def teams = gitblit.getRepositoryTeams(repository)
+for (team in teams) {
+ TeamModel model = gitblit.getTeamModel(team)
+ if (model.mailingLists) {
+ toAddresses.addAll(model.mailingLists)
+ }
+}
+
+// add all mailing lists for the repository
+toAddresses.addAll(repository.mailingLists)
+
+// define the summary and commit urls
+def repo = repository.name
+def summaryUrl
+def commitUrl
+if (gitblit.getBoolean(Keys.web.mountParameters, true)) {
+ repo = repo.replace('/', gitblit.getString(Keys.web.forwardSlashCharacter, '/')).replace('/', '%2F')
+ summaryUrl = url + "/summary/$repo"
+ commitUrl = url + "/commit/$repo/"
+} else {
+ summaryUrl = url + "/summary?r=$repo"
+ commitUrl = url + "/commit?r=$repo&h="
+}
+
+// construct a simple text summary of the changes contained in the push
+def branchBreak = '>---------------------------------------------------------------\n'
+def commitBreak = '\n\n ----\n'
+def commitCount = 0
+def changes = ''
+SimpleDateFormat df = new SimpleDateFormat(gitblit.getString(Keys.web.datetimestampLongFormat, 'EEEE, MMMM d, yyyy h:mm a z'))
+def table = { "\n ${JGitUtils.getDisplayName(it.authorIdent)}\n ${df.format(JGitUtils.getCommitDate(it))}\n\n $it.shortMessage\n\n $commitUrl$it.id.name" }
+for (command in commands) {
+ def ref = command.refName
+ def refType = 'branch'
+ if (ref.startsWith('refs/heads/')) {
+ ref = command.refName.substring('refs/heads/'.length())
+ } else if (ref.startsWith('refs/tags/')) {
+ ref = command.refName.substring('refs/tags/'.length())
+ refType = 'tag'
+ }
+
+ switch (command.type) {
+ case ReceiveCommand.Type.CREATE:
+ def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()
+ commitCount += commits.size()
+ // new branch
+ changes += "\n$branchBreak new $refType $ref created ($commits.size commits)\n$branchBreak"
+ changes += commits.collect(table).join(commitBreak)
+ changes += '\n'
+ break
+ case ReceiveCommand.Type.UPDATE:
+ def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()
+ commitCount += commits.size()
+ // fast-forward branch commits table
+ changes += "\n$branchBreak $ref $refType updated ($commits.size commits)\n$branchBreak"
+ changes += commits.collect(table).join(commitBreak)
+ changes += '\n'
+ break
+ case ReceiveCommand.Type.UPDATE_NONFASTFORWARD:
+ def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()
+ commitCount += commits.size()
+ // non-fast-forward branch commits table
+ changes += "\n$branchBreak $ref $refType updated [NON fast-forward] ($commits.size commits)\n$branchBreak"
+ changes += commits.collect(table).join(commitBreak)
+ changes += '\n'
+ break
+ case ReceiveCommand.Type.DELETE:
+ // deleted branch/tag
+ changes += "\n$branchBreak $ref $refType deleted\n$branchBreak"
+ break
+ default:
+ break
+ }
+}
+// close the repository reference
+r.close()
+
+// tell Gitblit to send the message (Gitblit filters duplicate addresses)
+gitblit.sendMail("$emailprefix $user.username pushed $commitCount commits => $repository.name", "$summaryUrl\n$changes", toAddresses) \ No newline at end of file
diff --git a/src/main/distrib/data/groovy/thebuggenie.groovy b/src/main/distrib/data/groovy/thebuggenie.groovy
new file mode 100644
index 00000000..b4385a26
--- /dev/null
+++ b/src/main/distrib/data/groovy/thebuggenie.groovy
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2011 Wolfgang Gassler gassler.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import com.gitblit.GitBlit
+import com.gitblit.Keys
+import com.gitblit.models.RepositoryModel
+import com.gitblit.models.TeamModel
+import com.gitblit.models.UserModel
+import com.gitblit.utils.JGitUtils
+import java.text.SimpleDateFormat
+import org.eclipse.jgit.lib.Repository
+import org.eclipse.jgit.lib.Config
+import org.eclipse.jgit.revwalk.RevCommit
+import org.eclipse.jgit.transport.ReceiveCommand
+import org.eclipse.jgit.transport.ReceiveCommand.Result
+import org.slf4j.Logger
+import org.eclipse.jgit.lib.IndexDiff
+import org.eclipse.jgit.lib.Constants
+import com.gitblit.utils.DiffUtils
+
+/**
+ * Gitblit Post-Receive Hook: thebuggenie
+ * www.thebuggenie.com
+ *
+ * Submit the commit information to thebuggenie bug tracker by calling thebuggenie client tool
+ *
+ * Config of the Script:
+ *
+ * Setup a custom gitblit field in the proprties file of gitblit by adding the following line
+ * groovy.customFields = "thebuggenieProjectId=TheBugGennie project id (used for thebuggenie hoocks)"
+ * This field allows to specify the project id of thebuggenie project in the edit section of gitblit
+ *
+ * Furthermore you need to set the path to thebuggenie client tool by adding the following property to
+ * the gitblit properties file
+ * thebuggenie.tbg_cli = /var/www/thebuggenie_root/tbg_cli
+ */
+
+// Indicate we have started the script
+logger.info("thebuggenie hook triggered by ${user.username} for ${repository.name}")
+
+//fetch the repository data
+Repository r = gitblit.getRepository(repository.name)
+
+//get project id which is defined in the git repo metadata
+def tbgProjectId = repository.customFields.thebuggenieProjectId
+//get path to the thebuggenie client tool which is defined in the gitblit proprties files
+def tbgCliPath = gitblit.getString('thebuggenie.tbg_cli', '/var/www/thebuggenie/tbg_cli')
+def tbgCliDirPath = new File(tbgCliPath).getParent()
+
+for(command in commands) {
+ //fetch all pushed commits
+ def commits = JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse()
+ for (commit in commits) {
+ //get hashes and author data of commit
+ def oldhash = commit.getParent(0).getId().getName()
+ def newhash = commit.getId().getName()
+ def authorIdent = commit.getAuthorIdent()
+ def author = "${authorIdent.name} <${authorIdent.emailAddress}>"
+ //fetch all changed files of the commit
+ def files = JGitUtils.getFilesInCommit(r,commit)
+ def changedFiles = ""
+ for (f in files) {
+ //transform file data to the format which is needed by thebuggenie
+ changedFiles += f.changeType.toString().substring(0,1)+"\t${f.path}\n"
+ }
+ //ok let's submit all information to thebuggenie by calling the client tool
+// def shc = "$tbgCliPath vcs_integration:report_commit $tbgProjectId \"$author\" $newhash \"${commit.fullMessage}\" \"$changedFiles\" $oldhash ${commit.commitTime}"
+ def shc = [tbgCliPath, "vcs_integration:report_commit", tbgProjectId, author, newhash, commit.getFullMessage(), changedFiles, oldhash, commit.getCommitTime()];
+ logger.info("executing in path " + tbgCliDirPath + ": "+shc)
+ shc.execute(null, new File(tbgCliDirPath))
+ }
+}
+
+// close the repository reference
+r.close()
diff --git a/src/main/distrib/data/projects.conf b/src/main/distrib/data/projects.conf
new file mode 100644
index 00000000..d43f4829
--- /dev/null
+++ b/src/main/distrib/data/projects.conf
@@ -0,0 +1,3 @@
+[project "main"]
+ title = Main Repositories
+ description = main group of repositories \ No newline at end of file
diff --git a/src/main/distrib/data/users.conf b/src/main/distrib/data/users.conf
new file mode 100644
index 00000000..e9dbd83d
--- /dev/null
+++ b/src/main/distrib/data/users.conf
@@ -0,0 +1,4 @@
+[user "admin"]
+ password = admin
+ role = "#admin"
+ role = "#notfederated"
diff --git a/src/main/distrib/federation.properties b/src/main/distrib/federation.properties
new file mode 100644
index 00000000..c762b45c
--- /dev/null
+++ b/src/main/distrib/federation.properties
@@ -0,0 +1,83 @@
+#
+# Git Repository Settings
+#
+
+# Base folder for repositories
+# Use forward slashes even on Windows!!
+# e.g. c:/gitrepos
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+git.repositoriesFolder = git
+
+# Search the repositories folder subfolders for other repositories.
+# Repositories MAY NOT be nested (i.e. one repository within another)
+# but they may be grouped together in subfolders.
+# e.g. c:/gitrepos/libraries/mylibrary.git
+# c:/gitrepos/libraries/myotherlibrary.git
+#
+# SINCE 0.5.0
+git.searchRepositoriesSubfolders = true
+
+# Your federation name is used for federation status acknowledgments. If it is
+# unset, and you elect to send a status acknowledgment, your Gitblit instance
+# will be identified by its hostname, if available, else your internal ip address.
+# The source Gitblit instance will also append your external IP address to your
+# identification to differentiate multiple pulling systems behind a single proxy.
+#
+# SINCE 0.6.0
+federation.name =
+
+# Federation pull registrations
+# Registrations are read once, at startup.
+#
+# RESTART REQUIRED
+#
+# frequency:
+# The shortest frequency allowed is every 5 minutes
+# Decimal frequency values are cast to integers
+# Frequency values may be specified in mins, hours, or days
+# Values that can not be parsed or are unspecified default to *federation.defaultFrequency*
+#
+# folder:
+# if unspecified, the folder is *git.repositoriesFolder*
+# if specified, the folder is relative to *git.repositoriesFolder*
+#
+# bare:
+# if true, each repository will be created as a *bare* repository and will not
+# have a working directory.
+#
+# if false, each repository will be created as a normal repository suitable
+# for local work.
+#
+# mirror:
+# if true, each repository HEAD is reset to *origin/master* after each pull.
+# The repository will be flagged *isFrozen* after the initial clone.
+#
+# if false, each repository HEAD will point to the FETCH_HEAD of the initial
+# clone from the origin until pushed to or otherwise manipulated.
+#
+# mergeAccounts:
+# if true, remote accounts and their permissions are merged into your
+# users.properties file
+#
+# notifyOnError:
+# if true and the mail configuration is properly set, administrators will be
+# notified by email of pull failures
+#
+# include and exclude:
+# Space-delimited list of repositories to include or exclude from pull
+# may be * wildcard to include or exclude all
+# may use fuzzy match (e.g. org.eclipse.*)
+
+#
+# (Nearly) Perfect Mirror example
+#
+
+#federation.example1.url = https://go.gitblit.com
+#federation.example1.token = 6f3b8a24bf970f17289b234284c94f43eb42f0e4
+#federation.example1.frequency = 120 mins
+#federation.example1.folder =
+#federation.example1.bare = true
+#federation.example1.mirror = true
+#federation.example1.mergeAccounts = true
diff --git a/src/main/distrib/groovy/fogbugz.groovy b/src/main/distrib/groovy/fogbugz.groovy
new file mode 100644
index 00000000..4c19d3da
--- /dev/null
+++ b/src/main/distrib/groovy/fogbugz.groovy
@@ -0,0 +1,167 @@
+import org.eclipse.jgit.revwalk.RevCommit;
+
+/*
+ * Copyright 2013 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import com.gitblit.GitBlit
+import com.gitblit.Keys
+import com.gitblit.models.RepositoryModel
+import com.gitblit.models.TeamModel
+import com.gitblit.models.UserModel
+import com.gitblit.utils.JGitUtils
+import com.sun.org.apache.xalan.internal.xsltc.compiler.Import;
+
+import java.text.SimpleDateFormat
+import org.eclipse.jgit.lib.Repository
+import org.eclipse.jgit.lib.Config
+import org.eclipse.jgit.revwalk.RevCommit
+import org.eclipse.jgit.transport.ReceiveCommand
+import org.eclipse.jgit.transport.ReceiveCommand.Result
+import org.slf4j.Logger
+
+import org.eclipse.jgit.api.Status;
+import org.eclipse.jgit.api.errors.JGitInternalException;
+import org.eclipse.jgit.diff.DiffEntry;
+import org.eclipse.jgit.diff.DiffFormatter;
+import org.eclipse.jgit.diff.RawTextComparator;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.IndexDiff;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.patch.FileHeader;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.treewalk.FileTreeIterator;
+import org.eclipse.jgit.treewalk.EmptyTreeIterator;
+import org.eclipse.jgit.treewalk.CanonicalTreeParser;
+import org.eclipse.jgit.util.io.DisabledOutputStream;
+
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * Sample Gitblit Post-Receive Hook: fogbugz
+ *
+ * The purpose of this script is to invoke the Fogbugz API and update a case when
+ * push is received based.
+ *
+ * Example URL - http://bugs.yourdomain.com/fogbugz/cvsSubmit.asp?ixBug=bugID&sFile=file&sPrev=x&sNew=y&ixRepository=206
+ *
+ * The Post-Receive hook is executed AFTER the pushed commits have been applied
+ * to the Git repository. This is the appropriate point to trigger an
+ * integration build or to send a notification.
+ *
+ * This script is only executed when pushing to *Gitblit*, not to other Git
+ * tooling you may be using.
+ *
+ * If this script is specified in *groovy.postReceiveScripts* of gitblit.properties
+ * or web.xml then it will be executed by any repository when it receives a
+ * push. If you choose to share your script then you may have to consider
+ * tailoring control-flow based on repository access restrictions.
+ *
+ * Scripts may also be specified per-repository in the repository settings page.
+ * Shared scripts will be excluded from this list of available scripts.
+ *
+ * This script is dynamically reloaded and it is executed within it's own
+ * exception handler so it will not crash another script nor crash Gitblit.
+ *
+ * If you want this hook script to fail and abort all subsequent scripts in the
+ * chain, "return false" at the appropriate failure points.
+ *
+ * Bound Variables:
+ * gitblit Gitblit Server com.gitblit.GitBlit
+ * repository Gitblit Repository com.gitblit.models.RepositoryModel
+ * receivePack JGit Receive Pack org.eclipse.jgit.transport.ReceivePack
+ * user Gitblit User com.gitblit.models.UserModel
+ * commands JGit commands Collection<org.eclipse.jgit.transport.ReceiveCommand>
+ * url Base url for Gitblit String
+ * logger Logs messages to Gitblit org.slf4j.Logger
+ * clientLogger Logs messages to Git client com.gitblit.utils.ClientLogger
+ *
+ * Accessing Gitblit Custom Fields:
+ * def myCustomField = repository.customFields.myCustomField
+ *
+ * Cusom Fileds Used by This script
+ * fogbugzUrl - base URL to Fogbugz (ie. https://bugs.yourdomain.com/fogbugz/)
+ * fogbugzRepositoryId - (ixRepository value from Fogbugz Source Control configuration screen)
+ * fogbugzCommitMessageRegex - regex pattern used to match on bug id
+ */
+
+// Indicate we have started the script
+logger.info("fogbugz hook triggered by ${user.username} for ${repository.name}")
+
+/*
+ * Primitive email notification.
+ * This requires the mail settings to be properly configured in Gitblit.
+ */
+
+Repository r = gitblit.getRepository(repository.name)
+
+// pull custom fields from repository specific values
+// groovy.customFields = "fogbugzUrl=Fogbugz Base URL" "fogbugzRepositoryId=Fogbugz Repository ID" "fogbugzCommitMessageRegex="Fogbugz Commit Message Regular Expression"
+def fogbugzUrl = repository.customFields.fogbugzUrl
+def fogbugzRepositoryId = repository.customFields.fogbugzRepositoryId
+def bugIdRegex = repository.customFields.fogbugzCommitMessageRegex
+
+for (command in commands) {
+
+ for( commit in JGitUtils.getRevLog(r, command.oldId.name, command.newId.name).reverse() ) {
+ // Example URL - http://bugs.salsalabs.com/fogbugz/cvsSubmit.asp?ixBug=bugID&sFile=file&sPrev=x&sNew=y&ixRepository=206
+ def bugIds = [];
+ // Grab the second matcher and then filter out each numeric ID and add it to array
+ (commit.getFullMessage() =~ bugIdRegex).each{ (it[1] =~ "\\d+").each {bugIds.add(it)} }
+
+ for( file in getFiles(r, commit) ) {
+ for( bugId in bugIds ) {
+ def url = "${fogbugzUrl}/cvsSubmit.asp?ixBug=${bugId}&sFile=${file}&sPrev=${command.oldId.name}&sNew=${command.newId.name}&ixRepository=${fogbugzRepositoryId}"
+ logger.info( url );
+ // Hit the page and make sure we get an "OK" response
+ def responseString = new URL(url).getText()
+ if( !"OK".equals(responseString) ) {
+ throw new Exception( "Problem posting ${url} - ${responseString}" );
+ }
+ }
+ }
+ }
+}
+// close the repository reference
+r.close()
+
+/**
+ * For a given commit, find all files part of it.
+ */
+def Set<String> getFiles(Repository r, RevCommit commit) {
+ DiffFormatter formatter = new DiffFormatter(DisabledOutputStream.INSTANCE)
+ formatter.setRepository(r)
+ formatter.setDetectRenames(true)
+ formatter.setDiffComparator(RawTextComparator.DEFAULT);
+
+ def diffs
+ RevWalk rw = new RevWalk(r)
+ if (commit.parentCount > 0) {
+ RevCommit parent = rw.parseCommit(commit.parents[0].id)
+ diffs = formatter.scan(parent.tree, commit.tree)
+ } else {
+ diffs = formatter.scan(new EmptyTreeIterator(),
+ new CanonicalTreeParser(null, rw.objectReader, commit.tree))
+ }
+ rw.dispose()
+
+ // Grab each filepath
+ Set<String> fileNameSet = new HashSet<String>( diffs.size() );
+ for (DiffEntry entry in diffs) {
+ FileHeader header = formatter.toFileHeader(entry)
+ fileNameSet.add( header.newPath )
+ }
+ return fileNameSet;
+} \ No newline at end of file
diff --git a/src/main/distrib/linux/add-indexed-branch.sh b/src/main/distrib/linux/add-indexed-branch.sh
new file mode 100644
index 00000000..d31f43ed
--- /dev/null
+++ b/src/main/distrib/linux/add-indexed-branch.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# --------------------------------------------------------------------------
+# This is for Lucene search integration.
+#
+# Allows you to add an indexed branch specification to the repository config
+# for all matching repositories in the specified folder.
+#
+# All repositories are included unless excluded using a --skip parameter.
+# --skip supports simple wildcard fuzzy matching however only 1 asterisk is
+# allowed per parameter.
+#
+# Always use forward-slashes for the path separator in your parameters!!
+#
+# Set FOLDER to the server's git.repositoriesFolder
+# Set BRANCH ("default" or fully qualified ref - i.e. refs/heads/master)
+# Set EXCLUSIONS for any repositories that you do not want to change
+# --------------------------------------------------------------------------
+SET FOLDER=git
+SET EXCLUSIONS=--skip test.git --skip group/test*
+SET BRANCH=default
+java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.AddIndexedBranch --repositoriesFolder %FOLDER% --branch %BRANCH% %EXCLUSIONS% \ No newline at end of file
diff --git a/src/main/distrib/linux/authority.sh b/src/main/distrib/linux/authority.sh
new file mode 100644
index 00000000..ce5c2377
--- /dev/null
+++ b/src/main/distrib/linux/authority.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+java -cp gitblit.jar com.gitblit.authority.Launcher --baseFolder data
diff --git a/src/main/distrib/linux/gitblit-stop.sh b/src/main/distrib/linux/gitblit-stop.sh
new file mode 100644
index 00000000..2fef2034
--- /dev/null
+++ b/src/main/distrib/linux/gitblit-stop.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+java -jar gitblit.jar --baseFolder data --stop
diff --git a/src/main/distrib/linux/gitblit.sh b/src/main/distrib/linux/gitblit.sh
new file mode 100644
index 00000000..7d631e72
--- /dev/null
+++ b/src/main/distrib/linux/gitblit.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+java -jar gitblit.jar --baseFolder data
diff --git a/src/main/distrib/linux/install-service-centos.sh b/src/main/distrib/linux/install-service-centos.sh
new file mode 100644
index 00000000..19d28c73
--- /dev/null
+++ b/src/main/distrib/linux/install-service-centos.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+sudo cp service-centos.sh /etc/init.d/gitblit
+sudo chkconfig --add gitblit
diff --git a/src/main/distrib/linux/install-service-ubuntu.sh b/src/main/distrib/linux/install-service-ubuntu.sh
new file mode 100644
index 00000000..72c4e6c2
--- /dev/null
+++ b/src/main/distrib/linux/install-service-ubuntu.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+sudo cp service-ubuntu.sh /etc/init.d/gitblit
+sudo update-rc.d gitblit defaults
diff --git a/src/main/distrib/linux/java-proxy-config.sh b/src/main/distrib/linux/java-proxy-config.sh
new file mode 100644
index 00000000..5f7a2a27
--- /dev/null
+++ b/src/main/distrib/linux/java-proxy-config.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# To set the proxy configuration, specify the following host name and port
+#PROXY_HOST=
+#PROXY_PORT=
+
+# To exclude any hosts from proxy configuration such that they directly accessed by Gitblit without passing through the proxy server, append the host name to the following variable using "|" as the separator
+NON_PROXY_HOSTS="localhost|127.0.0.*|*.local|192.168.*.*|10.193.*.*"
+
+### The following should not need to be modified
+
+JAVA_PROXY_CONFIG=""
+
+if [ -n "${PROXY_HOST}" -a -n "${PROXY_PORT}" ]; then
+
+ JAVA_PROXY_CONFIG=" -DproxySet=true -Dhttp.proxyHost=${PROXY_HOST} -Dhttp.proxyPort=${PROXY_PORT} -Dhttps.proxyHost=${PROXY_HOST} -Dhttps.proxyPort=${PROXY_PORT} -Dftp.proxyHost=${PROXY_HOST} -Dftp.proxyPort=${PROXY_PORT} "
+fi
+
+if [ -n "${PROXY_HOST}" -a -n "${PROXY_PORT}" -a -n "${NON_PROXY_HOSTS}" ]; then
+
+ JAVA_PROXY_CONFIG="${JAVA_PROXY_CONFIG} -Dhttp.nonProxyHosts=\"${NON_PROXY_HOSTS}\" -Dftp.nonProxyHosts=\"${NON_PROXY_HOSTS}\" "
+fi
+
+export JAVA_PROXY_CONFIG
+
diff --git a/src/main/distrib/linux/service-centos.sh b/src/main/distrib/linux/service-centos.sh
new file mode 100644
index 00000000..04c9a9b4
--- /dev/null
+++ b/src/main/distrib/linux/service-centos.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+# chkconfig: 3 21 91
+# description: Starts and Stops gitblit
+# Source function library.
+. /etc/init.d/functions
+
+# change theses values (default values)
+GITBLIT_PATH=/opt/gitblit
+GITBLIT_BASE_FOLDER=/opt/gitblit/data
+GITBLIT_HTTP_PORT=0
+GITBLIT_HTTPS_PORT=8443
+source ${GITBLIT_PATH}/java-proxy-config.sh
+JAVA="java -server -Xmx1024M ${JAVA_PROXY_CONFIG} -Djava.awt.headless=true -jar"
+
+RETVAL=0
+
+case "$1" in
+ start)
+ if [ -f $GITBLIT_PATH/gitblit.jar ];
+ then
+ echo $"Starting gitblit server"
+ cd $GITBLIT_PATH
+ $JAVA $GITBLIT_PATH/gitblit.jar --httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT --baseFolder $GITBLIT_BASE_FOLDER > /dev/null &
+ echo "."
+ exit $RETVAL
+ fi
+ ;;
+
+ stop)
+ if [ -f $GITBLIT_PATH/gitblit.jar ];
+ then
+ echo $"Stopping gitblit server"
+ cd $GITBLIT_PATH
+ $JAVA $GITBLIT_PATH/gitblit.jar --baseFolder $GITBLIT_BASE_FOLDER --stop > /dev/null &
+ echo "."
+ exit $RETVAL
+ fi
+ ;;
+
+ force-reload|restart)
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo $"Usage: /etc/init.d/gitblit {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit $RETVAL
diff --git a/src/main/distrib/linux/service-ubuntu.sh b/src/main/distrib/linux/service-ubuntu.sh
new file mode 100644
index 00000000..4ff275d0
--- /dev/null
+++ b/src/main/distrib/linux/service-ubuntu.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+# chkconfig: 3 21 91
+# Source function library.
+. /lib/init/vars.sh
+. /lib/lsb/init-functions
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+# change theses values (default values)
+GITBLIT_PATH=/opt/gitblit
+GITBLIT_BASE_FOLDER=/opt/gitblit/data
+GITBLIT_USER="gitblit"
+source ${GITBLIT_PATH}/java-proxy-config.sh
+ARGS="-server -Xmx1024M ${JAVA_PROXY_CONFIG} -Djava.awt.headless=true -jar gitblit.jar --baseFolder $GITBLIT_BASE_FOLDER"
+
+RETVAL=0
+
+case "$1" in
+ start)
+ if [ -f $GITBLIT_PATH/gitblit.jar ];
+ then
+ echo $"Starting gitblit server"
+ start-stop-daemon --start --quiet --background --oknodo --make-pidfile --pidfile /var/run/gitblit.pid --exec /usr/bin/java --chuid $GITBLIT_USER --chdir $GITBLIT_PATH -- $ARGS
+ exit $RETVAL
+ fi
+ ;;
+
+ stop)
+ if [ -f $GITBLIT_PATH/gitblit.jar ];
+ then
+ echo $"Stopping gitblit server"
+ start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/gitblit.pid
+ exit $RETVAL
+ fi
+ ;;
+
+ force-reload|restart)
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo $"Usage: /etc/init.d/gitblit {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit $RETVAL
diff --git a/src/main/distrib/win/add-indexed-branch.cmd b/src/main/distrib/win/add-indexed-branch.cmd
new file mode 100644
index 00000000..a7c4451a
--- /dev/null
+++ b/src/main/distrib/win/add-indexed-branch.cmd
@@ -0,0 +1,20 @@
+@REM --------------------------------------------------------------------------
+@REM This is for Lucene search integration.
+@REM
+@REM Allows you to add an indexed branch specification to the repository config
+@REM for all matching repositories in the specified folder.
+@REM
+@REM All repositories are included unless excluded using a --skip parameter.
+@REM --skip supports simple wildcard fuzzy matching however only 1 asterisk is
+@REM allowed per parameter.
+@REM
+@REM Always use forward-slashes for the path separator in your parameters!!
+@REM
+@REM Set FOLDER to the server's git.repositoriesFolder
+@REM Set BRANCH ("default" or fully qualified ref - i.e. refs/heads/master)
+@REM Set EXCLUSIONS for any repositories that you do not want to change
+@REM --------------------------------------------------------------------------
+@SET FOLDER=c:/gitblit/git
+@SET EXCLUSIONS=--skip test.git --skip group/test*
+@SET BRANCH=default
+@java -cp gitblit.jar;"%CD%\ext\*" com.gitblit.AddIndexedBranch --repositoriesFolder %FOLDER% --branch %BRANCH% %EXCLUSIONS% %*
diff --git a/src/main/distrib/win/authority.cmd b/src/main/distrib/win/authority.cmd
new file mode 100644
index 00000000..f9a18640
--- /dev/null
+++ b/src/main/distrib/win/authority.cmd
@@ -0,0 +1 @@
+@java -cp gitblit.jar com.gitblit.authority.Launcher --baseFolder data %*
diff --git a/src/main/distrib/win/gitblit-stop.cmd b/src/main/distrib/win/gitblit-stop.cmd
new file mode 100644
index 00000000..34f0f4be
--- /dev/null
+++ b/src/main/distrib/win/gitblit-stop.cmd
@@ -0,0 +1 @@
+@java -jar gitblit.jar --stop --baseFolder data %*
diff --git a/src/main/distrib/win/gitblit.cmd b/src/main/distrib/win/gitblit.cmd
new file mode 100644
index 00000000..1a6d7e09
--- /dev/null
+++ b/src/main/distrib/win/gitblit.cmd
@@ -0,0 +1 @@
+@java -jar gitblit.jar --baseFolder data %*
diff --git a/src/main/distrib/win/installService.cmd b/src/main/distrib/win/installService.cmd
new file mode 100644
index 00000000..a684ab21
--- /dev/null
+++ b/src/main/distrib/win/installService.cmd
@@ -0,0 +1,38 @@
+@REM Install Gitblit as a Windows service.
+
+@REM gitblitw.exe (prunmgr.exe) is a GUI application for monitoring
+@REM and configuring the Gitblit procrun service.
+@REM
+@REM By default this tool launches the service properties dialog
+@REM but it also has some other very useful functionality.
+@REM
+@REM http://commons.apache.org/daemon/procrun.html
+
+@REM arch = x86, amd64, or ia32
+SET ARCH=amd64
+
+@REM Be careful not to introduce trailing whitespace after the ^ characters.
+@REM Use ; or # to separate values in the --StartParams parameter.
+"%CD%\%ARCH%\gitblit.exe" //IS//gitblit ^
+ --DisplayName="gitblit" ^
+ --Description="a pure Java Git solution" ^
+ --Startup=auto ^
+ --LogPath="%CD%\logs" ^
+ --LogLevel=INFO ^
+ --LogPrefix=gitblit ^
+ --StdOutput=auto ^
+ --StdError=auto ^
+ --StartPath="%CD%" ^
+ --StartClass=org.moxie.MxLauncher ^
+ --StartMethod=main ^
+ --StartParams="--storePassword;gitblit;--baseFolder;%CD%\data" ^
+ --StartMode=jvm ^
+ --StopPath="%CD%" ^
+ --StopClass=org.moxie.MxLauncher ^
+ --StopMethod=main ^
+ --StopParams="--stop;--baseFolder;%CD%\data" ^
+ --StopMode=jvm ^
+ --Classpath="%CD%\gitblit.jar" ^
+ --Jvm=auto ^
+ --JvmMx=1024
+ \ No newline at end of file
diff --git a/src/main/distrib/win/uninstallService.cmd b/src/main/distrib/win/uninstallService.cmd
new file mode 100644
index 00000000..e6c3b98c
--- /dev/null
+++ b/src/main/distrib/win/uninstallService.cmd
@@ -0,0 +1,5 @@
+@REM arch = x86, amd64, or ia32
+SET ARCH=amd64
+
+@REM Delete the gitblit service
+"%CD%\%ARCH%\gitblit.exe" //DS//gitblit \ No newline at end of file
diff --git a/src/main/java/WEB-INF/reference.properties b/src/main/java/WEB-INF/reference.properties
new file mode 100644
index 00000000..a05f5d2d
--- /dev/null
+++ b/src/main/java/WEB-INF/reference.properties
@@ -0,0 +1,1311 @@
+#
+# Gitblit Settings
+#
+
+# This settings file supports parameterization from the command-line for the
+# following command-line parameters:
+#
+# --baseFolder ${baseFolder} SINCE 1.2.1
+#
+# Settings that support ${baseFolder} parameter substitution are indicated with the
+# BASEFOLDER attribute. If the --baseFolder argument is unspecified, ${baseFolder}
+# and it's trailing / will be discarded from the setting value leaving a relative
+# path that is equivalent to pre-1.2.1 releases.
+#
+# e.g. "${baseFolder}/git" becomes "git", if --baseFolder is unspecified
+#
+# Git Servlet Settings
+#
+
+# Base folder for repositories.
+# This folder may contain bare and non-bare repositories but Gitblit will only
+# allow you to push to bare repositories.
+# Use forward slashes even on Windows!!
+# e.g. c:/gitrepos
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+# BASEFOLDER
+git.repositoriesFolder = ${baseFolder}/git
+
+# Build the available repository list at startup and cache this list for reuse.
+# This reduces disk io when presenting the repositories page, responding to rpcs,
+# etc, but it means that Gitblit will not automatically identify repositories
+# added or deleted by external tools.
+#
+# For this case you can use curl, wget, etc to issue an rpc request to clear the
+# cache (e.g. https://localhost/rpc?req=CLEAR_REPOSITORY_CACHE)
+#
+# SINCE 1.1.0
+git.cacheRepositoryList = true
+
+# Search the repositories folder subfolders for other repositories.
+# Repositories MAY NOT be nested (i.e. one repository within another)
+# but they may be grouped together in subfolders.
+# e.g. c:/gitrepos/libraries/mylibrary.git
+# c:/gitrepos/libraries/myotherlibrary.git
+#
+# SINCE 0.5.0
+git.searchRepositoriesSubfolders = true
+
+# Maximum number of folders to recurse into when searching for repositories.
+# The default value, -1, disables depth limits.
+#
+# SINCE 1.1.0
+git.searchRecursionDepth = -1
+
+# List of regex exclusion patterns to match against folders found in
+# *git.repositoriesFolder*.
+# Use forward slashes even on Windows!!
+# e.g. test/jgit\.git
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 1.1.0
+git.searchExclusions =
+
+# List of regex url patterns for extracting a repository name when locating
+# submodules.
+# e.g. git.submoduleUrlPatterns = .*?://github.com/(.*) will extract
+# *gitblit/gitblit.git* from *git://github.com/gitblit/gitblit.git*
+# If no matches are found then the submodule repository name is assumed to be
+# whatever trails the last / character. (e.g. gitblit.git).
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 1.1.0
+git.submoduleUrlPatterns = .*?://github.com/(.*)
+
+# Allow push/pull over http/https with JGit servlet.
+# If you do NOT want to allow Git clients to clone/push to Gitblit set this
+# to false. You might want to do this if you are only using ssh:// or git://.
+# If you set this false, consider changing the *web.otherUrls* setting to
+# indicate your clone/push urls.
+#
+# SINCE 0.5.0
+git.enableGitServlet = true
+
+# If you want to restrict all git servlet access to those with valid X509 client
+# certificates then set this value to true.
+#
+# SINCE 1.2.0
+git.requiresClientCertificate = false
+
+# Enforce date checks on client certificates to ensure that they are not being
+# used prematurely and that they have not expired.
+#
+# SINCE 1.2.0
+git.enforceCertificateValidity = true
+
+# List of OIDs to extract from a client certificate DN to map a certificate to
+# an account username.
+#
+# e.g. git.certificateUsernameOIDs = CN
+# e.g. git.certificateUsernameOIDs = FirstName LastName
+#
+# SPACE-DELIMITED
+# SINCE 1.2.0
+git.certificateUsernameOIDs = CN
+
+# Only serve/display bare repositories.
+# If there are non-bare repositories in git.repositoriesFolder and this setting
+# is true, they will be excluded from the ui.
+#
+# SINCE 0.9.0
+git.onlyAccessBareRepositories = false
+
+# Allow an authenticated user to create a destination repository on a push if
+# the repository does not already exist.
+#
+# Administrator accounts can create a repository in any project.
+# These repositories are created with the default access restriction and authorization
+# control values. The pushing account is set as the owner.
+#
+# Non-administrator accounts with the CREATE role may create personal repositories.
+# These repositories are created as VIEW restricted for NAMED users.
+# The pushing account is set as the owner.
+#
+# SINCE 1.2.0
+git.allowCreateOnPush = true
+
+# The default access restriction for new repositories.
+# Valid values are NONE, PUSH, CLONE, VIEW
+# NONE = anonymous view, clone, & push
+# PUSH = anonymous view & clone and authenticated push
+# CLONE = anonymous view, authenticated clone & push
+# VIEW = authenticated view, clone, & push
+#
+# SINCE 1.0.0
+git.defaultAccessRestriction = NONE
+
+# The default authorization control for new repositories.
+# Valid values are AUTHENTICATED and NAMED
+# AUTHENTICATED = any authenticated user is granted restricted access
+# NAMED = only named users/teams are granted restricted access
+#
+# SINCE 1.1.0
+git.defaultAuthorizationControl = NAMED
+
+# Enable JGit-based garbage collection. (!!EXPERIMENTAL!!)
+#
+# USE AT YOUR OWN RISK!
+#
+# If enabled, the garbage collection executor scans all repositories once a day
+# at the hour of your choosing. The GC executor will take each repository "offline",
+# one-at-a-time, to check if the repository satisfies it's GC trigger requirements.
+#
+# While the repository is offline it will be inaccessible from the web UI or from
+# any of the other services (git, rpc, rss, etc).
+#
+# Gitblit's GC Executor MAY NOT PLAY NICE with the other Git kids on the block,
+# especially on Windows systems, so if you are using other tools please coordinate
+# their usage with your GC Executor schedule or do not use this feature.
+#
+# The GC algorithm complex and the JGit team advises caution when using their
+# young implementation of GC.
+#
+# http://wiki.eclipse.org/EGit/New_and_Noteworthy/2.1#Garbage_Collector_and_Repository_Storage_Statistics
+#
+# EXPERIMENTAL
+# SINCE 1.2.0
+# RESTART REQUIRED
+git.enableGarbageCollection = false
+
+# Hour of the day for the GC Executor to scan repositories.
+# This value is in 24-hour time.
+#
+# SINCE 1.2.0
+git.garbageCollectionHour = 0
+
+# The default minimum total filesize of loose objects to trigger early garbage
+# collection.
+#
+# You may specify a custom threshold for a repository in the repository's settings.
+# Common unit suffixes of k, m, or g are supported.
+#
+# SINCE 1.2.0
+git.defaultGarbageCollectionThreshold = 500k
+
+# The default period, in days, between GCs for a repository. If the total filesize
+# of the loose object exceeds *git.garbageCollectionThreshold* or the repository's
+# custom threshold, this period will be short-circuited.
+#
+# e.g. if a repository collects 100KB of loose objects every day with a 500KB
+# threshold and a period of 7 days, it will take 5 days for the loose objects to
+# be collected, packed, and pruned.
+#
+# OR
+#
+# if a repository collects 10KB of loose objects every day with a 500KB threshold
+# and a period of 7 days, it will take the full 7 days for the loose objects to be
+# collected, packed, and pruned.
+#
+# You may specify a custom period for a repository in the repository's settings.
+#
+# The minimum value is 1 day since the GC Executor only runs once a day.
+#
+# SINCE 1.2.0
+git.defaultGarbageCollectionPeriod = 7
+
+# Number of bytes of a pack file to load into memory in a single read operation.
+# This is the "page size" of the JGit buffer cache, used for all pack access
+# operations. All disk IO occurs as single window reads. Setting this too large
+# may cause the process to load more data than is required; setting this too small
+# may increase the frequency of read() system calls.
+#
+# Default on JGit is 8 KiB on all platforms.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitWindowSize = 8k
+
+# Maximum number of bytes to load and cache in memory from pack files. If JGit
+# needs to access more than this many bytes it will unload less frequently used
+# windows to reclaim memory space within the process. As this buffer must be shared
+# with the rest of the JVM heap, it should be a fraction of the total memory available.
+#
+# The JGit team recommends setting this value larger than the size of your biggest
+# repository. This ensures you can serve most requests from memory.
+#
+# Default on JGit is 10 MiB on all platforms.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitLimit = 10m
+
+# Maximum number of bytes to reserve for caching base objects that multiple deltafied
+# objects reference. By storing the entire decompressed base object in a cache Git
+# is able to avoid unpacking and decompressing frequently used base objects multiple times.
+#
+# Default on JGit is 10 MiB on all platforms. You probably do not need to adjust
+# this value.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.deltaBaseCacheLimit = 10m
+
+# Maximum number of pack files to have open at once. A pack file must be opened
+# in order for any of its data to be available in a cached window.
+#
+# If you increase this to a larger setting you may need to also adjust the ulimit
+# on file descriptors for the host JVM, as Gitblit needs additional file descriptors
+# available for network sockets and other repository data manipulation.
+#
+# Default on JGit is 128 file descriptors on all platforms.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitOpenFiles = 128
+
+# Largest object size, in bytes, that JGit will allocate as a contiguous byte
+# array. Any file revision larger than this threshold will have to be streamed,
+# typically requiring the use of temporary files under $GIT_DIR/objects to implement
+# psuedo-random access during delta decompression.
+#
+# Servers with very high traffic should set this to be larger than the size of
+# their common big files. For example a server managing the Android platform
+# typically has to deal with ~10-12 MiB XML files, so 15 m would be a reasonable
+# setting in that environment. Setting this too high may cause the JVM to run out
+# of heap space when handling very big binary files, such as device firmware or
+# CD-ROM ISO images. Make sure to adjust your JVM heap accordingly.
+#
+# Default is 50 MiB on all platforms.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.streamFileThreshold = 50m
+
+# When true, JGit will use mmap() rather than malloc()+read() to load data from
+# pack files. The use of mmap can be problematic on some JVMs as the garbage
+# collector must deduce that a memory mapped segment is no longer in use before
+# a call to munmap() can be made by the JVM native code.
+#
+# In server applications (such as Gitblit) that need to access many pack files,
+# setting this to true risks artificially running out of virtual address space,
+# as the garbage collector cannot reclaim unused mapped spaces fast enough.
+#
+# Default on JGit is false. Although potentially slower, it yields much more
+# predictable behavior.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitMmap = false
+
+#
+# Groovy Integration
+#
+
+# Location of Groovy scripts to use for Pre and Post receive hooks.
+# Use forward slashes even on Windows!!
+# e.g. c:/groovy
+#
+# RESTART REQUIRED
+# SINCE 0.8.0
+# BASEFOLDER
+groovy.scriptsFolder = ${baseFolder}/groovy
+
+# Specify the directory Grape uses for downloading libraries.
+# http://groovy.codehaus.org/Grape
+#
+# RESTART REQUIRED
+# SINCE 1.0.0
+# BASEFOLDER
+groovy.grapeFolder = ${baseFolder}/groovy/grape
+
+# Scripts to execute on Pre-Receive.
+#
+# These scripts execute after an incoming push has been parsed and validated
+# but BEFORE the changes are applied to the repository. You might reject a
+# push in this script based on the repository and branch the push is attempting
+# to change.
+#
+# Script names are case-sensitive on case-sensitive file systems. You may omit
+# the traditional ".groovy" from this list if your file extension is ".groovy"
+#
+# NOTE:
+# These scripts are only executed when pushing to *Gitblit*, not to other Git
+# tooling you may be using. Also note that these scripts are shared between
+# repositories. These are NOT repository-specific scripts! Within the script
+# you may customize the control-flow for a specific repository by checking the
+# *repository* variable.
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.8.0
+groovy.preReceiveScripts =
+
+# Scripts to execute on Post-Receive.
+#
+# These scripts execute AFTER an incoming push has been applied to a repository.
+# You might trigger a continuous-integration build here or send a notification.
+#
+# Script names are case-sensitive on case-sensitive file systems. You may omit
+# the traditional ".groovy" from this list if your file extension is ".groovy"
+#
+# NOTE:
+# These scripts are only executed when pushing to *Gitblit*, not to other Git
+# tooling you may be using. Also note that these scripts are shared between
+# repositories. These are NOT repository-specific scripts! Within the script
+# you may customize the control-flow for a specific repository by checking the
+# *repository* variable.
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.8.0
+groovy.postReceiveScripts =
+
+# Repository custom fields for Groovy Hook mechanism
+#
+# List of key=label pairs of custom fields to prompt for in the Edit Repository
+# page. These keys are stored in the repository's git config file in the
+# section [gitblit "customFields"]. Key names are alphanumeric only. These
+# fields are intended to be used for the Groovy hook mechanism where a script
+# can adjust it's execution based on the custom fields stored in the repository
+# config.
+#
+# e.g. "commitMsgRegex=Commit Message Regular Expression" anotherProperty=Another
+#
+# SPACE-DELIMITED
+# SINCE 1.0.0
+groovy.customFields =
+
+#
+# Fanout Settings
+#
+
+# Fanout is a PubSub notification service that can be used by Sparkleshare
+# to eliminate repository change polling. The fanout service runs in a separate
+# thread on a separate port from the Gitblit http/https application.
+# This service is provided so that Sparkleshare may be used with Gitblit in
+# firewalled environments or where reliance on Sparkleshare's default notifications
+# server (notifications.sparkleshare.org) is unwanted.
+#
+# This service maintains an open socket connection from the client to the
+# Fanout PubSub service. This service may not work properly behind a proxy server.
+
+# Specify the interface for Fanout to bind it's service.
+# You may specify an ip or an empty value to bind to all interfaces.
+# Specifying localhost will result in Gitblit ONLY listening to requests to
+# localhost.
+#
+# SINCE 1.2.1
+# RESTART REQUIRED
+fanout.bindInterface = localhost
+
+# port for serving the Fanout PubSub service. <= 0 disables this service.
+# On Unix/Linux systems, ports < 1024 require root permissions.
+# Recommended value: 17000
+#
+# SINCE 1.2.1
+# RESTART REQUIRED
+fanout.port = 0
+
+# Use Fanout NIO service. If false, a multi-threaded socket service will be used.
+# Be advised, the socket implementation spawns a thread per connection plus the
+# connection acceptor thread. The NIO implementation is completely single-threaded.
+#
+# SINCE 1.2.1
+# RESTART REQUIRED
+fanout.useNio = true
+
+# Concurrent connection limit. <= 0 disables concurrent connection throttling.
+# If > 0, only the specified number of concurrent connections will be allowed
+# and all other connections will be rejected.
+#
+# SINCE 1.2.1
+# RESTART REQUIRED
+fanout.connectionLimit = 0
+
+#
+# Authentication Settings
+#
+
+# Require authentication to see everything but the admin pages
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.authenticateViewPages = false
+
+# If web.authenticateViewPages=true you may optionally require a client-side
+# basic authentication prompt instead of the standard form-based login.
+#
+# SINCE 1.3.0
+web.enforceHttpBasicAuthentication = false
+
+# Require admin authentication for the admin functions and pages
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.authenticateAdminPages = true
+
+# Allow Gitblit to store a cookie in the user's browser for automatic
+# authentication. The cookie is generated by the user service.
+#
+# SINCE 0.5.0
+web.allowCookieAuthentication = true
+
+# Config file for storing project metadata
+#
+# SINCE 1.2.0
+# BASEFOLDER
+web.projectsFile = ${baseFolder}/projects.conf
+
+# Either the full path to a user config file (users.conf)
+# OR the full path to a simple user properties file (users.properties)
+# OR a fully qualified class name that implements the IUserService interface.
+#
+# Alternative user services:
+# com.gitblit.LdapUserService
+# com.gitblit.RedmineUserService
+#
+# Any custom user service implementation must have a public default constructor.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+# BASEFOLDER
+realm.userService = ${baseFolder}/users.conf
+
+# How to store passwords.
+# Valid values are plain, md5, or combined-md5. md5 is the hash of password.
+# combined-md5 is the hash of username.toLowerCase()+password.
+# Default is md5.
+#
+# SINCE 0.5.0
+realm.passwordStorage = md5
+
+# Minimum valid length for a plain text password.
+# Default value is 5. Absolute minimum is 4.
+#
+# SINCE 0.5.0
+realm.minPasswordLength = 5
+
+#
+# Gitblit Web Settings
+#
+# If blank Gitblit is displayed.
+#
+# SINCE 0.5.0
+web.siteName =
+
+# If *web.authenticateAdminPages*=true, users with "admin" role can create
+# repositories, create users, and edit repository metadata.
+#
+# If *web.authenticateAdminPages*=false, any user can execute the aforementioned
+# functions.
+#
+# SINCE 0.5.0
+web.allowAdministration = true
+
+# Allows rpc clients to list repositories and possibly manage or administer the
+# Gitblit server, if the authenticated account has administrator permissions.
+# See *web.enableRpcManagement* and *web.enableRpcAdministration*.
+#
+# SINCE 0.7.0
+web.enableRpcServlet = true
+
+# Allows rpc clients to manage repositories and users of the Gitblit instance,
+# if the authenticated account has administrator permissions.
+# Requires *web.enableRpcServlet=true*.
+#
+# SINCE 0.7.0
+web.enableRpcManagement = false
+
+# Allows rpc clients to control the server settings and monitor the health of this
+# this Gitblit instance, if the authenticated account has administrator permissions.
+# Requires *web.enableRpcServlet=true* and *web.enableRpcManagement*.
+#
+# SINCE 0.7.0
+web.enableRpcAdministration = false
+
+# Full path to a configurable robots.txt file. With this file you can control
+# what parts of your Gitblit server respectable robots are allowed to traverse.
+# http://googlewebmastercentral.blogspot.com/2008/06/improving-on-robots-exclusion-protocol.html
+#
+# SINCE 1.0.0
+# BASEFOLDER
+web.robots.txt = ${baseFolder}/robots.txt
+
+# If true, the web ui layout will respond and adapt to the browser's dimensions.
+# if false, the web ui will use a 940px fixed-width layout.
+# http://twitter.github.com/bootstrap/scaffolding.html#responsive
+#
+# SINCE 1.0.0
+web.useResponsiveLayout = true
+
+# Allow Gravatar images to be displayed in Gitblit pages.
+#
+# SINCE 0.8.0
+web.allowGravatar = true
+
+# Allow dynamic zip downloads.
+#
+# SINCE 0.5.0
+web.allowZipDownloads = true
+
+# If *web.allowZipDownloads=true* the following formats will be displayed for
+# download compressed archive links:
+#
+# zip = standard .zip
+# tar = standard tar format (preserves *nix permissions and symlinks)
+# gz = gz-compressed tar
+# xz = xz-compressed tar
+# bzip2 = bzip2-compressed tar
+#
+# SPACE-DELIMITED
+# SINCE 1.2.0
+web.compressedDownloads = zip gz
+
+# Allow optional Lucene integration. Lucene indexing is an opt-in feature.
+# A repository may specify branches to index with Lucene instead of using Git
+# commit traversal. There are scenarios where you may want to completely disable
+# Lucene indexing despite a repository specifying indexed branches. One such
+# scenario is on a resource-constrained federated Gitblit mirror.
+#
+# SINCE 0.9.0
+web.allowLuceneIndexing = true
+
+# Allows an authenticated user to create forks of a repository
+#
+# set this to false if you want to disable all fork controls on the web site
+#
+web.allowForking = true
+
+# Controls the length of shortened commit hash ids
+#
+# SINCE 1.2.0
+web.shortCommitIdLength = 6
+
+# Use Clippy (Flash solution) to provide a copy-to-clipboard button.
+# If false, a button with a more primitive JavaScript-based prompt box will
+# offer a 3-step (click, ctrl+c, enter) copy-to-clipboard alternative.
+#
+# SINCE 0.8.0
+web.allowFlashCopyToClipboard = true
+
+# Default maximum number of commits that a repository may contribute to the
+# activity page, regardless of the selected duration. This setting may be valuable
+# for an extremely busy server. This value may also be configed per-repository
+# in Edit Repository. 0 disables this throttle.
+#
+# SINCE 1.2.0
+web.maxActivityCommits = 0
+
+# Default number of entries to include in RSS Syndication links
+#
+# SINCE 0.5.0
+web.syndicationEntries = 25
+
+# Show the size of each repository on the repositories page.
+# This requires recursive traversal of each repository folder. This may be
+# non-performant on some operating systems and/or filesystems.
+#
+# SINCE 0.5.2
+web.showRepositorySizes = true
+
+# List of custom regex expressions that can be displayed in the Filters menu
+# of the Repositories and Activity pages. Keep them very simple because you
+# are likely to run into encoding issues if they are too complex.
+#
+# Use !!! to separate the filters
+#
+# SINCE 0.8.0
+web.customFilters =
+
+# Show federation registrations (without token) and the current pull status
+# to non-administrator users.
+#
+# SINCE 0.6.0
+web.showFederationRegistrations = false
+
+# This is the message displayed when *web.authenticateViewPages=true*.
+# This can point to a file with Markdown content.
+# Specifying "gitblit" uses the internal login message.
+#
+# SINCE 0.7.0
+# BASEFOLDER
+web.loginMessage = gitblit
+
+# This is the message displayed above the repositories table.
+# This can point to a file with Markdown content.
+# Specifying "gitblit" uses the internal welcome message.
+#
+# SINCE 0.5.0
+# BASEFOLDER
+web.repositoriesMessage = gitblit
+
+# Ordered list of charsets/encodings to use when trying to display a blob.
+# If empty, UTF-8 and ISO-8859-1 are used. The server's default charset
+# is always appended to the encoding list. If all encodings fail to cleanly
+# decode the blob content, UTF-8 will be used with the standard malformed
+# input/unmappable character replacement strings.
+#
+# SPACE-DELIMITED
+# SINCE 1.0.0
+web.blobEncodings = UTF-8 ISO-8859-1
+
+# Manually set the default timezone to be used by Gitblit for display in the
+# web ui. This value is independent of the JVM timezone. Specifying a blank
+# value will default to the JVM timezone.
+# e.g. America/New_York, US/Pacific, UTC, Europe/Berlin
+#
+# SINCE 0.9.0
+# RESTART REQUIRED
+web.timezone =
+
+# Use the client timezone when formatting dates.
+# This uses AJAX to determine the browser's timezone and may require more
+# server overhead because a Wicket session is created. All Gitblit pages
+# attempt to be stateless, if possible.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.useClientTimezone = false
+
+# Time format
+# <http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html>
+#
+# SINCE 0.8.0
+web.timeFormat = HH:mm
+
+# Short date format
+# <http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html>
+#
+# SINCE 0.5.0
+web.datestampShortFormat = yyyy-MM-dd
+
+# Long date format
+#
+# SINCE 0.8.0
+web.datestampLongFormat = EEEE, MMMM d, yyyy
+
+# Long timestamp format
+# <http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html>
+#
+# SINCE 0.5.0
+web.datetimestampLongFormat = EEEE, MMMM d, yyyy HH:mm Z
+
+# Mount URL parameters
+# This setting controls if pretty or parameter URLs are used.
+# i.e.
+# if true:
+# http://localhost/commit/myrepo/abcdef
+# if false:
+# http://localhost/commit/?r=myrepo&h=abcdef
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.mountParameters = true
+
+# Some servlet containers (e.g. Tomcat >= 6.0.10) disallow '/' (%2F) encoding
+# in URLs as a security precaution for proxies. This setting tells Gitblit
+# to preemptively replace '/' with '*' or '!' for url string parameters.
+#
+# <https://issues.apache.org/jira/browse/WICKET-1303>
+# <http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10>
+# Add *-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true* to your
+# *CATALINA_OPTS* or to your JVM launch parameters
+#
+# SINCE 0.5.2
+web.forwardSlashCharacter = /
+
+# Show other URLs on the summary page for accessing your git repositories
+# Use spaces to separate urls. {0} is the token for the repository name.
+# e.g.
+# web.otherUrls = ssh://localhost/git/{0} git://localhost/git/{0}
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.otherUrls =
+
+# Choose how to present the repositories list.
+# grouped = group nested/subfolder repositories together (no sorting)
+# flat = flat list of repositories (sorting allowed)
+#
+# SINCE 0.5.0
+web.repositoryListType = grouped
+
+# If using a grouped repository list and there are repositories at the
+# root level of your repositories folder, you may specify the displayed
+# group name with this setting. This value is only used for web presentation.
+#
+# SINCE 0.5.0
+web.repositoryRootGroupName = main
+
+# Display the repository swatch color next to the repository name link in the
+# repositories list.
+#
+# SINCE 0.8.0
+web.repositoryListSwatches = true
+
+# Choose the diff presentation style: gitblt, gitweb, or plain
+#
+# SINCE 0.5.0
+web.diffStyle = gitblit
+
+# Control if email addresses are shown in web ui
+#
+# SINCE 0.5.0
+web.showEmailAddresses = true
+
+# Shows a combobox in the page links header with commit, committer, and author
+# search selection. Default search is commit.
+#
+# SINCE 0.5.0
+web.showSearchTypeSelection = false
+
+# Generates a line graph of repository activity over time on the Summary page.
+# This uses the Google Charts API.
+#
+# SINCE 0.5.0
+web.generateActivityGraph = true
+
+# The number of days to show on the activity page.
+# Value must exceed 0 else default of 14 is used
+#
+# SINCE 0.8.0
+web.activityDuration = 14
+
+# The number of commits to display on the summary page
+# Value must exceed 0 else default of 20 is used
+#
+# SINCE 0.5.0
+web.summaryCommitCount = 16
+
+# The number of tags/branches to display on the summary page.
+# -1 = all tags/branches
+# 0 = hide tags/branches
+# N = N tags/branches
+#
+# SINCE 0.5.0
+web.summaryRefsCount = 5
+
+# The number of items to show on a page before showing the first, prev, next
+# pagination links. A default if 50 is used for any invalid value.
+#
+# SINCE 0.5.0
+web.itemsPerPage = 50
+
+# Registered file extensions to ignore during Lucene indexing
+#
+# SPACE-DELIMITED
+# SINCE 0.9.0
+web.luceneIgnoreExtensions = 7z arc arj bin bmp dll doc docx exe gif gz jar jpg lib lzh odg odf odt pdf ppt png so swf xcf xls xlsx zip
+
+# Registered extensions for google-code-prettify
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.prettyPrintExtensions = c cpp cs css frm groovy htm html java js php pl prefs properties py rb scala sh sql xml vb
+
+# Registered extensions for markdown transformation
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.5.0
+web.markdownExtensions = md mkd markdown MD MKD
+
+# Image extensions
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.imageExtensions = bmp jpg gif png
+
+# Registered extensions for binary blobs
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.binaryExtensions = jar pdf tar.gz zip
+
+# Aggressive heap management will run the garbage collector on every generated
+# page. This slows down page generation a little but improves heap consumption.
+#
+# SINCE 0.5.0
+web.aggressiveHeapManagement = false
+
+# Run the webapp in debug mode
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.debugMode = false
+
+# Enable/disable global regex substitutions (i.e. shared across repositories)
+#
+# SINCE 0.5.0
+regex.global = true
+
+# Example global regex substitutions
+# Use !!! to separate the search pattern and the replace pattern
+# searchpattern!!!replacepattern
+# SINCE 0.5.0
+regex.global.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://somehost/bug/$3">Bug-Id: $3</a>
+# SINCE 0.5.0
+regex.global.changeid = \\b(Change-Id:\\s*)([A-Za-z0-9]*)\\b!!!<a href="http://somehost/changeid/$2">Change-Id: $2</a>
+
+# Example per-repository regex substitutions overrides global
+# SINCE 0.5.0
+regex.myrepository.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://elsewhere/bug/$3">Bug-Id: $3</a>
+
+#
+# Mail Settings
+# SINCE 0.6.0
+#
+# Mail settings are used to notify administrators of received federation proposals
+#
+
+# ip or hostname of smtp server
+#
+# SINCE 0.6.0
+mail.server =
+
+# port to use for smtp requests
+#
+# SINCE 0.6.0
+mail.port = 25
+
+# debug the mail executor
+#
+# SINCE 0.6.0
+mail.debug = false
+
+# if your smtp server requires authentication, supply the credentials here
+#
+# SINCE 0.6.0
+mail.username =
+# SINCE 0.6.0
+mail.password =
+
+# from address for generated emails
+#
+# SINCE 0.6.0
+mail.fromAddress =
+
+# List of email addresses for the Gitblit administrators
+#
+# SPACE-DELIMITED
+# SINCE 0.6.0
+mail.adminAddresses =
+
+# List of email addresses for sending push email notifications.
+#
+# This key currently requires use of the sendemail.groovy hook script.
+# If you set sendemail.groovy in *groovy.postReceiveScripts* then email
+# notifications for all repositories (regardless of access restrictions!)
+# will be sent to these addresses.
+#
+# SPACE-DELIMITED
+# SINCE 0.8.0
+mail.mailingLists =
+
+#
+# Federation Settings
+# SINCE 0.6.0
+#
+# A Gitblit federation is a way to backup one Gitblit instance to another.
+#
+# *git.enableGitServlet* must be true to use this feature.
+
+# Your federation name is used for federation status acknowledgments. If it is
+# unset, and you elect to send a status acknowledgment, your Gitblit instance
+# will be identified by its hostname, if available, else your internal ip address.
+# The source Gitblit instance will also append your external IP address to your
+# identification to differentiate multiple pulling systems behind a single proxy.
+#
+# SINCE 0.6.0
+federation.name =
+
+# Specify the passphrase of this Gitblit instance.
+#
+# An unspecified (empty) passphrase disables processing federation requests.
+#
+# This value can be anything you want: an integer, a sentence, an haiku, etc.
+# Keep the value simple, though, to avoid Java properties file encoding issues.
+#
+# Changing your passphrase will break any registrations you have established with other
+# Gitblit instances.
+#
+# CASE-SENSITIVE
+# SINCE 0.6.0
+# RESTART REQUIRED *(only to enable or disable federation)*
+federation.passphrase =
+
+# Control whether or not this Gitblit instance can receive federation proposals
+# from another Gitblit instance. Registering a federated Gitblit is a manual
+# process. Proposals help to simplify that process by allowing a remote Gitblit
+# instance to send your Gitblit instance the federation pull data.
+#
+# SINCE 0.6.0
+federation.allowProposals = false
+
+# The destination folder for cached federation proposals.
+# Use forward slashes even on Windows!!
+#
+# SINCE 0.6.0
+# BASEFOLDER
+federation.proposalsFolder = ${baseFolder}/proposals
+
+# The default pull frequency if frequency is unspecified on a registration
+#
+# SINCE 0.6.0
+federation.defaultFrequency = 60 mins
+
+# Federation Sets are named groups of repositories. The Federation Sets are
+# available for selection in the repository settings page. You can assign a
+# repository to one or more sets and then distribute the token for the set.
+# This allows you to grant federation pull access to a subset of your available
+# repositories. Tokens for federation sets only grant repository pull access.
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.6.0
+federation.sets =
+
+# Federation pull registrations
+# Registrations are read once, at startup.
+#
+# RESTART REQUIRED
+#
+# frequency:
+# The shortest frequency allowed is every 5 minutes
+# Decimal frequency values are cast to integers
+# Frequency values may be specified in mins, hours, or days
+# Values that can not be parsed or are unspecified default to *federation.defaultFrequency*
+#
+# folder:
+# if unspecified, the folder is *git.repositoriesFolder*
+# if specified, the folder is relative to *git.repositoriesFolder*
+#
+# bare:
+# if true, each repository will be created as a *bare* repository and will not
+# have a working directory.
+#
+# if false, each repository will be created as a normal repository suitable
+# for local work.
+#
+# mirror:
+# if true, each repository HEAD is reset to *origin/master* after each pull.
+# The repository will be flagged *isFrozen* after the initial clone.
+#
+# if false, each repository HEAD will point to the FETCH_HEAD of the initial
+# clone from the origin until pushed to or otherwise manipulated.
+#
+# mergeAccounts:
+# if true, remote accounts and their permissions are merged into your
+# users.properties file
+#
+# notifyOnError:
+# if true and the mail configuration is properly set, administrators will be
+# notified by email of pull failures
+#
+# include and exclude:
+# Space-delimited list of repositories to include or exclude from pull
+# may be * wildcard to include or exclude all
+# may use fuzzy match (e.g. org.eclipse.*)
+
+#
+# (Nearly) Perfect Mirror example
+#
+
+#federation.example1.url = https://go.gitblit.com
+#federation.example1.token = 6f3b8a24bf970f17289b234284c94f43eb42f0e4
+#federation.example1.frequency = 120 mins
+#federation.example1.folder =
+#federation.example1.bare = true
+#federation.example1.mirror = true
+#federation.example1.mergeAccounts = true
+
+#
+# Advanced Realm Settings
+#
+
+# URL of the LDAP server.
+# To use encrypted transport, use either ldaps:// URL for SSL or ldap+tls:// to
+# send StartTLS command.
+#
+# SINCE 1.0.0
+realm.ldap.server = ldap://localhost
+
+# Login username for LDAP searches.
+# If this value is unspecified, anonymous LDAP login will be used.
+#
+# e.g. mydomain\\username
+#
+# SINCE 1.0.0
+realm.ldap.username = cn=Directory Manager
+
+# Login password for LDAP searches.
+#
+# SINCE 1.0.0
+realm.ldap.password = password
+
+# The LdapUserService must be backed by another user service for standard user
+# and team management.
+# default: users.conf
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+# BASEFOLDER
+realm.ldap.backingUserService = ${baseFolder}/users.conf
+
+# Delegate team membership control to LDAP.
+#
+# If true, team user memberships will be specified by LDAP groups. This will
+# disable team selection in Edit User and user selection in Edit Team.
+#
+# If false, LDAP will only be used for authentication and Gitblit will maintain
+# team memberships with the *realm.ldap.backingUserService*.
+#
+# SINCE 1.0.0
+realm.ldap.maintainTeams = false
+
+# Root node for all LDAP users
+#
+# This is the root node from which subtree user searches will begin.
+# If blank, Gitblit will search ALL nodes.
+#
+# SINCE 1.0.0
+realm.ldap.accountBase = OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+# Filter criteria for LDAP users
+#
+# Query pattern to use when searching for a user account. This may be any valid
+# LDAP query expression, including the standard (&) and (|) operators.
+#
+# Variables may be injected via the ${variableName} syntax.
+# Recognized variables are:
+# ${username} - The text entered as the user name
+#
+# SINCE 1.0.0
+realm.ldap.accountPattern = (&(objectClass=person)(sAMAccountName=${username}))
+
+# Root node for all LDAP groups to be used as Gitblit Teams
+#
+# This is the root node from which subtree team searches will begin.
+# If blank, Gitblit will search ALL nodes.
+#
+# SINCE 1.0.0
+realm.ldap.groupBase = OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+# Filter criteria for LDAP groups
+#
+# Query pattern to use when searching for a team. This may be any valid
+# LDAP query expression, including the standard (&) and (|) operators.
+#
+# Variables may be injected via the ${variableName} syntax.
+# Recognized variables are:
+# ${username} - The text entered as the user name
+# ${dn} - The Distinguished Name of the user logged in
+#
+# All attributes from the LDAP User record are available. For example, if a user
+# has an attribute "fullName" set to "John", "(fn=${fullName})" will be
+# translated to "(fn=John)".
+#
+# SINCE 1.0.0
+realm.ldap.groupMemberPattern = (&(objectClass=group)(member=${dn}))
+
+# LDAP users or groups that should be given administrator privileges.
+#
+# Teams are specified with a leading '@' character. Groups with spaces in the
+# name can be entered as "@team name".
+#
+# e.g. realm.ldap.admins = john @git_admins "@git admins"
+#
+# SPACE-DELIMITED
+# SINCE 1.0.0
+realm.ldap.admins = @Git_Admins
+
+# Attribute(s) on the USER record that indicate their display (or full) name.
+# Leave blank for no mapping available in LDAP.
+#
+# This may be a single attribute, or a string of multiple attributes. Examples:
+# displayName - Uses the attribute 'displayName' on the user record
+# ${personalTitle}. ${givenName} ${surname} - Will concatenate the 3
+# attributes together, with a '.' after personalTitle
+#
+# SINCE 1.0.0
+realm.ldap.displayName = displayName
+
+# Attribute(s) on the USER record that indicate their email address.
+# Leave blank for no mapping available in LDAP.
+#
+# This may be a single attribute, or a string of multiple attributes. Examples:
+# email - Uses the attribute 'email' on the user record
+# ${givenName}.${surname}@gitblit.com -Will concatenate the 2 attributes
+# together with a '.' and '@' creating something like first.last@gitblit.com
+#
+# SINCE 1.0.0
+realm.ldap.email = email
+
+# Defines the cache period to be used when caching LDAP queries. This is currently
+# only used for LDAP user synchronization.
+#
+# Must be of the form '<long> <TimeUnit>' where <TimeUnit> is one of 'MILLISECONDS', 'SECONDS', 'MINUTES', 'HOURS', 'DAYS'
+# default: 2 MINUTES
+#
+# RESTART REQUIRED
+realm.ldap.ldapCachePeriod = 2 MINUTES
+
+# Defines whether to synchronize all LDAP users into the backing user service
+#
+# Valid values: true, false
+# If left blank, false is assumed
+realm.ldap.synchronizeUsers.enable = false
+
+# Defines whether to delete non-existent LDAP users from the backing user service
+# during synchronization. depends on realm.ldap.synchronizeUsers.enable = true
+#
+# Valid values: true, false
+# If left blank, true is assumed
+realm.ldap.synchronizeUsers.removeDeleted = true
+
+# Attribute on the USER record that indicate their username to be used in gitblit
+# when synchronizing users from LDAP
+# if blank, Gitblit will use uid
+# For MS Active Directory this may be sAMAccountName
+realm.ldap.uid = uid
+
+# The RedmineUserService must be backed by another user service for standard user
+# and team management.
+# default: users.conf
+#
+# RESTART REQUIRED
+# BASEFOLDER
+realm.redmine.backingUserService = ${baseFolder}/users.conf
+
+# URL of the Redmine.
+realm.redmine.url = http://example.com/redmine
+
+#
+# Server Settings
+#
+
+# The temporary folder to decompress the embedded gitblit webapp.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+# BASEFOLDER
+server.tempFolder = ${baseFolder}/temp
+
+# Use Jetty NIO connectors. If false, Jetty Socket connectors will be used.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.useNio = true
+
+# Context path for the GO application. You might want to change the context
+# path if running Gitblit behind a proxy layer such as mod_proxy.
+#
+# SINCE 0.7.0
+# RESTART REQUIRED
+server.contextPath = /
+
+# Standard http port to serve. <= 0 disables this connector.
+# On Unix/Linux systems, ports < 1024 require root permissions.
+# Recommended value: 80 or 8080
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpPort = 0
+
+# Secure/SSL https port to serve. <= 0 disables this connector.
+# On Unix/Linux systems, ports < 1024 require root permissions.
+# Recommended value: 443 or 8443
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpsPort = 8443
+
+# Port for serving an Apache JServ Protocol (AJP) 1.3 connector for integrating
+# Gitblit GO into an Apache HTTP server setup. <= 0 disables this connector.
+# Recommended value: 8009
+#
+# SINCE 0.9.0
+# RESTART REQUIRED
+server.ajpPort = 0
+
+# Specify the interface for Jetty to bind the standard connector.
+# You may specify an ip or an empty value to bind to all interfaces.
+# Specifying localhost will result in Gitblit ONLY listening to requests to
+# localhost.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpBindInterface = localhost
+
+# Specify the interface for Jetty to bind the secure connector.
+# You may specify an ip or an empty value to bind to all interfaces.
+# Specifying localhost will result in Gitblit ONLY listening to requests to
+# localhost.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpsBindInterface = localhost
+
+# Specify the interface for Jetty to bind the AJP connector.
+# You may specify an ip or an empty value to bind to all interfaces.
+# Specifying localhost will result in Gitblit ONLY listening to requests to
+# localhost.
+#
+# SINCE 0.9.0
+# RESTART REQUIRED
+server.ajpBindInterface = localhost
+
+# Alias of certificate to use for https/SSL serving. If blank the first
+# certificate found in the keystore will be used.
+#
+# SINCE 1.2.0
+# RESTART REQUIRED
+server.certificateAlias = localhost
+
+# Password for SSL keystore.
+# Keystore password and certificate password must match.
+# This is provided for convenience, its probably more secure to set this value
+# using the --storePassword command line parameter.
+#
+# If you are using the official JRE or JDK from Oracle you may not have the
+# JCE Unlimited Strength Jurisdiction Policy files bundled with your JVM. Because
+# of this, your store/key password can not exceed 7 characters. If you require
+# longer passwords you may need to install the JCE Unlimited Strength Jurisdiction
+# Policy files from Oracle.
+#
+# http://www.oracle.com/technetwork/java/javase/downloads/index.html
+#
+# Gitblit and the Gitblit Certificate Authority will both indicate if Unlimited
+# Strength encryption is available.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.storePassword = gitblit
+
+# If serving over https (recommended) you might consider requiring clients to
+# authenticate with ssl certificates. If enabled, only https clients with the
+# a valid client certificate will be able to access Gitblit.
+#
+# If disabled, client certificate authentication is optional and will be tried
+# first before falling-back to form authentication or basic authentication.
+#
+# Requiring client certificates to access any of Gitblit may be too extreme,
+# consider this carefully.
+#
+# SINCE 1.2.0
+# RESTART REQUIRED
+server.requireClientCertificates = false
+
+# Port for shutdown monitor to listen on.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.shutdownPort = 8081
diff --git a/src/WEB-INF/web.xml b/src/main/java/WEB-INF/web.xml
index a9436886..a9436886 100644
--- a/src/WEB-INF/web.xml
+++ b/src/main/java/WEB-INF/web.xml
diff --git a/src/com/gitblit/.gitignore b/src/main/java/com/gitblit/.gitignore
index c6298604..c6298604 100644
--- a/src/com/gitblit/.gitignore
+++ b/src/main/java/com/gitblit/.gitignore
diff --git a/src/com/gitblit/AccessRestrictionFilter.java b/src/main/java/com/gitblit/AccessRestrictionFilter.java
index 495d3438..495d3438 100644
--- a/src/com/gitblit/AccessRestrictionFilter.java
+++ b/src/main/java/com/gitblit/AccessRestrictionFilter.java
diff --git a/src/com/gitblit/AddIndexedBranch.java b/src/main/java/com/gitblit/AddIndexedBranch.java
index 66997060..66997060 100644
--- a/src/com/gitblit/AddIndexedBranch.java
+++ b/src/main/java/com/gitblit/AddIndexedBranch.java
diff --git a/src/com/gitblit/AuthenticationFilter.java b/src/main/java/com/gitblit/AuthenticationFilter.java
index eb6e95b7..eb6e95b7 100644
--- a/src/com/gitblit/AuthenticationFilter.java
+++ b/src/main/java/com/gitblit/AuthenticationFilter.java
diff --git a/src/com/gitblit/ConfigUserService.java b/src/main/java/com/gitblit/ConfigUserService.java
index 7aa09985..7aa09985 100644
--- a/src/com/gitblit/ConfigUserService.java
+++ b/src/main/java/com/gitblit/ConfigUserService.java
diff --git a/src/com/gitblit/Constants.java b/src/main/java/com/gitblit/Constants.java
index bcca8c72..7663f8bd 100644
--- a/src/com/gitblit/Constants.java
+++ b/src/main/java/com/gitblit/Constants.java
@@ -18,7 +18,9 @@ package com.gitblit;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-
+import java.net.URL;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
/**
* Constant values used by Gitblit.
@@ -32,18 +34,6 @@ public class Constants {
public static final String FULL_NAME = "Gitblit - a pure Java Git solution";
- // The build script extracts this exact line so be careful editing it
- // and only use A-Z a-z 0-9 .-_ in the string.
- public static final String VERSION = "1.3.0-SNAPSHOT";
-
- // The build script extracts this exact line so be careful editing it
- // and only use A-Z a-z 0-9 .-_ in the string.
- public static final String VERSION_DATE = "PENDING";
-
- // The build script extracts this exact line so be careful editing it
- // and only use A-Z a-z 0-9 .-_ in the string.
- public static final String JGIT_VERSION = "JGit 2.2.0 (201212191850-r)";
-
public static final String ADMIN_ROLE = "#admin";
public static final String FORK_ROLE = "#fork";
@@ -95,9 +85,40 @@ public class Constants {
public static final String baseFolder$ = "${" + baseFolder + "}";
public static final String contextFolder$ = "${contextFolder}";
-
+
+ public static String getVersion() {
+ String v = Constants.class.getPackage().getImplementationVersion();
+ if (v == null) {
+ return "0.0.0-SNAPSHOT";
+ }
+ return v;
+ }
+
public static String getGitBlitVersion() {
- return NAME + " v" + VERSION;
+ return NAME + " v" + getVersion();
+ }
+
+ public static String getBuildDate() {
+ return getManifestValue("build-date", "PENDING");
+ }
+
+ private static String getManifestValue(String attrib, String defaultValue) {
+ Class<?> clazz = Constants.class;
+ String className = clazz.getSimpleName() + ".class";
+ String classPath = clazz.getResource(className).toString();
+ if (!classPath.startsWith("jar")) {
+ // Class not from JAR
+ return defaultValue;
+ }
+ try {
+ String manifestPath = classPath.substring(0, classPath.lastIndexOf("!") + 1) + "/META-INF/MANIFEST.MF";
+ Manifest manifest = new Manifest(new URL(manifestPath).openStream());
+ Attributes attr = manifest.getMainAttributes();
+ String value = attr.getValue(attrib);
+ return value;
+ } catch (Exception e) {
+ }
+ return defaultValue;
}
/**
diff --git a/src/com/gitblit/DownloadZipFilter.java b/src/main/java/com/gitblit/DownloadZipFilter.java
index 90a76493..90a76493 100644
--- a/src/com/gitblit/DownloadZipFilter.java
+++ b/src/main/java/com/gitblit/DownloadZipFilter.java
diff --git a/src/com/gitblit/DownloadZipServlet.java b/src/main/java/com/gitblit/DownloadZipServlet.java
index 0feee879..0feee879 100644
--- a/src/com/gitblit/DownloadZipServlet.java
+++ b/src/main/java/com/gitblit/DownloadZipServlet.java
diff --git a/src/main/java/com/gitblit/EnforceAuthenticationFilter.java b/src/main/java/com/gitblit/EnforceAuthenticationFilter.java
new file mode 100644
index 00000000..2a17996e
--- /dev/null
+++ b/src/main/java/com/gitblit/EnforceAuthenticationFilter.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2013 Laurens Vrijnsen
+ * Copyright 2013 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */package com.gitblit;
+
+import java.io.IOException;
+import java.text.MessageFormat;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.gitblit.models.UserModel;
+
+/**
+ * This filter enforces authentication via HTTP Basic Authentication, if the settings indicate so.
+ * It looks at the settings "web.authenticateViewPages" and "web.enforceHttpBasicAuthentication"; if
+ * both are true, any unauthorized access will be met with a HTTP Basic Authentication header.
+ *
+ * @author Laurens Vrijnsen
+ *
+ */
+public class EnforceAuthenticationFilter implements Filter {
+
+ protected transient Logger logger = LoggerFactory.getLogger(getClass());
+
+ /*
+ * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
+ */
+ @Override
+ public void init(FilterConfig filterConfig) throws ServletException {
+ // nothing to be done
+
+ } //init
+
+
+ /*
+ * This does the actual filtering: is the user authenticated? If not, enforce HTTP authentication (401)
+ *
+ * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
+ */
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+
+ /*
+ * Determine whether to enforce the BASIC authentication:
+ */
+ @SuppressWarnings("static-access")
+ Boolean mustForceAuth = GitBlit.self().getBoolean(Keys.web.authenticateViewPages, false)
+ && GitBlit.self().getBoolean(Keys.web.enforceHttpBasicAuthentication, false);
+
+ HttpServletRequest HttpRequest = (HttpServletRequest)request;
+ HttpServletResponse HttpResponse = (HttpServletResponse)response;
+ UserModel user = GitBlit.self().authenticate(HttpRequest);
+
+ if (mustForceAuth && (user == null)) {
+ // not authenticated, enforce now:
+ logger.debug(MessageFormat.format("EnforceAuthFilter: user not authenticated for URL {0}!", request.toString()));
+ @SuppressWarnings("static-access")
+ String CHALLENGE = MessageFormat.format("Basic realm=\"{0}\"", GitBlit.self().getString("web.siteName",""));
+ HttpResponse.setHeader("WWW-Authenticate", CHALLENGE);
+ HttpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+ return;
+
+ } else {
+ // user is authenticated, or don't care, continue handling
+ chain.doFilter( request, response );
+
+ } // authenticated
+ } // doFilter
+
+
+ /*
+ * @see javax.servlet.Filter#destroy()
+ */
+ @Override
+ public void destroy() {
+ // Nothing to be done
+
+ } // destroy
+
+}
diff --git a/src/com/gitblit/FederationClient.java b/src/main/java/com/gitblit/FederationClient.java
index f6661394..4aeb2111 100644
--- a/src/com/gitblit/FederationClient.java
+++ b/src/main/java/com/gitblit/FederationClient.java
@@ -67,7 +67,7 @@ public class FederationClient {
System.exit(0);
}
- System.out.println("Gitblit Federation Client v" + Constants.VERSION + " (" + Constants.VERSION_DATE + ")");
+ System.out.println("Gitblit Federation Client v" + Constants.getVersion() + " (" + Constants.getBuildDate() + ")");
// command-line specified repositories folder
if (!StringUtils.isEmpty(params.repositoriesFolder)) {
diff --git a/src/com/gitblit/FederationPullExecutor.java b/src/main/java/com/gitblit/FederationPullExecutor.java
index ad1022cf..ad1022cf 100644
--- a/src/com/gitblit/FederationPullExecutor.java
+++ b/src/main/java/com/gitblit/FederationPullExecutor.java
diff --git a/src/com/gitblit/FederationServlet.java b/src/main/java/com/gitblit/FederationServlet.java
index e7720508..e7720508 100644
--- a/src/com/gitblit/FederationServlet.java
+++ b/src/main/java/com/gitblit/FederationServlet.java
diff --git a/src/com/gitblit/FileSettings.java b/src/main/java/com/gitblit/FileSettings.java
index 3a42cad0..3a42cad0 100644
--- a/src/com/gitblit/FileSettings.java
+++ b/src/main/java/com/gitblit/FileSettings.java
diff --git a/src/com/gitblit/FileUserService.java b/src/main/java/com/gitblit/FileUserService.java
index 32c24cc4..32c24cc4 100644
--- a/src/com/gitblit/FileUserService.java
+++ b/src/main/java/com/gitblit/FileUserService.java
diff --git a/src/com/gitblit/GCExecutor.java b/src/main/java/com/gitblit/GCExecutor.java
index 312baf5b..312baf5b 100644
--- a/src/com/gitblit/GCExecutor.java
+++ b/src/main/java/com/gitblit/GCExecutor.java
diff --git a/src/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java
index 4cfd61e4..4cfd61e4 100644
--- a/src/com/gitblit/GitBlit.java
+++ b/src/main/java/com/gitblit/GitBlit.java
diff --git a/src/com/gitblit/GitBlitException.java b/src/main/java/com/gitblit/GitBlitException.java
index 7ab0f99d..7ab0f99d 100644
--- a/src/com/gitblit/GitBlitException.java
+++ b/src/main/java/com/gitblit/GitBlitException.java
diff --git a/src/com/gitblit/GitBlitServer.java b/src/main/java/com/gitblit/GitBlitServer.java
index 08c0d2a2..08c0d2a2 100644
--- a/src/com/gitblit/GitBlitServer.java
+++ b/src/main/java/com/gitblit/GitBlitServer.java
diff --git a/src/com/gitblit/GitFilter.java b/src/main/java/com/gitblit/GitFilter.java
index a0d395b1..a0d395b1 100644
--- a/src/com/gitblit/GitFilter.java
+++ b/src/main/java/com/gitblit/GitFilter.java
diff --git a/src/com/gitblit/GitServlet.java b/src/main/java/com/gitblit/GitServlet.java
index 77be963f..77be963f 100644
--- a/src/com/gitblit/GitServlet.java
+++ b/src/main/java/com/gitblit/GitServlet.java
diff --git a/src/com/gitblit/GitblitSslContextFactory.java b/src/main/java/com/gitblit/GitblitSslContextFactory.java
index f025c452..f025c452 100644
--- a/src/com/gitblit/GitblitSslContextFactory.java
+++ b/src/main/java/com/gitblit/GitblitSslContextFactory.java
diff --git a/src/com/gitblit/GitblitTrustManager.java b/src/main/java/com/gitblit/GitblitTrustManager.java
index 4127caf4..4127caf4 100644
--- a/src/com/gitblit/GitblitTrustManager.java
+++ b/src/main/java/com/gitblit/GitblitTrustManager.java
diff --git a/src/com/gitblit/GitblitUserService.java b/src/main/java/com/gitblit/GitblitUserService.java
index fe35db94..fe35db94 100644
--- a/src/com/gitblit/GitblitUserService.java
+++ b/src/main/java/com/gitblit/GitblitUserService.java
diff --git a/src/com/gitblit/IStoredSettings.java b/src/main/java/com/gitblit/IStoredSettings.java
index 790f8b68..790f8b68 100644
--- a/src/com/gitblit/IStoredSettings.java
+++ b/src/main/java/com/gitblit/IStoredSettings.java
diff --git a/src/com/gitblit/IUserService.java b/src/main/java/com/gitblit/IUserService.java
index a57b0da6..a57b0da6 100644
--- a/src/com/gitblit/IUserService.java
+++ b/src/main/java/com/gitblit/IUserService.java
diff --git a/src/com/gitblit/JsonServlet.java b/src/main/java/com/gitblit/JsonServlet.java
index 3ad2b7d2..3ad2b7d2 100644
--- a/src/com/gitblit/JsonServlet.java
+++ b/src/main/java/com/gitblit/JsonServlet.java
diff --git a/src/com/gitblit/LdapUserService.java b/src/main/java/com/gitblit/LdapUserService.java
index 2867b88f..2867b88f 100644
--- a/src/com/gitblit/LdapUserService.java
+++ b/src/main/java/com/gitblit/LdapUserService.java
diff --git a/src/com/gitblit/LuceneExecutor.java b/src/main/java/com/gitblit/LuceneExecutor.java
index 0e4baae9..0e4baae9 100644
--- a/src/com/gitblit/LuceneExecutor.java
+++ b/src/main/java/com/gitblit/LuceneExecutor.java
diff --git a/src/com/gitblit/MailExecutor.java b/src/main/java/com/gitblit/MailExecutor.java
index 9001e836..9001e836 100644
--- a/src/com/gitblit/MailExecutor.java
+++ b/src/main/java/com/gitblit/MailExecutor.java
diff --git a/src/com/gitblit/PagesFilter.java b/src/main/java/com/gitblit/PagesFilter.java
index f88624e1..f88624e1 100644
--- a/src/com/gitblit/PagesFilter.java
+++ b/src/main/java/com/gitblit/PagesFilter.java
diff --git a/src/com/gitblit/PagesServlet.java b/src/main/java/com/gitblit/PagesServlet.java
index 91f25b70..91f25b70 100644
--- a/src/com/gitblit/PagesServlet.java
+++ b/src/main/java/com/gitblit/PagesServlet.java
diff --git a/src/com/gitblit/RedmineUserService.java b/src/main/java/com/gitblit/RedmineUserService.java
index 9d571e37..9d571e37 100644
--- a/src/com/gitblit/RedmineUserService.java
+++ b/src/main/java/com/gitblit/RedmineUserService.java
diff --git a/src/com/gitblit/RobotsTxtServlet.java b/src/main/java/com/gitblit/RobotsTxtServlet.java
index d66ebf43..d66ebf43 100644
--- a/src/com/gitblit/RobotsTxtServlet.java
+++ b/src/main/java/com/gitblit/RobotsTxtServlet.java
diff --git a/src/com/gitblit/RpcFilter.java b/src/main/java/com/gitblit/RpcFilter.java
index 1de9fcc4..1de9fcc4 100644
--- a/src/com/gitblit/RpcFilter.java
+++ b/src/main/java/com/gitblit/RpcFilter.java
diff --git a/src/com/gitblit/RpcServlet.java b/src/main/java/com/gitblit/RpcServlet.java
index f6368dd0..f6368dd0 100644
--- a/src/com/gitblit/RpcServlet.java
+++ b/src/main/java/com/gitblit/RpcServlet.java
diff --git a/src/com/gitblit/ServletRequestWrapper.java b/src/main/java/com/gitblit/ServletRequestWrapper.java
index d74a9ecb..d74a9ecb 100644
--- a/src/com/gitblit/ServletRequestWrapper.java
+++ b/src/main/java/com/gitblit/ServletRequestWrapper.java
diff --git a/src/com/gitblit/SyndicationFilter.java b/src/main/java/com/gitblit/SyndicationFilter.java
index 61bf2258..61bf2258 100644
--- a/src/com/gitblit/SyndicationFilter.java
+++ b/src/main/java/com/gitblit/SyndicationFilter.java
diff --git a/src/com/gitblit/SyndicationServlet.java b/src/main/java/com/gitblit/SyndicationServlet.java
index baaf7eb7..baaf7eb7 100644
--- a/src/com/gitblit/SyndicationServlet.java
+++ b/src/main/java/com/gitblit/SyndicationServlet.java
diff --git a/src/com/gitblit/WebXmlSettings.java b/src/main/java/com/gitblit/WebXmlSettings.java
index 7c8120b7..7c8120b7 100644
--- a/src/com/gitblit/WebXmlSettings.java
+++ b/src/main/java/com/gitblit/WebXmlSettings.java
diff --git a/src/com/gitblit/authority/AuthorityWorker.java b/src/main/java/com/gitblit/authority/AuthorityWorker.java
index 262bbb53..262bbb53 100644
--- a/src/com/gitblit/authority/AuthorityWorker.java
+++ b/src/main/java/com/gitblit/authority/AuthorityWorker.java
diff --git a/src/com/gitblit/authority/CertificateStatus.java b/src/main/java/com/gitblit/authority/CertificateStatus.java
index 79c51628..79c51628 100644
--- a/src/com/gitblit/authority/CertificateStatus.java
+++ b/src/main/java/com/gitblit/authority/CertificateStatus.java
diff --git a/src/com/gitblit/authority/CertificateStatusRenderer.java b/src/main/java/com/gitblit/authority/CertificateStatusRenderer.java
index 7a708ea4..7a708ea4 100644
--- a/src/com/gitblit/authority/CertificateStatusRenderer.java
+++ b/src/main/java/com/gitblit/authority/CertificateStatusRenderer.java
diff --git a/src/com/gitblit/authority/CertificatesTableModel.java b/src/main/java/com/gitblit/authority/CertificatesTableModel.java
index 44d80e3a..44d80e3a 100644
--- a/src/com/gitblit/authority/CertificatesTableModel.java
+++ b/src/main/java/com/gitblit/authority/CertificatesTableModel.java
diff --git a/src/com/gitblit/authority/DefaultOidsPanel.java b/src/main/java/com/gitblit/authority/DefaultOidsPanel.java
index 12b919fa..12b919fa 100644
--- a/src/com/gitblit/authority/DefaultOidsPanel.java
+++ b/src/main/java/com/gitblit/authority/DefaultOidsPanel.java
diff --git a/src/com/gitblit/authority/GitblitAuthority.java b/src/main/java/com/gitblit/authority/GitblitAuthority.java
index c3d81848..1a1f96db 100644
--- a/src/com/gitblit/authority/GitblitAuthority.java
+++ b/src/main/java/com/gitblit/authority/GitblitAuthority.java
@@ -175,7 +175,7 @@ public class GitblitAuthority extends JFrame implements X509Log {
public void initialize(String baseFolder) {
setIconImage(new ImageIcon(getClass().getResource("/gitblt-favicon.png")).getImage());
- setTitle("Gitblit Certificate Authority v" + Constants.VERSION + " (" + Constants.VERSION_DATE + ")");
+ setTitle("Gitblit Certificate Authority v" + Constants.getVersion() + " (" + Constants.getBuildDate() + ")");
setContentPane(getUI());
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
addWindowListener(new WindowAdapter() {
diff --git a/src/com/gitblit/authority/GitblitAuthorityLauncher.java b/src/main/java/com/gitblit/authority/Launcher.java
index 584ac01f..1da97149 100644
--- a/src/com/gitblit/authority/GitblitAuthorityLauncher.java
+++ b/src/main/java/com/gitblit/authority/Launcher.java
@@ -21,14 +21,18 @@ import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.SplashScreen;
import java.io.File;
+import java.io.FileFilter;
import java.io.IOException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import com.gitblit.Constants;
-import com.gitblit.Launcher;
-import com.gitblit.build.Build;
-import com.gitblit.build.Build.DownloadListener;
import com.gitblit.client.Translation;
/**
@@ -37,23 +41,21 @@ import com.gitblit.client.Translation;
* @author James Moger
*
*/
-public class GitblitAuthorityLauncher {
+public class Launcher {
+
+ public static final boolean DEBUG = false;
+
+ /**
+ * Parameters of the method to add an URL to the System classes.
+ */
+ private static final Class<?>[] PARAMETERS = new Class[] { URL.class };
+
public static void main(String[] args) {
final SplashScreen splash = SplashScreen.getSplashScreen();
- DownloadListener downloadListener = new DownloadListener() {
- @Override
- public void downloading(String name) {
- updateSplash(splash, Translation.get("gb.downloading") + " " + name);
- }
- };
-
- // download authority runtime dependencies
- Build.authority(downloadListener);
-
File libFolder = new File("ext");
- List<File> jars = Launcher.findJars(libFolder.getAbsoluteFile());
+ List<File> jars = findJars(libFolder.getAbsoluteFile());
// sort the jars by name and then reverse the order so the newer version
// of the library gets loaded in the event that this is an upgrade
@@ -62,7 +64,7 @@ public class GitblitAuthorityLauncher {
for (File jar : jars) {
try {
updateSplash(splash, Translation.get("gb.loading") + " " + jar.getName() + "...");
- Launcher.addJarFile(jar);
+ addJarFile(jar);
} catch (IOException e) {
}
@@ -98,7 +100,7 @@ public class GitblitAuthorityLauncher {
g.drawString(string, x + ((w - xw) / 2), y - 5);
// paint version
- String ver = "v" + Constants.VERSION;
+ String ver = "v" + Constants.getVersion();
int vw = g.getFontMetrics().stringWidth(ver);
g.drawString(ver, 320 - vw - 5, 34);
g.dispose();
@@ -110,4 +112,54 @@ public class GitblitAuthorityLauncher {
t.printStackTrace();
}
}
+
+ public static List<File> findJars(File folder) {
+ List<File> jars = new ArrayList<File>();
+ if (folder.exists()) {
+ File[] libs = folder.listFiles(new FileFilter() {
+ @Override
+ public boolean accept(File file) {
+ return !file.isDirectory() && file.getName().toLowerCase().endsWith(".jar");
+ }
+ });
+ if (libs != null && libs.length > 0) {
+ jars.addAll(Arrays.asList(libs));
+ if (DEBUG) {
+ for (File jar : jars) {
+ System.out.println("found " + jar);
+ }
+ }
+ }
+ }
+
+ return jars;
+ }
+
+ /**
+ * Adds a file to the classpath
+ *
+ * @param f
+ * the file to be added
+ * @throws IOException
+ */
+ public static void addJarFile(File f) throws IOException {
+ if (f.getName().indexOf("-sources") > -1 || f.getName().indexOf("-javadoc") > -1) {
+ // don't add source or javadoc jars to runtime classpath
+ return;
+ }
+ URL u = f.toURI().toURL();
+ if (DEBUG) {
+ System.out.println("load=" + u.toExternalForm());
+ }
+ URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();
+ Class<?> sysclass = URLClassLoader.class;
+ try {
+ Method method = sysclass.getDeclaredMethod("addURL", PARAMETERS);
+ method.setAccessible(true);
+ method.invoke(sysloader, new Object[] { u });
+ } catch (Throwable t) {
+ throw new IOException(MessageFormat.format(
+ "Error, could not add {0} to system classloader", f.getPath()), t);
+ }
+ }
}
diff --git a/src/com/gitblit/authority/NewCertificateConfig.java b/src/main/java/com/gitblit/authority/NewCertificateConfig.java
index ca047c82..ca047c82 100644
--- a/src/com/gitblit/authority/NewCertificateConfig.java
+++ b/src/main/java/com/gitblit/authority/NewCertificateConfig.java
diff --git a/src/com/gitblit/authority/NewClientCertificateDialog.java b/src/main/java/com/gitblit/authority/NewClientCertificateDialog.java
index 3d214390..3d214390 100644
--- a/src/com/gitblit/authority/NewClientCertificateDialog.java
+++ b/src/main/java/com/gitblit/authority/NewClientCertificateDialog.java
diff --git a/src/com/gitblit/authority/NewSSLCertificateDialog.java b/src/main/java/com/gitblit/authority/NewSSLCertificateDialog.java
index 821e9e9f..821e9e9f 100644
--- a/src/com/gitblit/authority/NewSSLCertificateDialog.java
+++ b/src/main/java/com/gitblit/authority/NewSSLCertificateDialog.java
diff --git a/src/com/gitblit/authority/RequestFocusListener.java b/src/main/java/com/gitblit/authority/RequestFocusListener.java
index e9368686..e9368686 100644
--- a/src/com/gitblit/authority/RequestFocusListener.java
+++ b/src/main/java/com/gitblit/authority/RequestFocusListener.java
diff --git a/src/com/gitblit/authority/UserCertificateConfig.java b/src/main/java/com/gitblit/authority/UserCertificateConfig.java
index 5ec76f77..5ec76f77 100644
--- a/src/com/gitblit/authority/UserCertificateConfig.java
+++ b/src/main/java/com/gitblit/authority/UserCertificateConfig.java
diff --git a/src/com/gitblit/authority/UserCertificateModel.java b/src/main/java/com/gitblit/authority/UserCertificateModel.java
index 6c69a93b..6c69a93b 100644
--- a/src/com/gitblit/authority/UserCertificateModel.java
+++ b/src/main/java/com/gitblit/authority/UserCertificateModel.java
diff --git a/src/com/gitblit/authority/UserCertificatePanel.java b/src/main/java/com/gitblit/authority/UserCertificatePanel.java
index 0c49252c..0c49252c 100644
--- a/src/com/gitblit/authority/UserCertificatePanel.java
+++ b/src/main/java/com/gitblit/authority/UserCertificatePanel.java
diff --git a/src/com/gitblit/authority/UserCertificateTableModel.java b/src/main/java/com/gitblit/authority/UserCertificateTableModel.java
index dde73fc0..dde73fc0 100644
--- a/src/com/gitblit/authority/UserCertificateTableModel.java
+++ b/src/main/java/com/gitblit/authority/UserCertificateTableModel.java
diff --git a/src/com/gitblit/authority/UserOidsPanel.java b/src/main/java/com/gitblit/authority/UserOidsPanel.java
index 8c3adf66..8c3adf66 100644
--- a/src/com/gitblit/authority/UserOidsPanel.java
+++ b/src/main/java/com/gitblit/authority/UserOidsPanel.java
diff --git a/src/com/gitblit/authority/Utils.java b/src/main/java/com/gitblit/authority/Utils.java
index 45e028e7..45e028e7 100644
--- a/src/com/gitblit/authority/Utils.java
+++ b/src/main/java/com/gitblit/authority/Utils.java
diff --git a/src/com/gitblit/authority/X509CertificateViewer.java b/src/main/java/com/gitblit/authority/X509CertificateViewer.java
index 797b9a81..797b9a81 100644
--- a/src/com/gitblit/authority/X509CertificateViewer.java
+++ b/src/main/java/com/gitblit/authority/X509CertificateViewer.java
diff --git a/src/com/gitblit/build/Build.java b/src/main/java/com/gitblit/build/Build.java
index 3a9ed751..3a9ed751 100644
--- a/src/com/gitblit/build/Build.java
+++ b/src/main/java/com/gitblit/build/Build.java
diff --git a/src/com/gitblit/build/BuildGhPages.java b/src/main/java/com/gitblit/build/BuildGhPages.java
index 5982ac30..5982ac30 100644
--- a/src/com/gitblit/build/BuildGhPages.java
+++ b/src/main/java/com/gitblit/build/BuildGhPages.java
diff --git a/src/com/gitblit/build/BuildSite.java b/src/main/java/com/gitblit/build/BuildSite.java
index efff5a34..efff5a34 100644
--- a/src/com/gitblit/build/BuildSite.java
+++ b/src/main/java/com/gitblit/build/BuildSite.java
diff --git a/src/com/gitblit/build/BuildThumbnails.java b/src/main/java/com/gitblit/build/BuildThumbnails.java
index fe06c6ca..fe06c6ca 100644
--- a/src/com/gitblit/build/BuildThumbnails.java
+++ b/src/main/java/com/gitblit/build/BuildThumbnails.java
diff --git a/src/com/gitblit/build/BuildWebXml.java b/src/main/java/com/gitblit/build/BuildWebXml.java
index 49a12ab2..49a12ab2 100644
--- a/src/com/gitblit/build/BuildWebXml.java
+++ b/src/main/java/com/gitblit/build/BuildWebXml.java
diff --git a/src/com/gitblit/client/BooleanCellRenderer.java b/src/main/java/com/gitblit/client/BooleanCellRenderer.java
index c8341df6..c8341df6 100644
--- a/src/com/gitblit/client/BooleanCellRenderer.java
+++ b/src/main/java/com/gitblit/client/BooleanCellRenderer.java
diff --git a/src/com/gitblit/client/BranchRenderer.java b/src/main/java/com/gitblit/client/BranchRenderer.java
index 9a303c38..9a303c38 100644
--- a/src/com/gitblit/client/BranchRenderer.java
+++ b/src/main/java/com/gitblit/client/BranchRenderer.java
diff --git a/src/com/gitblit/client/ClosableTabComponent.java b/src/main/java/com/gitblit/client/ClosableTabComponent.java
index a121806a..a121806a 100644
--- a/src/com/gitblit/client/ClosableTabComponent.java
+++ b/src/main/java/com/gitblit/client/ClosableTabComponent.java
diff --git a/src/com/gitblit/client/DateCellRenderer.java b/src/main/java/com/gitblit/client/DateCellRenderer.java
index 751c7dbb..751c7dbb 100644
--- a/src/com/gitblit/client/DateCellRenderer.java
+++ b/src/main/java/com/gitblit/client/DateCellRenderer.java
diff --git a/src/com/gitblit/client/EditRegistrationDialog.java b/src/main/java/com/gitblit/client/EditRegistrationDialog.java
index 99cd36fa..99cd36fa 100644
--- a/src/com/gitblit/client/EditRegistrationDialog.java
+++ b/src/main/java/com/gitblit/client/EditRegistrationDialog.java
diff --git a/src/com/gitblit/client/EditRepositoryDialog.java b/src/main/java/com/gitblit/client/EditRepositoryDialog.java
index 8851de43..8851de43 100644
--- a/src/com/gitblit/client/EditRepositoryDialog.java
+++ b/src/main/java/com/gitblit/client/EditRepositoryDialog.java
diff --git a/src/com/gitblit/client/EditTeamDialog.java b/src/main/java/com/gitblit/client/EditTeamDialog.java
index 4d7af261..4d7af261 100644
--- a/src/com/gitblit/client/EditTeamDialog.java
+++ b/src/main/java/com/gitblit/client/EditTeamDialog.java
diff --git a/src/com/gitblit/client/EditUserDialog.java b/src/main/java/com/gitblit/client/EditUserDialog.java
index 0400f5c9..0400f5c9 100644
--- a/src/com/gitblit/client/EditUserDialog.java
+++ b/src/main/java/com/gitblit/client/EditUserDialog.java
diff --git a/src/com/gitblit/client/FeedEntryTableModel.java b/src/main/java/com/gitblit/client/FeedEntryTableModel.java
index 0b0ef178..0b0ef178 100644
--- a/src/com/gitblit/client/FeedEntryTableModel.java
+++ b/src/main/java/com/gitblit/client/FeedEntryTableModel.java
diff --git a/src/com/gitblit/client/FeedsPanel.java b/src/main/java/com/gitblit/client/FeedsPanel.java
index 392636e4..392636e4 100644
--- a/src/com/gitblit/client/FeedsPanel.java
+++ b/src/main/java/com/gitblit/client/FeedsPanel.java
diff --git a/src/com/gitblit/client/FeedsTableModel.java b/src/main/java/com/gitblit/client/FeedsTableModel.java
index 0979a4c9..0979a4c9 100644
--- a/src/com/gitblit/client/FeedsTableModel.java
+++ b/src/main/java/com/gitblit/client/FeedsTableModel.java
diff --git a/src/com/gitblit/client/GitblitClient.java b/src/main/java/com/gitblit/client/GitblitClient.java
index cc7d58a6..cc7d58a6 100644
--- a/src/com/gitblit/client/GitblitClient.java
+++ b/src/main/java/com/gitblit/client/GitblitClient.java
diff --git a/src/com/gitblit/client/GitblitManager.java b/src/main/java/com/gitblit/client/GitblitManager.java
index dd0315f2..d2fd7f7b 100644
--- a/src/com/gitblit/client/GitblitManager.java
+++ b/src/main/java/com/gitblit/client/GitblitManager.java
@@ -96,7 +96,7 @@ public class GitblitManager extends JFrame implements RegistrationsDialog.Regist
private void initialize() {
setContentPane(getCenterPanel());
setIconImage(new ImageIcon(getClass().getResource("/gitblt-favicon.png")).getImage());
- setTitle("Gitblit Manager v" + Constants.VERSION + " (" + Constants.VERSION_DATE + ")");
+ setTitle("Gitblit Manager v" + Constants.getVersion() + " (" + Constants.getBuildDate() + ")");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
addWindowListener(new WindowAdapter() {
@Override
diff --git a/src/com/gitblit/Launcher.java b/src/main/java/com/gitblit/client/GitblitManagerLauncher.java
index a43331b7..d0cc8393 100644
--- a/src/com/gitblit/Launcher.java
+++ b/src/main/java/com/gitblit/client/GitblitManagerLauncher.java
@@ -13,35 +13,34 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.gitblit;
+package com.gitblit.client;
+import java.awt.Color;
+import java.awt.EventQueue;
+import java.awt.FontMetrics;
+import java.awt.Graphics2D;
+import java.awt.SplashScreen;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
-import java.security.ProtectionDomain;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import com.gitblit.build.Build;
+import com.gitblit.Constants;
/**
- * Launch helper class that adds all jars found in the local "lib" & "ext"
- * folders and then calls the application main. Using this technique we do not
- * have to specify a classpath and we can dynamically add jars to the
- * distribution.
- *
- * This class also downloads all runtime dependencies, if they are not found.
+ * Downloads dependencies and launches Gitblit Manager.
*
* @author James Moger
*
*/
-public class Launcher {
+public class GitblitManagerLauncher {
public static final boolean DEBUG = false;
@@ -51,58 +50,67 @@ public class Launcher {
private static final Class<?>[] PARAMETERS = new Class[] { URL.class };
public static void main(String[] args) {
- if (DEBUG) {
- System.out.println("jcp=" + System.getProperty("java.class.path"));
- ProtectionDomain protectionDomain = Launcher.class.getProtectionDomain();
- System.out.println("launcher="
- + protectionDomain.getCodeSource().getLocation().toExternalForm());
- }
-
- // download all runtime dependencies
- Build.runtime();
-
- // Load the JARs in the lib and ext folder
- String[] folders = new String[] { "lib", "ext" };
- List<File> jars = new ArrayList<File>();
- for (String folder : folders) {
- if (folder == null) {
- continue;
- }
- File libFolder = new File(folder);
- if (!libFolder.exists()) {
- continue;
- }
- List<File> found = findJars(libFolder.getAbsoluteFile());
- jars.addAll(found);
- }
+ final SplashScreen splash = SplashScreen.getSplashScreen();
+
+ File libFolder = new File("ext");
+ List<File> jars = findJars(libFolder.getAbsoluteFile());
+
// sort the jars by name and then reverse the order so the newer version
// of the library gets loaded in the event that this is an upgrade
Collections.sort(jars);
Collections.reverse(jars);
+ for (File jar : jars) {
+ try {
+ updateSplash(splash, Translation.get("gb.loading") + " " + jar.getName() + "...");
+ addJarFile(jar);
+ } catch (IOException e) {
- if (jars.size() == 0) {
- for (String folder : folders) {
- File libFolder = new File(folder);
- // this is a test of adding a comment
- // more really interesting things
- System.err.println("Failed to find any really cool JARs in " + libFolder.getPath());
- }
- System.exit(-1);
- } else {
- for (File jar : jars) {
- try {
- jar.canRead();
- addJarFile(jar);
- } catch (Throwable t) {
- t.printStackTrace();
- }
}
}
-
- // Start Server
- GitBlitServer.main(args);
+
+ updateSplash(splash, Translation.get("gb.starting") + " Gitblit Manager...");
+ GitblitManager.main(args);
}
+ private static void updateSplash(final SplashScreen splash, final String string) {
+ if (splash == null) {
+ return;
+ }
+ try {
+ EventQueue.invokeAndWait(new Runnable() {
+ public void run() {
+ Graphics2D g = splash.createGraphics();
+ if (g != null) {
+ // Splash is 320x120
+ FontMetrics fm = g.getFontMetrics();
+
+ // paint startup status
+ g.setColor(Color.darkGray);
+ int h = fm.getHeight() + fm.getMaxDescent();
+ int x = 5;
+ int y = 115;
+ int w = 320 - 2 * x;
+ g.fillRect(x, y - h, w, h);
+ g.setColor(Color.lightGray);
+ g.drawRect(x, y - h, w, h);
+ g.setColor(Color.WHITE);
+ int xw = fm.stringWidth(string);
+ g.drawString(string, x + ((w - xw) / 2), y - 5);
+
+ // paint version
+ String ver = "v" + Constants.getVersion();
+ int vw = g.getFontMetrics().stringWidth(ver);
+ g.drawString(ver, 320 - vw - 5, 34);
+ g.dispose();
+ splash.update();
+ }
+ }
+ });
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
+
public static List<File> findJars(File folder) {
List<File> jars = new ArrayList<File>();
if (folder.exists()) {
@@ -152,4 +160,5 @@ public class Launcher {
"Error, could not add {0} to system classloader", f.getPath()), t);
}
}
+
}
diff --git a/src/com/gitblit/client/GitblitPanel.java b/src/main/java/com/gitblit/client/GitblitPanel.java
index f14ce790..f14ce790 100644
--- a/src/com/gitblit/client/GitblitPanel.java
+++ b/src/main/java/com/gitblit/client/GitblitPanel.java
diff --git a/src/com/gitblit/client/GitblitRegistration.java b/src/main/java/com/gitblit/client/GitblitRegistration.java
index f9d07488..f9d07488 100644
--- a/src/com/gitblit/client/GitblitRegistration.java
+++ b/src/main/java/com/gitblit/client/GitblitRegistration.java
diff --git a/src/com/gitblit/client/GitblitWorker.java b/src/main/java/com/gitblit/client/GitblitWorker.java
index 93c35d6b..93c35d6b 100644
--- a/src/com/gitblit/client/GitblitWorker.java
+++ b/src/main/java/com/gitblit/client/GitblitWorker.java
diff --git a/src/com/gitblit/client/HeaderPanel.java b/src/main/java/com/gitblit/client/HeaderPanel.java
index 3cd89a70..3cd89a70 100644
--- a/src/com/gitblit/client/HeaderPanel.java
+++ b/src/main/java/com/gitblit/client/HeaderPanel.java
diff --git a/src/com/gitblit/client/IndicatorsRenderer.java b/src/main/java/com/gitblit/client/IndicatorsRenderer.java
index 44b39d01..44b39d01 100644
--- a/src/com/gitblit/client/IndicatorsRenderer.java
+++ b/src/main/java/com/gitblit/client/IndicatorsRenderer.java
diff --git a/src/com/gitblit/client/JPalette.java b/src/main/java/com/gitblit/client/JPalette.java
index a0c2b258..a0c2b258 100644
--- a/src/com/gitblit/client/JPalette.java
+++ b/src/main/java/com/gitblit/client/JPalette.java
diff --git a/src/com/gitblit/client/MessageRenderer.java b/src/main/java/com/gitblit/client/MessageRenderer.java
index 2fe3415a..2fe3415a 100644
--- a/src/com/gitblit/client/MessageRenderer.java
+++ b/src/main/java/com/gitblit/client/MessageRenderer.java
diff --git a/src/com/gitblit/client/NameRenderer.java b/src/main/java/com/gitblit/client/NameRenderer.java
index 4cbb5906..4cbb5906 100644
--- a/src/com/gitblit/client/NameRenderer.java
+++ b/src/main/java/com/gitblit/client/NameRenderer.java
diff --git a/src/com/gitblit/client/PropertiesTableModel.java b/src/main/java/com/gitblit/client/PropertiesTableModel.java
index 0c803f47..0c803f47 100644
--- a/src/com/gitblit/client/PropertiesTableModel.java
+++ b/src/main/java/com/gitblit/client/PropertiesTableModel.java
diff --git a/src/com/gitblit/client/RegistrantPermissionsPanel.java b/src/main/java/com/gitblit/client/RegistrantPermissionsPanel.java
index 98dbfb72..98dbfb72 100644
--- a/src/com/gitblit/client/RegistrantPermissionsPanel.java
+++ b/src/main/java/com/gitblit/client/RegistrantPermissionsPanel.java
diff --git a/src/com/gitblit/client/RegistrantPermissionsTableModel.java b/src/main/java/com/gitblit/client/RegistrantPermissionsTableModel.java
index 28d25345..28d25345 100644
--- a/src/com/gitblit/client/RegistrantPermissionsTableModel.java
+++ b/src/main/java/com/gitblit/client/RegistrantPermissionsTableModel.java
diff --git a/src/com/gitblit/client/RegistrationsDialog.java b/src/main/java/com/gitblit/client/RegistrationsDialog.java
index 9550e97a..9550e97a 100644
--- a/src/com/gitblit/client/RegistrationsDialog.java
+++ b/src/main/java/com/gitblit/client/RegistrationsDialog.java
diff --git a/src/com/gitblit/client/RegistrationsTableModel.java b/src/main/java/com/gitblit/client/RegistrationsTableModel.java
index 8c6b34ff..8c6b34ff 100644
--- a/src/com/gitblit/client/RegistrationsTableModel.java
+++ b/src/main/java/com/gitblit/client/RegistrationsTableModel.java
diff --git a/src/com/gitblit/client/RepositoriesPanel.java b/src/main/java/com/gitblit/client/RepositoriesPanel.java
index 64bde9b8..64bde9b8 100644
--- a/src/com/gitblit/client/RepositoriesPanel.java
+++ b/src/main/java/com/gitblit/client/RepositoriesPanel.java
diff --git a/src/com/gitblit/client/RepositoriesTableModel.java b/src/main/java/com/gitblit/client/RepositoriesTableModel.java
index 6b295a4b..6b295a4b 100644
--- a/src/com/gitblit/client/RepositoriesTableModel.java
+++ b/src/main/java/com/gitblit/client/RepositoriesTableModel.java
diff --git a/src/com/gitblit/client/SearchDialog.java b/src/main/java/com/gitblit/client/SearchDialog.java
index 829bc52a..829bc52a 100644
--- a/src/com/gitblit/client/SearchDialog.java
+++ b/src/main/java/com/gitblit/client/SearchDialog.java
diff --git a/src/com/gitblit/client/SettingCellRenderer.java b/src/main/java/com/gitblit/client/SettingCellRenderer.java
index d164fb1a..d164fb1a 100644
--- a/src/com/gitblit/client/SettingCellRenderer.java
+++ b/src/main/java/com/gitblit/client/SettingCellRenderer.java
diff --git a/src/com/gitblit/client/SettingPanel.java b/src/main/java/com/gitblit/client/SettingPanel.java
index 6da09e18..6da09e18 100644
--- a/src/com/gitblit/client/SettingPanel.java
+++ b/src/main/java/com/gitblit/client/SettingPanel.java
diff --git a/src/com/gitblit/client/SettingsPanel.java b/src/main/java/com/gitblit/client/SettingsPanel.java
index b0adc0c7..b0adc0c7 100644
--- a/src/com/gitblit/client/SettingsPanel.java
+++ b/src/main/java/com/gitblit/client/SettingsPanel.java
diff --git a/src/com/gitblit/client/SettingsTableModel.java b/src/main/java/com/gitblit/client/SettingsTableModel.java
index f14eae4b..f14eae4b 100644
--- a/src/com/gitblit/client/SettingsTableModel.java
+++ b/src/main/java/com/gitblit/client/SettingsTableModel.java
diff --git a/src/com/gitblit/client/StatusPanel.java b/src/main/java/com/gitblit/client/StatusPanel.java
index 6d004f16..6d004f16 100644
--- a/src/com/gitblit/client/StatusPanel.java
+++ b/src/main/java/com/gitblit/client/StatusPanel.java
diff --git a/src/com/gitblit/client/SubscribedRepositoryRenderer.java b/src/main/java/com/gitblit/client/SubscribedRepositoryRenderer.java
index 9943333f..9943333f 100644
--- a/src/com/gitblit/client/SubscribedRepositoryRenderer.java
+++ b/src/main/java/com/gitblit/client/SubscribedRepositoryRenderer.java
diff --git a/src/com/gitblit/client/SubscriptionsDialog.java b/src/main/java/com/gitblit/client/SubscriptionsDialog.java
index 5ae836a5..5ae836a5 100644
--- a/src/com/gitblit/client/SubscriptionsDialog.java
+++ b/src/main/java/com/gitblit/client/SubscriptionsDialog.java
diff --git a/src/com/gitblit/client/TeamsPanel.java b/src/main/java/com/gitblit/client/TeamsPanel.java
index 92182222..92182222 100644
--- a/src/com/gitblit/client/TeamsPanel.java
+++ b/src/main/java/com/gitblit/client/TeamsPanel.java
diff --git a/src/com/gitblit/client/TeamsTableModel.java b/src/main/java/com/gitblit/client/TeamsTableModel.java
index e6d8a945..e6d8a945 100644
--- a/src/com/gitblit/client/TeamsTableModel.java
+++ b/src/main/java/com/gitblit/client/TeamsTableModel.java
diff --git a/src/com/gitblit/client/Translation.java b/src/main/java/com/gitblit/client/Translation.java
index 16ef20d4..16ef20d4 100644
--- a/src/com/gitblit/client/Translation.java
+++ b/src/main/java/com/gitblit/client/Translation.java
diff --git a/src/com/gitblit/client/UsersPanel.java b/src/main/java/com/gitblit/client/UsersPanel.java
index c53a5791..c53a5791 100644
--- a/src/com/gitblit/client/UsersPanel.java
+++ b/src/main/java/com/gitblit/client/UsersPanel.java
diff --git a/src/com/gitblit/client/UsersTableModel.java b/src/main/java/com/gitblit/client/UsersTableModel.java
index 439d5afb..439d5afb 100644
--- a/src/com/gitblit/client/UsersTableModel.java
+++ b/src/main/java/com/gitblit/client/UsersTableModel.java
diff --git a/src/com/gitblit/client/Utils.java b/src/main/java/com/gitblit/client/Utils.java
index 1e6ab2bf..1e6ab2bf 100644
--- a/src/com/gitblit/client/Utils.java
+++ b/src/main/java/com/gitblit/client/Utils.java
diff --git a/src/com/gitblit/client/splash.png b/src/main/java/com/gitblit/client/splash.png
index d63932fb..d63932fb 100644
--- a/src/com/gitblit/client/splash.png
+++ b/src/main/java/com/gitblit/client/splash.png
Binary files differ
diff --git a/src/com/gitblit/fanout/FanoutClient.java b/src/main/java/com/gitblit/fanout/FanoutClient.java
index b9ace4be..b9ace4be 100644
--- a/src/com/gitblit/fanout/FanoutClient.java
+++ b/src/main/java/com/gitblit/fanout/FanoutClient.java
diff --git a/src/com/gitblit/fanout/FanoutConstants.java b/src/main/java/com/gitblit/fanout/FanoutConstants.java
index 6e6964c9..6e6964c9 100644
--- a/src/com/gitblit/fanout/FanoutConstants.java
+++ b/src/main/java/com/gitblit/fanout/FanoutConstants.java
diff --git a/src/com/gitblit/fanout/FanoutNioService.java b/src/main/java/com/gitblit/fanout/FanoutNioService.java
index 65d022ab..65d022ab 100644
--- a/src/com/gitblit/fanout/FanoutNioService.java
+++ b/src/main/java/com/gitblit/fanout/FanoutNioService.java
diff --git a/src/com/gitblit/fanout/FanoutService.java b/src/main/java/com/gitblit/fanout/FanoutService.java
index cbfd8a24..cbfd8a24 100644
--- a/src/com/gitblit/fanout/FanoutService.java
+++ b/src/main/java/com/gitblit/fanout/FanoutService.java
diff --git a/src/com/gitblit/fanout/FanoutServiceConnection.java b/src/main/java/com/gitblit/fanout/FanoutServiceConnection.java
index f7f2c959..f7f2c959 100644
--- a/src/com/gitblit/fanout/FanoutServiceConnection.java
+++ b/src/main/java/com/gitblit/fanout/FanoutServiceConnection.java
diff --git a/src/com/gitblit/fanout/FanoutSocketService.java b/src/main/java/com/gitblit/fanout/FanoutSocketService.java
index 07c18f90..07c18f90 100644
--- a/src/com/gitblit/fanout/FanoutSocketService.java
+++ b/src/main/java/com/gitblit/fanout/FanoutSocketService.java
diff --git a/src/com/gitblit/fanout/FanoutStats.java b/src/main/java/com/gitblit/fanout/FanoutStats.java
index b06884d3..b06884d3 100644
--- a/src/com/gitblit/fanout/FanoutStats.java
+++ b/src/main/java/com/gitblit/fanout/FanoutStats.java
diff --git a/src/com/gitblit/models/Activity.java b/src/main/java/com/gitblit/models/Activity.java
index 59405c7f..59405c7f 100644
--- a/src/com/gitblit/models/Activity.java
+++ b/src/main/java/com/gitblit/models/Activity.java
diff --git a/src/com/gitblit/models/AnnotatedLine.java b/src/main/java/com/gitblit/models/AnnotatedLine.java
index 69b55bcd..69b55bcd 100644
--- a/src/com/gitblit/models/AnnotatedLine.java
+++ b/src/main/java/com/gitblit/models/AnnotatedLine.java
diff --git a/src/com/gitblit/models/FederationModel.java b/src/main/java/com/gitblit/models/FederationModel.java
index 1d211ce9..1d211ce9 100644
--- a/src/com/gitblit/models/FederationModel.java
+++ b/src/main/java/com/gitblit/models/FederationModel.java
diff --git a/src/com/gitblit/models/FederationProposal.java b/src/main/java/com/gitblit/models/FederationProposal.java
index 5cf9182c..5cf9182c 100644
--- a/src/com/gitblit/models/FederationProposal.java
+++ b/src/main/java/com/gitblit/models/FederationProposal.java
diff --git a/src/com/gitblit/models/FederationSet.java b/src/main/java/com/gitblit/models/FederationSet.java
index 357689c9..357689c9 100644
--- a/src/com/gitblit/models/FederationSet.java
+++ b/src/main/java/com/gitblit/models/FederationSet.java
diff --git a/src/com/gitblit/models/FeedEntryModel.java b/src/main/java/com/gitblit/models/FeedEntryModel.java
index e1c00c38..e1c00c38 100644
--- a/src/com/gitblit/models/FeedEntryModel.java
+++ b/src/main/java/com/gitblit/models/FeedEntryModel.java
diff --git a/src/com/gitblit/models/FeedModel.java b/src/main/java/com/gitblit/models/FeedModel.java
index 08f9e48e..08f9e48e 100644
--- a/src/com/gitblit/models/FeedModel.java
+++ b/src/main/java/com/gitblit/models/FeedModel.java
diff --git a/src/com/gitblit/models/ForkModel.java b/src/main/java/com/gitblit/models/ForkModel.java
index 849986c1..849986c1 100644
--- a/src/com/gitblit/models/ForkModel.java
+++ b/src/main/java/com/gitblit/models/ForkModel.java
diff --git a/src/com/gitblit/models/GitNote.java b/src/main/java/com/gitblit/models/GitNote.java
index c333a881..c333a881 100644
--- a/src/com/gitblit/models/GitNote.java
+++ b/src/main/java/com/gitblit/models/GitNote.java
diff --git a/src/com/gitblit/models/GravatarProfile.java b/src/main/java/com/gitblit/models/GravatarProfile.java
index aa128ce0..aa128ce0 100644
--- a/src/com/gitblit/models/GravatarProfile.java
+++ b/src/main/java/com/gitblit/models/GravatarProfile.java
diff --git a/src/com/gitblit/models/IssueModel.java b/src/main/java/com/gitblit/models/IssueModel.java
index c9038913..c9038913 100644
--- a/src/com/gitblit/models/IssueModel.java
+++ b/src/main/java/com/gitblit/models/IssueModel.java
diff --git a/src/com/gitblit/models/Metric.java b/src/main/java/com/gitblit/models/Metric.java
index 2845c527..2845c527 100644
--- a/src/com/gitblit/models/Metric.java
+++ b/src/main/java/com/gitblit/models/Metric.java
diff --git a/src/com/gitblit/models/PathModel.java b/src/main/java/com/gitblit/models/PathModel.java
index 84571cbb..84571cbb 100644
--- a/src/com/gitblit/models/PathModel.java
+++ b/src/main/java/com/gitblit/models/PathModel.java
diff --git a/src/com/gitblit/models/ProjectModel.java b/src/main/java/com/gitblit/models/ProjectModel.java
index 9e5d5233..9e5d5233 100644
--- a/src/com/gitblit/models/ProjectModel.java
+++ b/src/main/java/com/gitblit/models/ProjectModel.java
diff --git a/src/com/gitblit/models/PushLogEntry.java b/src/main/java/com/gitblit/models/PushLogEntry.java
index f625c2a3..f625c2a3 100644
--- a/src/com/gitblit/models/PushLogEntry.java
+++ b/src/main/java/com/gitblit/models/PushLogEntry.java
diff --git a/src/com/gitblit/models/RefModel.java b/src/main/java/com/gitblit/models/RefModel.java
index 8489c817..8489c817 100644
--- a/src/com/gitblit/models/RefModel.java
+++ b/src/main/java/com/gitblit/models/RefModel.java
diff --git a/src/com/gitblit/models/RegistrantAccessPermission.java b/src/main/java/com/gitblit/models/RegistrantAccessPermission.java
index 8f4049a8..8f4049a8 100644
--- a/src/com/gitblit/models/RegistrantAccessPermission.java
+++ b/src/main/java/com/gitblit/models/RegistrantAccessPermission.java
diff --git a/src/com/gitblit/models/RepositoryCommit.java b/src/main/java/com/gitblit/models/RepositoryCommit.java
index e68e8613..e68e8613 100644
--- a/src/com/gitblit/models/RepositoryCommit.java
+++ b/src/main/java/com/gitblit/models/RepositoryCommit.java
diff --git a/src/com/gitblit/models/RepositoryModel.java b/src/main/java/com/gitblit/models/RepositoryModel.java
index a2dab3c5..a2dab3c5 100644
--- a/src/com/gitblit/models/RepositoryModel.java
+++ b/src/main/java/com/gitblit/models/RepositoryModel.java
diff --git a/src/com/gitblit/models/SearchResult.java b/src/main/java/com/gitblit/models/SearchResult.java
index efd1b075..efd1b075 100644
--- a/src/com/gitblit/models/SearchResult.java
+++ b/src/main/java/com/gitblit/models/SearchResult.java
diff --git a/src/com/gitblit/models/ServerSettings.java b/src/main/java/com/gitblit/models/ServerSettings.java
index 27199b41..27199b41 100644
--- a/src/com/gitblit/models/ServerSettings.java
+++ b/src/main/java/com/gitblit/models/ServerSettings.java
diff --git a/src/com/gitblit/models/ServerStatus.java b/src/main/java/com/gitblit/models/ServerStatus.java
index f1650c8d..3a1e0306 100644
--- a/src/com/gitblit/models/ServerStatus.java
+++ b/src/main/java/com/gitblit/models/ServerStatus.java
@@ -53,8 +53,8 @@ public class ServerStatus implements Serializable {
public ServerStatus(boolean isGO) {
this.bootDate = new Date();
- this.version = Constants.VERSION;
- this.releaseDate = Constants.VERSION_DATE;
+ this.version = Constants.getVersion();
+ this.releaseDate = Constants.getBuildDate();
this.isGO = isGO;
this.heapMaximum = Runtime.getRuntime().maxMemory();
diff --git a/src/com/gitblit/models/SettingModel.java b/src/main/java/com/gitblit/models/SettingModel.java
index a04126e1..a04126e1 100644
--- a/src/com/gitblit/models/SettingModel.java
+++ b/src/main/java/com/gitblit/models/SettingModel.java
diff --git a/src/com/gitblit/models/SubmoduleModel.java b/src/main/java/com/gitblit/models/SubmoduleModel.java
index 47f84b95..47f84b95 100644
--- a/src/com/gitblit/models/SubmoduleModel.java
+++ b/src/main/java/com/gitblit/models/SubmoduleModel.java
diff --git a/src/com/gitblit/models/TeamModel.java b/src/main/java/com/gitblit/models/TeamModel.java
index 9587ca7a..9587ca7a 100644
--- a/src/com/gitblit/models/TeamModel.java
+++ b/src/main/java/com/gitblit/models/TeamModel.java
diff --git a/src/com/gitblit/models/TicketModel.java b/src/main/java/com/gitblit/models/TicketModel.java
index b8043c6c..b8043c6c 100644
--- a/src/com/gitblit/models/TicketModel.java
+++ b/src/main/java/com/gitblit/models/TicketModel.java
diff --git a/src/com/gitblit/models/UserModel.java b/src/main/java/com/gitblit/models/UserModel.java
index bec011d9..bec011d9 100644
--- a/src/com/gitblit/models/UserModel.java
+++ b/src/main/java/com/gitblit/models/UserModel.java
diff --git a/src/com/gitblit/utils/ActivityUtils.java b/src/main/java/com/gitblit/utils/ActivityUtils.java
index 732fdeb1..732fdeb1 100644
--- a/src/com/gitblit/utils/ActivityUtils.java
+++ b/src/main/java/com/gitblit/utils/ActivityUtils.java
diff --git a/src/com/gitblit/utils/ArrayUtils.java b/src/main/java/com/gitblit/utils/ArrayUtils.java
index 65834673..65834673 100644
--- a/src/com/gitblit/utils/ArrayUtils.java
+++ b/src/main/java/com/gitblit/utils/ArrayUtils.java
diff --git a/src/com/gitblit/utils/Base64.java b/src/main/java/com/gitblit/utils/Base64.java
index 6fd2daf1..6fd2daf1 100644
--- a/src/com/gitblit/utils/Base64.java
+++ b/src/main/java/com/gitblit/utils/Base64.java
diff --git a/src/com/gitblit/utils/ByteFormat.java b/src/main/java/com/gitblit/utils/ByteFormat.java
index cb7da885..cb7da885 100644
--- a/src/com/gitblit/utils/ByteFormat.java
+++ b/src/main/java/com/gitblit/utils/ByteFormat.java
diff --git a/src/com/gitblit/utils/ClientLogger.java b/src/main/java/com/gitblit/utils/ClientLogger.java
index 7d18f3d6..7d18f3d6 100644
--- a/src/com/gitblit/utils/ClientLogger.java
+++ b/src/main/java/com/gitblit/utils/ClientLogger.java
diff --git a/src/com/gitblit/utils/CompressionUtils.java b/src/main/java/com/gitblit/utils/CompressionUtils.java
index a8dcdd8f..a8dcdd8f 100644
--- a/src/com/gitblit/utils/CompressionUtils.java
+++ b/src/main/java/com/gitblit/utils/CompressionUtils.java
diff --git a/src/com/gitblit/utils/ConnectionUtils.java b/src/main/java/com/gitblit/utils/ConnectionUtils.java
index f0b41118..f0b41118 100644
--- a/src/com/gitblit/utils/ConnectionUtils.java
+++ b/src/main/java/com/gitblit/utils/ConnectionUtils.java
diff --git a/src/com/gitblit/utils/ContainerUtils.java b/src/main/java/com/gitblit/utils/ContainerUtils.java
index 919f99d6..919f99d6 100755..100644
--- a/src/com/gitblit/utils/ContainerUtils.java
+++ b/src/main/java/com/gitblit/utils/ContainerUtils.java
diff --git a/src/com/gitblit/utils/DeepCopier.java b/src/main/java/com/gitblit/utils/DeepCopier.java
index 5df30623..5df30623 100644
--- a/src/com/gitblit/utils/DeepCopier.java
+++ b/src/main/java/com/gitblit/utils/DeepCopier.java
diff --git a/src/com/gitblit/utils/DiffUtils.java b/src/main/java/com/gitblit/utils/DiffUtils.java
index 04b5b0b1..04b5b0b1 100644
--- a/src/com/gitblit/utils/DiffUtils.java
+++ b/src/main/java/com/gitblit/utils/DiffUtils.java
diff --git a/src/com/gitblit/utils/FederationUtils.java b/src/main/java/com/gitblit/utils/FederationUtils.java
index 4d6060dd..4d6060dd 100644
--- a/src/com/gitblit/utils/FederationUtils.java
+++ b/src/main/java/com/gitblit/utils/FederationUtils.java
diff --git a/src/com/gitblit/utils/FileUtils.java b/src/main/java/com/gitblit/utils/FileUtils.java
index a21b5128..a21b5128 100644
--- a/src/com/gitblit/utils/FileUtils.java
+++ b/src/main/java/com/gitblit/utils/FileUtils.java
diff --git a/src/com/gitblit/utils/GitBlitDiffFormatter.java b/src/main/java/com/gitblit/utils/GitBlitDiffFormatter.java
index 2966aa8a..2966aa8a 100644
--- a/src/com/gitblit/utils/GitBlitDiffFormatter.java
+++ b/src/main/java/com/gitblit/utils/GitBlitDiffFormatter.java
diff --git a/src/com/gitblit/utils/GitWebDiffFormatter.java b/src/main/java/com/gitblit/utils/GitWebDiffFormatter.java
index e657dc58..e657dc58 100644
--- a/src/com/gitblit/utils/GitWebDiffFormatter.java
+++ b/src/main/java/com/gitblit/utils/GitWebDiffFormatter.java
diff --git a/src/com/gitblit/utils/HttpUtils.java b/src/main/java/com/gitblit/utils/HttpUtils.java
index 86f53cfe..86f53cfe 100644
--- a/src/com/gitblit/utils/HttpUtils.java
+++ b/src/main/java/com/gitblit/utils/HttpUtils.java
diff --git a/src/com/gitblit/utils/IssueUtils.java b/src/main/java/com/gitblit/utils/IssueUtils.java
index dd09235b..dd09235b 100644
--- a/src/com/gitblit/utils/IssueUtils.java
+++ b/src/main/java/com/gitblit/utils/IssueUtils.java
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/main/java/com/gitblit/utils/JGitUtils.java
index 1f2ae943..1f2ae943 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/main/java/com/gitblit/utils/JGitUtils.java
diff --git a/src/com/gitblit/utils/JsonUtils.java b/src/main/java/com/gitblit/utils/JsonUtils.java
index 24f4ecb8..24f4ecb8 100644
--- a/src/com/gitblit/utils/JsonUtils.java
+++ b/src/main/java/com/gitblit/utils/JsonUtils.java
diff --git a/src/com/gitblit/utils/MarkdownUtils.java b/src/main/java/com/gitblit/utils/MarkdownUtils.java
index 0b8c9c57..0b8c9c57 100644
--- a/src/com/gitblit/utils/MarkdownUtils.java
+++ b/src/main/java/com/gitblit/utils/MarkdownUtils.java
diff --git a/src/com/gitblit/utils/MetricUtils.java b/src/main/java/com/gitblit/utils/MetricUtils.java
index 26e4581c..26e4581c 100644
--- a/src/com/gitblit/utils/MetricUtils.java
+++ b/src/main/java/com/gitblit/utils/MetricUtils.java
diff --git a/src/com/gitblit/utils/ObjectCache.java b/src/main/java/com/gitblit/utils/ObjectCache.java
index 38f2e59a..38f2e59a 100644
--- a/src/com/gitblit/utils/ObjectCache.java
+++ b/src/main/java/com/gitblit/utils/ObjectCache.java
diff --git a/src/com/gitblit/utils/PatchFormatter.java b/src/main/java/com/gitblit/utils/PatchFormatter.java
index 90b3fb16..90b3fb16 100644
--- a/src/com/gitblit/utils/PatchFormatter.java
+++ b/src/main/java/com/gitblit/utils/PatchFormatter.java
diff --git a/src/com/gitblit/utils/PushLogUtils.java b/src/main/java/com/gitblit/utils/PushLogUtils.java
index 665533b3..665533b3 100644
--- a/src/com/gitblit/utils/PushLogUtils.java
+++ b/src/main/java/com/gitblit/utils/PushLogUtils.java
diff --git a/src/com/gitblit/utils/RpcUtils.java b/src/main/java/com/gitblit/utils/RpcUtils.java
index ed23dab6..ed23dab6 100644
--- a/src/com/gitblit/utils/RpcUtils.java
+++ b/src/main/java/com/gitblit/utils/RpcUtils.java
diff --git a/src/com/gitblit/utils/StringUtils.java b/src/main/java/com/gitblit/utils/StringUtils.java
index 86823db5..86823db5 100644
--- a/src/com/gitblit/utils/StringUtils.java
+++ b/src/main/java/com/gitblit/utils/StringUtils.java
diff --git a/src/com/gitblit/utils/SyndicationUtils.java b/src/main/java/com/gitblit/utils/SyndicationUtils.java
index d01d4691..d01d4691 100644
--- a/src/com/gitblit/utils/SyndicationUtils.java
+++ b/src/main/java/com/gitblit/utils/SyndicationUtils.java
diff --git a/src/com/gitblit/utils/TicgitUtils.java b/src/main/java/com/gitblit/utils/TicgitUtils.java
index aab5a3e1..aab5a3e1 100644
--- a/src/com/gitblit/utils/TicgitUtils.java
+++ b/src/main/java/com/gitblit/utils/TicgitUtils.java
diff --git a/src/com/gitblit/utils/TimeUtils.java b/src/main/java/com/gitblit/utils/TimeUtils.java
index ec8871c6..ec8871c6 100644
--- a/src/com/gitblit/utils/TimeUtils.java
+++ b/src/main/java/com/gitblit/utils/TimeUtils.java
diff --git a/src/com/gitblit/utils/X509Utils.java b/src/main/java/com/gitblit/utils/X509Utils.java
index 237c8dad..237c8dad 100644
--- a/src/com/gitblit/utils/X509Utils.java
+++ b/src/main/java/com/gitblit/utils/X509Utils.java
diff --git a/src/com/gitblit/wicket/AuthorizationStrategy.java b/src/main/java/com/gitblit/wicket/AuthorizationStrategy.java
index 765d8608..765d8608 100644
--- a/src/com/gitblit/wicket/AuthorizationStrategy.java
+++ b/src/main/java/com/gitblit/wicket/AuthorizationStrategy.java
diff --git a/src/com/gitblit/wicket/ExternalImage.java b/src/main/java/com/gitblit/wicket/ExternalImage.java
index 33257740..33257740 100644
--- a/src/com/gitblit/wicket/ExternalImage.java
+++ b/src/main/java/com/gitblit/wicket/ExternalImage.java
diff --git a/src/com/gitblit/wicket/GitBlitWebApp.java b/src/main/java/com/gitblit/wicket/GitBlitWebApp.java
index 2300d0ff..2300d0ff 100644
--- a/src/com/gitblit/wicket/GitBlitWebApp.java
+++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp.java
diff --git a/src/com/gitblit/wicket/GitBlitWebApp.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties
index 7a2b1bb3..7a2b1bb3 100644
--- a/src/com/gitblit/wicket/GitBlitWebApp.properties
+++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties
diff --git a/src/com/gitblit/wicket/GitBlitWebApp_es.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp_es.properties
index 210a75f9..210a75f9 100644
--- a/src/com/gitblit/wicket/GitBlitWebApp_es.properties
+++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp_es.properties
diff --git a/src/com/gitblit/wicket/GitBlitWebApp_ja.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp_ja.properties
index d0234f87..d0234f87 100755..100644
--- a/src/com/gitblit/wicket/GitBlitWebApp_ja.properties
+++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp_ja.properties
diff --git a/src/com/gitblit/wicket/GitBlitWebApp_ko.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp_ko.properties
index 42915df8..42915df8 100644
--- a/src/com/gitblit/wicket/GitBlitWebApp_ko.properties
+++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp_ko.properties
diff --git a/src/com/gitblit/wicket/GitBlitWebApp_nl.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp_nl.properties
index f1281e14..f1281e14 100644
--- a/src/com/gitblit/wicket/GitBlitWebApp_nl.properties
+++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp_nl.properties
diff --git a/src/com/gitblit/wicket/GitBlitWebApp_pl.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp_pl.properties
index b75e8f81..b75e8f81 100644
--- a/src/com/gitblit/wicket/GitBlitWebApp_pl.properties
+++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp_pl.properties
diff --git a/src/com/gitblit/wicket/GitBlitWebApp_pt_BR.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp_pt_BR.properties
index a02d2ffa..a02d2ffa 100644
--- a/src/com/gitblit/wicket/GitBlitWebApp_pt_BR.properties
+++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp_pt_BR.properties
diff --git a/src/com/gitblit/wicket/GitBlitWebApp_zh_CN.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp_zh_CN.properties
index 96e2067b..96e2067b 100644
--- a/src/com/gitblit/wicket/GitBlitWebApp_zh_CN.properties
+++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp_zh_CN.properties
diff --git a/src/com/gitblit/wicket/GitBlitWebSession.java b/src/main/java/com/gitblit/wicket/GitBlitWebSession.java
index 5195a1fd..5195a1fd 100644
--- a/src/com/gitblit/wicket/GitBlitWebSession.java
+++ b/src/main/java/com/gitblit/wicket/GitBlitWebSession.java
diff --git a/src/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java b/src/main/java/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java
index fb86fb0e..fb86fb0e 100644
--- a/src/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java
+++ b/src/main/java/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java
diff --git a/src/com/gitblit/wicket/GitblitRedirectException.java b/src/main/java/com/gitblit/wicket/GitblitRedirectException.java
index c3df1ac1..c3df1ac1 100644
--- a/src/com/gitblit/wicket/GitblitRedirectException.java
+++ b/src/main/java/com/gitblit/wicket/GitblitRedirectException.java
diff --git a/src/com/gitblit/wicket/PageRegistration.java b/src/main/java/com/gitblit/wicket/PageRegistration.java
index e8eeabae..e8eeabae 100644
--- a/src/com/gitblit/wicket/PageRegistration.java
+++ b/src/main/java/com/gitblit/wicket/PageRegistration.java
diff --git a/src/com/gitblit/wicket/RequiresAdminRole.java b/src/main/java/com/gitblit/wicket/RequiresAdminRole.java
index ce2dcfcf..ce2dcfcf 100644
--- a/src/com/gitblit/wicket/RequiresAdminRole.java
+++ b/src/main/java/com/gitblit/wicket/RequiresAdminRole.java
diff --git a/src/com/gitblit/wicket/SessionlessForm.java b/src/main/java/com/gitblit/wicket/SessionlessForm.java
index 484e85e3..484e85e3 100644
--- a/src/com/gitblit/wicket/SessionlessForm.java
+++ b/src/main/java/com/gitblit/wicket/SessionlessForm.java
diff --git a/src/com/gitblit/wicket/StringChoiceRenderer.java b/src/main/java/com/gitblit/wicket/StringChoiceRenderer.java
index 58ed4798..58ed4798 100644
--- a/src/com/gitblit/wicket/StringChoiceRenderer.java
+++ b/src/main/java/com/gitblit/wicket/StringChoiceRenderer.java
diff --git a/src/com/gitblit/wicket/WicketUtils.java b/src/main/java/com/gitblit/wicket/WicketUtils.java
index e4eb29fb..e4eb29fb 100644
--- a/src/com/gitblit/wicket/WicketUtils.java
+++ b/src/main/java/com/gitblit/wicket/WicketUtils.java
diff --git a/src/com/gitblit/wicket/charting/GoogleChart.java b/src/main/java/com/gitblit/wicket/charting/GoogleChart.java
index b6309ffe..b6309ffe 100644
--- a/src/com/gitblit/wicket/charting/GoogleChart.java
+++ b/src/main/java/com/gitblit/wicket/charting/GoogleChart.java
diff --git a/src/com/gitblit/wicket/charting/GoogleCharts.java b/src/main/java/com/gitblit/wicket/charting/GoogleCharts.java
index 77c522b5..77c522b5 100644
--- a/src/com/gitblit/wicket/charting/GoogleCharts.java
+++ b/src/main/java/com/gitblit/wicket/charting/GoogleCharts.java
diff --git a/src/com/gitblit/wicket/charting/GoogleLineChart.java b/src/main/java/com/gitblit/wicket/charting/GoogleLineChart.java
index fc0bf837..fc0bf837 100644
--- a/src/com/gitblit/wicket/charting/GoogleLineChart.java
+++ b/src/main/java/com/gitblit/wicket/charting/GoogleLineChart.java
diff --git a/src/com/gitblit/wicket/charting/GooglePieChart.java b/src/main/java/com/gitblit/wicket/charting/GooglePieChart.java
index 119a8248..119a8248 100644
--- a/src/com/gitblit/wicket/charting/GooglePieChart.java
+++ b/src/main/java/com/gitblit/wicket/charting/GooglePieChart.java
diff --git a/src/com/gitblit/wicket/pages/ActivityPage.html b/src/main/java/com/gitblit/wicket/pages/ActivityPage.html
index 4b10c2cf..4b10c2cf 100644
--- a/src/com/gitblit/wicket/pages/ActivityPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/ActivityPage.html
diff --git a/src/com/gitblit/wicket/pages/ActivityPage.java b/src/main/java/com/gitblit/wicket/pages/ActivityPage.java
index bceac8f4..bceac8f4 100644
--- a/src/com/gitblit/wicket/pages/ActivityPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ActivityPage.java
diff --git a/src/com/gitblit/wicket/pages/BasePage.html b/src/main/java/com/gitblit/wicket/pages/BasePage.html
index 4a642e73..4a642e73 100644
--- a/src/com/gitblit/wicket/pages/BasePage.html
+++ b/src/main/java/com/gitblit/wicket/pages/BasePage.html
diff --git a/src/com/gitblit/wicket/pages/BasePage.java b/src/main/java/com/gitblit/wicket/pages/BasePage.java
index c733c992..5c73df33 100644
--- a/src/com/gitblit/wicket/pages/BasePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/BasePage.java
@@ -184,7 +184,7 @@ public abstract class BasePage extends WebPage {
add(new Label("userPanel", ""));
}
- add(new Label("gbVersion", "v" + Constants.VERSION));
+ add(new Label("gbVersion", "v" + Constants.getVersion()));
if (GitBlit.getBoolean(Keys.web.aggressiveHeapManagement, false)) {
System.gc();
}
diff --git a/src/com/gitblit/wicket/pages/BlamePage.html b/src/main/java/com/gitblit/wicket/pages/BlamePage.html
index 9391eaf0..9391eaf0 100644
--- a/src/com/gitblit/wicket/pages/BlamePage.html
+++ b/src/main/java/com/gitblit/wicket/pages/BlamePage.html
diff --git a/src/com/gitblit/wicket/pages/BlamePage.java b/src/main/java/com/gitblit/wicket/pages/BlamePage.java
index d76181d2..d76181d2 100644
--- a/src/com/gitblit/wicket/pages/BlamePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/BlamePage.java
diff --git a/src/com/gitblit/wicket/pages/BlobDiffPage.html b/src/main/java/com/gitblit/wicket/pages/BlobDiffPage.html
index c6336429..c6336429 100644
--- a/src/com/gitblit/wicket/pages/BlobDiffPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/BlobDiffPage.html
diff --git a/src/com/gitblit/wicket/pages/BlobDiffPage.java b/src/main/java/com/gitblit/wicket/pages/BlobDiffPage.java
index d86d2e63..d86d2e63 100644
--- a/src/com/gitblit/wicket/pages/BlobDiffPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/BlobDiffPage.java
diff --git a/src/com/gitblit/wicket/pages/BlobPage.html b/src/main/java/com/gitblit/wicket/pages/BlobPage.html
index 80f061fd..80f061fd 100644
--- a/src/com/gitblit/wicket/pages/BlobPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/BlobPage.html
diff --git a/src/com/gitblit/wicket/pages/BlobPage.java b/src/main/java/com/gitblit/wicket/pages/BlobPage.java
index e2b8546b..e2b8546b 100644
--- a/src/com/gitblit/wicket/pages/BlobPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/BlobPage.java
diff --git a/src/com/gitblit/wicket/pages/BranchesPage.html b/src/main/java/com/gitblit/wicket/pages/BranchesPage.html
index 65fd9b9d..65fd9b9d 100644
--- a/src/com/gitblit/wicket/pages/BranchesPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/BranchesPage.html
diff --git a/src/com/gitblit/wicket/pages/BranchesPage.java b/src/main/java/com/gitblit/wicket/pages/BranchesPage.java
index 8684fb3d..8684fb3d 100644
--- a/src/com/gitblit/wicket/pages/BranchesPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/BranchesPage.java
diff --git a/src/com/gitblit/wicket/pages/ChangePasswordPage.html b/src/main/java/com/gitblit/wicket/pages/ChangePasswordPage.html
index 36439a91..36439a91 100644
--- a/src/com/gitblit/wicket/pages/ChangePasswordPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/ChangePasswordPage.html
diff --git a/src/com/gitblit/wicket/pages/ChangePasswordPage.java b/src/main/java/com/gitblit/wicket/pages/ChangePasswordPage.java
index c4014208..c4014208 100644
--- a/src/com/gitblit/wicket/pages/ChangePasswordPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ChangePasswordPage.java
diff --git a/src/com/gitblit/wicket/pages/CommitDiffPage.html b/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.html
index de39f4ca..de39f4ca 100644
--- a/src/com/gitblit/wicket/pages/CommitDiffPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.html
diff --git a/src/com/gitblit/wicket/pages/CommitDiffPage.java b/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java
index 3ad70742..3ad70742 100644
--- a/src/com/gitblit/wicket/pages/CommitDiffPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java
diff --git a/src/com/gitblit/wicket/pages/CommitPage.html b/src/main/java/com/gitblit/wicket/pages/CommitPage.html
index 79a038c9..79a038c9 100644
--- a/src/com/gitblit/wicket/pages/CommitPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/CommitPage.html
diff --git a/src/com/gitblit/wicket/pages/CommitPage.java b/src/main/java/com/gitblit/wicket/pages/CommitPage.java
index c5a24c8d..c5a24c8d 100644
--- a/src/com/gitblit/wicket/pages/CommitPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/CommitPage.java
diff --git a/src/com/gitblit/wicket/pages/DocsPage.html b/src/main/java/com/gitblit/wicket/pages/DocsPage.html
index ad93000c..ad93000c 100644
--- a/src/com/gitblit/wicket/pages/DocsPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/DocsPage.html
diff --git a/src/com/gitblit/wicket/pages/DocsPage.java b/src/main/java/com/gitblit/wicket/pages/DocsPage.java
index 9ddc98d3..9ddc98d3 100644
--- a/src/com/gitblit/wicket/pages/DocsPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/DocsPage.java
diff --git a/src/com/gitblit/wicket/pages/EditRepositoryPage.html b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.html
index 7fc0de23..7fc0de23 100644
--- a/src/com/gitblit/wicket/pages/EditRepositoryPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.html
diff --git a/src/com/gitblit/wicket/pages/EditRepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java
index d68d6550..d68d6550 100644
--- a/src/com/gitblit/wicket/pages/EditRepositoryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java
diff --git a/src/com/gitblit/wicket/pages/EditTeamPage.html b/src/main/java/com/gitblit/wicket/pages/EditTeamPage.html
index a60d1715..a60d1715 100644
--- a/src/com/gitblit/wicket/pages/EditTeamPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/EditTeamPage.html
diff --git a/src/com/gitblit/wicket/pages/EditTeamPage.java b/src/main/java/com/gitblit/wicket/pages/EditTeamPage.java
index 8344d387..8344d387 100644
--- a/src/com/gitblit/wicket/pages/EditTeamPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/EditTeamPage.java
diff --git a/src/com/gitblit/wicket/pages/EditUserPage.html b/src/main/java/com/gitblit/wicket/pages/EditUserPage.html
index e79011c8..e79011c8 100644
--- a/src/com/gitblit/wicket/pages/EditUserPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/EditUserPage.html
diff --git a/src/com/gitblit/wicket/pages/EditUserPage.java b/src/main/java/com/gitblit/wicket/pages/EditUserPage.java
index c060f237..c060f237 100644
--- a/src/com/gitblit/wicket/pages/EditUserPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/EditUserPage.java
diff --git a/src/com/gitblit/wicket/pages/EmptyRepositoryPage.html b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage.html
index d46a5ded..d46a5ded 100644
--- a/src/com/gitblit/wicket/pages/EmptyRepositoryPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage.html
diff --git a/src/com/gitblit/wicket/pages/EmptyRepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage.java
index be0dad9e..be0dad9e 100644
--- a/src/com/gitblit/wicket/pages/EmptyRepositoryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage.java
diff --git a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_es.html b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_es.html
index 2849fc70..2849fc70 100644
--- a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_es.html
+++ b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_es.html
diff --git a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_ko.html b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_ko.html
index 591335e4..591335e4 100644
--- a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_ko.html
+++ b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_ko.html
diff --git a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_nl.html b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_nl.html
index a8ee2e25..a8ee2e25 100644
--- a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_nl.html
+++ b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_nl.html
diff --git a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_pl.html b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_pl.html
index 109899aa..109899aa 100644
--- a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_pl.html
+++ b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_pl.html
diff --git a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_pt_BR.html b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_pt_BR.html
index 351ef879..351ef879 100644
--- a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_pt_BR.html
+++ b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_pt_BR.html
diff --git a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_zh_CN.html b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_zh_CN.html
index 4b21800e..4b21800e 100644
--- a/src/com/gitblit/wicket/pages/EmptyRepositoryPage_zh_CN.html
+++ b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage_zh_CN.html
diff --git a/src/com/gitblit/wicket/pages/FederationPage.html b/src/main/java/com/gitblit/wicket/pages/FederationPage.html
index bb39d345..bb39d345 100644
--- a/src/com/gitblit/wicket/pages/FederationPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/FederationPage.html
diff --git a/src/com/gitblit/wicket/pages/FederationPage.java b/src/main/java/com/gitblit/wicket/pages/FederationPage.java
index 1f98c172..1f98c172 100644
--- a/src/com/gitblit/wicket/pages/FederationPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/FederationPage.java
diff --git a/src/com/gitblit/wicket/pages/FederationRegistrationPage.html b/src/main/java/com/gitblit/wicket/pages/FederationRegistrationPage.html
index d7b9bdde..d7b9bdde 100644
--- a/src/com/gitblit/wicket/pages/FederationRegistrationPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/FederationRegistrationPage.html
diff --git a/src/com/gitblit/wicket/pages/FederationRegistrationPage.java b/src/main/java/com/gitblit/wicket/pages/FederationRegistrationPage.java
index 19c30a5e..19c30a5e 100644
--- a/src/com/gitblit/wicket/pages/FederationRegistrationPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/FederationRegistrationPage.java
diff --git a/src/com/gitblit/wicket/pages/ForkPage.html b/src/main/java/com/gitblit/wicket/pages/ForkPage.html
index 72093696..72093696 100644
--- a/src/com/gitblit/wicket/pages/ForkPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/ForkPage.html
diff --git a/src/com/gitblit/wicket/pages/ForkPage.java b/src/main/java/com/gitblit/wicket/pages/ForkPage.java
index 340bd823..340bd823 100644
--- a/src/com/gitblit/wicket/pages/ForkPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ForkPage.java
diff --git a/src/com/gitblit/wicket/pages/ForksPage.html b/src/main/java/com/gitblit/wicket/pages/ForksPage.html
index c18d2a49..c18d2a49 100644
--- a/src/com/gitblit/wicket/pages/ForksPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/ForksPage.html
diff --git a/src/com/gitblit/wicket/pages/ForksPage.java b/src/main/java/com/gitblit/wicket/pages/ForksPage.java
index cc483878..cc483878 100644
--- a/src/com/gitblit/wicket/pages/ForksPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ForksPage.java
diff --git a/src/com/gitblit/wicket/pages/GitSearchPage.html b/src/main/java/com/gitblit/wicket/pages/GitSearchPage.html
index 9bb1f418..9bb1f418 100644
--- a/src/com/gitblit/wicket/pages/GitSearchPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/GitSearchPage.html
diff --git a/src/com/gitblit/wicket/pages/GitSearchPage.java b/src/main/java/com/gitblit/wicket/pages/GitSearchPage.java
index 6b0714f0..6b0714f0 100644
--- a/src/com/gitblit/wicket/pages/GitSearchPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/GitSearchPage.java
diff --git a/src/com/gitblit/wicket/pages/GravatarProfilePage.html b/src/main/java/com/gitblit/wicket/pages/GravatarProfilePage.html
index 0cc0f1fc..0cc0f1fc 100644
--- a/src/com/gitblit/wicket/pages/GravatarProfilePage.html
+++ b/src/main/java/com/gitblit/wicket/pages/GravatarProfilePage.html
diff --git a/src/com/gitblit/wicket/pages/GravatarProfilePage.java b/src/main/java/com/gitblit/wicket/pages/GravatarProfilePage.java
index ee567d75..ee567d75 100644
--- a/src/com/gitblit/wicket/pages/GravatarProfilePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/GravatarProfilePage.java
diff --git a/src/com/gitblit/wicket/pages/HistoryPage.html b/src/main/java/com/gitblit/wicket/pages/HistoryPage.html
index f9bd2f69..f9bd2f69 100644
--- a/src/com/gitblit/wicket/pages/HistoryPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/HistoryPage.html
diff --git a/src/com/gitblit/wicket/pages/HistoryPage.java b/src/main/java/com/gitblit/wicket/pages/HistoryPage.java
index 563202e6..563202e6 100644
--- a/src/com/gitblit/wicket/pages/HistoryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/HistoryPage.java
diff --git a/src/com/gitblit/wicket/pages/LogPage.html b/src/main/java/com/gitblit/wicket/pages/LogPage.html
index 8e5cb96a..8e5cb96a 100644
--- a/src/com/gitblit/wicket/pages/LogPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/LogPage.html
diff --git a/src/com/gitblit/wicket/pages/LogPage.java b/src/main/java/com/gitblit/wicket/pages/LogPage.java
index ee8ddfef..ee8ddfef 100644
--- a/src/com/gitblit/wicket/pages/LogPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/LogPage.java
diff --git a/src/main/java/com/gitblit/wicket/pages/LogoutPage.html b/src/main/java/com/gitblit/wicket/pages/LogoutPage.html
new file mode 100644
index 00000000..d4077830
--- /dev/null
+++ b/src/main/java/com/gitblit/wicket/pages/LogoutPage.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"
+ xml:lang="en"
+ lang="en">
+<body>
+<wicket:extend>
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+ <a class="brand" wicket:id="rootLink">
+ <img src="gitblt_25_white.png" width="79" height="25" alt="gitblit" class="logo"/>
+ </a>
+
+ </div>
+ </div>
+ </div>
+
+ <!-- subclass content -->
+ <div class="container">
+ <div style="text-align:center" wicket:id="feedback">[Feedback Panel]</div>
+
+ <h1><wicket:message key="gb.sessionEnded">[Session has ended]</wicket:message></h1>
+ <p><wicket:message key="gb.closeBrowser">[Please close the browser]</wicket:message></p>
+ </div>
+</wicket:extend>
+</body>
+</html> \ No newline at end of file
diff --git a/src/com/gitblit/wicket/pages/LogoutPage.java b/src/main/java/com/gitblit/wicket/pages/LogoutPage.java
index 982de0ec..982de0ec 100644
--- a/src/com/gitblit/wicket/pages/LogoutPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/LogoutPage.java
diff --git a/src/com/gitblit/wicket/pages/LuceneSearchPage.html b/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.html
index aba43de8..aba43de8 100644
--- a/src/com/gitblit/wicket/pages/LuceneSearchPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.html
diff --git a/src/com/gitblit/wicket/pages/LuceneSearchPage.java b/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java
index 79795ff2..79795ff2 100644
--- a/src/com/gitblit/wicket/pages/LuceneSearchPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java
diff --git a/src/com/gitblit/wicket/pages/MarkdownPage.html b/src/main/java/com/gitblit/wicket/pages/MarkdownPage.html
index 7900625b..7900625b 100644
--- a/src/com/gitblit/wicket/pages/MarkdownPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/MarkdownPage.html
diff --git a/src/com/gitblit/wicket/pages/MarkdownPage.java b/src/main/java/com/gitblit/wicket/pages/MarkdownPage.java
index e032cbf9..e032cbf9 100644
--- a/src/com/gitblit/wicket/pages/MarkdownPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/MarkdownPage.java
diff --git a/src/com/gitblit/wicket/pages/MetricsPage.html b/src/main/java/com/gitblit/wicket/pages/MetricsPage.html
index 4aefc798..4aefc798 100644
--- a/src/com/gitblit/wicket/pages/MetricsPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/MetricsPage.html
diff --git a/src/com/gitblit/wicket/pages/MetricsPage.java b/src/main/java/com/gitblit/wicket/pages/MetricsPage.java
index 5904a64a..5904a64a 100644
--- a/src/com/gitblit/wicket/pages/MetricsPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/MetricsPage.java
diff --git a/src/com/gitblit/wicket/pages/PatchPage.html b/src/main/java/com/gitblit/wicket/pages/PatchPage.html
index 719a46d1..719a46d1 100644
--- a/src/com/gitblit/wicket/pages/PatchPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/PatchPage.html
diff --git a/src/com/gitblit/wicket/pages/PatchPage.java b/src/main/java/com/gitblit/wicket/pages/PatchPage.java
index 878cfb45..878cfb45 100644
--- a/src/com/gitblit/wicket/pages/PatchPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/PatchPage.java
diff --git a/src/com/gitblit/wicket/pages/ProjectPage.html b/src/main/java/com/gitblit/wicket/pages/ProjectPage.html
index 3e73ba52..3e73ba52 100644
--- a/src/com/gitblit/wicket/pages/ProjectPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/ProjectPage.html
diff --git a/src/com/gitblit/wicket/pages/ProjectPage.java b/src/main/java/com/gitblit/wicket/pages/ProjectPage.java
index 7eba0331..7eba0331 100644
--- a/src/com/gitblit/wicket/pages/ProjectPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ProjectPage.java
diff --git a/src/com/gitblit/wicket/pages/ProjectsPage.html b/src/main/java/com/gitblit/wicket/pages/ProjectsPage.html
index 528ed48f..528ed48f 100644
--- a/src/com/gitblit/wicket/pages/ProjectsPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/ProjectsPage.html
diff --git a/src/com/gitblit/wicket/pages/ProjectsPage.java b/src/main/java/com/gitblit/wicket/pages/ProjectsPage.java
index 7f0b002e..7f0b002e 100644
--- a/src/com/gitblit/wicket/pages/ProjectsPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ProjectsPage.java
diff --git a/src/com/gitblit/wicket/pages/RawPage.java b/src/main/java/com/gitblit/wicket/pages/RawPage.java
index 28e8bae2..28e8bae2 100644
--- a/src/com/gitblit/wicket/pages/RawPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/RawPage.java
diff --git a/src/com/gitblit/wicket/pages/RepositoriesPage.html b/src/main/java/com/gitblit/wicket/pages/RepositoriesPage.html
index d2d27157..d2d27157 100644
--- a/src/com/gitblit/wicket/pages/RepositoriesPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/RepositoriesPage.html
diff --git a/src/com/gitblit/wicket/pages/RepositoriesPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoriesPage.java
index 4bce77f5..4bce77f5 100644
--- a/src/com/gitblit/wicket/pages/RepositoriesPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/RepositoriesPage.java
diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.html b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.html
index d49f0188..d49f0188 100644
--- a/src/com/gitblit/wicket/pages/RepositoryPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.html
diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
index a477b741..a477b741 100644
--- a/src/com/gitblit/wicket/pages/RepositoryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
diff --git a/src/com/gitblit/wicket/pages/ReviewProposalPage.html b/src/main/java/com/gitblit/wicket/pages/ReviewProposalPage.html
index 6487a0ac..6487a0ac 100644
--- a/src/com/gitblit/wicket/pages/ReviewProposalPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/ReviewProposalPage.html
diff --git a/src/com/gitblit/wicket/pages/ReviewProposalPage.java b/src/main/java/com/gitblit/wicket/pages/ReviewProposalPage.java
index e1813861..e1813861 100644
--- a/src/com/gitblit/wicket/pages/ReviewProposalPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ReviewProposalPage.java
diff --git a/src/com/gitblit/wicket/pages/RootPage.html b/src/main/java/com/gitblit/wicket/pages/RootPage.html
index b35b1b3a..b35b1b3a 100644
--- a/src/com/gitblit/wicket/pages/RootPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/RootPage.html
diff --git a/src/com/gitblit/wicket/pages/RootPage.java b/src/main/java/com/gitblit/wicket/pages/RootPage.java
index adcd7b16..adcd7b16 100644
--- a/src/com/gitblit/wicket/pages/RootPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/RootPage.java
diff --git a/src/com/gitblit/wicket/pages/RootSubPage.html b/src/main/java/com/gitblit/wicket/pages/RootSubPage.html
index 2b109f9b..2b109f9b 100644
--- a/src/com/gitblit/wicket/pages/RootSubPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/RootSubPage.html
diff --git a/src/com/gitblit/wicket/pages/RootSubPage.java b/src/main/java/com/gitblit/wicket/pages/RootSubPage.java
index e7e12ccc..e7e12ccc 100644
--- a/src/com/gitblit/wicket/pages/RootSubPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/RootSubPage.java
diff --git a/src/com/gitblit/wicket/pages/SendProposalPage.html b/src/main/java/com/gitblit/wicket/pages/SendProposalPage.html
index cb9f3539..cb9f3539 100644
--- a/src/com/gitblit/wicket/pages/SendProposalPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/SendProposalPage.html
diff --git a/src/com/gitblit/wicket/pages/SendProposalPage.java b/src/main/java/com/gitblit/wicket/pages/SendProposalPage.java
index fc5f95b5..fc5f95b5 100644
--- a/src/com/gitblit/wicket/pages/SendProposalPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/SendProposalPage.java
diff --git a/src/com/gitblit/wicket/pages/SummaryPage.html b/src/main/java/com/gitblit/wicket/pages/SummaryPage.html
index 3e85df99..3e85df99 100644
--- a/src/com/gitblit/wicket/pages/SummaryPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/SummaryPage.html
diff --git a/src/com/gitblit/wicket/pages/SummaryPage.java b/src/main/java/com/gitblit/wicket/pages/SummaryPage.java
index bd40a1b7..bd40a1b7 100644
--- a/src/com/gitblit/wicket/pages/SummaryPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/SummaryPage.java
diff --git a/src/com/gitblit/wicket/pages/TagPage.html b/src/main/java/com/gitblit/wicket/pages/TagPage.html
index 19f828e3..19f828e3 100644
--- a/src/com/gitblit/wicket/pages/TagPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/TagPage.html
diff --git a/src/com/gitblit/wicket/pages/TagPage.java b/src/main/java/com/gitblit/wicket/pages/TagPage.java
index 91c913d2..91c913d2 100644
--- a/src/com/gitblit/wicket/pages/TagPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TagPage.java
diff --git a/src/com/gitblit/wicket/pages/TagsPage.html b/src/main/java/com/gitblit/wicket/pages/TagsPage.html
index 03f1a0d7..03f1a0d7 100644
--- a/src/com/gitblit/wicket/pages/TagsPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/TagsPage.html
diff --git a/src/com/gitblit/wicket/pages/TagsPage.java b/src/main/java/com/gitblit/wicket/pages/TagsPage.java
index 3ddbde9b..3ddbde9b 100644
--- a/src/com/gitblit/wicket/pages/TagsPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TagsPage.java
diff --git a/src/com/gitblit/wicket/pages/TicketPage.html b/src/main/java/com/gitblit/wicket/pages/TicketPage.html
index ed3eb229..ed3eb229 100644
--- a/src/com/gitblit/wicket/pages/TicketPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/TicketPage.html
diff --git a/src/com/gitblit/wicket/pages/TicketPage.java b/src/main/java/com/gitblit/wicket/pages/TicketPage.java
index 57233867..57233867 100644
--- a/src/com/gitblit/wicket/pages/TicketPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TicketPage.java
diff --git a/src/com/gitblit/wicket/pages/TicketsPage.html b/src/main/java/com/gitblit/wicket/pages/TicketsPage.html
index 0913dc2c..0913dc2c 100644
--- a/src/com/gitblit/wicket/pages/TicketsPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/TicketsPage.html
diff --git a/src/com/gitblit/wicket/pages/TicketsPage.java b/src/main/java/com/gitblit/wicket/pages/TicketsPage.java
index b68b7e42..b68b7e42 100644
--- a/src/com/gitblit/wicket/pages/TicketsPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TicketsPage.java
diff --git a/src/com/gitblit/wicket/pages/TreePage.html b/src/main/java/com/gitblit/wicket/pages/TreePage.html
index b7e55ed6..b7e55ed6 100644
--- a/src/com/gitblit/wicket/pages/TreePage.html
+++ b/src/main/java/com/gitblit/wicket/pages/TreePage.html
diff --git a/src/com/gitblit/wicket/pages/TreePage.java b/src/main/java/com/gitblit/wicket/pages/TreePage.java
index bc27f0c2..bc27f0c2 100644
--- a/src/com/gitblit/wicket/pages/TreePage.java
+++ b/src/main/java/com/gitblit/wicket/pages/TreePage.java
diff --git a/src/com/gitblit/wicket/pages/UserPage.html b/src/main/java/com/gitblit/wicket/pages/UserPage.html
index c7131c09..c7131c09 100644
--- a/src/com/gitblit/wicket/pages/UserPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/UserPage.html
diff --git a/src/com/gitblit/wicket/pages/UserPage.java b/src/main/java/com/gitblit/wicket/pages/UserPage.java
index f4331dd1..f4331dd1 100644
--- a/src/com/gitblit/wicket/pages/UserPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/UserPage.java
diff --git a/src/com/gitblit/wicket/pages/UsersPage.html b/src/main/java/com/gitblit/wicket/pages/UsersPage.html
index edb85f7d..edb85f7d 100644
--- a/src/com/gitblit/wicket/pages/UsersPage.html
+++ b/src/main/java/com/gitblit/wicket/pages/UsersPage.html
diff --git a/src/com/gitblit/wicket/pages/UsersPage.java b/src/main/java/com/gitblit/wicket/pages/UsersPage.java
index 9526deae..9526deae 100644
--- a/src/com/gitblit/wicket/pages/UsersPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/UsersPage.java
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-apollo.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-apollo.js
index bfc0014c..bfc0014c 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-apollo.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-apollo.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-css.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-css.js
index 61157f38..61157f38 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-css.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-css.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-hs.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-hs.js
index 00cea7cf..00cea7cf 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-hs.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-hs.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-lisp.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-lisp.js
index fab992b8..fab992b8 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-lisp.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-lisp.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-lua.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-lua.js
index 45d0ba28..45d0ba28 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-lua.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-lua.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-ml.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-ml.js
index 5879726e..5879726e 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-ml.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-ml.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-proto.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-proto.js
index f713420c..f713420c 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-proto.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-proto.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-scala.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-scala.js
index 00f4e0c2..00f4e0c2 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-scala.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-scala.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-sql.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-sql.js
index 800b13ea..800b13ea 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-sql.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-sql.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-vb.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-vb.js
index c479c11e..c479c11e 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-vb.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-vb.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-vhdl.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-vhdl.js
index dc81a3fe..dc81a3fe 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-vhdl.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-vhdl.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-wiki.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-wiki.js
index 3b8fb500..3b8fb500 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-wiki.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-wiki.js
diff --git a/src/com/gitblit/wicket/pages/prettify/lang-yaml.js b/src/main/java/com/gitblit/wicket/pages/prettify/lang-yaml.js
index f2f36070..f2f36070 100644
--- a/src/com/gitblit/wicket/pages/prettify/lang-yaml.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/lang-yaml.js
diff --git a/src/com/gitblit/wicket/pages/prettify/prettify.css b/src/main/java/com/gitblit/wicket/pages/prettify/prettify.css
index 2925d13a..2925d13a 100644
--- a/src/com/gitblit/wicket/pages/prettify/prettify.css
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/prettify.css
diff --git a/src/com/gitblit/wicket/pages/prettify/prettify.js b/src/main/java/com/gitblit/wicket/pages/prettify/prettify.js
index c9161da9..c9161da9 100644
--- a/src/com/gitblit/wicket/pages/prettify/prettify.js
+++ b/src/main/java/com/gitblit/wicket/pages/prettify/prettify.js
diff --git a/src/com/gitblit/wicket/panels/ActivityPanel.html b/src/main/java/com/gitblit/wicket/panels/ActivityPanel.html
index b818e94a..b818e94a 100644
--- a/src/com/gitblit/wicket/panels/ActivityPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/ActivityPanel.html
diff --git a/src/com/gitblit/wicket/panels/ActivityPanel.java b/src/main/java/com/gitblit/wicket/panels/ActivityPanel.java
index 669c36be..669c36be 100644
--- a/src/com/gitblit/wicket/panels/ActivityPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/ActivityPanel.java
diff --git a/src/com/gitblit/wicket/panels/BasePanel.java b/src/main/java/com/gitblit/wicket/panels/BasePanel.java
index ec879178..ec879178 100644
--- a/src/com/gitblit/wicket/panels/BasePanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/BasePanel.java
diff --git a/src/com/gitblit/wicket/panels/BranchesPanel.html b/src/main/java/com/gitblit/wicket/panels/BranchesPanel.html
index 58c86a45..58c86a45 100644
--- a/src/com/gitblit/wicket/panels/BranchesPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/BranchesPanel.html
diff --git a/src/com/gitblit/wicket/panels/BranchesPanel.java b/src/main/java/com/gitblit/wicket/panels/BranchesPanel.java
index 1262077c..1262077c 100644
--- a/src/com/gitblit/wicket/panels/BranchesPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/BranchesPanel.java
diff --git a/src/com/gitblit/wicket/panels/BulletListPanel.html b/src/main/java/com/gitblit/wicket/panels/BulletListPanel.html
index 4d28f498..4d28f498 100644
--- a/src/com/gitblit/wicket/panels/BulletListPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/BulletListPanel.html
diff --git a/src/com/gitblit/wicket/panels/BulletListPanel.java b/src/main/java/com/gitblit/wicket/panels/BulletListPanel.java
index e49223e0..e49223e0 100644
--- a/src/com/gitblit/wicket/panels/BulletListPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/BulletListPanel.java
diff --git a/src/com/gitblit/wicket/panels/CommitHeaderPanel.html b/src/main/java/com/gitblit/wicket/panels/CommitHeaderPanel.html
index 95304403..95304403 100644
--- a/src/com/gitblit/wicket/panels/CommitHeaderPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/CommitHeaderPanel.html
diff --git a/src/com/gitblit/wicket/panels/CommitHeaderPanel.java b/src/main/java/com/gitblit/wicket/panels/CommitHeaderPanel.java
index bb960cca..bb960cca 100644
--- a/src/com/gitblit/wicket/panels/CommitHeaderPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/CommitHeaderPanel.java
diff --git a/src/com/gitblit/wicket/panels/CommitLegendPanel.html b/src/main/java/com/gitblit/wicket/panels/CommitLegendPanel.html
index 71063626..71063626 100644
--- a/src/com/gitblit/wicket/panels/CommitLegendPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/CommitLegendPanel.html
diff --git a/src/com/gitblit/wicket/panels/CommitLegendPanel.java b/src/main/java/com/gitblit/wicket/panels/CommitLegendPanel.java
index 1e906ef7..1e906ef7 100644
--- a/src/com/gitblit/wicket/panels/CommitLegendPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/CommitLegendPanel.java
diff --git a/src/com/gitblit/wicket/panels/CompressedDownloadsPanel.html b/src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.html
index 7123d0a7..7123d0a7 100644
--- a/src/com/gitblit/wicket/panels/CompressedDownloadsPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.html
diff --git a/src/com/gitblit/wicket/panels/CompressedDownloadsPanel.java b/src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java
index b22c7587..b22c7587 100644
--- a/src/com/gitblit/wicket/panels/CompressedDownloadsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java
diff --git a/src/com/gitblit/wicket/panels/DropDownMenu.html b/src/main/java/com/gitblit/wicket/panels/DropDownMenu.html
index 0a8319ec..0a8319ec 100644
--- a/src/com/gitblit/wicket/panels/DropDownMenu.html
+++ b/src/main/java/com/gitblit/wicket/panels/DropDownMenu.html
diff --git a/src/com/gitblit/wicket/panels/DropDownMenu.java b/src/main/java/com/gitblit/wicket/panels/DropDownMenu.java
index 60a8a3d2..60a8a3d2 100644
--- a/src/com/gitblit/wicket/panels/DropDownMenu.java
+++ b/src/main/java/com/gitblit/wicket/panels/DropDownMenu.java
diff --git a/src/com/gitblit/wicket/panels/FederationProposalsPanel.html b/src/main/java/com/gitblit/wicket/panels/FederationProposalsPanel.html
index 89324d56..89324d56 100644
--- a/src/com/gitblit/wicket/panels/FederationProposalsPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/FederationProposalsPanel.html
diff --git a/src/com/gitblit/wicket/panels/FederationProposalsPanel.java b/src/main/java/com/gitblit/wicket/panels/FederationProposalsPanel.java
index 3e70ccec..3e70ccec 100644
--- a/src/com/gitblit/wicket/panels/FederationProposalsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/FederationProposalsPanel.java
diff --git a/src/com/gitblit/wicket/panels/FederationRegistrationsPanel.html b/src/main/java/com/gitblit/wicket/panels/FederationRegistrationsPanel.html
index fbc6f6cb..fbc6f6cb 100644
--- a/src/com/gitblit/wicket/panels/FederationRegistrationsPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/FederationRegistrationsPanel.html
diff --git a/src/com/gitblit/wicket/panels/FederationRegistrationsPanel.java b/src/main/java/com/gitblit/wicket/panels/FederationRegistrationsPanel.java
index ff947175..ff947175 100644
--- a/src/com/gitblit/wicket/panels/FederationRegistrationsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/FederationRegistrationsPanel.java
diff --git a/src/com/gitblit/wicket/panels/FederationTokensPanel.html b/src/main/java/com/gitblit/wicket/panels/FederationTokensPanel.html
index dc5307bb..dc5307bb 100644
--- a/src/com/gitblit/wicket/panels/FederationTokensPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/FederationTokensPanel.html
diff --git a/src/com/gitblit/wicket/panels/FederationTokensPanel.java b/src/main/java/com/gitblit/wicket/panels/FederationTokensPanel.java
index 3454492f..3454492f 100644
--- a/src/com/gitblit/wicket/panels/FederationTokensPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/FederationTokensPanel.java
diff --git a/src/com/gitblit/wicket/panels/GravatarImage.html b/src/main/java/com/gitblit/wicket/panels/GravatarImage.html
index 9dda7958..9dda7958 100644
--- a/src/com/gitblit/wicket/panels/GravatarImage.html
+++ b/src/main/java/com/gitblit/wicket/panels/GravatarImage.html
diff --git a/src/com/gitblit/wicket/panels/GravatarImage.java b/src/main/java/com/gitblit/wicket/panels/GravatarImage.java
index 7f1874f2..7f1874f2 100644
--- a/src/com/gitblit/wicket/panels/GravatarImage.java
+++ b/src/main/java/com/gitblit/wicket/panels/GravatarImage.java
diff --git a/src/com/gitblit/wicket/panels/HistoryPanel.html b/src/main/java/com/gitblit/wicket/panels/HistoryPanel.html
index 811eeed1..811eeed1 100644
--- a/src/com/gitblit/wicket/panels/HistoryPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/HistoryPanel.html
diff --git a/src/com/gitblit/wicket/panels/HistoryPanel.java b/src/main/java/com/gitblit/wicket/panels/HistoryPanel.java
index e5878635..e5878635 100644
--- a/src/com/gitblit/wicket/panels/HistoryPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/HistoryPanel.java
diff --git a/src/com/gitblit/wicket/panels/LinkPanel.html b/src/main/java/com/gitblit/wicket/panels/LinkPanel.html
index 714d53ab..714d53ab 100644
--- a/src/com/gitblit/wicket/panels/LinkPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/LinkPanel.html
diff --git a/src/com/gitblit/wicket/panels/LinkPanel.java b/src/main/java/com/gitblit/wicket/panels/LinkPanel.java
index 688a9576..688a9576 100644
--- a/src/com/gitblit/wicket/panels/LinkPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/LinkPanel.java
diff --git a/src/com/gitblit/wicket/panels/LogPanel.html b/src/main/java/com/gitblit/wicket/panels/LogPanel.html
index 2b2605ac..2b2605ac 100644
--- a/src/com/gitblit/wicket/panels/LogPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/LogPanel.html
diff --git a/src/com/gitblit/wicket/panels/LogPanel.java b/src/main/java/com/gitblit/wicket/panels/LogPanel.java
index 05397642..05397642 100644
--- a/src/com/gitblit/wicket/panels/LogPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/LogPanel.java
diff --git a/src/com/gitblit/wicket/panels/NavigationPanel.html b/src/main/java/com/gitblit/wicket/panels/NavigationPanel.html
index f883e49d..f883e49d 100644
--- a/src/com/gitblit/wicket/panels/NavigationPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/NavigationPanel.html
diff --git a/src/com/gitblit/wicket/panels/NavigationPanel.java b/src/main/java/com/gitblit/wicket/panels/NavigationPanel.java
index 558cc716..558cc716 100644
--- a/src/com/gitblit/wicket/panels/NavigationPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/NavigationPanel.java
diff --git a/src/com/gitblit/wicket/panels/ObjectContainer.java b/src/main/java/com/gitblit/wicket/panels/ObjectContainer.java
index d7f1f789..d7f1f789 100644
--- a/src/com/gitblit/wicket/panels/ObjectContainer.java
+++ b/src/main/java/com/gitblit/wicket/panels/ObjectContainer.java
diff --git a/src/com/gitblit/wicket/panels/PagerPanel.html b/src/main/java/com/gitblit/wicket/panels/PagerPanel.html
index 099001db..099001db 100644
--- a/src/com/gitblit/wicket/panels/PagerPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/PagerPanel.html
diff --git a/src/com/gitblit/wicket/panels/PagerPanel.java b/src/main/java/com/gitblit/wicket/panels/PagerPanel.java
index a5dbb9ef..a5dbb9ef 100644
--- a/src/com/gitblit/wicket/panels/PagerPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/PagerPanel.java
diff --git a/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.html b/src/main/java/com/gitblit/wicket/panels/PathBreadcrumbsPanel.html
index c51ceac8..c51ceac8 100644
--- a/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/PathBreadcrumbsPanel.html
diff --git a/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.java b/src/main/java/com/gitblit/wicket/panels/PathBreadcrumbsPanel.java
index f6c0e4f8..f6c0e4f8 100644
--- a/src/com/gitblit/wicket/panels/PathBreadcrumbsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/PathBreadcrumbsPanel.java
diff --git a/src/com/gitblit/wicket/panels/ProjectRepositoryPanel.html b/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.html
index 9b621d5a..9b621d5a 100644
--- a/src/com/gitblit/wicket/panels/ProjectRepositoryPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.html
diff --git a/src/com/gitblit/wicket/panels/ProjectRepositoryPanel.java b/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java
index 7b4ee9f0..7b4ee9f0 100644
--- a/src/com/gitblit/wicket/panels/ProjectRepositoryPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java
diff --git a/src/com/gitblit/wicket/panels/RefsPanel.html b/src/main/java/com/gitblit/wicket/panels/RefsPanel.html
index a3c0ec49..a3c0ec49 100644
--- a/src/com/gitblit/wicket/panels/RefsPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/RefsPanel.html
diff --git a/src/com/gitblit/wicket/panels/RefsPanel.java b/src/main/java/com/gitblit/wicket/panels/RefsPanel.java
index 3ba22c0b..3ba22c0b 100644
--- a/src/com/gitblit/wicket/panels/RefsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/RefsPanel.java
diff --git a/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.html b/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.html
index eb82245c..eb82245c 100644
--- a/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.html
diff --git a/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java b/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java
index 4156cd19..4156cd19 100644
--- a/src/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java
diff --git a/src/com/gitblit/wicket/panels/RepositoriesPanel.html b/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.html
index 81a4c6eb..81a4c6eb 100644
--- a/src/com/gitblit/wicket/panels/RepositoriesPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.html
diff --git a/src/com/gitblit/wicket/panels/RepositoriesPanel.java b/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.java
index 726af61d..726af61d 100644
--- a/src/com/gitblit/wicket/panels/RepositoriesPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.java
diff --git a/src/com/gitblit/wicket/panels/RepositoryUrlPanel.html b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html
index d7c76f13..d7c76f13 100644
--- a/src/com/gitblit/wicket/panels/RepositoryUrlPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.html
diff --git a/src/com/gitblit/wicket/panels/RepositoryUrlPanel.java b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java
index 58df028b..58df028b 100644
--- a/src/com/gitblit/wicket/panels/RepositoryUrlPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java
diff --git a/src/com/gitblit/wicket/panels/SearchPanel.html b/src/main/java/com/gitblit/wicket/panels/SearchPanel.html
index 74af71c5..74af71c5 100644
--- a/src/com/gitblit/wicket/panels/SearchPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/SearchPanel.html
diff --git a/src/com/gitblit/wicket/panels/SearchPanel.java b/src/main/java/com/gitblit/wicket/panels/SearchPanel.java
index 9d38ab09..9d38ab09 100644
--- a/src/com/gitblit/wicket/panels/SearchPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/SearchPanel.java
diff --git a/src/com/gitblit/wicket/panels/ShockWaveComponent.java b/src/main/java/com/gitblit/wicket/panels/ShockWaveComponent.java
index fa989453..fa989453 100644
--- a/src/com/gitblit/wicket/panels/ShockWaveComponent.java
+++ b/src/main/java/com/gitblit/wicket/panels/ShockWaveComponent.java
diff --git a/src/com/gitblit/wicket/panels/TagsPanel.html b/src/main/java/com/gitblit/wicket/panels/TagsPanel.html
index ba9f15dd..ba9f15dd 100644
--- a/src/com/gitblit/wicket/panels/TagsPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/TagsPanel.html
diff --git a/src/com/gitblit/wicket/panels/TagsPanel.java b/src/main/java/com/gitblit/wicket/panels/TagsPanel.java
index 2bee6a60..2bee6a60 100644
--- a/src/com/gitblit/wicket/panels/TagsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/TagsPanel.java
diff --git a/src/com/gitblit/wicket/panels/TeamsPanel.html b/src/main/java/com/gitblit/wicket/panels/TeamsPanel.html
index ff689292..ff689292 100644
--- a/src/com/gitblit/wicket/panels/TeamsPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/TeamsPanel.html
diff --git a/src/com/gitblit/wicket/panels/TeamsPanel.java b/src/main/java/com/gitblit/wicket/panels/TeamsPanel.java
index b76388b3..b76388b3 100644
--- a/src/com/gitblit/wicket/panels/TeamsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/TeamsPanel.java
diff --git a/src/com/gitblit/wicket/panels/UsersPanel.html b/src/main/java/com/gitblit/wicket/panels/UsersPanel.html
index 80159610..80159610 100644
--- a/src/com/gitblit/wicket/panels/UsersPanel.html
+++ b/src/main/java/com/gitblit/wicket/panels/UsersPanel.html
diff --git a/src/com/gitblit/wicket/panels/UsersPanel.java b/src/main/java/com/gitblit/wicket/panels/UsersPanel.java
index f5b95e20..f5b95e20 100644
--- a/src/com/gitblit/wicket/panels/UsersPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/UsersPanel.java
diff --git a/src/log4j.properties b/src/main/java/log4j.properties
index dc6dd2b5..dc6dd2b5 100644
--- a/src/log4j.properties
+++ b/src/main/java/log4j.properties
diff --git a/src/main/resources/add_16x16.png b/src/main/resources/add_16x16.png
new file mode 100644
index 00000000..0ea124a7
--- /dev/null
+++ b/src/main/resources/add_16x16.png
Binary files differ
diff --git a/src/main/resources/arrow_down.png b/src/main/resources/arrow_down.png
new file mode 100644
index 00000000..f31cc819
--- /dev/null
+++ b/src/main/resources/arrow_down.png
Binary files differ
diff --git a/src/main/resources/arrow_left.png b/src/main/resources/arrow_left.png
new file mode 100644
index 00000000..d9c50c4d
--- /dev/null
+++ b/src/main/resources/arrow_left.png
Binary files differ
diff --git a/src/main/resources/arrow_off.png b/src/main/resources/arrow_off.png
new file mode 100644
index 00000000..f9b1ced2
--- /dev/null
+++ b/src/main/resources/arrow_off.png
Binary files differ
diff --git a/src/main/resources/arrow_page.png b/src/main/resources/arrow_page.png
new file mode 100644
index 00000000..6d930242
--- /dev/null
+++ b/src/main/resources/arrow_page.png
Binary files differ
diff --git a/src/main/resources/arrow_up.png b/src/main/resources/arrow_up.png
new file mode 100644
index 00000000..63031c33
--- /dev/null
+++ b/src/main/resources/arrow_up.png
Binary files differ
diff --git a/src/main/resources/background.png b/src/main/resources/background.png
new file mode 100644
index 00000000..6f75e43d
--- /dev/null
+++ b/src/main/resources/background.png
Binary files differ
diff --git a/src/main/resources/blank.png b/src/main/resources/blank.png
new file mode 100644
index 00000000..109296b9
--- /dev/null
+++ b/src/main/resources/blank.png
Binary files differ
diff --git a/src/main/resources/book_16x16.png b/src/main/resources/book_16x16.png
new file mode 100644
index 00000000..e48ff95e
--- /dev/null
+++ b/src/main/resources/book_16x16.png
Binary files differ
diff --git a/src/main/resources/bootstrap/css/bootstrap-responsive.css b/src/main/resources/bootstrap/css/bootstrap-responsive.css
new file mode 100644
index 00000000..06e55c0b
--- /dev/null
+++ b/src/main/resources/bootstrap/css/bootstrap-responsive.css
@@ -0,0 +1,815 @@
+/*!
+ * Bootstrap Responsive v2.0.4
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+
+.clearfix {
+ *zoom: 1;
+}
+
+.clearfix:before,
+.clearfix:after {
+ display: table;
+ content: "";
+}
+
+.clearfix:after {
+ clear: both;
+}
+
+.hide-text {
+ font: 0/0 a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0;
+}
+
+.input-block-level {
+ display: block;
+ width: 100%;
+ min-height: 28px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.hidden {
+ display: none;
+ visibility: hidden;
+}
+
+.visible-phone {
+ display: none !important;
+}
+
+.visible-tablet {
+ display: none !important;
+}
+
+.hidden-desktop {
+ display: none !important;
+}
+
+@media (max-width: 767px) {
+ .visible-phone {
+ display: inherit !important;
+ }
+ .hidden-phone {
+ display: none !important;
+ }
+ .hidden-desktop {
+ display: inherit !important;
+ }
+ .visible-desktop {
+ display: none !important;
+ }
+}
+
+@media (min-width: 768px) and (max-width: 979px) {
+ .visible-tablet {
+ display: inherit !important;
+ }
+ .hidden-tablet {
+ display: none !important;
+ }
+ .hidden-desktop {
+ display: inherit !important;
+ }
+ .visible-desktop {
+ display: none !important ;
+ }
+}
+
+@media (max-width: 480px) {
+ .nav-collapse {
+ -webkit-transform: translate3d(0, 0, 0);
+ }
+ .page-header h1 small {
+ display: block;
+ line-height: 18px;
+ }
+ input[type="checkbox"],
+ input[type="radio"] {
+ border: 1px solid #ccc;
+ }
+ .form-horizontal .control-group > label {
+ float: none;
+ width: auto;
+ padding-top: 0;
+ text-align: left;
+ }
+ .form-horizontal .controls {
+ margin-left: 0;
+ }
+ .form-horizontal .control-list {
+ padding-top: 0;
+ }
+ .form-horizontal .form-actions {
+ padding-right: 10px;
+ padding-left: 10px;
+ }
+ .modal {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ left: 10px;
+ width: auto;
+ margin: 0;
+ }
+ .modal.fade.in {
+ top: auto;
+ }
+ .modal-header .close {
+ padding: 10px;
+ margin: -10px;
+ }
+ .carousel-caption {
+ position: static;
+ }
+}
+
+@media (max-width: 767px) {
+ body {
+ padding-right: 20px;
+ padding-left: 20px;
+ }
+ .navbar-fixed-top,
+ .navbar-fixed-bottom {
+ margin-right: -20px;
+ margin-left: -20px;
+ }
+ .container-fluid {
+ padding: 0;
+ }
+ .dl-horizontal dt {
+ float: none;
+ width: auto;
+ clear: none;
+ text-align: left;
+ }
+ .dl-horizontal dd {
+ margin-left: 0;
+ }
+ .container {
+ width: auto;
+ }
+ .row-fluid {
+ width: 100%;
+ }
+ .row,
+ .thumbnails {
+ margin-left: 0;
+ }
+ [class*="span"],
+ .row-fluid [class*="span"] {
+ display: block;
+ float: none;
+ width: auto;
+ margin-left: 0;
+ }
+ .input-large,
+ .input-xlarge,
+ .input-xxlarge,
+ input[class*="span"],
+ select[class*="span"],
+ textarea[class*="span"],
+ .uneditable-input {
+ display: block;
+ width: 100%;
+ min-height: 28px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+ .input-prepend input,
+ .input-append input,
+ .input-prepend input[class*="span"],
+ .input-append input[class*="span"] {
+ display: inline-block;
+ width: auto;
+ }
+}
+
+@media (min-width: 768px) and (max-width: 979px) {
+ .row {
+ margin-left: -20px;
+ *zoom: 1;
+ }
+ .row:before,
+ .row:after {
+ display: table;
+ content: "";
+ }
+ .row:after {
+ clear: both;
+ }
+ [class*="span"] {
+ float: left;
+ margin-left: 20px;
+ }
+ .container,
+ .navbar-fixed-top .container,
+ .navbar-fixed-bottom .container {
+ width: 724px;
+ }
+ .span12 {
+ width: 724px;
+ }
+ .span11 {
+ width: 662px;
+ }
+ .span10 {
+ width: 600px;
+ }
+ .span9 {
+ width: 538px;
+ }
+ .span8 {
+ width: 476px;
+ }
+ .span7 {
+ width: 414px;
+ }
+ .span6 {
+ width: 352px;
+ }
+ .span5 {
+ width: 290px;
+ }
+ .span4 {
+ width: 228px;
+ }
+ .span3 {
+ width: 166px;
+ }
+ .span2 {
+ width: 104px;
+ }
+ .span1 {
+ width: 42px;
+ }
+ .offset12 {
+ margin-left: 764px;
+ }
+ .offset11 {
+ margin-left: 702px;
+ }
+ .offset10 {
+ margin-left: 640px;
+ }
+ .offset9 {
+ margin-left: 578px;
+ }
+ .offset8 {
+ margin-left: 516px;
+ }
+ .offset7 {
+ margin-left: 454px;
+ }
+ .offset6 {
+ margin-left: 392px;
+ }
+ .offset5 {
+ margin-left: 330px;
+ }
+ .offset4 {
+ margin-left: 268px;
+ }
+ .offset3 {
+ margin-left: 206px;
+ }
+ .offset2 {
+ margin-left: 144px;
+ }
+ .offset1 {
+ margin-left: 82px;
+ }
+ .row-fluid {
+ width: 100%;
+ *zoom: 1;
+ }
+ .row-fluid:before,
+ .row-fluid:after {
+ display: table;
+ content: "";
+ }
+ .row-fluid:after {
+ clear: both;
+ }
+ .row-fluid [class*="span"] {
+ display: block;
+ float: left;
+ width: 100%;
+ min-height: 28px;
+ margin-left: 2.762430939%;
+ *margin-left: 2.709239449638298%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+ .row-fluid [class*="span"]:first-child {
+ margin-left: 0;
+ }
+ .row-fluid .span12 {
+ width: 99.999999993%;
+ *width: 99.9468085036383%;
+ }
+ .row-fluid .span11 {
+ width: 91.436464082%;
+ *width: 91.38327259263829%;
+ }
+ .row-fluid .span10 {
+ width: 82.87292817100001%;
+ *width: 82.8197366816383%;
+ }
+ .row-fluid .span9 {
+ width: 74.30939226%;
+ *width: 74.25620077063829%;
+ }
+ .row-fluid .span8 {
+ width: 65.74585634900001%;
+ *width: 65.6926648596383%;
+ }
+ .row-fluid .span7 {
+ width: 57.182320438000005%;
+ *width: 57.129128948638304%;
+ }
+ .row-fluid .span6 {
+ width: 48.618784527%;
+ *width: 48.5655930376383%;
+ }
+ .row-fluid .span5 {
+ width: 40.055248616%;
+ *width: 40.0020571266383%;
+ }
+ .row-fluid .span4 {
+ width: 31.491712705%;
+ *width: 31.4385212156383%;
+ }
+ .row-fluid .span3 {
+ width: 22.928176794%;
+ *width: 22.874985304638297%;
+ }
+ .row-fluid .span2 {
+ width: 14.364640883%;
+ *width: 14.311449393638298%;
+ }
+ .row-fluid .span1 {
+ width: 5.801104972%;
+ *width: 5.747913482638298%;
+ }
+ input,
+ textarea,
+ .uneditable-input {
+ margin-left: 0;
+ }
+ input.span12,
+ textarea.span12,
+ .uneditable-input.span12 {
+ width: 714px;
+ }
+ input.span11,
+ textarea.span11,
+ .uneditable-input.span11 {
+ width: 652px;
+ }
+ input.span10,
+ textarea.span10,
+ .uneditable-input.span10 {
+ width: 590px;
+ }
+ input.span9,
+ textarea.span9,
+ .uneditable-input.span9 {
+ width: 528px;
+ }
+ input.span8,
+ textarea.span8,
+ .uneditable-input.span8 {
+ width: 466px;
+ }
+ input.span7,
+ textarea.span7,
+ .uneditable-input.span7 {
+ width: 404px;
+ }
+ input.span6,
+ textarea.span6,
+ .uneditable-input.span6 {
+ width: 342px;
+ }
+ input.span5,
+ textarea.span5,
+ .uneditable-input.span5 {
+ width: 280px;
+ }
+ input.span4,
+ textarea.span4,
+ .uneditable-input.span4 {
+ width: 218px;
+ }
+ input.span3,
+ textarea.span3,
+ .uneditable-input.span3 {
+ width: 156px;
+ }
+ input.span2,
+ textarea.span2,
+ .uneditable-input.span2 {
+ width: 94px;
+ }
+ input.span1,
+ textarea.span1,
+ .uneditable-input.span1 {
+ width: 32px;
+ }
+}
+
+@media (min-width: 1200px) {
+ .row {
+ margin-left: -30px;
+ *zoom: 1;
+ }
+ .row:before,
+ .row:after {
+ display: table;
+ content: "";
+ }
+ .row:after {
+ clear: both;
+ }
+ [class*="span"] {
+ float: left;
+ margin-left: 30px;
+ }
+ .container,
+ .navbar-fixed-top .container,
+ .navbar-fixed-bottom .container {
+ width: 1170px;
+ }
+ .span12 {
+ width: 1170px;
+ }
+ .span11 {
+ width: 1070px;
+ }
+ .span10 {
+ width: 970px;
+ }
+ .span9 {
+ width: 870px;
+ }
+ .span8 {
+ width: 770px;
+ }
+ .span7 {
+ width: 670px;
+ }
+ .span6 {
+ width: 570px;
+ }
+ .span5 {
+ width: 470px;
+ }
+ .span4 {
+ width: 370px;
+ }
+ .span3 {
+ width: 270px;
+ }
+ .span2 {
+ width: 170px;
+ }
+ .span1 {
+ width: 70px;
+ }
+ .offset12 {
+ margin-left: 1230px;
+ }
+ .offset11 {
+ margin-left: 1130px;
+ }
+ .offset10 {
+ margin-left: 1030px;
+ }
+ .offset9 {
+ margin-left: 930px;
+ }
+ .offset8 {
+ margin-left: 830px;
+ }
+ .offset7 {
+ margin-left: 730px;
+ }
+ .offset6 {
+ margin-left: 630px;
+ }
+ .offset5 {
+ margin-left: 530px;
+ }
+ .offset4 {
+ margin-left: 430px;
+ }
+ .offset3 {
+ margin-left: 330px;
+ }
+ .offset2 {
+ margin-left: 230px;
+ }
+ .offset1 {
+ margin-left: 130px;
+ }
+ .row-fluid {
+ width: 100%;
+ *zoom: 1;
+ }
+ .row-fluid:before,
+ .row-fluid:after {
+ display: table;
+ content: "";
+ }
+ .row-fluid:after {
+ clear: both;
+ }
+ .row-fluid [class*="span"] {
+ display: block;
+ float: left;
+ width: 100%;
+ min-height: 28px;
+ margin-left: 2.564102564%;
+ *margin-left: 2.510911074638298%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+ .row-fluid [class*="span"]:first-child {
+ margin-left: 0;
+ }
+ .row-fluid .span12 {
+ width: 100%;
+ *width: 99.94680851063829%;
+ }
+ .row-fluid .span11 {
+ width: 91.45299145300001%;
+ *width: 91.3997999636383%;
+ }
+ .row-fluid .span10 {
+ width: 82.905982906%;
+ *width: 82.8527914166383%;
+ }
+ .row-fluid .span9 {
+ width: 74.358974359%;
+ *width: 74.30578286963829%;
+ }
+ .row-fluid .span8 {
+ width: 65.81196581200001%;
+ *width: 65.7587743226383%;
+ }
+ .row-fluid .span7 {
+ width: 57.264957265%;
+ *width: 57.2117657756383%;
+ }
+ .row-fluid .span6 {
+ width: 48.717948718%;
+ *width: 48.6647572286383%;
+ }
+ .row-fluid .span5 {
+ width: 40.170940171000005%;
+ *width: 40.117748681638304%;
+ }
+ .row-fluid .span4 {
+ width: 31.623931624%;
+ *width: 31.5707401346383%;
+ }
+ .row-fluid .span3 {
+ width: 23.076923077%;
+ *width: 23.0237315876383%;
+ }
+ .row-fluid .span2 {
+ width: 14.529914530000001%;
+ *width: 14.4767230406383%;
+ }
+ .row-fluid .span1 {
+ width: 5.982905983%;
+ *width: 5.929714493638298%;
+ }
+ input,
+ textarea,
+ .uneditable-input {
+ margin-left: 0;
+ }
+ input.span12,
+ textarea.span12,
+ .uneditable-input.span12 {
+ width: 1160px;
+ }
+ input.span11,
+ textarea.span11,
+ .uneditable-input.span11 {
+ width: 1060px;
+ }
+ input.span10,
+ textarea.span10,
+ .uneditable-input.span10 {
+ width: 960px;
+ }
+ input.span9,
+ textarea.span9,
+ .uneditable-input.span9 {
+ width: 860px;
+ }
+ input.span8,
+ textarea.span8,
+ .uneditable-input.span8 {
+ width: 760px;
+ }
+ input.span7,
+ textarea.span7,
+ .uneditable-input.span7 {
+ width: 660px;
+ }
+ input.span6,
+ textarea.span6,
+ .uneditable-input.span6 {
+ width: 560px;
+ }
+ input.span5,
+ textarea.span5,
+ .uneditable-input.span5 {
+ width: 460px;
+ }
+ input.span4,
+ textarea.span4,
+ .uneditable-input.span4 {
+ width: 360px;
+ }
+ input.span3,
+ textarea.span3,
+ .uneditable-input.span3 {
+ width: 260px;
+ }
+ input.span2,
+ textarea.span2,
+ .uneditable-input.span2 {
+ width: 160px;
+ }
+ input.span1,
+ textarea.span1,
+ .uneditable-input.span1 {
+ width: 60px;
+ }
+ .thumbnails {
+ margin-left: -30px;
+ }
+ .thumbnails > li {
+ margin-left: 30px;
+ }
+ .row-fluid .thumbnails {
+ margin-left: 0;
+ }
+}
+
+@media (max-width: 979px) {
+ body {
+ padding-top: 0;
+ }
+ .navbar-fixed-top,
+ .navbar-fixed-bottom {
+ position: static;
+ }
+ .navbar-fixed-top {
+ margin-bottom: 18px;
+ }
+ .navbar-fixed-bottom {
+ margin-top: 18px;
+ }
+ .navbar-fixed-top .navbar-inner,
+ .navbar-fixed-bottom .navbar-inner {
+ padding: 5px;
+ }
+ .navbar .container {
+ width: auto;
+ padding: 0;
+ }
+ .navbar .brand {
+ padding-right: 10px;
+ padding-left: 10px;
+ margin: 0 0 0 -5px;
+ }
+ .nav-collapse {
+ clear: both;
+ }
+ .nav-collapse .nav {
+ float: none;
+ margin: 0 0 9px;
+ }
+ .nav-collapse .nav > li {
+ float: none;
+ }
+ .nav-collapse .nav > li > a {
+ margin-bottom: 2px;
+ }
+ .nav-collapse .nav > .divider-vertical {
+ display: none;
+ }
+ .nav-collapse .nav .nav-header {
+ color: #999999;
+ text-shadow: none;
+ }
+ .nav-collapse .nav > li > a,
+ .nav-collapse .dropdown-menu a {
+ padding: 6px 15px;
+ font-weight: bold;
+ color: #999999;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ }
+ .nav-collapse .btn {
+ padding: 4px 10px 4px;
+ font-weight: normal;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ }
+ .nav-collapse .dropdown-menu li + li a {
+ margin-bottom: 2px;
+ }
+ .nav-collapse .nav > li > a:hover,
+ .nav-collapse .dropdown-menu a:hover {
+ background-color: #222222;
+ }
+ .nav-collapse.in .btn-group {
+ padding: 0;
+ margin-top: 5px;
+ }
+ .nav-collapse .dropdown-menu {
+ position: static;
+ top: auto;
+ left: auto;
+ display: block;
+ float: none;
+ max-width: none;
+ padding: 0;
+ margin: 0 15px;
+ background-color: transparent;
+ border: none;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ }
+ .nav-collapse .dropdown-menu:before,
+ .nav-collapse .dropdown-menu:after {
+ display: none;
+ }
+ .nav-collapse .dropdown-menu .divider {
+ display: none;
+ }
+ .nav-collapse .navbar-form,
+ .nav-collapse .navbar-search {
+ float: none;
+ padding: 9px 15px;
+ margin: 9px 0;
+ border-top: 1px solid #222222;
+ border-bottom: 1px solid #222222;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
+ }
+ .navbar .nav-collapse .nav.pull-right {
+ float: none;
+ margin-left: 0;
+ }
+ .nav-collapse,
+ .nav-collapse.collapse {
+ height: 0;
+ overflow: hidden;
+ }
+ .navbar .btn-navbar {
+ display: block;
+ }
+ .navbar-static .navbar-inner {
+ padding-right: 10px;
+ padding-left: 10px;
+ }
+}
+
+@media (min-width: 980px) {
+ .nav-collapse.collapse {
+ height: auto !important;
+ overflow: visible !important;
+ }
+}
diff --git a/src/main/resources/bootstrap/css/bootstrap.css b/src/main/resources/bootstrap/css/bootstrap.css
new file mode 100644
index 00000000..bb40c85f
--- /dev/null
+++ b/src/main/resources/bootstrap/css/bootstrap.css
@@ -0,0 +1,4983 @@
+/*!
+ * Bootstrap v2.0.4
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+nav,
+section {
+ display: block;
+}
+
+audio,
+canvas,
+video {
+ display: inline-block;
+ *display: inline;
+ *zoom: 1;
+}
+
+audio:not([controls]) {
+ display: none;
+}
+
+html {
+ font-size: 100%;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+}
+
+a:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+
+a:hover,
+a:active {
+ outline: 0;
+}
+
+sub,
+sup {
+ position: relative;
+ font-size: 75%;
+ line-height: 0;
+ vertical-align: baseline;
+}
+
+sup {
+ top: -0.5em;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+img {
+ max-width: 100%;
+ vertical-align: middle;
+ border: 0;
+ -ms-interpolation-mode: bicubic;
+}
+
+#map_canvas img {
+ max-width: none;
+}
+
+button,
+input,
+select,
+textarea {
+ margin: 0;
+ font-size: 100%;
+ vertical-align: middle;
+}
+
+button,
+input {
+ *overflow: visible;
+ line-height: normal;
+}
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+}
+
+button,
+input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ cursor: pointer;
+ -webkit-appearance: button;
+}
+
+input[type="search"] {
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ -webkit-appearance: textfield;
+}
+
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-cancel-button {
+ -webkit-appearance: none;
+}
+
+textarea {
+ overflow: auto;
+ vertical-align: top;
+}
+
+.clearfix {
+ *zoom: 1;
+}
+
+.clearfix:before,
+.clearfix:after {
+ display: table;
+ content: "";
+}
+
+.clearfix:after {
+ clear: both;
+}
+
+.hide-text {
+ font: 0/0 a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0;
+}
+
+.input-block-level {
+ display: block;
+ width: 100%;
+ min-height: 28px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+body {
+ margin: 0;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+ color: #333333;
+ background-color: #ffffff;
+}
+
+a {
+ color: #0088cc;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #005580;
+ text-decoration: underline;
+}
+
+.row {
+ margin-left: -20px;
+ *zoom: 1;
+}
+
+.row:before,
+.row:after {
+ display: table;
+ content: "";
+}
+
+.row:after {
+ clear: both;
+}
+
+[class*="span"] {
+ float: left;
+ margin-left: 20px;
+}
+
+.container,
+.navbar-fixed-top .container,
+.navbar-fixed-bottom .container {
+ width: 940px;
+}
+
+.span12 {
+ width: 940px;
+}
+
+.span11 {
+ width: 860px;
+}
+
+.span10 {
+ width: 780px;
+}
+
+.span9 {
+ width: 700px;
+}
+
+.span8 {
+ width: 620px;
+}
+
+.span7 {
+ width: 540px;
+}
+
+.span6 {
+ width: 460px;
+}
+
+.span5 {
+ width: 380px;
+}
+
+.span4 {
+ width: 300px;
+}
+
+.span3 {
+ width: 220px;
+}
+
+.span2 {
+ width: 140px;
+}
+
+.span1 {
+ width: 60px;
+}
+
+.offset12 {
+ margin-left: 980px;
+}
+
+.offset11 {
+ margin-left: 900px;
+}
+
+.offset10 {
+ margin-left: 820px;
+}
+
+.offset9 {
+ margin-left: 740px;
+}
+
+.offset8 {
+ margin-left: 660px;
+}
+
+.offset7 {
+ margin-left: 580px;
+}
+
+.offset6 {
+ margin-left: 500px;
+}
+
+.offset5 {
+ margin-left: 420px;
+}
+
+.offset4 {
+ margin-left: 340px;
+}
+
+.offset3 {
+ margin-left: 260px;
+}
+
+.offset2 {
+ margin-left: 180px;
+}
+
+.offset1 {
+ margin-left: 100px;
+}
+
+.row-fluid {
+ width: 100%;
+ *zoom: 1;
+}
+
+.row-fluid:before,
+.row-fluid:after {
+ display: table;
+ content: "";
+}
+
+.row-fluid:after {
+ clear: both;
+}
+
+.row-fluid [class*="span"] {
+ display: block;
+ float: left;
+ width: 100%;
+ min-height: 28px;
+ margin-left: 2.127659574%;
+ *margin-left: 2.0744680846382977%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.row-fluid [class*="span"]:first-child {
+ margin-left: 0;
+}
+
+.row-fluid .span12 {
+ width: 99.99999998999999%;
+ *width: 99.94680850063828%;
+}
+
+.row-fluid .span11 {
+ width: 91.489361693%;
+ *width: 91.4361702036383%;
+}
+
+.row-fluid .span10 {
+ width: 82.97872339599999%;
+ *width: 82.92553190663828%;
+}
+
+.row-fluid .span9 {
+ width: 74.468085099%;
+ *width: 74.4148936096383%;
+}
+
+.row-fluid .span8 {
+ width: 65.95744680199999%;
+ *width: 65.90425531263828%;
+}
+
+.row-fluid .span7 {
+ width: 57.446808505%;
+ *width: 57.3936170156383%;
+}
+
+.row-fluid .span6 {
+ width: 48.93617020799999%;
+ *width: 48.88297871863829%;
+}
+
+.row-fluid .span5 {
+ width: 40.425531911%;
+ *width: 40.3723404216383%;
+}
+
+.row-fluid .span4 {
+ width: 31.914893614%;
+ *width: 31.8617021246383%;
+}
+
+.row-fluid .span3 {
+ width: 23.404255317%;
+ *width: 23.3510638276383%;
+}
+
+.row-fluid .span2 {
+ width: 14.89361702%;
+ *width: 14.8404255306383%;
+}
+
+.row-fluid .span1 {
+ width: 6.382978723%;
+ *width: 6.329787233638298%;
+}
+
+.container {
+ margin-right: auto;
+ margin-left: auto;
+ *zoom: 1;
+}
+
+.container:before,
+.container:after {
+ display: table;
+ content: "";
+}
+
+.container:after {
+ clear: both;
+}
+
+.container-fluid {
+ padding-right: 20px;
+ padding-left: 20px;
+ *zoom: 1;
+}
+
+.container-fluid:before,
+.container-fluid:after {
+ display: table;
+ content: "";
+}
+
+.container-fluid:after {
+ clear: both;
+}
+
+p {
+ margin: 0 0 9px;
+}
+
+p small {
+ font-size: 11px;
+ color: #999999;
+}
+
+.lead {
+ margin-bottom: 18px;
+ font-size: 20px;
+ font-weight: 200;
+ line-height: 27px;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ margin: 0;
+ font-family: inherit;
+ font-weight: bold;
+ color: inherit;
+ text-rendering: optimizelegibility;
+}
+
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+ font-weight: normal;
+ color: #999999;
+}
+
+h1 {
+ font-size: 30px;
+ line-height: 36px;
+}
+
+h1 small {
+ font-size: 18px;
+}
+
+h2 {
+ font-size: 24px;
+ line-height: 36px;
+}
+
+h2 small {
+ font-size: 18px;
+}
+
+h3 {
+ font-size: 18px;
+ line-height: 27px;
+}
+
+h3 small {
+ font-size: 14px;
+}
+
+h4,
+h5,
+h6 {
+ line-height: 18px;
+}
+
+h4 {
+ font-size: 14px;
+}
+
+h4 small {
+ font-size: 12px;
+}
+
+h5 {
+ font-size: 12px;
+}
+
+h6 {
+ font-size: 11px;
+ color: #999999;
+ text-transform: uppercase;
+}
+
+.page-header {
+ padding-bottom: 17px;
+ margin: 18px 0;
+ border-bottom: 1px solid #eeeeee;
+}
+
+.page-header h1 {
+ line-height: 1;
+}
+
+ul,
+ol {
+ padding: 0;
+ margin: 0 0 9px 25px;
+}
+
+ul ul,
+ul ol,
+ol ol,
+ol ul {
+ margin-bottom: 0;
+}
+
+ul {
+ list-style: disc;
+}
+
+ol {
+ list-style: decimal;
+}
+
+li {
+ line-height: 18px;
+}
+
+ul.unstyled,
+ol.unstyled {
+ margin-left: 0;
+ list-style: none;
+}
+
+dl {
+ margin-bottom: 18px;
+}
+
+dt,
+dd {
+ line-height: 18px;
+}
+
+dt {
+ font-weight: bold;
+ line-height: 17px;
+}
+
+dd {
+ margin-left: 9px;
+}
+
+.dl-horizontal dt {
+ float: left;
+ width: 120px;
+ overflow: hidden;
+ clear: left;
+ text-align: right;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.dl-horizontal dd {
+ margin-left: 130px;
+}
+
+hr {
+ margin: 18px 0;
+ border: 0;
+ border-top: 1px solid #eeeeee;
+ border-bottom: 1px solid #ffffff;
+}
+
+strong {
+ font-weight: bold;
+}
+
+em {
+ font-style: italic;
+}
+
+.muted {
+ color: #999999;
+}
+
+abbr[title] {
+ cursor: help;
+ border-bottom: 1px dotted #999999;
+}
+
+abbr.initialism {
+ font-size: 90%;
+ text-transform: uppercase;
+}
+
+blockquote {
+ padding: 0 0 0 15px;
+ margin: 0 0 18px;
+ border-left: 5px solid #eeeeee;
+}
+
+blockquote p {
+ margin-bottom: 0;
+ font-size: 16px;
+ font-weight: 300;
+ line-height: 22.5px;
+}
+
+blockquote small {
+ display: block;
+ line-height: 18px;
+ color: #999999;
+}
+
+blockquote small:before {
+ content: '\2014 \00A0';
+}
+
+blockquote.pull-right {
+ float: right;
+ padding-right: 15px;
+ padding-left: 0;
+ border-right: 5px solid #eeeeee;
+ border-left: 0;
+}
+
+blockquote.pull-right p,
+blockquote.pull-right small {
+ text-align: right;
+}
+
+q:before,
+q:after,
+blockquote:before,
+blockquote:after {
+ content: "";
+}
+
+address {
+ display: block;
+ margin-bottom: 18px;
+ font-style: normal;
+ line-height: 18px;
+}
+
+small {
+ font-size: 100%;
+}
+
+cite {
+ font-style: normal;
+}
+
+code,
+pre {
+ padding: 0 3px 2px;
+ font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
+ font-size: 12px;
+ color: #333333;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+
+code {
+ padding: 2px 4px;
+ color: #d14;
+ background-color: #f7f7f9;
+ border: 1px solid #e1e1e8;
+}
+
+pre {
+ display: block;
+ padding: 8.5px;
+ margin: 0 0 9px;
+ font-size: 12.025px;
+ line-height: 18px;
+ word-break: break-all;
+ word-wrap: break-word;
+ white-space: pre;
+ white-space: pre-wrap;
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, 0.15);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+pre.prettyprint {
+ margin-bottom: 18px;
+}
+
+pre code {
+ padding: 0;
+ color: inherit;
+ background-color: transparent;
+ border: 0;
+}
+
+.pre-scrollable {
+ max-height: 340px;
+ overflow-y: scroll;
+}
+
+form {
+ margin: 0 0 18px;
+}
+
+fieldset {
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+
+legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 27px;
+ font-size: 19.5px;
+ line-height: 36px;
+ color: #333333;
+ border: 0;
+ border-bottom: 1px solid #e5e5e5;
+}
+
+legend small {
+ font-size: 13.5px;
+ color: #999999;
+}
+
+label,
+input,
+button,
+select,
+textarea {
+ font-size: 13px;
+ font-weight: normal;
+ line-height: 18px;
+}
+
+input,
+button,
+select,
+textarea {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+label {
+ display: block;
+ margin-bottom: 5px;
+}
+
+select,
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+ display: inline-block;
+ height: 18px;
+ padding: 4px;
+ margin-bottom: 9px;
+ font-size: 13px;
+ line-height: 18px;
+ color: #555555;
+}
+
+input,
+textarea {
+ width: 210px;
+}
+
+textarea {
+ height: auto;
+}
+
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+ background-color: #ffffff;
+ border: 1px solid #cccccc;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
+ -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
+ -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
+ -o-transition: border linear 0.2s, box-shadow linear 0.2s;
+ transition: border linear 0.2s, box-shadow linear 0.2s;
+}
+
+textarea:focus,
+input[type="text"]:focus,
+input[type="password"]:focus,
+input[type="datetime"]:focus,
+input[type="datetime-local"]:focus,
+input[type="date"]:focus,
+input[type="month"]:focus,
+input[type="time"]:focus,
+input[type="week"]:focus,
+input[type="number"]:focus,
+input[type="email"]:focus,
+input[type="url"]:focus,
+input[type="search"]:focus,
+input[type="tel"]:focus,
+input[type="color"]:focus,
+.uneditable-input:focus {
+ border-color: rgba(82, 168, 236, 0.8);
+ outline: 0;
+ outline: thin dotted \9;
+ /* IE6-9 */
+
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+}
+
+input[type="radio"],
+input[type="checkbox"] {
+ margin: 3px 0;
+ *margin-top: 0;
+ /* IE7 */
+
+ line-height: normal;
+ cursor: pointer;
+}
+
+input[type="submit"],
+input[type="reset"],
+input[type="button"],
+input[type="radio"],
+input[type="checkbox"] {
+ width: auto;
+}
+
+.uneditable-textarea {
+ width: auto;
+ height: auto;
+}
+
+select,
+input[type="file"] {
+ height: 28px;
+ /* In IE7, the height of the select element cannot be changed by height, only font-size */
+
+ *margin-top: 4px;
+ /* For IE7, add top margin to align select with labels */
+
+ line-height: 28px;
+}
+
+select {
+ width: 220px;
+ border: 1px solid #bbb;
+}
+
+select[multiple],
+select[size] {
+ height: auto;
+}
+
+select:focus,
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+
+.radio,
+.checkbox {
+ min-height: 18px;
+ padding-left: 18px;
+}
+
+.radio input[type="radio"],
+.checkbox input[type="checkbox"] {
+ float: left;
+ margin-left: -18px;
+}
+
+.controls > .radio:first-child,
+.controls > .checkbox:first-child {
+ padding-top: 5px;
+}
+
+.radio.inline,
+.checkbox.inline {
+ display: inline-block;
+ padding-top: 5px;
+ margin-bottom: 0;
+ vertical-align: middle;
+}
+
+.radio.inline + .radio.inline,
+.checkbox.inline + .checkbox.inline {
+ margin-left: 10px;
+}
+
+.input-mini {
+ width: 60px;
+}
+
+.input-small {
+ width: 90px;
+}
+
+.input-medium {
+ width: 150px;
+}
+
+.input-large {
+ width: 210px;
+}
+
+.input-xlarge {
+ width: 270px;
+}
+
+.input-xxlarge {
+ width: 530px;
+}
+
+input[class*="span"],
+select[class*="span"],
+textarea[class*="span"],
+.uneditable-input[class*="span"],
+.row-fluid input[class*="span"],
+.row-fluid select[class*="span"],
+.row-fluid textarea[class*="span"],
+.row-fluid .uneditable-input[class*="span"] {
+ float: none;
+ margin-left: 0;
+}
+
+.input-append input[class*="span"],
+.input-append .uneditable-input[class*="span"],
+.input-prepend input[class*="span"],
+.input-prepend .uneditable-input[class*="span"],
+.row-fluid .input-prepend [class*="span"],
+.row-fluid .input-append [class*="span"] {
+ display: inline-block;
+}
+
+input,
+textarea,
+.uneditable-input {
+ margin-left: 0;
+}
+
+input.span12,
+textarea.span12,
+.uneditable-input.span12 {
+ width: 930px;
+}
+
+input.span11,
+textarea.span11,
+.uneditable-input.span11 {
+ width: 850px;
+}
+
+input.span10,
+textarea.span10,
+.uneditable-input.span10 {
+ width: 770px;
+}
+
+input.span9,
+textarea.span9,
+.uneditable-input.span9 {
+ width: 690px;
+}
+
+input.span8,
+textarea.span8,
+.uneditable-input.span8 {
+ width: 610px;
+}
+
+input.span7,
+textarea.span7,
+.uneditable-input.span7 {
+ width: 530px;
+}
+
+input.span6,
+textarea.span6,
+.uneditable-input.span6 {
+ width: 450px;
+}
+
+input.span5,
+textarea.span5,
+.uneditable-input.span5 {
+ width: 370px;
+}
+
+input.span4,
+textarea.span4,
+.uneditable-input.span4 {
+ width: 290px;
+}
+
+input.span3,
+textarea.span3,
+.uneditable-input.span3 {
+ width: 210px;
+}
+
+input.span2,
+textarea.span2,
+.uneditable-input.span2 {
+ width: 130px;
+}
+
+input.span1,
+textarea.span1,
+.uneditable-input.span1 {
+ width: 50px;
+}
+
+input[disabled],
+select[disabled],
+textarea[disabled],
+input[readonly],
+select[readonly],
+textarea[readonly] {
+ cursor: not-allowed;
+ background-color: #eeeeee;
+ border-color: #ddd;
+}
+
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+input[type="radio"][readonly],
+input[type="checkbox"][readonly] {
+ background-color: transparent;
+}
+
+.control-group.warning > label,
+.control-group.warning .help-block,
+.control-group.warning .help-inline {
+ color: #c09853;
+}
+
+.control-group.warning .checkbox,
+.control-group.warning .radio,
+.control-group.warning input,
+.control-group.warning select,
+.control-group.warning textarea {
+ color: #c09853;
+ border-color: #c09853;
+}
+
+.control-group.warning .checkbox:focus,
+.control-group.warning .radio:focus,
+.control-group.warning input:focus,
+.control-group.warning select:focus,
+.control-group.warning textarea:focus {
+ border-color: #a47e3c;
+ -webkit-box-shadow: 0 0 6px #dbc59e;
+ -moz-box-shadow: 0 0 6px #dbc59e;
+ box-shadow: 0 0 6px #dbc59e;
+}
+
+.control-group.warning .input-prepend .add-on,
+.control-group.warning .input-append .add-on {
+ color: #c09853;
+ background-color: #fcf8e3;
+ border-color: #c09853;
+}
+
+.control-group.error > label,
+.control-group.error .help-block,
+.control-group.error .help-inline {
+ color: #b94a48;
+}
+
+.control-group.error .checkbox,
+.control-group.error .radio,
+.control-group.error input,
+.control-group.error select,
+.control-group.error textarea {
+ color: #b94a48;
+ border-color: #b94a48;
+}
+
+.control-group.error .checkbox:focus,
+.control-group.error .radio:focus,
+.control-group.error input:focus,
+.control-group.error select:focus,
+.control-group.error textarea:focus {
+ border-color: #953b39;
+ -webkit-box-shadow: 0 0 6px #d59392;
+ -moz-box-shadow: 0 0 6px #d59392;
+ box-shadow: 0 0 6px #d59392;
+}
+
+.control-group.error .input-prepend .add-on,
+.control-group.error .input-append .add-on {
+ color: #b94a48;
+ background-color: #f2dede;
+ border-color: #b94a48;
+}
+
+.control-group.success > label,
+.control-group.success .help-block,
+.control-group.success .help-inline {
+ color: #468847;
+}
+
+.control-group.success .checkbox,
+.control-group.success .radio,
+.control-group.success input,
+.control-group.success select,
+.control-group.success textarea {
+ color: #468847;
+ border-color: #468847;
+}
+
+.control-group.success .checkbox:focus,
+.control-group.success .radio:focus,
+.control-group.success input:focus,
+.control-group.success select:focus,
+.control-group.success textarea:focus {
+ border-color: #356635;
+ -webkit-box-shadow: 0 0 6px #7aba7b;
+ -moz-box-shadow: 0 0 6px #7aba7b;
+ box-shadow: 0 0 6px #7aba7b;
+}
+
+.control-group.success .input-prepend .add-on,
+.control-group.success .input-append .add-on {
+ color: #468847;
+ background-color: #dff0d8;
+ border-color: #468847;
+}
+
+input:focus:required:invalid,
+textarea:focus:required:invalid,
+select:focus:required:invalid {
+ color: #b94a48;
+ border-color: #ee5f5b;
+}
+
+input:focus:required:invalid:focus,
+textarea:focus:required:invalid:focus,
+select:focus:required:invalid:focus {
+ border-color: #e9322d;
+ -webkit-box-shadow: 0 0 6px #f8b9b7;
+ -moz-box-shadow: 0 0 6px #f8b9b7;
+ box-shadow: 0 0 6px #f8b9b7;
+}
+
+.form-actions {
+ padding: 17px 20px 18px;
+ margin-top: 18px;
+ margin-bottom: 18px;
+ background-color: #f5f5f5;
+ border-top: 1px solid #e5e5e5;
+ *zoom: 1;
+}
+
+.form-actions:before,
+.form-actions:after {
+ display: table;
+ content: "";
+}
+
+.form-actions:after {
+ clear: both;
+}
+
+.uneditable-input {
+ overflow: hidden;
+ white-space: nowrap;
+ cursor: not-allowed;
+ background-color: #ffffff;
+ border-color: #eee;
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+ -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+}
+
+:-moz-placeholder {
+ color: #999999;
+}
+
+:-ms-input-placeholder {
+ color: #999999;
+}
+
+::-webkit-input-placeholder {
+ color: #999999;
+}
+
+.help-block,
+.help-inline {
+ color: #555555;
+}
+
+.help-block {
+ display: block;
+ margin-bottom: 9px;
+}
+
+.help-inline {
+ display: inline-block;
+ *display: inline;
+ padding-left: 5px;
+ vertical-align: middle;
+ *zoom: 1;
+}
+
+.input-prepend,
+.input-append {
+ margin-bottom: 5px;
+}
+
+.input-prepend input,
+.input-append input,
+.input-prepend select,
+.input-append select,
+.input-prepend .uneditable-input,
+.input-append .uneditable-input {
+ position: relative;
+ margin-bottom: 0;
+ *margin-left: 0;
+ vertical-align: middle;
+ -webkit-border-radius: 0 3px 3px 0;
+ -moz-border-radius: 0 3px 3px 0;
+ border-radius: 0 3px 3px 0;
+}
+
+.input-prepend input:focus,
+.input-append input:focus,
+.input-prepend select:focus,
+.input-append select:focus,
+.input-prepend .uneditable-input:focus,
+.input-append .uneditable-input:focus {
+ z-index: 2;
+}
+
+.input-prepend .uneditable-input,
+.input-append .uneditable-input {
+ border-left-color: #ccc;
+}
+
+.input-prepend .add-on,
+.input-append .add-on {
+ display: inline-block;
+ width: auto;
+ height: 18px;
+ min-width: 16px;
+ padding: 4px 5px;
+ font-weight: normal;
+ line-height: 18px;
+ text-align: center;
+ text-shadow: 0 1px 0 #ffffff;
+ vertical-align: middle;
+ background-color: #eeeeee;
+ border: 1px solid #ccc;
+}
+
+.input-prepend .add-on,
+.input-append .add-on,
+.input-prepend .btn,
+.input-append .btn {
+ margin-left: -1px;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+
+.input-prepend .active,
+.input-append .active {
+ background-color: #a9dba9;
+ border-color: #46a546;
+}
+
+.input-prepend .add-on,
+.input-prepend .btn {
+ margin-right: -1px;
+}
+
+.input-prepend .add-on:first-child,
+.input-prepend .btn:first-child {
+ -webkit-border-radius: 3px 0 0 3px;
+ -moz-border-radius: 3px 0 0 3px;
+ border-radius: 3px 0 0 3px;
+}
+
+.input-append input,
+.input-append select,
+.input-append .uneditable-input {
+ -webkit-border-radius: 3px 0 0 3px;
+ -moz-border-radius: 3px 0 0 3px;
+ border-radius: 3px 0 0 3px;
+}
+
+.input-append .uneditable-input {
+ border-right-color: #ccc;
+ border-left-color: #eee;
+}
+
+.input-append .add-on:last-child,
+.input-append .btn:last-child {
+ -webkit-border-radius: 0 3px 3px 0;
+ -moz-border-radius: 0 3px 3px 0;
+ border-radius: 0 3px 3px 0;
+}
+
+.input-prepend.input-append input,
+.input-prepend.input-append select,
+.input-prepend.input-append .uneditable-input {
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+
+.input-prepend.input-append .add-on:first-child,
+.input-prepend.input-append .btn:first-child {
+ margin-right: -1px;
+ -webkit-border-radius: 3px 0 0 3px;
+ -moz-border-radius: 3px 0 0 3px;
+ border-radius: 3px 0 0 3px;
+}
+
+.input-prepend.input-append .add-on:last-child,
+.input-prepend.input-append .btn:last-child {
+ margin-left: -1px;
+ -webkit-border-radius: 0 3px 3px 0;
+ -moz-border-radius: 0 3px 3px 0;
+ border-radius: 0 3px 3px 0;
+}
+
+.search-query {
+ padding-right: 14px;
+ padding-right: 4px \9;
+ padding-left: 14px;
+ padding-left: 4px \9;
+ /* IE7-8 doesn't have border-radius, so don't indent the padding */
+
+ margin-bottom: 0;
+ -webkit-border-radius: 14px;
+ -moz-border-radius: 14px;
+ border-radius: 14px;
+}
+
+.form-search input,
+.form-inline input,
+.form-horizontal input,
+.form-search textarea,
+.form-inline textarea,
+.form-horizontal textarea,
+.form-search select,
+.form-inline select,
+.form-horizontal select,
+.form-search .help-inline,
+.form-inline .help-inline,
+.form-horizontal .help-inline,
+.form-search .uneditable-input,
+.form-inline .uneditable-input,
+.form-horizontal .uneditable-input,
+.form-search .input-prepend,
+.form-inline .input-prepend,
+.form-horizontal .input-prepend,
+.form-search .input-append,
+.form-inline .input-append,
+.form-horizontal .input-append {
+ display: inline-block;
+ *display: inline;
+ margin-bottom: 0;
+ *zoom: 1;
+}
+
+.form-search .hide,
+.form-inline .hide,
+.form-horizontal .hide {
+ display: none;
+}
+
+.form-search label,
+.form-inline label {
+ display: inline-block;
+}
+
+.form-search .input-append,
+.form-inline .input-append,
+.form-search .input-prepend,
+.form-inline .input-prepend {
+ margin-bottom: 0;
+}
+
+.form-search .radio,
+.form-search .checkbox,
+.form-inline .radio,
+.form-inline .checkbox {
+ padding-left: 0;
+ margin-bottom: 0;
+ vertical-align: middle;
+}
+
+.form-search .radio input[type="radio"],
+.form-search .checkbox input[type="checkbox"],
+.form-inline .radio input[type="radio"],
+.form-inline .checkbox input[type="checkbox"] {
+ float: left;
+ margin-right: 3px;
+ margin-left: 0;
+}
+
+.control-group {
+ margin-bottom: 9px;
+}
+
+legend + .control-group {
+ margin-top: 18px;
+ -webkit-margin-top-collapse: separate;
+}
+
+.form-horizontal .control-group {
+ margin-bottom: 18px;
+ *zoom: 1;
+}
+
+.form-horizontal .control-group:before,
+.form-horizontal .control-group:after {
+ display: table;
+ content: "";
+}
+
+.form-horizontal .control-group:after {
+ clear: both;
+}
+
+.form-horizontal .control-label {
+ float: left;
+ width: 140px;
+ padding-top: 5px;
+ text-align: right;
+}
+
+.form-horizontal .controls {
+ *display: inline-block;
+ *padding-left: 20px;
+ margin-left: 160px;
+ *margin-left: 0;
+}
+
+.form-horizontal .controls:first-child {
+ *padding-left: 160px;
+}
+
+.form-horizontal .help-block {
+ margin-top: 9px;
+ margin-bottom: 0;
+}
+
+.form-horizontal .form-actions {
+ padding-left: 160px;
+}
+
+table {
+ max-width: 100%;
+ background-color: transparent;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+.table {
+ width: 100%;
+ margin-bottom: 18px;
+}
+
+.table th,
+.table td {
+ padding: 8px;
+ line-height: 18px;
+ text-align: left;
+ vertical-align: top;
+ border-top: 1px solid #dddddd;
+}
+
+.table th {
+ font-weight: bold;
+}
+
+.table thead th {
+ vertical-align: bottom;
+}
+
+.table caption + thead tr:first-child th,
+.table caption + thead tr:first-child td,
+.table colgroup + thead tr:first-child th,
+.table colgroup + thead tr:first-child td,
+.table thead:first-child tr:first-child th,
+.table thead:first-child tr:first-child td {
+ border-top: 0;
+}
+
+.table tbody + tbody {
+ border-top: 2px solid #dddddd;
+}
+
+.table-condensed th,
+.table-condensed td {
+ padding: 4px 5px;
+}
+
+.table-bordered {
+ border: 1px solid #dddddd;
+ border-collapse: separate;
+ *border-collapse: collapsed;
+ border-left: 0;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.table-bordered th,
+.table-bordered td {
+ border-left: 1px solid #dddddd;
+}
+
+.table-bordered caption + thead tr:first-child th,
+.table-bordered caption + tbody tr:first-child th,
+.table-bordered caption + tbody tr:first-child td,
+.table-bordered colgroup + thead tr:first-child th,
+.table-bordered colgroup + tbody tr:first-child th,
+.table-bordered colgroup + tbody tr:first-child td,
+.table-bordered thead:first-child tr:first-child th,
+.table-bordered tbody:first-child tr:first-child th,
+.table-bordered tbody:first-child tr:first-child td {
+ border-top: 0;
+}
+
+.table-bordered thead:first-child tr:first-child th:first-child,
+.table-bordered tbody:first-child tr:first-child td:first-child {
+ -webkit-border-top-left-radius: 4px;
+ border-top-left-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+}
+
+.table-bordered thead:first-child tr:first-child th:last-child,
+.table-bordered tbody:first-child tr:first-child td:last-child {
+ -webkit-border-top-right-radius: 4px;
+ border-top-right-radius: 4px;
+ -moz-border-radius-topright: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child th:first-child,
+.table-bordered tbody:last-child tr:last-child td:first-child {
+ -webkit-border-radius: 0 0 0 4px;
+ -moz-border-radius: 0 0 0 4px;
+ border-radius: 0 0 0 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child th:last-child,
+.table-bordered tbody:last-child tr:last-child td:last-child {
+ -webkit-border-bottom-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+}
+
+.table-striped tbody tr:nth-child(odd) td,
+.table-striped tbody tr:nth-child(odd) th {
+ background-color: #f9f9f9;
+}
+
+.table tbody tr:hover td,
+.table tbody tr:hover th {
+ background-color: #f5f5f5;
+}
+
+table .span1 {
+ float: none;
+ width: 44px;
+ margin-left: 0;
+}
+
+table .span2 {
+ float: none;
+ width: 124px;
+ margin-left: 0;
+}
+
+table .span3 {
+ float: none;
+ width: 204px;
+ margin-left: 0;
+}
+
+table .span4 {
+ float: none;
+ width: 284px;
+ margin-left: 0;
+}
+
+table .span5 {
+ float: none;
+ width: 364px;
+ margin-left: 0;
+}
+
+table .span6 {
+ float: none;
+ width: 444px;
+ margin-left: 0;
+}
+
+table .span7 {
+ float: none;
+ width: 524px;
+ margin-left: 0;
+}
+
+table .span8 {
+ float: none;
+ width: 604px;
+ margin-left: 0;
+}
+
+table .span9 {
+ float: none;
+ width: 684px;
+ margin-left: 0;
+}
+
+table .span10 {
+ float: none;
+ width: 764px;
+ margin-left: 0;
+}
+
+table .span11 {
+ float: none;
+ width: 844px;
+ margin-left: 0;
+}
+
+table .span12 {
+ float: none;
+ width: 924px;
+ margin-left: 0;
+}
+
+table .span13 {
+ float: none;
+ width: 1004px;
+ margin-left: 0;
+}
+
+table .span14 {
+ float: none;
+ width: 1084px;
+ margin-left: 0;
+}
+
+table .span15 {
+ float: none;
+ width: 1164px;
+ margin-left: 0;
+}
+
+table .span16 {
+ float: none;
+ width: 1244px;
+ margin-left: 0;
+}
+
+table .span17 {
+ float: none;
+ width: 1324px;
+ margin-left: 0;
+}
+
+table .span18 {
+ float: none;
+ width: 1404px;
+ margin-left: 0;
+}
+
+table .span19 {
+ float: none;
+ width: 1484px;
+ margin-left: 0;
+}
+
+table .span20 {
+ float: none;
+ width: 1564px;
+ margin-left: 0;
+}
+
+table .span21 {
+ float: none;
+ width: 1644px;
+ margin-left: 0;
+}
+
+table .span22 {
+ float: none;
+ width: 1724px;
+ margin-left: 0;
+}
+
+table .span23 {
+ float: none;
+ width: 1804px;
+ margin-left: 0;
+}
+
+table .span24 {
+ float: none;
+ width: 1884px;
+ margin-left: 0;
+}
+
+[class^="icon-"],
+[class*=" icon-"] {
+ display: inline-block;
+ width: 14px;
+ height: 14px;
+ *margin-right: .3em;
+ line-height: 14px;
+ vertical-align: text-top;
+ background-image: url("../img/glyphicons-halflings.png");
+ background-position: 14px 14px;
+ background-repeat: no-repeat;
+}
+
+[class^="icon-"]:last-child,
+[class*=" icon-"]:last-child {
+ *margin-left: 0;
+}
+
+.icon-white {
+ background-image: url("../img/glyphicons-halflings-white.png");
+}
+
+.icon-glass {
+ background-position: 0 0;
+}
+
+.icon-music {
+ background-position: -24px 0;
+}
+
+.icon-search {
+ background-position: -48px 0;
+}
+
+.icon-envelope {
+ background-position: -72px 0;
+}
+
+.icon-heart {
+ background-position: -96px 0;
+}
+
+.icon-star {
+ background-position: -120px 0;
+}
+
+.icon-star-empty {
+ background-position: -144px 0;
+}
+
+.icon-user {
+ background-position: -168px 0;
+}
+
+.icon-film {
+ background-position: -192px 0;
+}
+
+.icon-th-large {
+ background-position: -216px 0;
+}
+
+.icon-th {
+ background-position: -240px 0;
+}
+
+.icon-th-list {
+ background-position: -264px 0;
+}
+
+.icon-ok {
+ background-position: -288px 0;
+}
+
+.icon-remove {
+ background-position: -312px 0;
+}
+
+.icon-zoom-in {
+ background-position: -336px 0;
+}
+
+.icon-zoom-out {
+ background-position: -360px 0;
+}
+
+.icon-off {
+ background-position: -384px 0;
+}
+
+.icon-signal {
+ background-position: -408px 0;
+}
+
+.icon-cog {
+ background-position: -432px 0;
+}
+
+.icon-trash {
+ background-position: -456px 0;
+}
+
+.icon-home {
+ background-position: 0 -24px;
+}
+
+.icon-file {
+ background-position: -24px -24px;
+}
+
+.icon-time {
+ background-position: -48px -24px;
+}
+
+.icon-road {
+ background-position: -72px -24px;
+}
+
+.icon-download-alt {
+ background-position: -96px -24px;
+}
+
+.icon-download {
+ background-position: -120px -24px;
+}
+
+.icon-upload {
+ background-position: -144px -24px;
+}
+
+.icon-inbox {
+ background-position: -168px -24px;
+}
+
+.icon-play-circle {
+ background-position: -192px -24px;
+}
+
+.icon-repeat {
+ background-position: -216px -24px;
+}
+
+.icon-refresh {
+ background-position: -240px -24px;
+}
+
+.icon-list-alt {
+ background-position: -264px -24px;
+}
+
+.icon-lock {
+ background-position: -287px -24px;
+}
+
+.icon-flag {
+ background-position: -312px -24px;
+}
+
+.icon-headphones {
+ background-position: -336px -24px;
+}
+
+.icon-volume-off {
+ background-position: -360px -24px;
+}
+
+.icon-volume-down {
+ background-position: -384px -24px;
+}
+
+.icon-volume-up {
+ background-position: -408px -24px;
+}
+
+.icon-qrcode {
+ background-position: -432px -24px;
+}
+
+.icon-barcode {
+ background-position: -456px -24px;
+}
+
+.icon-tag {
+ background-position: 0 -48px;
+}
+
+.icon-tags {
+ background-position: -25px -48px;
+}
+
+.icon-book {
+ background-position: -48px -48px;
+}
+
+.icon-bookmark {
+ background-position: -72px -48px;
+}
+
+.icon-print {
+ background-position: -96px -48px;
+}
+
+.icon-camera {
+ background-position: -120px -48px;
+}
+
+.icon-font {
+ background-position: -144px -48px;
+}
+
+.icon-bold {
+ background-position: -167px -48px;
+}
+
+.icon-italic {
+ background-position: -192px -48px;
+}
+
+.icon-text-height {
+ background-position: -216px -48px;
+}
+
+.icon-text-width {
+ background-position: -240px -48px;
+}
+
+.icon-align-left {
+ background-position: -264px -48px;
+}
+
+.icon-align-center {
+ background-position: -288px -48px;
+}
+
+.icon-align-right {
+ background-position: -312px -48px;
+}
+
+.icon-align-justify {
+ background-position: -336px -48px;
+}
+
+.icon-list {
+ background-position: -360px -48px;
+}
+
+.icon-indent-left {
+ background-position: -384px -48px;
+}
+
+.icon-indent-right {
+ background-position: -408px -48px;
+}
+
+.icon-facetime-video {
+ background-position: -432px -48px;
+}
+
+.icon-picture {
+ background-position: -456px -48px;
+}
+
+.icon-pencil {
+ background-position: 0 -72px;
+}
+
+.icon-map-marker {
+ background-position: -24px -72px;
+}
+
+.icon-adjust {
+ background-position: -48px -72px;
+}
+
+.icon-tint {
+ background-position: -72px -72px;
+}
+
+.icon-edit {
+ background-position: -96px -72px;
+}
+
+.icon-share {
+ background-position: -120px -72px;
+}
+
+.icon-check {
+ background-position: -144px -72px;
+}
+
+.icon-move {
+ background-position: -168px -72px;
+}
+
+.icon-step-backward {
+ background-position: -192px -72px;
+}
+
+.icon-fast-backward {
+ background-position: -216px -72px;
+}
+
+.icon-backward {
+ background-position: -240px -72px;
+}
+
+.icon-play {
+ background-position: -264px -72px;
+}
+
+.icon-pause {
+ background-position: -288px -72px;
+}
+
+.icon-stop {
+ background-position: -312px -72px;
+}
+
+.icon-forward {
+ background-position: -336px -72px;
+}
+
+.icon-fast-forward {
+ background-position: -360px -72px;
+}
+
+.icon-step-forward {
+ background-position: -384px -72px;
+}
+
+.icon-eject {
+ background-position: -408px -72px;
+}
+
+.icon-chevron-left {
+ background-position: -432px -72px;
+}
+
+.icon-chevron-right {
+ background-position: -456px -72px;
+}
+
+.icon-plus-sign {
+ background-position: 0 -96px;
+}
+
+.icon-minus-sign {
+ background-position: -24px -96px;
+}
+
+.icon-remove-sign {
+ background-position: -48px -96px;
+}
+
+.icon-ok-sign {
+ background-position: -72px -96px;
+}
+
+.icon-question-sign {
+ background-position: -96px -96px;
+}
+
+.icon-info-sign {
+ background-position: -120px -96px;
+}
+
+.icon-screenshot {
+ background-position: -144px -96px;
+}
+
+.icon-remove-circle {
+ background-position: -168px -96px;
+}
+
+.icon-ok-circle {
+ background-position: -192px -96px;
+}
+
+.icon-ban-circle {
+ background-position: -216px -96px;
+}
+
+.icon-arrow-left {
+ background-position: -240px -96px;
+}
+
+.icon-arrow-right {
+ background-position: -264px -96px;
+}
+
+.icon-arrow-up {
+ background-position: -289px -96px;
+}
+
+.icon-arrow-down {
+ background-position: -312px -96px;
+}
+
+.icon-share-alt {
+ background-position: -336px -96px;
+}
+
+.icon-resize-full {
+ background-position: -360px -96px;
+}
+
+.icon-resize-small {
+ background-position: -384px -96px;
+}
+
+.icon-plus {
+ background-position: -408px -96px;
+}
+
+.icon-minus {
+ background-position: -433px -96px;
+}
+
+.icon-asterisk {
+ background-position: -456px -96px;
+}
+
+.icon-exclamation-sign {
+ background-position: 0 -120px;
+}
+
+.icon-gift {
+ background-position: -24px -120px;
+}
+
+.icon-leaf {
+ background-position: -48px -120px;
+}
+
+.icon-fire {
+ background-position: -72px -120px;
+}
+
+.icon-eye-open {
+ background-position: -96px -120px;
+}
+
+.icon-eye-close {
+ background-position: -120px -120px;
+}
+
+.icon-warning-sign {
+ background-position: -144px -120px;
+}
+
+.icon-plane {
+ background-position: -168px -120px;
+}
+
+.icon-calendar {
+ background-position: -192px -120px;
+}
+
+.icon-random {
+ background-position: -216px -120px;
+}
+
+.icon-comment {
+ background-position: -240px -120px;
+}
+
+.icon-magnet {
+ background-position: -264px -120px;
+}
+
+.icon-chevron-up {
+ background-position: -288px -120px;
+}
+
+.icon-chevron-down {
+ background-position: -313px -119px;
+}
+
+.icon-retweet {
+ background-position: -336px -120px;
+}
+
+.icon-shopping-cart {
+ background-position: -360px -120px;
+}
+
+.icon-folder-close {
+ background-position: -384px -120px;
+}
+
+.icon-folder-open {
+ background-position: -408px -120px;
+}
+
+.icon-resize-vertical {
+ background-position: -432px -119px;
+}
+
+.icon-resize-horizontal {
+ background-position: -456px -118px;
+}
+
+.icon-hdd {
+ background-position: 0 -144px;
+}
+
+.icon-bullhorn {
+ background-position: -24px -144px;
+}
+
+.icon-bell {
+ background-position: -48px -144px;
+}
+
+.icon-certificate {
+ background-position: -72px -144px;
+}
+
+.icon-thumbs-up {
+ background-position: -96px -144px;
+}
+
+.icon-thumbs-down {
+ background-position: -120px -144px;
+}
+
+.icon-hand-right {
+ background-position: -144px -144px;
+}
+
+.icon-hand-left {
+ background-position: -168px -144px;
+}
+
+.icon-hand-up {
+ background-position: -192px -144px;
+}
+
+.icon-hand-down {
+ background-position: -216px -144px;
+}
+
+.icon-circle-arrow-right {
+ background-position: -240px -144px;
+}
+
+.icon-circle-arrow-left {
+ background-position: -264px -144px;
+}
+
+.icon-circle-arrow-up {
+ background-position: -288px -144px;
+}
+
+.icon-circle-arrow-down {
+ background-position: -312px -144px;
+}
+
+.icon-globe {
+ background-position: -336px -144px;
+}
+
+.icon-wrench {
+ background-position: -360px -144px;
+}
+
+.icon-tasks {
+ background-position: -384px -144px;
+}
+
+.icon-filter {
+ background-position: -408px -144px;
+}
+
+.icon-briefcase {
+ background-position: -432px -144px;
+}
+
+.icon-fullscreen {
+ background-position: -456px -144px;
+}
+
+.dropup,
+.dropdown {
+ position: relative;
+}
+
+.dropdown-toggle {
+ *margin-bottom: -3px;
+}
+
+.dropdown-toggle:active,
+.open .dropdown-toggle {
+ outline: 0;
+}
+
+.caret {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ vertical-align: top;
+ border-top: 4px solid #000000;
+ border-right: 4px solid transparent;
+ border-left: 4px solid transparent;
+ content: "";
+ opacity: 0.3;
+ filter: alpha(opacity=30);
+}
+
+.dropdown .caret {
+ margin-top: 8px;
+ margin-left: 2px;
+}
+
+.dropdown:hover .caret,
+.open .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+
+.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ display: none;
+ float: left;
+ min-width: 160px;
+ padding: 4px 0;
+ margin: 1px 0 0;
+ list-style: none;
+ background-color: #ffffff;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ *border-right-width: 2px;
+ *border-bottom-width: 2px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+}
+
+.dropdown-menu.pull-right {
+ right: 0;
+ left: auto;
+}
+
+.dropdown-menu .divider {
+ *width: 100%;
+ height: 1px;
+ margin: 8px 1px;
+ *margin: -5px 0 5px;
+ overflow: hidden;
+ background-color: #e5e5e5;
+ border-bottom: 1px solid #ffffff;
+}
+
+.dropdown-menu a {
+ display: block;
+ padding: 3px 15px;
+ clear: both;
+ font-weight: normal;
+ line-height: 18px;
+ color: #333333;
+ white-space: nowrap;
+}
+
+.dropdown-menu li > a:hover,
+.dropdown-menu .active > a,
+.dropdown-menu .active > a:hover {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #0088cc;
+}
+
+.open {
+ *z-index: 1000;
+}
+
+.open > .dropdown-menu {
+ display: block;
+}
+
+.pull-right > .dropdown-menu {
+ right: 0;
+ left: auto;
+}
+
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+ border-top: 0;
+ border-bottom: 4px solid #000000;
+ content: "\2191";
+}
+
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 1px;
+}
+
+.typeahead {
+ margin-top: 2px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.well {
+ min-height: 20px;
+ padding: 19px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border: 1px solid #eee;
+ border: 1px solid rgba(0, 0, 0, 0.05);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+
+.well blockquote {
+ border-color: #ddd;
+ border-color: rgba(0, 0, 0, 0.15);
+}
+
+.well-large {
+ padding: 24px;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+}
+
+.well-small {
+ padding: 9px;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+
+.fade {
+ opacity: 0;
+ -webkit-transition: opacity 0.15s linear;
+ -moz-transition: opacity 0.15s linear;
+ -ms-transition: opacity 0.15s linear;
+ -o-transition: opacity 0.15s linear;
+ transition: opacity 0.15s linear;
+}
+
+.fade.in {
+ opacity: 1;
+}
+
+.collapse {
+ position: relative;
+ height: 0;
+ overflow: hidden;
+ -webkit-transition: height 0.35s ease;
+ -moz-transition: height 0.35s ease;
+ -ms-transition: height 0.35s ease;
+ -o-transition: height 0.35s ease;
+ transition: height 0.35s ease;
+}
+
+.collapse.in {
+ height: auto;
+}
+
+.close {
+ float: right;
+ font-size: 20px;
+ font-weight: bold;
+ line-height: 18px;
+ color: #000000;
+ text-shadow: 0 1px 0 #ffffff;
+ opacity: 0.2;
+ filter: alpha(opacity=20);
+}
+
+.close:hover {
+ color: #000000;
+ text-decoration: none;
+ cursor: pointer;
+ opacity: 0.4;
+ filter: alpha(opacity=40);
+}
+
+button.close {
+ padding: 0;
+ cursor: pointer;
+ background: transparent;
+ border: 0;
+ -webkit-appearance: none;
+}
+
+.btn {
+ display: inline-block;
+ *display: inline;
+ padding: 4px 10px 4px;
+ margin-bottom: 0;
+ *margin-left: .3em;
+ font-size: 13px;
+ line-height: 18px;
+ *line-height: 20px;
+ color: #333333;
+ text-align: center;
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+ vertical-align: middle;
+ cursor: pointer;
+ background-color: #f5f5f5;
+ *background-color: #e6e6e6;
+ background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+ background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+ background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+ background-image: linear-gradient(top, #ffffff, #e6e6e6);
+ background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+ background-repeat: repeat-x;
+ border: 1px solid #cccccc;
+ *border: 0;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+ border-bottom-color: #b3b3b3;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+ filter: progid:dximagetransform.microsoft.gradient(enabled=false);
+ *zoom: 1;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn:hover,
+.btn:active,
+.btn.active,
+.btn.disabled,
+.btn[disabled] {
+ background-color: #e6e6e6;
+ *background-color: #d9d9d9;
+}
+
+.btn:active,
+.btn.active {
+ background-color: #cccccc \9;
+}
+
+.btn:first-child {
+ *margin-left: 0;
+}
+
+.btn:hover {
+ color: #333333;
+ text-decoration: none;
+ background-color: #e6e6e6;
+ *background-color: #d9d9d9;
+ /* Buttons in IE7 don't get borders, so darken on hover */
+
+ background-position: 0 -15px;
+ -webkit-transition: background-position 0.1s linear;
+ -moz-transition: background-position 0.1s linear;
+ -ms-transition: background-position 0.1s linear;
+ -o-transition: background-position 0.1s linear;
+ transition: background-position 0.1s linear;
+}
+
+.btn:focus {
+ outline: thin dotted #333;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+
+.btn.active,
+.btn:active {
+ background-color: #e6e6e6;
+ background-color: #d9d9d9 \9;
+ background-image: none;
+ outline: 0;
+ -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn.disabled,
+.btn[disabled] {
+ cursor: default;
+ background-color: #e6e6e6;
+ background-image: none;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+
+.btn-large {
+ padding: 9px 14px;
+ font-size: 15px;
+ line-height: normal;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+
+.btn-large [class^="icon-"] {
+ margin-top: 1px;
+}
+
+.btn-small {
+ padding: 5px 9px;
+ font-size: 11px;
+ line-height: 16px;
+}
+
+.btn-small [class^="icon-"] {
+ margin-top: -1px;
+}
+
+.btn-mini {
+ padding: 2px 6px;
+ font-size: 11px;
+ line-height: 14px;
+}
+
+.btn-primary,
+.btn-primary:hover,
+.btn-warning,
+.btn-warning:hover,
+.btn-danger,
+.btn-danger:hover,
+.btn-success,
+.btn-success:hover,
+.btn-info,
+.btn-info:hover,
+.btn-inverse,
+.btn-inverse:hover {
+ color: #ffffff;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.btn-primary.active,
+.btn-warning.active,
+.btn-danger.active,
+.btn-success.active,
+.btn-info.active,
+.btn-inverse.active {
+ color: rgba(255, 255, 255, 0.75);
+}
+
+.btn {
+ border-color: #ccc;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+.btn-primary {
+ background-color: #0074cc;
+ *background-color: #0055cc;
+ background-image: -ms-linear-gradient(top, #0088cc, #0055cc);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc));
+ background-image: -webkit-linear-gradient(top, #0088cc, #0055cc);
+ background-image: -o-linear-gradient(top, #0088cc, #0055cc);
+ background-image: -moz-linear-gradient(top, #0088cc, #0055cc);
+ background-image: linear-gradient(top, #0088cc, #0055cc);
+ background-repeat: repeat-x;
+ border-color: #0055cc #0055cc #003580;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0);
+ filter: progid:dximagetransform.microsoft.gradient(enabled=false);
+}
+
+.btn-primary:hover,
+.btn-primary:active,
+.btn-primary.active,
+.btn-primary.disabled,
+.btn-primary[disabled] {
+ background-color: #0055cc;
+ *background-color: #004ab3;
+}
+
+.btn-primary:active,
+.btn-primary.active {
+ background-color: #004099 \9;
+}
+
+.btn-warning {
+ background-color: #faa732;
+ *background-color: #f89406;
+ background-image: -ms-linear-gradient(top, #fbb450, #f89406);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+ background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+ background-image: -o-linear-gradient(top, #fbb450, #f89406);
+ background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+ background-image: linear-gradient(top, #fbb450, #f89406);
+ background-repeat: repeat-x;
+ border-color: #f89406 #f89406 #ad6704;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);
+ filter: progid:dximagetransform.microsoft.gradient(enabled=false);
+}
+
+.btn-warning:hover,
+.btn-warning:active,
+.btn-warning.active,
+.btn-warning.disabled,
+.btn-warning[disabled] {
+ background-color: #f89406;
+ *background-color: #df8505;
+}
+
+.btn-warning:active,
+.btn-warning.active {
+ background-color: #c67605 \9;
+}
+
+.btn-danger {
+ background-color: #da4f49;
+ *background-color: #bd362f;
+ background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+ background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: linear-gradient(top, #ee5f5b, #bd362f);
+ background-repeat: repeat-x;
+ border-color: #bd362f #bd362f #802420;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);
+ filter: progid:dximagetransform.microsoft.gradient(enabled=false);
+}
+
+.btn-danger:hover,
+.btn-danger:active,
+.btn-danger.active,
+.btn-danger.disabled,
+.btn-danger[disabled] {
+ background-color: #bd362f;
+ *background-color: #a9302a;
+}
+
+.btn-danger:active,
+.btn-danger.active {
+ background-color: #942a25 \9;
+}
+
+.btn-success {
+ background-color: #5bb75b;
+ *background-color: #51a351;
+ background-image: -ms-linear-gradient(top, #62c462, #51a351);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+ background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+ background-image: -o-linear-gradient(top, #62c462, #51a351);
+ background-image: -moz-linear-gradient(top, #62c462, #51a351);
+ background-image: linear-gradient(top, #62c462, #51a351);
+ background-repeat: repeat-x;
+ border-color: #51a351 #51a351 #387038;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);
+ filter: progid:dximagetransform.microsoft.gradient(enabled=false);
+}
+
+.btn-success:hover,
+.btn-success:active,
+.btn-success.active,
+.btn-success.disabled,
+.btn-success[disabled] {
+ background-color: #51a351;
+ *background-color: #499249;
+}
+
+.btn-success:active,
+.btn-success.active {
+ background-color: #408140 \9;
+}
+
+.btn-info {
+ background-color: #49afcd;
+ *background-color: #2f96b4;
+ background-image: -ms-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+ background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: linear-gradient(top, #5bc0de, #2f96b4);
+ background-repeat: repeat-x;
+ border-color: #2f96b4 #2f96b4 #1f6377;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);
+ filter: progid:dximagetransform.microsoft.gradient(enabled=false);
+}
+
+.btn-info:hover,
+.btn-info:active,
+.btn-info.active,
+.btn-info.disabled,
+.btn-info[disabled] {
+ background-color: #2f96b4;
+ *background-color: #2a85a0;
+}
+
+.btn-info:active,
+.btn-info.active {
+ background-color: #24748c \9;
+}
+
+.btn-inverse {
+ background-color: #414141;
+ *background-color: #222222;
+ background-image: -ms-linear-gradient(top, #555555, #222222);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));
+ background-image: -webkit-linear-gradient(top, #555555, #222222);
+ background-image: -o-linear-gradient(top, #555555, #222222);
+ background-image: -moz-linear-gradient(top, #555555, #222222);
+ background-image: linear-gradient(top, #555555, #222222);
+ background-repeat: repeat-x;
+ border-color: #222222 #222222 #000000;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#555555', endColorstr='#222222', GradientType=0);
+ filter: progid:dximagetransform.microsoft.gradient(enabled=false);
+}
+
+.btn-inverse:hover,
+.btn-inverse:active,
+.btn-inverse.active,
+.btn-inverse.disabled,
+.btn-inverse[disabled] {
+ background-color: #222222;
+ *background-color: #151515;
+}
+
+.btn-inverse:active,
+.btn-inverse.active {
+ background-color: #080808 \9;
+}
+
+button.btn,
+input[type="submit"].btn {
+ *padding-top: 2px;
+ *padding-bottom: 2px;
+}
+
+button.btn::-moz-focus-inner,
+input[type="submit"].btn::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+}
+
+button.btn.btn-large,
+input[type="submit"].btn.btn-large {
+ *padding-top: 7px;
+ *padding-bottom: 7px;
+}
+
+button.btn.btn-small,
+input[type="submit"].btn.btn-small {
+ *padding-top: 3px;
+ *padding-bottom: 3px;
+}
+
+button.btn.btn-mini,
+input[type="submit"].btn.btn-mini {
+ *padding-top: 1px;
+ *padding-bottom: 1px;
+}
+
+.btn-group {
+ position: relative;
+ *margin-left: .3em;
+ *zoom: 1;
+}
+
+.btn-group:before,
+.btn-group:after {
+ display: table;
+ content: "";
+}
+
+.btn-group:after {
+ clear: both;
+}
+
+.btn-group:first-child {
+ *margin-left: 0;
+}
+
+.btn-group + .btn-group {
+ margin-left: 5px;
+}
+
+.btn-toolbar {
+ margin-top: 9px;
+ margin-bottom: 9px;
+}
+
+.btn-toolbar .btn-group {
+ display: inline-block;
+ *display: inline;
+ /* IE7 inline-block hack */
+
+ *zoom: 1;
+}
+
+.btn-group > .btn {
+ position: relative;
+ float: left;
+ margin-left: -1px;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+
+.btn-group > .btn:first-child {
+ margin-left: 0;
+ -webkit-border-bottom-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+ -webkit-border-top-left-radius: 4px;
+ border-top-left-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ -moz-border-radius-topleft: 4px;
+}
+
+.btn-group > .btn:last-child,
+.btn-group > .dropdown-toggle {
+ -webkit-border-top-right-radius: 4px;
+ border-top-right-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ -moz-border-radius-bottomright: 4px;
+}
+
+.btn-group > .btn.large:first-child {
+ margin-left: 0;
+ -webkit-border-bottom-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+ -webkit-border-top-left-radius: 6px;
+ border-top-left-radius: 6px;
+ -moz-border-radius-bottomleft: 6px;
+ -moz-border-radius-topleft: 6px;
+}
+
+.btn-group > .btn.large:last-child,
+.btn-group > .large.dropdown-toggle {
+ -webkit-border-top-right-radius: 6px;
+ border-top-right-radius: 6px;
+ -webkit-border-bottom-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+ -moz-border-radius-topright: 6px;
+ -moz-border-radius-bottomright: 6px;
+}
+
+.btn-group > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group > .btn:active,
+.btn-group > .btn.active {
+ z-index: 2;
+}
+
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+ outline: 0;
+}
+
+.btn-group > .dropdown-toggle {
+ *padding-top: 4px;
+ padding-right: 8px;
+ *padding-bottom: 4px;
+ padding-left: 8px;
+ -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn-group > .btn-mini.dropdown-toggle {
+ padding-right: 5px;
+ padding-left: 5px;
+}
+
+.btn-group > .btn-small.dropdown-toggle {
+ *padding-top: 4px;
+ *padding-bottom: 4px;
+}
+
+.btn-group > .btn-large.dropdown-toggle {
+ padding-right: 12px;
+ padding-left: 12px;
+}
+
+.btn-group.open .dropdown-toggle {
+ background-image: none;
+ -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.btn-group.open .btn.dropdown-toggle {
+ background-color: #e6e6e6;
+}
+
+.btn-group.open .btn-primary.dropdown-toggle {
+ background-color: #0055cc;
+}
+
+.btn-group.open .btn-warning.dropdown-toggle {
+ background-color: #f89406;
+}
+
+.btn-group.open .btn-danger.dropdown-toggle {
+ background-color: #bd362f;
+}
+
+.btn-group.open .btn-success.dropdown-toggle {
+ background-color: #51a351;
+}
+
+.btn-group.open .btn-info.dropdown-toggle {
+ background-color: #2f96b4;
+}
+
+.btn-group.open .btn-inverse.dropdown-toggle {
+ background-color: #222222;
+}
+
+.btn .caret {
+ margin-top: 7px;
+ margin-left: 0;
+}
+
+.btn:hover .caret,
+.open.btn-group .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+
+.btn-mini .caret {
+ margin-top: 5px;
+}
+
+.btn-small .caret {
+ margin-top: 6px;
+}
+
+.btn-large .caret {
+ margin-top: 6px;
+ border-top-width: 5px;
+ border-right-width: 5px;
+ border-left-width: 5px;
+}
+
+.dropup .btn-large .caret {
+ border-top: 0;
+ border-bottom: 5px solid #000000;
+}
+
+.btn-primary .caret,
+.btn-warning .caret,
+.btn-danger .caret,
+.btn-info .caret,
+.btn-success .caret,
+.btn-inverse .caret {
+ border-top-color: #ffffff;
+ border-bottom-color: #ffffff;
+ opacity: 0.75;
+ filter: alpha(opacity=75);
+}
+
+.alert {
+ padding: 8px 35px 8px 14px;
+ margin-bottom: 18px;
+ color: #c09853;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+ background-color: #fcf8e3;
+ border: 1px solid #fbeed5;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.alert-heading {
+ color: inherit;
+}
+
+.alert .close {
+ position: relative;
+ top: -2px;
+ right: -21px;
+ line-height: 18px;
+}
+
+.alert-success {
+ color: #468847;
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+
+.alert-danger,
+.alert-error {
+ color: #b94a48;
+ background-color: #f2dede;
+ border-color: #eed3d7;
+}
+
+.alert-info {
+ color: #3a87ad;
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+
+.alert-block {
+ padding-top: 14px;
+ padding-bottom: 14px;
+}
+
+.alert-block > p,
+.alert-block > ul {
+ margin-bottom: 0;
+}
+
+.alert-block p + p {
+ margin-top: 5px;
+}
+
+.nav {
+ margin-bottom: 18px;
+ margin-left: 0;
+ list-style: none;
+}
+
+.nav > li > a {
+ display: block;
+}
+
+.nav > li > a:hover {
+ text-decoration: none;
+ background-color: #eeeeee;
+}
+
+.nav > .pull-right {
+ float: right;
+}
+
+.nav .nav-header {
+ display: block;
+ padding: 3px 15px;
+ font-size: 11px;
+ font-weight: bold;
+ line-height: 18px;
+ color: #999999;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+ text-transform: uppercase;
+}
+
+.nav li + .nav-header {
+ margin-top: 9px;
+}
+
+.nav-list {
+ padding-right: 15px;
+ padding-left: 15px;
+ margin-bottom: 0;
+}
+
+.nav-list > li > a,
+.nav-list .nav-header {
+ margin-right: -15px;
+ margin-left: -15px;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+
+.nav-list > li > a {
+ padding: 3px 15px;
+}
+
+.nav-list > .active > a,
+.nav-list > .active > a:hover {
+ color: #ffffff;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+ background-color: #0088cc;
+}
+
+.nav-list [class^="icon-"] {
+ margin-right: 2px;
+}
+
+.nav-list .divider {
+ *width: 100%;
+ height: 1px;
+ margin: 8px 1px;
+ *margin: -5px 0 5px;
+ overflow: hidden;
+ background-color: #e5e5e5;
+ border-bottom: 1px solid #ffffff;
+}
+
+.nav-tabs,
+.nav-pills {
+ *zoom: 1;
+}
+
+.nav-tabs:before,
+.nav-pills:before,
+.nav-tabs:after,
+.nav-pills:after {
+ display: table;
+ content: "";
+}
+
+.nav-tabs:after,
+.nav-pills:after {
+ clear: both;
+}
+
+.nav-tabs > li,
+.nav-pills > li {
+ float: left;
+}
+
+.nav-tabs > li > a,
+.nav-pills > li > a {
+ padding-right: 12px;
+ padding-left: 12px;
+ margin-right: 2px;
+ line-height: 14px;
+}
+
+.nav-tabs {
+ border-bottom: 1px solid #ddd;
+}
+
+.nav-tabs > li {
+ margin-bottom: -1px;
+}
+
+.nav-tabs > li > a {
+ padding-top: 8px;
+ padding-bottom: 8px;
+ line-height: 18px;
+ border: 1px solid transparent;
+ -webkit-border-radius: 4px 4px 0 0;
+ -moz-border-radius: 4px 4px 0 0;
+ border-radius: 4px 4px 0 0;
+}
+
+.nav-tabs > li > a:hover {
+ border-color: #eeeeee #eeeeee #dddddd;
+}
+
+.nav-tabs > .active > a,
+.nav-tabs > .active > a:hover {
+ color: #555555;
+ cursor: default;
+ background-color: #ffffff;
+ border: 1px solid #ddd;
+ border-bottom-color: transparent;
+}
+
+.nav-pills > li > a {
+ padding-top: 8px;
+ padding-bottom: 8px;
+ margin-top: 2px;
+ margin-bottom: 2px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+
+.nav-pills > .active > a,
+.nav-pills > .active > a:hover {
+ color: #ffffff;
+ background-color: #0088cc;
+}
+
+.nav-stacked > li {
+ float: none;
+}
+
+.nav-stacked > li > a {
+ margin-right: 0;
+}
+
+.nav-tabs.nav-stacked {
+ border-bottom: 0;
+}
+
+.nav-tabs.nav-stacked > li > a {
+ border: 1px solid #ddd;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+
+.nav-tabs.nav-stacked > li:first-child > a {
+ -webkit-border-radius: 4px 4px 0 0;
+ -moz-border-radius: 4px 4px 0 0;
+ border-radius: 4px 4px 0 0;
+}
+
+.nav-tabs.nav-stacked > li:last-child > a {
+ -webkit-border-radius: 0 0 4px 4px;
+ -moz-border-radius: 0 0 4px 4px;
+ border-radius: 0 0 4px 4px;
+}
+
+.nav-tabs.nav-stacked > li > a:hover {
+ z-index: 2;
+ border-color: #ddd;
+}
+
+.nav-pills.nav-stacked > li > a {
+ margin-bottom: 3px;
+}
+
+.nav-pills.nav-stacked > li:last-child > a {
+ margin-bottom: 1px;
+}
+
+.nav-tabs .dropdown-menu {
+ -webkit-border-radius: 0 0 5px 5px;
+ -moz-border-radius: 0 0 5px 5px;
+ border-radius: 0 0 5px 5px;
+}
+
+.nav-pills .dropdown-menu {
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.nav-tabs .dropdown-toggle .caret,
+.nav-pills .dropdown-toggle .caret {
+ margin-top: 6px;
+ border-top-color: #0088cc;
+ border-bottom-color: #0088cc;
+}
+
+.nav-tabs .dropdown-toggle:hover .caret,
+.nav-pills .dropdown-toggle:hover .caret {
+ border-top-color: #005580;
+ border-bottom-color: #005580;
+}
+
+.nav-tabs .active .dropdown-toggle .caret,
+.nav-pills .active .dropdown-toggle .caret {
+ border-top-color: #333333;
+ border-bottom-color: #333333;
+}
+
+.nav > .dropdown.active > a:hover {
+ color: #000000;
+ cursor: pointer;
+}
+
+.nav-tabs .open .dropdown-toggle,
+.nav-pills .open .dropdown-toggle,
+.nav > li.dropdown.open.active > a:hover {
+ color: #ffffff;
+ background-color: #999999;
+ border-color: #999999;
+}
+
+.nav li.dropdown.open .caret,
+.nav li.dropdown.open.active .caret,
+.nav li.dropdown.open a:hover .caret {
+ border-top-color: #ffffff;
+ border-bottom-color: #ffffff;
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+
+.tabs-stacked .open > a:hover {
+ border-color: #999999;
+}
+
+.tabbable {
+ *zoom: 1;
+}
+
+.tabbable:before,
+.tabbable:after {
+ display: table;
+ content: "";
+}
+
+.tabbable:after {
+ clear: both;
+}
+
+.tab-content {
+ overflow: auto;
+}
+
+.tabs-below > .nav-tabs,
+.tabs-right > .nav-tabs,
+.tabs-left > .nav-tabs {
+ border-bottom: 0;
+}
+
+.tab-content > .tab-pane,
+.pill-content > .pill-pane {
+ display: none;
+}
+
+.tab-content > .active,
+.pill-content > .active {
+ display: block;
+}
+
+.tabs-below > .nav-tabs {
+ border-top: 1px solid #ddd;
+}
+
+.tabs-below > .nav-tabs > li {
+ margin-top: -1px;
+ margin-bottom: 0;
+}
+
+.tabs-below > .nav-tabs > li > a {
+ -webkit-border-radius: 0 0 4px 4px;
+ -moz-border-radius: 0 0 4px 4px;
+ border-radius: 0 0 4px 4px;
+}
+
+.tabs-below > .nav-tabs > li > a:hover {
+ border-top-color: #ddd;
+ border-bottom-color: transparent;
+}
+
+.tabs-below > .nav-tabs > .active > a,
+.tabs-below > .nav-tabs > .active > a:hover {
+ border-color: transparent #ddd #ddd #ddd;
+}
+
+.tabs-left > .nav-tabs > li,
+.tabs-right > .nav-tabs > li {
+ float: none;
+}
+
+.tabs-left > .nav-tabs > li > a,
+.tabs-right > .nav-tabs > li > a {
+ min-width: 74px;
+ margin-right: 0;
+ margin-bottom: 3px;
+}
+
+.tabs-left > .nav-tabs {
+ float: left;
+ margin-right: 19px;
+ border-right: 1px solid #ddd;
+}
+
+.tabs-left > .nav-tabs > li > a {
+ margin-right: -1px;
+ -webkit-border-radius: 4px 0 0 4px;
+ -moz-border-radius: 4px 0 0 4px;
+ border-radius: 4px 0 0 4px;
+}
+
+.tabs-left > .nav-tabs > li > a:hover {
+ border-color: #eeeeee #dddddd #eeeeee #eeeeee;
+}
+
+.tabs-left > .nav-tabs .active > a,
+.tabs-left > .nav-tabs .active > a:hover {
+ border-color: #ddd transparent #ddd #ddd;
+ *border-right-color: #ffffff;
+}
+
+.tabs-right > .nav-tabs {
+ float: right;
+ margin-left: 19px;
+ border-left: 1px solid #ddd;
+}
+
+.tabs-right > .nav-tabs > li > a {
+ margin-left: -1px;
+ -webkit-border-radius: 0 4px 4px 0;
+ -moz-border-radius: 0 4px 4px 0;
+ border-radius: 0 4px 4px 0;
+}
+
+.tabs-right > .nav-tabs > li > a:hover {
+ border-color: #eeeeee #eeeeee #eeeeee #dddddd;
+}
+
+.tabs-right > .nav-tabs .active > a,
+.tabs-right > .nav-tabs .active > a:hover {
+ border-color: #ddd #ddd #ddd transparent;
+ *border-left-color: #ffffff;
+}
+
+.navbar {
+ *position: relative;
+ *z-index: 2;
+ margin-bottom: 18px;
+ overflow: visible;
+}
+
+.navbar-inner {
+ min-height: 40px;
+ padding-right: 20px;
+ padding-left: 20px;
+ background-color: #2c2c2c;
+ background-image: -moz-linear-gradient(top, #333333, #222222);
+ background-image: -ms-linear-gradient(top, #333333, #222222);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));
+ background-image: -webkit-linear-gradient(top, #333333, #222222);
+ background-image: -o-linear-gradient(top, #333333, #222222);
+ background-image: linear-gradient(top, #333333, #222222);
+ background-repeat: repeat-x;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+
+.navbar .container {
+ width: auto;
+}
+
+.nav-collapse.collapse {
+ height: auto;
+}
+
+.navbar {
+ color: #999999;
+}
+
+.navbar .brand:hover {
+ text-decoration: none;
+}
+
+.navbar .brand {
+ display: block;
+ float: left;
+ padding: 8px 20px 12px;
+ margin-left: -20px;
+ font-size: 20px;
+ font-weight: 200;
+ line-height: 1;
+ color: #999999;
+}
+
+.navbar .navbar-text {
+ margin-bottom: 0;
+ line-height: 40px;
+}
+
+.navbar .navbar-link {
+ color: #999999;
+}
+
+.navbar .navbar-link:hover {
+ color: #ffffff;
+}
+
+.navbar .btn,
+.navbar .btn-group {
+ margin-top: 5px;
+}
+
+.navbar .btn-group .btn {
+ margin: 0;
+}
+
+.navbar-form {
+ margin-bottom: 0;
+ *zoom: 1;
+}
+
+.navbar-form:before,
+.navbar-form:after {
+ display: table;
+ content: "";
+}
+
+.navbar-form:after {
+ clear: both;
+}
+
+.navbar-form input,
+.navbar-form select,
+.navbar-form .radio,
+.navbar-form .checkbox {
+ margin-top: 5px;
+}
+
+.navbar-form input,
+.navbar-form select {
+ display: inline-block;
+ margin-bottom: 0;
+}
+
+.navbar-form input[type="image"],
+.navbar-form input[type="checkbox"],
+.navbar-form input[type="radio"] {
+ margin-top: 3px;
+}
+
+.navbar-form .input-append,
+.navbar-form .input-prepend {
+ margin-top: 6px;
+ white-space: nowrap;
+}
+
+.navbar-form .input-append input,
+.navbar-form .input-prepend input {
+ margin-top: 0;
+}
+
+.navbar-search {
+ position: relative;
+ float: left;
+ margin-top: 6px;
+ margin-bottom: 0;
+}
+
+.navbar-search .search-query {
+ padding: 4px 9px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ font-weight: normal;
+ line-height: 1;
+ color: #ffffff;
+ background-color: #626262;
+ border: 1px solid #151515;
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);
+ -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15);
+ -webkit-transition: none;
+ -moz-transition: none;
+ -ms-transition: none;
+ -o-transition: none;
+ transition: none;
+}
+
+.navbar-search .search-query:-moz-placeholder {
+ color: #cccccc;
+}
+
+.navbar-search .search-query:-ms-input-placeholder {
+ color: #cccccc;
+}
+
+.navbar-search .search-query::-webkit-input-placeholder {
+ color: #cccccc;
+}
+
+.navbar-search .search-query:focus,
+.navbar-search .search-query.focused {
+ padding: 5px 10px;
+ color: #333333;
+ text-shadow: 0 1px 0 #ffffff;
+ background-color: #ffffff;
+ border: 0;
+ outline: 0;
+ -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+ -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+ box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+}
+
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+ position: fixed;
+ right: 0;
+ left: 0;
+ z-index: 1030;
+ margin-bottom: 0;
+}
+
+.navbar-fixed-top .navbar-inner,
+.navbar-fixed-bottom .navbar-inner {
+ padding-right: 0;
+ padding-left: 0;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+
+.navbar-fixed-top .container,
+.navbar-fixed-bottom .container {
+ width: 940px;
+}
+
+.navbar-fixed-top {
+ top: 0;
+}
+
+.navbar-fixed-bottom {
+ bottom: 0;
+}
+
+.navbar .nav {
+ position: relative;
+ left: 0;
+ display: block;
+ float: left;
+ margin: 0 10px 0 0;
+}
+
+.navbar .nav.pull-right {
+ float: right;
+}
+
+.navbar .nav > li {
+ display: block;
+ float: left;
+}
+
+.navbar .nav > li > a {
+ float: none;
+ padding: 9px 10px 11px;
+ line-height: 19px;
+ color: #999999;
+ text-decoration: none;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.navbar .btn {
+ display: inline-block;
+ padding: 4px 10px 4px;
+ margin: 5px 5px 6px;
+ line-height: 18px;
+}
+
+.navbar .btn-group {
+ padding: 5px 5px 6px;
+ margin: 0;
+}
+
+.navbar .nav > li > a:hover {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: transparent;
+}
+
+.navbar .nav .active > a,
+.navbar .nav .active > a:hover {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #222222;
+}
+
+.navbar .divider-vertical {
+ width: 1px;
+ height: 40px;
+ margin: 0 9px;
+ overflow: hidden;
+ background-color: #222222;
+ border-right: 1px solid #333333;
+}
+
+.navbar .nav.pull-right {
+ margin-right: 0;
+ margin-left: 10px;
+}
+
+.navbar .btn-navbar {
+ display: none;
+ float: right;
+ padding: 7px 10px;
+ margin-right: 5px;
+ margin-left: 5px;
+ background-color: #2c2c2c;
+ *background-color: #222222;
+ background-image: -ms-linear-gradient(top, #333333, #222222);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));
+ background-image: -webkit-linear-gradient(top, #333333, #222222);
+ background-image: -o-linear-gradient(top, #333333, #222222);
+ background-image: linear-gradient(top, #333333, #222222);
+ background-image: -moz-linear-gradient(top, #333333, #222222);
+ background-repeat: repeat-x;
+ border-color: #222222 #222222 #000000;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+ filter: progid:dximagetransform.microsoft.gradient(enabled=false);
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+}
+
+.navbar .btn-navbar:hover,
+.navbar .btn-navbar:active,
+.navbar .btn-navbar.active,
+.navbar .btn-navbar.disabled,
+.navbar .btn-navbar[disabled] {
+ background-color: #222222;
+ *background-color: #151515;
+}
+
+.navbar .btn-navbar:active,
+.navbar .btn-navbar.active {
+ background-color: #080808 \9;
+}
+
+.navbar .btn-navbar .icon-bar {
+ display: block;
+ width: 18px;
+ height: 2px;
+ background-color: #f5f5f5;
+ -webkit-border-radius: 1px;
+ -moz-border-radius: 1px;
+ border-radius: 1px;
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.btn-navbar .icon-bar + .icon-bar {
+ margin-top: 3px;
+}
+
+.navbar .dropdown-menu:before {
+ position: absolute;
+ top: -7px;
+ left: 9px;
+ display: inline-block;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid #ccc;
+ border-left: 7px solid transparent;
+ border-bottom-color: rgba(0, 0, 0, 0.2);
+ content: '';
+}
+
+.navbar .dropdown-menu:after {
+ position: absolute;
+ top: -6px;
+ left: 10px;
+ display: inline-block;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid #ffffff;
+ border-left: 6px solid transparent;
+ content: '';
+}
+
+.navbar-fixed-bottom .dropdown-menu:before {
+ top: auto;
+ bottom: -7px;
+ border-top: 7px solid #ccc;
+ border-bottom: 0;
+ border-top-color: rgba(0, 0, 0, 0.2);
+}
+
+.navbar-fixed-bottom .dropdown-menu:after {
+ top: auto;
+ bottom: -6px;
+ border-top: 6px solid #ffffff;
+ border-bottom: 0;
+}
+
+.navbar .nav li.dropdown .dropdown-toggle .caret,
+.navbar .nav li.dropdown.open .caret {
+ border-top-color: #ffffff;
+ border-bottom-color: #ffffff;
+}
+
+.navbar .nav li.dropdown.active .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+
+.navbar .nav li.dropdown.open > .dropdown-toggle,
+.navbar .nav li.dropdown.active > .dropdown-toggle,
+.navbar .nav li.dropdown.open.active > .dropdown-toggle {
+ background-color: transparent;
+}
+
+.navbar .nav li.dropdown.active > .dropdown-toggle:hover {
+ color: #ffffff;
+}
+
+.navbar .pull-right .dropdown-menu,
+.navbar .dropdown-menu.pull-right {
+ right: 0;
+ left: auto;
+}
+
+.navbar .pull-right .dropdown-menu:before,
+.navbar .dropdown-menu.pull-right:before {
+ right: 12px;
+ left: auto;
+}
+
+.navbar .pull-right .dropdown-menu:after,
+.navbar .dropdown-menu.pull-right:after {
+ right: 13px;
+ left: auto;
+}
+
+.breadcrumb {
+ padding: 7px 14px;
+ margin: 0 0 18px;
+ list-style: none;
+ background-color: #fbfbfb;
+ background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));
+ background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: linear-gradient(top, #ffffff, #f5f5f5);
+ background-repeat: repeat-x;
+ border: 1px solid #ddd;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);
+ -webkit-box-shadow: inset 0 1px 0 #ffffff;
+ -moz-box-shadow: inset 0 1px 0 #ffffff;
+ box-shadow: inset 0 1px 0 #ffffff;
+}
+
+.breadcrumb li {
+ display: inline-block;
+ *display: inline;
+ text-shadow: 0 1px 0 #ffffff;
+ *zoom: 1;
+}
+
+.breadcrumb .divider {
+ padding: 0 5px;
+ color: #999999;
+}
+
+.breadcrumb .active a {
+ color: #333333;
+}
+
+.pagination {
+ height: 36px;
+ margin: 18px 0;
+}
+
+.pagination ul {
+ display: inline-block;
+ *display: inline;
+ margin-bottom: 0;
+ margin-left: 0;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ *zoom: 1;
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.pagination li {
+ display: inline;
+}
+
+.pagination a {
+ float: left;
+ padding: 0 14px;
+ line-height: 34px;
+ text-decoration: none;
+ border: 1px solid #ddd;
+ border-left-width: 0;
+}
+
+.pagination a:hover,
+.pagination .active a {
+ background-color: #f5f5f5;
+}
+
+.pagination .active a {
+ color: #999999;
+ cursor: default;
+}
+
+.pagination .disabled span,
+.pagination .disabled a,
+.pagination .disabled a:hover {
+ color: #999999;
+ cursor: default;
+ background-color: transparent;
+}
+
+.pagination li:first-child a {
+ border-left-width: 1px;
+ -webkit-border-radius: 3px 0 0 3px;
+ -moz-border-radius: 3px 0 0 3px;
+ border-radius: 3px 0 0 3px;
+}
+
+.pagination li:last-child a {
+ -webkit-border-radius: 0 3px 3px 0;
+ -moz-border-radius: 0 3px 3px 0;
+ border-radius: 0 3px 3px 0;
+}
+
+.pagination-centered {
+ text-align: center;
+}
+
+.pagination-right {
+ text-align: right;
+}
+
+.pager {
+ margin-bottom: 18px;
+ margin-left: 0;
+ text-align: center;
+ list-style: none;
+ *zoom: 1;
+}
+
+.pager:before,
+.pager:after {
+ display: table;
+ content: "";
+}
+
+.pager:after {
+ clear: both;
+}
+
+.pager li {
+ display: inline;
+}
+
+.pager a {
+ display: inline-block;
+ padding: 5px 14px;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ -webkit-border-radius: 15px;
+ -moz-border-radius: 15px;
+ border-radius: 15px;
+}
+
+.pager a:hover {
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+
+.pager .next a {
+ float: right;
+}
+
+.pager .previous a {
+ float: left;
+}
+
+.pager .disabled a,
+.pager .disabled a:hover {
+ color: #999999;
+ cursor: default;
+ background-color: #fff;
+}
+
+.modal-open .dropdown-menu {
+ z-index: 2050;
+}
+
+.modal-open .dropdown.open {
+ *z-index: 2050;
+}
+
+.modal-open .popover {
+ z-index: 2060;
+}
+
+.modal-open .tooltip {
+ z-index: 2070;
+}
+
+.modal-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1040;
+ background-color: #000000;
+}
+
+.modal-backdrop.fade {
+ opacity: 0;
+}
+
+.modal-backdrop,
+.modal-backdrop.fade.in {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+
+.modal {
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ z-index: 1050;
+ width: 560px;
+ margin: -250px 0 0 -280px;
+ overflow: auto;
+ background-color: #ffffff;
+ border: 1px solid #999;
+ border: 1px solid rgba(0, 0, 0, 0.3);
+ *border: 1px solid #999;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
+}
+
+.modal.fade {
+ top: -25%;
+ -webkit-transition: opacity 0.3s linear, top 0.3s ease-out;
+ -moz-transition: opacity 0.3s linear, top 0.3s ease-out;
+ -ms-transition: opacity 0.3s linear, top 0.3s ease-out;
+ -o-transition: opacity 0.3s linear, top 0.3s ease-out;
+ transition: opacity 0.3s linear, top 0.3s ease-out;
+}
+
+.modal.fade.in {
+ top: 50%;
+}
+
+.modal-header {
+ padding: 9px 15px;
+ border-bottom: 1px solid #eee;
+}
+
+.modal-header .close {
+ margin-top: 2px;
+}
+
+.modal-body {
+ max-height: 400px;
+ padding: 15px;
+ overflow-y: auto;
+}
+
+.modal-form {
+ margin-bottom: 0;
+}
+
+.modal-footer {
+ padding: 14px 15px 15px;
+ margin-bottom: 0;
+ text-align: right;
+ background-color: #f5f5f5;
+ border-top: 1px solid #ddd;
+ -webkit-border-radius: 0 0 6px 6px;
+ -moz-border-radius: 0 0 6px 6px;
+ border-radius: 0 0 6px 6px;
+ *zoom: 1;
+ -webkit-box-shadow: inset 0 1px 0 #ffffff;
+ -moz-box-shadow: inset 0 1px 0 #ffffff;
+ box-shadow: inset 0 1px 0 #ffffff;
+}
+
+.modal-footer:before,
+.modal-footer:after {
+ display: table;
+ content: "";
+}
+
+.modal-footer:after {
+ clear: both;
+}
+
+.modal-footer .btn + .btn {
+ margin-bottom: 0;
+ margin-left: 5px;
+}
+
+.modal-footer .btn-group .btn + .btn {
+ margin-left: -1px;
+}
+
+.tooltip {
+ position: absolute;
+ z-index: 1020;
+ display: block;
+ padding: 5px;
+ font-size: 11px;
+ opacity: 0;
+ filter: alpha(opacity=0);
+ visibility: visible;
+}
+
+.tooltip.in {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+
+.tooltip.top {
+ margin-top: -2px;
+}
+
+.tooltip.right {
+ margin-left: 2px;
+}
+
+.tooltip.bottom {
+ margin-top: 2px;
+}
+
+.tooltip.left {
+ margin-left: -2px;
+}
+
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-top: 5px solid #000000;
+ border-right: 5px solid transparent;
+ border-left: 5px solid transparent;
+}
+
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+ border-left: 5px solid transparent;
+}
+
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-right: 5px solid #000000;
+ border-bottom: 5px solid transparent;
+}
+
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 8px;
+ color: #ffffff;
+ text-align: center;
+ text-decoration: none;
+ background-color: #000000;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.tooltip-arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ padding: 5px;
+}
+
+.popover.top {
+ margin-top: -5px;
+}
+
+.popover.right {
+ margin-left: 5px;
+}
+
+.popover.bottom {
+ margin-top: 5px;
+}
+
+.popover.left {
+ margin-left: -5px;
+}
+
+.popover.top .arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-top: 5px solid #000000;
+ border-right: 5px solid transparent;
+ border-left: 5px solid transparent;
+}
+
+.popover.right .arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-right: 5px solid #000000;
+ border-bottom: 5px solid transparent;
+}
+
+.popover.bottom .arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+ border-left: 5px solid transparent;
+}
+
+.popover.left .arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+
+.popover .arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+
+.popover-inner {
+ width: 280px;
+ padding: 3px;
+ overflow: hidden;
+ background: #000000;
+ background: rgba(0, 0, 0, 0.8);
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+}
+
+.popover-title {
+ padding: 9px 15px;
+ line-height: 1;
+ background-color: #f5f5f5;
+ border-bottom: 1px solid #eee;
+ -webkit-border-radius: 3px 3px 0 0;
+ -moz-border-radius: 3px 3px 0 0;
+ border-radius: 3px 3px 0 0;
+}
+
+.popover-content {
+ padding: 14px;
+ background-color: #ffffff;
+ -webkit-border-radius: 0 0 3px 3px;
+ -moz-border-radius: 0 0 3px 3px;
+ border-radius: 0 0 3px 3px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
+}
+
+.popover-content p,
+.popover-content ul,
+.popover-content ol {
+ margin-bottom: 0;
+}
+
+.thumbnails {
+ margin-left: -20px;
+ list-style: none;
+ *zoom: 1;
+}
+
+.thumbnails:before,
+.thumbnails:after {
+ display: table;
+ content: "";
+}
+
+.thumbnails:after {
+ clear: both;
+}
+
+.row-fluid .thumbnails {
+ margin-left: 0;
+}
+
+.thumbnails > li {
+ float: left;
+ margin-bottom: 18px;
+ margin-left: 20px;
+}
+
+.thumbnail {
+ display: block;
+ padding: 4px;
+ line-height: 1;
+ border: 1px solid #ddd;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+a.thumbnail:hover {
+ border-color: #0088cc;
+ -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
+ -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
+ box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
+}
+
+.thumbnail > img {
+ display: block;
+ max-width: 100%;
+ margin-right: auto;
+ margin-left: auto;
+}
+
+.thumbnail .caption {
+ padding: 9px;
+}
+
+.label,
+.badge {
+ font-size: 10.998px;
+ font-weight: bold;
+ line-height: 14px;
+ color: #ffffff;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ white-space: nowrap;
+ vertical-align: baseline;
+ background-color: #999999;
+}
+
+.label {
+ padding: 1px 4px 2px;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+
+.badge {
+ padding: 1px 9px 2px;
+ -webkit-border-radius: 9px;
+ -moz-border-radius: 9px;
+ border-radius: 9px;
+}
+
+a.label:hover,
+a.badge:hover {
+ color: #ffffff;
+ text-decoration: none;
+ cursor: pointer;
+}
+
+.label-important,
+.badge-important {
+ background-color: #b94a48;
+}
+
+.label-important[href],
+.badge-important[href] {
+ background-color: #953b39;
+}
+
+.label-warning,
+.badge-warning {
+ background-color: #f89406;
+}
+
+.label-warning[href],
+.badge-warning[href] {
+ background-color: #c67605;
+}
+
+.label-success,
+.badge-success {
+ background-color: #468847;
+}
+
+.label-success[href],
+.badge-success[href] {
+ background-color: #356635;
+}
+
+.label-info,
+.badge-info {
+ background-color: #3a87ad;
+}
+
+.label-info[href],
+.badge-info[href] {
+ background-color: #2d6987;
+}
+
+.label-inverse,
+.badge-inverse {
+ background-color: #333333;
+}
+
+.label-inverse[href],
+.badge-inverse[href] {
+ background-color: #1a1a1a;
+}
+
+@-webkit-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+
+@-moz-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+
+@-ms-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+
+@-o-keyframes progress-bar-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 40px 0;
+ }
+}
+
+@keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+
+.progress {
+ height: 18px;
+ margin-bottom: 18px;
+ overflow: hidden;
+ background-color: #f7f7f7;
+ background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
+ background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
+ background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
+ background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
+ background-image: linear-gradient(top, #f5f5f5, #f9f9f9);
+ background-repeat: repeat-x;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+}
+
+.progress .bar {
+ width: 0;
+ height: 18px;
+ font-size: 12px;
+ color: #ffffff;
+ text-align: center;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ background-color: #0e90d2;
+ background-image: -moz-linear-gradient(top, #149bdf, #0480be);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));
+ background-image: -webkit-linear-gradient(top, #149bdf, #0480be);
+ background-image: -o-linear-gradient(top, #149bdf, #0480be);
+ background-image: linear-gradient(top, #149bdf, #0480be);
+ background-image: -ms-linear-gradient(top, #149bdf, #0480be);
+ background-repeat: repeat-x;
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0);
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+ -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ -webkit-transition: width 0.6s ease;
+ -moz-transition: width 0.6s ease;
+ -ms-transition: width 0.6s ease;
+ -o-transition: width 0.6s ease;
+ transition: width 0.6s ease;
+}
+
+.progress-striped .bar {
+ background-color: #149bdf;
+ background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ -webkit-background-size: 40px 40px;
+ -moz-background-size: 40px 40px;
+ -o-background-size: 40px 40px;
+ background-size: 40px 40px;
+}
+
+.progress.active .bar {
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
+ -moz-animation: progress-bar-stripes 2s linear infinite;
+ -ms-animation: progress-bar-stripes 2s linear infinite;
+ -o-animation: progress-bar-stripes 2s linear infinite;
+ animation: progress-bar-stripes 2s linear infinite;
+}
+
+.progress-danger .bar {
+ background-color: #dd514c;
+ background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+ background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));
+ background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
+ background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
+ background-image: linear-gradient(top, #ee5f5b, #c43c35);
+ background-repeat: repeat-x;
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+}
+
+.progress-danger.progress-striped .bar {
+ background-color: #ee5f5b;
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.progress-success .bar {
+ background-color: #5eb95e;
+ background-image: -moz-linear-gradient(top, #62c462, #57a957);
+ background-image: -ms-linear-gradient(top, #62c462, #57a957);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));
+ background-image: -webkit-linear-gradient(top, #62c462, #57a957);
+ background-image: -o-linear-gradient(top, #62c462, #57a957);
+ background-image: linear-gradient(top, #62c462, #57a957);
+ background-repeat: repeat-x;
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
+}
+
+.progress-success.progress-striped .bar {
+ background-color: #62c462;
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.progress-info .bar {
+ background-color: #4bb1cf;
+ background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
+ background-image: -ms-linear-gradient(top, #5bc0de, #339bb9);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));
+ background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
+ background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
+ background-image: linear-gradient(top, #5bc0de, #339bb9);
+ background-repeat: repeat-x;
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);
+}
+
+.progress-info.progress-striped .bar {
+ background-color: #5bc0de;
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.progress-warning .bar {
+ background-color: #faa732;
+ background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+ background-image: -ms-linear-gradient(top, #fbb450, #f89406);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+ background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+ background-image: -o-linear-gradient(top, #fbb450, #f89406);
+ background-image: linear-gradient(top, #fbb450, #f89406);
+ background-repeat: repeat-x;
+ filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);
+}
+
+.progress-warning.progress-striped .bar {
+ background-color: #fbb450;
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
+ background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+
+.accordion {
+ margin-bottom: 18px;
+}
+
+.accordion-group {
+ margin-bottom: 2px;
+ border: 1px solid #e5e5e5;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.accordion-heading {
+ border-bottom: 0;
+}
+
+.accordion-heading .accordion-toggle {
+ display: block;
+ padding: 8px 15px;
+}
+
+.accordion-toggle {
+ cursor: pointer;
+}
+
+.accordion-inner {
+ padding: 9px 15px;
+ border-top: 1px solid #e5e5e5;
+}
+
+.carousel {
+ position: relative;
+ margin-bottom: 18px;
+ line-height: 1;
+}
+
+.carousel-inner {
+ position: relative;
+ width: 100%;
+ overflow: hidden;
+}
+
+.carousel .item {
+ position: relative;
+ display: none;
+ -webkit-transition: 0.6s ease-in-out left;
+ -moz-transition: 0.6s ease-in-out left;
+ -ms-transition: 0.6s ease-in-out left;
+ -o-transition: 0.6s ease-in-out left;
+ transition: 0.6s ease-in-out left;
+}
+
+.carousel .item > img {
+ display: block;
+ line-height: 1;
+}
+
+.carousel .active,
+.carousel .next,
+.carousel .prev {
+ display: block;
+}
+
+.carousel .active {
+ left: 0;
+}
+
+.carousel .next,
+.carousel .prev {
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+
+.carousel .next {
+ left: 100%;
+}
+
+.carousel .prev {
+ left: -100%;
+}
+
+.carousel .next.left,
+.carousel .prev.right {
+ left: 0;
+}
+
+.carousel .active.left {
+ left: -100%;
+}
+
+.carousel .active.right {
+ left: 100%;
+}
+
+.carousel-control {
+ position: absolute;
+ top: 40%;
+ left: 15px;
+ width: 40px;
+ height: 40px;
+ margin-top: -20px;
+ font-size: 60px;
+ font-weight: 100;
+ line-height: 30px;
+ color: #ffffff;
+ text-align: center;
+ background: #222222;
+ border: 3px solid #ffffff;
+ -webkit-border-radius: 23px;
+ -moz-border-radius: 23px;
+ border-radius: 23px;
+ opacity: 0.5;
+ filter: alpha(opacity=50);
+}
+
+.carousel-control.right {
+ right: 15px;
+ left: auto;
+}
+
+.carousel-control:hover {
+ color: #ffffff;
+ text-decoration: none;
+ opacity: 0.9;
+ filter: alpha(opacity=90);
+}
+
+.carousel-caption {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ padding: 10px 15px 5px;
+ background: #333333;
+ background: rgba(0, 0, 0, 0.75);
+}
+
+.carousel-caption h4,
+.carousel-caption p {
+ color: #ffffff;
+}
+
+.hero-unit {
+ padding: 60px;
+ margin-bottom: 30px;
+ background-color: #eeeeee;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+}
+
+.hero-unit h1 {
+ margin-bottom: 0;
+ font-size: 60px;
+ line-height: 1;
+ letter-spacing: -1px;
+ color: inherit;
+}
+
+.hero-unit p {
+ font-size: 18px;
+ font-weight: 200;
+ line-height: 27px;
+ color: inherit;
+}
+
+.pull-right {
+ float: right;
+}
+
+.pull-left {
+ float: left;
+}
+
+.hide {
+ display: none;
+}
+
+.show {
+ display: block;
+}
+
+.invisible {
+ visibility: hidden;
+}
diff --git a/src/main/resources/bootstrap/img/glyphicons-halflings-white.png b/src/main/resources/bootstrap/img/glyphicons-halflings-white.png
new file mode 100644
index 00000000..3bf6484a
--- /dev/null
+++ b/src/main/resources/bootstrap/img/glyphicons-halflings-white.png
Binary files differ
diff --git a/src/main/resources/bootstrap/img/glyphicons-halflings.png b/src/main/resources/bootstrap/img/glyphicons-halflings.png
new file mode 100644
index 00000000..79bc568c
--- /dev/null
+++ b/src/main/resources/bootstrap/img/glyphicons-halflings.png
Binary files differ
diff --git a/src/main/resources/bootstrap/js/bootstrap.js b/src/main/resources/bootstrap/js/bootstrap.js
new file mode 100644
index 00000000..5d6e65b8
--- /dev/null
+++ b/src/main/resources/bootstrap/js/bootstrap.js
@@ -0,0 +1,1825 @@
+/* ===================================================
+ * bootstrap-transition.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
+ * ===================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ $(function () {
+
+ "use strict"; // jshint ;_;
+
+
+ /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
+ * ======================================================= */
+
+ $.support.transition = (function () {
+
+ var transitionEnd = (function () {
+
+ var el = document.createElement('bootstrap')
+ , transEndEventNames = {
+ 'WebkitTransition' : 'webkitTransitionEnd'
+ , 'MozTransition' : 'transitionend'
+ , 'OTransition' : 'oTransitionEnd'
+ , 'msTransition' : 'MSTransitionEnd'
+ , 'transition' : 'transitionend'
+ }
+ , name
+
+ for (name in transEndEventNames){
+ if (el.style[name] !== undefined) {
+ return transEndEventNames[name]
+ }
+ }
+
+ }())
+
+ return transitionEnd && {
+ end: transitionEnd
+ }
+
+ })()
+
+ })
+
+}(window.jQuery);/* ==========================================================
+ * bootstrap-alert.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* ALERT CLASS DEFINITION
+ * ====================== */
+
+ var dismiss = '[data-dismiss="alert"]'
+ , Alert = function (el) {
+ $(el).on('click', dismiss, this.close)
+ }
+
+ Alert.prototype.close = function (e) {
+ var $this = $(this)
+ , selector = $this.attr('data-target')
+ , $parent
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ $parent = $(selector)
+
+ e && e.preventDefault()
+
+ $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
+
+ $parent.trigger(e = $.Event('close'))
+
+ if (e.isDefaultPrevented()) return
+
+ $parent.removeClass('in')
+
+ function removeElement() {
+ $parent
+ .trigger('closed')
+ .remove()
+ }
+
+ $.support.transition && $parent.hasClass('fade') ?
+ $parent.on($.support.transition.end, removeElement) :
+ removeElement()
+ }
+
+
+ /* ALERT PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.alert = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('alert')
+ if (!data) $this.data('alert', (data = new Alert(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ $.fn.alert.Constructor = Alert
+
+
+ /* ALERT DATA-API
+ * ============== */
+
+ $(function () {
+ $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
+ })
+
+}(window.jQuery);/* ============================================================
+ * bootstrap-button.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* BUTTON PUBLIC CLASS DEFINITION
+ * ============================== */
+
+ var Button = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, $.fn.button.defaults, options)
+ }
+
+ Button.prototype.setState = function (state) {
+ var d = 'disabled'
+ , $el = this.$element
+ , data = $el.data()
+ , val = $el.is('input') ? 'val' : 'html'
+
+ state = state + 'Text'
+ data.resetText || $el.data('resetText', $el[val]())
+
+ $el[val](data[state] || this.options[state])
+
+ // push to event loop to allow forms to submit
+ setTimeout(function () {
+ state == 'loadingText' ?
+ $el.addClass(d).attr(d, d) :
+ $el.removeClass(d).removeAttr(d)
+ }, 0)
+ }
+
+ Button.prototype.toggle = function () {
+ var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
+
+ $parent && $parent
+ .find('.active')
+ .removeClass('active')
+
+ this.$element.toggleClass('active')
+ }
+
+
+ /* BUTTON PLUGIN DEFINITION
+ * ======================== */
+
+ $.fn.button = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('button')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('button', (data = new Button(this, options)))
+ if (option == 'toggle') data.toggle()
+ else if (option) data.setState(option)
+ })
+ }
+
+ $.fn.button.defaults = {
+ loadingText: 'loading...'
+ }
+
+ $.fn.button.Constructor = Button
+
+
+ /* BUTTON DATA-API
+ * =============== */
+
+ $(function () {
+ $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
+ var $btn = $(e.target)
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+ $btn.button('toggle')
+ })
+ })
+
+}(window.jQuery);/* ==========================================================
+ * bootstrap-carousel.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#carousel
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* CAROUSEL CLASS DEFINITION
+ * ========================= */
+
+ var Carousel = function (element, options) {
+ this.$element = $(element)
+ this.options = options
+ this.options.slide && this.slide(this.options.slide)
+ this.options.pause == 'hover' && this.$element
+ .on('mouseenter', $.proxy(this.pause, this))
+ .on('mouseleave', $.proxy(this.cycle, this))
+ }
+
+ Carousel.prototype = {
+
+ cycle: function (e) {
+ if (!e) this.paused = false
+ this.options.interval
+ && !this.paused
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+ return this
+ }
+
+ , to: function (pos) {
+ var $active = this.$element.find('.active')
+ , children = $active.parent().children()
+ , activePos = children.index($active)
+ , that = this
+
+ if (pos > (children.length - 1) || pos < 0) return
+
+ if (this.sliding) {
+ return this.$element.one('slid', function () {
+ that.to(pos)
+ })
+ }
+
+ if (activePos == pos) {
+ return this.pause().cycle()
+ }
+
+ return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
+ }
+
+ , pause: function (e) {
+ if (!e) this.paused = true
+ clearInterval(this.interval)
+ this.interval = null
+ return this
+ }
+
+ , next: function () {
+ if (this.sliding) return
+ return this.slide('next')
+ }
+
+ , prev: function () {
+ if (this.sliding) return
+ return this.slide('prev')
+ }
+
+ , slide: function (type, next) {
+ var $active = this.$element.find('.active')
+ , $next = next || $active[type]()
+ , isCycling = this.interval
+ , direction = type == 'next' ? 'left' : 'right'
+ , fallback = type == 'next' ? 'first' : 'last'
+ , that = this
+ , e = $.Event('slide')
+
+ this.sliding = true
+
+ isCycling && this.pause()
+
+ $next = $next.length ? $next : this.$element.find('.item')[fallback]()
+
+ if ($next.hasClass('active')) return
+
+ if ($.support.transition && this.$element.hasClass('slide')) {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
+ $next.addClass(type)
+ $next[0].offsetWidth // force reflow
+ $active.addClass(direction)
+ $next.addClass(direction)
+ this.$element.one($.support.transition.end, function () {
+ $next.removeClass([type, direction].join(' ')).addClass('active')
+ $active.removeClass(['active', direction].join(' '))
+ that.sliding = false
+ setTimeout(function () { that.$element.trigger('slid') }, 0)
+ })
+ } else {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
+ $active.removeClass('active')
+ $next.addClass('active')
+ this.sliding = false
+ this.$element.trigger('slid')
+ }
+
+ isCycling && this.cycle()
+
+ return this
+ }
+
+ }
+
+
+ /* CAROUSEL PLUGIN DEFINITION
+ * ========================== */
+
+ $.fn.carousel = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('carousel')
+ , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
+ if (!data) $this.data('carousel', (data = new Carousel(this, options)))
+ if (typeof option == 'number') data.to(option)
+ else if (typeof option == 'string' || (option = options.slide)) data[option]()
+ else if (options.interval) data.cycle()
+ })
+ }
+
+ $.fn.carousel.defaults = {
+ interval: 5000
+ , pause: 'hover'
+ }
+
+ $.fn.carousel.Constructor = Carousel
+
+
+ /* CAROUSEL DATA-API
+ * ================= */
+
+ $(function () {
+ $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
+ var $this = $(this), href
+ , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+ , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
+ $target.carousel(options)
+ e.preventDefault()
+ })
+ })
+
+}(window.jQuery);/* =============================================================
+ * bootstrap-collapse.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* COLLAPSE PUBLIC CLASS DEFINITION
+ * ================================ */
+
+ var Collapse = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, $.fn.collapse.defaults, options)
+
+ if (this.options.parent) {
+ this.$parent = $(this.options.parent)
+ }
+
+ this.options.toggle && this.toggle()
+ }
+
+ Collapse.prototype = {
+
+ constructor: Collapse
+
+ , dimension: function () {
+ var hasWidth = this.$element.hasClass('width')
+ return hasWidth ? 'width' : 'height'
+ }
+
+ , show: function () {
+ var dimension
+ , scroll
+ , actives
+ , hasData
+
+ if (this.transitioning) return
+
+ dimension = this.dimension()
+ scroll = $.camelCase(['scroll', dimension].join('-'))
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
+
+ if (actives && actives.length) {
+ hasData = actives.data('collapse')
+ if (hasData && hasData.transitioning) return
+ actives.collapse('hide')
+ hasData || actives.data('collapse', null)
+ }
+
+ this.$element[dimension](0)
+ this.transition('addClass', $.Event('show'), 'shown')
+ this.$element[dimension](this.$element[0][scroll])
+ }
+
+ , hide: function () {
+ var dimension
+ if (this.transitioning) return
+ dimension = this.dimension()
+ this.reset(this.$element[dimension]())
+ this.transition('removeClass', $.Event('hide'), 'hidden')
+ this.$element[dimension](0)
+ }
+
+ , reset: function (size) {
+ var dimension = this.dimension()
+
+ this.$element
+ .removeClass('collapse')
+ [dimension](size || 'auto')
+ [0].offsetWidth
+
+ this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
+
+ return this
+ }
+
+ , transition: function (method, startEvent, completeEvent) {
+ var that = this
+ , complete = function () {
+ if (startEvent.type == 'show') that.reset()
+ that.transitioning = 0
+ that.$element.trigger(completeEvent)
+ }
+
+ this.$element.trigger(startEvent)
+
+ if (startEvent.isDefaultPrevented()) return
+
+ this.transitioning = 1
+
+ this.$element[method]('in')
+
+ $.support.transition && this.$element.hasClass('collapse') ?
+ this.$element.one($.support.transition.end, complete) :
+ complete()
+ }
+
+ , toggle: function () {
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
+ }
+
+ }
+
+
+ /* COLLAPSIBLE PLUGIN DEFINITION
+ * ============================== */
+
+ $.fn.collapse = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('collapse')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('collapse', (data = new Collapse(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.collapse.defaults = {
+ toggle: true
+ }
+
+ $.fn.collapse.Constructor = Collapse
+
+
+ /* COLLAPSIBLE DATA-API
+ * ==================== */
+
+ $(function () {
+ $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
+ var $this = $(this), href
+ , target = $this.attr('data-target')
+ || e.preventDefault()
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
+ , option = $(target).data('collapse') ? 'toggle' : $this.data()
+ $(target).collapse(option)
+ })
+ })
+
+}(window.jQuery);/* ============================================================
+ * bootstrap-dropdown.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* DROPDOWN CLASS DEFINITION
+ * ========================= */
+
+ var toggle = '[data-toggle="dropdown"]'
+ , Dropdown = function (element) {
+ var $el = $(element).on('click.dropdown.data-api', this.toggle)
+ $('html').on('click.dropdown.data-api', function () {
+ $el.parent().removeClass('open')
+ })
+ }
+
+ Dropdown.prototype = {
+
+ constructor: Dropdown
+
+ , toggle: function (e) {
+ var $this = $(this)
+ , $parent
+ , selector
+ , isActive
+
+ if ($this.is('.disabled, :disabled')) return
+
+ selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ $parent = $(selector)
+ $parent.length || ($parent = $this.parent())
+
+ isActive = $parent.hasClass('open')
+
+ clearMenus()
+
+ if (!isActive) $parent.toggleClass('open')
+
+ return false
+ }
+
+ }
+
+ function clearMenus() {
+ $(toggle).parent().removeClass('open')
+ }
+
+
+ /* DROPDOWN PLUGIN DEFINITION
+ * ========================== */
+
+ $.fn.dropdown = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('dropdown')
+ if (!data) $this.data('dropdown', (data = new Dropdown(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ $.fn.dropdown.Constructor = Dropdown
+
+
+ /* APPLY TO STANDARD DROPDOWN ELEMENTS
+ * =================================== */
+
+ $(function () {
+ $('html').on('click.dropdown.data-api', clearMenus)
+ $('body')
+ .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+ })
+
+}(window.jQuery);/* =========================================================
+ * bootstrap-modal.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#modals
+ * =========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================= */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* MODAL CLASS DEFINITION
+ * ====================== */
+
+ var Modal = function (content, options) {
+ this.options = options
+ this.$element = $(content)
+ .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
+ }
+
+ Modal.prototype = {
+
+ constructor: Modal
+
+ , toggle: function () {
+ return this[!this.isShown ? 'show' : 'hide']()
+ }
+
+ , show: function () {
+ var that = this
+ , e = $.Event('show')
+
+ this.$element.trigger(e)
+
+ if (this.isShown || e.isDefaultPrevented()) return
+
+ $('body').addClass('modal-open')
+
+ this.isShown = true
+
+ escape.call(this)
+ backdrop.call(this, function () {
+ var transition = $.support.transition && that.$element.hasClass('fade')
+
+ if (!that.$element.parent().length) {
+ that.$element.appendTo(document.body) //don't move modals dom position
+ }
+
+ that.$element
+ .show()
+
+ if (transition) {
+ that.$element[0].offsetWidth // force reflow
+ }
+
+ that.$element.addClass('in')
+
+ transition ?
+ that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
+ that.$element.trigger('shown')
+
+ })
+ }
+
+ , hide: function (e) {
+ e && e.preventDefault()
+
+ var that = this
+
+ e = $.Event('hide')
+
+ this.$element.trigger(e)
+
+ if (!this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = false
+
+ $('body').removeClass('modal-open')
+
+ escape.call(this)
+
+ this.$element.removeClass('in')
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ hideWithTransition.call(this) :
+ hideModal.call(this)
+ }
+
+ }
+
+
+ /* MODAL PRIVATE METHODS
+ * ===================== */
+
+ function hideWithTransition() {
+ var that = this
+ , timeout = setTimeout(function () {
+ that.$element.off($.support.transition.end)
+ hideModal.call(that)
+ }, 500)
+
+ this.$element.one($.support.transition.end, function () {
+ clearTimeout(timeout)
+ hideModal.call(that)
+ })
+ }
+
+ function hideModal(that) {
+ this.$element
+ .hide()
+ .trigger('hidden')
+
+ backdrop.call(this)
+ }
+
+ function backdrop(callback) {
+ var that = this
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+ if (this.isShown && this.options.backdrop) {
+ var doAnimate = $.support.transition && animate
+
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+ .appendTo(document.body)
+
+ if (this.options.backdrop != 'static') {
+ this.$backdrop.click($.proxy(this.hide, this))
+ }
+
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+ this.$backdrop.addClass('in')
+
+ doAnimate ?
+ this.$backdrop.one($.support.transition.end, callback) :
+ callback()
+
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass('in')
+
+ $.support.transition && this.$element.hasClass('fade')?
+ this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
+ removeBackdrop.call(this)
+
+ } else if (callback) {
+ callback()
+ }
+ }
+
+ function removeBackdrop() {
+ this.$backdrop.remove()
+ this.$backdrop = null
+ }
+
+ function escape() {
+ var that = this
+ if (this.isShown && this.options.keyboard) {
+ $(document).on('keyup.dismiss.modal', function ( e ) {
+ e.which == 27 && that.hide()
+ })
+ } else if (!this.isShown) {
+ $(document).off('keyup.dismiss.modal')
+ }
+ }
+
+
+ /* MODAL PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.modal = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('modal')
+ , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
+ if (!data) $this.data('modal', (data = new Modal(this, options)))
+ if (typeof option == 'string') data[option]()
+ else if (options.show) data.show()
+ })
+ }
+
+ $.fn.modal.defaults = {
+ backdrop: true
+ , keyboard: true
+ , show: true
+ }
+
+ $.fn.modal.Constructor = Modal
+
+
+ /* MODAL DATA-API
+ * ============== */
+
+ $(function () {
+ $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
+ var $this = $(this), href
+ , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+ , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
+
+ e.preventDefault()
+ $target.modal(option)
+ })
+ })
+
+}(window.jQuery);/* ===========================================================
+ * bootstrap-tooltip.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#tooltips
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* TOOLTIP PUBLIC CLASS DEFINITION
+ * =============================== */
+
+ var Tooltip = function (element, options) {
+ this.init('tooltip', element, options)
+ }
+
+ Tooltip.prototype = {
+
+ constructor: Tooltip
+
+ , init: function (type, element, options) {
+ var eventIn
+ , eventOut
+
+ this.type = type
+ this.$element = $(element)
+ this.options = this.getOptions(options)
+ this.enabled = true
+
+ if (this.options.trigger != 'manual') {
+ eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
+ eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
+ this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this))
+ }
+
+ this.options.selector ?
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+ this.fixTitle()
+ }
+
+ , getOptions: function (options) {
+ options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
+
+ if (options.delay && typeof options.delay == 'number') {
+ options.delay = {
+ show: options.delay
+ , hide: options.delay
+ }
+ }
+
+ return options
+ }
+
+ , enter: function (e) {
+ var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+
+ if (!self.options.delay || !self.options.delay.show) return self.show()
+
+ clearTimeout(this.timeout)
+ self.hoverState = 'in'
+ this.timeout = setTimeout(function() {
+ if (self.hoverState == 'in') self.show()
+ }, self.options.delay.show)
+ }
+
+ , leave: function (e) {
+ var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+
+ if (this.timeout) clearTimeout(this.timeout)
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+ self.hoverState = 'out'
+ this.timeout = setTimeout(function() {
+ if (self.hoverState == 'out') self.hide()
+ }, self.options.delay.hide)
+ }
+
+ , show: function () {
+ var $tip
+ , inside
+ , pos
+ , actualWidth
+ , actualHeight
+ , placement
+ , tp
+
+ if (this.hasContent() && this.enabled) {
+ $tip = this.tip()
+ this.setContent()
+
+ if (this.options.animation) {
+ $tip.addClass('fade')
+ }
+
+ placement = typeof this.options.placement == 'function' ?
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
+ this.options.placement
+
+ inside = /in/.test(placement)
+
+ $tip
+ .remove()
+ .css({ top: 0, left: 0, display: 'block' })
+ .appendTo(inside ? this.$element : document.body)
+
+ pos = this.getPosition(inside)
+
+ actualWidth = $tip[0].offsetWidth
+ actualHeight = $tip[0].offsetHeight
+
+ switch (inside ? placement.split(' ')[1] : placement) {
+ case 'bottom':
+ tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'top':
+ tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'left':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
+ break
+ case 'right':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
+ break
+ }
+
+ $tip
+ .css(tp)
+ .addClass(placement)
+ .addClass('in')
+ }
+ }
+
+ , isHTML: function(text) {
+ // html string detection logic adapted from jQuery
+ return typeof text != 'string'
+ || ( text.charAt(0) === "<"
+ && text.charAt( text.length - 1 ) === ">"
+ && text.length >= 3
+ ) || /^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(text)
+ }
+
+ , setContent: function () {
+ var $tip = this.tip()
+ , title = this.getTitle()
+
+ $tip.find('.tooltip-inner')[this.isHTML(title) ? 'html' : 'text'](title)
+ $tip.removeClass('fade in top bottom left right')
+ }
+
+ , hide: function () {
+ var that = this
+ , $tip = this.tip()
+
+ $tip.removeClass('in')
+
+ function removeWithAnimation() {
+ var timeout = setTimeout(function () {
+ $tip.off($.support.transition.end).remove()
+ }, 500)
+
+ $tip.one($.support.transition.end, function () {
+ clearTimeout(timeout)
+ $tip.remove()
+ })
+ }
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ removeWithAnimation() :
+ $tip.remove()
+ }
+
+ , fixTitle: function () {
+ var $e = this.$element
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+ $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
+ }
+ }
+
+ , hasContent: function () {
+ return this.getTitle()
+ }
+
+ , getPosition: function (inside) {
+ return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
+ width: this.$element[0].offsetWidth
+ , height: this.$element[0].offsetHeight
+ })
+ }
+
+ , getTitle: function () {
+ var title
+ , $e = this.$element
+ , o = this.options
+
+ title = $e.attr('data-original-title')
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
+
+ return title
+ }
+
+ , tip: function () {
+ return this.$tip = this.$tip || $(this.options.template)
+ }
+
+ , validate: function () {
+ if (!this.$element[0].parentNode) {
+ this.hide()
+ this.$element = null
+ this.options = null
+ }
+ }
+
+ , enable: function () {
+ this.enabled = true
+ }
+
+ , disable: function () {
+ this.enabled = false
+ }
+
+ , toggleEnabled: function () {
+ this.enabled = !this.enabled
+ }
+
+ , toggle: function () {
+ this[this.tip().hasClass('in') ? 'hide' : 'show']()
+ }
+
+ }
+
+
+ /* TOOLTIP PLUGIN DEFINITION
+ * ========================= */
+
+ $.fn.tooltip = function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('tooltip')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.tooltip.Constructor = Tooltip
+
+ $.fn.tooltip.defaults = {
+ animation: true
+ , placement: 'top'
+ , selector: false
+ , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
+ , trigger: 'hover'
+ , title: ''
+ , delay: 0
+ }
+
+}(window.jQuery);
+/* ===========================================================
+ * bootstrap-popover.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#popovers
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* POPOVER PUBLIC CLASS DEFINITION
+ * =============================== */
+
+ var Popover = function ( element, options ) {
+ this.init('popover', element, options)
+ }
+
+
+ /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
+ ========================================== */
+
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
+
+ constructor: Popover
+
+ , setContent: function () {
+ var $tip = this.tip()
+ , title = this.getTitle()
+ , content = this.getContent()
+
+ $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
+ $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
+
+ $tip.removeClass('fade top bottom left right in')
+ }
+
+ , hasContent: function () {
+ return this.getTitle() || this.getContent()
+ }
+
+ , getContent: function () {
+ var content
+ , $e = this.$element
+ , o = this.options
+
+ content = $e.attr('data-content')
+ || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
+
+ return content
+ }
+
+ , tip: function () {
+ if (!this.$tip) {
+ this.$tip = $(this.options.template)
+ }
+ return this.$tip
+ }
+
+ })
+
+
+ /* POPOVER PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.popover = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('popover')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('popover', (data = new Popover(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.popover.Constructor = Popover
+
+ $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
+ placement: 'right'
+ , content: ''
+ , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
+ })
+
+}(window.jQuery);/* =============================================================
+ * bootstrap-scrollspy.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* SCROLLSPY CLASS DEFINITION
+ * ========================== */
+
+ function ScrollSpy( element, options) {
+ var process = $.proxy(this.process, this)
+ , $element = $(element).is('body') ? $(window) : $(element)
+ , href
+ this.options = $.extend({}, $.fn.scrollspy.defaults, options)
+ this.$scrollElement = $element.on('scroll.scroll.data-api', process)
+ this.selector = (this.options.target
+ || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+ || '') + ' .nav li > a'
+ this.$body = $('body')
+ this.refresh()
+ this.process()
+ }
+
+ ScrollSpy.prototype = {
+
+ constructor: ScrollSpy
+
+ , refresh: function () {
+ var self = this
+ , $targets
+
+ this.offsets = $([])
+ this.targets = $([])
+
+ $targets = this.$body
+ .find(this.selector)
+ .map(function () {
+ var $el = $(this)
+ , href = $el.data('target') || $el.attr('href')
+ , $href = /^#\w/.test(href) && $(href)
+ return ( $href
+ && href.length
+ && [[ $href.position().top, href ]] ) || null
+ })
+ .sort(function (a, b) { return a[0] - b[0] })
+ .each(function () {
+ self.offsets.push(this[0])
+ self.targets.push(this[1])
+ })
+ }
+
+ , process: function () {
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+ , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
+ , maxScroll = scrollHeight - this.$scrollElement.height()
+ , offsets = this.offsets
+ , targets = this.targets
+ , activeTarget = this.activeTarget
+ , i
+
+ if (scrollTop >= maxScroll) {
+ return activeTarget != (i = targets.last()[0])
+ && this.activate ( i )
+ }
+
+ for (i = offsets.length; i--;) {
+ activeTarget != targets[i]
+ && scrollTop >= offsets[i]
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+ && this.activate( targets[i] )
+ }
+ }
+
+ , activate: function (target) {
+ var active
+ , selector
+
+ this.activeTarget = target
+
+ $(this.selector)
+ .parent('.active')
+ .removeClass('active')
+
+ selector = this.selector
+ + '[data-target="' + target + '"],'
+ + this.selector + '[href="' + target + '"]'
+
+ active = $(selector)
+ .parent('li')
+ .addClass('active')
+
+ if (active.parent('.dropdown-menu')) {
+ active = active.closest('li.dropdown').addClass('active')
+ }
+
+ active.trigger('activate')
+ }
+
+ }
+
+
+ /* SCROLLSPY PLUGIN DEFINITION
+ * =========================== */
+
+ $.fn.scrollspy = function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('scrollspy')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.scrollspy.Constructor = ScrollSpy
+
+ $.fn.scrollspy.defaults = {
+ offset: 10
+ }
+
+
+ /* SCROLLSPY DATA-API
+ * ================== */
+
+ $(function () {
+ $('[data-spy="scroll"]').each(function () {
+ var $spy = $(this)
+ $spy.scrollspy($spy.data())
+ })
+ })
+
+}(window.jQuery);/* ========================================================
+ * bootstrap-tab.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
+ * ========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* TAB CLASS DEFINITION
+ * ==================== */
+
+ var Tab = function ( element ) {
+ this.element = $(element)
+ }
+
+ Tab.prototype = {
+
+ constructor: Tab
+
+ , show: function () {
+ var $this = this.element
+ , $ul = $this.closest('ul:not(.dropdown-menu)')
+ , selector = $this.attr('data-target')
+ , previous
+ , $target
+ , e
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ if ( $this.parent('li').hasClass('active') ) return
+
+ previous = $ul.find('.active a').last()[0]
+
+ e = $.Event('show', {
+ relatedTarget: previous
+ })
+
+ $this.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ $target = $(selector)
+
+ this.activate($this.parent('li'), $ul)
+ this.activate($target, $target.parent(), function () {
+ $this.trigger({
+ type: 'shown'
+ , relatedTarget: previous
+ })
+ })
+ }
+
+ , activate: function ( element, container, callback) {
+ var $active = container.find('> .active')
+ , transition = callback
+ && $.support.transition
+ && $active.hasClass('fade')
+
+ function next() {
+ $active
+ .removeClass('active')
+ .find('> .dropdown-menu > .active')
+ .removeClass('active')
+
+ element.addClass('active')
+
+ if (transition) {
+ element[0].offsetWidth // reflow for transition
+ element.addClass('in')
+ } else {
+ element.removeClass('fade')
+ }
+
+ if ( element.parent('.dropdown-menu') ) {
+ element.closest('li.dropdown').addClass('active')
+ }
+
+ callback && callback()
+ }
+
+ transition ?
+ $active.one($.support.transition.end, next) :
+ next()
+
+ $active.removeClass('in')
+ }
+ }
+
+
+ /* TAB PLUGIN DEFINITION
+ * ===================== */
+
+ $.fn.tab = function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('tab')
+ if (!data) $this.data('tab', (data = new Tab(this)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.tab.Constructor = Tab
+
+
+ /* TAB DATA-API
+ * ============ */
+
+ $(function () {
+ $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+ e.preventDefault()
+ $(this).tab('show')
+ })
+ })
+
+}(window.jQuery);/* =============================================================
+ * bootstrap-typeahead.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function($){
+
+ "use strict"; // jshint ;_;
+
+
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
+ * ================================= */
+
+ var Typeahead = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, $.fn.typeahead.defaults, options)
+ this.matcher = this.options.matcher || this.matcher
+ this.sorter = this.options.sorter || this.sorter
+ this.highlighter = this.options.highlighter || this.highlighter
+ this.updater = this.options.updater || this.updater
+ this.$menu = $(this.options.menu).appendTo('body')
+ this.source = this.options.source
+ this.shown = false
+ this.listen()
+ }
+
+ Typeahead.prototype = {
+
+ constructor: Typeahead
+
+ , select: function () {
+ var val = this.$menu.find('.active').attr('data-value')
+ this.$element
+ .val(this.updater(val))
+ .change()
+ return this.hide()
+ }
+
+ , updater: function (item) {
+ return item
+ }
+
+ , show: function () {
+ var pos = $.extend({}, this.$element.offset(), {
+ height: this.$element[0].offsetHeight
+ })
+
+ this.$menu.css({
+ top: pos.top + pos.height
+ , left: pos.left
+ })
+
+ this.$menu.show()
+ this.shown = true
+ return this
+ }
+
+ , hide: function () {
+ this.$menu.hide()
+ this.shown = false
+ return this
+ }
+
+ , lookup: function (event) {
+ var that = this
+ , items
+ , q
+
+ this.query = this.$element.val()
+
+ if (!this.query) {
+ return this.shown ? this.hide() : this
+ }
+
+ items = $.grep(this.source, function (item) {
+ return that.matcher(item)
+ })
+
+ items = this.sorter(items)
+
+ if (!items.length) {
+ return this.shown ? this.hide() : this
+ }
+
+ return this.render(items.slice(0, this.options.items)).show()
+ }
+
+ , matcher: function (item) {
+ return ~item.toLowerCase().indexOf(this.query.toLowerCase())
+ }
+
+ , sorter: function (items) {
+ var beginswith = []
+ , caseSensitive = []
+ , caseInsensitive = []
+ , item
+
+ while (item = items.shift()) {
+ if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
+ else if (~item.indexOf(this.query)) caseSensitive.push(item)
+ else caseInsensitive.push(item)
+ }
+
+ return beginswith.concat(caseSensitive, caseInsensitive)
+ }
+
+ , highlighter: function (item) {
+ var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
+ return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
+ return '<strong>' + match + '</strong>'
+ })
+ }
+
+ , render: function (items) {
+ var that = this
+
+ items = $(items).map(function (i, item) {
+ i = $(that.options.item).attr('data-value', item)
+ i.find('a').html(that.highlighter(item))
+ return i[0]
+ })
+
+ items.first().addClass('active')
+ this.$menu.html(items)
+ return this
+ }
+
+ , next: function (event) {
+ var active = this.$menu.find('.active').removeClass('active')
+ , next = active.next()
+
+ if (!next.length) {
+ next = $(this.$menu.find('li')[0])
+ }
+
+ next.addClass('active')
+ }
+
+ , prev: function (event) {
+ var active = this.$menu.find('.active').removeClass('active')
+ , prev = active.prev()
+
+ if (!prev.length) {
+ prev = this.$menu.find('li').last()
+ }
+
+ prev.addClass('active')
+ }
+
+ , listen: function () {
+ this.$element
+ .on('blur', $.proxy(this.blur, this))
+ .on('keypress', $.proxy(this.keypress, this))
+ .on('keyup', $.proxy(this.keyup, this))
+
+ if ($.browser.webkit || $.browser.msie) {
+ this.$element.on('keydown', $.proxy(this.keypress, this))
+ }
+
+ this.$menu
+ .on('click', $.proxy(this.click, this))
+ .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
+ }
+
+ , keyup: function (e) {
+ switch(e.keyCode) {
+ case 40: // down arrow
+ case 38: // up arrow
+ break
+
+ case 9: // tab
+ case 13: // enter
+ if (!this.shown) return
+ this.select()
+ break
+
+ case 27: // escape
+ if (!this.shown) return
+ this.hide()
+ break
+
+ default:
+ this.lookup()
+ }
+
+ e.stopPropagation()
+ e.preventDefault()
+ }
+
+ , keypress: function (e) {
+ if (!this.shown) return
+
+ switch(e.keyCode) {
+ case 9: // tab
+ case 13: // enter
+ case 27: // escape
+ e.preventDefault()
+ break
+
+ case 38: // up arrow
+ if (e.type != 'keydown') break
+ e.preventDefault()
+ this.prev()
+ break
+
+ case 40: // down arrow
+ if (e.type != 'keydown') break
+ e.preventDefault()
+ this.next()
+ break
+ }
+
+ e.stopPropagation()
+ }
+
+ , blur: function (e) {
+ var that = this
+ setTimeout(function () { that.hide() }, 150)
+ }
+
+ , click: function (e) {
+ e.stopPropagation()
+ e.preventDefault()
+ this.select()
+ }
+
+ , mouseenter: function (e) {
+ this.$menu.find('.active').removeClass('active')
+ $(e.currentTarget).addClass('active')
+ }
+
+ }
+
+
+ /* TYPEAHEAD PLUGIN DEFINITION
+ * =========================== */
+
+ $.fn.typeahead = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('typeahead')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.typeahead.defaults = {
+ source: []
+ , items: 8
+ , menu: '<ul class="typeahead dropdown-menu"></ul>'
+ , item: '<li><a href="#"></a></li>'
+ }
+
+ $.fn.typeahead.Constructor = Typeahead
+
+
+ /* TYPEAHEAD DATA-API
+ * ================== */
+
+ $(function () {
+ $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
+ var $this = $(this)
+ if ($this.data('typeahead')) return
+ e.preventDefault()
+ $this.typeahead($this.data())
+ })
+ })
+
+}(window.jQuery); \ No newline at end of file
diff --git a/src/main/resources/bootstrap/js/jquery.js b/src/main/resources/bootstrap/js/jquery.js
new file mode 100644
index 00000000..198b3ff0
--- /dev/null
+++ b/src/main/resources/bootstrap/js/jquery.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.7.1 jquery.com | jquery.org/license */
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
+f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
+{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file
diff --git a/src/main/resources/bug_16x16.png b/src/main/resources/bug_16x16.png
new file mode 100644
index 00000000..c7299fd7
--- /dev/null
+++ b/src/main/resources/bug_16x16.png
Binary files differ
diff --git a/src/main/resources/bullet_black.png b/src/main/resources/bullet_black.png
new file mode 100644
index 00000000..29be5679
--- /dev/null
+++ b/src/main/resources/bullet_black.png
Binary files differ
diff --git a/src/main/resources/bullet_blue.png b/src/main/resources/bullet_blue.png
new file mode 100644
index 00000000..b9c8e024
--- /dev/null
+++ b/src/main/resources/bullet_blue.png
Binary files differ
diff --git a/src/main/resources/bullet_delete.png b/src/main/resources/bullet_delete.png
new file mode 100644
index 00000000..7736d692
--- /dev/null
+++ b/src/main/resources/bullet_delete.png
Binary files differ
diff --git a/src/main/resources/bullet_error.png b/src/main/resources/bullet_error.png
new file mode 100644
index 00000000..b2e6b752
--- /dev/null
+++ b/src/main/resources/bullet_error.png
Binary files differ
diff --git a/src/main/resources/bullet_feed.png b/src/main/resources/bullet_feed.png
new file mode 100644
index 00000000..c6e5f241
--- /dev/null
+++ b/src/main/resources/bullet_feed.png
Binary files differ
diff --git a/src/main/resources/bullet_green.png b/src/main/resources/bullet_green.png
new file mode 100644
index 00000000..3e89eb1c
--- /dev/null
+++ b/src/main/resources/bullet_green.png
Binary files differ
diff --git a/src/main/resources/bullet_key.png b/src/main/resources/bullet_key.png
new file mode 100644
index 00000000..62600135
--- /dev/null
+++ b/src/main/resources/bullet_key.png
Binary files differ
diff --git a/src/main/resources/bullet_orange.png b/src/main/resources/bullet_orange.png
new file mode 100644
index 00000000..456774e9
--- /dev/null
+++ b/src/main/resources/bullet_orange.png
Binary files differ
diff --git a/src/main/resources/bullet_red.png b/src/main/resources/bullet_red.png
new file mode 100644
index 00000000..6d2d08fe
--- /dev/null
+++ b/src/main/resources/bullet_red.png
Binary files differ
diff --git a/src/main/resources/bullet_white.png b/src/main/resources/bullet_white.png
new file mode 100644
index 00000000..5c638737
--- /dev/null
+++ b/src/main/resources/bullet_white.png
Binary files differ
diff --git a/src/main/resources/bullet_yellow.png b/src/main/resources/bullet_yellow.png
new file mode 100644
index 00000000..a0bb7e5f
--- /dev/null
+++ b/src/main/resources/bullet_yellow.png
Binary files differ
diff --git a/src/main/resources/clipboard_13x13.png b/src/main/resources/clipboard_13x13.png
new file mode 100644
index 00000000..85f6cd7f
--- /dev/null
+++ b/src/main/resources/clipboard_13x13.png
Binary files differ
diff --git a/src/main/resources/clipboard_16x16.png b/src/main/resources/clipboard_16x16.png
new file mode 100644
index 00000000..ee4bd3e9
--- /dev/null
+++ b/src/main/resources/clipboard_16x16.png
Binary files differ
diff --git a/src/main/resources/clippy.png b/src/main/resources/clippy.png
new file mode 100644
index 00000000..7a462e16
--- /dev/null
+++ b/src/main/resources/clippy.png
Binary files differ
diff --git a/src/main/resources/clippy.swf b/src/main/resources/clippy.swf
new file mode 100644
index 00000000..e46886cd
--- /dev/null
+++ b/src/main/resources/clippy.swf
Binary files differ
diff --git a/src/main/resources/cold_16x16.png b/src/main/resources/cold_16x16.png
new file mode 100644
index 00000000..79cb7567
--- /dev/null
+++ b/src/main/resources/cold_16x16.png
Binary files differ
diff --git a/src/main/resources/commit_branch_16x16.png b/src/main/resources/commit_branch_16x16.png
new file mode 100644
index 00000000..d1fe7175
--- /dev/null
+++ b/src/main/resources/commit_branch_16x16.png
Binary files differ
diff --git a/src/main/resources/commit_changes_16x16.png b/src/main/resources/commit_changes_16x16.png
new file mode 100644
index 00000000..257cfee3
--- /dev/null
+++ b/src/main/resources/commit_changes_16x16.png
Binary files differ
diff --git a/src/main/resources/commit_divide_16x16.png b/src/main/resources/commit_divide_16x16.png
new file mode 100644
index 00000000..e611bd57
--- /dev/null
+++ b/src/main/resources/commit_divide_16x16.png
Binary files differ
diff --git a/src/main/resources/commit_join_16x16.png b/src/main/resources/commit_join_16x16.png
new file mode 100644
index 00000000..51e7de97
--- /dev/null
+++ b/src/main/resources/commit_join_16x16.png
Binary files differ
diff --git a/src/main/resources/commit_merge_16x16.png b/src/main/resources/commit_merge_16x16.png
new file mode 100644
index 00000000..5a066e59
--- /dev/null
+++ b/src/main/resources/commit_merge_16x16.png
Binary files differ
diff --git a/src/main/resources/commit_up_16x16.png b/src/main/resources/commit_up_16x16.png
new file mode 100644
index 00000000..30d005f2
--- /dev/null
+++ b/src/main/resources/commit_up_16x16.png
Binary files differ
diff --git a/src/main/resources/federated_16x16.png b/src/main/resources/federated_16x16.png
new file mode 100644
index 00000000..8e208515
--- /dev/null
+++ b/src/main/resources/federated_16x16.png
Binary files differ
diff --git a/src/main/resources/feed_16x16.png b/src/main/resources/feed_16x16.png
new file mode 100644
index 00000000..99987a30
--- /dev/null
+++ b/src/main/resources/feed_16x16.png
Binary files differ
diff --git a/src/main/resources/file_16x16.png b/src/main/resources/file_16x16.png
new file mode 100644
index 00000000..eda44886
--- /dev/null
+++ b/src/main/resources/file_16x16.png
Binary files differ
diff --git a/src/main/resources/file_acrobat_16x16.png b/src/main/resources/file_acrobat_16x16.png
new file mode 100644
index 00000000..f1627837
--- /dev/null
+++ b/src/main/resources/file_acrobat_16x16.png
Binary files differ
diff --git a/src/main/resources/file_c_16x16.png b/src/main/resources/file_c_16x16.png
new file mode 100644
index 00000000..44045a9b
--- /dev/null
+++ b/src/main/resources/file_c_16x16.png
Binary files differ
diff --git a/src/main/resources/file_code_16x16.png b/src/main/resources/file_code_16x16.png
new file mode 100644
index 00000000..931b0d6a
--- /dev/null
+++ b/src/main/resources/file_code_16x16.png
Binary files differ
diff --git a/src/main/resources/file_cpp_16x16.png b/src/main/resources/file_cpp_16x16.png
new file mode 100644
index 00000000..d3f55ee0
--- /dev/null
+++ b/src/main/resources/file_cpp_16x16.png
Binary files differ
diff --git a/src/main/resources/file_cs_16x16.png b/src/main/resources/file_cs_16x16.png
new file mode 100644
index 00000000..80130209
--- /dev/null
+++ b/src/main/resources/file_cs_16x16.png
Binary files differ
diff --git a/src/main/resources/file_doc_16x16.png b/src/main/resources/file_doc_16x16.png
new file mode 100644
index 00000000..225c3b09
--- /dev/null
+++ b/src/main/resources/file_doc_16x16.png
Binary files differ
diff --git a/src/main/resources/file_excel_16x16.png b/src/main/resources/file_excel_16x16.png
new file mode 100644
index 00000000..04e03327
--- /dev/null
+++ b/src/main/resources/file_excel_16x16.png
Binary files differ
diff --git a/src/main/resources/file_h_16x16.png b/src/main/resources/file_h_16x16.png
new file mode 100644
index 00000000..3f7f5394
--- /dev/null
+++ b/src/main/resources/file_h_16x16.png
Binary files differ
diff --git a/src/main/resources/file_java_16x16.png b/src/main/resources/file_java_16x16.png
new file mode 100644
index 00000000..16620e5c
--- /dev/null
+++ b/src/main/resources/file_java_16x16.png
Binary files differ
diff --git a/src/main/resources/file_php_16x16.png b/src/main/resources/file_php_16x16.png
new file mode 100644
index 00000000..4ac56183
--- /dev/null
+++ b/src/main/resources/file_php_16x16.png
Binary files differ
diff --git a/src/main/resources/file_ppt_16x16.png b/src/main/resources/file_ppt_16x16.png
new file mode 100644
index 00000000..44bbf26f
--- /dev/null
+++ b/src/main/resources/file_ppt_16x16.png
Binary files differ
diff --git a/src/main/resources/file_ruby_16x16.png b/src/main/resources/file_ruby_16x16.png
new file mode 100644
index 00000000..f29349da
--- /dev/null
+++ b/src/main/resources/file_ruby_16x16.png
Binary files differ
diff --git a/src/main/resources/file_settings_16x16.png b/src/main/resources/file_settings_16x16.png
new file mode 100644
index 00000000..92953fec
--- /dev/null
+++ b/src/main/resources/file_settings_16x16.png
Binary files differ
diff --git a/src/main/resources/file_vs_16x16.png b/src/main/resources/file_vs_16x16.png
new file mode 100644
index 00000000..645fa7a0
--- /dev/null
+++ b/src/main/resources/file_vs_16x16.png
Binary files differ
diff --git a/src/main/resources/file_world_16x16.png b/src/main/resources/file_world_16x16.png
new file mode 100644
index 00000000..0a4fa8be
--- /dev/null
+++ b/src/main/resources/file_world_16x16.png
Binary files differ
diff --git a/src/main/resources/file_zip_16x16.png b/src/main/resources/file_zip_16x16.png
new file mode 100644
index 00000000..15845924
--- /dev/null
+++ b/src/main/resources/file_zip_16x16.png
Binary files differ
diff --git a/src/main/resources/folder_16x16.png b/src/main/resources/folder_16x16.png
new file mode 100644
index 00000000..f1ed9abe
--- /dev/null
+++ b/src/main/resources/folder_16x16.png
Binary files differ
diff --git a/src/main/resources/folder_star_16x16.png b/src/main/resources/folder_star_16x16.png
new file mode 100644
index 00000000..ae8fdeda
--- /dev/null
+++ b/src/main/resources/folder_star_16x16.png
Binary files differ
diff --git a/src/main/resources/folder_star_32x32.png b/src/main/resources/folder_star_32x32.png
new file mode 100644
index 00000000..d2a076a9
--- /dev/null
+++ b/src/main/resources/folder_star_32x32.png
Binary files differ
diff --git a/src/main/resources/fork_16x16.png b/src/main/resources/fork_16x16.png
new file mode 100644
index 00000000..efb749c1
--- /dev/null
+++ b/src/main/resources/fork_16x16.png
Binary files differ
diff --git a/src/main/resources/git-black-16x16.png b/src/main/resources/git-black-16x16.png
new file mode 100644
index 00000000..559c45a4
--- /dev/null
+++ b/src/main/resources/git-black-16x16.png
Binary files differ
diff --git a/src/main/resources/git-black.png b/src/main/resources/git-black.png
new file mode 100644
index 00000000..8bc4c439
--- /dev/null
+++ b/src/main/resources/git-black.png
Binary files differ
diff --git a/src/main/resources/git-black_210x210.png b/src/main/resources/git-black_210x210.png
new file mode 100644
index 00000000..465cd399
--- /dev/null
+++ b/src/main/resources/git-black_210x210.png
Binary files differ
diff --git a/src/main/resources/git-orange-16x16.png b/src/main/resources/git-orange-16x16.png
new file mode 100644
index 00000000..2fefab41
--- /dev/null
+++ b/src/main/resources/git-orange-16x16.png
Binary files differ
diff --git a/src/main/resources/gitblit.css b/src/main/resources/gitblit.css
new file mode 100644
index 00000000..811b08a5
--- /dev/null
+++ b/src/main/resources/gitblit.css
@@ -0,0 +1,1157 @@
+body {
+ /* 50px to start the container 10px below the navbar */
+ padding-top: 60px;
+}
+
+footer {
+ margin-top: 25px;
+ padding: 15px 0 16px;
+ border-top: 1px solid #E5E5E5;
+}
+
+body, input, select {
+ color: #202020;
+}
+
+ul, ol {
+ margin-bottom: 10px !important;
+}
+a:focus {
+ outline: none;
+}
+
+[class^="icon-"], [class*=" icon-"] a i {
+ /* override for a links that look like bootstrap buttons */
+ vertical-align: text-bottom;
+}
+
+hr {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+
+.settings th {
+ vertical-align: top;
+}
+
+.pageTitle {
+ padding-bottom: 5px;
+ margin: 0;
+ border-bottom: 1px solid #eee;
+}
+
+.pageTitle h1, .pageTitle h2 {
+ color: #0069D6;
+}
+
+.navbar .brand {
+ padding: 10px 20px;
+}
+
+.navbar .pull-right {
+ margin: 0;
+}
+
+.navbar ul.nav {
+ margin: 0 !important;
+ padding: 4px 0px 0px 0px;
+}
+
+.navbar ul.nav li a {
+ color: white;
+ text-shadow: none;
+ outline: 0;
+}
+
+.navbar ul.nav li a:hover {
+ color: #abd4ff !important;
+ text-decoration: underline;
+}
+
+.navbar .nav .active > a:hover {
+ text-decoration: underline;
+}
+
+.navbar-inner {
+ background-color:#000050;
+ background-repeat:repeat-x;
+ background-image:-khtml-gradient(linear, left top, left bottom, from(#000060), to(#000040));
+ background-image:-moz-linear-gradient(top, #000060, #000040);
+ background-image:-ms-linear-gradient(top, #000060, #000040);
+ background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #000060), color-stop(100%, #000040));
+ background-image:-webkit-linear-gradient(top, #000060, #000040);
+ background-image:-o-linear-gradient(top, #000060, #000040);
+ background-image:linear-gradient(top, #000060, #000040);
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#000060', endColorstr='#000040', GradientType=0);
+ -webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ -moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ border-bottom: 2px solid #ff9900 !important;
+}
+
+.navbar ul li:focus, .navbar .active {
+ background-repeat:no-repeat;
+ background-image: url(arrow_page.png);
+ background-position: center bottom;
+ outline: 0;
+ padding-bottom:3px;
+}
+
+.navbar .active a {
+ background-color: transparent !important;
+ outline: 0;
+}
+
+.navbar div > ul .menu-dropdown .selected, .nav .menu-dropdown .selected, .navbar div > ul .dropdown-menu .selected, .nav .dropdown-menu .selected {
+ background-image: url("bullet_blue.png");
+ background-repeat: no-repeat;
+ background-position: left;
+}
+
+.navbar div>ul .dropdown-menu li a {
+ color: #555;
+}
+
+navbar div>ul .menu-dropdown li a:hover,.nav .menu-dropdown li a:hover,.navbar div>ul .dropdown-menu li a:hover,.nav .dropdown-menu li a:hover{
+ background-color: #000070;
+ color: #ffffff !important;
+}
+
+.breadcrumb {
+ margin-top: 5px !important;
+ margin-bottom: 5px !important;
+}
+
+.pageTitle {
+ margin-bottom: 5px;
+}
+
+.pageTitle h2 small {
+ font-size: 80%;
+ font-weight: bold;
+}
+
+.pageTitle {
+ color: #888;
+ font-size: 18px;
+ line-height: 27px;
+}
+.pageTitle .project, .pageTitle .repository {
+ font-family: Helvetica, arial, freesans, clean, sans-serif;
+ font-size: 22px;
+}
+
+.pageTitle .controls {
+ font-size: 12px;
+}
+
+.pageTitle .repository {
+ font-weight: bold;
+}
+
+.originRepository {
+ font-family: Helvetica, arial, freesans, clean, sans-serif;
+ color: #888;
+ font-size: 12px;
+ line-height: 14px;
+ margin: 0px;
+}
+
+.forkSource, .forkEntry {
+ color: #888;
+}
+
+.forkSource {
+ font-size: 18px;
+ line-height: 20px;
+ padding: 5px 0px;
+}
+
+.forkEntry {
+ font-size: 14px;
+ padding: 2px 0px;
+}
+
+.forkSource .forks, .forkEntry .forks {
+ font-size: 10px;
+ padding-left: 5px;
+ text-decoration: underline;
+ vertical-align: middle;
+}
+
+div.odd {
+
+}
+
+div.even {
+ background-color: whiteSmoke;
+ vertical-align: middle;
+}
+
+span.authorizationControl label {
+ display: inline;
+ color: #777;
+ padding:5px 0px 5px 10px;
+}
+
+div.page_footer {
+ clear: both;
+ height: 17px;
+ color: black;
+ background-color: #ffffff;
+ padding: 5px;
+ border-top: 1px solid #bbb;
+ font-style: italic;
+}
+
+pre, code, pre.prettyprint, pre.plainprint {
+ background-color: #ffffff;
+ color: black;
+ font-family: monospace;
+ font-size:12px;
+ border:0px;
+ padding: 0;
+ line-height: 1.35em;
+ vertical-align:top;
+}
+
+table {
+ margin-bottom: 5px;
+ font-size: inherit;
+}
+
+.table th {
+ vertical-align: top;
+}
+
+th {
+ vertical-align: middle;
+ text-align: left;
+}
+
+div.sourceview {
+ overflow: hidden;
+}
+
+pre.prettyprint ol {
+ padding-left:25px;
+}
+
+#nums {
+ text-align: right;
+ padding-right:10px;
+ border-right:1px solid #ddd;
+ font-family: monospace;
+ line-height: 1.35em;
+ vertical-align:top;
+}
+
+#nums pre {
+ white-space: pre;
+}
+
+#nums pre, #lines pre {
+ margin: 0;
+}
+
+#lines pre {
+ padding: 0px !important;
+ border: 0px !important;
+ white-space: nowrap;
+}
+
+/* CSS trick to workaround #link topOfWindow offset problem */
+#nums .num {
+ border-top: 160px solid transparent;
+ margin-top: -160px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+
+ color: #888;
+}
+
+#nums span:target {
+ background-color: #ffffbf;
+ color: black;
+ font-weight: bold;
+ border-bottom: 1px solid red;
+}
+
+#lines table {
+ margin: 0;
+}
+
+#lines td {
+ padding: 0;
+}
+
+#lines a {
+ padding-left: 5px;
+}
+
+#lines a:hover {
+ background-color: #ffffbf;
+ text-decoration: none;
+}
+
+#lines tr:hover {
+ background-color: #ffffbf;
+}
+#lines .odd {
+ background-color: white;
+}
+
+#lines .even {
+ background-color: #fafafa;
+}
+
+
+
+h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
+ color: #888;
+}
+
+.age0, .age1, .age2, .age3, .age4 {
+ font-size: 12px;
+}
+
+/* age0: age < 2 hours */
+.age0 {
+ font-style: italic;
+ color: #008000;
+ font-weight: bold;
+}
+
+/* age1: 2 hours <= age < 2 days */
+.age1 {
+ font-style: italic;
+ color: #0000ff;
+ font-weight: bold;
+}
+
+/* age2: 2 days < age <= 7 days */
+.age2 {
+ font-style: italic;
+ color: #2b60de;
+}
+
+/* age3: 7 days < age <= 30 days */
+.age3 {
+ color: #800080;
+}
+
+/* age4: > 30 days */
+.age4 {
+}
+
+/* Ensure that hovered ages are white */
+tr.light:hover .age0,
+tr.light:hover .age1,
+tr.light:hover .age2,
+tr.light:hover .age3,
+tr.light:hover .age4,
+tr.dark:hover .age0,
+tr.dark:hover .age1,
+tr.dark:hover .age2,
+tr.dark:hover .age3,
+tr.dark:hover .age4 {
+ color: #ffffff !important;
+}
+
+a.list {
+ text-decoration: none;
+ color: inherit;
+}
+
+a.list.subject {
+ font-weight: bold;
+}
+
+a.list.name {
+ font-weight: bold;
+}
+
+a.list:hover {
+ text-decoration: underline;
+ color: #880000;
+}
+
+span.empty {
+ font-size: 0.9em;
+ font-style: italic;
+ padding-left:10px;
+ color: #008000;
+}
+
+span.link {
+ color: #888;
+}
+
+span.link, span.link a {
+ font-family: sans-serif;
+ font-size: 11px;
+}
+
+span.link em, div.link span em {
+ font-style: normal;
+ font-family: sans-serif;
+ font-size: 11px;
+}
+
+span.repositorySwatch {
+ border-radius: 3px;
+ padding: 1px 4px 2px 4px;
+ color: #ffffff;
+ vertical-align: center;
+}
+span.repositorySwatch a {
+ color: inherit;
+}
+
+img.inlineIcon {
+ padding-left: 1px;
+ padding-right: 1px;
+}
+
+img.overview {
+ float:right;
+ border:1px solid #CCCCCC;
+}
+
+img.gravatar {
+ background-color: #ffffff;
+ border: 1px solid #ddd;
+ border-radius: 5px;
+ padding: 2px;
+}
+
+div.searchResult {
+ padding: 10px 5px 10px 5px;
+}
+
+div.searchResult .summary {
+ font-weight: bold;
+}
+
+div.searchResult .branch {
+ color: #008000;
+}
+
+div.searchResult .author {
+ font-style: italic !important;
+}
+
+div.searchResult .date {
+ color:#999;
+}
+
+div.searchResult .body {
+ padding-left:20px;
+}
+
+div.searchResult .fragment {
+ padding: 7px 0;
+}
+
+div.searchResult .highlight {
+ background-color: #ccff66;
+ padding: 0 2px;
+}
+
+div.searchResult .ellipses {
+ padding-left:25px;
+ color: #aaa;
+}
+
+div.searchResult pre {
+ margin: 1px 0px;
+ border: 0px;
+}
+
+div.searchResult .text {
+ border-left: 2px solid #ccc;
+ border-radius: 0px;
+
+ padding: 0 0 0 15px;
+}
+
+div.searchResult ol {
+ margin-bottom: 0px !important;
+}
+
+div.header, div.commitHeader, table.repositories th {
+ background-color:#e0e0e0;
+ background-repeat:repeat-x;
+ background-image:-khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#e0e0e0));
+ background-image:-moz-linear-gradient(top, #ffffff, #e0e0e0);
+ background-image:-ms-linear-gradient(top, #ffffff, #e0e0e0);
+ background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #e0e0e0));
+ background-image:-webkit-linear-gradient(top, #ffffff, #e0e0e0);
+ background-image:-o-linear-gradient(top, #ffffff, #e0e0e0);
+ background-image:linear-gradient(top, #ffffff, #e0e0e0);
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e0e0e0', GradientType=0);
+ -webkit-box-shadow:inset 0 1px 0 #ffffff;
+ -moz-box-shadow:inset 0 1px 0 #ffffff;
+ box-shadow:inset 0 1px 0 #ffffff;
+}
+
+div.header {
+ padding: 3px;
+ border: 1px solid #ddd;
+ border-bottom: 0;
+ border-radius: 3px 3px 0 0;
+ font-weight: bold;
+}
+
+div.commitHeader {
+ margin:0 0 2px;
+ padding:7px 14px;
+ border:1px solid #ddd;
+ border-radius: 3px;
+ -webkit-border-radius:3px;
+ -moz-border-radius:3px;border-radius:3px;
+}
+
+div.header a, div.commitHeader a {
+ color: black;
+ text-decoration: none;
+ font-weight: bold;
+}
+
+div.header a:hover, div.commitHeader a:hover {
+ text-decoration: underline;
+}
+
+div.page_nav2 {
+ padding: 2px 5px 7px 5px;
+}
+
+div.admin_nav {
+ border-bottom: 0px;
+ text-align: right;
+ padding: 5px 5px 5px 2px;
+}
+
+div.admin_nav a {
+ text-decoration: none;
+}
+
+div.admin_nav a:hover {
+ text-decoration: underline;
+}
+
+span.search {
+ height: 40px;
+ padding-top:2px;
+}
+
+span.search input {
+ -webkit-border-radius:0;-moz-border-radius:0x;border-radius:0;
+ vertical-align: top;
+ background: url(search-icon.png) no-repeat 4px center;
+ background-color: transparent;
+ border: 1px solid transparent;
+ outline: none;
+ padding: 2px 2px 2px 22px;
+ text-shadow: none;
+ margin: 0px;
+
+ color: #ddd;
+}
+
+span.search input:hover, span.search input:focus {
+ background-color: transparent;
+ border: 1px solid transparent;
+ padding: 2px 2px 2px 22px;
+ box-shadow: none;
+ color: #ddd;
+ border-bottom: 1px solid #ff9900;
+}
+
+span.search input:focus {
+ color: white;
+}
+
+/* div.search input:focused { */
+/* background-color: transparent; */
+/* border: 1px solid transparent; */
+/* padding: 2px 2px 2px 22px; */
+/* text-shadow: none; */
+/* } */
+
+span.login input:focus {
+ background-color: rgba(255, 255, 255, 0.6);
+ text-shadow: none;
+ color: white;
+}
+
+.commit_message {
+ padding: 8px;
+ border: solid #ddd;
+ border-width: 1px 0px 0px;
+ border-radius: 0px;
+}
+
+div.bug_open, span.bug_open {
+ padding: 2px;
+ background-color: #803333;
+ color: white;
+ text-align: center;
+}
+
+div.bug_resolved, span.bug_resolved {
+ padding: 2px;
+ background-color: #408040;
+ color: white;
+ text-align: center;
+}
+
+div.bug_invalid, span.bug_invalid {
+ padding: 2px;
+ background-color: gray;
+ text-align: center;
+}
+
+div.bug_hold, span.bug_hold {
+ padding: 2px;
+ background-color: orange;
+ text-align: center;
+}
+
+div.diff {
+ font-family: monospace;
+ overflow: auto;
+}
+
+div.diff.header {
+ -moz-border-bottom-colors: none;
+ -moz-border-image: none;
+ -moz-border-left-colors: none;
+ -moz-border-right-colors: none;
+ -moz-border-top-colors: none;
+ background-color: #EDECE6;
+ border-color: #D9D8D1;
+ border-style: solid;
+ border-width: 1px;
+ font-weight: bold;
+ margin-top: 10px;
+ padding: 4px 0 2px;
+}
+
+div.diff.extended_header {
+ background-color: #F6F5EE;
+ padding: 2px 0;
+ font-family: inherit;
+}
+
+span.diff.add {
+ color: #008800;
+ font-family: inherit;
+}
+
+span.diff.remove {
+ color: #FFDDDD;
+ font-family: inherit;
+}
+
+span.diff.unchanged {
+ color: inherit;
+ font-family: inherit;
+}
+
+div.diff.hunk_header {
+ -moz-border-bottom-colors: none;
+ -moz-border-image: none;
+ -moz-border-left-colors: none;
+ -moz-border-right-colors: none;
+ -moz-border-top-colors: none;
+ border-color: #FFE0FF;
+ border-style: dotted;
+ border-width: 1px 0 0;
+ margin-top: 2px;
+ font-family: inherit;
+}
+
+span.diff.hunk_info {
+ background-color: #FFEEFF;
+ color: #990099;
+ font-family: inherit;
+}
+
+span.diff.hunk_section {
+ color: #AA22AA;
+ font-family: inherit;
+}
+
+div.diff.add2 {
+ background-color: #DDFFDD;
+ font-family: inherit;
+}
+
+div.diff.remove2 {
+ background-color: #FFDDDD;
+ font-family: inherit;
+}
+
+div.diff table {
+ border-radius: 0;
+ border-right: 1px solid #bbb;
+ border-bottom: 1px solid #bbb;
+ width: 100%;
+}
+
+div.diff table th, div.diff table td {
+ margin: 0px;
+ padding: 0px;
+ font-family: monospace;
+ border: 0;
+}
+
+div.diff table th {
+ background-color: #f0f0f0;
+ text-align: center;
+ color: #999;
+ padding-left: 5px;
+ padding-right: 5px;
+ width: 30px;
+}
+
+div.diff table th.header {
+ background-color: #D2C3AF;
+ border-right: 0px;
+ border-bottom: 1px solid #808080;
+ font-family: inherit;
+ font-size:0.9em;
+ color: black;
+ padding: 2px;
+ text-align: left;
+}
+
+div.diff table td.hunk_header {
+ background-color: #dAe2e5 !important;
+ border-top: 1px solid #bac2c5;
+ border-bottom: 1px solid #bac2c5;
+ color: #555;
+}
+
+div.diff table td {
+ border-left: 1px solid #bbb;
+ background-color: #f5f5f5;
+}
+
+td.changeType {
+ width: 15px;
+}
+
+span.addition, span.modification, span.deletion, span.rename {
+ border: 1px solid #888;
+ float: left;
+ height: 0.8em;
+ margin: 0.2em 0.5em 0 0;
+ overflow: hidden;
+ width: 0.8em;
+}
+
+span.addition {
+ background-color: #ccffcc;
+}
+
+span.modification {
+ background-color: #ffdd88;
+}
+
+span.deletion {
+ background-color: #f8bbbb;
+}
+
+span.rename {
+ background-color: #cAc2f5;
+}
+
+div.commitLegend {
+ float: right;
+ padding: 0.4em 0.4em 0.2em 0.4em;
+ vertical-align:top;
+ margin: 0px;
+}
+
+div.commitLegend span {
+ font-size: 0.9em;
+ vertical-align: top;
+}
+
+div.references {
+ float: right;
+ text-align: right;
+}
+
+table.plain {
+ width: 0 !important;
+ border: 0;
+}
+
+table.plain th, table.plain td {
+ white-space: nowrap;
+ padding: 1px 3px;
+ border: 0;
+}
+
+table.pretty {
+ border:1px solid #ddd;
+ border-radius: 0 0 3px 3px;
+ width: 100%;
+}
+
+table.pretty td.icon {
+ padding: 0px 0px 0px 2px;
+ width: 18px;
+ vertical-align: middle;
+}
+
+table.pretty td.icon img {
+ vertical-align: top;
+}
+
+table.pretty td {
+ padding: 2px 4px;
+ border-left: 0;
+}
+
+table.pretty td.message {
+ padding: 0px;
+}
+
+table.pretty table.nestedTable {
+ width: 100%;
+ margin-left: 4px !important;
+ margin-bottom: 0px !important;
+}
+
+table.comments td {
+ padding: 4px;
+ line-height: 17px;
+}
+
+table.repositories {
+ border:1px solid #ddd;
+ border-spacing: 0px;
+ width: 100%;
+}
+
+table.repositories th {
+ padding: 4px;
+ border:0;
+}
+
+table.repositories th.right {
+ border-right: 1px solid #ddd;
+}
+
+table.repositories td {
+ padding: 2px;
+ border-left: 0;
+}
+
+table.repositories td.rightAlign {
+ text-align: right;
+ border-right: 1px solid #ddd;
+}
+
+table.repositories td.icon img {
+ vertical-align: top;
+}
+
+table.repositories tr.group {
+ background-color: #ccc;
+ border-left: 1px solid #ccc;
+ border-right: 1px solid #ccc;
+}
+
+table.repositories tr.group td {
+ font-weight: bold;
+ color: black;
+ background-color: #ddd;
+ padding-left: 5px;
+ border-top: 1px solid #aaa;
+ border-bottom: 1px solid #aaa;
+}
+
+table.repositories tr.group td a {
+ color: black;
+}
+
+table.palette { border:0; width: 0 !important; }
+table.palette td.header {
+ font-weight: bold;
+ background-color: #ffffff !important;
+ padding-top: 0px !important;
+ margin-bottom: 0 !imporant;
+ border: 0 !important;
+ border-radius: 0 !important;
+ line-height: 1em;
+}
+table.palette td.pane {
+ padding: 0px;
+}
+
+table.gitnotes {
+ border: 0;
+}
+table.gitnotes td {
+ border-top: 1px solid #ddd;
+ padding-top: 3px;
+ vertical-align:top;
+}
+
+table.gitnotes table {
+ border: none;
+}
+
+table.gitnotes td table td {
+ border: none;
+ padding: 0px;
+}
+
+table.gitnotes td.info {
+ padding-right: 10px;
+}
+
+table.gitnotes td.message {
+ width: 65%;
+ border-left: 1px solid #ddd;
+ padding-left: 10px;
+}
+
+table.annotated {
+ border:1px solid #ddd;
+}
+
+table.annotated tr.even {
+ background-color: white;
+}
+
+table.annotated tr.odd {
+ background-color: #f5f5f5;
+}
+
+table.annotated td {
+ padding: 0px;
+ border: 0;
+}
+
+table.activity {
+ width: 100%;
+ margin-top: 10px;
+}
+
+table.activity td {
+ padding-top:7px;
+ padding-bottom:7px;
+}
+
+tr th a { background-position: right; padding-right: 15px; background-repeat:no-repeat; }
+tr th.wicket_orderDown a {background-image: url(arrow_down.png); }
+tr th.wicket_orderUp a { background-image: url(arrow_up.png); }
+tr th.wicket_orderNone a { background-image: url(arrow_off.png); }
+
+tr.light {
+ background-color: #ffffff;
+}
+
+tr.dark {
+ background-color: #f5f5f5;
+}
+
+/* currently both use the same, but it can change */
+tr.light:hover,
+tr.dark:hover {
+ background-color: #000070;
+ color: white;
+}
+
+tr.light:hover a,
+tr.dark:hover a {
+ color: white;
+}
+
+td.author {
+ font-style: italic !important;
+}
+
+td.date {
+ /*font-style: italic !important;*/
+ white-space: nowrap;
+}
+
+span.sha1, span.sha1 a, span.sha1 a span, .commit_message, span.shortsha1 {
+ font-family: consolas, monospace;
+ font-size: 13px;
+}
+
+span.shortsha1 {
+ font-size: 12px;
+}
+
+td.mode {
+ text-align: right;
+ font-family: monospace;
+ width: 8em;
+ padding-right:15px;
+}
+
+td.size {
+ text-align: right;
+ width: 8em;
+ padding-right:15px;
+}
+
+td.rightAlign {
+ text-align: right;
+}
+
+td.treeLinks {
+ text-align: right;
+ width: 13em;
+}
+
+span.help-inline {
+ color: #777;
+}
+
+span.metricsTitle {
+ font-size: 2em;
+}
+
+.tagRef, .headRef, .localBranch, .remoteBranch, .otherRef {
+ padding: 0px 3px;
+ margin-right:2px;
+ font-family: sans-serif;
+ font-size: 9px;
+ font-weight: normal;
+ border: 1px solid;
+ color: black;
+}
+
+.tagRef a, .headRef a, .localBranch a, .remoteBranch a, .otherRef a {
+ font-size: 9px;
+ text-decoration: none;
+ color: black !important;
+}
+
+.tagRef a:hover, .headRef a:hover, .localBranch a:hover, .remoteBranch a:hover, .otherRef a:hover {
+ color: black !important;
+ text-decoration: underline;
+}
+
+.otherRef {
+ background-color: #b0e0f0;
+ border-color: #80aaaa;
+}
+
+.remoteBranch {
+ background-color: #cAc2f5;
+ border-color: #6c6cbf;
+}
+
+.tagRef {
+ background-color: #ffffaa;
+ border-color: #ffcc00;
+}
+
+.headRef {
+ background-color: #ffaaff;
+ border-color: #ff00ee;
+}
+
+.localBranch {
+ background-color: #ccffcc;
+ border-color: #00cc33;
+}
+
+table .palette td.buttons button {
+ -webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;
+ border: 1px solid #ccc !important;
+ padding: 10px;
+ margin-bottom: 10px;
+}
+
+table .palette td.buttons button:hover {
+ border: 1px solid #0069D6 !important;
+}
+
+table .palette td.buttons button:active {
+ border: 1px solid orange !important;
+}
+
+.feedbackPanelERROR, .feedbackPanelINFO {
+ list-style: none;
+ line-height: 35px;
+}
+
+.feedbackPanelINFO span, .feedbackPanelERROR span {
+ position:relative;padding:7px 15px;margin-top:5px;margin-bottom:5px;color:#404040;background-color:#eedc94;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));background-image:-moz-linear-gradient(top, #fceec1, #eedc94);background-image:-ms-linear-gradient(top, #fceec1, #eedc94);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));background-image:-webkit-linear-gradient(top, #fceec1, #eedc94);background-image:-o-linear-gradient(top, #fceec1, #eedc94);background-image:linear-gradient(top, #fceec1, #eedc94);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#eedc94 #eedc94 #e4c652;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);border-width:1px;border-style:solid;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);
+}
+
+.feedbackPanelERROR span {
+ color: #ffffff;
+ background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+}
+
+/* google-code-prettify line numbers */
+li.L0,
+li.L1,
+li.L2,
+li.L3,
+li.L4,
+li.L5,
+li.L6,
+li.L7,
+li.L8,
+li.L9 { color: #888; border-left: 1px solid #ccc; padding-left:5px; list-style-type: decimal !important; }
+
+/* Alternate shading for lines */
+li.L1,
+li.L3,
+li.L5,
+li.L7,
+li.L9 { background: #fafafa !important; }
+
+div.markdown pre {
+ background-color: #F5F5F5;
+ border: 1px solid rgba(0, 0, 0, 0.15);
+ border-radius: 4px 4px 4px 4px;
+ display: block;
+ font-size: 12px;
+ line-height: 18px;
+ margin: 0 0 9px;
+ padding: 8.5px;
+ white-space: pre-wrap;
+}
+
+div.markdown pre code {
+ background-color: inherit;
+ border: none;
+ padding: 0;
+}
+
+div.markdown code {
+ background-color: #ffffe0;
+ border: 1px solid orange;
+ border-radius: 3px;
+ padding: 0 0.2em;
+}
+
+div.markdown a {
+ text-decoration: underline;
+}
+
+div.markdown em {
+ color: #b05000;
+}
+
+div.markdown table.text th, div.markdown table.text td {
+ vertical-align: top;
+ border-top: 1px solid #ccc;
+ padding:5px;
+} \ No newline at end of file
diff --git a/src/main/resources/gitblt-favicon.png b/src/main/resources/gitblt-favicon.png
new file mode 100644
index 00000000..c3c6dc1b
--- /dev/null
+++ b/src/main/resources/gitblt-favicon.png
Binary files differ
diff --git a/src/main/resources/gitblt-logo.png b/src/main/resources/gitblt-logo.png
new file mode 100644
index 00000000..7ec945b5
--- /dev/null
+++ b/src/main/resources/gitblt-logo.png
Binary files differ
diff --git a/src/main/resources/gitblt2.png b/src/main/resources/gitblt2.png
new file mode 100644
index 00000000..c1642941
--- /dev/null
+++ b/src/main/resources/gitblt2.png
Binary files differ
diff --git a/src/main/resources/gitblt2_white.png b/src/main/resources/gitblt2_white.png
new file mode 100644
index 00000000..f4c5463d
--- /dev/null
+++ b/src/main/resources/gitblt2_white.png
Binary files differ
diff --git a/src/main/resources/gitblt_25.png b/src/main/resources/gitblt_25.png
new file mode 100644
index 00000000..ad580fad
--- /dev/null
+++ b/src/main/resources/gitblt_25.png
Binary files differ
diff --git a/src/main/resources/gitblt_25_white.png b/src/main/resources/gitblt_25_white.png
new file mode 100644
index 00000000..eeea0214
--- /dev/null
+++ b/src/main/resources/gitblt_25_white.png
Binary files differ
diff --git a/src/main/resources/gitweb-favicon.png b/src/main/resources/gitweb-favicon.png
new file mode 100644
index 00000000..de637c06
--- /dev/null
+++ b/src/main/resources/gitweb-favicon.png
Binary files differ
diff --git a/src/main/resources/health_16x16.png b/src/main/resources/health_16x16.png
new file mode 100644
index 00000000..de43e4b1
--- /dev/null
+++ b/src/main/resources/health_16x16.png
Binary files differ
diff --git a/src/main/resources/heart_16x16.png b/src/main/resources/heart_16x16.png
new file mode 100644
index 00000000..53e1013a
--- /dev/null
+++ b/src/main/resources/heart_16x16.png
Binary files differ
diff --git a/src/main/resources/information_16x16.png b/src/main/resources/information_16x16.png
new file mode 100644
index 00000000..85c1876b
--- /dev/null
+++ b/src/main/resources/information_16x16.png
Binary files differ
diff --git a/src/main/resources/lock_16x16.png b/src/main/resources/lock_16x16.png
new file mode 100644
index 00000000..ddf83d95
--- /dev/null
+++ b/src/main/resources/lock_16x16.png
Binary files differ
diff --git a/src/main/resources/lock_go_16x16.png b/src/main/resources/lock_go_16x16.png
new file mode 100644
index 00000000..63d42859
--- /dev/null
+++ b/src/main/resources/lock_go_16x16.png
Binary files differ
diff --git a/src/main/resources/lock_pull_16x16.png b/src/main/resources/lock_pull_16x16.png
new file mode 100644
index 00000000..85c5c53e
--- /dev/null
+++ b/src/main/resources/lock_pull_16x16.png
Binary files differ
diff --git a/src/main/resources/login.mkd b/src/main/resources/login.mkd
new file mode 100644
index 00000000..51a4cf71
--- /dev/null
+++ b/src/main/resources/login.mkd
@@ -0,0 +1,3 @@
+## Please Login
+
+Please enter your credentials to access this Gitblit site.
diff --git a/src/main/resources/login_es.mkd b/src/main/resources/login_es.mkd
new file mode 100644
index 00000000..700d63f4
--- /dev/null
+++ b/src/main/resources/login_es.mkd
@@ -0,0 +1,3 @@
+## Debes validarte
+
+Por favor, introduce tus credenciales para acceder Gitblit. \ No newline at end of file
diff --git a/src/main/resources/login_ko.mkd b/src/main/resources/login_ko.mkd
new file mode 100644
index 00000000..a48099c1
--- /dev/null
+++ b/src/main/resources/login_ko.mkd
@@ -0,0 +1,3 @@
+## 로그인 하세요
+
+이 Gitblit 사이트에 접속하려면 인증정보를 입력하세요.
diff --git a/src/main/resources/login_nl.mkd b/src/main/resources/login_nl.mkd
new file mode 100644
index 00000000..38224c96
--- /dev/null
+++ b/src/main/resources/login_nl.mkd
@@ -0,0 +1,3 @@
+## Aanmelden aub
+
+Vul aub uw aanmeldgegevens in voor toegang tot deze Gitblit site.
diff --git a/src/main/resources/login_pl.mkd b/src/main/resources/login_pl.mkd
new file mode 100644
index 00000000..cc7978b4
--- /dev/null
+++ b/src/main/resources/login_pl.mkd
@@ -0,0 +1,3 @@
+## Zaloguj się
+
+Wprowadź swoje dane uwierzytelniające, aby uzyskać dostęp do instancji Gitblita.
diff --git a/src/main/resources/login_pt_br.mkd b/src/main/resources/login_pt_br.mkd
new file mode 100644
index 00000000..6a4a8570
--- /dev/null
+++ b/src/main/resources/login_pt_br.mkd
@@ -0,0 +1,3 @@
+## Faça o Login
+
+Por favor, entre com suas credenciais para acessar o site Gitblit.
diff --git a/src/main/resources/login_zh_CN.mkd b/src/main/resources/login_zh_CN.mkd
new file mode 100644
index 00000000..09046231
--- /dev/null
+++ b/src/main/resources/login_zh_CN.mkd
@@ -0,0 +1,3 @@
+## 请登录
+
+请输入身份信息以登陆Gitblit。 \ No newline at end of file
diff --git a/src/main/resources/mail_16x16.png b/src/main/resources/mail_16x16.png
new file mode 100644
index 00000000..83278739
--- /dev/null
+++ b/src/main/resources/mail_16x16.png
Binary files differ
diff --git a/src/main/resources/pixel.png b/src/main/resources/pixel.png
new file mode 100644
index 00000000..4d5f6df1
--- /dev/null
+++ b/src/main/resources/pixel.png
Binary files differ
diff --git a/src/main/resources/rosette_16x16.png b/src/main/resources/rosette_16x16.png
new file mode 100644
index 00000000..6dedc271
--- /dev/null
+++ b/src/main/resources/rosette_16x16.png
Binary files differ
diff --git a/src/main/resources/rosette_32x32.png b/src/main/resources/rosette_32x32.png
new file mode 100644
index 00000000..ecbcc0a6
--- /dev/null
+++ b/src/main/resources/rosette_32x32.png
Binary files differ
diff --git a/src/main/resources/script_16x16.png b/src/main/resources/script_16x16.png
new file mode 100644
index 00000000..ec93a22f
--- /dev/null
+++ b/src/main/resources/script_16x16.png
Binary files differ
diff --git a/src/main/resources/search-icon.png b/src/main/resources/search-icon.png
new file mode 100644
index 00000000..90e8d2c6
--- /dev/null
+++ b/src/main/resources/search-icon.png
Binary files differ
diff --git a/src/main/resources/settings_16x16.png b/src/main/resources/settings_16x16.png
new file mode 100644
index 00000000..1619e3de
--- /dev/null
+++ b/src/main/resources/settings_16x16.png
Binary files differ
diff --git a/src/main/resources/settings_32x32.png b/src/main/resources/settings_32x32.png
new file mode 100644
index 00000000..39af4be9
--- /dev/null
+++ b/src/main/resources/settings_32x32.png
Binary files differ
diff --git a/src/main/resources/shield_16x16.png b/src/main/resources/shield_16x16.png
new file mode 100644
index 00000000..4eb8031c
--- /dev/null
+++ b/src/main/resources/shield_16x16.png
Binary files differ
diff --git a/src/main/resources/star_16x16.png b/src/main/resources/star_16x16.png
new file mode 100644
index 00000000..883e4dec
--- /dev/null
+++ b/src/main/resources/star_16x16.png
Binary files differ
diff --git a/src/main/resources/star_32x32.png b/src/main/resources/star_32x32.png
new file mode 100644
index 00000000..92865b19
--- /dev/null
+++ b/src/main/resources/star_32x32.png
Binary files differ
diff --git a/src/main/resources/tag_16x16.png b/src/main/resources/tag_16x16.png
new file mode 100644
index 00000000..7e75cba0
--- /dev/null
+++ b/src/main/resources/tag_16x16.png
Binary files differ
diff --git a/src/main/resources/user_16x16.png b/src/main/resources/user_16x16.png
new file mode 100644
index 00000000..d5edd4d4
--- /dev/null
+++ b/src/main/resources/user_16x16.png
Binary files differ
diff --git a/src/main/resources/users_16x16.png b/src/main/resources/users_16x16.png
new file mode 100644
index 00000000..247af645
--- /dev/null
+++ b/src/main/resources/users_16x16.png
Binary files differ
diff --git a/src/main/resources/vcard_16x16.png b/src/main/resources/vcard_16x16.png
new file mode 100644
index 00000000..b8a9fea4
--- /dev/null
+++ b/src/main/resources/vcard_16x16.png
Binary files differ
diff --git a/src/main/resources/welcome.mkd b/src/main/resources/welcome.mkd
new file mode 100644
index 00000000..130cd8ac
--- /dev/null
+++ b/src/main/resources/welcome.mkd
@@ -0,0 +1,3 @@
+## Welcome to Gitblit
+
+A quick and easy way to host or view your own [Git](http://www.git-scm.com) repositories.
diff --git a/src/main/resources/welcome_es.mkd b/src/main/resources/welcome_es.mkd
new file mode 100644
index 00000000..52f290e3
--- /dev/null
+++ b/src/main/resources/welcome_es.mkd
@@ -0,0 +1,3 @@
+## Bienvenid@ a Gitblit
+
+Una forma f&aacute;cil y r&aacute;pida de organizar o ver tus propios repositorios [Git](http://www.git-scm.com) \ No newline at end of file
diff --git a/src/main/resources/welcome_ko.mkd b/src/main/resources/welcome_ko.mkd
new file mode 100644
index 00000000..27cd65da
--- /dev/null
+++ b/src/main/resources/welcome_ko.mkd
@@ -0,0 +1,3 @@
+## Gitblit 사용을 환영합니다.
+
+당신의 [Git](http://www.git-scm.com) 저장소를 운영하거나 보기 위한 빠르고 쉬운 방법.
diff --git a/src/main/resources/welcome_nl.mkd b/src/main/resources/welcome_nl.mkd
new file mode 100644
index 00000000..406ca1e0
--- /dev/null
+++ b/src/main/resources/welcome_nl.mkd
@@ -0,0 +1,3 @@
+## Welkom bij Gitblit
+
+Een snelle en makkelijke manier voor het hosten en bekijken van uw eigen [Git](http://www.git-scm.com) repositories.
diff --git a/src/main/resources/welcome_pl.mkd b/src/main/resources/welcome_pl.mkd
new file mode 100644
index 00000000..bc60770a
--- /dev/null
+++ b/src/main/resources/welcome_pl.mkd
@@ -0,0 +1,3 @@
+## Witaj w aplikacji Gitblit
+
+Szybko i wygodnie hostuj lub przeglądaj własne repozytoria [GIT](http://www.git-scm.com).
diff --git a/src/main/resources/welcome_pt_br.mkd b/src/main/resources/welcome_pt_br.mkd
new file mode 100644
index 00000000..6b30bbcd
--- /dev/null
+++ b/src/main/resources/welcome_pt_br.mkd
@@ -0,0 +1,3 @@
+## Bem-Vindo ao Gitblit
+
+Uma maneira fácil e rápida de armazenar e visualizar o seus próprios repositórios [Git](http://www.git-scm.com).
diff --git a/src/main/resources/welcome_zh_CN.mkd b/src/main/resources/welcome_zh_CN.mkd
new file mode 100644
index 00000000..f4a651ef
--- /dev/null
+++ b/src/main/resources/welcome_zh_CN.mkd
@@ -0,0 +1,3 @@
+## 欢迎访问 Gitblit
+
+快速便捷的 [Git](http://www.git-scm.com) 版本库管理方案。
diff --git a/src/site/.gitignore b/src/site/.gitignore
new file mode 100644
index 00000000..45d8a390
--- /dev/null
+++ b/src/site/.gitignore
@@ -0,0 +1,3 @@
+/site_ad.html
+/site_analytics.html
+/site_ads.html
diff --git a/src/site/architecture.odg b/src/site/architecture.odg
new file mode 100644
index 00000000..4e5fcd3d
--- /dev/null
+++ b/src/site/architecture.odg
Binary files differ
diff --git a/src/site/custom.less b/src/site/custom.less
new file mode 100644
index 00000000..c05058bf
--- /dev/null
+++ b/src/site/custom.less
@@ -0,0 +1,96 @@
+/*!
+ * Gitblit Bootstrap Overrides
+ *
+ * Copyright 2012 gitblit.com
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+// GLOBAL VALUES
+// --------------------------------------------------
+@blueDark: #000060;
+@blueDarker: #000050;
+@blueDarkest: #000040;
+@standardGray: #ccc;
+@cornflower: #abd4ff;
+@white: #fff;
+
+
+// Dropdown
+// -------------------------
+@dropdownLinkBackgroundHover: @blueDark;
+
+// Navbar
+// -------------------------
+@navbarHeight: 45px;
+@navbarBackground: @blueDarkest;
+@navbarBackgroundHighlight: @blueDark;
+@navbarText: @white;
+@navbarLinkColor: @white;
+@navbarLinkColorHover: @cornflower;
+@navbarLinkColorActive: @cornflower;
+@navbarLinkBackgroundHover: transparent;
+@navbarLinkBackgroundActive: transparent;
+
+
+.navbar {
+ .nav {
+ margin: 0px;
+
+ li > a {
+ text-shadow: 0 1px 0 #000;
+ }
+
+ li > a:hover {
+ text-shadow: 0 0 1em white;
+ }
+
+ .active > a,
+ .active > a:hover,
+ .active > a:focus {
+ box-shadow: none;
+ text-decoration: underline;
+ }
+
+ ul.dropdown-menu > li > a {
+ text-shadow: none;
+ }
+ }
+
+ .brand {
+ @elementHeight: 27px;
+ padding: 10px 20px;
+ }
+
+ .pull-right {
+ margin: 0;
+ }
+
+ ul > li:focus, .active {
+ background-repeat:no-repeat;
+ background-image: url('../../arrow_page.png');
+ background-position: center bottom;
+ outline: 0;
+ }
+}
+
+.navbar-inner {
+ background-color: @blueDarker;
+ border-bottom: 2px solid #ff9900;
+}
+
+h3 small { font-size: @baseFontSize + 3; }
+body { padding-top: @navbarHeight + 15 } /* 60px to make the container go all the way to the bottom of the topbar */
+footer { margin-top: 25px; padding: 15px 0 16px; border-top: 1px solid #E5E5E5; }
+
+a:hover { text-decoration: underline !important; }
+em { color: #b05000; }
+code {
+ color: #000000;
+ background-color: #ffffe0;
+ border: 1px solid orange;
+ border-radius: 3px;
+ padding: 0 0.2em;
+ font-family: monospace;
+} \ No newline at end of file
diff --git a/src/site/design.mkd b/src/site/design.mkd
new file mode 100644
index 00000000..5ca83558
--- /dev/null
+++ b/src/site/design.mkd
@@ -0,0 +1,84 @@
+## Design Principles
+1. [Keep It Simple, Stupid](http://en.wikipedia.org/wiki/KISS_principle)
+2. Offer useful features for serving Git repositories. If feature is complex, refer to #1.
+3. All dependencies must be retrievable from a publicly accessible [Maven](http://maven.apache.org) repository.<br/>This is to ensure authenticity of dependencies and to automate the setup of developer environments.
+
+## Architecture
+
+![block diagram](architecture.png "Gitblit Architecture")
+
+### Bundled Dependencies
+The following dependencies are bundled with Gitblit.
+
+- [Bootstrap](http://twitter.github.com/bootstrap) (Apache 2.0)
+- [GLYPHICONS](http://glyphicons.com) (Creative Commons CC-BY)
+- [Clippy](https://github.com/mojombo/clippy) (MIT)
+- [google-code-prettify](http://code.google.com/p/google-code-prettify) (Apache 2.0)
+- [Commons Daemon](http://commons.apache.org/daemon) (Apache 2.0)
+- magnifying glass search icon courtesy of [Gnome](http://gnome.org) (Creative Commons CC-BY)
+- Git logo originally designed by [Jason Long](http://git-scm.com/downloads/logos)
+- modified Git logo originally designed by [Henrik Nyh](http://henrik.nyh.se/2007/06/alternative-git-logo-and-favicon)
+- fork icon courtesy of [Ember.js](http://emberjs.com)
+- other icons courtesy of [FatCow Hosting](http://www.fatcow.com/free-icons) (Creative Commons CC-BY)
+
+### Downloaded Dependencies
+The following dependencies are automatically downloaded by Gitblit GO (or already bundled with the WAR) from the Apache Maven repository and from the Eclipse Maven repository when Gitblit is launched for the first time.
+
+- [JGit][jgit] (EDL 1.0)
+- [Wicket](http://wicket.apache.org) (Apache 2.0)
+- [WicketStuff GoogleCharts](https://github.com/wicketstuff/core/wiki/GoogleCharts) (Apache 2.0)
+- [MarkdownPapers](http://markdown.tautua.org) (Apache 2.0)
+- [Jetty](http://eclipse.org/jetty) (Apache 2.0, EPL 1.0)
+- [SLF4J](http://www.slf4j.org) (MIT/X11)
+- [Log4j](http://logging.apache.org/log4j) (Apache 2.0)
+- [JCommander](http://jcommander.org) (Apache 2.0)
+- [BouncyCastle](http://www.bouncycastle.org) (MIT/X11)
+- [JSch - Java Secure Channel](http://www.jcraft.com/jsch) (BSD)
+- [Rome](http://rome.dev.java.net) (Apache 1.1)
+- [jdom](http://www.jdom.org) (Apache-style JDOM license)
+- [google-gson](http://code.google.com/google-gson) (Apache 2.0)
+- [javamail](http://kenai.com/projects/javamail) (CDDL-1.0, BSD, GPL-2.0, GNU-Classpath)
+- [Groovy](http://groovy.codehaus.org) (Apache 2.0)
+- [Lucene](http://lucene.apache.org) (Apache 2.0)
+- [UnboundID](http://www.unboundid.com) (LGPL 2.1)
+- [Ivy](http://ant.apache.org/ivy) (Apache 2.0)
+- [JCalendar](http://www.toedter.com/en/jcalendar) (LGPL 2.1)
+- [Commons-Compress](http://commons.apache.org/compress) (Apache 2.0)
+- [XZ for Java](http://tukaani.org/xz/java.html) (Public Domain)
+
+### Other Build Dependencies
+- [Fancybox image viewer](http://fancybox.net) (MIT and GPL dual-licensed)
+- [JUnit](http://junit.org) (Common Public License)
+- [commons-net](http://commons.apache.org/net) (Apache 2.0)
+- [ant-googlecode](http://code.google.com/p/ant-googlecode) (New BSD)
+- [Moxie](http://moxie.gitblit.com) (Apache 2.0)
+
+## Building from Source
+[Eclipse](http://eclipse.org) is recommended for development as the project settings are preconfigured.
+
+Additionally, [Google CodePro AnalytiX](http://code.google.com/javadevtools), [eclipse-cs](http://eclipse-cs.sourceforge.net), [FindBugs](http://findbugs.sourceforge.net), and [EclEmma](http://www.eclemma.org) are recommended development tools.
+
+1. Clone the git repository from [Github][gitbltsrc].
+2. Import the gitblit project into your Eclipse workspace.
+*There will be lots of build errors.*
+3. Using Ant, execute the `build.xml` script in the project root.
+*This will download all necessary build dependencies and will also generate the Keys class for accessing settings.*
+4. Select your gitblit project root and **Refresh** the project, this should correct all build problems.
+5. Using JUnit, execute the `com.gitblit.tests.GitBlitSuite` test suite.
+*This will clone some repositories from the web and run through the unit tests.*
+5. Review the settings in `gitblit.properties` in your project root.
+ - By default, the *git.repositoriesFolder* points to the repositories cloned by the test suite.
+ - If running on Linux you may have to change the served port(s) to > 1024 unless you are developing as the root user.
+6. Execute the *com.gitblit.Launcher* class to start Gitblit.
+
+
+## Contributing
+Pull requests are preferred. Patches are welcome.
+
+Contributions must be your own original work and must licensed under the [Apache License, Version 2.0][apachelicense], the same license used by Gitblit.
+
+[jgit]: http://eclipse.org/jgit "Eclipse JGit Site"
+[git]: http://git-scm.com "Official Git Site"
+[gitbltsrc]: http://github.com/gitblit "gitblit git repository"
+[googlecode]: http://code.google.com/p/gitblit "gitblit project management"
+[apachelicense]: http://www.apache.org/licenses/LICENSE-2.0 "Apache License, Version 2.0" \ No newline at end of file
diff --git a/src/site/fancybox/blank.gif b/src/site/fancybox/blank.gif
new file mode 100644
index 00000000..35d42e80
--- /dev/null
+++ b/src/site/fancybox/blank.gif
Binary files differ
diff --git a/src/site/fancybox/fancy_close.png b/src/site/fancybox/fancy_close.png
new file mode 100644
index 00000000..07035307
--- /dev/null
+++ b/src/site/fancybox/fancy_close.png
Binary files differ
diff --git a/src/site/fancybox/fancy_loading.png b/src/site/fancybox/fancy_loading.png
new file mode 100644
index 00000000..25030179
--- /dev/null
+++ b/src/site/fancybox/fancy_loading.png
Binary files differ
diff --git a/src/site/fancybox/fancy_nav_left.png b/src/site/fancybox/fancy_nav_left.png
new file mode 100644
index 00000000..ebaa6a4f
--- /dev/null
+++ b/src/site/fancybox/fancy_nav_left.png
Binary files differ
diff --git a/src/site/fancybox/fancy_nav_right.png b/src/site/fancybox/fancy_nav_right.png
new file mode 100644
index 00000000..873294e9
--- /dev/null
+++ b/src/site/fancybox/fancy_nav_right.png
Binary files differ
diff --git a/src/site/fancybox/fancy_shadow_e.png b/src/site/fancybox/fancy_shadow_e.png
new file mode 100644
index 00000000..2eda0893
--- /dev/null
+++ b/src/site/fancybox/fancy_shadow_e.png
Binary files differ
diff --git a/src/site/fancybox/fancy_shadow_n.png b/src/site/fancybox/fancy_shadow_n.png
new file mode 100644
index 00000000..69aa10e2
--- /dev/null
+++ b/src/site/fancybox/fancy_shadow_n.png
Binary files differ
diff --git a/src/site/fancybox/fancy_shadow_ne.png b/src/site/fancybox/fancy_shadow_ne.png
new file mode 100644
index 00000000..79f6980a
--- /dev/null
+++ b/src/site/fancybox/fancy_shadow_ne.png
Binary files differ
diff --git a/src/site/fancybox/fancy_shadow_nw.png b/src/site/fancybox/fancy_shadow_nw.png
new file mode 100644
index 00000000..7182cd93
--- /dev/null
+++ b/src/site/fancybox/fancy_shadow_nw.png
Binary files differ
diff --git a/src/site/fancybox/fancy_shadow_s.png b/src/site/fancybox/fancy_shadow_s.png
new file mode 100644
index 00000000..d8858bfb
--- /dev/null
+++ b/src/site/fancybox/fancy_shadow_s.png
Binary files differ
diff --git a/src/site/fancybox/fancy_shadow_se.png b/src/site/fancybox/fancy_shadow_se.png
new file mode 100644
index 00000000..541e3ffd
--- /dev/null
+++ b/src/site/fancybox/fancy_shadow_se.png
Binary files differ
diff --git a/src/site/fancybox/fancy_shadow_sw.png b/src/site/fancybox/fancy_shadow_sw.png
new file mode 100644
index 00000000..b451689f
--- /dev/null
+++ b/src/site/fancybox/fancy_shadow_sw.png
Binary files differ
diff --git a/src/site/fancybox/fancy_shadow_w.png b/src/site/fancybox/fancy_shadow_w.png
new file mode 100644
index 00000000..8a4e4a88
--- /dev/null
+++ b/src/site/fancybox/fancy_shadow_w.png
Binary files differ
diff --git a/src/site/fancybox/fancy_title_left.png b/src/site/fancybox/fancy_title_left.png
new file mode 100644
index 00000000..6049223d
--- /dev/null
+++ b/src/site/fancybox/fancy_title_left.png
Binary files differ
diff --git a/src/site/fancybox/fancy_title_main.png b/src/site/fancybox/fancy_title_main.png
new file mode 100644
index 00000000..8044271f
--- /dev/null
+++ b/src/site/fancybox/fancy_title_main.png
Binary files differ
diff --git a/src/site/fancybox/fancy_title_over.png b/src/site/fancybox/fancy_title_over.png
new file mode 100644
index 00000000..d9f458f4
--- /dev/null
+++ b/src/site/fancybox/fancy_title_over.png
Binary files differ
diff --git a/src/site/fancybox/fancy_title_right.png b/src/site/fancybox/fancy_title_right.png
new file mode 100644
index 00000000..e36d9db2
--- /dev/null
+++ b/src/site/fancybox/fancy_title_right.png
Binary files differ
diff --git a/src/site/fancybox/fancybox-x.png b/src/site/fancybox/fancybox-x.png
new file mode 100644
index 00000000..c2130f86
--- /dev/null
+++ b/src/site/fancybox/fancybox-x.png
Binary files differ
diff --git a/src/site/fancybox/fancybox-y.png b/src/site/fancybox/fancybox-y.png
new file mode 100644
index 00000000..7ef399b9
--- /dev/null
+++ b/src/site/fancybox/fancybox-y.png
Binary files differ
diff --git a/src/site/fancybox/fancybox.png b/src/site/fancybox/fancybox.png
new file mode 100644
index 00000000..65e14f68
--- /dev/null
+++ b/src/site/fancybox/fancybox.png
Binary files differ
diff --git a/src/site/fancybox/jquery-1.4.3.min.js b/src/site/fancybox/jquery-1.4.3.min.js
new file mode 100644
index 00000000..c941a5f7
--- /dev/null
+++ b/src/site/fancybox/jquery-1.4.3.min.js
@@ -0,0 +1,166 @@
+/*!
+ * jQuery JavaScript Library v1.4.3
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Oct 14 23:10:06 2010 -0400
+ */
+(function(E,A){function U(){return false}function ba(){return true}function ja(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ga(a){var b,d,e=[],f=[],h,k,l,n,s,v,B,D;k=c.data(this,this.nodeType?"events":"__events__");if(typeof k==="function")k=k.events;if(!(a.liveFired===this||!k||!k.live||a.button&&a.type==="click")){if(a.namespace)D=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var H=k.live.slice(0);for(n=0;n<H.length;n++){k=H[n];k.origType.replace(X,
+"")===a.type?f.push(k.selector):H.splice(n--,1)}f=c(a.target).closest(f,a.currentTarget);s=0;for(v=f.length;s<v;s++){B=f[s];for(n=0;n<H.length;n++){k=H[n];if(B.selector===k.selector&&(!D||D.test(k.namespace))){l=B.elem;h=null;if(k.preType==="mouseenter"||k.preType==="mouseleave"){a.type=k.preType;h=c(a.relatedTarget).closest(k.selector)[0]}if(!h||h!==l)e.push({elem:l,handleObj:k,level:B.level})}}}s=0;for(v=e.length;s<v;s++){f=e[s];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;
+a.handleObj=f.handleObj;D=f.handleObj.origHandler.apply(f.elem,arguments);if(D===false||a.isPropagationStopped()){d=f.level;if(D===false)b=false}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(Ha,"`").replace(Ia,"&")}function ka(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Ja.test(b))return c.filter(b,
+e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function la(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var k in e[h])c.event.add(this,h,e[h][k],e[h][k].data)}}})}function Ka(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}
+function ma(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?La:Ma,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function ca(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Na.test(a)?e(a,h):ca(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?
+e(a,""):c.each(b,function(f,h){ca(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(na.concat.apply([],na.slice(0,b)),function(){d[this]=a});return d}function oa(a){if(!da[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";da[a]=d}return da[a]}function ea(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var u=E.document,c=function(){function a(){if(!b.isReady){try{u.documentElement.doScroll("left")}catch(i){setTimeout(a,
+1);return}b.ready()}}var b=function(i,r){return new b.fn.init(i,r)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,k=/\S/,l=/^\s+/,n=/\s+$/,s=/\W/,v=/\d/,B=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,D=/^[\],:{}\s]*$/,H=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,G=/(?:^|:|,)(?:\s*\[)+/g,M=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,j=/(msie) ([\w.]+)/,o=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,
+q=[],t,x=Object.prototype.toString,C=Object.prototype.hasOwnProperty,P=Array.prototype.push,N=Array.prototype.slice,R=String.prototype.trim,Q=Array.prototype.indexOf,L={};b.fn=b.prototype={init:function(i,r){var y,z,F;if(!i)return this;if(i.nodeType){this.context=this[0]=i;this.length=1;return this}if(i==="body"&&!r&&u.body){this.context=u;this[0]=u.body;this.selector="body";this.length=1;return this}if(typeof i==="string")if((y=h.exec(i))&&(y[1]||!r))if(y[1]){F=r?r.ownerDocument||r:u;if(z=B.exec(i))if(b.isPlainObject(r)){i=
+[u.createElement(z[1])];b.fn.attr.call(i,r,true)}else i=[F.createElement(z[1])];else{z=b.buildFragment([y[1]],[F]);i=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,i)}else{if((z=u.getElementById(y[2]))&&z.parentNode){if(z.id!==y[2])return f.find(i);this.length=1;this[0]=z}this.context=u;this.selector=i;return this}else if(!r&&!s.test(i)){this.selector=i;this.context=u;i=u.getElementsByTagName(i);return b.merge(this,i)}else return!r||r.jquery?(r||f).find(i):b(r).find(i);
+else if(b.isFunction(i))return f.ready(i);if(i.selector!==A){this.selector=i.selector;this.context=i.context}return b.makeArray(i,this)},selector:"",jquery:"1.4.3",length:0,size:function(){return this.length},toArray:function(){return N.call(this,0)},get:function(i){return i==null?this.toArray():i<0?this.slice(i)[0]:this[i]},pushStack:function(i,r,y){var z=b();b.isArray(i)?P.apply(z,i):b.merge(z,i);z.prevObject=this;z.context=this.context;if(r==="find")z.selector=this.selector+(this.selector?" ":
+"")+y;else if(r)z.selector=this.selector+"."+r+"("+y+")";return z},each:function(i,r){return b.each(this,i,r)},ready:function(i){b.bindReady();if(b.isReady)i.call(u,b);else q&&q.push(i);return this},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(i){return this.pushStack(b.map(this,function(r,y){return i.call(r,
+y,r)}))},end:function(){return this.prevObject||b(null)},push:P,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var i=arguments[0]||{},r=1,y=arguments.length,z=false,F,I,K,J,fa;if(typeof i==="boolean"){z=i;i=arguments[1]||{};r=2}if(typeof i!=="object"&&!b.isFunction(i))i={};if(y===r){i=this;--r}for(;r<y;r++)if((F=arguments[r])!=null)for(I in F){K=i[I];J=F[I];if(i!==J)if(z&&J&&(b.isPlainObject(J)||(fa=b.isArray(J)))){if(fa){fa=false;clone=K&&b.isArray(K)?K:[]}else clone=
+K&&b.isPlainObject(K)?K:{};i[I]=b.extend(z,clone,J)}else if(J!==A)i[I]=J}return i};b.extend({noConflict:function(i){E.$=e;if(i)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(i){i===true&&b.readyWait--;if(!b.readyWait||i!==true&&!b.isReady){if(!u.body)return setTimeout(b.ready,1);b.isReady=true;if(!(i!==true&&--b.readyWait>0)){if(q){for(var r=0;i=q[r++];)i.call(u,b);q=null}b.fn.triggerHandler&&b(u).triggerHandler("ready")}}},bindReady:function(){if(!p){p=true;if(u.readyState==="complete")return setTimeout(b.ready,
+1);if(u.addEventListener){u.addEventListener("DOMContentLoaded",t,false);E.addEventListener("load",b.ready,false)}else if(u.attachEvent){u.attachEvent("onreadystatechange",t);E.attachEvent("onload",b.ready);var i=false;try{i=E.frameElement==null}catch(r){}u.documentElement.doScroll&&i&&a()}}},isFunction:function(i){return b.type(i)==="function"},isArray:Array.isArray||function(i){return b.type(i)==="array"},isWindow:function(i){return i&&typeof i==="object"&&"setInterval"in i},isNaN:function(i){return i==
+null||!v.test(i)||isNaN(i)},type:function(i){return i==null?String(i):L[x.call(i)]||"object"},isPlainObject:function(i){if(!i||b.type(i)!=="object"||i.nodeType||b.isWindow(i))return false;if(i.constructor&&!C.call(i,"constructor")&&!C.call(i.constructor.prototype,"isPrototypeOf"))return false;for(var r in i);return r===A||C.call(i,r)},isEmptyObject:function(i){for(var r in i)return false;return true},error:function(i){throw i;},parseJSON:function(i){if(typeof i!=="string"||!i)return null;i=b.trim(i);
+if(D.test(i.replace(H,"@").replace(w,"]").replace(G,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(i):(new Function("return "+i))();else b.error("Invalid JSON: "+i)},noop:function(){},globalEval:function(i){if(i&&k.test(i)){var r=u.getElementsByTagName("head")[0]||u.documentElement,y=u.createElement("script");y.type="text/javascript";if(b.support.scriptEval)y.appendChild(u.createTextNode(i));else y.text=i;r.insertBefore(y,r.firstChild);r.removeChild(y)}},nodeName:function(i,r){return i.nodeName&&i.nodeName.toUpperCase()===
+r.toUpperCase()},each:function(i,r,y){var z,F=0,I=i.length,K=I===A||b.isFunction(i);if(y)if(K)for(z in i){if(r.apply(i[z],y)===false)break}else for(;F<I;){if(r.apply(i[F++],y)===false)break}else if(K)for(z in i){if(r.call(i[z],z,i[z])===false)break}else for(y=i[0];F<I&&r.call(y,F,y)!==false;y=i[++F]);return i},trim:R?function(i){return i==null?"":R.call(i)}:function(i){return i==null?"":i.toString().replace(l,"").replace(n,"")},makeArray:function(i,r){var y=r||[];if(i!=null){var z=b.type(i);i.length==
+null||z==="string"||z==="function"||z==="regexp"||b.isWindow(i)?P.call(y,i):b.merge(y,i)}return y},inArray:function(i,r){if(r.indexOf)return r.indexOf(i);for(var y=0,z=r.length;y<z;y++)if(r[y]===i)return y;return-1},merge:function(i,r){var y=i.length,z=0;if(typeof r.length==="number")for(var F=r.length;z<F;z++)i[y++]=r[z];else for(;r[z]!==A;)i[y++]=r[z++];i.length=y;return i},grep:function(i,r,y){var z=[],F;y=!!y;for(var I=0,K=i.length;I<K;I++){F=!!r(i[I],I);y!==F&&z.push(i[I])}return z},map:function(i,
+r,y){for(var z=[],F,I=0,K=i.length;I<K;I++){F=r(i[I],I,y);if(F!=null)z[z.length]=F}return z.concat.apply([],z)},guid:1,proxy:function(i,r,y){if(arguments.length===2)if(typeof r==="string"){y=i;i=y[r];r=A}else if(r&&!b.isFunction(r)){y=r;r=A}if(!r&&i)r=function(){return i.apply(y||this,arguments)};if(i)r.guid=i.guid=i.guid||r.guid||b.guid++;return r},access:function(i,r,y,z,F,I){var K=i.length;if(typeof r==="object"){for(var J in r)b.access(i,J,r[J],z,F,y);return i}if(y!==A){z=!I&&z&&b.isFunction(y);
+for(J=0;J<K;J++)F(i[J],r,z?y.call(i[J],J,F(i[J],r)):y,I);return i}return K?F(i[0],r):A},now:function(){return(new Date).getTime()},uaMatch:function(i){i=i.toLowerCase();i=M.exec(i)||g.exec(i)||j.exec(i)||i.indexOf("compatible")<0&&o.exec(i)||[];return{browser:i[1]||"",version:i[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(i,r){L["[object "+r+"]"]=r.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=
+m.version}if(b.browser.webkit)b.browser.safari=true;if(Q)b.inArray=function(i,r){return Q.call(r,i)};if(!/\s/.test("\u00a0")){l=/^[\s\xA0]+/;n=/[\s\xA0]+$/}f=b(u);if(u.addEventListener)t=function(){u.removeEventListener("DOMContentLoaded",t,false);b.ready()};else if(u.attachEvent)t=function(){if(u.readyState==="complete"){u.detachEvent("onreadystatechange",t);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=u.documentElement,b=u.createElement("script"),d=u.createElement("div"),
+e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],k=u.createElement("select"),l=k.appendChild(u.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),
+hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:l.selected,optDisabled:false,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};k.disabled=true;c.support.optDisabled=!l.disabled;b.type="text/javascript";try{b.appendChild(u.createTextNode("window."+e+"=1;"))}catch(n){}a.insertBefore(b,
+a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function s(){c.support.noCloneEvent=false;d.detachEvent("onclick",s)});d.cloneNode(true).fireEvent("onclick")}d=u.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=u.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var s=u.createElement("div");
+s.style.width=s.style.paddingLeft="1px";u.body.appendChild(s);c.boxModel=c.support.boxModel=s.offsetWidth===2;if("zoom"in s.style){s.style.display="inline";s.style.zoom=1;c.support.inlineBlockNeedsLayout=s.offsetWidth===2;s.style.display="";s.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=s.offsetWidth!==2}s.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var v=s.getElementsByTagName("td");c.support.reliableHiddenOffsets=v[0].offsetHeight===
+0;v[0].style.display="";v[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&v[0].offsetHeight===0;s.innerHTML="";u.body.removeChild(s).style.display="none"});a=function(s){var v=u.createElement("div");s="on"+s;var B=s in v;if(!B){v.setAttribute(s,"return;");B=typeof v[s]==="function"}return B};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",
+cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var pa={},Oa=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?pa:a;var e=a.nodeType,f=e?a[c.expando]:null,h=c.cache;if(!(e&&!f&&typeof b==="string"&&d===A)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=
+c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==A)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?pa:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);else if(d)delete f[e];else for(var k in a)delete a[k]}},acceptData:function(a){if(a.nodeName){var b=
+c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){if(typeof a==="undefined")return this.length?c.data(this[0]):null;else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===A){var e=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(e===A&&this.length){e=c.data(this[0],a);if(e===A&&this[0].nodeType===1){e=this[0].getAttribute("data-"+a);if(typeof e===
+"string")try{e=e==="true"?true:e==="false"?false:e==="null"?null:!c.isNaN(e)?parseFloat(e):Oa.test(e)?c.parseJSON(e):e}catch(f){}else e=A}}return e===A&&d[1]?this.data(d[0]):e}else return this.each(function(){var h=c(this),k=[d[0],b];h.triggerHandler("setData"+d[1]+"!",k);c.data(this,a,b);h.triggerHandler("changeData"+d[1]+"!",k)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=c.data(a,b);if(!d)return e||
+[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===A)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
+a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var qa=/[\n\t]/g,ga=/\s+/,Pa=/\r/g,Qa=/^(?:href|src|style)$/,Ra=/^(?:button|input)$/i,Sa=/^(?:button|input|object|select|textarea)$/i,Ta=/^a(?:rea)?$/i,ra=/^(?:radio|checkbox)$/i;c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,
+a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(s){var v=c(this);v.addClass(a.call(this,s,v.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ga),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1)if(f.className){for(var h=" "+f.className+" ",k=f.className,l=0,n=b.length;l<n;l++)if(h.indexOf(" "+b[l]+" ")<0)k+=" "+b[l];f.className=c.trim(k)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(n){var s=
+c(this);s.removeClass(a.call(this,n,s.attr("class")))});if(a&&typeof a==="string"||a===A)for(var b=(a||"").split(ga),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(qa," "),k=0,l=b.length;k<l;k++)h=h.replace(" "+b[k]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,
+f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,k=c(this),l=b,n=a.split(ga);f=n[h++];){l=e?l:!k.hasClass(f);k[l?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(qa," ").indexOf(a)>-1)return true;return false},
+val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var k=f[h];if(k.selected&&(c.support.optDisabled?!k.disabled:k.getAttribute("disabled")===null)&&(!k.parentNode.disabled||!c.nodeName(k.parentNode,"optgroup"))){a=c(k).val();if(b)return a;d.push(a)}}return d}if(ra.test(b.type)&&
+!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Pa,"")}return A}var l=c.isFunction(a);return this.each(function(n){var s=c(this),v=a;if(this.nodeType===1){if(l)v=a.call(this,n,s.val());if(v==null)v="";else if(typeof v==="number")v+="";else if(c.isArray(v))v=c.map(v,function(D){return D==null?"":D+""});if(c.isArray(v)&&ra.test(this.type))this.checked=c.inArray(s.val(),v)>=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected=
+c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
+if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Sa.test(a.nodeName)||Ta.test(a.nodeName)&&a.href?0:A;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return A;a=!c.support.hrefNormalized&&e&&
+h?a.getAttribute(b,2):a.getAttribute(b);return a===null?A:a}}});var X=/\.(.*)$/,ha=/^(?:textarea|input|select)$/i,Ha=/\./g,Ia=/ /g,Ua=/[^\w\s.|`]/g,Va=function(a){return a.replace(Ua,"\\$&")},sa={focusin:0,focusout:0};c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var k=a.nodeType?"events":"__events__",l=h[k],n=h.handle;if(typeof l===
+"function"){n=l.handle;l=l.events}else if(!l){a.nodeType||(h[k]=h=function(){});h.events=l={}}if(!n)h.handle=n=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(n.elem,arguments):A};n.elem=a;b=b.split(" ");for(var s=0,v;k=b[s++];){h=f?c.extend({},f):{handler:d,data:e};if(k.indexOf(".")>-1){v=k.split(".");k=v.shift();h.namespace=v.slice(0).sort().join(".")}else{v=[];h.namespace=""}h.type=k;if(!h.guid)h.guid=d.guid;var B=l[k],D=c.event.special[k]||{};if(!B){B=l[k]=[];
+if(!D.setup||D.setup.call(a,e,v,n)===false)if(a.addEventListener)a.addEventListener(k,n,false);else a.attachEvent&&a.attachEvent("on"+k,n)}if(D.add){D.add.call(a,h);if(!h.handler.guid)h.handler.guid=d.guid}B.push(h);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,k=0,l,n,s,v,B,D,H=a.nodeType?"events":"__events__",w=c.data(a),G=w&&w[H];if(w&&G){if(typeof G==="function"){w=G;G=G.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||
+typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in G)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[k++];){v=f;l=f.indexOf(".")<0;n=[];if(!l){n=f.split(".");f=n.shift();s=RegExp("(^|\\.)"+c.map(n.slice(0).sort(),Va).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(B=G[f])if(d){v=c.event.special[f]||{};for(h=e||0;h<B.length;h++){D=B[h];if(d.guid===D.guid){if(l||s.test(D.namespace)){e==null&&B.splice(h--,1);v.remove&&v.remove.call(a,D)}if(e!=null)break}}if(B.length===0||e!=null&&B.length===1){if(!v.teardown||
+v.teardown.call(a,n)===false)c.removeEvent(a,f,w.handle);delete G[f]}}else for(h=0;h<B.length;h++){D=B[h];if(l||s.test(D.namespace)){c.event.remove(a,v,D.handler,h);B.splice(h--,1)}}}if(c.isEmptyObject(G)){if(b=w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,H);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=
+f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return A;a.result=A;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===
+false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){e=a.target;var k,l=f.replace(X,""),n=c.nodeName(e,"a")&&l==="click",s=c.event.special[l]||{};if((!s._default||s._default.call(d,a)===false)&&!n&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[l]){if(k=e["on"+l])e["on"+l]=null;c.event.triggered=true;e[l]()}}catch(v){}if(k)e["on"+l]=k;c.event.triggered=false}}},handle:function(a){var b,d,e;
+d=[];var f,h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var k=d.length;f<k;f++){var l=d[f];if(b||e.test(l.namespace)){a.handler=l.handler;a.data=
+l.data;a.handleObj=l;l=l.handler.apply(this,h);if(l!==A){a.result=l;if(l===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||u;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=u.documentElement;d=u.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
+d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==A)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ga,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
+Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=u.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
+c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ba;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ba;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
+var ta=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},ua=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?ua:ta,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?ua:ta)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
+"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=A;return ja("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=A;return ja("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
+va=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ha.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=va(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===A||f===e))if(e!=null||f){a.type="change";a.liveFired=
+A;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",va(a))}},setup:function(){if(this.type===
+"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ha.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ha.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}u.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){sa[b]++===0&&u.addEventListener(a,d,true)},teardown:function(){--sa[b]===
+0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h<l;h++)c.event.add(this[h],d,k,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
+a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
+1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var wa={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var k,l=0,n,s,v=h||this.selector;h=h?this:c(this.context);if(typeof d===
+"object"&&!d.preventDefault){for(k in d)h[b](k,e,d[k],v);return this}if(c.isFunction(e)){f=e;e=A}for(d=(d||"").split(" ");(k=d[l++])!=null;){n=X.exec(k);s="";if(n){s=n[0];k=k.replace(X,"")}if(k==="hover")d.push("mouseenter"+s,"mouseleave"+s);else{n=k;if(k==="focus"||k==="blur"){d.push(wa[k]+s);k+=s}else k=(wa[k]||k)+s;if(b==="live"){s=0;for(var B=h.length;s<B;s++)c.event.add(h[s],"live."+Y(k,v),{data:e,selector:v,handler:f,origType:k,origHandler:f,preType:n})}else h.unbind("live."+Y(k,v),f)}}return this}});
+c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
+(function(){function a(g,j,o,m,p,q){p=0;for(var t=m.length;p<t;p++){var x=m[p];if(x){x=x[g];for(var C=false;x;){if(x.sizcache===o){C=m[x.sizset];break}if(x.nodeType===1&&!q){x.sizcache=o;x.sizset=p}if(x.nodeName.toLowerCase()===j){C=x;break}x=x[g]}m[p]=C}}}function b(g,j,o,m,p,q){p=0;for(var t=m.length;p<t;p++){var x=m[p];if(x){x=x[g];for(var C=false;x;){if(x.sizcache===o){C=m[x.sizset];break}if(x.nodeType===1){if(!q){x.sizcache=o;x.sizset=p}if(typeof j!=="string"){if(x===j){C=true;break}}else if(l.filter(j,
+[x]).length>0){C=x;break}}x=x[g]}m[p]=C}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,k=true;[0,0].sort(function(){k=false;return 0});var l=function(g,j,o,m){o=o||[];var p=j=j||u;if(j.nodeType!==1&&j.nodeType!==9)return[];if(!g||typeof g!=="string")return o;var q=[],t,x,C,P,N=true,R=l.isXML(j),Q=g,L;do{d.exec("");if(t=d.exec(Q)){Q=t[3];q.push(t[1]);if(t[2]){P=t[3];
+break}}}while(t);if(q.length>1&&s.exec(g))if(q.length===2&&n.relative[q[0]])x=M(q[0]+q[1],j);else for(x=n.relative[q[0]]?[j]:l(q.shift(),j);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();x=M(g,x)}else{if(!m&&q.length>1&&j.nodeType===9&&!R&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){t=l.find(q.shift(),j,R);j=t.expr?l.filter(t.expr,t.set)[0]:t.set[0]}if(j){t=m?{expr:q.pop(),set:D(m)}:l.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&j.parentNode?j.parentNode:j,R);x=t.expr?l.filter(t.expr,
+t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h=
+k;g.sort(w);if(h)for(var j=1;j<g.length;j++)g[j]===g[j-1]&&g.splice(j--,1)}return g};l.matches=function(g,j){return l(g,null,null,j)};l.matchesSelector=function(g,j){return l(j,null,null,[g]).length>0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p<q;p++){var t=n.order[p],x;if(x=n.leftMatch[t].exec(g)){var C=x[1];x.splice(1,1);if(C.substr(C.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");m=n.find[t](x,j,o);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=j.getElementsByTagName("*"));
+return{set:m,expr:g}};l.filter=function(g,j,o,m){for(var p=g,q=[],t=j,x,C,P=j&&j[0]&&l.isXML(j[0]);g&&j.length;){for(var N in n.filter)if((x=n.leftMatch[N].exec(g))!=null&&x[2]){var R=n.filter[N],Q,L;L=x[1];C=false;x.splice(1,1);if(L.substr(L.length-1)!=="\\"){if(t===q)q=[];if(n.preFilter[N])if(x=n.preFilter[N](x,t,o,q,m,P)){if(x===true)continue}else C=Q=true;if(x)for(var i=0;(L=t[i])!=null;i++)if(L){Q=R(L,x,i,t);var r=m^!!Q;if(o&&Q!=null)if(r)C=true;else t[i]=false;else if(r){q.push(L);C=true}}if(Q!==
+A){o||(t=q);g=g.replace(n.match[N],"");if(!C)return[];break}}}if(g===p)if(C==null)l.error(g);else break;p=g}return t};l.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=l.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
+POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,j){var o=typeof j==="string",m=o&&!/\W/.test(j);o=o&&!m;if(m)j=j.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=o||q&&q.nodeName.toLowerCase()===
+j?q||false:q===j}o&&l.filter(j,g,true)},">":function(g,j){var o=typeof j==="string",m,p=0,q=g.length;if(o&&!/\W/.test(j))for(j=j.toLowerCase();p<q;p++){if(m=g[p]){o=m.parentNode;g[p]=o.nodeName.toLowerCase()===j?o:false}}else{for(;p<q;p++)if(m=g[p])g[p]=o?m.parentNode:m.parentNode===j;o&&l.filter(j,g,true)}},"":function(g,j,o){var m=e++,p=b,q;if(typeof j==="string"&&!/\W/.test(j)){q=j=j.toLowerCase();p=a}p("parentNode",j,m,g,q,o)},"~":function(g,j,o){var m=e++,p=b,q;if(typeof j==="string"&&!/\W/.test(j)){q=
+j=j.toLowerCase();p=a}p("previousSibling",j,m,g,q,o)}},find:{ID:function(g,j,o){if(typeof j.getElementById!=="undefined"&&!o)return(g=j.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,j){if(typeof j.getElementsByName!=="undefined"){for(var o=[],m=j.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&o.push(m[p]);return o.length===0?null:o}},TAG:function(g,j){return j.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,j,o,m,p,q){g=" "+g[1].replace(/\\/g,
+"")+" ";if(q)return g;q=0;for(var t;(t=j[q])!=null;q++)if(t)if(p^(t.className&&(" "+t.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))o||m.push(t);else if(o)j[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var j=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=j[1]+(j[2]||1)-0;g[3]=j[3]-0}g[0]=e++;return g},ATTR:function(g,j,o,
+m,p,q){j=g[1].replace(/\\/g,"");if(!q&&n.attrMap[j])g[1]=n.attrMap[j];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,j,o,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=l(g[3],null,null,j);else{g=l.filter(g[3],j,o,true^p);o||m.push.apply(m,g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
+true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,j,o){return!!l(o[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
+g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,j){return j===0},last:function(g,j,o,m){return j===m.length-1},even:function(g,j){return j%2===0},odd:function(g,j){return j%2===1},lt:function(g,j,o){return j<o[3]-0},gt:function(g,j,o){return j>o[3]-0},nth:function(g,j,o){return o[3]-
+0===j},eq:function(g,j,o){return o[3]-0===j}},filter:{PSEUDO:function(g,j,o,m){var p=j[1],q=n.filters[p];if(q)return q(g,o,j,m);else if(p==="contains")return(g.textContent||g.innerText||l.getText([g])||"").indexOf(j[3])>=0;else if(p==="not"){j=j[3];o=0;for(m=j.length;o<m;o++)if(j[o]===g)return false;return true}else l.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,j){var o=j[1],m=g;switch(o){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(o===
+"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":o=j[2];var p=j[3];if(o===1&&p===0)return true;var q=j[0],t=g.parentNode;if(t&&(t.sizcache!==q||!g.nodeIndex)){var x=0;for(m=t.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++x;t.sizcache=q}m=g.nodeIndex-p;return o===0?m===0:m%o===0&&m/o>=0}},ID:function(g,j){return g.nodeType===1&&g.getAttribute("id")===j},TAG:function(g,j){return j==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
+j},CLASS:function(g,j){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(j)>-1},ATTR:function(g,j){var o=j[1];o=n.attrHandle[o]?n.attrHandle[o](g):g[o]!=null?g[o]:g.getAttribute(o);var m=o+"",p=j[2],q=j[4];return o==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&o!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,j,o,m){var p=n.setFilters[j[2]];
+if(p)return p(g,o,j,m)}}},s=n.match.POS,v=function(g,j){return"\\"+(j-0+1)},B;for(B in n.match){n.match[B]=RegExp(n.match[B].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[B]=RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[B].source.replace(/\\(\d+)/g,v))}var D=function(g,j){g=Array.prototype.slice.call(g,0);if(j){j.push.apply(j,g);return j}return g};try{Array.prototype.slice.call(u.documentElement.childNodes,0)}catch(H){D=function(g,j){var o=j||[],m=0;if(f.call(g)==="[object Array]")Array.prototype.push.apply(o,
+g);else if(typeof g.length==="number")for(var p=g.length;m<p;m++)o.push(g[m]);else for(;g[m];m++)o.push(g[m]);return o}}var w,G;if(u.documentElement.compareDocumentPosition)w=function(g,j){if(g===j){h=true;return 0}if(!g.compareDocumentPosition||!j.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(j)&4?-1:1};else{w=function(g,j){var o=[],m=[],p=g.parentNode,q=j.parentNode,t=p;if(g===j){h=true;return 0}else if(p===q)return G(g,j);else if(p){if(!q)return 1}else return-1;
+for(;t;){o.unshift(t);t=t.parentNode}for(t=q;t;){m.unshift(t);t=t.parentNode}p=o.length;q=m.length;for(t=0;t<p&&t<q;t++)if(o[t]!==m[t])return G(o[t],m[t]);return t===p?G(g,m[t],-1):G(o[t],j,1)};G=function(g,j,o){if(g===j)return o;for(g=g.nextSibling;g;){if(g===j)return-1;g=g.nextSibling}return 1}}l.getText=function(g){for(var j="",o,m=0;g[m];m++){o=g[m];if(o.nodeType===3||o.nodeType===4)j+=o.nodeValue;else if(o.nodeType!==8)j+=l.getText(o.childNodes)}return j};(function(){var g=u.createElement("div"),
+j="script"+(new Date).getTime();g.innerHTML="<a name='"+j+"'/>";var o=u.documentElement;o.insertBefore(g,o.firstChild);if(u.getElementById(j)){n.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:A:[]};n.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}o.removeChild(g);
+o=g=null})();(function(){var g=u.createElement("div");g.appendChild(u.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(j,o){var m=o.getElementsByTagName(j[1]);if(j[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(j){return j.getAttribute("href",2)};g=null})();u.querySelectorAll&&
+function(){var g=l,j=u.createElement("div");j.innerHTML="<p class='TEST'></p>";if(!(j.querySelectorAll&&j.querySelectorAll(".TEST").length===0)){l=function(m,p,q,t){p=p||u;if(!t&&!l.isXML(p))if(p.nodeType===9)try{return D(p.querySelectorAll(m),q)}catch(x){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var C=p.id,P=p.id="__sizzle__";try{return D(p.querySelectorAll("#"+P+" "+m),q)}catch(N){}finally{if(C)p.id=C;else p.removeAttribute("id")}}return g(m,p,q,t)};for(var o in g)l[o]=g[o];
+j=null}}();(function(){var g=u.documentElement,j=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,o=false;try{j.call(u.documentElement,":sizzle")}catch(m){o=true}if(j)l.matchesSelector=function(p,q){try{if(o||!n.match.PSEUDO.test(q))return j.call(p,q)}catch(t){}return l(q,null,null,[p]).length>0}})();(function(){var g=u.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===
+0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(j,o,m){if(typeof o.getElementsByClassName!=="undefined"&&!m)return o.getElementsByClassName(j[1])};g=null}}})();l.contains=u.documentElement.contains?function(g,j){return g!==j&&(g.contains?g.contains(j):true)}:function(g,j){return!!(g.compareDocumentPosition(j)&16)};l.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var M=function(g,
+j){for(var o=[],m="",p,q=j.nodeType?[j]:j;p=n.match.PSEUDO.exec(g);){m+=p[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;p=0;for(var t=q.length;p<t;p++)l(g,q[p],o);return l.filter(m,o)};c.find=l;c.expr=l.selectors;c.expr[":"]=c.expr.filters;c.unique=l.uniqueSort;c.text=l.getText;c.isXMLDoc=l.isXML;c.contains=l.contains})();var Wa=/Until$/,Xa=/^(?:parents|prevUntil|prevAll)/,Ya=/,/,Ja=/^.[^:#\[\.,]*$/,Za=Array.prototype.slice,$a=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("",
+"find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var k=0;k<d;k++)if(b[k]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(ka(this,a,false),"not",a)},filter:function(a){return this.pushStack(ka(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,
+b){var d=[],e,f,h=this[0];if(c.isArray(a)){var k={},l,n=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:n})}h=h.parentNode;n++}}return d}k=$a.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(k?k.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||
+!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});
+c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",
+d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Wa.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||Ya.test(e))&&Xa.test(a))f=f.reverse();return this.pushStack(f,a,Za.call(arguments).join(","))}});
+c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===A||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var xa=/ jQuery\d+="(?:\d+|null)"/g,
+$=/^\s+/,ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,za=/<([\w:]+)/,ab=/<tbody/i,bb=/<|&#?\w+;/,Aa=/<(?:script|object|embed|option|style)/i,Ba=/checked\s*(?:[^=]|=\s*.checked.)/i,cb=/\=([^="'>\s]+\/)>/g,O={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],
+area:[1,"<map>","</map>"],_default:[0,"",""]};O.optgroup=O.option;O.tbody=O.tfoot=O.colgroup=O.caption=O.thead;O.th=O.td;if(!c.support.htmlSerialize)O._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==A)return this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,
+d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},
+unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=
+c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));
+c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(xa,"").replace(cb,'="$1">').replace($,
+"")],e)[0]}else return this.cloneNode(true)});if(a===true){la(this,b);la(this.find("*"),b.find("*"))}return b},html:function(a){if(a===A)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(xa,""):null;else if(typeof a==="string"&&!Aa.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!O[(za.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ya,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?
+this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,
+true)},domManip:function(a,b,d){var e,f,h=a[0],k=[],l;if(!c.support.checkClone&&arguments.length===3&&typeof h==="string"&&Ba.test(h))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(h))return this.each(function(s){var v=c(this);a[0]=h.call(this,s,b?v.html():A);v.domManip(a,b,d)});if(this[0]){e=h&&h.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);l=e.fragment;if(f=l.childNodes.length===1?l=l.firstChild:
+l.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var n=this.length;f<n;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):this[f]:this[f],f>0||e.cacheable||this.length>1?l.cloneNode(true):l)}k.length&&c.each(k,Ka)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:u;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===u&&!Aa.test(a[0])&&(c.support.checkClone||
+!Ba.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=
+d.length;f<h;f++){var k=(f>0?this.clone(true):this).get();c(d[f])[b](k);e=e.concat(k)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||u;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||u;for(var f=[],h=0,k;(k=a[h])!=null;h++){if(typeof k==="number")k+="";if(k){if(typeof k==="string"&&!bb.test(k))k=b.createTextNode(k);else if(typeof k==="string"){k=k.replace(ya,"<$1></$2>");var l=(za.exec(k)||["",""])[1].toLowerCase(),n=O[l]||O._default,
+s=n[0],v=b.createElement("div");for(v.innerHTML=n[1]+k+n[2];s--;)v=v.lastChild;if(!c.support.tbody){s=ab.test(k);l=l==="table"&&!s?v.firstChild&&v.firstChild.childNodes:n[1]==="<table>"&&!s?v.childNodes:[];for(n=l.length-1;n>=0;--n)c.nodeName(l[n],"tbody")&&!l[n].childNodes.length&&l[n].parentNode.removeChild(l[n])}!c.support.leadingWhitespace&&$.test(k)&&v.insertBefore(b.createTextNode($.exec(k)[0]),v.firstChild);k=v.childNodes}if(k.nodeType)f.push(k);else f=c.merge(f,k)}}if(d)for(h=0;f[h];h++)if(e&&
+c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,k=0,l;(l=a[k])!=null;k++)if(!(l.nodeName&&c.noData[l.nodeName.toLowerCase()]))if(d=l[c.expando]){if((b=e[d])&&b.events)for(var n in b.events)f[n]?
+c.event.remove(l,n):c.removeEvent(l,n,b.handle);if(h)delete l[c.expando];else l.removeAttribute&&l.removeAttribute(c.expando);delete e[d]}}});var Ca=/alpha\([^)]*\)/i,db=/opacity=([^)]*)/,eb=/-([a-z])/ig,fb=/([A-Z])/g,Da=/^-?\d+(?:px)?$/i,gb=/^-?\d/,hb={position:"absolute",visibility:"hidden",display:"block"},La=["Left","Right"],Ma=["Top","Bottom"],W,ib=u.defaultView&&u.defaultView.getComputedStyle,jb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===A)return this;
+return c.access(this,a,b,true,function(d,e,f){return f!==A?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),k=a.style,l=c.cssHooks[h];b=c.cssProps[h]||
+h;if(d!==A){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!l||!("set"in l)||(d=l.set(a,d))!==A)try{k[b]=d}catch(n){}}}else{if(l&&"get"in l&&(f=l.get(a,false,e))!==A)return f;return k[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==A)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=
+e[f]},camelCase:function(a){return a.replace(eb,jb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=ma(d,b,f);else c.swap(d,hb,function(){h=ma(d,b,f)});return h+"px"}},set:function(d,e){if(Da.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return db.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":
+b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=d.filter||"";d.filter=Ca.test(f)?f.replace(Ca,e):d.filter+" "+e}};if(ib)W=function(a,b,d){var e;d=d.replace(fb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return A;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};else if(u.documentElement.currentStyle)W=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],
+h=a.style;if(!Da.test(f)&&gb.test(f)){d=h.left;e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f};if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var kb=c.now(),lb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+mb=/^(?:select|textarea)/i,nb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ob=/^(?:GET|HEAD|DELETE)$/,Na=/\[\]$/,T=/\=\?(&|$)/,ia=/\?/,pb=/([?&])_=[^&]*/,qb=/^(\w+:)?\/\/([^\/?#]+)/,rb=/%20/g,sb=/#.*$/,Ea=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ea)return Ea.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=
+b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(k,l){if(l==="success"||l==="notmodified")h.html(f?c("<div>").append(k.responseText.replace(lb,"")).find(f):k.responseText);d&&h.each(d,[k.responseText,l,k])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
+!this.disabled&&(this.checked||mb.test(this.nodeName)||nb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
+getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
+script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),k=ob.test(h);b.url=b.url.replace(sb,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ia.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
+!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+kb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var l=E[d];E[d]=function(m){f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);if(c.isFunction(l))l(m);else{E[d]=A;try{delete E[d]}catch(p){}}v&&v.removeChild(B)}}if(b.dataType==="script"&&b.cache===null)b.cache=
+false;if(b.cache===false&&h==="GET"){var n=c.now(),s=b.url.replace(pb,"$1_="+n);b.url=s+(s===b.url?(ia.test(b.url)?"&":"?")+"_="+n:"")}if(b.data&&h==="GET")b.url+=(ia.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");n=(n=qb.exec(b.url))&&(n[1]&&n[1]!==location.protocol||n[2]!==location.host);if(b.dataType==="script"&&h==="GET"&&n){var v=u.getElementsByTagName("head")[0]||u.documentElement,B=u.createElement("script");if(b.scriptCharset)B.charset=b.scriptCharset;B.src=
+b.url;if(!d){var D=false;B.onload=B.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);B.onload=B.onreadystatechange=null;v&&B.parentNode&&v.removeChild(B)}}}v.insertBefore(B,v.firstChild);return A}var H=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!k||a&&a.contentType)w.setRequestHeader("Content-Type",
+b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}n||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(G){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
+c.triggerGlobal(b,"ajaxSend",[w,b]);var M=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){H||c.handleComplete(b,w,e,f);H=true;if(w)w.onreadystatechange=c.noop}else if(!H&&w&&(w.readyState===4||m==="timeout")){H=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
+c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&g.call&&g.call(w);M("abort")}}catch(j){}b.async&&b.timeout>0&&setTimeout(function(){w&&!H&&M("timeout")},b.timeout);try{w.send(k||b.data==null?null:b.data)}catch(o){c.handleError(b,w,null,o);c.handleComplete(b,w,e,f)}b.async||M();return w}},param:function(a,b){var d=[],e=function(h,k){k=c.isFunction(k)?k():k;d[d.length]=encodeURIComponent(h)+
+"="+encodeURIComponent(k)};if(b===A)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)ca(f,a[f],b,e);return d.join("&").replace(rb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",[b,a])},handleComplete:function(a,
+b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),e=a.getResponseHeader("Etag");
+if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});if(E.ActiveXObject)c.ajaxSettings.xhr=
+function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var da={},tb=/^(?:toggle|show|hide)$/,ub=/^([+\-]=)?([\d+.\-]+)(.*)$/,aa,na=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",3),a,b,d);else{a=
+0;for(b=this.length;a<b;a++){if(!c.data(this[a],"olddisplay")&&this[a].style.display==="none")this[a].style.display="";this[a].style.display===""&&c.css(this[a],"display")==="none"&&c.data(this[a],"olddisplay",oa(this[a].nodeName))}for(a=0;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",d)}for(a=
+0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,d,e);if(c.isEmptyObject(a))return this.each(f.complete);
+return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),k,l=this.nodeType===1,n=l&&c(this).is(":hidden"),s=this;for(k in a){var v=c.camelCase(k);if(k!==v){a[v]=a[k];delete a[k];k=v}if(a[k]==="hide"&&n||a[k]==="show"&&!n)return h.complete.call(this);if(l&&(k==="height"||k==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(oa(this.nodeName)===
+"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[k])){(h.specialEasing=h.specialEasing||{})[k]=a[k][1];a[k]=a[k][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(B,D){var H=new c.fx(s,h,B);if(tb.test(D))H[D==="toggle"?n?"show":"hide":D](a);else{var w=ub.exec(D),G=H.cur(true)||0;if(w){var M=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(s,B,(M||1)+g);
+G=(M||1)/H.cur(true)*G;c.style(s,B,G+g)}if(w[1])M=(w[1]==="-="?-1:1)*M+G;H.custom(G,M,g)}else H.custom(G,D,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
+d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
+Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(h){return f.step(h)}
+this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var f=this;a=c.fx;e.elem=this.elem;if(e()&&c.timers.push(e)&&!aa)aa=setInterval(a.tick,a.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
+this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(l,n){f.style["overflow"+n]=h.overflow[l]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
+this.options.show)for(var k in this.options.curAnim)c.style(this.elem,k,this.options.orig[k]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
+c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(aa);aa=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
+b.elem}).length};var vb=/^t(?:able|d|h)$/i,Fa=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in u.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(k){c.offset.setOffset(this,a,k)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=ea(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
+h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(s){c.offset.setOffset(this,a,s)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,e=b.ownerDocument,f,h=e.documentElement,k=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;
+for(var l=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==k&&b!==h;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;f=e?e.getComputedStyle(b,null):b.currentStyle;l-=b.scrollTop;n-=b.scrollLeft;if(b===d){l+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&vb.test(b.nodeName))){l+=parseFloat(f.borderTopWidth)||0;n+=parseFloat(f.borderLeftWidth)||0}d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&f.overflow!=="visible"){l+=
+parseFloat(f.borderTopWidth)||0;n+=parseFloat(f.borderLeftWidth)||0}f=f}if(f.position==="relative"||f.position==="static"){l+=k.offsetTop;n+=k.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){l+=Math.max(h.scrollTop,k.scrollTop);n+=Math.max(h.scrollLeft,k.scrollLeft)}return{top:l,left:n}};c.offset={initialize:function(){var a=u.body,b=u.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
+height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
+f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
+"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),k=c.css(a,"top"),l=c.css(a,"left"),n=e==="absolute"&&c.inArray("auto",[k,l])>-1;e={};var s={};if(n)s=f.position();k=n?s.top:parseInt(k,10)||0;l=n?s.left:parseInt(l,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+k;if(b.left!=null)e.left=b.left-h.left+l;"using"in b?b.using.call(a,
+e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Fa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||u.body;a&&!Fa.test(a.nodeName)&&
+c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==A)return this.each(function(){if(h=ea(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=ea(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
+c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(h){var k=c(this);k[d](e.call(this,h,k[d]()))});return c.isWindow(f)?f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b]:f.nodeType===9?Math.max(f.documentElement["client"+
+b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]):e===A?parseFloat(c.css(f,d)):this.css(d,typeof e==="string"?e:e+"px")}})})(window);
diff --git a/src/site/fancybox/jquery.easing-1.3.pack.js b/src/site/fancybox/jquery.easing-1.3.pack.js
new file mode 100644
index 00000000..9028179e
--- /dev/null
+++ b/src/site/fancybox/jquery.easing-1.3.pack.js
@@ -0,0 +1,72 @@
+/*
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
+ *
+ * Uses the built in easing capabilities added In jQuery 1.1
+ * to offer multiple easing options
+ *
+ * TERMS OF USE - jQuery Easing
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright © 2008 George McGinley Smith
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+*/
+
+// t: current time, b: begInnIng value, c: change In value, d: duration
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))
+
+/*
+ *
+ * TERMS OF USE - EASING EQUATIONS
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright © 2001 Robert Penner
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
diff --git a/src/site/fancybox/jquery.fancybox-1.3.4.css b/src/site/fancybox/jquery.fancybox-1.3.4.css
new file mode 100644
index 00000000..6f53d8f4
--- /dev/null
+++ b/src/site/fancybox/jquery.fancybox-1.3.4.css
@@ -0,0 +1,359 @@
+/*
+ * FancyBox - jQuery Plugin
+ * Simple and fancy lightbox alternative
+ *
+ * Examples and documentation at: http://fancybox.net
+ *
+ * Copyright (c) 2008 - 2010 Janis Skarnelis
+ * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
+ *
+ * Version: 1.3.4 (11/11/2010)
+ * Requires: jQuery v1.3+
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+
+#fancybox-loading {
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ width: 40px;
+ height: 40px;
+ margin-top: -20px;
+ margin-left: -20px;
+ cursor: pointer;
+ overflow: hidden;
+ z-index: 1104;
+ display: none;
+}
+
+#fancybox-loading div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 40px;
+ height: 480px;
+ background-image: url('fancybox.png');
+}
+
+#fancybox-overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ z-index: 1100;
+ display: none;
+}
+
+#fancybox-tmp {
+ padding: 0;
+ margin: 0;
+ border: 0;
+ overflow: auto;
+ display: none;
+}
+
+#fancybox-wrap {
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 20px;
+ z-index: 1101;
+ outline: none;
+ display: none;
+}
+
+#fancybox-outer {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ background: #fff;
+}
+
+#fancybox-content {
+ width: 0;
+ height: 0;
+ padding: 0;
+ outline: none;
+ position: relative;
+ overflow: hidden;
+ z-index: 1102;
+ border: 0px solid #fff;
+}
+
+#fancybox-hide-sel-frame {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: transparent;
+ z-index: 1101;
+}
+
+#fancybox-close {
+ position: absolute;
+ top: -15px;
+ right: -15px;
+ width: 30px;
+ height: 30px;
+ background: transparent url('fancybox.png') -40px 0px;
+ cursor: pointer;
+ z-index: 1103;
+ display: none;
+}
+
+#fancybox-error {
+ color: #444;
+ font: normal 12px/20px Arial;
+ padding: 14px;
+ margin: 0;
+}
+
+#fancybox-img {
+ width: 100%;
+ height: 100%;
+ padding: 0;
+ margin: 0;
+ border: none;
+ outline: none;
+ line-height: 0;
+ vertical-align: top;
+}
+
+#fancybox-frame {
+ width: 100%;
+ height: 100%;
+ border: none;
+ display: block;
+}
+
+#fancybox-left, #fancybox-right {
+ position: absolute;
+ bottom: 0px;
+ height: 100%;
+ width: 35%;
+ cursor: pointer;
+ outline: none;
+ background: transparent url('blank.gif');
+ z-index: 1102;
+ display: none;
+}
+
+#fancybox-left {
+ left: 0px;
+}
+
+#fancybox-right {
+ right: 0px;
+}
+
+#fancybox-left-ico, #fancybox-right-ico {
+ position: absolute;
+ top: 50%;
+ left: -9999px;
+ width: 30px;
+ height: 30px;
+ margin-top: -15px;
+ cursor: pointer;
+ z-index: 1102;
+ display: block;
+}
+
+#fancybox-left-ico {
+ background-image: url('fancybox.png');
+ background-position: -40px -30px;
+}
+
+#fancybox-right-ico {
+ background-image: url('fancybox.png');
+ background-position: -40px -60px;
+}
+
+#fancybox-left:hover, #fancybox-right:hover {
+ visibility: visible; /* IE6 */
+}
+
+#fancybox-left:hover span {
+ left: 20px;
+}
+
+#fancybox-right:hover span {
+ left: auto;
+ right: 20px;
+}
+
+.fancybox-bg {
+ position: absolute;
+ padding: 0;
+ margin: 0;
+ border: 0;
+ width: 20px;
+ height: 20px;
+ z-index: 1001;
+}
+
+#fancybox-bg-n {
+ top: -20px;
+ left: 0;
+ width: 100%;
+ background-image: url('fancybox-x.png');
+}
+
+#fancybox-bg-ne {
+ top: -20px;
+ right: -20px;
+ background-image: url('fancybox.png');
+ background-position: -40px -162px;
+}
+
+#fancybox-bg-e {
+ top: 0;
+ right: -20px;
+ height: 100%;
+ background-image: url('fancybox-y.png');
+ background-position: -20px 0px;
+}
+
+#fancybox-bg-se {
+ bottom: -20px;
+ right: -20px;
+ background-image: url('fancybox.png');
+ background-position: -40px -182px;
+}
+
+#fancybox-bg-s {
+ bottom: -20px;
+ left: 0;
+ width: 100%;
+ background-image: url('fancybox-x.png');
+ background-position: 0px -20px;
+}
+
+#fancybox-bg-sw {
+ bottom: -20px;
+ left: -20px;
+ background-image: url('fancybox.png');
+ background-position: -40px -142px;
+}
+
+#fancybox-bg-w {
+ top: 0;
+ left: -20px;
+ height: 100%;
+ background-image: url('fancybox-y.png');
+}
+
+#fancybox-bg-nw {
+ top: -20px;
+ left: -20px;
+ background-image: url('fancybox.png');
+ background-position: -40px -122px;
+}
+
+#fancybox-title {
+ font-family: Helvetica;
+ font-size: 12px;
+ z-index: 1102;
+}
+
+.fancybox-title-inside {
+ padding-bottom: 10px;
+ text-align: center;
+ color: #333;
+ background: #fff;
+ position: relative;
+}
+
+.fancybox-title-outside {
+ padding-top: 10px;
+ color: #fff;
+}
+
+.fancybox-title-over {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ color: #FFF;
+ text-align: left;
+}
+
+#fancybox-title-over {
+ padding: 10px;
+ background-image: url('fancy_title_over.png');
+ display: block;
+}
+
+.fancybox-title-float {
+ position: absolute;
+ left: 0;
+ bottom: -20px;
+ height: 32px;
+}
+
+#fancybox-title-float-wrap {
+ border: none;
+ border-collapse: collapse;
+ width: auto;
+}
+
+#fancybox-title-float-wrap td {
+ border: none;
+ white-space: nowrap;
+}
+
+#fancybox-title-float-left {
+ padding: 0 0 0 15px;
+ background: url('fancybox.png') -40px -90px no-repeat;
+}
+
+#fancybox-title-float-main {
+ color: #FFF;
+ line-height: 29px;
+ font-weight: bold;
+ padding: 0 0 3px 0;
+ background: url('fancybox-x.png') 0px -40px;
+}
+
+#fancybox-title-float-right {
+ padding: 0 0 0 15px;
+ background: url('fancybox.png') -55px -90px no-repeat;
+}
+
+/* IE6 */
+
+.fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
+
+.fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
+.fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
+
+.fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
+.fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
+.fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
+.fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
+
+.fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
+ height: expression(this.parentNode.clientHeight + "px");
+}
+
+#fancybox-loading.fancybox-ie6 {
+ position: absolute; margin-top: 0;
+ top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
+}
+
+#fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
+
+/* IE6, IE7, IE8 */
+
+.fancybox-ie .fancybox-bg { background: transparent !important; }
+
+.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
+.fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); } \ No newline at end of file
diff --git a/src/site/fancybox/jquery.fancybox-1.3.4.js b/src/site/fancybox/jquery.fancybox-1.3.4.js
new file mode 100644
index 00000000..be772753
--- /dev/null
+++ b/src/site/fancybox/jquery.fancybox-1.3.4.js
@@ -0,0 +1,1156 @@
+/*
+ * FancyBox - jQuery Plugin
+ * Simple and fancy lightbox alternative
+ *
+ * Examples and documentation at: http://fancybox.net
+ *
+ * Copyright (c) 2008 - 2010 Janis Skarnelis
+ * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
+ *
+ * Version: 1.3.4 (11/11/2010)
+ * Requires: jQuery v1.3+
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+
+;(function($) {
+ var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,
+
+ selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
+
+ ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
+
+ loadingTimer, loadingFrame = 1,
+
+ titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),
+
+ isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,
+
+ /*
+ * Private methods
+ */
+
+ _abort = function() {
+ loading.hide();
+
+ imgPreloader.onerror = imgPreloader.onload = null;
+
+ if (ajaxLoader) {
+ ajaxLoader.abort();
+ }
+
+ tmp.empty();
+ },
+
+ _error = function() {
+ if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
+ loading.hide();
+ busy = false;
+ return;
+ }
+
+ selectedOpts.titleShow = false;
+
+ selectedOpts.width = 'auto';
+ selectedOpts.height = 'auto';
+
+ tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' );
+
+ _process_inline();
+ },
+
+ _start = function() {
+ var obj = selectedArray[ selectedIndex ],
+ href,
+ type,
+ title,
+ str,
+ emb,
+ ret;
+
+ _abort();
+
+ selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
+
+ ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
+
+ if (ret === false) {
+ busy = false;
+ return;
+ } else if (typeof ret == 'object') {
+ selectedOpts = $.extend(selectedOpts, ret);
+ }
+
+ title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
+
+ if (obj.nodeName && !selectedOpts.orig) {
+ selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
+ }
+
+ if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {
+ title = selectedOpts.orig.attr('alt');
+ }
+
+ href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
+
+ if ((/^(?:javascript)/i).test(href) || href == '#') {
+ href = null;
+ }
+
+ if (selectedOpts.type) {
+ type = selectedOpts.type;
+
+ if (!href) {
+ href = selectedOpts.content;
+ }
+
+ } else if (selectedOpts.content) {
+ type = 'html';
+
+ } else if (href) {
+ if (href.match(imgRegExp)) {
+ type = 'image';
+
+ } else if (href.match(swfRegExp)) {
+ type = 'swf';
+
+ } else if ($(obj).hasClass("iframe")) {
+ type = 'iframe';
+
+ } else if (href.indexOf("#") === 0) {
+ type = 'inline';
+
+ } else {
+ type = 'ajax';
+ }
+ }
+
+ if (!type) {
+ _error();
+ return;
+ }
+
+ if (type == 'inline') {
+ obj = href.substr(href.indexOf("#"));
+ type = $(obj).length > 0 ? 'inline' : 'ajax';
+ }
+
+ selectedOpts.type = type;
+ selectedOpts.href = href;
+ selectedOpts.title = title;
+
+ if (selectedOpts.autoDimensions) {
+ if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
+ selectedOpts.width = 'auto';
+ selectedOpts.height = 'auto';
+ } else {
+ selectedOpts.autoDimensions = false;
+ }
+ }
+
+ if (selectedOpts.modal) {
+ selectedOpts.overlayShow = true;
+ selectedOpts.hideOnOverlayClick = false;
+ selectedOpts.hideOnContentClick = false;
+ selectedOpts.enableEscapeButton = false;
+ selectedOpts.showCloseButton = false;
+ }
+
+ selectedOpts.padding = parseInt(selectedOpts.padding, 10);
+ selectedOpts.margin = parseInt(selectedOpts.margin, 10);
+
+ tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
+
+ $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
+ $(this).replaceWith(content.children());
+ });
+
+ switch (type) {
+ case 'html' :
+ tmp.html( selectedOpts.content );
+ _process_inline();
+ break;
+
+ case 'inline' :
+ if ( $(obj).parent().is('#fancybox-content') === true) {
+ busy = false;
+ return;
+ }
+
+ $('<div class="fancybox-inline-tmp" />')
+ .hide()
+ .insertBefore( $(obj) )
+ .bind('fancybox-cleanup', function() {
+ $(this).replaceWith(content.children());
+ }).bind('fancybox-cancel', function() {
+ $(this).replaceWith(tmp.children());
+ });
+
+ $(obj).appendTo(tmp);
+
+ _process_inline();
+ break;
+
+ case 'image':
+ busy = false;
+
+ $.fancybox.showActivity();
+
+ imgPreloader = new Image();
+
+ imgPreloader.onerror = function() {
+ _error();
+ };
+
+ imgPreloader.onload = function() {
+ busy = true;
+
+ imgPreloader.onerror = imgPreloader.onload = null;
+
+ _process_image();
+ };
+
+ imgPreloader.src = href;
+ break;
+
+ case 'swf':
+ selectedOpts.scrolling = 'no';
+
+ str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
+ emb = '';
+
+ $.each(selectedOpts.swf, function(name, val) {
+ str += '<param name="' + name + '" value="' + val + '"></param>';
+ emb += ' ' + name + '="' + val + '"';
+ });
+
+ str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
+
+ tmp.html(str);
+
+ _process_inline();
+ break;
+
+ case 'ajax':
+ busy = false;
+
+ $.fancybox.showActivity();
+
+ selectedOpts.ajax.win = selectedOpts.ajax.success;
+
+ ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
+ url : href,
+ data : selectedOpts.ajax.data || {},
+ error : function(XMLHttpRequest, textStatus, errorThrown) {
+ if ( XMLHttpRequest.status > 0 ) {
+ _error();
+ }
+ },
+ success : function(data, textStatus, XMLHttpRequest) {
+ var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
+ if (o.status == 200) {
+ if ( typeof selectedOpts.ajax.win == 'function' ) {
+ ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
+
+ if (ret === false) {
+ loading.hide();
+ return;
+ } else if (typeof ret == 'string' || typeof ret == 'object') {
+ data = ret;
+ }
+ }
+
+ tmp.html( data );
+ _process_inline();
+ }
+ }
+ }));
+
+ break;
+
+ case 'iframe':
+ _show();
+ break;
+ }
+ },
+
+ _process_inline = function() {
+ var
+ w = selectedOpts.width,
+ h = selectedOpts.height;
+
+ if (w.toString().indexOf('%') > -1) {
+ w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
+
+ } else {
+ w = w == 'auto' ? 'auto' : w + 'px';
+ }
+
+ if (h.toString().indexOf('%') > -1) {
+ h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
+
+ } else {
+ h = h == 'auto' ? 'auto' : h + 'px';
+ }
+
+ tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');
+
+ selectedOpts.width = tmp.width();
+ selectedOpts.height = tmp.height();
+
+ _show();
+ },
+
+ _process_image = function() {
+ selectedOpts.width = imgPreloader.width;
+ selectedOpts.height = imgPreloader.height;
+
+ $("<img />").attr({
+ 'id' : 'fancybox-img',
+ 'src' : imgPreloader.src,
+ 'alt' : selectedOpts.title
+ }).appendTo( tmp );
+
+ _show();
+ },
+
+ _show = function() {
+ var pos, equal;
+
+ loading.hide();
+
+ if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
+ $.event.trigger('fancybox-cancel');
+
+ busy = false;
+ return;
+ }
+
+ busy = true;
+
+ $(content.add( overlay )).unbind();
+
+ $(window).unbind("resize.fb scroll.fb");
+ $(document).unbind('keydown.fb');
+
+ if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
+ wrap.css('height', wrap.height());
+ }
+
+ currentArray = selectedArray;
+ currentIndex = selectedIndex;
+ currentOpts = selectedOpts;
+
+ if (currentOpts.overlayShow) {
+ overlay.css({
+ 'background-color' : currentOpts.overlayColor,
+ 'opacity' : currentOpts.overlayOpacity,
+ 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
+ 'height' : $(document).height()
+ });
+
+ if (!overlay.is(':visible')) {
+ if (isIE6) {
+ $('select:not(#fancybox-tmp select)').filter(function() {
+ return this.style.visibility !== 'hidden';
+ }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
+ this.style.visibility = 'inherit';
+ });
+ }
+
+ overlay.show();
+ }
+ } else {
+ overlay.hide();
+ }
+
+ final_pos = _get_zoom_to();
+
+ _process_title();
+
+ if (wrap.is(":visible")) {
+ $( close.add( nav_left ).add( nav_right ) ).hide();
+
+ pos = wrap.position(),
+
+ start_pos = {
+ top : pos.top,
+ left : pos.left,
+ width : wrap.width(),
+ height : wrap.height()
+ };
+
+ equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
+
+ content.fadeTo(currentOpts.changeFade, 0.3, function() {
+ var finish_resizing = function() {
+ content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
+ };
+
+ $.event.trigger('fancybox-change');
+
+ content
+ .empty()
+ .removeAttr('filter')
+ .css({
+ 'border-width' : currentOpts.padding,
+ 'width' : final_pos.width - currentOpts.padding * 2,
+ 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
+ });
+
+ if (equal) {
+ finish_resizing();
+
+ } else {
+ fx.prop = 0;
+
+ $(fx).animate({prop: 1}, {
+ duration : currentOpts.changeSpeed,
+ easing : currentOpts.easingChange,
+ step : _draw,
+ complete : finish_resizing
+ });
+ }
+ });
+
+ return;
+ }
+
+ wrap.removeAttr("style");
+
+ content.css('border-width', currentOpts.padding);
+
+ if (currentOpts.transitionIn == 'elastic') {
+ start_pos = _get_zoom_from();
+
+ content.html( tmp.contents() );
+
+ wrap.show();
+
+ if (currentOpts.opacity) {
+ final_pos.opacity = 0;
+ }
+
+ fx.prop = 0;
+
+ $(fx).animate({prop: 1}, {
+ duration : currentOpts.speedIn,
+ easing : currentOpts.easingIn,
+ step : _draw,
+ complete : _finish
+ });
+
+ return;
+ }
+
+ if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
+ title.show();
+ }
+
+ content
+ .css({
+ 'width' : final_pos.width - currentOpts.padding * 2,
+ 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
+ })
+ .html( tmp.contents() );
+
+ wrap
+ .css(final_pos)
+ .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
+ },
+
+ _format_title = function(title) {
+ if (title && title.length) {
+ if (currentOpts.titlePosition == 'float') {
+ return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>';
+ }
+
+ return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>';
+ }
+
+ return false;
+ },
+
+ _process_title = function() {
+ titleStr = currentOpts.title || '';
+ titleHeight = 0;
+
+ title
+ .empty()
+ .removeAttr('style')
+ .removeClass();
+
+ if (currentOpts.titleShow === false) {
+ title.hide();
+ return;
+ }
+
+ titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
+
+ if (!titleStr || titleStr === '') {
+ title.hide();
+ return;
+ }
+
+ title
+ .addClass('fancybox-title-' + currentOpts.titlePosition)
+ .html( titleStr )
+ .appendTo( 'body' )
+ .show();
+
+ switch (currentOpts.titlePosition) {
+ case 'inside':
+ title
+ .css({
+ 'width' : final_pos.width - (currentOpts.padding * 2),
+ 'marginLeft' : currentOpts.padding,
+ 'marginRight' : currentOpts.padding
+ });
+
+ titleHeight = title.outerHeight(true);
+
+ title.appendTo( outer );
+
+ final_pos.height += titleHeight;
+ break;
+
+ case 'over':
+ title
+ .css({
+ 'marginLeft' : currentOpts.padding,
+ 'width' : final_pos.width - (currentOpts.padding * 2),
+ 'bottom' : currentOpts.padding
+ })
+ .appendTo( outer );
+ break;
+
+ case 'float':
+ title
+ .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
+ .appendTo( wrap );
+ break;
+
+ default:
+ title
+ .css({
+ 'width' : final_pos.width - (currentOpts.padding * 2),
+ 'paddingLeft' : currentOpts.padding,
+ 'paddingRight' : currentOpts.padding
+ })
+ .appendTo( wrap );
+ break;
+ }
+
+ title.hide();
+ },
+
+ _set_navigation = function() {
+ if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
+ $(document).bind('keydown.fb', function(e) {
+ if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
+ e.preventDefault();
+ $.fancybox.close();
+
+ } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
+ e.preventDefault();
+ $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
+ }
+ });
+ }
+
+ if (!currentOpts.showNavArrows) {
+ nav_left.hide();
+ nav_right.hide();
+ return;
+ }
+
+ if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
+ nav_left.show();
+ }
+
+ if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
+ nav_right.show();
+ }
+ },
+
+ _finish = function () {
+ if (!$.support.opacity) {
+ content.get(0).style.removeAttribute('filter');
+ wrap.get(0).style.removeAttribute('filter');
+ }
+
+ if (selectedOpts.autoDimensions) {
+ content.css('height', 'auto');
+ }
+
+ wrap.css('height', 'auto');
+
+ if (titleStr && titleStr.length) {
+ title.show();
+ }
+
+ if (currentOpts.showCloseButton) {
+ close.show();
+ }
+
+ _set_navigation();
+
+ if (currentOpts.hideOnContentClick) {
+ content.bind('click', $.fancybox.close);
+ }
+
+ if (currentOpts.hideOnOverlayClick) {
+ overlay.bind('click', $.fancybox.close);
+ }
+
+ $(window).bind("resize.fb", $.fancybox.resize);
+
+ if (currentOpts.centerOnScroll) {
+ $(window).bind("scroll.fb", $.fancybox.center);
+ }
+
+ if (currentOpts.type == 'iframe') {
+ $('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content);
+ }
+
+ wrap.show();
+
+ busy = false;
+
+ $.fancybox.center();
+
+ currentOpts.onComplete(currentArray, currentIndex, currentOpts);
+
+ _preload_images();
+ },
+
+ _preload_images = function() {
+ var href,
+ objNext;
+
+ if ((currentArray.length -1) > currentIndex) {
+ href = currentArray[ currentIndex + 1 ].href;
+
+ if (typeof href !== 'undefined' && href.match(imgRegExp)) {
+ objNext = new Image();
+ objNext.src = href;
+ }
+ }
+
+ if (currentIndex > 0) {
+ href = currentArray[ currentIndex - 1 ].href;
+
+ if (typeof href !== 'undefined' && href.match(imgRegExp)) {
+ objNext = new Image();
+ objNext.src = href;
+ }
+ }
+ },
+
+ _draw = function(pos) {
+ var dim = {
+ width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),
+ height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),
+
+ top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),
+ left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)
+ };
+
+ if (typeof final_pos.opacity !== 'undefined') {
+ dim.opacity = pos < 0.5 ? 0.5 : pos;
+ }
+
+ wrap.css(dim);
+
+ content.css({
+ 'width' : dim.width - currentOpts.padding * 2,
+ 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2
+ });
+ },
+
+ _get_viewport = function() {
+ return [
+ $(window).width() - (currentOpts.margin * 2),
+ $(window).height() - (currentOpts.margin * 2),
+ $(document).scrollLeft() + currentOpts.margin,
+ $(document).scrollTop() + currentOpts.margin
+ ];
+ },
+
+ _get_zoom_to = function () {
+ var view = _get_viewport(),
+ to = {},
+ resize = currentOpts.autoScale,
+ double_padding = currentOpts.padding * 2,
+ ratio;
+
+ if (currentOpts.width.toString().indexOf('%') > -1) {
+ to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);
+ } else {
+ to.width = currentOpts.width + double_padding;
+ }
+
+ if (currentOpts.height.toString().indexOf('%') > -1) {
+ to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);
+ } else {
+ to.height = currentOpts.height + double_padding;
+ }
+
+ if (resize && (to.width > view[0] || to.height > view[1])) {
+ if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
+ ratio = (currentOpts.width ) / (currentOpts.height );
+
+ if ((to.width ) > view[0]) {
+ to.width = view[0];
+ to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);
+ }
+
+ if ((to.height) > view[1]) {
+ to.height = view[1];
+ to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
+ }
+
+ } else {
+ to.width = Math.min(to.width, view[0]);
+ to.height = Math.min(to.height, view[1]);
+ }
+ }
+
+ to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
+ to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);
+
+ return to;
+ },
+
+ _get_obj_pos = function(obj) {
+ var pos = obj.offset();
+
+ pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0;
+ pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0;
+
+ pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0;
+ pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0;
+
+ pos.width = obj.width();
+ pos.height = obj.height();
+
+ return pos;
+ },
+
+ _get_zoom_from = function() {
+ var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
+ from = {},
+ pos,
+ view;
+
+ if (orig && orig.length) {
+ pos = _get_obj_pos(orig);
+
+ from = {
+ width : pos.width + (currentOpts.padding * 2),
+ height : pos.height + (currentOpts.padding * 2),
+ top : pos.top - currentOpts.padding - 20,
+ left : pos.left - currentOpts.padding - 20
+ };
+
+ } else {
+ view = _get_viewport();
+
+ from = {
+ width : currentOpts.padding * 2,
+ height : currentOpts.padding * 2,
+ top : parseInt(view[3] + view[1] * 0.5, 10),
+ left : parseInt(view[2] + view[0] * 0.5, 10)
+ };
+ }
+
+ return from;
+ },
+
+ _animate_loading = function() {
+ if (!loading.is(':visible')){
+ clearInterval(loadingTimer);
+ return;
+ }
+
+ $('div', loading).css('top', (loadingFrame * -40) + 'px');
+
+ loadingFrame = (loadingFrame + 1) % 12;
+ };
+
+ /*
+ * Public methods
+ */
+
+ $.fn.fancybox = function(options) {
+ if (!$(this).length) {
+ return this;
+ }
+
+ $(this)
+ .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
+ .unbind('click.fb')
+ .bind('click.fb', function(e) {
+ e.preventDefault();
+
+ if (busy) {
+ return;
+ }
+
+ busy = true;
+
+ $(this).blur();
+
+ selectedArray = [];
+ selectedIndex = 0;
+
+ var rel = $(this).attr('rel') || '';
+
+ if (!rel || rel == '' || rel === 'nofollow') {
+ selectedArray.push(this);
+
+ } else {
+ selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
+ selectedIndex = selectedArray.index( this );
+ }
+
+ _start();
+
+ return;
+ });
+
+ return this;
+ };
+
+ $.fancybox = function(obj) {
+ var opts;
+
+ if (busy) {
+ return;
+ }
+
+ busy = true;
+ opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
+
+ selectedArray = [];
+ selectedIndex = parseInt(opts.index, 10) || 0;
+
+ if ($.isArray(obj)) {
+ for (var i = 0, j = obj.length; i < j; i++) {
+ if (typeof obj[i] == 'object') {
+ $(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
+ } else {
+ obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
+ }
+ }
+
+ selectedArray = jQuery.merge(selectedArray, obj);
+
+ } else {
+ if (typeof obj == 'object') {
+ $(obj).data('fancybox', $.extend({}, opts, obj));
+ } else {
+ obj = $({}).data('fancybox', $.extend({content : obj}, opts));
+ }
+
+ selectedArray.push(obj);
+ }
+
+ if (selectedIndex > selectedArray.length || selectedIndex < 0) {
+ selectedIndex = 0;
+ }
+
+ _start();
+ };
+
+ $.fancybox.showActivity = function() {
+ clearInterval(loadingTimer);
+
+ loading.show();
+ loadingTimer = setInterval(_animate_loading, 66);
+ };
+
+ $.fancybox.hideActivity = function() {
+ loading.hide();
+ };
+
+ $.fancybox.next = function() {
+ return $.fancybox.pos( currentIndex + 1);
+ };
+
+ $.fancybox.prev = function() {
+ return $.fancybox.pos( currentIndex - 1);
+ };
+
+ $.fancybox.pos = function(pos) {
+ if (busy) {
+ return;
+ }
+
+ pos = parseInt(pos);
+
+ selectedArray = currentArray;
+
+ if (pos > -1 && pos < currentArray.length) {
+ selectedIndex = pos;
+ _start();
+
+ } else if (currentOpts.cyclic && currentArray.length > 1) {
+ selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
+ _start();
+ }
+
+ return;
+ };
+
+ $.fancybox.cancel = function() {
+ if (busy) {
+ return;
+ }
+
+ busy = true;
+
+ $.event.trigger('fancybox-cancel');
+
+ _abort();
+
+ selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
+
+ busy = false;
+ };
+
+ // Note: within an iframe use - parent.$.fancybox.close();
+ $.fancybox.close = function() {
+ if (busy || wrap.is(':hidden')) {
+ return;
+ }
+
+ busy = true;
+
+ if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
+ busy = false;
+ return;
+ }
+
+ _abort();
+
+ $(close.add( nav_left ).add( nav_right )).hide();
+
+ $(content.add( overlay )).unbind();
+
+ $(window).unbind("resize.fb scroll.fb");
+ $(document).unbind('keydown.fb');
+
+ content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
+
+ if (currentOpts.titlePosition !== 'inside') {
+ title.empty();
+ }
+
+ wrap.stop();
+
+ function _cleanup() {
+ overlay.fadeOut('fast');
+
+ title.empty().hide();
+ wrap.hide();
+
+ $.event.trigger('fancybox-cleanup');
+
+ content.empty();
+
+ currentOpts.onClosed(currentArray, currentIndex, currentOpts);
+
+ currentArray = selectedOpts = [];
+ currentIndex = selectedIndex = 0;
+ currentOpts = selectedOpts = {};
+
+ busy = false;
+ }
+
+ if (currentOpts.transitionOut == 'elastic') {
+ start_pos = _get_zoom_from();
+
+ var pos = wrap.position();
+
+ final_pos = {
+ top : pos.top ,
+ left : pos.left,
+ width : wrap.width(),
+ height : wrap.height()
+ };
+
+ if (currentOpts.opacity) {
+ final_pos.opacity = 1;
+ }
+
+ title.empty().hide();
+
+ fx.prop = 1;
+
+ $(fx).animate({ prop: 0 }, {
+ duration : currentOpts.speedOut,
+ easing : currentOpts.easingOut,
+ step : _draw,
+ complete : _cleanup
+ });
+
+ } else {
+ wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
+ }
+ };
+
+ $.fancybox.resize = function() {
+ if (overlay.is(':visible')) {
+ overlay.css('height', $(document).height());
+ }
+
+ $.fancybox.center(true);
+ };
+
+ $.fancybox.center = function() {
+ var view, align;
+
+ if (busy) {
+ return;
+ }
+
+ align = arguments[0] === true ? 1 : 0;
+ view = _get_viewport();
+
+ if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
+ return;
+ }
+
+ wrap
+ .stop()
+ .animate({
+ 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
+ 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
+ }, typeof arguments[0] == 'number' ? arguments[0] : 200);
+ };
+
+ $.fancybox.init = function() {
+ if ($("#fancybox-wrap").length) {
+ return;
+ }
+
+ $('body').append(
+ tmp = $('<div id="fancybox-tmp"></div>'),
+ loading = $('<div id="fancybox-loading"><div></div></div>'),
+ overlay = $('<div id="fancybox-overlay"></div>'),
+ wrap = $('<div id="fancybox-wrap"></div>')
+ );
+
+ outer = $('<div id="fancybox-outer"></div>')
+ .append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>')
+ .appendTo( wrap );
+
+ outer.append(
+ content = $('<div id="fancybox-content"></div>'),
+ close = $('<a id="fancybox-close"></a>'),
+ title = $('<div id="fancybox-title"></div>'),
+
+ nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),
+ nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')
+ );
+
+ close.click($.fancybox.close);
+ loading.click($.fancybox.cancel);
+
+ nav_left.click(function(e) {
+ e.preventDefault();
+ $.fancybox.prev();
+ });
+
+ nav_right.click(function(e) {
+ e.preventDefault();
+ $.fancybox.next();
+ });
+
+ if ($.fn.mousewheel) {
+ wrap.bind('mousewheel.fb', function(e, delta) {
+ if (busy) {
+ e.preventDefault();
+
+ } else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) {
+ e.preventDefault();
+ $.fancybox[ delta > 0 ? 'prev' : 'next']();
+ }
+ });
+ }
+
+ if (!$.support.opacity) {
+ wrap.addClass('fancybox-ie');
+ }
+
+ if (isIE6) {
+ loading.addClass('fancybox-ie6');
+ wrap.addClass('fancybox-ie6');
+
+ $('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer);
+ }
+ };
+
+ $.fn.fancybox.defaults = {
+ padding : 10,
+ margin : 40,
+ opacity : false,
+ modal : false,
+ cyclic : false,
+ scrolling : 'auto', // 'auto', 'yes' or 'no'
+
+ width : 560,
+ height : 340,
+
+ autoScale : true,
+ autoDimensions : true,
+ centerOnScroll : false,
+
+ ajax : {},
+ swf : { wmode: 'transparent' },
+
+ hideOnOverlayClick : true,
+ hideOnContentClick : false,
+
+ overlayShow : true,
+ overlayOpacity : 0.7,
+ overlayColor : '#777',
+
+ titleShow : true,
+ titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
+ titleFormat : null,
+ titleFromAlt : false,
+
+ transitionIn : 'fade', // 'elastic', 'fade' or 'none'
+ transitionOut : 'fade', // 'elastic', 'fade' or 'none'
+
+ speedIn : 300,
+ speedOut : 300,
+
+ changeSpeed : 300,
+ changeFade : 'fast',
+
+ easingIn : 'swing',
+ easingOut : 'swing',
+
+ showCloseButton : true,
+ showNavArrows : true,
+ enableEscapeButton : true,
+ enableKeyboardNav : true,
+
+ onStart : function(){},
+ onCancel : function(){},
+ onComplete : function(){},
+ onCleanup : function(){},
+ onClosed : function(){},
+ onError : function(){}
+ };
+
+ $(document).ready(function() {
+ $.fancybox.init();
+ });
+
+})(jQuery); \ No newline at end of file
diff --git a/src/site/fancybox/jquery.fancybox-1.3.4.pack.js b/src/site/fancybox/jquery.fancybox-1.3.4.pack.js
new file mode 100644
index 00000000..1373ed08
--- /dev/null
+++ b/src/site/fancybox/jquery.fancybox-1.3.4.pack.js
@@ -0,0 +1,46 @@
+/*
+ * FancyBox - jQuery Plugin
+ * Simple and fancy lightbox alternative
+ *
+ * Examples and documentation at: http://fancybox.net
+ *
+ * Copyright (c) 2008 - 2010 Janis Skarnelis
+ * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
+ *
+ * Version: 1.3.4 (11/11/2010)
+ * Requires: jQuery v1.3+
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+
+;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
+F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
+c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
+false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel",
+function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+
+'"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
+"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('<div style="width:'+a+";height:"+c+
+";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor,
+opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?
+d.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+d.titlePosition+'">'+s+"</div>":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
+y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==
+i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents());
+f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==
+37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto");
+s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(j);
+f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);
+j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==
+"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),
+10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};
+b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=
+0,C=a.length;k<C;k++)if(typeof a[k]=="object")b(a[k]).data("fancybox",b.extend({},g,a[k]));else a[k]=b({}).data("fancybox",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},g,a));else a=b({}).data("fancybox",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+
+1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h=
+true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;
+b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-
+d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),t=b('<div id="fancybox-loading"><div></div></div>'),u=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));D=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f);
+D.append(j=b('<div id="fancybox-content"></div>'),E=b('<a id="fancybox-close"></a>'),n=b('<div id="fancybox-title"></div>'),z=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});
+b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}};
+b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
+easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery); \ No newline at end of file
diff --git a/src/site/fancybox/jquery.mousewheel-3.0.4.pack.js b/src/site/fancybox/jquery.mousewheel-3.0.4.pack.js
new file mode 100644
index 00000000..cb66588e
--- /dev/null
+++ b/src/site/fancybox/jquery.mousewheel-3.0.4.pack.js
@@ -0,0 +1,14 @@
+/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
+* Licensed under the MIT License (LICENSE.txt).
+*
+* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
+* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
+* Thanks to: Seamus Leahy for adding deltaX and deltaY
+*
+* Version: 3.0.4
+*
+* Requires: 1.2.2+
+*/
+
+(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
+f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); \ No newline at end of file
diff --git a/src/site/faq.mkd b/src/site/faq.mkd
new file mode 100644
index 00000000..cdf3d59e
--- /dev/null
+++ b/src/site/faq.mkd
@@ -0,0 +1,172 @@
+## Troubleshooting
+
+### Eclipse/Egit/JGit complains that it "can't open upload pack"?
+There are a few ways this can occur:
+
+1. You are using https with a self-signed certificate and you **did not** configure *http.sslVerify=false*
+ 1. Window->Preferences->Team->Git->Configuration
+ 2. Click the *New Entry* button
+ 3. <pre>Key = <em>http.sslVerify</em>
+Value = <em>false</em></pre>
+2. Gitblit GO's default self-signed certificate is bound to *localhost* and you are trying to clone/push between machines.
+ 1. Review the contents of `makekeystore.cmd`
+ 2. Set *your hostname* in the *HOSTNAME* variable.
+ 3. Execute the script.<br/>This will generate a new certificate and keystore for *your hostname* protected by *server.storePassword*.
+3. The repository is clone-restricted and you don't have access.
+4. The repository is clone-restricted and your password changed.
+5. A regression in Gitblit. :(
+
+### Why can't I access Gitblit GO from another machine?
+1. Please check *server.httpBindInterface* and *server.httpsBindInterface* in `gitblit.properties`, you may be only be serving on *localhost*.
+2. Please see the above answer about "**can't open upload pack**".
+3. Ensure that any firewall you may have running on the Gitblit server either has an exception for your specified ports or for the running process.
+
+### How do I run Gitblit GO on port 80 or 443 in Linux?
+Linux requires root permissions to serve on ports < 1024.<br/>
+Run the server as *root* (security concern) or change the ports you are serving to 8080 (http) and/or 8443 (https).
+
+### Gitblit GO does not list my repositories?!
+1. Confirm that the value *git.repositoriesFolder* in `gitblit.properties` actually points to your repositories folder.
+2. Confirm that the Gitblit GO process has full read-write-execute permissions to your *git.repositoriesFolder*.
+
+### Gitblit WAR does not list my repositories?!
+1. Confirm that the &lt;context-param&gt; *git.repositoriesFolder* value in your `web.xml` file actually points to your repositories folder.
+2. Confirm that the servlet container process has full read-write-execute permissions to your *git.repositoriesFolder*.
+
+### Gitblit WAR will not authenticate any users?!
+Confirm that the &lt;context-param&gt; *realm.userService* value in your `web.xml` file actually points to a `users.conf` or `users.properties` file.
+
+### Gitblit won't open my grouped repository (/group/myrepo.git) or browse my log/branch/tag/ref?!
+This is likely an url encoding/decoding problem with forward slashes:
+
+**bad**
+
+ http://192.168.1.2/log/myrepo.git/refs/heads/master
+
+**good**
+
+ http://192.168.1.2/log/myrepo.git/refs%2Fheads%2Fmaster
+
+**NOTE:**
+You can not trust the url in the address bar of your browser since your browser may decode it for presentation. When in doubt, *View Source* of the generated html to confirm the *href*.
+
+There are two possible workarounds for this issue. In `gitblit.properties` or `web.xml`:
+
+1. try setting *web.mountParameters* to *false*.<br/>This changes the url scheme from mounted (*/commit/myrepo.git/abcdef*) to parameterized (*/commit/?r=myrepo.git&h=abcdef*).
+2. try changing *web.forwardSlashCharacter* to an asterisk or a **!**
+
+### Running Gitblit behind mod_proxy or some other proxy layer
+
+You must ensure that the proxy does not decode and then re-encode request urls with interpretation of forward-slashes (*%2F*). If your proxy layer does re-encode embedded forward-slashes then you may not be able to browse grouped repositories or logs, branches, and tags **unless** you set *web.mountParameters=false*.
+
+If you are using Apache mod_proxy you may have luck with specifying [AllowEncodedSlashes NoDecode](http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes).
+
+### Running Gitblit on Tomcat
+
+Tomcat takes the extra precaution of [disallowing embedded slashes by default](http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10). This breaks Gitblit urls.
+You have a few options on how to handle this scenario:
+
+1. [Tweak Tomcat](http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10)
+Add *-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true* to *CATALINA_OPTS* or to your JVM launch parameters
+2. *web.mountParameters = false* and use non-pretty, parameterized urls
+3. *web.forwardSlashCharacter = !* which tells Gitblit to use **!** instead of **/**
+
+#### UTF-8 Filenames
+
+Tomcat also dislikes urls with non-ASCII characters. If your repositories have non-ASCII filenames you will have to modify your connector properties to allow UTF-8 encoded urls.
+
+[Tomcat Character Encoding](http://wiki.apache.org/tomcat/FAQ/CharacterEncoding)
+[Tomcat Connector Properties](http://tomcat.apache.org/tomcat-6.0-doc/config/http.html)
+
+## General Interest Questions
+
+### Gitblit? What kind of name is that?
+It's a phonetic play on [bitblt][bitblt] which is an image processing operation meaning *bit-block transfer*.
+
+### Why use Gitblit?
+It's a small tool that allows you to easily manage shared repositories and doesn't require alot of setup or git kung-foo.
+
+### Who is the target user for Gitblit?
+Small workgroups that require centralized repositories.
+
+Gitblit is not meant to be a social coding resource like [Github](http://github.com) or [Bitbucket](http://bitbucket.com) with 100s or 1000s of users. Gitblit is designed to fulfill the same function as your centralized Subversion or CVS server.
+
+### Why does Gitblit exist when there is Git and Gitweb?
+As a Java developer I prefer that as much of my tooling as possible is Java.<br/>
+Originally, I was going to use [Mercurial](http://mercurial.selenic.com) but...
+
+- MercurialEclipse [shells to Python, writes to System.out, and captures System.in](http://mercurial.808500.n3.nabble.com/Hg4J-Mercurial-pure-Java-library-tp2693090p2694555.html)<br/>
+Parsing command-line output is fragile and suboptimal.<br/>Unfortunately this is necessary because Mercurial is an application, not a library.
+- Mercurial HTTP/HTTPS needs to run as CGI through Apache/IIS/etc, as mod_python through Apache, or served with a built-in http server.<br/>
+This requires setup and maintenance of multiple, mixed 3rd party components.
+
+Gitblit eliminates all that complication with its 100% Java stack and simple single configuration file.
+
+Additionally, Git and Gitweb do not offer repository creation or user management.
+
+### Do I need real Git?
+No (mostly). Gitblit is based on [JGit][jgit] which is a pure Java implementation of the [Git version control system][git].<br/>
+Everything you need for Gitblit (except Java) is either bundled in the distribution file or automatically downloaded on execution.
+
+#### mostly
+JGit does not fully support the git-gc featureset (garbage collection) so you may want native Git to periodically run git-gc until [JGit][jgit] fully supports this feature.
+
+### Can I run Gitblit in conjunction with my existing Git tooling?
+Yes.
+
+### Do I need a JDK or can I use a JRE?
+Gitblit will run just fine with a JRE. Gitblit can optionally use `keytool` from the JDK to generate self-signed certificates, but normally Gitblit uses [BouncyCastle][bouncycastle] for that need.
+
+### Does Gitblit use a database to store its data?
+No. Gitblit stores its repository configuration information within the `.git/config` file and its user information in `users.conf`, `users.properties`, or whatever filename is configured in `gitblit.properties`.
+
+### Can I manually edit users.conf, users.properties, gitblit.properties, or .git/config?
+Yes. You can manually manipulate all of them and (most) changes will be immediately available to Gitblit.<br/>Exceptions to this are noted in `gitblit.properties`.
+
+**NOTE:**
+Care must be taken to preserve the relationship between user roles and repository names.<br/>Please see the *User Roles* section of the [setup](/setup.html) page for details.
+
+### Can I restrict access to branches or paths within a repository?
+No, not out-of-the-box. Access restrictions apply to the repository as a whole.
+
+Gitblit's simple authentication and authorization mechanism can be used to facilitate one or more of the [workflows outlined here](http://progit.org/book/ch5-1.html).
+
+Should you require more fine-grained access controls you might consider writing a Groovy *prereceive* script to block updating branch refs based on some permissions file. I would be interested in a generic, re-usable script to include with Gitblit, should someone want to implement it.
+
+Alternatively, you could use [gitolite](https://github.com/sitaramc/gitolite) and SSH for your repository access.
+
+### Can I authenticate users against XYZ?
+Yes. The user service is pluggable. You may write your own complete user service by implementing the *com.gitblit.IUserService* interface. Or you may subclass *com.gitblit.GitblitUserService* and override just the authentication. Set the fully qualified classname as the *realm.userService* property.
+
+### Why doesn't Gitblit support SSH?
+Gitblit could integrate [Apache Mina][mina] to provide SSH access. However, doing so violates Gitblit's first design principle: [KISS](http://en.wikipedia.org/wiki/KISS_principle).<br/>
+SSH support requires creating, exchanging, and managing SSH keys (arguably not more complicated than managing users). While this is possible, JGit's SmartHTTP implementation is a simpler and universal transport mechanism.
+
+You might consider running [Gerrit](http://gerrit.googlecode.org) which does integrate [Apache Mina][mina] and supports SSH or you might consider serving [Git][git] on Linux which would offer real SSH support and also allow use of [many other compelling Git solutions](https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools).
+
+### What types of Search does Gitblit support?
+
+As of 0.9.0, Gitblit supports Lucene-based searching.
+
+If Lucene indexing is disabled, Gitblit falls back to brute-force commit-traversal search. Commit-traversal search supports case-insensitive searching of *commit message* (default), *author*, and *committer*.<br/>
+
+To search by *author* or *committer* use the following syntax in the search box:
+
+ author: james
+ committer: james
+
+Alternatively, you could enable the search type dropdown list in your `gitblit.properties` file.
+
+### Why did you call the setting federation.N.frequency instead of federation.N.period?!
+
+Yes, yes I know that you are really specifying the period, but Frequency sounds better to me. :)
+
+### Can Gitblit be translated?
+
+Yes. Most messages are localized to a standard Java properties file.
+
+[bitblt]: http://en.wikipedia.org/wiki/Bit_blit "Wikipedia Bitblt"
+[jgit]: http://eclipse.org/jgit "Eclipse JGit Site"
+[git]: http://git-scm.com "Official Git Site"
+[mina]: http://mina.apache.org "Apache Mina"
+[bouncycastle]: http://bouncycastle.org "The Legion of the Bouncy Castle" \ No newline at end of file
diff --git a/src/site/features.mkd b/src/site/features.mkd
new file mode 100644
index 00000000..b99aa52e
--- /dev/null
+++ b/src/site/features.mkd
@@ -0,0 +1,78 @@
+## Standard Features (GO/WAR)
+- JGit SmartHTTP servlet
+- Browser and git client authentication
+- Four *per-repository* access restriction configurations with a Read-Only control flag
+ - ![anonymous](blank.png) *Anonymous View, Clone & Push*
+ - ![push](lock_go_16x16.png) *Authenticated Push*
+ - ![clone](lock_pull_16x16.png) *Authenticated Clone & Push*
+ - ![view](shield_16x16.png) *Authenticated View, Clone & Push*
+ - ![freeze](cold_16x16.png) Freeze repository (i.e. deny push, make read-only)
+- Six *per-user/team* repository access permissions
+ - **V** (view in web ui, RSS feeds, download zip)
+ - **R** (clone)
+ - **RW** (clone and push)
+ - **RWC** (clone and push with ref creation)
+ - **RWD** (clone and push with ref creation, deletion)
+ - **RW+** (clone and push with ref creation, deletion, rewind)
+- Optional feature to allow users to create personal repositories
+- Optional feature to fork a repository to a personal repository
+- Optional feature to create a repository on push
+- *Experimental* built-in Garbage Collection
+- Ability to federate with one or more other Gitblit instances
+- RSS/JSON RPC interface
+- Java/Swing Gitblit Manager tool
+- Gitweb inspired web UI
+- Responsive web UI that subtracts elements to be usable on phones, tablets, and desktop browsers
+- Groovy pre- and post- push hook scripts, per-repository or globally for all repositories
+- Email push notifications *(via sendmail.groovy push script)*
+- Lucene indexing of specified repository branches
+- Administrators may create, edit, rename, or delete repositories through the web UI or RPC interface
+- Administrators may create, edit, rename, or delete users through the web UI or RPC interface
+- Administrators may create, edit, rename, or delete teams through the web UI or RPC interface
+- Repository Owners may edit repositories through the web UI
+- Administrators and Repository Owners may set the default branch through the web UI or RPC interface
+- LDAP authentication and optional LDAP-controlled Team memberships
+- Redmine authentication
+- Gravatar integration
+- Git-notes display support
+- Submodule support
+- Push log based on a hidden, orphan branch refs/gitblit/pushes
+- Fanout PubSub notifications service for self-hosted [Sparkleshare](http://sparkleshare.org) use
+- gh-pages display support (Jekyll is not supported)
+- Branch metrics (uses Google Charts)
+- HEAD and Branch RSS feeds
+- Blame annotations view
+- Dates can optionally be displayed using the browser's reported timezone
+- Display of Author and Committer email addresses can be disabled
+- Case-insensitive searching of commit messages, authors, or committers
+- Dynamic zip downloads feature
+- Markdown file view support
+- Syntax highlighting for popular source code types
+- Customizable regular expression substitution for commit messages (i.e. bug or code review link integration)
+- Single text file for users configuration
+- Optional utility pages
+ - ![docs](book_16x16.png) Docs page which enumerates all Markdown files within a repository
+ - ![tickets](bug_16x16.png) **readonly** Ticgit ticket pages *(based on last MIT release bf57b032 2009-01-27)*
+- Translations
+ - English
+ - Japanese
+ - Spanish
+ - Polish
+ - Korean
+ - Brazilian Portuguese
+ - Dutch
+ - Chinese (zh_CN)
+
+## Gitblit GO Features
+- Out-of-the-box integrated stack requiring minimal configuration
+- Automatic generation of ssl certificate for https communications
+- Integrated GUI tool to facilitate x509 PKI including ssl and client certificate generation, client certificate revocation, and client certificate distribution
+- Single text file for configuring server and gitblit
+- A Windows service installation script and configuration tool
+- Built-in AJP connector for Apache httpd
+
+## Limitations
+- HTTP/HTTPS are the only supported Git protocols
+- Built-in access controls are not path-based, they are repository-based.
+
+[jgit]: http://eclipse.org/jgit "Eclipse JGit Site"
diff --git a/src/site/federation.mkd b/src/site/federation.mkd
new file mode 100644
index 00000000..756d3fcd
--- /dev/null
+++ b/src/site/federation.mkd
@@ -0,0 +1,339 @@
+## Federating Gitblit
+
+*SINCE 0.6.0*
+
+A Gitblit federation is a mechanism to clone repositories and keep them in sync from one Gitblit instance to another. Federation can be used to maintain a mirror of your Gitblit instance, to aggregate repositories from developer workstations, or to initially clone groups of repositories to developer workstations. If you are/were a Subversion user you might think of this as [svn-sync](http://svnbook.red-bean.com/en/1.5/svn.ref.svnsync.html), but better.
+
+If your Gitblit instance allows federation and it is properly registered with another Gitblit instance, each of the *non-excluded* repositories of your Gitblit instance can be mirrored, in their entirety, to the pulling Gitblit instance. You may optionally allow pulling of user accounts and backup of server settings.
+
+The federation feature should be considered a security backdoor and enabled or disabled as appropriate for your installation.<br/>
+Please review all the documentation to understand how it works and its limitations.
+
+![block diagram](fed_aggregation.png "Gitblit Federation Aggregation")
+
+### Important Changes to Note
+
+The *Gitblit 0.8.0* federation protocol adds retrieval of teams and referenced push scripts. Older clients will not know to request team or push script information.
+
+The *Gitblit 0.7.0* federation protocol is incompatible with the 0.6.0 federation protocol because of a change in the way timestamps are formatted.
+
+Gitblit 0.6.0 uses the default [google-gson](http://google-gson.googlecode.com) timestamp serializer which generates locally formatted timestamps. Unfortunately, this creates problems for distributed repositories and distributed developers. Gitblit 0.7.0 corrects this error by serializing dates to the [iso8601](http://en.wikipedia.org/wiki/ISO_8601) standard. As a result 0.7.0 is not compatible with 0.6.0. A partial backwards-compatibility fallback was considered but it would only work one direction and since the federation mechanism is bidirectional it was not implemented.
+
+### Origin Gitblit Instance Requirements
+
+- *git.enableGitServlet* must be true, all Git clone and pull requests are handled through Gitblit's JGit servlet
+- *federation.passphrase* must be non-empty
+- The Gitblit origin instance must be http/https accessible by the pulling Gitblit instance.<br/>That may require configuring port-forwarding on your router and/or opening ports on your firewall.
+
+#### federation.passphrase
+
+The passphrase is used to generate permission tokens that can be shared with other Gitblit instances.
+
+The passphrase value never needs to be shared, although if you give another Gitblit instance the *ALL* federation token then your passphrase will be transferred/backed-up along with all other server settings.
+
+This value can be anything you want: an integer, a sentence, an haiku, etc. You should probably keep the passphrase simple and use standard Latin characters to prevent Java properties file encoding errors. The tokens generated from this value are affected by case, so consider this value CASE-SENSITIVE.
+
+The federation feature is completely disabled if your passphrase value is empty.
+
+**NOTE**:
+Changing your *federation.passphrase* will break any registrations you have established with other Gitblit instances.
+
+### Pulling Gitblit Instance Requirements
+
+ - consider setting *federation.allowProposals=true* to facilitate the registration process from origin Gitblit instances
+ - properly registered Gitblit instance including, at a minimum, url, *federation token*, and update frequency
+
+### Controlling What Gets Pulled
+
+If you want your repositories (and optionally users accounts and settings) to be pulled by another Gitblit instance, you need to register your origin Gitblit instance with a pulling Gitblit instance by providing the url of your Gitblit instance and a federation token.
+
+Gitblit generates the following standard federation tokens:
+---JAVA---
+String allToken = SHA1(passphrase + "-ALL");
+String usersAndRepositoriesToken = SHA1(passphrase + "-USERS_AND_REPOSITORIES");
+String repositoriesToken = SHA1(passphrase + "-REPOSITORIES");
+---JAVA---
+
+The *ALL* token allows another Gitblit instance to pull all your repositories, user accounts, server settings, and referenced push scripts.
+The *USERS_AND_REPOSITORIES* token allows another Gitblit instance to pull all your repositories and user accounts.
+The *REPOSITORIES* token only allows pulling of the repositories.
+
+Individual Gitblit repository configurations such as *description* and *accessRestriction* are always mirrored.
+
+If *federation.passphrase* has a non-empty value, the federation tokens are displayed in the log file and are visible, to administrators, in the web ui.
+
+The three standard tokens grant access to ALL your non-excluded repositories. However, if you only want to specify different groups of repositories to be federated then you need to define *federation sets*.
+
+#### Federation Sets
+
+Federation Sets (*federation.sets*) are named groups of repositories. The Federation Sets are defined in `gitblit.properties` and are available for selection in the repository settings page. You can assign a repository to one or more sets and then distribute the federation token for the set. This allows you to grant federation pull access to a subset of your available repositories. Tokens for federation sets only grant pull access for the member repositories.
+
+### Federation Proposals (Origin Gitblit Instance)
+
+Once you have properly setup your passphrase and can see your federation tokens, you are ready to share them with a pulling Gitblit instance.
+
+The registration process can be partially automated by sending a *federation proposal* to the pulling Gitblit instance.
+To send a proposal:
+
+1. Login to your Gitblit instance as an administrator
+2. Select and click the *propose* link for the appropriate token on the *federation* page
+3. Confirm the publicly accessible url of your (origin) Gitblit instance
+4. Enter the url of the pulling Gitblit instance you want to federate with
+5. Optionally enter a message for the administrators
+6. Click *propose*
+
+Not all Gitblit instances accept *federation proposals*, there is a setting which allows Gitblit to outright reject them. In this case an email or instant message to the administrator of the other Gitblit instance is required. :)
+
+If your proposal is accepted, the proposal is cached to disk on the pulling Gitblit server and, if properly configured, the administrators of that Gitblit server will receive an email notification of your proposal.
+
+Your proposal includes:
+
+1. the url of your Gitblit instance
+2. the federation token you selected and its type
+3. the list of your *non-excluded* repositories, and their configuration details, that you propose to share
+
+Submitting a proposal does not automatically register your server with the pulling Gitblit instance.
+Registration is a manual process for an administrator.
+
+### Federation Proposals (Pulling Gitblit Instance)
+
+If your Giblit instance has received a *federation proposal*, you will be alerted to that information the next time you login to Gitblit as an administrator.
+
+You may view the details of a proposal by scrolling down to the bottom of the repositories page and selecting a proposal. Sample registration settings will be generated for you that you may copy & paste into either your `gitblit.properties` file or your `web.xml` file.
+
+### Excluding Repositories (Origin Gitblit Instance)
+
+You may exclude a repository from being pulled by any federated Gitblit instance by setting its *federation strategy* to EXCLUDE in the repository's settings page.
+
+### Excluding Repositories (Pulling Gitblit Instance)
+
+You may exclude repositories to pull in a federation registration. You may exclude all or you may exclude based on a simple fuzzy pattern. Only one wildcard character may be used within each pattern. Patterns are space-separated within the exclude and include fields.
+
+ federation.example.exclude = skipit.git
+
+**OR**
+
+ federation.example.exclude = *
+ federation.example.include = somerepo.git someotherrepo.git
+
+**OR**
+
+ federation.example.exclude = *
+ federation.example.include = common/* library/*
+
+### Tracking Status (Pulling Gitblit Instance)
+
+Below the repositories list on the repositories page you will find a section named *federation registrations*. This section enumerates the other gitblit servers you have configured to periodically pull. The *status* of the latest pull will be indicated on the left with a colored circle, similar to the status of an executed unit test or Hudson/Jenkins build. You can drill into the details of the registration to view the status of the last pull from each repository available from that origin Gitblit instance. Additionally, you can specify the *federation.N.notifyOnError=true* flag, to be alerted via email of regressive status changes to individual registrations.
+
+### Tracking Status (Origin Gitblit Instance)
+
+Origin Gitblit instances can not directly track the success or failure status of Pulling Gitblit instances. However, the Pulling Gitblit instance may elect to send a status acknowledgment (*federation.N.sendStatus=true*) to the origin Gitblit server that indicates the per-repository status of the pull operation. This is the same data that is displayed on the Pulling Gitblit instances ui.
+
+### How does it work? (Origin Gitblit Instances)
+
+A pulling Gitblit instance will periodically contact your Gitblit instance and will provide the token as proof that you have granted it federation access. Your Gitblit instance will decide, based on the supplied token, if the requested data should be returned to the pulling Gitblit instance. Gitblit data (user accounts, repository metadata, and server settings) are serialized as [JSON](http://json.org) using [google-gson](http://google-gson.googlecode.com) and returned to the pulling Gitblit instance. Standard Git clone and pull operations are used to transfer commits.
+
+The federation process executes using an internal administrator account, *$gitblit*. All the normal authentication and authorization processes are used for federation requests. For example, Git commands are authenticated as *$gitblit / token*.
+
+While the *$gitblit* account has access to all repositories, server settings, and user accounts, it is prohibited from accessing the web ui and it is disabled if *federation.passphrase* is empty.
+
+### How does it work? (Pulling Gitblit Instances)
+
+Federated repositories defined in `gitblit.properties` are checked after Gitblit has been running for 1 minute. The next registration check is scheduled at the completion of the current registration check based on the registration's specified frequency.
+
+- The shortest frequency allowed is every 5 minutes
+- Decimal frequency values are cast to integers
+- Frequency values may be specified in mins, hours, or days
+- Values that can not be parsed default to 60 minutes
+
+After a repository has been cloned it is flagged as *isFederated* (which identifies it as being sourced from another Gitblit instance), *isFrozen* (which prevents Git pushes to this mirror) and *federationStrategy=EXCLUDED* (which prevents this repository from being pulled by another federated Gitblit instance).
+
+#### Origin Verification
+
+During a federated pull operation, Gitblit does check that the *origin* of the local repository starts with the url of the federation registration.
+If they do not match, the repository is skipped and this is indicated in the log.
+
+#### User Accounts & Teams
+
+By default all user accounts and teams (except the *admin* account) are automatically pulled when using the *ALL* token or the *USERS_AND_REPOSITORIES* token. You may exclude a user account from being pulled by a federated Gitblit instance by checking *exclude from federation* in the edit user page.
+
+The pulling Gitblit instance will store a registration-specific `users.conf` file for the pulled user accounts and their repository permissions. This file is stored in the *federation.N.folder* folder.
+
+If you specify *federation.N.mergeAccounts=true*, then the user accounts and team definitions from the origin Gitblit instance will be integrated into the `users.conf` file of your Gitblit instance and allow sign-on of those users.
+
+**NOTE:**
+Upgrades from older Gitblit versions will not have the *#notfederated* role assigned to the *admin* account. Without that role, your admin account WILL be transferred with an *ALL* or *USERS_AND_REPOSITORIES* token.
+Please consider adding the *#notfederated* role to your admin account!
+
+#### Server Settings
+
+Server settings are only pulled when using the *ALL* token.
+
+The pulling Gitblit instance will store a registration-specific `gitblit.properties` file for all pulled settings. This file is stored in the *federation.N.folder* folder.
+
+These settings are unused by the pulling Gitblit instance.
+
+#### Push Scripts
+
+Your Groovy push scripts are only pulled when using the *ALL* token.
+
+The pulling Gitblit instance will retrieve any referenced (i.e. used) push script and store it locally as *registration_scriptName.groovy* in the *federation.N.folder* folder.
+
+These scripts are unused by the pulling Gitblit instance.
+
+### Collisions and Conflict Resolution
+
+Gitblit does **not** detect conflict and it does **not** offer conflict resolution of repositories, users, teams, or settings.
+
+If an object exists locally that has the same name as the remote object, it is assumed they are the same and the contents of the remote object are merged into the local object. If you can not guarantee that this is the case, then you should not store any federated repositories directly in *git.repositoriesFolder* and you should not enable *mergeAccounts*.
+
+By default, federated repositories can not be pushed to, they are read-only by the *isFrozen* flag. This flag is **ONLY** enforced by Gitblit's JGit servlet. If you push to a federated repository after resetting the *isFrozen* flag or via some other Git access technique then you may break Gitblit's ability to continue pulling from the origin repository. If you are only pushing to a local branch then you might be safe.
+
+## Federation Pull Registration Keys
+
+<table class="table">
+<tr><th>federation.N.url</th>
+<td>string</td>
+<td>the url of the origin Gitblit instance <em>(required)</em></td>
+</tr>
+
+<tr><th>federation.N.token</th>
+<td>string</td>
+<td>the token provided by the origin Gitblit instance <em>(required)</em></td>
+</tr>
+
+<tr><th>federation.N.frequency</th>
+<td>x [mins/hours/days]</td>
+<td>the period to wait between pull executions</td>
+</tr>
+
+<tr><th>federation.N.folder</th>
+<td>string</td>
+<td>the destination folder, relative to <em>git.repositoriesFolder</em>, for these repositories.<br/>default is <em>git.repositoriesFolder</em></td>
+</tr>
+
+<tr><th>federation.N.bare</th>
+<td>boolean</td>
+<td>if <b>true</b> <em>(default)</em>, each repository is cloned as a bare repository (i.e. no working folder).</td>
+</tr>
+
+<tr><th>federation.N.mirror</th>
+<td>boolean</td>
+<td>if <b>true</b> <em>(default)</em>, each repository HEAD is reset to <em>origin/master</em> after each pull. The repository is flagged <em>isFrozen</em> after the initial clone.<br/><br/>If <b>false</b>, each repository HEAD will point to the FETCH_HEAD of the initial clone from the origin until pushed to or otherwise manipulated.</td>
+</tr>
+
+<tr><th>federation.N.mergeAccounts</th>
+<td>boolean</td>
+<td>if <b>true</b>, merge the retrieved accounts into the <code>users.conf</code> of <b>this</b> Gitblit instance.<br/><em>default is false</em></td>
+</tr>
+
+<tr><th>federation.N.sendStatus</th>
+<td>boolean</td>
+<td>if <b>true</b>, send the status of the federated pull to the origin Gitblit instance.<br/><em>default is false</em></td>
+</tr>
+
+<tr><th>federation.N.include</th>
+<td>string array<br/>(space-delimited)</td>
+<td>list of included repositories <em>(wildcard and fuzzy matching supported)</em></td>
+</tr>
+
+<tr><th>federation.N.exclude</th>
+<td>string array<br/>(space-delimited)</td>
+<td>list of excluded repositories <em>(wildcard and fuzzy matching supported)</em></td>
+</tr>
+
+<tr><th>federation.N.notifyOnError</th>
+<td>boolean</td>
+<td>if <b>true</b>, send an email to the administrators on an error.<br/><em>default is false</em></td>
+</tr>
+</table>
+
+## Example Federation Pull Registrations
+
+These examples would be entered into the `gitblit.properties` file of the pulling gitblit instance.
+
+#### (Nearly) Perfect Mirror Example
+
+![block diagram](fed_mirror.png "Gitblit Mirror")
+
+This assumes that the *token* is the *ALL* token from the origin gitblit instance.
+
+The repositories, example1_users.conf, example1_gitblit.propertiesn and all example1_scripts.groovy will be put in *git.repositoriesFolder* and the origin user accounts will be merged into the local user accounts, including passwords and all roles. The Gitblit instance will also send a status acknowledgment to the origin Gitblit instance at the end of the pull operation. The status report will include the state of each repository pull (EXCLUDED, SKIPPED, NOCHANGE, PULLED, MIRRORED). This way the origin Gitblit instance can monitor the health of its mirrors.
+
+This example is considered *nearly* perfect because while the origin Gitblit's server settings & push scripts are pulled and saved locally, they are not merged with your server settings so its not a true mirror.
+
+ federation.example1.url = https://go.gitblit.com
+ federation.example1.token = 6f3b8a24bf970f17289b234284c94f43eb42f0e4
+ federation.example1.frequency = 120 mins
+ federation.example1.folder =
+ federation.example1.bare = true
+ federation.example1.mirror = true
+ federation.example1.mergeAccounts = true
+ federation.example1.sendStatus = true
+
+#### Just Repositories Example
+
+This assumes that the *token* is the *REPOSITORIES* token from the origin gitblit instance.
+The repositories will be put in *git.repositoriesFolder*/example2.
+
+ federation.example2.url = https://tomcat.gitblit.com/gitblit
+ federation.example2.token = 6f3b8a24bf970f17289b234284c94f43eb42f0e4
+ federation.example2.frequency = 120 mins
+ federation.example2.folder = example2
+ federation.example2.bare = true
+ federation.example2.mirror = true
+
+#### All-but-One Repository Example
+
+This assumes that the *token* is the *REPOSITORIES* token from the origin gitblit instance.
+The repositories will be put in *git.repositoriesFolder*/example3.
+
+ federation.example3.url = https://tomcat.gitblit.com/gitblit
+ federation.example3.token = 6f3b8a24bf970f17289b234284c94f43eb42f0e4
+ federation.example3.frequency = 120 mins
+ federation.example3.folder = example3
+ federation.example3.bare = true
+ federation.example3.mirror = true
+ federation.example3.exclude = somerepo.git
+
+#### Just One Repository Example
+
+This assumes that the *token* is the *REPOSITORIES* token from the origin gitblit instance.
+The repositories will be put in *git.repositoriesFolder*/example4.
+
+ federation.example4.url = https://tomcat.gitblit.com/gitblit
+ federation.example4.token = 6f3b8a24bf970f17289b234284c94f43eb42f0e4
+ federation.example4.frequency = 120 mins
+ federation.example4.folder = example4
+ federation.example4.bare = true
+ federation.example4.mirror = true
+ federation.example4.exclude = *
+ federation.example4.include = somerepo.git
+
+## Federation Client
+
+Instead of setting up a full-blown pulling Gitblit instance, you can also use the [federation client](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%) command-line utility. This is a packaged subset of the federation feature in a smaller, simpler command-line only tool.
+
+The *federation client* relies on many of the same dependencies as Gitblit and will download them on first execution.
+
+### federation.properties
+You may use the `federation.properties` file to configure one or more Gitblit instances that you want to pull from. This file is a subset of the standard `gitblit.properties` file.
+
+By default this tool does not daemonize itself; it executes and then quits. This allows you to use the native scheduling feature of your OS. Of course, if you'd rather use Gitblit's scheduler you may use that by specifying the `--daemon` parameter.
+
+### http.sslVerify
+
+If you are pulling from a Gitblit with a self-signed SSL certificate you will need to configure Git/JGit to bypass certificate verification.
+([Git-Config Manual Page](http://www.kernel.org/pub/software/scm/git/docs/git-config.html))
+
+<pre>git config --global --bool --add http.sslVerify false</pre>
+
+### Command-Line Parameters
+Instead of using `federation.properties` you may directly specify a Gitblit instance to pull from with command-line parameters.
+
+ java -jar fedclient.jar --url https://go.gitblit.com --mirror --bare --token 123456789
+ --repositoriesFolder c:/mymirror
+
+ java -jar fedclient.jar --url https://go.gitblit.com --mirror --bare --token 123456789
+ --repositoriesFolder c:/mymirror --daemon --frequency "24 hours"
+
diff --git a/src/site/federation.odg b/src/site/federation.odg
new file mode 100644
index 00000000..e2c3ba8a
--- /dev/null
+++ b/src/site/federation.odg
Binary files differ
diff --git a/src/site/gitblit_logo_white.xcf b/src/site/gitblit_logo_white.xcf
new file mode 100644
index 00000000..d0d397c2
--- /dev/null
+++ b/src/site/gitblit_logo_white.xcf
Binary files differ
diff --git a/src/site/openshift.mkd b/src/site/openshift.mkd
new file mode 100644
index 00000000..63b1b007
--- /dev/null
+++ b/src/site/openshift.mkd
@@ -0,0 +1,56 @@
+## Gitblit on RedHat's OpenShift Cloud Service
+
+The Gitblit Express distribution can be copied to the root of your RedHat OpenShift
+application repository. Gitblit Express is an exploded WAR file with all appropriate
+dependencies bundled.
+
+You should delete the `pom.xml` file and the `src` folder from your application repository
+as Gitblit Express is not a source distribution to be built with Maven on OpenShift.
+
+Gitblit automatically adjusts itself to running on OpenShift. Repositories, users,
+federation proposals, setting overrides, and Groovy push scripts are stored in *OPENSHIFT_DATA_DIR*.
+
+It is recommended to enable all RPC settings in the `web.xml` file to allow remote
+administration and, more importantly, configuration of your Gitblit Express
+installation using the Gitblit Manager.
+
+It is also recommended to set *web.forwardSlashCharacter* to ! because OpenShift
+runs on JBoss/Tomcat behind a proxy, neither of which are friendly to embedded
+forward-slashes.
+
+Please do not change the following settings unless you know exactly what you are
+doing:
+
+- *git.repositoriesFolder*
+- *groovy.scriptsFolder*
+- *federation.proposalsFolder*
+- *realm.userService* (for standard users.conf)
+
+Additionally, it is recommended to force your Gitblit installation to cleanup up
+older versions on your OpenShift filesystem to maximize available space for your
+repositories.
+
+Append the following command to your ./openshift/action_hooks/build file:
+
+ rm -fr $OPENSHIFT_APP_DIR/jbossas-7.0/standalone/tmp/vfs/*
+
+Lastly, you may want to play with the heap and permgen settings of your Gitblit
+instance because the default heap for the JVM is 95 MB, which may be a little
+tight.
+
+To do that you will have to login to your account via ssh:
+
+ ssh hashcode@app-domain.rhcloud.com
+
+and then you will have to manipulate the -Xmx and -XX:MaxPermSize values.
+
+ vi $OPENSHIFT_APP_DIR/jbossas-7.0/bin/standalone.conf
+ ctl_app restart
+
+OpenShift currently allows 300MB of memory per application which includes ssh access, JVM, etc.
+The Gitblit demo hosted on OpenShift Express operates with -Xmx160m and -XX:MaxPermSize=90m.
+
+For more detailed instructions on how to setup and deploy an OpenShift application
+please see this excellent turorial:
+
+https://github.com/opensas/play-demo/wiki/Step-12.5---deploy-to-openshift
diff --git a/src/site/permissions_matrix.ods b/src/site/permissions_matrix.ods
new file mode 100644
index 00000000..6df0b4db
--- /dev/null
+++ b/src/site/permissions_matrix.ods
Binary files differ
diff --git a/src/site/properties.mkd b/src/site/properties.mkd
new file mode 100644
index 00000000..2b0151bb
--- /dev/null
+++ b/src/site/properties.mkd
@@ -0,0 +1,2 @@
+## gitblit.properties
+%PROPERTIES%
diff --git a/src/site/releasecurrent.mkd b/src/site/releasecurrent.mkd
new file mode 100644
index 00000000..613f1bf9
--- /dev/null
+++ b/src/site/releasecurrent.mkd
@@ -0,0 +1,67 @@
+## Current Release (${project.releaseVersion})
+
+<div class="alert alert-info">
+<h4>Update Note ${project.releaseVersion}</h4>
+Because there are now several types of files and folders that must be considered Gitblit data, the default location for data has changed.
+<p>You will need to move a few files around when upgrading. Please see the Upgrading section of the <a href="setup.html">setup</a> page for details.</p>
+
+<b>Express Users</b> make sure to update your web.xml file with the ${baseFolder} values!
+</div>
+
+**downloads:** [GO Windows](%GCURL%gitblit-${project.releaseVersion}.zip) | [GO Linux/OSX](%GCURL%gitblit-${project.releaseVersion}.tar.gz) | [WAR](%GCURL%gitblit-${project.releaseVersion}.war) | [Express](%GCURL%express-${project.releaseVersion}.zip) | [Federatoin Client](%GCURL%fedclient-${project.releaseVersion}.zip) | [Gitblit Manager](%GCURL%manager-${project.releaseVersion}.zip) | [API Library](%GCURL%gbapi-${project.releaseVersion}.zip) &nbsp; *released ${project.releaseDate}*
+
+#### fixes
+
+- Fixed nullpointer on recursively calculating folder sizes when there is a named pipe or symlink in the hierarchy
+- Added nullchecking when concurrently forking a repository and trying to display it's fork network (issue-187)
+- Fixed bug where permission changes were not visible in the web ui to a logged-in user until the user logged-out and then logged back in again (issue-186)
+- Fixed nullpointer on creating a repository with mixed case (issue 185)
+- Include missing model classes in api library (issue-184)
+- Fixed nullpointer when using *web.allowForking = true* && *git.cacheRepositoryList = false* (issue 182)
+- Likely fix for commit and commitdiff page failures when a submodule reference changes (issue 178)
+- Build project models from the repository model cache, when possible, to reduce page load time (issue 172)
+- Fixed loading of Brazilian Portuguese translation from *nix server (github/inaiat)
+
+#### additions
+
+- Fanout PubSub service for self-hosted [Sparkleshare](http://sparkleshare.org) notifications.<br/>
+This service is disabled by default.<br/>
+ **New:** *fanout.bindInterface = localhost*<br/>
+ **New:** *fanout.port = 0*<br/>
+ **New:** *fanout.useNio = true*<br/>
+ **New:** *fanout.connectionLimit = 0*
+- Implemented a simple push log based on a hidden, orphan branch refs/gitblit/pushes (issue 177)<br/>
+The push log is not currently visible in the ui, but the data will be collected and it will be exposed to the ui in the next release.
+- Support for locally and remotely authenticated accounts in LdapUserService and RedmineUserService (issue 183)
+- Added Dutch translation (github/kwoot)
+
+#### changes
+
+- Gitblit GO and Gitblit WAR are now both configured by `gitblit.properties`. WAR is no longer configured by `web.xml`.<br/>
+However, Express for OpenShift continues to be configured by `web.xml`.
+- Support for a *--baseFolder* command-line argument for Gitblit GO and Gitblit Certificate Authority
+- Support for specifying a *${baseFolder}* parameter in `gitblit.properties` and `web.xml` for several settings
+- Improve history display of a submodule link
+- Updated Korean translation (github/ds5apn)
+- Updated checkstyle definition (github/mystygage)
+
+<div style="padding-top:20px;" />
+
+## Next Release (${project.version})
+
+<div class="alert alert-info">
+<h4>Update Note ${project.version}</h4>
+These are the fixes, changes, and additions queued for the next release.
+</div>
+
+#### fixes
+
+- Can't set reset settings with $ or { characters through Gitblit Manager because they are not properly escaped
+
+#### additions
+
+ - FogBugz post-receive hook script (github/djschny)
+ - Implemented multiple repository owners (github/akquinet)
+ - Chinese translation (github/dapengme, github/yin8086)
+
+[jgit]: http://eclipse.org/jgit "Eclipse JGit Site"
diff --git a/src/site/releasehistory.mkd b/src/site/releasehistory.mkd
new file mode 100644
index 00000000..7ea76766
--- /dev/null
+++ b/src/site/releasehistory.mkd
@@ -0,0 +1,488 @@
+## Older Releases
+
+<div class="alert alert-info">
+<h4>Update Note 1.2.0</h4>
+The permissions model has changed in the 1.2.0 release.
+<p>If you are updating your server, you must also update any Gitblit Manager and Federation Client installs to 1.2.0 as well. The data model used by the RPC mechanism has changed slightly for the new permissions infrastructure.</p>
+</div>
+
+**1.2.0** *released 2012-12-31*
+
+#### fixes
+
+- Fixed regression in *isFrozen* (issue 181)
+- Author metrics can be broken by newlines in email addresses from converted repositories (issue 176)
+- Set subjectAlternativeName on generated SSL cert if CN is an ip address (issue 170)
+- Fixed incorrect links on history page for files not in the current/active commit (issue 166)
+- Empty repository page failed to handle missing repository (issue 160)
+- Fixed broken ticgit urls (issue 157)
+- Exclude submodules from zip downloads (issue 151)
+- Fixed bug where repository ownership was not updated on rename user
+- Fixed bug in create/rename repository if you explicitly specified the alias for the root group (e.g. main/myrepo) (issue 143)
+- Wrapped Markdown parser with improved exception handler (issue 142)
+- Fixed duplicate entries in repository cache (issue 140)
+- Fixed connection leak in LDAPUserService (issue 139)
+- Fixed bug in commit page where changes to a submodule threw a null pointer exception (issue 132)
+- Fixed bug in the diff view for filenames that have non-ASCII characters (issue 128)
+
+#### additions
+
+- Implemented discrete repository permissions (issue 36)
+ - V (view in web ui, RSS feeds, download zip)
+ - R (clone)
+ - RW (clone and push)
+ - RWC (clone and push with ref creation)
+ - RWD (clone and push with ref creation, deletion)
+ - RW+ (clone and push with ref creation, deletion, rewind)
+While not as sophisticated as Gitolite, this does give finer access controls. These permissions fit in cleanly with the existing users.conf and users.properties files. In Gitblit <= 1.1.0, all your existing user accounts have RW+ access. If you are upgrading to 1.2.0, the RW+ access is *preserved* and you will have to lower/adjust accordingly.
+- Implemented *case-insensitive* regex repository permission matching (issue 36)<br/>
+This allows you to specify a permission like `RW:mygroup/.*` to grant push privileges to all repositories within the *mygroup* project/folder.
+- Added DELETE, CREATE, and NON-FAST-FORWARD ref change logging
+- Added support for personal repositories.<br/>
+Personal repositories can be created by accounts with the *create* permission and are stored in *git.repositoriesFolder/~username*. Each user with personal repositories will have a user page, something like the GitHub profile page. Personal repositories have all the same features as common repositories, except personal repositories can be renamed by their owner.
+- Added support for server-side forking of a repository to a personal repository (issue 137)<br/>
+In order to fork a repository, the user account must have the *fork* permission **and** the repository must *allow forks*. The clone inherits the access list of its origin. i.e. if Team A has clone access to the origin repository, then by default Team A also has clone access to the fork. This is to facilitate collaboration. The fork owner may change access to the fork and add/remove users/teams, etc as required <u>however</u> it should be noted that all personal forks will be enumerated in the fork network regardless of access view restrictions. If you really must have an invisible fork, the clone it locally, create a new repository for your invisible fork, and push it back to Gitblit.<br/>
+ **New:** *web.allowForking=true*
+- Added optional *create-on-push* support<br/>
+ **New:** *git.allowCreateOnPush=true*
+- Added **experimental** JGit-based garbage collection service. This service is disabled by default.<br/>
+ **New:** *git.allowGarbageCollection=false*<br/>
+ **New:** *git.garbageCollectionHour = 0*<br/>
+ **New:** *git.defaultGarbageCollectionThreshold = 500k*<br/>
+ **New:** *git.defaultGarbageCollectionPeriod = 7 days*
+- Added support for X509 client certificate authentication (github/kevinanderson1). (issue 106)<br/>
+You can require all git servlet access be authenticated by a client certificate. You may also specify the OID fingerprint to use for mapping a certificate to a username. It should be noted that the user account MUST already exist in Gitblit for this authentication mechanism to work; this mechanism can not be used to automatically create user accounts from a certificate.<br/>
+ **New:** *git.requireClientCertificates = false*<br/>
+ **New:** *git.enforceCertificateValidity = true*<br/>
+ **New:** *git.certificateUsernameOIDs = CN*
+- Revised clean install certificate generation to create a Gitblit GO Certificate Authority certificate; an SSL certificate signed by the CA certificate; and to create distinct server key and server trust stores. <u>The store files have been renamed!</u>
+- Added support for Gitblit GO to require usage of client certificates to access the entire server.<br/>
+This is extreme and should be considered carefully since it affects every https access. The default is to **want** client certificates. Setting this value to *true* changes that to **need** client certificates.<br/>
+ **New:** *server.requireClientCertificates = false*
+- Added **Gitblit Certificate Authority**, an x509 PKI management tool for Gitblit GO to encourage use of x509 client certificate authentication.
+- Added setting to control length of shortened commit ids<br/>
+ **New:** *web.shortCommitIdLength=8*
+- Added alternate compressed download formats: tar.gz, tar.xz, tar.bzip2 (issue 174)<br/>
+ **New:** *web.compressedDownloads = zip gz*
+- Added simple project pages. A project is a subfolder off the *git.repositoriesFolder*.
+- Added support for X-Forwarded-Context for Apache subdomain proxy configurations (issue 135)
+- Delete branch feature (issue 121, Github/ajermakovics)
+- Added line links to blob view (issue 130)
+- Added HTML sendmail hook script and Gitblit.sendHtmlMail method (github/sauthieg)
+- Added RedmineUserService (github/mallowlabs)
+- Support for committer verification. Requires use of *--no-ff* when merging branches or pull requests. See setup page for details.
+- Added Brazilian Portuguese translation (github/rafaelcavazin)
+
+#### changes
+
+- Added server setting to specify keystore alias for ssl certificate (issue 98)
+- Added optional global and per-repository activity page commit contribution throttle to help tame *really* active repositories (issue 173)
+- Added support for symlinks in tree page and commit page (issue 171)
+- All access restricted servlets (e.g. DownloadZip, RSS, etc) will try to authenticate using X509 certificates, container principals, cookies, and BASIC headers, in that order.
+- Added *groovy* and *scala* to *web.prettyPrintExtensions*
+- Added short commit id column to log and history tables (issue 168)
+- Teams can now specify the *admin*, *create*, and *fork* roles to simplify user administration
+- Use https Gravatar urls to avoid browser complaints
+- Added frm to default pretty print extensions (issue 156)
+- Expose ReceivePack to Groovy push hooks (issue 125)
+- Redirect to summary page when refreshing the empty repository page on a repository that is not empty (issue 129)
+- Emit a warning in the log file if running on a Tomcat-based servlet container which is unfriendly to %2F forward-slash url encoding AND Gitblit is configured to mount parameters with %2F forward-slash url encoding (Github/jpyeron, issue 126)
+- LDAP admin attribute setting is now consistent with LDAP teams setting and admin teams list.
+If *realm.ldap.maintainTeams==true* **AND** *realm.ldap.admins* is not empty, then User.canAdmin() is controlled by LDAP administrative team membership. Otherwise, User.canAdmin() is controlled by Gitblit.
+- Support servlet container authentication for existing UserModels (issue 68)
+
+#### dependency changes
+
+- updated to Jetty 7.6.8
+- updated to JGit 2.2.0.201212191850-r
+- updated to Groovy 1.8.8
+- updated to Wicket 1.4.21
+- updated to Lucene 3.6.1
+- updated to BouncyCastle 1.47
+- updated to MarkdownPapers 1.3.2
+- added JCalendar 1.3.2
+- added Commons-Compress 1.4.1
+- added XZ for Java 1.0
+<hr/>
+
+<div class="alert alert-error">
+<h4>Update Note 1.1.0</h4>
+If you are updating from an earlier release AND you have indexed branches with the Lucene indexing feature, you need to be aware that this release will completely re-index your repositories. Please be sure to provide ample heap resources as appropriate for your installation.
+</div>
+
+**1.1.0** *released 2012-08-25*
+
+#### fixes
+
+- Bypass Wicket's inability to handle direct url addressing of a view-restricted, grouped repository for new, unauthenticated sessions (e.g. click link from email or rss feed without having an active Wicket session)
+- Fixed MailExecutor's failure to cope with mail server connection troubles resulting in 100% CPU usage
+- Fixed generated urls in Groovy *sendmail* hook script for grouped repositories
+- Fixed generated urls in RSS feeds for grouped repositories
+- Fixed nullpointer exception in git servlet security filter (issue 123)
+- Eliminated an unnecessary repository enumeration call on the root page which should result in faster page loads (issue 103)
+- Gitblit could not delete a Lucene index in a working copy on index upgrade
+- Do not index submodule links (issue 119)
+- Restore original user or team object on failure to update (issue 118)
+- Fixes to relative path determination in repository search algorithm for symlinks (issue 116)
+- Fix to GitServlet to allow pushing to symlinked repositories (issue 116)
+- Repository URL now uses `X-Forwarded-Proto` and `X-Forwarded-Port`, if available, for reverse proxy configurations (issue 115)
+- Output real RAW content, not simulated RAW content (issue 114)
+- Fixed Lucene charset encoding bug when reindexing a repository (issue 112)
+- Fixed search box linking to Lucene page for grouped repository on Tomcat (issue 111)
+- Fixed null pointer in LdapUserSerivce if account has a null email address (issue 110)
+- Really fixed failure to update a GO setting from the manager (issue 85)
+
+#### additions
+
+- Identified repository list is now cached by default to reduce disk io and to improve performance (issue 103)<br/>
+ **New:** *git.cacheRepositoryList=true*
+- Preliminary bare repository submodule support<br/>
+ **New:** *git.submoduleUrlPatterns=*
+ - *git.submoduleUrlPatterns* is a space-delimited list of regular expressions for extracting a repository name from a submodule url.<br/>
+ For example, `git.submoduleUrlPatterns = .*?://github.com/(.*)` would extract *gitblit/gitblit.git* from *git://github.git/gitblit/gitblit.git*<br/>
+ **Note:** You may not need this control to work with submodules, but it is there if you do.
+ - If there are no matches from *git.submoduleUrlPatterns* then the repository name is assumed to be whatever comes after the last `/` character *(e.g. gitblit.git)*
+ - Gitblit will try to locate this repository relative to the current repository *(e.g. myfolder/myrepo.git, myfolder/mysubmodule.git)* and then at the root level *(mysubmodule.git)* if that fails.
+ - Submodule references in a working copy will be properly identified as gitlinks, but Gitblit will not traverse into the working copy submodule repository.
+- Added a repository setting to control authorization as AUTHENTICATED or NAMED. (issue 117)<br/>
+NAMED is the original behavior for authorizing against a list of permitted users or permitted teams.
+AUTHENTICATED allows restricted access for any authenticated user. This is a looser authorization control.
+- Added default authorization control setting (AUTHENTICATED or NAMED)<br/>
+ **New:** *git.defaultAuthorizationControl=NAMED*
+- Added setting to control how deep Gitblit will recurse into *git.repositoriesFolder* looking for repositories (issue 103)<br/>
+ **New:** *git.searchRecursionDepth=-1*
+- Added setting to specify regex exclusions for repositories (issue 103)<br/>
+ **New:** *git.searchExclusions=*
+- Blob page now supports displaying images (issue 6)
+- Non-image binary files can now be downloaded using the RAW link
+- Support StartTLS in LdapUserService (Steffen Gebert, issue 122)
+- Added Korean translation
+
+#### changes
+
+- Line breaks inserted for readability in raw Markdown content display in the event of a parsing/transformation error. An error message is now displayed prepended to the raw content.
+- Improve UTF-8 reading for Markdown files
+- Updated Polish translation
+- Updated Japanese translation
+- Updated Spanish translation
+
+<hr/>
+
+**1.0.0** *released 2012-07-14*
+
+#### fixes
+
+- Fixed bug in Lucene search where old/stale blobs were never properly deleted during incremental updates. This resulted in duplicate blob entries in the index.
+- Fixed intermittent bug in identifying line numbers in Lucene search (issue 105)
+- Adjust repository identification algorithm to handle the scenario where a repository name collides with a group/folder name (e.g. foo.git and foo/bar.git) (issue 104)
+- Fixed bug where a repository set as *authenticated push* did not have anonymous clone access (issue 96)
+- Fixed bug in Basic authentication if passwords had a colon (Github/peterloron)
+- Fixed bug where the Gitblit Manager could not update a setting that was not referenced in reference.properties (issue 85)
+
+#### changes
+
+- **Updated Lucene index version which will force a rebuild of ALL your Lucene indexes**<br/>
+Make sure to properly set *web.blobEncodings* before starting Gitblit if you are updating! (issue 97)
+- Changed default layout for web ui from Fixed-Width layout to Responsive layout (issue 101)
+- IUserService interface has changed to better accomodate custom authentication and/or custom authorization<br/>
+ The default `users.conf` now supports persisting display names and email addresses.
+- Updated Japanese translation (Github/zakki)
+
+#### additions
+
+- Added setting to allow specification of a robots.txt file (issue 99)<br/>
+ **New:** *web.robots.txt =*
+- Added setting to control Responsive layout or Fixed-Width layout (issue 101)<br/>
+ Responsive layout is now the default. This layout gracefully scales the web ui from a desktop layout to a mobile layout by hiding page components. It is easy to try, just resize your browser or point your Android/iOS device to the url of your Gitblit install.
+ **New:** *web.useResponsiveLayout = true*
+- Added setting to control charsets for blob string decoding. Default encodings are UTF-8, ISO-8859-1, and server's default charset. (issue 97)<br/>
+ **New:** *web.blobEncodings = UTF-8 ISO-8859-1*
+- Exposed JGit's internal configuration settings in gitblit.properties/web.xml (issue 93)<br/>
+ Review your `gitblit.properties` or `web.xml` for detailed explanations of these settings.<br/>
+ **New:** *git.packedGitWindowSize = 8k*<br/>
+ **New:** *git.packedGitLimit = 10m*<br/>
+ **New:** *git.deltaBaseCacheLimit = 10m*<br/>
+ **New:** *git.packedGitOpenFiles = 128*<br/>
+ **New:** *git.streamFileThreshold = 50m*<br/>
+ **New:** *git.packedGitMmap = false*
+- Added default access restriction. Applies to new repositories and repositories that have not been configured with Gitblit. (issue 88)<br/>
+ **New:** *git.defaultAccessRestriction = NONE*
+- Added Ivy 2.2.0 dependency which enables Groovy Grapes, a mechanism to resolve and retrieve library dependencies from a Maven 2 repository within a Groovy push hook script
+- Added setting to control Groovy Grape root folder (location where resolved dependencies are stored)<br/>
+ [Grape](http://groovy.codehaus.org/Grape) allows you to add Maven dependencies to your pre-/post-receive hook script classpath.<br/>
+ **New:** *groovy.grapeFolder = groovy/grape*
+- Added LDAP User Service with many new *realm.ldap* keys (Github/jcrygier)
+- Added support for custom repository properties for Groovy hooks (Github/jcrygier)<br/>
+ Custom repository properties complement hook scripts by providing text field prompts in the web ui and the Gitblit Manager for the defined properties. This allows your push hooks to be parameterized.
+- Added script to facilitate proxy environment setup on Linux (Github/mragab)
+- Added Polish translation (Lukasz Jader)
+- Added Spanish translation (Eduardo Guervos Narvaez)
+
+#### dependency changes
+
+- updated to Bootstrap 2.0.4
+- updated to JGit 2.0.0.201206130900-r
+- updated to Groovy 1.8.6
+- updated to Gson 1.7.2
+- updated to Log4J 1.2.17
+- updated to SLF4J 1.6.6
+- updated to Apache Commons Daemon 1.0.10
+- added Ivy 2.2.0
+
+<hr/>
+
+**0.9.3** *released 2012-04-11*
+
+#### fixes
+
+- Fixed bug where you could not remove all selections from a RepositoryModel list (permitted users, permitted teams, hook scripts, federation sets, etc) (issue 81)
+- Automatically set *java.awt.headless=true* for Gitblit GO
+
+<hr/>
+
+**0.9.2** *released 2012-04-04*
+
+#### changes
+
+- Added *clientLogger* bound variable to Groovy hook mechanism to allow custom info and error messages to be returned to the client (Github/jcrygier)
+
+#### fixes
+
+- Fixed absolute path/canonical path discrepancy between Gitblit and JGit regarding use of symlinks (issue 78)
+- Fixed row layout on activity page (issue 79)
+- Fixed Centos service script (Github/mohamedmansour)
+- Fixed EditRepositoryPage for IE8; missing save button (issue 80, Github/jonnybbb)
+
+<hr/>
+
+**0.9.1** *released 2012-03-27*
+
+#### fixes
+
+- Lucene folder was stored in working copy instead of in .git folder
+
+<hr/>
+
+**0.9.0** *released 2012-03-27*
+
+#### security
+
+- Fixed session fixation vulnerability where the session identifier was not reset during the login process (issue 62)
+
+#### changes
+
+- Reject pushes to a repository with a working copy (i.e. non-bare repository) (issue-49)
+- Changed default web.datetimestampLongFormat from *EEEE, MMMM d, yyyy h:mm a z* to *EEEE, MMMM d, yyyy HH:mm Z* (issue 50)
+- Expanded commit age coloring from 2 days to 30 days (issue 57)
+
+#### additions
+
+- Added optional Lucene branch indexing (issue 16)<br/>
+ **New:** *web.allowLuceneIndexing = true*<br/>
+ **New:** *web.luceneIgnoreExtensions = 7z arc arj bin bmp dll doc docx exe gif gz jar jpg lib lzh odg odf odt pdf ppt png so swf xcf xls xlsx zip*
+Repository branches may be optionally indexed by Lucene for improved searching. To use this feature you must specify which branches to index within the *Edit Repository* page; _no repositories are automatically indexed_. Gitblit will build or incrementally update enrolled repositories on a 2 minute cycle. (i.e you will have to wait 2-3 minutes after respecifying indexed branches or pushing new commits before Gitblit will build/update the repository's Lucene index.)
+If a repository has Lucene-indexed branches the *search* form on the repository pages will redirect to the root-level Lucene search page and only the content of those branches can be searched.<br/>
+If the repository does not specify any indexed branches then repository commit-traversal search is used.
+**Note:** Initial indexing of an existing repository can be memory-exhaustive. Be sure to provide your Gitblit server adequate heap space to index your repositories (e.g. -Xmx1024M).<br/>
+See the [setup](setup.html) page for additional details.
+- Allow specifying timezone to use for Gitblit which is independent of both the JVM and the system timezone (issue 54)<br/>
+ **New:** *web.timezone =*
+- Added a built-in AJP connector for integrating Gitblit GO into an Apache mod_proxy setup (issue 59)<br/>
+ **New:** *server.ajpPort = 0*<br/>
+ **New:** *server.ajpBindInterface = localhost*
+- On the Repositories page show a bang *!* character in the color swatch of a repository with a working copy (issue 49)<br/>
+Push requests to these repositories will be rejected.
+- On all non-bare Repository pages show *WORKING COPY* in the upper right corner (issue 49)
+- New setting to prevent display/serving non-bare repositories<br/>
+ **New:** *git.onlyAccessBareRepositories = false*
+- Added *protect-refs.groovy* (Github/plm)
+- Allow setting default branch (relinking HEAD) to a branch or a tag (Github/plm)
+- Added Ubuntu service init script (issue 72)
+- Added partial Japanese translation (Github/zakki)
+
+#### fixes
+
+- Ensure that Welcome message is parsed using UTF-8 encoding (issue 74)
+- Activity page chart layout broken by Google (issue 73)
+- Uppercase repositories not selectable in edit palettes (issue 71)
+- Not all git notes were properly displayed on the commit page (issue 70)
+- Activity page now displays all local branches (issue 65)
+- Fixed (harmless) nullpointer on pushing to an empty repository (issue 69)
+- Fixed possible nullpointer from the servlet container on startup (issue 67)
+- Fixed UTF-8 encoding bug on diff page (issue 66)
+- Fixed timezone bugs on the activity page (issue 54)
+- Prevent add/edit team with no selected repositories (issue 56)
+- Disallow browser autocomplete on add/edit user/team/repository pages
+- Fixed username case-sensitivity issues (issue 43)
+- Disregard searching a subfolder if Gitblit does not have filesystem permissions (Github/lemval issue 51)
+
+#### dependency changes
+
+- updated to Bootstrap 2.0.2
+- added GLYPHICONS (as bundled with Bootstrap 2.0.2)
+- updated to MarkdownPapers 1.2.7
+- updated to JGit 1.3.0.201202151440-r
+- updated to Wicket 1.4.20
+
+<hr/>
+
+**0.8.2** ([go](http://code.google.com/p/gitblit/downloads/detail?name=gitblit-0.8.2.zip) | [war](http://code.google.com/p/gitblit/downloads/detail?name=gitblit-0.8.2.war) | [express](http://code.google.com/p/gitblit/downloads/detail?name=express-0.8.2.zip) | [fedclient](http://code.google.com/p/gitblit/downloads/detail?name=fedclient-0.8.2.zip) | [manager](http://code.google.com/p/gitblit/downloads/detail?name=manager-0.8.2.zip) | [api](http://code.google.com/p/gitblit/downloads/detail?name=gbapi-0.8.2.zip)) based on [JGit 1.2.0 (201112221803-r)][jgit] &nbsp; *released 2012-01-13*
+
+#### fixes
+
+- Fixed bug when upgrading from users.properties to users.conf (issue 41)
+
+<hr/>
+
+**0.8.1** &nbsp; *released 2012-01-11*
+
+#### fixes
+
+- Include missing icon resource for the manager (issue 40)
+- Fixed sendmail.groovy message content with incorrect tag/branch labels
+
+<hr/>
+
+**0.8.0** &nbsp; *released 2012-01-11*
+
+#### additions
+
+- Platform-independent, Groovy push hook script mechanism.<br/>
+Hook scripts can be set per-repository, per-team, or globally for all repositories.<br/>
+ **New:** *groovy.scriptsFolder = groovy*<br/>
+ **New:** *groovy.preReceiveScripts =*<br/>
+ **New:** *groovy.postReceiveScripts =*
+- *sendmail.groovy* for optional email notifications on push.<br/>
+You must properly configure your SMTP server settings in `gitblit.properties` or `web.xml` to use *sendmail.groovy*.
+- New global key for mailing lists. This is used in conjunction with the *sendmail.groovy* hook script. All repositories that use the *sendmail.groovy* script will include these addresses in the notification process. Please see the Setup page for more details about configuring sendmail.<br/>
+ **New:** *mail.mailingLists =*
+- *com.gitblit.GitblitUserService*. This is a wrapper object for the built-in user service implementations. For those wanting to only implement custom authentication it is recommended to subclass GitblitUserService and override the appropriate methods. Going forward, this will help insulate custom authentication from new IUserService API and/or changes in model classes.
+- New default user service implementation: *com.gitblit.ConfigUserService* (`users.conf`)<br/>
+This user service implementation allows for serialization and deserialization of more sophisticated Gitblit User objects without requiring the encoding trickery now present in FileUserService (users.properties). This will open the door for more advanced Gitblit features.
+For those upgrading from an earlier Gitblit version, a `users.conf` file will automatically be created for you from your existing `users.properties` file on your first launch of Gitblit <u>however</u> you will have to manually set *realm.userService=users.conf* to switch to the new user service.<br/>
+The original `users.properties` file and it's corresponding implementation are **deprecated**.<br/>
+ **New:** *realm.userService = users.conf*
+- Teams for specifying user-repository access in bulk. Teams may also specify mailing lists addresses and pre- & post- receive hook scripts.
+- Gravatar integration<br/>
+ **New:** *web.allowGravatar = true*
+- Activity page for aggregated repository activity. This is a timeline of commit activity over the last N days for one or more repositories.<br/>
+ **New:** *web.activityDuration = 14*<br/>
+ **New:** *web.timeFormat = HH:mm*<br/>
+ **New:** *web.datestampLongFormat = EEEE, MMMM d, yyyy*
+- *Filters* menu for the Repositories page and Activity page. You can filter by federation set, team, and simple custom regular expressions. Custom expressions can be stored in `gitblit.properties` or `web.xml` or directly defined in your url (issue 27)<br/>
+ **New:** *web.customFilters=*
+- Flash-based 1-step *copy to clipboard* of the primary repository url based on Clippy<br/>
+ **New:** *web.allowFlashCopyToClipboard = true*
+- JavaScript-based 3-step (click, ctrl+c, enter) *copy to clipboard* of the primary repository url in the event that you do not want to use Flash on your installation
+- Empty repositories now link to an *empty repository* page which gives some direction to the user for the next step in using Gitblit. This page displays the primary push/clone url of the repository and gives sample syntax for the git command-line client. (issue 31)
+- Repositories with a *gh-pages* branch will now have a *pages* link which will serve the content of this branch. All resource requests are against the repository, Gitblit does not checkout/export this branch to a temporary filesystem. Jekyll templating is not supported.
+- Gitblit Express bundle to get started running Gitblit on RedHat's OpenShift cloud <span class="label label-warning">BETA</span>
+
+#### changes
+
+- Dropped display of trailing .git from repository names
+- Gitblit GO is now monolithic like the WAR build. (issue 30)<br/>
+This change helps adoption of GO in environments without an internet connection or with a restricted connection.
+- Unit testing framework has been migrated to JUnit4 syntax and the test suite has been redesigned to run all unit tests, including rpc, federation, and git push/clone tests
+
+#### fixes
+
+- Several a bugs in FileUserService related to cleaning up old repository permissions on a rename or delete
+- Renaming a repository into a new subfolder failed (issue 33)
+
+#### dependency changes
+
+- updated to JGit 1.2.0
+- added Groovy 1.8.5
+- added Clippy (bundled)
+
+<hr/>
+
+**0.7.0** &nbsp; *released 2011-11-11*
+
+- **security**: fixed security hole when cloning clone-restricted repository with TortoiseGit (issue 28)
+- improved: updated ui with Twitter's Bootstrap CSS toolkit<br/>
+ **New:** *web.loginMessage = gitblit*
+- improved: repositories list performance by caching repository sizes (issue 27)
+- improved: summary page performance by caching metric calculations (issue 25)
+- added: authenticated JSON RPC mechanism<br/>
+ **New:** *web.enableRpcServlet = true*<br/>
+ **New:** *web.enableRpcManagement = false*<br/>
+ **New:** *web.enableRpcAdministration = false*
+- added: Gitblit API RSS/JSON RPC library
+- added: Gitblit Manager (Java/Swing Application) for remote administration of a Gitblit server.
+- added: per-repository setting to skip size calculation (faster repositories page loading)
+- added: per-repository setting to skip summary metrics calculation (faster summary page loading)
+- added: IUserService.setup(IStoredSettings) for custom user service implementations
+- added: setting to control Gitblit GO context path for proxy setups *(Github/trygvis)*<br/>
+ **New:** *server.contextPath = /*
+- added: *combined-md5* password storage option which stores the hash of username+password as the password *(Github/alyandon)*
+- added: repository owners are automatically granted access for git, feeds, and zip downloads without explicitly selecting them *(Github/dadalar)*
+- added: RSS feeds now include regex substitutions on commit messages for bug trackers, etc
+- fixed: federation protocol timestamps. dates are now serialized to the [iso8601](http://en.wikipedia.org/wiki/ISO_8601) standard.<br/>
+ **This breaks 0.6.0 federation clients/servers.**
+- fixed: collision on rename for repositories and users
+- fixed: Gitblit can now browse the Linux kernel repository (issue 25)
+- fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8) (issue 23)
+- fixed: Set the RSS content type of syndication feeds for Firefox 4 (issue 22)
+- fixed: RSS feeds are now properly encoded to UTF-8
+- fixed: RSS feeds now properly generate parameterized links if *web.mountParameters=false*
+- fixed: Null pointer exception if did not set federation strategy (issue 20)
+- fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later
+- updated: MarkdownPapers 1.2.5
+- updated: Wicket 1.4.19
+
+<hr/>
+
+**0.6.0** &nbsp; *released 2011-09-27*
+
+- added: federation feature to allow gitblit instances (or gitblit federation clients) to pull repositories and, optionally, settings and accounts from other gitblit instances. This is something like [svn-sync](http://svnbook.red-bean.com/en/1.5/svn.ref.svnsync.html) for gitblit.<br/>
+ **New:** *federation.name =*<br/>
+ **New:** *federation.passphrase =*<br/>
+ **New:** *federation.allowProposals = false*<br/>
+ **New:** *federation.proposalsFolder = proposals*<br/>
+ **New:** *federation.defaultFrequency = 60 mins*<br/>
+ **New:** *federation.sets =*<br/>
+ **New:** *mail.* settings for sending emails<br/>
+ **New:** user role *#notfederated* to prevent a user account from being pulled by a federated Gitblit instance
+- added: google-gson dependency
+- added: javamail dependency
+- updated: MarkdownPapers 1.1.1
+- updated: Wicket 1.4.18
+- updated: JGit 1.1.0
+- fixed: syndication urls for WAR deployments
+- fixed: authentication for zip downloads
+
+<hr/>
+
+**0.5.2** &nbsp; *released 2011-07-27*
+
+- fixed: active repositories with a HEAD that pointed to an empty branch caused internal errors (issue 14)
+- fixed: bare-cloned repositories were listed as (empty) and were not clickable (issue 13)
+- fixed: default port for Gitblit GO is now 8443 to be more linux/os x friendly (issue 12)
+- fixed: repositories can now be reliably deleted and renamed (issue 10)
+- fixed: users can now change their passwords (issue 1)
+- fixed: always show root repository group first, i.e. don't sort root group with other groups
+- fixed: tone-down repository group header color
+- added: optionally display repository on-disk size on repositories page<br/>
+ **New:** *web.showRepositorySizes = true*
+- added: forward-slashes ('/', %2F) can be encoded using a custom character to workaround some servlet container default security measures for proxy servers<br/>
+ **New:** *web.forwardSlashCharacter = /*
+- updated: MarkdownPapers 1.1.0
+- updated: Jetty 7.4.3
+
+<hr/>
+
+**0.5.1** &nbsp; *released 2011-06-28*
+
+- clarified SSL certificate generation and configuration for both server-side and client-side
+- added some more troubleshooting information to documentation
+- replaced JavaService with Apache Commons Daemon
+
+<hr/>
+
+**0.5.0** &nbsp; *released 2011-06-26*
+
+- initial release
+
+[jgit]: http://eclipse.org/jgit "Eclipse JGit Site"
diff --git a/src/site/releases.mkd b/src/site/releases.mkd
new file mode 100644
index 00000000..7dd6b174
--- /dev/null
+++ b/src/site/releases.mkd
@@ -0,0 +1,550 @@
+## Release History
+
+### Current Release
+
+**%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%) | [war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%) | [express](http://code.google.com/p/gitblit/downloads/detail?name=%EXPRESS%) | [fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%) | [manager](http://code.google.com/p/gitblit/downloads/detail?name=%MANAGER%) | [api](http://code.google.com/p/gitblit/downloads/detail?name=%API%)) based on [%JGIT%][jgit] &nbsp; *released %BUILDDATE%*
+
+#### fixes
+
+- Can't set reset settings with $ or { characters through Gitblit Manager because they are not properly escaped
+
+#### additions
+
+ - Option to force client-side basic authentication instead of form-based authentication if web.authenticateViewPages=true (github/furinzen)
+ - Optional periodic LDAP user and team pre-fetching & synchronization (github/mschaefers)
+ - Display name and version in Tomcat Manager (github/thefake)
+ - FogBugz post-receive hook script (github/djschny)
+ - Implemented multiple repository owners (github/akquinet)
+ - Chinese translation (github/dapengme, github/yin8086)
+
+### Older Releases
+
+<div class="alert alert-info">
+<h4>Update Note 1.2.1</h4>
+Because there are now several types of files and folders that must be considered Gitblit data, the default location for data has changed.
+<p>You will need to move a few files around when upgrading. Please see the Upgrading section of the <a href="setup.html">setup</a> page for details.</p>
+
+<b>Express Users</b> make sure to update your web.xml file with the ${baseFolder} values!
+</div>
+
+#### fixes
+
+- Fixed nullpointer on recursively calculating folder sizes when there is a named pipe or symlink in the hierarchy
+- Added nullchecking when concurrently forking a repository and trying to display it's fork network (issue-187)
+- Fixed bug where permission changes were not visible in the web ui to a logged-in user until the user logged-out and then logged back in again (issue-186)
+- Fixed nullpointer on creating a repository with mixed case (issue 185)
+- Include missing model classes in api library (issue-184)
+- Fixed nullpointer when using *web.allowForking = true* && *git.cacheRepositoryList = false* (issue 182)
+- Likely fix for commit and commitdiff page failures when a submodule reference changes (issue 178)
+- Build project models from the repository model cache, when possible, to reduce page load time (issue 172)
+- Fixed loading of Brazilian Portuguese translation from *nix server (github/inaiat)
+
+#### additions
+
+- Fanout PubSub service for self-hosted [Sparkleshare](http://sparkleshare.org) notifications.<br/>
+This service is disabled by default.<br/>
+ **New:** *fanout.bindInterface = localhost*<br/>
+ **New:** *fanout.port = 0*<br/>
+ **New:** *fanout.useNio = true*<br/>
+ **New:** *fanout.connectionLimit = 0*
+- Implemented a simple push log based on a hidden, orphan branch refs/gitblit/pushes (issue 177)<br/>
+The push log is not currently visible in the ui, but the data will be collected and it will be exposed to the ui in the next release.
+- Support for locally and remotely authenticated accounts in LdapUserService and RedmineUserService (issue 183)
+- Added Dutch translation (github/kwoot)
+
+#### changes
+
+- Gitblit GO and Gitblit WAR are now both configured by `gitblit.properties`. WAR is no longer configured by `web.xml`.<br/>
+However, Express for OpenShift continues to be configured by `web.xml`.
+- Support for a *--baseFolder* command-line argument for Gitblit GO and Gitblit Certificate Authority
+- Support for specifying a *${baseFolder}* parameter in `gitblit.properties` and `web.xml` for several settings
+- Improve history display of a submodule link
+- Updated Korean translation (github/ds5apn)
+- Updated checkstyle definition (github/mystygage)
+
+<div class="alert alert-info">
+<h4>Update Note 1.2.0</h4>
+The permissions model has changed in the 1.2.0 release.
+<p>If you are updating your server, you must also update any Gitblit Manager and Federation Client installs to 1.2.0 as well. The data model used by the RPC mechanism has changed slightly for the new permissions infrastructure.</p>
+</div>
+
+**1.2.0** *released 2012-12-31*
+
+#### fixes
+
+- Fixed regression in *isFrozen* (issue 181)
+- Author metrics can be broken by newlines in email addresses from converted repositories (issue 176)
+- Set subjectAlternativeName on generated SSL cert if CN is an ip address (issue 170)
+- Fixed incorrect links on history page for files not in the current/active commit (issue 166)
+- Empty repository page failed to handle missing repository (issue 160)
+- Fixed broken ticgit urls (issue 157)
+- Exclude submodules from zip downloads (issue 151)
+- Fixed bug where repository ownership was not updated on rename user
+- Fixed bug in create/rename repository if you explicitly specified the alias for the root group (e.g. main/myrepo) (issue 143)
+- Wrapped Markdown parser with improved exception handler (issue 142)
+- Fixed duplicate entries in repository cache (issue 140)
+- Fixed connection leak in LDAPUserService (issue 139)
+- Fixed bug in commit page where changes to a submodule threw a null pointer exception (issue 132)
+- Fixed bug in the diff view for filenames that have non-ASCII characters (issue 128)
+
+#### additions
+
+- Implemented discrete repository permissions (issue 36)
+ - V (view in web ui, RSS feeds, download zip)
+ - R (clone)
+ - RW (clone and push)
+ - RWC (clone and push with ref creation)
+ - RWD (clone and push with ref creation, deletion)
+ - RW+ (clone and push with ref creation, deletion, rewind)
+While not as sophisticated as Gitolite, this does give finer access controls. These permissions fit in cleanly with the existing users.conf and users.properties files. In Gitblit <= 1.1.0, all your existing user accounts have RW+ access. If you are upgrading to 1.2.0, the RW+ access is *preserved* and you will have to lower/adjust accordingly.
+- Implemented *case-insensitive* regex repository permission matching (issue 36)<br/>
+This allows you to specify a permission like `RW:mygroup/.*` to grant push privileges to all repositories within the *mygroup* project/folder.
+- Added DELETE, CREATE, and NON-FAST-FORWARD ref change logging
+- Added support for personal repositories.<br/>
+Personal repositories can be created by accounts with the *create* permission and are stored in *git.repositoriesFolder/~username*. Each user with personal repositories will have a user page, something like the GitHub profile page. Personal repositories have all the same features as common repositories, except personal repositories can be renamed by their owner.
+- Added support for server-side forking of a repository to a personal repository (issue 137)<br/>
+In order to fork a repository, the user account must have the *fork* permission **and** the repository must *allow forks*. The clone inherits the access list of its origin. i.e. if Team A has clone access to the origin repository, then by default Team A also has clone access to the fork. This is to facilitate collaboration. The fork owner may change access to the fork and add/remove users/teams, etc as required <u>however</u> it should be noted that all personal forks will be enumerated in the fork network regardless of access view restrictions. If you really must have an invisible fork, the clone it locally, create a new repository for your invisible fork, and push it back to Gitblit.<br/>
+ **New:** *web.allowForking=true*
+- Added optional *create-on-push* support<br/>
+ **New:** *git.allowCreateOnPush=true*
+- Added **experimental** JGit-based garbage collection service. This service is disabled by default.<br/>
+ **New:** *git.allowGarbageCollection=false*<br/>
+ **New:** *git.garbageCollectionHour = 0*<br/>
+ **New:** *git.defaultGarbageCollectionThreshold = 500k*<br/>
+ **New:** *git.defaultGarbageCollectionPeriod = 7 days*
+- Added support for X509 client certificate authentication (github/kevinanderson1). (issue 106)<br/>
+You can require all git servlet access be authenticated by a client certificate. You may also specify the OID fingerprint to use for mapping a certificate to a username. It should be noted that the user account MUST already exist in Gitblit for this authentication mechanism to work; this mechanism can not be used to automatically create user accounts from a certificate.<br/>
+ **New:** *git.requireClientCertificates = false*<br/>
+ **New:** *git.enforceCertificateValidity = true*<br/>
+ **New:** *git.certificateUsernameOIDs = CN*
+- Revised clean install certificate generation to create a Gitblit GO Certificate Authority certificate; an SSL certificate signed by the CA certificate; and to create distinct server key and server trust stores. <u>The store files have been renamed!</u>
+- Added support for Gitblit GO to require usage of client certificates to access the entire server.<br/>
+This is extreme and should be considered carefully since it affects every https access. The default is to **want** client certificates. Setting this value to *true* changes that to **need** client certificates.<br/>
+ **New:** *server.requireClientCertificates = false*
+- Added **Gitblit Certificate Authority**, an x509 PKI management tool for Gitblit GO to encourage use of x509 client certificate authentication.
+- Added setting to control length of shortened commit ids<br/>
+ **New:** *web.shortCommitIdLength=8*
+- Added alternate compressed download formats: tar.gz, tar.xz, tar.bzip2 (issue 174)<br/>
+ **New:** *web.compressedDownloads = zip gz*
+- Added simple project pages. A project is a subfolder off the *git.repositoriesFolder*.
+- Added support for X-Forwarded-Context for Apache subdomain proxy configurations (issue 135)
+- Delete branch feature (issue 121, Github/ajermakovics)
+- Added line links to blob view (issue 130)
+- Added HTML sendmail hook script and Gitblit.sendHtmlMail method (github/sauthieg)
+- Added RedmineUserService (github/mallowlabs)
+- Support for committer verification. Requires use of *--no-ff* when merging branches or pull requests. See setup page for details.
+- Added Brazilian Portuguese translation (github/rafaelcavazin)
+
+#### changes
+
+- Added server setting to specify keystore alias for ssl certificate (issue 98)
+- Added optional global and per-repository activity page commit contribution throttle to help tame *really* active repositories (issue 173)
+- Added support for symlinks in tree page and commit page (issue 171)
+- All access restricted servlets (e.g. DownloadZip, RSS, etc) will try to authenticate using X509 certificates, container principals, cookies, and BASIC headers, in that order.
+- Added *groovy* and *scala* to *web.prettyPrintExtensions*
+- Added short commit id column to log and history tables (issue 168)
+- Teams can now specify the *admin*, *create*, and *fork* roles to simplify user administration
+- Use https Gravatar urls to avoid browser complaints
+- Added frm to default pretty print extensions (issue 156)
+- Expose ReceivePack to Groovy push hooks (issue 125)
+- Redirect to summary page when refreshing the empty repository page on a repository that is not empty (issue 129)
+- Emit a warning in the log file if running on a Tomcat-based servlet container which is unfriendly to %2F forward-slash url encoding AND Gitblit is configured to mount parameters with %2F forward-slash url encoding (Github/jpyeron, issue 126)
+- LDAP admin attribute setting is now consistent with LDAP teams setting and admin teams list.
+If *realm.ldap.maintainTeams==true* **AND** *realm.ldap.admins* is not empty, then User.canAdmin() is controlled by LDAP administrative team membership. Otherwise, User.canAdmin() is controlled by Gitblit.
+- Support servlet container authentication for existing UserModels (issue 68)
+
+#### dependency changes
+
+- updated to Jetty 7.6.8
+- updated to JGit 2.2.0.201212191850-r
+- updated to Groovy 1.8.8
+- updated to Wicket 1.4.21
+- updated to Lucene 3.6.1
+- updated to BouncyCastle 1.47
+- updated to MarkdownPapers 1.3.2
+- added JCalendar 1.3.2
+- added Commons-Compress 1.4.1
+- added XZ for Java 1.0
+<hr/>
+
+<div class="alert alert-error">
+<h4>Update Note 1.1.0</h4>
+If you are updating from an earlier release AND you have indexed branches with the Lucene indexing feature, you need to be aware that this release will completely re-index your repositories. Please be sure to provide ample heap resources as appropriate for your installation.
+</div>
+
+**1.1.0** *released 2012-08-25*
+
+#### fixes
+
+- Bypass Wicket's inability to handle direct url addressing of a view-restricted, grouped repository for new, unauthenticated sessions (e.g. click link from email or rss feed without having an active Wicket session)
+- Fixed MailExecutor's failure to cope with mail server connection troubles resulting in 100% CPU usage
+- Fixed generated urls in Groovy *sendmail* hook script for grouped repositories
+- Fixed generated urls in RSS feeds for grouped repositories
+- Fixed nullpointer exception in git servlet security filter (issue 123)
+- Eliminated an unnecessary repository enumeration call on the root page which should result in faster page loads (issue 103)
+- Gitblit could not delete a Lucene index in a working copy on index upgrade
+- Do not index submodule links (issue 119)
+- Restore original user or team object on failure to update (issue 118)
+- Fixes to relative path determination in repository search algorithm for symlinks (issue 116)
+- Fix to GitServlet to allow pushing to symlinked repositories (issue 116)
+- Repository URL now uses `X-Forwarded-Proto` and `X-Forwarded-Port`, if available, for reverse proxy configurations (issue 115)
+- Output real RAW content, not simulated RAW content (issue 114)
+- Fixed Lucene charset encoding bug when reindexing a repository (issue 112)
+- Fixed search box linking to Lucene page for grouped repository on Tomcat (issue 111)
+- Fixed null pointer in LdapUserSerivce if account has a null email address (issue 110)
+- Really fixed failure to update a GO setting from the manager (issue 85)
+
+#### additions
+
+- Identified repository list is now cached by default to reduce disk io and to improve performance (issue 103)<br/>
+ **New:** *git.cacheRepositoryList=true*
+- Preliminary bare repository submodule support<br/>
+ **New:** *git.submoduleUrlPatterns=*
+ - *git.submoduleUrlPatterns* is a space-delimited list of regular expressions for extracting a repository name from a submodule url.<br/>
+ For example, `git.submoduleUrlPatterns = .*?://github.com/(.*)` would extract *gitblit/gitblit.git* from *git://github.git/gitblit/gitblit.git*<br/>
+ **Note:** You may not need this control to work with submodules, but it is there if you do.
+ - If there are no matches from *git.submoduleUrlPatterns* then the repository name is assumed to be whatever comes after the last `/` character *(e.g. gitblit.git)*
+ - Gitblit will try to locate this repository relative to the current repository *(e.g. myfolder/myrepo.git, myfolder/mysubmodule.git)* and then at the root level *(mysubmodule.git)* if that fails.
+ - Submodule references in a working copy will be properly identified as gitlinks, but Gitblit will not traverse into the working copy submodule repository.
+- Added a repository setting to control authorization as AUTHENTICATED or NAMED. (issue 117)<br/>
+NAMED is the original behavior for authorizing against a list of permitted users or permitted teams.
+AUTHENTICATED allows restricted access for any authenticated user. This is a looser authorization control.
+- Added default authorization control setting (AUTHENTICATED or NAMED)<br/>
+ **New:** *git.defaultAuthorizationControl=NAMED*
+- Added setting to control how deep Gitblit will recurse into *git.repositoriesFolder* looking for repositories (issue 103)<br/>
+ **New:** *git.searchRecursionDepth=-1*
+- Added setting to specify regex exclusions for repositories (issue 103)<br/>
+ **New:** *git.searchExclusions=*
+- Blob page now supports displaying images (issue 6)
+- Non-image binary files can now be downloaded using the RAW link
+- Support StartTLS in LdapUserService (Steffen Gebert, issue 122)
+- Added Korean translation
+
+#### changes
+
+- Line breaks inserted for readability in raw Markdown content display in the event of a parsing/transformation error. An error message is now displayed prepended to the raw content.
+- Improve UTF-8 reading for Markdown files
+- Updated Polish translation
+- Updated Japanese translation
+- Updated Spanish translation
+
+<hr/>
+
+**1.0.0** *released 2012-07-14*
+
+#### fixes
+
+- Fixed bug in Lucene search where old/stale blobs were never properly deleted during incremental updates. This resulted in duplicate blob entries in the index.
+- Fixed intermittent bug in identifying line numbers in Lucene search (issue 105)
+- Adjust repository identification algorithm to handle the scenario where a repository name collides with a group/folder name (e.g. foo.git and foo/bar.git) (issue 104)
+- Fixed bug where a repository set as *authenticated push* did not have anonymous clone access (issue 96)
+- Fixed bug in Basic authentication if passwords had a colon (Github/peterloron)
+- Fixed bug where the Gitblit Manager could not update a setting that was not referenced in reference.properties (issue 85)
+
+#### changes
+
+- **Updated Lucene index version which will force a rebuild of ALL your Lucene indexes**<br/>
+Make sure to properly set *web.blobEncodings* before starting Gitblit if you are updating! (issue 97)
+- Changed default layout for web ui from Fixed-Width layout to Responsive layout (issue 101)
+- IUserService interface has changed to better accomodate custom authentication and/or custom authorization<br/>
+ The default `users.conf` now supports persisting display names and email addresses.
+- Updated Japanese translation (Github/zakki)
+
+#### additions
+
+- Added setting to allow specification of a robots.txt file (issue 99)<br/>
+ **New:** *web.robots.txt =*
+- Added setting to control Responsive layout or Fixed-Width layout (issue 101)<br/>
+ Responsive layout is now the default. This layout gracefully scales the web ui from a desktop layout to a mobile layout by hiding page components. It is easy to try, just resize your browser or point your Android/iOS device to the url of your Gitblit install.
+ **New:** *web.useResponsiveLayout = true*
+- Added setting to control charsets for blob string decoding. Default encodings are UTF-8, ISO-8859-1, and server's default charset. (issue 97)<br/>
+ **New:** *web.blobEncodings = UTF-8 ISO-8859-1*
+- Exposed JGit's internal configuration settings in gitblit.properties/web.xml (issue 93)<br/>
+ Review your `gitblit.properties` or `web.xml` for detailed explanations of these settings.<br/>
+ **New:** *git.packedGitWindowSize = 8k*<br/>
+ **New:** *git.packedGitLimit = 10m*<br/>
+ **New:** *git.deltaBaseCacheLimit = 10m*<br/>
+ **New:** *git.packedGitOpenFiles = 128*<br/>
+ **New:** *git.streamFileThreshold = 50m*<br/>
+ **New:** *git.packedGitMmap = false*
+- Added default access restriction. Applies to new repositories and repositories that have not been configured with Gitblit. (issue 88)<br/>
+ **New:** *git.defaultAccessRestriction = NONE*
+- Added Ivy 2.2.0 dependency which enables Groovy Grapes, a mechanism to resolve and retrieve library dependencies from a Maven 2 repository within a Groovy push hook script
+- Added setting to control Groovy Grape root folder (location where resolved dependencies are stored)<br/>
+ [Grape](http://groovy.codehaus.org/Grape) allows you to add Maven dependencies to your pre-/post-receive hook script classpath.<br/>
+ **New:** *groovy.grapeFolder = groovy/grape*
+- Added LDAP User Service with many new *realm.ldap* keys (Github/jcrygier)
+- Added support for custom repository properties for Groovy hooks (Github/jcrygier)<br/>
+ Custom repository properties complement hook scripts by providing text field prompts in the web ui and the Gitblit Manager for the defined properties. This allows your push hooks to be parameterized.
+- Added script to facilitate proxy environment setup on Linux (Github/mragab)
+- Added Polish translation (Lukasz Jader)
+- Added Spanish translation (Eduardo Guervos Narvaez)
+
+#### dependency changes
+
+- updated to Bootstrap 2.0.4
+- updated to JGit 2.0.0.201206130900-r
+- updated to Groovy 1.8.6
+- updated to Gson 1.7.2
+- updated to Log4J 1.2.17
+- updated to SLF4J 1.6.6
+- updated to Apache Commons Daemon 1.0.10
+- added Ivy 2.2.0
+
+<hr/>
+
+**0.9.3** *released 2012-04-11*
+
+#### fixes
+
+- Fixed bug where you could not remove all selections from a RepositoryModel list (permitted users, permitted teams, hook scripts, federation sets, etc) (issue 81)
+- Automatically set *java.awt.headless=true* for Gitblit GO
+
+<hr/>
+
+**0.9.2** *released 2012-04-04*
+
+#### changes
+
+- Added *clientLogger* bound variable to Groovy hook mechanism to allow custom info and error messages to be returned to the client (Github/jcrygier)
+
+#### fixes
+
+- Fixed absolute path/canonical path discrepancy between Gitblit and JGit regarding use of symlinks (issue 78)
+- Fixed row layout on activity page (issue 79)
+- Fixed Centos service script (Github/mohamedmansour)
+- Fixed EditRepositoryPage for IE8; missing save button (issue 80, Github/jonnybbb)
+
+<hr/>
+
+**0.9.1** *released 2012-03-27*
+
+#### fixes
+
+- Lucene folder was stored in working copy instead of in .git folder
+
+<hr/>
+
+**0.9.0** *released 2012-03-27*
+
+#### security
+
+- Fixed session fixation vulnerability where the session identifier was not reset during the login process (issue 62)
+
+#### changes
+
+- Reject pushes to a repository with a working copy (i.e. non-bare repository) (issue-49)
+- Changed default web.datetimestampLongFormat from *EEEE, MMMM d, yyyy h:mm a z* to *EEEE, MMMM d, yyyy HH:mm Z* (issue 50)
+- Expanded commit age coloring from 2 days to 30 days (issue 57)
+
+#### additions
+
+- Added optional Lucene branch indexing (issue 16)<br/>
+ **New:** *web.allowLuceneIndexing = true*<br/>
+ **New:** *web.luceneIgnoreExtensions = 7z arc arj bin bmp dll doc docx exe gif gz jar jpg lib lzh odg odf odt pdf ppt png so swf xcf xls xlsx zip*
+Repository branches may be optionally indexed by Lucene for improved searching. To use this feature you must specify which branches to index within the *Edit Repository* page; _no repositories are automatically indexed_. Gitblit will build or incrementally update enrolled repositories on a 2 minute cycle. (i.e you will have to wait 2-3 minutes after respecifying indexed branches or pushing new commits before Gitblit will build/update the repository's Lucene index.)
+If a repository has Lucene-indexed branches the *search* form on the repository pages will redirect to the root-level Lucene search page and only the content of those branches can be searched.<br/>
+If the repository does not specify any indexed branches then repository commit-traversal search is used.
+**Note:** Initial indexing of an existing repository can be memory-exhaustive. Be sure to provide your Gitblit server adequate heap space to index your repositories (e.g. -Xmx1024M).<br/>
+See the [setup](setup.html) page for additional details.
+- Allow specifying timezone to use for Gitblit which is independent of both the JVM and the system timezone (issue 54)<br/>
+ **New:** *web.timezone =*
+- Added a built-in AJP connector for integrating Gitblit GO into an Apache mod_proxy setup (issue 59)<br/>
+ **New:** *server.ajpPort = 0*<br/>
+ **New:** *server.ajpBindInterface = localhost*
+- On the Repositories page show a bang *!* character in the color swatch of a repository with a working copy (issue 49)<br/>
+Push requests to these repositories will be rejected.
+- On all non-bare Repository pages show *WORKING COPY* in the upper right corner (issue 49)
+- New setting to prevent display/serving non-bare repositories<br/>
+ **New:** *git.onlyAccessBareRepositories = false*
+- Added *protect-refs.groovy* (Github/plm)
+- Allow setting default branch (relinking HEAD) to a branch or a tag (Github/plm)
+- Added Ubuntu service init script (issue 72)
+- Added partial Japanese translation (Github/zakki)
+
+#### fixes
+
+- Ensure that Welcome message is parsed using UTF-8 encoding (issue 74)
+- Activity page chart layout broken by Google (issue 73)
+- Uppercase repositories not selectable in edit palettes (issue 71)
+- Not all git notes were properly displayed on the commit page (issue 70)
+- Activity page now displays all local branches (issue 65)
+- Fixed (harmless) nullpointer on pushing to an empty repository (issue 69)
+- Fixed possible nullpointer from the servlet container on startup (issue 67)
+- Fixed UTF-8 encoding bug on diff page (issue 66)
+- Fixed timezone bugs on the activity page (issue 54)
+- Prevent add/edit team with no selected repositories (issue 56)
+- Disallow browser autocomplete on add/edit user/team/repository pages
+- Fixed username case-sensitivity issues (issue 43)
+- Disregard searching a subfolder if Gitblit does not have filesystem permissions (Github/lemval issue 51)
+
+#### dependency changes
+
+- updated to Bootstrap 2.0.2
+- added GLYPHICONS (as bundled with Bootstrap 2.0.2)
+- updated to MarkdownPapers 1.2.7
+- updated to JGit 1.3.0.201202151440-r
+- updated to Wicket 1.4.20
+
+<hr/>
+
+**0.8.2** ([go](http://code.google.com/p/gitblit/downloads/detail?name=gitblit-0.8.2.zip) | [war](http://code.google.com/p/gitblit/downloads/detail?name=gitblit-0.8.2.war) | [express](http://code.google.com/p/gitblit/downloads/detail?name=express-0.8.2.zip) | [fedclient](http://code.google.com/p/gitblit/downloads/detail?name=fedclient-0.8.2.zip) | [manager](http://code.google.com/p/gitblit/downloads/detail?name=manager-0.8.2.zip) | [api](http://code.google.com/p/gitblit/downloads/detail?name=gbapi-0.8.2.zip)) based on [JGit 1.2.0 (201112221803-r)][jgit] &nbsp; *released 2012-01-13*
+
+#### fixes
+
+- Fixed bug when upgrading from users.properties to users.conf (issue 41)
+
+<hr/>
+
+**0.8.1** &nbsp; *released 2012-01-11*
+
+#### fixes
+
+- Include missing icon resource for the manager (issue 40)
+- Fixed sendmail.groovy message content with incorrect tag/branch labels
+
+<hr/>
+
+**0.8.0** &nbsp; *released 2012-01-11*
+
+#### additions
+
+- Platform-independent, Groovy push hook script mechanism.<br/>
+Hook scripts can be set per-repository, per-team, or globally for all repositories.<br/>
+ **New:** *groovy.scriptsFolder = groovy*<br/>
+ **New:** *groovy.preReceiveScripts =*<br/>
+ **New:** *groovy.postReceiveScripts =*
+- *sendmail.groovy* for optional email notifications on push.<br/>
+You must properly configure your SMTP server settings in `gitblit.properties` or `web.xml` to use *sendmail.groovy*.
+- New global key for mailing lists. This is used in conjunction with the *sendmail.groovy* hook script. All repositories that use the *sendmail.groovy* script will include these addresses in the notification process. Please see the Setup page for more details about configuring sendmail.<br/>
+ **New:** *mail.mailingLists =*
+- *com.gitblit.GitblitUserService*. This is a wrapper object for the built-in user service implementations. For those wanting to only implement custom authentication it is recommended to subclass GitblitUserService and override the appropriate methods. Going forward, this will help insulate custom authentication from new IUserService API and/or changes in model classes.
+- New default user service implementation: *com.gitblit.ConfigUserService* (`users.conf`)<br/>
+This user service implementation allows for serialization and deserialization of more sophisticated Gitblit User objects without requiring the encoding trickery now present in FileUserService (users.properties). This will open the door for more advanced Gitblit features.
+For those upgrading from an earlier Gitblit version, a `users.conf` file will automatically be created for you from your existing `users.properties` file on your first launch of Gitblit <u>however</u> you will have to manually set *realm.userService=users.conf* to switch to the new user service.<br/>
+The original `users.properties` file and it's corresponding implementation are **deprecated**.<br/>
+ **New:** *realm.userService = users.conf*
+- Teams for specifying user-repository access in bulk. Teams may also specify mailing lists addresses and pre- & post- receive hook scripts.
+- Gravatar integration<br/>
+ **New:** *web.allowGravatar = true*
+- Activity page for aggregated repository activity. This is a timeline of commit activity over the last N days for one or more repositories.<br/>
+ **New:** *web.activityDuration = 14*<br/>
+ **New:** *web.timeFormat = HH:mm*<br/>
+ **New:** *web.datestampLongFormat = EEEE, MMMM d, yyyy*
+- *Filters* menu for the Repositories page and Activity page. You can filter by federation set, team, and simple custom regular expressions. Custom expressions can be stored in `gitblit.properties` or `web.xml` or directly defined in your url (issue 27)<br/>
+ **New:** *web.customFilters=*
+- Flash-based 1-step *copy to clipboard* of the primary repository url based on Clippy<br/>
+ **New:** *web.allowFlashCopyToClipboard = true*
+- JavaScript-based 3-step (click, ctrl+c, enter) *copy to clipboard* of the primary repository url in the event that you do not want to use Flash on your installation
+- Empty repositories now link to an *empty repository* page which gives some direction to the user for the next step in using Gitblit. This page displays the primary push/clone url of the repository and gives sample syntax for the git command-line client. (issue 31)
+- Repositories with a *gh-pages* branch will now have a *pages* link which will serve the content of this branch. All resource requests are against the repository, Gitblit does not checkout/export this branch to a temporary filesystem. Jekyll templating is not supported.
+- Gitblit Express bundle to get started running Gitblit on RedHat's OpenShift cloud <span class="label label-warning">BETA</span>
+
+#### changes
+
+- Dropped display of trailing .git from repository names
+- Gitblit GO is now monolithic like the WAR build. (issue 30)<br/>
+This change helps adoption of GO in environments without an internet connection or with a restricted connection.
+- Unit testing framework has been migrated to JUnit4 syntax and the test suite has been redesigned to run all unit tests, including rpc, federation, and git push/clone tests
+
+#### fixes
+
+- Several a bugs in FileUserService related to cleaning up old repository permissions on a rename or delete
+- Renaming a repository into a new subfolder failed (issue 33)
+
+#### dependency changes
+
+- updated to JGit 1.2.0
+- added Groovy 1.8.5
+- added Clippy (bundled)
+
+<hr/>
+
+**0.7.0** &nbsp; *released 2011-11-11*
+
+- **security**: fixed security hole when cloning clone-restricted repository with TortoiseGit (issue 28)
+- improved: updated ui with Twitter's Bootstrap CSS toolkit<br/>
+ **New:** *web.loginMessage = gitblit*
+- improved: repositories list performance by caching repository sizes (issue 27)
+- improved: summary page performance by caching metric calculations (issue 25)
+- added: authenticated JSON RPC mechanism<br/>
+ **New:** *web.enableRpcServlet = true*<br/>
+ **New:** *web.enableRpcManagement = false*<br/>
+ **New:** *web.enableRpcAdministration = false*
+- added: Gitblit API RSS/JSON RPC library
+- added: Gitblit Manager (Java/Swing Application) for remote administration of a Gitblit server.
+- added: per-repository setting to skip size calculation (faster repositories page loading)
+- added: per-repository setting to skip summary metrics calculation (faster summary page loading)
+- added: IUserService.setup(IStoredSettings) for custom user service implementations
+- added: setting to control Gitblit GO context path for proxy setups *(Github/trygvis)*<br/>
+ **New:** *server.contextPath = /*
+- added: *combined-md5* password storage option which stores the hash of username+password as the password *(Github/alyandon)*
+- added: repository owners are automatically granted access for git, feeds, and zip downloads without explicitly selecting them *(Github/dadalar)*
+- added: RSS feeds now include regex substitutions on commit messages for bug trackers, etc
+- fixed: federation protocol timestamps. dates are now serialized to the [iso8601](http://en.wikipedia.org/wiki/ISO_8601) standard.<br/>
+ **This breaks 0.6.0 federation clients/servers.**
+- fixed: collision on rename for repositories and users
+- fixed: Gitblit can now browse the Linux kernel repository (issue 25)
+- fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8) (issue 23)
+- fixed: Set the RSS content type of syndication feeds for Firefox 4 (issue 22)
+- fixed: RSS feeds are now properly encoded to UTF-8
+- fixed: RSS feeds now properly generate parameterized links if *web.mountParameters=false*
+- fixed: Null pointer exception if did not set federation strategy (issue 20)
+- fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later
+- updated: MarkdownPapers 1.2.5
+- updated: Wicket 1.4.19
+
+<hr/>
+
+**0.6.0** &nbsp; *released 2011-09-27*
+
+- added: federation feature to allow gitblit instances (or gitblit federation clients) to pull repositories and, optionally, settings and accounts from other gitblit instances. This is something like [svn-sync](http://svnbook.red-bean.com/en/1.5/svn.ref.svnsync.html) for gitblit.<br/>
+ **New:** *federation.name =*<br/>
+ **New:** *federation.passphrase =*<br/>
+ **New:** *federation.allowProposals = false*<br/>
+ **New:** *federation.proposalsFolder = proposals*<br/>
+ **New:** *federation.defaultFrequency = 60 mins*<br/>
+ **New:** *federation.sets =*<br/>
+ **New:** *mail.* settings for sending emails<br/>
+ **New:** user role *#notfederated* to prevent a user account from being pulled by a federated Gitblit instance
+- added: google-gson dependency
+- added: javamail dependency
+- updated: MarkdownPapers 1.1.1
+- updated: Wicket 1.4.18
+- updated: JGit 1.1.0
+- fixed: syndication urls for WAR deployments
+- fixed: authentication for zip downloads
+
+<hr/>
+
+**0.5.2** &nbsp; *released 2011-07-27*
+
+- fixed: active repositories with a HEAD that pointed to an empty branch caused internal errors (issue 14)
+- fixed: bare-cloned repositories were listed as (empty) and were not clickable (issue 13)
+- fixed: default port for Gitblit GO is now 8443 to be more linux/os x friendly (issue 12)
+- fixed: repositories can now be reliably deleted and renamed (issue 10)
+- fixed: users can now change their passwords (issue 1)
+- fixed: always show root repository group first, i.e. don't sort root group with other groups
+- fixed: tone-down repository group header color
+- added: optionally display repository on-disk size on repositories page<br/>
+ **New:** *web.showRepositorySizes = true*
+- added: forward-slashes ('/', %2F) can be encoded using a custom character to workaround some servlet container default security measures for proxy servers<br/>
+ **New:** *web.forwardSlashCharacter = /*
+- updated: MarkdownPapers 1.1.0
+- updated: Jetty 7.4.3
+
+<hr/>
+
+**0.5.1** &nbsp; *released 2011-06-28*
+
+- clarified SSL certificate generation and configuration for both server-side and client-side
+- added some more troubleshooting information to documentation
+- replaced JavaService with Apache Commons Daemon
+
+<hr/>
+
+**0.5.0** &nbsp; *released 2011-06-26*
+
+- initial release
+
+[jgit]: http://eclipse.org/jgit "Eclipse JGit Site"
diff --git a/src/site/resources/architecture.png b/src/site/resources/architecture.png
new file mode 100644
index 00000000..c6bae52c
--- /dev/null
+++ b/src/site/resources/architecture.png
Binary files differ
diff --git a/src/site/resources/fed_aggregation.png b/src/site/resources/fed_aggregation.png
new file mode 100644
index 00000000..556d1e47
--- /dev/null
+++ b/src/site/resources/fed_aggregation.png
Binary files differ
diff --git a/src/site/resources/fed_mirror.png b/src/site/resources/fed_mirror.png
new file mode 100644
index 00000000..3ad238e6
--- /dev/null
+++ b/src/site/resources/fed_mirror.png
Binary files differ
diff --git a/src/site/resources/ldapSample.png b/src/site/resources/ldapSample.png
new file mode 100644
index 00000000..fd8c999a
--- /dev/null
+++ b/src/site/resources/ldapSample.png
Binary files differ
diff --git a/src/site/resources/permissions_matrix.png b/src/site/resources/permissions_matrix.png
new file mode 100644
index 00000000..d463ae11
--- /dev/null
+++ b/src/site/resources/permissions_matrix.png
Binary files differ
diff --git a/src/site/resources/screenshots.js b/src/site/resources/screenshots.js
new file mode 100644
index 00000000..c007e6e1
--- /dev/null
+++ b/src/site/resources/screenshots.js
@@ -0,0 +1,10 @@
+$(document).ready(function() {
+ $("a[rel=screenshots_group]").fancybox({
+ 'transitionIn' : 'none',
+ 'transitionOut' : 'none',
+ 'titlePosition' : 'over',
+ 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
+ return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
+ }
+ });
+}); \ No newline at end of file
diff --git a/src/site/resources/stjude_150x150.gif b/src/site/resources/stjude_150x150.gif
new file mode 100644
index 00000000..378ab727
--- /dev/null
+++ b/src/site/resources/stjude_150x150.gif
Binary files differ
diff --git a/src/site/roadmap.mkd b/src/site/roadmap.mkd
new file mode 100644
index 00000000..4ac9b478
--- /dev/null
+++ b/src/site/roadmap.mkd
@@ -0,0 +1,31 @@
+## Roadmap
+
+This is not exactly a formal roadmap but it is a priority list of what might be implemented in future releases.
+This list is volatile.
+
+### TODO (high priority)
+
+* Eclipse: create plugin to enumerate repositories and delegate cloning to EGit
+* Manager: support federation RPCs
+* Manager: redesign ref indicators in log, search, and activity views to support multiple local branches, remote branches, and tags
+* Gitblit: Serve repositories on root URL rather than /git (investigate JGit 1.2 GitFilter)
+
+### TODO (medium priority)
+
+* Gitblit: editable settings page in GO/WAR
+* Gitblit: Clone Repository feature (issue 5)
+ * optional scheduled pulls
+ * optional automatic push to origin/remotes?
+ * optional manual push to origin/remotes?
+* Gitblit: Repository regex substitutions should be stored in .git/.config, not gitblit.properties
+
+### IDEAS
+
+* Gitblit: Pull requests
+* Gitblit: Watch/Star like github with personalized activity feed
+* Gitblit: Push database or orphan branch
+* Gitblit: Re-use the EGit branch visualization table cell renderer as some sort of servlet
+* Gitblit: diff should highlight inserted/removed fragment compared to original line
+* Gitblit: respect Gerrit branch permissions
+* Gitblit: Consider creating more Git model objects and exposing them via the JSON RPC interface to allow inspection/retrieval of Git commits, Git trees, etc from Gitblit.
+* Gitblit: Blame coloring by author (issue 2)
diff --git a/src/site/rpc.mkd b/src/site/rpc.mkd
new file mode 100644
index 00000000..35528bfc
--- /dev/null
+++ b/src/site/rpc.mkd
@@ -0,0 +1,295 @@
+## Remote Management, Administration and Integration
+
+*SINCE 0.7.0*
+
+Gitblit optionally allows a remote client to administer the Gitblit server. This client could be a Java-based tool or perhaps a tool written in another language.
+
+ web.enableRpcServlet=true
+ web.enableRpcManagement=false
+ web.enableRpcAdministration=false
+
+**https** is strongly recommended because passwords are insecurely transmitted form your browser/rpc client using Basic authentication!
+
+The Gitblit JSON RPC mechanism, like the Gitblit JGit servlet, syndication/feed servlet, etc, supports request-based authentication. Making an *admin* request will trigger Gitblit's basic authentication mechanism. Listing of repositories, generally, will not trigger this authentication mechanism unless *web.authenticateViewPages=true*. That means its possible to allow anonymous enumeration of repositories that are not *view restricted* or *clone restricted*. Of course, if credentials are provided then all private repositories that are available to the user account will be enumerated in the JSON response.
+
+### Gitblit Manager
+
+[Gitblit Manager](http://code.google.com/p/gitblit/downloads/detail?name=%MANAGER%) is an example Java/Swing application that allows remote management (repository and user objects) and administration (server settings) of a Gitblit server.
+
+This application uses a combination of RSS feeds and the JSON RPC interface, both of which are part of the [Gitblit API](http://code.google.com/p/gitblit/downloads/detail?name=%API%) library, to present live information from a Gitblit server. Some JSON RPC methods from the utility class `com.gitblit.utils.RpcUtils` are not currently used by the Gitblit Manager.
+
+**NOTE:**
+Gitblit Manager stores your login credentials **INSECURELY** in homedir/.gitblit/config.
+
+### Eclipse/EGit "Import from Gitblit" Feature (Planning)
+
+One obvious goal of a Gitblit RPC mechanism would be to have an Eclipse/EGit Feature that allows authentication and enumeration of Gitblit repositories from the Eclipse *Import...* menu. Batch cloning would be supported and delegated to EGit.
+
+This particular project should not be difficult as the only external dependency for `com.gitblit.utils.RpcUtils` is [google-gson](http://google-gson.googlecode.com) which is already a dependency of the EGit/GitHub Mylyn feature.
+
+One proposal from the EGit team is to define a common JSON RPC method for enumeration of repositories which can be implemented by Git hosts. The EGit team would then implement the UI and the client-side enumeration code. This idea was raised as part of this [feature request for EGit](https://bugs.eclipse.org/bugs/show_bug.cgi?id=361251).
+
+Currently this project is in the planning stage.
+
+## RSS Query Interface
+
+At present, Gitblit does not yet support retrieving Git objects (commits, etc) via the JSON RPC mechanism. However, the repository/branch RSS feeds can be used to extract log/history information from a repository branch.
+
+The Gitblit API includes methods for retrieving and interpreting RSS feeds. The Gitblit Manager uses these methods to allow branch activity monitoring and repository searching.
+
+<table class="table">
+<tr><th>url parameter</th><th>default</th><th>description</th></tr>
+<tr><td colspan='3'><b>standard query</b></td></tr>
+<tr><td><em>repository</em></td><td><em>required</em></td><td>repository name is part of the url (see examples below)</td></tr>
+<tr><td>h=</td><td><em>optional</em><br/>default: HEAD</td><td>starting branch, ref, or commit id</td></tr>
+<tr><td>l=</td><td><em>optional</em><br/>default: web.syndicationEntries</td><td>maximum return count</td></tr>
+<tr><td>pg=</td><td><em>optional</em><br/>default: 0</td><td>page number for paging<br/>(offset into history = pagenumber*maximum return count)</td></tr>
+<tr><td colspan='3'><b>search query</b></td></tr>
+<tr><td>s=</td><td><em>required</em></td><td>search string</td></tr>
+<tr><td>st=</td><td><em>optional</em><br/>default: COMMIT</td><td>search type</td></tr>
+</table>
+
+### Example RSS Queries
+
+ https://localhost:8443/feed/gitblit.git?l=50&h=refs/heads/master
+ https://localhost:8443/feed/gitblit.git?l=50&h=refs/heads/master&s=documentation
+ https://localhost:8443/feed/gitblit.git?l=50&h=refs/heads/master&s=james&st=author&pg=2
+
+## JSON Remote Procedure Call (RPC) Interface
+
+### RPC Protocol Versions
+<table class="table">
+<tbody>
+<tr><th>Release</th><th>Protocol Version</th></tr>
+<tr><td>Gitblit v0.7.0</td><td>1 (inferred version)</td></tr>
+<tr><td>Gitblit v0.8.0</td><td>2</td></tr>
+<tr><td>Gitblit v0.9.0 - v1.0.0</td><td>3</td></tr>
+<tr><td>Gitblit v1.1.0</td><td>4</td></tr>
+<tr><td>Gitblit v1.2.0+</td><td>5</td></tr>
+</tbody>
+</table>
+
+#### Protocol Version 5
+
+- *SET_REPOSITORY_MEMBERS* will reject all calls because this would elevate all discrete permissions to RW+
+Use *SET_REPOSITORY_MEMBER_PERMISSIONS* instead.
+- *SET_REPOSITORY_TEAMS* will reject all calls because this would elevate all discrete permissions to RW+
+Use *SET_REPOSITORY_TEAM_PERMISSIONS* instead.
+
+### RPC Request and Response Types
+<table class="table">
+<tr><th colspan='2'>url parameters</th><th rowspan='2'>required<br/>user<br/>permission</th><th rowspan='2'>protocol<br/>version</th><th colspan='2'>json</th></tr>
+<tr><th>req=</th><th>name=</th><th>post body</th><th>response body</th></tr>
+<tr><td colspan='6'><em>web.enableRpcServlet=true</em></td></tr>
+<tr><td>GET_PROTOCOL</td><td>-</td><td>-</td><td>2</td><td>-</td><td>Integer</td></tr>
+<tr><td>LIST_REPOSITORIES</td><td>-</td><td>-</td><td>1</td><td>-</td><td>Map&lt;String, RepositoryModel&gt;</td></tr>
+<tr><td>LIST_BRANCHES</td><td>-</td><td>-</td><td>1</td><td>-</td><td>Map&lt;String, List&lt;String&gt;&gt;</td></tr>
+<tr><td>LIST_SETTINGS</td><td>-</td><td><em>-</em></td><td>1</td><td>-</td><td>ServerSettings (basic keys)</td></tr>
+<tr><td colspan='6'><em>web.enableRpcManagement=true</em></td></tr>
+<tr><td>CREATE_REPOSITORY</td><td>repository name</td><td><em>admin</em></td><td>1</td><td>RepositoryModel</td><td>-</td></tr>
+<tr><td>EDIT_REPOSITORY</td><td>repository name</td><td><em>admin</em></td><td>1</td><td>RepositoryModel</td><td>-</td></tr>
+<tr><td>DELETE_REPOSITORY</td><td>repository name</td><td><em>admin</em></td><td>1</td><td>-</td><td>-</td></tr>
+<tr><td>LIST_USERS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>List&lt;UserModel&gt;</td></tr>
+<tr><td>CREATE_USER</td><td>user name</td><td><em>admin</em></td><td>1</td><td>UserModel</td><td>-</td></tr>
+<tr><td>EDIT_USER</td><td>user name</td><td><em>admin</em></td><td>1</td><td>UserModel</td><td>-</td></tr>
+<tr><td>DELETE_USER</td><td>user name</td><td><em>admin</em></td><td>1</td><td>-</td><td>-</td></tr>
+<tr><td>LIST_TEAMS</td><td>-</td><td><em>admin</em></td><td>2</td><td>-</td><td>List&lt;TeamModel&gt;</td></tr>
+<tr><td>CREATE_TEAM</td><td>team name</td><td><em>admin</em></td><td>2</td><td>TeamModel</td><td>-</td></tr>
+<tr><td>EDIT_TEAM</td><td>team name</td><td><em>admin</em></td><td>2</td><td>TeamModel</td><td>-</td></tr>
+<tr><td>DELETE_TEAM</td><td>team name</td><td><em>admin</em></td><td>2</td><td>-</td><td>-</td></tr>
+<tr><td>LIST_REPOSITORY_MEMBERS</td><td>repository name</td><td><em>admin</em></td><td>1</td><td>-</td><td>List&lt;String&gt;</td></tr>
+<tr><td><s>SET_REPOSITORY_MEMBERS</s></td><td><s>repository name</s></td><td><em><s>admin</s></em></td><td><s>1</s></td><td><s>List&lt;String&gt;</s></td><td>-</td></tr>
+<tr><td>LIST_REPOSITORY_MEMBER_PERMISSIONS</td><td>repository name</td><td><em>admin</em></td><td>5</td><td>-</td><td>List&lt;String&gt;</td></tr>
+<tr><td>SET_REPOSITORY_MEMBER_PERMISSIONS</td><td>repository name</td><td><em>admin</em></td><td>5</td><td>List&lt;String&gt;</td><td>-</td></tr>
+<tr><td>LIST_REPOSITORY_TEAMS</td><td>repository name</td><td><em>admin</em></td><td>2</td><td>-</td><td>List&lt;String&gt;</td></tr>
+<tr><td><s>SET_REPOSITORY_TEAMS</s></td><td><s>repository name</s></td><td><em><s>admin</s></em></td><td><s>2</s></td><td><s>List&lt;String&gt;</s></td><td>-</td></tr>
+<tr><td>LIST_REPOSITORY_TEAM_PERMISSIONS</td><td>repository name</td><td><em>admin</em></td><td>5</td><td>-</td><td>List&lt;String&gt;</td></tr>
+<tr><td>SET_REPOSITORY_TEAM_PERMISSIONS</td><td>repository name</td><td><em>admin</em></td><td>5</td><td>List&lt;String&gt;</td><td>-</td></tr>
+<tr><td>LIST_SETTINGS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>ServerSettings (management keys)</td></tr>
+<tr><td>CLEAR_REPOSITORY_CACHE</td><td>-</td><td><em>-</em></td><td>4</td><td>-</td><td>-</td></tr>
+<tr><td colspan='6'><em>web.enableRpcAdministration=true</em></td></tr>
+<tr><td>LIST_FEDERATION_REGISTRATIONS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>List&lt;FederationModel&gt;</td></tr>
+<tr><td>LIST_FEDERATION_RESULTS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>List&lt;FederationModel&gt;</td></tr>
+<tr><td>LIST_FEDERATION_PROPOSALS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>List&lt;FederationProposal&gt;</td></tr>
+<tr><td>LIST_FEDERATION_SETS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>List&lt;FederationSet&gt;</td></tr>
+<tr><td>LIST_SETTINGS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>ServerSettings (all keys)</td></tr>
+<tr><td>EDIT_SETTINGS</td><td>-</td><td><em>admin</em></td><td>1</td><td>Map&lt;String, String&gt;</td><td>-</td></tr>
+<tr><td>LIST_STATUS</td><td>-</td><td><em>admin</em></td><td>1</td><td>-</td><td>ServerStatus (see example below)</td></tr>
+</table>
+
+### RPC/HTTP Response Codes
+<table class="table">
+<tr><th>code</th><th>name</th><th>description</th></tr>
+<tr><td>200</td><td>success</td><td>Gitblit processed the request successfully</td></tr>
+<tr><td>401</td><td>unauthorized</td><td>Gitblit requires user credentials to process the request</td></tr>
+<tr><td>403</td><td>forbidden</td><td>Gitblit can not process the request for the supplied credentials</td></tr>
+<tr><td>405</td><td>method not allowed</td><td>Gitblit has disallowed the processing the specified request</td></tr>
+<tr><td>500</td><td>server error</td><td>Gitblit failed to process the request likely because the input object created a conflict</td></tr>
+<tr><td>501</td><td>unknown request</td><td>Gitblit does not recognize the RPC request type</td></tr>
+</table>
+
+### Example: LIST_REPOSITORIES
+
+**url**: https://localhost/rpc?req=LIST_REPOSITORIES
+**response body**: Map&lt;String, RepositoryModel&gt; where the map key is the clone url of the repository
+<pre>
+{
+ "https://localhost/git/libraries/xmlapache.git": {
+ "name": "libraries/xmlapache.git",
+ "description": "apache xmlrpc client and server",
+ "owner": "admin",
+ "lastChange": "2010-01-28T22:12:06Z",
+ "hasCommits": true,
+ "showRemoteBranches": false,
+ "useTickets": false,
+ "useDocs": false,
+ "accessRestriction": "VIEW",
+ "isFrozen": false,
+ "showReadme": false,
+ "federationStrategy": "FEDERATE_THIS",
+ "federationSets": [
+ "libraries"
+ ],
+ "isFederated": false,
+ "skipSizeCalculation": false,
+ "skipSummaryMetrics": false,
+ "size": "102 KB"
+ },
+ "https://localhost/git/libraries/smack.git": {
+ "name": "libraries/smack.git",
+ "description": "smack xmpp client",
+ "owner": "admin",
+ "lastChange": "2009-01-28T18:38:14Z",
+ "hasCommits": true,
+ "showRemoteBranches": false,
+ "useTickets": false,
+ "useDocs": false,
+ "accessRestriction": "VIEW",
+ "isFrozen": false,
+ "showReadme": false,
+ "federationStrategy": "FEDERATE_THIS",
+ "federationSets": [],
+ "isFederated": false,
+ "skipSizeCalculation": false,
+ "skipSummaryMetrics": false,
+ "size": "4.8 MB"
+ }
+}
+</pre>
+
+### Example: EDIT_REPOSITORY (rename)
+
+The original repository name is specified in the *name* url parameter. The new name is set within the JSON object.
+
+**url**: https://localhost/rpc?req=EDIT_REPOSITORY&name=libraries/xmlapache.git
+**post body**: RepositoryModel
+<pre>
+{
+ "name": "libraries/xmlapache-renamed.git",
+ "description": "apache xmlrpc client and server",
+ "owner": "admin",
+ "lastChange": "2010-01-28T22:12:06Z",
+ "hasCommits": true,
+ "showRemoteBranches": false,
+ "useTickets": false,
+ "useDocs": false,
+ "accessRestriction": "VIEW",
+ "isFrozen": false,
+ "showReadme": false,
+ "federationStrategy": "FEDERATE_THIS",
+ "federationSets": [
+ "libraries"
+ ],
+ "isFederated": false,
+ "skipSizeCalculation": false,
+ "skipSummaryMetrics": false,
+ "size": "102 KB"
+}
+</pre>
+
+### Example: LIST_USERS
+**url**: https://localhost/rpc?req=LIST_USERS
+**response body**: List&lt;UserModel&gt;
+<pre>
+[
+ {
+ "username": "admin",
+ "password": "admin",
+ "canAdmin": true,
+ "excludeFromFederation": true,
+ "repositories": []
+ },
+ {
+ "username": "test",
+ "password": "test",
+ "canAdmin": false,
+ "excludeFromFederation": false,
+ "repositories": [
+ "libraries/xmlapache.git",
+ "libraries/smack.git"
+ ]
+ }
+]
+</pre>
+
+### Example: LIST_SETTINGS
+**url**: https://localhost/rpc?req=LIST_SETTINGS
+**response body**: ServerSettings
+<pre>
+{
+ "settings": {
+ "web.siteName": {
+ "name": "web.siteName",
+ "currentValue": "",
+ "defaultValue": "",
+ "description": "Gitblit Web Settings\nIf blank Gitblit is displayed.",
+ "since": "0.5.0",
+ "caseSensitive": false,
+ "restartRequired": false,
+ "spaceDelimited": false
+ },
+ "web.summaryCommitCount": {
+ "name": "web.summaryCommitCount",
+ "currentValue": "16",
+ "defaultValue": "16",
+ "description": "The number of commits to display on the summary page\nValue must exceed 0 else default of 16 is used",
+ "since": "0.5.0",
+ "caseSensitive": false,
+ "restartRequired": false,
+ "spaceDelimited": false
+ }
+ }
+}
+</pre>
+
+### Example: LIST_STATUS
+**url**: https://localhost/rpc?req=LIST_STATUS
+**response body**: ServerStatus
+<pre>
+{
+ "bootDate": "2011-10-22T12:13:00Z",
+ "version": "0.7.0-SNAPSHOT",
+ "releaseDate": "PENDING",
+ "isGO": true,
+ "systemProperties": {
+ "file.encoding": "Cp1252",
+ "java.home": "C:\\Program Files\\Java\\jdk1.6.0_26\\jre",
+ "java.io.tmpdir": "C:\\Users\\JAMESM~1\\AppData\\Local\\Temp\\",
+ "java.runtime.name": "Java(TM) SE Runtime Environment",
+ "java.runtime.version": "1.6.0_26-b03",
+ "java.vendor": "Sun Microsystems Inc.",
+ "java.version": "1.6.0_26",
+ "java.vm.info": "mixed mode",
+ "java.vm.name": "Java HotSpot(TM) 64-Bit Server VM",
+ "java.vm.vendor": "Sun Microsystems Inc.",
+ "java.vm.version": "20.1-b02",
+ "os.arch": "amd64",
+ "os.name": "Windows 7",
+ "os.version": "6.1"
+ },
+ "heapAllocated": 128057344,
+ "heapFree": 120399168,
+ "heapSize": 1899560960,
+ "servletContainer": "jetty/7.4.3.v20110701"
+}
+</pre> \ No newline at end of file
diff --git a/src/site/screenshots.mkd b/src/site/screenshots.mkd
new file mode 100644
index 00000000..b18408af
--- /dev/null
+++ b/src/site/screenshots.mkd
@@ -0,0 +1,143 @@
+## Screenshots
+
+### Gitblit GO/WAR
+
+<ul class="thumbnails">
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/00.png" title="Repository List"><img alt="Repositories" src="thumbs/00.png" /></a>
+ <h5>Repository List</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/00b.png" title="Repository List (Admin)"><img alt="Repositories (Admin)" src="thumbs/00b.png" /></a>
+ <h5>Repository List (Admin)</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/00c.png" title="Activity"><img alt="Activity" src="thumbs/00c.png" /></a>
+ <h5>Activity</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/00d.png" title="Lucene Search"><img alt="Lucene Search" src="thumbs/00d.png" /></a>
+ <h5>Lucene Search</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/01c.png" title="Users &amp; Teams"><img alt="Users &amp; Teams" src="thumbs/01c.png" /></a>
+ <h5>Users &amp; Teams</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/01.png" title="New User"><img alt="New User" src="thumbs/01.png" /></a>
+ <h5>New User</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/01b.png" title="New Team"><img alt="New Team" src="thumbs/01b.png" /></a>
+ <h5>New Team</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/02.png" title="Edit Repository"><img alt="Edit Repository" src="thumbs/02.png" /></a>
+ <h5>Edit Repository</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/03.png" title="Repository Summary"><img alt="Summary" src="thumbs/03.png" /></a>
+ <h5>Repository Summary</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/04.png" title="Repository Log"><img alt="Log" src="thumbs/04.png" /></a>
+ <h5>Repository Log</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/05.png" title="Repository Tree"><img alt="Tree" src="thumbs/05.png" /></a>
+ <h5>Repository Tree</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/06.png" title="Commit Page"><img alt="Commit Page" src="thumbs/06.png" /></a>
+ <h5>Commit Page</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/07.png" title="Commit Diff"><img alt="Commit Diff" src="thumbs/07.png" /></a>
+ <h5>Commit Diff</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/09.png" title="Branch Metrics"><img alt="Metrics" src="thumbs/09.png" /></a>
+ <h5>Branch Metrics</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/08.png" title="Blob View with Syntax Highlighting"><img alt="Blob" src="thumbs/08.png" /></a>
+ <h5>Blob View with Syntax Highlighting</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/11.png" title="Blame"><img alt="Blame" src="thumbs/11.png" /></a>
+ <h5>Blame</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/12.png" title="Federation Panels"><img alt="Federation Panels" src="thumbs/12.png" /></a>
+ <h5>Federation Panels</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/13.png" title="Detailed Status of a Registration"><img alt="Registration Status" src="thumbs/13.png" /></a>
+ <h5>Detailed Status of a Registration</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/14.png" title="Send Proposal"><img alt="Propose" src="thumbs/14.png" /></a>
+ <h5>Send Proposal</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/15.png" title="Empty Repository"><img alt="Empty Repository" src="thumbs/15.png" /></a>
+ <h5>Empty Repository</h5>
+</li>
+</ul>
+
+### Gitblit Manager
+
+<ul class="thumbnails">
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/m00.png" title="Repositories Panel"><img alt="Repositories Panel" src="thumbs/m00.png" /></a>
+ <h5>Repositories Panel</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/m01.png" title="Search Dialog"><img alt="Search Dialog" src="thumbs/m01.png" /></a>
+ <h5>Search Dialog</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/m02.png" title="Activity Panel"><img alt="Activity Panel" src="thumbs/m02.png" /></a>
+ <h5>Activity Panel</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/m03.png" title="Subscriptions Dialog"><img alt="Subscriptions Dialog" src="thumbs/m03.png" /></a>
+ <h5>Subscriptions Dialog</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/m04.png" title="Users Panel"><img alt="Users Panels" src="thumbs/m04.png" /></a>
+ <h5>Users Panel</h5>
+</li>
+<li class="span3">
+ <a rel="screenshots_group" href="screenshots/m05.png" title="Settings Panel"><img alt="Settings Panel" src="thumbs/m05.png" /></a>
+ <h5>Settings Panel</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/m06.png" title="Status Panel"><img alt="Status Panel" src="thumbs/m06.png" /></a>
+ <h5>Status Panel</h5>
+</li>
+</ul>
+
+<ul class="thumbnails">
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/m07.png" title="Edit Repository Settings"><img alt="Repository Settings" src="thumbs/m07.png" /></a>
+ <h5>Edit Repository Settings</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/m08.png" title="Edit Repository Access Restrictions"><img alt="Access Restrictions" src="thumbs/m08.png" /></a>
+ <h5>Edit Repository Access Restriction</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/m09.png" title="Edit Repository Federation Settings"><img alt="Federation Settings" src="thumbs/m09.png" /></a>
+ <h5>Edit Repository Federation Settings</h5>
+</li>
+<li class="span3">
+ <a class="thumbnail" rel="screenshots_group" href="screenshots/m10.png" title="Edit User Dialog"><img alt="Edit User Dialog" src="thumbs/m10.png" /></a>
+ <h5>Edit User Dialog</h5>
+</li>
+</ul>
+
+<script type="text/javascript" src="./fancybox/jquery.mousewheel-3.0.4.pack.js"> </script>
+<script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"> </script>
+<link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.4.css" media="screen" />
+<script type="text/javascript" src="./screenshots.js"> </script>
diff --git a/src/site/screenshots/00.png b/src/site/screenshots/00.png
new file mode 100644
index 00000000..b022dd33
--- /dev/null
+++ b/src/site/screenshots/00.png
Binary files differ
diff --git a/src/site/screenshots/00b.png b/src/site/screenshots/00b.png
new file mode 100644
index 00000000..2ad60096
--- /dev/null
+++ b/src/site/screenshots/00b.png
Binary files differ
diff --git a/src/site/screenshots/00c.png b/src/site/screenshots/00c.png
new file mode 100644
index 00000000..06f4cb8f
--- /dev/null
+++ b/src/site/screenshots/00c.png
Binary files differ
diff --git a/src/site/screenshots/00d.png b/src/site/screenshots/00d.png
new file mode 100644
index 00000000..29c3a07c
--- /dev/null
+++ b/src/site/screenshots/00d.png
Binary files differ
diff --git a/src/site/screenshots/01.png b/src/site/screenshots/01.png
new file mode 100644
index 00000000..31fe8372
--- /dev/null
+++ b/src/site/screenshots/01.png
Binary files differ
diff --git a/src/site/screenshots/01b.png b/src/site/screenshots/01b.png
new file mode 100644
index 00000000..ca601648
--- /dev/null
+++ b/src/site/screenshots/01b.png
Binary files differ
diff --git a/src/site/screenshots/01c.png b/src/site/screenshots/01c.png
new file mode 100644
index 00000000..b483d5c1
--- /dev/null
+++ b/src/site/screenshots/01c.png
Binary files differ
diff --git a/src/site/screenshots/02.png b/src/site/screenshots/02.png
new file mode 100644
index 00000000..930be2d0
--- /dev/null
+++ b/src/site/screenshots/02.png
Binary files differ
diff --git a/src/site/screenshots/03.png b/src/site/screenshots/03.png
new file mode 100644
index 00000000..fe18ed06
--- /dev/null
+++ b/src/site/screenshots/03.png
Binary files differ
diff --git a/src/site/screenshots/04.png b/src/site/screenshots/04.png
new file mode 100644
index 00000000..06450bb3
--- /dev/null
+++ b/src/site/screenshots/04.png
Binary files differ
diff --git a/src/site/screenshots/05.png b/src/site/screenshots/05.png
new file mode 100644
index 00000000..8a83cbe2
--- /dev/null
+++ b/src/site/screenshots/05.png
Binary files differ
diff --git a/src/site/screenshots/06.png b/src/site/screenshots/06.png
new file mode 100644
index 00000000..7e4b3d03
--- /dev/null
+++ b/src/site/screenshots/06.png
Binary files differ
diff --git a/src/site/screenshots/07.png b/src/site/screenshots/07.png
new file mode 100644
index 00000000..77624ea6
--- /dev/null
+++ b/src/site/screenshots/07.png
Binary files differ
diff --git a/src/site/screenshots/08.png b/src/site/screenshots/08.png
new file mode 100644
index 00000000..b1d561b3
--- /dev/null
+++ b/src/site/screenshots/08.png
Binary files differ
diff --git a/src/site/screenshots/09.png b/src/site/screenshots/09.png
new file mode 100644
index 00000000..3f6402bb
--- /dev/null
+++ b/src/site/screenshots/09.png
Binary files differ
diff --git a/src/site/screenshots/10.png b/src/site/screenshots/10.png
new file mode 100644
index 00000000..e57bd01d
--- /dev/null
+++ b/src/site/screenshots/10.png
Binary files differ
diff --git a/src/site/screenshots/11.png b/src/site/screenshots/11.png
new file mode 100644
index 00000000..3da4531a
--- /dev/null
+++ b/src/site/screenshots/11.png
Binary files differ
diff --git a/src/site/screenshots/12.png b/src/site/screenshots/12.png
new file mode 100644
index 00000000..5ccba882
--- /dev/null
+++ b/src/site/screenshots/12.png
Binary files differ
diff --git a/src/site/screenshots/13.png b/src/site/screenshots/13.png
new file mode 100644
index 00000000..53c3f0ad
--- /dev/null
+++ b/src/site/screenshots/13.png
Binary files differ
diff --git a/src/site/screenshots/14.png b/src/site/screenshots/14.png
new file mode 100644
index 00000000..d8b6de8f
--- /dev/null
+++ b/src/site/screenshots/14.png
Binary files differ
diff --git a/src/site/screenshots/15.png b/src/site/screenshots/15.png
new file mode 100644
index 00000000..583d8750
--- /dev/null
+++ b/src/site/screenshots/15.png
Binary files differ
diff --git a/src/site/screenshots/image_processing.txt b/src/site/screenshots/image_processing.txt
new file mode 100644
index 00000000..d034062c
--- /dev/null
+++ b/src/site/screenshots/image_processing.txt
@@ -0,0 +1,6 @@
+1. Install Firefox
+2. Install "Awesome Screenshot" add-on
+3. Set browser size to 1024x768
+4. Save "visible part" screenshots as png to screenshots folder
+
+Screenshot thumbnails are automatically generated during build script execution. \ No newline at end of file
diff --git a/src/site/screenshots/m00.png b/src/site/screenshots/m00.png
new file mode 100644
index 00000000..73e64062
--- /dev/null
+++ b/src/site/screenshots/m00.png
Binary files differ
diff --git a/src/site/screenshots/m01.png b/src/site/screenshots/m01.png
new file mode 100644
index 00000000..ed1a2e45
--- /dev/null
+++ b/src/site/screenshots/m01.png
Binary files differ
diff --git a/src/site/screenshots/m02.png b/src/site/screenshots/m02.png
new file mode 100644
index 00000000..53716fca
--- /dev/null
+++ b/src/site/screenshots/m02.png
Binary files differ
diff --git a/src/site/screenshots/m03.png b/src/site/screenshots/m03.png
new file mode 100644
index 00000000..a7e2a49d
--- /dev/null
+++ b/src/site/screenshots/m03.png
Binary files differ
diff --git a/src/site/screenshots/m04.png b/src/site/screenshots/m04.png
new file mode 100644
index 00000000..85b4a1dd
--- /dev/null
+++ b/src/site/screenshots/m04.png
Binary files differ
diff --git a/src/site/screenshots/m05.png b/src/site/screenshots/m05.png
new file mode 100644
index 00000000..e9cc8246
--- /dev/null
+++ b/src/site/screenshots/m05.png
Binary files differ
diff --git a/src/site/screenshots/m06.png b/src/site/screenshots/m06.png
new file mode 100644
index 00000000..b616efa2
--- /dev/null
+++ b/src/site/screenshots/m06.png
Binary files differ
diff --git a/src/site/screenshots/m07.png b/src/site/screenshots/m07.png
new file mode 100644
index 00000000..397439c1
--- /dev/null
+++ b/src/site/screenshots/m07.png
Binary files differ
diff --git a/src/site/screenshots/m08.png b/src/site/screenshots/m08.png
new file mode 100644
index 00000000..808a1140
--- /dev/null
+++ b/src/site/screenshots/m08.png
Binary files differ
diff --git a/src/site/screenshots/m09.png b/src/site/screenshots/m09.png
new file mode 100644
index 00000000..84fa9602
--- /dev/null
+++ b/src/site/screenshots/m09.png
Binary files differ
diff --git a/src/site/screenshots/m10.png b/src/site/screenshots/m10.png
new file mode 100644
index 00000000..6529ef49
--- /dev/null
+++ b/src/site/screenshots/m10.png
Binary files differ
diff --git a/src/site/setup.mkd b/src/site/setup.mkd
new file mode 100644
index 00000000..34078930
--- /dev/null
+++ b/src/site/setup.mkd
@@ -0,0 +1,767 @@
+## Gitblit WAR Installation & Setup
+
+1. Download [Gitblit WAR ${project.releaseVersion}](%GCURL%gitblit-${project.releaseVersion}.war) to the webapps folder of your servlet container.
+2. You may have to manually extract the WAR (zip file) to a folder within your webapps folder.
+3. By default, the Gitblit webapp is configured through `WEB-INF/data/gitblit.properties`.<br/>
+Open `WEB-INF/data/gitblit.properties` in your favorite text editor and make sure to review and set:
+ - &lt;context-parameter&gt; *git.packedGitLimit* (set larger than the size of your largest repository)
+ - &lt;context-parameter&gt; *git.streamFileThreshold* (set larger than the size of your largest committed file)
+4. You may have to restart your servlet container.
+5. Open your browser to <http://localhost/gitblit> or whatever the url should be.
+6. Enter the default administrator credentials: **admin / admin** and click the *Login* button
+ **NOTE:** Make sure to change the administrator username and/or password!!
+
+### WAR Data Location
+By default, Gitblit WAR stores all data (users, settings, repositories, etc) in `${contextFolder}/WEB-INF/data`. This is fine for a quick setup, but there are many reasons why you don't want to keep your data within the webapps folder of your servlet container. You may specify an external location for your data by editing `WEB-INF/web.xml` and manipulating the *baseFolder* context parameter. Choose a location that is writeable by your servlet container. Your servlet container may be smart enough to recognize the change and to restart Gitblit.
+
+On the next restart of Gitblit, Gitblit will copy the contents of the `WEB-INF/data` folder to your specified *baseFolder* **IF** the file `${baseFolder}/gitblit.properties` does not already exist. This allows you to get going with minimal fuss.
+
+Specifying an alternate *baseFolder* also allows for simpler upgrades in the future.
+
+## Gitblit GO Installation & Setup
+
+1. Download and unzip [Gitblit GO ${project.releaseVersion}](%GCURL%gitblit-${project.releaseVersion}.zip).
+*Its best to eliminate spaces in the path name.*
+2. The server itself is configured through a simple text file.<br/>
+Open `data/gitblit.properties` in your favorite text editor and make sure to review and set:
+ - *server.httpPort* and *server.httpsPort*
+ - *server.httpBindInterface* and *server.httpsBindInterface*
+ - *server.storePassword*
+ **https** is strongly recommended because passwords are insecurely transmitted form your browser/git client using Basic authentication!
+ - *git.packedGitLimit* (set larger than the size of your largest repository)
+ - *git.streamFileThreshold* (set larger than the size of your largest committed file)
+3. Execute `authority.cmd` or `java -cp gitblit.jar com.gitblit.authority.Launcher --baseFolder data` from a command-line
+ 1. fill out the fields in the *new certificate defaults* dialog
+ 2. enter the store password used in *server.storePassword* when prompted. This generates an SSL certificate for **localhost**.
+ 3. you may want to generate an SSL certificate for the hostname or ip address hostnames you are serving from<br/>**NOTE:** You can only have **one** SSL certificate specified for a port.
+ 5. exit the authority app
+4. Execute `gitblit.cmd` or `java -jar gitblit.jar --baseFolder data` from a command-line
+5. Open your browser to <http://localhost:8080> or <https://localhost:8443> depending on your chosen configuration.
+6. Enter the default administrator credentials: **admin / admin** and click the *Login* button
+ **NOTE:** Make sure to change the administrator username and/or password!!
+
+### GO Data Location
+
+By default, Gitblit GO stores all data (users, settings, repositories, etc) in the `data` subfolder of your GO installation. You may specify an external location for your data on the command-line by setting the *--baseFolder* argument. If you relocate the data folder then you must supply the *--baseFolder* argument to both GO and the Certificate Authority.
+
+If you are deploying Gitblit to a *nix platform, you might consider moving the data folder out of the GO installation folder and then creating a symlink named "data" that points to your moved folder.
+
+### Creating your own Self-Signed SSL Certificate
+Gitblit GO (and Gitblit Certificate Authority) automatically generates a Certificate Authority (CA) certificate and an ssl certificate signed by this CA certificate that is bound to *localhost*.
+
+Remote Eclipse/EGit/JGit clients (<= 2.2.0) will fail to communicate using this certificate because JGit always verifies the hostname of the certificate, regardless of the *http.sslVerify=false* client-side setting.
+
+The EGit failure message is something like:
+
+ Cannot get remote repository refs.
+ Reason: https:/myserver.com/git/myrepo.git: cannot open git-upload-pack
+
+If you want to serve your repositories to another machine over https then you will want to generate a new certificate for the hostname or ip address you are serving from.
+
+1. `authority.cmd` or `java -jar authority.jar --baseFolder data`
+2. Click the *new ssl certificate* button (red rosette in the toolbar in upper left of window)
+3. Enter the hostname or ip address
+4. Make sure the checkbox *serve https with this certificate* is checked
+5. In the keystore password prompt, enter the *server.storePassword* password
+
+If you decide to change the value of *server.storePassword* (recommended) <u>after</u> you have already started Gitblit or Gitblit Certificate Authority, then you will have to delete the following files and then restart the Gitblit Certificate Authority app:
+
+1. data/serverKeyStore.jks
+2. data/serverTrustStore.jks
+3. data/certs/caKeyStore.jks
+4. data/certs/ca.crt
+5. data/certs/caRevocationList.crl (optional)
+
+### Client SSL Certificates
+SINCE 1.2.0
+
+Gitblit supports X509 certificate authentication. This authentication method relies on your servlet container to validate/verify/trust your client certificate and can be used by your browser and your git client.
+
+All X509 certificates have a *distinguished name (DN)* which is a signature of several fields like:
+
+ C=US,O=Gitblit,OU=Gitblit,CN=james
+
+Gitblit must be able to map the DN of the certificate to an *existing* account username. The default mapping is to extract the *common name (CN)* value from the DN and use that as the account name. If the CN is a valid account, then the user is authenticated. The servlet container which runs Gitblit validates, verifies, and trusts the certificate passed to Gitblit. If you need to specify an alternative DN mapping you may do so with the *git.certificateUsernameOIDs* setting, but this mapping must be matched to the user account name.
+
+How do you make your servlet container trust a client certificate?
+
+In the WAR variant, you will have to manually setup your servlet container to:
+
+1. want/need client certificates
+2. trust a CA certificate used to sign your client certificates
+3. generate client certificates signed by your CA certificate
+
+Alternatively, Gitblit GO is designed to facilitate use of client certificate authentication. Gitblit GO ships with a tool that simplifies creation and management of client certificates, Gitblit Certificate Authority.
+
+#### Creating SSL Certificates with Gitblit Certificate Authority
+
+When you generate a new client certificate, a zip file bundle is created which includes a P12 keystore for browsers and a PEM keystore for Git. Both of these are password-protected. Additionally, a personalized README file is generated with setup instructions for popular browsers and Git. The README is generated from `data\certs\instructions.tmpl` and can be modified to suit your needs.
+
+1. `authority.cmd` or `java -jar authority.jar --baseFolder data`
+2. Select the user for which to generate the certificate
+3. Click the *new certificate* button and enter the expiration date of the certificate. You must also enter a password for the generated keystore. This password is *not* the same as the user's login password. This password is used to protect the privatekey and public certificate you will generate for the selected user. You must also enter a password hint for the user.
+4. If your mail server settings are properly configured you will have a *send email* checkbox which you can use to immediately send the generated certificate bundle to the user.
+
+#### Certificate Inspection and Advanced Troubleshooting
+
+X509 certificates can be confusing and tricky even with the simplified Gitblit Certificate Authority tool. If you find you need more tooling to understand your keystores, certificates, and certificate revocation lists (CRLs), I highly recommend [Portecle](http://portecle.sourceforge.net) which can be conveniently launched as a [Java Web Start app](http://portecle.sourceforge.net/webstart/portecle.jnlp).
+
+### Running as a Windows Service
+Gitblit uses [Apache Commons Daemon](http://commons.apache.org/daemon) to install and configure its Windows service.
+
+1. Review the contents of the `installService.cmd`
+2. Set the *ARCH* value as appropriate for your installed Java Virtual Machine.
+3. Add any necessary *--StartParams* as enumerated below in **Command-Line Parameters**.
+4. Execute the script.
+
+After service installation you can use the `gitblitw.exe` utility to control and modify the runtime settings of the service.<br/>
+Additional service definition options and runtime capabilities of `gitblitw.exe` (prunmgr.exe) are documented [here](http://commons.apache.org/daemon/procrun.html).
+
+**NOTE:**<br/>
+If you change the name of the service from *gitblit* you must also change the name of `gitblitw.exe` to match the new service name otherwise the connection between the service and the utility is lost, at least to double-click execution.
+
+#### VM Considerations
+By default, the service installation script configures your Windows service to use your default JVM. This setup usually defaults to a client VM.<br/>
+If you have installed a JDK, you might consider using the `gitblitw.exe` utility to manually specify the *server* VM.
+
+1. Execute `gitblitw.exe`
+2. On the *Java* tab uncheck *Use default*.
+3. Manually navigate your filesystem and specify the server VM with the `...` button<br/><pre>
+Java Virtual Machine:
+C:\Program Files\Java\jre6\bin\server\jvm.dll</pre>
+
+#### Command-Line Parameters
+Command-Line parameters override the values in `gitblit.properties` at runtime.
+
+ --baseFolder The default base folder for all relative file reference settings
+ --repositoriesFolder Git Repositories Folder
+ --userService Authentication and Authorization Service (filename or fully qualified classname)
+ --useNio Use NIO Connector else use Socket Connector.
+ --httpPort HTTP port for to serve. (port <= 0 will disable this connector)
+ --httpsPort HTTPS port to serve. (port <= 0 will disable this connector)
+ --ajpPort AJP port to serve. (port <= 0 will disable this connector)
+ --alias Alias in keystore of SSL cert to use for https serving
+ --storePassword Password for SSL (https) keystore.
+ --shutdownPort Port for Shutdown Monitor to listen on. (port <= 0 will disable this monitor)
+ --tempFolder Folder for server to extract built-in webapp
+
+**Example**
+
+ java -jar gitblit.jar --userService c:/myrealm.config --storePassword something --baseFolder c:/data
+
+#### Overriding Gitblit GO's Log4j Configuration
+
+You can override Gitblit GO's default Log4j configuration with a command-line parameter to the JVM.
+
+ java -Dlog4j.configuration=file:///home/james/log4j.properties -jar gitblit.jar <optional_gitblit_args>
+
+For reference, here is [Gitblit's default Log4j configuration](https://github.com/gitblit/gitblit/blob/master/src/log4j.properties). It includes some file appenders that are disabled by default.
+
+## Running Gitblit behind Apache
+
+Gitblit runs fine behind Apache. You may use either *mod_proxy* (GO or WAR) or *mod_proxy_ajp* (GO).
+
+Each Linux distribution may vary on the exact configuration of Apache 2.2.
+Here is a sample configuration that works on Debian 7.0 (Wheezy), your distribution may be different.
+
+1. First we need to make sure we have Apache's proxy modules available.
+---FIXED---
+sudo su
+cd /etc/apache2/mods-enabled
+ln -s ../mods-available/proxy.load proxy.load
+ln -s ../mods-available/proxy_balancer.load proxy_balancer.load
+ln -s ../mods-available/proxy_http.load proxy_http.load
+ln -s ../mods-available/proxy_ajp.load proxy_ajp.load
+---FIXED---
+2. Then we need to make sure we are configuring Apache to use the proxy modules and to setup the proxied connection from Apache to Gitblit GO or from Apache to your chosen servlet container. The following snippet is stored as `/etc/apache2/conf.d/gitblit`.
+---FIXED---
+# Turn off support for true Proxy behaviour as we are acting as
+# a transparent proxy
+ProxyRequests Off
+
+# Turn off VIA header as we know where the requests are proxied
+ProxyVia Off
+
+# Turn on Host header preservation so that the servlet container
+# can write links with the correct host and rewriting can be avoided.
+#
+# This is important for all git push/pull/clone operations.
+ProxyPreserveHost On
+
+# Set the permissions for the proxy
+<Proxy>
+ AddDefaultCharset off
+ Order deny,allow
+ Allow from all
+</Proxy>
+
+# The proxy context path must match the Gitblit context path.
+# For Gitblit GO, see server.contextPath in gitblit.properties.
+
+#ProxyPass /gitblit http://localhost:8080/gitblit
+#ProxyPassreverse /gitblit http://localhost:8080/gitblit
+
+# If your httpd frontend is https but you are proxying http Gitblit WAR or GO
+#Header edit Location &#94;http://([&#94;&#8260;]+)/gitblit/ https://&#36;1/gitblit/
+
+# Additionally you will want to tell Gitblit the original scheme and port
+#RequestHeader set X-Forwarded-Proto https
+#RequestHeader set X-Forwarded-Port 443
+
+# If you are using subdomain proxying then you will want to tell Gitblit the appropriate
+# context path for your repository url.
+# If you are not using subdomain proxying, then ignore this setting.
+#RequestHeader set X-Forwarded-Context /
+
+#ProxyPass /gitblit ajp://localhost:8009/gitblit
+---FIXED---
+**Please** make sure to:
+ 1. Review the security of these settings as appropriate for your deployment
+ 2. Uncomment the *ProxyPass* setting for whichever connection you prefer (http/ajp)
+ 3. Correctly set the ports and context paths both in the *ProxyPass* definition and your Gitblit installation
+ If you are using Gitblit GO you can easily configure the AJP connector by specifying a non-zero AJP port.
+ Please remember that on Linux/UNIX, ports < 1024 require root permissions to open.
+ 4. Set *web.mountParameters=false* in `gitblit.properties` or `web.xml` this will use parameterized URLs.
+ Alternatively, you can respecify *web.forwardSlashCharacter*.
+
+## Upgrading Gitblit
+
+Any important changes to the setting keys or default values will always be mentioned in the [release log](releases.html).
+
+Gitblit v0.8.0 introduced a new default user service implementation which serializes and deserializes user objects into `users.conf`. A `users.conf` file will be automatically created from an existing `users.properties` file on the first launch after an upgrade. To use the `users.conf` service, *realm.userService=users.conf* must be set. This revised user service allows for more sophisticated Gitblit user objects and will facilitate the development of more advanced features without adding the complexity of an embedded SQL database.
+
+`users.properties` and its user service implementation are deprecated as of v0.8.0.
+
+### Upgrading Gitblit WAR (1.2.1+)
+1. Make sure your `WEB-INF/web.xml` *baseFolder* context parameter is not `${contextFolder}/WEB-INF/data`!<br/>
+If it is, move your `WEB-INF/data` folder to a location writeable by your servlet container.
+2. Deploy new WAR
+3. Edit the new WAR's `WEB-INF/web.xml` file and set the *baseFolder* context parameter to your external baseFolder.
+4. Review and optionally apply any new settings as indicated in the [release log](releases.html) to `${baseFolder}/gitblit.properties`.
+
+### Upgrading Gitblit GO (1.2.1+)
+
+1. Unzip Gitblit GO to a new folder
+2. Copy your `data` folder from your current Gitblit installation to the new folder and overwrite any conflicts
+3. Review and optionally apply any new settings as indicated in the [release log](releases.html) to `data/gitblit.properties`.
+
+In *nix systems, there are other tricks you can play like symlinking the `data` folder or symlinking the GO folder.
+All platforms support the *--baseFolder* command-line argument.
+
+### Upgrading Gitblit WAR (pre-1.2.1)
+
+1. Create a `data` as outlined in step 1 of *Upgrading Gitblit GO (pre-1.2.1)*
+2. Copy your existing web.xml to your data folder
+3. Deploy new WAR
+4. Copy the new WAR's `WEB-INF/data/gitblit.properties` file to your data folder
+5. Manually apply any changes you made to your original web.xml file to the gitblit.properties file you copied to your data folder
+6. Edit the new WAR's `WEB-INF/web.xml` file and set the *baseFolder* context parameter to your external baseFolder.
+
+### Upgrading Gitblit GO (pre-1.2.1)
+1. Create a `data` folder and copy the following files and folders to it:
+ - **users.conf*
+ - **projects.conf** *(if you have one)*
+ - **gitblit.properties**
+ - **serverKeystore.jks**
+ - **serverTrustStore.jks**
+ - *certs** folder
+ - **git** folder
+ - **groovy** folder
+ - **proposals** folder
+ - and any other custom files (robots.txt, welcome/login markdown files, etc)
+ - then edit your `gitblit.properties` file and adjust the following settings:
+ - *git.repositoriesFolder* = ${baseFolder}/git
+ - *groovy.scriptsFolder* = ${baseFolder}/groovy
+ - *groovy.grapeFolder* = ${baseFolder}/groovy/grape
+ - *web.projectsFile* = ${baseFolder}/projects.conf
+ - *realm.userService* = ${baseFolder}/users.conf
+ - *web.robots.txt* = ${baseFolder}/robots.txt
+ - *federation.proposalsFolder* = ${baseFolder}/proposals
+ - *realm.ldap.backingUserService* = ${baseFolder}/users.conf
+ - *realm.redmine.backingUserService* = ${baseFolder}/users.conf
+ - *server.tempFolder* = ${baseFolder}/temp
+
+2. Unzip Gitblit GO to a new folder
+3. Copy your `data` folder and overwrite the folder of the same name in the just-unzipped version
+4. Review and optionally apply any new settings as indicated in the [release log](releases.html) to `data/gitblit.properties`.
+
+**NOTE:** You may need to adjust your service definitions to include the `--baseFolder data` argument.
+
+#### Upgrading Windows Service
+You may need to delete your old service definition and install a new one depending on what has changed in the release.
+
+## Gitblit Configuration
+
+### Administering Repositories
+Repositories can be created, edited, renamed, and deleted through the web UI. They may also be created, edited, and deleted from the command-line using real [Git](http://git-scm.com) or your favorite file manager and text editor.
+
+All repository settings are stored within the repository `.git/config` file under the *gitblit* section.
+
+ [gitblit]
+ description = master repository
+ owner = james
+ useTickets = false
+ useDocs = true
+ showRemoteBranches = false
+ accessRestriction = clone
+ isFrozen = false
+ showReadme = false
+ federationStrategy = FEDERATE_THIS
+ isFederated = false
+ skipSizeCalculation = false
+ federationSets =
+
+#### Repository Names
+Repository names must be case-insensitive-unique but are CASE-SENSITIVE ON CASE-SENSITIVE FILESYSTEMS. The name must be composed of letters, digits, or `/ _ - . ~`<br/>
+Whitespace is illegal.
+
+Repositories can be grouped within subfolders. e.g. *libraries/mycoollib.git* and *libraries/myotherlib.git*
+
+All repositories created with Gitblit are *bare* and will automatically have *.git* appended to the name at creation time, if not already specified.
+
+#### Repository Owner
+The *Repository Owner* has the special permission of being able to edit a repository through the web UI. The Repository Owner is not permitted to rename the repository, delete the repository, or reassign ownership to another user.
+
+### Access Restrictions and Access Permissions
+![permissions matrix](permissions_matrix.png "Permissions and Restrictions")
+
+#### Discrete Permissions (Gitblit v1.2.0+)
+
+Since v1.2.0, Gitblit supports more discrete permissions. While Gitblit does not offer a built-in solution for branch-based permissions like Gitolite, it does allow for the following repository access permissions:
+
+- **V** (view in web ui, RSS feeds, download zip)
+- **R** (clone)
+- **RW** (clone and push)
+- **RWC** (clone and push with ref creation)
+- **RWD** (clone and push with ref creation, deletion)
+- **RW+** (clone and push with ref creation, deletion, rewind)
+
+These permission codes are combined with the repository path to create a user permission:
+
+ RW:mygroup/myrepo.git
+
+#### Discrete Permissions with Regex Matching (Gitblit v1.2.0+)
+
+Gitblit also supports *case-insensitive* regex matching for repository permissions. The following permission grants push privileges to all repositories in the *mygroup* folder.
+
+ RW:mygroup/.*
+
+##### Exclusions
+
+When using regex matching it may also be useful to exclude specific repositories or to exclude regex repository matches. You may specify the **X** permission for exclusion. The following example grants clone permission to all repositories except the repositories in mygroup. The user/team will have no access whatsoever to these repositories.
+
+ X:mygroup/.*
+ R:.*
+
+##### Order is Important
+
+The preceding example should suggest that order of permissions is important with regex matching. Here are the rules for determining the permission that is applied to a repository request:
+
+1. If the user is an admin or repository owner, then RW+
+2. Else if user has an explicit permission, use that
+3. Else check for the first regex match in user permissions
+4. Else check for the HIGHEST permission from team memberships
+ 1. If the team is an admin team, then RW+
+ 2. Else if a team has an explicit permission, use that
+ 3. Else check for the first regex match in team permissions
+
+#### No-So-Discrete Permissions (Gitblit <= v1.1.0)
+
+Prior to v1.2.0, Gitblit has two main access permission groupings:
+
+1. what you are permitted to do as an anonymous user
+2. **RW+** for any permitted user
+
+#### Committer Verification
+
+You may optionally enable committer verification which requires that each commit be committed by the authenticated user pushing the commits. i.e. If Bob is pushing the commits, Bob **must** be the committer of those commits.
+
+**How is this enforced?**
+
+Bob must set his *user.name* and *user.email* values for the repository to match his Gitblit user account **BEFORE** committing to his repository.
+<pre>
+[user "bob"]
+ displayName = Bob Jones
+ emailAddress = bob@somewhere.com
+</pre>
+<pre>
+ git config user.name "Bob Jones"
+ git config user.email bob@somewhere.com
+</pre>
+or
+
+ git config user.name bob
+ git config user.email bob@somewhere.com
+
+If the Gitblit account does not specify an email address, then the committer email address is ignored. However, if the account does specify an address it must match the committer's email address. Display name or username can be used as the committer name.
+
+All checks are case-insensitive.
+
+**What about merges?**
+
+You can not use fast-forward merges on your client when using committer verification. You must specify *--no-ff* to ensure that a merge commit is created with your identity as the committer. Only the first parent chain is traversed when verifying commits.
+
+#### Push Log
+
+Gitblit v1.2.1 introduces an incomplete push mechanism. All pushes are logged since 1.2.1, but the log has not yet been exposed through the web ui. This will be a feature of an upcoming release.
+
+### Teams
+
+Since v0.8.0, Gitblit supports *teams* for the original `users.properties` user service and the current default user service `users.conf`. Teams have assigned users and assigned repositories. A user can be a member of multiple teams and a repository may belong to multiple teams. This allows the administrator to quickly add a user to a team without having to keep track of all the appropriate repositories.
+
+### Administering Users (users.conf, Gitblit v0.8.0+)
+All users are stored in the `users.conf` file or in the file you specified in `gitblit.properties`. Your file extension must be *.conf* in order to use this user service.
+
+The `users.conf` file uses a Git-style configuration format:
+
+ [user "admin"]
+ password = admin
+ role = "#admin"
+ role = "#notfederated"
+ repository = RW+:repo1.git
+ repository = RW+:repo2.git
+
+ [user "hannibal"]
+ password = bossman
+ repository = RWD:topsecret.git
+ repository = RW+:ateam/[A-Za-z0-9-~_\\./]+
+
+ [user "faceman"]
+ password = vanity
+
+ [user "murdock"]
+ password = crazy
+
+ [user "babaracus"]
+ password = grrrr
+
+ [team "ateam"]
+ user = hannibal
+ user = faceman
+ user = murdock
+ user = babaracus
+ repository = RW:topsecret.git
+ mailingList = list@ateam.org
+ postReceiveScript = sendmail
+
+The `users.conf` file allows flexibility for adding new fields to a UserModel object that the original `users.properties` file does not afford without imposing the complexity of relying on an embedded SQL database.
+
+### Administering Users (users.properties, Gitblit v0.5.0 - v0.7.0)
+All users are stored in the `users.properties` file or in the file you specified in `gitblit.properties`. Your file extension must be *.properties* in order to use this user service.
+
+The format of `users.properties` loosely follows Jetty's convention for HashRealms:
+
+ username=password,role1,role2,role3...
+ @teamname=&mailinglist,!username1,!username2,!username3,repository1,repository2,repository3...
+
+### Usernames
+Usernames must be unique and are case-insensitive.
+Whitespace is illegal.
+
+### Passwords
+User passwords are CASE-SENSITIVE and may be *plain*, *md5*, or *combined-md5* formatted (see `gitblit.properties` -> *realm.passwordStorage*).
+
+### User Roles
+There are four actual *roles* in Gitblit:
+
+- *#admin*, which grants administrative powers to that user
+- *#notfederated*, which prevents an account from being pulled by another Gitblit instance
+- *#create*, which allows the user the power to create personal repositories
+- *#fork*, which allows the user to create a personal fork of an existing Gitblit-hosted repository
+
+Administrators automatically have access to all repositories. All other *roles* are repository permissions. If a repository is access-restricted, the user must have the repository's name within his/her roles to bypass the access restriction. This is how users are granted access to a restricted repository.
+
+**NOTE:**
+The following roles are equivalent:
+
+- myrepo.git
+- RW+:myrepo.git
+
+This is to preserve backwards-compatibility with Gitblit <= 1.1.0 which granted rewind power to all access-permitted users.
+
+### Personal Repositories & Forks
+
+Personal Repositories and Forks are related but are controlled individually.
+
+#### Creating a Personal Repository
+A user may be granted the power to create personal repositories by specifying the *#create* role through the web ui or through the RPC mechanism via the Gitblit Manager. Personal repositories are exactly like common/shared repositories except that the owner has a few additional administrative powers for that repository, like rename and delete.
+
+#### Creating a Fork
+A user may also be granted the power to fork an existing repository hosted on your Gitblit server to their own personal clone by specifying the *#fork* role through the web ui or via the Gitblit Manager.
+
+Forks are mostly likely personal repositories or common/shared repositories except for two important differences:
+
+1. Forks inherit a view/clone access list from the origin repository.
+i.e. if Team A has clone access to the origin repository, then by default Team A also has clone access to the fork. This is to facilitate collaboration.
+2. Forks are always listed in the fork network, regardless of any access restriction set on the fork.
+In other words, if you fork *RepoA.git* to *~me/RepoA.git* and then set the access restriction of *~me/RepoA.git* to *Authenticated View, Clone, & Push* your fork will still be listed in the fork network for *RepoA.git*.
+
+If you really must have an invisible fork, the clone it locally, create a new personal repository for your invisible fork, and push it back to that personal repository.
+
+## Alternative Authentication and Authorization
+
+### LDAP Authentication
+*SINCE 1.0.0*
+
+LDAP can be used to authenticate Users and optionally control Team memberships. When properly configured, Gitblit will delegate authentication to your LDAP server and will cache some user information in the usual users file (.conf or .properties).
+
+When using the LDAP User Service, new user accounts can not be manually created from Gitblit. Gitblit user accounts are automatically created for new users on their first succesful authentication through Gitblit against the LDAP server. It is also important to note that the LDAP User Service does not retrieve or store user passwords nor does it implement any LDAP-write functionality.
+
+To use the *LdapUserService* set *realm.userService=com.gitblit.LdapUserService* in your `gitblit.properties` file or your `web.xml` file and then configure the *realm.ldap* settings appropriately for your LDAP environment.
+
+#### Example LDAP Layout
+![block diagram](ldapSample.png "LDAP Sample")
+
+Please see [ldapUserServiceSampleData.ldif](https://github.com/gitblit/gitblit/blob/master/tests/com/gitblit/tests/resources/ldapUserServiceSampleData.ldif) to see the data in LDAP that reflects the above picture.
+
+#### Gitblit Settings for Example LDAP Layout
+The following are the settings required to configure Gitblit to authenticate against the example LDAP server with LDAP-controlled team memberships.
+
+<table class="table">
+<thead>
+<tr><th>parameter</th><th>value</th><th>description</th></tr>
+</thead>
+<tbody>
+<tr>
+ <th>realm.ldap.server</th><td>ldap://localhost:389</td>
+ <td>Tells Gitblit to connect to the LDAP server on localhost port 389. The URL Must be of form ldap(s)://&lt;server&gt;:&lt;port&gt; with port being optional (389 for ldap, 636 for ldaps).</td>
+</tr>
+<tr>
+ <th>realm.ldap.username</th><td>cn=Directory Manager</td>
+ <td>The credentials that will log into the LDAP server</td>
+</tr>
+<tr>
+ <th>realm.ldap.password</th><td>password</td>
+ <td>The credentials that will log into the LDAP server</td>
+</tr>
+<tr>
+ <th>realm.ldap.backingUserService</th><td>users.conf</td>
+ <td>Where to store all information that is used by Gitblit. All information will be synced here upon user login.</td>
+</tr>
+<tr>
+ <th>realm.ldap.maintainTeams</th><td>true</td>
+ <td>Are team memberships maintained in LDAP (<em>true</em>) or manually in Gitblit (<em>false</em>).</td>
+</tr>
+<tr>
+ <th>realm.ldap.accountBase</th><td>OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain</td>
+ <td>What is the root node for all users in this LDAP system. Subtree searches will start from this node.</td>
+</tr>
+<tr>
+ <th>realm.ldap.accountPattern</th><td>(&(objectClass=person)(sAMAccountName=${username}))</td><td>The LDAP search filter that will match a particular user in LDAP. ${username} will be replaced with whatever the user enters as their username in the Gitblit login panel.</td>
+</tr>
+<tr>
+ <th>realm.ldap.groupBase</th><td>OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain</td>
+ <td>What is the root node for all teams in this LDAP system. Subtree searches will start from this node.</td>
+</tr>
+<tr>
+ <th>realm.ldap.groupMemberPattern</th><td>(&(objectClass=group)(member=${dn}))</td><td>The LDAP search filter that will match all teams for the authenticating user. ${username} will be replaced with whatever the user enters as their username in the Gitblit login panel. Anything else in ${} will be replaced by Attributes from the User node.</td>
+</tr>
+<tr>
+ <th>realm.ldap.admins</th><td>@Git_Admins</td><td>A space-delimited list of usernames and/or teams that indicate admin status in Gitblit. Teams are referenced with a leading <em>@</em> character.</td>
+</tr>
+</tbody>
+</table>
+
+#### LDAP In-Memory Server
+
+You can start Gitblit GO with an in-memory LDAP server by specifying the *--ldapLdifFile* command-line argument. The LDAP server will listen on localhost of the port specified in *realm.ldap.url* of `gitblit.properties`. Additionally, a root user record is automatically created for *realm.ldap.username* and *realm.ldap.password*. Please note that the ldaps:// protocol is not supported for the in-memory server.
+
+### Custom Authentication
+This is the simplest choice where you implement custom authentication and delegate all other standard user and team operations to one of Gitblit's user service implementations. This choice insulates your customization from changes in User and Team model classes and additional API that may be added to IUserService.
+
+Please subclass [com.gitblit.GitblitUserService](https://github.com/gitblit/gitblit/blob/master/src/com/gitblit/GitblitUserService.java) and override the *setup()* and *authenticate()* methods.
+Make sure to set the *serviceImpl* field in your *setup()* method.
+
+You may use your subclass by specifying its fully qualified classname in the *realm.userService* setting.
+
+Your subclass must be on Gitblit's classpath and must have a public default constructor.
+
+### Custom Everything
+Instead of maintaining a `users.conf` or `users.properties` file, you may want to integrate Gitblit into an existing environment.
+
+You may use your own custom *com.gitblit.IUserService* implementation by specifying its fully qualified classname in the *realm.userService* setting.
+
+Your user service class must be on Gitblit's classpath and must have a public default constructor.
+Please see the following interface definition [com.gitblit.IUserService](https://github.com/gitblit/gitblit/blob/master/src/com/gitblit/IUserService.java).
+
+## Groovy Hook Scripts
+
+*SINCE 0.8.0*
+
+Gitblit uses Groovy for its push hook mechanism. This mechanism only executes when pushing to Gitblit, not when pushing to some other Git tooling in your stack.
+
+The Groovy hook mechanism allows for dynamic extension of Gitblit to execute custom tasks on receiving and processing push events. The scripts run within the context of your Gitblit instance and therefore have access to Gitblit's internals at runtime.
+
+### Rules, Requirements, & Behaviors
+1. Your Groovy scripts must be stored in the *groovy.scriptsFolder* as specified in `gitblit.properties` or `web.xml`.
+2. All script files must have the *.groovy* extension. Because of this you may omit the extension when specifying the script.
+3. Script filenames must not have spaces!
+4. Scripts must be explicitly specified to be executed, no scripts are *automatically* executed by name or extension.
+5. A script can be specified to run on *all repositories* by adding the script file name to *groovy.preReceiveScripts* or *groovy.postReceiveScripts* in `gitblit.properties` or `web.xml`.
+6. Scripts can be specified for a team.
+7. Scripts may also be specified per-repository in the repository's settings.
+8. Globally-specified scripts and team-specified scripts are excluded from the list of available scripts in a repository's settings
+9. Globally-specified scripts are executed first, in their listed order; followed by team-specified scripts in their listed order by alphabetical team order; followed by per-repository scripts, in their listed order.
+10. A script may only be defined once in a pre-receive chain and once in a post-receive chain.
+You may execute the same script on pre-receive and post-receive, just not multiple times within a pre-receive or post-receive event.
+11. Gitblit does not differentiate between what can be a pre-receive script and what can be a post-receive script.
+12. If a script *returns false* then the hook chain is aborted and none of the subsequent scripts will execute.
+
+Some sample scripts are included in the GO and WAR distributions to show you how you can tap into Gitblit with the provided bound variables. Additional implementation details may be specified in the header comment of these examples.
+
+Hook contributions and improvements are welcome.
+
+### Grapes
+
+*SINCE 1.0.0*
+
+[Grape](http://groovy.codehaus.org/Grape) lets you quickly add maven repository dependencies to your Groovy hook script.
+
+<blockquote>Grape (The Groovy Adaptable Packaging Engine or Groovy Advanced Packaging Engine) is the infrastructure enabling the grab() calls in Groovy, a set of classes leveraging <a href="http://ant.apache.org/ivy">Ivy</a> to allow for a repository driven module system for Groovy. This allows a developer to write a script with an essentially arbitrary library requirement, and ship just the script. Grape will, at runtime, download as needed and link the named libraries and all dependencies forming a transitive closure when the script is run from existing repositories such as Ibiblio, Codehaus, and java.net.</blockquote>
+
+---JAVA---
+// create and use a primitive array
+import org.apache.commons.collections.primitives.ArrayIntList
+
+@Grab(group='commons-primitives', module='commons-primitives', version='1.0')
+def createEmptyInts() { new ArrayIntList() }
+
+def ints = createEmptyInts()
+ints.add(0, 42)
+assert ints.size() == 1
+assert ints.get(0) == 42
+---JAVA---
+
+### Custom Fields
+
+*SINCE 1.0.0*
+
+Gitblit allows custom repository string fields to be defined in `gitblit.properties` or `web.xml`. Entry textfields are automatically created for these fields in the Edit Repository page of Gitblit and the Edit Repository dialog of the Gitblit Manager. These fields are accessible from your Groovy hook scripts as
+
+ repository.customFields.myField
+
+This feature allows you to customize the behavior of your hook scripts without hard-coding values in the hook scripts themselves.
+
+### Pre-Receive
+
+Pre-Receive scripts execute after the pushed objects have all been written to the Git repository but before the refs have been updated to point to these new objects.
+
+This is the appropriate point to block a push and is how many Git tools implement branch-write permissions.
+
+### Post-Receive
+
+Post-Receive scripts execute after all refs have been updated.
+
+This is the appropriate point to trigger continuous integration builds or send email notifications, etc.
+
+## Push Email Notifications
+
+Gitblit implements email notifications in *sendmail.groovy* which uses the Groovy Hook Script mechanism. This allows for dynamic customization of the notification process at the installation site and serves as an example push script.
+
+### Enabling Push Notifications
+
+In order to send email notifications on a push to Gitblit, this script must be specified somewhere in the *post-receive* script chain.
+You may specify *sendmail* in one of three places:
+
+1. *groovy.postReceiveScripts* in `gitblit.properties` or `web.xml`, globally applied to all repositories
+2. post-receive scripts of a Team definition
+3. post-receive scripts of a Repository definition
+
+### Destination Addresses
+
+Gitblit does not currently support individual subscriptions to repositories; i.e. a *user* can not subscribe or unsubscribe from push notifications.
+
+However, Repository Managers and Administrators can specify subscribed email addresses in one of three places:
+
+1. *mail.mailingLists* in `gitblit.properties` or `web.xml`, globally applied to all push-notified repositories
+2. mailing lists in a Team definition, applied to all repositories that are part of the team definition
+3. mailing lists in a Repository definition
+
+All three sources are checked and merged into a unique list of destination addresses for push notifications.
+
+**NOTE:**
+Care should be taken when devising your notification scheme as it relates to any VIEW restricted repositories you might have. Setting a global mailing list and activating push notifications for a VIEW restricted repository may send unwanted emails.
+
+## Lucene Search Integration
+
+*SINCE 0.9.0*
+
+Repositories may optionally be indexed using the Lucene search engine. The Lucene search offers several advantages over commit-traversal search:
+
+1. very fast commit and blob searches
+2. multi-term searches
+3. term-highlighted and syntax-highlighted fragment matches
+4. multi-repository searches
+
+### How do I use it?
+
+First you must ensure that *web.allowLuceneIndexing* is set *true* in `gitblit.properties` or `web.xml`. Then you must understand that Lucene indexing is an opt-in feature which means that no repositories are automatically indexed.
+Like anything else, this design has pros and cons.
+
+#### Pros
+1. no wasted cycles indexing repositories you will never search
+2. you specify exactly what branches are indexed; experimental/dead/personal branches can be ignored
+
+#### Cons
+1. you specify exactly what branches are indexed
+
+#### I have 300 repositories and you want me to specify indexed branches on each one??
+
+Yeah, I agree that is inconvenient.
+
+If you are using Gitblit GO there is a utility script `add-indexed-branch.cmd` which allows you to specify an indexed branch for many repositories in one step.
+
+If you are using Gitblit WAR then, at present, you are out of luck unless you write your own script to traverse your repositories and use native Git to manipulate each repository config.
+
+ git config --add gitblit.indexBranch "default"
+ git config --add gitblit.indexBranch "refs/heads/master"
+
+#### Indexing Branches
+You may specify which branches should be indexed per-repository in the *Edit Repository* page. New/empty repositories may only specify the *default* branch which will resolve to whatever commit HEAD points to or the most recently updated branch if HEAD is unresolvable.
+
+Indexes are built and incrementally updated on a 2 minute cycle so you may have to wait a few minutes before your index is built or before your latest pushes get indexed.
+
+**NOTE:**
+After specifying branches, only the content from those branches can be searched via Gitblit. Gitblit will automatically redirect any queries entered on a repository's search box to the Lucene search page. Repositories that do not specify any indexed branches will use the traditional commit-traversal search.
+
+#### Adequate Heap
+
+The initial indexing of an existing repository can potentially exhaust the memory allocated to your Java instance and may throw OutOfMemory exceptions. Be sure to provide your Gitblit server adequate heap space to index your repositories. The heap is set using the *-Xmx* JVM parameter in your Gitblit launch command (e.g. -Xmx1024M).
+
+#### Why does Gitblit check every 2 mins for repository/branch changes?
+
+Gitblit has to balance its design as a complete, integrated Git server and its utility as a repository viewer in an existing Git setup.
+
+Gitblit could build indexes immediately on *edit repository* or on *receiving pushes*, but that design would not work if someone is pushing via ssh://, git://, or file:// (i.e. not pushing to Gitblit http(s)://). For this reason Gitblit has a polling mechanism to check for ref changes every 2 mins. This design works well for all use cases, aside from adding a little lag in updating the index.
+
+## Client Setup and Configuration
+### Https with Self-Signed Certificates
+You must tell Git/JGit not to verify the self-signed certificate in order to perform any remote Git operations.
+
+**NOTE:**
+The default self-signed certificate generated by Gitlbit GO is bound to *localhost*.
+If you are using Eclipse/EGit/JGit clients, you will have to generate your own certificate that specifies the exact hostname used in your clone/push url.
+You must do this because Eclipse/EGit/JGit (<= 2.1.0) always verifies certificate hostnames, regardless of the *http.sslVerify=false* client-side setting.
+
+- **Eclipse/EGit/JGit**
+ 1. Window->Preferences->Team->Git->Configuration
+ 2. Click the *New Entry* button
+ 3. <pre>Key = <em>http.sslVerify</em>
+Value = <em>false</em></pre>
+- **Command-line Git** ([Git-Config Manual Page](http://www.kernel.org/pub/software/scm/git/docs/git-config.html))
+<pre>git config --global --bool --add http.sslVerify false</pre>
+
+### Http Post Buffer Size
+You may find the default post buffer of your git client is too small to push large deltas to Gitblit. Sometimes this can be observed on your client as *hanging* during a push. Other times it can be observed by git erroring out with a message like: error: RPC failed; result=52, HTTP code = 0.
+
+This can be adjusted on your client by changing the default post buffer size:
+<pre>git config --global http.postBuffer 524288000</pre>
+
+### Cloning an Access Restricted Repository
+- **Eclipse/EGit/JGit**
+Nothing special to configure, EGit figures out everything.
+<pre>https://yourserver/git/your/repository</pre>
+- **Command-line Git**
+My testing indicates that your username must be embedded in the url. YMMV.
+<pre>https://username@yourserver/git/your/repository</pre>
+
diff --git a/src/site/siteindex.mkd b/src/site/siteindex.mkd
new file mode 100644
index 00000000..de5c0999
--- /dev/null
+++ b/src/site/siteindex.mkd
@@ -0,0 +1,85 @@
+## What is Gitblit?
+<div class="well" style="margin-left:5px;float:right;width:275px;padding: 10px 10px;">
+<div style="text-align:center">
+<b>Current Release ${project.releaseVersion} (${project.releaseDate})</b><br/><a href="releasenotes.html">release notes</a>
+<div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-success" href="%GCURL%gitblit-${project.releaseVersion}.zip">Download Gitblit GO (Windows)</a></div>
+<div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-success" href="%GCURL%gitblit-${project.releaseVersion}.tar.gz">Download Gitblit GO (Linux/OSX)</a></div>
+<div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-danger" href="%GCURL%gitblit-${project.releaseVersion}.war">Download Gitblit WAR</a></div>
+<div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-info" href="%GCURL%express-${project.releaseVersion}.zip">Download Gitblit Express</a></div>
+<div style="padding:5px;"><a style="width:175px;text-decoration:none;" class="btn btn-primary" href="%GCURL%manager-${project.releaseVersion}.zip">Download Gitblit Manager</a></div>
+ <a href="screenshots.html" title="Screenshots"><img style="margin-top:5px;border:1px solid #ccc;" src="thumbs/00.png" alt="Screenshots" /></a>
+ </div>
+
+ <div style="padding-top:5px;">
+ <table class="table condensed-table">
+ <tbody>
+ <tr><th>License</th><td><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a></td></tr>
+ <tr><th>Sources</th><td><a href="${project.scmUrl}">GitHub</a> &amp; <a href="http://code.google.com/p/gitblit/source/list">GoogleCode</a></td></tr>
+ <tr><th>Issues</th><td><a href="${project.issuesUrl}">GoogleCode</a></td></tr>
+ <tr><th>Discussion</th><td><a href="${project.forumUrl}">Gitblit Group</a></td></tr>
+ <tr><th>Google+</th><td><a href="${project.socialNetworkUrl}">Gitblit+</a></td></tr>
+ <tr><th>Ohloh</th><td><a target="_top" href="http://www.ohloh.net/p/gitblit"><img border="0" width="100" height="16" src="http://www.ohloh.net/p/gitblit/widgets/project_thin_badge.gif" alt="Ohloh project report for Gitblit" /></a></td></tr>
+ <tr><th>Donations</th><td>If you enjoy Gitblit and want to support its development, please consider making a donation to <a href="http://www.stjude.org">St. Jude Children's Research Hospital</a>.
+ <a href="http://www.stjude.org" alt="St. Jude Children's Research Hospital"><img style="padding-top:10px;" src="stjude_150x150.gif"/></a></td></tr>
+ </tbody>
+ </table>
+ </div>
+</div>
+
+Gitblit is an open-source, pure Java stack for managing, viewing, and serving [Git][git] repositories.
+It's designed primarily as a tool for small workgroups who want to host centralized repositories.
+
+You can browse a live demo [here](https://demo-gitblit.rhcloud.com) hosted on [RedHat's OpenShift][rhcloud] cloud service.
+
+### GO: Single-Stack Solution
+
+*Gitblit GO* is an integrated, single-stack solution based on Jetty.
+
+You do not need Apache httpd, Perl, Git, or Gitweb. Should you want to use some or all of those, you still can; Gitblit plays nice with the other kids on the block.
+
+This is what you should download if you want to go from zero to Git in less than 5 mins.
+
+All dependencies are bundled.
+
+### WAR: For Your Servlet Container
+*Gitblit WAR* is what you should download if you already have a servlet container available that you wish to use. Jetty 6/7/8 and Tomcat 6/7 are known to work. Generally, any Servlet 2.5 or Servlet 3.0 container should work.
+
+All dependencies are bundled.
+
+### Express: For the Cloud
+*Gitblit Express* is a prepared distribution for [RedHat's OpenShift][rhcloud] cloud service.
+
+All dependencies are bundled.
+
+### You decide how to use Gitblit
+
+Gitblit can be used as a dumb repository viewer with no administrative controls or user accounts.
+Gitblit can be used as a complete Git stack for cloning, pushing, and repository access control.
+Gitblit can be used without any other Git tooling (including actual Git) or it can cooperate with your established tools.
+
+### Easy Remote Management
+
+Administrators can create and manage all repositories, user accounts, and teams from the *Web UI*.
+Administrators can create and manage all repositories, user accounts, and teams from the *JSON RPC interface* using the [Gitblit Manager](http://code.google.com/p/gitblit/downloads/detail?name=%MANAGER%) or your own custom tooling.
+
+### Integration with Your Infrastructure
+
+- Groovy push hook scripts
+- Pluggable user service mechanism
+ - LDAP authentication with optional LDAP-controlled Team memberships
+ - Custom authentication, authorization, and user management
+- Rich RSS feeds
+- JSON-based RPC mechanism
+- [Java Client RSS/JSON API library](http://code.google.com/p/gitblit/downloads/detail?name=%API%) for custom integration
+
+### Backup Strategy
+
+Gitblit includes a backup mechanism (*federation*) which can be used to backup repositories and, optionally, user accounts, team definitions, server settings, & Groovy push hook scripts from your Gitblit instance to another Gitblit instance or to a [Gitblit Federation Client](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%). Similarly, you can use the federation mechanism to aggregate individual workspace Gitblit instances to a common, centralized server.
+
+### Java Runtime Requirement
+
+Gitblit requires a Java 6 Runtime Environment (JRE) or a Java 6 Development Kit (JDK).
+
+[jgit]: http://eclipse.org/jgit "Eclipse JGit Site"
+[git]: http://git-scm.com "Official Git Site"
+[rhcloud]: https://openshift.redhat.com/app "RedHat OpenShift"
diff --git a/src/site/templates/atom.ftl b/src/site/templates/atom.ftl
new file mode 100644
index 00000000..06d28da7
--- /dev/null
+++ b/src/site/templates/atom.ftl
@@ -0,0 +1,2 @@
+<#include "macros.ftl">
+<@AtomMacro posts=releases posturl="${project.url}/history.html#" /> \ No newline at end of file
diff --git a/src/site/templates/macros.ftl b/src/site/templates/macros.ftl
new file mode 100644
index 00000000..e7c275b8
--- /dev/null
+++ b/src/site/templates/macros.ftl
@@ -0,0 +1,147 @@
+<#macro LogMacro title version date description log logTitle="">
+ <#if log??>
+ <h3 id="${version}" class="section"><a href="#${version}" class="sectionlink"><i class="icon-share-alt"> </i></a>${title} (${version}) <small>${description}</small></h3>
+ <table class="table">
+ <tbody>
+ <tr>
+ <td style="background-color:inherit;width:100px">${date}</td>
+ <td style="background-color:inherit;"><@LogDescriptionMacro log=log title=logTitle /></td>
+ </tr>
+ </tbody>
+ </table>
+ </#if>
+</#macro>
+
+<#macro LogDescriptionMacro log title=log.title>
+ <#if (title!?length > 0)>
+ <p class="lead">${title}</p>
+ </#if>
+
+ <#if (log.html!?length > 0)>
+ <p>${log.html}</p>
+ </#if>
+
+ <#if (log.text!?length > 0)>
+ <blockquote><p>${log.text!?html?replace("\n", "<br />")}</p></blockquote>
+ </#if>
+
+ <#if (log.note!?length > 0)>
+ <div class="alert alert-info">
+ <h4>Note</h4>
+ ${log.note?html?replace("\n", "<p />")}
+ </div>
+ </#if>
+
+ <#if (log.security!?size > 0)>
+ <@SecurityListMacro title="security" list=log.security/>
+ </#if>
+ <#if (log.fixes!?size > 0)>
+ <@UnorderedListMacro title="fixes" list=log.fixes />
+ </#if>
+ <#if (log.changes!?size > 0)>
+ <@UnorderedListMacro title="changes" list=log.changes />
+ </#if>
+ <#if (log.additions!?size > 0)>
+ <@UnorderedListMacro title="additions" list=log.additions />
+ </#if>
+ <#if (log.settings!?size > 0)>
+ <@SettingsTableMacro title="new settings" list=log.settings />
+ </#if>
+ <#if (log.dependencyChanges!?size > 0)>
+ <@UnorderedListMacro title="dependency changes" list=log.dependencyChanges />
+ </#if>
+ <#if (log.contributors!?size > 0)>
+ <@UnorderedListMacro title="contributors" list=log.contributors?sort />
+ </#if>
+</#macro>
+
+<#macro SecurityListMacro list title>
+ <h4 style="color:red;">${title}</h4>
+ <ul>
+ <#list list as item>
+ <li>${item?html?replace("\n", "<br/>")}</li>
+ </#list>
+ </ul>
+</#macro>
+
+<#macro UnorderedListMacro list title>
+ <h4>${title}</h4>
+ <ul>
+ <#list list as item>
+ <li>${item?html?replace("\n", "<br/>")}</li>
+ </#list>
+ </ul>
+</#macro>
+
+<#macro SettingsTableMacro list title>
+ <h4>${title}</h4>
+ <table class="table">
+ <#list list as item>
+ <tr>
+ <td><em>${item.name}</em></td><td>${item.defaultValue}</td>
+ </tr>
+ </#list>
+ </table>
+</#macro>
+
+<#macro RssMacro posts posturl>
+<?xml version="1.0" standalone='yes'?>
+<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <channel>
+ <title><![CDATA[${project.name}]]></title>
+ <link>${project.url}</link>
+ <description><![CDATA[${project.description}]]></description>
+ <generator>Moxie Toolkit</generator>
+ <#list posts as post>
+ <item>
+ <title><![CDATA[${post.title}]]></title>
+ <link><![CDATA[${posturl}${post.id}]]></link>
+ <guid isPermaLink="true">${posturl}${post.id}</guid>
+ <#if (post.text!?length > 0)>
+ <description><![CDATA[${post.text}]]></description>
+ </#if>
+ <#if (post.keywords!?size > 0)>
+ <#list post.keywords as keyword>
+ <category><![CDATA[${keyword}]]></category>
+ </#list>
+ </#if>
+ <#if (post.author!?length > 0)>
+ <dc:creator><![CDATA[${post.author}]]></dc:creator>
+ <#else>
+ <dc:creator><![CDATA[${project.name}]]></dc:creator>
+ </#if>
+ <pubDate>${post.date?string("EEE, dd MMM yyyy HH:mm:ss Z")}</pubDate>
+ </item>
+ </#list>
+ </channel>
+</rss>
+</#macro>
+
+<#macro AtomMacro posts posturl>
+<?xml version="1.0" standalone='yes'?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <generator uri="${project.url}" version="${project.version}">${project.name}</generator>
+ <title><![CDATA[${project.name}]]></title>
+ <updated>${project.releaseDate}</updated>
+ <#list posts as post>
+ <entry>
+ <content type="text/plain" />
+ <title type="text"><![CDATA[${post.title}]]></title>
+ <#if (post.text!?length > 0)>
+ <summary type="text"><![CDATA[${post.text}]]></summary>
+ </#if>
+ <link href="${posturl}${post.id}" rel="via" />
+ <guid isPermaLink="true">${posturl}${post.id}</guid>
+ <#if (post.text!?length > 0)>
+ <content><![CDATA[${post.text}]]></content>
+ </#if>
+ <#if (post.keywords!?size > 0)>
+ <#list post.keywords as keyword>
+ <category label="<![CDATA[${keyword}]]>" />
+ </#list>
+ </#if>
+ <published>${post.date?string("yyyy-MM-dd'T'HH:mm:ssZ")}</published>
+ </entry>
+ </#list>
+</feed>
+</#macro> \ No newline at end of file
diff --git a/src/site/templates/releasecurrent.ftl b/src/site/templates/releasecurrent.ftl
new file mode 100644
index 00000000..3bfd7099
--- /dev/null
+++ b/src/site/templates/releasecurrent.ftl
@@ -0,0 +1,25 @@
+<#include "macros.ftl" >
+
+<!-- CURRENT RELEASE -->
+<@LogMacro
+ title="Current Release"
+ log=release
+ version=project.releaseVersion
+ date=reference.releaseDate?string("yyyy-MM-dd")
+ description="this is the current stable release" />
+
+<!-- NEXT RELEASE -->
+<#if snapshot??>
+<@LogMacro
+ title="Next Release"
+ log=snapshot
+ version=project.version
+ date="PENDING"
+ description="these changes are queued for an upcoming release" />
+</#if>
+
+<div>
+ <ul class="pager">
+ <li class="next"><a href="releases.html">All Releases &rarr;</a></li>
+ </ul>
+</div>
diff --git a/src/site/templates/releasehistory.ftl b/src/site/templates/releasehistory.ftl
new file mode 100644
index 00000000..eaaaad2d
--- /dev/null
+++ b/src/site/templates/releasehistory.ftl
@@ -0,0 +1,21 @@
+<#include "macros.ftl" >
+
+<!-- HISTORY -->
+<#if (releases!?size > 0)>
+ <p></p>
+ <h2>All Releases</h2>
+ <table class="table">
+ <tbody>
+ <!-- RELEASE HISTORY -->
+ <#list releases?sort_by("date")?reverse as log>
+ <tr id="${log.id}">
+ <td style="width:100px" id="${log.id}">
+ <b><a href="#${log.id}">${log.id}</a></b><br/>
+ ${log.date?string("yyyy-MM-dd")}
+ </td>
+ <td><@LogDescriptionMacro log=log /></td>
+ </tr>
+ </#list>
+ </tbody>
+ </table>
+</#if> \ No newline at end of file
diff --git a/src/site/templates/rss.ftl b/src/site/templates/rss.ftl
new file mode 100644
index 00000000..90e86ebb
--- /dev/null
+++ b/src/site/templates/rss.ftl
@@ -0,0 +1,2 @@
+<#include "macros.ftl">
+<@RssMacro posts=releases posturl="${project.url}/releases.html#" /> \ No newline at end of file
diff --git a/src/test/config/test-gitblit.properties b/src/test/config/test-gitblit.properties
new file mode 100644
index 00000000..f16f5c5a
--- /dev/null
+++ b/src/test/config/test-gitblit.properties
@@ -0,0 +1,88 @@
+#
+# Gitblit Unit Testing properties
+#
+
+git.repositoriesFolder = ${baseFolder}/git
+git.searchRepositoriesSubfolders = true
+git.enableGitServlet = true
+groovy.scriptsFolder = ${baseFolder}/groovy
+groovy.preReceiveScripts = blockpush
+groovy.postReceiveScripts = sendmail
+web.authenticateViewPages = false
+web.authenticateAdminPages = true
+web.allowCookieAuthentication = true
+realm.userService = test-users.conf
+realm.passwordStorage = md5
+realm.minPasswordLength = 5
+web.siteName =
+web.allowAdministration = true
+web.enableRpcServlet = true
+web.enableRpcManagement = true
+web.enableRpcAdministration = true
+web.allowGravatar = true
+web.allowZipDownloads = true
+web.syndicationEntries = 25
+web.showRepositorySizes = true
+web.showFederationRegistrations = false
+web.loginMessage = gitblit
+web.repositoriesMessage = gitblit
+web.useClientTimezone = false
+web.timeFormat = HH:mm
+web.datestampShortFormat = yyyy-MM-dd
+web.datestampLongFormat = EEEE, MMMM d, yyyy
+web.datetimestampLongFormat = EEEE, MMMM d, yyyy h:mm a z
+web.mountParameters = true
+web.forwardSlashCharacter = /
+web.otherUrls =
+web.repositoryListType = grouped
+web.repositoryRootGroupName = main
+web.repositoryListSwatches = true
+web.diffStyle = gitblit
+web.showEmailAddresses = true
+web.showSearchTypeSelection = false
+web.generateActivityGraph = true
+web.activityDuration = 14
+web.summaryCommitCount = 16
+web.summaryRefsCount = 5
+web.itemsPerPage = 50
+web.prettyPrintExtensions = c cpp cs css htm html java js php pl prefs properties py rb sh sql xml vb
+web.markdownExtensions = md mkd markdown MD MKD
+web.imageExtensions = bmp jpg gif png
+web.binaryExtensions = jar pdf tar.gz zip
+web.aggressiveHeapManagement = false
+web.debugMode = false
+regex.global = true
+regex.global.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://somehost/bug/$3">Bug-Id: $3</a>
+regex.global.changeid = \\b(Change-Id:\\s*)([A-Za-z0-9]*)\\b!!!<a href="http://somehost/changeid/$2">Change-Id: $2</a>
+regex.myrepository.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://elsewhere/bug/$3">Bug-Id: $3</a>
+mail.server =
+mail.port = 25
+mail.debug = false
+mail.username =
+mail.password =
+mail.fromAddress =
+mail.adminAddresses =
+mail.mailingLists = x@test.com y@test.com z@test.com
+federation.name = Unit Test
+federation.passphrase = Unit Testing
+federation.allowProposals = false
+federation.proposalsFolder = proposals
+federation.defaultFrequency = 60 mins
+federation.sets = animal mineral vegetable
+#federation.example1.url = https://go.gitblit.com
+#federation.example1.token = 6f3b8a24bf970f17289b234284c94f43eb42f0e4
+#federation.example1.frequency = 120 mins
+#federation.example1.folder =
+#federation.example1.bare = true
+#federation.example1.mirror = true
+#federation.example1.mergeAccounts = true
+
+server.tempFolder = ${baseFolder}/temp
+server.useNio = true
+server.contextPath = /
+server.httpPort = 0
+server.httpsPort = 8443
+server.httpBindInterface = localhost
+server.httpsBindInterface = localhost
+server.storePassword = gitblit
+server.shutdownPort = 8081
diff --git a/src/test/config/test-ui-gitblit.properties b/src/test/config/test-ui-gitblit.properties
new file mode 100644
index 00000000..c77de1a2
--- /dev/null
+++ b/src/test/config/test-ui-gitblit.properties
@@ -0,0 +1,1203 @@
+#
+# Git Servlet Settings
+#
+
+# Base folder for repositories.
+# This folder may contain bare and non-bare repositories but Gitblit will only
+# allow you to push to bare repositories.
+# Use forward slashes even on Windows!!
+# e.g. c:/gitrepos
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+git.repositoriesFolder = ${baseFolder}/git
+
+# Build the available repository list at startup and cache this list for reuse.
+# This reduces disk io when presenting the repositories page, responding to rpcs,
+# etc, but it means that Gitblit will not automatically identify repositories
+# added or deleted by external tools.
+#
+# For this case you can use curl, wget, etc to issue an rpc request to clear the
+# cache (e.g. https://localhost/rpc?req=CLEAR_REPOSITORY_CACHE)
+#
+# SINCE 1.1.0
+git.cacheRepositoryList = true
+
+# Search the repositories folder subfolders for other repositories.
+# Repositories MAY NOT be nested (i.e. one repository within another)
+# but they may be grouped together in subfolders.
+# e.g. c:/gitrepos/libraries/mylibrary.git
+# c:/gitrepos/libraries/myotherlibrary.git
+#
+# SINCE 0.5.0
+git.searchRepositoriesSubfolders = true
+
+# Maximum number of folders to recurse into when searching for repositories.
+# The default value, -1, disables depth limits.
+#
+# SINCE 1.1.0
+git.searchRecursionDepth = -1
+
+# List of regex exclusion patterns to match against folders found in
+# *git.repositoriesFolder*.
+# Use forward slashes even on Windows!!
+# e.g. test/jgit\.git
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 1.1.0
+git.searchExclusions =
+
+# List of regex url patterns for extracting a repository name when locating
+# submodules.
+# e.g. git.submoduleUrlPatterns = .*?://github.com/(.*) will extract
+# *gitblit/gitblit.git* from *git://github.com/gitblit/gitblit.git*
+# If no matches are found then the submodule repository name is assumed to be
+# whatever trails the last / character. (e.g. gitblit.git).
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 1.1.0
+git.submoduleUrlPatterns = .*?://github.com/(.*)
+
+# Allow push/pull over http/https with JGit servlet.
+# If you do NOT want to allow Git clients to clone/push to Gitblit set this
+# to false. You might want to do this if you are only using ssh:// or git://.
+# If you set this false, consider changing the *web.otherUrls* setting to
+# indicate your clone/push urls.
+#
+# SINCE 0.5.0
+git.enableGitServlet = true
+
+# If you want to restrict all git servlet access to those with valid X509 client
+# certificates then set this value to true.
+#
+# SINCE 1.2.0
+git.requiresClientCertificate = false
+
+# Enforce date checks on client certificates to ensure that they are not being
+# used prematurely and that they have not expired.
+#
+# SINCE 1.2.0
+git.enforceCertificateValidity = true
+
+# List of OIDs to extract from a client certificate DN to map a certificate to
+# an account username.
+#
+# e.g. git.certificateUsernameOIDs = CN
+# e.g. git.certificateUsernameOIDs = FirstName LastName
+#
+# SPACE-DELIMITED
+# SINCE 1.2.0
+git.certificateUsernameOIDs = CN
+
+# Only serve/display bare repositories.
+# If there are non-bare repositories in git.repositoriesFolder and this setting
+# is true, they will be excluded from the ui.
+#
+# SINCE 0.9.0
+git.onlyAccessBareRepositories = false
+
+# Allow an authenticated user to create a destination repository on a push if
+# the repository does not already exist.
+#
+# Administrator accounts can create a repository in any project.
+# These repositories are created with the default access restriction and authorization
+# control values. The pushing account is set as the owner.
+#
+# Non-administrator accounts with the CREATE role may create personal repositories.
+# These repositories are created as VIEW restricted for NAMED users.
+# The pushing account is set as the owner.
+#
+# SINCE 1.2.0
+git.allowCreateOnPush = true
+
+# The default access restriction for new repositories.
+# Valid values are NONE, PUSH, CLONE, VIEW
+# NONE = anonymous view, clone, & push
+# PUSH = anonymous view & clone and authenticated push
+# CLONE = anonymous view, authenticated clone & push
+# VIEW = authenticated view, clone, & push
+#
+# SINCE 1.0.0
+git.defaultAccessRestriction = NONE
+
+# The default authorization control for new repositories.
+# Valid values are AUTHENTICATED and NAMED
+# AUTHENTICATED = any authenticated user is granted restricted access
+# NAMED = only named users/teams are granted restricted access
+#
+# SINCE 1.1.0
+git.defaultAuthorizationControl = NAMED
+
+# Enable JGit-based garbage collection. (!!EXPERIMENTAL!!)
+#
+# USE AT YOUR OWN RISK!
+#
+# If enabled, the garbage collection executor scans all repositories once a day
+# at the hour of your choosing. The GC executor will take each repository "offline",
+# one-at-a-time, to check if the repository satisfies it's GC trigger requirements.
+#
+# While the repository is offline it will be inaccessible from the web UI or from
+# any of the other services (git, rpc, rss, etc).
+#
+# Gitblit's GC Executor MAY NOT PLAY NICE with the other Git kids on the block,
+# especially on Windows systems, so if you are using other tools please coordinate
+# their usage with your GC Executor schedule or do not use this feature.
+#
+# The GC algorithm complex and the JGit team advises caution when using their
+# young implementation of GC.
+#
+# http://wiki.eclipse.org/EGit/New_and_Noteworthy/2.1#Garbage_Collector_and_Repository_Storage_Statistics
+#
+# EXPERIMENTAL
+# SINCE 1.2.0
+# RESTART REQUIRED
+git.enableGarbageCollection = false
+
+# Hour of the day for the GC Executor to scan repositories.
+# This value is in 24-hour time.
+#
+# SINCE 1.2.0
+git.garbageCollectionHour = 0
+
+# The default minimum total filesize of loose objects to trigger early garbage
+# collection.
+#
+# You may specify a custom threshold for a repository in the repository's settings.
+# Common unit suffixes of k, m, or g are supported.
+#
+# SINCE 1.2.0
+git.defaultGarbageCollectionThreshold = 500k
+
+# The default period, in days, between GCs for a repository. If the total filesize
+# of the loose object exceeds *git.garbageCollectionThreshold* or the repository's
+# custom threshold, this period will be short-circuited.
+#
+# e.g. if a repository collects 100KB of loose objects every day with a 500KB
+# threshold and a period of 7 days, it will take 5 days for the loose objects to
+# be collected, packed, and pruned.
+#
+# OR
+#
+# if a repository collects 10KB of loose objects every day with a 500KB threshold
+# and a period of 7 days, it will take the full 7 days for the loose objects to be
+# collected, packed, and pruned.
+#
+# You may specify a custom period for a repository in the repository's settings.
+#
+# The minimum value is 1 day since the GC Executor only runs once a day.
+#
+# SINCE 1.2.0
+git.defaultGarbageCollectionPeriod = 7
+
+# Number of bytes of a pack file to load into memory in a single read operation.
+# This is the "page size" of the JGit buffer cache, used for all pack access
+# operations. All disk IO occurs as single window reads. Setting this too large
+# may cause the process to load more data than is required; setting this too small
+# may increase the frequency of read() system calls.
+#
+# Default on JGit is 8 KiB on all platforms.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitWindowSize = 8k
+
+# Maximum number of bytes to load and cache in memory from pack files. If JGit
+# needs to access more than this many bytes it will unload less frequently used
+# windows to reclaim memory space within the process. As this buffer must be shared
+# with the rest of the JVM heap, it should be a fraction of the total memory available.
+#
+# The JGit team recommends setting this value larger than the size of your biggest
+# repository. This ensures you can serve most requests from memory.
+#
+# Default on JGit is 10 MiB on all platforms.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitLimit = 10m
+
+# Maximum number of bytes to reserve for caching base objects that multiple deltafied
+# objects reference. By storing the entire decompressed base object in a cache Git
+# is able to avoid unpacking and decompressing frequently used base objects multiple times.
+#
+# Default on JGit is 10 MiB on all platforms. You probably do not need to adjust
+# this value.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.deltaBaseCacheLimit = 10m
+
+# Maximum number of pack files to have open at once. A pack file must be opened
+# in order for any of its data to be available in a cached window.
+#
+# If you increase this to a larger setting you may need to also adjust the ulimit
+# on file descriptors for the host JVM, as Gitblit needs additional file descriptors
+# available for network sockets and other repository data manipulation.
+#
+# Default on JGit is 128 file descriptors on all platforms.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitOpenFiles = 128
+
+# Largest object size, in bytes, that JGit will allocate as a contiguous byte
+# array. Any file revision larger than this threshold will have to be streamed,
+# typically requiring the use of temporary files under $GIT_DIR/objects to implement
+# psuedo-random access during delta decompression.
+#
+# Servers with very high traffic should set this to be larger than the size of
+# their common big files. For example a server managing the Android platform
+# typically has to deal with ~10-12 MiB XML files, so 15 m would be a reasonable
+# setting in that environment. Setting this too high may cause the JVM to run out
+# of heap space when handling very big binary files, such as device firmware or
+# CD-ROM ISO images. Make sure to adjust your JVM heap accordingly.
+#
+# Default is 50 MiB on all platforms.
+#
+# Common unit suffixes of k, m, or g are supported.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.streamFileThreshold = 50m
+
+# When true, JGit will use mmap() rather than malloc()+read() to load data from
+# pack files. The use of mmap can be problematic on some JVMs as the garbage
+# collector must deduce that a memory mapped segment is no longer in use before
+# a call to munmap() can be made by the JVM native code.
+#
+# In server applications (such as Gitblit) that need to access many pack files,
+# setting this to true risks artificially running out of virtual address space,
+# as the garbage collector cannot reclaim unused mapped spaces fast enough.
+#
+# Default on JGit is false. Although potentially slower, it yields much more
+# predictable behavior.
+# Documentation courtesy of the Gerrit project.
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+git.packedGitMmap = false
+
+#
+# Groovy Integration
+#
+
+# Location of Groovy scripts to use for Pre and Post receive hooks.
+# Use forward slashes even on Windows!!
+# e.g. c:/groovy
+#
+# RESTART REQUIRED
+# SINCE 0.8.0
+groovy.scriptsFolder = ${baseFolder}/groovy
+
+# Specify the directory Grape uses for downloading libraries.
+# http://groovy.codehaus.org/Grape
+#
+# RESTART REQUIRED
+# SINCE 1.0.0
+groovy.grapeFolder = ${baseFolder}/groovy/grape
+
+# Scripts to execute on Pre-Receive.
+#
+# These scripts execute after an incoming push has been parsed and validated
+# but BEFORE the changes are applied to the repository. You might reject a
+# push in this script based on the repository and branch the push is attempting
+# to change.
+#
+# Script names are case-sensitive on case-sensitive file systems. You may omit
+# the traditional ".groovy" from this list if your file extension is ".groovy"
+#
+# NOTE:
+# These scripts are only executed when pushing to *Gitblit*, not to other Git
+# tooling you may be using. Also note that these scripts are shared between
+# repositories. These are NOT repository-specific scripts! Within the script
+# you may customize the control-flow for a specific repository by checking the
+# *repository* variable.
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.8.0
+groovy.preReceiveScripts =
+
+# Scripts to execute on Post-Receive.
+#
+# These scripts execute AFTER an incoming push has been applied to a repository.
+# You might trigger a continuous-integration build here or send a notification.
+#
+# Script names are case-sensitive on case-sensitive file systems. You may omit
+# the traditional ".groovy" from this list if your file extension is ".groovy"
+#
+# NOTE:
+# These scripts are only executed when pushing to *Gitblit*, not to other Git
+# tooling you may be using. Also note that these scripts are shared between
+# repositories. These are NOT repository-specific scripts! Within the script
+# you may customize the control-flow for a specific repository by checking the
+# *repository* variable.
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.8.0
+groovy.postReceiveScripts =
+
+# Repository custom fields for Groovy Hook mechanism
+#
+# List of key=label pairs of custom fields to prompt for in the Edit Repository
+# page. These keys are stored in the repository's git config file in the
+# section [gitblit "customFields"]. Key names are alphanumeric only. These
+# fields are intended to be used for the Groovy hook mechanism where a script
+# can adjust it's execution based on the custom fields stored in the repository
+# config.
+#
+# e.g. "commitMsgRegex=Commit Message Regular Expression" anotherProperty=Another
+#
+# SPACE-DELIMITED
+# SINCE 1.0.0
+groovy.customFields =
+
+#
+# Authentication Settings
+#
+
+# Require authentication to see everything but the admin pages
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.authenticateViewPages = false
+
+# Require admin authentication for the admin functions and pages
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.authenticateAdminPages = true
+
+# Allow Gitblit to store a cookie in the user's browser for automatic
+# authentication. The cookie is generated by the user service.
+#
+# SINCE 0.5.0
+web.allowCookieAuthentication = true
+
+# Config file for storing project metadata
+#
+# SINCE 1.2.0
+web.projectsFile = ${baseFolder}/projects.conf
+
+# Either the full path to a user config file (users.conf)
+# OR the full path to a simple user properties file (users.properties)
+# OR a fully qualified class name that implements the IUserService interface.
+#
+# Alternative user services:
+# com.gitblit.LdapUserService
+# com.gitblit.RedmineUserService
+#
+# Any custom user service implementation must have a public default constructor.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+realm.userService = test-ui-users.conf
+
+# How to store passwords.
+# Valid values are plain, md5, or combined-md5. md5 is the hash of password.
+# combined-md5 is the hash of username.toLowerCase()+password.
+# Default is md5.
+#
+# SINCE 0.5.0
+realm.passwordStorage = md5
+
+# Minimum valid length for a plain text password.
+# Default value is 5. Absolute minimum is 4.
+#
+# SINCE 0.5.0
+realm.minPasswordLength = 5
+
+#
+# Gitblit Web Settings
+#
+# If blank Gitblit is displayed.
+#
+# SINCE 0.5.0
+web.siteName =
+
+# If *web.authenticateAdminPages*=true, users with "admin" role can create
+# repositories, create users, and edit repository metadata.
+#
+# If *web.authenticateAdminPages*=false, any user can execute the aforementioned
+# functions.
+#
+# SINCE 0.5.0
+web.allowAdministration = true
+
+# Allows rpc clients to list repositories and possibly manage or administer the
+# Gitblit server, if the authenticated account has administrator permissions.
+# See *web.enableRpcManagement* and *web.enableRpcAdministration*.
+#
+# SINCE 0.7.0
+web.enableRpcServlet = true
+
+# Allows rpc clients to manage repositories and users of the Gitblit instance,
+# if the authenticated account has administrator permissions.
+# Requires *web.enableRpcServlet=true*.
+#
+# SINCE 0.7.0
+web.enableRpcManagement = false
+
+# Allows rpc clients to control the server settings and monitor the health of this
+# this Gitblit instance, if the authenticated account has administrator permissions.
+# Requires *web.enableRpcServlet=true* and *web.enableRpcManagement*.
+#
+# SINCE 0.7.0
+web.enableRpcAdministration = false
+
+# Full path to a configurable robots.txt file. With this file you can control
+# what parts of your Gitblit server respectable robots are allowed to traverse.
+# http://googlewebmastercentral.blogspot.com/2008/06/improving-on-robots-exclusion-protocol.html
+#
+# SINCE 1.0.0
+web.robots.txt =
+
+# If true, the web ui layout will respond and adapt to the browser's dimensions.
+# if false, the web ui will use a 940px fixed-width layout.
+# http://twitter.github.com/bootstrap/scaffolding.html#responsive
+#
+# SINCE 1.0.0
+web.useResponsiveLayout = true
+
+# Allow Gravatar images to be displayed in Gitblit pages.
+#
+# SINCE 0.8.0
+web.allowGravatar = true
+
+# Allow dynamic zip downloads.
+#
+# SINCE 0.5.0
+web.allowZipDownloads = true
+
+# If *web.allowZipDownloads=true* the following formats will be displayed for
+# download compressed archive links:
+#
+# zip = standard .zip
+# tar = standard tar format (preserves *nix permissions and symlinks)
+# gz = gz-compressed tar
+# xz = xz-compressed tar
+# bzip2 = bzip2-compressed tar
+#
+# SPACE-DELIMITED
+# SINCE 1.2.0
+web.compressedDownloads = zip gz
+
+# Allow optional Lucene integration. Lucene indexing is an opt-in feature.
+# A repository may specify branches to index with Lucene instead of using Git
+# commit traversal. There are scenarios where you may want to completely disable
+# Lucene indexing despite a repository specifying indexed branches. One such
+# scenario is on a resource-constrained federated Gitblit mirror.
+#
+# SINCE 0.9.0
+web.allowLuceneIndexing = false
+
+# Allows an authenticated user to create forks of a repository
+#
+# set this to false if you want to disable all fork controls on the web site
+#
+web.allowForking = true
+
+# Controls the length of shortened commit hash ids
+#
+# SINCE 1.2.0
+web.shortCommitIdLength = 6
+
+# Use Clippy (Flash solution) to provide a copy-to-clipboard button.
+# If false, a button with a more primitive JavaScript-based prompt box will
+# offer a 3-step (click, ctrl+c, enter) copy-to-clipboard alternative.
+#
+# SINCE 0.8.0
+web.allowFlashCopyToClipboard = true
+
+# Default maximum number of commits that a repository may contribute to the
+# activity page, regardless of the selected duration. This setting may be valuable
+# for an extremely busy server. This value may also be configed per-repository
+# in Edit Repository. 0 disables this throttle.
+#
+# SINCE 1.2.0
+web.maxActivityCommits = 0
+
+# Default number of entries to include in RSS Syndication links
+#
+# SINCE 0.5.0
+web.syndicationEntries = 25
+
+# Show the size of each repository on the repositories page.
+# This requires recursive traversal of each repository folder. This may be
+# non-performant on some operating systems and/or filesystems.
+#
+# SINCE 0.5.2
+web.showRepositorySizes = true
+
+# List of custom regex expressions that can be displayed in the Filters menu
+# of the Repositories and Activity pages. Keep them very simple because you
+# are likely to run into encoding issues if they are too complex.
+#
+# Use !!! to separate the filters
+#
+# SINCE 0.8.0
+web.customFilters =
+
+# Show federation registrations (without token) and the current pull status
+# to non-administrator users.
+#
+# SINCE 0.6.0
+web.showFederationRegistrations = false
+
+# This is the message displayed when *web.authenticateViewPages=true*.
+# This can point to a file with Markdown content.
+# Specifying "gitblit" uses the internal login message.
+#
+# SINCE 0.7.0
+web.loginMessage = gitblit
+
+# This is the message displayed above the repositories table.
+# This can point to a file with Markdown content.
+# Specifying "gitblit" uses the internal welcome message.
+#
+# SINCE 0.5.0
+web.repositoriesMessage = gitblit
+
+# Ordered list of charsets/encodings to use when trying to display a blob.
+# If empty, UTF-8 and ISO-8859-1 are used. The server's default charset
+# is always appended to the encoding list. If all encodings fail to cleanly
+# decode the blob content, UTF-8 will be used with the standard malformed
+# input/unmappable character replacement strings.
+#
+# SPACE-DELIMITED
+# SINCE 1.0.0
+web.blobEncodings = UTF-8 ISO-8859-1
+
+# Manually set the default timezone to be used by Gitblit for display in the
+# web ui. This value is independent of the JVM timezone. Specifying a blank
+# value will default to the JVM timezone.
+# e.g. America/New_York, US/Pacific, UTC, Europe/Berlin
+#
+# SINCE 0.9.0
+# RESTART REQUIRED
+web.timezone =
+
+# Use the client timezone when formatting dates.
+# This uses AJAX to determine the browser's timezone and may require more
+# server overhead because a Wicket session is created. All Gitblit pages
+# attempt to be stateless, if possible.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.useClientTimezone = false
+
+# Time format
+# <http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html>
+#
+# SINCE 0.8.0
+web.timeFormat = HH:mm
+
+# Short date format
+# <http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html>
+#
+# SINCE 0.5.0
+web.datestampShortFormat = yyyy-MM-dd
+
+# Long date format
+#
+# SINCE 0.8.0
+web.datestampLongFormat = EEEE, MMMM d, yyyy
+
+# Long timestamp format
+# <http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html>
+#
+# SINCE 0.5.0
+web.datetimestampLongFormat = EEEE, MMMM d, yyyy HH:mm Z
+
+# Mount URL parameters
+# This setting controls if pretty or parameter URLs are used.
+# i.e.
+# if true:
+# http://localhost/commit/myrepo/abcdef
+# if false:
+# http://localhost/commit/?r=myrepo&h=abcdef
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.mountParameters = true
+
+# Some servlet containers (e.g. Tomcat >= 6.0.10) disallow '/' (%2F) encoding
+# in URLs as a security precaution for proxies. This setting tells Gitblit
+# to preemptively replace '/' with '*' or '!' for url string parameters.
+#
+# <https://issues.apache.org/jira/browse/WICKET-1303>
+# <http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10>
+# Add *-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true* to your
+# *CATALINA_OPTS* or to your JVM launch parameters
+#
+# SINCE 0.5.2
+web.forwardSlashCharacter = /
+
+# Show other URLs on the summary page for accessing your git repositories
+# Use spaces to separate urls. {0} is the token for the repository name.
+# e.g.
+# web.otherUrls = ssh://localhost/git/{0} git://localhost/git/{0}
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.otherUrls =
+
+# Choose how to present the repositories list.
+# grouped = group nested/subfolder repositories together (no sorting)
+# flat = flat list of repositories (sorting allowed)
+#
+# SINCE 0.5.0
+web.repositoryListType = grouped
+
+# If using a grouped repository list and there are repositories at the
+# root level of your repositories folder, you may specify the displayed
+# group name with this setting. This value is only used for web presentation.
+#
+# SINCE 0.5.0
+web.repositoryRootGroupName = main
+
+# Display the repository swatch color next to the repository name link in the
+# repositories list.
+#
+# SINCE 0.8.0
+web.repositoryListSwatches = true
+
+# Choose the diff presentation style: gitblt, gitweb, or plain
+#
+# SINCE 0.5.0
+web.diffStyle = gitblit
+
+# Control if email addresses are shown in web ui
+#
+# SINCE 0.5.0
+web.showEmailAddresses = true
+
+# Shows a combobox in the page links header with commit, committer, and author
+# search selection. Default search is commit.
+#
+# SINCE 0.5.0
+web.showSearchTypeSelection = false
+
+# Generates a line graph of repository activity over time on the Summary page.
+# This uses the Google Charts API.
+#
+# SINCE 0.5.0
+web.generateActivityGraph = true
+
+# The number of days to show on the activity page.
+# Value must exceed 0 else default of 14 is used
+#
+# SINCE 0.8.0
+web.activityDuration = 14
+
+# The number of commits to display on the summary page
+# Value must exceed 0 else default of 20 is used
+#
+# SINCE 0.5.0
+web.summaryCommitCount = 16
+
+# The number of tags/branches to display on the summary page.
+# -1 = all tags/branches
+# 0 = hide tags/branches
+# N = N tags/branches
+#
+# SINCE 0.5.0
+web.summaryRefsCount = 5
+
+# The number of items to show on a page before showing the first, prev, next
+# pagination links. A default if 50 is used for any invalid value.
+#
+# SINCE 0.5.0
+web.itemsPerPage = 50
+
+# Registered file extensions to ignore during Lucene indexing
+#
+# SPACE-DELIMITED
+# SINCE 0.9.0
+web.luceneIgnoreExtensions = 7z arc arj bin bmp dll doc docx exe gif gz jar jpg lib lzh odg odf odt pdf ppt png so swf xcf xls xlsx zip
+
+# Registered extensions for google-code-prettify
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.prettyPrintExtensions = c cpp cs css frm groovy htm html java js php pl prefs properties py rb scala sh sql xml vb
+
+# Registered extensions for markdown transformation
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.5.0
+web.markdownExtensions = md mkd markdown MD MKD
+
+# Image extensions
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.imageExtensions = bmp jpg gif png
+
+# Registered extensions for binary blobs
+#
+# SPACE-DELIMITED
+# SINCE 0.5.0
+web.binaryExtensions = jar pdf tar.gz zip
+
+# Aggressive heap management will run the garbage collector on every generated
+# page. This slows down page generation a little but improves heap consumption.
+#
+# SINCE 0.5.0
+web.aggressiveHeapManagement = false
+
+# Run the webapp in debug mode
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+web.debugMode = false
+
+# Enable/disable global regex substitutions (i.e. shared across repositories)
+#
+# SINCE 0.5.0
+regex.global = true
+
+# Example global regex substitutions
+# Use !!! to separate the search pattern and the replace pattern
+# searchpattern!!!replacepattern
+# SINCE 0.5.0
+regex.global.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://somehost/bug/$3">Bug-Id: $3</a>
+# SINCE 0.5.0
+regex.global.changeid = \\b(Change-Id:\\s*)([A-Za-z0-9]*)\\b!!!<a href="http://somehost/changeid/$2">Change-Id: $2</a>
+
+# Example per-repository regex substitutions overrides global
+# SINCE 0.5.0
+regex.myrepository.bug = \\b(Bug:)(\\s*[#]?|-){0,1}(\\d+)\\b!!!<a href="http://elsewhere/bug/$3">Bug-Id: $3</a>
+
+#
+# Mail Settings
+# SINCE 0.6.0
+#
+# Mail settings are used to notify administrators of received federation proposals
+#
+
+# ip or hostname of smtp server
+#
+# SINCE 0.6.0
+mail.server =
+
+# port to use for smtp requests
+#
+# SINCE 0.6.0
+mail.port = 25
+
+# debug the mail executor
+#
+# SINCE 0.6.0
+mail.debug = false
+
+# if your smtp server requires authentication, supply the credentials here
+#
+# SINCE 0.6.0
+mail.username =
+# SINCE 0.6.0
+mail.password =
+
+# from address for generated emails
+#
+# SINCE 0.6.0
+mail.fromAddress =
+
+# List of email addresses for the Gitblit administrators
+#
+# SPACE-DELIMITED
+# SINCE 0.6.0
+mail.adminAddresses =
+
+# List of email addresses for sending push email notifications.
+#
+# This key currently requires use of the sendemail.groovy hook script.
+# If you set sendemail.groovy in *groovy.postReceiveScripts* then email
+# notifications for all repositories (regardless of access restrictions!)
+# will be sent to these addresses.
+#
+# SPACE-DELIMITED
+# SINCE 0.8.0
+mail.mailingLists =
+
+#
+# Federation Settings
+# SINCE 0.6.0
+#
+# A Gitblit federation is a way to backup one Gitblit instance to another.
+#
+# *git.enableGitServlet* must be true to use this feature.
+
+# Your federation name is used for federation status acknowledgments. If it is
+# unset, and you elect to send a status acknowledgment, your Gitblit instance
+# will be identified by its hostname, if available, else your internal ip address.
+# The source Gitblit instance will also append your external IP address to your
+# identification to differentiate multiple pulling systems behind a single proxy.
+#
+# SINCE 0.6.0
+federation.name =
+
+# Specify the passphrase of this Gitblit instance.
+#
+# An unspecified (empty) passphrase disables processing federation requests.
+#
+# This value can be anything you want: an integer, a sentence, an haiku, etc.
+# Keep the value simple, though, to avoid Java properties file encoding issues.
+#
+# Changing your passphrase will break any registrations you have established with other
+# Gitblit instances.
+#
+# CASE-SENSITIVE
+# SINCE 0.6.0
+# RESTART REQUIRED *(only to enable or disable federation)*
+federation.passphrase =
+
+# Control whether or not this Gitblit instance can receive federation proposals
+# from another Gitblit instance. Registering a federated Gitblit is a manual
+# process. Proposals help to simplify that process by allowing a remote Gitblit
+# instance to send your Gitblit instance the federation pull data.
+#
+# SINCE 0.6.0
+federation.allowProposals = false
+
+# The destination folder for cached federation proposals.
+# Use forward slashes even on Windows!!
+#
+# SINCE 0.6.0
+federation.proposalsFolder = ${baseFolder}/proposals
+
+# The default pull frequency if frequency is unspecified on a registration
+#
+# SINCE 0.6.0
+federation.defaultFrequency = 60 mins
+
+# Federation Sets are named groups of repositories. The Federation Sets are
+# available for selection in the repository settings page. You can assign a
+# repository to one or more sets and then distribute the token for the set.
+# This allows you to grant federation pull access to a subset of your available
+# repositories. Tokens for federation sets only grant repository pull access.
+#
+# SPACE-DELIMITED
+# CASE-SENSITIVE
+# SINCE 0.6.0
+federation.sets =
+
+# Federation pull registrations
+# Registrations are read once, at startup.
+#
+# RESTART REQUIRED
+#
+# frequency:
+# The shortest frequency allowed is every 5 minutes
+# Decimal frequency values are cast to integers
+# Frequency values may be specified in mins, hours, or days
+# Values that can not be parsed or are unspecified default to *federation.defaultFrequency*
+#
+# folder:
+# if unspecified, the folder is *git.repositoriesFolder*
+# if specified, the folder is relative to *git.repositoriesFolder*
+#
+# bare:
+# if true, each repository will be created as a *bare* repository and will not
+# have a working directory.
+#
+# if false, each repository will be created as a normal repository suitable
+# for local work.
+#
+# mirror:
+# if true, each repository HEAD is reset to *origin/master* after each pull.
+# The repository will be flagged *isFrozen* after the initial clone.
+#
+# if false, each repository HEAD will point to the FETCH_HEAD of the initial
+# clone from the origin until pushed to or otherwise manipulated.
+#
+# mergeAccounts:
+# if true, remote accounts and their permissions are merged into your
+# users.properties file
+#
+# notifyOnError:
+# if true and the mail configuration is properly set, administrators will be
+# notified by email of pull failures
+#
+# include and exclude:
+# Space-delimited list of repositories to include or exclude from pull
+# may be * wildcard to include or exclude all
+# may use fuzzy match (e.g. org.eclipse.*)
+
+#
+# (Nearly) Perfect Mirror example
+#
+
+#federation.example1.url = https://go.gitblit.com
+#federation.example1.token = 6f3b8a24bf970f17289b234284c94f43eb42f0e4
+#federation.example1.frequency = 120 mins
+#federation.example1.folder =
+#federation.example1.bare = true
+#federation.example1.mirror = true
+#federation.example1.mergeAccounts = true
+
+#
+# Advanced Realm Settings
+#
+
+# URL of the LDAP server.
+# To use encrypted transport, use either ldaps:// URL for SSL or ldap+tls:// to
+# send StartTLS command.
+#
+# SINCE 1.0.0
+realm.ldap.server = ldap://localhost
+
+# Login username for LDAP searches.
+# If this value is unspecified, anonymous LDAP login will be used.
+#
+# e.g. mydomain\\username
+#
+# SINCE 1.0.0
+realm.ldap.username = cn=Directory Manager
+
+# Login password for LDAP searches.
+#
+# SINCE 1.0.0
+realm.ldap.password = password
+
+# The LdapUserService must be backed by another user service for standard user
+# and team management.
+# default: users.conf
+#
+# SINCE 1.0.0
+# RESTART REQUIRED
+realm.ldap.backingUserService = test-ui-users.conf
+
+# Delegate team membership control to LDAP.
+#
+# If true, team user memberships will be specified by LDAP groups. This will
+# disable team selection in Edit User and user selection in Edit Team.
+#
+# If false, LDAP will only be used for authentication and Gitblit will maintain
+# team memberships with the *realm.ldap.backingUserService*.
+#
+# SINCE 1.0.0
+realm.ldap.maintainTeams = false
+
+# Root node for all LDAP users
+#
+# This is the root node from which subtree user searches will begin.
+# If blank, Gitblit will search ALL nodes.
+#
+# SINCE 1.0.0
+realm.ldap.accountBase = OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+# Filter criteria for LDAP users
+#
+# Query pattern to use when searching for a user account. This may be any valid
+# LDAP query expression, including the standard (&) and (|) operators.
+#
+# Variables may be injected via the ${variableName} syntax.
+# Recognized variables are:
+# ${username} - The text entered as the user name
+#
+# SINCE 1.0.0
+realm.ldap.accountPattern = (&(objectClass=person)(sAMAccountName=${username}))
+
+# Root node for all LDAP groups to be used as Gitblit Teams
+#
+# This is the root node from which subtree team searches will begin.
+# If blank, Gitblit will search ALL nodes.
+#
+# SINCE 1.0.0
+realm.ldap.groupBase = OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+# Filter criteria for LDAP groups
+#
+# Query pattern to use when searching for a team. This may be any valid
+# LDAP query expression, including the standard (&) and (|) operators.
+#
+# Variables may be injected via the ${variableName} syntax.
+# Recognized variables are:
+# ${username} - The text entered as the user name
+# ${dn} - The Distinguished Name of the user logged in
+#
+# All attributes from the LDAP User record are available. For example, if a user
+# has an attribute "fullName" set to "John", "(fn=${fullName})" will be
+# translated to "(fn=John)".
+#
+# SINCE 1.0.0
+realm.ldap.groupMemberPattern = (&(objectClass=group)(member=${dn}))
+
+# LDAP users or groups that should be given administrator privileges.
+#
+# Teams are specified with a leading '@' character. Groups with spaces in the
+# name can be entered as "@team name".
+#
+# e.g. realm.ldap.admins = john @git_admins "@git admins"
+#
+# SPACE-DELIMITED
+# SINCE 1.0.0
+realm.ldap.admins = @Git_Admins
+
+# Attribute(s) on the USER record that indicate their display (or full) name.
+# Leave blank for no mapping available in LDAP.
+#
+# This may be a single attribute, or a string of multiple attributes. Examples:
+# displayName - Uses the attribute 'displayName' on the user record
+# ${personalTitle}. ${givenName} ${surname} - Will concatenate the 3
+# attributes together, with a '.' after personalTitle
+#
+# SINCE 1.0.0
+realm.ldap.displayName = displayName
+
+# Attribute(s) on the USER record that indicate their email address.
+# Leave blank for no mapping available in LDAP.
+#
+# This may be a single attribute, or a string of multiple attributes. Examples:
+# email - Uses the attribute 'email' on the user record
+# ${givenName}.${surname}@gitblit.com -Will concatenate the 2 attributes
+# together with a '.' and '@' creating something like first.last@gitblit.com
+#
+# SINCE 1.0.0
+realm.ldap.email = email
+
+# The RedmineUserService must be backed by another user service for standard user
+# and team management.
+# default: users.conf
+#
+# RESTART REQUIRED
+realm.redmine.backingUserService = test-ui-users.conf
+
+# URL of the Redmine.
+realm.redmine.url = http://example.com/redmine
+
+#
+# Server Settings
+#
+
+# The temporary folder to decompress the embedded gitblit webapp.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.tempFolder = ${baseFolder}/temp
+
+# Use Jetty NIO connectors. If false, Jetty Socket connectors will be used.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.useNio = true
+
+# Context path for the GO application. You might want to change the context
+# path if running Gitblit behind a proxy layer such as mod_proxy.
+#
+# SINCE 0.7.0
+# RESTART REQUIRED
+server.contextPath = /
+
+# Standard http port to serve. <= 0 disables this connector.
+# On Unix/Linux systems, ports < 1024 require root permissions.
+# Recommended value: 80 or 8080
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpPort = 0
+
+# Secure/SSL https port to serve. <= 0 disables this connector.
+# On Unix/Linux systems, ports < 1024 require root permissions.
+# Recommended value: 443 or 8443
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpsPort = 8443
+
+# Port for serving an Apache JServ Protocol (AJP) 1.3 connector for integrating
+# Gitblit GO into an Apache HTTP server setup. <= 0 disables this connector.
+# Recommended value: 8009
+#
+# SINCE 0.9.0
+# RESTART REQUIRED
+server.ajpPort = 0
+
+# Specify the interface for Jetty to bind the standard connector.
+# You may specify an ip or an empty value to bind to all interfaces.
+# Specifying localhost will result in Gitblit ONLY listening to requests to
+# localhost.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpBindInterface = localhost
+
+# Specify the interface for Jetty to bind the secure connector.
+# You may specify an ip or an empty value to bind to all interfaces.
+# Specifying localhost will result in Gitblit ONLY listening to requests to
+# localhost.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.httpsBindInterface = localhost
+
+# Specify the interface for Jetty to bind the AJP connector.
+# You may specify an ip or an empty value to bind to all interfaces.
+# Specifying localhost will result in Gitblit ONLY listening to requests to
+# localhost.
+#
+# SINCE 0.9.0
+# RESTART REQUIRED
+server.ajpBindInterface = localhost
+
+# Alias of certificate to use for https/SSL serving. If blank the first
+# certificate found in the keystore will be used.
+#
+# SINCE 1.2.0
+# RESTART REQUIRED
+server.certificateAlias = localhost
+
+# Password for SSL keystore.
+# Keystore password and certificate password must match.
+# This is provided for convenience, its probably more secure to set this value
+# using the --storePassword command line parameter.
+#
+# If you are using the official JRE or JDK from Oracle you may not have the
+# JCE Unlimited Strength Jurisdiction Policy files bundled with your JVM. Because
+# of this, your store/key password can not exceed 7 characters. If you require
+# longer passwords you may need to install the JCE Unlimited Strength Jurisdiction
+# Policy files from Oracle.
+#
+# http://www.oracle.com/technetwork/java/javase/downloads/index.html
+#
+# Gitblit and the Gitblit Certificate Authority will both indicate if Unlimited
+# Strength encryption is available.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.storePassword = gitblit
+
+# If serving over https (recommended) you might consider requiring clients to
+# authenticate with ssl certificates. If enabled, only https clients with the
+# a valid client certificate will be able to access Gitblit.
+#
+# If disabled, client certificate authentication is optional and will be tried
+# first before falling-back to form authentication or basic authentication.
+#
+# Requiring client certificates to access any of Gitblit may be too extreme,
+# consider this carefully.
+#
+# SINCE 1.2.0
+# RESTART REQUIRED
+server.requireClientCertificates = false
+
+# Port for shutdown monitor to listen on.
+#
+# SINCE 0.5.0
+# RESTART REQUIRED
+server.shutdownPort = 8081
diff --git a/src/test/config/test-ui-users.conf b/src/test/config/test-ui-users.conf
new file mode 100644
index 00000000..5bf35f3b
--- /dev/null
+++ b/src/test/config/test-ui-users.conf
@@ -0,0 +1,44 @@
+[user "admin"]
+ password = admin
+ cookie = dd94709528bb1c83d08f3088d4043f4742891f4f
+ role = "#admin"
+ role = "#notfederated"
+[user "userthree"]
+ password = StoredInLDAP
+ cookie = d7d3894fc517612aa6c595555b6e1ab8e147e597
+ displayName = User Three
+ emailAddress = userthree@gitblit.com
+ role = "#admin"
+[user "userone"]
+ password = StoredInLDAP
+ cookie = c97cd38e50858cd0b389ec61b18fb9a89b4da54c
+ displayName = User One
+ emailAddress = User.One@gitblit.com
+ role = "#admin"
+[user "usertwo"]
+ password = StoredInLDAP
+ cookie = 498ca9bd2841d39050fa45d1d737b9f9f767858d
+ displayName = User Two
+ emailAddress = usertwo@gitblit.com
+ role = "#admin"
+[user "basic"]
+ password = MD5:f17aaabc20bfe045075927934fed52d2
+ cookie = dd94709528bb1c83d08f3088d4043f4742891f4f
+ role = "#fork"
+ repository = RW:~repocreator/shb.git
+ repository = V:test/gitective.git
+[user "repocreator"]
+ password = MD5:b77e53bb561c47368d133b22e285f60b
+ cookie = dd94709528bb1c83d08f3088d4043f4742891f4f
+ role = "#create"
+[team "Git_Admins"]
+ role = "#none"
+ user = userone
+[team "Git_Users"]
+ role = "#none"
+ user = userone
+ user = usertwo
+ user = userthree
+[team "Git Admins"]
+ role = "#none"
+ user = usertwo
diff --git a/src/test/config/test-users.conf b/src/test/config/test-users.conf
new file mode 100644
index 00000000..4f947872
--- /dev/null
+++ b/src/test/config/test-users.conf
@@ -0,0 +1,8 @@
+[user "admin"]
+ password = admin
+ cookie = dd94709528bb1c83d08f3088d4043f4742891f4f
+ role = "#admin"
+ role = "#notfederated"
+[team "admins"]
+ role = "#none"
+ user = admin
diff --git a/src/test/java/com/gitblit/tests/ActivityTest.java b/src/test/java/com/gitblit/tests/ActivityTest.java
new file mode 100644
index 00000000..22713260
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/ActivityTest.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+import com.gitblit.models.GravatarProfile;
+import com.gitblit.utils.ActivityUtils;
+
+public class ActivityTest {
+
+ @Test
+ public void testGravatarProfile() throws IOException {
+ GravatarProfile profile = ActivityUtils.getGravatarProfile("beau@dentedreality.com.au");
+ assertEquals("beau", profile.preferredUsername);
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/ArrayUtilsTest.java b/src/test/java/com/gitblit/tests/ArrayUtilsTest.java
new file mode 100644
index 00000000..8a38afbb
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/ArrayUtilsTest.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2012 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.junit.Test;
+
+import com.gitblit.utils.ArrayUtils;
+
+public class ArrayUtilsTest {
+
+ @Test
+ public void testArrays() {
+ Object [] nullArray = null;
+ assertTrue(ArrayUtils.isEmpty(nullArray));
+
+ Object [] emptyArray = new Object[0];
+ assertTrue(ArrayUtils.isEmpty(emptyArray));
+
+ assertFalse(ArrayUtils.isEmpty(new String [] { "" }));
+ }
+
+ @Test
+ public void testLists() {
+ List<?> nullList = null;
+ assertTrue(ArrayUtils.isEmpty(nullList));
+
+ List<?> emptyList = new ArrayList<Object>();
+ assertTrue(ArrayUtils.isEmpty(emptyList));
+
+ List<?> list = Arrays.asList("");
+ assertFalse(ArrayUtils.isEmpty(list));
+ }
+
+ @Test
+ public void testSets() {
+ Set<?> nullSet = null;
+ assertTrue(ArrayUtils.isEmpty(nullSet));
+
+ Set<?> emptySet = new HashSet<Object>();
+ assertTrue(ArrayUtils.isEmpty(emptySet));
+
+ Set<?> set = new HashSet<Object>(Arrays.asList(""));
+ assertFalse(ArrayUtils.isEmpty(set));
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/Base64Test.java b/src/test/java/com/gitblit/tests/Base64Test.java
new file mode 100644
index 00000000..2962c36f
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/Base64Test.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+import com.gitblit.utils.Base64;
+
+public class Base64Test {
+
+ @Test
+ public void testBase64() {
+ String source = "this is a test";
+ String base64 = Base64.encodeBytes(source.getBytes());
+ assertEquals("dGhpcyBpcyBhIHRlc3Q=", base64);
+ String decoded = new String(Base64.decode(base64));
+ assertEquals(source, decoded);
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/ByteFormatTest.java b/src/test/java/com/gitblit/tests/ByteFormatTest.java
new file mode 100644
index 00000000..d59055e7
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/ByteFormatTest.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+import com.gitblit.utils.ByteFormat;
+
+public class ByteFormatTest {
+
+ @Test
+ public void testByteFormat() throws Exception {
+ ByteFormat format = new ByteFormat();
+ assertEquals("10 b", format.format(10));
+ assertEquals("10 KB", format.format(1024 * 10));
+ assertEquals("1,000 KB", format.format(1024 * 1000));
+ assertEquals("2.0 MB", format.format(2 * 1024 * 1000));
+ assertEquals("1,000.0 MB", format.format(1024 * 1024 * 1000));
+ assertEquals("2.0 GB", format.format(2 * 1024 * 1024 * 1000));
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/DiffUtilsTest.java b/src/test/java/com/gitblit/tests/DiffUtilsTest.java
new file mode 100644
index 00000000..53eff313
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/DiffUtilsTest.java
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.List;
+
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.junit.Test;
+
+import com.gitblit.models.AnnotatedLine;
+import com.gitblit.utils.DiffUtils;
+import com.gitblit.utils.DiffUtils.DiffOutputType;
+import com.gitblit.utils.JGitUtils;
+
+public class DiffUtilsTest {
+
+ @Test
+ public void testDiffOutputTypes() throws Exception {
+ assertEquals(DiffOutputType.PLAIN, DiffOutputType.forName("plain"));
+ assertEquals(DiffOutputType.GITWEB, DiffOutputType.forName("gitweb"));
+ assertEquals(DiffOutputType.GITBLIT, DiffOutputType.forName("gitblit"));
+ assertEquals(null, DiffOutputType.forName(null));
+ }
+
+ @Test
+ public void testParentCommitDiff() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ RevCommit commit = JGitUtils.getCommit(repository,
+ "1d0c2933a4ae69c362f76797d42d6bd182d05176");
+ String diff = DiffUtils.getCommitDiff(repository, commit, DiffOutputType.PLAIN);
+ repository.close();
+ assertTrue(diff != null && diff.length() > 0);
+ String expected = "- system.out.println(\"Hello World\");\n+ System.out.println(\"Hello World\"";
+ assertTrue(diff.indexOf(expected) > -1);
+ }
+
+ @Test
+ public void testArbitraryCommitDiff() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ RevCommit baseCommit = JGitUtils.getCommit(repository,
+ "8baf6a833b5579384d9b9ceb8a16b5d0ea2ec4ca");
+ RevCommit commit = JGitUtils.getCommit(repository,
+ "1d0c2933a4ae69c362f76797d42d6bd182d05176");
+ String diff = DiffUtils.getDiff(repository, baseCommit, commit, DiffOutputType.PLAIN);
+ repository.close();
+ assertTrue(diff != null && diff.length() > 0);
+ String expected = "- system.out.println(\"Hello World\");\n+ System.out.println(\"Hello World\"";
+ assertTrue(diff.indexOf(expected) > -1);
+ }
+
+ @Test
+ public void testPlainFileDiff() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ RevCommit commit = JGitUtils.getCommit(repository,
+ "1d0c2933a4ae69c362f76797d42d6bd182d05176");
+ String diff = DiffUtils.getDiff(repository, commit, "java.java", DiffOutputType.PLAIN);
+ repository.close();
+ assertTrue(diff != null && diff.length() > 0);
+ String expected = "- system.out.println(\"Hello World\");\n+ System.out.println(\"Hello World\"";
+ assertTrue(diff.indexOf(expected) > -1);
+ }
+
+ @Test
+ public void testFilePatch() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ RevCommit commit = JGitUtils.getCommit(repository,
+ "1d0c2933a4ae69c362f76797d42d6bd182d05176");
+ String patch = DiffUtils.getCommitPatch(repository, null, commit, "java.java");
+ repository.close();
+ assertTrue(patch != null && patch.length() > 0);
+ String expected = "- system.out.println(\"Hello World\");\n+ System.out.println(\"Hello World\"";
+ assertTrue(patch.indexOf(expected) > -1);
+ }
+
+ @Test
+ public void testArbitraryFilePatch() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ RevCommit baseCommit = JGitUtils.getCommit(repository,
+ "8baf6a833b5579384d9b9ceb8a16b5d0ea2ec4ca");
+ RevCommit commit = JGitUtils.getCommit(repository,
+ "1d0c2933a4ae69c362f76797d42d6bd182d05176");
+ String patch = DiffUtils.getCommitPatch(repository, baseCommit, commit, "java.java");
+ repository.close();
+ assertTrue(patch != null && patch.length() > 0);
+ String expected = "- system.out.println(\"Hello World\");\n+ System.out.println(\"Hello World\"";
+ assertTrue(patch.indexOf(expected) > -1);
+ }
+
+ @Test
+ public void testArbitraryCommitPatch() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ RevCommit baseCommit = JGitUtils.getCommit(repository,
+ "8baf6a833b5579384d9b9ceb8a16b5d0ea2ec4ca");
+ RevCommit commit = JGitUtils.getCommit(repository,
+ "1d0c2933a4ae69c362f76797d42d6bd182d05176");
+ String patch = DiffUtils.getCommitPatch(repository, baseCommit, commit, null);
+ repository.close();
+ assertTrue(patch != null && patch.length() > 0);
+ String expected = "- system.out.println(\"Hello World\");\n+ System.out.println(\"Hello World\"";
+ assertTrue(patch.indexOf(expected) > -1);
+ }
+
+ @Test
+ public void testBlame() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ List<AnnotatedLine> lines = DiffUtils.blame(repository, "java.java",
+ "1d0c2933a4ae69c362f76797d42d6bd182d05176");
+ repository.close();
+ assertTrue(lines.size() > 0);
+ assertEquals("c6d31dccf5cc75e8e46299fc62d38f60ec6d41e0", lines.get(0).commitId);
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/FanoutServiceTest.java b/src/test/java/com/gitblit/tests/FanoutServiceTest.java
new file mode 100644
index 00000000..28e5d82d
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/FanoutServiceTest.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright 2013 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+
+import java.text.MessageFormat;
+import java.util.Date;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.junit.Test;
+
+import com.gitblit.fanout.FanoutService;
+import com.gitblit.fanout.FanoutClient;
+import com.gitblit.fanout.FanoutClient.FanoutAdapter;
+import com.gitblit.fanout.FanoutNioService;
+import com.gitblit.fanout.FanoutService;
+import com.gitblit.fanout.FanoutSocketService;
+
+public class FanoutServiceTest {
+
+ int fanoutPort = FanoutService.DEFAULT_PORT;
+
+ @Test
+ public void testNioPubSub() throws Exception {
+ testPubSub(new FanoutNioService(fanoutPort));
+ }
+
+ @Test
+ public void testSocketPubSub() throws Exception {
+ testPubSub(new FanoutSocketService(fanoutPort));
+ }
+
+ @Test
+ public void testNioDisruptionAndRecovery() throws Exception {
+ testDisruption(new FanoutNioService(fanoutPort));
+ }
+
+ @Test
+ public void testSocketDisruptionAndRecovery() throws Exception {
+ testDisruption(new FanoutSocketService(fanoutPort));
+ }
+
+ protected void testPubSub(FanoutService service) throws Exception {
+ System.out.println(MessageFormat.format("\n\n========================================\nPUBSUB TEST {0}\n========================================\n\n", service.toString()));
+ service.startSynchronously();
+
+ final Map<String, String> announcementsA = new ConcurrentHashMap<String, String>();
+ FanoutClient clientA = new FanoutClient("localhost", fanoutPort);
+ clientA.addListener(new FanoutAdapter() {
+
+ @Override
+ public void announcement(String channel, String message) {
+ announcementsA.put(channel, message);
+ }
+ });
+
+ clientA.startSynchronously();
+
+ final Map<String, String> announcementsB = new ConcurrentHashMap<String, String>();
+ FanoutClient clientB = new FanoutClient("localhost", fanoutPort);
+ clientB.addListener(new FanoutAdapter() {
+ @Override
+ public void announcement(String channel, String message) {
+ announcementsB.put(channel, message);
+ }
+ });
+ clientB.startSynchronously();
+
+
+ // subscribe clients A and B to the channels
+ clientA.subscribe("a");
+ clientA.subscribe("b");
+ clientA.subscribe("c");
+
+ clientB.subscribe("a");
+ clientB.subscribe("b");
+ clientB.subscribe("c");
+
+ // give async messages a chance to be delivered
+ Thread.sleep(1000);
+
+ clientA.announce("a", "apple");
+ clientA.announce("b", "banana");
+ clientA.announce("c", "cantelope");
+
+ clientB.announce("a", "avocado");
+ clientB.announce("b", "beet");
+ clientB.announce("c", "carrot");
+
+ // give async messages a chance to be delivered
+ Thread.sleep(2000);
+
+ // confirm that client B received client A's announcements
+ assertEquals("apple", announcementsB.get("a"));
+ assertEquals("banana", announcementsB.get("b"));
+ assertEquals("cantelope", announcementsB.get("c"));
+
+ // confirm that client A received client B's announcements
+ assertEquals("avocado", announcementsA.get("a"));
+ assertEquals("beet", announcementsA.get("b"));
+ assertEquals("carrot", announcementsA.get("c"));
+
+ clientA.stop();
+ clientB.stop();
+ service.stop();
+ }
+
+ protected void testDisruption(FanoutService service) throws Exception {
+ System.out.println(MessageFormat.format("\n\n========================================\nDISRUPTION TEST {0}\n========================================\n\n", service.toString()));
+ service.startSynchronously();
+
+ final AtomicInteger pongCount = new AtomicInteger(0);
+ FanoutClient client = new FanoutClient("localhost", fanoutPort);
+ client.addListener(new FanoutAdapter() {
+ @Override
+ public void pong(Date timestamp) {
+ pongCount.incrementAndGet();
+ }
+ });
+ client.startSynchronously();
+
+ // ping and wait for pong
+ client.ping();
+ Thread.sleep(500);
+
+ // restart client
+ client.stop();
+ Thread.sleep(1000);
+ client.startSynchronously();
+
+ // ping and wait for pong
+ client.ping();
+ Thread.sleep(500);
+
+ assertEquals(2, pongCount.get());
+
+ // now disrupt service
+ service.stop();
+ Thread.sleep(2000);
+ service.startSynchronously();
+
+ // wait for reconnect
+ Thread.sleep(2000);
+
+ // ping and wait for pong
+ client.ping();
+ Thread.sleep(500);
+
+ // kill all
+ client.stop();
+ service.stop();
+
+ // confirm expected pong count
+ assertEquals(3, pongCount.get());
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/FederationTests.java b/src/test/java/com/gitblit/tests/FederationTests.java
new file mode 100644
index 00000000..ced500a5
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/FederationTests.java
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.gitblit.Constants.AccessRestrictionType;
+import com.gitblit.Constants.FederationProposalResult;
+import com.gitblit.Constants.FederationRequest;
+import com.gitblit.Constants.FederationToken;
+import com.gitblit.models.FederationModel;
+import com.gitblit.models.FederationProposal;
+import com.gitblit.models.RepositoryModel;
+import com.gitblit.models.TeamModel;
+import com.gitblit.models.UserModel;
+import com.gitblit.utils.FederationUtils;
+import com.gitblit.utils.JsonUtils;
+import com.gitblit.utils.RpcUtils;
+
+public class FederationTests {
+
+ String url = GitBlitSuite.url;
+ String account = GitBlitSuite.account;
+ String password = GitBlitSuite.password;
+ String token = "d7cc58921a80b37e0329a4dae2f9af38bf61ef5c";
+
+ private static final AtomicBoolean started = new AtomicBoolean(false);
+
+ @BeforeClass
+ public static void startGitblit() throws Exception {
+ started.set(GitBlitSuite.startGitblit());
+ }
+
+ @AfterClass
+ public static void stopGitblit() throws Exception {
+ if (started.get()) {
+ GitBlitSuite.stopGitblit();
+ }
+ }
+
+ @Test
+ public void testProposal() throws Exception {
+ // create dummy repository data
+ Map<String, RepositoryModel> repositories = new HashMap<String, RepositoryModel>();
+ for (int i = 0; i < 5; i++) {
+ RepositoryModel model = new RepositoryModel();
+ model.accessRestriction = AccessRestrictionType.VIEW;
+ model.description = "cloneable repository " + i;
+ model.lastChange = new Date();
+ model.addOwner("adminuser");
+ model.name = "repo" + i + ".git";
+ model.size = "5 MB";
+ model.hasCommits = true;
+ repositories.put(model.name, model);
+ }
+
+ FederationProposal proposal = new FederationProposal("http://testurl", FederationToken.ALL,
+ "testtoken", repositories);
+
+ // propose federation
+ assertEquals("proposal refused", FederationUtils.propose(url, proposal),
+ FederationProposalResult.NO_PROPOSALS);
+ }
+
+ @Test
+ public void testJsonRepositories() throws Exception {
+ String requrl = FederationUtils.asLink(url, token, FederationRequest.PULL_REPOSITORIES);
+ String json = JsonUtils.retrieveJsonString(requrl, null, null);
+ assertNotNull(json);
+ }
+
+ @Test
+ public void testJsonUsers() throws Exception {
+ String requrl = FederationUtils.asLink(url, token, FederationRequest.PULL_USERS);
+ String json = JsonUtils.retrieveJsonString(requrl, null, null);
+ assertNotNull(json);
+ }
+
+ @Test
+ public void testJsonTeams() throws Exception {
+ String requrl = FederationUtils.asLink(url, token, FederationRequest.PULL_TEAMS);
+ String json = JsonUtils.retrieveJsonString(requrl, null, null);
+ assertNotNull(json);
+ }
+
+ private FederationModel getRegistration() {
+ FederationModel model = new FederationModel("localhost");
+ model.url = this.url;
+ model.token = this.token;
+ return model;
+ }
+
+ @Test
+ public void testPullRepositories() throws Exception {
+ Map<String, RepositoryModel> repos = FederationUtils.getRepositories(getRegistration(),
+ false);
+ assertNotNull(repos);
+ assertTrue(repos.size() > 0);
+ }
+
+ @Test
+ public void testPullUsers() throws Exception {
+ List<UserModel> users = FederationUtils.getUsers(getRegistration());
+ assertNotNull(users);
+ // admin is excluded
+ assertEquals(0, users.size());
+
+ UserModel newUser = new UserModel("test");
+ newUser.password = "whocares";
+ assertTrue(RpcUtils.createUser(newUser, url, account, password.toCharArray()));
+
+ TeamModel team = new TeamModel("testteam");
+ team.addUser("test");
+ team.addRepositoryPermission("helloworld.git");
+ assertTrue(RpcUtils.createTeam(team, url, account, password.toCharArray()));
+
+ users = FederationUtils.getUsers(getRegistration());
+ assertNotNull(users);
+ assertEquals(1, users.size());
+
+ newUser = users.get(0);
+ assertTrue(newUser.isTeamMember("testteam"));
+
+ assertTrue(RpcUtils.deleteUser(newUser, url, account, password.toCharArray()));
+ assertTrue(RpcUtils.deleteTeam(team, url, account, password.toCharArray()));
+ }
+
+ @Test
+ public void testPullTeams() throws Exception {
+ List<TeamModel> teams = FederationUtils.getTeams(getRegistration());
+ assertNotNull(teams);
+ assertTrue(teams.size() > 0);
+ }
+
+ @Test
+ public void testPullScripts() throws Exception {
+ Map<String, String> scripts = FederationUtils.getScripts(getRegistration());
+ assertNotNull(scripts);
+ assertTrue(scripts.keySet().contains("sendmail"));
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/FileUtilsTest.java b/src/test/java/com/gitblit/tests/FileUtilsTest.java
new file mode 100644
index 00000000..8e5cf8a6
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/FileUtilsTest.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.junit.Test;
+
+import com.gitblit.utils.FileUtils;
+
+public class FileUtilsTest {
+
+ @Test
+ public void testReadContent() throws Exception {
+ File dir = new File(System.getProperty("user.dir"));
+ String rawContent = FileUtils.readContent(new File(dir, "LICENSE"), "\n");
+ assertTrue(rawContent.trim().startsWith("Apache License"));
+ }
+
+ @Test
+ public void testWriteContent() throws Exception {
+ String contentA = "this is a test";
+ File tmp = File.createTempFile("gitblit-", ".test");
+ FileUtils.writeContent(tmp, contentA);
+ String contentB = FileUtils.readContent(tmp, "\n").trim();
+ assertEquals(contentA, contentB);
+ }
+
+ @Test
+ public void testFolderSize() throws Exception {
+ assertEquals(-1, FileUtils.folderSize(null));
+ assertEquals(-1, FileUtils.folderSize(new File(System.getProperty("user.dir"), "pretend")));
+
+ File dir = new File(System.getProperty("user.dir"), "distrib");
+ long size = FileUtils.folderSize(dir);
+ assertTrue("size is actually " + size, size >= 470000L);
+
+ File file = new File(System.getProperty("user.dir"), "LICENSE");
+ size = FileUtils.folderSize(file);
+ assertEquals("size is actually " + size, 11556L, size);
+ }
+
+ @Test
+ public void testStringSizes() throws Exception {
+ assertEquals(50 * FileUtils.KB, FileUtils.convertSizeToInt("50k", 0));
+ assertEquals(50 * FileUtils.MB, FileUtils.convertSizeToInt("50m", 0));
+ assertEquals(2 * FileUtils.GB, FileUtils.convertSizeToInt("2g", 0));
+
+ assertEquals(50 * FileUtils.KB, FileUtils.convertSizeToInt("50kb", 0));
+ assertEquals(50 * FileUtils.MB, FileUtils.convertSizeToInt("50mb", 0));
+ assertEquals(2 * FileUtils.GB, FileUtils.convertSizeToInt("2gb", 0));
+
+ assertEquals(50L * FileUtils.KB, FileUtils.convertSizeToLong("50k", 0));
+ assertEquals(50L * FileUtils.MB, FileUtils.convertSizeToLong("50m", 0));
+ assertEquals(50L * FileUtils.GB, FileUtils.convertSizeToLong("50g", 0));
+
+ assertEquals(50L * FileUtils.KB, FileUtils.convertSizeToLong("50kb", 0));
+ assertEquals(50L * FileUtils.MB, FileUtils.convertSizeToLong("50mb", 0));
+ assertEquals(50L * FileUtils.GB, FileUtils.convertSizeToLong("50gb", 0));
+
+ assertEquals(50 * FileUtils.KB, FileUtils.convertSizeToInt("50 k", 0));
+ assertEquals(50 * FileUtils.MB, FileUtils.convertSizeToInt("50 m", 0));
+ assertEquals(2 * FileUtils.GB, FileUtils.convertSizeToInt("2 g", 0));
+
+ assertEquals(50 * FileUtils.KB, FileUtils.convertSizeToInt("50 kb", 0));
+ assertEquals(50 * FileUtils.MB, FileUtils.convertSizeToInt("50 mb", 0));
+ assertEquals(2 * FileUtils.GB, FileUtils.convertSizeToInt("2 gb", 0));
+
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/GitBlitSuite.java b/src/test/java/com/gitblit/tests/GitBlitSuite.java
new file mode 100644
index 00000000..b0179c37
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/GitBlitSuite.java
@@ -0,0 +1,232 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import java.io.File;
+import java.lang.reflect.Field;
+import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.lib.RepositoryCache;
+import org.eclipse.jgit.lib.RepositoryCache.FileKey;
+import org.eclipse.jgit.storage.file.FileRepository;
+import org.eclipse.jgit.util.FS;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+import com.gitblit.GitBlit;
+import com.gitblit.GitBlitException;
+import com.gitblit.GitBlitServer;
+import com.gitblit.models.RepositoryModel;
+import com.gitblit.utils.JGitUtils;
+
+/**
+ * The GitBlitSuite uses test-gitblit.properties and test-users.conf. The suite
+ * is fairly comprehensive for all lower-level functionality. Wicket pages are
+ * currently not unit-tested.
+ *
+ * This suite starts a Gitblit server instance within the same JVM instance as
+ * the unit tests. This allows the unit tests to access the GitBlit static
+ * singleton while also being able to communicate with the instance via tcp/ip
+ * for testing rpc requests, federation requests, and git servlet operations.
+ *
+ * @author James Moger
+ *
+ */
+@RunWith(Suite.class)
+@SuiteClasses({ ArrayUtilsTest.class, FileUtilsTest.class, TimeUtilsTest.class,
+ StringUtilsTest.class, Base64Test.class, JsonUtilsTest.class, ByteFormatTest.class,
+ ObjectCacheTest.class, PermissionsTest.class, UserServiceTest.class, LdapUserServiceTest.class,
+ MarkdownUtilsTest.class, JGitUtilsTest.class, SyndicationUtilsTest.class,
+ DiffUtilsTest.class, MetricUtilsTest.class, TicgitUtilsTest.class, X509UtilsTest.class,
+ GitBlitTest.class, FederationTests.class, RpcTests.class, GitServletTest.class,
+ GroovyScriptTest.class, LuceneExecutorTest.class, IssuesTest.class, RepositoryModelTest.class,
+ FanoutServiceTest.class })
+public class GitBlitSuite {
+
+ public static final File REPOSITORIES = new File("data/git");
+
+ static int port = 8280;
+ static int shutdownPort = 8281;
+
+ public static String url = "http://localhost:" + port;
+ public static String account = "admin";
+ public static String password = "admin";
+
+ private static AtomicBoolean started = new AtomicBoolean(false);
+
+ public static Repository getHelloworldRepository() throws Exception {
+ return new FileRepository(new File(REPOSITORIES, "helloworld.git"));
+ }
+
+ public static Repository getTicgitRepository() throws Exception {
+ return new FileRepository(new File(REPOSITORIES, "ticgit.git"));
+ }
+
+ public static Repository getJGitRepository() throws Exception {
+ return new FileRepository(new File(REPOSITORIES, "test/jgit.git"));
+ }
+
+ public static Repository getAmbitionRepository() throws Exception {
+ return new FileRepository(new File(REPOSITORIES, "test/ambition.git"));
+ }
+
+ public static Repository getTheoreticalPhysicsRepository() throws Exception {
+ return new FileRepository(new File(REPOSITORIES, "test/theoretical-physics.git"));
+ }
+
+ public static Repository getIssuesTestRepository() throws Exception {
+ JGitUtils.createRepository(REPOSITORIES, "gb-issues.git").close();
+ return new FileRepository(new File(REPOSITORIES, "gb-issues.git"));
+ }
+
+ public static Repository getGitectiveRepository() throws Exception {
+ return new FileRepository(new File(REPOSITORIES, "test/gitective.git"));
+ }
+
+ public static boolean startGitblit() throws Exception {
+ if (started.get()) {
+ // already started
+ return false;
+ }
+
+ GitServletTest.deleteWorkingFolders();
+
+ // Start a Gitblit instance
+ Executors.newSingleThreadExecutor().execute(new Runnable() {
+ public void run() {
+ GitBlitServer.main("--httpPort", "" + port, "--httpsPort", "0", "--shutdownPort",
+ "" + shutdownPort, "--repositoriesFolder",
+ "\"" + GitBlitSuite.REPOSITORIES.getAbsolutePath() + "\"", "--userService",
+ "test-users.conf", "--settings", "test-gitblit.properties",
+ "--baseFolder", "data");
+ }
+ });
+
+ // Wait a few seconds for it to be running
+ Thread.sleep(2500);
+
+ started.set(true);
+ return true;
+ }
+
+ public static void stopGitblit() throws Exception {
+ // Stop Gitblit
+ GitBlitServer.main("--stop", "--shutdownPort", "" + shutdownPort);
+
+ // Wait a few seconds for it to be running
+ Thread.sleep(5000);
+ }
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ startGitblit();
+
+ if (REPOSITORIES.exists() || REPOSITORIES.mkdirs()) {
+ cloneOrFetch("helloworld.git", "https://github.com/git/hello-world.git");
+ cloneOrFetch("ticgit.git", "https://github.com/schacon/ticgit.git");
+ cloneOrFetch("test/jgit.git", "https://github.com/eclipse/jgit.git");
+ cloneOrFetch("test/helloworld.git", "https://github.com/git/hello-world.git");
+ cloneOrFetch("test/ambition.git", "https://github.com/defunkt/ambition.git");
+ cloneOrFetch("test/theoretical-physics.git", "https://github.com/certik/theoretical-physics.git");
+ cloneOrFetch("test/gitective.git", "https://github.com/kevinsawicki/gitective.git");
+
+ enableTickets("ticgit.git");
+ enableDocs("ticgit.git");
+ showRemoteBranches("ticgit.git");
+ showRemoteBranches("test/jgit.git");
+ }
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ stopGitblit();
+ }
+
+ private static void cloneOrFetch(String name, String fromUrl) throws Exception {
+ System.out.print("Fetching " + name + "... ");
+ JGitUtils.cloneRepository(REPOSITORIES, name, fromUrl);
+ System.out.println("done.");
+ }
+
+ private static void enableTickets(String repositoryName) {
+ try {
+ RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName);
+ model.useTickets = true;
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+ } catch (GitBlitException g) {
+ g.printStackTrace();
+ }
+ }
+
+ private static void enableDocs(String repositoryName) {
+ try {
+ RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName);
+ model.useDocs = true;
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+ } catch (GitBlitException g) {
+ g.printStackTrace();
+ }
+ }
+
+ private static void showRemoteBranches(String repositoryName) {
+ try {
+ RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName);
+ model.showRemoteBranches = true;
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+ } catch (GitBlitException g) {
+ g.printStackTrace();
+ }
+ }
+
+ public static void close(File repository) {
+ try {
+ File gitDir = FileKey.resolve(repository, FS.detect());
+ if (gitDir != null && gitDir.exists()) {
+ close(RepositoryCache.open(FileKey.exact(gitDir, FS.detect())));
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void close(Git git) {
+ close(git.getRepository());
+ }
+
+ public static void close(Repository r) {
+ RepositoryCache.close(r);
+
+ // assume 2 uses in case reflection fails
+ int uses = 2;
+ try {
+ Field useCnt = Repository.class.getDeclaredField("useCnt");
+ useCnt.setAccessible(true);
+ uses = ((AtomicInteger) useCnt.get(r)).get();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ for (int i = 0; i < uses; i++) {
+ r.close();
+ }
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/GitBlitTest.java b/src/test/java/com/gitblit/tests/GitBlitTest.java
new file mode 100644
index 00000000..786614f8
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/GitBlitTest.java
@@ -0,0 +1,187 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.List;
+
+import org.junit.Test;
+
+import com.gitblit.Constants.AccessRestrictionType;
+import com.gitblit.FileSettings;
+import com.gitblit.GitBlit;
+import com.gitblit.models.RepositoryModel;
+import com.gitblit.models.UserModel;
+
+public class GitBlitTest {
+
+ @Test
+ public void testRepositoryModel() throws Exception {
+ List<String> repositories = GitBlit.self().getRepositoryList();
+ assertTrue("Repository list is empty!", repositories.size() > 0);
+ assertTrue(
+ "Missing Helloworld repository!",
+ repositories.contains(GitBlitSuite.getHelloworldRepository().getDirectory()
+ .getName()));
+ RepositoryModel model = GitBlit.self().getRepositoryModel(
+ GitBlitSuite.getHelloworldRepository().getDirectory().getName());
+ assertTrue("Helloworld model is null!", model != null);
+ assertEquals(GitBlitSuite.getHelloworldRepository().getDirectory().getName(), model.name);
+ assertTrue(GitBlit.self().calculateSize(model) > 22000L);
+ }
+
+ @Test
+ public void testUserModel() throws Exception {
+ List<String> users = GitBlit.self().getAllUsernames();
+ assertTrue("No users found!", users.size() > 0);
+ assertTrue("Admin not found", users.contains("admin"));
+ UserModel user = GitBlit.self().getUserModel("admin");
+ assertEquals("admin", user.toString());
+ assertTrue("Admin missing #admin role!", user.canAdmin);
+ user.canAdmin = false;
+ assertFalse("Admin should not have #admin!", user.canAdmin);
+ String repository = GitBlitSuite.getHelloworldRepository().getDirectory().getName();
+ RepositoryModel repositoryModel = GitBlit.self().getRepositoryModel(repository);
+ repositoryModel.accessRestriction = AccessRestrictionType.VIEW;
+ assertFalse("Admin can still access repository!",
+ user.canView(repositoryModel));
+ user.addRepositoryPermission(repository);
+ assertTrue("Admin can't access repository!", user.canView(repositoryModel));
+ assertEquals(GitBlit.self().getRepositoryModel(user, "pretend"), null);
+ assertNotNull(GitBlit.self().getRepositoryModel(user, repository));
+ assertTrue(GitBlit.self().getRepositoryModels(user).size() > 0);
+ }
+
+ @Test
+ public void testUserModelVerification() throws Exception {
+ UserModel user = new UserModel("james");
+ user.displayName = "James Moger";
+
+ assertTrue(user.is("James", null));
+ assertTrue(user.is("James", ""));
+ assertTrue(user.is("JaMeS", "anything"));
+
+ assertTrue(user.is("james moger", null));
+ assertTrue(user.is("james moger", ""));
+ assertTrue(user.is("james moger", "anything"));
+
+ assertFalse(user.is("joe", null));
+ assertFalse(user.is("joe", ""));
+ assertFalse(user.is("joe", "anything"));
+
+ // specify email address which results in address verification
+ user.emailAddress = "something";
+
+ assertFalse(user.is("James", null));
+ assertFalse(user.is("James", ""));
+ assertFalse(user.is("JaMeS", "anything"));
+
+ assertFalse(user.is("james moger", null));
+ assertFalse(user.is("james moger", ""));
+ assertFalse(user.is("james moger", "anything"));
+
+ assertTrue(user.is("JaMeS", user.emailAddress));
+ assertTrue(user.is("JaMeS mOgEr", user.emailAddress));
+ }
+
+ @Test
+ public void testAccessRestrictionTypes() throws Exception {
+ assertTrue(AccessRestrictionType.PUSH.exceeds(AccessRestrictionType.NONE));
+ assertTrue(AccessRestrictionType.CLONE.exceeds(AccessRestrictionType.PUSH));
+ assertTrue(AccessRestrictionType.VIEW.exceeds(AccessRestrictionType.CLONE));
+
+ assertFalse(AccessRestrictionType.NONE.exceeds(AccessRestrictionType.PUSH));
+ assertFalse(AccessRestrictionType.PUSH.exceeds(AccessRestrictionType.CLONE));
+ assertFalse(AccessRestrictionType.CLONE.exceeds(AccessRestrictionType.VIEW));
+
+ assertTrue(AccessRestrictionType.PUSH.atLeast(AccessRestrictionType.NONE));
+ assertTrue(AccessRestrictionType.CLONE.atLeast(AccessRestrictionType.PUSH));
+ assertTrue(AccessRestrictionType.VIEW.atLeast(AccessRestrictionType.CLONE));
+
+ assertFalse(AccessRestrictionType.NONE.atLeast(AccessRestrictionType.PUSH));
+ assertFalse(AccessRestrictionType.PUSH.atLeast(AccessRestrictionType.CLONE));
+ assertFalse(AccessRestrictionType.CLONE.atLeast(AccessRestrictionType.VIEW));
+
+ assertTrue(AccessRestrictionType.PUSH.toString().equals("PUSH"));
+ assertTrue(AccessRestrictionType.CLONE.toString().equals("CLONE"));
+ assertTrue(AccessRestrictionType.VIEW.toString().equals("VIEW"));
+
+ assertEquals(AccessRestrictionType.NONE, AccessRestrictionType.fromName("none"));
+ assertEquals(AccessRestrictionType.PUSH, AccessRestrictionType.fromName("push"));
+ assertEquals(AccessRestrictionType.CLONE, AccessRestrictionType.fromName("clone"));
+ assertEquals(AccessRestrictionType.VIEW, AccessRestrictionType.fromName("view"));
+ }
+
+ @Test
+ public void testFileSettings() throws Exception {
+ FileSettings settings = new FileSettings("distrib/gitblit.properties");
+ assertEquals(true, settings.getBoolean("missing", true));
+ assertEquals("default", settings.getString("missing", "default"));
+ assertEquals(10, settings.getInteger("missing", 10));
+ assertEquals(5, settings.getInteger("realm.realmFile", 5));
+
+ assertTrue(settings.getBoolean("git.enableGitServlet", false));
+ assertEquals("${baseFolder}/users.conf", settings.getString("realm.userService", null));
+ assertEquals(5, settings.getInteger("realm.minPasswordLength", 0));
+ List<String> mdExtensions = settings.getStrings("web.markdownExtensions");
+ assertTrue(mdExtensions.size() > 0);
+ assertTrue(mdExtensions.contains("md"));
+
+ List<String> keys = settings.getAllKeys("server");
+ assertTrue(keys.size() > 0);
+ assertTrue(keys.contains("server.httpsPort"));
+
+ assertTrue(settings.getChar("web.forwardSlashCharacter", ' ') == '/');
+ }
+
+ @Test
+ public void testGitblitSettings() throws Exception {
+ // These are already tested by above test method.
+ assertTrue(GitBlit.getBoolean("missing", true));
+ assertEquals("default", GitBlit.getString("missing", "default"));
+ assertEquals(10, GitBlit.getInteger("missing", 10));
+ assertEquals(5, GitBlit.getInteger("realm.userService", 5));
+
+ assertTrue(GitBlit.getBoolean("git.enableGitServlet", false));
+ assertEquals("test-users.conf", GitBlit.getString("realm.userService", null));
+ assertEquals(5, GitBlit.getInteger("realm.minPasswordLength", 0));
+ List<String> mdExtensions = GitBlit.getStrings("web.markdownExtensions");
+ assertTrue(mdExtensions.size() > 0);
+ assertTrue(mdExtensions.contains("md"));
+
+ List<String> keys = GitBlit.getAllKeys("server");
+ assertTrue(keys.size() > 0);
+ assertTrue(keys.contains("server.httpsPort"));
+
+ assertTrue(GitBlit.getChar("web.forwardSlashCharacter", ' ') == '/');
+ assertFalse(GitBlit.isDebugMode());
+ }
+
+ @Test
+ public void testAuthentication() throws Exception {
+ assertTrue(GitBlit.self().authenticate("admin", "admin".toCharArray()) != null);
+ }
+
+ @Test
+ public void testRepositories() throws Exception {
+ assertTrue(GitBlit.self().getRepository("missing") == null);
+ assertTrue(GitBlit.self().getRepositoryModel("missing") == null);
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/GitServletTest.java b/src/test/java/com/gitblit/tests/GitServletTest.java
new file mode 100644
index 00000000..a05b3650
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/GitServletTest.java
@@ -0,0 +1,775 @@
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.text.MessageFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.jgit.api.CloneCommand;
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.api.ResetCommand.ResetType;
+import org.eclipse.jgit.api.errors.GitAPIException;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.storage.file.FileRepository;
+import org.eclipse.jgit.transport.CredentialsProvider;
+import org.eclipse.jgit.transport.PushResult;
+import org.eclipse.jgit.transport.RefSpec;
+import org.eclipse.jgit.transport.RemoteRefUpdate;
+import org.eclipse.jgit.transport.RemoteRefUpdate.Status;
+import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider;
+import org.eclipse.jgit.util.FileUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.gitblit.Constants.AccessPermission;
+import com.gitblit.Constants.AccessRestrictionType;
+import com.gitblit.Constants.AuthorizationControl;
+import com.gitblit.GitBlit;
+import com.gitblit.Keys;
+import com.gitblit.models.PushLogEntry;
+import com.gitblit.models.RepositoryModel;
+import com.gitblit.models.UserModel;
+import com.gitblit.utils.ArrayUtils;
+import com.gitblit.utils.JGitUtils;
+import com.gitblit.utils.PushLogUtils;
+
+public class GitServletTest {
+
+ static File ticgitFolder = new File(GitBlitSuite.REPOSITORIES, "working/ticgit");
+
+ static File ticgit2Folder = new File(GitBlitSuite.REPOSITORIES, "working/ticgit2");
+
+ static File jgitFolder = new File(GitBlitSuite.REPOSITORIES, "working/jgit");
+
+ static File jgit2Folder = new File(GitBlitSuite.REPOSITORIES, "working/jgit2");
+
+ String url = GitBlitSuite.url;
+ String account = GitBlitSuite.account;
+ String password = GitBlitSuite.password;
+
+ private static final AtomicBoolean started = new AtomicBoolean(false);
+
+ @BeforeClass
+ public static void startGitblit() throws Exception {
+ started.set(GitBlitSuite.startGitblit());
+ }
+
+ @AfterClass
+ public static void stopGitblit() throws Exception {
+ if (started.get()) {
+ GitBlitSuite.stopGitblit();
+ deleteWorkingFolders();
+ }
+ }
+
+ public static void deleteWorkingFolders() throws Exception {
+ if (ticgitFolder.exists()) {
+ GitBlitSuite.close(ticgitFolder);
+ FileUtils.delete(ticgitFolder, FileUtils.RECURSIVE);
+ }
+ if (ticgit2Folder.exists()) {
+ GitBlitSuite.close(ticgit2Folder);
+ FileUtils.delete(ticgit2Folder, FileUtils.RECURSIVE);
+ }
+ if (jgitFolder.exists()) {
+ GitBlitSuite.close(jgitFolder);
+ FileUtils.delete(jgitFolder, FileUtils.RECURSIVE);
+ }
+ if (jgit2Folder.exists()) {
+ GitBlitSuite.close(jgit2Folder);
+ FileUtils.delete(jgit2Folder, FileUtils.RECURSIVE);
+ }
+ }
+
+ @Test
+ public void testClone() throws Exception {
+ GitBlitSuite.close(ticgitFolder);
+ if (ticgitFolder.exists()) {
+ FileUtils.delete(ticgitFolder, FileUtils.RECURSIVE | FileUtils.RETRY);
+ }
+
+ CloneCommand clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/ticgit.git", url));
+ clone.setDirectory(ticgitFolder);
+ clone.setBare(false);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(new UsernamePasswordCredentialsProvider(account, password));
+ GitBlitSuite.close(clone.call());
+ assertTrue(true);
+ }
+
+ @Test
+ public void testBogusLoginClone() throws Exception {
+ // restrict repository access
+ RepositoryModel model = GitBlit.self().getRepositoryModel("ticgit.git");
+ model.accessRestriction = AccessRestrictionType.CLONE;
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+
+ // delete any existing working folder
+ boolean cloned = false;
+ try {
+ CloneCommand clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/ticgit.git", url));
+ clone.setDirectory(ticgit2Folder);
+ clone.setBare(false);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(new UsernamePasswordCredentialsProvider("bogus", "bogus"));
+ GitBlitSuite.close(clone.call());
+ cloned = true;
+ } catch (Exception e) {
+ // swallow the exception which we expect
+ }
+
+ // restore anonymous repository access
+ model.accessRestriction = AccessRestrictionType.NONE;
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+
+ assertFalse("Bogus login cloned a repository?!", cloned);
+ }
+
+ @Test
+ public void testUnauthorizedLoginClone() throws Exception {
+ // restrict repository access
+ RepositoryModel model = GitBlit.self().getRepositoryModel("ticgit.git");
+ model.accessRestriction = AccessRestrictionType.CLONE;
+ model.authorizationControl = AuthorizationControl.NAMED;
+ UserModel user = new UserModel("james");
+ user.password = "james";
+ GitBlit.self().updateUserModel(user.username, user, true);
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+
+ FileUtils.delete(ticgit2Folder, FileUtils.RECURSIVE);
+
+ // delete any existing working folder
+ boolean cloned = false;
+ try {
+ CloneCommand clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/ticgit.git", url));
+ clone.setDirectory(ticgit2Folder);
+ clone.setBare(false);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(new UsernamePasswordCredentialsProvider(user.username, user.password));
+ GitBlitSuite.close(clone.call());
+ cloned = true;
+ } catch (Exception e) {
+ // swallow the exception which we expect
+ }
+
+ assertFalse("Unauthorized login cloned a repository?!", cloned);
+
+ FileUtils.delete(ticgit2Folder, FileUtils.RECURSIVE);
+
+ // switch to authenticated
+ model.authorizationControl = AuthorizationControl.AUTHENTICATED;
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+
+ // try clone again
+ cloned = false;
+ CloneCommand clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/ticgit.git", url));
+ clone.setDirectory(ticgit2Folder);
+ clone.setBare(false);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(new UsernamePasswordCredentialsProvider(user.username, user.password));
+ GitBlitSuite.close(clone.call());
+ cloned = true;
+
+ assertTrue("Authenticated login could not clone!", cloned);
+
+ FileUtils.delete(ticgit2Folder, FileUtils.RECURSIVE);
+
+ // restore anonymous repository access
+ model.accessRestriction = AccessRestrictionType.NONE;
+ model.authorizationControl = AuthorizationControl.NAMED;
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+ GitBlit.self().deleteUser(user.username);
+ }
+
+ @Test
+ public void testAnonymousPush() throws Exception {
+ GitBlitSuite.close(ticgitFolder);
+ if (ticgitFolder.exists()) {
+ FileUtils.delete(ticgitFolder, FileUtils.RECURSIVE | FileUtils.RETRY);
+ }
+
+ CloneCommand clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/ticgit.git", url));
+ clone.setDirectory(ticgitFolder);
+ clone.setBare(false);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(new UsernamePasswordCredentialsProvider(account, password));
+ GitBlitSuite.close(clone.call());
+ assertTrue(true);
+
+ Git git = Git.open(ticgitFolder);
+ File file = new File(ticgitFolder, "TODO");
+ OutputStreamWriter os = new OutputStreamWriter(new FileOutputStream(file, true), Constants.CHARSET);
+ BufferedWriter w = new BufferedWriter(os);
+ w.write("// hellol中文 " + new Date().toString() + "\n");
+ w.close();
+ git.add().addFilepattern(file.getName()).call();
+ git.commit().setMessage("test commit").call();
+ git.push().setPushAll().call();
+ GitBlitSuite.close(git);
+ }
+
+ @Test
+ public void testSubfolderPush() throws Exception {
+ GitBlitSuite.close(jgitFolder);
+ if (jgitFolder.exists()) {
+ FileUtils.delete(jgitFolder, FileUtils.RECURSIVE | FileUtils.RETRY);
+ }
+
+ CloneCommand clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/test/jgit.git", url));
+ clone.setDirectory(jgitFolder);
+ clone.setBare(false);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(new UsernamePasswordCredentialsProvider(account, password));
+ GitBlitSuite.close(clone.call());
+ assertTrue(true);
+
+ Git git = Git.open(jgitFolder);
+ File file = new File(jgitFolder, "TODO");
+ OutputStreamWriter os = new OutputStreamWriter(new FileOutputStream(file, true), Constants.CHARSET);
+ BufferedWriter w = new BufferedWriter(os);
+ w.write("// " + new Date().toString() + "\n");
+ w.close();
+ git.add().addFilepattern(file.getName()).call();
+ git.commit().setMessage("test commit").call();
+ git.push().setPushAll().call();
+ GitBlitSuite.close(git);
+ }
+
+ @Test
+ public void testPushToFrozenRepo() throws Exception {
+ GitBlitSuite.close(jgitFolder);
+ if (jgitFolder.exists()) {
+ FileUtils.delete(jgitFolder, FileUtils.RECURSIVE | FileUtils.RETRY);
+ }
+
+ CloneCommand clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/test/jgit.git", url));
+ clone.setDirectory(jgitFolder);
+ clone.setBare(false);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(new UsernamePasswordCredentialsProvider(account, password));
+ GitBlitSuite.close(clone.call());
+ assertTrue(true);
+
+ // freeze repo
+ RepositoryModel model = GitBlit.self().getRepositoryModel("test/jgit.git");
+ model.isFrozen = true;
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+
+ Git git = Git.open(jgitFolder);
+ File file = new File(jgitFolder, "TODO");
+ OutputStreamWriter os = new OutputStreamWriter(new FileOutputStream(file, true), Constants.CHARSET);
+ BufferedWriter w = new BufferedWriter(os);
+ w.write("// " + new Date().toString() + "\n");
+ w.close();
+ git.add().addFilepattern(file.getName()).call();
+ git.commit().setMessage("test commit").call();
+
+ try {
+ git.push().setPushAll().call();
+ assertTrue(false);
+ } catch (Exception e) {
+ assertTrue(e.getCause().getMessage().contains("access forbidden"));
+ }
+
+ // unfreeze repo
+ model.isFrozen = false;
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+
+ git.push().setPushAll().call();
+ GitBlitSuite.close(git);
+ }
+
+ @Test
+ public void testPushToNonBareRepository() throws Exception {
+ CloneCommand clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/working/jgit", url));
+ clone.setDirectory(jgit2Folder);
+ clone.setBare(false);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(new UsernamePasswordCredentialsProvider(account, password));
+ GitBlitSuite.close(clone.call());
+ assertTrue(true);
+
+ Git git = Git.open(jgit2Folder);
+ File file = new File(jgit2Folder, "NONBARE");
+ OutputStreamWriter os = new OutputStreamWriter(new FileOutputStream(file, true), Constants.CHARSET);
+ BufferedWriter w = new BufferedWriter(os);
+ w.write("// " + new Date().toString() + "\n");
+ w.close();
+ git.add().addFilepattern(file.getName()).call();
+ git.commit().setMessage("test commit followed by push to non-bare repository").call();
+ try {
+ git.push().setPushAll().call();
+ assertTrue(false);
+ } catch (Exception e) {
+ assertTrue(e.getCause().getMessage().contains("git-receive-pack not permitted"));
+ }
+ GitBlitSuite.close(git);
+ }
+
+ @Test
+ public void testCommitterVerification() throws Exception {
+ UserModel user = new UserModel("james");
+ user.password = "james";
+
+ // account only uses account name to verify
+ testCommitterVerification(user, user.username, null, true);
+ // committer email address is ignored because account does not specify email
+ testCommitterVerification(user, user.username, "something", true);
+ // completely different committer
+ testCommitterVerification(user, "joe", null, false);
+
+ // test display name verification
+ user.displayName = "James Moger";
+ testCommitterVerification(user, user.displayName, null, true);
+ testCommitterVerification(user, user.displayName, "something", true);
+ testCommitterVerification(user, "joe", null, false);
+
+ // test email address verification
+ user.emailAddress = "something";
+ testCommitterVerification(user, user.displayName, null, false);
+ testCommitterVerification(user, user.displayName, "somethingelse", false);
+ testCommitterVerification(user, user.displayName, user.emailAddress, true);
+
+ // use same email address but with different committer
+ testCommitterVerification(user, "joe", "somethingelse", false);
+ }
+
+ private void testCommitterVerification(UserModel user, String displayName, String emailAddress, boolean expectedSuccess) throws Exception {
+
+ if (GitBlit.self().getUserModel(user.username) != null) {
+ GitBlit.self().deleteUser(user.username);
+ }
+
+ CredentialsProvider cp = new UsernamePasswordCredentialsProvider(user.username, user.password);
+
+ // fork from original to a temporary bare repo
+ File verification = new File(GitBlitSuite.REPOSITORIES, "refchecks/verify-committer.git");
+ if (verification.exists()) {
+ FileUtils.delete(verification, FileUtils.RECURSIVE);
+ }
+ CloneCommand clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/ticgit.git", url));
+ clone.setDirectory(verification);
+ clone.setBare(true);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(cp);
+ GitBlitSuite.close(clone.call());
+
+ // require push permissions and committer verification
+ RepositoryModel model = GitBlit.self().getRepositoryModel("refchecks/verify-committer.git");
+ model.authorizationControl = AuthorizationControl.NAMED;
+ model.accessRestriction = AccessRestrictionType.PUSH;
+ model.verifyCommitter = true;
+
+ // grant user push permission
+ user.setRepositoryPermission(model.name, AccessPermission.PUSH);
+
+ GitBlit.self().updateUserModel(user.username, user, true);
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+
+ // clone temp bare repo to working copy
+ File local = new File(GitBlitSuite.REPOSITORIES, "refchecks/verify-wc");
+ if (local.exists()) {
+ FileUtils.delete(local, FileUtils.RECURSIVE);
+ }
+ clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/{1}", url, model.name));
+ clone.setDirectory(local);
+ clone.setBare(false);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(cp);
+ GitBlitSuite.close(clone.call());
+
+ Git git = Git.open(local);
+
+ // force an identity which may or may not match the account's identity
+ git.getRepository().getConfig().setString("user", null, "name", displayName);
+ git.getRepository().getConfig().setString("user", null, "email", emailAddress);
+ git.getRepository().getConfig().save();
+
+ // commit a file and push it
+ File file = new File(local, "PUSHCHK");
+ OutputStreamWriter os = new OutputStreamWriter(new FileOutputStream(file, true), Constants.CHARSET);
+ BufferedWriter w = new BufferedWriter(os);
+ w.write("// " + new Date().toString() + "\n");
+ w.close();
+ git.add().addFilepattern(file.getName()).call();
+ git.commit().setMessage("push test").call();
+ Iterable<PushResult> results = git.push().setCredentialsProvider(cp).setRemote("origin").call();
+
+ for (PushResult result : results) {
+ RemoteRefUpdate ref = result.getRemoteUpdate("refs/heads/master");
+ Status status = ref.getStatus();
+ if (expectedSuccess) {
+ assertTrue("Verification failed! User was NOT able to push commit! " + status.name(), Status.OK.equals(status));
+ } else {
+ assertTrue("Verification failed! User was able to push commit! " + status.name(), Status.REJECTED_OTHER_REASON.equals(status));
+ }
+ }
+
+ GitBlitSuite.close(git);
+ // close serving repository
+ GitBlitSuite.close(verification);
+ }
+
+ @Test
+ public void testBlockClone() throws Exception {
+ testRefChange(AccessPermission.VIEW, null, null, null);
+ }
+
+ @Test
+ public void testBlockPush() throws Exception {
+ testRefChange(AccessPermission.CLONE, null, null, null);
+ }
+
+ @Test
+ public void testBlockBranchCreation() throws Exception {
+ testRefChange(AccessPermission.PUSH, Status.REJECTED_OTHER_REASON, null, null);
+ }
+
+ @Test
+ public void testBlockBranchDeletion() throws Exception {
+ testRefChange(AccessPermission.CREATE, Status.OK, Status.REJECTED_OTHER_REASON, null);
+ }
+
+ @Test
+ public void testBlockBranchRewind() throws Exception {
+ testRefChange(AccessPermission.DELETE, Status.OK, Status.OK, Status.REJECTED_OTHER_REASON);
+ }
+
+ @Test
+ public void testBranchRewind() throws Exception {
+ testRefChange(AccessPermission.REWIND, Status.OK, Status.OK, Status.OK);
+ }
+
+ private void testRefChange(AccessPermission permission, Status expectedCreate, Status expectedDelete, Status expectedRewind) throws Exception {
+
+ UserModel user = new UserModel("james");
+ user.password = "james";
+
+ if (GitBlit.self().getUserModel(user.username) != null) {
+ GitBlit.self().deleteUser(user.username);
+ }
+
+ CredentialsProvider cp = new UsernamePasswordCredentialsProvider(user.username, user.password);
+
+ // fork from original to a temporary bare repo
+ File refChecks = new File(GitBlitSuite.REPOSITORIES, "refchecks/ticgit.git");
+ if (refChecks.exists()) {
+ FileUtils.delete(refChecks, FileUtils.RECURSIVE);
+ }
+ CloneCommand clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/ticgit.git", url));
+ clone.setDirectory(refChecks);
+ clone.setBare(true);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(cp);
+ GitBlitSuite.close(clone.call());
+
+ // elevate repository to clone permission
+ RepositoryModel model = GitBlit.self().getRepositoryModel("refchecks/ticgit.git");
+ switch (permission) {
+ case VIEW:
+ model.accessRestriction = AccessRestrictionType.CLONE;
+ break;
+ case CLONE:
+ model.accessRestriction = AccessRestrictionType.CLONE;
+ break;
+ default:
+ model.accessRestriction = AccessRestrictionType.PUSH;
+ }
+ model.authorizationControl = AuthorizationControl.NAMED;
+
+ // grant user specified
+ user.setRepositoryPermission(model.name, permission);
+
+ GitBlit.self().updateUserModel(user.username, user, true);
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+
+ // clone temp bare repo to working copy
+ File local = new File(GitBlitSuite.REPOSITORIES, "refchecks/ticgit-wc");
+ if (local.exists()) {
+ FileUtils.delete(local, FileUtils.RECURSIVE);
+ }
+ clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/{1}", url, model.name));
+ clone.setDirectory(local);
+ clone.setBare(false);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(cp);
+
+ try {
+ GitBlitSuite.close(clone.call());
+ } catch (GitAPIException e) {
+ if (permission.atLeast(AccessPermission.CLONE)) {
+ throw e;
+ } else {
+ // close serving repository
+ GitBlitSuite.close(refChecks);
+
+ // user does not have clone permission
+ assertTrue(e.getMessage(), e.getMessage().contains("not permitted"));
+ return;
+ }
+ }
+
+ Git git = Git.open(local);
+
+ // commit a file and push it
+ File file = new File(local, "PUSHCHK");
+ OutputStreamWriter os = new OutputStreamWriter(new FileOutputStream(file, true), Constants.CHARSET);
+ BufferedWriter w = new BufferedWriter(os);
+ w.write("// " + new Date().toString() + "\n");
+ w.close();
+ git.add().addFilepattern(file.getName()).call();
+ git.commit().setMessage("push test").call();
+ Iterable<PushResult> results = null;
+ try {
+ results = git.push().setCredentialsProvider(cp).setRemote("origin").call();
+ } catch (GitAPIException e) {
+ if (permission.atLeast(AccessPermission.PUSH)) {
+ throw e;
+ } else {
+ // close serving repository
+ GitBlitSuite.close(refChecks);
+
+ // user does not have push permission
+ assertTrue(e.getMessage(), e.getMessage().contains("not permitted"));
+ GitBlitSuite.close(git);
+ return;
+ }
+ }
+
+ for (PushResult result : results) {
+ RemoteRefUpdate ref = result.getRemoteUpdate("refs/heads/master");
+ Status status = ref.getStatus();
+ if (permission.atLeast(AccessPermission.PUSH)) {
+ assertTrue("User failed to push commit?! " + status.name(), Status.OK.equals(status));
+ } else {
+ // close serving repository
+ GitBlitSuite.close(refChecks);
+
+ assertTrue("User was able to push commit! " + status.name(), Status.REJECTED_OTHER_REASON.equals(status));
+ GitBlitSuite.close(git);
+ // skip delete test
+ return;
+ }
+ }
+
+ // create a local branch and push the new branch back to the origin
+ git.branchCreate().setName("protectme").call();
+ RefSpec refSpec = new RefSpec("refs/heads/protectme:refs/heads/protectme");
+ results = git.push().setCredentialsProvider(cp).setRefSpecs(refSpec).setRemote("origin").call();
+ for (PushResult result : results) {
+ RemoteRefUpdate ref = result.getRemoteUpdate("refs/heads/protectme");
+ Status status = ref.getStatus();
+ if (Status.OK.equals(expectedCreate)) {
+ assertTrue("User failed to push creation?! " + status.name(), status.equals(expectedCreate));
+ } else {
+ // close serving repository
+ GitBlitSuite.close(refChecks);
+
+ assertTrue("User was able to push ref creation! " + status.name(), status.equals(expectedCreate));
+ GitBlitSuite.close(git);
+ // skip delete test
+ return;
+ }
+ }
+
+ // delete the branch locally
+ git.branchDelete().setBranchNames("protectme").call();
+
+ // push a delete ref command
+ refSpec = new RefSpec(":refs/heads/protectme");
+ results = git.push().setCredentialsProvider(cp).setRefSpecs(refSpec).setRemote("origin").call();
+ for (PushResult result : results) {
+ RemoteRefUpdate ref = result.getRemoteUpdate("refs/heads/protectme");
+ Status status = ref.getStatus();
+ if (Status.OK.equals(expectedDelete)) {
+ assertTrue("User failed to push ref deletion?! " + status.name(), status.equals(Status.OK));
+ } else {
+ // close serving repository
+ GitBlitSuite.close(refChecks);
+
+ assertTrue("User was able to push ref deletion?! " + status.name(), status.equals(expectedDelete));
+ GitBlitSuite.close(git);
+ // skip rewind test
+ return;
+ }
+ }
+
+ // rewind master by two commits
+ git.reset().setRef("HEAD~2").setMode(ResetType.HARD).call();
+
+ // commit a change on this detached HEAD
+ file = new File(local, "REWINDCHK");
+ os = new OutputStreamWriter(new FileOutputStream(file, true), Constants.CHARSET);
+ w = new BufferedWriter(os);
+ w.write("// " + new Date().toString() + "\n");
+ w.close();
+ git.add().addFilepattern(file.getName()).call();
+ RevCommit commit = git.commit().setMessage("rewind master and new commit").call();
+
+ // Reset master to our new commit now we our local branch tip is no longer
+ // upstream of the remote branch tip. It is an alternate tip of the branch.
+ JGitUtils.setBranchRef(git.getRepository(), "refs/heads/master", commit.getName());
+
+ // Try pushing our new tip to the origin.
+ // This requires the server to "rewind" it's master branch and update it
+ // to point to our alternate tip. This leaves the original master tip
+ // unreferenced.
+ results = git.push().setCredentialsProvider(cp).setRemote("origin").setForce(true).call();
+ for (PushResult result : results) {
+ RemoteRefUpdate ref = result.getRemoteUpdate("refs/heads/master");
+ Status status = ref.getStatus();
+ if (Status.OK.equals(expectedRewind)) {
+ assertTrue("User failed to rewind master?! " + status.name(), status.equals(expectedRewind));
+ } else {
+ assertTrue("User was able to rewind master?! " + status.name(), status.equals(expectedRewind));
+ }
+ }
+ GitBlitSuite.close(git);
+
+ // close serving repository
+ GitBlitSuite.close(refChecks);
+
+ GitBlit.self().deleteUser(user.username);
+ }
+
+ @Test
+ public void testCreateOnPush() throws Exception {
+ testCreateOnPush(false, false);
+ testCreateOnPush(true, false);
+ testCreateOnPush(false, true);
+ }
+
+ private void testCreateOnPush(boolean canCreate, boolean canAdmin) throws Exception {
+
+ UserModel user = new UserModel("sampleuser");
+ user.password = user.username;
+
+ if (GitBlit.self().getUserModel(user.username) != null) {
+ GitBlit.self().deleteUser(user.username);
+ }
+
+ user.canCreate = canCreate;
+ user.canAdmin = canAdmin;
+
+ GitBlit.self().updateUserModel(user.username, user, true);
+
+ CredentialsProvider cp = new UsernamePasswordCredentialsProvider(user.username, user.password);
+
+ // fork from original to a temporary bare repo
+ File tmpFolder = File.createTempFile("gitblit", "").getParentFile();
+ File createCheck = new File(tmpFolder, "ticgit.git");
+ if (createCheck.exists()) {
+ FileUtils.delete(createCheck, FileUtils.RECURSIVE);
+ }
+
+ File personalRepo = new File(GitBlitSuite.REPOSITORIES, MessageFormat.format("~{0}/ticgit.git", user.username));
+ GitBlitSuite.close(personalRepo);
+ if (personalRepo.exists()) {
+ FileUtils.delete(personalRepo, FileUtils.RECURSIVE);
+ }
+
+ File projectRepo = new File(GitBlitSuite.REPOSITORIES, "project/ticgit.git");
+ GitBlitSuite.close(projectRepo);
+ if (projectRepo.exists()) {
+ FileUtils.delete(projectRepo, FileUtils.RECURSIVE);
+ }
+
+ CloneCommand clone = Git.cloneRepository();
+ clone.setURI(MessageFormat.format("{0}/git/ticgit.git", url));
+ clone.setDirectory(createCheck);
+ clone.setBare(true);
+ clone.setCloneAllBranches(true);
+ clone.setCredentialsProvider(cp);
+ Git git = clone.call();
+
+ GitBlitSuite.close(personalRepo);
+
+ // add a personal repository remote and a project remote
+ git.getRepository().getConfig().setString("remote", "user", "url", MessageFormat.format("{0}/git/~{1}/ticgit.git", url, user.username));
+ git.getRepository().getConfig().setString("remote", "project", "url", MessageFormat.format("{0}/git/project/ticgit.git", url));
+ git.getRepository().getConfig().save();
+
+ // push to non-existent user repository
+ try {
+ Iterable<PushResult> results = git.push().setRemote("user").setPushAll().setCredentialsProvider(cp).call();
+
+ for (PushResult result : results) {
+ RemoteRefUpdate ref = result.getRemoteUpdate("refs/heads/master");
+ Status status = ref.getStatus();
+ assertTrue("User failed to create repository?! " + status.name(), Status.OK.equals(status));
+ }
+
+ assertTrue("User canAdmin:" + user.canAdmin + " canCreate:" + user.canCreate, user.canAdmin || user.canCreate);
+
+ // confirm default personal repository permissions
+ RepositoryModel model = GitBlit.self().getRepositoryModel(MessageFormat.format("~{0}/ticgit.git", user.username));
+ assertEquals("Unexpected owner", user.username, ArrayUtils.toString(model.owners));
+ assertEquals("Unexpected authorization control", AuthorizationControl.NAMED, model.authorizationControl);
+ assertEquals("Unexpected access restriction", AccessRestrictionType.VIEW, model.accessRestriction);
+
+ } catch (GitAPIException e) {
+ assertTrue(e.getMessage(), e.getMessage().contains("git-receive-pack not found"));
+ assertFalse("User canAdmin:" + user.canAdmin + " canCreate:" + user.canCreate, user.canAdmin || user.canCreate);
+ }
+
+ // push to non-existent project repository
+ try {
+ Iterable<PushResult> results = git.push().setRemote("project").setPushAll().setCredentialsProvider(cp).call();
+ GitBlitSuite.close(git);
+
+ for (PushResult result : results) {
+ RemoteRefUpdate ref = result.getRemoteUpdate("refs/heads/master");
+ Status status = ref.getStatus();
+ assertTrue("User failed to create repository?! " + status.name(), Status.OK.equals(status));
+ }
+
+ assertTrue("User canAdmin:" + user.canAdmin, user.canAdmin);
+
+ // confirm default project repository permissions
+ RepositoryModel model = GitBlit.self().getRepositoryModel("project/ticgit.git");
+ assertEquals("Unexpected owner", user.username, ArrayUtils.toString(model.owners));
+ assertEquals("Unexpected authorization control", AuthorizationControl.fromName(GitBlit.getString(Keys.git.defaultAuthorizationControl, "NAMED")), model.authorizationControl);
+ assertEquals("Unexpected access restriction", AccessRestrictionType.fromName(GitBlit.getString(Keys.git.defaultAccessRestriction, "NONE")), model.accessRestriction);
+
+ } catch (GitAPIException e) {
+ assertTrue(e.getMessage(), e.getMessage().contains("git-receive-pack not found"));
+ assertFalse("User canAdmin:" + user.canAdmin, user.canAdmin);
+ }
+
+ GitBlitSuite.close(git);
+ GitBlit.self().deleteUser(user.username);
+ }
+
+ @Test
+ public void testPushLog() throws IOException {
+ String name = "refchecks/ticgit.git";
+ File refChecks = new File(GitBlitSuite.REPOSITORIES, name);
+ FileRepository repository = new FileRepository(refChecks);
+ List<PushLogEntry> pushes = PushLogUtils.getPushLog(name, repository);
+ GitBlitSuite.close(repository);
+ assertTrue("Repository has an empty push log!", pushes.size() > 0);
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/GroovyScriptTest.java b/src/test/java/com/gitblit/tests/GroovyScriptTest.java
new file mode 100644
index 00000000..2954fa1d
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/GroovyScriptTest.java
@@ -0,0 +1,399 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import groovy.lang.Binding;
+import groovy.util.GroovyScriptEngine;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.transport.ReceiveCommand;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.gitblit.GitBlit;
+import com.gitblit.GitBlitException;
+import com.gitblit.models.RepositoryModel;
+import com.gitblit.models.TeamModel;
+import com.gitblit.models.UserModel;
+import com.gitblit.utils.StringUtils;
+
+/**
+ * Test class for Groovy scripts. Mostly this is to facilitate development.
+ *
+ * @author James Moger
+ *
+ */
+public class GroovyScriptTest {
+
+ private static final AtomicBoolean started = new AtomicBoolean(false);
+
+ @BeforeClass
+ public static void startGitblit() throws Exception {
+ started.set(GitBlitSuite.startGitblit());
+ }
+
+ @AfterClass
+ public static void stopGitblit() throws Exception {
+ if (started.get()) {
+ GitBlitSuite.stopGitblit();
+ }
+ }
+
+ @Test
+ public void testFogbugz() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("c18877690322dfc6ae3e37bb7f7085a24e94e887"), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master"));
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("c18877690322dfc6ae3e37bb7f7085a24e94e887"), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master2"));
+
+ RepositoryModel repository = GitBlit.self().getRepositoryModel("helloworld.git");
+ repository.customFields = new HashMap<String,String>();
+ repository.customFields.put( "fogbugzUrl", "http://bugs.test.com" );
+ repository.customFields.put( "fogbugzRepositoryId", "1" );
+ repository.customFields.put( "fogbugzCommitMessageRegex", "\\s*[Bb][Uu][Gg][(Zz)(Ss)]*\\s*[(IDs)]*\\s*[#:; ]+((\\d+[ ,:;#]*)+)" );
+
+ test("fogbugz.groovy", gitblit, logger, clientLogger, commands, repository);
+ }
+
+ @Test
+ public void testSendHtmlMail() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("c18877690322dfc6ae3e37bb7f7085a24e94e887"), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master"));
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("c18877690322dfc6ae3e37bb7f7085a24e94e887"), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master2"));
+
+ RepositoryModel repository = GitBlit.self().getRepositoryModel("helloworld.git");
+ repository.mailingLists.add("list@helloworld.git");
+
+ test("sendmail-html.groovy", gitblit, logger, clientLogger, commands, repository);
+ assertEquals(1, logger.messages.size());
+ assertEquals(1, gitblit.messages.size());
+ MockMail m = gitblit.messages.get(0);
+ assertEquals(5, m.toAddresses.size());
+ assertTrue(m.message.contains("BIT"));
+ assertTrue(m.message.contains("<html>"));
+ }
+
+ @Test
+ public void testSendMail() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("c18877690322dfc6ae3e37bb7f7085a24e94e887"), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master"));
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("c18877690322dfc6ae3e37bb7f7085a24e94e887"), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master2"));
+
+ RepositoryModel repository = GitBlit.self().getRepositoryModel("helloworld.git");
+ repository.mailingLists.add("list@helloworld.git");
+
+ test("sendmail.groovy", gitblit, logger, clientLogger, commands, repository);
+ assertEquals(1, logger.messages.size());
+ assertEquals(1, gitblit.messages.size());
+ MockMail m = gitblit.messages.get(0);
+ assertEquals(5, m.toAddresses.size());
+ assertTrue(m.message.contains("BIT"));
+ }
+
+ @Test
+ public void testProtectRefsCreateBranch() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ commands.add(new ReceiveCommand(ObjectId.zeroId(), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master"));
+
+ RepositoryModel repository = new RepositoryModel("ex@mple.git", "", "admin", new Date());
+
+ test("protect-refs.groovy", gitblit, logger, clientLogger, commands, repository);
+ }
+
+ @Test
+ public void testProtectRefsCreateTag() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ commands.add(new ReceiveCommand(ObjectId.zeroId(), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/tags/v1.0"));
+
+ RepositoryModel repository = new RepositoryModel("ex@mple.git", "", "admin", new Date());
+
+ test("protect-refs.groovy", gitblit, logger, clientLogger, commands, repository);
+ assertEquals(0, logger.messages.size());
+ }
+
+ @Test
+ public void testProtectRefsFastForward() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("c18877690322dfc6ae3e37bb7f7085a24e94e887"), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master"));
+
+ RepositoryModel repository = new RepositoryModel("ex@mple.git", "", "admin", new Date());
+
+ test("protect-refs.groovy", gitblit, logger, clientLogger, commands, repository);
+ assertEquals(0, logger.messages.size());
+ }
+
+ @Test
+ public void testProtectRefsDeleteMasterBranch() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ ReceiveCommand command = new ReceiveCommand(ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), ObjectId.zeroId(),
+ "refs/heads/master");
+ commands.add(command);
+
+ RepositoryModel repository = new RepositoryModel("ex@mple.git", "", "admin", new Date());
+
+ test("protect-refs.groovy", gitblit, logger, clientLogger, commands, repository);
+ assertEquals(ReceiveCommand.Result.REJECTED_NODELETE, command.getResult());
+ assertEquals(0, logger.messages.size());
+ }
+
+ @Test
+ public void testProtectRefsDeleteOtherBranch() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), ObjectId.zeroId(),
+ "refs/heads/other"));
+
+ RepositoryModel repository = new RepositoryModel("ex@mple.git", "", "admin", new Date());
+
+ test("protect-refs.groovy", gitblit, logger, clientLogger, commands, repository);
+ assertEquals(0, logger.messages.size());
+ }
+
+ @Test
+ public void testProtectRefsDeleteTag() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ ReceiveCommand command = new ReceiveCommand(ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), ObjectId.zeroId(),
+ "refs/tags/v1.0");
+ commands.add(command);
+
+ RepositoryModel repository = new RepositoryModel("ex@mple.git", "", "admin", new Date());
+
+ test("protect-refs.groovy", gitblit, logger, clientLogger, commands, repository);
+ assertEquals(ReceiveCommand.Result.REJECTED_NODELETE, command.getResult());
+ assertEquals(0, logger.messages.size());
+ }
+
+ @Test
+ public void testBlockPush() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("c18877690322dfc6ae3e37bb7f7085a24e94e887"), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master"));
+
+ RepositoryModel repository = new RepositoryModel("ex@mple.git", "", "admin", new Date());
+
+ try {
+ test("blockpush.groovy", gitblit, logger, clientLogger, commands, repository);
+ assertTrue("blockpush should have failed!", false);
+ } catch (GitBlitException e) {
+ assertTrue(e.getMessage().contains("failed"));
+ }
+ }
+
+ @Test
+ public void testClientLogging() throws Exception {
+ MockGitblit gitblit = new MockGitblit();
+ MockLogger logger = new MockLogger();
+ MockClientLogger clientLogger = new MockClientLogger();
+ List<ReceiveCommand> commands = new ArrayList<ReceiveCommand>();
+ commands.add(new ReceiveCommand(ObjectId
+ .fromString("c18877690322dfc6ae3e37bb7f7085a24e94e887"), ObjectId
+ .fromString("3fa7c46d11b11d61f1cbadc6888be5d0eae21969"), "refs/heads/master"));
+
+ RepositoryModel repository = new RepositoryModel("ex@mple.git", "", "admin", new Date());
+
+ File groovyDir = GitBlit.getGroovyScriptsFolder();
+ File tempScript = File.createTempFile("testClientLogging", "groovy", groovyDir);
+ tempScript.deleteOnExit();
+
+ BufferedWriter writer = new BufferedWriter(new FileWriter(tempScript));
+
+ writer.write("clientLogger.info('this is a test message')\n");
+ writer.flush();
+ writer.close();
+
+ test(tempScript.getName(), gitblit, logger, clientLogger, commands, repository);
+ assertTrue("Message Missing", clientLogger.messages.contains("this is a test message"));
+ }
+
+ private void test(String script, MockGitblit gitblit, MockLogger logger, MockClientLogger clientLogger,
+ List<ReceiveCommand> commands, RepositoryModel repository) throws Exception {
+
+ UserModel user = new UserModel("mock");
+
+ String gitblitUrl = GitBlitSuite.url;
+
+ File groovyDir = GitBlit.getGroovyScriptsFolder();
+ GroovyScriptEngine gse = new GroovyScriptEngine(groovyDir.getAbsolutePath());
+
+ Binding binding = new Binding();
+ binding.setVariable("gitblit", gitblit);
+ binding.setVariable("repository", repository);
+ binding.setVariable("user", user);
+ binding.setVariable("commands", commands);
+ binding.setVariable("url", gitblitUrl);
+ binding.setVariable("logger", logger);
+ binding.setVariable("clientLogger", clientLogger);
+
+ Object result = gse.run(script, binding);
+ if (result instanceof Boolean) {
+ if (!((Boolean) result)) {
+ throw new GitBlitException(MessageFormat.format(
+ "Groovy script {0} has failed! Hook scripts aborted.", script));
+ }
+ }
+ }
+
+ class MockGitblit {
+ List<MockMail> messages = new ArrayList<MockMail>();
+
+ public Repository getRepository(String name) throws Exception {
+ return GitBlitSuite.getHelloworldRepository();
+ }
+
+ public List<String> getStrings(String key) {
+ return Arrays.asList("alpha@aaa.com", "beta@bee.com", "gamma@see.com");
+ }
+
+ public List<String> getRepositoryTeams(RepositoryModel repository) {
+ return Arrays.asList("testteam");
+ }
+
+ public TeamModel getTeamModel(String name) {
+ TeamModel model = new TeamModel(name);
+ model.mailingLists.add("list@" + name + ".com");
+ return model;
+ }
+
+ public String getString(String key, String dv) {
+ return dv;
+ }
+
+ public boolean getBoolean(String key, boolean dv) {
+ return dv;
+ }
+
+ public void sendMail(String subject, String message, Collection<String> toAddresses) {
+ messages.add(new MockMail(subject, message, toAddresses));
+ }
+ public void sendHtmlMail(String subject, String message, Collection<String> toAddresses) {
+ messages.add(new MockMail(subject, message, toAddresses));
+ }
+ }
+
+ class MockLogger {
+ List<String> messages = new ArrayList<String>();
+
+ public void info(String message) {
+ messages.add(message);
+ }
+ }
+
+ class MockClientLogger {
+ List<String> messages = new ArrayList<String>();
+
+ public void info(String message) {
+ messages.add(message);
+ }
+
+ public void error(String message) {
+ messages.add(message);
+ }
+
+ public void error(String message, Throwable t) {
+ PrintWriter writer = new PrintWriter(new StringWriter());
+ if (!StringUtils.isEmpty(message)) {
+ writer.append(message);
+ writer.append('\n');
+ }
+ t.printStackTrace(writer);
+ messages.add(writer.toString());
+ }
+ }
+
+ class MockMail {
+ final Collection<String> toAddresses;
+ final String subject;
+ final String message;
+
+ MockMail(String subject, String message, Collection<String> toAddresses) {
+ this.subject = subject;
+ this.message = message;
+ this.toAddresses = toAddresses;
+ }
+
+ @Override
+ public String toString() {
+ return StringUtils.flattenStrings(toAddresses, ", ") + "\n\n" + subject + "\n\n"
+ + message;
+ }
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/IssuesTest.java b/src/test/java/com/gitblit/tests/IssuesTest.java
new file mode 100644
index 00000000..54cac335
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/IssuesTest.java
@@ -0,0 +1,231 @@
+/*
+ * Copyright 2012 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.List;
+
+import org.bouncycastle.util.Arrays;
+import org.eclipse.jgit.lib.Repository;
+import org.junit.Test;
+
+import com.gitblit.LuceneExecutor;
+import com.gitblit.models.IssueModel;
+import com.gitblit.models.IssueModel.Attachment;
+import com.gitblit.models.IssueModel.Change;
+import com.gitblit.models.IssueModel.Field;
+import com.gitblit.models.IssueModel.Priority;
+import com.gitblit.models.IssueModel.Status;
+import com.gitblit.models.SearchResult;
+import com.gitblit.utils.FileUtils;
+import com.gitblit.utils.IssueUtils;
+import com.gitblit.utils.IssueUtils.IssueFilter;
+
+/**
+ * Tests the mechanics of distributed issue management on the gb-issues branch.
+ *
+ * @author James Moger
+ *
+ */
+public class IssuesTest {
+
+ @Test
+ public void testLifecycle() throws Exception {
+ Repository repository = GitBlitSuite.getIssuesTestRepository();
+ String name = FileUtils.getRelativePath(GitBlitSuite.REPOSITORIES, repository.getDirectory());
+
+ // create and insert an issue
+ Change c1 = newChange("testCreation() " + Long.toHexString(System.currentTimeMillis()));
+ IssueModel issue = IssueUtils.createIssue(repository, c1);
+ assertNotNull(issue.id);
+
+ // retrieve issue and compare
+ IssueModel constructed = IssueUtils.getIssue(repository, issue.id);
+ compare(issue, constructed);
+
+ assertEquals(1, constructed.changes.size());
+
+ // C1: create the issue
+ c1 = newChange("testUpdates() " + Long.toHexString(System.currentTimeMillis()));
+ issue = IssueUtils.createIssue(repository, c1);
+ assertNotNull(issue.id);
+
+ constructed = IssueUtils.getIssue(repository, issue.id);
+ compare(issue, constructed);
+ assertEquals(1, constructed.changes.size());
+
+ // C2: set owner
+ Change c2 = new Change("C2");
+ c2.comment("I'll fix this");
+ c2.setField(Field.Owner, c2.author);
+ assertTrue(IssueUtils.updateIssue(repository, issue.id, c2));
+ constructed = IssueUtils.getIssue(repository, issue.id);
+ assertEquals(2, constructed.changes.size());
+ assertEquals(c2.author, constructed.owner);
+
+ // C3: add a note
+ Change c3 = new Change("C3");
+ c3.comment("yeah, this is working");
+ assertTrue(IssueUtils.updateIssue(repository, issue.id, c3));
+ constructed = IssueUtils.getIssue(repository, issue.id);
+ assertEquals(3, constructed.changes.size());
+
+ // C4: add attachment
+ Change c4 = new Change("C4");
+ Attachment a = newAttachment();
+ c4.addAttachment(a);
+ assertTrue(IssueUtils.updateIssue(repository, issue.id, c4));
+
+ Attachment a1 = IssueUtils.getIssueAttachment(repository, issue.id, a.name);
+ assertEquals(a.content.length, a1.content.length);
+ assertTrue(Arrays.areEqual(a.content, a1.content));
+
+ // C5: close the issue
+ Change c5 = new Change("C5");
+ c5.comment("closing issue");
+ c5.setField(Field.Status, Status.Fixed);
+ assertTrue(IssueUtils.updateIssue(repository, issue.id, c5));
+
+ // retrieve issue again
+ constructed = IssueUtils.getIssue(repository, issue.id);
+
+ assertEquals(5, constructed.changes.size());
+ assertTrue(constructed.status.isClosed());
+
+ List<IssueModel> allIssues = IssueUtils.getIssues(repository, null);
+ List<IssueModel> openIssues = IssueUtils.getIssues(repository, new IssueFilter() {
+ @Override
+ public boolean accept(IssueModel issue) {
+ return !issue.status.isClosed();
+ }
+ });
+ List<IssueModel> closedIssues = IssueUtils.getIssues(repository, new IssueFilter() {
+ @Override
+ public boolean accept(IssueModel issue) {
+ return issue.status.isClosed();
+ }
+ });
+
+ assertTrue(allIssues.size() > 0);
+ assertEquals(1, openIssues.size());
+ assertEquals(1, closedIssues.size());
+
+ // build a new Lucene index
+ LuceneExecutor lucene = new LuceneExecutor(null, GitBlitSuite.REPOSITORIES);
+ lucene.deleteIndex(name);
+ for (IssueModel anIssue : allIssues) {
+ lucene.index(name, anIssue);
+ }
+ List<SearchResult> hits = lucene.search("working", 1, 10, name);
+ assertTrue(hits.size() == 1);
+
+ // reindex an issue
+ issue = allIssues.get(0);
+ Change change = new Change("reindex");
+ change.comment("this is a test of reindexing an issue");
+ IssueUtils.updateIssue(repository, issue.id, change);
+ issue = IssueUtils.getIssue(repository, issue.id);
+ lucene.index(name, issue);
+
+ hits = lucene.search("working", 1, 10, name);
+ assertTrue(hits.size() == 1);
+
+
+ // delete all issues
+ for (IssueModel anIssue : allIssues) {
+ assertTrue(IssueUtils.deleteIssue(repository, anIssue.id, "D"));
+ }
+
+ lucene.close();
+ repository.close();
+ }
+
+ @Test
+ public void testChangeComment() throws Exception {
+ Repository repository = GitBlitSuite.getIssuesTestRepository();
+ // C1: create the issue
+ Change c1 = newChange("testChangeComment() " + Long.toHexString(System.currentTimeMillis()));
+ IssueModel issue = IssueUtils.createIssue(repository, c1);
+ assertNotNull(issue.id);
+ assertTrue(issue.changes.get(0).hasComment());
+
+ assertTrue(IssueUtils.changeComment(repository, issue, c1, "E1", "I changed the comment"));
+ issue = IssueUtils.getIssue(repository, issue.id);
+ assertTrue(issue.changes.get(0).hasComment());
+ assertEquals("I changed the comment", issue.changes.get(0).comment.text);
+
+ assertTrue(IssueUtils.deleteIssue(repository, issue.id, "D"));
+
+ repository.close();
+ }
+
+ @Test
+ public void testDeleteComment() throws Exception {
+ Repository repository = GitBlitSuite.getIssuesTestRepository();
+ // C1: create the issue
+ Change c1 = newChange("testDeleteComment() " + Long.toHexString(System.currentTimeMillis()));
+ IssueModel issue = IssueUtils.createIssue(repository, c1);
+ assertNotNull(issue.id);
+ assertTrue(issue.changes.get(0).hasComment());
+
+ assertTrue(IssueUtils.deleteComment(repository, issue, c1, "D1"));
+ issue = IssueUtils.getIssue(repository, issue.id);
+ assertEquals(1, issue.changes.size());
+ assertFalse(issue.changes.get(0).hasComment());
+
+ issue = IssueUtils.getIssue(repository, issue.id, false);
+ assertEquals(2, issue.changes.size());
+ assertTrue(issue.changes.get(0).hasComment());
+ assertFalse(issue.changes.get(1).hasComment());
+
+ assertTrue(IssueUtils.deleteIssue(repository, issue.id, "D"));
+
+ repository.close();
+ }
+
+ private Change newChange(String summary) {
+ Change change = new Change("C1");
+ change.setField(Field.Summary, summary);
+ change.setField(Field.Description, "this is my description");
+ change.setField(Field.Priority, Priority.High);
+ change.setField(Field.Labels, "helpdesk");
+ change.comment("my comment");
+ return change;
+ }
+
+ private Attachment newAttachment() {
+ Attachment attachment = new Attachment(Long.toHexString(System.currentTimeMillis())
+ + ".txt");
+ attachment.content = new byte[] { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
+ 0x4a };
+ return attachment;
+ }
+
+ private void compare(IssueModel issue, IssueModel constructed) {
+ assertEquals(issue.id, constructed.id);
+ assertEquals(issue.reporter, constructed.reporter);
+ assertEquals(issue.owner, constructed.owner);
+ assertEquals(issue.summary, constructed.summary);
+ assertEquals(issue.description, constructed.description);
+ assertEquals(issue.created, constructed.created);
+
+ assertTrue(issue.hasLabel("helpdesk"));
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/JGitUtilsTest.java b/src/test/java/com/gitblit/tests/JGitUtilsTest.java
new file mode 100644
index 00000000..ce72a46f
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/JGitUtilsTest.java
@@ -0,0 +1,472 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jgit.diff.DiffEntry.ChangeType;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.FileMode;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.PersonIdent;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.lib.RepositoryCache;
+import org.eclipse.jgit.lib.RepositoryCache.FileKey;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevTree;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.FileUtils;
+import org.junit.Test;
+
+import com.gitblit.Constants.SearchType;
+import com.gitblit.GitBlit;
+import com.gitblit.Keys;
+import com.gitblit.models.GitNote;
+import com.gitblit.models.PathModel;
+import com.gitblit.models.PathModel.PathChangeModel;
+import com.gitblit.models.RefModel;
+import com.gitblit.utils.CompressionUtils;
+import com.gitblit.utils.JGitUtils;
+import com.gitblit.utils.StringUtils;
+
+public class JGitUtilsTest {
+
+ @Test
+ public void testDisplayName() throws Exception {
+ assertEquals("Napoleon Bonaparte",
+ JGitUtils.getDisplayName(new PersonIdent("Napoleon Bonaparte", "")));
+ assertEquals("<someone@somewhere.com>",
+ JGitUtils.getDisplayName(new PersonIdent("", "someone@somewhere.com")));
+ assertEquals("Napoleon Bonaparte <someone@somewhere.com>",
+ JGitUtils.getDisplayName(new PersonIdent("Napoleon Bonaparte",
+ "someone@somewhere.com")));
+ }
+
+ @Test
+ public void testFindRepositories() {
+ List<String> list = JGitUtils.getRepositoryList(null, false, true, -1, null);
+ assertEquals(0, list.size());
+ list.addAll(JGitUtils.getRepositoryList(new File("DoesNotExist"), true, true, -1, null));
+ assertEquals(0, list.size());
+ list.addAll(JGitUtils.getRepositoryList(GitBlitSuite.REPOSITORIES, false, true, -1, null));
+ assertTrue("No repositories found in " + GitBlitSuite.REPOSITORIES, list.size() > 0);
+ }
+
+ @Test
+ public void testFindExclusions() {
+ List<String> list = JGitUtils.getRepositoryList(GitBlitSuite.REPOSITORIES, false, true, -1, null);
+ assertTrue("Missing jgit repository?!", list.contains("test/jgit.git"));
+
+ list = JGitUtils.getRepositoryList(GitBlitSuite.REPOSITORIES, false, true, -1, Arrays.asList("test/jgit\\.git"));
+ assertFalse("Repository exclusion failed!", list.contains("test/jgit.git"));
+
+ list = JGitUtils.getRepositoryList(GitBlitSuite.REPOSITORIES, false, true, -1, Arrays.asList("test/*"));
+ assertFalse("Repository exclusion failed!", list.contains("test/jgit.git"));
+
+ list = JGitUtils.getRepositoryList(GitBlitSuite.REPOSITORIES, false, true, -1, Arrays.asList(".*jgit.*"));
+ assertFalse("Repository exclusion failed!", list.contains("test/jgit.git"));
+ assertFalse("Repository exclusion failed!", list.contains("working/jgit"));
+ assertFalse("Repository exclusion failed!", list.contains("working/jgit2"));
+
+ }
+
+ @Test
+ public void testOpenRepository() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ repository.close();
+ assertNotNull("Could not find repository!", repository);
+ }
+
+ @Test
+ public void testFirstCommit() throws Exception {
+ assertEquals(new Date(0), JGitUtils.getFirstChange(null, null));
+
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ RevCommit commit = JGitUtils.getFirstCommit(repository, null);
+ Date firstChange = JGitUtils.getFirstChange(repository, null);
+ repository.close();
+ assertNotNull("Could not get first commit!", commit);
+ assertEquals("Incorrect first commit!", "f554664a346629dc2b839f7292d06bad2db4aece",
+ commit.getName());
+ assertTrue(firstChange.equals(new Date(commit.getCommitTime() * 1000L)));
+ }
+
+ @Test
+ public void testLastCommit() throws Exception {
+ assertEquals(new Date(0), JGitUtils.getLastChange(null));
+
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ assertTrue(JGitUtils.getCommit(repository, null) != null);
+ Date date = JGitUtils.getLastChange(repository);
+ repository.close();
+ assertNotNull("Could not get last repository change date!", date);
+ }
+
+ @Test
+ public void testCreateRepository() throws Exception {
+ String[] repositories = { "NewTestRepository.git", "NewTestRepository" };
+ for (String repositoryName : repositories) {
+ Repository repository = JGitUtils.createRepository(GitBlitSuite.REPOSITORIES,
+ repositoryName);
+ File folder = FileKey.resolve(new File(GitBlitSuite.REPOSITORIES, repositoryName),
+ FS.DETECTED);
+ assertNotNull(repository);
+ assertFalse(JGitUtils.hasCommits(repository));
+ assertNull(JGitUtils.getFirstCommit(repository, null));
+ assertEquals(folder.lastModified(), JGitUtils.getFirstChange(repository, null)
+ .getTime());
+ assertEquals(folder.lastModified(), JGitUtils.getLastChange(repository).getTime());
+ assertNull(JGitUtils.getCommit(repository, null));
+ repository.close();
+ RepositoryCache.close(repository);
+ FileUtils.delete(repository.getDirectory(), FileUtils.RECURSIVE);
+ }
+ }
+
+ @Test
+ public void testRefs() throws Exception {
+ Repository repository = GitBlitSuite.getJGitRepository();
+ Map<ObjectId, List<RefModel>> map = JGitUtils.getAllRefs(repository);
+ repository.close();
+ assertTrue(map.size() > 0);
+ for (Map.Entry<ObjectId, List<RefModel>> entry : map.entrySet()) {
+ List<RefModel> list = entry.getValue();
+ for (RefModel ref : list) {
+ if (ref.displayName.equals("refs/tags/spearce-gpg-pub")) {
+ assertEquals("refs/tags/spearce-gpg-pub", ref.toString());
+ assertEquals("8bbde7aacf771a9afb6992434f1ae413e010c6d8", ref.getObjectId()
+ .getName());
+ assertEquals("spearce@spearce.org", ref.getAuthorIdent().getEmailAddress());
+ assertTrue(ref.getShortMessage().startsWith("GPG key"));
+ assertTrue(ref.getFullMessage().startsWith("GPG key"));
+ assertEquals(Constants.OBJ_BLOB, ref.getReferencedObjectType());
+ } else if (ref.displayName.equals("refs/tags/v0.12.1")) {
+ assertTrue(ref.isAnnotatedTag());
+ }
+ }
+ }
+ }
+
+ @Test
+ public void testBranches() throws Exception {
+ Repository repository = GitBlitSuite.getJGitRepository();
+ assertTrue(JGitUtils.getLocalBranches(repository, true, 0).size() == 0);
+ for (RefModel model : JGitUtils.getLocalBranches(repository, true, -1)) {
+ assertTrue(model.getName().startsWith(Constants.R_HEADS));
+ assertTrue(model.equals(model));
+ assertFalse(model.equals(""));
+ assertTrue(model.hashCode() == model.getReferencedObjectId().hashCode()
+ + model.getName().hashCode());
+ assertTrue(model.getShortMessage().equals(model.getShortMessage()));
+ }
+ for (RefModel model : JGitUtils.getRemoteBranches(repository, true, -1)) {
+ assertTrue(model.getName().startsWith(Constants.R_REMOTES));
+ assertTrue(model.equals(model));
+ assertFalse(model.equals(""));
+ assertTrue(model.hashCode() == model.getReferencedObjectId().hashCode()
+ + model.getName().hashCode());
+ assertTrue(model.getShortMessage().equals(model.getShortMessage()));
+ }
+ assertTrue(JGitUtils.getRemoteBranches(repository, true, 8).size() == 8);
+ repository.close();
+ }
+
+ @Test
+ public void testTags() throws Exception {
+ Repository repository = GitBlitSuite.getJGitRepository();
+ assertTrue(JGitUtils.getTags(repository, true, 5).size() == 5);
+ for (RefModel model : JGitUtils.getTags(repository, true, -1)) {
+ if (model.getObjectId().getName().equals("d28091fb2977077471138fe97da1440e0e8ae0da")) {
+ assertTrue("Not an annotated tag!", model.isAnnotatedTag());
+ }
+ assertTrue(model.getName().startsWith(Constants.R_TAGS));
+ assertTrue(model.equals(model));
+ assertFalse(model.equals(""));
+ assertTrue(model.hashCode() == model.getReferencedObjectId().hashCode()
+ + model.getName().hashCode());
+ }
+ repository.close();
+
+ repository = GitBlitSuite.getGitectiveRepository();
+ for (RefModel model : JGitUtils.getTags(repository, true, -1)) {
+ if (model.getObjectId().getName().equals("035254295a9bba11f72b1f9d6791a6b957abee7b")) {
+ assertFalse(model.isAnnotatedTag());
+ assertTrue(model.getAuthorIdent().getEmailAddress().equals("kevinsawicki@gmail.com"));
+ assertEquals("Add scm and issue tracker elements to pom.xml\n", model.getFullMessage());
+ }
+ }
+ repository.close();
+ }
+
+ @Test
+ public void testCommitNotes() throws Exception {
+ Repository repository = GitBlitSuite.getJGitRepository();
+ RevCommit commit = JGitUtils.getCommit(repository,
+ "690c268c793bfc218982130fbfc25870f292295e");
+ List<GitNote> list = JGitUtils.getNotesOnCommit(repository, commit);
+ repository.close();
+ assertTrue(list.size() > 0);
+ assertEquals("183474d554e6f68478a02d9d7888b67a9338cdff", list.get(0).notesRef
+ .getReferencedObjectId().getName());
+ }
+
+ @Test
+ public void testRelinkHEAD() throws Exception {
+ Repository repository = GitBlitSuite.getJGitRepository();
+ // confirm HEAD is master
+ String currentRef = JGitUtils.getHEADRef(repository);
+ assertEquals("refs/heads/master", currentRef);
+ List<String> availableHeads = JGitUtils.getAvailableHeadTargets(repository);
+ assertTrue(availableHeads.size() > 0);
+
+ // set HEAD to stable-1.2
+ JGitUtils.setHEADtoRef(repository, "refs/heads/stable-1.2");
+ currentRef = JGitUtils.getHEADRef(repository);
+ assertEquals("refs/heads/stable-1.2", currentRef);
+
+ // restore HEAD to master
+ JGitUtils.setHEADtoRef(repository, "refs/heads/master");
+ currentRef = JGitUtils.getHEADRef(repository);
+ assertEquals("refs/heads/master", currentRef);
+
+ repository.close();
+ }
+
+ @Test
+ public void testRelinkBranch() throws Exception {
+ Repository repository = GitBlitSuite.getJGitRepository();
+
+ // create/set the branch
+ JGitUtils.setBranchRef(repository, "refs/heads/reftest", "3b358ce514ec655d3ff67de1430994d8428cdb04");
+ assertEquals(1, JGitUtils.getAllRefs(repository).get(ObjectId.fromString("3b358ce514ec655d3ff67de1430994d8428cdb04")).size());
+ assertEquals(null, JGitUtils.getAllRefs(repository).get(ObjectId.fromString("755dfdb40948f5c1ec79e06bde3b0a78c352f27f")));
+
+ // reset the branch
+ JGitUtils.setBranchRef(repository, "refs/heads/reftest", "755dfdb40948f5c1ec79e06bde3b0a78c352f27f");
+ assertEquals(null, JGitUtils.getAllRefs(repository).get(ObjectId.fromString("3b358ce514ec655d3ff67de1430994d8428cdb04")));
+ assertEquals(1, JGitUtils.getAllRefs(repository).get(ObjectId.fromString("755dfdb40948f5c1ec79e06bde3b0a78c352f27f")).size());
+
+ // delete the branch
+ assertTrue(JGitUtils.deleteBranchRef(repository, "refs/heads/reftest"));
+ repository.close();
+ }
+
+ @Test
+ public void testCreateOrphanedBranch() throws Exception {
+ Repository repository = JGitUtils.createRepository(GitBlitSuite.REPOSITORIES, "orphantest");
+ assertTrue(JGitUtils.createOrphanBranch(repository,
+ "x" + Long.toHexString(System.currentTimeMillis()).toUpperCase(), null));
+ FileUtils.delete(repository.getDirectory(), FileUtils.RECURSIVE);
+ }
+
+ @Test
+ public void testStringContent() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ String contentA = JGitUtils.getStringContent(repository, (RevTree) null, "java.java");
+ RevCommit commit = JGitUtils.getCommit(repository, Constants.HEAD);
+ String contentB = JGitUtils.getStringContent(repository, commit.getTree(), "java.java");
+ String contentC = JGitUtils.getStringContent(repository, commit.getTree(), "missing.txt");
+
+ // manually construct a blob, calculate the hash, lookup the hash in git
+ StringBuilder sb = new StringBuilder();
+ sb.append("blob ").append(contentA.length()).append('\0');
+ sb.append(contentA);
+ String sha1 = StringUtils.getSHA1(sb.toString());
+ String contentD = JGitUtils.getStringContent(repository, sha1);
+ repository.close();
+ assertTrue("ContentA is null!", contentA != null && contentA.length() > 0);
+ assertTrue("ContentB is null!", contentB != null && contentB.length() > 0);
+ assertTrue(contentA.equals(contentB));
+ assertNull(contentC);
+ assertTrue(contentA.equals(contentD));
+ }
+
+ @Test
+ public void testFilesInCommit() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ RevCommit commit = JGitUtils.getCommit(repository,
+ "1d0c2933a4ae69c362f76797d42d6bd182d05176");
+ List<PathChangeModel> paths = JGitUtils.getFilesInCommit(repository, commit);
+
+ commit = JGitUtils.getCommit(repository, "af0e9b2891fda85afc119f04a69acf7348922830");
+ List<PathChangeModel> deletions = JGitUtils.getFilesInCommit(repository, commit);
+
+ commit = JGitUtils.getFirstCommit(repository, null);
+ List<PathChangeModel> additions = JGitUtils.getFilesInCommit(repository, commit);
+
+ List<PathChangeModel> latestChanges = JGitUtils.getFilesInCommit(repository, null);
+
+ repository.close();
+ assertTrue("No changed paths found!", paths.size() == 1);
+ for (PathChangeModel path : paths) {
+ assertTrue("PathChangeModel hashcode incorrect!",
+ path.hashCode() == (path.commitId.hashCode() + path.path.hashCode()));
+ assertTrue("PathChangeModel equals itself failed!", path.equals(path));
+ assertFalse("PathChangeModel equals string failed!", path.equals(""));
+ }
+ assertEquals(ChangeType.DELETE, deletions.get(0).changeType);
+ assertEquals(ChangeType.ADD, additions.get(0).changeType);
+ assertTrue(latestChanges.size() > 0);
+ }
+
+ @Test
+ public void testFilesInPath() throws Exception {
+ assertEquals(0, JGitUtils.getFilesInPath(null, null, null).size());
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ List<PathModel> files = JGitUtils.getFilesInPath(repository, null, null);
+ repository.close();
+ assertTrue(files.size() > 10);
+ }
+
+ @Test
+ public void testDocuments() throws Exception {
+ Repository repository = GitBlitSuite.getTicgitRepository();
+ List<String> extensions = GitBlit.getStrings(Keys.web.markdownExtensions);
+ List<PathModel> markdownDocs = JGitUtils.getDocuments(repository, extensions);
+ List<PathModel> markdownDocs2 = JGitUtils.getDocuments(repository,
+ Arrays.asList(new String[] { ".mkd", ".md" }));
+ List<PathModel> allFiles = JGitUtils.getDocuments(repository, null);
+ repository.close();
+ assertTrue(markdownDocs.size() > 0);
+ assertTrue(markdownDocs2.size() > 0);
+ assertTrue(allFiles.size() > markdownDocs.size());
+ }
+
+ @Test
+ public void testFileModes() throws Exception {
+ assertEquals("drwxr-xr-x", JGitUtils.getPermissionsFromMode(FileMode.TREE.getBits()));
+ assertEquals("-rw-r--r--",
+ JGitUtils.getPermissionsFromMode(FileMode.REGULAR_FILE.getBits()));
+ assertEquals("-rwxr-xr-x",
+ JGitUtils.getPermissionsFromMode(FileMode.EXECUTABLE_FILE.getBits()));
+ assertEquals("symlink", JGitUtils.getPermissionsFromMode(FileMode.SYMLINK.getBits()));
+ assertEquals("submodule", JGitUtils.getPermissionsFromMode(FileMode.GITLINK.getBits()));
+ assertEquals("missing", JGitUtils.getPermissionsFromMode(FileMode.MISSING.getBits()));
+ }
+
+ @Test
+ public void testRevlog() throws Exception {
+ assertTrue(JGitUtils.getRevLog(null, 0).size() == 0);
+ List<RevCommit> commits = JGitUtils.getRevLog(null, 10);
+ assertEquals(0, commits.size());
+
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ // get most recent 10 commits
+ commits = JGitUtils.getRevLog(repository, 10);
+ assertEquals(10, commits.size());
+
+ // test paging and offset by getting the 10th most recent commit
+ RevCommit lastCommit = JGitUtils.getRevLog(repository, null, 9, 1).get(0);
+ assertEquals(lastCommit, commits.get(9));
+
+ // grab the two most recent commits to java.java
+ commits = JGitUtils.getRevLog(repository, null, "java.java", 0, 2);
+ assertEquals(2, commits.size());
+
+ // grab the commits since 2008-07-15
+ commits = JGitUtils.getRevLog(repository, null,
+ new SimpleDateFormat("yyyy-MM-dd").parse("2008-07-15"));
+ assertEquals(12, commits.size());
+ repository.close();
+ }
+
+ @Test
+ public void testRevLogRange() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ List<RevCommit> commits = JGitUtils.getRevLog(repository,
+ "fbd14fa6d1a01d4aefa1fca725792683800fc67e",
+ "85a0e4087b8439c0aa6b1f4f9e08c26052ab7e87");
+ repository.close();
+ assertEquals(14, commits.size());
+ }
+
+ @Test
+ public void testSearchTypes() throws Exception {
+ assertEquals(SearchType.COMMIT, SearchType.forName("commit"));
+ assertEquals(SearchType.COMMITTER, SearchType.forName("committer"));
+ assertEquals(SearchType.AUTHOR, SearchType.forName("author"));
+ assertEquals(SearchType.COMMIT, SearchType.forName("unknown"));
+
+ assertEquals("commit", SearchType.COMMIT.toString());
+ assertEquals("committer", SearchType.COMMITTER.toString());
+ assertEquals("author", SearchType.AUTHOR.toString());
+ }
+
+ @Test
+ public void testSearchRevlogs() throws Exception {
+ assertEquals(0, JGitUtils.searchRevlogs(null, null, "java", SearchType.COMMIT, 0, 0).size());
+ List<RevCommit> results = JGitUtils.searchRevlogs(null, null, "java", SearchType.COMMIT, 0,
+ 3);
+ assertEquals(0, results.size());
+
+ // test commit message search
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ results = JGitUtils.searchRevlogs(repository, null, "java", SearchType.COMMIT, 0, 3);
+ assertEquals(3, results.size());
+
+ // test author search
+ results = JGitUtils.searchRevlogs(repository, null, "timothy", SearchType.AUTHOR, 0, -1);
+ assertEquals(1, results.size());
+
+ // test committer search
+ results = JGitUtils.searchRevlogs(repository, null, "mike", SearchType.COMMITTER, 0, 10);
+ assertEquals(10, results.size());
+
+ // test paging and offset
+ RevCommit commit = JGitUtils.searchRevlogs(repository, null, "mike", SearchType.COMMITTER,
+ 9, 1).get(0);
+ assertEquals(results.get(9), commit);
+
+ repository.close();
+ }
+
+ @Test
+ public void testZip() throws Exception {
+ assertFalse(CompressionUtils.zip(null, null, null, null));
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ File zipFileA = new File(GitBlitSuite.REPOSITORIES, "helloworld.zip");
+ FileOutputStream fosA = new FileOutputStream(zipFileA);
+ boolean successA = CompressionUtils.zip(repository, null, Constants.HEAD, fosA);
+ fosA.close();
+
+ File zipFileB = new File(GitBlitSuite.REPOSITORIES, "helloworld-java.zip");
+ FileOutputStream fosB = new FileOutputStream(zipFileB);
+ boolean successB = CompressionUtils.zip(repository, "java.java", Constants.HEAD, fosB);
+ fosB.close();
+
+ repository.close();
+ assertTrue("Failed to generate zip file!", successA);
+ assertTrue(zipFileA.length() > 0);
+ zipFileA.delete();
+
+ assertTrue("Failed to generate zip file!", successB);
+ assertTrue(zipFileB.length() > 0);
+ zipFileB.delete();
+ }
+
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/JsonUtilsTest.java b/src/test/java/com/gitblit/tests/JsonUtilsTest.java
new file mode 100644
index 00000000..cf058441
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/JsonUtilsTest.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Test;
+
+import com.gitblit.utils.JsonUtils;
+import com.google.gson.reflect.TypeToken;
+
+public class JsonUtilsTest {
+
+ @Test
+ public void testSerialization() {
+ Map<String, String> map = new HashMap<String, String>();
+ map.put("a", "alligator");
+ map.put("b", "bear");
+ map.put("c", "caterpillar");
+ map.put("d", "dingo");
+ map.put("e", "eagle");
+ String json = JsonUtils.toJsonString(map);
+ assertEquals(
+ "{\n \"d\": \"dingo\",\n \"e\": \"eagle\",\n \"b\": \"bear\",\n \"c\": \"caterpillar\",\n \"a\": \"alligator\"\n}",
+ json);
+ Map<String, String> map2 = JsonUtils.fromJsonString(json,
+ new TypeToken<Map<String, String>>() {
+ }.getType());
+ assertEquals(map, map2);
+
+ SomeJsonObject someJson = new SomeJsonObject();
+ json = JsonUtils.toJsonString(someJson);
+ SomeJsonObject someJson2 = JsonUtils.fromJsonString(json, SomeJsonObject.class);
+ assertEquals(someJson.name, someJson2.name);
+ SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd HHmmss");
+ assertEquals(df.format(someJson.date), df.format(someJson2.date));
+ }
+
+ private class SomeJsonObject {
+ Date date = new Date();
+ String name = "myJson";
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/LdapUserServiceTest.java b/src/test/java/com/gitblit/tests/LdapUserServiceTest.java
new file mode 100644
index 00000000..a928f4a5
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/LdapUserServiceTest.java
@@ -0,0 +1,174 @@
+/*
+ * Copyright 2012 John Crygier
+ * Copyright 2012 gitblit.com
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.gitblit.LdapUserService;
+import com.gitblit.models.UserModel;
+import com.gitblit.tests.mock.MemorySettings;
+import com.gitblit.utils.StringUtils;
+import com.unboundid.ldap.listener.InMemoryDirectoryServer;
+import com.unboundid.ldap.listener.InMemoryDirectoryServerConfig;
+import com.unboundid.ldap.listener.InMemoryListenerConfig;
+import com.unboundid.ldif.LDIFReader;
+
+/**
+ * An Integration test for LDAP that tests going against an in-memory UnboundID
+ * LDAP server.
+ *
+ * @author jcrygier
+ *
+ */
+public class LdapUserServiceTest {
+
+ private LdapUserService ldapUserService;
+
+ static int ldapPort = 1389;
+
+ @BeforeClass
+ public static void createInMemoryLdapServer() throws Exception {
+ InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig("dc=MyDomain");
+ config.addAdditionalBindCredentials("cn=Directory Manager", "password");
+ config.setListenerConfigs(InMemoryListenerConfig.createLDAPConfig("default", ldapPort));
+ config.setSchema(null);
+
+ InMemoryDirectoryServer ds = new InMemoryDirectoryServer(config);
+ ds.importFromLDIF(true, new LDIFReader(LdapUserServiceTest.class.getResourceAsStream("resources/ldapUserServiceSampleData.ldif")));
+ ds.startListening();
+ }
+
+ @Before
+ public void createLdapUserService() {
+ ldapUserService = new LdapUserService();
+ ldapUserService.setup(getSettings());
+ }
+
+ private MemorySettings getSettings() {
+ Map<String, Object> backingMap = new HashMap<String, Object>();
+ backingMap.put("realm.ldap.server", "ldap://localhost:" + ldapPort);
+ backingMap.put("realm.ldap.domain", "");
+ backingMap.put("realm.ldap.username", "cn=Directory Manager");
+ backingMap.put("realm.ldap.password", "password");
+ backingMap.put("realm.ldap.backingUserService", "users.conf");
+ backingMap.put("realm.ldap.maintainTeams", "true");
+ backingMap.put("realm.ldap.accountBase", "OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain");
+ backingMap.put("realm.ldap.accountPattern", "(&(objectClass=person)(sAMAccountName=${username}))");
+ backingMap.put("realm.ldap.groupBase", "OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain");
+ backingMap.put("realm.ldap.groupPattern", "(&(objectClass=group)(member=${dn}))");
+ backingMap.put("realm.ldap.admins", "UserThree @Git_Admins \"@Git Admins\"");
+ backingMap.put("realm.ldap.displayName", "displayName");
+ backingMap.put("realm.ldap.email", "email");
+
+ MemorySettings ms = new MemorySettings(backingMap);
+ return ms;
+ }
+
+ @Test
+ public void testAuthenticate() {
+ UserModel userOneModel = ldapUserService.authenticate("UserOne", "userOnePassword".toCharArray());
+ assertNotNull(userOneModel);
+ assertNotNull(userOneModel.getTeam("git_admins"));
+ assertNotNull(userOneModel.getTeam("git_users"));
+ assertTrue(userOneModel.canAdmin);
+
+ UserModel userOneModelFailedAuth = ldapUserService.authenticate("UserOne", "userTwoPassword".toCharArray());
+ assertNull(userOneModelFailedAuth);
+
+ UserModel userTwoModel = ldapUserService.authenticate("UserTwo", "userTwoPassword".toCharArray());
+ assertNotNull(userTwoModel);
+ assertNotNull(userTwoModel.getTeam("git_users"));
+ assertNull(userTwoModel.getTeam("git_admins"));
+ assertNotNull(userTwoModel.getTeam("git admins"));
+ assertTrue(userTwoModel.canAdmin);
+
+ UserModel userThreeModel = ldapUserService.authenticate("UserThree", "userThreePassword".toCharArray());
+ assertNotNull(userThreeModel);
+ assertNotNull(userThreeModel.getTeam("git_users"));
+ assertNull(userThreeModel.getTeam("git_admins"));
+ assertTrue(userThreeModel.canAdmin);
+ }
+
+ @Test
+ public void testDisplayName() {
+ UserModel userOneModel = ldapUserService.authenticate("UserOne", "userOnePassword".toCharArray());
+ assertNotNull(userOneModel);
+ assertEquals("User One", userOneModel.displayName);
+
+ // Test more complicated scenarios - concat
+ MemorySettings ms = getSettings();
+ ms.put("realm.ldap.displayName", "${personalTitle}. ${givenName} ${surname}");
+ ldapUserService = new LdapUserService();
+ ldapUserService.setup(ms);
+
+ userOneModel = ldapUserService.authenticate("UserOne", "userOnePassword".toCharArray());
+ assertNotNull(userOneModel);
+ assertEquals("Mr. User One", userOneModel.displayName);
+ }
+
+ @Test
+ public void testEmail() {
+ UserModel userOneModel = ldapUserService.authenticate("UserOne", "userOnePassword".toCharArray());
+ assertNotNull(userOneModel);
+ assertEquals("userone@gitblit.com", userOneModel.emailAddress);
+
+ // Test more complicated scenarios - concat
+ MemorySettings ms = getSettings();
+ ms.put("realm.ldap.email", "${givenName}.${surname}@gitblit.com");
+ ldapUserService = new LdapUserService();
+ ldapUserService.setup(ms);
+
+ userOneModel = ldapUserService.authenticate("UserOne", "userOnePassword".toCharArray());
+ assertNotNull(userOneModel);
+ assertEquals("User.One@gitblit.com", userOneModel.emailAddress);
+ }
+
+ @Test
+ public void testLdapInjection() {
+ // Inject so "(&(objectClass=person)(sAMAccountName=${username}))" becomes "(&(objectClass=person)(sAMAccountName=*)(userPassword=userOnePassword))"
+ // Thus searching by password
+
+ UserModel userOneModel = ldapUserService.authenticate("*)(userPassword=userOnePassword", "userOnePassword".toCharArray());
+ assertNull(userOneModel);
+ }
+
+ @Test
+ public void testLocalAccount() {
+ UserModel localAccount = new UserModel("bruce");
+ localAccount.displayName = "Bruce Campbell";
+ localAccount.password = StringUtils.MD5_TYPE + StringUtils.getMD5("gimmesomesugar");
+ ldapUserService.deleteUser(localAccount.username);
+ assertTrue("Failed to add local account",
+ ldapUserService.updateUserModel(localAccount));
+ assertEquals("Accounts are not equal!",
+ localAccount,
+ ldapUserService.authenticate(localAccount.username, "gimmesomesugar".toCharArray()));
+ assertTrue("Failed to delete local account!",
+ ldapUserService.deleteUser(localAccount.username));
+ }
+
+}
diff --git a/src/test/java/com/gitblit/tests/LuceneExecutorTest.java b/src/test/java/com/gitblit/tests/LuceneExecutorTest.java
new file mode 100644
index 00000000..6b45b9fe
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/LuceneExecutorTest.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright 2012 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jgit.lib.Repository;
+import org.junit.Test;
+
+import com.gitblit.LuceneExecutor;
+import com.gitblit.models.RefModel;
+import com.gitblit.models.RepositoryModel;
+import com.gitblit.models.SearchResult;
+import com.gitblit.tests.mock.MemorySettings;
+import com.gitblit.utils.FileUtils;
+import com.gitblit.utils.JGitUtils;
+
+/**
+ * Tests Lucene indexing and querying.
+ *
+ * @author James Moger
+ *
+ */
+public class LuceneExecutorTest {
+
+ private LuceneExecutor newLuceneExecutor() {
+ Map<String, Object> map = new HashMap<String, Object>();
+ MemorySettings settings = new MemorySettings(map);
+ return new LuceneExecutor(settings, GitBlitSuite.REPOSITORIES);
+ }
+
+ private RepositoryModel newRepositoryModel(Repository repository) {
+ RepositoryModel model = new RepositoryModel();
+ model.name = FileUtils.getRelativePath(GitBlitSuite.REPOSITORIES, repository.getDirectory());
+ model.hasCommits = JGitUtils.hasCommits(repository);
+
+ // index all local branches
+ model.indexedBranches = new ArrayList<String>();
+ for (RefModel ref : JGitUtils.getLocalBranches(repository, true, -1)) {
+ model.indexedBranches.add(ref.getName());
+ }
+ return model;
+ }
+
+ @Test
+ public void testIndex() throws Exception {
+ LuceneExecutor lucene = newLuceneExecutor();
+
+ // reindex helloworld
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ RepositoryModel model = newRepositoryModel(repository);
+ lucene.reindex(model, repository);
+ repository.close();
+
+ SearchResult result = lucene.search("type:blob AND path:bit.bit", 1, 1, model.name).get(0);
+ assertEquals("Mike Donaghy", result.author);
+ result = lucene.search("type:blob AND path:clipper.prg", 1, 1, model.name).get(0);
+ assertEquals("tinogomes", result.author);
+
+ // reindex theoretical physics
+ repository = GitBlitSuite.getTheoreticalPhysicsRepository();
+ model = newRepositoryModel(repository);
+ lucene.reindex(model, repository);
+ repository.close();
+
+ // reindex JGit
+ repository = GitBlitSuite.getJGitRepository();
+ model = newRepositoryModel(repository);
+ lucene.reindex(model, repository);
+ repository.close();
+
+ lucene.close();
+ }
+
+ @Test
+ public void testQuery() throws Exception {
+ LuceneExecutor lucene = new LuceneExecutor(null, GitBlitSuite.REPOSITORIES);
+
+ // 2 occurrences on the master branch
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ RepositoryModel model = newRepositoryModel(repository);
+ repository.close();
+
+ List<SearchResult> results = lucene.search("ada", 1, 10, model.name);
+ assertEquals(2, results.size());
+ for (SearchResult res : results) {
+ assertEquals("refs/heads/master", res.branch);
+ }
+
+ // author test
+ results = lucene.search("author: tinogomes AND type:commit", 1, 10, model.name);
+ assertEquals(2, results.size());
+
+ // blob test
+ results = lucene.search("type: blob AND \"import std.stdio\"", 1, 10, model.name);
+ assertEquals(1, results.size());
+ assertEquals("d.D", results.get(0).path);
+
+ // 1 occurrence on the gh-pages branch
+ repository = GitBlitSuite.getTheoreticalPhysicsRepository();
+ model = newRepositoryModel(repository);
+ repository.close();
+
+ results = lucene.search("\"add the .nojekyll file\"", 1, 10, model.name);
+ assertEquals(1, results.size());
+ assertEquals("Ondrej Certik", results.get(0).author);
+ assertEquals("2648c0c98f2101180715b4d432fc58d0e21a51d7", results.get(0).commitId);
+ assertEquals("refs/heads/gh-pages", results.get(0).branch);
+
+ results = lucene.search("type:blob AND \"src/intro.rst\"", 1, 10, model.name);
+ assertEquals(4, results.size());
+
+ // hash id tests
+ results = lucene.search("commit:57c4f26f157ece24b02f4f10f5f68db1d2ce7ff5", 1, 10, model.name);
+ assertEquals(1, results.size());
+
+ results = lucene.search("commit:57c4f26f157*", 1, 10, model.name);
+ assertEquals(1, results.size());
+
+ // annotated tag test
+ repository = GitBlitSuite.getJGitRepository();
+ model = newRepositoryModel(repository);
+ repository.close();
+
+ results = lucene.search("I663208919f297836a9c16bf458e4a43ffaca4c12", 1, 10, model.name);
+ assertEquals(1, results.size());
+ assertEquals("[v1.3.0.201202151440-r]", results.get(0).tags.toString());
+
+ lucene.close();
+ }
+
+ @Test
+ public void testMultiSearch() throws Exception {
+ LuceneExecutor lucene = newLuceneExecutor();
+ List<String> list = new ArrayList<String>();
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ list.add(newRepositoryModel(repository).name);
+ repository.close();
+
+ repository = GitBlitSuite.getJGitRepository();
+ list.add(newRepositoryModel(repository).name);
+ repository.close();
+
+ List<SearchResult> results = lucene.search("test", 1, 10, list);
+ lucene.close();
+ assertEquals(10, results.size());
+ }
+
+ @Test
+ public void testDeleteBlobFromIndex() throws Exception {
+ // start with a fresh reindex of entire repository
+ LuceneExecutor lucene = newLuceneExecutor();
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ RepositoryModel model = newRepositoryModel(repository);
+ lucene.reindex(model, repository);
+
+ // now delete a blob
+ assertTrue(lucene.deleteBlob(model.name, "refs/heads/master", "java.java"));
+ assertFalse(lucene.deleteBlob(model.name, "refs/heads/master", "java.java"));
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/MailTest.java b/src/test/java/com/gitblit/tests/MailTest.java
new file mode 100644
index 00000000..05d55a24
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/MailTest.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.mail.Message;
+
+import org.junit.Test;
+
+import com.gitblit.FileSettings;
+import com.gitblit.MailExecutor;
+
+public class MailTest {
+
+ @Test
+ public void testSendMail() throws Exception {
+ FileSettings settings = new FileSettings("mailtest.properties");
+ MailExecutor mail = new MailExecutor(settings);
+ Message message = mail.createMessageForAdministrators();
+ message.setSubject("Test");
+ message.setText("this is a test");
+ mail.queue(message);
+ mail.run();
+
+ assertTrue("mail queue is not empty!", mail.hasEmptyQueue());
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/MarkdownUtilsTest.java b/src/test/java/com/gitblit/tests/MarkdownUtilsTest.java
new file mode 100644
index 00000000..cd7ca020
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/MarkdownUtilsTest.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.text.ParseException;
+
+import org.junit.Test;
+
+import com.gitblit.utils.MarkdownUtils;
+
+public class MarkdownUtilsTest {
+
+ @Test
+ public void testMarkdown() throws Exception {
+ assertEquals("<h1> H1</h1>", MarkdownUtils.transformMarkdown("# H1"));
+ assertEquals("<h2> H2</h2>", MarkdownUtils.transformMarkdown("## H2"));
+ assertEquals("<p><strong>THIS</strong> is a test</p>",
+ MarkdownUtils.transformMarkdown("**THIS** is a test"));
+ assertEquals("<p>** THIS ** is a test</p>",
+ MarkdownUtils.transformMarkdown("** THIS ** is a test"));
+ assertEquals("<p>**THIS ** is a test</p>",
+ MarkdownUtils.transformMarkdown("**THIS ** is a test"));
+ assertEquals("<p>** THIS** is a test</p>",
+ MarkdownUtils.transformMarkdown("** THIS** is a test"));
+
+ assertEquals("<table><tr><td>test</td></tr></table>",
+ MarkdownUtils.transformMarkdown("<table><tr><td>test</td></tr></table>"));
+ assertEquals("<table><tr><td>&lt;test&gt;</td></tr></table>",
+ MarkdownUtils.transformMarkdown("<table><tr><td>&lt;test&gt;</td></tr></table>"));
+
+ try {
+ MarkdownUtils.transformMarkdown((String) null);
+ assertTrue(false);
+ } catch (ParseException p) {
+ assertTrue(p != null);
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/MetricUtilsTest.java b/src/test/java/com/gitblit/tests/MetricUtilsTest.java
new file mode 100644
index 00000000..bb8261af
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/MetricUtilsTest.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.List;
+import java.util.TimeZone;
+
+import org.eclipse.jgit.lib.Repository;
+import org.junit.Test;
+
+import com.gitblit.models.Metric;
+import com.gitblit.utils.MetricUtils;
+
+public class MetricUtilsTest {
+
+ @Test
+ public void testMetrics() throws Exception {
+ testMetrics(GitBlitSuite.getHelloworldRepository());
+ testMetrics(GitBlitSuite.getJGitRepository());
+ }
+
+ private void testMetrics(Repository repository) throws Exception {
+ List<Metric> metrics = MetricUtils.getDateMetrics(repository, null, true, null,
+ TimeZone.getDefault());
+ repository.close();
+ assertTrue("No date metrics found!", metrics.size() > 0);
+ }
+
+ @Test
+ public void testAuthorMetrics() throws Exception {
+ Repository repository = GitBlitSuite.getHelloworldRepository();
+ List<Metric> byEmail = MetricUtils.getAuthorMetrics(repository, null, true);
+ List<Metric> byName = MetricUtils.getAuthorMetrics(repository, null, false);
+ repository.close();
+ assertEquals("No author metrics found!", 9, byEmail.size());
+ assertEquals("No author metrics found!", 8, byName.size());
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/ObjectCacheTest.java b/src/test/java/com/gitblit/tests/ObjectCacheTest.java
new file mode 100644
index 00000000..8d07fe65
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/ObjectCacheTest.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Date;
+
+import org.junit.Test;
+
+import com.gitblit.utils.ObjectCache;
+
+public class ObjectCacheTest {
+
+ @Test
+ public void testCache() throws Exception {
+ ObjectCache<String> cache = new ObjectCache<String>();
+ cache.updateObject("test", "alpha");
+ Date date = cache.getDate("test");
+ assertTrue("cache date is not working!", cache.hasCurrent("test", date));
+ // The cache is time-based (msecs) so we insert this artificial sleep to
+ // ensure that time (msecs) advances. The ObjectCache class is suitable
+ // for Gitblit's needs but may not be suitable for other needs.
+ Thread.sleep(10);
+ cache.updateObject("test", "beta");
+ assertFalse("update cache date is not working!", cache.hasCurrent("test", date));
+ assertEquals("unexpected cache object", cache.getObject("test"), "beta");
+ assertEquals("beta", cache.remove("test"));
+ assertEquals(null, cache.getObject("test"));
+ assertEquals(null, cache.remove("test"));
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/PermissionsTest.java b/src/test/java/com/gitblit/tests/PermissionsTest.java
new file mode 100644
index 00000000..5a951042
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/PermissionsTest.java
@@ -0,0 +1,2635 @@
+/*
+ * Copyright 2012 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import java.util.Date;
+
+import junit.framework.Assert;
+
+import org.junit.Test;
+
+import com.gitblit.Constants.AccessPermission;
+import com.gitblit.Constants.AccessRestrictionType;
+import com.gitblit.Constants.AuthorizationControl;
+import com.gitblit.models.RepositoryModel;
+import com.gitblit.models.TeamModel;
+import com.gitblit.models.UserModel;
+
+/**
+ * Comprehensive, brute-force test of all permutations of discrete permissions.
+ *
+ * @author James Moger
+ *
+ */
+public class PermissionsTest extends Assert {
+
+ /**
+ * Admin access rights/permissions
+ */
+ @Test
+ public void testAdmin() throws Exception {
+ UserModel user = new UserModel("admin");
+ user.canAdmin = true;
+
+ for (AccessRestrictionType ar : AccessRestrictionType.values()) {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = ar;
+
+ assertTrue("admin CAN NOT view!", user.canView(repository));
+ assertTrue("admin CAN NOT clone!", user.canClone(repository));
+ assertTrue("admin CAN NOT push!", user.canPush(repository));
+
+ assertTrue("admin CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("admin CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("admin CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ assertTrue("admin CAN NOT fork!", user.canFork(repository));
+
+ assertTrue("admin CAN NOT delete!", user.canDelete(repository));
+ assertTrue("admin CAN NOT edit!", user.canEdit(repository));
+ }
+ }
+
+ /**
+ * Anonymous access rights/permissions
+ */
+ @Test
+ public void testAnonymous_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ UserModel user = UserModel.ANONYMOUS;
+
+ // all permissions, except fork
+ assertTrue("anonymous CAN NOT view!", user.canView(repository));
+ assertTrue("anonymous CAN NOT clone!", user.canClone(repository));
+ assertTrue("anonymous CAN NOT push!", user.canPush(repository));
+
+ assertTrue("anonymous CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("anonymous CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("anonymous CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ assertFalse("anonymous CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("anonymous CAN fork!", user.canFork(repository));
+
+ assertFalse("anonymous CAN delete!", user.canDelete(repository));
+ assertFalse("anonymous CAN edit!", user.canEdit(repository));
+ }
+
+ @Test
+ public void testAnonymous_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ UserModel user = UserModel.ANONYMOUS;
+
+ assertTrue("anonymous CAN NOT view!", user.canView(repository));
+ assertTrue("anonymous CAN NOT clone!", user.canClone(repository));
+ assertFalse("anonymous CAN push!", user.canPush(repository));
+
+ assertFalse("anonymous CAN create ref!", user.canCreateRef(repository));
+ assertFalse("anonymous CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("anonymous CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ assertFalse("anonymous CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("anonymous CAN fork!", user.canFork(repository));
+ }
+
+ @Test
+ public void testAnonymous_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ UserModel user = UserModel.ANONYMOUS;
+
+ assertTrue("anonymous CAN NOT view!", user.canView(repository));
+ assertFalse("anonymous CAN clone!", user.canClone(repository));
+ assertFalse("anonymous CAN push!", user.canPush(repository));
+
+ assertFalse("anonymous CAN create ref!", user.canCreateRef(repository));
+ assertFalse("anonymous CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("anonymous CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ assertFalse("anonymous CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("anonymous CAN fork!", user.canFork(repository));
+ }
+
+ @Test
+ public void testAnonymous_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = UserModel.ANONYMOUS;
+
+ assertFalse("anonymous CAN view!", user.canView(repository));
+ assertFalse("anonymous CAN clone!", user.canClone(repository));
+ assertFalse("anonymous CAN push!", user.canPush(repository));
+
+ assertFalse("anonymous CAN create ref!", user.canCreateRef(repository));
+ assertFalse("anonymous CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("anonymous CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ assertFalse("anonymous CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("anonymous CAN fork!", user.canFork(repository));
+ }
+
+ /**
+ * Authenticated access rights/permissions
+ */
+ @Test
+ public void testAuthenticated_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.AUTHENTICATED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ UserModel user = new UserModel("test");
+
+ // all permissions, except fork
+ assertTrue("authenticated CAN NOT view!", user.canView(repository));
+ assertTrue("authenticated CAN NOT clone!", user.canClone(repository));
+ assertTrue("authenticated CAN NOT push!", user.canPush(repository));
+
+ assertTrue("authenticated CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("authenticated CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("authenticated CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ user.canFork = false;
+ repository.allowForks = false;
+ assertFalse("authenticated CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("authenticated CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertTrue("authenticated CAN NOT fork!", user.canFork(repository));
+
+ assertFalse("authenticated CAN delete!", user.canDelete(repository));
+ assertFalse("authenticated CAN edit!", user.canEdit(repository));
+ }
+
+ @Test
+ public void testAuthenticated_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.AUTHENTICATED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ UserModel user = new UserModel("test");
+
+ assertTrue("authenticated CAN NOT view!", user.canView(repository));
+ assertTrue("authenticated CAN NOT clone!", user.canClone(repository));
+ assertTrue("authenticated CAN NOT push!", user.canPush(repository));
+
+ assertTrue("authenticated CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("authenticated CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("authenticated CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ user.canFork = false;
+ repository.allowForks = false;
+ assertFalse("authenticated CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("authenticated CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertTrue("authenticated CAN NOT fork!", user.canFork(repository));
+ }
+
+ @Test
+ public void testAuthenticated_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.AUTHENTICATED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ UserModel user = new UserModel("test");
+
+ assertTrue("authenticated CAN NOT view!", user.canView(repository));
+ assertTrue("authenticated CAN NOT clone!", user.canClone(repository));
+ assertTrue("authenticated CAN NOT push!", user.canPush(repository));
+
+ assertTrue("authenticated CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("authenticated CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("authenticated CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ user.canFork = false;
+ repository.allowForks = false;
+ assertFalse("authenticated CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("authenticated CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertTrue("authenticated CAN NOT fork!", user.canFork(repository));
+ }
+
+ @Test
+ public void testAuthenticated_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.AUTHENTICATED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+
+ assertTrue("authenticated CAN NOT view!", user.canView(repository));
+ assertTrue("authenticated CAN NOT clone!", user.canClone(repository));
+ assertTrue("authenticated CAN NOT push!", user.canPush(repository));
+
+ assertTrue("authenticated CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("authenticated CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("authenticated CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ user.canFork = false;
+ repository.allowForks = false;
+ assertFalse("authenticated CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("authenticated CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertTrue("authenticated CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * NONE_NONE = NO access restriction, NO access permission
+ */
+ @Test
+ public void testNamed_NONE_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ UserModel user = new UserModel("test");
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("named CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+
+ assertFalse("named CAN delete!", user.canDelete(repository));
+ assertFalse("named CAN edit!", user.canEdit(repository));
+ }
+
+ /**
+ * PUSH_NONE = PUSH access restriction, NO access permission
+ */
+ @Test
+ public void testNamed_PUSH_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ UserModel user = new UserModel("test");
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertFalse("named CAN push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * CLONE_NONE = CLONE access restriction, NO access permission
+ */
+ @Test
+ public void testNamed_CLONE_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ UserModel user = new UserModel("test");
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertFalse("named CAN clone!", user.canClone(repository));
+ assertFalse("named CAN push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * VIEW_NONE = VIEW access restriction, NO access permission
+ */
+ @Test
+ public void testNamed_VIEW_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+
+ assertFalse("named CAN view!", user.canView(repository));
+ assertFalse("named CAN clone!", user.canClone(repository));
+ assertFalse("named CAN push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("named CAN NOT fork!", user.canFork(repository));
+ }
+
+
+ /**
+ * NONE_VIEW = NO access restriction, VIEW access permission.
+ * (not useful scenario)
+ */
+ @Test
+ public void testNamed_NONE_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("named CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * PUSH_VIEW = PUSH access restriction, VIEW access permission
+ */
+ @Test
+ public void testNamed_PUSH_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertFalse("named CAN push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * CLONE_VIEW = CLONE access restriction, VIEW access permission
+ */
+ @Test
+ public void testNamed_CLONE_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertFalse("named CAN clone!", user.canClone(repository));
+ assertFalse("named CAN push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * VIEW_VIEW = VIEW access restriction, VIEW access permission
+ */
+ @Test
+ public void testNamed_VIEW_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertFalse("named CAN clone!", user.canClone(repository));
+ assertFalse("named CAN push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertFalse("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * NONE_CLONE = NO access restriction, CLONE access permission.
+ * (not useful scenario)
+ */
+ @Test
+ public void testNamed_NONE_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("named CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * PUSH_CLONE = PUSH access restriction, CLONE access permission
+ */
+ @Test
+ public void testNamed_PUSH_READ() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertFalse("named CAN push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * CLONE_CLONE = CLONE access restriction, CLONE access permission
+ */
+ @Test
+ public void testNamed_CLONE_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertFalse("named CAN push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * VIEW_CLONE = VIEW access restriction, CLONE access permission
+ */
+ @Test
+ public void testNamed_VIEW_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertFalse("named CAN push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * NONE_PUSH = NO access restriction, PUSH access permission.
+ * (not useful scenario)
+ */
+ @Test
+ public void testNamed_NONE_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("named CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * PUSH_PUSH = PUSH access restriction, PUSH access permission
+ */
+ @Test
+ public void testNamed_PUSH_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * CLONE_PUSH = CLONE access restriction, PUSH access permission
+ */
+ @Test
+ public void testNamed_CLONE_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete red!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * VIEW_PUSH = VIEW access restriction, PUSH access permission
+ */
+ @Test
+ public void testNamed_VIEW_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN not push!", user.canPush(repository));
+
+ assertFalse("named CAN create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * NONE_CREATE = NO access restriction, CREATE access permission.
+ * (not useful scenario)
+ */
+ @Test
+ public void testNamed_NONE_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("named CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * PUSH_CREATE = PUSH access restriction, CREATE access permission
+ */
+ @Test
+ public void testNamed_PUSH_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * CLONE_CREATE = CLONE access restriction, CREATE access permission
+ */
+ @Test
+ public void testNamed_CLONE_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete red!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * VIEW_CREATE = VIEW access restriction, CREATE access permission
+ */
+ @Test
+ public void testNamed_VIEW_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN not push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertFalse("named CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * NONE_DELETE = NO access restriction, DELETE access permission.
+ * (not useful scenario)
+ */
+ @Test
+ public void testNamed_NONE_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("named CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * PUSH_DELETE = PUSH access restriction, DELETE access permission
+ */
+ @Test
+ public void testNamed_PUSH_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * CLONE_DELETE = CLONE access restriction, DELETE access permission
+ */
+ @Test
+ public void testNamed_CLONE_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete red!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * VIEW_DELETE = VIEW access restriction, DELETE access permission
+ */
+ @Test
+ public void testNamed_VIEW_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN not push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertFalse("named CAN rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * NONE_REWIND = NO access restriction, REWIND access permission.
+ * (not useful scenario)
+ */
+ @Test
+ public void testNamed_NONE_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("named CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * PUSH_REWIND = PUSH access restriction, REWIND access permission
+ */
+ @Test
+ public void testNamed_PUSH_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("named CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * CLONE_REWIND = CLONE access restriction, REWIND access permission
+ */
+ @Test
+ public void testNamed_CLONE_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("named CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * VIEW_REWIND = VIEW access restriction, REWIND access permission
+ */
+ @Test
+ public void testNamed_VIEW_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+
+ assertTrue("named CAN NOT view!", user.canView(repository));
+ assertTrue("named CAN NOT clone!", user.canClone(repository));
+ assertTrue("named CAN NOT push!", user.canPush(repository));
+
+ assertTrue("named CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("named CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("named CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ repository.allowForks = false;
+ user.canFork = false;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ user.canFork = true;
+ assertFalse("named CAN fork!", user.canFork(repository));
+ repository.allowForks = true;
+ assertTrue("named CAN NOT fork!", user.canFork(repository));
+ }
+
+ /**
+ * NONE_NONE = NO access restriction, NO access permission
+ */
+ @Test
+ public void testTeam_NONE_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertTrue("team CAN NOT rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_NONE = PUSH access restriction, NO access permission
+ */
+ @Test
+ public void testTeam_PUSH_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertFalse("team CAN push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_NONE = CLONE access restriction, NO access permission
+ */
+ @Test
+ public void testTeam_CLONE_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertFalse("team CAN clone!", team.canClone(repository));
+ assertFalse("team CAN push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_NONE = VIEW access restriction, NO access permission
+ */
+ @Test
+ public void testTeam_VIEW_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+
+ assertFalse("team CAN view!", team.canView(repository));
+ assertFalse("team CAN clone!", team.canClone(repository));
+ assertFalse("team CAN push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_PUSH = NO access restriction, PUSH access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeam_NONE_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertTrue("team CAN NOT rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_PUSH = PUSH access restriction, PUSH access permission
+ */
+ @Test
+ public void testTeam_PUSH_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_PUSH = CLONE access restriction, PUSH access permission
+ */
+ @Test
+ public void testTeam_CLONE_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_PUSH = VIEW access restriction, PUSH access permission
+ */
+ @Test
+ public void testTeam_VIEW_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_CREATE = NO access restriction, CREATE access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeam_NONE_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertTrue("team CAN NOT rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_CREATE = PUSH access restriction, CREATE access permission
+ */
+ @Test
+ public void testTeam_PUSH_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_CREATE = CLONE access restriction, CREATE access permission
+ */
+ @Test
+ public void testTeam_CLONE_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_CREATE = VIEW access restriction, CREATE access permission
+ */
+ @Test
+ public void testTeam_VIEW_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_DELETE = NO access restriction, DELETE access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeam_NONE_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertTrue("team CAN NOT rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_DELETE = PUSH access restriction, DELETE access permission
+ */
+ @Test
+ public void testTeam_PUSH_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_DELETE = CLONE access restriction, DELETE access permission
+ */
+ @Test
+ public void testTeam_CLONE_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_DELETE = VIEW access restriction, DELETE access permission
+ */
+ @Test
+ public void testTeam_VIEW_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_REWIND = NO access restriction, REWIND access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeam_NONE_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertTrue("team CAN NOT rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_REWIND = PUSH access restriction, REWIND access permission
+ */
+ @Test
+ public void testTeam_PUSH_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertTrue("team CAN NOT rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_REWIND = CLONE access restriction, REWIND access permission
+ */
+ @Test
+ public void testTeam_CLONE_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertTrue("team CAN NOT rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_REWIND = VIEW access restriction, REWIND access permission
+ */
+ @Test
+ public void testTeam_VIEW_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertTrue("team CAN NOT rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_CLONE = NO access restriction, CLONE access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeam_NONE_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertTrue("team CAN NOT rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_CLONE = PUSH access restriction, CLONE access permission
+ */
+ @Test
+ public void testTeam_PUSH_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertFalse("team CAN push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_CLONE = CLONE access restriction, CLONE access permission
+ */
+ @Test
+ public void testTeam_CLONE_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertFalse("team CAN push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_CLONE = VIEW access restriction, CLONE access permission
+ */
+ @Test
+ public void testTeam_VIEW_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertFalse("team CAN push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_VIEW = NO access restriction, VIEW access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeam_NONE_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertTrue("team CAN NOT push!", team.canPush(repository));
+
+ assertTrue("team CAN NOT create ref!", team.canCreateRef(repository));
+ assertTrue("team CAN NOT delete ref!", team.canDeleteRef(repository));
+ assertTrue("team CAN NOT rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_VIEW = PUSH access restriction, VIEW access permission
+ */
+ @Test
+ public void testTeam_PUSH_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertTrue("team CAN NOT clone!", team.canClone(repository));
+ assertFalse("team CAN push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_VIEW = CLONE access restriction, VIEW access permission
+ */
+ @Test
+ public void testTeam_CLONE_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertFalse("team CAN clone!", team.canClone(repository));
+ assertFalse("team CAN push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_VIEW = VIEW access restriction, VIEW access permission
+ */
+ @Test
+ public void testTeam_VIEW_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+
+ assertTrue("team CAN NOT view!", team.canView(repository));
+ assertFalse("team CAN clone!", team.canClone(repository));
+ assertFalse("team CAN push!", team.canPush(repository));
+
+ assertFalse("team CAN create ref!", team.canCreateRef(repository));
+ assertFalse("team CAN delete ref!", team.canDeleteRef(repository));
+ assertFalse("team CAN rewind ref!", team.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_NONE = NO access restriction, NO access permission
+ */
+ @Test
+ public void testTeamMember_NONE_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("team member CAN NOT rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_NONE = PUSH access restriction, NO access permission
+ */
+ @Test
+ public void testTeamMember_PUSH_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertFalse("team member CAN push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_NONE = CLONE access restriction, NO access permission
+ */
+ @Test
+ public void testTeamMember_CLONE_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertFalse("team member CAN clone!", user.canClone(repository));
+ assertFalse("team member CAN push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_NONE = VIEW access restriction, NO access permission
+ */
+ @Test
+ public void testTeamMember_VIEW_NONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertFalse("team member CAN view!", user.canView(repository));
+ assertFalse("team member CAN clone!", user.canClone(repository));
+ assertFalse("team member CAN push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_PUSH = NO access restriction, PUSH access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeamMember_NONE_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("team member CAN NOT rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_PUSH = PUSH access restriction, PUSH access permission
+ */
+ @Test
+ public void testTeamMember_PUSH_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_PUSH = CLONE access restriction, PUSH access permission
+ */
+ @Test
+ public void testTeamMember_CLONE_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_PUSH = VIEW access restriction, PUSH access permission
+ */
+ @Test
+ public void testTeamMember_VIEW_PUSH() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.PUSH);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_CREATE = NO access restriction, CREATE access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeamMember_NONE_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("team member CAN NOT rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_CREATE = PUSH access restriction, CREATE access permission
+ */
+ @Test
+ public void testTeamMember_PUSH_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_CREATE = CLONE access restriction, CREATE access permission
+ */
+ @Test
+ public void testTeamMember_CLONE_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_CREATE = VIEW access restriction, CREATE access permission
+ */
+ @Test
+ public void testTeamMember_VIEW_CREATE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CREATE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_DELETE = NO access restriction, DELETE access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeamMember_NONE_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("team member CAN NOT rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_DELETE = PUSH access restriction, DELETE access permission
+ */
+ @Test
+ public void testTeamMember_PUSH_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_DELETE = CLONE access restriction, DELETE access permission
+ */
+ @Test
+ public void testTeamMember_CLONE_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_DELETE = VIEW access restriction, DELETE access permission
+ */
+ @Test
+ public void testTeamMember_VIEW_DELETE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.DELETE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_REWIND = NO access restriction, REWIND access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeamMember_NONE_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("team member CAN NOT rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_REWIND = PUSH access restriction, REWIND access permission
+ */
+ @Test
+ public void testTeamMember_PUSH_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("team member CAN NOT rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_REWIND = CLONE access restriction, REWIND access permission
+ */
+ @Test
+ public void testTeamMember_CLONE_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("team member CAN NOT rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_REWIND = VIEW access restriction, REWIND access permission
+ */
+ @Test
+ public void testTeamMember_VIEW_REWIND() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.REWIND);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("team member CAN NOT rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_CLONE = NO access restriction, CLONE access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeamMember_NONE_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("team member CAN NOT rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_CLONE = PUSH access restriction, CLONE access permission
+ */
+ @Test
+ public void testTeamMember_PUSH_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertFalse("team member CAN push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_CLONE = CLONE access restriction, CLONE access permission
+ */
+ @Test
+ public void testTeamMember_CLONE_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertFalse("team member CAN push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_CLONE = VIEW access restriction, CLONE access permission
+ */
+ @Test
+ public void testTeamMember_VIEW_CLONE() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.CLONE);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertFalse("team member CAN push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * NONE_VIEW = NO access restriction, VIEW access permission
+ * (not useful scenario)
+ */
+ @Test
+ public void testTeamMember_NONE_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.NONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertTrue("team member CAN NOT push!", user.canPush(repository));
+
+ assertTrue("team member CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("team member CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("team member CAN NOT rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * PUSH_VIEW = PUSH access restriction, VIEW access permission
+ */
+ @Test
+ public void testTeamMember_PUSH_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.PUSH;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertTrue("team member CAN NOT clone!", user.canClone(repository));
+ assertFalse("team member CAN push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * CLONE_VIEW = CLONE access restriction, VIEW access permission
+ */
+ @Test
+ public void testTeamMember_CLONE_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.CLONE;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertFalse("team member CAN clone!", user.canClone(repository));
+ assertFalse("team member CAN push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ /**
+ * VIEW_VIEW = VIEW access restriction, VIEW access permission
+ */
+ @Test
+ public void testTeamMember_VIEW_VIEW() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ TeamModel team = new TeamModel("test");
+ team.setRepositoryPermission(repository.name, AccessPermission.VIEW);
+ UserModel user = new UserModel("test");
+ user.teams.add(team);
+
+ assertTrue("team member CAN NOT view!", user.canView(repository));
+ assertFalse("team member CAN clone!", user.canClone(repository));
+ assertFalse("team member CAN push!", user.canPush(repository));
+
+ assertFalse("team member CAN create ref!", user.canCreateRef(repository));
+ assertFalse("team member CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("team member CAN rewind ref!", user.canRewindRef(repository));
+ }
+
+ @Test
+ public void testOwner() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ repository.addOwner(user.username);
+
+ assertFalse("user SHOULD NOT HAVE a repository permission!", user.hasRepositoryPermission(repository.name));
+ assertTrue("owner CAN NOT view!", user.canView(repository));
+ assertTrue("owner CAN NOT clone!", user.canClone(repository));
+ assertTrue("owner CAN NOT push!", user.canPush(repository));
+
+ assertTrue("owner CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("owner CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("owner CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ assertTrue("owner CAN NOT fork!", user.canFork(repository));
+
+ assertFalse("owner CAN NOT delete!", user.canDelete(repository));
+ assertTrue("owner CAN NOT edit!", user.canEdit(repository));
+ }
+
+ @Test
+ public void testMultipleOwners() throws Exception {
+ RepositoryModel repository = new RepositoryModel("myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ repository.addOwner(user.username);
+ UserModel user2 = new UserModel("test2");
+ repository.addOwner(user2.username);
+
+ // first owner
+ assertFalse("user SHOULD NOT HAVE a repository permission!", user.hasRepositoryPermission(repository.name));
+ assertTrue("owner CAN NOT view!", user.canView(repository));
+ assertTrue("owner CAN NOT clone!", user.canClone(repository));
+ assertTrue("owner CAN NOT push!", user.canPush(repository));
+
+ assertTrue("owner CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("owner CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("owner CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ assertTrue("owner CAN NOT fork!", user.canFork(repository));
+
+ assertFalse("owner CAN NOT delete!", user.canDelete(repository));
+ assertTrue("owner CAN NOT edit!", user.canEdit(repository));
+
+ // second owner
+ assertFalse("user SHOULD NOT HAVE a repository permission!", user2.hasRepositoryPermission(repository.name));
+ assertTrue("owner CAN NOT view!", user2.canView(repository));
+ assertTrue("owner CAN NOT clone!", user2.canClone(repository));
+ assertTrue("owner CAN NOT push!", user2.canPush(repository));
+
+ assertTrue("owner CAN NOT create ref!", user2.canCreateRef(repository));
+ assertTrue("owner CAN NOT delete ref!", user2.canDeleteRef(repository));
+ assertTrue("owner CAN NOT rewind ref!", user2.canRewindRef(repository));
+
+ assertTrue("owner CAN NOT fork!", user2.canFork(repository));
+
+ assertFalse("owner CAN NOT delete!", user2.canDelete(repository));
+ assertTrue("owner CAN NOT edit!", user2.canEdit(repository));
+
+ assertTrue(repository.isOwner(user.username));
+ assertTrue(repository.isOwner(user2.username));
+ }
+
+ @Test
+ public void testOwnerPersonalRepository() throws Exception {
+ RepositoryModel repository = new RepositoryModel("~test/myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ repository.addOwner(user.username);
+
+ assertFalse("user SHOULD NOT HAVE a repository permission!", user.hasRepositoryPermission(repository.name));
+ assertTrue("user CAN NOT view!", user.canView(repository));
+ assertTrue("user CAN NOT clone!", user.canClone(repository));
+ assertTrue("user CAN NOT push!", user.canPush(repository));
+
+ assertTrue("user CAN NOT create ref!", user.canCreateRef(repository));
+ assertTrue("user CAN NOT delete ref!", user.canDeleteRef(repository));
+ assertTrue("user CAN NOT rewind ref!", user.canRewindRef(repository));
+
+ assertFalse("user CAN fork!", user.canFork(repository));
+
+ assertTrue("user CAN NOT delete!", user.canDelete(repository));
+ assertTrue("user CAN NOT edit!", user.canEdit(repository));
+ }
+
+ @Test
+ public void testVisitorPersonalRepository() throws Exception {
+ RepositoryModel repository = new RepositoryModel("~test/myrepo.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("visitor");
+ repository.addOwner("test");
+
+ assertFalse("user HAS a repository permission!", user.hasRepositoryPermission(repository.name));
+ assertFalse("user CAN view!", user.canView(repository));
+ assertFalse("user CAN clone!", user.canClone(repository));
+ assertFalse("user CAN push!", user.canPush(repository));
+
+ assertFalse("user CAN create ref!", user.canCreateRef(repository));
+ assertFalse("user CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("user CAN rewind ref!", user.canRewindRef(repository));
+
+ assertFalse("user CAN fork!", user.canFork(repository));
+
+ assertFalse("user CAN delete!", user.canDelete(repository));
+ assertFalse("user CAN edit!", user.canEdit(repository));
+ }
+
+ @Test
+ public void testRegexMatching() throws Exception {
+ RepositoryModel repository = new RepositoryModel("ubercool/_my-r/e~po.git", null, null, new Date());
+ repository.authorizationControl = AuthorizationControl.NAMED;
+ repository.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission("ubercool/[A-Z0-9-~_\\./]+", AccessPermission.CLONE);
+
+ assertTrue("user DOES NOT HAVE a repository permission!", user.hasRepositoryPermission(repository.name));
+ assertTrue("user CAN NOT view!", user.canView(repository));
+ assertTrue("user CAN NOT clone!", user.canClone(repository));
+ assertFalse("user CAN push!", user.canPush(repository));
+
+ assertFalse("user CAN create ref!", user.canCreateRef(repository));
+ assertFalse("user CAN delete ref!", user.canDeleteRef(repository));
+ assertFalse("user CAN rewind ref!", user.canRewindRef(repository));
+
+ assertFalse("user CAN fork!", user.canFork(repository));
+
+ assertFalse("user CAN delete!", user.canDelete(repository));
+ assertFalse("user CAN edit!", user.canEdit(repository));
+ }
+
+ @Test
+ public void testRegexIncludeCommonExcludePersonal() throws Exception {
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission("[^~].*", AccessPermission.CLONE);
+
+ // common
+ RepositoryModel common = new RepositoryModel("ubercool/_my-r/e~po.git", null, null, new Date());
+ common.authorizationControl = AuthorizationControl.NAMED;
+ common.accessRestriction = AccessRestrictionType.VIEW;
+
+ assertTrue("user DOES NOT HAVE a repository permission!", user.hasRepositoryPermission(common.name));
+ assertTrue("user CAN NOT view!", user.canView(common));
+ assertTrue("user CAN NOT clone!", user.canClone(common));
+ assertFalse("user CAN push!", user.canPush(common));
+
+ assertFalse("user CAN create ref!", user.canCreateRef(common));
+ assertFalse("user CAN delete ref!", user.canDeleteRef(common));
+ assertFalse("user CAN rewind ref!", user.canRewindRef(common));
+
+ assertFalse("user CAN fork!", user.canFork(common));
+
+ assertFalse("user CAN delete!", user.canDelete(common));
+ assertFalse("user CAN edit!", user.canEdit(common));
+
+ // personal
+ RepositoryModel personal = new RepositoryModel("~ubercool/_my-r/e~po.git", null, null, new Date());
+ personal.authorizationControl = AuthorizationControl.NAMED;
+ personal.accessRestriction = AccessRestrictionType.VIEW;
+
+ assertFalse("user HAS a repository permission!", user.hasRepositoryPermission(personal.name));
+ assertFalse("user CAN NOT view!", user.canView(personal));
+ assertFalse("user CAN NOT clone!", user.canClone(personal));
+ assertFalse("user CAN push!", user.canPush(personal));
+
+ assertFalse("user CAN create ref!", user.canCreateRef(personal));
+ assertFalse("user CAN delete ref!", user.canDeleteRef(personal));
+ assertFalse("user CAN rewind ref!", user.canRewindRef(personal));
+
+ assertFalse("user CAN fork!", user.canFork(personal));
+
+ assertFalse("user CAN delete!", user.canDelete(personal));
+ assertFalse("user CAN edit!", user.canEdit(personal));
+ }
+
+ @Test
+ public void testRegexMatching2() throws Exception {
+ RepositoryModel personal = new RepositoryModel("~ubercool/_my-r/e~po.git", null, null, new Date());
+ personal.authorizationControl = AuthorizationControl.NAMED;
+ personal.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ // permit all repositories excluding all personal rpeositories
+ user.setRepositoryPermission("[^~].*", AccessPermission.CLONE);
+ // permitall ~ubercool repositories
+ user.setRepositoryPermission("~ubercool/.*", AccessPermission.CLONE);
+
+ // personal
+ assertTrue("user DOES NOT HAVE a repository permission!", user.hasRepositoryPermission(personal.name));
+ assertTrue("user CAN NOT view!", user.canView(personal));
+ assertTrue("user CAN NOT clone!", user.canClone(personal));
+ assertFalse("user CAN push!", user.canPush(personal));
+
+ assertFalse("user CAN create ref!", user.canCreateRef(personal));
+ assertFalse("user CAN delete ref!", user.canDeleteRef(personal));
+ assertFalse("user CAN rewind ref!", user.canRewindRef(personal));
+
+ assertFalse("user CAN fork!", user.canFork(personal));
+
+ assertFalse("user CAN delete!", user.canDelete(personal));
+ assertFalse("user CAN edit!", user.canEdit(personal));
+ }
+
+ @Test
+ public void testRegexOrder() throws Exception {
+ RepositoryModel personal = new RepositoryModel("~ubercool/_my-r/e~po.git", null, null, new Date());
+ personal.authorizationControl = AuthorizationControl.NAMED;
+ personal.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission(".*", AccessPermission.PUSH);
+ user.setRepositoryPermission("~ubercool/.*", AccessPermission.CLONE);
+
+ // has PUSH access because first match is PUSH permission
+ assertTrue("user HAS a repository permission!", user.hasRepositoryPermission(personal.name));
+ assertTrue("user CAN NOT view!", user.canView(personal));
+ assertTrue("user CAN NOT clone!", user.canClone(personal));
+ assertTrue("user CAN NOT push!", user.canPush(personal));
+
+ assertFalse("user CAN create ref!", user.canCreateRef(personal));
+ assertFalse("user CAN delete ref!", user.canDeleteRef(personal));
+ assertFalse("user CAN rewind ref!", user.canRewindRef(personal));
+
+ assertFalse("user CAN fork!", user.canFork(personal));
+
+ assertFalse("user CAN delete!", user.canDelete(personal));
+ assertFalse("user CAN edit!", user.canEdit(personal));
+
+ user.permissions.clear();
+ user.setRepositoryPermission("~ubercool/.*", AccessPermission.CLONE);
+ user.setRepositoryPermission(".*", AccessPermission.PUSH);
+
+ // has CLONE access because first match is CLONE permission
+ assertTrue("user HAS a repository permission!", user.hasRepositoryPermission(personal.name));
+ assertTrue("user CAN NOT view!", user.canView(personal));
+ assertTrue("user CAN NOT clone!", user.canClone(personal));
+ assertFalse("user CAN push!", user.canPush(personal));
+
+ assertFalse("user CAN create ref!", user.canCreateRef(personal));
+ assertFalse("user CAN delete ref!", user.canDeleteRef(personal));
+ assertFalse("user CAN rewind ref!", user.canRewindRef(personal));
+
+ assertFalse("user CAN fork!", user.canFork(personal));
+
+ assertFalse("user CAN delete!", user.canDelete(personal));
+ assertFalse("user CAN edit!", user.canEdit(personal));
+ }
+
+ @Test
+ public void testExclusion() throws Exception {
+ RepositoryModel personal = new RepositoryModel("~ubercool/_my-r/e~po.git", null, null, new Date());
+ personal.authorizationControl = AuthorizationControl.NAMED;
+ personal.accessRestriction = AccessRestrictionType.VIEW;
+
+ UserModel user = new UserModel("test");
+ user.setRepositoryPermission("~ubercool/.*", AccessPermission.EXCLUDE);
+ user.setRepositoryPermission(".*", AccessPermission.PUSH);
+
+ // has EXCLUDE access because first match is EXCLUDE permission
+ assertTrue("user DOES NOT HAVE a repository permission!", user.hasRepositoryPermission(personal.name));
+ assertFalse("user CAN NOT view!", user.canView(personal));
+ assertFalse("user CAN NOT clone!", user.canClone(personal));
+ assertFalse("user CAN push!", user.canPush(personal));
+
+ assertFalse("user CAN create ref!", user.canCreateRef(personal));
+ assertFalse("user CAN delete ref!", user.canDeleteRef(personal));
+ assertFalse("user CAN rewind ref!", user.canRewindRef(personal));
+
+ assertFalse("user CAN fork!", user.canFork(personal));
+
+ assertFalse("user CAN delete!", user.canDelete(personal));
+ assertFalse("user CAN edit!", user.canEdit(personal));
+ }
+
+ @Test
+ public void testAdminTeamInheritance() throws Exception {
+ UserModel user = new UserModel("test");
+ TeamModel team = new TeamModel("team");
+ team.canAdmin = true;
+ user.teams.add(team);
+ assertTrue("User did not inherit admin privileges", user.canAdmin());
+ }
+
+ @Test
+ public void testForkTeamInheritance() throws Exception {
+ UserModel user = new UserModel("test");
+ TeamModel team = new TeamModel("team");
+ team.canFork = true;
+ user.teams.add(team);
+ assertTrue("User did not inherit fork privileges", user.canFork());
+ }
+
+ @Test
+ public void testCreateTeamInheritance() throws Exception {
+ UserModel user = new UserModel("test");
+ TeamModel team = new TeamModel("team");
+ team.canCreate= true;
+ user.teams.add(team);
+ assertTrue("User did not inherit create privileges", user.canCreate());
+ }
+
+}
diff --git a/src/test/java/com/gitblit/tests/PushLogTest.java b/src/test/java/com/gitblit/tests/PushLogTest.java
new file mode 100644
index 00000000..aa4cf418
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/PushLogTest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2013 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+import org.eclipse.jgit.storage.file.FileRepository;
+import org.junit.Test;
+
+import com.gitblit.models.PushLogEntry;
+import com.gitblit.utils.PushLogUtils;
+
+public class PushLogTest {
+
+ @Test
+ public void testPushLog() throws IOException {
+ String name = "~james/helloworld.git";
+ FileRepository repository = new FileRepository(new File(GitBlitSuite.REPOSITORIES, name));
+ List<PushLogEntry> pushes = PushLogUtils.getPushLog(name, repository);
+ GitBlitSuite.close(repository);
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/RedmineUserServiceTest.java b/src/test/java/com/gitblit/tests/RedmineUserServiceTest.java
new file mode 100644
index 00000000..12fa73ff
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/RedmineUserServiceTest.java
@@ -0,0 +1,72 @@
+package com.gitblit.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+
+import org.junit.Test;
+
+import com.gitblit.RedmineUserService;
+import com.gitblit.models.UserModel;
+import com.gitblit.tests.mock.MemorySettings;
+import com.gitblit.utils.StringUtils;
+
+public class RedmineUserServiceTest {
+
+ private static final String JSON = "{\"user\":{\"created_on\":\"2011-03-28T00:41:29Z\",\"lastname\":\"foo\","
+ + "\"last_login_on\":\"2012-09-06T23:59:26Z\",\"firstname\":\"baz\","
+ + "\"id\":4,\"login\":\"RedmineUserId\",\"mail\":\"baz@example.com\"}}";
+
+ private static final String NOT_ADMIN_JSON = "{\"user\":{\"lastname\":\"foo\","
+ + "\"last_login_on\":\"2012-09-08T13:59:01Z\",\"created_on\":\"2009-03-17T14:25:50Z\","
+ + "\"mail\":\"baz@example.com\",\"id\":5,\"firstname\":\"baz\"}}";
+
+ @Test
+ public void testAuthenticate() throws Exception {
+ RedmineUserService redmineUserService = new RedmineUserService();
+ redmineUserService.setup(new MemorySettings(new HashMap<String, Object>()));
+ redmineUserService.setTestingCurrentUserAsJson(JSON);
+ UserModel userModel = redmineUserService.authenticate("RedmineAdminId", "RedmineAPIKey".toCharArray());
+ assertThat(userModel.getName(), is("redmineadminid"));
+ assertThat(userModel.getDisplayName(), is("baz foo"));
+ assertThat(userModel.emailAddress, is("baz@example.com"));
+ assertNotNull(userModel.cookie);
+ assertThat(userModel.canAdmin, is(true));
+ }
+
+ @Test
+ public void testAuthenticateNotAdminUser() throws Exception {
+ RedmineUserService redmineUserService = new RedmineUserService();
+ redmineUserService.setup(new MemorySettings(new HashMap<String, Object>()));
+ redmineUserService.setTestingCurrentUserAsJson(NOT_ADMIN_JSON);
+ UserModel userModel = redmineUserService.authenticate("RedmineUserId", "RedmineAPIKey".toCharArray());
+ assertThat(userModel.getName(), is("redmineuserid"));
+ assertThat(userModel.getDisplayName(), is("baz foo"));
+ assertThat(userModel.emailAddress, is("baz@example.com"));
+ assertNotNull(userModel.cookie);
+ assertThat(userModel.canAdmin, is(false));
+ }
+
+ @Test
+ public void testLocalAccount() {
+ RedmineUserService redmineUserService = new RedmineUserService();
+ redmineUserService.setup(new MemorySettings(new HashMap<String, Object>()));
+
+ UserModel localAccount = new UserModel("bruce");
+ localAccount.displayName = "Bruce Campbell";
+ localAccount.password = StringUtils.MD5_TYPE + StringUtils.getMD5("gimmesomesugar");
+ redmineUserService.deleteUser(localAccount.username);
+ assertTrue("Failed to add local account",
+ redmineUserService.updateUserModel(localAccount));
+ assertEquals("Accounts are not equal!",
+ localAccount,
+ redmineUserService.authenticate(localAccount.username, "gimmesomesugar".toCharArray()));
+ assertTrue("Failed to delete local account!",
+ redmineUserService.deleteUser(localAccount.username));
+ }
+
+}
diff --git a/src/test/java/com/gitblit/tests/RepositoryModelTest.java b/src/test/java/com/gitblit/tests/RepositoryModelTest.java
new file mode 100644
index 00000000..1fe3fbd0
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/RepositoryModelTest.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2012 John Crygier
+ * Copyright 2012 gitblit.com
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.lib.StoredConfig;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.gitblit.Constants;
+import com.gitblit.GitBlit;
+import com.gitblit.models.RepositoryModel;
+
+public class RepositoryModelTest {
+
+ private static boolean wasStarted = false;
+
+ @BeforeClass
+ public static void startGitBlit() throws Exception {
+ wasStarted = GitBlitSuite.startGitblit() == false;
+ }
+
+ @AfterClass
+ public static void stopGitBlit() throws Exception {
+ if (wasStarted == false)
+ GitBlitSuite.stopGitblit();
+ }
+
+ @Before
+ public void initializeConfiguration() throws Exception{
+ Repository r = GitBlitSuite.getHelloworldRepository();
+ StoredConfig config = r.getConfig();
+
+ config.unsetSection(Constants.CONFIG_GITBLIT, Constants.CONFIG_CUSTOM_FIELDS);
+ config.setString(Constants.CONFIG_GITBLIT, Constants.CONFIG_CUSTOM_FIELDS, "commitMessageRegEx", "\\d");
+ config.setString(Constants.CONFIG_GITBLIT, Constants.CONFIG_CUSTOM_FIELDS, "anotherProperty", "Hello");
+
+ config.save();
+ }
+
+ @After
+ public void teardownConfiguration() throws Exception {
+ Repository r = GitBlitSuite.getHelloworldRepository();
+ StoredConfig config = r.getConfig();
+
+ config.unsetSection(Constants.CONFIG_GITBLIT, Constants.CONFIG_CUSTOM_FIELDS);
+ config.save();
+ }
+
+ @Test
+ public void testGetCustomProperty() throws Exception {
+ RepositoryModel model = GitBlit.self().getRepositoryModel(
+ GitBlitSuite.getHelloworldRepository().getDirectory().getName());
+
+ assertEquals("\\d", model.customFields.get("commitMessageRegEx"));
+ assertEquals("Hello", model.customFields.get("anotherProperty"));
+ }
+
+ @Test
+ public void testSetCustomProperty() throws Exception {
+ RepositoryModel model = GitBlit.self().getRepositoryModel(
+ GitBlitSuite.getHelloworldRepository().getDirectory().getName());
+
+ assertEquals("\\d", model.customFields.get("commitMessageRegEx"));
+ assertEquals("Hello", model.customFields.get("anotherProperty"));
+
+ assertEquals("Hello", model.customFields.put("anotherProperty", "GoodBye"));
+ GitBlit.self().updateRepositoryModel(model.name, model, false);
+
+ model = GitBlit.self().getRepositoryModel(
+ GitBlitSuite.getHelloworldRepository().getDirectory().getName());
+
+ assertEquals("\\d", model.customFields.get("commitMessageRegEx"));
+ assertEquals("GoodBye", model.customFields.get("anotherProperty"));
+ }
+
+}
diff --git a/src/test/java/com/gitblit/tests/RpcTests.java b/src/test/java/com/gitblit/tests/RpcTests.java
new file mode 100644
index 00000000..3241a8ab
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/RpcTests.java
@@ -0,0 +1,382 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.gitblit.Constants.AccessPermission;
+import com.gitblit.Constants.AccessRestrictionType;
+import com.gitblit.Constants.AuthorizationControl;
+import com.gitblit.Constants.PermissionType;
+import com.gitblit.Constants.RegistrantType;
+import com.gitblit.GitBlitException.UnauthorizedException;
+import com.gitblit.Keys;
+import com.gitblit.RpcServlet;
+import com.gitblit.models.RegistrantAccessPermission;
+import com.gitblit.models.FederationModel;
+import com.gitblit.models.FederationProposal;
+import com.gitblit.models.FederationSet;
+import com.gitblit.models.RepositoryModel;
+import com.gitblit.models.ServerSettings;
+import com.gitblit.models.ServerStatus;
+import com.gitblit.models.TeamModel;
+import com.gitblit.models.UserModel;
+import com.gitblit.utils.RpcUtils;
+
+/**
+ * Tests all the rpc client utility methods, the rpc filter and rpc servlet.
+ *
+ * @author James Moger
+ *
+ */
+public class RpcTests {
+
+ String url = GitBlitSuite.url;
+ String account = GitBlitSuite.account;
+ String password = GitBlitSuite.password;
+
+ private static final AtomicBoolean started = new AtomicBoolean(false);
+
+ @BeforeClass
+ public static void startGitblit() throws Exception {
+ started.set(GitBlitSuite.startGitblit());
+ }
+
+ @AfterClass
+ public static void stopGitblit() throws Exception {
+ if (started.get()) {
+ GitBlitSuite.stopGitblit();
+ }
+ }
+
+ @Test
+ public void testGetProtocolVersion() throws IOException {
+ int protocol = RpcUtils.getProtocolVersion(url, null, null);
+ assertEquals(RpcServlet.PROTOCOL_VERSION, protocol);
+ }
+
+ @Test
+ public void testListRepositories() throws IOException {
+ Map<String, RepositoryModel> map = RpcUtils.getRepositories(url, null, null);
+ assertNotNull("Repository list is null!", map);
+ assertTrue("Repository list is empty!", map.size() > 0);
+ }
+
+ @Test
+ public void testListUsers() throws IOException {
+ List<UserModel> list = null;
+ try {
+ list = RpcUtils.getUsers(url, null, null);
+ } catch (UnauthorizedException e) {
+ }
+ assertNull("Server allows anyone to admin!", list);
+
+ list = RpcUtils.getUsers(url, "admin", "admin".toCharArray());
+ assertTrue("User list is empty!", list.size() > 0);
+ }
+
+ @Test
+ public void testListTeams() throws IOException {
+ List<TeamModel> list = null;
+ try {
+ list = RpcUtils.getTeams(url, null, null);
+ } catch (UnauthorizedException e) {
+ }
+ assertNull("Server allows anyone to admin!", list);
+
+ list = RpcUtils.getTeams(url, "admin", "admin".toCharArray());
+ assertTrue("Team list is empty!", list.size() > 0);
+ assertEquals("admins", list.get(0).name);
+ }
+
+ @Test
+ public void testUserAdministration() throws IOException {
+ UserModel user = new UserModel("garbage");
+ user.canAdmin = true;
+ user.password = "whocares";
+
+ // create
+ assertTrue("Failed to create user!",
+ RpcUtils.createUser(user, url, account, password.toCharArray()));
+
+ UserModel retrievedUser = findUser(user.username);
+ assertNotNull("Failed to find " + user.username, retrievedUser);
+ assertTrue("Retrieved user can not administer Gitblit", retrievedUser.canAdmin);
+
+ // rename and toggle admin permission
+ String originalName = user.username;
+ user.username = "garbage2";
+ user.canAdmin = false;
+ assertTrue("Failed to update user!",
+ RpcUtils.updateUser(originalName, user, url, account, password.toCharArray()));
+
+ retrievedUser = findUser(user.username);
+ assertNotNull("Failed to find " + user.username, retrievedUser);
+ assertTrue("Retrieved user did not update", !retrievedUser.canAdmin);
+
+ // delete
+ assertTrue("Failed to delete " + user.username,
+ RpcUtils.deleteUser(retrievedUser, url, account, password.toCharArray()));
+
+ retrievedUser = findUser(user.username);
+ assertNull("Failed to delete " + user.username, retrievedUser);
+ }
+
+ private UserModel findUser(String name) throws IOException {
+ List<UserModel> users = RpcUtils.getUsers(url, account, password.toCharArray());
+ UserModel retrievedUser = null;
+ for (UserModel model : users) {
+ if (model.username.equalsIgnoreCase(name)) {
+ retrievedUser = model;
+ break;
+ }
+ }
+ return retrievedUser;
+ }
+
+ @Test
+ public void testRepositoryAdministration() throws IOException {
+ RepositoryModel model = new RepositoryModel();
+ model.name = "garbagerepo.git";
+ model.description = "created by RpcUtils";
+ model.addOwner("garbage");
+ model.accessRestriction = AccessRestrictionType.VIEW;
+ model.authorizationControl = AuthorizationControl.AUTHENTICATED;
+
+ // create
+ assertTrue("Failed to create repository!",
+ RpcUtils.createRepository(model, url, account, password.toCharArray()));
+
+ RepositoryModel retrievedRepository = findRepository(model.name);
+ assertNotNull("Failed to find " + model.name, retrievedRepository);
+ assertEquals(AccessRestrictionType.VIEW, retrievedRepository.accessRestriction);
+ assertEquals(AuthorizationControl.AUTHENTICATED, retrievedRepository.authorizationControl);
+
+ // rename and change access restriciton
+ String originalName = model.name;
+ model.name = "garbagerepo2.git";
+ model.accessRestriction = AccessRestrictionType.PUSH;
+ model.authorizationControl = AuthorizationControl.NAMED;
+ assertTrue("Failed to update repository!", RpcUtils.updateRepository(originalName, model,
+ url, account, password.toCharArray()));
+
+ retrievedRepository = findRepository(model.name);
+ assertNotNull("Failed to find " + model.name, retrievedRepository);
+ assertTrue("Access retriction type is wrong",
+ AccessRestrictionType.PUSH.equals(retrievedRepository.accessRestriction));
+
+ // memberships
+ UserModel testMember = new UserModel("justadded");
+ assertTrue(RpcUtils.createUser(testMember, url, account, password.toCharArray()));
+
+ List<RegistrantAccessPermission> permissions = RpcUtils.getRepositoryMemberPermissions(retrievedRepository, url, account,
+ password.toCharArray());
+ assertEquals("Membership permissions is not empty!", 0, permissions.size());
+ permissions.add(new RegistrantAccessPermission(testMember.username, AccessPermission.PUSH, PermissionType.EXPLICIT, RegistrantType.USER, null, true));
+ assertTrue(
+ "Failed to set member permissions!",
+ RpcUtils.setRepositoryMemberPermissions(retrievedRepository, permissions, url, account,
+ password.toCharArray()));
+ permissions = RpcUtils.getRepositoryMemberPermissions(retrievedRepository, url, account,
+ password.toCharArray());
+ boolean foundMember = false;
+ for (RegistrantAccessPermission permission : permissions) {
+ if (permission.registrant.equalsIgnoreCase(testMember.username)) {
+ foundMember = true;
+ assertEquals(AccessPermission.PUSH, permission.permission);
+ break;
+ }
+ }
+ assertTrue("Failed to find member!", foundMember);
+
+ // delete
+ assertTrue("Failed to delete " + model.name, RpcUtils.deleteRepository(retrievedRepository,
+ url, account, password.toCharArray()));
+
+ retrievedRepository = findRepository(model.name);
+ assertNull("Failed to delete " + model.name, retrievedRepository);
+
+ for (UserModel u : RpcUtils.getUsers(url, account, password.toCharArray())) {
+ if (u.username.equals(testMember.username)) {
+ assertTrue(RpcUtils.deleteUser(u, url, account, password.toCharArray()));
+ break;
+ }
+ }
+ }
+
+ private RepositoryModel findRepository(String name) throws IOException {
+ Map<String, RepositoryModel> repositories = RpcUtils.getRepositories(url, account,
+ password.toCharArray());
+ RepositoryModel retrievedRepository = null;
+ for (RepositoryModel model : repositories.values()) {
+ if (model.name.equalsIgnoreCase(name)) {
+ retrievedRepository = model;
+ break;
+ }
+ }
+ return retrievedRepository;
+ }
+
+ @Test
+ public void testTeamAdministration() throws IOException {
+ List<TeamModel> teams = RpcUtils.getTeams(url, account, password.toCharArray());
+ assertEquals(1, teams.size());
+
+ // Create the A-Team
+ TeamModel aTeam = new TeamModel("A-Team");
+ aTeam.users.add("admin");
+ aTeam.addRepositoryPermission("helloworld.git");
+ assertTrue(RpcUtils.createTeam(aTeam, url, account, password.toCharArray()));
+
+ aTeam = null;
+ teams = RpcUtils.getTeams(url, account, password.toCharArray());
+ assertEquals(2, teams.size());
+ for (TeamModel team : teams) {
+ if (team.name.equals("A-Team")) {
+ aTeam = team;
+ break;
+ }
+ }
+ assertNotNull(aTeam);
+ assertTrue(aTeam.hasUser("admin"));
+ assertTrue(aTeam.hasRepositoryPermission("helloworld.git"));
+
+ RepositoryModel helloworld = null;
+ Map<String, RepositoryModel> repositories = RpcUtils.getRepositories(url, account,
+ password.toCharArray());
+ for (RepositoryModel repository : repositories.values()) {
+ if (repository.name.equals("helloworld.git")) {
+ helloworld = repository;
+ break;
+ }
+ }
+ assertNotNull(helloworld);
+
+ // Confirm that we have added the team
+ List<String> helloworldTeams = RpcUtils.getRepositoryTeams(helloworld, url, account,
+ password.toCharArray());
+ assertEquals(1, helloworldTeams.size());
+ assertTrue(helloworldTeams.contains(aTeam.name));
+
+ // set no teams
+ List<RegistrantAccessPermission> permissions = new ArrayList<RegistrantAccessPermission>();
+ for (String team : helloworldTeams) {
+ permissions.add(new RegistrantAccessPermission(team, AccessPermission.NONE, PermissionType.EXPLICIT, RegistrantType.TEAM, null, true));
+ }
+ assertTrue(RpcUtils.setRepositoryTeamPermissions(helloworld, permissions, url, account,
+ password.toCharArray()));
+ helloworldTeams = RpcUtils.getRepositoryTeams(helloworld, url, account,
+ password.toCharArray());
+ assertEquals(0, helloworldTeams.size());
+
+ // delete the A-Team
+ assertTrue(RpcUtils.deleteTeam(aTeam, url, account, password.toCharArray()));
+
+ teams = RpcUtils.getTeams(url, account, password.toCharArray());
+ assertEquals(1, teams.size());
+ }
+
+ @Test
+ public void testFederationRegistrations() throws Exception {
+ List<FederationModel> registrations = RpcUtils.getFederationRegistrations(url, account,
+ password.toCharArray());
+ assertTrue("No federation registrations were retrieved!", registrations.size() >= 0);
+ }
+
+ @Test
+ public void testFederationResultRegistrations() throws Exception {
+ List<FederationModel> registrations = RpcUtils.getFederationResultRegistrations(url,
+ account, password.toCharArray());
+ assertTrue("No federation result registrations were retrieved!", registrations.size() >= 0);
+ }
+
+ @Test
+ public void testFederationProposals() throws Exception {
+ List<FederationProposal> proposals = RpcUtils.getFederationProposals(url, account,
+ password.toCharArray());
+ assertTrue("No federation proposals were retrieved!", proposals.size() >= 0);
+ }
+
+ @Test
+ public void testFederationSets() throws Exception {
+ List<FederationSet> sets = RpcUtils.getFederationSets(url, account, password.toCharArray());
+ assertTrue("No federation sets were retrieved!", sets.size() >= 0);
+ }
+
+ @Test
+ public void testSettings() throws Exception {
+ ServerSettings settings = RpcUtils.getSettings(url, account, password.toCharArray());
+ assertNotNull("No settings were retrieved!", settings);
+ }
+
+ @Test
+ public void testServerStatus() throws Exception {
+ ServerStatus status = RpcUtils.getStatus(url, account, password.toCharArray());
+ assertNotNull("No status was retrieved!", status);
+ }
+
+ @Test
+ public void testUpdateSettings() throws Exception {
+ Map<String, String> updated = new HashMap<String, String>();
+
+ // grab current setting
+ ServerSettings settings = RpcUtils.getSettings(url, account, password.toCharArray());
+ boolean showSizes = settings.get(Keys.web.showRepositorySizes).getBoolean(true);
+ showSizes = !showSizes;
+
+ // update setting
+ updated.put(Keys.web.showRepositorySizes, String.valueOf(showSizes));
+ boolean success = RpcUtils.updateSettings(updated, url, account, password.toCharArray());
+ assertTrue("Failed to update server settings", success);
+
+ // confirm setting change
+ settings = RpcUtils.getSettings(url, account, password.toCharArray());
+ boolean newValue = settings.get(Keys.web.showRepositorySizes).getBoolean(false);
+ assertEquals(newValue, showSizes);
+
+ // restore setting
+ newValue = !newValue;
+ updated.put(Keys.web.showRepositorySizes, String.valueOf(newValue));
+ success = RpcUtils.updateSettings(updated, url, account, password.toCharArray());
+ assertTrue("Failed to update server settings", success);
+ settings = RpcUtils.getSettings(url, account, password.toCharArray());
+ showSizes = settings.get(Keys.web.showRepositorySizes).getBoolean(true);
+ assertEquals(newValue, showSizes);
+ }
+
+ @Test
+ public void testBranches() throws Exception {
+ Map<String, Collection<String>> branches = RpcUtils.getBranches(url, account,
+ password.toCharArray());
+ assertNotNull(branches);
+ assertTrue(branches.size() > 0);
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/StringUtilsTest.java b/src/test/java/com/gitblit/tests/StringUtilsTest.java
new file mode 100644
index 00000000..bcf3a99c
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/StringUtilsTest.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.Test;
+
+import com.gitblit.utils.StringUtils;
+
+public class StringUtilsTest {
+
+ @Test
+ public void testIsEmpty() throws Exception {
+ assertTrue(StringUtils.isEmpty(null));
+ assertTrue(StringUtils.isEmpty(""));
+ assertTrue(StringUtils.isEmpty(" "));
+ assertFalse(StringUtils.isEmpty("A"));
+ }
+
+ @Test
+ public void testBreakLinesForHtml() throws Exception {
+ String input = "this\nis\r\na\rtest\r\n\r\nof\n\nline\r\rbreaking";
+ String output = "this<br/>is<br/>a<br/>test<br/><br/>of<br/><br/>line<br/><br/>breaking";
+ assertEquals(output, StringUtils.breakLinesForHtml(input));
+ }
+
+ @Test
+ public void testEncodeUrl() throws Exception {
+ String input = "test /";
+ String output = "test%20%2F";
+ assertEquals(output, StringUtils.encodeURL(input));
+ }
+
+ @Test
+ public void testEscapeForHtml() throws Exception {
+ String input = "& < > \" \t";
+ String outputNoChange = "&amp; &lt; &gt; &quot; \t";
+ String outputChange = "&amp;&nbsp;&lt;&nbsp;&gt;&nbsp;&quot;&nbsp; &nbsp; &nbsp;";
+ assertEquals(outputNoChange, StringUtils.escapeForHtml(input, false));
+ assertEquals(outputChange, StringUtils.escapeForHtml(input, true));
+ }
+
+ @Test
+ public void testDecodeForHtml() throws Exception {
+ String input = "&amp; &lt; &gt; &quot;";
+ String output = "& < > \"";
+ assertEquals(output, StringUtils.decodeFromHtml(input));
+ }
+
+ @Test
+ public void testFlattenStrings() throws Exception {
+ String[] strings = { "A", "B", "C", "D" };
+ assertEquals("A B C D", StringUtils.flattenStrings(Arrays.asList(strings)));
+ }
+
+ @Test
+ public void testTrim() throws Exception {
+ String input = "123456789 123456789 123456789 123456789 123456789 123456789 123456789 ";
+ String output = "123456789 123456789 123456789 123456789 123456789 1234567...";
+ assertEquals(output, StringUtils.trimString(input, 60));
+ assertEquals(input, StringUtils.trimString(input, input.length()));
+ }
+
+ @Test
+ public void testPadding() throws Exception {
+ String input = "test";
+ assertEquals(" test", StringUtils.leftPad(input, 6 + input.length(), ' '));
+ assertEquals("test ", StringUtils.rightPad(input, 6 + input.length(), ' '));
+
+ assertEquals(input, StringUtils.leftPad(input, input.length(), ' '));
+ assertEquals(input, StringUtils.rightPad(input, input.length(), ' '));
+ }
+
+ @Test
+ public void testSHA1() throws Exception {
+ assertEquals("bd9dbf5aae1a3862dd1526723246b20206e5fc37",
+ StringUtils.getSHA1("blob 16\000what is up, doc?"));
+ }
+
+ @Test
+ public void testMD5() throws Exception {
+ assertEquals("77fb8d95331f0d557472f6776d3aedf6",
+ StringUtils.getMD5("blob 16\000what is up, doc?"));
+ }
+
+ @Test
+ public void testRootPath() throws Exception {
+ String input = "/nested/path/to/repository";
+ String output = "/nested/path/to";
+ assertEquals(output, StringUtils.getRootPath(input));
+ assertEquals("", StringUtils.getRootPath("repository"));
+ }
+
+ @Test
+ public void testStringsFromValue() throws Exception {
+ List<String> strings = StringUtils.getStringsFromValue("\"A A \" B \"C C\" D \"\" \"E\"");
+ assertEquals(6, strings.size());
+ assertEquals("A A", strings.get(0));
+ assertEquals("B", strings.get(1));
+ assertEquals("C C", strings.get(2));
+ assertEquals("D", strings.get(3));
+ assertEquals("", strings.get(4));
+ assertEquals("E", strings.get(5));
+
+ strings = StringUtils.getStringsFromValue("\"A A \", B, \"C C\", D, \"\", \"E\"", ",");
+ assertEquals(6, strings.size());
+ assertEquals("A A", strings.get(0));
+ assertEquals("B", strings.get(1));
+ assertEquals("C C", strings.get(2));
+ assertEquals("D", strings.get(3));
+ assertEquals("", strings.get(4));
+ assertEquals("E", strings.get(5));
+ }
+
+ @Test
+ public void testStringsFromValue2() throws Exception {
+ List<String> strings = StringUtils.getStringsFromValue("common/* libraries/*");
+ assertEquals(2, strings.size());
+ assertEquals("common/*", strings.get(0));
+ assertEquals("libraries/*", strings.get(1));
+ }
+
+ @Test
+ public void testFuzzyMatching() throws Exception {
+ assertTrue(StringUtils.fuzzyMatch("12345", "12345"));
+ assertTrue(StringUtils.fuzzyMatch("AbCdEf", "abcdef"));
+ assertTrue(StringUtils.fuzzyMatch("AbCdEf", "abc*"));
+ assertTrue(StringUtils.fuzzyMatch("AbCdEf", "*def"));
+ assertTrue(StringUtils.fuzzyMatch("AbCdEfHIJ", "abc*hij"));
+
+ assertFalse(StringUtils.fuzzyMatch("123", "12345"));
+ assertFalse(StringUtils.fuzzyMatch("AbCdEfHIJ", "abc*hhh"));
+ }
+
+ @Test
+ public void testGetRepositoryPath() throws Exception {
+ assertEquals("gitblit/gitblit.git", StringUtils.extractRepositoryPath("git://github.com/gitblit/gitblit.git", new String [] { ".*?://github.com/(.*)" }));
+ assertEquals("gitblit.git", StringUtils.extractRepositoryPath("git://github.com/gitblit/gitblit.git", new String [] { ".*?://github.com/[^/].*?/(.*)" }));
+ assertEquals("gitblit.git", StringUtils.extractRepositoryPath("git://github.com/gitblit/gitblit.git"));
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/SyndicationUtilsTest.java b/src/test/java/com/gitblit/tests/SyndicationUtilsTest.java
new file mode 100644
index 00000000..75fbd7ca
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/SyndicationUtilsTest.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.junit.Test;
+
+import com.gitblit.Constants.SearchType;
+import com.gitblit.models.FeedEntryModel;
+import com.gitblit.utils.SyndicationUtils;
+
+public class SyndicationUtilsTest {
+
+ @Test
+ public void testSyndication() throws Exception {
+ List<FeedEntryModel> entries = new ArrayList<FeedEntryModel>();
+ for (int i = 0; i < 10; i++) {
+ FeedEntryModel entry = new FeedEntryModel();
+ entry.title = "Title " + i;
+ entry.author = "Author " + i;
+ entry.link = "Link " + i;
+ entry.published = new Date();
+ entry.contentType = "text/plain";
+ entry.content = "Content " + i;
+ entry.repository = "Repository " + i;
+ entry.branch = "Branch " + i;
+ List<String> tags = new ArrayList<String>();
+ for (int j = 0; j < 5; j++) {
+ tags.add("Tag " + j);
+ }
+ entry.tags = tags;
+ entries.add(entry);
+ }
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+ SyndicationUtils.toRSS("http://localhost", "", "Title", "Description",
+ entries, os);
+ String feed = os.toString();
+ os.close();
+ assertTrue(feed.indexOf("<title>Title</title>") > -1);
+ assertTrue(feed.indexOf("<description>Description</description>") > -1);
+ }
+
+ @Test
+ public void testFeedRead() throws Exception {
+ Set<String> links = new HashSet<String>();
+ for (int i = 0; i < 2; i++) {
+ List<FeedEntryModel> feed = SyndicationUtils.readFeed(GitBlitSuite.url, "ticgit.git",
+ "master", 5, i, GitBlitSuite.account, GitBlitSuite.password.toCharArray());
+ assertTrue(feed != null);
+ assertTrue(feed.size() > 0);
+ assertEquals(5, feed.size());
+ for (FeedEntryModel entry : feed) {
+ links.add(entry.link);
+ }
+ }
+ // confirm we have 10 unique commits
+ assertEquals("Feed pagination failed", 10, links.size());
+ }
+
+ @Test
+ public void testSearchFeedRead() throws Exception {
+ List<FeedEntryModel> feed = SyndicationUtils
+ .readSearchFeed(GitBlitSuite.url, "ticgit.git", null, "test", null, 5, 0,
+ GitBlitSuite.account, GitBlitSuite.password.toCharArray());
+ assertTrue(feed != null);
+ assertTrue(feed.size() > 0);
+ assertEquals(5, feed.size());
+ feed = SyndicationUtils.readSearchFeed(GitBlitSuite.url, "ticgit.git", "master", "test",
+ SearchType.COMMIT, 5, 1, GitBlitSuite.account, GitBlitSuite.password.toCharArray());
+ assertTrue(feed != null);
+ assertTrue(feed.size() > 0);
+ assertEquals(5, feed.size());
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/TicgitUtilsTest.java b/src/test/java/com/gitblit/tests/TicgitUtilsTest.java
new file mode 100644
index 00000000..74f9e44e
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/TicgitUtilsTest.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.List;
+
+import org.eclipse.jgit.lib.Repository;
+import org.junit.Test;
+
+import com.gitblit.models.RefModel;
+import com.gitblit.models.TicketModel;
+import com.gitblit.models.TicketModel.Comment;
+import com.gitblit.utils.TicgitUtils;
+
+public class TicgitUtilsTest {
+
+ @Test
+ public void testTicgitBranch() throws Exception {
+ Repository repository = GitBlitSuite.getTicgitRepository();
+ RefModel branch = TicgitUtils.getTicketsBranch(repository);
+ repository.close();
+ assertNotNull("Ticgit branch does not exist!", branch);
+
+ repository = GitBlitSuite.getHelloworldRepository();
+ branch = TicgitUtils.getTicketsBranch(repository);
+ repository.close();
+ assertNull("Ticgit branch exists!", branch);
+ }
+
+ @Test
+ public void testRetrieveTickets() throws Exception {
+ Repository repository = GitBlitSuite.getTicgitRepository();
+ List<TicketModel> ticketsA = TicgitUtils.getTickets(repository);
+ List<TicketModel> ticketsB = TicgitUtils.getTickets(repository);
+ repository.close();
+ assertTrue("No tickets found!", ticketsA.size() > 0);
+ for (int i = 0; i < ticketsA.size(); i++) {
+ TicketModel ticketA = ticketsA.get(i);
+ TicketModel ticketB = ticketsB.get(i);
+ assertTrue("Tickets are not equal!", ticketA.equals(ticketB));
+ assertFalse(ticketA.equals(""));
+ assertTrue(ticketA.hashCode() == ticketA.id.hashCode());
+ for (int j = 0; j < ticketA.comments.size(); j++) {
+ Comment commentA = ticketA.comments.get(j);
+ Comment commentB = ticketB.comments.get(j);
+ assertTrue("Comments are not equal!", commentA.equals(commentB));
+ assertFalse(commentA.equals(""));
+ assertEquals(commentA.hashCode(), commentA.text.hashCode());
+ }
+ }
+
+ repository = GitBlitSuite.getHelloworldRepository();
+ List<TicketModel> ticketsC = TicgitUtils.getTickets(repository);
+ repository.close();
+ assertNull(ticketsC);
+ }
+
+ @Test
+ public void testReadTicket() throws Exception {
+ Repository repository = GitBlitSuite.getTicgitRepository();
+ List<TicketModel> tickets = TicgitUtils.getTickets(repository);
+ TicketModel ticket = TicgitUtils
+ .getTicket(repository, tickets.get(tickets.size() - 1).name);
+ repository.close();
+ assertNotNull(ticket);
+ assertEquals("1206206148_add-attachment-to-ticket_138", ticket.name);
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/TimeUtilsTest.java b/src/test/java/com/gitblit/tests/TimeUtilsTest.java
new file mode 100644
index 00000000..f9d5d834
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/TimeUtilsTest.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Date;
+
+import org.junit.Test;
+
+import com.gitblit.utils.TimeUtils;
+
+public class TimeUtilsTest {
+
+ private Date offset(long subtract) {
+ return new Date(System.currentTimeMillis() - subtract);
+ }
+
+ @Test
+ public void testBasicTimeFunctions() throws Exception {
+ assertEquals(2, TimeUtils.minutesAgo(offset(2 * TimeUtils.MIN), false));
+ assertEquals(3, TimeUtils.minutesAgo(offset((2 * TimeUtils.MIN) + (35 * 1000L)), true));
+
+ assertEquals(2, TimeUtils.hoursAgo(offset(2 * TimeUtils.ONEHOUR), false));
+ assertEquals(3, TimeUtils.hoursAgo(offset(5 * TimeUtils.HALFHOUR), true));
+
+ assertEquals(4, TimeUtils.daysAgo(offset(4 * TimeUtils.ONEDAY)));
+ }
+
+ @Test
+ public void testToday() throws Exception {
+ assertTrue(TimeUtils.isToday(new Date()));
+ }
+
+ @Test
+ public void testYesterday() throws Exception {
+ assertTrue(TimeUtils.isYesterday(offset(TimeUtils.ONEDAY)));
+ }
+
+ @Test
+ public void testDurations() throws Exception {
+ TimeUtils timeUtils = new TimeUtils();
+ assertEquals("1 day", timeUtils.duration(1));
+ assertEquals("5 days", timeUtils.duration(5));
+ assertEquals("3 months", timeUtils.duration(75));
+ assertEquals("12 months", timeUtils.duration(364));
+ assertEquals("1 year", timeUtils.duration(365 + 0));
+ assertEquals("1 year", timeUtils.duration(365 + 10));
+ assertEquals("1 year, 1 month", timeUtils.duration(365 + 15));
+ assertEquals("1 year, 1 month", timeUtils.duration(365 + 30));
+ assertEquals("1 year, 1 month", timeUtils.duration(365 + 44));
+ assertEquals("1 year, 2 months", timeUtils.duration(365 + 45));
+ assertEquals("1 year, 2 months", timeUtils.duration(365 + 60));
+
+ assertEquals("2 years", timeUtils.duration(2 * 365 + 0));
+ assertEquals("2 years", timeUtils.duration(2 * 365 + 10));
+ assertEquals("2 years, 1 month", timeUtils.duration(2 * 365 + 15));
+ assertEquals("2 years, 1 month", timeUtils.duration(2 * 365 + 30));
+ assertEquals("2 years, 1 month", timeUtils.duration(2 * 365 + 44));
+ assertEquals("2 years, 2 months", timeUtils.duration(2 * 365 + 45));
+ assertEquals("2 years, 2 months", timeUtils.duration(2 * 365 + 60));
+ }
+
+ @Test
+ public void testTimeAgo() throws Exception {
+ // standard time ago tests
+ TimeUtils timeUtils = new TimeUtils();
+ assertEquals("just now", timeUtils.timeAgo(offset(1 * TimeUtils.MIN)));
+ assertEquals("60 mins ago", timeUtils.timeAgo(offset(60 * TimeUtils.MIN)));
+ assertEquals("2 hours ago", timeUtils.timeAgo(offset(120 * TimeUtils.MIN)));
+ assertEquals("15 hours ago", timeUtils.timeAgo(offset(15 * TimeUtils.ONEHOUR)));
+ assertEquals("yesterday", timeUtils.timeAgo(offset(24 * TimeUtils.ONEHOUR)));
+ assertEquals("2 days ago", timeUtils.timeAgo(offset(2 * TimeUtils.ONEDAY)));
+ assertEquals("5 weeks ago", timeUtils.timeAgo(offset(35 * TimeUtils.ONEDAY)));
+ assertEquals("3 months ago", timeUtils.timeAgo(offset(84 * TimeUtils.ONEDAY)));
+ assertEquals("3 months ago", timeUtils.timeAgo(offset(95 * TimeUtils.ONEDAY)));
+ assertEquals("4 months ago", timeUtils.timeAgo(offset(104 * TimeUtils.ONEDAY)));
+ assertEquals("1 year ago", timeUtils.timeAgo(offset(365 * TimeUtils.ONEDAY)));
+ assertEquals("13 months ago", timeUtils.timeAgo(offset(395 * TimeUtils.ONEDAY)));
+ assertEquals("2 years ago", timeUtils.timeAgo(offset((2 * 365 + 30) * TimeUtils.ONEDAY)));
+
+ // css class tests
+ assertEquals("age0", timeUtils.timeAgoCss(offset(1 * TimeUtils.MIN)));
+ assertEquals("age0", timeUtils.timeAgoCss(offset(60 * TimeUtils.MIN)));
+ assertEquals("age1", timeUtils.timeAgoCss(offset(120 * TimeUtils.MIN)));
+ assertEquals("age1", timeUtils.timeAgoCss(offset(24 * TimeUtils.ONEHOUR)));
+ assertEquals("age2", timeUtils.timeAgoCss(offset(2 * TimeUtils.ONEDAY)));
+ }
+
+ @Test
+ public void testFrequency() {
+ assertEquals(5, TimeUtils.convertFrequencyToMinutes("2 mins"));
+ assertEquals(10, TimeUtils.convertFrequencyToMinutes("10 mins"));
+ assertEquals(600, TimeUtils.convertFrequencyToMinutes("10 hours"));
+ assertEquals(14400, TimeUtils.convertFrequencyToMinutes(" 10 days "));
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/UserServiceTest.java b/src/test/java/com/gitblit/tests/UserServiceTest.java
new file mode 100644
index 00000000..710d1f35
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/UserServiceTest.java
@@ -0,0 +1,245 @@
+/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+import com.gitblit.ConfigUserService;
+import com.gitblit.Constants.AccessRestrictionType;
+import com.gitblit.FileUserService;
+import com.gitblit.IUserService;
+import com.gitblit.models.RepositoryModel;
+import com.gitblit.models.TeamModel;
+import com.gitblit.models.UserModel;
+
+public class UserServiceTest {
+
+ @Test
+ public void testFileUserService() throws IOException {
+ File file = new File("us-test.properties");
+ file.delete();
+ IUserService service = new FileUserService(file);
+ testUsers(service);
+ testTeams(service);
+ file.delete();
+ }
+
+ @Test
+ public void testConfigUserService() throws IOException {
+ File file = new File("us-test.conf");
+ file.delete();
+ IUserService service = new ConfigUserService(file);
+ testUsers(service);
+ testTeams(service);
+ file.delete();
+ }
+
+ protected void testUsers(IUserService service) {
+
+ UserModel admin = service.getUserModel("admin");
+ assertTrue(admin == null);
+
+ // add admin and admins team
+ TeamModel admins = new TeamModel("admins");
+ admins.mailingLists.add("admins@localhost.com");
+
+ admin = new UserModel("admin");
+ admin.password = "password";
+ admin.canAdmin = true;
+ admin.excludeFromFederation = true;
+ admin.teams.add(admins);
+
+ service.updateUserModel(admin);
+ admin = null;
+ admins = null;
+
+ // add new user
+ UserModel newUser = new UserModel("test");
+ newUser.password = "testPassword";
+ newUser.addRepositoryPermission("repo1");
+ newUser.addRepositoryPermission("repo2");
+ newUser.addRepositoryPermission("sub/repo3");
+ service.updateUserModel(newUser);
+
+ // add one more new user and then test reload of first new user
+ newUser = new UserModel("GARBAGE");
+ newUser.password = "garbage";
+ service.updateUserModel(newUser);
+
+ // confirm all added users
+ assertEquals(3, service.getAllUsernames().size());
+ assertTrue(service.getUserModel("garbage") != null);
+ assertTrue(service.getUserModel("GaRbAgE") != null);
+ assertTrue(service.getUserModel("GARBAGE") != null);
+
+ // confirm reloaded test user
+ newUser = service.getUserModel("test");
+ assertEquals("testPassword", newUser.password);
+ assertEquals(3, newUser.permissions.size());
+ assertTrue(newUser.hasRepositoryPermission("repo1"));
+ assertTrue(newUser.hasRepositoryPermission("repo2"));
+ assertTrue(newUser.hasRepositoryPermission("sub/repo3"));
+
+ // confirm authentication of test user
+ UserModel testUser = service.authenticate("test", "testPassword".toCharArray());
+ assertEquals("test", testUser.username);
+ assertEquals("testPassword", testUser.password);
+
+ // delete a repository role and confirm role removal from test user
+ service.deleteRepositoryRole("repo2");
+ testUser = service.getUserModel("test");
+ assertEquals(2, testUser.permissions.size());
+
+ // delete garbage user and confirm user count
+ service.deleteUser("garbage");
+ assertEquals(2, service.getAllUsernames().size());
+
+ // rename repository and confirm role change for test user
+ service.renameRepositoryRole("repo1", "newrepo1");
+ testUser = service.getUserModel("test");
+ assertTrue(testUser.hasRepositoryPermission("newrepo1"));
+ }
+
+ protected void testTeams(IUserService service) {
+
+ // confirm we have 1 team (admins)
+ assertEquals(1, service.getAllTeamNames().size());
+ assertEquals("admins", service.getAllTeamNames().get(0));
+
+ RepositoryModel newrepo1 = new RepositoryModel("newrepo1", null, null, null);
+ newrepo1.accessRestriction = AccessRestrictionType.VIEW;
+ RepositoryModel NEWREPO1 = new RepositoryModel("NEWREPO1", null, null, null);
+ NEWREPO1.accessRestriction = AccessRestrictionType.VIEW;
+
+ // remove newrepo1 from test user
+ // now test user has no repositories
+ UserModel user = service.getUserModel("test");
+ user.permissions.clear();
+ service.updateUserModel(user);
+ user = service.getUserModel("test");
+ assertEquals(0, user.permissions.size());
+ assertFalse(user.canView(newrepo1));
+ assertFalse(user.canView(NEWREPO1));
+
+ // create test team and add test user and newrepo1
+ TeamModel team = new TeamModel("testteam");
+ team.addUser("test");
+ team.addRepositoryPermission(newrepo1.name);
+ service.updateTeamModel(team);
+
+ // confirm 1 user and 1 repo
+ team = service.getTeamModel("testteam");
+ assertEquals(1, team.permissions.size());
+ assertEquals(1, team.users.size());
+
+ // confirm team membership
+ user = service.getUserModel("test");
+ assertEquals(0, user.permissions.size());
+ assertEquals(1, user.teams.size());
+
+ // confirm team access
+ assertTrue(team.hasRepositoryPermission(newrepo1.name));
+ assertTrue(user.canView(newrepo1));
+ assertTrue(team.hasRepositoryPermission(NEWREPO1.name));
+ assertTrue(user.canView(NEWREPO1));
+
+ // rename the team and add new repository
+ RepositoryModel newrepo2 = new RepositoryModel("newrepo2", null, null, null);
+ newrepo2.accessRestriction = AccessRestrictionType.VIEW;
+ RepositoryModel NEWREPO2 = new RepositoryModel("NEWREPO2", null, null, null);
+ NEWREPO2.accessRestriction = AccessRestrictionType.VIEW;
+
+ team.addRepositoryPermission(newrepo2.name);
+ team.name = "testteam2";
+ service.updateTeamModel("testteam", team);
+
+ team = service.getTeamModel("testteam2");
+ user = service.getUserModel("test");
+
+ // confirm user and team can access newrepo2
+ assertEquals(2, team.permissions.size());
+ assertTrue(team.hasRepositoryPermission(newrepo2.name));
+ assertTrue(user.canView(newrepo2));
+ assertTrue(team.hasRepositoryPermission(NEWREPO2.name));
+ assertTrue(user.canView(NEWREPO2));
+
+ // delete testteam2
+ service.deleteTeam("testteam2");
+ team = service.getTeamModel("testteam2");
+ user = service.getUserModel("test");
+
+ // confirm team does not exist and user can not access newrepo1 and 2
+ assertEquals(null, team);
+ assertFalse(user.canView(newrepo1));
+ assertFalse(user.canView(newrepo2));
+
+ // create new team and add it to user
+ // this tests the inverse team creation/team addition
+ team = new TeamModel("testteam");
+ team.addRepositoryPermission(NEWREPO1.name);
+ team.addRepositoryPermission(NEWREPO2.name);
+ user.teams.add(team);
+ service.updateUserModel(user);
+
+ // confirm the inverted team addition
+ user = service.getUserModel("test");
+ team = service.getTeamModel("testteam");
+ assertTrue(user.canView(newrepo1));
+ assertTrue(user.canView(newrepo2));
+ assertTrue(team.hasUser("test"));
+
+ // drop testteam from user and add nextteam to user
+ team = new TeamModel("nextteam");
+ team.addRepositoryPermission(NEWREPO1.name);
+ team.addRepositoryPermission(NEWREPO2.name);
+ user.teams.clear();
+ user.teams.add(team);
+ service.updateUserModel(user);
+
+ // confirm implicit drop
+ user = service.getUserModel("test");
+ team = service.getTeamModel("testteam");
+ assertTrue(user.canView(newrepo1));
+ assertTrue(user.canView(newrepo2));
+ assertFalse(team.hasUser("test"));
+ team = service.getTeamModel("nextteam");
+ assertTrue(team.hasUser("test"));
+
+ // delete the user and confirm team no longer has user
+ service.deleteUser("test");
+ team = service.getTeamModel("testteam");
+ assertFalse(team.hasUser("test"));
+
+ // delete both teams
+ service.deleteTeam("testteam");
+ service.deleteTeam("nextteam");
+
+ // assert we still have the admins team
+ assertEquals(1, service.getAllTeamNames().size());
+ assertEquals("admins", service.getAllTeamNames().get(0));
+
+ team = service.getTeamModel("admins");
+ assertEquals(1, team.mailingLists.size());
+ assertTrue(team.mailingLists.contains("admins@localhost.com"));
+ }
+} \ No newline at end of file
diff --git a/src/test/java/com/gitblit/tests/X509UtilsTest.java b/src/test/java/com/gitblit/tests/X509UtilsTest.java
new file mode 100644
index 00000000..5d17e18d
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/X509UtilsTest.java
@@ -0,0 +1,184 @@
+/*
+ * Copyright 2012 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.security.PrivateKey;
+import java.security.cert.X509Certificate;
+import java.util.Arrays;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.eclipse.jgit.util.FileUtils;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.gitblit.models.UserModel;
+import com.gitblit.utils.HttpUtils;
+import com.gitblit.utils.X509Utils;
+import com.gitblit.utils.X509Utils.RevocationReason;
+import com.gitblit.utils.X509Utils.X509Log;
+import com.gitblit.utils.X509Utils.X509Metadata;
+
+/**
+ * Unit tests for X509 certificate generation.
+ *
+ * @author James Moger
+ *
+ */
+public class X509UtilsTest extends Assert {
+
+ // passwords are case-sensitive and may be length-limited
+ // based on the JCE policy files
+ String caPassword = "aBcDeFg";
+ File folder = new File(System.getProperty("user.dir"), "x509test");
+
+ X509Log log = new X509Log() {
+ public void log(String message) {
+ System.out.println(message);
+ }
+ };
+
+ @Before
+ public void prepare() throws Exception {
+ cleanUp();
+ X509Metadata goMetadata = new X509Metadata("localhost", caPassword);
+ X509Utils.prepareX509Infrastructure(goMetadata, folder, log);
+ }
+
+ @After
+ public void cleanUp() throws Exception {
+ if (folder.exists()) {
+ FileUtils.delete(folder, FileUtils.RECURSIVE);
+ }
+ }
+
+ @Test
+ public void testNewCA() throws Exception {
+ File storeFile = new File(folder, X509Utils.CA_KEY_STORE);
+ X509Utils.getPrivateKey(X509Utils.CA_ALIAS, storeFile, caPassword);
+ X509Certificate cert = X509Utils.getCertificate(X509Utils.CA_ALIAS, storeFile, caPassword);
+ assertEquals("O=Gitblit,OU=Gitblit,CN=Gitblit Certificate Authority", cert.getIssuerDN().getName());
+ }
+
+ @Test
+ public void testCertificateUserMapping() throws Exception {
+ File storeFile = new File(folder, X509Utils.CA_KEY_STORE);
+ PrivateKey caPrivateKey = X509Utils.getPrivateKey(X509Utils.CA_ALIAS, storeFile, caPassword);
+ X509Certificate caCert = X509Utils.getCertificate(X509Utils.CA_ALIAS, storeFile, caPassword);
+
+ X509Metadata userMetadata = new X509Metadata("james", "james");
+ userMetadata.serverHostname = "www.myserver.com";
+ userMetadata.userDisplayname = "James Moger";
+ userMetadata.passwordHint = "your name";
+ userMetadata.oids.put("C", "US");
+
+ X509Certificate cert1 = X509Utils.newClientCertificate(userMetadata, caPrivateKey, caCert, storeFile.getParentFile());
+ UserModel userModel1 = HttpUtils.getUserModelFromCertificate(cert1);
+ assertEquals(userMetadata.commonName, userModel1.username);
+ assertEquals(userMetadata.emailAddress, userModel1.emailAddress);
+ assertEquals("C=US,O=Gitblit,OU=Gitblit,CN=james", cert1.getSubjectDN().getName());
+
+
+ X509Certificate cert2 = X509Utils.newClientCertificate(userMetadata, caPrivateKey, caCert, storeFile.getParentFile());
+ UserModel userModel2 = HttpUtils.getUserModelFromCertificate(cert2);
+ assertEquals(userMetadata.commonName, userModel2.username);
+ assertEquals(userMetadata.emailAddress, userModel2.emailAddress);
+ assertEquals("C=US,O=Gitblit,OU=Gitblit,CN=james", cert2.getSubjectDN().getName());
+
+ assertNotSame("Serial numbers are the same!", cert1.getSerialNumber().longValue(), cert2.getSerialNumber().longValue());
+ }
+
+ @Test
+ public void testUserBundle() throws Exception {
+ File storeFile = new File(folder, X509Utils.CA_KEY_STORE);
+
+ X509Metadata userMetadata = new X509Metadata("james", "james");
+ userMetadata.serverHostname = "www.myserver.com";
+ userMetadata.userDisplayname = "James Moger";
+ userMetadata.passwordHint = "your name";
+
+ File zip = X509Utils.newClientBundle(userMetadata, storeFile, caPassword, log);
+ assertTrue(zip.exists());
+
+ List<String> expected = Arrays.asList(
+ userMetadata.commonName + ".pem",
+ userMetadata.commonName + ".p12",
+ userMetadata.commonName + ".cer",
+ "ca.cer",
+ "README.TXT");
+
+ ZipInputStream zis = new ZipInputStream(new FileInputStream(zip));
+ ZipEntry entry = null;
+ while ((entry = zis.getNextEntry()) != null) {
+ assertTrue("Unexpected file: " + entry.getName(), expected.contains(entry.getName()));
+ }
+ zis.close();
+ }
+
+ @Test
+ public void testCertificateRevocation() throws Exception {
+ File storeFile = new File(folder, X509Utils.CA_KEY_STORE);
+ PrivateKey caPrivateKey = X509Utils.getPrivateKey(X509Utils.CA_ALIAS, storeFile, caPassword);
+ X509Certificate caCert = X509Utils.getCertificate(X509Utils.CA_ALIAS, storeFile, caPassword);
+
+ X509Metadata userMetadata = new X509Metadata("james", "james");
+ userMetadata.serverHostname = "www.myserver.com";
+ userMetadata.userDisplayname = "James Moger";
+ userMetadata.passwordHint = "your name";
+
+ // generate a new client certificate
+ X509Certificate cert1 = X509Utils.newClientCertificate(userMetadata, caPrivateKey, caCert, storeFile.getParentFile());
+
+ // confirm this certificate IS NOT revoked
+ File caRevocationList = new File(folder, X509Utils.CA_REVOCATION_LIST);
+ assertFalse(X509Utils.isRevoked(cert1, caRevocationList));
+
+ // revoke certificate and then confirm it IS revoked
+ X509Utils.revoke(cert1, RevocationReason.ACompromise, caRevocationList, storeFile, caPassword, log);
+ assertTrue(X509Utils.isRevoked(cert1, caRevocationList));
+
+ // generate a second certificate
+ X509Certificate cert2 = X509Utils.newClientCertificate(userMetadata, caPrivateKey, caCert, storeFile.getParentFile());
+
+ // confirm second certificate IS NOT revoked
+ assertTrue(X509Utils.isRevoked(cert1, caRevocationList));
+ assertFalse(X509Utils.isRevoked(cert2, caRevocationList));
+
+ // revoke second certificate and then confirm it IS revoked
+ X509Utils.revoke(cert2, RevocationReason.ACompromise, caRevocationList, caPrivateKey, log);
+ assertTrue(X509Utils.isRevoked(cert1, caRevocationList));
+ assertTrue(X509Utils.isRevoked(cert2, caRevocationList));
+
+ // generate a third certificate
+ X509Certificate cert3 = X509Utils.newClientCertificate(userMetadata, caPrivateKey, caCert, storeFile.getParentFile());
+
+ // confirm third certificate IS NOT revoked
+ assertTrue(X509Utils.isRevoked(cert1, caRevocationList));
+ assertTrue(X509Utils.isRevoked(cert2, caRevocationList));
+ assertFalse(X509Utils.isRevoked(cert3, caRevocationList));
+
+ // revoke third certificate and then confirm it IS revoked
+ X509Utils.revoke(cert3, RevocationReason.ACompromise, caRevocationList, caPrivateKey, log);
+ assertTrue(X509Utils.isRevoked(cert1, caRevocationList));
+ assertTrue(X509Utils.isRevoked(cert2, caRevocationList));
+ assertTrue(X509Utils.isRevoked(cert3, caRevocationList));
+ }
+}
diff --git a/src/test/java/com/gitblit/tests/mock/MemorySettings.java b/src/test/java/com/gitblit/tests/mock/MemorySettings.java
new file mode 100644
index 00000000..1b3e2382
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/mock/MemorySettings.java
@@ -0,0 +1,50 @@
+ /*
+ * Copyright 2012 John Crygier
+ * Copyright 2012 gitblit.com
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.tests.mock;
+
+import java.util.Map;
+import java.util.Properties;
+
+import com.gitblit.IStoredSettings;
+
+public class MemorySettings extends IStoredSettings {
+
+ private Map<String, Object> backingMap;
+
+ public MemorySettings(Map<String, Object> backingMap) {
+ super(MemorySettings.class);
+ this.backingMap = backingMap;
+ }
+
+ @Override
+ protected Properties read() {
+ Properties props = new Properties();
+ props.putAll(backingMap);
+
+ return props;
+ }
+
+ public void put(Object key, Object value) {
+ backingMap.put(key.toString(), value);
+ }
+
+ @Override
+ public boolean saveSettings(Map<String, String> updatedSettings) {
+ return false;
+ }
+
+}
diff --git a/src/test/java/com/gitblit/tests/resources/ldapUserServiceSampleData.ldif b/src/test/java/com/gitblit/tests/resources/ldapUserServiceSampleData.ldif
new file mode 100644
index 00000000..df79333e
--- /dev/null
+++ b/src/test/java/com/gitblit/tests/resources/ldapUserServiceSampleData.ldif
@@ -0,0 +1,108 @@
+dn: DC=MyDomain
+dc: MyDomain
+objectClass: top
+objectClass: domain
+
+dn: OU=MyOrganization,DC=MyDomain
+objectClass: top
+objectClass: organizationalUnit
+ou: MyOrganization
+
+dn: OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: top
+objectClass: organizationalUnit
+ou: UserControl
+
+dn: OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: top
+objectClass: organizationalUnit
+ou: Groups
+
+dn: CN=Git_Admins,OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: top
+objectClass: group
+cn: Git_Admins
+sAMAccountName: Git_Admins
+member: CN=UserOne,OU=US,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+dn: CN=Git Admins,OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: top
+objectClass: group
+cn: Git Admins
+sAMAccountName: Git_Admins_With_Space
+member: CN=UserTwo,OU=US,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+dn: CN=Git_Users,OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: top
+objectClass: group
+cn: Git_Users
+sAMAccountName: Git_Users
+member: CN=UserOne,OU=US,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+member: CN=UserTwo,OU=US,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+member: CN=UserThree,OU=Canada,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+member: CN=UserFour,OU=Canada,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+dn: OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: top
+objectClass: organizationalUnit
+ou: Users
+
+dn: OU=US,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: top
+objectClass: organizationalUnit
+ou: US
+
+dn: OU=Canada,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: top
+objectClass: organizationalUnit
+ou: Canada
+
+dn: CN=UserOne,OU=US,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: user
+objectClass: person
+sAMAccountName: UserOne
+userPassword: userOnePassword
+displayName: User One
+givenName: User
+surname: One
+personalTitle: Mr
+email: userone@gitblit.com
+memberOf: CN=Git_Admins,OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+memberOf: CN=Git_Users,OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+dn: CN=UserTwo,OU=US,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: user
+objectClass: person
+sAMAccountName: UserTwo
+userPassword: userTwoPassword
+displayName: User Two
+givenName: User
+surname: Two
+personalTitle: Mr
+email: usertwo@gitblit.com
+memberOf: CN=Git_Users,OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+memberOf: CN=Git Admins,OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+dn: CN=UserThree,OU=Canada,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: user
+objectClass: person
+sAMAccountName: UserThree
+userPassword: userThreePassword
+displayName: User Three
+givenName: User
+surname: Three
+personalTitle: Mrs
+email: userthree@gitblit.com
+memberOf: CN=Git_Users,OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain
+
+dn: CN=UserFour,OU=Canada,OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
+objectClass: user
+objectClass: person
+sAMAccountName: UserFour
+userPassword: userFourPassword
+displayName: User Four
+givenName: User
+surname: Four
+personalTitle: Miss
+email: userfour@gitblit.com
+memberOf: CN=Git_Users,OU=Groups,OU=UserControl,OU=MyOrganization,DC=MyDomain \ No newline at end of file
diff --git a/src/test/java/de/akquinet/devops/GitBlit4UITests.java b/src/test/java/de/akquinet/devops/GitBlit4UITests.java
new file mode 100644
index 00000000..130f2c96
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/GitBlit4UITests.java
@@ -0,0 +1,25 @@
+package de.akquinet.devops;
+
+import java.util.concurrent.TimeUnit;
+
+import com.gitblit.GitBlit;
+
+public class GitBlit4UITests extends GitBlit {
+
+ private boolean luceneIndexingEnabled;
+
+ public GitBlit4UITests(boolean luceneIndexingEnabled) {
+ this.luceneIndexingEnabled = luceneIndexingEnabled;
+ }
+
+ @Override
+ protected void enableLuceneIndexing() {
+ if (luceneIndexingEnabled) {
+ getScheduledExecutor().scheduleAtFixedRate(getLuceneExecutor(), 1,
+ 2, TimeUnit.MINUTES);
+ getLogger()
+ .info("Lucene executor is scheduled to process indexed branches every 2 minutes.");
+ }
+ }
+
+}
diff --git a/src/test/java/de/akquinet/devops/GitBlitServer4UITests.java b/src/test/java/de/akquinet/devops/GitBlitServer4UITests.java
new file mode 100644
index 00000000..2d54be2a
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/GitBlitServer4UITests.java
@@ -0,0 +1,62 @@
+package de.akquinet.devops;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.beust.jcommander.JCommander;
+import com.beust.jcommander.ParameterException;
+import com.gitblit.GitBlit;
+import com.gitblit.GitBlitServer;
+
+public class GitBlitServer4UITests extends GitBlitServer {
+
+ public static void main(String... args) {
+ GitBlitServer4UITests server = new GitBlitServer4UITests();
+
+ // filter out the baseFolder parameter
+ List<String> filtered = new ArrayList<String>();
+ String folder = "data";
+ for (int i = 0; i < args.length; i++) {
+ String arg = args[i];
+ if (arg.equals("--baseFolder")) {
+ if (i + 1 == args.length) {
+ System.out.println("Invalid --baseFolder parameter!");
+ System.exit(-1);
+ } else if (args[i + 1] != ".") {
+ folder = args[i + 1];
+ }
+ i = i + 1;
+ } else {
+ filtered.add(arg);
+ }
+ }
+
+ Params.baseFolder = folder;
+ Params params = new Params();
+ JCommander jc = new JCommander(params);
+ try {
+ jc.parse(filtered.toArray(new String[filtered.size()]));
+ if (params.help) {
+ server.usage(jc, null);
+ }
+ } catch (ParameterException t) {
+ server.usage(jc, t);
+ }
+
+ if (params.stop) {
+ server.stop(params);
+ } else {
+ server.start(params);
+ }
+ }
+
+ private GitBlit4UITests instance;
+
+ @Override
+ protected GitBlit getGitBlitInstance() {
+ if (instance == null) {
+ instance = new GitBlit4UITests(false);
+ }
+ return instance;
+ }
+}
diff --git a/src/test/java/de/akquinet/devops/GitblitRunnable.java b/src/test/java/de/akquinet/devops/GitblitRunnable.java
new file mode 100644
index 00000000..66a31e3c
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/GitblitRunnable.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2013 akquinet tech@spree GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.akquinet.devops;
+
+import java.net.InetAddress;
+import java.net.ServerSocket;
+
+import com.gitblit.GitBlitServer;
+import com.gitblit.tests.GitBlitSuite;
+
+/**
+ * This is a runnable implementation, that is used to run a gitblit server in a
+ * separate thread (e.g. alongside test cases)
+ *
+ * @author saheba
+ *
+ */
+public class GitblitRunnable implements Runnable {
+
+ private int httpPort, httpsPort, shutdownPort;
+ private String userPropertiesPath, gitblitPropertiesPath;
+ private boolean startFailed = false;
+
+ /**
+ * constructor with reduced set of start params
+ *
+ * @param httpPort
+ * @param httpsPort
+ * @param shutdownPort
+ * @param gitblitPropertiesPath
+ * @param userPropertiesPath
+ */
+ public GitblitRunnable(int httpPort, int httpsPort, int shutdownPort,
+ String gitblitPropertiesPath, String userPropertiesPath) {
+ this.httpPort = httpPort;
+ this.httpsPort = httpsPort;
+ this.shutdownPort = shutdownPort;
+ this.userPropertiesPath = userPropertiesPath;
+ this.gitblitPropertiesPath = gitblitPropertiesPath;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+ boolean portsFree = false;
+ long lastRun = -1;
+ while (!portsFree) {
+ long current = System.currentTimeMillis();
+ if (lastRun == -1 || lastRun + 100 < current) {
+ portsFree = areAllPortsFree(new int[] { httpPort, httpsPort,
+ shutdownPort }, "127.0.0.1");
+ }
+ lastRun = current;
+
+ }
+ try {
+ GitBlitServer4UITests.main("--httpPort", "" + httpPort, "--httpsPort", ""
+ + httpsPort, "--shutdownPort", "" + shutdownPort,
+ "--repositoriesFolder",
+ "\"" + GitBlitSuite.REPOSITORIES.getAbsolutePath() + "\"",
+ "--userService", userPropertiesPath, "--settings",
+ gitblitPropertiesPath);
+ setStartFailed(false);
+ } catch (Exception iex) {
+ System.out.println("Gitblit server start failed");
+ setStartFailed(true);
+ }
+ }
+
+ /**
+ * Method used to ensure that all ports are free, if the runnable is used
+ * JUnit test classes. Be aware that JUnit's setUpClass and tearDownClass
+ * methods, which are executed before and after a test class (consisting of
+ * several test cases), may be executed parallely if they are part of a test
+ * suite consisting of several test classes. Therefore the run method of
+ * this class calls areAllPortsFree to check port availability before
+ * starting another gitblit instance.
+ *
+ * @param ports
+ * @param inetAddress
+ * @return
+ */
+ public static boolean areAllPortsFree(int[] ports, String inetAddress) {
+ System.out
+ .println("\n"
+ + System.currentTimeMillis()
+ + " ----------------------------------- testing if all ports are free ...");
+ String blockedPorts = "";
+ for (int i = 0; i < ports.length; i++) {
+ ServerSocket s;
+ try {
+ s = new ServerSocket(ports[i], 1,
+ InetAddress.getByName(inetAddress));
+ s.close();
+ } catch (Exception e) {
+ if (!blockedPorts.equals("")) {
+ blockedPorts += ", ";
+ }
+ }
+ }
+ if (blockedPorts.equals("")) {
+ System.out
+ .println(" ----------------------------------- ... verified");
+ return true;
+ }
+ System.out.println(" ----------------------------------- ... "
+ + blockedPorts + " are still blocked");
+ return false;
+ }
+
+ private void setStartFailed(boolean startFailed) {
+ this.startFailed = startFailed;
+ }
+
+ public boolean isStartFailed() {
+ return startFailed;
+ }
+}
diff --git a/src/test/java/de/akquinet/devops/LaunchWithUITestConfig.java b/src/test/java/de/akquinet/devops/LaunchWithUITestConfig.java
new file mode 100644
index 00000000..aebde9a2
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/LaunchWithUITestConfig.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2013 akquinet tech@spree GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.akquinet.devops;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.net.UnknownHostException;
+
+import junit.framework.Assert;
+
+import org.junit.Test;
+
+import com.gitblit.Constants;
+import com.gitblit.GitBlitServer;
+import com.gitblit.tests.GitBlitSuite;
+
+/**
+ * This test checks if it is possible to run two server instances in the same
+ * JVM sequentially
+ *
+ * @author saheba
+ *
+ */
+public class LaunchWithUITestConfig {
+
+ @Test
+ public void testSequentialLaunchOfSeveralInstances()
+ throws InterruptedException {
+ // different ports than in testParallelLaunchOfSeveralInstances to
+ // ensure that both test cases do not affect each others test results
+ int httpPort = 9191, httpsPort = 9292, shutdownPort = 9393;
+ String gitblitPropertiesPath = "src/test/config/test-ui-gitblit.properties",
+ usersPropertiesPath = "src/test/config/test-ui-users.conf";
+
+ GitblitRunnable gitblitRunnable = new GitblitRunnable(httpPort,
+ httpsPort, shutdownPort, gitblitPropertiesPath,
+ usersPropertiesPath);
+ Thread serverThread = new Thread(gitblitRunnable);
+ serverThread.start();
+ Thread.sleep(2000);
+ Assert.assertFalse(gitblitRunnable.isStartFailed());
+ LaunchWithUITestConfig.shutdownGitBlitServer(shutdownPort);
+
+ Thread.sleep(5000);
+
+ GitblitRunnable gitblitRunnable2 = new GitblitRunnable(httpPort,
+ httpsPort, shutdownPort, gitblitPropertiesPath,
+ usersPropertiesPath);
+ Thread serverThread2 = new Thread(gitblitRunnable2);
+ serverThread2.start();
+ Thread.sleep(2000);
+ Assert.assertFalse(gitblitRunnable2.isStartFailed());
+ LaunchWithUITestConfig.shutdownGitBlitServer(shutdownPort);
+ }
+
+ @Test
+ public void testParallelLaunchOfSeveralInstances()
+ throws InterruptedException {
+ // different ports than in testSequentialLaunchOfSeveralInstances to
+ // ensure that both test cases do not affect each others test results
+ int httpPort = 9797, httpsPort = 9898, shutdownPort = 9999;
+ int httpPort2 = 9494, httpsPort2 = 9595, shutdownPort2 = 9696;
+ String gitblitPropertiesPath = "src/test/config/test-ui-gitblit.properties",
+ usersPropertiesPath = "src/test/config/test-ui-users.conf";
+
+ GitblitRunnable gitblitRunnable = new GitblitRunnable(httpPort,
+ httpsPort, shutdownPort, gitblitPropertiesPath,
+ usersPropertiesPath);
+ Thread serverThread = new Thread(gitblitRunnable);
+ serverThread.start();
+ Thread.sleep(2000);
+ Assert.assertFalse(gitblitRunnable.isStartFailed());
+
+ GitblitRunnable gitblitRunnable2 = new GitblitRunnable(httpPort2,
+ httpsPort2, shutdownPort2, gitblitPropertiesPath,
+ usersPropertiesPath);
+ Thread serverThread2 = new Thread(gitblitRunnable2);
+ serverThread2.start();
+ Thread.sleep(2000);
+ Assert.assertFalse(gitblitRunnable2.isStartFailed());
+
+ LaunchWithUITestConfig.shutdownGitBlitServer(shutdownPort);
+ LaunchWithUITestConfig.shutdownGitBlitServer(shutdownPort2);
+ }
+
+ /**
+ * main runs the tests without assert checks. You have to check the console
+ * output manually.
+ *
+ * @param args
+ * @throws InterruptedException
+ */
+ public static void main(String[] args) throws InterruptedException {
+ new LaunchWithUITestConfig().testSequentialLaunchOfSeveralInstances();
+ new LaunchWithUITestConfig().testParallelLaunchOfSeveralInstances();
+ }
+
+ private static void shutdownGitBlitServer(int shutdownPort) {
+ try {
+ Socket s = new Socket(InetAddress.getByName("127.0.0.1"),
+ shutdownPort);
+ OutputStream out = s.getOutputStream();
+ System.out.println("Sending Shutdown Request to " + Constants.NAME);
+ out.write("\r\n".getBytes());
+ out.flush();
+ s.close();
+ } catch (UnknownHostException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/test/java/de/akquinet/devops/ManualUITestLaunch.java b/src/test/java/de/akquinet/devops/ManualUITestLaunch.java
new file mode 100644
index 00000000..809360aa
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/ManualUITestLaunch.java
@@ -0,0 +1,15 @@
+package de.akquinet.devops;
+
+public class ManualUITestLaunch {
+public static void main(String[] args) {
+ int httpPort = 8080, httpsPort = 8443, shutdownPort = 8081;
+ String gitblitPropertiesPath = "src/test/config/test-ui-gitblit.properties",
+ usersPropertiesPath = "src/test/config/test-ui-users.conf";
+
+ GitblitRunnable gitblitRunnable = new GitblitRunnable(httpPort,
+ httpsPort, shutdownPort, gitblitPropertiesPath,
+ usersPropertiesPath);
+ Thread serverThread = new Thread(gitblitRunnable);
+ serverThread.start();
+}
+}
diff --git a/src/test/java/de/akquinet/devops/test/ui/TestUISuite.java b/src/test/java/de/akquinet/devops/test/ui/TestUISuite.java
new file mode 100644
index 00000000..08d7a00b
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/test/ui/TestUISuite.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2013 akquinet tech@spree GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.akquinet.devops.test.ui;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+import de.akquinet.devops.test.ui.cases.UI_MultiAdminSupportTest;
+
+/**
+ * the test suite including all selenium-based ui-tests.
+ *
+ * @author saheba
+ *
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({ UI_MultiAdminSupportTest.class, UI_MultiAdminSupportTest.class })
+public class TestUISuite {
+
+}
diff --git a/src/test/java/de/akquinet/devops/test/ui/cases/UI_MultiAdminSupportTest.java b/src/test/java/de/akquinet/devops/test/ui/cases/UI_MultiAdminSupportTest.java
new file mode 100644
index 00000000..a3925719
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/test/ui/cases/UI_MultiAdminSupportTest.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2013 akquinet tech@spree GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.akquinet.devops.test.ui.cases;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import de.akquinet.devops.test.ui.generic.AbstractUITest;
+import de.akquinet.devops.test.ui.view.RepoEditView;
+import de.akquinet.devops.test.ui.view.RepoListView;
+
+/**
+ * tests the multi admin per repo feature.
+ *
+ * @author saheba
+ *
+ */
+public class UI_MultiAdminSupportTest extends AbstractUITest {
+
+ String baseUrl = "https://localhost:8443";
+ RepoListView view;
+ RepoEditView editView;
+ private static final String TEST_MULTI_ADMIN_SUPPORT_REPO_NAME = "testmultiadminsupport";
+ private static final String TEST_MULTI_ADMIN_SUPPORT_REPO_PATH = "~repocreator/"
+ + TEST_MULTI_ADMIN_SUPPORT_REPO_NAME + ".git";
+ private static final String TEST_MULTI_ADMIN_SUPPORT_REPO_PATH_WITHOUT_SUFFIX = "~repocreator/"
+ + TEST_MULTI_ADMIN_SUPPORT_REPO_NAME;
+
+ @Before
+ public void before() {
+ System.out.println("IN BEFORE");
+ this.view = new RepoListView(AbstractUITest.getDriver(), baseUrl);
+ this.editView = new RepoEditView(AbstractUITest.getDriver());
+ AbstractUITest.getDriver().navigate().to(baseUrl);
+ }
+
+ @Test
+ public void test_MultiAdminSelectionInStandardRepo() {
+ // login
+ view.login("repocreator", "repocreator");
+
+ // create new repo
+ view.navigateToNewRepo(1);
+ editView.changeName(TEST_MULTI_ADMIN_SUPPORT_REPO_PATH);
+ Assert.assertTrue(editView.navigateToPermissionsTab());
+
+ Assert.assertTrue(editView
+ .changeAccessRestriction(RepoEditView.RESTRICTION_AUTHENTICATED_VCP));
+ Assert.assertTrue(editView
+ .changeAuthorizationControl(RepoEditView.AUTHCONTROL_RWALL));
+
+ // with a second admin
+ editView.addOwner("admin");
+ Assert.assertTrue(editView.save());
+ // user is automatically forwarded to repo list view
+ Assert.assertTrue(view.isEmptyRepo(TEST_MULTI_ADMIN_SUPPORT_REPO_PATH));
+ Assert.assertTrue(view
+ .isEditableRepo(TEST_MULTI_ADMIN_SUPPORT_REPO_PATH));
+ Assert.assertTrue(view
+ .isDeletableRepo(TEST_MULTI_ADMIN_SUPPORT_REPO_PATH_WITHOUT_SUFFIX));
+ // logout repocreator
+ view.logout();
+
+ // check with admin account if second admin has the same rights
+ view.login("admin", "admin");
+ Assert.assertTrue(view.isEmptyRepo(TEST_MULTI_ADMIN_SUPPORT_REPO_PATH));
+ Assert.assertTrue(view
+ .isEditableRepo(TEST_MULTI_ADMIN_SUPPORT_REPO_PATH));
+ Assert.assertTrue(view
+ .isDeletableRepo(TEST_MULTI_ADMIN_SUPPORT_REPO_PATH_WITHOUT_SUFFIX));
+ // delete repo to reach state as before test execution
+ view.navigateToDeleteRepo(TEST_MULTI_ADMIN_SUPPORT_REPO_PATH_WITHOUT_SUFFIX);
+ view.acceptAlertDialog();
+ view.logout();
+
+ Assert.assertTrue(view.isLoginPartVisible());
+ }
+
+}
diff --git a/src/test/java/de/akquinet/devops/test/ui/generic/AbstractUITest.java b/src/test/java/de/akquinet/devops/test/ui/generic/AbstractUITest.java
new file mode 100644
index 00000000..bb7b3da2
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/test/ui/generic/AbstractUITest.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2013 akquinet tech@spree GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.akquinet.devops.test.ui.generic;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.firefox.FirefoxProfile;
+
+import com.gitblit.GitBlitServer;
+
+import de.akquinet.devops.GitblitRunnable;
+
+/**
+ * This abstract class implements the setUpClass and tearDownClass for
+ * selenium-based UITests. They require a running gitblit server instance and a
+ * webdriver instance, which are managed by the setUpClass and tearDownClass
+ * method. Write a separate test class derived from this abstract class for each
+ * scenario consisting of one or more test cases, which can share the same
+ * server instance.
+ *
+ * @author saheba
+ *
+ */
+public abstract class AbstractUITest {
+
+ private static Thread serverThread;
+ private static WebDriver driver;
+
+ private static final int HTTP_PORT = 8080, HTTPS_PORT = 8443,
+ SHUTDOWN_PORT = 8081;
+ private static final String GITBLIT_PROPERTIES_PATH = "test-ui-gitblit.properties",
+ USERS_PROPERTIES_PATH = "test-ui-users.conf";
+
+ /**
+ * starts a gitblit server instance in a separate thread before test cases
+ * of concrete, non-abstract child-classes are executed
+ */
+ @BeforeClass
+ public static void setUpClass() {
+ Runnable gitblitRunnable = new GitblitRunnable(HTTP_PORT, HTTPS_PORT,
+ SHUTDOWN_PORT, GITBLIT_PROPERTIES_PATH, USERS_PROPERTIES_PATH);
+
+ serverThread = new Thread(gitblitRunnable);
+ serverThread.start();
+ FirefoxProfile firefoxProfile = new FirefoxProfile();
+ firefoxProfile.setPreference("startup.homepage_welcome_url",
+ "https://www.google.de");
+
+ firefoxProfile.setPreference("browser.download.folderList", 2);
+ firefoxProfile.setPreference(
+ "browser.download.manager.showWhenStarting", false);
+ String downloadDir = System.getProperty("java.io.tmpdir");
+ firefoxProfile.setPreference("browser.download.dir", downloadDir);
+ firefoxProfile.setPreference("browser.helperApps.neverAsk.saveToDisk",
+ "text/csv,text/plain,application/zip,application/pdf");
+ firefoxProfile.setPreference("browser.helperApps.alwaysAsk.force",
+ false);
+ System.out.println("Saving all attachments to: " + downloadDir);
+
+ driver = new FirefoxDriver(firefoxProfile);
+ }
+
+ /**
+ * stops the gitblit server instance running in a separate thread after test
+ * cases of concrete, non-abstract child-classes have been executed
+ */
+ @AfterClass
+ public static void tearDownClass() throws InterruptedException {
+ driver.close();
+ // Stop Gitblit
+ GitBlitServer.main("--stop", "--shutdownPort", "" + SHUTDOWN_PORT);
+
+ // Wait a few seconds for it to be running completely including thread
+ // destruction
+ Thread.sleep(1000);
+ }
+
+ public static WebDriver getDriver() {
+ return AbstractUITest.driver;
+ }
+}
diff --git a/src/test/java/de/akquinet/devops/test/ui/view/Exp.java b/src/test/java/de/akquinet/devops/test/ui/view/Exp.java
new file mode 100644
index 00000000..3433bbb6
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/test/ui/view/Exp.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2013 akquinet tech@spree GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.akquinet.devops.test.ui.view;
+
+import java.util.List;
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.ExpectedCondition;
+
+/**
+ * container class for selenium conditions
+ *
+ * @author saheba
+ *
+ */
+public class Exp {
+ public static class EditRepoViewLoaded implements ExpectedCondition<Boolean> {
+ public Boolean apply(WebDriver d) {
+ List<WebElement> findElements = d.findElements(By.partialLinkText("general"));
+ return findElements.size() == 1;
+ }
+ }
+ public static class RepoListViewLoaded implements ExpectedCondition<Boolean> {
+ public Boolean apply(WebDriver d) {
+ String xpath = "//img[@src=\"git-black-16x16.png\"]";
+ List<WebElement> findElements = d.findElements(By.xpath(xpath ));
+ return findElements.size() == 1;
+ }
+ }
+}
diff --git a/src/test/java/de/akquinet/devops/test/ui/view/GitblitDashboardView.java b/src/test/java/de/akquinet/devops/test/ui/view/GitblitDashboardView.java
new file mode 100644
index 00000000..0908d7c9
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/test/ui/view/GitblitDashboardView.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2013 akquinet tech@spree GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.akquinet.devops.test.ui.view;
+
+import java.util.List;
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.ExpectedCondition;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+/**
+ * class representing the view componenents and possible user interactions, you
+ * can see and do on most screens when you are logged in.
+ *
+ * @author saheba
+ *
+ */
+public class GitblitDashboardView extends GitblitPageView {
+
+ public static final String TITLE_STARTS_WITH = "localhost";
+
+ public GitblitDashboardView(WebDriver driver, String baseUrl) {
+ super(driver, baseUrl);
+ }
+
+ public boolean isLoginPartVisible() {
+ List<WebElement> found = getDriver().findElements(
+ By.partialLinkText("logout"));
+ return found == null || found.size() == 0;
+ }
+
+ public void logout() {
+ // String pathLogout = "//a[@href =\"?" + WICKET_HREF_PAGE_PATH
+ // + ".LogoutPage\"]";
+ // List<WebElement> logout =
+ // getDriver().findElements(By.xpath(pathLogout));
+ // logout.get(0).click();
+ // replaced by url call because click hangs sometimes if the clicked
+ // object is not a button or selenium ff driver does not notice the
+ // change for any other reason
+ getDriver().navigate().to(
+ getBaseUrl() + "?" + WICKET_HREF_PAGE_PATH + ".LogoutPage");
+ }
+
+ public static final String LOGIN_AREA_SELECTOR = "//span[@class = \"form-search\" ]";
+ public static final String WICKET_PAGES_PACKAGE_NAME = "com.gitblit.wicket.pages";
+ public static final String WICKET_HREF_PAGE_PATH = "wicket:bookmarkablePage=:"
+ + WICKET_PAGES_PACKAGE_NAME;
+
+ synchronized public void waitToLoadFor(int sec) {
+ WebDriverWait webDriverWait = new WebDriverWait(getDriver(), sec);
+ webDriverWait.until(new ExpectedCondition<Boolean>() {
+ public Boolean apply(WebDriver d) {
+ return d.getTitle().toLowerCase()
+ .startsWith(GitblitDashboardView.TITLE_STARTS_WITH);
+ }
+ });
+ }
+
+ public void login(String id, String pw) {
+ String pathID = LOGIN_AREA_SELECTOR + "/input[@name = \"username\" ]";
+ String pathPW = LOGIN_AREA_SELECTOR + "/input[@name = \"password\" ]";
+ String pathSubmit = LOGIN_AREA_SELECTOR
+ + "/button[@type = \"submit\" ]";
+ // System.out.println("DRIVER:"+getDriver());
+ // List<WebElement> findElement =
+ // getDriver().findElements(By.xpath("//span[@class = \"form-search\" ]"));
+ //
+ // System.out.println("ELEM: "+findElement);
+ // System.out.println("SIZE: "+findElement.size());
+ // System.out.println("XPath: "+pathID);
+ WebElement idField = getDriver().findElement(By.xpath(pathID));
+ // System.out.println("IDFIELD:"+idField);
+ idField.sendKeys(id);
+ WebElement pwField = getDriver().findElement(By.xpath(pathPW));
+ // System.out.println(pwField);
+ pwField.sendKeys(pw);
+ WebElement submit = getDriver().findElement(By.xpath(pathSubmit));
+ submit.click();
+ }
+
+ public void acceptAlertDialog() {
+ getDriver().switchTo().alert().accept();
+ }
+}
diff --git a/src/test/java/de/akquinet/devops/test/ui/view/GitblitPageView.java b/src/test/java/de/akquinet/devops/test/ui/view/GitblitPageView.java
new file mode 100644
index 00000000..43716434
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/test/ui/view/GitblitPageView.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2013 akquinet tech@spree GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.akquinet.devops.test.ui.view;
+
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+
+/**
+ * general basic class representing a gitblit webpage and offering basic methods
+ * used in selenium tests.
+ *
+ * @author saheba
+ *
+ */
+public class GitblitPageView {
+ private WebDriver driver;
+ private String baseUrl;
+
+ public GitblitPageView(WebDriver driver, String baseUrl) {
+ this.driver = driver;
+ this.baseUrl = baseUrl;
+ }
+
+ public void sleep(int miliseconds) {
+ try {
+ Thread.sleep(miliseconds);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public WebElement getElementWithFocus() {
+ String elScript = "return document.activeElement;";
+
+ WebElement focuseedEl = (WebElement) ((JavascriptExecutor) getDriver())
+ .executeScript(elScript);
+ return focuseedEl;
+ }
+
+ public void navigateToPreviousPageOfBrowserHistory() {
+ driver.navigate().back();
+ }
+
+ public void setDriver(WebDriver driver) {
+ this.driver = driver;
+ }
+
+ public WebDriver getDriver() {
+ return driver;
+ }
+
+ public void setBaseUrl(String baseUrl) {
+ this.baseUrl = baseUrl;
+ }
+
+ public String getBaseUrl() {
+ return baseUrl;
+ }
+}
diff --git a/src/test/java/de/akquinet/devops/test/ui/view/RepoEditView.java b/src/test/java/de/akquinet/devops/test/ui/view/RepoEditView.java
new file mode 100644
index 00000000..a3365d1c
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/test/ui/view/RepoEditView.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2013 akquinet tech@spree GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.akquinet.devops.test.ui.view;
+
+import java.util.List;
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+/**
+ * class representing the tabs you can access when you edit a repo.
+ *
+ * @author saheba
+ *
+ */
+public class RepoEditView extends GitblitDashboardView {
+
+ public static final String PERMISSION_VIEW_USERS_NAME_PREFIX = "users:";
+ public static final String PERMISSION_VIEW_TEAMS_NAME_PREFIX = "teams:";
+
+ public static final String PERMISSION_VIEW_MUTABLE = "permissionToggleForm:showMutable";
+ public static final String PERMISSION_VIEW_SPECIFIED = "permissionToggleForm:showSpecified";
+ public static final String PERMISSION_VIEW_EFFECTIVE = "permissionToggleForm:showEffective";
+
+ public static final int RESTRICTION_ANONYMOUS_VCP = 0;
+ public static final int RESTRICTION_AUTHENTICATED_P = 1;
+ public static final int RESTRICTION_AUTHENTICATED_CP = 2;
+ public static final int RESTRICTION_AUTHENTICATED_VCP = 3;
+
+ public static final int AUTHCONTROL_RWALL = 0;
+ public static final int AUTHOCONTROL_FINE = 1;
+
+ public RepoEditView(WebDriver driver) {
+ super(driver, null);
+ }
+
+ public void changeName(String newName) {
+ String pathName = "//input[@id = \"name\" ]";
+ WebElement field = getDriver().findElement(By.xpath(pathName));
+ field.clear();
+ field.sendKeys(newName);
+ }
+
+ public boolean navigateToPermissionsTab() {
+ String linkText = "access permissions";
+ List<WebElement> found = getDriver().findElements(
+ By.partialLinkText(linkText));
+ System.out.println("PERM TABS found =" + found.size());
+ if (found != null && found.size() == 1) {
+ found.get(0).click();
+ return true;
+ }
+ return false;
+ }
+
+ private void changeOwners(String action,
+ String affectedSelection, String username) {
+ String xpath = "//select[@name=\"" + affectedSelection
+ + "\"]/option[@value = \"" + username + "\" ]";
+ WebElement option = getDriver().findElement(By.xpath(xpath));
+ option.click();
+ String buttonPath = "//button[@class=\"button " + action + "\"]";
+ WebElement button = getDriver().findElement(By.xpath(buttonPath));
+ button.click();
+ }
+
+ public void removeOwner(String username) {
+ changeOwners("remove", "owners:selection",
+ username);
+ }
+
+ public void addOwner(String username) {
+ changeOwners("add", "owners:choices", username);
+ }
+
+ public WebElement getAccessRestrictionSelection() {
+ String xpath = "//select[@name =\"accessRestriction\"]";
+ List<WebElement> found = getDriver().findElements(By.xpath(xpath));
+ if (found != null && found.size() == 1) {
+ return found.get(0);
+ }
+ return null;
+ }
+
+ public boolean changeAccessRestriction(int option) {
+ WebElement accessRestrictionSelection = getAccessRestrictionSelection();
+ if (accessRestrictionSelection == null) {
+ return false;
+ }
+ accessRestrictionSelection.click();
+ sleep(100);
+ String xpath = "//select[@name =\"accessRestriction\"]/option[@value=\""
+ + option + "\"]";
+ List<WebElement> found = getDriver().findElements(By.xpath(xpath));
+ if (found == null || found.size() == 0 || found.size() > 1) {
+ return false;
+ }
+ found.get(0).click();
+ return true;
+ }
+
+ public boolean changeAuthorizationControl(int option) {
+ System.out.println("try to change auth control");
+ String xpath = "//input[@name =\"authorizationControl\" and @value=\""
+ + option + "\"]";
+ List<WebElement> found = getDriver().findElements(By.xpath(xpath));
+ System.out.println("found auth CONTROL options " + found.size());
+ if (found == null || found.size() == 0 || found.size() > 1) {
+ return false;
+ }
+ found.get(0).click();
+ return true;
+ }
+
+ private boolean isPermissionViewDisabled(String prefix, String view) {
+ String xpath = "//[@name =\"" + prefix + view + "\"]";
+ List<WebElement> found = getDriver().findElements(By.xpath(xpath));
+ if (found == null || found.size() == 0 || found.size() > 1) {
+ return false;
+ }
+ String attrValue = found.get(0).getAttribute("disabled");
+ return (attrValue != null) && (attrValue.equals("disabled"));
+ }
+
+ public boolean isPermissionViewSectionDisabled(String prefix) {
+ return isPermissionViewDisabled(prefix, PERMISSION_VIEW_MUTABLE)
+ && isPermissionViewDisabled(prefix, PERMISSION_VIEW_SPECIFIED)
+ && isPermissionViewDisabled(prefix, PERMISSION_VIEW_EFFECTIVE);
+ }
+
+ public boolean save() {
+ String xpath = "//div[@class=\"form-actions\"]/input[@name =\""
+ + "save" + "\"]";
+ List<WebElement> found = getDriver().findElements(By.xpath(xpath));
+ if (found == null || found.size() == 0 || found.size() > 1) {
+ return false;
+ }
+ found.get(0).click();
+ WebDriverWait webDriverWait = new WebDriverWait(getDriver(), 1);
+ webDriverWait.until(new Exp.RepoListViewLoaded());
+ return true;
+ }
+}
diff --git a/src/test/java/de/akquinet/devops/test/ui/view/RepoListView.java b/src/test/java/de/akquinet/devops/test/ui/view/RepoListView.java
new file mode 100644
index 00000000..6ec6203f
--- /dev/null
+++ b/src/test/java/de/akquinet/devops/test/ui/view/RepoListView.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2013 akquinet tech@spree GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package de.akquinet.devops.test.ui.view;
+
+import java.util.List;
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+/**
+ * class representing the repo list view, which you see e.g. right after you
+ * logged in.
+ *
+ * @author saheba
+ *
+ */
+public class RepoListView extends GitblitDashboardView {
+
+ public RepoListView(WebDriver driver, String baseUrl) {
+ super(driver, baseUrl);
+ }
+
+ public boolean isEmptyRepo(String fullyQualifiedRepoName) {
+ String pathToLink = "//a[@href = \"?" + WICKET_HREF_PAGE_PATH
+ + ".EmptyRepositoryPage&r=" + fullyQualifiedRepoName + "\"]";
+ List<WebElement> found = getDriver().findElements(By.xpath(pathToLink));
+ return found != null && found.size() > 0;
+ }
+
+ private String getEditRepoPath(String fullyQualifiedRepoName) {
+ return "//a[@href =\"?" + WICKET_HREF_PAGE_PATH
+ + ".EditRepositoryPage&r=" + fullyQualifiedRepoName + "\"]";
+ }
+
+ private String getDeleteRepoOnclickIdentifier(
+ String fullyQualifiedRepoPathAndName) {
+ return "var conf = confirm('Delete repository \""
+ + fullyQualifiedRepoPathAndName
+ + "\"?'); if (!conf) return false; ";
+ }
+
+ public boolean navigateToNewRepo(long waitSecToLoad) {
+ String pathToLink = "//a[@href =\"?" + WICKET_HREF_PAGE_PATH
+ + ".EditRepositoryPage\"]";
+ List<WebElement> found = getDriver().findElements(By.xpath(pathToLink));
+ if (found == null || found.size() == 0 || found.size() > 1) {
+ return false;
+ }
+ found.get(0).click();
+ WebDriverWait webDriverWait = new WebDriverWait(getDriver(),
+ waitSecToLoad);
+ webDriverWait.until(new Exp.EditRepoViewLoaded());
+ return true;
+ }
+
+ private boolean checkOrDoEditRepo(String fullyQualifiedRepoName,
+ boolean doEdit) {
+ List<WebElement> found = getDriver().findElements(
+ By.xpath(getEditRepoPath(fullyQualifiedRepoName)));
+ if (found == null || found.size() == 0 || found.size() > 1) {
+ return false;
+ }
+ if (doEdit) {
+ found.get(0).click();
+ }
+ return true;
+ }
+
+ public boolean navigateToEditRepo(String fullyQualifiedRepoName,
+ int waitSecToLoad) {
+ boolean result = checkOrDoEditRepo(fullyQualifiedRepoName, true);
+ WebDriverWait webDriverWait = new WebDriverWait(getDriver(),
+ waitSecToLoad);
+ webDriverWait.until(new Exp.EditRepoViewLoaded());
+ return result;
+ }
+
+ public boolean isEditableRepo(String fullyQualifiedRepoName) {
+ return checkOrDoEditRepo(fullyQualifiedRepoName, false);
+ }
+
+ private boolean checkOrDoDeleteRepo(String fullyQualifiedRepoPathAndName,
+ boolean doDelete) {
+ List<WebElement> found = getDriver().findElements(
+ By.partialLinkText("delete"));
+ String onclickIdentifier = getDeleteRepoOnclickIdentifier(fullyQualifiedRepoPathAndName);
+ WebElement result = null;
+ for (WebElement webElement : found) {
+ if (webElement.getAttribute("onclick") != null
+ && webElement.getAttribute("onclick").equals(
+ onclickIdentifier)) {
+ result = webElement;
+ break;
+ }
+ }
+ System.out.println("result ? " + result);
+ if (result == null) {
+ return false;
+ }
+ if (doDelete) {
+ System.out.println(".............. DO DELETE .... ");
+ result.click();
+ }
+ return true;
+ }
+
+ public boolean isDeletableRepo(String fullyQualifiedRepoPathAndName) {
+ return checkOrDoDeleteRepo(fullyQualifiedRepoPathAndName, false);
+ }
+
+ public boolean navigateToDeleteRepo(String fullyQualifiedRepoPathAndName) {
+ return checkOrDoDeleteRepo(fullyQualifiedRepoPathAndName, true);
+
+ }
+}