flapjack 1.2.0rc1 → 1.2.0rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile-ruby1.9.lock +1 -1
- data/lib/flapjack/cli/import.rb +5 -1
- data/lib/flapjack/cli/maintenance.rb +7 -5
- data/lib/flapjack/cli/purge.rb +6 -1
- data/lib/flapjack/cli/receiver.rb +27 -42
- data/lib/flapjack/cli/simulate.rb +5 -1
- data/lib/flapjack/coordinator.rb +1 -1
- data/lib/flapjack/data/entity.rb +67 -45
- data/lib/flapjack/data/entity_check.rb +55 -42
- data/lib/flapjack/data/event.rb +12 -7
- data/lib/flapjack/data/migration.rb +121 -0
- data/lib/flapjack/gateways/jabber.rb +3 -2
- data/lib/flapjack/gateways/jsonapi.rb +1 -1
- data/lib/flapjack/gateways/jsonapi/check_presenter.rb +1 -0
- data/lib/flapjack/gateways/jsonapi/contact_methods.rb +2 -8
- data/lib/flapjack/gateways/pagerduty.rb +1 -1
- data/lib/flapjack/gateways/web.rb +1 -1
- data/lib/flapjack/notifier.rb +1 -1
- data/lib/flapjack/pikelet.rb +2 -2
- data/lib/flapjack/processor.rb +1 -1
- data/lib/flapjack/redis_pool.rb +9 -2
- data/lib/flapjack/version.rb +1 -1
- data/spec/lib/flapjack/data/entity_check_spec.rb +2 -1
- data/spec/lib/flapjack/data/entity_spec.rb +14 -83
- data/spec/lib/flapjack/data/event_spec.rb +31 -0
- data/spec/lib/flapjack/redis_pool_spec.rb +2 -0
- data/spec/service_consumers/pacts/flapjack-diner_v1.0.json +2573 -2573
- data/tasks/entities.rake +6 -3
- metadata +3 -2
data/tasks/entities.rake
CHANGED
@@ -11,7 +11,10 @@ FLAPJACK_ENV = ENV['FLAPJACK_ENV'] || 'production'
|
|
11
11
|
namespace :entities do
|
12
12
|
|
13
13
|
def redis
|
14
|
-
@redis
|
14
|
+
return @redis unless @redis.nil?
|
15
|
+
@redis = Redis.new(@redis_config.merge(:driver => :hiredis))
|
16
|
+
Flapjack::Data::Migration.migrate_entity_check_data_if_required(:redis => @redis)
|
17
|
+
@redis
|
15
18
|
end
|
16
19
|
|
17
20
|
def orphaned_entity_names
|
@@ -127,8 +130,8 @@ namespace :entities do
|
|
127
130
|
if id.nil? || entity.nil?
|
128
131
|
id ||= SecureRandom.uuid
|
129
132
|
redis.multi
|
130
|
-
redis.
|
131
|
-
redis.hset(
|
133
|
+
redis.hset('all_entity_ids_by_name', name, id)
|
134
|
+
redis.hset('all_entity_names_by_id', id, name)
|
132
135
|
redis.exec
|
133
136
|
puts "Set id '#{id}' for entity #{name}'"
|
134
137
|
elsif entity.name.eql?(name)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flapjack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.0rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lindsay Holmwood
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-10-
|
14
|
+
date: 2014-10-17 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: dante
|
@@ -433,6 +433,7 @@ files:
|
|
433
433
|
- lib/flapjack/data/entity_check.rb
|
434
434
|
- lib/flapjack/data/event.rb
|
435
435
|
- lib/flapjack/data/message.rb
|
436
|
+
- lib/flapjack/data/migration.rb
|
436
437
|
- lib/flapjack/data/notification.rb
|
437
438
|
- lib/flapjack/data/notification_rule.rb
|
438
439
|
- lib/flapjack/data/semaphore.rb
|