nodex 0.1.0 → 0.1.1

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.
data/lib/nodex/dsl.rb CHANGED
@@ -29,7 +29,7 @@ module Nodex
29
29
  def clear_cache
30
30
  unless skip_step?('clear_cache')
31
31
  cache_dirs.each do |dir|
32
- run "rm -rf #{dir}"
32
+ remote_run "cd #{application_path} && rm -rf #{dir}"
33
33
  end
34
34
  end
35
35
  end
@@ -46,6 +46,10 @@ module Nodex
46
46
  remote_run "cd #{application_path} && #{rake_task("gems:install")}" unless skip_step?('install_gems')
47
47
  end
48
48
 
49
+ def create_tmp
50
+ remote_run "cd #{application_path} && mkdir tmp"
51
+ end
52
+
49
53
  def install_gems
50
54
  if using_bundler?
51
55
  bundle_install
@@ -2,7 +2,7 @@ module Nodex
2
2
  module Servers
3
3
  module Mongrel
4
4
  def restart_server
5
- run "mongrel_cluster restart"
5
+ remote_run "cd #{application_path} && mongrel_cluster restart"
6
6
  end
7
7
  end
8
8
  end
@@ -2,8 +2,9 @@ module Nodex
2
2
  module Servers
3
3
  module Passenger
4
4
  def restart_server
5
- run "touch tmp/restart.txt"
5
+ remote_run "#{create_tmp}"
6
+ remote_run "cd #{application_path} && touch tmp/restart.txt"
6
7
  end
7
8
  end
8
9
  end
9
- end
10
+ end
@@ -2,8 +2,8 @@ module Nodex
2
2
  module Servers
3
3
  module Thin
4
4
  def restart_server
5
- run "thin --pid tmp/pids/thin.pid stop"
6
- run "thin --rackup config.ru --daemonize\
5
+ remote_run "cd #{application_path} && thin --pid tmp/pids/thin.pid stop"
6
+ remote_run "cd #{application_path} && thin --rackup config.ru --daemonize\
7
7
  --log log/thin.log --pid tmp/pids/thin.pid --environment production\
8
8
  --port 4500 start"
9
9
  end
@@ -2,8 +2,8 @@ module Nodex
2
2
  module Servers
3
3
  module Unicorn
4
4
  def restart_server
5
- run "kill -USR2 `cat tmp/pids/unicorn.pid`"
5
+ remote_run "cd #{application_path} && kill -USR2 `cat tmp/pids/unicorn.pid`"
6
6
  end
7
7
  end
8
8
  end
9
- end
9
+ end
data/lib/nodex/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Nodex
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: nodex
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Bruno S. Barros