tuersteher 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/lib/tuersteher.rb +8 -3
  2. data/tuersteher.gemspec +1 -1
  3. metadata +61 -47
  4. checksums.yaml +0 -7
data/lib/tuersteher.rb CHANGED
@@ -8,6 +8,7 @@
8
8
 
9
9
  require 'singleton'
10
10
  require 'logger'
11
+ require 'thread'
11
12
 
12
13
  module Tuersteher
13
14
 
@@ -46,6 +47,7 @@ module Tuersteher
46
47
  @path_rules = []
47
48
  @model_rules = []
48
49
  @check_intervall = 300 # set default check interval to 5 minutes
50
+ @mutex = Mutex.new
49
51
  end
50
52
 
51
53
  def ready?
@@ -103,9 +105,12 @@ module Tuersteher
103
105
  # config/access_rules.rb
104
106
  def read_rules
105
107
  @was_read = false
106
- content = File.read self.rules_config_file
107
- if content
108
- eval_rules content
108
+ @mutex.synchronize do
109
+ return if @was_read # dann hat ein anderer Thread bereits gelesen
110
+ content = File.read self.rules_config_file
111
+ if content
112
+ eval_rules content
113
+ end
109
114
  end
110
115
  rescue => ex
111
116
  Tuersteher::TLogger.logger.error "Tuersteher::AccessRulesStorage - Error in rules: #{ex.message}\n\t"+ex.backtrace.join("\n\t")
data/tuersteher.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'tuersteher'
6
- s.version = '0.7.1'
6
+ s.version = '0.7.2'
7
7
  s.authors = ["Bernd Ledig"]
8
8
  s.email = ["bernd@ledig.info"]
9
9
  s.homepage = "http://github.com/bledig/tuersteher"
metadata CHANGED
@@ -1,50 +1,64 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: tuersteher
3
- version: !ruby/object:Gem::Version
4
- version: 0.7.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.2
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - Bernd Ledig
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2014-11-20 00:00:00 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+ date: 2015-03-10 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- prerelease: false
17
- requirement: &id001 !ruby/object:Gem::Requirement
18
- requirements:
19
- - &id003
20
- - ">="
21
- - !ruby/object:Gem::Version
22
- version: "0"
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
23
22
  type: :development
24
- version_requirements: *id001
25
- - !ruby/object:Gem::Dependency
26
- name: rspec
27
23
  prerelease: false
28
- requirement: &id002 !ruby/object:Gem::Requirement
29
- requirements:
30
- - - ">"
31
- - !ruby/object:Gem::Version
32
- version: "2.7"
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>'
36
+ - !ruby/object:Gem::Version
37
+ version: '2.7'
33
38
  - - <
34
- - !ruby/object:Gem::Version
35
- version: "3.0"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
36
41
  type: :development
37
- version_requirements: *id002
38
- description: " Security-Layer for Rails-Application acts like a firewall.\n"
39
- email:
42
+ prerelease: false
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ! '>'
47
+ - !ruby/object:Gem::Version
48
+ version: '2.7'
49
+ - - <
50
+ - !ruby/object:Gem::Version
51
+ version: '3.0'
52
+ description: ! ' Security-Layer for Rails-Application acts like a firewall.
53
+
54
+ '
55
+ email:
40
56
  - bernd@ledig.info
41
57
  executables: []
42
-
43
58
  extensions: []
44
-
45
- extra_rdoc_files:
59
+ extra_rdoc_files:
46
60
  - README.rdoc
47
- files:
61
+ files:
48
62
  - .gitignore
49
63
  - Gemfile
50
64
  - README.rdoc
@@ -64,26 +78,26 @@ files:
64
78
  - tuersteher.gemspec
65
79
  homepage: http://github.com/bledig/tuersteher
66
80
  licenses: []
67
-
68
- metadata: {}
69
-
70
81
  post_install_message:
71
82
  rdoc_options: []
72
-
73
- require_paths:
83
+ require_paths:
74
84
  - lib
75
- required_ruby_version: !ruby/object:Gem::Requirement
76
- requirements:
77
- - *id003
78
- required_rubygems_version: !ruby/object:Gem::Requirement
79
- requirements:
80
- - *id003
85
+ required_ruby_version: !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ required_rubygems_version: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
81
97
  requirements: []
82
-
83
98
  rubyforge_project: tuersteher
84
- rubygems_version: 2.0.14
99
+ rubygems_version: 1.8.24
85
100
  signing_key:
86
- specification_version: 4
101
+ specification_version: 3
87
102
  summary: summary of the gem
88
103
  test_files: []
89
-
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA512:
3
- metadata.gz: 618f96b53d2095585f5bbba0c416442d926691e015ac9947fd9f75b623852324224d4df3cf4628b61f90d3b32e0fecf0a8e9aae86062549987fea8de05ecd667
4
- data.tar.gz: ec2bbb12a5d68811b311127a7099ffafd9d9c18d880340583d937d378ed84e4fbca7927daad686d36bab5f147f97dd948986843440b5769b6b45c4916824f45c
5
- SHA1:
6
- metadata.gz: abf6b0d4e510898bea2d2e51949c72c235b032bb
7
- data.tar.gz: 4f703506b23fc3575ecfc11390f8d5d690b56b2c