Permalink
Browse files

Merge pull request #12 from tropo/revert-11-master

Revert "ConfigurationHolder was deprecated, and removed from Grails 2…
  • Loading branch information...
2 parents 0678b76 + e4e4729 commit a9f2219f566fb2b7edfee9344715c2311474e571 @mpermar mpermar committed May 26, 2015
@@ -1,5 +1,6 @@
#Grails Metadata file
-#Fri Feb 13 21:39:40 CET 2015
-app.grails.version=2.3.9
+#Thu Feb 03 16:18:21 CET 2011
+app.grails.version=1.3.6
app.name=tropo-webapi-grails
-app.servlet.version=2.5
+plugins.hibernate=1.3.6
+plugins.tomcat=1.3.6
@@ -1,6 +1,6 @@
dataSource {
pooled = true
- driverClassName = "org.h2.Driver"
+ driverClassName = "org.hsqldb.jdbcDriver"
username = "sa"
password = ""
}
@@ -14,19 +14,19 @@ environments {
development {
dataSource {
dbCreate = "create-drop" // one of 'create', 'create-drop','update'
- url = "jdbc:h2:mem:devDb"
+ url = "jdbc:hsqldb:mem:devDB"
}
}
test {
dataSource {
dbCreate = "update"
- url = "jdbc:h2:mem:testDb"
+ url = "jdbc:hsqldb:mem:testDb"
}
}
production {
dataSource {
dbCreate = "update"
- url = "jdbc:h2:file:prodDb;shutdown=true"
+ url = "jdbc:hsqldb:file:prodDb;shutdown=true"
}
}
}
@@ -2,6 +2,8 @@ package com.tropo.grails
import java.util.Map
+import org.codehaus.groovy.grails.commons.ConfigurationHolder;
+
/**
* This Grails service abstracts the access to the <a href="https://www.tropo.com/docs/rest/rest_api.htm">Tropo REST API</a>.</p>
*
@@ -10,7 +12,6 @@ import java.util.Map
*/
class TropoService {
- def grailsApplication
static transactional = true
def baseUrl
def httpHelper
@@ -26,18 +27,18 @@ class TropoService {
this.username = username
this.password = password
- baseUrl = grailsApplication?.config?.tropo?.api?.url
+ baseUrl = ConfigurationHolder?.config?.tropo?.api?.url
if (!baseUrl) {
baseUrl = HARDCODED_BASE_URL
}
if (!username) {
// try to find it on grails config file
- username = grailsApplication?.config?.tropo?.username
+ username = ConfigurationHolder?.config?.tropo?.username
}
if (!password) {
// try to find it on grails config file
- username = grailsApplication?.config?.tropo?.password
+ username = ConfigurationHolder?.config?.tropo?.password
}
httpHelper = new HTTPHelper(username,password)

0 comments on commit a9f2219

Please sign in to comment.