Skip to content

Commit

Permalink
Updating user-agent generator to use basename.
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimkin committed Nov 26, 2013
1 parent 505122a commit e771b39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions ads_common/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
0.9.5:
- Updated user-agent generation for default string.

0.9.4:
- Updated to Signet ~> 0.5.0.
Expand Down
4 changes: 2 additions & 2 deletions ads_common/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ task :default => [:build, :test]

desc 'Package the Common library into a gem file.'
task :build do
result = system('/bin/env gem build google-ads-common.gemspec')
result = system('/usr/bin/env gem build google-ads-common.gemspec')
raise 'Build failed.' unless result
end

Expand All @@ -38,6 +38,6 @@ end

desc 'Run tests coverage tool.'
task :coverage do
result = system('/bin/env ruby test/coverage.rb')
result = system('/usr/bin/env ruby test/coverage.rb')
raise 'Coverage run failed.' unless result
end
2 changes: 1 addition & 1 deletion ads_common/lib/ads_common/credential_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def set_credential(credential, value)

# Generates string for UserAgent to put into headers.
def generate_user_agent(extra_ids = [], agent_app = nil)
agent_app ||= $0
agent_app ||= File.basename($0)
agent_data = extra_ids
agent_data << 'Common-Ruby/%s' % AdsCommon::ApiConfig::CLIENT_LIB_VERSION
agent_data << 'Savon/%s' % Savon::VERSION
Expand Down

0 comments on commit e771b39

Please sign in to comment.