semian 0.11.0 → 0.11.1

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
  SHA256:
3
- metadata.gz: 41ea178ba2c9b67cc36eb6f18c3c80a7a981916b83b2b43c22b51131c2570742
4
- data.tar.gz: d2855772d339c16d2ff85b55d7372b962ec03e71542b81ed1c328a6687bdac9e
3
+ metadata.gz: 972ddce3e9ba74d79ff8d6fd349324a02c1fb9d92f83dcb49ef8afa711d98421
4
+ data.tar.gz: 2a2b587fe0c799b069a151a9fafb6ec21a67ee4454d0d5cc98e9016ade94daee
5
5
  SHA512:
6
- metadata.gz: 4137c69475d6e40331bf63c16a815933329c53908465b7c8b7090069c7121516a5f02a3b1acc7b336548d5651922bc72ad2fcdde042a14b3a73a7d5bfadf8059
7
- data.tar.gz: 49ebd343a8b45217ef5969123cd829b61bebcd9828962435003aab83a95010b2b886a8209f27a081132a4d542431b26aba8f4eca7478034daa1424242da1e0a5
6
+ metadata.gz: 5a9605eb8233e937660a7fb5714e9c8f5461a4f4d22f60dc7427902dcc9e0812cd2c8149376426b8d654f62649badc55cb6665c40435feec1010bd6af0c0f52e
7
+ data.tar.gz: 5f049456ad6f460afcaeca9a7b55471df7f185f220eb050fa9fd6a421b41311b20f9bbf2afd0a4eb829ac929b373379fa25010bcf97a478418b592edb460bd45
@@ -90,7 +90,7 @@ module Semian
90
90
  InternalError = Class.new(BaseError)
91
91
  OpenCircuitError = Class.new(BaseError)
92
92
 
93
- attr_accessor :maximum_lru_size, :minimum_lru_time, :default_permissions
93
+ attr_accessor :maximum_lru_size, :minimum_lru_time, :default_permissions, :namespace
94
94
  self.maximum_lru_size = 500
95
95
  self.minimum_lru_time = 300
96
96
  self.default_permissions = 0660
@@ -10,8 +10,14 @@ module Semian
10
10
  end
11
11
 
12
12
  def initialize(name, tickets: nil, quota: nil, permissions: Semian.default_permissions, timeout: 0)
13
+ unless name.is_a?(String) || name.is_a?(Symbol)
14
+ raise TypeError, "name must be a string or symbol, got: #{name.class}"
15
+ end
16
+
13
17
  if Semian.semaphores_enabled?
14
- initialize_semaphore(name, tickets, quota, permissions, timeout) if respond_to?(:initialize_semaphore)
18
+ if respond_to?(:initialize_semaphore)
19
+ initialize_semaphore("#{Semian.namespace}#{name}", tickets, quota, permissions, timeout)
20
+ end
15
21
  else
16
22
  Semian.issue_disabled_semaphores_warning
17
23
  end
@@ -1,3 +1,3 @@
1
1
  module Semian
2
- VERSION = '0.11.0'
2
+ VERSION = '0.11.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Francis
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-12-07 00:00:00.000000000 Z
13
+ date: 2020-12-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake-compiler