workon 0.0.11 → 0.0.12

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.
@@ -70,6 +70,14 @@ module Workon
70
70
  return output
71
71
  end
72
72
 
73
+ def bundle_command(command)
74
+ project_uses_bundler? ? "bundle exec #{command}" : command
75
+ end
76
+
77
+ def project_uses_bundler?
78
+ $project_uses_bundler ||= File.exists? './Gemfile'
79
+ end
80
+
73
81
  def screen(command)
74
82
  $has_tmux ||= has_command? 'tmux'
75
83
 
@@ -7,7 +7,7 @@ module Workon
7
7
  def commit
8
8
  if fetch_option :middleman, false
9
9
  port = fetch_option :port, 4567
10
- screen "mm-server --port #{port}"
10
+ screen bundle_command("mm-server --port #{port}")
11
11
  end
12
12
  end
13
13
  end
@@ -14,7 +14,7 @@ module Workon
14
14
  def commit
15
15
  if is_rack_app? && passenger_standalone_available?
16
16
  port = fetch_option :port, 3000
17
- screen "passenger start --port #{port}"
17
+ screen bundle_command("passenger start --port #{port}")
18
18
  end
19
19
  end
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module Workon
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: workon
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.11
5
+ version: 0.0.12
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mike Wyatt
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-05 00:00:00 Z
13
+ date: 2011-05-10 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: Runs actions based on directories
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  requirements: []
67
67
 
68
68
  rubyforge_project: workon
69
- rubygems_version: 1.7.1
69
+ rubygems_version: 1.7.2
70
70
  signing_key:
71
71
  specification_version: 3
72
72
  summary: Runs actions based on directories