Class: Release

Inherits:
WorkFlow show all
Extended by:
Assertions::ClassMethods, ClassMethods
Includes:
Assertions, Constants
Defined in:
app/models/release.rb

Defined Under Namespace

Modules: Assertions, ClassMethods, Constants, Examples

Constant Summary

Constants included from WorkFlow::Constants

WorkFlow::Constants::Branch_compression, WorkFlow::Constants::Branch_enhancement

Constants included from WorkFlow::Examples

WorkFlow::Examples::TestFile, WorkFlow::Examples::TestWorkFlow

Instance Attribute Summary

Attributes inherited from WorkFlow

#edit_files, #related_files, #repository

Instance Method Summary collapse

Methods included from Assertions::ClassMethods

assert_post_conditions

Methods included from Assertions

#assert_post_conditions, #assert_pre_conditions

Methods inherited from WorkFlow

#deserving_branch?, #edit, #emacs, #functional_parallelism, #goldilocks, #merge, #minimal_comparison?, #minimal_edit, #test, #test_files, #version_comparison

Methods included from WorkFlow::Assertions::ClassMethods

#assert_post_conditions, #assert_pre_conditions

Methods included from WorkFlow::ClassMethods

#all, #merge_range, #revison_tag

Methods included from WorkFlow::Assertions

#assert_deserving_branch, #assert_post_conditions, #assert_pre_conditions

Constructor Details

#initialize(executable) ⇒ Release

Returns a new instance of Release.


19
20
21
22
23
24
25
26
27
28
# File 'app/models/release.rb', line 19

def initialize(executable)
	raise "executable=#{executable.inspect} must be an String." if !executable.instance_of?(String)
	path2model_name=FilePattern.path2model_name?(executable)
	@related_files=RelatedFile.new(path2model_name, FilePattern.project_root_dir?(executable))
	message= "edit_files do not exist\n executable=#{executable.inspect}" 
	message+= "\n @related_files.edit_files=#{@related_files.edit_files.inspect}" 
	message+= "\n @related_files.missing_files=#{@related_files.missing_files.inspect}" 
#	raise message if  @related_files.edit_files.empty?
  @repository=Repository.new(@related_files.project_root_dir)
end

Instance Method Details

#unit_test(executable = @related_files.model_test_pathname?) ⇒ Object

initialize


29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'app/models/release.rb', line 29

def unit_test(executable=@related_files.model_test_pathname?)
	begin
		deserving_branch=@repository.deserving_branch?(executable)
		if @repository.recent_test.success? then
			break
		end #if
		@repository.recent_test.puts
		puts deserving_branch if $VERBOSE
		@repository.safely_visit_branch(deserving_branch) do |changes_branch|
			@repository.validate_commit(changes_branch, @related_files.tested_files(executable))
		end #safely_visit_branch
		edit
	end until !@repository.something_to_commit? 
end