crowdmob 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/base.rb +5 -6
- data/lib/campaigns.rb +1 -1
- data/lib/installs.rb +5 -5
- metadata +1 -1
data/lib/base.rb
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
module CrowdMob
|
2
2
|
class << self
|
3
|
-
attr_accessor :
|
3
|
+
attr_accessor :env
|
4
4
|
end
|
5
5
|
|
6
|
-
|
7
|
-
@base_url = 'http://deals.mobstaging.com'
|
6
|
+
@env = :development
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
def self.base_url
|
9
|
+
@env == :production ? 'http://deals.crowdmob.com' : 'http://deals.mobstaging.com'
|
10
|
+
end
|
12
11
|
end
|
data/lib/campaigns.rb
CHANGED
@@ -81,7 +81,7 @@ end
|
|
81
81
|
# You can run this script from the command line to see a working example of
|
82
82
|
# server-to-server integration.
|
83
83
|
if __FILE__ == $0
|
84
|
-
CrowdMob.
|
84
|
+
CrowdMob.env = :development
|
85
85
|
CrowdMob::Campaigns.organization_secret_key = '9cbfbe10e13f2a30cb6509ef0e09445b'
|
86
86
|
CrowdMob::Campaigns.organization_permalink = 'crowdmob'
|
87
87
|
|
data/lib/installs.rb
CHANGED
@@ -15,11 +15,11 @@ module CrowdMob::Installs
|
|
15
15
|
end
|
16
16
|
|
17
17
|
# When you registered your app with CrowdMob, you got an app secret key and
|
18
|
-
#
|
18
|
+
# permalink:
|
19
19
|
@app_secret_key = '5bb75e8dd6300cadcdd07fa2c46a3c10'
|
20
20
|
@app_permalink = 'lulzio'
|
21
21
|
|
22
|
-
# If you didn't record your app's secret key and permalink when you
|
22
|
+
# If you didn't record your app's secret key and permalink when you
|
23
23
|
# registered your app with CrowdMob, you can find it on your app's page on
|
24
24
|
# CrowdMob's server. In this example, our app is located here on CrowdMob's
|
25
25
|
# staging server:
|
@@ -70,8 +70,8 @@ module CrowdMob::Installs
|
|
70
70
|
|
71
71
|
# Check for a 200 HTTP status code. This code denotes successful install
|
72
72
|
# tracking.
|
73
|
-
puts "HTTP status code: #{response.code}"
|
74
|
-
puts "CrowdMob internal (action) status code: #{json['action_status']}"
|
73
|
+
# puts "HTTP status code: #{response.code}"
|
74
|
+
# puts "CrowdMob internal (action) status code: #{json['action_status']}"
|
75
75
|
|
76
76
|
# This table explains what the different status code combinations
|
77
77
|
# denote:
|
@@ -91,7 +91,7 @@ end
|
|
91
91
|
# You can run this script from the command line to see a working example of
|
92
92
|
# server-to-server integration.
|
93
93
|
if __FILE__ == $0
|
94
|
-
CrowdMob.
|
94
|
+
CrowdMob.env = :development
|
95
95
|
CrowdMob::Installs.app_secret_key = '5bb75e8dd6300cadcdd07fa2c46a3c10'
|
96
96
|
CrowdMob::Installs.app_permalink = 'lulzio'
|
97
97
|
|