fake_fb_marketing_api 0.0.6 → 0.0.7

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: 902b82f2118934fcc72d5f5f13eff04ecf047e2b
4
- data.tar.gz: 9810c731ff7749c5c5217ad5e770ab0cd9667567
3
+ metadata.gz: f8d1e431655d57600bffe673994689968e4c247f
4
+ data.tar.gz: ea464b681db3198051972930fa05f382fcc8ca50
5
5
  SHA512:
6
- metadata.gz: 796be2231683d601691c4660233945e8e295092ba61c07003a4c6312937b396b4b320d9687f63fd3c85f15eee50a8172120ffab8e0d3e6b13850f8bf7b89704f
7
- data.tar.gz: 97cffc4336e934983a1620a7b1431a1a061185a25e366a4a9404f7eb91d7fd28b0bdb240d0d53a5818fe72ee002f16b2e87cecc844101eb0dc8cf69ac2b74a10
6
+ metadata.gz: c964061bfe80289dfcd5bb18d4ba0deea394d6942d4cf6e9e31e8f649756bd679776bb800d02ead0910b6f0a907a53fd15ce58b9682863af4433e78a24ed7c72
7
+ data.tar.gz: 3d75651830a3a12a9d00d1d6764348bffdae972152addb59382d7d41eedea87320a380a51e1eb7abc142ee8dc6f1247be1cc65f5ae99c54de8bab5330236db45
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fake_fb_marketing_api (0.0.6)
4
+ fake_fb_marketing_api (0.0.7)
5
5
  sinatra (~> 2.0)
6
6
  we-call (~> 0.9)
7
7
 
@@ -66,7 +66,7 @@ GEM
66
66
  pry (>= 0.9.11)
67
67
  public_suffix (3.0.3)
68
68
  rack (2.0.6)
69
- rack-protection (2.0.5)
69
+ rack-protection (2.0.7)
70
70
  rack
71
71
  rack-test (1.1.0)
72
72
  rack (>= 1.0, < 3)
@@ -86,10 +86,10 @@ GEM
86
86
  rspec-support (~> 3.8.0)
87
87
  rspec-support (3.8.0)
88
88
  safe_yaml (1.0.4)
89
- sinatra (2.0.5)
89
+ sinatra (2.0.7)
90
90
  mustermann (~> 1.0)
91
91
  rack (~> 2.0)
92
- rack-protection (= 2.0.5)
92
+ rack-protection (= 2.0.7)
93
93
  tilt (~> 2.0)
94
94
  tilt (2.0.9)
95
95
  typhoeus (1.3.1)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FakeFbMarketingApi
4
- VERSION = '0.0.6'
4
+ VERSION = '0.0.7'
5
5
  end
@@ -44,48 +44,6 @@ module FakeFbMarketingApi
44
44
  proxy_post_to_fb(request, response)
45
45
  end
46
46
 
47
- post '/:ad_account_id/campaigns' do
48
- content_type :json
49
- case params[:objective]
50
- when 'BRAND_AWARENESS'
51
- {
52
- id: ENV['BRAND_AWARENESS_CAMPAIGN_ID']
53
- }.to_json
54
- when 'LINK_CLICKS'
55
- {
56
- id: ENV['LINK_CLICKS_CAMPAIGN_ID']
57
- }.to_json
58
- when 'VIDEO_VIEWS'
59
- {
60
- id: ENV['VIDEO_VIEWS_CAMPAIGN_ID']
61
- }.to_json
62
- when 'REACH'
63
- {
64
- id: ENV['REACH_CAMPAIGN_ID']
65
- }.to_json
66
- when 'POST_ENGAGEMENT'
67
- {
68
- id: ENV['POST_ENGAGEMENT_CAMPAIGN_ID']
69
- }.to_json
70
- when 'PAGE_LIKES'
71
- {
72
- id: ENV['PAGE_LIKES_CAMPAIGN_ID']
73
- }.to_json
74
- when 'CONVERSIONS_COUNT'
75
- {
76
- id: ENV['CONVERSIONS_COUNT_CAMPAIGN_ID']
77
- }.to_json
78
- when 'CONVERSIONS_FUNDRAISE'
79
- {
80
- id: ENV['CONVERSIONS_FUNDRAISE_CAMPAIGN_ID']
81
- }.to_json
82
- when 'CONVERSIONS'
83
- {
84
- id: ENV['CONVERSIONS_CAMPAIGN_ID']
85
- }.to_json
86
- end
87
- end
88
-
89
47
  get '/:graph_id/*' do
90
48
  content_type :json
91
49
  proxy_get_to_fb(request, response)
@@ -142,71 +142,6 @@ RSpec.describe FakeFbMarketingApi::Application do
142
142
  end
143
143
  end
144
144
 
145
- describe 'POST /:ad_account_id/campaigns' do
146
- it 'works for brand awareness' do
147
- objective = 'BRAND_AWARENESS'
148
-
149
- campaign = graph.put_connections("act_#{ENV['FACEBOOK_AD_ACCOUNT_ID']}", 'campaigns', budget_rebalance_flag: false, name: "#{objective} Test Campaign", objective: objective, status: 'ACTIVE')
150
-
151
- expect(campaign).to eq 'id' => ENV['BRAND_AWARENESS_CAMPAIGN_ID']
152
- end
153
-
154
- it 'works for link clicks' do
155
- objective = 'LINK_CLICKS'
156
-
157
- campaign = graph.put_connections("act_#{ENV['FACEBOOK_AD_ACCOUNT_ID']}", 'campaigns', budget_rebalance_flag: false, name: "#{objective} Test Campaign", objective: objective, status: 'ACTIVE')
158
-
159
- expect(campaign).to eq 'id' => ENV['LINK_CLICKS_CAMPAIGN_ID']
160
- end
161
-
162
- it 'works for video views' do
163
- objective = 'VIDEO_VIEWS'
164
-
165
- campaign = graph.put_connections("act_#{ENV['FACEBOOK_AD_ACCOUNT_ID']}", 'campaigns', budget_rebalance_flag: false, name: "#{objective} Test Campaign", objective: objective, status: 'ACTIVE')
166
-
167
- expect(campaign).to eq 'id' => ENV['VIDEO_VIEWS_CAMPAIGN_ID']
168
- end
169
-
170
- it 'works for reach' do
171
- objective = 'REACH'
172
-
173
- campaign = graph.put_connections("act_#{ENV['FACEBOOK_AD_ACCOUNT_ID']}", 'campaigns', budget_rebalance_flag: false, name: "#{objective} Test Campaign", objective: objective, status: 'ACTIVE')
174
-
175
- expect(campaign).to eq 'id' => ENV['REACH_CAMPAIGN_ID']
176
- end
177
-
178
- it 'works for post engagement' do
179
- objective = 'POST_ENGAGEMENT'
180
-
181
- campaign = graph.put_connections("act_#{ENV['FACEBOOK_AD_ACCOUNT_ID']}", 'campaigns', budget_rebalance_flag: false, name: "#{objective} Test Campaign", objective: objective, status: 'ACTIVE')
182
-
183
- expect(campaign).to eq 'id' => ENV['POST_ENGAGEMENT_CAMPAIGN_ID']
184
- end
185
-
186
- it 'works for page likes' do
187
- objective = 'PAGE_LIKES'
188
-
189
- campaign = graph.put_connections("act_#{ENV['FACEBOOK_AD_ACCOUNT_ID']}", 'campaigns', budget_rebalance_flag: false, name: "#{objective} Test Campaign", objective: objective, status: 'ACTIVE')
190
-
191
- expect(campaign).to eq 'id' => ENV['PAGE_LIKES_CAMPAIGN_ID']
192
- end
193
-
194
- it 'works for conversions' do
195
- objective = 'CONVERSIONS'
196
-
197
- campaign = graph.put_connections("act_#{ENV['FACEBOOK_AD_ACCOUNT_ID']}", 'campaigns', budget_rebalance_flag: false, name: "#{objective} Test Campaign", objective: objective, status: 'ACTIVE')
198
-
199
- expect(campaign).to eq 'id' => ENV['CONVERSIONS_CAMPAIGN_ID']
200
- end
201
- end
202
-
203
- describe 'GET /:ad_account_id/campaigns' do
204
- context 'when no campaigns have been created' do
205
- it 'returns nothing' do
206
- end
207
- end
208
- end
209
-
210
145
  describe 'GET /:graph_id/insights' do
211
146
  it 'passes through insight requests' do
212
147
  graph_id = Faker::Number.number(10)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_fb_marketing_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Menne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-02 00:00:00.000000000 Z
11
+ date: 2019-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler