flapjack 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,7 @@
1
1
  ## Flapjack Changelog
2
2
 
3
+ # 0.7.5 - 2013-05-20
4
+ - Bug: Removal of contact media via POST /contacts is not working gh-175 (@ali-graham)
3
5
  # 0.7.4 - 2013-05-16
4
6
  - Bug: Event counter values are strings, not integers gh-173 (@auxesis)
5
7
 
@@ -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'
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  module Flapjack
4
- VERSION = "0.7.4"
4
+ VERSION = "0.7.5"
5
5
  end
@@ -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
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-16 00:00:00.000000000 Z
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: 876014140940183775
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: 876014140940183775
565
+ hash: 4158008018986153398
566
566
  requirements: []
567
567
  rubyforge_project:
568
568
  rubygems_version: 1.8.23