guard-rails 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +7 -0
  2. data/VERSION +1 -1
  3. data/lib/guard/rails/runner.rb +5 -2
  4. metadata +4 -4
data/Rakefile CHANGED
@@ -27,3 +27,10 @@ task :publish do
27
27
  system %{git push guard}
28
28
  system %{git push gitcafe}
29
29
  end
30
+
31
+ desc 'Push tags'
32
+ task :publish_tags do
33
+ system %{git push origin --tags}
34
+ system %{git push guard --tags}
35
+ system %{git push gitcafe --tags}
36
+ end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -7,6 +7,7 @@ module Guard
7
7
  attr_reader :options
8
8
 
9
9
  def initialize(options)
10
+ @env = ENV
10
11
  @options = options
11
12
  end
12
13
 
@@ -36,6 +37,8 @@ module Guard
36
37
  def build_rails_command
37
38
  return %{#{options[:CLI]} --pid #{pid_file}} if options[:CLI]
38
39
 
40
+ @env['RAILS_ENV'] = options[:environment] if options[:environment]
41
+
39
42
  rails_options = [
40
43
  options[:daemon] ? '-d' : nil,
41
44
  options[:debugger] ? '-u' : nil,
@@ -50,7 +53,7 @@ module Guard
50
53
  ]
51
54
 
52
55
  # omit env when use zeus
53
- rails_runner = options[:zeus] ? "zeus #{zeus_options.join(' ')}" : "RAILS_ENV=#{options[:environment]} rails server"
56
+ rails_runner = options[:zeus] ? "zeus #{zeus_options.join(' ')}" : "rails server"
54
57
 
55
58
  %{#{rails_runner} #{rails_options.join(' ')}}
56
59
  end
@@ -69,7 +72,7 @@ module Guard
69
72
 
70
73
  private
71
74
  def run_rails_command!
72
- system "sh -c '#{build_rails_command}'"
75
+ Process.spawn @env, build_rails_command
73
76
  end
74
77
 
75
78
  def has_pid?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-21 00:00:00.000000000 Z
13
+ date: 2013-02-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: guard
@@ -113,7 +113,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  segments:
115
115
  - 0
116
- hash: -2667544480743711932
116
+ hash: -1138378387217112587
117
117
  required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  version: '0'
123
123
  segments:
124
124
  - 0
125
- hash: -2667544480743711932
125
+ hash: -1138378387217112587
126
126
  requirements: []
127
127
  rubyforge_project: guard-rails
128
128
  rubygems_version: 1.8.23