backup_demon 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ pkg/*
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- backup_demon (0.0.1)
4
+ backup_demon (0.0.2)
5
5
  thor (~> 0.18)
6
6
 
7
7
  GEM
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # Backup-Demon
2
+
3
+ Basically, a simple daemon that watches for a device to come around; then it mounts it, rsyncs it, and unmounts it.
4
+
5
+ To make things interesting, it won't keep backing up to the same drive, expecting you to swap the drive every time you want a new backup.
6
+
7
+ ## Installing
8
+
9
+ gem install backup_demon
10
+
11
+ That will give you the command `backup_demon` and get you rolling.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler/setup'
2
+ require 'bundler/gem_tasks'
data/backup_demon.gemspec CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
5
5
  s.name = "backup_demon"
6
6
  s.version = BackupDemon::Version
7
7
  s.summary = "BackupDemon backs up to external drives"
8
- s.homepage = "https://github.com/ryanfaerman"
8
+ s.homepage = "https://github.com/ryanfaerman/backup_demon"
9
9
  s.email = ["ry@nwitty.com"]
10
10
  s.authors = ["Ryan Faerman"]
11
11
 
@@ -10,8 +10,6 @@ module BackupDemon
10
10
  interval = Float(interval)
11
11
  procline 'waiting for drive...'
12
12
 
13
- # puts "#{@drive.exists?} && #{@drive.different?} (#{@drive.exists? && @drive.different?})"
14
- # puts "#{@drive.previous.inspect} != #{@drive.current.inspect} || #{@drive.current.nil?}"
15
13
  if @drive.exists? && @drive.different?
16
14
  procline 'Found Drive'
17
15
  if @drive.mount(@mount_point)
@@ -32,7 +30,7 @@ module BackupDemon
32
30
  end
33
31
 
34
32
  def procline(string)
35
- $0 = "backup-demon: #{string}"
33
+ $0 = "backup_demon: #{string}"
36
34
  end
37
35
 
38
36
  def pid
@@ -34,7 +34,7 @@ module BackupDemon
34
34
  def mount(mount_point)
35
35
  @mount_point = mount_point
36
36
  FileUtils.mkdir_p(@mount_point) unless File.exists?(@mount_point)
37
- puts "mount #{@device} #{@mount_point}"
37
+ `mount #{@device} #{@mount_point}`
38
38
 
39
39
  if mounted?
40
40
  @previous = File.stat(@device)
@@ -50,7 +50,7 @@ module BackupDemon
50
50
  end
51
51
 
52
52
  def unmount
53
- puts "umount #{@device}"
53
+ `umount #{@device}`
54
54
  end
55
55
 
56
56
  def unmounted?
@@ -1,3 +1,3 @@
1
1
  module BackupDemon
2
- Version = VERSION = '0.0.1'
2
+ Version = VERSION = '0.0.2'
3
3
  end
data/lib/backup_demon.rb CHANGED
@@ -16,7 +16,4 @@ module BackupDemon
16
16
  def self.configure
17
17
  yield config
18
18
  end
19
- end
20
-
21
-
22
- # BackupDemon::Daemon.new(['tmp/banana', 'tmp/jones'], 'tmp/device', 'tmp/mount/point').run!
19
+ end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backup_demon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Ryan Faerman
@@ -13,6 +14,7 @@ dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: thor
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -33,8 +36,11 @@ executables:
33
36
  extensions: []
34
37
  extra_rdoc_files: []
35
38
  files:
39
+ - .gitignore
36
40
  - Gemfile
37
41
  - Gemfile.lock
42
+ - README.md
43
+ - Rakefile
38
44
  - backup_demon.gemspec
39
45
  - bin/backup_demon
40
46
  - lib/backup_demon.rb
@@ -45,27 +51,34 @@ files:
45
51
  - lib/backup_demon/device.rb
46
52
  - lib/backup_demon/sync.rb
47
53
  - lib/backup_demon/version.rb
48
- homepage: https://github.com/ryanfaerman
54
+ homepage: https://github.com/ryanfaerman/backup_demon
49
55
  licenses: []
50
- metadata: {}
51
56
  post_install_message:
52
57
  rdoc_options: []
53
58
  require_paths:
54
59
  - lib
55
60
  required_ruby_version: !ruby/object:Gem::Requirement
61
+ none: false
56
62
  requirements:
57
63
  - - ! '>='
58
64
  - !ruby/object:Gem::Version
59
65
  version: '0'
66
+ segments:
67
+ - 0
68
+ hash: -2489128216511426742
60
69
  required_rubygems_version: !ruby/object:Gem::Requirement
70
+ none: false
61
71
  requirements:
62
72
  - - ! '>='
63
73
  - !ruby/object:Gem::Version
64
74
  version: '0'
75
+ segments:
76
+ - 0
77
+ hash: -2489128216511426742
65
78
  requirements: []
66
79
  rubyforge_project:
67
- rubygems_version: 2.0.3
80
+ rubygems_version: 1.8.24
68
81
  signing_key:
69
- specification_version: 4
82
+ specification_version: 3
70
83
  summary: BackupDemon backs up to external drives
71
84
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- Y2M0Nzk4YzkwOGI1OWVkZmVjNzFlMmQ1NDMwOGY3YTJlMmFkZTE4OA==
5
- data.tar.gz: !binary |-
6
- ZDViNGE3NzcyN2MwMTE1MTcwZTgxYzU4MzFiZjA4NTVmODg5YmI1NA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- Y2E0YTljNGFiYzMwZmU3MzNkYTU3OWQ1YmE5YWE2ZmM5MmVjMTYxZGUwMTlh
10
- OWU3ZTIzOTBhNTBkYTk1Yzk2N2VmZjYzZDEwODU5NWU4ZGZjNThhZWE2ZDY1
11
- ZDU1NDcxMDFhOGM4YmZiN2RkOGFlZDE2Njk5NDEzOTUyYmRhYWU=
12
- data.tar.gz: !binary |-
13
- ZGFlNTgzNzkzOGRlYjAxMjQ5NzAxMDdlZDdmMjRhYmMzMGQ4YWY1NjJiMmFi
14
- YzdmNWFjODgxMjM5MjAwMWJiMTc2ZDRlYjdhMDk2ZjE2MGUwMjViNWNkZDdl
15
- NWEyYzBhOGFlODU5ZGY2YzIxN2FiNTg2MGVkMjZmNWE2NTFkNWQ=