flapjack 0.7.4 → 0.7.5
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.
- data/CHANGELOG.md +2 -0
- data/lib/flapjack/data/contact.rb +4 -0
- data/lib/flapjack/version.rb +1 -1
- data/spec/lib/flapjack/data/contact_spec.rb +14 -1
- metadata +4 -4
data/CHANGELOG.md
CHANGED
@@ -337,6 +337,10 @@ module Flapjack
|
|
337
337
|
*['first_name', 'last_name', 'email'].collect {|f| [f, contact_data[f]]})
|
338
338
|
|
339
339
|
unless contact_data['media'].nil?
|
340
|
+
redis.del("contact_media:#{contact_id}")
|
341
|
+
redis.del("contact_media_intervals:#{contact_id}")
|
342
|
+
redis.del("contact_pagerduty:#{contact_id}")
|
343
|
+
|
340
344
|
contact_data['media'].each_pair {|medium, details|
|
341
345
|
case medium
|
342
346
|
when 'pagerduty'
|
data/lib/flapjack/version.rb
CHANGED
@@ -38,7 +38,13 @@ describe Flapjack::Data::Contact, :redis => true do
|
|
38
38
|
Flapjack::Data::Contact.add({'id' => '363',
|
39
39
|
'first_name' => 'Jane',
|
40
40
|
'last_name' => 'Janeley',
|
41
|
-
'email' => 'janej@example.com'
|
41
|
+
'email' => 'janej@example.com',
|
42
|
+
'media' => {
|
43
|
+
'email' => {
|
44
|
+
'address' => 'janej@example.com',
|
45
|
+
'interval' => 60
|
46
|
+
}
|
47
|
+
}},
|
42
48
|
:redis => @redis)
|
43
49
|
end
|
44
50
|
|
@@ -82,6 +88,13 @@ describe Flapjack::Data::Contact, :redis => true do
|
|
82
88
|
nr.should be_empty
|
83
89
|
end
|
84
90
|
|
91
|
+
it "updates a contact and clears their media settings" do
|
92
|
+
contact = Flapjack::Data::Contact.find_by_id('363', :redis => @redis)
|
93
|
+
|
94
|
+
contact.update('media' => {})
|
95
|
+
contact.media.should be_empty
|
96
|
+
end
|
97
|
+
|
85
98
|
it "updates a contact, does not clear notification rules" do
|
86
99
|
contact = Flapjack::Data::Contact.find_by_id('363', :redis => @redis)
|
87
100
|
contact.should_not be_nil
|
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: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-05-
|
14
|
+
date: 2013-05-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: dante
|
@@ -553,7 +553,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
553
553
|
version: '0'
|
554
554
|
segments:
|
555
555
|
- 0
|
556
|
-
hash:
|
556
|
+
hash: 4158008018986153398
|
557
557
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
558
558
|
none: false
|
559
559
|
requirements:
|
@@ -562,7 +562,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
562
562
|
version: '0'
|
563
563
|
segments:
|
564
564
|
- 0
|
565
|
-
hash:
|
565
|
+
hash: 4158008018986153398
|
566
566
|
requirements: []
|
567
567
|
rubyforge_project:
|
568
568
|
rubygems_version: 1.8.23
|