<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/jruby-1.1rc2.jar</filename>
    </added>
    <added>
      <filename>lib/spring-2.5.2.jar</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -14,8 +14,4 @@ public abstract class AbstractSerializableManagedMap extends ManagedMap implemen
     public AbstractSerializableManagedMap(int initialCapacity) {
         super(initialCapacity);
     }
-
-    public AbstractSerializableManagedMap(Map targetMap) {
-        super(targetMap);
-    }
 }</diff>
      <filename>src/main/java/springy/context/AbstractSerializableManagedMap.java</filename>
    </modified>
    <modified>
      <diff>@@ -96,8 +96,8 @@ public class RuntimeSpringyContext extends AbstractSpringyApplicationContext
         JRubyHelper.addGlobal(runtime, &quot;bean_factory&quot;, beanFactory);
 
         try {
-            runtime.evalScript(new StringReader(springy), &quot;(springy-parse-prepare-fragment)&quot;);
-            runtime.evalScript(new StringReader(ctxt), contextResource.getDescription() );
+            runtime.executeScript( springy, &quot;(springy-parse-prepare-fragment)&quot;);
+            runtime.executeScript( ctxt, contextResource.getDescription() );
         } catch (RaiseException rex) {
 
             System.err.println(rex.getException().toString());
@@ -142,7 +142,7 @@ public class RuntimeSpringyContext extends AbstractSpringyApplicationContext
             if (!isActive())
                 refreshBeanFactory();
 
-            RubyArray a = (RubyArray) runtime.evalScript(&quot;serialize_context&quot;);
+            RubyArray a = (RubyArray) runtime.evalScriptlet(&quot;serialize_context&quot;);
             serializedContext = a.get(0).toString();
             serializedContextAsDocument = (Document) a.get(1);
         }</diff>
      <filename>src/main/java/springy/context/RuntimeSpringyContext.java</filename>
    </modified>
    <modified>
      <diff>@@ -43,7 +43,12 @@ public abstract class AbstractContextSerializationTests extends AbstractContextT
 
     protected abstract SpringyApplicationContext doCreateContext();
 
-    protected ConfigurableApplicationContext createContext() throws Exception {
+  protected ConfigurableApplicationContext createContext(String context) throws Exception
+  {
+    return null;
+  }
+
+  protected ConfigurableApplicationContext createContext() throws Exception {
         //create a jruby context, serialize it to xml, and recreate context from xml
         SpringyApplicationContext jrubyCtxt = doCreateContext();
         serializedContext = jrubyCtxt.getContextAsXml();</diff>
      <filename>src/test/java/springy/AbstractContextSerializationTests.java</filename>
    </modified>
    <modified>
      <diff>@@ -20,6 +20,7 @@ public abstract class AbstractContextTests {
     protected ConfigurableApplicationContext ctxt;
 
     protected abstract ConfigurableApplicationContext createContext() throws Exception;
+    protected abstract ConfigurableApplicationContext createContext( String context ) throws Exception;
 
     public void testGetBeans() throws Exception {
         assert ctxt != null : getClass().getSimpleName();</diff>
      <filename>src/test/java/springy/AbstractContextTests.java</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,8 @@ import org.springframework.context.ApplicationContext;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
 import org.testng.annotations.Test;
-import springy.context.BSFSpringyContext;
+import org.jruby.Ruby;
+import springy.context.RuntimeSpringyContext;
 
 
 @Test
@@ -12,6 +13,6 @@ public class ErrorHandlingTests {
 
     @Test(expectedExceptions = BeanDefinitionParsingException.class)
     public void testErrorHandling() {
-        ApplicationContext ctxt = new BSFSpringyContext(new ClassPathResource(&quot;springy/context-with-errors.rb&quot;));
+        ApplicationContext ctxt = new RuntimeSpringyContext(Ruby.getDefaultInstance() , new ClassPathResource(&quot;springy/context-with-errors.rb&quot;));
     }
 }</diff>
      <filename>src/test/java/springy/ErrorHandlingTests.java</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,9 @@ import springy.context.SpringyApplicationContext;
 import springy.context.RuntimeSpringyContext;
 import org.jruby.Ruby;
 import org.springframework.core.io.ClassPathResource;
+import org.testng.annotations.Test;
 
+@Test
 public class RuntimeSpringyContextSerializationTests extends AbstractContextSerializationTests {
     protected SpringyApplicationContext doCreateContext() {
         return new RuntimeSpringyContext(Ruby.getDefaultInstance(), false, getContextResource() );</diff>
      <filename>src/test/java/springy/RuntimeSpringyContextSerializationTests.java</filename>
    </modified>
    <modified>
      <diff>@@ -11,9 +11,14 @@ import springy.beans.Bean6;
 @Test
 public class RuntimeSpringyContextTests extends SpringyContextTests {
 
-    protected ConfigurableApplicationContext createContext() throws Exception {
+  /** create from a file */
+  protected ConfigurableApplicationContext createContext() throws Exception {
         return new RuntimeSpringyContext(Ruby.getDefaultInstance(),
                 new ClassPathResource(&quot;springy/context.rb&quot;));
     }
 
+  /** create directly from a string */  
+  protected ConfigurableApplicationContext createContext( String context ) throws Exception {
+      return new RuntimeSpringyContext( Ruby.getDefaultInstance() , context );
+    }
 }</diff>
      <filename>src/test/java/springy/RuntimeSpringyContextTests.java</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,13 @@
 package springy;
 
 import springy.context.SpringyApplicationContext;
-import springy.context.BSFSpringyContext;
+import springy.context.RuntimeSpringyContext;
+import org.jruby.Ruby;
+import org.testng.annotations.Test;
 
+@Test
 public class SpringyContextSerializationTests extends AbstractContextSerializationTests{
     protected SpringyApplicationContext doCreateContext() {
-        return new BSFSpringyContext( false, getContextResource());
+        return new RuntimeSpringyContext( Ruby.getDefaultInstance() , false, getContextResource());
     }
 }</diff>
      <filename>src/test/java/springy/SpringyContextSerializationTests.java</filename>
    </modified>
    <modified>
      <diff>@@ -7,9 +7,10 @@ import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 import org.testng.annotations.AfterClass;
+import org.jruby.Ruby;
 import springy.beans.Bean1;
 import springy.beans.Bean4;
-import springy.context.BSFSpringyContext;
+import springy.context.RuntimeSpringyContext;
 
 import java.util.Map;
 
@@ -31,11 +32,18 @@ public class SpringyContextTests extends AbstractContextTests {
         ctxt.close();
     }
 
-    protected ConfigurableApplicationContext createContext() throws Exception {
-        return new BSFSpringyContext(new ClassPathResource(&quot;springy/context.rb&quot;));
+  /** create from a file */
+  protected ConfigurableApplicationContext createContext() throws Exception {
+        return new RuntimeSpringyContext(Ruby.getDefaultInstance(),
+                new ClassPathResource(&quot;springy/context.rb&quot;));
     }
 
-    public void testInlineXml() {
+  /** create directly from a string */
+  protected ConfigurableApplicationContext createContext( String context ) throws Exception {
+      return new RuntimeSpringyContext( Ruby.getDefaultInstance() , context );
+    }
+
+  public void testInlineXml() {
         Bean1 bean12 = (Bean1) ctxt.getBean(&quot;bean1-2&quot;);
         assert bean12 != null;
         Bean1 bean13 = (Bean1) ctxt.getBean(&quot;bean1-3&quot;);
@@ -47,13 +55,13 @@ public class SpringyContextTests extends AbstractContextTests {
         assertEquals( bean1.something , 22 );
     }
 
-    public void testErrorWithEmptyListsInCtor() {
+    public void testErrorWithEmptyListsInCtor() throws Exception {
         String context =
                 &quot;bean :bean1_emptylist_in_ctor, \&quot;springy.beans.Bean4\&quot; do |b|\n&quot; +
                         &quot;    b.new(\&quot;name\&quot;, {}, [])\n&quot; +
                         &quot;end&quot;;
 
-        BSFSpringyContext ctxt = new BSFSpringyContext(context);
+      ConfigurableApplicationContext ctxt = createContext(context);
 
         Bean4 b4 = (Bean4) ctxt.getBean(&quot;bean1_emptylist_in_ctor&quot;);
         assert b4.getMap().isEmpty();
@@ -71,19 +79,19 @@ public class SpringyContextTests extends AbstractContextTests {
     }
 
     @Test(expectedExceptions = BeanDefinitionParsingException.class)
-    public void testEnforceInit() {
+    public void testEnforceInit() throws Exception {
         String context = &quot;bean :bean1, \&quot;springy.beans.Bean1\&quot;, :init_method=\&quot;jjlkjkl\&quot;&quot;;
-        BSFSpringyContext ctxt = new BSFSpringyContext(context);
+        ConfigurableApplicationContext ctxt = createContext(context);
     }
 
-    public void testBeanWithoutBlock() {
+    public void testBeanWithoutBlock() throws Exception {
         String context = &quot;bean :a_bean, \&quot;springy.beans.Bean1\&quot;&quot;;
-        BSFSpringyContext ctxt = new BSFSpringyContext(context);
+        ConfigurableApplicationContext ctxt = createContext(context);
     }
 
-    public void testResourceExists() {
+    public void testResourceExists() throws Exception {
         String context = &quot;bean :bean1, 'springy.beans.Bean1' if resource_exists?('/springy/a_map.yml')&quot;;
-        BSFSpringyContext ctxt = new BSFSpringyContext(context);
+      ConfigurableApplicationContext ctxt = createContext(context);
         assert ctxt.getBean(&quot;bean1&quot;) instanceof Bean1;
     }
 </diff>
      <filename>src/test/java/springy/SpringyContextTests.java</filename>
    </modified>
    <modified>
      <diff>@@ -29,4 +29,10 @@ public class XmlContextTests extends AbstractContextTests {
     protected ConfigurableApplicationContext createContext() {
         return new ClassPathXmlApplicationContext(new String[]{&quot;springy/context.xml&quot;}, true);
     }
+
+
+  protected ConfigurableApplicationContext createContext(String context) throws Exception
+  {
+    return null;
+  }
 }</diff>
      <filename>src/test/java/springy/XmlContextTests.java</filename>
    </modified>
    <modified>
      <diff>@@ -60,10 +60,17 @@ bean :bean4, &quot;springy.beans.Bean4&quot; do
     }
 end
 
+map = yaml( &quot;/springy/a_map.yml&quot; )
+
 bean :bean4_yaml, &quot;springy.beans.Bean4&quot; do |b|
-    b.new(&quot;Steve&quot;, yaml(&quot;/springy/a_map.yml&quot;)) 
+    b.new(&quot;Steve&quot;, map )
 end
 
+## EVIL this fails for some reason, tho creating the map in two, as above works
+#bean :bean4_yaml, &quot;springy.beans.Bean4&quot; do |b|
+#    b.new(&quot;Steve&quot;, yaml( &quot;/springy/a_map.yml&quot; ) )
+#end
+
 bean :bean5, &quot;springy.beans.Bean5&quot;, :scope=&gt;'prototype', :init_method=&gt;'myInit', :destroy_method=&gt;'myDestroy', :dependency_check=&gt;'simple', :lazy_init=&gt;true, :abstract=&gt;true, :autowire=&gt;'byType'
 
 # aliasing</diff>
      <filename>src/test/resources/springy/context.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/jruby-1.0.jar</filename>
    </removed>
    <removed>
      <filename>lib/spring-2.0.6.jar</filename>
    </removed>
    <removed>
      <filename>src/main/java/springy/context/BSFSpringyContext.java</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>9146c220ad1802ed43cbecd2ba2dea03e9cb3c6d</id>
    </parent>
  </parents>
  <author>
    <name>Craig McMillan</name>
    <email>craig@trampolinesystems.com</email>
  </author>
  <url>http://github.com/jberkel/springy/commit/3b4b158647f9cc8dd70148ce2bac59ae9323c785</url>
  <id>3b4b158647f9cc8dd70148ce2bac59ae9323c785</id>
  <committed-date>2008-03-18T14:54:20-07:00</committed-date>
  <authored-date>2008-03-18T14:54:20-07:00</authored-date>
  <message>upgrade to spring 2.5.2 and jruby 1.1rc2


git-svn-id: http://svn.trampolinesystems.com/springy/trunk@12444 7bcaa5c2-c9d6-0310-8dd4-ca458a8cac41</message>
  <tree>65a00898a80606073d66d9b4d30c6fb0d5a8bbbb</tree>
  <committer>
    <name>Craig McMillan</name>
    <email>craig@trampolinesystems.com</email>
  </committer>
</commit>
