patir 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,5 @@
1
+ == 0.5.5 / 2008-03-13
2
+ * RubyCommand does not expand working directories anymore and it now exposes working_directory and the assigned block (as cmd)
1
3
  == 0.5.4 / 2008-03-13
2
4
  * ShellCommand does not expand working directories anymore
3
5
  * Configurator#logger method redefinition removed
data/lib/patir/base.rb CHANGED
@@ -6,7 +6,7 @@ module Patir
6
6
  module Version
7
7
  MAJOR=0
8
8
  MINOR=5
9
- TINY=4
9
+ TINY=5
10
10
  STRING=[ MAJOR, MINOR, TINY ].join( "." )
11
11
  end
12
12
  #Error thrown usually in initialize methods when missing required parameters
data/lib/patir/command.rb CHANGED
@@ -117,9 +117,7 @@ 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=params[:working_directory] if params[:working_directory]
121
- #initialize the working directory value.
122
- @working_directory||="."
120
+ @working_directory=params[:working_directory] || "."
123
121
  #we need a command line :)
124
122
  raise ParameterException,"No :command defined" unless params[:cmd]
125
123
  @command=params[:cmd]
@@ -454,10 +452,10 @@ module Patir
454
452
  # end
455
453
  class RubyCommand
456
454
  include Patir::Command
455
+ attr_reader :cmd,:working_directory
457
456
  def initialize name,working_directory=nil,&block
458
457
  @name=name
459
- @working_directory=File.expand_path(working_directory) if working_directory
460
- @working_directory||=Dir.pwd
458
+ @working_directory=working_directory||"."
461
459
  if block_given?
462
460
  @cmd=block
463
461
  else
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.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vassilis Rizopoulos
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-12 00:00:00 +01:00
12
+ date: 2008-03-13 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency