change_manager 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/change_manager/manager.rb +10 -2
- data/lib/change_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b9c9c513f77fb833860b3c26a319ecf24402b48
|
4
|
+
data.tar.gz: c9925e9f544d6e52a4334c74c9a4e38dc27cd456
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6550dbb12bcc851ee867b606ec6387b94c9ffcc7808e5b1acb240a77e85e79d13a5aad425e8cacd641e5526c2c301cd962d44d89004fb3a46278a6c69a0d038
|
7
|
+
data.tar.gz: 8f06f841a61202d21168f32581a751df349ea0344da2fdb5f77356ee6a358629d99b1da14528835eae93340a397229208eec21ff5c85ef0fa3650f64f557dc0a
|
@@ -10,9 +10,9 @@ module ChangeManager
|
|
10
10
|
puts 'notify method called'
|
11
11
|
unless Change.find(change_id).cancelled?
|
12
12
|
change = Change.find(change_id)
|
13
|
-
|
13
|
+
verified_changes = cancel_all_changes(group_similar_changes(change.owner, change.target))
|
14
14
|
mailer = ChangeManager::NotificationMailer
|
15
|
-
puts 'email sent' if mailer.send_email(mailer.construct_email(
|
15
|
+
puts 'email sent' if mailer.send_email(mailer.construct_email(verified_changes))
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -36,5 +36,13 @@ module ChangeManager
|
|
36
36
|
end
|
37
37
|
return similar_changes
|
38
38
|
end
|
39
|
+
|
40
|
+
def self.cancel_all_changes(verified_changes)
|
41
|
+
verified_changes.each do |change|
|
42
|
+
change.cancel
|
43
|
+
end
|
44
|
+
verified_changes
|
45
|
+
end
|
46
|
+
|
39
47
|
end
|
40
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: change_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Lawhorn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|