backport 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37e4d45bec3b70c07d7bb7ec027399c01ce149f3567ab9f5ddb4661741c8f990
4
- data.tar.gz: '0906731f50ef216c4bb239fdfffc63f40e086c4e6817849363736c93e1c9b9b7'
3
+ metadata.gz: 48f2747578596662f088eee89f805524050bd8c2efb4a357f454e338723ba08b
4
+ data.tar.gz: af914ebb78ef90b553e8b652a793bff042866536eb54d3f280736b4ef7f027d4
5
5
  SHA512:
6
- metadata.gz: aa2e6670f6ea2503bcd3ada456522a547c35b18cd4fb12fd38f0a3e00aece71cdae3aa72a168c83ab590d3ea306e8a04b3dc0daec8dd0cc459351cac488907f0
7
- data.tar.gz: 5eeb2227c5b2f3474b3fbbe6792f0f005f28ce9342b3f395cc596f6cc764741abce8d4daa8cc90dff95d71d877a4fd3c336a5e72ae5980656a2ab971a473c538
6
+ metadata.gz: 873e8c3a990e9263ea16da2870559d7471b6bd840012648ca7409fdbd304a0269ee6beb8868aa1a82c615df77a19cc80c87a788bd999bd395b7b0d6df68f3fcd
7
+ data.tar.gz: 1dee31e2865afa7631e4252f5d73a235eca96dd4e5071dab53357b75e0d7e41a63dd677d60d18babbb33ae0de34549166c13f320d608c8700f4de5f19f235544
@@ -1,18 +1,19 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- rvm:
5
- - 2.1
6
- - 2.2
7
- - 2.3
8
- - 2.4
9
- - 2.5.1
10
- - 2.5.3
11
- - 2.6
12
- - jruby-9.0.5.0
13
- - jruby-9.1.16.0
14
- matrix:
15
- include:
16
- - rvm: 2.4
17
- os: osx
18
- before_install: gem install bundler -v 1.17.2
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ rvm:
5
+ - 2.1
6
+ - 2.2
7
+ - 2.3
8
+ - 2.4
9
+ - 2.5.1
10
+ - 2.5.3
11
+ - 2.6
12
+ - jruby-9.1.16.0
13
+ - jruby-9.2
14
+ matrix:
15
+ include:
16
+ - rvm: 2.4
17
+ os: osx
18
+ before_install: gem install bundler -v 1.17.2
19
+ script: rspec --format documentation
@@ -1,3 +1,7 @@
1
+ ## 1.1.1 - May 28, 2019
2
+ - Interval server synchronizes updates and ready state
3
+ - Spec and CI changes
4
+
1
5
  ## 1.1.0 - May 27, 2019
2
6
  - Interval server uses threads for timing
3
7
  - Servers use observer patterns to reduce polling
@@ -5,13 +5,6 @@ module Backport
5
5
  # Connectable servers check clients for incoming data on each tick.
6
6
  #
7
7
  module Connectable
8
- # def tick
9
- # mutex.synchronize do
10
- # # clients.each(&:tick)
11
- # clients.delete_if(&:stopped?)
12
- # end
13
- # end
14
-
15
8
  def starting
16
9
  clients.map(&:run)
17
10
  end
@@ -10,6 +10,7 @@ module Backport
10
10
  @period = period
11
11
  @block = block
12
12
  @ready = false
13
+ @mutex = Mutex.new
13
14
  end
14
15
 
15
16
  def starting
@@ -19,8 +20,10 @@ module Backport
19
20
 
20
21
  def tick
21
22
  return unless @ready
22
- @block.call self
23
- @ready = false
23
+ @mutex.synchronize do
24
+ @block.call self
25
+ @ready = false
26
+ end
24
27
  end
25
28
 
26
29
  private
@@ -30,7 +33,7 @@ module Backport
30
33
  until stopped?
31
34
  sleep @period
32
35
  break if stopped?
33
- @ready = true
36
+ @mutex.synchronize { @ready = true }
34
37
  changed
35
38
  notify_observers self
36
39
  end
@@ -1,3 +1,3 @@
1
1
  module Backport
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backport
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-27 00:00:00.000000000 Z
11
+ date: 2019-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake