csexton-captured 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,14 +38,15 @@ class FileUploader
38
38
  require 'etc'
39
39
  settings = @config['upload']
40
40
  lambda do |file, remote_name|
41
- puts "host = '#{settings['host']}'"
42
- puts "user = '#{settings['user'] || Etc.getlogin}'"
43
- puts "file = '#{file}'"
44
- puts "path = '#{settings['path']+remote_name}'"
41
+ #puts "host = '#{settings['host']}'"
42
+ #puts "user = '#{settings['user'] || Etc.getlogin}'"
43
+ #puts "file = '#{file}'"
44
+ #puts "path = '#{settings['path']+remote_name}'"
45
45
  Net::SCP.upload!(settings['host'],
46
46
  settings['user'] || Etc.getlogin,
47
47
  file,
48
- settings['path']+remote_name)
48
+ settings['path']+remote_name,
49
+ :password => settings[:password])
49
50
  "#{@config['upload']['url']}#{remote_name}"
50
51
  end
51
52
  end
data/lib/captured.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'captured/file_tracker'
2
2
  require 'captured/file_uploader'
3
- require 'captured/fs_events'
4
3
 
5
4
  class Captured
6
5
  def self.config_file
@@ -18,6 +17,7 @@ class Captured
18
17
  end
19
18
 
20
19
  def self.run_and_watch!(options)
20
+ require 'captured/fs_events'
21
21
  watch_path = options[:watch_path] || "#{ENV['HOME']}/Desktop/"
22
22
  tracker = FileTracker.new(options)
23
23
  tracker.scan([desktop_dir], :existing)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csexton-captured
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Sexton
@@ -9,11 +9,11 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-25 00:00:00 -07:00
12
+ date: 2009-06-26 00:00:00 -07:00
13
13
  default_executable: captured
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: net-ssh
16
+ name: net-scp
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement