Commit b17804d
Changed files (23)
product
client
client.ui
commons
infrastructure.thirdparty
thirdparty
auto.fac
castle
log4net
build/build_utilities.rb
@@ -1,187 +0,0 @@
-include FileTest
-
-class SqlRunner
- def initialize(settings = Hash.new("Not found"))
- @sql_tool = settings.fetch(:sql_tool,File.join(ENV['SystemDrive'],'program files','microsoft sql server','100','tools','binn','osql.exe'))
- @command_line_args = settings.fetch(:command_line_args, '-b -i')
- @connection_string = settings.fetch(:connection_string,"-E")
- end
-
- def process_sql_files(files)
- files.each do|file|
- begin
- sh "#{@sql_tool} #{@connection_string} #{@command_line_args} #{file}"
- rescue
- puts("Error processing sql file:#{file}")
- raise
- end
- end
- end
-end
-
-class LocalSettings
- attr_reader :settings
-
- def [](setting)
- @settings[setting]
- end
-
- def each_pair
- @settings.each_key do|key,value|
- yield key,@settings[key]
- end
- end
-end
-
-class TemplateFile
- attr_reader :template_file_name
- attr_reader :output_file_name
-
- def initialize(template_file_name)
- @template_file_name = template_file_name
- @output_file_name = template_file_name.gsub('.template','')
- end
-
- def generate(settings_dictionary)
- generate_to(@output_file_name,settings_dictionary)
- end
-
- def generate_to_directory(output_directory,settings_dictionary)
- generate_to(File.join(output_directory,File.basename(@output_file_name)),settings_dictionary)
- end
-
- def generate_to_directories(output_directories,settings_dictionary)
- output_directories.each do |directory|
- generate_to_directory(directory,settings_dictionary)
- end
- end
-
- def generate_to(output_file,settings_dictionary)
- File.delete?(output_file)
-
- File.open_for_write(output_file) do|generated_file|
- File.open_for_read(@template_file_name) do|template_line|
- settings_dictionary.each_key do|key|
- template_line = template_line.gsub("@#{key}@","#{settings_dictionary[key]}")
- end
- generated_file.puts(template_line)
- end
- end
- end
-
- def to_s()
- "Template File- Template:#{@template_file_name} : Output:#{@output_file_name}"
- end
-
-end
-
-class TemplateFileList
- @template_files
- def initialize(files_pattern)
- @template_files = []
- FileList.new(files_pattern).each do|file|
- @template_files.push(TemplateFile.new(file))
- end
- end
-
- def each()
- @template_files.each do |file|
- yield file
- end
- end
-
- def generate_all_output_files(settings)
- @template_files.each do |file|
- file.generate(settings)
- end
- end
-end
-
-class MbUnitRunner
- def initialize(items)
- @source_dir = items.fetch(:source_dir, 'product')
- @mbunit_dir = items.fetch(:mbunit_dir, 'tools/gallio')
- @test_results_dir = items.fetch(:test_results_dir, 'artifacts')
- @compile_target = items.fetch(:compile_target, 'debug')
- @category_to_exclude = items.fetch(:category_to_exclude, 'missing')
- @show_report = items.fetch(:show_report, false)
- @report_type = items.fetch(:report_type,'text')
- end
-
- def execute_tests(assemblies)
- Dir.mkdir @test_results_dir unless exists?(@test_results_dir)
-
- assemblies.each do |assem|
- sh build_command_line_for(assem)
- end
- end
-
- def build_command_line_for(assembly)
- file = File.expand_path("#{@source_dir}/#{assembly}/bin/#{@compile_target}/#{assembly}.dll")
- "#{@mbunit_dir}/gallio.echo.exe #{file} /sr /rt:#{@report_type} /rd:#{@test_results_dir} /rnf:#{assembly}.dll-results "
- end
-end
-
-class MSBuildRunner
- def self.compile(attributes)
- version = attributes.fetch(:clrversion, 'v3.5')
- compile_target = attributes.fetch(:compile_target, 'debug')
- solution_file = attributes[:solution_file]
-
- framework_dir = File.join(ENV['windir'].dup, 'Microsoft.NET', 'Framework', 'v3.5')
- msbuild_file = File.join(framework_dir, 'msbuild.exe')
-
- sh "#{msbuild_file} #{solution_file} /property:Configuration=#{compile_target} /t:Rebuild"
- end
-end
-
-class File
- def self.open_for_read(file)
- File.open(file,'r').each do|line|
- yield line
- end
- end
-
- def self.read_all_text(file)
- contents = ''
- File.open_for_read(file) do |line|
- contents += line
- end
- end
-
- def self.delete?(file)
- File.delete(file) if File.exists?(file)
- end
-
- def self.open_for_write(file)
- File.open(file,'w') do|new_file|
- yield new_file
- end
- end
-
- def self.base_name_without_extensions(file)
- File.basename(file,'.*')
- end
-
- end
-
-class BDDDocRunner
- def initialize(settings = Hash.new('missing'))
- @output_folder = settings.fetch(:output_folder,'artifacts')
- @observation_attribute = settings.fetch(:observation_attribute,'ObservationAttribute')
- @bdddoc_folder = settings.fetch(:bdddoc_folder,'thirdparty\developwithpassion.bdddoc')
- @mbunit_test_output_folder = settings.fetch(:mbunit_test_output_folder,'artifacts')
- @developwithpassion_bdddoc_exe = settings.fetch(:bdddoc_exe,'developwithpassion.bdddoc.exe')
- @logo_jpg = settings.fetch(:logo_jpg,File.join(@bdddoc_folder,'developwithpassion.bdddoc-logo.jpg'))
- @css = settings.fetch(:css,File.join(@bdddoc_folder,'developwithpassion.bdddoc.css'))
- end
-
- def run(test_library)
- test_file = File.basename(test_library)
- output_file = "#{File.join(@output_folder,test_file)}.developwithpassion.bdddoc.html"
- mbunit_test_output_file = "#{File.join(@mbunit_test_output_folder,test_file)}-results.xml"
- sh "#{File.join(@bdddoc_folder,@developwithpassion_bdddoc_exe)} #{test_library} #{@observation_attribute} #{output_file} #{mbunit_test_output_file}"
- FileUtils.cp @logo_jpg,@output_folder
- FileUtils.cp @css,@output_folder
- end
-end
build/local_properties.rb
@@ -1,33 +0,0 @@
-require "project_name.rb"
-
-class LocalSettings
- attr_reader :settings
- def initialize
- @settings = {
- :app_config_template => 'app.config.xp.template' ,
- #:app_config_template => 'app.config.vista.template' ,
- :path_to_runtime_log4net_config => 'artifacts\log4net.config.xml',
- :initial_catalog => "#{Project.name}",
- :database_provider => 'System.Data.SqlClient' ,
- :database_path => 'C:\databases' ,
- :asp_net_worker_process => 'aspnet_wp.exe',
- :log_file_name => "#{Project.name}Log.txt",
- :log_level => 'DEBUG',
- :xunit_report_file_dir => 'artifacts' ,
- :xunit_report_file_name => 'test_report',
- :xunit_report_type => 'text',
- :xunit_show_test_report => true,
- :debug => true,
- }
-@settings[:xunit_report_file_name_with_extension] = "#{@settings[:xunit_report_file_name]}.#{@settings[:xunit_report_type]}"
-@settings[:asp_net_account] = "#{ENV["computername"]}\\ASPNet";
-#@settings[:db_account_sql]= "#{@settings[:asp_net_account]} WITH PASSWORD=N'#{@settings[:asp_net_account]}', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF")
-@settings[:db_account_sql] = "#{@settings[:asp_net_account]}', N'#{@settings[:asp_net_account]}'"
-
-#these settings may need to be changed to be specific to your local machine
-@settings[:osql_connectionstring] = '-E'
-@settings[:sql_tools_path] = File.join(ENV['SystemDrive'],'program files/microsoft sql server/100/tools/binn')
-@settings[:osql_exe] = File.join("#{@settings[:sql_tools_path]}",'osql.exe')
-@settings[:config_connectionstring] = "data source=(local);Integrated Security=SSPI;Initial Catalog=#{@settings[:initial_catalog]}"
- end
-end
build/project_deploy.ps1
@@ -1,19 +0,0 @@
-properties{
- $assembly_config = "$build_config_dir\AssemblyInfo.cs"
- $log4net_config = "$build_config_dir\log4net.config.xml"
-}
-
-task copy_app_dependencies {
-}
-
-task create_licenses -depends clean {
-
-}
-
-task deploy {
-
-}
-
-task run -depends deploy {
-
-}
build/project_name.rb
@@ -1,8 +0,0 @@
-class Project
- attr_reader :name
-
- def self.name
- @name = "momoney"
- end
-
-end
build/rakefile.rb
@@ -1,50 +0,0 @@
-require 'build_utilities.rb'
-require 'local_properties.rb'
-require 'project_name.rb'
-require 'rake/clean'
-require 'fileutils'
-
-#load settings that differ by machine
-local_settings = LocalSettings.new
-
-COMPILE_TARGET = 'debug'
-
-CLEAN.include('artifacts','**/bin','**/obj')
-
-#target folders that can be run from VS
-project_test_dir = File.join('product',"#{Project.name}.tests",'bin','debug')
-
-output_folders = [project_test_dir]
-
-task :default => [:full_test]
-
-task :init => :clean do
- mkdir 'artifacts'
- mkdir 'artifacts/coverage'
- mkdir 'artifacts/deploy'
-end
-
-desc 'compiles the project'
-task :compile => :init do
- MSBuildRunner.compile :compile_target => COMPILE_TARGET, :solution_file => '../solution.sln'
-end
-
-task :deploy => :compile do
- Dir.glob(File.join('product','**','mo.money*.dll')).each do|file|
- FileUtils.cp file,File.join('artifacts','deploy')
- end
-end
-
-desc 'run the tests for the project'
-task :test, :category_to_exclude, :needs => [:compile] do |t,args|
- args.with_defaults(:category_to_exclude => 'SLOW')
- runner = MbUnitRunner.new :compile_target => COMPILE_TARGET, :category_to_exclude => args.category_to_exclude
- runner.execute_tests ["Gorilla.Commons.Infrastructure"]
-end
-
-desc 'run the bdddoc test report for the project'
-task :run_test_report => [:test] do
- runner = BDDDocRunner.new
- runner.run(File.join('product','developwithpassion.bdd.tests','bin','debug','developwithpassion.bdd.tests.dll'))
-end
-
build/run.bat
@@ -1,3 +0,0 @@
-@echo off
-cls
-rake rakefile.rb %*
product/client/client.ui/client.csproj
@@ -58,7 +58,7 @@
<ItemGroup>
<Reference Include="Autofac, Version=1.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\auto.fac\Autofac.dll</HintPath>
+ <HintPath>..\..\..\thirdparty\auto.fac\Autofac.dll</HintPath>
</Reference>
<Reference Include="AutoMapper, Version=0.3.1.71, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
product/commons/infrastructure.thirdparty/infrastructure.thirdparty.csproj
@@ -55,11 +55,11 @@
<ItemGroup>
<Reference Include="Autofac, Version=1.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\auto.fac\Autofac.dll</HintPath>
+ <HintPath>..\..\..\thirdparty\auto.fac\Autofac.dll</HintPath>
</Reference>
<Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\build\lib\app\castle\Castle.Core.dll</HintPath>
+ <HintPath>..\..\..\thirdparty\castle\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Castle.DynamicProxy2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
build/lib/app/auto.fac/Autofac.dll → thirdparty/auto.fac/Autofac.dll
File renamed without changes
build/lib/app/auto.fac/Autofac.pdb → thirdparty/auto.fac/Autofac.pdb
File renamed without changes
build/lib/app/auto.fac/Autofac.xml → thirdparty/auto.fac/Autofac.xml
File renamed without changes
build/lib/app/auto.fac/AutofacContrib.DynamicProxy2.dll → thirdparty/auto.fac/AutofacContrib.DynamicProxy2.dll
File renamed without changes
build/lib/app/auto.fac/AutofacContrib.DynamicProxy2.pdb → thirdparty/auto.fac/AutofacContrib.DynamicProxy2.pdb
File renamed without changes
build/lib/app/castle/Castle.Core.dll → thirdparty/castle/Castle.Core.dll
File renamed without changes
build/lib/app/castle/Castle.Core.xml → thirdparty/castle/Castle.Core.xml
File renamed without changes
build/lib/app/castle/Castle.DynamicProxy2.dll → thirdparty/castle/Castle.DynamicProxy2.dll
File renamed without changes
build/lib/app/castle/Castle.DynamicProxy2.xml → thirdparty/castle/Castle.DynamicProxy2.xml
File renamed without changes
build/lib/app/castle/Castle.MicroKernel.dll → thirdparty/castle/Castle.MicroKernel.dll
File renamed without changes
build/lib/app/castle/Castle.MicroKernel.xml → thirdparty/castle/Castle.MicroKernel.xml
File renamed without changes
build/lib/app/castle/Castle.Windsor.dll → thirdparty/castle/Castle.Windsor.dll
File renamed without changes
build/lib/app/castle/Castle.Windsor.xml → thirdparty/castle/Castle.Windsor.xml
File renamed without changes
build/lib/app/log4net/log4net.dll → thirdparty/log4net/log4net.dll
File renamed without changes
build/lib/app/log4net/log4net.xml → thirdparty/log4net/log4net.xml
File renamed without changes