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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00e7f6f3ab764f7c49ab181d187ecb5a36c29fa5
4
- data.tar.gz: 5769dd55029f524c6196393bb29965befcfa2228
3
+ metadata.gz: d2525236f405e51753a221bb76bb1d035502d17e
4
+ data.tar.gz: 4d1d1ce1c66b6e59c6427ad0066b9ebbfd90abef
5
5
  SHA512:
6
- metadata.gz: b7beace6b37f19e9b2b0c858205f87bc4e38abcb542d393485624412db3841c103a8d392b549afbb6ca8ca17dd3aac9bd836d55434d1176a01f5ac29fd8e33c5
7
- data.tar.gz: 0a7e2f10051b9d00d4bccb5f4217b702fd669f20f0f0244054c183e5ebcf62bee53740f0e589a758263230cc8ffa69c0fcc1909ebe650d11f8302bca9d1e10e2
6
+ metadata.gz: 68f3d845b6a41a90761324369a1f7f41e61795b982c63b5df8757462743894cb61445de23cf8f62afcd75f49fa92e4b454668c460b8d521f0cd3c31853e5cb85
7
+ data.tar.gz: 0c3b54ff71c1623c675882d9ffc981b8153a5b7282cb9b51a07f92e4b507ddd3783d662bcdd648fe0a4eb33dc4bcdb5b07701d7b22d3bac3871a01e0b00f2af2
data/README.md CHANGED
@@ -65,6 +65,7 @@ Or install it yourself as:
65
65
  # others
66
66
  rake locales:sort # Sort config/locales/*.yml
67
67
  rake db:dump # Dump all database
68
+ rake db:restore # Restore all database
68
69
  rake backup # Backup all things
69
70
 
70
71
  ## Contributing
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'h2ocube_rails_tasks'
6
- s.version = '0.0.10'
6
+ s.version = '0.0.11'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ['Ben']
9
9
  s.email = ['ben@h2ocube.com']
@@ -1,4 +1,6 @@
1
1
  desc 'Backup all things'
2
- task :backup, [:to] => ['db:dump'] do |task, args|
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.10
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-01 00:00:00.000000000 Z
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
- - ".gitignore"
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.10
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: