intercom-rails 0.2.7 → 0.2.8

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.
@@ -94,7 +94,7 @@ module IntercomRails
94
94
  end
95
95
 
96
96
  def user_hash
97
- OpenSSL::HMAC.hexdigest("sha256", secret, (user_details[:user_id] || user_details[:email]))
97
+ OpenSSL::HMAC.hexdigest("sha256", secret, (user_details[:user_id] || user_details[:email]).to_s)
98
98
  end
99
99
 
100
100
  def app_id
@@ -1,3 +1,3 @@
1
1
  module IntercomRails
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
@@ -63,6 +63,8 @@ class ScriptTagTest < MiniTest::Unit::TestCase
63
63
  IntercomRails.config.api_secret = 'abcd'
64
64
  script_tag = ScriptTag.new(:user_details => {:email => 'ben@intercom.io'}, :secret => '1234')
65
65
  assert_equal OpenSSL::HMAC.hexdigest("sha256", '1234', 'ben@intercom.io'), script_tag.intercom_settings[:user_hash]
66
+ script_tag = ScriptTag.new(:user_details => {:user_id => 5678}, :secret => '1234')
67
+ assert_equal OpenSSL::HMAC.hexdigest("sha256", '1234', '5678'), script_tag.intercom_settings[:user_hash]
66
68
  end
67
69
 
68
70
  def test_inbox_default_style
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intercom-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: