[Aversa-commits] aversa/bin aversa.rb
tom at rubyforge.org
tom at rubyforge.org
Wed Sep 8 15:06:24 EDT 2004
Update of /var/cvs/aversa/aversa/bin
In directory rubyforge.org:/tmp/cvs-serv22966
Modified Files:
aversa.rb
Log Message:
Tweaking some typos here and there
Index: aversa.rb
===================================================================
RCS file: /var/cvs/aversa/aversa/bin/aversa.rb,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** aversa.rb 8 Sep 2004 19:02:04 -0000 1.3
--- aversa.rb 8 Sep 2004 19:06:20 -0000 1.4
***************
*** 9,23 ****
# === How to use this program
#
! # - On console prompt
#
# > ./aversa download foo.torrent
#
#
! # - In your script
#
# require 'aversa'
# Aversa.main('download', 'foo.torrent')
#
! # # or Call the method directly without pass optparser.
# Aversa.download('foo.torrent')
#
--- 9,23 ----
# === How to use this program
#
! # - On console prompt:
#
# > ./aversa download foo.torrent
#
#
! # - In your script:
#
# require 'aversa'
# Aversa.main('download', 'foo.torrent')
#
! # # or call the method directly without going thru optparser:
# Aversa.download('foo.torrent')
#
***************
*** 25,31 ****
# # _Design_Notes_
# #
! # # The idea from Pike, Python, If define module/main function then
! # # It is an easy to automation the program from other ruby scripts.
! #
#
# === More examples
--- 25,30 ----
# # _Design_Notes_
# #
! # # The idea from Pike, Python - if we define a module/main function then
! # # It is easy to use the program from other ruby scripts.
#
# === More examples
***************
*** 36,43 ****
#
#
! # == NOTES (For developpers)
#
# This program WILL NOT contain any logic codes.
! # It is this program's role, to be front end component for other tools.
#
#
--- 35,42 ----
#
#
! # == NOTES (For developers)
#
# This program WILL NOT contain any logic codes.
! # It is this program's role to be the front end component for other tools.
#
#
***************
*** 45,49 ****
#
# def rename(metainfo_file, new_name)
! # MataInfo.new(file){ |m| m['info']['name'] = new_name }.save(file)
# end
#
--- 44,48 ----
#
# def rename(metainfo_file, new_name)
! # MetaInfo.new(file){ |m| m['info']['name'] = new_name }.save(file)
# end
#
***************
*** 51,61 ****
# It should be separated for maintanance.
#
- #
# - TODO Is this possible? to generate optparse rules from modules.
# Perhaps to have a standard method or class per module that supplies the
# arguments that need to be parsed?
#
! #
! # == ToDo list
#
# - aversa rename [metainfo] [new name]
--- 50,58 ----
# It should be separated for maintanance.
#
# - TODO Is this possible? to generate optparse rules from modules.
# Perhaps to have a standard method or class per module that supplies the
# arguments that need to be parsed?
#
! # == TODO list
#
# - aversa rename [metainfo] [new name]
***************
*** 77,81 ****
#
-
require 'net/bittorrent'
include Net::BitTorrent
--- 74,77 ----
***************
*** 85,89 ****
##
# If restrict file/module naming rules,
! # we can generate this table from exists files, dinamically.
#
--- 81,85 ----
##
# If restrict file/module naming rules,
! # we can generate this table from exists files, dynamically.
#
***************
*** 101,106 ****
##
! # Each modules can have meta information which help and version,
! # by implement special the methods. follow like these:
#
--- 97,102 ----
##
! # Each module can supply meta information for help and version,
! # by implementing these special methods:
#
***************
*** 110,114 ****
def self.version
! return "(Aversa) Version message v0.0.1"
end
--- 106,110 ----
def self.version
! return "(Aversa) Version v0.0.1"
end
***************
*** 121,125 ****
##
! # If command is a toplevel command, and if top level command had argument
# aversa help ... show 'aversa' s help
# aversa help showinfo ... show 'showinfo' module's help
--- 117,121 ----
##
! # If command is a toplevel command, and if top level command had arguments
# aversa help ... show 'aversa' s help
# aversa help showinfo ... show 'showinfo' module's help
***************
*** 172,176 ****
obj = load_module(module_name)
unless obj.respond_to? "main"
! raise NoMethodError, "undefined method 'main' fo #{include_name}"
end
return obj.main(*args)
--- 168,172 ----
obj = load_module(module_name)
unless obj.respond_to? "main"
! raise NoMethodError, "Undefined method 'main' for #{include_name}"
end
return obj.main(*args)
***************
*** 180,182 ****
Aversa.main(*ARGV) if $0 == __FILE__
-
--- 176,177 ----
More information about the Aversa-commits
mailing list