bump core, add log output

This commit is contained in:
carlad 2015-12-04 13:08:14 +01:00
parent a7fa8f6a6f
commit a638aee0ff
3 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ruby '2.1.6' if ENV.key?('DYNO')
gem 's3', github: 'travis-ci/s3'
gem 'travis-core', github: 'travis-ci/travis-core'
gem 'travis-core', github: 'travis-ci/travis-core', branch: 'cd-add-first-logged-in'
gem 'travis-support', github: 'travis-ci/travis-support'
gem 'travis-config', '~> 0.1.0'
gem 'travis-sidekiqs', github: 'travis-ci/travis-sidekiqs', require: nil

View File

@ -50,7 +50,8 @@ GIT
GIT
remote: git://github.com/travis-ci/travis-core.git
revision: 6ce83e05afc07d412195d226b77a896e2b652146
revision: a89fdc039713ff20a0a62c0fcd35b03d042a23a8
branch: cd-add-first-logged-in
specs:
travis-core (0.0.1)
actionmailer (~> 3.2.19)
@ -322,7 +323,7 @@ GEM
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.45)
tzinfo (0.3.46)
unicorn (4.8.3)
kgio (~> 2.6)
rack

View File

@ -163,6 +163,7 @@ class Travis::Api::App
puts "******** This is the first log in for " + user.login + " **********"
# update user
timestamp = Time.now
puts "Updating first_logged_in_at with " + timestamp
user.update_attributes(first_logged_in_at: timestamp)
# send event to customer.io
customerio = Customerio::Client.new(Travis.config.customerio.site_id, Travis.config.customerio.api_key, :json => true)
@ -175,6 +176,7 @@ class Travis::Api::App
:github_id => user.github_id,
:education => user.education,
:first_logged_in_at => timestamp.to_i}
puts "Sending payload to Customer.io: " + payload
customerio.identify(payload)
end