mikrotik-backup 0.0.4 → 0.0.5

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
- SHA1:
3
- metadata.gz: 96593143d646861c03ba188f955a05c94858800c
4
- data.tar.gz: 546c4eb084bde83820b1c06ca6bb0f8eae5a9287
2
+ SHA256:
3
+ metadata.gz: bbefddbcdf5c1a1469a30d8e62d58b6da5913c2aab6b47b4d9959c6abd0ed706
4
+ data.tar.gz: 06211413d0cbfac646154a506c0f895f4779a345202517bf3d75c7455dbf35da
5
5
  SHA512:
6
- metadata.gz: 086ef209caca808523f1fc4209cd13193ca68b1a21d517690ccaacf5919486736afd85c64fa0c63aefeb702263d5ad9cb4bee97256bdf706e86967cea6deb3dc
7
- data.tar.gz: 68e3b92844951dcfdeb6059d234274d4c28f878453469016ed3261e4372d7d284671fb8ccabe07073e2cf8637b7723a15143f78e1db5b47fb07e3bc493313c99
6
+ metadata.gz: 1d16f2b34a80b02ef5763b681670fd5f653d661750702d66197a9acdca779837fe70a8bb4e498058b3706adca306c45d3fac7006293803fbcc5e67f3b62605ae
7
+ data.tar.gz: 7f15780d55ca4ed1c1f3e89f54d183d9c7d7bae88ad68f4d7376f1894ee9f78565dc08ff56c32ad715246d25f718d87f57d5465c62b96ae775635c5fde7c2fb0
data/.gitignore CHANGED
@@ -1,16 +1,16 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- mkmf.log
15
- /.idea/
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
15
+ /.idea/
16
16
  *.gem
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in mikrotik_backup.gemspec
4
- gemspec
5
- # Add Net::SSH GEM
6
- gem 'net-ssh'
7
- # Add Net::SFTP GEM
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mikrotik_backup.gemspec
4
+ gemspec
5
+ # Add Net::SSH GEM
6
+ gem 'net-ssh'
7
+ # Add Net::SFTP GEM
8
8
  gem 'net-sftp'
@@ -1,22 +1,22 @@
1
- Copyright (c) 2015 POS_troi
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2015 POS_troi
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,79 +1,106 @@
1
- [![Gem Version](https://badge.fury.io/rb/mikrotik-backup.svg)](http://badge.fury.io/rb/mikrotik-backup)
2
-
3
- # Mikrotik Backup
4
-
5
- Backup MikroTik configuration using SSH and SFTP.
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'mikrotik-backup'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install mikrotik-backup
22
-
23
- ## Usage
24
-
25
- ### Backup only
26
- ```ruby
27
-
28
- require 'mikrotik-backup'
29
-
30
- #Time format
31
- time = Time.now.strftime("%d-%m-%Y")
32
-
33
- #Config
34
- # name - associate host name (and name backup file)
35
- # host - host address
36
- # user - user name
37
- # password - user password
38
- # path - local folder for save backup file. "/var/backup/"
39
- # format - backup file format, 'binary' or 'script'
40
- config = [
41
- {name:"Router1-#{time}", host: '10.10.10.1', user:'admin', password:'admin', path:'./', format:'binary'},
42
- {name:"Router2-#{time}", host: '10.10.10.2', user:'admin', password:'admin', path:'./', format:'script'}
43
- ]
44
-
45
-
46
- backup = MTik_backup.new(config)
47
- # Start backup
48
- backup.backup
49
- ```
50
-
51
- ### Only Download backup (previously created)
52
- ```ruby
53
- backup.download
54
- ```
55
-
56
- ### Create backup and download
57
- ```ruby
58
- backup.backup_and_download
59
- ```
60
-
61
- ### Logging
62
- ```ruby
63
- # Logging only Error, out to console
64
- backup.logger(Logger::ERROR) #<- Default
65
-
66
- # Full log out to console
67
- backup.logger(Logger::DEBUG)
68
-
69
- # Full log out to file
70
- backup.logger(Logger::DEBUG,'backup.log')
71
- ```
72
-
73
- ## Contributing
74
-
75
- 1. Fork it ( https://github.com/POStroi/ruby_mikrotik_backup/fork )
76
- 2. Create your feature branch (`git checkout -b my-new-feature`)
77
- 3. Commit your changes (`git commit -am 'Add some feature'`)
78
- 4. Push to the branch (`git push origin my-new-feature`)
79
- 5. Create a new Pull Request
1
+ [![Gem Version](https://badge.fury.io/rb/mikrotik-backup.svg)](http://badge.fury.io/rb/mikrotik-backup)
2
+
3
+ # Mikrotik Backup
4
+
5
+ Backup MikroTik configuration using SSH and SFTP.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'mikrotik-backup'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install mikrotik-backup
22
+
23
+ ## Usage
24
+
25
+ ### Backup only
26
+ ```ruby
27
+
28
+ require 'mikrotik-backup'
29
+
30
+ #Time format
31
+ time = Time.now.strftime("%d-%m-%Y")
32
+
33
+ #Config
34
+ # name - associate host name (and name backup file)
35
+ # host - host address
36
+ # port - port to connect to. If not specified defaults to 22
37
+ # user - user name
38
+ # password - user password
39
+ # path - local folder for save backup file. "/var/backup/"
40
+ # format - backup file format, 'binary' or 'script'
41
+ config = [
42
+ {name:"Router1-#{time}", host: '10.10.10.1', user:'admin', password:'admin', path:'./', format:'binary'},
43
+ {name:"Router2-#{time}", host: '10.10.10.2', port:'2222', user:'admin', password:'admin', path:'./', format:'script'}
44
+ ]
45
+
46
+
47
+ backup = MTik_backup.new(config)
48
+ # Start backup
49
+ backup.backup
50
+ ```
51
+
52
+ ### Only Download backup (previously created)
53
+ ```ruby
54
+ backup.download
55
+ ```
56
+
57
+ ### Create backup and download
58
+ ```ruby
59
+ backup.backup_and_download
60
+ ```
61
+
62
+ ### Logging
63
+ ```ruby
64
+ # Logging only Error, out to console
65
+ backup.logger(Logger::ERROR) #<- Default
66
+
67
+ # Full log out to console
68
+ backup.logger(Logger::DEBUG)
69
+
70
+ # Full log out to file
71
+ backup.logger(Logger::DEBUG,'backup.log')
72
+ ```
73
+ ### Work log (Logger::DEBUG)
74
+ ```
75
+ [2015-02-11 13:01:32] INFO: SSH connect to host 192.168.1.1
76
+ [2015-02-11 13:01:36] INFO: Backup MikroTik configuration
77
+ [2015-02-11 13:01:37] INFO: SFTP connect to host 192.168.1.1
78
+ [2015-02-11 13:01:38] INFO: Download file Router1-11-02-2015.backup to ./Router1-11-02-2015.backup
79
+ [2015-02-11 13:01:38] INFO: SSH connect to host 176.xxx.xxx.28
80
+ [2015-02-11 13:01:38] INFO: Backup MikroTik configuration
81
+ [2015-02-11 13:01:39] INFO: SFTP connect to host 176.xxx.xxx.28
82
+ [2015-02-11 13:01:39] INFO: Download file Router2-11-02-2015.backup to ./Router2-11-02-2015.backup
83
+ [2015-02-11 13:01:39] INFO: SSH connect to host 188.xxx.xxx.56
84
+ [2015-02-11 13:01:40] INFO: Backup MikroTik configuration
85
+ [2015-02-11 13:01:41] INFO: SFTP connect to host 188.xxx.xxx.56
86
+ [2015-02-11 13:01:41] INFO: Download file Router3-11-02-2015.backup to ./Router3-11-02-2015.backup
87
+ [2015-02-11 13:01:41] INFO: SSH connect to host 188.xxx.xxx.74
88
+ [2015-02-11 13:01:42] INFO: Backup MikroTik configuration
89
+ [2015-02-11 13:01:42] INFO: SFTP connect to host 188.xxx.xxx.74
90
+ [2015-02-11 13:01:43] INFO: Download file Router4-11-02-2015.backup to ./Router4-11-02-2015.backup
91
+ ```
92
+
93
+ ## Problem
94
+
95
+ ```
96
+ ERROR: Creation of file mapping failed with error: 998
97
+ ```
98
+ **Close Pageant PuTTY**
99
+
100
+ ## Contributing
101
+
102
+ 1. Fork it ( https://github.com/POStroi/ruby_mikrotik_backup/fork )
103
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
104
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
105
+ 4. Push to the branch (`git push origin my-new-feature`)
106
+ 5. Create a new Pull Request
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
- require "bundler/gem_tasks"
2
-
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,34 @@
1
+ require 'mikrotik-backup'
2
+
3
+ # Time format
4
+ time = Time.now.strftime("%d-%m-%Y")
5
+
6
+ #Config
7
+ # name - associate host name (and name backup file)
8
+ # host - host address
9
+ # user - user name
10
+ # password - user password
11
+ # path - local folder for save backup file. "/var/backup/"
12
+ # format - backup format binary or script
13
+ config = [
14
+ {name:"Router1-#{time}", host: '10.10.10.1' , user:'admin' , password:'admin', path:'./', format:'binary'},
15
+ {name:"Router2-#{time}", host: '10.10.10.2' , user:'admin' , password:'admin', path:'./', format:'script'},
16
+ {name:"Router3-#{time}", host: '10.10.10.3' , user:'admin' , password:'admin', path:'./', format:'binary'},
17
+ {name:"Router4-#{time}", host: '10.10.10.4' , user:'admin' , password:'admin', path:'./', format:'script'},
18
+ ]
19
+
20
+
21
+ mtik_backup = MTik_backup.new(config)
22
+
23
+ # Logging
24
+ mtik_backup.logger(Logger::DEBUG) # remove this line if not used log, default output only Error
25
+ # Log out to file
26
+ #mtik_backup.logger(Logger::DEBUG,'backup.log')
27
+
28
+ # Start backup and download file to local machine
29
+ mtik_backup.backup_and_download
30
+
31
+ # Create backup and save to router memory, do not download file to local machine (return true)
32
+ # mtik_backup.backup
33
+ # Only download created file. (return true)
34
+ # mtik_backup.download
@@ -1,108 +1,113 @@
1
- require "mikrotik-backup/version"
2
- require 'net/ssh'
3
- require 'net/sftp'
4
- # MikroTik backup class
5
- # noinspection RubyArgCount
6
- class MTik_backup
7
- # Initialize
8
- def initialize(config)
9
- @config = config
10
- logger
11
- end
12
- # Setting for Ruby Logger
13
- def logger(log_level = Logger::ERROR,log_file = nil)
14
- if log_file.nil?
15
- @log = Logger.new(STDOUT)
16
- else
17
- @log = Logger.new(log_file)
18
- end
19
- @log.level = log_level
20
- @log.formatter = proc { |severity, datetime, progname, msg|
21
- "[#{datetime.strftime("%Y-%m-%d %H:%M:%S")}] #{severity}: #{msg}\n"
22
- }
23
- end
24
- # Backup MTik config
25
- def backup
26
- @config.each do |config|
27
- connect_to_host(config[:host],config[:user],config[:password])
28
- backup_config(config[:name],config[:format])
29
- end
30
- return true
31
- end
32
- # Only download MTik config
33
- def download
34
- @config.each do |config|
35
- download_backup(config[:host],config[:user],config[:password],config[:name],config[:path],config[:format])
36
- end
37
- return true
38
- end
39
- # Backup and download MTik config
40
- def backup_and_download
41
- @config.each do |config|
42
- connect_to_host(config[:host],config[:user],config[:password])
43
- backup_config(config[:name],config[:format])
44
- download_backup(config[:host],config[:user],config[:password],config[:name],config[:path],config[:format])
45
- end
46
- return true
47
- end
48
-
49
- # Private section
50
- private
51
- # Function connect to SSH/SFTP host
52
- def connect_to_host(host,user,password,sftp=false)
53
- begin
54
- if sftp
55
- @log.info("SFTP connect to host #{host}")
56
- @ssh_connect = Net::SFTP.start(host,user,:password=>password)
57
- else
58
- @log.info("SSH connect to host #{host}")
59
- @ssh_connect = Net::SSH.start(host,user,:password=>password)
60
- end
61
- rescue Exception => error
62
- @log.error("#{error}")
63
- exit
64
- end
65
- end
66
- # Backup function, send SSH command
67
- def backup_config(name,format='binary')
68
- @log.info("Backup MikroTik configuration")
69
- if format == 'binary'
70
- send_command("/system backup save name=#{name}")
71
- elsif format == 'script'
72
- send_command("/export file=#{name}")
73
- end
74
- @ssh_connect.close
75
- end
76
- # Download backup file from host
77
- def download_backup(host,user,password,name,path,format)
78
- connect_to_host(host,user,password,true)
79
- if format == 'binary'
80
- local_file = path+name+".backup"
81
- remote_file = name+".backup"
82
- elsif format== 'script'
83
- local_file = path+name+".rsc"
84
- remote_file = name+".rsc"
85
- end
86
- download_file(remote_file,local_file)
87
- @ssh_connect.close(@ssh_connect)
88
- end
89
- # Send command to host (SSH)
90
- def send_command(command)
91
- begin
92
- @ssh_connect.exec!(command)
93
- rescue Exception => error
94
- @log.error("#{error}")
95
- end
96
- end
97
- # Download file from host
98
- def download_file(remote_file, local_file)
99
- begin
100
- @log.info("Download file #{remote_file} to #{local_file}")
101
- @ssh_connect.download!(remote_file,local_file)
102
- rescue Exception => error
103
- @log.error("#{error}")
104
- exit
105
- end
106
- end
107
- end
108
-
1
+ require "mikrotik-backup/version"
2
+ require 'net/ssh'
3
+ require 'net/sftp'
4
+ # MikroTik backup class
5
+ # noinspection RubyArgCount
6
+ class MTik_backup
7
+ # Initialize
8
+ def initialize(config)
9
+ @config = config
10
+ @config.each do |c|
11
+ unless c[:port].is_a? Integer
12
+ c[:port] = 22
13
+ end
14
+ end
15
+ logger
16
+ end
17
+ # Setting for Ruby Logger
18
+ def logger(log_level = Logger::ERROR,log_file = nil)
19
+ if log_file.nil?
20
+ @log = Logger.new(STDOUT)
21
+ else
22
+ @log = Logger.new(log_file)
23
+ end
24
+ @log.level = log_level
25
+ @log.formatter = proc { |severity, datetime, progname, msg|
26
+ "[#{datetime.strftime("%Y-%m-%d %H:%M:%S")}] #{severity}: #{msg}\n"
27
+ }
28
+ end
29
+ # Backup MTik config
30
+ def backup
31
+ @config.each do |config|
32
+ connect_to_host(config[:host],config[:port],config[:user],config[:password])
33
+ backup_config(config[:name],config[:format])
34
+ end
35
+ return true
36
+ end
37
+ # Only download MTik config
38
+ def download
39
+ @config.each do |config|
40
+ download_backup(config[:host],config[:port],config[:user],config[:password],config[:name],config[:path],config[:format])
41
+ end
42
+ return true
43
+ end
44
+ # Backup and download MTik config
45
+ def backup_and_download
46
+ @config.each do |config|
47
+ connect_to_host(config[:host],config[:port],config[:user],config[:password])
48
+ backup_config(config[:name],config[:format])
49
+ download_backup(config[:host],config[:port],config[:user],config[:password],config[:name],config[:path],config[:format])
50
+ end
51
+ return true
52
+ end
53
+
54
+ # Private section
55
+ private
56
+ # Function connect to SSH/SFTP host
57
+ def connect_to_host(host,port,user,password,sftp=false)
58
+ begin
59
+ if sftp
60
+ @log.info("SFTP connect to host #{host}:#{port}")
61
+ @ssh_connect = Net::SFTP.start(host,user,:password=>password,:port=>port)
62
+ else
63
+ @log.info("SSH connect to host #{host}:#{port}")
64
+ @ssh_connect = Net::SSH.start(host,user,:password=>password,:port=>port)
65
+ end
66
+ rescue Exception => error
67
+ @log.error("#{error}")
68
+ exit
69
+ end
70
+ end
71
+ # Backup function, send SSH command
72
+ def backup_config(name,format='binary')
73
+ @log.info("Backup MikroTik configuration")
74
+ if format == 'binary'
75
+ send_command("/system backup save name=#{name}")
76
+ elsif format == 'script'
77
+ send_command("/export file=#{name}")
78
+ end
79
+ @ssh_connect.close
80
+ end
81
+ # Download backup file from host
82
+ def download_backup(host,port,user,password,name,path,format)
83
+ connect_to_host(host,port,user,password,true)
84
+ if format == 'binary'
85
+ local_file = path+name+".backup"
86
+ remote_file = name+".backup"
87
+ elsif format== 'script'
88
+ local_file = path+name+".rsc"
89
+ remote_file = name+".rsc"
90
+ end
91
+ download_file(remote_file,local_file)
92
+ @ssh_connect.close(@ssh_connect)
93
+ end
94
+ # Send command to host (SSH)
95
+ def send_command(command)
96
+ begin
97
+ @ssh_connect.exec!(command)
98
+ rescue Exception => error
99
+ @log.error("#{error}")
100
+ end
101
+ end
102
+ # Download file from host
103
+ def download_file(remote_file, local_file)
104
+ begin
105
+ @log.info("Download file #{remote_file} to #{local_file}")
106
+ @ssh_connect.download!(remote_file,local_file)
107
+ rescue Exception => error
108
+ @log.error("#{error}")
109
+ exit
110
+ end
111
+ end
112
+ end
113
+
@@ -1,3 +1,3 @@
1
- module MikrotikBackup
2
- VERSION = "0.0.4"
3
- end
1
+ module MikrotikBackup
2
+ VERSION = "0.0.5"
3
+ end
@@ -1,25 +1,25 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'mikrotik-backup/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "mikrotik-backup"
8
- spec.version = MikrotikBackup::VERSION
9
- spec.authors = ["POS_troi"]
10
- spec.email = ["root@sysalex.com"]
11
- spec.summary = %q{Backup MikroTik configuration using SSH and SFTP.}
12
- spec.description = %q{Backup MikroTik configuration using SSH and SFTP.}
13
- spec.homepage = "https://sysalex.com"
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler", "~> 1.7"
22
- spec.add_development_dependency "rake", "~> 10.0"
23
- spec.add_dependency "net-ssh", "~> 2.9"
24
- spec.add_dependency "net-sftp", "~> 2.1"
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'mikrotik-backup/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "mikrotik-backup"
8
+ spec.version = MikrotikBackup::VERSION
9
+ spec.authors = ["POS_troi"]
10
+ spec.email = ["root@sysalex.com"]
11
+ spec.summary = %q{Backup MikroTik configuration using SSH and SFTP.}
12
+ spec.description = %q{Backup MikroTik configuration using SSH and SFTP.}
13
+ spec.homepage = "https://sysalex.com"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_dependency "net-ssh", "~> 2.9"
24
+ spec.add_dependency "net-sftp", "~> 2.1"
25
25
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mikrotik-backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - POS_troi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-11 00:00:00.000000000 Z
11
+ date: 2019-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.7'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: net-ssh
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.9'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.9'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: net-sftp
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '2.1'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.1'
69
69
  description: Backup MikroTik configuration using SSH and SFTP.
@@ -73,11 +73,12 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
76
+ - ".gitignore"
77
77
  - Gemfile
78
78
  - LICENSE.txt
79
79
  - README.md
80
80
  - Rakefile
81
+ - example/backup.rb
81
82
  - lib/mikrotik-backup.rb
82
83
  - lib/mikrotik-backup/version.rb
83
84
  - mikrotik-backup.gemspec
@@ -91,17 +92,17 @@ require_paths:
91
92
  - lib
92
93
  required_ruby_version: !ruby/object:Gem::Requirement
93
94
  requirements:
94
- - - '>='
95
+ - - ">="
95
96
  - !ruby/object:Gem::Version
96
97
  version: '0'
97
98
  required_rubygems_version: !ruby/object:Gem::Requirement
98
99
  requirements:
99
- - - '>='
100
+ - - ">="
100
101
  - !ruby/object:Gem::Version
101
102
  version: '0'
102
103
  requirements: []
103
104
  rubyforge_project:
104
- rubygems_version: 2.0.14
105
+ rubygems_version: 2.7.6
105
106
  signing_key:
106
107
  specification_version: 4
107
108
  summary: Backup MikroTik configuration using SSH and SFTP.