Permalink
Browse files

Merge branch 'apichanges' of https://github.com/akeefer/Tosa into api…

…changes
  • Loading branch information...
Carson Gross
Carson Gross committed Jan 20, 2012
2 parents a67be44 + b38ded3 commit 8379d0b527171b16ac4c50e7a0c58ba7185a38f1
View
46 pom.xml
@@ -9,34 +9,20 @@
<name>Tosa</name>
+ <parent>
+ <groupId>org.gosu-lang</groupId>
+ <artifactId>gosu-project-parent</artifactId>
+ <version>2</version>
+ </parent>
+
<repositories>
<repository>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- <id>gosu-lang.org</id>
- <name>Official Gosu website</name>
- <url>http://gosu-lang.org/m2</url>
+ <id>gosu-lang.org-releases</id>
+ <name>Official Gosu website (releases)</name>
+ <url>http://gosu-lang.org/repositories/m2/releases</url>
</repository>
</repositories>
- <pluginRepositories>
- <pluginRepository>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- <id>gosu-lang.org</id>
- <name>Official Gosu website</name>
- <url>http://gosu-lang.org/m2</url>
- </pluginRepository>
- </pluginRepositories>
-
<dependencies>
<dependency>
<groupId>commons-dbcp</groupId>
@@ -96,15 +82,6 @@
<plugin>
<groupId>org.gosu-lang</groupId>
<artifactId>maven-gosu-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <phase>process-resources</phase>
- <goals>
- <goal>insert-gosu-artifact</goal>
- </goals>
- </execution>
- </executions>
<configuration>
<gosuVersion>0.9-SNAPSHOT</gosuVersion>
<includeImpl>true</includeImpl> <!-- TODO: naughty, naughty -->
@@ -113,16 +90,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.3.2</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
- <Gosu-Typeloaders>tosa.loader.DBTypeLoader</Gosu-Typeloaders>
+ <Gosu-Typeloaders>tosa.loader.DBTypeLoader</Gosu-Typeloaders>
<Contains-Sources>gs, gsx</Contains-Sources>
- </manifestEntries>
+ </manifestEntries>
</archive>
</configuration>
</plugin>
@@ -294,4 +294,8 @@ public void init() {
public void uninit() {
// TODO - AHK
}
+
+ public List<IType> getTypesForFile(IFile file) {
+ return Collections.emptyList();
+ }
}
View
@@ -2,6 +2,8 @@
import gw.lang.reflect.TypeSystem;
import gw.lang.shell.Gosu;
+import tosa.api.DBLocator;
+import tosa.api.IDatabase;
import tosa.loader.DBTypeLoader;
public class TestEnv {
@@ -10,6 +12,8 @@ public static synchronized void maybeInit() {
if (!_inited) {
Gosu.init();
TypeSystem.pushTypeLoader(new DBTypeLoader());
+ IDatabase database = DBLocator.getDatabase("test.testdb");
+ database.setJdbcUrl("jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1");
_inited = true;
}
}
@@ -115,7 +115,6 @@ class SQLTypeInfoTest {
function testBasicBetweenComparisonWorks() {
var result = test.query.SampleBetweenQuery.select("1/1/2001".toDate(), "1/1/2101".toDate())
Assert.assertEquals(1, result.Count)
- test.testdb.Database.JdbcUrl = "blah"
result = test.query.SampleBetweenQuery.select("1/1/2101".toDate(), "1/1/2101".toDate())
Assert.assertEquals(0, result.Count)
}
@@ -8,7 +8,8 @@ class TosaTestDBInit {
static function createDatabase() {
var dbTypeLoader = TypeSystem.getTypeLoader(DBTypeLoader)
var database = DBLocator.getDatabase( "test.testdb" )
- database.JdbcUrl = "jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;TRACE_LEVEL_SYSTEM_OUT=2"
+// database.JdbcUrl = "jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;TRACE_LEVEL_SYSTEM_OUT=2"
+ database.JdbcUrl = "jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1"
database.DBUpgrader.recreateTables()
}

0 comments on commit 8379d0b

Please sign in to comment.