Changeset 6139

Show
Ignore:
Timestamp:
11/27/06 21:18:57
Author:
jan
Message:

formatting

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jerbil/hibernate_task.rb

    r6138 r6139  
    99    # Generates a SQL schema from EJB3/Hibernate-annotated classes using Hibernate's 
    1010    # SchemaExport tool. Typically Jerbil::AptTask is used to compile source files and 
    11                # gather a list of entities which then gets serialized to a YAML file. 
    12                # ExportSchemaTask then reads this file and uses Hibernate's schema exporter to  
    13                # generate SQL 
     11    # gather a list of entities which then gets serialized to a YAML file. 
     12    # ExportSchemaTask then reads this file and uses Hibernate's schema exporter to  
     13    # generate SQL 
    1414    # 
    1515    # == Example 
     
    2323      attr_accessor :name 
    2424       
    25                        # SQL schema destination file (default: schema.sql) 
     25      # SQL schema destination file (default: schema.sql) 
    2626      attr_accessor :schemafile 
    2727                         
    28                        # A file containing a list of entities (<em>javax.persitence.Entity</em>), 
    29                        # serialized as a list of strings (YAML format). 
     28      # A file containing a list of entities (<em>javax.persitence.Entity</em>), 
     29      # serialized as a list of strings (YAML format). 
    3030      attr_accessor :entities_yml 
    3131                         
    32                        # Classname implementing the db dialect, defaults to 
    33                        # <em>org.hibernate.dialect.MySQL5Dialect</em> 
     32      # Classname implementing the db dialect, defaults to 
     33      # <em>org.hibernate.dialect.MySQL5Dialect</em> 
    3434      attr_accessor :dialect 
    3535                         
    36                        # SQL statements to be executed before generated sql. 
     36      # SQL statements to be executed before generated sql. 
    3737      attr_accessor :preamble 
    3838                         
    39                        # FQN of a package containing package-info.java to be used by 
    40                        # hibernate. 
     39      # FQN of a package containing package-info.java to be used by 
     40      # hibernate. 
    4141      attr_accessor :package 
    4242       
  • trunk/lib/jerbil/testng_task.rb

    r6138 r6139  
    2424      attr_accessor :name 
    2525                         
    26                        # A JavaFileList specifing tests to run. TestNGTask will use 
    27                        # +to_classes+ to obtain the class files from the list. 
     26      # A JavaFileList specifing tests to run. TestNGTask will use 
     27      # +to_classes+ to obtain the class files from the list. 
    2828      attr_accessor :tests 
    2929                         
    30                        # Where the testng output should go. Default "test-output". 
     30      # Where the testng output should go. Default "test-output". 
    3131      attr_accessor :outputdir 
    3232                         
    33                        # Whether to generate HTML reports. Defaults to +true+. 
     33      # Whether to generate HTML reports. Defaults to +true+. 
    3434      attr_accessor :report 
    3535                         
    36                        # A list of locations of testng suite.xml files.                
     36      # A list of locations of testng suite.xml files.                 
    3737      attr_accessor :suites 
    3838                         
     
    4040      attr_accessor :workingdir 
    4141                         
    42                        # A list of test listeners to use. Defaults to DefaultTestListener  
    43                        # if empty. 
     42      # A list of test listeners to use. Defaults to DefaultTestListener  
     43      # if empty. 
    4444                        attr_accessor :listeners                                         
    4545       
     
    6262        task name => dependencies do |t| 
    6363          testng = Rjb::import('org.testng.TestNG').new_with_sig 'Z', false 
    64           
     64      
    6565          listeners << DefaultTestListener.new if listeners.empty? 
    6666     
    67                                         sl = SuiteListener.new 
    68            
    6967          #need to use _invoke because addListener has 3 different method signatures 
    7068          #using same name and return type 
    71           #testng.addListener(Rjb::bind(tl, 'org.testng.ITestListener')) 
    72                                         listeners.each do |tl|   
     69          listeners.each do |tl|   
    7370            testng._invoke('addListener', 'Lorg.testng.ITestListener;', Rjb::bind(tl, 'org.testng.ITestListener')) 
    7471          end 
    7572                                         
    76                                         #testng.addListener(Rjb::bind(sl, 'org.testng.ISuiteListener')) 
     73          sl = SuiteListener.new 
    7774          testng._invoke('addListener', 'Lorg.testng.ISuiteListener;', Rjb::bind(sl, 'org.testng.ISuiteListener')) 
    7875                 
     
    9996          end 
    10097       
    101                                        message = "some tests failed" 
    102                                        if listeners.first.kind_of?(DefaultTestListener) 
    103                                                message += ": #{listeners.first.failed_to_s}" 
    104                                        end 
     98          message = "some tests failed" 
     99          if listeners.first.kind_of?(DefaultTestListener) 
     100            message += ": #{listeners.first.failed_to_s}" 
     101          end 
    105102          raise message unless testng.getStatus == 0 
    106103        end 
    107         directory workingdir unless workingdir.nil? 
     104        directory workingdir if workingdir 
    108105        directory outputdir 
    109106      end 
     
    114111      include JavaHelper 
    115112 
     113        # A list of all classes with failed tests. 
    116114        attr_reader :failed_classes 
    117115        def initialize # :nodoc: