soapy_cake 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/soapy_cake/admin.rb +4 -0
- data/lib/soapy_cake/client.rb +1 -1
- data/lib/soapy_cake/request.rb +0 -4
- data/lib/soapy_cake/response.rb +4 -4
- data/lib/soapy_cake/version.rb +1 -1
- data/spec/lib/soapy_cake/admin_spec.rb +9 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bcf0067941e0d432e690af36ff8c322ceee13d4
|
4
|
+
data.tar.gz: acae806481ff9548ede98ca9e0a142662ac5226a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9175e5a10a5772f31f873135a7818d212d34d7d0078a48b9d25f5f8784ec54a34ae4c2c60f9fba316fc90a60d01332db1bff8c72ff29ba6ed64e92841aedeeb8
|
7
|
+
data.tar.gz: 8863619ff45ee977129f6eaea225703c63bbfb1d1605fe41ef14678fc3e18efcf90099d4e4d5763c686cc7c6670663712c7ca1c693d6db3b2f7e02b1e19d8a30
|
data/lib/soapy_cake/admin.rb
CHANGED
@@ -92,6 +92,10 @@ module SoapyCake
|
|
92
92
|
run Request.new(:admin, :signup, :affiliate, opts)
|
93
93
|
end
|
94
94
|
|
95
|
+
def decrypt_affiliate_link(opts = {})
|
96
|
+
run Request.new(:admin, :track, :decrypt_affiliate_link, opts)
|
97
|
+
end
|
98
|
+
|
95
99
|
def verticals(*)
|
96
100
|
run Request.new(:admin, :get, :verticals, {})
|
97
101
|
end
|
data/lib/soapy_cake/client.rb
CHANGED
@@ -21,7 +21,7 @@ module SoapyCake
|
|
21
21
|
url = "https://#{domain}#{request.path}"
|
22
22
|
body = HTTParty.post(url, headers: headers, body: request.xml).body
|
23
23
|
|
24
|
-
response = Response.new(body, request.
|
24
|
+
response = Response.new(body, %w(addedit track).include?(request.service))
|
25
25
|
response.time_offset = time_offset
|
26
26
|
response.collection
|
27
27
|
end
|
data/lib/soapy_cake/request.rb
CHANGED
data/lib/soapy_cake/response.rb
CHANGED
@@ -3,17 +3,17 @@ module SoapyCake
|
|
3
3
|
include Helper
|
4
4
|
|
5
5
|
attr_accessor :time_offset
|
6
|
-
attr_reader :body, :
|
6
|
+
attr_reader :body, :short_response
|
7
7
|
|
8
|
-
def initialize(body,
|
8
|
+
def initialize(body, short_response)
|
9
9
|
@body = body
|
10
|
-
@
|
10
|
+
@short_response = short_response
|
11
11
|
end
|
12
12
|
|
13
13
|
def collection
|
14
14
|
check_errors!
|
15
15
|
|
16
|
-
return typed_element(sax.at_depth(3).first) if
|
16
|
+
return typed_element(sax.at_depth(3).first) if short_response
|
17
17
|
|
18
18
|
sax.at_depth(5).map do |element|
|
19
19
|
typed_element(element)
|
data/lib/soapy_cake/version.rb
CHANGED
@@ -176,4 +176,13 @@ RSpec.describe SoapyCake::Admin do
|
|
176
176
|
it_behaves_like 'a cake admin method'
|
177
177
|
end
|
178
178
|
end
|
179
|
+
|
180
|
+
describe 'track service' do
|
181
|
+
let(:service) { :track }
|
182
|
+
|
183
|
+
describe '#decrypt_affiliate_link' do
|
184
|
+
let(:method) { :decrypt_affiliate_link }
|
185
|
+
it_behaves_like 'a cake admin method'
|
186
|
+
end
|
187
|
+
end
|
179
188
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soapy_cake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ad2games GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
229
|
version: '0'
|
230
230
|
requirements: []
|
231
231
|
rubyforge_project:
|
232
|
-
rubygems_version: 2.4.
|
232
|
+
rubygems_version: 2.4.6
|
233
233
|
signing_key:
|
234
234
|
specification_version: 4
|
235
235
|
summary: Simple client for the CAKE API
|