Coder Social home page Coder Social logo

fathom's Introduction

Gitblit

Gitblit is an open source, pure Java Git solution for managing, viewing, and serving Git repositories. It can serve repositories over the GIT, HTTP, and SSH transports; it can authenticate against multiple providers; and it allows you to get up-and-running with an attractive, capable Git server in less than 5 minutes.

More information about Gitblit can be found here.

download badge nightly docker badge License

License

Gitblit is distributed under the terms of the Apache Software Foundation license, version 2.0. The text of the license is included in the file LICENSE in the root of the project.

Java Runtime Requirement

Gitblit requires a Java 8 Runtime Environment (JRE) or a Java 8 Development Kit (JDK).

Getting help

Source Location
Documentation Gitblit website
Forums Google Groups
Twitter @gitblit or @jamesmoger

Contributing

GitHub pull requests are preferred. Any contributions must be distributed under the terms of the Apache Software Foundation license, version 2.0.

Please see the CONTRIBUTING file for suggestions and guidelines on contributing to Gitblit. Thank you!

tl;dr

  1. Fork (and then git clone https://github.com/gitblit-org/gitblit.git).
  2. Create a branch (git checkout -b branch_name).
  3. Commit your changes (git commit -a).
  4. Push to the branch (git push origin branch_name).
  5. Open a Pull Request.

Building Gitblit

Gitblit uses submodules. Make sure to clone using --recursive OR to execute git submodule update --init --recursive.

Eclipse is recommended for development as the project settings are preconfigured.

  1. Import the gitblit project into your Eclipse workspace. There will be lots of build errors.
  2. 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.
  3. Select your gitblit project root and Refresh the project, this should correct all build problems.
  4. 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. Execute the com.gitblit.GitBlitServer class to start Gitblit GO.

Building Tips & Tricks

  1. If you are running Ant from an ANSI-capable console, consider setting the MX_COLOR environment variable before executing Ant.
    set MX_COLOR=true
  2. The build script will honor your Maven proxy settings. If you need to fine-tune this, please review the settings.moxie documentation.

fathom's People

Contributors

dependabot[bot] avatar gitblit avatar ziguane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fathom's Issues

Send generated file (pdf) to the client

Hi !

Could you tell me what's wrong with my code (a simplified version) please ?

@path
public class PrintController extends Controller {

@GET("/download")
public void download() throws FileNotFoundException {
	 getResponse().file("myfile.pdf", new FileInputStream("/tmp/pdf3.pdf"));
}

}

Context Path:

Servlet Path:
/download

Path Info:
null

Query String:
null

Stack Trace
ro.pippo.core.PippoRuntimeException: Recursion in error handler
ro.pippo.core.DefaultErrorHandler.checkForRecursion(DefaultErrorHandler.java:312)
ro.pippo.core.DefaultErrorHandler.handle(DefaultErrorHandler.java:172)
ro.pippo.core.route.RouteDispatcher.onRouteDispatch(RouteDispatcher.java:164)
ro.pippo.core.route.RouteDispatcher.dispatch(RouteDispatcher.java:99)
fathom.rest.RestServlet.service(RestServlet.java:89)
com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120)
com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
io.undertow.server.Connectors.executeRootHandler(Connectors.java:207)
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:810)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)

Maven launching arguments

Hello,

I need help with this please
The profile arguments seem to be overriden when the project is launch with maven

mvn clean compile exec:java -Dexec.args="--profile devexec --mode dev"

Some logs below
...
12:06:49.483 [com.erelav.Launcher.main()] INFO fathom.conf.Settings - Runtime profile is 'devexec'
12:06:49.562 [com.erelav.Launcher.main()] DEBUG fathom.conf.Settings - Loaded config 'file:PATH_TO_PROJECT/target/classes/conf/devexec.conf'
12:06:49.567 [com.erelav.Launcher.main()] DEBUG fathom.conf.Settings - Failed to find working directory config file 'PATH_TO_PROJECT/devexec.conf'
1
...
12:06:51.803 [com.erelav.Launcher.main()] INFO fathom.conf.Settings - Runtime profile is 'default'
12:06:51.818 [com.erelav.Launcher.main()] DEBUG fathom.conf.Settings - Loaded config 'file:PATH_TO_PROJECT/target/classes/conf/default.conf'
12:06:51.819 [com.erelav.Launcher.main()] DEBUG fathom.conf.Settings - Failed to find working directory config file 'PATH_TO_PROJECT/default.conf'...

What is the good way ?

suggestion

Hi,
Great project - thank you very much for the time and effort.
Any chance for merging the Pippo controller improvements (declarative stuff and other improvements) back into Pippo.
thanks

Flash messages

Hello,

I'am using Controllers.
What should I do to set a flash message ( error or success ) in java and template sides ?

Thank in advance

Is fathom alive ?

Hi there,

Pippo is still in development but it seems that the last Fathom commit was made about four months ago.
Is Fathom alive ?

Broken accents in submitted String

Hi all,

In my fathom (0.8.4) project, accents in String submitted by forms (POST) are "broken"
ex: retrieve "métier" instead of "métier".

I found the following workaround but it's absolutely not a solution

String name = getRequest().getParameter("name").toString();
byte[] bytes = name.getBytes(StandardCharsets.ISO_8859_1);
name = new String(bytes, StandardCharsets.UTF_8);

Does someone else has already made this observation ?
Is there a place where I can globally force the charset to UTF-8 ?

I already asked a question about it on the Pippo mailing list...

RequireRole annotation

Hi all

Is there a way to require a role OR another using annotation ?

Thank in advance

Log a user in programmatically

Hello,

After a user creation in a Controller, how can I programmatically log the user in, to autorise the visit of a guarded (protected) page ?

ORM Module

Do you have a plan to add support for a ORM (JDBC, JPA, ...)?

Fathom & SQL DB & Hash password / Best practices

Hi all !
I need help...

If I want to store passwords hashs in an SQL database, using a lib like jBCrypt what should I modify in a standard fathom project ?

I tried to implement a FormAuthenticationHandler (good idea ???) but i don't know how to use (smartly) the authenticate instruction (Account account = authenticate(username, password);) with jBCrypt in the method handle.

`@Override
public void handle(Context context) {

    // redirect if already authenticated
    if (isAuthenticated(context)) {
        // touch the session to prolong it's life
        context.touchSession();
        redirectRequest(context);
        return;
    }

    if ("GET".equals(context.getRequestMethod())) {
        // show the form login page

        context.render(AuthConstants.LOGIN_TEMPLATE);

    } else if ("POST".equals(context.getRequestMethod())) {
        // validateCredentials the credentials
        String username = context.getParameter(AuthConstants.USERNAME_PARAMETER).toString();
        String password = context.getParameter(AuthConstants.PASSWORD_PARAMETER).toString();
        boolean rememberMe = context.getParameter(AuthConstants.REMEMBER_ME_PARAMETER).toBoolean(false);


    	
        Account account = authenticate(username, password);

        if (account != null) {
            // Recreate the session to prevent session fixation
            context.recreateSession();

            Cookie c = new Cookie("fsession", username);
            c.setHttpOnly(true);
            c.setMaxAge(-1);
            context.getResponse().cookie(c);

            setupContext(context, account);

            if (rememberMe) {
                // set a cookie
                Cookie cookie = new Cookie(AuthConstants.REMEMBER_ME_COOKIE, username);
                cookie.setHttpOnly(true);
                cookie.setMaxAge((int) TimeUnit.DAYS.toSeconds(365));
                context.getResponse().cookie(cookie);
            }

            // redirect to the original destination or to the root
            redirectRequest(context);

        } else {
            // authentication failed, set the error message and redirect to *self*
            String message = messages.getWithDefault("fathom.invalidCredentials", "Invalid Credentials", context);
            context.flashError(message);
            context.redirect(context.getRequestUri());
        }

    } else {
        // unsupported http method
        throw new StatusCodeException(405, "Only GET and POST are supported!");
    }

}`

Thank in advance !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.