csexton-captured 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -9,7 +9,7 @@ Install
9
9
 
10
10
  to install captured:
11
11
 
12
- $ sudo gem install csexton-captured -s http://gems.github.com
12
+ $ sudo gem install captured
13
13
  $ captured --install
14
14
  $ open -e ~/.captured.yml
15
15
 
@@ -26,8 +26,9 @@ The simplest way is to use the scp type.
26
26
  upload:
27
27
  type: scp
28
28
  user: user
29
+ password: secret
29
30
  host: example.com
30
- path: example.com/captured/
31
+ path: path/to/captured/
31
32
  url: "http://example.com/captured/"
32
33
 
33
34
 
@@ -38,15 +38,12 @@ 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}'"
45
- Net::SCP.upload!(settings['host'],
41
+ Net::SCP.upload!(settings['host'],
46
42
  settings['user'] || Etc.getlogin,
47
43
  file,
48
44
  settings['path']+remote_name,
49
45
  :password => settings[:password])
46
+
50
47
  "#{@config['upload']['url']}#{remote_name}"
51
48
  end
52
49
  end
data/lib/captured.rb CHANGED
@@ -1,5 +1,5 @@
1
- require 'captured/file_tracker'
2
- require 'captured/file_uploader'
1
+ require "#{File.dirname(__FILE__)}/captured/file_tracker"
2
+ require "#{File.dirname(__FILE__)}/captured/file_uploader"
3
3
 
4
4
  class Captured
5
5
  def self.config_file
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.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Sexton