<commit_before>require 'albacore'

Albacore.configure do |config|
  config.nunit.command = "packages/NUnit.2.5.9.10348/Tools/nunit-console.exe"
end

desc "build and test package"
task :default => :build_package

desc "Compile netlint"
msbuild :build do |msb|
  msb.targets = [:clean, :build]
  msb.verbosity = "quiet"
  msb.properties :Configuration => :Release
  msb.solution = 'netlint.sln'
end

desc "run all tests for the project"
nunit :test => :build do |nunit|
  fname = 'netlint.tests'
  nunit.assemblies "#{fname}/bin/Release/#{fname}.dll"
  nunit.options = ["/nologo", "/framework=net-4.0" ]
end

desc "create the nuspec file"
nuspec :make_spec do |nu|
  nu.id = 'NetLint'
  nu.version = get_version
  nu.authors = '<NAME>'
  nu.owners = '<NAME>'
  nu.description = "A quality tool for testing conventions in .NET web apps & libraries"
  nu.summary = nu.description
  nu.language = 'en-US'
  nu.licenseUrl = 'https://github.com/tkellogg/netlint/blob/master/LICENSE'
  nu.projectUrl = 'https://github.com/tkellogg/netlint'
  nu.working_directory = 'netlint/bin/Release'
  nu.output_file = 'netlint.nuspec'
  nu.tags = 'unittest convention quality Web'
end

nugetpack :build_package => [:test, :make_spec, 'dist'] do |nu|
  nu.base_folder = 'netlint/bin/Release'
  nu.nuspec = 'netlint/bin/Release/netlint.nuspec'
  nu.output = 'dist'
end

directory :dist

# look at AssemblyInfo.cs and extract version
def get_version
  version = '0.5.0.0'
  File.open 'netlint/Properties/AssemblyInfo.cs' do |f|
    txt = f.read
    if /\[assembly: AssemblyVersion\("([^"]+)"\)\]\s*/ =~ txt
      version = $~[1]
      puts "Version is #{version}"
    end
  end
  version
end
<commit_msg>fixed nuget reference issue in rakefile<commit_after>require 'albacore'

Albacore.configure do |config|
  config.nunit.command = "packages/NUnit.2.5.9.10348/Tools/nunit-console.exe"
end

desc "build and test package"
task :default => :build_package

desc "Compile netlint"
msbuild :build do |msb|
  msb.targets = [:clean, :build]
  msb.verbosity = "quiet"
  msb.properties :Configuration => :Release
  msb.solution = 'netlint.sln'
end

desc "run all tests for the project"
nunit :test => :build do |nunit|
  fname = 'netlint.tests'
  nunit.assemblies "#{fname}/bin/Release/#{fname}.dll"
  nunit.options = ["/nologo", "/framework=net-4.0" ]
end

desc "create the nuspec file"
nuspec :make_spec do |nu|
  nu.id = 'NetLint'
  nu.version = get_version
  nu.authors = '<NAME>'
  nu.owners = '<NAME>'
  nu.description = "A quality tool for testing conventions in .NET web apps & libraries"
  nu.summary = nu.description
  nu.language = 'en-US'
  nu.licenseUrl = 'https://github.com/tkellogg/netlint/blob/master/LICENSE'
  nu.projectUrl = 'https://github.com/tkellogg/netlint'
  nu.working_directory = 'netlint/bin/Release'
  nu.output_file = 'netlint.nuspec'
  nu.tags = 'unittest convention quality Web'
  nu.file 'netlint.*', 'lib'
end

nugetpack :build_package => [:test, :make_spec, 'dist'] do |nu|
  nu.base_folder = 'netlint/bin/Release'
  nu.nuspec = 'netlint/bin/Release/netlint.nuspec'
  nu.output = 'dist'
end

directory :dist

# look at AssemblyInfo.cs and extract version
def get_version
  version = '0.5.0.0'
  File.open 'netlint/Properties/AssemblyInfo.cs' do |f|
    txt = f.read
    if /\[assembly: AssemblyVersion\("([^"]+)"\)\]\s*/ =~ txt
      version = $~[1]
      puts "Version is #{version}"
    end
  end
  version
end

{'fraction_non_alphanumeric': 0.14471452798191067, 'fraction_numerical': 0.008479366873940079, 'mean_word_length': 3.253605769230769, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4570607', 'n_tokens_mistral': 1360, 'n_tokens_neox': 1290, 'n_words': 302}