crowdmob 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/lib/base.rb +5 -6
  2. data/lib/campaigns.rb +1 -1
  3. data/lib/installs.rb +5 -5
  4. metadata +1 -1
data/lib/base.rb CHANGED
@@ -1,12 +1,11 @@
1
1
  module CrowdMob
2
2
  class << self
3
- attr_accessor :base_url
3
+ attr_accessor :env
4
4
  end
5
5
 
6
- # You can test against CrowdMob's staging server located at:
7
- @base_url = 'http://deals.mobstaging.com'
6
+ @env = :development
8
7
 
9
- # Eventually, you'll want to switch over to CrowdMob's production server
10
- # located at:
11
- # @base_url = 'https://deals.crowdmob.com'
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.base_url = 'http://deals.mobstaging.com'
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
- # a permalink:
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 regist
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.base_url = 'http://deals.mobstaging.com'
94
+ CrowdMob.env = :development
95
95
  CrowdMob::Installs.app_secret_key = '5bb75e8dd6300cadcdd07fa2c46a3c10'
96
96
  CrowdMob::Installs.app_permalink = 'lulzio'
97
97
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crowdmob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: