ruploy 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/data/ruploy-base.sh +17 -12
  2. data/lib/ruploy/version.rb +1 -1
  3. metadata +5 -5
@@ -14,7 +14,7 @@ ok_ko() {
14
14
  server_process() {
15
15
  case $SERVER in
16
16
  passenger) echo "nginx";;
17
- thin) echo "thin";;
17
+ thin) echo "ruby";;
18
18
  *) echo "unknown_server";;
19
19
  esac
20
20
  }
@@ -22,7 +22,7 @@ server_process() {
22
22
  # Returns the PID of the given server instance
23
23
  server_pid() {
24
24
  if [ -e "$PIDFILE" ]; then
25
- if pidof $(server_process) | tr ' ' '\n' | grep -w $(cat $PIDFILE); then
25
+ if pidof $(server_process) | tr ' ' '\n' | grep -w "$(cat $PIDFILE)"; then
26
26
  return 0
27
27
  fi
28
28
  fi
@@ -56,25 +56,30 @@ directory_option() {
56
56
  esac
57
57
  }
58
58
 
59
+ # Returns the bundle exec prefix if it is needed
60
+ bundler_prefix() {
61
+ [[ -e "$DIRECTORY/Gemfile" ]] && echo "bundle exec"
62
+ }
63
+
59
64
  # Starts the given server instance
60
65
  ruploy_start() {
61
66
  echo -n "Starting ${NAME}... "
62
- $SERVER start \
63
- $(directory_option) $DIRECTORY \
64
- --address $ADDRESS \
65
- --port $PORT \
66
- --environment $ENVIRONMENT \
67
- --user $USER \
68
- $(pidfile_option) $PIDFILE \
69
- $(logfile_option) $LOGFILE \
70
- $OPTIONS > /dev/null
67
+ $(bundler_prefix) $SERVER start \
68
+ $(directory_option) $DIRECTORY \
69
+ --address $ADDRESS \
70
+ --port $PORT \
71
+ --environment $ENVIRONMENT \
72
+ --user $USER \
73
+ $(pidfile_option) $PIDFILE \
74
+ $(logfile_option) $LOGFILE \
75
+ $OPTIONS > /dev/null
71
76
  ok_ko
72
77
  }
73
78
 
74
79
  # Stops the given server instance
75
80
  ruploy_stop() {
76
81
  echo -n "Stopping ${NAME}... "
77
- $SERVER stop --pid-file $PIDFILE > /dev/null 2>&1
82
+ $(bundler_prefix) $SERVER stop $(pidfile_option) $PIDFILE > /dev/null 2>&1
78
83
  ok_ko
79
84
  }
80
85
 
@@ -1,3 +1,3 @@
1
1
  module Ruploy
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-18 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: commander
16
- requirement: &2157110640 !ruby/object:Gem::Requirement
16
+ requirement: &2156051660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2157110640
24
+ version_requirements: *2156051660
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mustache
27
- requirement: &2157110140 !ruby/object:Gem::Requirement
27
+ requirement: &2156050840 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2157110140
35
+ version_requirements: *2156050840
36
36
  description: If you want to manage several Rack apps using different versions of Ruby
37
37
  via RVM, Ruploy can help you. It handles gemsets too !
38
38
  email: