Sha256: e0a328674999a89f5823bf39e7e2e82987c2db16db396894dc756b25010900c1

Contents?: true

Size: 1 KB

Versions: 1

Compression:

Stored size: 1 KB

Contents

puts __FILE__ if defined?(DEBUG)

require_relative('base.rb')
require_relative('apps.rb')
require_relative('tasks.rb')
require_relative('commands.rb')

if(File.exists?(Environment.configuration))
  require Environment.configuration
end

PROJECT=Project.new()

class Dev
	def self.execute args
		if(args.kind_of?(String))
			args=args.split(' ')
		end
		projects=Projects.new
		PROJECTS.open Projects.user_projects_filename if File.exists? Projects.user_projects_filename
		projects.add(args) if args.length > 0 && args[0] == 'add'
		projects.import(args.length>1 ? args[1]:'') if args.length > 0 && args[0] == 'import'
		projects.list(args.length>1 ? args[1]:'') if args.length > 0 && args[0] == 'list'
		projects.make(args) if args.length > 0 && args[0] == 'make'
		projects.work(args) if args.length > 0 && args[0] == 'work'
		projects.update(args) if args.length > 0 && args[0] == 'update'
		usage if args.length == 0
	end

	def self.usage
		puts 'Usage:'
		puts ' list [pattern]'
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dev-2.0.262 lib/dev.rb