Sha256: 445c81643debf43be16ff7130efa3674013c3576c2e15c4fd882ad5a4c8676b3
Contents?: true
Size: 2 KB
Versions: 95
Compression:
Stored size: 2 KB
Contents
#!/usr/bin/env ruby # Copyright 2012 Lou Parslow # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # begin require 'rubygems' rescue LoadError end require 'dev' DB=Dev::Database.new def get_pattern(args,index) pattern=nil pattern=args[index] if args.count > index pattern="%#{pattern}%" if !pattern.nil? && !pattern.include?('%') && !pattern.include?("'") && !pattern.include?('"') return pattern end def usage(args) puts "welcome to devgem" end def list(args) pattern=get_pattern(args,1) puts "listing all branches" if pattern.nil? puts "listing branches LIKE #{pattern}" if !pattern.nil? branches=DB.find_branches(pattern) branches.each{ |b| puts " #{b}" } end def status(args) pattern=get_pattern(args,1) branches=DB.find_branches(pattern) branches.each{ |b| Dev::Cmd::Build.status(b) } end def build(args) pattern=get_pattern(args,1) puts "building all branches" if pattern.nil? puts "building branches LIKE #{pattern}" if !pattern.nil? branches=DB.find_branches(pattern) branches.each{ |b| Dev::Cmd::Build.build(b) } end def work(args) pattern=get_pattern(args,1) branches=DB.find_branches(pattern) branches.each{ |b| Dev::Cmd::Build.work(b) } end list(ARGV) if(ARGV.count > 0 && ARGV[0]=="list") status(ARGV) if(ARGV.count > 0 && ARGV[0]=="status") build(ARGV) if(ARGV.count > 0 && ARGV[0]=="build") work(ARGV) if(ARGV.count > 0 && ARGV[0]=="work") usage(ARGV) if(ARGV.count==0 || ARGV[0]=="help")
Version data entries
95 entries across 95 versions & 1 rubygems