This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "SpecHelper.h" | |
#import "CrozSpecialObjectionModule.h" | |
SPEC_BEGIN(CrozSpecialObjectionModuleSpec) | |
describe(@"ClassName", ^{ | |
__block CrozSpecialObjectionModule *target = nil; | |
__block UIWindow *window = nil; | |
beforeEach(^{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "CrozSpecialObjectionModule.h" | |
@implementation CrozSpecialObjectionModule | |
@synthesize window = _window; | |
- (id) initWithWindow:(UIWindow *)window { | |
if ((self = [super init])) { | |
_window = [window retain]; | |
} | |
return self; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface CrozSpecialObjectionModule : ObjectionModule { | |
UIWindow *_window; | |
} | |
@property (nonatomic, readonly, retain) IBOutlet UIWindow *window; | |
- (id) initWithWindow:(UIWindow *)window; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load HexString and automatically extend String: | |
require 'hex_string' | |
# Convert data to human-readable hex tuples: | |
>> "hello".to_hex_string | |
=> "68 65 6c 6c 6f" | |
# Compact a hex string into its data equivalent: | |
>> "77 6f 72 6c 64".to_byte_string | |
=> "world" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load HexString and automatically extend String: | |
require 'hex_string' | |
# Convert data to human-readable hex tuples: | |
>> "hello".to_hex_string | |
=> "68 65 6c 6c 6f" | |
# Compact a hex string into its data equivalent: | |
>> "77 6f 72 6c 64".to_byte_string | |
=> "world" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated. | |
The statement has been terminated. | |
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) | |
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) | |
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() | |
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) | |
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) | |
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) | |
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project DefaultTargets="All" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<UsingTask AssemblyFile="Lib\Migrator.MSBuild.dll" TaskName="Migrator.MSBuild.Migrate" /> | |
<PropertyGroup> | |
<To>-1</To> | |
<Env>Development</Env> | |
<ConnectionString Condition="'$(Env)'=='Development'">Database=myapp_dev;Data Source=localhost;User Id=myuser;Password=abc123</ConnectionString> | |
<ConnectionString Condition="'$(Env)'=='Test'">Database=myapp_test;Data Source=test_db_server;User Id=myuser;Password=abc123</ConnectionString> | |
<ConnectionString Condition="'$(Env)'=='Production'">Database=myapp_prod;Data Source=prod_db_server;User Id=myuser;Password=abc123</ConnectionString> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MvcApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
var assembly = Assembly.GetAssembly(typeof(MvcApplication)); | |
var connectString = ConfigurationManager.ConnectStrings(“ApplicationServices”).ConnectionString; | |
var migrator = new Migrator(“SqlServer”, connectString, assembly); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace UnitTests.TestHelpers | |
{ | |
public class MigrationTestHelper | |
{ | |
public static readonly string Provider = "SqlServer"; | |
public static readonly string ConnectString = "Database=myapp_test;Data Source=localhost;User Id=myUser;Password=abc123"; | |
public static Migrator.Migrator GetMigrator() | |
{ | |
var assembly = Assembly.GetAssembly(typeof(BootstrapAspDotNetAuthTables)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace UnitTests | |
{ | |
public class FullMigrationTest | |
{ | |
public static string[] AllExpectedTables = new[] | |
{ | |
"BlogPost", | |
"Attachment", | |
"Photo", |