├── dropwizard-core └── src │ ├── test │ ├── resources │ │ ├── empty.yml │ │ ├── json │ │ │ └── string.json │ │ ├── yaml │ │ │ ├── string.yml │ │ │ ├── gzip.yml │ │ │ ├── requestLog.yml │ │ │ └── http.yml │ │ ├── factory-test-malformed.yml │ │ ├── factory-test-invalid.yml │ │ ├── factory-test-valid.yml │ │ └── logging.yml │ └── java │ │ └── com │ │ └── yammer │ │ └── dropwizard │ │ ├── util │ │ └── tests │ │ │ ├── JarLocationTest.java │ │ │ └── ServletsTest.java │ │ ├── tasks │ │ └── tests │ │ │ ├── TaskTest.java │ │ │ └── GarbageCollectionTaskTest.java │ │ ├── config │ │ └── tests │ │ │ ├── RequestLogConfigurationTest.java │ │ │ ├── ConfigurationExceptionTest.java │ │ │ ├── ConfigurationTest.java │ │ │ ├── GzipConfigurationTest.java │ │ │ ├── FilterConfigurationTest.java │ │ │ └── ServletConfigurationTest.java │ │ ├── jetty │ │ └── tests │ │ │ ├── JettyManagedTest.java │ │ │ └── NonblockingServletHolderTest.java │ │ ├── jersey │ │ └── params │ │ │ └── tests │ │ │ ├── IntParamTest.java │ │ │ └── LongParamTest.java │ │ ├── cli │ │ └── tests │ │ │ ├── ConfiguredCommandTest.java │ │ │ └── CommandTest.java │ │ ├── bundles │ │ └── tests │ │ │ └── JavaBundleTest.java │ │ ├── validation │ │ └── tests │ │ │ ├── MethodValidatorTest.java │ │ │ └── ValidatorTest.java │ │ ├── servlets │ │ └── tests │ │ │ └── CacheBustingFilterTest.java │ │ └── tests │ │ └── ServiceTest.java │ └── main │ └── java │ └── com │ └── yammer │ └── dropwizard │ ├── Bundle.java │ ├── jersey │ ├── caching │ │ ├── CacheControlledResourceMethodDispatchAdapter.java │ │ ├── CacheControlledRequestDispatcher.java │ │ └── CacheControlledResourceMethodDispatchProvider.java │ ├── params │ │ ├── LongParam.java │ │ ├── IntParam.java │ │ └── BooleanParam.java │ ├── DropwizardResourceConfig.java │ ├── OptionalExtractor.java │ ├── OptionalQueryParamInjectableProvider.java │ ├── MultivaluedParameterExtractorQueryParamInjectable.java │ └── LoggingExceptionMapper.java │ ├── validation │ ├── MethodValidator.java │ ├── ValidationMethod.java │ └── Validator.java │ ├── ConfiguredBundle.java │ ├── json │ ├── JsonSnakeCase.java │ └── LogbackModule.java │ ├── logging │ ├── SyslogFormatter.java │ ├── LogFormatter.java │ └── LoggingBean.java │ ├── lifecycle │ ├── Managed.java │ └── ExecutorServiceManager.java │ ├── util │ ├── Servlets.java │ └── JarLocation.java │ ├── config │ ├── SslConfiguration.java │ ├── ConfigurationException.java │ ├── RequestLogConfiguration.java │ ├── GzipConfiguration.java │ └── Configuration.java │ ├── jetty │ ├── JettyManaged.java │ └── NonblockingServletHolder.java │ ├── bundles │ └── JavaBundle.java │ ├── servlets │ ├── CacheBustingFilter.java │ ├── ThreadNameFilter.java │ └── SlowRequestFilter.java │ ├── tasks │ ├── Task.java │ └── GarbageCollectionTask.java │ ├── Service.java │ └── cli │ └── UsagePrinter.java ├── dropwizard-testing ├── src │ ├── test │ │ ├── resources │ │ │ └── fixtures │ │ │ │ ├── fixture.txt │ │ │ │ └── person.json │ │ └── java │ │ │ └── com │ │ │ └── yammer │ │ │ └── dropwizard │ │ │ └── testing │ │ │ └── tests │ │ │ ├── service │ │ │ ├── PeopleStore.java │ │ │ ├── PersonResource.java │ │ │ └── PersonResourceTest.java │ │ │ ├── FixtureHelpersTest.java │ │ │ ├── JsonHelpersTest.java │ │ │ └── Person.java │ └── main │ │ └── java │ │ └── com │ │ └── yammer │ │ └── dropwizard │ │ └── testing │ │ └── FixtureHelpers.java └── pom.xml ├── dropwizard-views ├── src │ ├── test │ │ ├── resources │ │ │ ├── example.yml │ │ │ ├── example.ftl │ │ │ ├── com │ │ │ │ └── yammer │ │ │ │ │ └── dropwizard │ │ │ │ │ └── views │ │ │ │ │ └── yay.ftl │ │ │ ├── hello-world.ftl │ │ │ └── hello-world_fr.ftl │ │ └── java │ │ │ └── com │ │ │ └── yammer │ │ │ └── dropwizard │ │ │ └── views │ │ │ ├── MyOtherView.java │ │ │ ├── example │ │ │ ├── BadView.java │ │ │ ├── BadResource.java │ │ │ ├── Person.java │ │ │ ├── HelloWorldResource.java │ │ │ ├── HelloWorldView.java │ │ │ ├── AnotherResource.java │ │ │ └── TemplateService.java │ │ │ ├── MyView.java │ │ │ └── tests │ │ │ ├── ViewTest.java │ │ │ └── ViewBundleTest.java │ └── main │ │ └── java │ │ └── com │ │ └── yammer │ │ └── dropwizard │ │ └── views │ │ ├── View.java │ │ └── ViewBundle.java └── pom.xml ├── docs ├── dropwizard-hat.eps └── source │ ├── dropwizard-logo.png │ ├── _static │ └── dropwizard-hat.png │ ├── about │ ├── todos.rst │ ├── index.rst │ ├── faq.rst │ └── contributors.rst │ ├── _themes │ └── yammerdoc │ │ ├── less │ │ ├── grid.less │ │ ├── utilities.less │ │ ├── component-animations.less │ │ ├── patterns.less │ │ ├── close.less │ │ ├── wells.less │ │ ├── hero-unit.less │ │ ├── print.less │ │ ├── layouts.less │ │ ├── labels.less │ │ ├── breadcrumbs.less │ │ ├── pager.less │ │ ├── accordion.less │ │ ├── scaffolding.less │ │ ├── thumbnails.less │ │ ├── tooltip.less │ │ ├── code.less │ │ ├── pagination.less │ │ ├── popovers.less │ │ ├── alerts.less │ │ ├── bootstrap.less │ │ ├── modals.less │ │ └── progress-bars.less │ │ ├── page.html │ │ ├── theme.conf │ │ ├── search.html │ │ └── genindex.html │ ├── manual │ ├── index.rst │ └── scala.rst │ └── index.rst ├── dropwizard-example ├── src │ └── main │ │ ├── resources │ │ ├── assets │ │ │ └── example.txt │ │ ├── banner.txt │ │ └── com │ │ │ └── example │ │ │ └── helloworld │ │ │ └── db │ │ │ └── PeopleDAO.sql.stg │ │ └── java │ │ └── com │ │ └── example │ │ └── helloworld │ │ ├── core │ │ ├── User.java │ │ ├── Saying.java │ │ ├── Template.java │ │ └── Person.java │ │ ├── resources │ │ ├── ProtectedResource.java │ │ ├── PersonResource.java │ │ ├── PeopleResource.java │ │ └── HelloWorldResource.java │ │ ├── health │ │ └── TemplateHealthCheck.java │ │ ├── auth │ │ └── ExampleAuthenticator.java │ │ ├── db │ │ └── PeopleDAO.java │ │ ├── HelloWorldConfiguration.java │ │ └── cli │ │ ├── SetupDatabaseCommand.java │ │ └── RenderCommand.java ├── example.keystore └── README.md ├── NOTICE ├── .gitignore ├── dropwizard-scala_2.9.1 └── src │ ├── main │ ├── scala │ │ └── com │ │ │ └── yammer │ │ │ └── dropwizard │ │ │ ├── Logging.scala │ │ │ └── ScalaService.scala │ └── java │ │ └── com │ │ └── yammer │ │ └── dropwizard │ │ └── bundles │ │ └── ScalaBundle.java │ └── test │ ├── scala │ └── com │ │ └── yammer │ │ └── dropwizard │ │ └── examples │ │ ├── SayingFactory.scala │ │ ├── DumbHealthCheck.scala │ │ ├── ExampleConfiguration.scala │ │ ├── UploadResource.scala │ │ ├── HelloWorldResource.scala │ │ ├── StartableObject.scala │ │ ├── ExampleService.scala │ │ ├── SplodyResource.scala │ │ ├── SayCommand.scala │ │ └── SplodyCommand.scala │ └── resources │ └── banner.txt ├── dropwizard-auth ├── src │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── yammer │ │ │ └── dropwizard │ │ │ └── auth │ │ │ ├── Auth.java │ │ │ ├── AuthenticationException.java │ │ │ ├── Authenticator.java │ │ │ ├── oauth │ │ │ └── OAuthProvider.java │ │ │ └── basic │ │ │ ├── BasicAuthProvider.java │ │ │ └── BasicCredentials.java │ └── test │ │ └── java │ │ └── com │ │ └── yammer │ │ └── dropwizard │ │ └── auth │ │ ├── User.java │ │ ├── oauth │ │ └── tests │ │ │ └── OAuthProviderTest.java │ │ └── basic │ │ └── tests │ │ ├── BasicAuthProviderTest.java │ │ └── BasicCredentialsTest.java └── pom.xml ├── dropwizard-db ├── src │ ├── main │ │ └── java │ │ │ └── com │ │ │ └── yammer │ │ │ └── dropwizard │ │ │ ├── db │ │ │ ├── DatabaseHealthCheck.java │ │ │ ├── args │ │ │ │ ├── OptionalArgumentFactory.java │ │ │ │ └── OptionalArgument.java │ │ │ ├── ImmutableListContainerFactory.java │ │ │ ├── NamePrependingStatementRewriter.java │ │ │ ├── logging │ │ │ │ └── LogbackLog.java │ │ │ └── Database.java │ │ │ ├── bundles │ │ │ └── DBIExceptionsBundle.java │ │ │ └── jersey │ │ │ ├── LoggingSQLExceptionMapper.java │ │ │ └── LoggingDBIExceptionMapper.java │ └── test │ │ └── java │ │ └── com │ │ └── yammer │ │ └── dropwizard │ │ └── db │ │ └── tests │ │ └── PersonDAO.java └── pom.xml ├── README.md ├── dropwizard-client ├── src │ └── main │ │ └── java │ │ └── com │ │ └── yammer │ │ └── dropwizard │ │ └── client │ │ ├── JerseyClient.java │ │ ├── JerseyClientConfiguration.java │ │ ├── JerseyClientFactory.java │ │ └── HttpClientConfiguration.java └── pom.xml └── findbugs-exclude.xml /dropwizard-core/src/test/resources/empty.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dropwizard-core/src/test/resources/json/string.json: -------------------------------------------------------------------------------- 1 | "a string" 2 | -------------------------------------------------------------------------------- /dropwizard-core/src/test/resources/yaml/string.yml: -------------------------------------------------------------------------------- 1 | "a string" 2 | -------------------------------------------------------------------------------- /dropwizard-core/src/test/resources/factory-test-malformed.yml: -------------------------------------------------------------------------------- 1 | j&&&& 2 | -------------------------------------------------------------------------------- /dropwizard-testing/src/test/resources/fixtures/fixture.txt: -------------------------------------------------------------------------------- 1 | YAY FOR ME 2 | -------------------------------------------------------------------------------- /dropwizard-core/src/test/resources/factory-test-invalid.yml: -------------------------------------------------------------------------------- 1 | name: Boop 2 | -------------------------------------------------------------------------------- /dropwizard-core/src/test/resources/factory-test-valid.yml: -------------------------------------------------------------------------------- 1 | name: Coda Hale 2 | -------------------------------------------------------------------------------- /dropwizard-views/src/test/resources/example.yml: -------------------------------------------------------------------------------- 1 | http: 2 | shutdownGracePeriod: 0s 3 | -------------------------------------------------------------------------------- /docs/dropwizard-hat.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3x/dropwizard/master/docs/dropwizard-hat.eps -------------------------------------------------------------------------------- /dropwizard-example/src/main/resources/assets/example.txt: -------------------------------------------------------------------------------- 1 | Hello, I'm an example static asset file. 2 | -------------------------------------------------------------------------------- /docs/source/dropwizard-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3x/dropwizard/master/docs/source/dropwizard-logo.png -------------------------------------------------------------------------------- /dropwizard-example/example.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3x/dropwizard/master/dropwizard-example/example.keystore -------------------------------------------------------------------------------- /docs/source/_static/dropwizard-hat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3x/dropwizard/master/docs/source/_static/dropwizard-hat.png -------------------------------------------------------------------------------- /dropwizard-testing/src/test/resources/fixtures/person.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Coda", 3 | "email": "coda@example.com" 4 | } 5 | -------------------------------------------------------------------------------- /docs/source/about/todos.rst: -------------------------------------------------------------------------------- 1 | .. _about-todos: 2 | 3 | ################### 4 | Documentation TODOs 5 | ################### 6 | 7 | .. todolist:: 8 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Dropwizard 2 | Copyright 2011-2012 Coda Hale and Yammer, Inc. 3 | 4 | This product includes software developed by Coda Hale and Yammer, Inc. 5 | -------------------------------------------------------------------------------- /dropwizard-views/src/test/resources/example.ftl: -------------------------------------------------------------------------------- 1 | <#-- @ftlvariable name="" type="com.yammer.dropwizard.views.MyView" --> 2 | Woop woop. ${name?html} 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | target 3 | atlassian-ide-plugin.xml 4 | logs 5 | *.iml 6 | *.ipr 7 | #Eclipse-specific 8 | .settings/ 9 | .classpath 10 | .project -------------------------------------------------------------------------------- /dropwizard-views/src/test/resources/com/yammer/dropwizard/views/yay.ftl: -------------------------------------------------------------------------------- 1 | <#-- @ftlvariable name="" type="com.yammer.dropwizard.views.MyOtherView" --> 2 | Ok. 3 | -------------------------------------------------------------------------------- /dropwizard-core/src/test/resources/yaml/gzip.yml: -------------------------------------------------------------------------------- 1 | enabled: false 2 | minimumEntitySize: 12KB 3 | bufferSize: 32KB 4 | excludedUserAgents: ["IE"] 5 | compressedMimeTypes: ["text/plain"] 6 | -------------------------------------------------------------------------------- /dropwizard-core/src/test/resources/yaml/requestLog.yml: -------------------------------------------------------------------------------- 1 | enabled: true 2 | currentLogFilename: "/var/log/dingo/dingo.log" 3 | archivedLogFilenamePattern: "/var/log/dingo/dingo-%d.log.zip" 4 | archivedFileCount: 5 5 | -------------------------------------------------------------------------------- /dropwizard-scala_2.9.1/src/main/scala/com/yammer/dropwizard/Logging.scala: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard 2 | 3 | import logging.Log 4 | 5 | trait Logging { 6 | protected lazy val log: Log = Log.forClass(getClass) 7 | } 8 | -------------------------------------------------------------------------------- /dropwizard-views/src/test/java/com/yammer/dropwizard/views/MyOtherView.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.views; 2 | 3 | public class MyOtherView extends View { 4 | public MyOtherView() { 5 | super("yay.ftl"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /docs/source/about/index.rst: -------------------------------------------------------------------------------- 1 | .. title:: About 2 | 3 | .. _about: 4 | 5 | ################ 6 | About Dropwizard 7 | ################ 8 | 9 | .. toctree:: 10 | 11 | contributors 12 | faq 13 | release-notes 14 | todos 15 | -------------------------------------------------------------------------------- /dropwizard-scala_2.9.1/src/test/scala/com/yammer/dropwizard/examples/SayingFactory.scala: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.examples 2 | 3 | object SayingFactory { 4 | def buildSaying(implicit config: ExampleConfiguration) = config.saying 5 | } 6 | -------------------------------------------------------------------------------- /dropwizard-testing/src/test/java/com/yammer/dropwizard/testing/tests/service/PeopleStore.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.testing.tests.service; 2 | 3 | import com.yammer.dropwizard.testing.tests.Person; 4 | 5 | public interface PeopleStore { 6 | Person fetchPerson(String name); 7 | } 8 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/less/grid.less: -------------------------------------------------------------------------------- 1 | // GRID SYSTEM 2 | // ----------- 3 | 4 | // Fixed (940px) 5 | #gridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth); 6 | 7 | // Fluid (940px) 8 | #fluidGridSystem > .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth); 9 | -------------------------------------------------------------------------------- /dropwizard-views/src/test/java/com/yammer/dropwizard/views/example/BadView.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.views.example; 2 | 3 | import com.yammer.dropwizard.views.View; 4 | 5 | public class BadView extends View { 6 | public BadView() { 7 | super("/woo-oo-ahh.txt"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /dropwizard-scala_2.9.1/src/test/scala/com/yammer/dropwizard/examples/DumbHealthCheck.scala: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.examples 2 | 3 | import com.yammer.metrics.core.HealthCheck 4 | import com.yammer.metrics.core.HealthCheck.Result 5 | 6 | class DumbHealthCheck extends HealthCheck("dumb") { 7 | def check = Result.healthy 8 | } 9 | -------------------------------------------------------------------------------- /dropwizard-example/src/main/java/com/example/helloworld/core/User.java: -------------------------------------------------------------------------------- 1 | package com.example.helloworld.core; 2 | 3 | public class User { 4 | private final String name; 5 | 6 | public User(String name) { 7 | this.name = name; 8 | } 9 | 10 | public String getName() { 11 | return name; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dropwizard-views/src/test/java/com/yammer/dropwizard/views/example/BadResource.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.views.example; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | 6 | @Path("/bad") 7 | public class BadResource { 8 | @GET 9 | public BadView messUp() { 10 | return new BadView(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /dropwizard-views/src/test/java/com/yammer/dropwizard/views/example/Person.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.views.example; 2 | 3 | public class Person { 4 | private final String name; 5 | 6 | public Person(String name) { 7 | this.name = name; 8 | } 9 | 10 | public String getName() { 11 | return name; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/page.html: -------------------------------------------------------------------------------- 1 | {# 2 | basic/page.html 3 | ~~~~~~~~~~~~~~~ 4 | 5 | Master template for simple pages. 6 | 7 | :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | #} 10 | {% extends "layout.html" %} 11 | {% block body %} 12 | {{ body }} 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /dropwizard-views/src/test/resources/hello-world.ftl: -------------------------------------------------------------------------------- 1 | <#-- @ftlvariable name="" type="com.yammer.dropwizard.views.example.HelloWorldView" --> 2 | 3 | 4 |
5 |Hello, ${person.name?html}!
11 | 12 |How's it going?
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /dropwizard-scala_2.9.1/src/test/scala/com/yammer/dropwizard/examples/ExampleConfiguration.scala: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.examples 2 | 3 | import com.yammer.dropwizard.config.Configuration 4 | import org.codehaus.jackson.annotate.JsonProperty 5 | 6 | class ExampleConfiguration extends Configuration { 7 | @JsonProperty 8 | var saying: String = "Hello, world!" 9 | } 10 | -------------------------------------------------------------------------------- /dropwizard-views/src/test/resources/hello-world_fr.ftl: -------------------------------------------------------------------------------- 1 | <#-- @ftlvariable name="" type="com.yammer.dropwizard.views.example.HelloWorldView" --> 2 | 3 | 4 | 5 |Bonjour, ${person.name?html}!
11 | 12 |Comment ça va?
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /dropwizard-views/src/test/java/com/yammer/dropwizard/views/MyView.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.views; 2 | 3 | public class MyView extends View { 4 | private final String name; 5 | 6 | public MyView(String name) { 7 | super("/example.ftl"); 8 | this.name = name; 9 | } 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/less/utilities.less: -------------------------------------------------------------------------------- 1 | // UTILITY CLASSES 2 | // --------------- 3 | 4 | // Quick floats 5 | .pull-right { 6 | float: right; 7 | } 8 | .pull-left { 9 | float: left; 10 | } 11 | 12 | // Toggling content 13 | .hide { 14 | display: none; 15 | } 16 | .show { 17 | display: block; 18 | } 19 | 20 | // Visibility 21 | .invisible { 22 | visibility: hidden; 23 | } 24 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/less/component-animations.less: -------------------------------------------------------------------------------- 1 | // COMPONENT ANIMATIONS 2 | // -------------------- 3 | 4 | .fade { 5 | .transition(opacity .15s linear); 6 | opacity: 0; 7 | &.in { 8 | opacity: 1; 9 | } 10 | } 11 | 12 | .collapse { 13 | .transition(height .35s ease); 14 | position:relative; 15 | overflow:hidden; 16 | height: 0; 17 | &.in { height: auto; } 18 | } 19 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/less/patterns.less: -------------------------------------------------------------------------------- 1 | // Patterns.less 2 | // Repeatable UI elements outside the base styles provided from the scaffolding 3 | // ---------------------------------------------------------------------------- 4 | 5 | 6 | // PAGE HEADERS 7 | // ------------ 8 | 9 | footer { 10 | padding-top: @baseLineHeight - 1; 11 | margin-top: @baseLineHeight - 1; 12 | border-top: 1px solid #eee; 13 | } 14 | -------------------------------------------------------------------------------- /dropwizard-core/src/test/resources/logging.yml: -------------------------------------------------------------------------------- 1 | level: INFO 2 | loggers: 3 | com.example.app: DEBUG 4 | console: 5 | enabled: true 6 | threshold: ALL 7 | file: 8 | enabled: false 9 | threshold: ALL 10 | currentLogFilename: ./logs/example.log 11 | archivedLogFilenamePattern: ./logs/example-%d.log.gz 12 | archivedFileCount: 5 13 | syslog: 14 | enabled: false 15 | host: localhost 16 | facility: local0 17 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/less/close.less: -------------------------------------------------------------------------------- 1 | // CLOSE ICONS 2 | // ----------- 3 | 4 | .close { 5 | float: right; 6 | font-size: 20px; 7 | font-weight: bold; 8 | line-height: @baseLineHeight; 9 | color: @black; 10 | text-shadow: 0 1px 0 rgba(255,255,255,1); 11 | .opacity(20); 12 | &:hover { 13 | color: @black; 14 | text-decoration: none; 15 | .opacity(40); 16 | cursor: pointer; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/less/wells.less: -------------------------------------------------------------------------------- 1 | // WELLS 2 | // ----- 3 | 4 | .well { 5 | min-height: 20px; 6 | padding: 19px; 7 | margin-bottom: 20px; 8 | background-color: #f5f5f5; 9 | border: 1px solid #eee; 10 | border: 1px solid rgba(0,0,0,.05); 11 | .border-radius(4px); 12 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 13 | blockquote { 14 | border-color: #ddd; 15 | border-color: rgba(0,0,0,.15); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/less/hero-unit.less: -------------------------------------------------------------------------------- 1 | // HERO UNIT 2 | // --------- 3 | 4 | .hero-unit { 5 | padding: 60px; 6 | margin-bottom: 30px; 7 | background-color: #f5f5f5; 8 | .border-radius(6px); 9 | h1 { 10 | margin-bottom: 0; 11 | font-size: 60px; 12 | line-height: 1; 13 | letter-spacing: -1px; 14 | } 15 | p { 16 | font-size: 18px; 17 | font-weight: 200; 18 | line-height: @baseLineHeight * 1.5; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/less/print.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap @VERSION for Print 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | * Date: @DATE 10 | */ 11 | 12 | 13 | // HIDE UNECESSARY COMPONENTS 14 | // -------------------------- 15 | 16 | .navbar-fixed { 17 | display: none; 18 | } -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/less/layouts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Layouts 3 | // Fixed-width and fluid (with sidebar) layouts 4 | // -------------------------------------------- 5 | 6 | 7 | // Container (centered, fixed-width layouts) 8 | .container { 9 | .container-fixed(); 10 | } 11 | 12 | // Fluid layouts (left aligned, with sidebar, min- & max-width content) 13 | .container-fluid { 14 | padding-left: @gridGutterWidth; 15 | padding-right: @gridGutterWidth; 16 | .clearfix(); 17 | } -------------------------------------------------------------------------------- /dropwizard-views/src/test/java/com/yammer/dropwizard/views/example/HelloWorldResource.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.views.example; 2 | 3 | import javax.ws.rs.*; 4 | import javax.ws.rs.core.MediaType; 5 | 6 | @Path("/hello") 7 | @Produces(MediaType.TEXT_HTML) 8 | public class HelloWorldResource { 9 | @GET 10 | public HelloWorldView show(@QueryParam("name") @DefaultValue("Stranger") String name) { 11 | return new HelloWorldView(new Person(name)); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dropwizard-example/src/main/java/com/example/helloworld/core/Saying.java: -------------------------------------------------------------------------------- 1 | package com.example.helloworld.core; 2 | 3 | public class Saying { 4 | private final long id; 5 | private final String content; 6 | 7 | public Saying(long id, String content) { 8 | this.id = id; 9 | this.content = content; 10 | } 11 | 12 | public long getId() { 13 | return id; 14 | } 15 | 16 | public String getContent() { 17 | return content; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /dropwizard-views/src/test/java/com/yammer/dropwizard/views/example/HelloWorldView.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.views.example; 2 | 3 | import com.yammer.dropwizard.views.View; 4 | 5 | public class HelloWorldView extends View { 6 | private final Person person; 7 | 8 | public HelloWorldView(Person person) { 9 | super("/hello-world.ftl"); 10 | this.person = person; 11 | } 12 | 13 | public Person getPerson() { 14 | return person; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /dropwizard-core/src/main/java/com/yammer/dropwizard/Bundle.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard; 2 | 3 | import com.yammer.dropwizard.config.Environment; 4 | 5 | /** 6 | * A reusable bundle of functionality, used to define blocks of service behavior. 7 | */ 8 | public interface Bundle { 9 | /** 10 | * Initializes the environment. 11 | * 12 | * @param environment the service's {@link Environment} 13 | */ 14 | public void initialize(Environment environment); 15 | } 16 | -------------------------------------------------------------------------------- /dropwizard-scala_2.9.1/src/test/resources/banner.txt: -------------------------------------------------------------------------------- 1 | dP 2 | 88 3 | .d8888b. dP. .dP .d8888b. 88d8b.d8b. 88d888b. 88 .d8888b. 4 | 88ooood8 `8bd8' 88' `88 88'`88'`88 88' `88 88 88ooood8 5 | 88. ... .d88b. 88. .88 88 88 88 88. .88 88 88. ... 6 | `88888P' dP' `dP `88888P8 dP dP dP 88Y888P' dP `88888P' 7 | 88 8 | dP 9 | -------------------------------------------------------------------------------- /dropwizard-auth/src/main/java/com/yammer/dropwizard/auth/Auth.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.auth; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * This annotation is used to inject authenticated principal objects into protected JAX-RS resource 7 | * methods. 8 | * 9 | * @see Authenticator 10 | */ 11 | @Documented 12 | @Retention(RetentionPolicy.RUNTIME) 13 | @Target({ ElementType.PARAMETER, ElementType.FIELD }) 14 | public @interface Auth { 15 | boolean required() default true; 16 | } 17 | -------------------------------------------------------------------------------- /dropwizard-example/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | web-scale hello world dP for the web 2 | 88 3 | .d8888b. dP. .dP .d8888b. 88d8b.d8b. 88d888b. 88 .d8888b. 4 | 88ooood8 `8bd8' 88' `88 88'`88'`88 88' `88 88 88ooood8 5 | 88. ... .d88b. 88. .88 88 88 88 88. .88 88 88. ... 6 | `88888P' dP' `dP `88888P8 dP dP dP 88Y888P' dP `88888P' 7 | 88 8 | dP 9 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = none 3 | stylesheet = yammerdoc.css 4 | pygments_style = trac 5 | 6 | [options] 7 | tagline = Your tagline here. 8 | gradient_start = #9b4853 9 | gradient_end = #5f0c17 10 | gradient_text = #ffffff 11 | gradient_bg = #7D2A35 12 | gradient_shadow = #fff 13 | landing_logo = logo.png 14 | landing_logo_width = 150px 15 | github_page = https://github.com/yay 16 | mailing_list = http://groups.google.com/yay 17 | maven_site = http://example.com/maven/yay 18 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/less/labels.less: -------------------------------------------------------------------------------- 1 | // LABELS 2 | // ------ 3 | 4 | .label { 5 | padding: 1px 3px 2px; 6 | font-size: @baseFontSize * .75; 7 | font-weight: bold; 8 | color: @white; 9 | text-transform: uppercase; 10 | background-color: @grayLight; 11 | .border-radius(3px); 12 | } 13 | .label-important { background-color: @errorText; } 14 | .label-warning { background-color: @orange; } 15 | .label-success { background-color: @successText; } 16 | .label-info { background-color: @infoText; } 17 | -------------------------------------------------------------------------------- /dropwizard-example/src/main/resources/com/example/helloworld/db/PeopleDAO.sql.stg: -------------------------------------------------------------------------------- 1 | group PeopleDAO; 2 | 3 | createPeopleTable() ::= << 4 | create table people (id Serial primary key, fullName varchar(255), jobTitle varchar(100)) 5 | >> 6 | 7 | findById() ::= << 8 | select id, fullName, jobTitle from people where id = :id 9 | >> 10 | 11 | create() ::= << 12 | insert into people (fullName, jobTitle) values (:fullName, :jobTitle) 13 | >> 14 | 15 | findAll() ::= << 16 | select id, fullName, jobTitle from people 17 | >> -------------------------------------------------------------------------------- /dropwizard-views/src/test/java/com/yammer/dropwizard/views/example/AnotherResource.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.views.example; 2 | 3 | import com.yammer.dropwizard.views.MyOtherView; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.Produces; 8 | import javax.ws.rs.core.MediaType; 9 | 10 | @Path("/yay") 11 | @Produces(MediaType.TEXT_HTML) 12 | public class AnotherResource { 13 | @GET 14 | public MyOtherView performYay() { 15 | return new MyOtherView(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /dropwizard-scala_2.9.1/src/test/scala/com/yammer/dropwizard/examples/UploadResource.scala: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.examples 2 | 3 | import javax.ws.rs.core.MediaType 4 | import javax.ws.rs.{POST, Consumes, Path} 5 | import com.yammer.dropwizard.Logging 6 | import com.yammer.metrics.annotation.Timed 7 | 8 | @Path("/upload") 9 | @Consumes(Array(MediaType.WILDCARD)) 10 | class UploadResource extends Logging { 11 | @POST 12 | @Timed 13 | def upload(body: String) { 14 | log.info("New upload: %s", body) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /docs/source/_themes/yammerdoc/less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // BREADCRUMBS 2 | // ----------- 3 | 4 | .breadcrumb { 5 | padding: 7px 14px; 6 | margin: 0 0 @baseLineHeight; 7 | #gradient > .vertical(@white, #f5f5f5); 8 | border: 1px solid #ddd; 9 | .border-radius(3px); 10 | .box-shadow(inset 0 1px 0 @white); 11 | li { 12 | display: inline; 13 | text-shadow: 0 1px 0 @white; 14 | } 15 | .divider { 16 | padding: 0 5px; 17 | color: @grayLight; 18 | } 19 | .active a { 20 | color: @grayDark; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /docs/source/manual/index.rst: -------------------------------------------------------------------------------- 1 | .. _manual-index: 2 | 3 | ########### 4 | User Manual 5 | ########### 6 | 7 | .. rubric:: This goal of this document is to provide you with all the information required to build, 8 | organize, test, deploy, and maintain Dropwizard-based services. If you're new to 9 | Dropwizard, you should read the :ref:`getting-started` guide first. 10 | 11 | .. toctree:: 12 | :maxdepth: 1 13 | 14 | core 15 | client 16 | db 17 | auth 18 | views 19 | scala 20 | testing 21 | -------------------------------------------------------------------------------- /dropwizard-core/src/test/java/com/yammer/dropwizard/util/tests/JarLocationTest.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.util.tests; 2 | 3 | import com.yammer.dropwizard.util.JarLocation; 4 | import org.junit.Test; 5 | 6 | import static org.hamcrest.Matchers.is; 7 | import static org.junit.Assert.assertThat; 8 | 9 | public class JarLocationTest { 10 | @Test 11 | public void isHumanReadable() throws Exception { 12 | assertThat(new JarLocation(JarLocationTest.class).toString(), 13 | is("project.jar")); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dropwizard-views/src/test/java/com/yammer/dropwizard/views/tests/ViewTest.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.views.tests; 2 | 3 | import com.yammer.dropwizard.views.MyView; 4 | import org.junit.Test; 5 | 6 | import static org.hamcrest.Matchers.*; 7 | import static org.junit.Assert.*; 8 | 9 | public class ViewTest { 10 | private final MyView view = new MyView("Wonk"); 11 | 12 | @Test 13 | public void hasATemplate() throws Exception { 14 | assertThat(view.getTemplateName(), 15 | is("/example.ftl")); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /dropwizard-testing/src/test/java/com/yammer/dropwizard/testing/tests/FixtureHelpersTest.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.testing.tests; 2 | 3 | import org.junit.Test; 4 | 5 | import static com.yammer.dropwizard.testing.FixtureHelpers.fixture; 6 | import static org.hamcrest.Matchers.is; 7 | import static org.junit.Assert.assertThat; 8 | 9 | public class FixtureHelpersTest { 10 | @Test 11 | public void readsTheFileAsAString() throws Exception { 12 | assertThat(fixture("fixtures/fixture.txt"), 13 | is("YAY FOR ME")); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dropwizard-db/src/main/java/com/yammer/dropwizard/db/DatabaseHealthCheck.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.db; 2 | 3 | import com.yammer.metrics.core.HealthCheck; 4 | 5 | public class DatabaseHealthCheck extends HealthCheck { 6 | private final Database database; 7 | 8 | public DatabaseHealthCheck(Database database, String name) { 9 | super(name + "-db"); 10 | this.database = database; 11 | } 12 | 13 | @Override 14 | protected Result check() throws Exception { 15 | database.ping(); 16 | return Result.healthy(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /dropwizard-scala_2.9.1/src/main/scala/com/yammer/dropwizard/ScalaService.scala: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard 2 | 3 | import config.Configuration 4 | import bundles.ScalaBundle 5 | import com.codahale.jerkson.ScalaModule 6 | 7 | abstract class ScalaService[T <: Configuration](name: String) extends AbstractService[T](name) { 8 | addBundle(new ScalaBundle(this)) 9 | addJacksonModule(new ScalaModule(Thread.currentThread().getContextClassLoader)) 10 | override final def subclassServiceInsteadOfThis() {} 11 | 12 | final def main(args: Array[String]) { 13 | run(args) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dropwizard-db/src/test/java/com/yammer/dropwizard/db/tests/PersonDAO.java: -------------------------------------------------------------------------------- 1 | package com.yammer.dropwizard.db.tests; 2 | 3 | import com.google.common.base.Optional; 4 | import com.google.common.collect.ImmutableList; 5 | import org.skife.jdbi.v2.sqlobject.Bind; 6 | import org.skife.jdbi.v2.sqlobject.SqlQuery; 7 | 8 | public interface PersonDAO { 9 | @SqlQuery("SELECT name FROM people WHERE name = :name") 10 | public String findByName(@Bind("name") Optional