patir 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ == 0.5.2 / 2008-02-26
2
+ * One should let the unit tests run before releasing!
3
+
1
4
  == 0.5.1 / 2008-02-26
2
5
  * A couple more unit tests
3
6
  * bugfix: command working directories are now fully expanded to avoid invalid nested chdir calls
@@ -6,7 +6,7 @@ module Patir
6
6
  module Version
7
7
  MAJOR=0
8
8
  MINOR=5
9
- TINY=1
9
+ TINY=2
10
10
  STRING=[ MAJOR, MINOR, TINY ].join( "." )
11
11
  end
12
12
  #Error thrown usually in initialize methods when missing required parameters
@@ -117,9 +117,9 @@ module Patir
117
117
  params=args[0] if args
118
118
  raise ParameterException,"No ShellCommand parameters defined" unless params
119
119
  @name=params[:name]
120
- @working_directory=File.expand_path(params[:working_directory])
120
+ @working_directory=File.expand_path(params[:working_directory]) if params[:working_directory]
121
121
  #initialize the working directory value. This actually means ./
122
- @working_directory||="."
122
+ @working_directory||=Dir.pwd
123
123
  #we need a command line :)
124
124
  raise ParameterException,"No :command defined" unless params[:cmd]
125
125
  @command=params[:cmd]
@@ -456,7 +456,7 @@ module Patir
456
456
  include Patir::Command
457
457
  def initialize name,working_directory=nil,&block
458
458
  @name=name
459
- @working_directory=File.expand_path(working_directory)
459
+ @working_directory=File.expand_path(working_directory) if working_directory
460
460
  @working_directory||=Dir.pwd
461
461
  if block_given?
462
462
  @cmd=block
@@ -476,8 +476,6 @@ module Patir
476
476
  rescue SystemCallError
477
477
  @output="#{$!}"
478
478
  @success=false
479
- ensure
480
- Dir.chdir(prev_dir)
481
479
  end
482
480
  return @success
483
481
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patir
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vassilis Rizopoulos