workon 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -62,7 +62,7 @@ module Workon
62
62
 
63
63
  def run(command)
64
64
  puts "Running #{command}"
65
- output = %x(#{command})
65
+ output = %x(#{command}) unless options[:dry_run]
66
66
  return output
67
67
  end
68
68
 
@@ -51,7 +51,7 @@ wo () {
51
51
  IFS=$'\n'
52
52
 
53
53
  workon_bin=$(which workon)
54
- output=$($workon_bin $1)
54
+ output=$($workon_bin $@)
55
55
 
56
56
  for line in $output; do
57
57
  echo $line
@@ -60,14 +60,18 @@ module Workon
60
60
  options[:only] = v
61
61
  end
62
62
 
63
- o.on('-d', '--dump-configuration', 'Dump workon configuration to project_path/.workon.yml') do
63
+ o.on('-d', '--dump-configuration', 'Dump workon configuration to project_path/.workonrc') do
64
64
  options[:dump_configuration] = true
65
65
  end
66
66
 
67
- o.on_tail('--install-helper', 'Install `wo` helper function to ~/.bash_profile') do
67
+ o.on_tail('--install-helper', 'Install `wo\' helper function to ~/.bash_profile') do
68
68
  options[:install_helper] = true
69
69
  end
70
70
 
71
+ o.on_tail('-n', '--dry-run', 'Do not run any commands') do
72
+ options[:dry_run] = true
73
+ end
74
+
71
75
  o.on_tail('-v', '--version', 'Show version information') do
72
76
  puts Workon::VERSION
73
77
  exit
@@ -1,3 +1,3 @@
1
1
  module Workon
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
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.8
5
+ version: 0.0.9
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-03-14 00:00:00 -02:30
13
+ date: 2011-03-17 00:00:00 -02:30
14
14
  default_executable:
15
15
  dependencies: []
16
16