seabass 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1,2 +1 @@
1
- 0.1.1
2
-
1
+ 0.2.0
@@ -26,3 +26,4 @@ install 'rake'
26
26
  install 'albacore'
27
27
  install 'jeweler'
28
28
  install 'rspec'
29
+ install 'mocha'
@@ -0,0 +1,3 @@
1
+ create_task :robocopy, Proc.new { FeatureConsumer.new } do |r|
2
+ r.execute
3
+ end
@@ -0,0 +1,3 @@
1
+ create_task :robocopy, Proc.new { FeaturePackage.new } do |r|
2
+ r.execute
3
+ end
@@ -0,0 +1,3 @@
1
+ create_task :website_deploy_verification, Proc.new { WebsiteDeployVerifier.new } do |r|
2
+ r.execute
3
+ end
@@ -0,0 +1,24 @@
1
+ require 'ftools'
2
+
3
+ class FeatureConsumer
4
+ attr_accessor :package_dir, :consumer_dir, :application_name
5
+
6
+ def execute()
7
+ raise "The directory containing the packages has not been specified" if @package_dir.nil?
8
+ raise "The directory packages should be copied to has not been specified" if @consumer_dir.nil?
9
+ raise "The name of the application has not been specified" if @application_name.nil?
10
+
11
+ Dir[@package_dir + "/#{@application_name}/**/**"].each do |resource|
12
+ raise "Could not find the app name in the resource type" if resource.match(/.*\/#{@application_name}\/(.*)/).nil?
13
+
14
+ destination = File.expand_path(File.join(@consumer_dir, $1))
15
+ next if File.directory?(resource)
16
+
17
+ dir = File.expand_path(File.dirname(destination))
18
+ FileUtils.mkdir_p(dir) if false == File.exists?(dir)
19
+
20
+ puts "Copying #{resource} to #{destination}"
21
+ File.copy(resource, destination)
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,45 @@
1
+ require 'ftools'
2
+ require 'yaml'
3
+
4
+ class FeaturePackager
5
+
6
+ attr_accessor :source_dir, :package_dir, :valid_file_types
7
+
8
+ def initialize()
9
+ @valid_file_types = ['aspx', 'ascx', 'js', 'css', 'png', 'gif', 'jpeg', 'dll']
10
+ end
11
+
12
+ def execute()
13
+ raise "Please specify the directory where the features to package exist" if @source_dir.nil?
14
+ raise "Please specify the directory packages should be placed into" if @package_dir.nil?
15
+
16
+ Dir[@source_dir + '/**/.feature'].each do |feature|
17
+ next if File.basename(File.dirname(feature)).downcase == File.basename(@source_dir).downcase
18
+
19
+ feature_config = YAML.load(File.read(feature))
20
+ raise "The feature config does not contain the destination name" if !feature_config.has_key?('destination_name')
21
+
22
+ destination = File.expand_path(File.join(@package_dir, feature_config['destination_name']))
23
+ FileUtils.mkdir_p(destination)
24
+
25
+ feature_root = File.expand_path(File.dirname(feature) + '/../')
26
+
27
+ Dir[feature_root + '/**/**'].each do |file|
28
+ next if File.directory?(file)
29
+ next if is_not_valid_file_type(file)
30
+ file_destination = File.join(destination, file.gsub(/#{feature_root}/, ''))
31
+ FileUtils.mkdir_p(File.dirname(file_destination)) if(!File.exists?(File.dirname(file_destination)))
32
+ File.copy(file, file_destination)
33
+ end
34
+ end
35
+ end
36
+
37
+ private
38
+
39
+ def is_not_valid_file_type(file)
40
+ @valid_file_types.each do |v|
41
+ return false if !file.match(/\.#{v}$/).nil?
42
+ end
43
+ return true
44
+ end
45
+ end
@@ -0,0 +1,38 @@
1
+ class WebsiteDeployFailed < Exception
2
+ end
3
+
4
+ class WebsiteDeployVerifier
5
+
6
+ attr_accessor :url, :type
7
+
8
+ def initialize(downloader = Downloader.new)
9
+ @downloader = downloader
10
+ debugger
11
+ end
12
+
13
+ def execute()
14
+ debugger
15
+ raise "Url not specified" if @url.nil?
16
+ raise "Application type not specified" if @type.nil?
17
+
18
+ if (@downloader.download(@url) =~ /<title>Exception of type '.*' was thrown<\title>/) != nil
19
+
20
+ raise WebsiteDeployFailed
21
+ end
22
+ true
23
+ end
24
+ end
25
+
26
+ class WebsiteRegexs
27
+
28
+ def self.aspnet()
29
+ "<title>Exception of type '.*' was thrown.</title>"
30
+ end
31
+
32
+ end
33
+
34
+ class Downloader
35
+ def download(url)
36
+
37
+ end
38
+ end
data/rakefile.rb CHANGED
@@ -1,5 +1,3 @@
1
- require 'lib/seabass'
2
-
3
1
  namespace :specs do
4
2
  require 'spec/rake/spectask'
5
3
 
@@ -12,17 +10,6 @@ namespace :specs do
12
10
  end
13
11
  end
14
12
 
15
- namespace :example do
16
- require 'rubygems'
17
-
18
- robocopy do |r|
19
- r.files << "foo.txt"
20
- r.files << "bar.txt"
21
- r.directories << "baz"
22
- r.destination = "foo"
23
- end
24
- end
25
-
26
13
  namespace :jeweler do
27
14
  begin
28
15
  require 'jeweler'
@@ -39,6 +26,7 @@ namespace :jeweler do
39
26
  gs.add_dependency('albacore', '>= 0.1.5')
40
27
  gs.add_development_dependency('rspec', '>= 1.2.8')
41
28
  gs.add_development_dependency('jeweler', '>= 1.2.1')
29
+ gs.add_development_dependency('mocha', '>= 0.9.8')
42
30
  end
43
31
  Jeweler::GemcutterTasks.new
44
32
  rescue LoadError
@@ -0,0 +1,110 @@
1
+ <html>
2
+ <head>
3
+ <title>Exception of type 'System.Exception' was thrown.</title>
4
+ <style>
5
+ body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
6
+ p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
7
+ b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
8
+ H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
9
+ H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
10
+ pre {font-family:"Lucida Console";font-size: .9em}
11
+ .marker {font-weight: bold; color: black;text-decoration: none;}
12
+ .version {color: gray;}
13
+ .error {margin-bottom: 10px;}
14
+ .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
15
+ </style>
16
+ </head>
17
+
18
+ <body bgcolor="white">
19
+
20
+ <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
21
+
22
+ <h2> <i>Exception of type 'System.Exception' was thrown.</i> </h2></span>
23
+
24
+ <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
25
+
26
+ <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
27
+
28
+ <br><br>
29
+
30
+ <b> Exception Details: </b>System.Exception: Exception of type 'System.Exception' was thrown.<br><br>
31
+
32
+ <b>Source Error:</b> <br><br>
33
+
34
+ <table width=100% bgcolor="#ffffcc">
35
+ <tr>
36
+ <td>
37
+ <code><pre>
38
+
39
+ Line 19: public ActionResult Index()
40
+ Line 20: {
41
+ <font color=red>Line 21: throw new Exception();
42
+ </font>Line 22:
43
+ Line 23: if (!String.IsNullOrEmpty(UserReturnMessage))</pre></code>
44
+
45
+ </td>
46
+ </tr>
47
+ </table>
48
+
49
+ <br>
50
+
51
+ <b> Source File: </b> C:\Foo.cs<b> &nbsp;&nbsp; Line: </b> 21
52
+ <br><br>
53
+
54
+ <b>Stack Trace:</b> <br><br>
55
+
56
+ <table width=100% bgcolor="#ffffcc">
57
+ <tr>
58
+ <td>
59
+ <code><pre>
60
+
61
+ [Exception: Exception of type 'System.Exception' was thrown.]
62
+ lambda_method(ExecutionScope , ControllerBase , Object[] ) +30
63
+ System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +236
64
+ System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +31
65
+ System.Web.Mvc.&lt;&gt;c__DisplayClassd.&lt;InvokeActionMethodWithFilters&gt;b__a() +85
66
+ System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +657347
67
+ System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +288
68
+ System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +658084
69
+ System.Web.Mvc.Controller.ExecuteCore() +125
70
+ System.Web.Mvc.&lt;&gt;c__DisplayClass8.&lt;BeginProcessRequest&gt;b__4() +48
71
+ System.Web.Mvc.Async.&lt;&gt;c__DisplayClass1.&lt;MakeVoidDelegate&gt;b__0() +21
72
+ System.Web.Mvc.Async.&lt;&gt;c__DisplayClass8`1.&lt;BeginSynchronous&gt;b__7(IAsyncResult _) +15
73
+ System.Web.Mvc.Async.WrappedAsyncResult`1.End() +85
74
+ System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +51
75
+ System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +454
76
+ System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +263
77
+ </pre></code>
78
+
79
+ </td>
80
+ </tr>
81
+ </table>
82
+
83
+ <br>
84
+
85
+ <hr width=100% size=1 color=silver>
86
+
87
+ <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
88
+
89
+ </font>
90
+
91
+ </body>
92
+ </html>
93
+ <!--
94
+ [Exception]: Exception of type 'System.Exception' was thrown.
95
+ at lambda_method(ExecutionScope , ControllerBase , Object[] )
96
+ at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
97
+ at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
98
+ at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClassd.<InvokeActionMethodWithFilters>b__a()
99
+ at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
100
+ at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
101
+ at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
102
+ at System.Web.Mvc.Controller.ExecuteCore()
103
+ at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__4()
104
+ at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
105
+ at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
106
+ at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
107
+ at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
108
+ at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
109
+ at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
110
+ -->
@@ -0,0 +1,101 @@
1
+
2
+
3
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
+ <html id="ctl00_pageHtmlTag" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns="http://www.w3.org/1999/xhtml" lang="en-GB" xml:lang="en-GB">
5
+ <head id="ctl00_pageHtmlHead"><title>
6
+ toptable - Restaurants, Reviews, Offers and Restaurant Booking
7
+ </title><link rel="canonical" href="http://toptable.com/" /><link href="styles/tt-styles.css?ver=19.0" rel="stylesheet" type="text/css" media="screen, print" /><link href="styles/print-min.css?ver=19.0" rel="stylesheet" type="text/css" media="print" />
8
+ <!--[if IE 6]>
9
+ <link href="styles/ie6.css?ver=19.0" rel="stylesheet" type="text/css" media="screen, print" />
10
+ <![endif]-->
11
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta id="ctl00_metaDescription" name="description" content="UK and Europe's leading restaurant reservation site - diner reviews, special offers and online booking. All free, fast and confirmed." /><meta id="ctl00_metaKeywords" name="keywords" content="venue, restaurant, bar, club, reviews, booking, online" /><meta name="verify-v1" content="s8S0ny2OsScY8FTcpYDNVcYaVdTURdJ6kReJCa2itCI=" /><meta name="msvalidate.01" content="284B9E010AE04E7A5C7709C5425A6605" /><link rel="apple-touch-icon" href="images/icons/iphone-homescreen.png" /><link href="/home/WebResource.axd?d=pPyiEUtn0pvBAnLkfcFmsCBZpn10hZQ-g7SR3D8ta3UkzGvlLexhSxaX6eQlLiY6ouSNL9_ncb0xOjJNL_XOJg2&amp;t=634158490690898055" type="text/css" rel="stylesheet" /></head>
12
+ <body id="ctl00_pageBody">
13
+ <form name="aspnetForm" method="post" action="" id="aspnetForm">
14
+
15
+ </form>
16
+ <script type="text/javascript">
17
+ //<![CDATA[
18
+ var theForm = document.forms['aspnetForm'];
19
+ if (!theForm) {
20
+ theForm = document.aspnetForm;
21
+ }
22
+ function __doPostBack(eventTarget, eventArgument) {
23
+ if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
24
+ theForm.__EVENTTARGET.value = eventTarget;
25
+ theForm.__EVENTARGUMENT.value = eventArgument;
26
+ theForm.submit();
27
+ }
28
+ }
29
+ //]]>
30
+ </script><script src="/home/WebResource.axd?d=0Yz8OC54vhz2Jy161N8JaQ2&amp;t=634051148591131846" type="text/javascript"></script><script src="/home/ScriptResource.axd?d=L7YJV0cjjBPfOr6_DGJalUrlxsTKFiRDXlkcd4hpxFUULEuvcUcSBvQfQjTod7UQi6JqYoKFV2hl2TXkBjBhgw2&amp;t=1fdc34a" type="text/javascript"></script><script type="text/javascript">
31
+ //<![CDATA[
32
+ var __cultureInfo = '{"name":"en-GB","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":".","IsReadOnly":false,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"£","NaNSymbol":"NaN","CurrencyNegativePattern":1,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"‰","NativeDigits":["0","1","2","3","4","5","6","7","8","9"],"DigitSubstitution":1},"dateTimeFormat":{"AMDesignator":"AM","Calendar":{"MinSupportedDateTime":"\/Date(-62135596800000)\/","MaxSupportedDateTime":"\/Date(253402300799999)\/","AlgorithmType":1,"CalendarType":1,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":false},"DateSeparator":"/","FirstDayOfWeek":1,"CalendarWeekRule":0,"FullDateTimePattern":"dd MMMM yyyy HH:mm:ss","LongDatePattern":"dd MMMM yyyy","LongTimePattern":"HH:mm:ss","MonthDayPattern":"dd MMMM","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy HH\u0027:\u0027mm\u0027:\u0027ss \u0027GMT\u0027","ShortDatePattern":"dd/MM/yyyy","ShortTimePattern":"HH:mm","SortableDateTimePattern":"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\u0027-\u0027MM\u0027-\u0027dd HH\u0027:\u0027mm\u0027:\u0027ss\u0027Z\u0027","YearMonthPattern":"MMMM yyyy","AbbreviatedDayNames":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"ShortestDayNames":["Su","Mo","Tu","We","Th","Fr","Sa"],"DayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"AbbreviatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"IsReadOnly":false,"NativeCalendarName":"Gregorian Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""]}}';//]]>
33
+ </script><script src="/home/ScriptResource.axd?d=ZG1M1St-ywb86nnEsfeOp7azf1boTqFFmfIA7xocGDMUsPlGKsPqeGJp8yyEeG9XppBp7WpW2e-VhFzMJIAIRLX6EeBFYcp06RU6lMUvFbg1&amp;t=ffffffff8766d9d2" type="text/javascript"></script><script src="/home/ScriptResource.axd?d=ZG1M1St-ywb86nnEsfeOp7azf1boTqFFmfIA7xocGDMUsPlGKsPqeGJp8yyEeG9XuZpt3NZMe5IKbT2GfKzQ7Noufk_XxeYTiX-pYn0Z2PY1&amp;t=ffffffff8766d9d2" type="text/javascript"></script><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script><script type="text/javascript" src="http://toptable.com/script/scripts.ashx?js=a%2cb%2cc%2ce%2cj%2cl%2cp%2cq%2cr%2cs%2ct"></script><script src="Externals/Scripts/InternationalLocLinks-min.js?ver=19.0" type="text/javascript"></script><script src="Externals/Scripts/NavLoginControl-min.js?ver=19.0" type="text/javascript"></script><script src="/home/ScriptResource.axd?d=hz4xdQOOkPjRWBuK1G4_3wRnCnr4BI8LNqyCu6j4Q6xb__Efphuq_YSfOflZEBVZxPucBlgzSMYu4hoY1g32GA2&amp;t=ffffffff982386eb" type="text/javascript"></script><script src="/home/ScriptResource.axd?d=hz4xdQOOkPjRWBuK1G4_3wRnCnr4BI8LNqyCu6j4Q6xkGg_h3M5ZvBiUMzT1ryuhC8L7KkEKwe2x_XFZDigZ21Jqr2K9vfxnnD2W1MjwqAE1&amp;t=ffffffff982386eb" type="text/javascript"></script><script src="/home/ScriptResource.axd?d=hz4xdQOOkPjRWBuK1G4_3wRnCnr4BI8LNqyCu6j4Q6w3KtD_IEaeArNxmBjvVRuOOemzfdEsh7kU1h7lsCvy6owJY0q4geXy0jbVvtqXGfY1&amp;t=ffffffff982386eb" type="text/javascript"></script><script src="/home/ScriptResource.axd?d=hz4xdQOOkPjRWBuK1G4_3wRnCnr4BI8LNqyCu6j4Q6wdcfXZp0aoQTVbT4ql2REFMPa23Fur_Sap52NkxgYyt2-XPa9ronF0KPobfDZZwUHKPjIIg2RIvDe-aGJ_Za_o0&amp;t=ffffffff982386eb" type="text/javascript"></script><script src="/home/ScriptResource.axd?d=hz4xdQOOkPjRWBuK1G4_3wRnCnr4BI8LNqyCu6j4Q6xmZOrYJ7592dxYu4xsKbY2B1c6v4Yobi2dQivrPqPUOQ2&amp;t=ffffffff982386eb" type="text/javascript"></script><script src="/home/ScriptResource.axd?d=hz4xdQOOkPjRWBuK1G4_3wRnCnr4BI8LNqyCu6j4Q6zqlu2BSSzowEyBaTzcN-UOUFeLPN3DC6F8vasgKspyDw2&amp;t=ffffffff982386eb" type="text/javascript"></script><script src="/home/ScriptResource.axd?d=hz4xdQOOkPjRWBuK1G4_3wRnCnr4BI8LNqyCu6j4Q6zqlu2BSSzowEyBaTzcN-UOe5vMHgZBD6orIKSPZ5x9gRRf9y4ui-a6RP9ndskqXiQ1&amp;t=ffffffff982386eb" type="text/javascript"></script><script src="/home/ScriptResource.axd?d=hz4xdQOOkPjRWBuK1G4_3wRnCnr4BI8LNqyCu6j4Q6y1e0NVCLTNzpKJJHDpfU_7dJrGTMusB5qMzNG4Lzz6sHVGNgHPJM1uONpWudINAX81&amp;t=ffffffff982386eb" type="text/javascript"></script><script src="/home/ScriptResource.axd?d=hz4xdQOOkPjRWBuK1G4_3wRnCnr4BI8LNqyCu6j4Q6wFY7R7nue-wCtnr2Az2diFwuCQKYtC9JCwpnQOQtgIjZJ4aPtrZ-bIfLuxJdTJ3Jo1&amp;t=ffffffff982386eb" type="text/javascript"></script><script src="webservices/freetextsearch.svc/js" type="text/javascript"></script><script src="webservices/VenueAvailability.svc/js" type="text/javascript"></script><script type="text/javascript">
34
+ //<![CDATA[
35
+ function WebForm_OnSubmit() {
36
+ if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
37
+ return true;
38
+ }
39
+ //]]>
40
+ </script><script type="text/javascript">
41
+ //<![CDATA[
42
+ Sys.WebForms.PageRequestManager._initialize('ctl00$ScriptManager$ScriptManagerControl', document.getElementById('aspnetForm'));
43
+ Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90);
44
+ //]]>
45
+ </script><script type="text/javascript">showPanelBlock1(document.getElementById('tab1'), 'tabPanel1');</script><script type="text/javascript">showPanelBlock2(document.getElementById('tab3'), 'tabPanel3');</script><script type="text/javascript">
46
+ var _gaq = _gaq || [];
47
+ _gaq.push(['_setAccount', 'UA-2621903-4']);
48
+ _gaq.push(['_setDomainName', 'none']);
49
+ _gaq.push(['_setAllowLinker', true]);
50
+ _gaq.push(['_trackPageview']);
51
+ </script><script type="text/javascript">
52
+ (function() {
53
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
54
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
55
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
56
+ })();
57
+ </script><script type="text/javascript">
58
+ //<![CDATA[
59
+ var Page_ValidationSummaries = new Array(document.getElementById("ctl00_SearchBox_QuickSearchValidationSummary"));
60
+ var Page_Validators = new Array(document.getElementById("ctl00_Body_VenueFinderControl_DatePickerControl_DateCustomValidator"));
61
+ //]]>
62
+ </script><script type="text/javascript">
63
+ //<![CDATA[
64
+ var ctl00_SearchBox_QuickSearchValidationSummary = document.all ? document.all["ctl00_SearchBox_QuickSearchValidationSummary"] : document.getElementById("ctl00_SearchBox_QuickSearchValidationSummary");
65
+ ctl00_SearchBox_QuickSearchValidationSummary.validationGroup = "QuickSearch";
66
+ var ctl00_Body_VenueFinderControl_DatePickerControl_DateCustomValidator = document.all ? document.all["ctl00_Body_VenueFinderControl_DatePickerControl_DateCustomValidator"] : document.getElementById("ctl00_Body_VenueFinderControl_DatePickerControl_DateCustomValidator");
67
+ ctl00_Body_VenueFinderControl_DatePickerControl_DateCustomValidator.display = "None";
68
+ ctl00_Body_VenueFinderControl_DatePickerControl_DateCustomValidator.validationGroup = "VenueFinder";
69
+ ctl00_Body_VenueFinderControl_DatePickerControl_DateCustomValidator.evaluationfunction = "CustomValidatorEvaluateIsValid";
70
+ //]]>
71
+ </script><script type="text/javascript">
72
+ //<![CDATA[
73
+
74
+ document.getElementById('ctl00_SearchBox_QuickSearchValidationSummary').dispose = function() {
75
+ Array.remove(Page_ValidationSummaries, document.getElementById('ctl00_SearchBox_QuickSearchValidationSummary'));
76
+ }
77
+
78
+ var Page_ValidationActive = false;
79
+ if (typeof(ValidatorOnLoad) == "function") {
80
+ ValidatorOnLoad();
81
+ }
82
+
83
+ function ValidatorOnSubmit() {
84
+ if (Page_ValidationActive) {
85
+ return ValidatorCommonOnSubmit();
86
+ }
87
+ else {
88
+ return true;
89
+ }
90
+ }
91
+ Sys.Application.initialize();
92
+ Sys.Application.add_init(function() {
93
+ $create(AjaxControlToolkit.DropDownBehavior, {"dropArrowBackgroundColor":"Transparent","dropArrowImageUrl":"images/blank.png","dropDownControl":$get("ctl00_LanguageSelector_OptionsPanel"),"dynamicServicePath":"/Home/default.aspx","highlightBackgroundColor":"White","highlightBorderColor":"#CCCCCC","id":"ctl00_LanguageSelector_LanguagesExtender"}, null, null, $get("ctl00_LanguageSelector_languagescontainer"));
94
+ });
95
+
96
+ document.getElementById('ctl00_Body_VenueFinderControl_DatePickerControl_DateCustomValidator').dispose = function() {
97
+ Array.remove(Page_Validators, document.getElementById('ctl00_Body_VenueFinderControl_DatePickerControl_DateCustomValidator'));
98
+ }
99
+ //]]>
100
+ </script></body>
101
+ </html>
data/specs/specs.rb ADDED
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+ require 'spec'
3
+ require 'mocha'
4
+ require File.dirname(__FILE__) + '/../lib/seabass'
5
+
6
+ Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)), 'mocks/*.rb')).each {|f| require f }
@@ -0,0 +1,57 @@
1
+ require File.dirname(__FILE__) + '/specs'
2
+
3
+ describe "When I verify an asp.net application which has NOT successfully been deployed" do
4
+
5
+ before(:all) do
6
+ @downloader = mock()
7
+ @downloader.expects(:download).returns(Deploys.aspnet_failed)
8
+ @verifier = WebsiteDeployVerifier.new(@downloader)
9
+ @verifier.type = "aspnet"
10
+ @verifier.url = "http://foo.com"
11
+ end
12
+
13
+ it "should it should raise an exception" do
14
+
15
+ lambda { @verifier.execute }.should raise_exception(WebsiteDeployFailed)
16
+ end
17
+ end
18
+
19
+ describe "When I do not specify a url to verify" do
20
+
21
+ before(:all) do
22
+ @verifier = WebsiteDeployVerifier.new(mock())
23
+ end
24
+
25
+ it "should raise an error" do
26
+ lambda { @verifier.execute }.should raise_exception
27
+ end
28
+ end
29
+
30
+ describe "When I verify an asp.net application which has successfully been deployed" do
31
+ before(:all) do
32
+ @downloader = mock()
33
+ @downloader.expects(:download).returns(Deploys.aspnet_success)
34
+ @verifier = WebsiteDeployVerifier.new(@downloader)
35
+ @verifier.url = "http://foo.com"
36
+ @verifier.type = "aspnet"
37
+ end
38
+
39
+ it "should it return true" do
40
+ @verifier.execute.should == true
41
+ end
42
+ end
43
+
44
+
45
+ class Deploys
46
+ def self.method_missing(m, *args)
47
+ return load(m)
48
+ end
49
+
50
+ private
51
+
52
+ def self.load(name)
53
+ return File.read(File.dirname(__FILE__) + "/sample_data/deploys/#{name}.html")
54
+ end
55
+ end
56
+
57
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seabass
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 1
10
- version: 0.1.1
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Hollingworth
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-28 00:00:00 +01:00
18
+ date: 2010-10-24 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -82,6 +82,22 @@ dependencies:
82
82
  version: 1.2.1
83
83
  type: :development
84
84
  version_requirements: *id004
85
+ - !ruby/object:Gem::Dependency
86
+ name: mocha
87
+ prerelease: false
88
+ requirement: &id005 !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ hash: 43
94
+ segments:
95
+ - 0
96
+ - 9
97
+ - 8
98
+ version: 0.9.8
99
+ type: :development
100
+ version_requirements: *id005
85
101
  description: Easily deploy your .NET solutions with Ruby and Rake, using this suite of Rake tasks.
86
102
  email: jamiehollingworth@gmail.com
87
103
  executables: []
@@ -93,11 +109,17 @@ extra_rdoc_files:
93
109
  files:
94
110
  - VERSION
95
111
  - install_dependencies.rb
112
+ - lib/rake/feature_consumer_task.rb
113
+ - lib/rake/feature_packager_task.rb
96
114
  - lib/rake/robocopy_task.rb
115
+ - lib/rake/website_deploy_verifyication_task.rb
97
116
  - lib/seabass.rb
98
117
  - lib/seabass/env.rb
118
+ - lib/seabass/feature_consumer.rb
119
+ - lib/seabass/feature_packager.rb
99
120
  - lib/seabass/log.rb
100
121
  - lib/seabass/robocopy.rb
122
+ - lib/seabass/website_deploy_verifier.rb
101
123
  - lib/tools/robocopy.exe
102
124
  - rakefile.rb
103
125
  - readme.textile
@@ -105,6 +127,10 @@ files:
105
127
  - specs/mocks/mock_executor.rb
106
128
  - specs/mocks/mock_robocopy.rb
107
129
  - specs/robocopy_spec.rb
130
+ - specs/sample_data/deploys/aspnet_failed.html
131
+ - specs/sample_data/deploys/aspnet_success.html
132
+ - specs/specs.rb
133
+ - specs/website_deploy_verifier_spec.rb
108
134
  has_rdoc: true
109
135
  homepage: http://github.com/jhollingworth/seabass
110
136
  licenses: []