guard-passenger 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,6 +46,16 @@ By default passenger standalone is deactivated and port is set to 3000.
46
46
  watch('config/.*\.rb')
47
47
  end
48
48
 
49
+ === Guard options
50
+
51
+ Guard::Passenger accepts some options for configuration.
52
+
53
+ # :standalone boolean run passenger standalone (default: false)
54
+ # :port integer using the given port (default: 3000)
55
+ # :env string framework environment (default: development)
56
+
57
+ guard 'passenger', :standalone => true, :port => 3001, :env => 'production' do
58
+ end
49
59
 
50
60
  == Development
51
61
 
@@ -7,7 +7,7 @@ module Guard
7
7
 
8
8
  autoload :Runner, 'guard/passenger/runner'
9
9
 
10
- attr_reader :port
10
+ attr_reader :port, :env
11
11
 
12
12
  def standalone?
13
13
  @standalone
@@ -21,13 +21,14 @@ module Guard
21
21
  super
22
22
  @standalone = options[:standalone].nil? ? false : options[:standalone]
23
23
  @port = options[:port].nil? ? 3000 : options[:port]
24
+ @env = options[:env].nil? ? 'development' : options[:env]
24
25
  end
25
26
 
26
27
  # Call once when guard starts
27
28
  def start
28
29
  UI.info "Guard::Passenger is guarding your changes!"
29
30
  if standalone?
30
- Runner.start_passenger(port)
31
+ Runner.start_passenger(port, env)
31
32
  else
32
33
  true
33
34
  end
@@ -14,9 +14,9 @@ module Guard
14
14
  result
15
15
  end
16
16
 
17
- def start_passenger(port)
17
+ def start_passenger(port, environment)
18
18
  if passenger_standalone_installed?
19
- result = system "passenger start -p #{port} -d"
19
+ result = system "passenger start -p #{port} -d -e #{environment}"
20
20
  if result
21
21
  UI.info "Passenger standalone startet at port #{port}"
22
22
  else
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module PassengerVersion
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-passenger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Fabio Kuhn
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-28 00:00:00 +02:00
18
+ date: 2010-11-05 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency