rsync_cron 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rsync_cron/cli.rb +2 -2
- data/lib/rsync_cron/{scheduler.rb → installer.rb} +2 -2
- data/lib/rsync_cron/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7f55c333647cab099cea9cd1de242c6f799bb9e
|
4
|
+
data.tar.gz: 6ce5fcd12df24af02f9e93cd97523ee7f6785e7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed70f59d5ad3b7cd8d4d5f2659fc620b77bae3159d2afa416a11e8ac24134d1e4cbb9347173b7a633bcda257368a75cb6f562c2f3b385c209e2f7aa6dc164a79
|
7
|
+
data.tar.gz: 0ea707db3e361f7f347e97efe0e2d6e7c214bd3bf98138b64980d851379fc635a3186d3f4a798c72671ad940703c207351f505ab083a7f8dd7107a62ba6f6cc4
|
data/Gemfile.lock
CHANGED
data/lib/rsync_cron/cli.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "optparse"
|
2
2
|
require "rsync_cron/host"
|
3
3
|
require "rsync_cron/command"
|
4
|
-
require "rsync_cron/
|
4
|
+
require "rsync_cron/installer"
|
5
5
|
require "rsync_cron/cron"
|
6
6
|
|
7
7
|
module RsyncCron
|
@@ -23,7 +23,7 @@ module RsyncCron
|
|
23
23
|
return unless command.valid? if @check
|
24
24
|
crontab = "#{@cron} #{command}"
|
25
25
|
return @io.puts crontab unless @shell
|
26
|
-
|
26
|
+
Installer.new(crontab, @shell).call.tap do |res|
|
27
27
|
@io.puts "new crontab installed" if res
|
28
28
|
end
|
29
29
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module RsyncCron
|
2
|
-
class
|
2
|
+
class Installer
|
3
3
|
def initialize(content, shell)
|
4
4
|
@content = content
|
5
5
|
@shell = shell
|
@@ -7,7 +7,7 @@ module RsyncCron
|
|
7
7
|
|
8
8
|
def call
|
9
9
|
return if @shell.empty?
|
10
|
-
IO.popen(@shell, "
|
10
|
+
IO.popen(@shell, "r+") do |pipe|
|
11
11
|
pipe.puts(@content)
|
12
12
|
pipe.close_write
|
13
13
|
end
|
data/lib/rsync_cron/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsync_cron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- costajob
|
@@ -74,8 +74,8 @@ files:
|
|
74
74
|
- lib/rsync_cron/command.rb
|
75
75
|
- lib/rsync_cron/cron.rb
|
76
76
|
- lib/rsync_cron/host.rb
|
77
|
+
- lib/rsync_cron/installer.rb
|
77
78
|
- lib/rsync_cron/options.rb
|
78
|
-
- lib/rsync_cron/scheduler.rb
|
79
79
|
- lib/rsync_cron/version.rb
|
80
80
|
- rsync_cron.gemspec
|
81
81
|
homepage: https://github.com/costajob/rsync_cron
|