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 +3 -2
- data/lib/captured/file_uploader.rb +2 -5
- data/lib/captured.rb +2 -2
- metadata +1 -1
data/README.markdown
CHANGED
@@ -9,7 +9,7 @@ Install
|
|
9
9
|
|
10
10
|
to install captured:
|
11
11
|
|
12
|
-
$ sudo gem install
|
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:
|
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
|
-
|
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