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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ae348a73cf44b1af8b0f4eab8a0771d96f06025
4
- data.tar.gz: 69083ccb351f50dc6ad73b1925623b1d0b841684
3
+ metadata.gz: e7f55c333647cab099cea9cd1de242c6f799bb9e
4
+ data.tar.gz: 6ce5fcd12df24af02f9e93cd97523ee7f6785e7e
5
5
  SHA512:
6
- metadata.gz: 50463c9b982ecfa1a02a9a0c44510ce3b5f2d58cc55bdaca8e2c8e578dc9b26d20ba246bd5ed0b7e718ceaa821cf4b667817b1478938df585fb4cfa3d943b9c3
7
- data.tar.gz: e89b28191fd2c900a73a59bd4dc5f409b6e5b3bae74d26c544c14958d83aa2a62023ba197946a715ea0d2ab85e3a51585bd89b15dd98da0fe902faa1b04d1698
6
+ metadata.gz: ed70f59d5ad3b7cd8d4d5f2659fc620b77bae3159d2afa416a11e8ac24134d1e4cbb9347173b7a633bcda257368a75cb6f562c2f3b385c209e2f7aa6dc164a79
7
+ data.tar.gz: 0ea707db3e361f7f347e97efe0e2d6e7c214bd3bf98138b64980d851379fc635a3186d3f4a798c72671ad940703c207351f505ab083a7f8dd7107a62ba6f6cc4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rsync_cron (1.0.6)
4
+ rsync_cron (1.0.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  require "optparse"
2
2
  require "rsync_cron/host"
3
3
  require "rsync_cron/command"
4
- require "rsync_cron/scheduler"
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
- Scheduler.new(crontab, @shell).call.tap do |res|
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 Scheduler
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, "a+") do |pipe|
10
+ IO.popen(@shell, "r+") do |pipe|
11
11
  pipe.puts(@content)
12
12
  pipe.close_write
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module RsyncCron
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
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.6
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