Sha256: 246e2891d7edc16ae550b6297f6e8f916e301fcbc335d1d5ac97daef00ba70df

Contents?: true

Size: 1.33 KB

Versions: 13

Compression:

Stored size: 1.33 KB

Contents

# ==========================================================================
# Generator: Theme
# Copyright: ©2006-2009 Sprout Systems, Inc. and contributors
#            portions copyright ©2009 Apple, Inc.
# ==========================================================================

namespace :generator do
  
  # Require a project then make sure the build root is always the project 
  # root.
  task :prepare do
    GENERATOR.requires! :target_project
    
    # if the target name has a slash in it, then we are trying to create a 
    # nested target.  extract the final part (since this is the target name)
    # and then set the build root to the parent target.
    if GENERATOR.target_name && GENERATOR.target_name =~ /\//
      parent_target_name = GENERATOR.target_name.split('/')
      GENERATOR.target_name = parent_target_name.pop
      
      parent_target_name = parent_target_name * "/"
      project = GENERATOR.target_project
      
      GENERATOR.parent_target_name = parent_target_name
      GENERATOR.parent_target = project.target_for(parent_target_name)
      GENERATOR.requires! :parent_target, :parent_target_name
      
      GENERATOR.build_root = GENERATOR.parent_target.source_root
    
    # otherwise just use project_root
    else        
      GENERATOR.build_root = GENERATOR.target_project.project_root
    end
  end
  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090407205609 gen/theme/Buildfile
sproutit-sproutcore-1.0.0.20090408130025 gen/theme/Buildfile
sproutit-sproutcore-1.0.0.20090416161445 gen/theme/Buildfile
sproutit-sproutcore-1.0.0.20090720093355 gen/theme/Buildfile
sproutit-sproutcore-1.0.0.20090720202429 gen/theme/Buildfile
sproutit-sproutcore-1.0.0.20090721125122 gen/theme/Buildfile
sproutit-sproutcore-1.0.126 gen/theme/Buildfile
sproutit-sproutcore-1.0.20090721145236 gen/theme/Buildfile
sproutit-sproutcore-1.0.20090721145251 gen/theme/Buildfile
sproutit-sproutcore-1.0.20090721145280 gen/theme/Buildfile
sproutit-sproutcore-1.0.20090721145281 gen/theme/Buildfile
sproutit-sproutcore-1.0.20090721145282 gen/theme/Buildfile
sproutit-sproutcore-1.0.203 gen/theme/Buildfile