Commits

tednaleid committed e20e8c1 Merge

Merged in bostanio/grails-jasypt (pull request #1)

  • Participants
  • Parent commits 93933b9, 82ed803

Comments (0)

Files changed (10)

File jasypt-encryption/JasyptEncryptionGrailsPlugin.groovy

-import java.security.Security
-import org.bouncycastle.jce.provider.BouncyCastleProvider
-
 class JasyptEncryptionGrailsPlugin {
-
-    static {
-        // adds the BouncyCastle provider to Java so we don't need to manually modify our java install
-        // be sure that you've installed the Java Cryptography Extension (JCE) on the Sun website
-        // so that you have "unlimited" (rather than "strong", which isn't really strong) encryption
-        // if you're on OSX, this should be there by default.  On other platforms, you'll need to
-        // update the jars in your $JAVA_HOME/lib/security with the updated JCE jars
-        Security.addProvider(new BouncyCastleProvider());
-    }
-
     def version = "0.1.2"
 
-    def grailsVersion = "1.3.6 > *"
+    def grailsVersion = "2.0.0 > *"
 
     def dependsOn = [:]
 

File jasypt-encryption/application.properties

-#Grails Metadata file
-#Sun Jun 27 00:19:19 CDT 2010
-app.grails.version=1.3.2
-app.name=jasypt-encryption
-plugins.hibernate=1.3.2
-plugins.tomcat=1.3.2
+#Grails Metadata file
+#Mon Dec 26 11:06:59 EST 2011
+app.grails.version=2.0.0
+app.name=jasypt-encryption
+plugins.hibernate=2.0.0
+plugins.tomcat=2.0.0

File jasypt-encryption/grails-app/conf/BuildConfig.groovy

         // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
 
         // runtime 'mysql:mysql-connector-java:5.1.5'
+        runtime 'org.jasypt:jasypt:1.9.0'
+        runtime 'org.jasypt:jasypt-hibernate3:1.9.0'
+        //runtime 'org.bouncycastle:bcprov-jdk16-146'
     }
 }

File jasypt-encryption/lib/bcprov-jdk15-145.jar

Binary file removed.

File jasypt-encryption/lib/jasypt-1.7.jar

Binary file removed.

File jasypt-encryption/plugin.xml

-<plugin name='jasypt-encryption' version='0.1.1' grailsVersion='1.3.2 &gt; *'>
+<plugin name='jasypt-encryption' version='0.1.3' grailsVersion='1.3.6 &gt; *'>
   <author>Ted Naleid</author>
   <authorEmail>contact@naleid.com</authorEmail>
   <title>Plugin summary/headline</title>
 Grails integration with Jasypt, allows easy encryption of information, including Hibernate/GORM integration.
 </description>
   <documentation>http://grails.org/plugin/jasypt-encryption</documentation>
-  <resources>
-    <resource>BuildConfig</resource>
-    <resource>Config</resource>
-    <resource>DataSource</resource>
-    <resource>UrlMappings</resource>
-  </resources>
-  <dependencies />
+  <type>JasyptEncryptionGrailsPlugin</type>
+  <resources />
+  <repositories>
+    <repository name='grailsCentral' url='http://plugins.grails.org' />
+    <repository name='http://repo.grails.org/grails/plugins' url='http://repo.grails.org/grails/plugins/' />
+    <repository name='http://repo.grails.org/grails/core' url='http://repo.grails.org/grails/core/' />
+    <repository name='grailsCore' url='http://svn.codehaus.org/grails/trunk/grails-plugins' />
+  </repositories>
+  <dependencies>
+    <runtime>
+      <dependency group='org.jasypt' name='jasypt-hibernate3' version='1.9.0' />
+      <dependency group='org.jasypt' name='jasypt' version='1.9.0' />
+    </runtime>
+  </dependencies>
+  <plugins />
+  <runtimePluginRequirements />
   <behavior />
 </plugin>

File test-jasypt/application.properties

-#Grails Metadata file
-#Sat Jun 26 23:54:27 CDT 2010
-app.grails.version=1.3.6
-app.name=test-jasypt
-app.servlet.version=2.4
-app.version=0.1
-plugins.build-test-data=1.1.0
-plugins.hibernate=1.3.6
-plugins.tomcat=1.3.6
+#Grails Metadata file
+#Mon Dec 26 20:56:39 EST 2011
+app.grails.version=2.0.0
+app.name=test-jasypt
+app.servlet.version=2.4
+app.version=0.1
+plugins.build-test-data=1.1.0
+plugins.hibernate=2.0.0
+plugins.tomcat=2.0.0

File test-jasypt/grails-app/conf/BuildConfig.groovy

         // runtime 'mysql:mysql-connector-java:5.1.5'
     }
 
+    plugins {
+        runtime ':jasypt-encryption:0.1.3'
+    }
+
 }
 
 grails.plugin.location.jasypt = "../jasypt-encryption"

File test-jasypt/grails-app/conf/DataSource.groovy

 dataSource {
 	pooled = true
-	driverClassName = "org.hsqldb.jdbcDriver"
+	driverClassName = "org.h2.Driver"
 	username = "sa"
 	password = ""
 }
 	development {
 		dataSource {
 			dbCreate = "create-drop" // one of 'create', 'create-drop','update'
-			url = "jdbc:hsqldb:mem:devDB"
+			url = "jdbc:h2:mem:devDB"
 		}
 	}
 	test {
 		dataSource {
 			dbCreate = "update"
-			url = "jdbc:hsqldb:mem:testDb"
+			url = "jdbc:h2:mem:testDb"
 		}
 	}
 	production {
 		dataSource {
 			dbCreate = "update"
-			url = "jdbc:hsqldb:file:prodDb;shutdown=true"
+			url = "jdbc:h2:file:prodDb;shutdown=true"
 		}
 	}
 }

File test-jasypt/grails-app/domain/com/bloomhealthco/domain/Patient.groovy

 	String lastName
     String correlationId
 
+    static constraints = {
+        firstName maxSize: 384
+    }
+
 	static mapping = {
     	firstName type: GormEncryptedStringType
         lastName type: GormEncryptedStringType