wso2_toolbox 0.3.1 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b4a79a88655140563f69967e68f44cc3ce12a69
4
- data.tar.gz: fc3b960eee69401540260ebfb6294e85b558b14f
3
+ metadata.gz: 830a70b3c1e859b9daab9918aa7a3bbf932ffc62
4
+ data.tar.gz: af1c09c9c035f9a99c2693230d5adf27759d080e
5
5
  SHA512:
6
- metadata.gz: 94853c92496bf7e132e53d9c5bbb7d301d608b90bfea6f7287c70d69ef96e4a24ac47a23dec16e32ef9157322227239754024afc78fb67428159b44a758cdcad
7
- data.tar.gz: c51dd568b9488d0b3f2a0d19e7223ec02b1b9f8f3885b2d5c866d5535cc2c3ea611f20b71fef50f8529240cdc9783d1ab99ad9f08881cf774eb178d34b0011ef
6
+ metadata.gz: c9dc6dbeca2ab24b60bc507d853df448204f0639b408dea5f8b04881fe6ac79590f80d6a084969012618a29b0925a41ad4bdf384242c5aec22b188f38ca329f8
7
+ data.tar.gz: 68c0556025fa54f9c1908a1057c2ffd29de213db1904b2a254c1af0d6a1f16cfaaec0368346f9caf5bf553d1ffa66b3108d18be5de4ff9adb18a2bd7cf7d1592
data/CHANGELOG.md CHANGED
@@ -6,9 +6,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.2] - 2018-11-07
10
+ ### Changed
11
+ - Fix bug in local file adapter, when 2 or more process try to read same file
12
+
9
13
  ## [0.3.1] - 2018-11-07
10
14
  ### Changed
11
- - Fix bug in local file adpter, when 2 or more process try to update same file
15
+ - Fix bug in local file adapter, when 2 or more process try to update same file
12
16
 
13
17
  ## [0.3.0] - 2018-05-11
14
18
  ### Changed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wso2_toolbox (0.3.1)
4
+ wso2_toolbox (0.3.2)
5
5
  actionpack (>= 5.0)
6
6
  activesupport (>= 5.0)
7
7
  request_store (~> 1.3.2)
@@ -21,7 +21,11 @@ module Wso2Toolbox
21
21
  end
22
22
 
23
23
  def read(key)
24
- local_storage { |store| return store.try(:[], key.to_s) }
24
+ try_unlock
25
+
26
+ lock_file do
27
+ local_storage { |store| return store.try(:[], key.to_s) }
28
+ end
25
29
  end
26
30
 
27
31
  def write(key, value)
@@ -29,9 +29,11 @@ module Wso2Toolbox
29
29
  f.write File.basename(LOCK_PATH, '.*')
30
30
  end
31
31
 
32
- yield
32
+ block_value = yield
33
33
 
34
34
  FileUtils.rm_r(LOCK_PATH, force: true)
35
+
36
+ block_value
35
37
  end
36
38
 
37
39
  def lock_valid?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wso2Toolbox
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wso2_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abner Carleto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-07 00:00:00.000000000 Z
11
+ date: 2018-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack