Last commit before tagging and releasing

This commit is contained in:
capitaomorte
2009-08-29 17:59:02 +00:00
parent 15c7703b5b
commit b8dcf61367
640 changed files with 4360 additions and 77 deletions

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: Dir
# contributor: Translated from TextMate Snippet
# name: Dir.glob("..") { |file| .. }
# --
Dir.glob(${1:"${2:dir/glob/*}"}) { |${3:file}| $0 }

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: Dir
# contributor: Translated from TextMate Snippet
# name: Dir[".."]
# --
Dir[${1:"${2:glob/**/*.rb}"}]

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: File
# contributor: Translated from TextMate Snippet
# name: File.foreach ("..") { |line| .. }
# --
File.foreach(${1:"${2:path/to/file}"}) { |${3:line}| $0 }

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: File
# contributor: Translated from TextMate Snippet
# name: File.open("..") { |file| .. }
# --
File.open(${1:"${2:path/to/file}"}${3/(^[rwab+]+$)|.*/(?1:, ")/}${3:w}${3/(^[rwab+]+$)|.*/(?1:")/}) { |${4:file}| $0 }

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: File
# contributor: Translated from TextMate Snippet
# name: File.read("..")
# --
File.read(${1:"${2:path/to/file}"})

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: dir
# contributor: Translated from TextMate Snippet
# name: directory()
# --
File.dirname(__FILE__)

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: ope
# contributor: Translated from TextMate Snippet
# name: open("path/or/url", "w") { |io| .. }
# --
open(${1:"${2:path/or/url/or/pipe}"}${3/(^[rwab+]+$)|.*/(?1:, ")/}${3:w}${3/(^[rwab+]+$)|.*/(?1:")/}) { |${4:io}| $0 }

View File

@@ -0,0 +1,32 @@
# -*- mode: snippet -*-
# key: optp
# contributor: Translated from TextMate Snippet
# name: option_parse { .. }
# --
require "optparse"
options = {${1::default => "args"}}
ARGV.options do |opts|
opts.banner = "Usage: #{File.basename(\$PROGRAM_NAME)} [OPTIONS]${2/^\s*$|(.*\S.*)/(?1: )/}${2:OTHER_ARGS}"
opts.separator ""
opts.separator "Specific Options:"
$0
opts.separator "Common Options:"
opts.on( "-h", "--help",
"Show this message." ) do
puts opts
exit
end
begin
opts.parse!
rescue
puts opts
exit
end
end

View File

@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# key: patfh
# contributor: Translated from TextMate Snippet
# name: path_from_here( .. )
# --
File.join(File.dirname(__FILE__), *%w[${1:rel path here}])

View File

@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# key: unif
# contributor: Translated from TextMate Snippet
# name: unix_filter { .. }
# --
ARGF.each_line$1 do |${2:line}|
$0
end

View File

@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# key: opt
# contributor: Translated from TextMate Snippet
# name: option(..)
# --
opts.on( "-${1:o}", "--${2:long-option-name}"${3/^\s*$|(.*\S.*)/(?1:, )/}${3:String},
"${4:Option description.}" ) do |${6:opt}|
$0
end