mirror of
https://github.com/gitpitch/gitpitch.git
synced 2024-04-18 07:30:55 +08:00
70c62f63d7
- 2.0 Menus: Home, Git, Themes, TOC - 2.0 TOC with @title markdown shortcut - 2.0 Notifications Bar - 2.0 Introduction Presentation - Refactored CSS style dependencies as frags - Refactored Code and GIST services - GIST support extended across all GRS - Updated OfflineService implementation - Updated GRS matching by TYPE - New 404 page-not-found page
75 lines
3.2 KiB
Java
75 lines
3.2 KiB
Java
/*
|
|
* MIT License
|
|
*
|
|
* Copyright (c) 2016 David Russell
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*/
|
|
|
|
import com.gitpitch.factory.MarkdownModelFactory;
|
|
import com.gitpitch.git.*;
|
|
import com.gitpitch.git.vendors.*;
|
|
import com.gitpitch.models.Markdown;
|
|
import com.gitpitch.models.MarkdownModel;
|
|
import com.gitpitch.services.*;
|
|
import com.gitpitch.policies.CacheTimeout;
|
|
import com.gitpitch.policies.Dependencies;
|
|
import com.gitpitch.executors.FrontEndThreads;
|
|
import com.gitpitch.executors.BackEndThreads;
|
|
import com.google.inject.AbstractModule;
|
|
import com.google.inject.assistedinject.FactoryModuleBuilder;
|
|
|
|
/*
|
|
* Guice DI injection dependencies for the GitPitch server.
|
|
*/
|
|
public class Module extends AbstractModule {
|
|
|
|
@Override
|
|
public void configure() {
|
|
bind(DiskService.class).asEagerSingleton();
|
|
bind(GitService.class).asEagerSingleton();
|
|
bind(PitchService.class).asEagerSingleton();
|
|
bind(PrintService.class).asEagerSingleton();
|
|
bind(OfflineService.class).asEagerSingleton();
|
|
bind(ShellService.class).asEagerSingleton();
|
|
bind(ImageService.class).asEagerSingleton();
|
|
bind(VideoService.class).asEagerSingleton();
|
|
bind(GISTService.class).asEagerSingleton();
|
|
bind(CodeService.class).asEagerSingleton();
|
|
bind(SlideService.class).asEagerSingleton();
|
|
bind(ShortcutsService.class).asEagerSingleton();
|
|
bind(WebService.class).asEagerSingleton();
|
|
bind(ComposableService.class).asEagerSingleton();
|
|
bind(GRSManager.class).asEagerSingleton();
|
|
bind(GitHub.class).asEagerSingleton();
|
|
bind(GitLab.class).asEagerSingleton();
|
|
bind(BitBucket.class).asEagerSingleton();
|
|
bind(Gitea.class).asEagerSingleton();
|
|
bind(Gogs.class).asEagerSingleton();
|
|
bind(GitBucket.class).asEagerSingleton();
|
|
bind(FrontEndThreads.class).asEagerSingleton();
|
|
bind(BackEndThreads.class).asEagerSingleton();
|
|
bind(Dependencies.class).asEagerSingleton();
|
|
bind(CacheTimeout.class).asEagerSingleton();
|
|
install(new FactoryModuleBuilder().implement(Markdown.class, MarkdownModel.class)
|
|
.build(MarkdownModelFactory.class));
|
|
}
|
|
|
|
}
|