Skip to content

Commit 6dcd439

Browse files
authored
Merge pull request #7 from fastruby/AUT-48-free-roadmap-notify-sales
AUT-48 Creating a FreeRoadmap object will notify sales team in slack
2 parents 96c3a45 + 7b5a778 commit 6dcd439

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

app/services/slack_notifier.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ def notify_new_contact(contact)
44
notifier.ping contact_message(contact)
55
end
66

7+
def notify_new_free_roadmap(free_roadmap)
8+
notifier = Slack::Notifier.new ENV["SLACK_ROADRUNNER_WEBHOOK_URL"]
9+
notifier.ping free_roadmap_message(free_roadmap)
10+
end
11+
712
private
813

914
def contact_message(contact)
@@ -22,4 +27,18 @@ def contact_message(contact)
2227
2328
TEXT
2429
end
30+
31+
def free_roadmap_message(free_roadmap)
32+
<<~TEXT
33+
Hello <!subteam^#{ENV["SLACK_GROUP_ID"]}>!\n
34+
#{free_roadmap.name.titleize} has submitted a request in our Free Roadmap form :tada: :
35+
Email: #{free_roadmap.email}
36+
Current Ruby Version: #{free_roadmap.current_ruby_version}
37+
Current Rails Version: #{free_roadmap.current_rails_version}
38+
Target Rails Version: #{free_roadmap.target_rails_version}
39+
40+
Cheers,\nYour OmbuLabs Robot!
41+
42+
TEXT
43+
end
2544
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module OmbuLabs
22
module Notifications
3-
VERSION = '0.1.3'
3+
VERSION = '0.1.4'
44
end
55
end

ombu_labs-notifications-0.1.4.gem

7 KB
Binary file not shown.

0 commit comments

Comments
 (0)