eac_cli 0.33.0 → 0.34.1
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/eac_cli/runner/context.rb +15 -10
 - data/lib/eac_cli/runner/instance_methods.rb +3 -3
 - data/lib/eac_cli/version.rb +1 -1
 - metadata +4 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 4b6f2b8a2c29167ebf7c5586168b2798c9b286d71319393c4ad1688dad6f0a61
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 5475472313db3a3114b741daa843518fbc6d90fee1543b1ad48120d043ee9544
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 4e53dc0ecd1456c06f741f68c2e51ae2be3237d4a8d5143b91db5e8f7766134d1a5be1137e74fd94fb94ca7970edfa1f640c3bc33db2f5c957c37593c62e59ce
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 07fa079760b30dd46af5d3f23a2634f438c602036b34b0c10d82c3764be6cbb61b48c022d5964aeeea5fb80d368d55afdfbd79c146d0fc53bb0c3448cd9b1bbb
         
     | 
| 
         @@ -16,22 +16,27 @@ module EacCli 
     | 
|
| 
       16 
16 
     | 
    
         
             
                  end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
                  # Call a method in the runner or in one of it ancestors.
         
     | 
| 
       19 
     | 
    
         
            -
                  def call(method_name, *args)
         
     | 
| 
       20 
     | 
    
         
            -
                    return runner.send(method_name, *args) if runner.respond_to?(method_name)
         
     | 
| 
       21 
     | 
    
         
            -
                    return parent_call(method_name, *args) if  
     | 
| 
      
 19 
     | 
    
         
            +
                  def call(method_name, *args, &block)
         
     | 
| 
      
 20 
     | 
    
         
            +
                    return runner.send(method_name, *args, &block) if runner.respond_to?(method_name)
         
     | 
| 
      
 21 
     | 
    
         
            +
                    return parent_call(method_name, *args, &block) if parent_respond_to?(method_name)
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
                    raise ::NameError, "No method \"#{method_name}\" found in #{runner} or in its ancestors"
         
     | 
| 
       24 
24 
     | 
    
         
             
                  end
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
     | 
    
         
            -
                   
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
                   
     | 
| 
      
 26 
     | 
    
         
            +
                  # @param method_name [Symbol]
         
     | 
| 
      
 27 
     | 
    
         
            +
                  # @return [Boolean]
         
     | 
| 
      
 28 
     | 
    
         
            +
                  def parent_respond_to?(method_name)
         
     | 
| 
      
 29 
     | 
    
         
            +
                    parent.if_present(false) do |v|
         
     | 
| 
      
 30 
     | 
    
         
            +
                      next true if v.respond_to?(method_name)
         
     | 
| 
       29 
31 
     | 
    
         | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
      
 32 
     | 
    
         
            +
                      v.if_respond(:runner_context, false) { |w| w.parent_respond_to?(method_name) }
         
     | 
| 
      
 33 
     | 
    
         
            +
                    end
         
     | 
| 
      
 34 
     | 
    
         
            +
                  end
         
     | 
| 
       31 
35 
     | 
    
         | 
| 
       32 
     | 
    
         
            -
                  def parent_call(method_name, *args)
         
     | 
| 
       33 
     | 
    
         
            -
                     
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
      
 36 
     | 
    
         
            +
                  def parent_call(method_name, *args, &block)
         
     | 
| 
      
 37 
     | 
    
         
            +
                    if parent.respond_to?(:runner_context)
         
     | 
| 
      
 38 
     | 
    
         
            +
                      return parent.runner_context.call(method_name, *args, &block)
         
     | 
| 
      
 39 
     | 
    
         
            +
                    end
         
     | 
| 
       35 
40 
     | 
    
         | 
| 
       36 
41 
     | 
    
         
             
                    raise "Parent #{parent} do not respond to .context or .runner_context (Runner: #{runner})"
         
     | 
| 
       37 
42 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -30,13 +30,13 @@ module EacCli 
     | 
|
| 
       30 
30 
     | 
    
         
             
                  end
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
       32 
32 
     | 
    
         
             
                  def respond_to_missing?(method, include_all = false)
         
     | 
| 
       33 
     | 
    
         
            -
                    runner_context. 
     | 
| 
      
 33 
     | 
    
         
            +
                    runner_context.parent_respond_to?(method) || super
         
     | 
| 
       34 
34 
     | 
    
         
             
                  end
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
       36 
36 
     | 
    
         
             
                  def method_missing(method, *args, &block)
         
     | 
| 
       37 
     | 
    
         
            -
                    return super unless runner_context. 
     | 
| 
      
 37 
     | 
    
         
            +
                    return super unless runner_context.parent_respond_to?(method)
         
     | 
| 
       38 
38 
     | 
    
         | 
| 
       39 
     | 
    
         
            -
                    runner_context. 
     | 
| 
      
 39 
     | 
    
         
            +
                    runner_context.parent_call(method, *args, &block)
         
     | 
| 
       40 
40 
     | 
    
         
             
                  end
         
     | 
| 
       41 
41 
     | 
    
         
             
                end
         
     | 
| 
       42 
42 
     | 
    
         
             
              end
         
     | 
    
        data/lib/eac_cli/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: eac_cli
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.34.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Esquilo Azul Company
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2023-05- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2023-05-21 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: colorize
         
     | 
| 
         @@ -50,14 +50,14 @@ dependencies: 
     | 
|
| 
       50 
50 
     | 
    
         
             
                requirements:
         
     | 
| 
       51 
51 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       52 
52 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       53 
     | 
    
         
            -
                    version: '0. 
     | 
| 
      
 53 
     | 
    
         
            +
                    version: '0.116'
         
     | 
| 
       54 
54 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       55 
55 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       56 
56 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       57 
57 
     | 
    
         
             
                requirements:
         
     | 
| 
       58 
58 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       59 
59 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       60 
     | 
    
         
            -
                    version: '0. 
     | 
| 
      
 60 
     | 
    
         
            +
                    version: '0.116'
         
     | 
| 
       61 
61 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       62 
62 
     | 
    
         
             
              name: eac_ruby_gem_support
         
     | 
| 
       63 
63 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     |