Sha256: 4ba30a3cc978eeb53db6ccd93ee9df1dd77b571055781dafc6848cda50d1187b
Contents?: true
Size: 1.24 KB
Versions: 30
Compression:
Stored size: 1.24 KB
Contents
#!/usr/bin/env ruby -wKU ############################################################ # $Id: script.rb 5267 2010-11-22 14:43:50Z rcarlesso $ ############################################################ # @author Riccardo Carlesso # @email riccardo.carlesso@heanet.ie # @tags development, test, REMOVEME # @maturity development # @language Ruby ############################################################ # When this works, just remove it! #require 'ric' $ver = '1.2.1' def richiedi(str) avail = `gem list #{str}`.split("\n").select{|line| line.match( /#{str} /) }.join('') ret = "Requiring: require '#{str}' [#{avail}].. " ret += require( str.to_s ).to_s ret end def n $count ||= -1 $count += 1 end def nputs(s) puts "#{n} #{Time.now}: #{s}" end def main() begin nputs "RicLib Test v#{$ver} (you should see something green): '#{ $0 }'" nputs "#{richiedi(:rubygems)}" nputs "#{richiedi(:ric)}" Ric.say_hello nputs Ric.version nputs "Now invoking: #{white 'Ric.ric_help' }" Ric.ric_help #rescue "ERRORS on inviking: Ric.help()" nputs "If you seen green, then everything is #{ green('fine') rescue "some ERROR: #{$!}"}" rescue puts "E. Some exception: #{$!}" end end main
Version data entries
30 entries across 30 versions & 1 rubygems