h2ocube_rails_tasks 0.0.2 → 0.0.3

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a121f8d58bd4f6113463f88d48f877113a8483ff
4
+ data.tar.gz: ac093fbcd52c5b6d799d8b48b5f81afc11b813b5
5
+ SHA512:
6
+ metadata.gz: 3490c082ec3968144ec03292c39859a3b093e293e5c4c3e08ca5fcb031d0146c02fe94687584d1cc3f738210f76078984e339cafbb4e5ce3b4a6f944524e07e0
7
+ data.tar.gz: 9be7b43c630031913893b23baf7c6725617ce7db5bdf7c3f4e0d6d6eef5721d1399612eac4cd2b0c89701861bf18b86ac78412fca82aa1a84bcce792deedfc66
data/README.rdoc CHANGED
@@ -13,9 +13,13 @@ This is plugin to add some useful tasks to rails.
13
13
  rake unicorn:start # Start unicorn server
14
14
  rake unicorn:stop # Stop unicorn server
15
15
 
16
+ # has config/puma.rb
17
+ rake puma:restart # Hot restart puma server
18
+ rake puma:start # Start puma server
19
+ rake puma:stop # Stop puma server
20
+
16
21
  # has config/mongoid.yml
17
22
  rake mongodb:dump # mongodump
18
- rake mongodb:clear # drop database
19
23
  rake mongodb:restore # mongorestore
20
24
  rake mongodb:repair # Repair Mongodb
21
25
 
@@ -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.2'
6
+ s.version = '0.0.3'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ['Ben']
9
9
  s.email = ['ben@h2ocube.com']
@@ -4,12 +4,6 @@ if File.exist? Rails.root.join('config/mongoid.yml')
4
4
  db = config['database']
5
5
  host = config['hosts'][0].split(':')[0]
6
6
  port = config['hosts'][0].split(':')[1]
7
-
8
- clear = "mongod --host #{host} --port #{port} --db #{db} --eval 'db.DropDatabase()'"
9
- desc clear
10
- task :clear do
11
- zfben_rails_rake_system clear
12
- end
13
7
 
14
8
  backup = "mongodump --host #{host} --port #{port} --db #{db}"
15
9
  desc backup
@@ -0,0 +1,26 @@
1
+ if File.exists? Rails.root.join('config/puma.rb')
2
+ namespace :puma do
3
+ desc 'Start puma server'
4
+ task :start => :stop do
5
+ cmd = 'puma -C config/puma.rb -e production'
6
+ zfben_rails_rake_system 'mkdir tmp' unless File.exists? Rails.root.join('tmp')
7
+ zfben_rails_rake_system cmd
8
+ end
9
+
10
+ desc 'Stop puma server'
11
+ task :stop do
12
+ if File.exists? Rails.root.join('tmp/puma.pid')
13
+ zfben_rails_rake_system 'kill -QUIT `cat tmp/puma.pid`'
14
+ sleep 1
15
+ zfben_rails_rake_system 'rm tmp/puma.pid' if File.exists? Rails.root.join('tmp/puma.pid')
16
+ end
17
+ end
18
+
19
+ desc 'Hot restart puma server'
20
+ task :restart do
21
+ if File.exists? Rails.root.join('tmp/puma.pid')
22
+ zfben_rails_rake_system 'kill -USR2 `cat tmp/puma.pid`'
23
+ end
24
+ end
25
+ end
26
+ end
metadata CHANGED
@@ -1,30 +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.2
5
- prerelease:
4
+ version: 0.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ben
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-11-30 00:00:00.000000000 Z
11
+ date: 2013-04-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rainbow
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  description: ''
@@ -43,30 +40,30 @@ files:
43
40
  - lib/h2ocube_rails_tasks/helper.rb
44
41
  - lib/h2ocube_rails_tasks/tasks/git.rb
45
42
  - lib/h2ocube_rails_tasks/tasks/mongodb.rb
43
+ - lib/h2ocube_rails_tasks/tasks/puma.rb
46
44
  - lib/h2ocube_rails_tasks/tasks/resque.rb
47
45
  - lib/h2ocube_rails_tasks/tasks/unicorn.rb
48
46
  homepage: https://github.com/h2ocube/h2ocube_rails_tasks
49
47
  licenses: []
48
+ metadata: {}
50
49
  post_install_message:
51
50
  rdoc_options: []
52
51
  require_paths:
53
52
  - lib
54
53
  required_ruby_version: !ruby/object:Gem::Requirement
55
- none: false
56
54
  requirements:
57
- - - ! '>='
55
+ - - '>='
58
56
  - !ruby/object:Gem::Version
59
57
  version: '0'
60
58
  required_rubygems_version: !ruby/object:Gem::Requirement
61
- none: false
62
59
  requirements:
63
- - - ! '>='
60
+ - - '>='
64
61
  - !ruby/object:Gem::Version
65
62
  version: '0'
66
63
  requirements: []
67
64
  rubyforge_project:
68
- rubygems_version: 1.8.24
65
+ rubygems_version: 2.0.3
69
66
  signing_key:
70
- specification_version: 3
67
+ specification_version: 4
71
68
  summary: ''
72
69
  test_files: []