eventkit 0.0.1 → 0.0.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/README.md +2 -0
- data/eventkit.gemspec +2 -4
- data/lib/eventkit/event_loop.rb +2 -2
- data/lib/eventkit/version.rb +1 -1
- data/spec/eventkit/event_loop_spec.rb +6 -9
- metadata +3 -5
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: f6065300f25e54effe4190951711f15c70905f8b
         | 
| 4 | 
            +
              data.tar.gz: f50a9e9140ac6796c0d7b7c26e94c616dea01dd2
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ab9b9218dcb902a0f20b637ddbaa42459b5702ac6f08491430232dbfed55905381f07476a0867195baca8b36ff35c0ddd9fc3d913182fd9f58cf8dde5a884b54
         | 
| 7 | 
            +
              data.tar.gz: c4d344565b019b71f9550c121b7d921cd57755a985aea7ee0245708583ce153029504ba09eaffa8d746d8516429bf1b4a2feba22ee5f49ec1b978e3de6d3734e
         | 
    
        data/README.md
    CHANGED
    
    | @@ -1,5 +1,7 @@ | |
| 1 1 | 
             
            # Eventkit
         | 
| 2 2 |  | 
| 3 | 
            +
            [](https://travis-ci.org/omartell/eventkit)
         | 
| 4 | 
            +
             | 
| 3 5 | 
             
            A basic toolkit for asynchronous event driven applications. The
         | 
| 4 6 | 
             
            current version includes an Event Loop to perform non blocking IO and
         | 
| 5 7 | 
             
            a promises A+ implementation to coordinate asychronous tasks.
         | 
    
        data/eventkit.gemspec
    CHANGED
    
    | @@ -9,10 +9,8 @@ Gem::Specification.new do |spec| | |
| 9 9 | 
             
              spec.authors       = ['Oliver Martell']
         | 
| 10 10 | 
             
              spec.email         = ['oliver.martell@gmail.com']
         | 
| 11 11 | 
             
              spec.summary       = 'Experimental toolkit for asynchronous event driven applications'
         | 
| 12 | 
            -
              spec.description   =
         | 
| 13 | 
            -
             | 
| 14 | 
            -
            an event loop to perform non blocking IO and a promises A+ implementation.'
         | 
| 15 | 
            -
              spec.homepage      = ''
         | 
| 12 | 
            +
              spec.description   = 'An Event Loop, a Promises A+ library, and more...'
         | 
| 13 | 
            +
              spec.homepage      = 'http://github.com/omartell/eventkit'
         | 
| 16 14 | 
             
              spec.license       = 'MIT'
         | 
| 17 15 |  | 
| 18 16 | 
             
              spec.files         = `git ls-files -z`.split("\x0")
         | 
    
        data/lib/eventkit/event_loop.rb
    CHANGED
    
    | @@ -58,8 +58,8 @@ module Eventkit | |
| 58 58 | 
             
                  register_timer(run_in: 0, &handler)
         | 
| 59 59 | 
             
                end
         | 
| 60 60 |  | 
| 61 | 
            -
                def register_timer( | 
| 62 | 
            -
                  @timers << Timer.new(run_in, handler)
         | 
| 61 | 
            +
                def register_timer(options, &handler)
         | 
| 62 | 
            +
                  @timers << Timer.new(options.fetch(:run_in), handler)
         | 
| 63 63 | 
             
                end
         | 
| 64 64 |  | 
| 65 65 | 
             
                def register_read(io, &listener)
         | 
    
        data/lib/eventkit/version.rb
    CHANGED
    
    
| @@ -24,19 +24,16 @@ module Eventkit | |
| 24 24 | 
             
                end
         | 
| 25 25 |  | 
| 26 26 | 
             
                it 'allows to start and stop the event loop' do
         | 
| 27 | 
            -
                   | 
| 27 | 
            +
                  verifier = double(did_stop: nil)
         | 
| 28 28 |  | 
| 29 | 
            -
                   | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            -
                  Thread.new { event_loop.stop }
         | 
| 29 | 
            +
                  event_loop.on_next_tick do
         | 
| 30 | 
            +
                    event_loop.stop
         | 
| 31 | 
            +
                    verifier.did_stop
         | 
| 32 | 
            +
                  end
         | 
| 34 33 |  | 
| 35 34 | 
             
                  event_loop.start
         | 
| 36 35 |  | 
| 37 | 
            -
                   | 
| 38 | 
            -
                    expect(listener).to have_received(:ready_to_write)
         | 
| 39 | 
            -
                  end
         | 
| 36 | 
            +
                  expect(verifier).to have_received(:did_stop)
         | 
| 40 37 | 
             
                end
         | 
| 41 38 |  | 
| 42 39 | 
             
                it 'does not allow to start the event loop once it has started' do
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: eventkit
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Oliver Martell
         | 
| @@ -94,9 +94,7 @@ dependencies: | |
| 94 94 | 
             
                - - "~>"
         | 
| 95 95 | 
             
                  - !ruby/object:Gem::Version
         | 
| 96 96 | 
             
                    version: 0.1.0
         | 
| 97 | 
            -
            description:  | 
| 98 | 
            -
              Experimental toolkit for asynchronous event driven applications, which includes
         | 
| 99 | 
            -
              an event loop to perform non blocking IO and a promises A+ implementation.
         | 
| 97 | 
            +
            description: An Event Loop, a Promises A+ library, and more...
         | 
| 100 98 | 
             
            email:
         | 
| 101 99 | 
             
            - oliver.martell@gmail.com
         | 
| 102 100 | 
             
            executables: []
         | 
| @@ -119,7 +117,7 @@ files: | |
| 119 117 | 
             
            - spec/eventkit/event_loop_spec.rb
         | 
| 120 118 | 
             
            - spec/spec_helper.rb
         | 
| 121 119 | 
             
            - spec/support/async_helper.rb
         | 
| 122 | 
            -
            homepage:  | 
| 120 | 
            +
            homepage: http://github.com/omartell/eventkit
         | 
| 123 121 | 
             
            licenses:
         | 
| 124 122 | 
             
            - MIT
         | 
| 125 123 | 
             
            metadata: {}
         |