Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarnold committed Aug 17, 2011
0 parents commit 7ab8f91
Show file tree
Hide file tree
Showing 128 changed files with 38,222 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
@@ -0,0 +1,24 @@
TestResult.xml
build
obj
bin
deploy
deploy/*
src/CommonAssemblyInfo.cs
_ReSharper.*
*.csproj.user
*.resharper.user
*.ReSharper.user
*.suo
*.cache
~$*
*.stresult
.fubu-alias
.fubu-includes
.fubu-manifest

*.userprefs
*.pidb
*.DS_Store
test-results
fubu-content
1 change: 1 addition & 0 deletions VERSION.txt
@@ -0,0 +1 @@
BUILD_VERSION = "0.1.0"
22 changes: 22 additions & 0 deletions fubumvc.testrunner.nuspec
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>FubuMVC.TestRunner</id>
<version>0.0.0</version>
<authors>Joshua Arnold, et al.</authors>
<owners>Joshua Arnold</owners>
<licenseUrl>https://github.com/jmarnold/fubumvc-testrunner/raw/master/license.txt</licenseUrl>
<projectUrl>http://fubumvc.com</projectUrl>
<iconUrl>https://github.com/DarthFubuMVC/fubumvc/raw/master/doc/logo/FubuMVC_Logo_package_icon.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Conventional test runner for Jasmine and Fubu.</description>
<tags>fubumvc</tags>
<dependencies>
<dependency id="FubuMVC.References" version="0.9.1.533" />
<dependency id="FubuMVC.Spark" />
</dependencies>
</metadata>
<files>
<file src="build\FubuMVC.Conventions.*" target="lib" />
</files>
</package>
13 changes: 13 additions & 0 deletions license.txt
@@ -0,0 +1,13 @@
Copyright 2011 Joshua Arnold

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
88 changes: 88 additions & 0 deletions rakefile.rb
@@ -0,0 +1,88 @@
include FileTest

require 'rubygems'
require 'zip/zip'
require 'zip/zipfilesystem'
require 'albacore'
require 'rexml/document'
include REXML
require 'FileUtils'

require "support/buildUtils.rb"
load "VERSION.txt"

ROOT_NAMESPACE = "FubuMVC.TestRunner"
RESULTS_DIR = "build/test-reports"
BUILD_NUMBER_BASE = "0.1.0"
PRODUCT = ROOT_NAMESPACE
COPYRIGHT = 'Copyright Joshua Arnold 2011. All rights reserved.';
COMMON_ASSEMBLY_INFO = 'src/CommonAssemblyInfo.cs';
CLR_VERSION = "v4.0"
COMPILE_TARGET = "Debug"

props = { :archive => "build", :stage => "stage" }

desc "Compiles and runs unit tests"
task :all => [:default]

desc "**Default**, compiles and runs tests"
task :default => [:compile, :unit_tests, :release]

desc "Update the version information for the build"
assemblyinfo :version do |asm|
tc_build_number = ENV["BUILD_NUMBER"]
build_revision = tc_build_number || Time.new.strftime('5%H%M')
BUILD_NUMBER = "#{BUILD_VERSION}.#{build_revision}"

asm_version = BUILD_VERSION + ".0"

begin
commit = `git log -1 --pretty=format:%H`
rescue
commit = "git unavailable"
end

puts "##teamcity[buildNumber '#{BUILD_NUMBER}']" unless tc_build_number.nil?
puts "Version: #{BUILD_NUMBER}" if tc_build_number.nil?
asm.trademark = commit
asm.product_name = PRODUCT
asm.description = BUILD_NUMBER
asm.version = asm_version
asm.file_version = BUILD_NUMBER
asm.custom_attributes :AssemblyInformationalVersion => asm_version
asm.copyright = COPYRIGHT
asm.output_file = COMMON_ASSEMBLY_INFO
end

desc "Prepares the working directory for a new build"
task :clean do
puts("recreating the build directory")
buildDir = props[:archive]
FileUtils.rm_r(Dir.glob(File.join(buildDir, '*')), :force=>true) if exists?(buildDir)
FileUtils.rm_r(Dir.glob(buildDir), :force=>true) if exists?(buildDir)
Dir.mkdir buildDir unless exists?(buildDir)
Dir.mkdir RESULTS_DIR unless exists?(RESULTS_DIR)
end

desc "Compiles the app"
msbuild :compile => [:clean, :version] do |msb|
msb.properties :configuration => COMPILE_TARGET
msb.targets :Clean, :Build
msb.solution = "src/#{ROOT_NAMESPACE}.sln"
end

desc "Runs unit tests"
task :unit_tests do
end

task :release do
copyOutputFiles "src/FubuMVC.TestRunner/bin/#{COMPILE_TARGET}", "FubuMVC.TestRunner*.{dll,pdb}", props[:archive]
archive = Dir.glob(props[:archive])
# TODO -- create the pak and nugetify it
end

def copyOutputFiles(fromDir, filePattern, outDir)
Dir.glob(File.join(fromDir, filePattern)){|file|
copy(file, outDir) if File.file?(file)
}
end
16 changes: 16 additions & 0 deletions readme.markdown
@@ -0,0 +1,16 @@
What is FubuMVC.TestRunner?
--
This is a simple library of reusable conventions that are in production and are being battle tested. Eventually some of these may make their way into FubuMVC.Core but for now they exist here for my reuse and for others.

Where is CommonAssemblyInfo.cs?
--

CommonAssemblyInfo.cs is generated by the build. The build script requires Ruby with rake installed.

If you do not have ruby:

1. You need to manually create a src/CommonAssemblyInfo.cs file

* type: `echo // > src/CommonAssemblyInfo.cs`

1. open src/FubuMVC.TestRunner.sln with Visual Studio and Build the solution
20 changes: 20 additions & 0 deletions src/FubuMVC.TestRunner.sln
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FubuMVC.TestRunner", "FubuMVC.TestRunner\FubuMVC.TestRunner.csproj", "{DD4445F4-DDB4-4116-977A-1A2366499BE2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DD4445F4-DDB4-4116-977A-1A2366499BE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD4445F4-DDB4-4116-977A-1A2366499BE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD4445F4-DDB4-4116-977A-1A2366499BE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD4445F4-DDB4-4116-977A-1A2366499BE2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
14 changes: 14 additions & 0 deletions src/FubuMVC.TestRunner/.package-manifest
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Role>module</Role>
<Name>FubuMVC.TestRunner</Name>
<assembly>FubuMVC.TestRunner</assembly>
<assembly>FubuMVC.Spark</assembly>
<assembly>Spark</assembly>
<DataFileSet Include="*.*">
<DeepSearch>true</DeepSearch>
</DataFileSet>
<ContentFileSet Include="Shared\*.spark;Shared\*.xml;Content\*.*;*.config;Suites\*.spark">
<DeepSearch>true</DeepSearch>
</ContentFileSet>
</package>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7ab8f91

Please sign in to comment.