From 8069df6afbe3c3f1f84ae28e0a12f0b63a578cfa Mon Sep 17 00:00:00 2001
From: Joe Kutner <jpkutner@gmail.com>
Date: Tue, 19 Aug 2014 19:07:11 -0500
Subject: [PATCH] added an IT test for ~>0 version gems

---
 .../src/it/load-heroku-gem/invoker.properties |  3 ++
 gem-proxy/src/it/load-heroku-gem/pom.xml      | 33 +++++++++++++++++++
 gem-proxy/src/it/load-heroku-gem/verify.bsh   | 10 ++++++
 3 files changed, 46 insertions(+)
 create mode 100644 gem-proxy/src/it/load-heroku-gem/invoker.properties
 create mode 100644 gem-proxy/src/it/load-heroku-gem/pom.xml
 create mode 100644 gem-proxy/src/it/load-heroku-gem/verify.bsh

diff --git a/gem-proxy/src/it/load-heroku-gem/invoker.properties b/gem-proxy/src/it/load-heroku-gem/invoker.properties
new file mode 100644
index 00000000..07667f23
--- /dev/null
+++ b/gem-proxy/src/it/load-heroku-gem/invoker.properties
@@ -0,0 +1,3 @@
+invoker.goals = clean gem:initialize
+invoker.mavenOpts = -client
+
diff --git a/gem-proxy/src/it/load-heroku-gem/pom.xml b/gem-proxy/src/it/load-heroku-gem/pom.xml
new file mode 100644
index 00000000..35c4cb34
--- /dev/null
+++ b/gem-proxy/src/it/load-heroku-gem/pom.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0                       http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.example</groupId>
+  <artifactId>load-railties-gems</artifactId>
+  <version>0.0.0</version>
+  <repositories>
+    <repository>
+      <id>rubygems-releases</id>
+      <url>http://localhost:8989/releases</url>
+    </repository>
+  </repositories>
+  <dependencies>
+    <dependency>
+      <groupId>rubygems</groupId>
+      <artifactId>heroku_hatchet</artifactId>
+      <version>1.3.4</version>
+      <type>gem</type>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+      	<groupId>de.saumya.mojo</groupId>
+      	<artifactId>gem-maven-plugin</artifactId>
+      	<version>@project.parent.version@</version>
+      	<configuration>
+      	  <includeOpenSSL>false</includeOpenSSL>
+      	</configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/gem-proxy/src/it/load-heroku-gem/verify.bsh b/gem-proxy/src/it/load-heroku-gem/verify.bsh
new file mode 100644
index 00000000..86374f60
--- /dev/null
+++ b/gem-proxy/src/it/load-heroku-gem/verify.bsh
@@ -0,0 +1,10 @@
+import java.io.*;
+import org.codehaus.plexus.util.FileUtils;
+
+
+String log = FileUtils.fileRead( new File( basedir, "build.log" ) );
+String expected = "Successfully installed heroku_hatchet-1.3.4";
+if ( !log.contains( expected ) )
+{
+    throw new RuntimeException( "log file does not contain '" + expected + "'" );
+}
-- 
GitLab