summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2015-05-06 21:55:51 -0400
committerTavian Barnes <tavianator@tavianator.com>2015-05-06 21:55:51 -0400
commitd08927582d2c36e3da20488df8f262ca03f26c81 (patch)
tree766ba74d26a766a2046499bac3a137fbd332647a
parent173ef17d37be1f8bd583fbc0e527b2a81ff9f6d9 (diff)
parent55e93141ff7f93cbecb341ad49d2811800569e0d (diff)
downloadsangria-d08927582d2c36e3da20488df8f262ca03f26c81.tar.xz
Merge branch 'guice-4-release'
-rw-r--r--pom.xml14
-rw-r--r--sangria-contextual/pom.xml2
-rw-r--r--sangria-core/pom.xml2
-rw-r--r--sangria-lazy/pom.xml2
-rw-r--r--sangria-listbinder/pom.xml2
-rw-r--r--sangria-log4j/pom.xml2
-rw-r--r--sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java28
-rw-r--r--sangria-slf4j/pom.xml2
-rw-r--r--sangria-slf4j/src/test/java/com/tavianator/sangria/slf4j/SangriaSlf4jModuleTest.java26
-rw-r--r--sangria-test/pom.xml2
10 files changed, 42 insertions, 40 deletions
diff --git a/pom.xml b/pom.xml
index 8ac8012..7c971dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
<groupId>com.tavianator.sangria</groupId>
<artifactId>sangria</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Sangria</name>
@@ -92,14 +92,10 @@
<dependency>
<groupId>com.google.inject</groupId>
- <artifactId>guice</artifactId>
- <version>4.0-beta5</version>
- </dependency>
-
- <dependency>
- <groupId>com.google.inject.extensions</groupId>
- <artifactId>guice-multibindings</artifactId>
- <version>4.0-beta5</version>
+ <artifactId>guice-bom</artifactId>
+ <version>4.0</version>
+ <type>pom</type>
+ <scope>import</scope>
</dependency>
<dependency>
diff --git a/sangria-contextual/pom.xml b/sangria-contextual/pom.xml
index 702616f..82aa9ee 100644
--- a/sangria-contextual/pom.xml
+++ b/sangria-contextual/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>com.tavianator.sangria</groupId>
<artifactId>sangria</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<artifactId>sangria-contextual</artifactId>
diff --git a/sangria-core/pom.xml b/sangria-core/pom.xml
index c06b186..1801ed4 100644
--- a/sangria-core/pom.xml
+++ b/sangria-core/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>com.tavianator.sangria</groupId>
<artifactId>sangria</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<artifactId>sangria-core</artifactId>
diff --git a/sangria-lazy/pom.xml b/sangria-lazy/pom.xml
index e2c806e..ba6b122 100644
--- a/sangria-lazy/pom.xml
+++ b/sangria-lazy/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>com.tavianator.sangria</groupId>
<artifactId>sangria</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<artifactId>sangria-lazy</artifactId>
diff --git a/sangria-listbinder/pom.xml b/sangria-listbinder/pom.xml
index 4040c4a..ded89fa 100644
--- a/sangria-listbinder/pom.xml
+++ b/sangria-listbinder/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>com.tavianator.sangria</groupId>
<artifactId>sangria</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<artifactId>sangria-listbinder</artifactId>
diff --git a/sangria-log4j/pom.xml b/sangria-log4j/pom.xml
index b91bb7e..2b9fe74 100644
--- a/sangria-log4j/pom.xml
+++ b/sangria-log4j/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>com.tavianator.sangria</groupId>
<artifactId>sangria</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<artifactId>sangria-log4j</artifactId>
diff --git a/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java b/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java
index a3ecd66..9dbc560 100644
--- a/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java
+++ b/sangria-log4j/src/test/java/com/tavianator/sangria/log4j/SangriaLog4jModuleTest.java
@@ -34,6 +34,8 @@ import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
/**
+ * Tests for {@link SangriaLog4jModule}.
+ *
* @author Tavian Barnes (tavianator@tavianator.com)
* @version 1.0
* @since 1.0
@@ -57,21 +59,23 @@ public class SangriaLog4jModuleTest {
assertThat(provider.get().getName(), equalTo(LogManager.ROOT_LOGGER_NAME));
}
+ static class HasProviderMethod extends AbstractModule {
+ @Override
+ protected void configure() {
+ install(new SangriaLog4jModule());
+ }
+
+ @Provides
+ String getLoggerName(Logger logger) {
+ return logger.getName();
+ }
+ }
+
@Test
public void testProviderMethod() {
- Injector injector = Guice.createInjector(new AbstractModule() {
- @Override
- protected void configure() {
- install(new SangriaLog4jModule());
- }
-
- @Provides
- String getLoggerName(Logger logger) {
- return logger.getName();
- }
- });
+ Injector injector = Guice.createInjector(new HasProviderMethod());
- assertThat(injector.getInstance(String.class), equalTo(LogManager.ROOT_LOGGER_NAME));
+ assertThat(injector.getInstance(String.class), equalTo(HasProviderMethod.class.getName()));
}
@Test
diff --git a/sangria-slf4j/pom.xml b/sangria-slf4j/pom.xml
index 53cbfb7..41d6647 100644
--- a/sangria-slf4j/pom.xml
+++ b/sangria-slf4j/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>com.tavianator.sangria</groupId>
<artifactId>sangria</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<artifactId>sangria-slf4j</artifactId>
diff --git a/sangria-slf4j/src/test/java/com/tavianator/sangria/slf4j/SangriaSlf4jModuleTest.java b/sangria-slf4j/src/test/java/com/tavianator/sangria/slf4j/SangriaSlf4jModuleTest.java
index aaf72b2..07bf068 100644
--- a/sangria-slf4j/src/test/java/com/tavianator/sangria/slf4j/SangriaSlf4jModuleTest.java
+++ b/sangria-slf4j/src/test/java/com/tavianator/sangria/slf4j/SangriaSlf4jModuleTest.java
@@ -58,21 +58,23 @@ public class SangriaSlf4jModuleTest {
assertThat(provider.get().getName(), equalTo(Logger.ROOT_LOGGER_NAME));
}
+ static class HasProviderMethod extends AbstractModule {
+ @Override
+ protected void configure() {
+ install(new SangriaSlf4jModule());
+ }
+
+ @Provides
+ String getLoggerName(Logger logger) {
+ return logger.getName();
+ }
+ }
+
@Test
public void testProviderMethod() {
- Injector injector = Guice.createInjector(new AbstractModule() {
- @Override
- protected void configure() {
- install(new SangriaSlf4jModule());
- }
-
- @Provides
- String getLoggerName(Logger logger) {
- return logger.getName();
- }
- });
+ Injector injector = Guice.createInjector(new HasProviderMethod());
- assertThat(injector.getInstance(String.class), equalTo(Logger.ROOT_LOGGER_NAME));
+ assertThat(injector.getInstance(String.class), equalTo(HasProviderMethod.class.getName()));
}
@Test
diff --git a/sangria-test/pom.xml b/sangria-test/pom.xml
index cdb835d..4ee89c3 100644
--- a/sangria-test/pom.xml
+++ b/sangria-test/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>com.tavianator.sangria</groupId>
<artifactId>sangria</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<artifactId>sangria-test</artifactId>