tram-policy 0.2.1 → 0.2.2
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/CHANGELOG.md +6 -0
- data/lib/tram/policy.rb +12 -2
- data/tram-policy.gemspec +1 -1
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: fc647bd31562eb4881f841a9bae46dcf5203ebd3
         | 
| 4 | 
            +
              data.tar.gz: 3944f07d8913666eb152898d61931c58a3a1f6c5
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ab06235841c0343d2081ea32a9b30f5ef1c53bcb259d9f5f96e4abf49e529ba715aeb4b8298a03b7cec876eb699f35dac41f06b37eda7f622bd6b76c3d464c4c
         | 
| 7 | 
            +
              data.tar.gz: 44873053f8e364a5687de6f71b7b25f612a72bbd24e026b9af5a52d4646e0433a85d1af9e9f54043e3676408788aa210cf641eb97b00d0a69718250ecefd405a
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. | |
| 4 4 | 
             
            The format is based on [Keep a Changelog](http://keepachangelog.com/)
         | 
| 5 5 | 
             
            and this project adheres to [Semantic Versioning](http://semver.org/).
         | 
| 6 6 |  | 
| 7 | 
            +
            ## [0.2.2] - [2017-09-12]
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            ### Changed
         | 
| 10 | 
            +
            - Policy class methods `all`, `local`, and `scope` was made public (nepalez)
         | 
| 11 | 
            +
             | 
| 7 12 | 
             
            ## [0.2.1] - [2017-08-28]
         | 
| 8 13 |  | 
| 9 14 | 
             
            ### Changed
         | 
| @@ -102,3 +107,4 @@ This is a first public release (@nepalez, @charlie-wasp, @JewelSam, @sergey-chec | |
| 102 107 | 
             
            [0.1.1]: https://github.com/tram-rb/tram-policy/compare/v0.1.0...v0.1.1
         | 
| 103 108 | 
             
            [0.2.0]: https://github.com/tram-rb/tram-policy/compare/v0.1.1...v0.2.0
         | 
| 104 109 | 
             
            [0.2.1]: https://github.com/tram-rb/tram-policy/compare/v0.2.0...v0.2.1
         | 
| 110 | 
            +
            [0.2.2]: https://github.com/tram-rb/tram-policy/compare/v0.2.1...v0.2.2
         | 
    
        data/lib/tram/policy.rb
    CHANGED
    
    | @@ -35,16 +35,26 @@ module Tram | |
| 35 35 | 
             
                    new(*args)
         | 
| 36 36 | 
             
                  end
         | 
| 37 37 |  | 
| 38 | 
            -
                   | 
| 39 | 
            -
             | 
| 38 | 
            +
                  # Translation scope for a policy
         | 
| 39 | 
            +
                  #
         | 
| 40 | 
            +
                  # @return [Array<String>]
         | 
| 41 | 
            +
                  #
         | 
| 40 42 | 
             
                  def scope
         | 
| 41 43 | 
             
                    @scope ||= ["tram-policy", *Inflector.underscore(name)]
         | 
| 42 44 | 
             
                  end
         | 
| 43 45 |  | 
| 46 | 
            +
                  # List of validators defined by a policy per se
         | 
| 47 | 
            +
                  #
         | 
| 48 | 
            +
                  # @return [Array<Proc>]
         | 
| 49 | 
            +
                  #
         | 
| 44 50 | 
             
                  def local
         | 
| 45 51 | 
             
                    @local ||= []
         | 
| 46 52 | 
             
                  end
         | 
| 47 53 |  | 
| 54 | 
            +
                  # List of all applicable validators from both the policy and its parent
         | 
| 55 | 
            +
                  #
         | 
| 56 | 
            +
                  # @return [Array<Proc>]
         | 
| 57 | 
            +
                  #
         | 
| 48 58 | 
             
                  def all
         | 
| 49 59 | 
             
                    (((self == Tram::Policy) ? [] : superclass.send(:all)) + local).uniq
         | 
| 50 60 | 
             
                  end
         | 
    
        data/tram-policy.gemspec
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            Gem::Specification.new do |gem|
         | 
| 2 2 | 
             
              gem.name     = "tram-policy"
         | 
| 3 | 
            -
              gem.version  = "0.2. | 
| 3 | 
            +
              gem.version  = "0.2.2"
         | 
| 4 4 | 
             
              gem.author   = ["Viktor Sokolov (gzigzigzeo)", "Andrew Kozin (nepalez)"]
         | 
| 5 5 | 
             
              gem.email    = "andrew.kozin@gmail.com"
         | 
| 6 6 | 
             
              gem.homepage = "https://github.com/tram/tram-policy"
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: tram-policy
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.2. | 
| 4 | 
            +
              version: 0.2.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Viktor Sokolov (gzigzigzeo)
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2017- | 
| 12 | 
            +
            date: 2017-09-12 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: dry-initializer
         | 
| @@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 173 173 | 
             
                  version: '0'
         | 
| 174 174 | 
             
            requirements: []
         | 
| 175 175 | 
             
            rubyforge_project: 
         | 
| 176 | 
            -
            rubygems_version: 2. | 
| 176 | 
            +
            rubygems_version: 2.6.13
         | 
| 177 177 | 
             
            signing_key: 
         | 
| 178 178 | 
             
            specification_version: 4
         | 
| 179 179 | 
             
            summary: Policy Object Pattern
         |