Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

making pastejour play nicely with vim. added the -t option for teeing

  • Loading branch information...
commit d69c3271ed784fd2f1e573213edcec2b9706b3e3 1 parent fd2ecf7
@tenderlove tenderlove authored
View
5 bin/pastejour
@@ -4,6 +4,7 @@ require "rubygems"
require "pastejour"
multiple = ARGV.delete("-m")
+teeing = ARGV.delete("-t") || false
name = ARGV.shift
if $stdin.tty?
@@ -12,5 +13,7 @@ if $stdin.tty?
$stdout.flush
else
name = [ENV["USER"], name].compact.join("-")
- Pastejour.serve(name, multiple, $stdin.read)
+ contents = $stdin.read
+ Pastejour.serve(name, multiple, contents)
+ puts contents if teeing
end
View
2  lib/pastejour.rb
@@ -59,7 +59,7 @@ def self.serve(name, multiple, contents)
tr["description"] = "A paste."
DNSSD.register(name, SERVICE, "local", PORT, tr.encode) do |reply|
- puts "Pasting #{name}..."
+ STDERR.puts "Pasting #{name}..."
end
log = WEBrick::Log.new(true) # true fools it
View
2  lib/pastejour/version.rb
@@ -1,3 +1,3 @@
module Pastejour
- VERSION = "1.0.3".freeze
+ VERSION = "1.0.4".freeze
end
View
4 pastejour.gemspec
@@ -1,13 +1,13 @@
Gem::Specification.new do |s|
s.name = %q{pastejour}
- s.version = "1.0.3"
+ s.version = "1.0.4"
s.specification_version = 2 if s.respond_to? :specification_version=
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["John Barnette", "Evan Phoenix"]
s.autorequire = %q{pastejour}
- s.date = %q{2008-06-03}
+ s.date = %q{2008-06-04}
s.default_executable = %q{pastejour}
s.description = %q{Broadcast standard out.}
s.email = %q{jbarnette@rubyforge.org}
Please sign in to comment.
Something went wrong with that request. Please try again.