beetle 0.4.8 → 0.4.9

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: 437fb3b0bde81a32e99d6583110a6c4a26557fb9
4
- data.tar.gz: b877e13c30fcce8270138f4dabf11a302a4b8ecf
3
+ metadata.gz: 5c0645f6fec12cedbcb24c47c2461b107e062e4f
4
+ data.tar.gz: 5f30af10846f117fe55483ee1cf17e11b9233aae
5
5
  SHA512:
6
- metadata.gz: 145a9de31844e7473ddb696b599a33d5c79d18fd81cbff75ee4fcacb759e78361344f69d3553aaefe458a3e946781d30365b9367ca1b391c4aedc5f6eb2f215d
7
- data.tar.gz: 31e7d3f979ee7fd08d167b3505b503987d70b6c32806b6265e1c6c6956e45a84f042efaa4be630421e3d634e8370ad8d579cee52fa0aaacf82c36c318ae89d49
6
+ metadata.gz: ec3a7ff7cd10bd27fa25f86053b4f0d4ed99430491f8a34e9d1e2a980cac70c0b5d585c3786e1c7cfa17ed99931ea9eceedc8dd59f9b32369914f4bf667b6ee3
7
+ data.tar.gz: daa67f9a0d863d90f6915089e29d9e60e80c3c3b02f45e4399d2e0047d88fbf9713afecedbb310068b18116990f3f46117c41f1c0b110799256f5ea6baa4877f
data/RELEASE_NOTES.rdoc CHANGED
@@ -1,9 +1,26 @@
1
1
  = Release Notes
2
2
 
3
+ == Version 0.4.9
4
+
5
+ * Allow redis_configuration_client to run in the foreground (useful
6
+ for docker)
7
+
8
+ == Version 0.4.8
9
+
10
+ * unseen clients need to be an array
11
+
12
+ == Version 0.4.7
13
+
14
+ * list clients which have never sent a ping in the failover server UI
15
+
16
+ == Version 0.4.6
17
+
18
+ * Publish activesupport notifications to support performance measurements
19
+
3
20
  == Version 0.4.5
4
21
 
5
22
  * Starting mutliple redis failover clients is now prohibited by
6
- defualt. This behavior can be overriden using
23
+ default. This behavior can be overriden using
7
24
  "beetle configuration_client start -- --multiple"
8
25
 
9
26
  == Version 0.4.4
data/beetle.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.add_runtime_dependency("amqp", ["= 1.0.2"])
32
32
  s.add_runtime_dependency("activesupport", [">= 2.3.4"])
33
33
  s.add_runtime_dependency("eventmachine_httpserver", [">= 0.2.1"])
34
- s.add_runtime_dependency("daemons", [">= 1.1.9"])
34
+ s.add_runtime_dependency("daemons", [">= 1.2.0"])
35
35
 
36
- s.add_development_dependency("webmock", [">= 1.21.0"])
36
+ s.add_development_dependency("webmock", ["~> 1.21.0"])
37
37
  end
@@ -115,7 +115,7 @@ Then /^the redis master of "([^\"]*)" should be undefined$/ do |redis_configurat
115
115
  end
116
116
 
117
117
  Then /^the redis master of the beetle handler should be "([^\"]*)"$/ do |redis_name|
118
- Beetle.config.servers = "localhost:5672" # rabbitmq
118
+ Beetle.config.servers = "127.0.0.1:5672" # rabbitmq
119
119
  Beetle.config.logger.level = Logger::INFO
120
120
  client = Beetle::Client.new.configure :auto_delete => true do |config|
121
121
  config.queue(:echo)
@@ -16,7 +16,7 @@ Daemons.run_proc("beetle_handler", :log_output => true, :dir_mode => :normal, :d
16
16
 
17
17
  opts.parse!(ARGV - ["start", "--"])
18
18
 
19
- Beetle.config.servers = "localhost:5672" # rabbitmq
19
+ Beetle.config.servers = "127.0.0.1:5672" # rabbitmq
20
20
 
21
21
  # set Beetle log level to info, less noisy than debug
22
22
  Beetle.config.logger.level = Logger::INFO
@@ -37,7 +37,7 @@ def redis_master_file(client_name)
37
37
  end
38
38
 
39
39
  def first_redis_configuration_client_pid
40
- File.read("redis_configuration_client0.pid").chomp.to_i
40
+ File.read("redis_configuration_client_num0.pid").chomp.to_i
41
41
  end
42
42
 
43
43
  def system_notification_log_path
@@ -8,7 +8,7 @@ tmp_path = File.expand_path("../../tmp", File.dirname(__FILE__))
8
8
  system_notification_log_file_path = "#{tmp_path}/system_notifications.log"
9
9
 
10
10
  Daemons.run_proc("system_notification_logger", :log_output => true, :dir_mode => :normal, :dir => tmp_path) do
11
- Beetle.config.servers = "localhost:5672" # rabbitmq
11
+ Beetle.config.servers = "127.0.0.1:5672" # rabbitmq
12
12
 
13
13
  # set Beetle log level to info, less noisy than debug
14
14
  Beetle.config.logger.level = Logger::DEBUG
@@ -184,7 +184,7 @@ module TestDaemons
184
184
  :pid_file => pid_file,
185
185
  :log_file => log_file,
186
186
  :start_timeout => 20,
187
- :stop_timeout => 20,
187
+ :stop_timeout => 30,
188
188
  )
189
189
  end
190
190
  end
@@ -49,7 +49,7 @@ module TestDaemons
49
49
  end
50
50
 
51
51
  def pid_file
52
- "#{tmp_path}/redis_configuration_client#{@daemon_id}.pid"
52
+ "#{tmp_path}/redis_configuration_client_num#{@daemon_id}.pid"
53
53
  end
54
54
 
55
55
  def log_file
@@ -61,6 +61,11 @@ module Beetle
61
61
  Beetle.config.logger.level = Logger::DEBUG
62
62
  end
63
63
 
64
+ foreground = false
65
+ opts.on("-f", "--foreground", "Run in foreground") do |val|
66
+ foreground = true
67
+ end
68
+
64
69
  opts.on_tail("-h", "--help", "Show this message") do
65
70
  puts opts
66
71
  exit
@@ -68,10 +73,24 @@ module Beetle
68
73
 
69
74
  opts.parse!(app_options)
70
75
 
71
- Daemons.run_proc("redis_configuration_client", :multiple => multiple, :log_output => true, :dir_mode => dir_mode, :dir => dir) do
76
+ if foreground
72
77
  client = Beetle::RedisConfigurationClient.new
73
78
  client.id = client_id if client_id
74
79
  client.start
80
+ else
81
+ daemon_options = {
82
+ :multiple => multiple,
83
+ :log_output => true,
84
+ :dir_mode => dir_mode,
85
+ :dir => dir,
86
+ :force => true
87
+ }
88
+
89
+ Daemons.run_proc("redis_configuration_client", daemon_options) do
90
+ client = Beetle::RedisConfigurationClient.new
91
+ client.id = client_id if client_id
92
+ client.start
93
+ end
75
94
  end
76
95
  end
77
96
  end
@@ -76,7 +76,14 @@ module Beetle
76
76
  exit
77
77
  end
78
78
 
79
- Daemons.run_proc("redis_configuration_server", :log_output => true, :dir_mode => dir_mode, :dir => dir) do
79
+ daemon_options = {
80
+ :log_output => true,
81
+ :dir_mode => dir_mode,
82
+ :dir => dir,
83
+ :force => true
84
+ }
85
+
86
+ Daemons.run_proc("redis_configuration_server", daemon_options) do
80
87
  config_server = Beetle::RedisConfigurationServer.new
81
88
  Beetle::RedisConfigurationHttpServer.config_server = config_server
82
89
  http_server_port = RUBY_PLATFORM =~ /darwin/ ? 9080 : 8080
@@ -31,7 +31,7 @@ module Beetle
31
31
  # daemons. defaults to 10 seconds.
32
32
  attr_accessor :redis_failover_client_heartbeat_interval
33
33
 
34
- # how long to wait until a redis_failover client daeom can be considered
34
+ # how long to wait until a redis_failover client daemon can be considered
35
35
  # dead. defaults to 60 seconds.
36
36
  attr_accessor :redis_failover_client_dead_interval
37
37
 
@@ -1,3 +1,3 @@
1
1
  module Beetle
2
- VERSION = "0.4.8"
2
+ VERSION = "0.4.9"
3
3
  end
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+ ENV="RAINBOW_COLORED_TESTS=$RAINBOW_COLORED_TESTS"
3
+ cmd="docker run -it --rm -e $ENV beetle-test"
4
+ echo $cmd
5
+ exec $cmd
@@ -658,9 +658,10 @@ module Beetle
658
658
 
659
659
  ActiveRecord::Base.establish_connection(
660
660
  adapter: "mysql2",
661
- database: "beetle_test",
662
661
  username: "root",
663
- encoding: "utf8"
662
+ encoding: "utf8",
663
+ host: "127.0.0.1",
664
+ port: 3306
664
665
  )
665
666
  end
666
667
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beetle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2016-06-01 00:00:00.000000000 Z
15
+ date: 2016-07-27 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: uuid4r
@@ -158,26 +158,26 @@ dependencies:
158
158
  requirements:
159
159
  - - ">="
160
160
  - !ruby/object:Gem::Version
161
- version: 1.1.9
161
+ version: 1.2.0
162
162
  type: :runtime
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - ">="
167
167
  - !ruby/object:Gem::Version
168
- version: 1.1.9
168
+ version: 1.2.0
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: webmock
171
171
  requirement: !ruby/object:Gem::Requirement
172
172
  requirements:
173
- - - ">="
173
+ - - "~>"
174
174
  - !ruby/object:Gem::Version
175
175
  version: 1.21.0
176
176
  type: :development
177
177
  prerelease: false
178
178
  version_requirements: !ruby/object:Gem::Requirement
179
179
  requirements:
180
- - - ">="
180
+ - - "~>"
181
181
  - !ruby/object:Gem::Version
182
182
  version: 1.21.0
183
183
  description: A highly available, reliable messaging infrastructure
@@ -247,6 +247,7 @@ files:
247
247
  - lib/beetle/subscriber.rb
248
248
  - lib/beetle/version.rb
249
249
  - script/console
250
+ - script/docker-run-beetle-tests
250
251
  - script/start_rabbit
251
252
  - test/beetle/amqp_gem_behavior_test.rb
252
253
  - test/beetle/base_test.rb
@@ -286,7 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
286
287
  version: 1.3.7
287
288
  requirements: []
288
289
  rubyforge_project:
289
- rubygems_version: 2.4.8
290
+ rubygems_version: 2.5.1
290
291
  signing_key:
291
292
  specification_version: 3
292
293
  summary: High Availability AMQP Messaging with Redundant Queues