epom 0.4.1 → 0.5

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: def266e7ee4b89e6a604521ab0d430806e23fa35
4
- data.tar.gz: 87a1ccf423c0d9bf4dcec899b48380dfb548a88e
3
+ metadata.gz: 9d1aeea62d6468a7d47e5314bbef87b6cf5ce482
4
+ data.tar.gz: e9bf1571c0b1ac4000e66cb89fb90fa731472bb4
5
5
  SHA512:
6
- metadata.gz: 61b2808ed4f6fcafb60774755b319c3c68b17abaed3249e03b74ac42cb961373732d45189b2bcf6fb9cee0baff8dbadbf1cfffd1f33cffb330a1046b472f47a4
7
- data.tar.gz: abc2bfe5dff5390052e372061a0c9abbd5588bab805ae57ce76a7915dee67ec2c033fe507356323b3471076620585f7ea570c6f2b0fe573e8f50e4810e784d44
6
+ metadata.gz: a228bba67baa29469feb6f2b70b61481c5b2a2c959dc2399f7d1003b2dd3f931eae44a9294f6efecf77aa839ca4c34f7654186d58a3a4002d3dd6d0097191ea5
7
+ data.tar.gz: a47aa911961301f457e4bc2bfd2df08e6da06d0c413f175728fe1ac6d30f44db58ceda62fb2a7d042a2be5f8cd9d1e22a63878488032603825e39eeea5222e9a
@@ -36,8 +36,8 @@ module Epom
36
36
  }
37
37
  end
38
38
 
39
- def self.replace_params_in_url(url, urlp_arams)
40
- url.gsub!('ADVERTISER_ID', urlp_arams[:advertiserId].to_s) if url.include?('ADVERTISER_ID')
39
+ def self.replace_params_in_url(url, url_params)
40
+ url.gsub!('ADVERTISER_ID', url_params[:advertiserId].to_s) if url.include?('ADVERTISER_ID')
41
41
  url
42
42
  end
43
43
 
data/lib/epom/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Epom
2
- VERSION = '0.4.1'
2
+ VERSION = '0.5'
3
3
  end
@@ -83,5 +83,29 @@ class AdvertiserTest < ActiveSupport::TestCase
83
83
  response['id']
84
84
  end
85
85
 
86
+ test "update_advertiser" do
87
+ timestamp = Time.now.to_i * 1000
88
+ body_params = {
89
+ :hash => Epom.create_hash(Epom.create_hash(ENV['password']), timestamp),
90
+ :timestamp => timestamp,
91
+ :username => ENV['username'],
92
+ :id => ENV['advertiser_id'],
93
+ :name => "advertiser #{DateTime.now}",
94
+ :contactName => "advertiser contactName",
95
+ :contactEmail => "advertiser@gmail.com",
96
+ :description => "advertiser description"
97
+ }
98
+
99
+ response = Epom::Advertiser.update_advertiser({}, body_params)
100
+ assert_instance_of Hash, response
101
+ assert response['success']
102
+ assert_instance_of Fixnum, response['id']
103
+ response['id']
104
+ end
105
+
106
+ test "replace_params_in_url" do
107
+ 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']})
108
+ end
109
+
86
110
  define_get_tests_auto(Epom::Advertiser)
87
111
  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.4.1
4
+ version: '0.5'
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-06-01 00:00:00.000000000 Z
13
+ date: 2015-06-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails