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, #windowsize_path
  
  
    Instance Method Details
    
      
  
  
    #build(configuration)  ⇒ Object 
  
  
  
  
    | 
260
261
262
263
264 | # File 'lib/bozo/compilers/msbuild.rb', line 260
def build(configuration)
  super
  zip_website if configuration[:websites_as_zip]
end | 
 
    
      
  
  
    #populate_config(config)  ⇒ Object 
  
  
  
  
    | 
286
287
288
289
290
291
292
293
294
295 | # File 'lib/bozo/compilers/msbuild.rb', line 286
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 
  
  
  
  
    | 
274
275
276
277
278
279
280
281
282
283
284 | # File 'lib/bozo/compilers/msbuild.rb', line 274
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 
  
  
  
  
    | 
266
267
268
269
270
271
272 | # File 'lib/bozo/compilers/msbuild.rb', line 266
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 |