driftrock-service 0.4.7 → 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,9 +5,23 @@ module Driftrock
5
5
  class DriftrockApp
6
6
  include ::Driftrock::Service::DriftrockModel
7
7
  set_api_path "/dashboard_api/visitor/apps"
8
+
9
+ [:twitter, :facebook, :adwords, :conversion, :user].each do |data_type|
10
+ define_method("requires_#{data_type}_data?".to_sym) do
11
+ requirement = method("requirement_for_#{data_type}_data").call
12
+ requirement = requirement ? requirement.to_sym : :none
13
+ requirement == :requires
14
+ end
15
+ define_method("uses_#{data_type}_data?".to_sym) do
16
+ requirement = method("requirement_for_#{data_type}_data").call
17
+ requirement = requirement ? requirement.to_sym : :none
18
+ [:requires, :optional].include?(requirement)
19
+ end
20
+ end
21
+
8
22
  end
9
23
 
10
24
  end
11
25
  end
12
26
 
13
- end
27
+ end
@@ -1,5 +1,5 @@
1
1
  module Driftrock
2
2
  module Service
3
- VERSION = "0.4.7"
3
+ VERSION = "0.4.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: driftrock-service
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.7
5
+ version: 0.4.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - Max