forked from pedjak/grails-csv
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed application version to grails 3.0.1 and also moved applicatio…
…n.yml to application.groovy and added Integration test cases for meta inserted methods.
- Loading branch information
sachin-verma
committed
Jul 8, 2015
1 parent
6e8d0cd
commit c240dbc
Showing
14 changed files
with
279 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
grailsVersion=3.0.2 | ||
grailsVersion=3.0.1 | ||
gradleWrapperVersion=2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
grails { | ||
profile = 'web' | ||
codegen { | ||
defaultPackage = 'org.grails.plugins' | ||
} | ||
} | ||
|
||
info { | ||
app { | ||
name = '@info.app.name@' | ||
version = '@info.app.version@' | ||
grailsVersion = '@info.app.grailsVersion@' | ||
} | ||
} | ||
|
||
spring { | ||
groovy { | ||
template['check-template-location'] = false | ||
} | ||
} | ||
|
||
hibernate { | ||
naming_strategy = 'org.hibernate.cfg.DefaultNamingStrategy' | ||
cache { | ||
queries = false | ||
} | ||
} | ||
|
||
grails { | ||
mime { | ||
disable { | ||
accept { | ||
header { | ||
userAgents = ['Gecko', 'WebKit', 'Presto', 'Trident'] | ||
} | ||
} | ||
} | ||
|
||
types { | ||
all = '*/*' | ||
atom = 'application/atom+xml' | ||
css = 'text/css' | ||
csv = 'text/csv' | ||
form = 'application/x-www-form-urlencoded' | ||
html = ['text/html', 'application/xhtml+xml'] | ||
js = 'text/javascript' | ||
json = ['application/json', 'text/json'] | ||
multipartForm = 'multipart/form-data' | ||
rss = 'application/rss+xml' | ||
text = 'text/plain' | ||
hal = ['application/hal+json', 'application/hal+xml'] | ||
xml = ['text/xml', 'application/xml'] | ||
} | ||
} | ||
urlmapping { | ||
cache { | ||
maxsize = 1000 | ||
} | ||
} | ||
controllers { | ||
defaultScope = 'request' | ||
} | ||
converters { | ||
encoding = 'UTF-8' | ||
} | ||
views { | ||
'default' { codec = 'html' }//THIS WAS THE SOURCE OF ERROR | ||
gsp { | ||
encoding = 'UTF-8' | ||
htmlcodec = 'xml' | ||
codecs { | ||
expression = 'html' | ||
scriptlets = 'html' | ||
taglib = 'none' | ||
staticparts = 'none' | ||
} | ||
} | ||
} | ||
} | ||
|
||
dataSource { | ||
pooled = true | ||
jmxExport = true | ||
driverClassName = "org.h2.Driver" | ||
username = "sa" | ||
password = "" | ||
} | ||
|
||
|
||
// 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 | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
8 changes: 6 additions & 2 deletions
8
...llers/grails/csv/CsvTestController.groovy → ...ails/plugins/csv/CsvTestController.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ls-app/init/grails/csv/Application.groovy → ...org/grails/plugins/csv/Application.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/integration-test/groovy/org/grails/plugins/csv/CSVMapReaderIntTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.grails.plugins.csv | ||
|
||
import grails.test.mixin.integration.Integration | ||
import org.junit.Test | ||
|
||
@Integration | ||
class CSVMapReaderIntTest extends GroovyTestCase { | ||
|
||
@Test | ||
void testFileToCsvMapReader() { | ||
def recs = new File("resources/mapTest.csv").toCsvMapReader().toList() | ||
assert recs.size() == 2 | ||
assertEquals([col1: 'val1', col2: 'val2', col3: 'val3'], recs[0]) | ||
} | ||
} |
Oops, something went wrong.