actv 1.3.9 → 1.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/actv/client.rb +1 -1
- data/lib/actv/version.rb +1 -1
- data/spec/actv/client_spec.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 20c50e310c4df374ee2858a1f743702ed6bd4193
|
|
4
|
+
data.tar.gz: 892e673139790c64f8d606b2aaa506d9fd597793
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5ee6bd214e3fd2636211100664e2e0ee78fd9f2d960c7bf1767645c1405e6f98ba74f7c095a7ae13fcb37fbe44776b5f3ec3fb0a688316d09a8df67dc0deb50b
|
|
7
|
+
data.tar.gz: 6b06d11cc2c4e0edbf7a86da47cada7bd718f4e83ef3020ceaca4f2af5b534665bd4af1b942eec27383cf95f636842b1d4f2329531055a0ac9fcd9c7046f3962
|
data/lib/actv/client.rb
CHANGED
|
@@ -155,7 +155,7 @@ module ACTV
|
|
|
155
155
|
def article id, params={}
|
|
156
156
|
request_string = "/v2/assets/#{id}"
|
|
157
157
|
is_preview, params = params_include_preview? params
|
|
158
|
-
request_string
|
|
158
|
+
request_string += '/preview' if is_preview
|
|
159
159
|
|
|
160
160
|
response = get "#{request_string}.json", params
|
|
161
161
|
|
data/lib/actv/version.rb
CHANGED
data/spec/actv/client_spec.rb
CHANGED
|
@@ -165,7 +165,7 @@ describe ACTV::Client do
|
|
|
165
165
|
oauth_token_secret: "OS"}
|
|
166
166
|
end
|
|
167
167
|
|
|
168
|
-
context 'find
|
|
168
|
+
context 'find article' do
|
|
169
169
|
before do
|
|
170
170
|
stub_request(:get, "http://api.amp.active.com/v2/assets/asset_id.json").
|
|
171
171
|
to_return(body: fixture("valid_article.json"), headers: { content_type: "application/json; charset=utf-8" })
|
|
@@ -176,14 +176,14 @@ describe ACTV::Client do
|
|
|
176
176
|
end
|
|
177
177
|
end
|
|
178
178
|
|
|
179
|
-
context 'preview
|
|
179
|
+
context 'preview article' do
|
|
180
180
|
context 'when preview is true' do
|
|
181
181
|
before do
|
|
182
|
-
stub_request(:get, "http://api.amp.active.com/preview.json").
|
|
182
|
+
stub_request(:get, "http://api.amp.active.com/v2/assets/asset_id/preview.json").
|
|
183
183
|
to_return(body: fixture("valid_article.json"), headers: { content_type: "application/json; charset=utf-8" })
|
|
184
184
|
end
|
|
185
185
|
|
|
186
|
-
it 'returns an
|
|
186
|
+
it 'returns an article' do
|
|
187
187
|
expect(client.article 'asset_id', preview: 'true').to be_an ACTV::Article
|
|
188
188
|
end
|
|
189
189
|
end
|
|
@@ -194,7 +194,7 @@ describe ACTV::Client do
|
|
|
194
194
|
to_return(body: fixture("valid_article.json"), headers: { content_type: "application/json; charset=utf-8" })
|
|
195
195
|
end
|
|
196
196
|
|
|
197
|
-
it 'returns an
|
|
197
|
+
it 'returns an article' do
|
|
198
198
|
expect(client.article 'asset_id', preview: 'false').to be_an ACTV::Article
|
|
199
199
|
end
|
|
200
200
|
end
|