Permalink
Browse files

Initial upgrade to Grails 1.1.1

  • Loading branch information...
1 parent 583f697 commit e874e191cd82ea645e387efc4272df8a4b0b292d @dima767 committed May 24, 2009
View
@@ -1,5 +1,12 @@
-#Sun Nov 02 10:24:03 EST 2008
-app.version=1.2.3a
+#utf-8
+#Sun May 24 11:59:59 EDT 2009
+plugins.mail=0.6
+app.version=1.3
+plugins.richui=0.6
app.servlet.version=2.4
-app.grails.version=1.0.3
+plugins.modalbox=0.3
+plugins.hibernate=1.1.1
app.name=grailscrowd
+plugins.feeds=1.4
+app.grails.version=1.1.1
+plugins.avatar=0.3
@@ -6,11 +6,12 @@ class LoggedInMemberFilters {
exposeLoggedInMember(controller: '*', action: '*') {
after = {model ->
if (session.memberId) {
- if(model) {
- model.loggedInMember = Member.get(session.memberId)
+ def member = Member.get(session.memberId)
+ if(model) {
+ model.loggedInMember = member
}
else {
- model = [loggedInMember:Member.get(session.memberId)]
+ model = [loggedInMember:member]
}
}
}
@@ -187,10 +187,12 @@ class GrailsProjectController extends SecureController {
def recipients = grailsProject.uniqueMembersWhoPostedComments.findAll { it.canBeNotifiedViaEmail }.collect { it.email }
recipients += grailsProject.creator.email
recipients -= comment.member.email
+
if(recipients) {
try {
sendMail {
- bcc recipients as Object[]
+ //Mails plugin BUG - currently bcc, cc doesn't work. Won't send blind emails for now. Hopefuly later versions of Mail plugin will address that.
+ bcc recipients.toArray()
subject "A new comment for project [${grailsProject.name}] has been posted"
body "${comment.member.displayName} said:\n\n${comment.body}\n\nSee the comment in context: ${createLink(controller: 'grailsProject', action: 'viewProject', id: params.id, absolute: true)}"
}
@@ -1,13 +1,13 @@
package grailscrowd.core
-/** added a test line to determine svn working status (mgk) **/
-//The idea of mailbox is kind of like del.icio.us for:username idea.
-//The mailbox could be used to communicate invitations and requests approvals to join a project, etc.
-//Another way would be to use regular email, but that would be the "more intrusive" option, IMO
class Mailbox {
static hasMany = [messages: Message]
static belongsTo = [member: Member]
- static fetchMode = [messages: 'eager']
+
+ static mapping = {
+ messages fetch:'join'
+ }
+
def hasAnyDisplayableMessages() {
@@ -60,10 +60,12 @@ class Member extends NumberOfViewsTrackable implements Comparable {
taggings: Tagging, favoriteProjects: FavoriteProjectReference, endorsements: Endorsement]
SortedSet taggings
- //static fetchMode = [projectParticipations: 'eager', affiliations: 'eager']
-
Mailbox mailbox
+ static mapping = {
+ mailbox fetch:'join'
+ }
+
def beforeInsert = {
password = password.encodeAsEncryptedPassword()
}
View
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.test.GrailsAwareGroovyTestSuite"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="grailscrowd"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dtest=${resource_loc}"/>
+</launchConfiguration>
View
@@ -1,20 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.util.GrailsMain"/>
-<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
-<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;grailscrowd&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;grailscrowd&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
-<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/grailscrowd&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/grailscrowd"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="grailscrowd"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dbase.dir=${project_loc} -Dserver.port=8080 -Dgrails.env=development"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/grailscrowd"/>
-</listAttribute>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;grailscrowd&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/dist/grails-bootstrap-1.1.1.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/lib/groovy-all-1.6.3.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.util.GrailsMain"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="grailscrowd"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dbase.dir=&quot;${project_loc:grailscrowd}&quot; -Dserver.port=8080 -Dgrails.env=development"/>
</launchConfiguration>
View
28 ivy.xml
@@ -0,0 +1,28 @@
+<ivy-module version="2.0">
+ <info organisation="org.example" module="grailscrowd"/>
+ <configurations defaultconfmapping="build->default;compile->compile(*),master(*);test,runtime->runtime(*),master(*)">
+ <conf name="build"/>
+ <conf name="compile"/>
+ <conf name="test" extends="compile"/>
+ <conf name="runtime" extends="compile"/>
+ </configurations>
+ <dependencies>
+ <dependency org="org.grails" name="grails-bootstrap" rev="1.1.1" conf="build"/>
+ <dependency org="org.grails" name="grails-scripts" rev="1.1.1" conf="build"/>
+ <dependency org="org.grails" name="grails-gorm" rev="1.1.1" conf="compile"/>
+ <dependency org="org.grails" name="grails-web" rev="1.1.1" conf="compile"/>
+ <dependency org="org.grails" name="grails-test" rev="1.1.1" conf="test"/>
+ <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.5.5" conf="runtime"/>
+ <dependency org="opensymphony" name="oscache" rev="2.4" conf="runtime">
+ <exclude org="javax.jms" module="jms" name="*" type="*" ext="*" conf="" matcher="exact"/>
+ <exclude org="commons-logging" module="commons-logging" name="*" type="*" ext="*" conf="" matcher="exact"/>
+ <exclude org="javax.servlet" module="servlet-api" name="*" type="*" ext="*" conf="" matcher="exact"/>
+ </dependency>
+ <dependency org="hsqldb" name="hsqldb" rev="1.8.0.5" conf="runtime"/>
+ <dependency org="net.sf.ehcache" name="ehcache" rev="1.5.0" conf="runtime"/>
+ <!--
+ <dependency org="mysql" name="mysql-connector-java" rev="5.1.6" conf="runtime"/>
+ <dependency org="postgresql" name="postgresql" rev="8.3-603.jdbc3" conf="runtime"/>
+ -->
+ </dependencies>
+</ivy-module>
View
@@ -0,0 +1,15 @@
+<ivysettings>
+ <settings defaultResolver="codehaus-plus"/>
+ <include url="${ivy.default.settings.dir}/ivysettings-public.xml" />
+ <include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
+ <include url="${ivy.default.settings.dir}/ivysettings-local.xml" />
+ <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
+ <resolvers>
+ <chain name="codehaus-plus" dual="true">
+ <ibiblio name="codehaus-snapshots" root="http://snapshots.repository.codehaus.org" m2compatible="true" changingPattern=".*SNAPSHOT"/>
+ <ibiblio name="codehaus" root="http://repository.codehaus.org" m2compatible="true"/>
+ <ibiblio name="javanet" root="http://download.java.net/maven/2/" m2compatible="true"/>
+ <resolver ref="public"/>
+ </chain>
+ </resolvers>
+</ivysettings>
View
@@ -1,22 +0,0 @@
-import groovy.xml.StreamingMarkupBuilder
-
-//modify the generated web.xml so that it supports being mapped to 'request' and 'errror'
-eventWebXmlEnd = {String tmpfile ->
- //find the filter mapping to change
- String filterNm = "grailsWebRequest"
- def root = new XmlSlurper().parse(webXmlFile)
- def gwr = root."filter-mapping".find { it."filter-name" == filterNm }
- if (!gwr.size()) throw new RuntimeException("[fail] No Filter named $filterNm")
- if (gwr.dispatcher.size()) throw new RuntimeException("[fail] Dispatchers exist for $filterNm")
-
- //xml is as expected, now modify it and write it back out
- gwr.appendNode {
- dispatcher("ERROR")
- dispatcher("REQUEST")
- }
- //webXmlFile is an implicit variable created before event is invoked
- webXmlFile.text = new StreamingMarkupBuilder().bind {
- mkp.declareNamespace("": "http://java.sun.com/xml/ns/j2ee")
- mkp.yield(root)
- }
-}

0 comments on commit e874e19

Please sign in to comment.