ruploy 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  If you are managing Rack applications on your server and use RVM to work with
4
4
  several versions of Ruby, that you use either Passenger-Standalone or Thin, Ruploy can help you.
5
5
 
6
- Ruploy can generate init.d scripts to start/restart/stop your Rack applications like any services.
6
+ Ruploy can generate init.d scripts to start/restart/stop your Rack applications like any service.
7
7
 
8
8
  ## Installation
9
9
 
data/data/ruploy-base.sh CHANGED
@@ -3,29 +3,19 @@ ok_ko() {
3
3
  local status=$?
4
4
 
5
5
  case $status in
6
- 0)
7
- echo "[OK]"
8
- ;;
9
- *)
10
- echo "[KO]"
11
- ;;
6
+ 0) echo "[OK]";;
7
+ *) echo "[KO]";;
12
8
  esac
13
9
 
14
10
  return $status
15
11
  }
16
12
 
17
- # returns the name of the running server process
13
+ # Returns the name of the running server process
18
14
  server_process() {
19
15
  case $SERVER in
20
- passenger)
21
- echo "nginx"
22
- ;;
23
- thin)
24
- echo "thin"
25
- ;;
26
- *)
27
- echo "unknown_server"
28
- ;;
16
+ passenger) echo "nginx";;
17
+ thin) echo "thin";;
18
+ *) echo "unknown_server";;
29
19
  esac
30
20
  }
31
21
 
@@ -42,43 +32,41 @@ server_pid() {
42
32
  # Returns the log-file option for the given server type
43
33
  logfile_option() {
44
34
  case $SERVER in
45
- passenger)
46
- echo "--log-file"
47
- ;;
48
- thin)
49
- echo "--log"
50
- ;;
51
- *)
52
- echo "unknown_server"
53
- ;;
35
+ passenger) echo "--log-file";;
36
+ thin) echo "--log";;
37
+ *) echo "unknown_server";;
54
38
  esac
55
39
  }
56
40
 
57
41
  # Returns the pid-file option for the given server type
58
42
  pidfile_option() {
59
43
  case $SERVER in
60
- passenger)
61
- echo "--pid-file"
62
- ;;
63
- thin)
64
- echo "--pid"
65
- ;;
66
- *)
67
- echo "unknown_server"
68
- ;;
44
+ passenger) echo "--pid-file";;
45
+ thin) echo "--pid";;
46
+ *) echo "unknown_server";;
47
+ esac
48
+ }
49
+
50
+ # Returns the directory opion for the given server type
51
+ directory_option() {
52
+ case $SERVER in
53
+ passenger) echo "";;
54
+ thin) echo "--chdir";;
55
+ *) echo "unknown_server";;
69
56
  esac
70
57
  }
71
58
 
72
59
  # Starts the given server instance
73
60
  ruploy_start() {
74
61
  echo -n "Starting ${NAME}... "
75
- $SERVER start $DIRECTORY \
76
- --address $ADDRESS \
77
- --port $PORT \
78
- --environment $ENVIRONMENT \
79
- --user $USER \
80
- $(pidfile_option) $PIDFILE \
81
- $(logfile_option) $LOGFILE \
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 \
82
70
  $OPTIONS > /dev/null
83
71
  ok_ko
84
72
  }
@@ -1,3 +1,3 @@
1
1
  module Ruploy
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
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.1
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-14 00:00:00.000000000Z
12
+ date: 2011-10-18 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: commander
16
- requirement: &2161000480 !ruby/object:Gem::Requirement
16
+ requirement: &2157110640 !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: *2161000480
24
+ version_requirements: *2157110640
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mustache
27
- requirement: &2160999840 !ruby/object:Gem::Requirement
27
+ requirement: &2157110140 !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: *2160999840
35
+ version_requirements: *2157110140
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: