h2ocube_rails_tasks 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e331f724947da4060b1ef8bfc3e2888e04c034f
4
- data.tar.gz: ff74a1a45015665e95d869981ab59f49165957ce
3
+ metadata.gz: 00e7f6f3ab764f7c49ab181d187ecb5a36c29fa5
4
+ data.tar.gz: 5769dd55029f524c6196393bb29965befcfa2228
5
5
  SHA512:
6
- metadata.gz: 19f80405090df71d0cebd52a5727345029555766ddeb0fc19d95c24adbd2c10cb251c43b7ef376873a0e56784106d6ce5e688e71f43ff2793baf24e46b011c16
7
- data.tar.gz: c72f92e01632ce463d484c23a473eb0c4d22c5d68ea8af76956070e5a74c095019a3e5469660339a04a79ea51175371095a2f5b914d1e2edb4b35ad86934ed86
6
+ metadata.gz: b7beace6b37f19e9b2b0c858205f87bc4e38abcb542d393485624412db3841c103a8d392b549afbb6ca8ca17dd3aac9bd836d55434d1176a01f5ac29fd8e33c5
7
+ data.tar.gz: 0a7e2f10051b9d00d4bccb5f4217b702fd669f20f0f0244054c183e5ebcf62bee53740f0e589a758263230cc8ffa69c0fcc1909ebe650d11f8302bca9d1e10e2
data/README.md CHANGED
@@ -24,7 +24,7 @@ Or install it yourself as:
24
24
  rake git:clear # Clear files in .gitignore
25
25
  rake git:commit[comment] # Git commit with your comment
26
26
  rake git:pull # Git pull
27
- rake git:push[comment] # Git push with your comment
27
+ rake git:push[comment, to] # Git push with your comment
28
28
 
29
29
  # has unicorn.rb
30
30
  rake unicorn:restart # Hot restart unicorn server
@@ -64,6 +64,8 @@ Or install it yourself as:
64
64
 
65
65
  # others
66
66
  rake locales:sort # Sort config/locales/*.yml
67
+ rake db:dump # Dump all database
68
+ rake backup # Backup all things
67
69
 
68
70
  ## Contributing
69
71
 
@@ -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.9'
6
+ s.version = '0.0.10'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ['Ben']
9
9
  s.email = ['ben@h2ocube.com']
@@ -0,0 +1,4 @@
1
+ desc 'Backup all things'
2
+ task :backup, [:to] => ['db:dump'] do |task, args|
3
+ Rake::Task['git:push'].execute comment: "Backup @ #{Time.now}", to: args[:to]
4
+ end
@@ -0,0 +1,9 @@
1
+ namespace :db do
2
+ desc 'Dump database'
3
+ task :dump do
4
+ list = Rake::Task.tasks.map(&:name)
5
+ %w(mysql:dump postgresql:dump mongodb:dump).each do |name|
6
+ Rake::Task[name].execute if list.include?(name)
7
+ end
8
+ end
9
+ end
@@ -14,8 +14,10 @@ if File.exists? Rails.root.join('.git')
14
14
  end
15
15
 
16
16
  desc 'Git push with your comment'
17
- task :push, [:comment] => [:commit] do |task, comment|
18
- zfben_rails_rake_system 'git push'
17
+ task :push, [:comment, :to] => [:commit] do |task, args|
18
+ cmd = 'git push'
19
+ cmd << ' ' << args[:to] if args[:to]
20
+ zfben_rails_rake_system cmd
19
21
  end
20
22
 
21
23
  desc 'Clear files in .gitignore'
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.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-28 00:00:00.000000000 Z
11
+ date: 2013-11-01 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
@@ -40,6 +40,8 @@ files:
40
40
  - h2ocube_rails_tasks.gemspec
41
41
  - lib/h2ocube_rails_tasks.rb
42
42
  - lib/h2ocube_rails_tasks/helper.rb
43
+ - lib/h2ocube_rails_tasks/tasks/backup.rb
44
+ - lib/h2ocube_rails_tasks/tasks/db.rb
43
45
  - lib/h2ocube_rails_tasks/tasks/git.rb
44
46
  - lib/h2ocube_rails_tasks/tasks/locales.rb
45
47
  - lib/h2ocube_rails_tasks/tasks/mongodb.rb
@@ -59,17 +61,17 @@ require_paths:
59
61
  - lib
60
62
  required_ruby_version: !ruby/object:Gem::Requirement
61
63
  requirements:
62
- - - '>='
64
+ - - ">="
63
65
  - !ruby/object:Gem::Version
64
66
  version: '0'
65
67
  required_rubygems_version: !ruby/object:Gem::Requirement
66
68
  requirements:
67
- - - '>='
69
+ - - ">="
68
70
  - !ruby/object:Gem::Version
69
71
  version: '0'
70
72
  requirements: []
71
73
  rubyforge_project:
72
- rubygems_version: 2.1.9
74
+ rubygems_version: 2.1.10
73
75
  signing_key:
74
76
  specification_version: 4
75
77
  summary: This is a plugin to add some useful tasks to rails.