Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added no_website attribute to allow usage with test accounts #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions merchant-info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"merchantId": 12345,
"no_website": false,
"accountSampleUser": "",
"accountSampleAdWordsCID": 0
}
4 changes: 3 additions & 1 deletion ruby/content_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def self.load(base_path)

attr_accessor :path
attr_accessor :merchant_id
attr_accessor :no_website
attr_accessor :account_sample_user
attr_accessor :account_sample_adwords_cid

Expand All @@ -61,7 +62,7 @@ def is_mca()
end

def website_url()
if @website_url.nil?
if @website_url.nil? && (@no_website == false)
puts "Attempted to use website_url field of config before initialization."
puts "Please see config.rb for more information."
raise "Use of website_url config field before completing service_setup"
Expand All @@ -74,6 +75,7 @@ def initialize(path = nil, file = nil, options = nil)
@file = file
unless options.nil?
@merchant_id = options["merchantId"]
@no_website = options["no_website"]
@account_sample_user = options["accountSampleUser"]
@account_sample_adwords_cid = options["accountSampleAdWordsCID"]
end
Expand Down