power_stencil 0.3.2 → 0.3.3
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/README.md +6 -0
- data/doc/entities.md +6 -4
- data/doc/example_use_cases.md +1 -1
- data/lib/power_stencil/version.rb +1 -1
- data/power_stencil.gemspec +10 -0
- metadata +6 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: dcd80aee0e9932a4fe819203fff8699c949eaa24
         | 
| 4 | 
            +
              data.tar.gz: 7495afdc4abbf4c5c09a728b352ba8868d9851c0
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: b22d036ea9744681e4c838133790e91fc08e14ebfc09cc1980549516ec83dcd47469b800ce9c3d599055b0dbebe1caeeecf59190563b5ca3c39626c1928cad6b
         | 
| 7 | 
            +
              data.tar.gz: e0825248d461ca674ed3c4714b6d33a890d1b0110aa4dc1ea0f948da99c0b80a481c880b79381057bdb0b19959567294abe1e4ac9b0df141c6b099d94064a672
         | 
    
        data/README.md
    CHANGED
    
    | @@ -116,6 +116,12 @@ The `--project-path` option can be applied to any sub-command, but à-la-git, on | |
| 116 116 |  | 
| 117 117 | 
             
            :information_source: The rest of this documentation will assume you are at the root of this created project.
         | 
| 118 118 |  | 
| 119 | 
            +
            :information_source: Of course, once you created a new project you should version it with Git:
         | 
| 120 | 
            +
             | 
| 121 | 
            +
                $ git init
         | 
| 122 | 
            +
                $ git commit -a -m 'Initial commit'
         | 
| 123 | 
            +
             | 
| 124 | 
            +
             | 
| 119 125 | 
             
            ## `PowerStencil` project structure
         | 
| 120 126 |  | 
| 121 127 | 
             
            The structure of a brand new `PowerStencil` project is the following:
         | 
    
        data/doc/entities.md
    CHANGED
    
    | @@ -191,7 +191,7 @@ RAW ENTITIES | |
| 191 191 |  | 
| 192 192 | 
             
            The goal of this command is normally to check the validity of entities, but it brings as well extra information like if the entity is _buildable_ or even where it is stored in the repository.
         | 
| 193 193 |  | 
| 194 | 
            -
            :information_source: You can notice that the `project_config` entity has no storage path, the reason being [it is not persisted](#default-entity-types).
         | 
| 194 | 
            +
            :information_source: You can notice that the `project_config` entity has no storage path, the reason being [it is not persisted](#default-entity-types) in the entities repository (its content actually comes from config files outside of the repository).
         | 
| 195 195 |  | 
| 196 196 | 
             
            This command may show some extra information, for more complex entities. We will see that later on.
         | 
| 197 197 |  | 
| @@ -209,7 +209,7 @@ RAW ENTITIES | |
| 209 209 | 
             
              - Status      : Valid 
         | 
| 210 210 | 
             
              - Buildable   : false
         | 
| 211 211 | 
             
            ```
         | 
| 212 | 
            -
            Another possibility is to check a list of objects using a regular expression by using the `--regexp` option:
         | 
| 212 | 
            +
            Another possibility is to check a list of objects using a regular expression (applied to the ID of an entity, ie `<entity_type</<entity_name>`) by using the `--regexp` option:
         | 
| 213 213 |  | 
| 214 214 | 
             
            ```shell
         | 
| 215 215 | 
             
            $ power_stencil check base_ --regexp
         | 
| @@ -555,7 +555,7 @@ class MyCustomEntity < PowerStencil::SystemEntityDefinitions::ProjectEntity | |
| 555 555 | 
             
                field :my_custom_field
         | 
| 556 556 | 
             
            end
         | 
| 557 557 | 
             
            ```
         | 
| 558 | 
            -
            Then it means I can access the `my_custom_field` property in  | 
| 558 | 
            +
            Then it means I can access the `my_custom_field` property in three different ways:
         | 
| 559 559 |  | 
| 560 560 | 
             
            ```ruby
         | 
| 561 561 | 
             
            PowerStencil DSL> e = new_custom_entity name: :test_entity
         | 
| @@ -568,8 +568,10 @@ PowerStencil DSL> e.my_custom_field | |
| 568 568 | 
             
            => "foo"
         | 
| 569 569 | 
             
            PowerStencil DSL> e.fields[:my_custom_field]
         | 
| 570 570 | 
             
            => "foo"
         | 
| 571 | 
            +
            PowerStencil DSL> e[:my_custom_field]
         | 
| 572 | 
            +
            => "foo"
         | 
| 571 573 | 
             
            ```
         | 
| 572 | 
            -
            :information_source: You can notice the `new_<entity_type>` DSL method which is a shortcut to create entities.
         | 
| 574 | 
            +
            :information_source: You can notice the `new_<entity_type>` DSL method which is a shortcut to create entities (actually you have to use this DSL method and not create entities using its `<classname>.new`, because this DSL method on top of creating the entity, setup everything for persistence as well...).
         | 
| 573 575 |  | 
| 574 576 | 
             
            So you can see the field directive will actually create accessor methods for first level properties in the `#fields` Hash.
         | 
| 575 577 |  | 
    
        data/doc/example_use_cases.md
    CHANGED
    
    | @@ -14,7 +14,7 @@ Example use cases | |
| 14 14 |  | 
| 15 15 | 
             
            # Overview
         | 
| 16 16 |  | 
| 17 | 
            -
            Considering the genericity of the `PowerStencil | 
| 17 | 
            +
            Considering the genericity of the `PowerStencil` framework, it is a bit difficult to define a strict scope for its usage. It's a bit like wondering what you could do with a programming language.
         | 
| 18 18 |  | 
| 19 19 | 
             
            Neverthless, I will give two short ideas that should open you mind to things you could do with it.
         | 
| 20 20 |  | 
    
        data/power_stencil.gemspec
    CHANGED
    
    | @@ -29,4 +29,14 @@ Gem::Specification.new do |spec| | |
| 29 29 | 
             
              spec.add_dependency 'dir_glob_ignore', '~> 0.3'
         | 
| 30 30 | 
             
              spec.add_dependency 'universe_compiler', '~> 0.2', '>= 0.2.11'
         | 
| 31 31 | 
             
              spec.add_dependency 'pry'
         | 
| 32 | 
            +
             | 
| 33 | 
            +
              spec.post_install_message = %Q{
         | 
| 34 | 
            +
            Thank you for installing PowerStencil #{PowerStencil::VERSION} !
         | 
| 35 | 
            +
            From the command line you can run `power_stencil --help`
         | 
| 36 | 
            +
            If your shell is not completing the command:
         | 
| 37 | 
            +
              If you use rbenv: `rbenv rehash`
         | 
| 38 | 
            +
              If you use zsh  : `rehash`
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            Feel free to report issues: https://gitlab.com/tools4devops/power_stencil/issues
         | 
| 41 | 
            +
              }
         | 
| 32 42 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: power_stencil
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.3. | 
| 4 | 
            +
              version: 0.3.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Laurent B.
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2019-08- | 
| 11 | 
            +
            date: 2019-08-29 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -263,7 +263,10 @@ homepage: https://gitlab.com/tools4devops/power_stencil | |
| 263 263 | 
             
            licenses:
         | 
| 264 264 | 
             
            - MIT
         | 
| 265 265 | 
             
            metadata: {}
         | 
| 266 | 
            -
            post_install_message: 
         | 
| 266 | 
            +
            post_install_message: "\nThank you for installing PowerStencil 0.3.3 !\nFrom the command
         | 
| 267 | 
            +
              line you can run `power_stencil --help`\nIf your shell is not completing the command:\n
         | 
| 268 | 
            +
              \ If you use rbenv: `rbenv rehash`\n  If you use zsh  : `rehash`\n\nFeel free to
         | 
| 269 | 
            +
              report issues: https://gitlab.com/tools4devops/power_stencil/issues\n  "
         | 
| 267 270 | 
             
            rdoc_options: []
         | 
| 268 271 | 
             
            require_paths:
         | 
| 269 272 | 
             
            - lib
         |