ffcrm_endpoint 0.1.1 → 0.1.2
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWUxNTZmYWYwNTNkMGY4YmJjNTBiZjIxNjFjMzlmMGFmYzAzZTBkMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
7
|
-
|
6
|
+
MDNhZjkxODYxN2U3ZjkxNmRlMmQzYjllNWVkOGNlZTUzMmMwYTJjZA==
|
7
|
+
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjBhOTI2YWM3ZGE4ZjRkYzA5YjIyYTNhYzE1ZjIxMTEwY2ZmN2M2NWFhZTJm
|
10
|
+
YjNiMTBmYTk1N2ViNGRjZTM4MDhhZTQ1ODczNDBkZDNiMjZkZDQyODRiZGZm
|
11
|
+
NTFmMGZlM2NhYjc1ODgwNThjZGEyNjkxZmViODVlOGFhMDJlMGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
M2I5MTEyOTJjN2M0Y2FmMDZkY2JkZWNjODU0MzU5ZTRkZTAxZmNiMDE0NmE1
|
14
|
+
YTNkNThiYjcyNWExZmZlZGViOGE4NDA1M2VhYzEzMmQzYzdlZTZiOGViMjM1
|
15
|
+
NTdkYWIyMDk3MzBmODk5MTg3MDg5YjMzNzNjZWE5ZmZjZmM0ZjA=
|
@@ -6,13 +6,14 @@ module FfcrmEndpoint
|
|
6
6
|
|
7
7
|
class Endpoint
|
8
8
|
|
9
|
-
attr_accessor :params
|
9
|
+
attr_accessor :request, :params
|
10
10
|
cattr_accessor :klasses do
|
11
11
|
[]
|
12
12
|
end
|
13
13
|
|
14
|
-
def initialize(
|
15
|
-
@
|
14
|
+
def initialize(request)
|
15
|
+
@request = request
|
16
|
+
@params = request.params
|
16
17
|
raise EndpointNoActionError, "No action defined." unless params[:klass_name].present?
|
17
18
|
end
|
18
19
|
|
@@ -20,14 +21,14 @@ module FfcrmEndpoint
|
|
20
21
|
# The main function to process the incoming data.
|
21
22
|
# It delegates to the process function in your custom endpoint class.
|
22
23
|
def process
|
23
|
-
klass.new(
|
24
|
+
klass.new(request).process
|
24
25
|
end
|
25
26
|
|
26
27
|
#
|
27
28
|
# The authentication method is called by the endpoint controller before 'process' is run.
|
28
29
|
# 'process' will only be called if authenticate returns true
|
29
30
|
def authenticate
|
30
|
-
klass.new(
|
31
|
+
klass.new(request).authenticate == true
|
31
32
|
end
|
32
33
|
|
33
34
|
protected
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffcrm_endpoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Kenworthy
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
version: '0'
|
158
158
|
requirements: []
|
159
159
|
rubyforge_project:
|
160
|
-
rubygems_version: 2.
|
160
|
+
rubygems_version: 2.0.3
|
161
161
|
signing_key:
|
162
162
|
specification_version: 4
|
163
163
|
summary: Enables Fat Free CRM to receive webhooks
|