Sha256: 7f18289a2ed2eb0e1f96dc7f9e785a122092684fe77d7bad17b88bfd9102da86

Contents?: true

Size: 1.33 KB

Versions: 23

Compression:

Stored size: 1.33 KB

Contents

# this code is to list the zips
def fillzipappletname(inffile)
	applet                = inffile.gsub(/\.zip$/, "")
	@a_installapplet = applet
	
end

def findzipfiles(d)
	a = Array.new(Dir[d].entries.sort)
	#loop through and get the files names
	a.each do |x|
		#adjust the filters to the files you want to see...
		if(!test(?d,x))
			# only zip files
			if x =~ /\.zip/
				puts "#{x}"        #opens the file thats in fileName as read only
				$zipsarray =  $zipsarray | ["#{x}"] 
			end
		end
	end
end

def listgemzips
	startlangdir = $geminstalled_directory
	#get a list of the files and subdirectories on the starting directory only
	alanghash = Array.new(Dir[startlangdir].entries.sort)
	p alanghash
	#loop through the list, ignore the files and add all new directories found
	alanghash.each do |x|
		#if a directory...
		if(test(?d,x))
			# add to the original list of directories
			@@tmproot = x + "/**"
			#adds the new ones to the array
			blanghash = Dir[@@tmproot].entries.sort
			blanghash.each do |x|
				if(test(?d,x))
					alanghash.push(x)  #appends to the end of the array...
				end
			end
		end
	end
	alanghash.each do |x|
		#if it is a file...
		if(!test(?d,x))
			alanghash.delete(x)
		else              #it is a directory...
			findzipfiles(x + "/**")
		end
	end
	@zipslistresult = $zipsarray.rwd_method("fillzipappletname")
end

Version data entries

23 entries across 23 versions & 11 rubygems

Version Path
bigtinker-0.94 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
bigtinker-0.93 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rubyslippers-1.04 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rubyslippers-1.03 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rubyslippers-1.02 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdaddresses-1.03 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdaddresses-1.04 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdaddresses-1.02 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwddemo-0.92 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdgutenberg-0.04 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdgutenberg-0.05 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdhypernote-0.07 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdmovies-0.95 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdmovies-0.94 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdschedule-0.99 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdschedule-1.00 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdshell-0.99 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdtinker-1.62 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdtinker-1.65 code/superant.com.rwdtinkerbackwindow/listgemzips.rb
rwdtinker-1.63 code/superant.com.rwdtinkerbackwindow/listgemzips.rb