epom 0.10.9 → 0.10.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e10530307cc028678fe4c567f0246237ae5cdac0
4
- data.tar.gz: 7eccbc030f1e993be29ed45ca76a687e879a5f39
3
+ metadata.gz: 4f23ff9405aa4f4bcf13b1b85e7cf162e085cd88
4
+ data.tar.gz: a43f26a3e0b74745f1cbbb5afdd7fe0be456b338
5
5
  SHA512:
6
- metadata.gz: e1689bf02a718e25201931e6658264b9e06193b9801128214a20d9368d69edb548b3a9d6a591ec6fadf199e8876293f237b605e31af0ab0c7b6fec343578b389
7
- data.tar.gz: 0fb6d7aea0b09588e3065d215451d5af3e74babcfb3cccf399c56cfdc4b1d060747e45783d5b1f1e6f109a4541bf17432beddbf460f48db59bf052245a0a2194
6
+ metadata.gz: bb7311f16615cc88c4914def1e15c5c797e6f8838972d0d15ebd92678d83ceba7a56db650c8992b6a08173e2ab78893a37f482f341b095b26106e1ff06378be4
7
+ data.tar.gz: 5d327b300c3b6bbfbc362f5775b39c8e398ffaf69513ac278619578987a26eb2935770336191600ab986c261be35575e459cfd1ab8ac2cc0a9d4cdf19c86395b
@@ -1,3 +1,3 @@
1
1
  module Epom
2
- VERSION = '0.10.9'
2
+ VERSION = '0.10.10'
3
3
  end
@@ -124,5 +124,16 @@ class AdvertiserTest < ActiveSupport::TestCase
124
124
  assert_equal "/rest-api/advertiser/#{ENV['advertiser_id']}/campaigns.do", Epom::Advertiser.replace_params_in_url('/rest-api/advertiser/ADVERTISER_ID/campaigns.do', {:advertiserId => ENV['advertiser_id']})
125
125
  end
126
126
 
127
+ test 'garbage_collector' do
128
+ if Epom.config.epom_server == 'https://n29.epom.com/'
129
+ advertisers = Epom::Advertiser.get_advertiser_permissions_for_user({})
130
+ advertisers.each do |advertiser|
131
+ if advertiser['shareType'] == "Is Owner" and advertiser['id'] != ENV['advertiser_id'].to_i
132
+ Epom::Advertiser.delete_advertiser({advertiserId: advertiser['id']})
133
+ end
134
+ end
135
+ end
136
+ end
137
+
127
138
  define_get_tests_auto(Epom::Advertiser)
128
139
  end
@@ -17,8 +17,11 @@ class AnalyticTest < ActiveSupport::TestCase
17
17
  body_params = {
18
18
  :displayIds => true,
19
19
  :range => 'CURRENT_MONTH',
20
- :groupBy => 'ADVERTISER,CAMPAIGN,BANNER,SITE,ZONE,PLACEMENT',
21
- # :eqLong => {'ADVERTISER' => ENV['advertiser_id'], 'SITE' => ENV['site_id']}
20
+ :groupBy => 'ADVERTISER,CAMPAIGN,BANNER,SITE,ZONE,PLACEMENT,CHANNEL,COUNTRY',
21
+ # :groupRange => 'HOUR',
22
+ # :eqLong => {'ADVERTISER' => 1252, 'SITE' => 1059},
23
+ :eqLong => {'CAMPAIGN' => 2679},
24
+ :eqStr => {'COUNTRY' => 'IN', 'CHANNEL' => 'Other'}
22
25
  }
23
26
 
24
27
  response = Epom::Analytic.analytics(url_params, body_params)
@@ -157,5 +157,14 @@ class SiteTest < ActiveSupport::TestCase
157
157
  # assert_not_instance_of Fixnum, response
158
158
  # end
159
159
 
160
+ test 'garbage_collector' do
161
+ if Epom.config.epom_server == 'https://n29.epom.com/'
162
+ sites = Epom::Site.get_sites({})
163
+ sites.each do |site|
164
+ Epom::Site.delete_site({siteId: site['id']}) unless site['id'] == ENV['site_id'].to_i
165
+ end
166
+ end
167
+ end
168
+
160
169
  define_get_tests_auto(Epom::Site)
161
170
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.9
4
+ version: 0.10.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Quintero
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-09-17 00:00:00.000000000 Z
13
+ date: 2015-11-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -217,19 +217,12 @@ test_files:
217
217
  - test/epom/analytic_test.rb
218
218
  - test/epom/advertiser_test.rb
219
219
  - test/epom/ad_unit_test.rb
220
- - test/dummy/config.ru
221
- - test/dummy/Rakefile
222
- - test/dummy/README.rdoc
223
220
  - test/dummy/public/favicon.ico
224
221
  - test/dummy/public/500.html
225
222
  - test/dummy/public/422.html
226
223
  - test/dummy/public/404.html
227
224
  - test/dummy/config/secrets.yml
228
225
  - test/dummy/config/routes.rb
229
- - test/dummy/config/environment.rb
230
- - test/dummy/config/database.yml
231
- - test/dummy/config/boot.rb
232
- - test/dummy/config/application.rb
233
226
  - test/dummy/config/locales/en.yml
234
227
  - test/dummy/config/initializers/wrap_parameters.rb
235
228
  - test/dummy/config/initializers/session_store.rb
@@ -242,6 +235,11 @@ test_files:
242
235
  - test/dummy/config/environments/test.rb
243
236
  - test/dummy/config/environments/production.rb
244
237
  - test/dummy/config/environments/development.rb
238
+ - test/dummy/config/environment.rb
239
+ - test/dummy/config/database.yml
240
+ - test/dummy/config/boot.rb
241
+ - test/dummy/config/application.rb
242
+ - test/dummy/config.ru
245
243
  - test/dummy/bin/setup
246
244
  - test/dummy/bin/rake
247
245
  - test/dummy/bin/rails
@@ -251,3 +249,5 @@ test_files:
251
249
  - test/dummy/app/controllers/application_controller.rb
252
250
  - test/dummy/app/assets/stylesheets/application.css
253
251
  - test/dummy/app/assets/javascripts/application.js
252
+ - test/dummy/Rakefile
253
+ - test/dummy/README.rdoc