Class: Bozo::Compilers::WebProject2008
- Inherits:
-
Project
- Object
- Project
- Bozo::Compilers::WebProject2008
show all
- Defined in:
- lib/bozo/compilers/msbuild.rb
Instance Method Summary
collapse
Methods inherited from Project
#clean, #framework_version, #generate_args, #initialize, #location, #name, #project_path, #temp_project_path, #windowsize_path
Instance Method Details
#build(configuration) ⇒ Object
290
291
292
293
294
|
# File 'lib/bozo/compilers/msbuild.rb', line 290
def build(configuration)
super
zip_website if configuration[:websites_as_zip]
end
|
#populate_config(config) ⇒ Object
316
317
318
319
320
321
322
323
324
325
|
# File 'lib/bozo/compilers/msbuild.rb', line 316
def populate_config(config)
config[:targets] << :'ResolveReferences'
config[:targets] << :'_CopyWebApplication'
config[:properties][:OutDir] = location + '/bin/'
config[:properties][:WebProjectOutputDir] = windowsize_path location
config[:properties][:_DebugSymbolsProduced] = false
config[:properties][:solutiondir] = windowsize_path(File.expand_path('.') + '//')
end
|
#zip_location_dir(zip_file_name) ⇒ Object
304
305
306
307
308
309
310
311
312
313
314
|
# File 'lib/bozo/compilers/msbuild.rb', line 304
def zip_location_dir(zip_file_name)
zip_path = location + "/#{zip_file_name}"
Zip::ZipFile.open(zip_path, Zip::ZipFile::CREATE) do |zipfile|
Dir["#{location}/**/**"].each do |file|
zipfile.add(file.sub(location + '/', ''), file)
end
end
zip_path
end
|
#zip_website ⇒ Object
296
297
298
299
300
301
302
|
# File 'lib/bozo/compilers/msbuild.rb', line 296
def zip_website
zip_file = zip_location_dir 'Site.zip'
Dir["#{location}/**/**"].reject { |f| f == zip_file }.each do |file|
FileUtils.rm_rf file
end
end
|