Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/target
/web-app/WEB-INF
plugin.xml
.settings
*.log
grails-zendesk-integration-*.zip
grails-zendesk-integration-*.zip.sha1
76 changes: 11 additions & 65 deletions ZendeskIntegrationGrailsPlugin.groovy
Original file line number Diff line number Diff line change
@@ -1,69 +1,15 @@
class ZendeskIntegrationGrailsPlugin {
// the plugin version
def version = "0.1"
// the version or versions of Grails the plugin is designed for
def grailsVersion = "2.3 > *"
// resources that are excluded from plugin packaging
def version = '0.1'
def grailsVersion = '2.3 > *'
def pluginExcludes = [
"grails-app/views/error.gsp"
"grails-app/controllers/TestController.groovy"
]

// TODO Fill in these fields
def title = "Zendesk Integration Plugin" // Headline display name of the plugin
def author = "Your name"
def authorEmail = ""
def description = '''\
Brief summary/description of the plugin.
'''

// URL to the plugin's documentation
def documentation = "http://grails.org/plugin/zendesk-integration"

// Extra (optional) plugin metadata

// License: one of 'APACHE', 'GPL2', 'GPL3'
// def license = "APACHE"

// Details of company behind the plugin (if there is one)
// def organization = [ name: "My Company", url: "http://www.my-company.com/" ]

// Any additional developers beyond the author specified above.
// def developers = [ [ name: "Joe Bloggs", email: "joe@bloggs.net" ]]

// Location of the plugin's issue tracker.
// def issueManagement = [ system: "JIRA", url: "http://jira.grails.org/browse/GPMYPLUGIN" ]

// Online location of the plugin's browseable source code.
// def scm = [ url: "http://svn.codehaus.org/grails-plugins/" ]

def doWithWebDescriptor = { xml ->
// TODO Implement additions to web.xml (optional), this event occurs before
}

def doWithSpring = {
// TODO Implement runtime spring config (optional)
}

def doWithDynamicMethods = { ctx ->
// TODO Implement registering dynamic methods to classes (optional)
}

def doWithApplicationContext = { ctx ->
// TODO Implement post initialization spring config (optional)
}

def onChange = { event ->
// TODO Implement code that is executed when any artefact that this plugin is
// watching is modified and reloaded. The event contains: event.source,
// event.application, event.manager, event.ctx, and event.plugin.
}

def onConfigChange = { event ->
// TODO Implement code that is executed when the project configuration changes.
// The event is the same as for 'onChange'.
}

def onShutdown = { event ->
// TODO Implement code that is executed when the application shuts down (optional)
}
def title = 'Zendesk Integration Plugin'
def author = 'Albert Morcillo'
def authorEmail = 'morci7@gmail.com'
def description = 'Zendesk integration for Grails'
def documentation = 'http://grails.org/plugin/zendesk-integration'
def license = 'APACHE'
def issueManagement = [ system: 'JIRA', url: 'http://jira.grails.org/browse/GPMYPLUGIN' ]
def scm = [ url: 'http://svn.codehaus.org/grails-plugins/' ]
}
3 changes: 0 additions & 3 deletions application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#Grails Metadata file
#Fri Sep 19 12:29:52 CEST 2014
app.grails.version=2.3.11
app.name=zendesk-integration
39 changes: 6 additions & 33 deletions grails-app/conf/BuildConfig.groovy
Original file line number Diff line number Diff line change
@@ -1,51 +1,24 @@
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.work.dir = 'target'

grails.project.fork = [
// configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
// compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
grails.project.dependency.resolution = {

// configure settings for the test-app JVM, uses the daemon by default
test: [maxMemory: 768, minMemory: 64, debug: true, maxPerm: 256, daemon:true],
// configure settings for the run-app JVM
// run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
// configure settings for the run-war JVM
war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
// configure settings for the Console UI JVM
console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]
inherits 'global'
log 'warn'

grails.project.dependency.resolver = "maven" // or ivy
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
repositories {
grailsCentral()
mavenLocal()
mavenCentral()
// uncomment the below to enable remote dependency resolution
// from public Maven repositories
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
// runtime 'mysql:mysql-connector-java:5.1.27'

dependencies {
compile( 'org.codehaus.groovy.modules.http-builder:http-builder:0.7') {
excludes 'groovy', 'xml-apis', 'xerces'
}
}

plugins {
build(":release:3.0.1",
":rest-client-builder:1.0.3", ":tomcat:7.0.54") {
build ':release:3.0.1', ':rest-client-builder:1.0.3', {
export = false
}
}
Expand Down
24 changes: 4 additions & 20 deletions grails-app/conf/Config.groovy
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
// 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'
error 'org.codehaus.groovy.grails',
'org.springframework',
'org.hibernate',
'net.sf.ehcache.hibernate'
}

plugin.zendesk.url = "https://rocketroi.zendesk.com"
58 changes: 8 additions & 50 deletions grails-app/conf/DataSource.groovy
Original file line number Diff line number Diff line change
@@ -1,56 +1,14 @@
dataSource {
pooled = true
jmxExport = true
driverClassName = "org.h2.Driver"
username = "sa"
password = ""
driverClassName = 'org.h2.Driver'
username = 'sa'
password = ''
dbCreate = 'update'
url = 'jdbc:h2:mem:testDb'
}

hibernate {
cache.use_second_level_cache = true
cache.use_second_level_cache = false
cache.use_query_cache = false
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3
// cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate 4
singleSession = true // configure OSIV singleSession mode
}

// environment specific settings
environments {
development {
dataSource {
dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
url = "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
}
}
test {
dataSource {
dbCreate = "update"
url = "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
}
}
production {
dataSource {
dbCreate = "update"
url = "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
properties {
// See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
jmxEnabled = true
initialSize = 5
maxActive = 50
minIdle = 5
maxIdle = 25
maxWait = 10000
maxAge = 10 * 60000
timeBetweenEvictionRunsMillis = 5000
minEvictableIdleTimeMillis = 60000
validationQuery = "SELECT 1"
validationQueryTimeout = 3
validationInterval = 15000
testOnBorrow = true
testWhileIdle = true
testOnReturn = false
jdbcInterceptors = "ConnectionState"
defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
}
}
}
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
}
13 changes: 0 additions & 13 deletions grails-app/conf/UrlMappings.groovy

This file was deleted.

18 changes: 0 additions & 18 deletions grails-app/views/error.gsp

This file was deleted.

7 changes: 0 additions & 7 deletions grails-app/views/index.gsp
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
<%--
Created by IntelliJ IDEA.
User: rcmfactory
Date: 19/09/2014
Time: 13:32
--%>

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
Expand Down
Loading