aw 0.1.10 → 0.1.11
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/LICENSE.md +1 -1
- data/README.md +21 -40
- data/lib/aw/fork.rb +4 -4
- metadata +22 -8
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: cef162831a9fd5958fa3123864f9db07d313f4a851b5738ce0f8bf171b12a570
         | 
| 4 | 
            +
              data.tar.gz: 012f7e21a4a6282d4b998df713916509b7d34e4806d305c8878b1771833fc43f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ca3c0e6bb8c8fbf4ca45dc57d966cf4b5ca738f3d17936ceb055719b4e58ede5591c4a7208878ff8f0380dfad9d587f9dfd4ceed0d7135c82a3d1d9f9ff3ab62
         | 
| 7 | 
            +
              data.tar.gz: 56152493f8c66f8b6316d0e12bafb8aaeda33c589a0fc2723cb2fa2767c705df5c4823436beab82a284a70adee6cdb90f938561ffed9244866705b3d7d014c88
         | 
    
        data/LICENSE.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -1,26 +1,15 @@ | |
| 1 1 | 
             
            # Aw
         | 
| 2 2 |  | 
| 3 | 
            -
            [][travis]
         | 
| 3 | 
            +
            [][travis]
         | 
| 4 4 | 
             
            [][codeclimate]
         | 
| 5 5 | 
             
            [][gem]
         | 
| 6 | 
            -
            [][inchpages]
         | 
| 7 | 
            +
            [][rubydoc]
         | 
| 8 8 |  | 
| 9 | 
            -
            > Aw, fork!
         | 
| 9 | 
            +
            > Aw, fork! 😬
         | 
| 10 10 |  | 
| 11 11 | 
             
            Creates a subprocess to execute a block inside.
         | 
| 12 12 |  | 
| 13 | 
            -
            ## Contact
         | 
| 14 | 
            -
             | 
| 15 | 
            -
            * Home page: https://github.com/fixrb/aw
         | 
| 16 | 
            -
            * Bugs/issues: https://github.com/fixrb/aw/issues
         | 
| 17 | 
            -
            * Support: https://stackoverflow.com/questions/tagged/fixrb
         | 
| 18 | 
            -
             | 
| 19 | 
            -
            ## Rubies
         | 
| 20 | 
            -
             | 
| 21 | 
            -
            * [MRI](https://www.ruby-lang.org/)
         | 
| 22 | 
            -
            * [Rubinius](https://rubinius.com/)
         | 
| 23 | 
            -
             | 
| 24 13 | 
             
            ## Installation
         | 
| 25 14 |  | 
| 26 15 | 
             
            Add this line to your application's Gemfile:
         | 
| @@ -61,43 +50,35 @@ Exceptions raised within the block are propagated: | |
| 61 50 | 
             
            Aw.fork! { nil + 1 } # => NoMethodError (undefined method `+' for nil:NilClass)
         | 
| 62 51 | 
             
            ```
         | 
| 63 52 |  | 
| 64 | 
            -
            ##  | 
| 53 | 
            +
            ## Contact
         | 
| 65 54 |  | 
| 66 | 
            -
             | 
| 67 | 
            -
             | 
| 68 | 
            -
            Although these checksums do not prevent malicious users from tampering with a
         | 
| 69 | 
            -
            built Gem they can be used for basic integrity verification purposes.
         | 
| 55 | 
            +
            * Home page: https://github.com/fixrb/aw
         | 
| 56 | 
            +
            * Bugs/issues: https://github.com/fixrb/aw/issues
         | 
| 70 57 |  | 
| 71 | 
            -
             | 
| 72 | 
            -
            example:
         | 
| 58 | 
            +
            ## Rubies
         | 
| 73 59 |  | 
| 74 | 
            -
             | 
| 75 | 
            -
             | 
| 60 | 
            +
            * [MRI](https://www.ruby-lang.org/)
         | 
| 61 | 
            +
            * [Rubinius](https://rubinius.com/)
         | 
| 76 62 |  | 
| 77 63 | 
             
            ## Versioning
         | 
| 78 64 |  | 
| 79 65 | 
             
            __Aw__ follows [Semantic Versioning 2.0](https://semver.org/).
         | 
| 80 66 |  | 
| 81 | 
            -
            ##  | 
| 67 | 
            +
            ## License
         | 
| 82 68 |  | 
| 83 | 
            -
             | 
| 84 | 
            -
            2. Create your feature branch (`git checkout -b my-new-feature`)
         | 
| 85 | 
            -
            3. Commit your changes (`git commit -am 'Add some feature'`)
         | 
| 86 | 
            -
            4. Push to the branch (`git push origin my-new-feature`)
         | 
| 87 | 
            -
            5. Create a new Pull Request
         | 
| 69 | 
            +
            The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
         | 
| 88 70 |  | 
| 89 | 
            -
             | 
| 71 | 
            +
            ***
         | 
| 90 72 |  | 
| 91 | 
            -
             | 
| 73 | 
            +
            <p>
         | 
| 74 | 
            +
              This project is sponsored by:<br />
         | 
| 75 | 
            +
              <a href="https://sashite.com/"><img
         | 
| 76 | 
            +
                src="https://github.com/fixrb/aw/raw/master/img/sashite.png"
         | 
| 77 | 
            +
                alt="Sashite" /></a>
         | 
| 78 | 
            +
            </p>
         | 
| 92 79 |  | 
| 93 80 | 
             
            [gem]: https://rubygems.org/gems/aw
         | 
| 94 81 | 
             
            [travis]: https://travis-ci.org/fixrb/aw
         | 
| 95 82 | 
             
            [codeclimate]: https://codeclimate.com/github/fixrb/aw
         | 
| 96 | 
            -
            [inchpages]:  | 
| 97 | 
            -
            [rubydoc]:  | 
| 98 | 
            -
             | 
| 99 | 
            -
            ***
         | 
| 100 | 
            -
             | 
| 101 | 
            -
            This project is sponsored by:
         | 
| 102 | 
            -
             | 
| 103 | 
            -
            [](https://sashite.com/)
         | 
| 83 | 
            +
            [inchpages]: https://inch-ci.org/github/fixrb/aw
         | 
| 84 | 
            +
            [rubydoc]: https://rubydoc.info/gems/aw
         | 
    
        data/lib/aw/fork.rb
    CHANGED
    
    | @@ -11,7 +11,7 @@ module Aw | |
| 11 11 | 
             
                # @param write [IO] The write endpoint.
         | 
| 12 12 | 
             
                def initialize(read, write)
         | 
| 13 13 | 
             
                  # Currently, not available on all platforms.
         | 
| 14 | 
            -
                  raise NotImplementedError, 'fork()' unless ::Process.respond_to?(:fork)
         | 
| 14 | 
            +
                  raise ::NotImplementedError, 'fork()' unless ::Process.respond_to?(:fork)
         | 
| 15 15 |  | 
| 16 16 | 
             
                  @read   = read
         | 
| 17 17 | 
             
                  @write  = write
         | 
| @@ -36,11 +36,11 @@ module Aw | |
| 36 36 | 
             
                  result = read.read
         | 
| 37 37 | 
             
                  ::Process.wait(pid)
         | 
| 38 38 |  | 
| 39 | 
            -
                  # rubocop:disable MarshalLoad
         | 
| 39 | 
            +
                  # rubocop:disable Security/MarshalLoad
         | 
| 40 40 | 
             
                  ::Marshal.load(result).tap do |r|
         | 
| 41 41 | 
             
                    raise r if r.is_a?(::Exception)
         | 
| 42 42 | 
             
                  end
         | 
| 43 | 
            -
                  # rubocop:enable MarshalLoad
         | 
| 43 | 
            +
                  # rubocop:enable Security/MarshalLoad
         | 
| 44 44 | 
             
                end
         | 
| 45 45 |  | 
| 46 46 | 
             
                private
         | 
| @@ -58,7 +58,7 @@ module Aw | |
| 58 58 | 
             
                    # rubocop:enable Lint/RescueException
         | 
| 59 59 |  | 
| 60 60 | 
             
                    ::Marshal.dump(result, write)
         | 
| 61 | 
            -
                    exit!( | 
| 61 | 
            +
                    exit!(true)
         | 
| 62 62 | 
             
                  end
         | 
| 63 63 | 
             
                end
         | 
| 64 64 | 
             
              end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: aw
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.11
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Cyril Kato
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2020-01-09 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -16,14 +16,14 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - "~>"
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: '2. | 
| 19 | 
            +
                    version: '2.1'
         | 
| 20 20 | 
             
              type: :development
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - "~>"
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: '2. | 
| 26 | 
            +
                    version: '2.1'
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 28 | 
             
              name: rake
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -44,14 +44,28 @@ dependencies: | |
| 44 44 | 
             
                requirements:
         | 
| 45 45 | 
             
                - - "~>"
         | 
| 46 46 | 
             
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            -
                    version: '0. | 
| 47 | 
            +
                    version: '0.79'
         | 
| 48 48 | 
             
              type: :development
         | 
| 49 49 | 
             
              prerelease: false
         | 
| 50 50 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 51 | 
             
                requirements:
         | 
| 52 52 | 
             
                - - "~>"
         | 
| 53 53 | 
             
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            -
                    version: '0. | 
| 54 | 
            +
                    version: '0.79'
         | 
| 55 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 56 | 
            +
              name: rubocop-performance
         | 
| 57 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 | 
            +
                requirements:
         | 
| 59 | 
            +
                - - ">="
         | 
| 60 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            +
                    version: '0'
         | 
| 62 | 
            +
              type: :development
         | 
| 63 | 
            +
              prerelease: false
         | 
| 64 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 | 
            +
                requirements:
         | 
| 66 | 
            +
                - - ">="
         | 
| 67 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            +
                    version: '0'
         | 
| 55 69 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 56 70 | 
             
              name: simplecov
         | 
| 57 71 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -109,8 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 109 123 | 
             
                - !ruby/object:Gem::Version
         | 
| 110 124 | 
             
                  version: '0'
         | 
| 111 125 | 
             
            requirements: []
         | 
| 112 | 
            -
            rubygems_version: 3. | 
| 126 | 
            +
            rubygems_version: 3.1.2
         | 
| 113 127 | 
             
            signing_key: 
         | 
| 114 128 | 
             
            specification_version: 4
         | 
| 115 | 
            -
            summary: Aw, fork!
         | 
| 129 | 
            +
            summary: "Aw, fork! \U0001F62C"
         | 
| 116 130 | 
             
            test_files: []
         |