Skip to content
Browse files

better uploading

  • Loading branch information...
1 parent 0a1c413 commit 597d2c46a6be151d27af5c518fdb7f17dccaaf6a Francisco Treacy committed Jan 30, 2010
Showing with 4 additions and 15 deletions.
  1. +4 −15 run.sh
View
19 run.sh
@@ -2,25 +2,14 @@
require 'rubygems'
require 'bind'
-action = lambda { |file|
- # Net::HTTP.start(uri.host, uri.port) do |http|
- # headers = {'Content-Type' => 'text/plain; charset=utf-8'}
- # put_data = "put payload"
- # response = http.send_request('PUT', uri.request_uri, put_data,
- # headers)
- # puts "Response #{response.code} #{response.message}:
- # #{response.body}"
- # end
-
+upload = lambda do |file|
system "./upload.sh #{file.path}"
- }
-
-# restart.call
+end
listener = Bind::Listener.new \
- :interval => 1,
+ :interval => 0.5,
:debug => $stdout,
- :actions => [action],
+ :actions => [upload],
:paths => ['*'] # Dir['**/*.{js}']
listener.run!

0 comments on commit 597d2c4

Please sign in to comment.
Something went wrong with that request. Please try again.