bosh-template 1.3160.0 → 1.3163.0
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/bosh/template/evaluation_context.rb +10 -0
 - data/lib/bosh/template/unknown_link.rb +9 -0
 - data/lib/bosh/template/version.rb +1 -1
 - metadata +3 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 66e942af6e7b300cb16b77b148946fd7037b2a97
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 3c1305057415a08db55d29f1b8f3496305aba731
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: e0f478ccdff9ca89597f9b4798325031920e066d395f89aa606f9f620e546ad2768523e333a9959cdbbdc49e07d856ff7905056f85236978c0f0680dc127453b
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 8e4a0d435d05697a5ec9f4180108df608db19de6924f0574b784be7ad0a05abb55a17ab41579e486cde88265f296e02c7a0101d93ffc8fdf1b858fed9b3ce7a4
         
     | 
| 
         @@ -1,6 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require 'ostruct'
         
     | 
| 
       2 
2 
     | 
    
         
             
            require 'bosh/template/evaluation_failed'
         
     | 
| 
       3 
3 
     | 
    
         
             
            require 'bosh/template/unknown_property'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'bosh/template/unknown_link'
         
     | 
| 
       4 
5 
     | 
    
         
             
            require 'bosh/template/property_helper'
         
     | 
| 
       5 
6 
     | 
    
         | 
| 
       6 
7 
     | 
    
         
             
            module Bosh
         
     | 
| 
         @@ -42,6 +43,8 @@ module Bosh 
     | 
|
| 
       42 
43 
     | 
    
         
             
                    @spec = openstruct(spec)
         
     | 
| 
       43 
44 
     | 
    
         
             
                    @raw_properties = spec['properties'] || {}
         
     | 
| 
       44 
45 
     | 
    
         
             
                    @properties = openstruct(@raw_properties)
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                    @links = spec['links'] || {}
         
     | 
| 
       45 
48 
     | 
    
         
             
                  end
         
     | 
| 
       46 
49 
     | 
    
         | 
| 
       47 
50 
     | 
    
         
             
                  # @return [Binding] Template binding
         
     | 
| 
         @@ -88,6 +91,13 @@ module Bosh 
     | 
|
| 
       88 
91 
     | 
    
         
             
                    raise UnknownProperty.new(names)
         
     | 
| 
       89 
92 
     | 
    
         
             
                  end
         
     | 
| 
       90 
93 
     | 
    
         | 
| 
      
 94 
     | 
    
         
            +
                  def link(name)
         
     | 
| 
      
 95 
     | 
    
         
            +
                    result = lookup_property(@links, name)
         
     | 
| 
      
 96 
     | 
    
         
            +
                    return result unless result.nil?
         
     | 
| 
      
 97 
     | 
    
         
            +
             
     | 
| 
      
 98 
     | 
    
         
            +
                    raise UnknownLink.new(name)
         
     | 
| 
      
 99 
     | 
    
         
            +
                  end
         
     | 
| 
      
 100 
     | 
    
         
            +
             
     | 
| 
       91 
101 
     | 
    
         
             
                  # Run a block of code if all given properties are defined
         
     | 
| 
       92 
102 
     | 
    
         
             
                  # @param [Array<String>] names Property names
         
     | 
| 
       93 
103 
     | 
    
         
             
                  # @yield [Object] property values
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: bosh-template
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.3163.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Pivotal
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2015-12- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2015-12-23 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: semi_semantic
         
     | 
| 
         @@ -80,6 +80,7 @@ files: 
     | 
|
| 
       80 
80 
     | 
    
         
             
            - lib/bosh/template/evaluation_failed.rb
         
     | 
| 
       81 
81 
     | 
    
         
             
            - lib/bosh/template/property_helper.rb
         
     | 
| 
       82 
82 
     | 
    
         
             
            - lib/bosh/template/renderer.rb
         
     | 
| 
      
 83 
     | 
    
         
            +
            - lib/bosh/template/unknown_link.rb
         
     | 
| 
       83 
84 
     | 
    
         
             
            - lib/bosh/template/unknown_property.rb
         
     | 
| 
       84 
85 
     | 
    
         
             
            - lib/bosh/template/version.rb
         
     | 
| 
       85 
86 
     | 
    
         
             
            homepage: https://github.com/cloudfoundry/bosh
         
     |