captured 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +30 -2
- data/lib/captured/file_uploader.rb +7 -5
- data/lib/captured.rb +1 -1
- metadata +13 -4
data/README.markdown
CHANGED
@@ -4,8 +4,36 @@ captured
|
|
4
4
|
Quick screen capture and sharing application for Mac OS X.
|
5
5
|
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
Install
|
8
|
+
=======
|
9
|
+
|
10
|
+
to install captured:
|
11
|
+
|
12
|
+
$ sudo gem install csexton-captured -s http://gems.github.com
|
13
|
+
$ captured --install
|
14
|
+
$ open -e ~/.captured.yml
|
15
|
+
|
16
|
+
Then you will need to exit that config file with the approprate settings for your server.
|
17
|
+
|
18
|
+
The simplest way is to use the scp type.
|
19
|
+
|
20
|
+
* user - optinal if your remote user is the same as your local user
|
21
|
+
* password - optional if you have setup key pair authentication
|
22
|
+
* host - the remote host name
|
23
|
+
* url - the public url to the remote host+path
|
24
|
+
* path - the remote path to upload to
|
25
|
+
|
26
|
+
upload:
|
27
|
+
type: scp
|
28
|
+
user: user
|
29
|
+
host: example.com
|
30
|
+
path: example.com/captured/
|
31
|
+
url: "http://example.com/captured/"
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
Icons
|
36
|
+
=====
|
9
37
|
|
10
38
|
Icons from the [Crystal Clear](http://www.everaldo.com/crystal/) icon set by [Everaldo Coelho](http://en.wikipedia.org/wiki/Everaldo_Coelho). – The icons are [licensed](http://www.everaldo.com/crystal/?action=license) under the [GNU Lesser General Public License (LGPL)](http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License).
|
11
39
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'digest/md5'
|
2
2
|
require 'erb'
|
3
|
+
require 'yaml'
|
3
4
|
|
4
5
|
class FileUploader
|
5
6
|
def self.upload(file, options)
|
@@ -37,14 +38,15 @@ class FileUploader
|
|
37
38
|
require 'etc'
|
38
39
|
settings = @config['upload']
|
39
40
|
lambda do |file, remote_name|
|
40
|
-
puts "host = '#{settings['host']}'"
|
41
|
-
puts "user = '#{settings['user'] || Etc.getlogin}'"
|
42
|
-
puts "file = '#{file}'"
|
43
|
-
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}'"
|
44
45
|
Net::SCP.upload!(settings['host'],
|
45
46
|
settings['user'] || Etc.getlogin,
|
46
47
|
file,
|
47
|
-
settings['path']+remote_name
|
48
|
+
settings['path']+remote_name,
|
49
|
+
:password => settings[:password])
|
48
50
|
"#{@config['upload']['url']}#{remote_name}"
|
49
51
|
end
|
50
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: captured
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Sexton
|
@@ -9,10 +9,19 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-06-
|
12
|
+
date: 2009-06-26 00:00:00 -04:00
|
13
13
|
default_executable: captured
|
14
|
-
dependencies:
|
15
|
-
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: net-scp
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
16
25
|
description:
|
17
26
|
email: csexton@gmail.com
|
18
27
|
executables:
|