Class: TTK::Strategies::Bootstrap
- Includes:
- Concrete
- Defined in:
- lib/ttk/strategies/Bootstrap.rb
Constant Summary collapse
- BOOTSTRAP =
/bootstrap(\.sh)?/
- AUTORECONF =
'autoreconf -fvi'
Instance Attribute Summary
Attributes inherited from Strategy
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Proxy
Methods inherited from Composite
#<<, #create, #initialize, #initialize_test, #new_symtbl
Methods inherited from Strategy
#abort, #assign, #clean_instance_variables, #display_unexpected_exc, #display_unexpected_synflow_exc, #fail, #initialize, #initialize_flow_factory, #pass, #raise_error, #reject, #run, #running?, #skip, #skip_if_cached, #strategy, #strategy=, #symbols=, #testify, #timeout=, #to_s, #wclass=
Constructor Details
This class inherits a constructor from TTK::Strategies::Composite
Class Method Details
.have_bootstrap?(dir = Pathname.new('.')) ⇒ Boolean
41 42 43 44 |
# File 'lib/ttk/strategies/Bootstrap.rb', line 41 def self.have_bootstrap? ( dir=Pathname.new('.') ) res = dir.entries.find { |ent| ent.to_s =~ BOOTSTRAP } (res.nil?) ? nil : dir + res end |
Instance Method Details
#dir=(dir) ⇒ Object
36 37 38 |
# File 'lib/ttk/strategies/Bootstrap.rb', line 36 def dir= ( dir ) @dir = Pathname.new(dir) end |
#prologue ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ttk/strategies/Bootstrap.rb', line 17 def prologue super cmd = self.class.have_bootstrap? @dir if cmd.nil? and Configure.have_configure_input? @dir cmd = AUTORECONF end unless cmd.nil? or Configure.have_configure?(@dir) create(Cmd) do |test| test.name = 'internal command' test.exit = 0 test.dir = @dir test.command = cmd test.reject :strategy end end end |