ffcrm_endpoint 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzM2OTUzMjJhYjc1YTJiOGMxMzFlMmQ3OGUwYjE3YmIyZmI4YjIzNA==
4
+ MWUxNTZmYWYwNTNkMGY4YmJjNTBiZjIxNjFjMzlmMGFmYzAzZTBkMg==
5
5
  data.tar.gz: !binary |-
6
- NjUyNmY4M2I0ZWFmY2U4OWEwZDA4ODc2ZTdhMjUxMTA2ZDYwM2M2Mw==
7
- SHA512:
6
+ MDNhZjkxODYxN2U3ZjkxNmRlMmQzYjllNWVkOGNlZTUzMmMwYTJjZA==
7
+ !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MjYzNDg1ODhjOGQ4MWFlMGE4NjZmZjA1ODAyNzMzMzhiNDEwN2YwMjZiNTMz
10
- OWJmM2UyNWNkZjE1MjMxOGY5Y2RhYWZiZWExN2RlMDE4NTI5YzdhNDZmYjU4
11
- MTNhMWM3Yzg1MzExMzIzN2FlNDk4MmQzNTQ1OGIwMjY5NDQ2MWM=
9
+ ZjBhOTI2YWM3ZGE4ZjRkYzA5YjIyYTNhYzE1ZjIxMTEwY2ZmN2M2NWFhZTJm
10
+ YjNiMTBmYTk1N2ViNGRjZTM4MDhhZTQ1ODczNDBkZDNiMjZkZDQyODRiZGZm
11
+ NTFmMGZlM2NhYjc1ODgwNThjZGEyNjkxZmViODVlOGFhMDJlMGM=
12
12
  data.tar.gz: !binary |-
13
- YjA5OTYzZWVhZWExZTU4NTM2NDI2Y2JmZWQyYzllOGE5OWYyNDIzYTMwMDI1
14
- MDZkOWY4OThiNTU5MDQ2YmM4NWY3ZjQ1NTBlNGFlMzQ5MzY2YTNhM2Q1ZjEz
15
- NTc1NDVhNWFhNTk5ODJkZmMxNmU2NDYwMWMwODg5Zjc4MDQ2MWM=
13
+ M2I5MTEyOTJjN2M0Y2FmMDZkY2JkZWNjODU0MzU5ZTRkZTAxZmNiMDE0NmE1
14
+ YTNkNThiYjcyNWExZmZlZGViOGE4NDA1M2VhYzEzMmQzYzdlZTZiOGViMjM1
15
+ NTdkYWIyMDk3MzBmODk5MTg3MDg5YjMzNzNjZWE5ZmZjZmM0ZjA=
@@ -18,7 +18,7 @@ module FfcrmEndpoint
18
18
  private
19
19
 
20
20
  def endpoint
21
- @endpoint ||= FfcrmEndpoint::Endpoint.new(params)
21
+ @endpoint ||= FfcrmEndpoint::Endpoint.new(request)
22
22
  end
23
23
 
24
24
  end
@@ -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(params)
15
- @params = params
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(params).process
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(params).authenticate == true
31
+ klass.new(request).authenticate == true
31
32
  end
32
33
 
33
34
  protected
@@ -1,3 +1,3 @@
1
1
  module FfcrmEndpoint
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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.1.11
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