axr 0.7.1 → 0.7.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/Gemfile.lock +2 -2
- data/README.md +22 -11
- data/axr.gemspec +1 -1
- data/docs/images/rewrite.png +0 -0
- data/lib/axr/version.rb +1 -1
- metadata +4 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: e3de25792f5279b1918dfa22beecb381809df02aa009cf362ae159cf7f334560
         | 
| 4 | 
            +
              data.tar.gz: ce18ec5fa4219904a0f99d899b1c5472f5376e2ba20c8ca37accfd2e874c4e80
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 212f3cff71975a870ec4957414470dd4651d2bbb817cada0e58f93f21cc167ab20386248688b54b16905ee8dbadb527d6f9ef9d3a4ebbc2d9af365d08fcc947a
         | 
| 7 | 
            +
              data.tar.gz: 3eae71dbfef42ac45e4835e0e8de782898e318307dfc5d23d2d347dcb0153c2357339747c757eb3391d016f4a21efcbedde46bab020c16a71b51e7bcf7ea7837
         | 
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -45,7 +45,7 @@ GEM | |
| 45 45 | 
             
                  coderay (~> 1.1.0)
         | 
| 46 46 | 
             
                  method_source (~> 0.9.0)
         | 
| 47 47 | 
             
                rainbow (3.0.0)
         | 
| 48 | 
            -
                rake ( | 
| 48 | 
            +
                rake (12.3.3)
         | 
| 49 49 | 
             
                rb-fsevent (0.10.3)
         | 
| 50 50 | 
             
                rb-inotify (0.10.1)
         | 
| 51 51 | 
             
                  ffi (~> 1.0)
         | 
| @@ -82,7 +82,7 @@ DEPENDENCIES | |
| 82 82 | 
             
              bundler (~> 2.0)
         | 
| 83 83 | 
             
              guard-rspec (~> 4.7.3)
         | 
| 84 84 | 
             
              pry (~> 0.12.2)
         | 
| 85 | 
            -
              rake (~>  | 
| 85 | 
            +
              rake (~> 12.3.3)
         | 
| 86 86 | 
             
              rspec (~> 3.0)
         | 
| 87 87 | 
             
              rubocop (~> 0.76.0)
         | 
| 88 88 |  | 
    
        data/README.md
    CHANGED
    
    | @@ -11,22 +11,31 @@ This is just a reality. | |
| 11 11 |  | 
| 12 12 | 
             
            (c) Volodya Sveredyuk
         | 
| 13 13 |  | 
| 14 | 
            -
            ##  | 
| 14 | 
            +
            ## Motivation
         | 
| 15 | 
            +
            Application engineering it's always about abstractions and how they describe the real world and business which pays our salaries for coding something that might improve it. Maybe. Sometimes.
         | 
| 15 16 |  | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 17 | 
            +
            I hate doing something alone. I am a team player and as a team player, I prefer conventions over configuration. But this is not working with knowledge responsibility segregation inside the software app. In the Ruby world (especially Rails) it's so easy to add a new feature. Just add one line, one dependency, one callback and now you share knowledge about one entity into another entity. More dependencies - more spaghetti and legacy that in future we should REWRITE EVERYTHING!
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            <img src="docs/images/rewrite.png" alt="drawing" width="500"/>
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            Architecture's about knowledge responsibility and not the code.
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            The worst thing that even we write the architecture document wherein a convenient way to agree on architecture and layers and entities, etc - We are not protected from violation of these conventions.
         | 
| 24 | 
            +
             | 
| 25 | 
            +
            And this the place where AxR comes on the stage.
         | 
| 19 26 |  | 
| 20 | 
            -
             | 
| 27 | 
            +
            Please, welcome the **DSL** that helps:
         | 
| 28 | 
            +
            1. Describes your application layers (modules)
         | 
| 29 | 
            +
            2. Defines knowledge responsibilities between them
         | 
| 30 | 
            +
            3. Checks if you did not violate anything
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            ## Setup
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            In your Gemfile
         | 
| 21 35 | 
             
            ```ruby
         | 
| 22 36 | 
             
            gem 'axr'
         | 
| 23 37 | 
             
            ```
         | 
| 24 38 |  | 
| 25 | 
            -
            in console
         | 
| 26 | 
            -
            ```sh
         | 
| 27 | 
            -
            bundle install
         | 
| 28 | 
            -
            ```
         | 
| 29 | 
            -
             | 
| 30 39 | 
             
            ## DSL
         | 
| 31 40 |  | 
| 32 41 | 
             
            In your ruby app: (for rails app put it into `config/initializers/axr.rb` file)
         | 
| @@ -107,7 +116,7 @@ axr lib/adapters/youtube.rb | |
| 107 116 |  | 
| 108 117 | 
             
            Finish scanning with status code 1 in case of any warnings (you can use in CI environment to fail pipeline step)
         | 
| 109 118 | 
             
            ```sh
         | 
| 110 | 
            -
            axr check --exit-on- | 
| 119 | 
            +
            axr check --exit-on-warnings
         | 
| 111 120 | 
             
            ```
         | 
| 112 121 |  | 
| 113 122 | 
             
            ## More examples
         | 
| @@ -134,7 +143,9 @@ end | |
| 134 143 | 
             
            ```
         | 
| 135 144 |  | 
| 136 145 | 
             
            ### TODO
         | 
| 146 | 
            +
            - Ignore vendor or any other directories dir as configuration
         | 
| 137 147 | 
             
            - Add sublayers
         | 
| 138 148 | 
             
            - Add rubocop cop
         | 
| 139 149 | 
             
            - Add more app examples
         | 
| 140 150 | 
             
            - Migrate to AST analyzer
         | 
| 151 | 
            +
             | 
    
        data/axr.gemspec
    CHANGED
    
    | @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| | |
| 35 35 | 
             
              spec.add_development_dependency 'bundler',     '~> 2.0'
         | 
| 36 36 | 
             
              spec.add_development_dependency 'guard-rspec', '~> 4.7.3'
         | 
| 37 37 | 
             
              spec.add_development_dependency 'pry',         '~> 0.12.2'
         | 
| 38 | 
            -
              spec.add_development_dependency 'rake',        '~>  | 
| 38 | 
            +
              spec.add_development_dependency 'rake',        '~> 12.3.3'
         | 
| 39 39 | 
             
              spec.add_development_dependency 'rspec',       '~> 3.0'
         | 
| 40 40 | 
             
              spec.add_development_dependency 'rubocop',     '~> 0.76.0'
         | 
| 41 41 | 
             
            end
         | 
| Binary file | 
    
        data/lib/axr/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: axr
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.7. | 
| 4 | 
            +
              version: 0.7.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Volodya Sveredyuk
         | 
| @@ -86,14 +86,14 @@ dependencies: | |
| 86 86 | 
             
                requirements:
         | 
| 87 87 | 
             
                - - "~>"
         | 
| 88 88 | 
             
                  - !ruby/object:Gem::Version
         | 
| 89 | 
            -
                    version:  | 
| 89 | 
            +
                    version: 12.3.3
         | 
| 90 90 | 
             
              type: :development
         | 
| 91 91 | 
             
              prerelease: false
         | 
| 92 92 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 93 93 | 
             
                requirements:
         | 
| 94 94 | 
             
                - - "~>"
         | 
| 95 95 | 
             
                  - !ruby/object:Gem::Version
         | 
| 96 | 
            -
                    version:  | 
| 96 | 
            +
                    version: 12.3.3
         | 
| 97 97 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 98 98 | 
             
              name: rspec
         | 
| 99 99 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -147,6 +147,7 @@ files: | |
| 147 147 | 
             
            - bin/setup
         | 
| 148 148 | 
             
            - docs/images/abcde_example.png
         | 
| 149 149 | 
             
            - docs/images/erp_example.png
         | 
| 150 | 
            +
            - docs/images/rewrite.png
         | 
| 150 151 | 
             
            - exe/axr
         | 
| 151 152 | 
             
            - lib/axr.rb
         | 
| 152 153 | 
             
            - lib/axr/app.rb
         |