Skip to content

Commit 353cbbb

Browse files
Updated yaml files
1 parent 7166b4c commit 353cbbb

25 files changed

+108
-31
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ _[Rr]e[Ss]harper.*
1616
artifacts
1717
UpgradeLog.XML
1818
_UpgradeReport_Files
19+
git.yaml

README.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#NBDN - London - February 2011
1+
#NBDN - Munich - April 2011
22

33
Prep work for the course!!

build/configuration/db.rb

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
task :configure_db do
2+
configs =
3+
{
4+
:db =>
5+
{
6+
:initial_catalog => delayed{configatron.project},
7+
:server_name => ENV['HOSTNAME'],
8+
:osql_connection_string => delayed{"-E \-S #{configatron.db.server_name}"},
9+
:web_account_sql => "#{configatron.db.web_user_account}, N'#{configatron.db.web_user_account}'",
10+
:app_connection => "data source=Server;Integrated Security=SSPI;Initial Catalog=blah"
11+
}
12+
}
13+
14+
configatron.configure_from_hash configs
15+
end
16+
17+
Rake::Task[:configure_db].invoke

build/configuration/db.yaml.customize

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
db:
2+
database_path: C:/tempfiles/databases
3+
osql_exe: osql
4+
database_provider: System.Data.SqlClient
5+
web_user_account: NT Authority\\Network Service
6+
osql_args_prior_to_file_name: -b -i
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
git:
2+
remotes: []
3+
repo: repo_name.git
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
task :load_yaml_configuration do
2+
Dir.glob("build/configuration/*.yaml").each do|file|
3+
configatron.configure_from_yaml file
4+
end
5+
end
6+
7+
Rake::Task[:load_yaml_configuration].invoke

build/configuration/machine_specs.rb

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
task :configure_mspec do
2+
configs =
3+
{
4+
:specs =>
5+
{
6+
:runner_options => ["-x","example"],
7+
:assemblies => dynamic{Dir.glob("#{configatron.artifacts_dir}/*specs.dll")},
8+
}
9+
}
10+
configatron.configure_from_hash configs
11+
end
12+
13+
Rake::Task['configure_mspec'].invoke
14+
15+
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
specs:
2+
dir: artifacts/specs
3+
report_dir: artifacts/specs/report
4+
tools_folder: packages/Machine.Specifications.0.4.9.0/tools

build/configuration/project.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
project: nothinbutdotnetprep
2+
target: Debug
3+
source_dir: source
4+
artifacts_dir: artifacts
5+
config_dir: source/config
6+
app_dir: source/nothinbutdotnetstore
7+
log_file_name: nbdn_prep_log.txt
8+
log_level: DEBUG

build/tasks/git.rb

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace :git do
2+
desc 'set up the remotes for git'
3+
task :remotes do
4+
configatron.git.remotes.each do|remote|
5+
`git remote rm #{remote}`
6+
`git remote add #{remote} http://github.com/#{remote}/#{configatron.git.repo}`
7+
end
8+
end
9+
end

fetch_latest

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def choose_remote(remotes)
3131
end
3232

3333
def update_to_latest_branch_on(remote_name)
34-
`gitrb commit`
34+
`git add -A;git commit -m "Updated"`
3535
`gitrb checkout master`
3636
`gitrb pull #{remote_name} #{get_latest_remote_branch_name(remote_name)} true`
3737
end

packages/repositories.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<repositories>
3-
<repository path="..\product\nothinbutdotnetprep.specs\packages.config" />
3+
<repository path="..\source\nothinbutdotnetprep.specs\packages.config" />
44
</repositories>

push

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/usr/bin/env ruby
22

3+
`git add -A;git commit -m "Updated"`
34
`gitrb push origin master`

push_latest_work.ps1

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
$status = git status
2+
3+
if ($status[0].endswith("master"))
4+
{
5+
"You need to run this on a non master branch"
6+
exit
7+
}
8+
19
git add -A
210
git commit -m "Pushing new changes"
311
git push origin

rakefile.rb

+20-23
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,32 @@
66

77
=begin Supplementary Build Files
88
9-
build\utils - Utilities for the build
10-
build\tasks\configuration.rb - Project specific configuration
11-
build\tasks\machine_specs.rb
12-
build\tasks\deployment.rb - Packaging tasks
9+
build\utils - build utilities
10+
build\tasks\configuration.rb - project specific configuration
11+
build\tasks\machine_specs.rb - mspec tasks
12+
build\tasks\git.rb - git tasks
1313
1414
=end
1515

16-
%w[utils tasks].each do|folder|
16+
#configuration files
17+
config_files = FileList.new("source/config/*.erb")
18+
19+
task :copy_config_files do
20+
config_files.each do |file|
21+
[configatron.artifacts_dir,configatron.app_dir].each do|folder|
22+
FileUtils.cp(file.name_without_template_extension,
23+
folder.join(file.base_name_without_extension))
24+
end
25+
end
26+
end
27+
28+
%w[utils configuration tasks].each do|folder|
1729
Dir.glob(File.join(File.dirname(__FILE__),"build/#{folder}/*.rb")).each do|item|
1830
require item
1931
end
2032
end
2133

22-
Rake::Task['configure'].invoke
23-
24-
[
25-
configatron.artifacts_dir,
26-
configatron.specs.dir
27-
].each do |item|
34+
[configatron.artifacts_dir, configatron.specs.dir].each do |item|
2835
CLEAN.include(item)
2936
end
3037

@@ -33,8 +40,6 @@
3340

3441
@project_files = FileList.new("#{configatron.source_dir}/**/*.csproj")
3542

36-
#configuration files
37-
config_files = FileList.new(File.join(configatron.source_dir,'config','*.erb')).select{|fn| ! fn.include?('app.config')}
3843

3944
#target folders that can be run from VS
4045
solution_file = "solution.sln"
@@ -60,7 +65,8 @@
6065
:switches => { :verbosity => :minimal, :target => :Build },
6166
:properties => {
6267
:Configuration => configatron.target,
63-
:TrackFileAccess => false
68+
:TrackFileAccess => false,
69+
:PostBuildEvent => ""
6470
}
6571
}
6672

@@ -72,14 +78,5 @@
7278
end
7379
end
7480

75-
task :from_ide do
76-
config_files.each do |file|
77-
[configatron.artifacts_dir].each do|folder|
78-
FileUtils.cp(file.name_without_template_extension,
79-
folder.join(file.base_name_without_extension))
80-
end
81-
end
82-
end
83-
8481
task :rebuild => ["clean","compile"]
8582
end

source/nothinbutdotnetprep.specs/nothinbutdotnetprep.specs.csproj

+5-4
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@
5151
<WarningLevel>4</WarningLevel>
5252
</PropertyGroup>
5353
<ItemGroup>
54-
<Reference Include="developwithpassion.specifications">
55-
<HintPath>..\..\packages\developwithpassion.specifications.moq.0.4.0.2\lib\developwithpassion.specifications.dll</HintPath>
54+
<Reference Include="developwithpassion.specifications, Version=0.4.0.5, Culture=neutral, processorArchitecture=MSIL">
55+
<SpecificVersion>False</SpecificVersion>
56+
<HintPath>..\..\packages\developwithpassion.specifications.moq.0.4.0.5\lib\developwithpassion.specifications.dll</HintPath>
5657
</Reference>
57-
<Reference Include="developwithpassion.specifications.moq">
58-
<HintPath>..\..\packages\developwithpassion.specifications.moq.0.4.0.2\lib\developwithpassion.specifications.moq.dll</HintPath>
58+
<Reference Include="developwithpassion.specifications.moq, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
59+
<HintPath>..\..\packages\developwithpassion.specifications.moq.0.4.0.5\lib\developwithpassion.specifications.moq.dll</HintPath>
5960
</Reference>
6061
<Reference Include="Machine.Fakes">
6162
<HintPath>..\..\packages\Machine.Fakes.0.2.1.2\lib\Machine.Fakes.dll</HintPath>

source/nothinbutdotnetprep.specs/packages.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
<package id="Machine.Fakes" version="0.2.1.2" />
55
<package id="Moq" version="4.0.10827" />
66
<package id="Machine.Fakes.Moq" version="0.2.1.2" />
7-
<package id="developwithpassion.specifications.moq" version="0.4.0.2" />
7+
<package id="developwithpassion.specifications.moq" version="0.4.0.5" />
88
</packages>

0 commit comments

Comments
 (0)