Sha256: c32ef892d2f0e0f0e44fa723c94625e8fff5559eb3bcb348bca94cba2064b8b5

Contents?: true

Size: 761 Bytes

Versions: 12

Compression:

Stored size: 761 Bytes

Contents

module PatternPark
  
  class Command < Task
    
    def type
      return 'command'
    end
    
    def execute
      dependencies.each do |dep|
        dep.execute
      end
      # Create a project relevant pointer to this command instance
      if(target.project_path && target.project_path != '')
        to = File.join(Sprout.project_path, target.project_path)
        FileUtils.makedirs(File.dirname(to))
        File.open(to, 'w') do |file|
          file.puts("PatternPark::Sprout.load('#{name}')")
          file.puts("require 'command/#{name}'")
        end
        generate = File.join(Sprout.project_path, 'script', 'generate')
        if(File.exists?(generate))
          FileUtils.chmod(0755, generate)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sprout-0.3.36 lib/command.rb
sprout-0.5.11 lib/command.rb
sprout-0.5.0 lib/command.rb
sprout-0.5.10 lib/command.rb
sprout-0.5.13 lib/command.rb
sprout-0.3.35 lib/command.rb
sprout-0.5.15 lib/command.rb
sprout-0.5.25 lib/command.rb
sprout-0.5.23 lib/command.rb
sprout-0.5.29 lib/command.rb
sprout-0.5.19 lib/command.rb
sprout-0.5.9 lib/command.rb