Permalink
Browse files

Fairly big refactoring. Simplified filter implementation greatly

Signed-off-by: Jimmy Schementi <jschementi@gmail.com>
  • Loading branch information...
1 parent d21a54e commit 409735a35dd748c00701151c2f6b764cc3833ff3 @casualjim casualjim committed with Mar 5, 2009
Showing with 623 additions and 1,014 deletions.
  1. +2 −1 .gitignore
  2. +8 −4 IronRubyMvc.Tests/Controllers/RubyActionDescriptorFixture.cs
  3. +4 −3 IronRubyMvc.Tests/Controllers/RubyControllerActionInvokerSpec.cs
  4. +4 −3 IronRubyMvc.Tests/Controllers/RubyControllerDescriptorSpec.cs
  5. +5 −3 IronRubyMvc.Tests/Controllers/RubyControllerFactorySpec.cs
  6. +4 −3 IronRubyMvc.Tests/Controllers/RubyControllerSpec.cs
  7. +3 −2 IronRubyMvc.Tests/Core/AssemblyResourceReaderSpec.cs
  8. +3 −2 IronRubyMvc.Tests/Core/DefaultScriptRunnerSpec.cs
  9. +3 −2 IronRubyMvc.Tests/Core/FileReaderSpec.cs
  10. +4 −3 IronRubyMvc.Tests/Core/RouteCollectionSpec.cs
  11. +8 −5 IronRubyMvc.Tests/Core/RubyEngineSpec.cs
  12. +3 −2 IronRubyMvc.Tests/Core/ScopedScriptRunnerSpec.cs
  13. +1 −1 IronRubyMvc.Tests/Extensions/DictionaryExtensionsFixture.cs
  14. +1 −1 IronRubyMvc.Tests/Extensions/IEnumerableExtensionsFixture.cs
  15. +1 −1 IronRubyMvc.Tests/Extensions/InflectorTest.cs
  16. +2 −2 IronRubyMvc.Tests/Extensions/ObjectExtensionsFixture.cs
  17. +1 −1 IronRubyMvc.Tests/Extensions/StringExtensionsFixture.cs
  18. +2 −2 IronRubyMvc.Tests/IronRubyMvcLibrary.Tests.csproj
  19. +2 −2 IronRubyMvc.Tests/RubyExperiments.cs
  20. +1 −1 IronRubyMvc.Tests/UnitTestHelpers.cs
  21. +4 −3 IronRubyMvc.Tests/ViewEngine/RubyTemplateTests.cs
  22. +1 −1 IronRubyMvc.sln
  23. BIN IronRubyMvc/Controllers/._RubyControllerFactory.cs
  24. +2 −2 IronRubyMvc/Controllers/ControllerConfiguration.cs
  25. +0 −72 IronRubyMvc/Controllers/RailsStyleActionFilter.cs
  26. +0 −24 IronRubyMvc/Controllers/RailsStyleAuthorizationFilter.cs
  27. +0 −24 IronRubyMvc/Controllers/RailsStyleExceptionFilter.cs
  28. +0 −28 IronRubyMvc/Controllers/RailsStyleResultFilter.cs
  29. +10 −11 IronRubyMvc/Controllers/RubyActionDescriptor.cs
  30. +2 −2 IronRubyMvc/Controllers/RubyActionFilter.cs
  31. +1 −3 IronRubyMvc/Controllers/RubyAuthorizationFilter.cs
  32. +7 −9 IronRubyMvc/Controllers/RubyController.cs
  33. +6 −7 IronRubyMvc/Controllers/RubyControllerActionInvoker.cs
  34. +2 −6 IronRubyMvc/Controllers/RubyControllerDescriptor.cs
  35. +3 −6 IronRubyMvc/Controllers/RubyControllerFactory.cs
  36. +1 −3 IronRubyMvc/Controllers/RubyExceptionFilter.cs
  37. +2 −2 IronRubyMvc/Controllers/RubyResultFilter.cs
  38. +94 −30 IronRubyMvc/Controllers/controller.rb
  39. +2 −2 IronRubyMvc/Core/AssemblyResourceReader.cs
  40. +6 −5 IronRubyMvc/Core/Constants.cs
  41. +5 −5 IronRubyMvc/Core/DefaultScriptRunner.cs
  42. +1 −1 IronRubyMvc/Core/Enums.cs
  43. +1 −1 IronRubyMvc/Core/FileReader.cs
  44. +2 −2 IronRubyMvc/Core/IPathProvider.cs
  45. +1 −1 IronRubyMvc/Core/IReader.cs
  46. +2 −3 IronRubyMvc/Core/IRubyEngine.cs
  47. +1 −1 IronRubyMvc/Core/IScriptRunner.cs
  48. +1 −1 IronRubyMvc/Core/Reader.cs
  49. +109 −103 IronRubyMvc/Core/RubyEngine.cs
  50. +2 −5 IronRubyMvc/Core/RubyMvcApplication.cs
  51. +8 −9 IronRubyMvc/{Routing → Core}/RubyRouteCollection.cs
  52. +2 −4 IronRubyMvc/Core/ScopedScriptRunner.cs
  53. +1 −1 IronRubyMvc/Core/VirtualPathProvider.cs
  54. +0 −48 IronRubyMvc/Extensions/DictionaryExtensions.cs
  55. +15 −0 IronRubyMvc/Extensions/FilterInfoExtensions.cs
  56. +83 −0 IronRubyMvc/Extensions/IDictionaryExtensions.cs
  57. +22 −71 IronRubyMvc/Extensions/IEnumerableExtensions.cs
  58. +11 −11 IronRubyMvc/Extensions/Inflector.cs
  59. +1 −1 IronRubyMvc/Extensions/ObjectExtensions.cs
  60. +5 −1 IronRubyMvc/Extensions/StringExtensions.cs
  61. +95 −42 IronRubyMvc/GlobalSuppressions.cs
  62. +6 −7 IronRubyMvc/Helpers/DescriptorUtil.cs
  63. +0 −81 IronRubyMvc/Helpers/HashConverter.cs
  64. +0 −72 IronRubyMvc/Helpers/HashToActionFilterConverter.cs
  65. +0 −42 IronRubyMvc/Helpers/HashToAuthorizationFilterConverter.cs
  66. +0 −57 IronRubyMvc/Helpers/HashToExceptionFilterConverter.cs
  67. +0 −67 IronRubyMvc/Helpers/HashToResultFilterConverter.cs
  68. +2 −3 IronRubyMvc/Helpers/HashWrapper.cs
  69. +2 −3 IronRubyMvc/Helpers/RubyHtmlHelper.cs
  70. +2 −3 IronRubyMvc/Helpers/RubyUrlHelper.cs
  71. +0 −28 IronRubyMvc/Helpers/SymbolConstants.cs
  72. +1 −2 IronRubyMvc/Properties/AssemblyInfo.cs
  73. +6 −14 IronRubyMvc/{IronRubyMvcLibrary.csproj → System.Web.Mvc.IronRuby.csproj}
  74. +6 −7 IronRubyMvc/ViewEngine/RubyScriptBlock.cs
  75. +8 −10 IronRubyMvc/ViewEngine/RubyTemplate.cs
  76. +8 −11 IronRubyMvc/ViewEngine/RubyView.cs
  77. +2 −5 IronRubyMvc/ViewEngine/RubyViewEngine.cs
  78. +2 −2 IronRubyMvcWeb/Global.asax.cs
  79. +2 −2 IronRubyMvcWeb/IronRubyMvcWeb.csproj
  80. +1 −1 Pictures/Global.asax.cs
  81. +2 −2 Pictures/Pictures.csproj
View
@@ -19,4 +19,5 @@ IronRubyMvcLibrarySpecs/bin/*.*.lastcodeanalysissucceeded
IronRubyMvc/Controllers/._controller.rb
IronRubyMvc/Core/._RubyEngine.cs
dependencies/IronRuby.Tests.exe
-dependencies/IronRuby.Tests.pdb
+dependencies/IronRuby.Tests.pdb
+IronRubyMvcLibrarySpecs/bin/*.*
@@ -4,17 +4,21 @@
using System.Collections.Generic;
using System.Text;
using System.Web.Mvc;
+using System.Web.Mvc.IronRuby.Controllers;
+using System.Web.Mvc.IronRuby.Core;
+using System.Web.Mvc.IronRuby.Tests.Core;
+using System.Web.Mvc.IronRuby.Tests.Core;
using System.Web.Routing;
-using IronRubyMvcLibrary.Controllers;
-using IronRubyMvcLibrary.Core;
-using IronRubyMvcLibrary.Tests.Core;
+using System.Web.Mvc.IronRuby.Controllers;
+using System.Web.Mvc.IronRuby.Core;
+using System.Web.Mvc.IronRuby.Tests.Core;
using Moq.Mvc;
using Rhino.Mocks;
using Xunit;
#endregion
-namespace IronRubyMvcLibrary.Tests.Controllers
+namespace System.Web.Mvc.IronRuby.Tests.Controllers
{
public abstract class with_ironruby_and_an_engine_initialized<SystemUnderTest> :
with_ironruby_initialized<SystemUnderTest> where SystemUnderTest : class
@@ -1,12 +1,13 @@
using System.Text;
using System.Web.Mvc;
+using System.Web.Mvc.IronRuby.Controllers;
using System.Web.Routing;
-using IronRubyMvcLibrary.Controllers;
-using IronRubyMvcLibrary.Extensions;
+using System.Web.Mvc.IronRuby.Controllers;
+using System.Web.Mvc.IronRuby.Extensions;
using Moq.Mvc;
using Xunit;
-namespace IronRubyMvcLibrary.Tests.Controllers
+namespace System.Web.Mvc.IronRuby.Tests.Controllers
{
[Concern(typeof (RubyControllerActionInvoker))]
public class when_the_action_invoker_is_initialized : with_ironruby_and_an_engine_initialized<RubyControllerActionInvoker>
@@ -1,13 +1,14 @@
using System.Text;
using System.Web.Mvc;
+using System.Web.Mvc.IronRuby.Controllers;
using System.Web.Routing;
using IronRuby.Builtins;
-using IronRubyMvcLibrary.Controllers;
-using IronRubyMvcLibrary.Extensions;
+using System.Web.Mvc.IronRuby.Controllers;
+using System.Web.Mvc.IronRuby.Extensions;
using Moq.Mvc;
using Xunit;
-namespace IronRubyMvcLibrary.Tests.Controllers
+namespace System.Web.Mvc.IronRuby.Tests.Controllers
{
[Concern(typeof (RubyControllerDescriptor))]
@@ -1,13 +1,15 @@
using System;
using System.Web.Mvc;
+using System.Web.Mvc.IronRuby.Controllers;
+using System.Web.Mvc.IronRuby.Core;
using System.Web.Routing;
-using IronRubyMvcLibrary.Controllers;
-using IronRubyMvcLibrary.Core;
+using System.Web.Mvc.IronRuby.Controllers;
+using System.Web.Mvc.IronRuby.Core;
using Moq;
using Moq.Mvc;
using Xunit;
-namespace IronRubyMvcLibrary.Tests.Controllers
+namespace System.Web.Mvc.IronRuby.Tests.Controllers
{
[Concern(typeof (RubyControllerFactory))]
public class when_a_ruby_controller_needs_to_be_resolved : InstanceContextSpecification<RubyControllerFactory>
@@ -5,18 +5,19 @@
using System.Collections.Specialized;
using System.Text;
using System.Web.Mvc;
+using System.Web.Mvc.IronRuby.Controllers;
using System.Web.Routing;
using IronRuby.Builtins;
-using IronRubyMvcLibrary.Controllers;
-using IronRubyMvcLibrary.Extensions;
+using System.Web.Mvc.IronRuby.Controllers;
+using System.Web.Mvc.IronRuby.Extensions;
using Microsoft.Scripting;
using Moq.Mvc;
using Xunit;
using System;
#endregion
-namespace IronRubyMvcLibrary.Tests.Controllers
+namespace System.Web.Mvc.IronRuby.Tests.Controllers
{
[Concern(typeof (RubyController))]
public class when_a_controller_is_initialized : with_ironruby_and_an_engine_initialized<RubyController>
@@ -1,12 +1,13 @@
#region Usings
using System;
-using IronRubyMvcLibrary.Core;
+using System.Web.Mvc.IronRuby.Core;
+using System.Web.Mvc.IronRuby.Core;
using Xunit;
#endregion
-namespace IronRubyMvcLibrary.Tests.Core
+namespace System.Web.Mvc.IronRuby.Tests.Core
{
[Concern(typeof (AssemblyResourceReader))]
public class when_reading_a_resource_and_an_existing_path_is_given :
@@ -1,15 +1,16 @@
#region Usings
using System;
+using System.Web.Mvc.IronRuby.Core;
using IronRuby;
using IronRuby.Runtime;
-using IronRubyMvcLibrary.Core;
+using System.Web.Mvc.IronRuby.Core;
using Microsoft.Scripting.Hosting;
using Xunit;
#endregion
-namespace IronRubyMvcLibrary.Tests.Core
+namespace System.Web.Mvc.IronRuby.Tests.Core
{
public abstract class with_ironruby_initialized<SystemUnderTest> : InstanceContextSpecification<SystemUnderTest>
where SystemUnderTest : class
@@ -2,12 +2,13 @@
using System;
using System.IO;
-using IronRubyMvcLibrary.Core;
+using System.Web.Mvc.IronRuby.Core;
+using System.Web.Mvc.IronRuby.Core;
using Xunit;
#endregion
-namespace IronRubyMvcLibrary.Tests.Core
+namespace System.Web.Mvc.IronRuby.Tests.Core
{
[Concern(typeof (FileReader))]
public class when_reading_a_file_and_an_existing_path_is_given : InstanceContextSpecification<FileReader>
@@ -2,14 +2,15 @@
using System.Collections;
using System.Web.Mvc;
+using System.Web.Mvc.IronRuby.Core;
using System.Web.Routing;
-using IronRubyMvcLibrary.Core;
-using IronRubyMvcLibrary.Extensions;
+using System.Web.Mvc.IronRuby.Core;
+using System.Web.Mvc.IronRuby.Extensions;
using Xunit;
#endregion
-namespace IronRubyMvcLibrary.Tests.Core
+namespace System.Web.Mvc.IronRuby.Tests.Core
{
[Concern(typeof (RubyRouteCollection))]
public class when_a_value_is_mapped : InstanceContextSpecification<RubyRouteCollection>
@@ -5,18 +5,21 @@
using System.Text;
using System.Web;
using System.Web.Mvc;
+using System.Web.Mvc.IronRuby.Controllers;
+using System.Web.Mvc.IronRuby.Core;
+using System.Web.Mvc.IronRuby.ViewEngine;
using System.Web.Routing;
using IronRuby.Builtins;
-using IronRubyMvcLibrary.Controllers;
-using IronRubyMvcLibrary.Core;
-using IronRubyMvcLibrary.Extensions;
-using IronRubyMvcLibrary.ViewEngine;
+using System.Web.Mvc.IronRuby.Controllers;
+using System.Web.Mvc.IronRuby.Core;
+using System.Web.Mvc.IronRuby.Extensions;
+using System.Web.Mvc.IronRuby.ViewEngine;
using Moq;
using Xunit;
#endregion
-namespace IronRubyMvcLibrary.Tests.Core
+namespace System.Web.Mvc.IronRuby.Tests.Core
{
[Concern(typeof (RubyEngine))]
public class when_asked_for_controller_class_name : StaticContextSpecification
@@ -1,12 +1,13 @@
#region Usings
using System;
-using IronRubyMvcLibrary.Core;
+using System.Web.Mvc.IronRuby.Core;
+using System.Web.Mvc.IronRuby.Core;
using Xunit;
#endregion
-namespace IronRubyMvcLibrary.Tests.Core
+namespace System.Web.Mvc.IronRuby.Tests.Core
{
[Concern(typeof (ScopedScriptRunner))]
public class when_a_file_is_provided_to_scoped : with_ironruby_initialized<ScopedScriptRunner>
@@ -4,7 +4,7 @@
using System.Web.Mvc;
using System.Web.Routing;
using IronRuby.Builtins;
-using IronRubyMvcLibrary.Extensions;
+using System.Web.Mvc.IronRuby.Extensions;
using Xunit;
#endregion
@@ -2,7 +2,7 @@
using System.Collections;
using System.Collections.Generic;
-using IronRubyMvcLibrary.Extensions;
+using System.Web.Mvc.IronRuby.Extensions;
using Xunit;
#endregion
@@ -1,7 +1,7 @@
#region Usings
using System.Collections.Generic;
-using IronRubyMvcLibrary.Extensions;
+using System.Web.Mvc.IronRuby.Extensions;
using Xunit;
#endregion
@@ -1,11 +1,11 @@
#region Usings
-using IronRubyMvcLibrary.Extensions;
+using System.Web.Mvc.IronRuby.Extensions;
using Xunit;
#endregion
-namespace IronRubyMvcLibrary.Tests.Extensions
+namespace System.Web.Mvc.IronRuby.Tests.Extensions
{
public class ObjectExtensionsFixture
{
@@ -1,7 +1,7 @@
#region Usings
using System;
-using IronRubyMvcLibrary.Extensions;
+using System.Web.Mvc.IronRuby.Extensions;
using Xunit;
#endregion
@@ -118,9 +118,9 @@
<Compile Include="ViewEngine\RubyTemplateTests.cs" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\IronRubyMvc\IronRubyMvcLibrary.csproj">
+ <ProjectReference Include="..\IronRubyMvc\System.Web.Mvc.IronRuby.csproj">
<Project>{46333EBB-C1FF-4E28-B48E-CB3D5BB70CDB}</Project>
- <Name>IronRubyMvcLibrary</Name>
+ <Name>System.Web.Mvc.IronRuby</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@@ -7,15 +7,15 @@
using IronRuby.Builtins;
using IronRuby.Runtime;
using IronRuby.Runtime.Calls;
-using IronRubyMvcLibrary.Extensions;
+using System.Web.Mvc.IronRuby.Extensions;
using Microsoft.Scripting;
using Microsoft.Scripting.Hosting;
using Microsoft.Scripting.Runtime;
using Xunit;
#endregion
-namespace IronRubyMvcLibrary.Tests
+namespace System.Web.Mvc.IronRuby.Tests
{
public class RubyRuntime
{
@@ -6,7 +6,7 @@
#endregion
-namespace IronRubyMvcLibrary.Tests
+namespace System.Web.Mvc.IronRuby.Tests
{
public static class UnitTestHelpers
{
@@ -1,13 +1,14 @@
#region Usings
using System;
-using IronRubyMvcLibrary.Extensions;
-using IronRubyMvcLibrary.ViewEngine;
+using System.Web.Mvc.IronRuby.Extensions;
+using System.Web.Mvc.IronRuby.ViewEngine;
+using System.Web.Mvc.IronRuby.ViewEngine;
using Xunit;
#endregion
-namespace IronRubyMvcLibrary.Tests
+namespace System.Web.Mvc.IronRuby.Tests
{
public class RubyTemplateTests
{
View
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IronRubyMvcLibrary", "IronRubyMvc\IronRubyMvcLibrary.csproj", "{46333EBB-C1FF-4E28-B48E-CB3D5BB70CDB}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Mvc.IronRuby", "IronRubyMvc\System.Web.Mvc.IronRuby.csproj", "{46333EBB-C1FF-4E28-B48E-CB3D5BB70CDB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pictures", "Pictures\Pictures.csproj", "{3C0B630F-5168-41D4-91E6-C57BBC84B7C6}"
EndProject
Binary file not shown.
@@ -1,12 +1,12 @@
#region Usings
+using System.Web.Mvc.IronRuby.Core;
using System.Web.Routing;
using IronRuby.Builtins;
-using IronRubyMvcLibrary.Core;
#endregion
-namespace IronRubyMvcLibrary.Controllers
+namespace System.Web.Mvc.IronRuby.Controllers
{
internal class ControllerConfiguration
{
Oops, something went wrong.

0 comments on commit 409735a

Please sign in to comment.