pipedrive_jetrockets 0.0.76 → 0.0.77
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.
- checksums.yaml +4 -4
- data/app/controllers/pipedrive_jetrockets/events_controller.rb +2 -14
- data/config/routes.rb +1 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 127bd9055a2144763b326e09ef51b49055877c10910645832bd85a7ff1604d89
|
4
|
+
data.tar.gz: e56f2cb740a0a00d01470137f9d8b3101f8b12d76c1b8fbdb54982ac1b483aa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54c19567ac8cee04e6cc421874aac588bda24e0c70c418b69031d0e33abfd811c0c81f705432f32732220fcaac3033ecf533238ddc16eb59238cd8478c88126e
|
7
|
+
data.tar.gz: 2e7a1dbeab3b38f2f9dab5279151a89ab95e40c16f3b66ce906a8b9647ce2ffb34705b38b1fc5353415c044fffe26f870ece139c9fb24b40fcfc4518b00779b2
|
@@ -1,20 +1,8 @@
|
|
1
1
|
module PipedriveJetrockets
|
2
2
|
class EventsController < ApplicationController
|
3
3
|
skip_before_action :verify_authenticity_token
|
4
|
-
def
|
5
|
-
ActiveSupport::Notifications.instrument "
|
6
|
-
end
|
7
|
-
|
8
|
-
def deal_added
|
9
|
-
ActiveSupport::Notifications.instrument "deal_added", {deal: PipedriveJetrockets::Deal.new(params[:current])}
|
10
|
-
end
|
11
|
-
|
12
|
-
def person_updated
|
13
|
-
ActiveSupport::Notifications.instrument "person_updated", {person: PipedriveJetrockets::Person.new(params[:current])}
|
14
|
-
end
|
15
|
-
|
16
|
-
def organization_updated
|
17
|
-
ActiveSupport::Notifications.instrument "organization_updated", {organization: PipedriveJetrockets::Organization.new(params[:current])}
|
4
|
+
def handle
|
5
|
+
ActiveSupport::Notifications.instrument "#{params[:object]}_#{params[:action]}", {params[:object] => "PipedriveJetrockets::#{params[:object].titleize}".constantize.new(params[:current])}
|
18
6
|
end
|
19
7
|
end
|
20
8
|
end
|
data/config/routes.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
2
|
scope '/pipedrive' do
|
3
|
-
post '
|
4
|
-
post '/deal_added' => 'pipedrive_jetrockets/events#deal_added'
|
5
|
-
post '/person_updated' => 'pipedrive_jetrockets/events#person_updated'
|
6
|
-
post '/organization_updated' => 'pipedrive_jetrockets/events#organization_updated'
|
3
|
+
post '/:object/:action' => 'pipedrive_jetrockets/events#handle'
|
7
4
|
end
|
8
5
|
end
|