Skip to content

Commit

Permalink
some basic files from the mongo plugin were missing
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Nov 11, 2010
1 parent f6638bf commit 016accd
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 0 deletions.
4 changes: 4 additions & 0 deletions grails-plugins/mongodb/application.properties
@@ -0,0 +1,4 @@
#Grails Metadata file
#Wed Nov 10 11:30:13 CET 2010
app.grails.version=1.3.5
app.name=mongodb
24 changes: 24 additions & 0 deletions grails-plugins/mongodb/grails-app/conf/Config.groovy
@@ -0,0 +1,24 @@
// configuration for plugin testing - will not be included in the plugin zip

log4j = {
// Example of changing the log pattern for the default console
// appender:
//
//appenders {
// console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
//}

error 'org.codehaus.groovy.grails.web.servlet', // controllers
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
'org.codehaus.groovy.grails.web.mapping', // URL mapping
'org.codehaus.groovy.grails.commons', // core / classloading
'org.codehaus.groovy.grails.plugins', // plugins
'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
'org.springframework',
'org.hibernate',
'net.sf.ehcache.hibernate'

warn 'org.mortbay.log'
}
32 changes: 32 additions & 0 deletions grails-plugins/mongodb/grails-app/conf/DataSource.groovy
@@ -0,0 +1,32 @@
dataSource {
pooled = true
driverClassName = "org.h2.Driver"
username = "sa"
password = ""
}
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = true
cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider'
}
// environment specific settings
environments {
development {
dataSource {
dbCreate = "create-drop" // one of 'create', 'create-drop','update'
url = "jdbc:h2:mem:devDB"
}
}
test {
dataSource {
dbCreate = "update"
url = "jdbc:h2:mem:testDb"
}
}
production {
dataSource {
dbCreate = "update"
url = "jdbc:h2:prodDb"
}
}
}
13 changes: 13 additions & 0 deletions grails-plugins/mongodb/grails-app/conf/UrlMappings.groovy
@@ -0,0 +1,13 @@
class UrlMappings {

static mappings = {
"/$controller/$action?/$id?"{
constraints {
// apply constraints here
}
}

"/"(view:"/index")
"500"(view:'/error')
}
}
54 changes: 54 additions & 0 deletions grails-plugins/mongodb/grails-app/views/error.gsp
@@ -0,0 +1,54 @@
<html>
<head>
<title>Grails Runtime Exception</title>
<style type="text/css">
.message {
border: 1px solid black;
padding: 5px;
background-color:#E9E9E9;
}
.stack {
border: 1px solid black;
padding: 5px;
overflow:auto;
height: 300px;
}
.snippet {
padding: 5px;
background-color:white;
border:1px solid black;
margin:3px;
font-family:courier;
}
</style>
</head>

<body>
<h1>Grails Runtime Exception</h1>
<h2>Error Details</h2>

<div class="message">
<strong>Error ${request.'javax.servlet.error.status_code'}:</strong> ${request.'javax.servlet.error.message'.encodeAsHTML()}<br/>
<strong>Servlet:</strong> ${request.'javax.servlet.error.servlet_name'}<br/>
<strong>URI:</strong> ${request.'javax.servlet.error.request_uri'}<br/>
<g:if test="${exception}">
<strong>Exception Message:</strong> ${exception.message?.encodeAsHTML()} <br />
<strong>Caused by:</strong> ${exception.cause?.message?.encodeAsHTML()} <br />
<strong>Class:</strong> ${exception.className} <br />
<strong>At Line:</strong> [${exception.lineNumber}] <br />
<strong>Code Snippet:</strong><br />
<div class="snippet">
<g:each var="cs" in="${exception.codeSnippet}">
${cs?.encodeAsHTML()}<br />
</g:each>
</div>
</g:if>
</div>
<g:if test="${exception}">
<h2>Stack Trace</h2>
<div class="stack">
<pre><g:each in="${exception.stackTraceLines}">${it.encodeAsHTML()}<br/></g:each></pre>
</div>
</g:if>
</body>
</html>
10 changes: 10 additions & 0 deletions grails-plugins/mongodb/scripts/_Install.groovy
@@ -0,0 +1,10 @@
//
// This script is executed by Grails after plugin was installed to project.
// This script is a Gant script so you can use all special variables provided
// by Gant (such as 'baseDir' which points on project base dir). You can
// use 'ant' to access a global instance of AntBuilder
//
// For example you can create directory under project tree:
//
// ant.mkdir(dir:"${basedir}/grails-app/jobs")
//
5 changes: 5 additions & 0 deletions grails-plugins/mongodb/scripts/_Uninstall.groovy
@@ -0,0 +1,5 @@
//
// This script is executed by Grails when the plugin is uninstalled from project.
// Use this script if you intend to do any additional clean-up on uninstall, but
// beware of messing up SVN directories!
//
10 changes: 10 additions & 0 deletions grails-plugins/mongodb/scripts/_Upgrade.groovy
@@ -0,0 +1,10 @@
//
// This script is executed by Grails during application upgrade ('grails upgrade'
// command). This script is a Gant script so you can use all special variables
// provided by Gant (such as 'baseDir' which points on project base dir). You can
// use 'ant' to access a global instance of AntBuilder
//
// For example you can create directory under project tree:
//
// ant.mkdir(dir:"${basedir}/grails-app/jobs")
//

0 comments on commit 016accd

Please sign in to comment.