h2ocube_rails_tasks 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/h2ocube_rails_tasks.gemspec +1 -1
- data/lib/h2ocube_rails_tasks/tasks/backup.rb +3 -1
- data/lib/h2ocube_rails_tasks/tasks/db.rb +9 -1
- metadata +8 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2525236f405e51753a221bb76bb1d035502d17e
|
4
|
+
data.tar.gz: 4d1d1ce1c66b6e59c6427ad0066b9ebbfd90abef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68f3d845b6a41a90761324369a1f7f41e61795b982c63b5df8757462743894cb61445de23cf8f62afcd75f49fa92e4b454668c460b8d521f0cd3c31853e5cb85
|
7
|
+
data.tar.gz: 0c3b54ff71c1623c675882d9ffc981b8153a5b7282cb9b51a07f92e4b507ddd3783d662bcdd648fe0a4eb33dc4bcdb5b07701d7b22d3bac3871a01e0b00f2af2
|
data/README.md
CHANGED
data/h2ocube_rails_tasks.gemspec
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
desc 'Backup all things'
|
2
|
-
task :backup, [:to]
|
2
|
+
task :backup, [:to] do |task, args|
|
3
|
+
Rake::Task['git:pull'].execute from: args[:to]
|
4
|
+
Rake::Task['db:dump'].execute
|
3
5
|
Rake::Task['git:push'].execute comment: "Backup @ #{Time.now}", to: args[:to]
|
4
6
|
end
|
@@ -1,9 +1,17 @@
|
|
1
1
|
namespace :db do
|
2
|
-
desc 'Dump database'
|
2
|
+
desc 'Dump all database'
|
3
3
|
task :dump do
|
4
4
|
list = Rake::Task.tasks.map(&:name)
|
5
5
|
%w(mysql:dump postgresql:dump mongodb:dump).each do |name|
|
6
6
|
Rake::Task[name].execute if list.include?(name)
|
7
7
|
end
|
8
8
|
end
|
9
|
+
|
10
|
+
desc 'Restore all database'
|
11
|
+
task :restore do
|
12
|
+
list = Rake::Task.tasks.map(&:name)
|
13
|
+
%w(mysql:restore postgresql:restore mongodb:restore).each do |name|
|
14
|
+
Rake::Task[name].execute if list.include?(name)
|
15
|
+
end
|
16
|
+
end
|
9
17
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: h2ocube_rails_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
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: '0'
|
27
27
|
description: This is a plugin to add some useful tasks to rails.
|
@@ -31,7 +31,7 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
-
-
|
34
|
+
- .gitignore
|
35
35
|
- Gemfile
|
36
36
|
- LICENSE.txt
|
37
37
|
- README.md
|
@@ -61,19 +61,18 @@ require_paths:
|
|
61
61
|
- lib
|
62
62
|
required_ruby_version: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- -
|
64
|
+
- - '>='
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- -
|
69
|
+
- - '>='
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.1.
|
74
|
+
rubygems_version: 2.1.9
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: This is a plugin to add some useful tasks to rails.
|
78
78
|
test_files: []
|
79
|
-
has_rdoc:
|