officer 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +16 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +34 -0
- data/LICENSE +4 -2
- data/Rakefile +26 -38
- data/lib/officer/client.rb +125 -26
- data/lib/officer/commands.rb +8 -2
- data/lib/officer/connection.rb +8 -0
- data/lib/officer/lock_store.rb +7 -1
- data/lib/officer/server.rb +4 -1
- data/lib/officer/version.rb +3 -0
- data/lib/officer.rb +3 -1
- data/officer.gemspec +19 -63
- data/spec/spec_helper.rb +13 -3
- metadata +80 -21
- data/.autotest +0 -10
- data/.document +0 -5
- data/VERSION +0 -1
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
officer (0.10.0)
|
5
|
+
choice
|
6
|
+
daemons
|
7
|
+
eventmachine
|
8
|
+
json
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: https://rubygems.org/
|
12
|
+
specs:
|
13
|
+
choice (0.1.6)
|
14
|
+
daemons (1.1.8)
|
15
|
+
diff-lcs (1.1.3)
|
16
|
+
eventmachine (0.12.10)
|
17
|
+
json (1.7.3)
|
18
|
+
rake (0.9.2.2)
|
19
|
+
rspec (2.10.0)
|
20
|
+
rspec-core (~> 2.10.0)
|
21
|
+
rspec-expectations (~> 2.10.0)
|
22
|
+
rspec-mocks (~> 2.10.0)
|
23
|
+
rspec-core (2.10.1)
|
24
|
+
rspec-expectations (2.10.0)
|
25
|
+
diff-lcs (~> 1.1.3)
|
26
|
+
rspec-mocks (2.10.1)
|
27
|
+
|
28
|
+
PLATFORMS
|
29
|
+
ruby
|
30
|
+
|
31
|
+
DEPENDENCIES
|
32
|
+
officer!
|
33
|
+
rake
|
34
|
+
rspec
|
data/LICENSE
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
Copyright (c)
|
1
|
+
Copyright (c) 2012 Chad Remesch
|
2
|
+
|
3
|
+
MIT License
|
2
4
|
|
3
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
6
|
a copy of this software and associated documentation files (the
|
@@ -17,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,46 +1,34 @@
|
|
1
|
-
|
2
|
-
require '
|
3
|
-
|
4
|
-
require 'jeweler'
|
5
|
-
Jeweler::Tasks.new do |gem|
|
6
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
7
|
-
gem.name = "officer"
|
8
|
-
gem.homepage = "http://github.com/chadrem/officer"
|
9
|
-
gem.license = "MIT"
|
10
|
-
gem.summary = %Q{Ruby lock server and client built on EventMachine.}
|
11
|
-
gem.description = %Q{Officer is designed to help you coordinate distributed processes and avoid race conditions.}
|
12
|
-
gem.email = "chad@remesch.com"
|
13
|
-
gem.authors = ["Chad Remesch"]
|
14
|
-
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
15
|
-
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
16
|
-
# gem.add_development_dependency 'rspec', '2.4.0'
|
17
|
-
gem.add_dependency "eventmachine", ">= 0"
|
18
|
-
gem.add_dependency "json", ">= 0"
|
19
|
-
gem.add_dependency "daemons", ">= 0"
|
20
|
-
gem.add_dependency "choice", ">= 0"
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require 'bundler/gem_tasks'
|
21
3
|
|
4
|
+
require 'rubygems'
|
5
|
+
require 'bundler'
|
6
|
+
begin
|
7
|
+
Bundler.setup(:default, :development)
|
8
|
+
rescue Bundler::BundlerError => e
|
9
|
+
$stderr.puts e.message
|
10
|
+
$stderr.puts 'Run `bundle install` to install missing gems'
|
11
|
+
exit e.status_code
|
22
12
|
end
|
23
|
-
Jeweler::RubygemsDotOrgTasks.new
|
24
13
|
|
25
|
-
|
26
|
-
require 'rspec/core/rake_task'
|
27
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
28
|
-
spec.pattern = FileList['spec/**/*_spec.rb']
|
29
|
-
end
|
14
|
+
task :default => :spec
|
30
15
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end
|
16
|
+
desc 'Start an IRB console with offier loaded'
|
17
|
+
task :console do
|
18
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
35
19
|
|
36
|
-
|
20
|
+
require 'officer'
|
21
|
+
require 'irb'
|
22
|
+
|
23
|
+
ARGV.clear
|
37
24
|
|
38
|
-
|
39
|
-
|
40
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
25
|
+
IRB.start
|
26
|
+
end
|
41
27
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
28
|
+
desc 'Run all specs'
|
29
|
+
task :spec do
|
30
|
+
puts 'Running rspec:'
|
31
|
+
system 'rspec spec'
|
46
32
|
end
|
33
|
+
|
34
|
+
task :default => :spec
|
data/lib/officer/client.rb
CHANGED
@@ -1,9 +1,3 @@
|
|
1
|
-
require 'socket'
|
2
|
-
require 'fcntl'
|
3
|
-
|
4
|
-
require 'rubygems'
|
5
|
-
require 'json'
|
6
|
-
|
7
1
|
module Officer
|
8
2
|
|
9
3
|
class GenericError < RuntimeError; end
|
@@ -12,6 +6,7 @@ module Officer
|
|
12
6
|
class LockTimeoutError < LockError; end
|
13
7
|
class LockQueuedMaxError < LockError; end
|
14
8
|
class UnlockError < GenericError; end
|
9
|
+
class SocketResponseError < GenericError; end
|
15
10
|
|
16
11
|
class Client
|
17
12
|
def initialize options={}
|
@@ -20,6 +15,10 @@ module Officer
|
|
20
15
|
@host = options[:host] || 'localhost'
|
21
16
|
@port = options[:port] || 11500
|
22
17
|
@namespace = options[:namespace]
|
18
|
+
@keep_alive_freq = options[:keep_alive_freq] || 6 # Hz.
|
19
|
+
@keep_alive_enabled = options.include?(:keep_alive_enabled) ? options[:keep_alive_enabled] : true
|
20
|
+
@thread = nil
|
21
|
+
@lock = Mutex.new
|
23
22
|
|
24
23
|
connect
|
25
24
|
end
|
@@ -27,22 +26,43 @@ module Officer
|
|
27
26
|
def reconnect
|
28
27
|
disconnect
|
29
28
|
connect
|
29
|
+
|
30
|
+
self
|
30
31
|
end
|
31
32
|
|
32
33
|
def disconnect
|
33
|
-
@
|
34
|
-
|
34
|
+
@lock.synchronize do
|
35
|
+
@thread.terminate if @thread
|
36
|
+
@thread = nil
|
37
|
+
|
38
|
+
@socket.close if @socket
|
39
|
+
@socket = nil
|
40
|
+
end
|
41
|
+
|
42
|
+
self
|
35
43
|
end
|
36
44
|
|
37
45
|
def lock name, options={}
|
38
46
|
result = execute :command => 'lock', :name => name_with_ns(name),
|
39
47
|
:timeout => options[:timeout], :queue_max => options[:queue_max]
|
40
48
|
strip_ns_from_hash result, 'name'
|
49
|
+
|
50
|
+
if result['name'] != name || !%w(acquired already_acquired timed_out queue_maxed).include?(result['result'])
|
51
|
+
force_shutdown
|
52
|
+
end
|
53
|
+
|
54
|
+
result
|
41
55
|
end
|
42
56
|
|
43
57
|
def unlock name
|
44
58
|
result = execute :command => 'unlock', :name => name_with_ns(name)
|
45
59
|
strip_ns_from_hash result, 'name'
|
60
|
+
|
61
|
+
if result['name'] != name || !%w(released release_failed).include?(result['result'])
|
62
|
+
force_shutdown
|
63
|
+
end
|
64
|
+
|
65
|
+
result
|
46
66
|
end
|
47
67
|
|
48
68
|
def with_lock name, options={}
|
@@ -66,44 +86,85 @@ module Officer
|
|
66
86
|
end
|
67
87
|
|
68
88
|
def reset
|
69
|
-
execute :command => 'reset'
|
89
|
+
result = execute :command => 'reset'
|
90
|
+
|
91
|
+
if result['result'] != 'reset_succeeded'
|
92
|
+
force_shutdown
|
93
|
+
end
|
94
|
+
|
95
|
+
result
|
70
96
|
end
|
71
97
|
|
72
98
|
def locks
|
73
|
-
execute :command => 'locks'
|
99
|
+
result = execute :command => 'locks'
|
100
|
+
|
101
|
+
if result['result'] != 'locks'
|
102
|
+
force_shutdown
|
103
|
+
end
|
104
|
+
|
105
|
+
result
|
74
106
|
end
|
75
107
|
|
76
108
|
def connections
|
77
|
-
execute :command => 'connections'
|
109
|
+
result = execute :command => 'connections'
|
110
|
+
|
111
|
+
if result['result'] != 'connections'
|
112
|
+
force_shutdown
|
113
|
+
end
|
114
|
+
|
115
|
+
result
|
78
116
|
end
|
79
117
|
|
80
118
|
def my_locks
|
81
119
|
result = execute :command => 'my_locks'
|
82
120
|
result['value'] = result['value'].map {|name| strip_ns(name)}
|
121
|
+
|
122
|
+
if result['result'] != 'my_locks'
|
123
|
+
force_shutdown
|
124
|
+
end
|
125
|
+
|
83
126
|
result
|
84
127
|
end
|
85
128
|
|
86
129
|
private
|
87
130
|
def connect
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
131
|
+
@lock.synchronize do
|
132
|
+
raise AlreadyConnectedError if @socket
|
133
|
+
|
134
|
+
case @socket_type
|
135
|
+
when 'TCP'
|
136
|
+
@socket = TCPSocket.new @host, @port.to_i
|
137
|
+
when 'UNIX'
|
138
|
+
@socket = UNIXSocket.new @socket_file
|
139
|
+
else
|
140
|
+
raise "Invalid socket type: #{@socket_type}"
|
141
|
+
end
|
142
|
+
|
143
|
+
@socket.fcntl Fcntl::F_SETFD, Fcntl::FD_CLOEXEC
|
144
|
+
@socket.setsockopt Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1
|
98
145
|
|
99
|
-
|
146
|
+
@thread = Thread.new { thread_main } unless @thread && @thread.alive?
|
147
|
+
end
|
100
148
|
end
|
101
149
|
|
102
150
|
def execute command
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
151
|
+
@lock.synchronize do
|
152
|
+
command = command.to_json
|
153
|
+
@socket.write command + "\n"
|
154
|
+
|
155
|
+
result = nil
|
156
|
+
|
157
|
+
while true
|
158
|
+
rs = IO.select([@socket], nil, nil, sleep_sec)
|
159
|
+
|
160
|
+
if rs.nil?
|
161
|
+
keep_alive
|
162
|
+
else
|
163
|
+
result = @socket.gets "\n"
|
164
|
+
return JSON.parse result.chomp
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
107
168
|
rescue
|
108
169
|
reconnect
|
109
170
|
raise
|
@@ -121,6 +182,44 @@ module Officer
|
|
121
182
|
hash[key] = strip_ns(hash[key])
|
122
183
|
hash
|
123
184
|
end
|
185
|
+
|
186
|
+
def sleep_sec
|
187
|
+
60.0 / @keep_alive_freq
|
188
|
+
end
|
189
|
+
|
190
|
+
# This method assumes the calling thread already holds @lock.
|
191
|
+
def keep_alive
|
192
|
+
return unless @keep_alive_enabled
|
193
|
+
return unless @socket
|
194
|
+
|
195
|
+
command = { :command => 'keep_alive' }
|
196
|
+
@socket.write command.to_json + "\n"
|
197
|
+
nil
|
198
|
+
end
|
199
|
+
|
200
|
+
def thread_main
|
201
|
+
while true
|
202
|
+
sleep(sleep_sec)
|
203
|
+
|
204
|
+
if @lock.try_lock
|
205
|
+
begin
|
206
|
+
keep_alive
|
207
|
+
rescue Exception => e
|
208
|
+
ensure
|
209
|
+
@lock.unlock
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
def force_shutdown
|
216
|
+
begin
|
217
|
+
disconnect
|
218
|
+
rescue Exception => e
|
219
|
+
ensure
|
220
|
+
raise SocketResponseError
|
221
|
+
end
|
222
|
+
end
|
124
223
|
end
|
125
224
|
|
126
225
|
end
|
data/lib/officer/commands.rb
CHANGED
@@ -26,7 +26,7 @@ module Officer
|
|
26
26
|
def initialize connection, request
|
27
27
|
@connection = connection
|
28
28
|
@request = request
|
29
|
-
|
29
|
+
|
30
30
|
setup
|
31
31
|
|
32
32
|
raise('Invalid request') unless valid?
|
@@ -135,5 +135,11 @@ module Officer
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
138
|
+
class KeepAlive < Base
|
139
|
+
register
|
140
|
+
|
141
|
+
def execute
|
142
|
+
end
|
143
|
+
end
|
138
144
|
end
|
139
|
-
end
|
145
|
+
end
|
data/lib/officer/connection.rb
CHANGED
@@ -5,6 +5,7 @@ module Officer
|
|
5
5
|
def post_init
|
6
6
|
@connected = true
|
7
7
|
@timers = {} # name => Timer
|
8
|
+
@last_cmd_at = Time.now.utc
|
8
9
|
|
9
10
|
Officer::Log.info "Connected: #{to_host_s}"
|
10
11
|
end
|
@@ -16,6 +17,7 @@ module Officer
|
|
16
17
|
|
17
18
|
command = Officer::Command::Factory.create line, self
|
18
19
|
command.execute
|
20
|
+
@last_cmd_at = Time.now.utc
|
19
21
|
|
20
22
|
rescue Exception => e
|
21
23
|
Officer::Log.error e
|
@@ -91,6 +93,8 @@ module Officer
|
|
91
93
|
include EmCallbacks
|
92
94
|
include LockStoreCallbacks
|
93
95
|
|
96
|
+
attr_reader :last_cmd_at
|
97
|
+
|
94
98
|
def to_host_s
|
95
99
|
begin
|
96
100
|
@to_host_s ||= non_cached_to_host_s
|
@@ -100,6 +104,10 @@ module Officer
|
|
100
104
|
end
|
101
105
|
end
|
102
106
|
|
107
|
+
def received_keep_alive
|
108
|
+
|
109
|
+
end
|
110
|
+
|
103
111
|
private
|
104
112
|
attr_reader :connected
|
105
113
|
|
data/lib/officer/lock_store.rb
CHANGED
@@ -142,7 +142,7 @@ module Officer
|
|
142
142
|
@locks.each do |name, lock|
|
143
143
|
locks[name] = lock.queue.to_host_a
|
144
144
|
end
|
145
|
-
|
145
|
+
|
146
146
|
connection.locks locks
|
147
147
|
end
|
148
148
|
|
@@ -160,6 +160,12 @@ module Officer
|
|
160
160
|
my_locks = @connections[connection] ? @connections[connection].to_a : []
|
161
161
|
connection.my_locks my_locks
|
162
162
|
end
|
163
|
+
|
164
|
+
def watchdog
|
165
|
+
@connections.each do |conn, names|
|
166
|
+
|
167
|
+
end
|
168
|
+
end
|
163
169
|
end
|
164
170
|
|
165
171
|
end
|
data/lib/officer/server.rb
CHANGED
@@ -31,7 +31,10 @@ module Officer
|
|
31
31
|
|
32
32
|
EM::run do
|
33
33
|
if @params[:stats]
|
34
|
-
EM::PeriodicTimer.new(5)
|
34
|
+
EM::PeriodicTimer.new(5) do
|
35
|
+
Officer::LockStore.instance.log_state
|
36
|
+
Officer::LockStore.instance.watchdog
|
37
|
+
end
|
35
38
|
end
|
36
39
|
|
37
40
|
if @enable_shutdown_port
|
data/lib/officer.rb
CHANGED
@@ -4,6 +4,8 @@ require 'set'
|
|
4
4
|
require 'logger'
|
5
5
|
require 'delegate'
|
6
6
|
require 'thread'
|
7
|
+
require 'socket'
|
8
|
+
require 'fcntl'
|
7
9
|
|
8
10
|
# Gems.
|
9
11
|
require 'rubygems'
|
@@ -11,9 +13,9 @@ require 'eventmachine'
|
|
11
13
|
require 'json'
|
12
14
|
require 'daemons'
|
13
15
|
require 'choice'
|
14
|
-
# require 'ruby-debug'
|
15
16
|
|
16
17
|
# Application.
|
18
|
+
require 'officer/version'
|
17
19
|
require 'officer/log'
|
18
20
|
require 'officer/commands'
|
19
21
|
require 'officer/connection'
|
data/officer.gemspec
CHANGED
@@ -1,69 +1,25 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/officer/version', __FILE__)
|
5
3
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ['Chad Remesch']
|
6
|
+
gem.email = ['chad@remesch.com']
|
7
|
+
gem.description = 'Officer is designed to help you coordinate distributed processes and avoid race conditions.'
|
8
|
+
gem.summary = 'Ruby lock server and client built on EventMachine.'
|
9
|
+
gem.homepage = 'http://github.com/chadrem/officer'
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
s.extra_rdoc_files = [
|
17
|
-
"LICENSE",
|
18
|
-
"README.markdown"
|
19
|
-
]
|
20
|
-
s.files = [
|
21
|
-
".autotest",
|
22
|
-
".document",
|
23
|
-
".rspec",
|
24
|
-
"CONTRIBUTORS",
|
25
|
-
"LICENSE",
|
26
|
-
"README.markdown",
|
27
|
-
"Rakefile",
|
28
|
-
"VERSION",
|
29
|
-
"bin/officer",
|
30
|
-
"lib/officer.rb",
|
31
|
-
"lib/officer/client.rb",
|
32
|
-
"lib/officer/commands.rb",
|
33
|
-
"lib/officer/connection.rb",
|
34
|
-
"lib/officer/lock_store.rb",
|
35
|
-
"lib/officer/log.rb",
|
36
|
-
"lib/officer/runner.rb",
|
37
|
-
"lib/officer/server.rb",
|
38
|
-
"officer.gemspec",
|
39
|
-
"spec/integration/officer_spec.rb",
|
40
|
-
"spec/spec_helper.rb"
|
41
|
-
]
|
42
|
-
s.homepage = "http://github.com/chadrem/officer"
|
43
|
-
s.licenses = ["MIT"]
|
44
|
-
s.require_paths = ["lib"]
|
45
|
-
s.rubygems_version = "1.8.17"
|
46
|
-
s.summary = "Ruby lock server and client built on EventMachine."
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = 'officer'
|
15
|
+
gem.require_paths = ['lib']
|
16
|
+
gem.version = Officer::VERSION
|
47
17
|
|
48
|
-
|
49
|
-
|
18
|
+
gem.add_dependency('eventmachine', ['>= 0'])
|
19
|
+
gem.add_dependency('json', ['>= 0'])
|
20
|
+
gem.add_dependency('daemons', ['>= 0'])
|
21
|
+
gem.add_dependency('choice', ['>= 0'])
|
50
22
|
|
51
|
-
|
52
|
-
|
53
|
-
s.add_runtime_dependency(%q<json>, [">= 0"])
|
54
|
-
s.add_runtime_dependency(%q<daemons>, [">= 0"])
|
55
|
-
s.add_runtime_dependency(%q<choice>, [">= 0"])
|
56
|
-
else
|
57
|
-
s.add_dependency(%q<eventmachine>, [">= 0"])
|
58
|
-
s.add_dependency(%q<json>, [">= 0"])
|
59
|
-
s.add_dependency(%q<daemons>, [">= 0"])
|
60
|
-
s.add_dependency(%q<choice>, [">= 0"])
|
61
|
-
end
|
62
|
-
else
|
63
|
-
s.add_dependency(%q<eventmachine>, [">= 0"])
|
64
|
-
s.add_dependency(%q<json>, [">= 0"])
|
65
|
-
s.add_dependency(%q<daemons>, [">= 0"])
|
66
|
-
s.add_dependency(%q<choice>, [">= 0"])
|
67
|
-
end
|
23
|
+
gem.add_development_dependency('rake', ['>= 0'])
|
24
|
+
gem.add_development_dependency('rspec', ['>= 0'])
|
68
25
|
end
|
69
|
-
|
data/spec/spec_helper.rb
CHANGED
@@ -1,8 +1,18 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
2
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
-
|
4
|
-
require
|
5
|
-
require
|
3
|
+
|
4
|
+
require 'rubygems'
|
5
|
+
require 'bundler'
|
6
|
+
|
7
|
+
begin
|
8
|
+
Bundler.setup(:default, :development)
|
9
|
+
rescue Bundler::BundlerError => e
|
10
|
+
$stderr.puts e.message
|
11
|
+
$stderr.puts 'Run `bundle install` to install missing gems'
|
12
|
+
exit e.status_code
|
13
|
+
end
|
14
|
+
|
15
|
+
require 'benchmark'
|
6
16
|
require 'officer'
|
7
17
|
|
8
18
|
# Requires supporting files with custom matchers and macros, etc,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: officer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: json
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,10 +37,15 @@ dependencies:
|
|
32
37
|
version: '0'
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: daemons
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,10 +53,15 @@ dependencies:
|
|
43
53
|
version: '0'
|
44
54
|
type: :runtime
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: choice
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ! '>='
|
@@ -54,25 +69,61 @@ dependencies:
|
|
54
69
|
version: '0'
|
55
70
|
type: :runtime
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rake
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rspec
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
58
110
|
description: Officer is designed to help you coordinate distributed processes and
|
59
111
|
avoid race conditions.
|
60
|
-
email:
|
112
|
+
email:
|
113
|
+
- chad@remesch.com
|
61
114
|
executables:
|
62
115
|
- officer
|
63
116
|
extensions: []
|
64
|
-
extra_rdoc_files:
|
65
|
-
- LICENSE
|
66
|
-
- README.markdown
|
117
|
+
extra_rdoc_files: []
|
67
118
|
files:
|
68
|
-
- .
|
69
|
-
- .document
|
119
|
+
- .gitignore
|
70
120
|
- .rspec
|
71
121
|
- CONTRIBUTORS
|
122
|
+
- Gemfile
|
123
|
+
- Gemfile.lock
|
72
124
|
- LICENSE
|
73
125
|
- README.markdown
|
74
126
|
- Rakefile
|
75
|
-
- VERSION
|
76
127
|
- bin/officer
|
77
128
|
- lib/officer.rb
|
78
129
|
- lib/officer/client.rb
|
@@ -82,12 +133,12 @@ files:
|
|
82
133
|
- lib/officer/log.rb
|
83
134
|
- lib/officer/runner.rb
|
84
135
|
- lib/officer/server.rb
|
136
|
+
- lib/officer/version.rb
|
85
137
|
- officer.gemspec
|
86
138
|
- spec/integration/officer_spec.rb
|
87
139
|
- spec/spec_helper.rb
|
88
140
|
homepage: http://github.com/chadrem/officer
|
89
|
-
licenses:
|
90
|
-
- MIT
|
141
|
+
licenses: []
|
91
142
|
post_install_message:
|
92
143
|
rdoc_options: []
|
93
144
|
require_paths:
|
@@ -98,16 +149,24 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
98
149
|
- - ! '>='
|
99
150
|
- !ruby/object:Gem::Version
|
100
151
|
version: '0'
|
152
|
+
segments:
|
153
|
+
- 0
|
154
|
+
hash: -2483715139742074305
|
101
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
156
|
none: false
|
103
157
|
requirements:
|
104
158
|
- - ! '>='
|
105
159
|
- !ruby/object:Gem::Version
|
106
160
|
version: '0'
|
161
|
+
segments:
|
162
|
+
- 0
|
163
|
+
hash: -2483715139742074305
|
107
164
|
requirements: []
|
108
165
|
rubyforge_project:
|
109
|
-
rubygems_version: 1.8.
|
166
|
+
rubygems_version: 1.8.23
|
110
167
|
signing_key:
|
111
168
|
specification_version: 3
|
112
169
|
summary: Ruby lock server and client built on EventMachine.
|
113
|
-
test_files:
|
170
|
+
test_files:
|
171
|
+
- spec/integration/officer_spec.rb
|
172
|
+
- spec/spec_helper.rb
|
data/.autotest
DELETED
data/.document
DELETED
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.9.2
|