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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28970c0b6e3d5855784d0047bcf6d1ffe29dfb3e6a69cfe5090b9b180667c4d6
4
- data.tar.gz: 1a4fefbca4de5ae2d1c5d9aed1123819a3b3f2d5499320ca9c583279630dfee7
3
+ metadata.gz: 127bd9055a2144763b326e09ef51b49055877c10910645832bd85a7ff1604d89
4
+ data.tar.gz: e56f2cb740a0a00d01470137f9d8b3101f8b12d76c1b8fbdb54982ac1b483aa3
5
5
  SHA512:
6
- metadata.gz: c4882bace1b677f0d0fa508ab67c0eadcd3425f7088d5186350a3cbedacca5f02f39185108b52e9829f0ec729962d4df776c29c499ee7a1b317a34ea4cf86d79
7
- data.tar.gz: '083f1ebc6e2469ae29077a3e793ae2d9f3fa53e1471ca7c817e6d5da013ab27fa600873d3189e03f16702d12b5ceebc9e22b4848c75ca24d9c85ec8edec49bb4'
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 deal_updated
5
- ActiveSupport::Notifications.instrument "deal_updated", {deal: PipedriveJetrockets::Deal.new(params[:current])}
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 '/deal_updated' => 'pipedrive_jetrockets/events#deal_updated'
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipedrive_jetrockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.76
4
+ version: 0.0.77
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agafonov Maksim