libis-workflow 2.0.beta.14 → 2.0.beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/libis/workflow/base/work_item.rb +8 -0
- data/lib/libis/workflow/task.rb +3 -3
- data/lib/libis/workflow/version.rb +1 -1
- data/spec/workflow_spec.rb +0 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 169655a6df7be7a925cf8216fda0df4eb9ae8cd8
         | 
| 4 | 
            +
              data.tar.gz: 2b53b3a69a727e4636a0494c35855a49ca06bd0e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: af52fa4773fea1413c3a302569ef9caffb2daf36b800e30b4a41284c8c39b5314b2a1747ea3fbade9666830192cb197fb24a988aba754b15f28c39932f1e06fb
         | 
| 7 | 
            +
              data.tar.gz: 98400569c210df9ddf0d674adca5c1e8df7287cebc0e2ddcf6a2295ffc203aa756ea6b7769b14b0bfdc99512787b6d2f92874e78ed9f08008f8184ef3a43c329
         | 
| @@ -128,6 +128,14 @@ module Libis | |
| 128 128 |  | 
| 129 129 | 
             
                    alias_method :<<, :add_item
         | 
| 130 130 |  | 
| 131 | 
            +
                    def get_items
         | 
| 132 | 
            +
                      self.items.dup
         | 
| 133 | 
            +
                    end
         | 
| 134 | 
            +
             | 
| 135 | 
            +
                    def item_count
         | 
| 136 | 
            +
                      self.items.size
         | 
| 137 | 
            +
                    end
         | 
| 138 | 
            +
             | 
| 131 139 | 
             
                    # Return item's parent
         | 
| 132 140 | 
             
                    # @return [Libis::Workflow::Base::WorkItem]
         | 
| 133 141 | 
             
                    def get_parent
         | 
    
        data/lib/libis/workflow/task.rb
    CHANGED
    
    | @@ -163,12 +163,12 @@ module Libis | |
| 163 163 |  | 
| 164 164 | 
             
                    status = Hash.new(0)
         | 
| 165 165 | 
             
                    items.each_with_index do |item, i|
         | 
| 166 | 
            -
                      debug 'Processing subitem (%d/%d): %s', parent_item, i+1, items. | 
| 166 | 
            +
                      debug 'Processing subitem (%d/%d): %s', parent_item, i+1, items.size, item.to_s
         | 
| 167 167 | 
             
                      run_item item
         | 
| 168 168 | 
             
                      status[item.status(self.namepath)] += 1
         | 
| 169 169 | 
             
                    end
         | 
| 170 170 |  | 
| 171 | 
            -
                    debug '%d of %d subitems passed', parent_item, status[:DONE], items. | 
| 171 | 
            +
                    debug '%d of %d subitems passed', parent_item, status[:DONE], items.size
         | 
| 172 172 | 
             
                    substatus_check(status, parent_item, 'item')
         | 
| 173 173 | 
             
                  end
         | 
| 174 174 |  | 
| @@ -268,7 +268,7 @@ module Libis | |
| 268 268 | 
             
                  end
         | 
| 269 269 |  | 
| 270 270 | 
             
                  def subitems(item = nil)
         | 
| 271 | 
            -
                    (item || workitem). | 
| 271 | 
            +
                    (item || workitem).get_items
         | 
| 272 272 | 
             
                  end
         | 
| 273 273 |  | 
| 274 274 | 
             
                  def default_values
         | 
| @@ -2,6 +2,6 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            module Libis
         | 
| 4 4 | 
             
              module Workflow
         | 
| 5 | 
            -
                VERSION = '2.0.beta. | 
| 5 | 
            +
                VERSION = '2.0.beta.15' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
         | 
| 6 6 | 
             
              end
         | 
| 7 7 | 
             
            end
         | 
    
        data/spec/workflow_spec.rb
    CHANGED
    
    | @@ -62,7 +62,6 @@ describe 'TestWorkflow' do | |
| 62 62 | 
             
              # noinspection RubyResolve
         | 
| 63 63 | 
             
              it 'should camelize the workitem name' do
         | 
| 64 64 | 
             
                run = job.execute
         | 
| 65 | 
            -
                puts run.options
         | 
| 66 65 | 
             
                expect(run.options['CollectFiles'][:location]).to eq dirname
         | 
| 67 66 | 
             
                expect(run.items.count).to eq 1
         | 
| 68 67 | 
             
                expect(run.items.first.class).to eq TestDirItem
         |