fanforce 0.2.9 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,6 +13,17 @@ module Fanforce::Utils
13
13
  end
14
14
 
15
15
  def valid_request?(params)
16
+ return false if !valid_fanforce_js_request?(params) and !valid_fanforce_request?(params) and !valid_install_request?(params) and !valid_uninstall_request?(params)
17
+ return true
18
+ end
19
+
20
+ def valid_fanforce_js_request?(params)
21
+ return false if !params.is_a?(Hash)
22
+ return false if is_blank?(params[:fanforce_id]) or is_blank?(params[:api_key])
23
+ return true
24
+ end
25
+
26
+ def valid_fanforce_request?(params)
16
27
  return false if !params.is_a?(Hash)
17
28
  return false if is_blank?(params[:fanforce_id])
18
29
  return false if is_blank?(params[:app_id]) and is_blank?(params[:behavior_id]) and is_blank?(params[:module_id]) and is_blank?(params[:widget_id])
@@ -1,3 +1,3 @@
1
1
  class Fanforce
2
- VERSION = "0.2.9"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: