intercom-rails 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,7 +30,7 @@ module IntercomRails
30
30
  # ) %>
31
31
  def intercom_script_tag(user_details, options={})
32
32
  if options[:secret]
33
- secret_string = "#{options[:secret]}#{user_details[:id].blank? ? user_details[:email] : user_details[:id]}"
33
+ secret_string = "#{options[:secret]}#{user_details[:user_id].blank? ? user_details[:email] : user_details[:user_id]}"
34
34
  user_details[:user_hash] = Digest::SHA1.hexdigest(secret_string)
35
35
  end
36
36
  intercom_settings = user_details.merge({:widget => options[:widget]}).with_indifferent_access
@@ -1,3 +1,3 @@
1
1
  module IntercomRails
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -24,7 +24,7 @@ class IntercomRailsTest < MiniTest::Unit::TestCase
24
24
 
25
25
  def test_secure_mode
26
26
  assert_match(/.user_hash.\s*:\s*"#{Digest::SHA1.hexdigest('abcdefgh' + 'ciaran@intercom.io')}"/, intercom_script_tag({:email => "ciaran@intercom.io"}, {:secret => 'abcdefgh'}))
27
- assert_match(/.user_hash.\s*:\s*"#{Digest::SHA1.hexdigest('abcdefgh' + '1234')}"/, intercom_script_tag({:id => 1234}, {:secret => 'abcdefgh'}))
28
- assert_match(/.user_hash.\s*:\s*"#{Digest::SHA1.hexdigest('abcdefgh' + '1234')}"/, intercom_script_tag({:id => 1234, :email => "ciaran@intercom.io"}, {:secret => 'abcdefgh'}))
27
+ assert_match(/.user_hash.\s*:\s*"#{Digest::SHA1.hexdigest('abcdefgh' + '1234')}"/, intercom_script_tag({:user_id => 1234}, {:secret => 'abcdefgh'}))
28
+ assert_match(/.user_hash.\s*:\s*"#{Digest::SHA1.hexdigest('abcdefgh' + '1234')}"/, intercom_script_tag({:user_id => 1234, :email => "ciaran@intercom.io"}, {:secret => 'abcdefgh'}))
29
29
  end
30
30
  end
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.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-08-14 00:00:00.000000000 Z
14
+ date: 2012-08-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -93,12 +93,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
93
  - - ! '>='
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
+ segments:
97
+ - 0
98
+ hash: -1146691025025650591
96
99
  required_rubygems_version: !ruby/object:Gem::Requirement
97
100
  none: false
98
101
  requirements:
99
102
  - - ! '>='
100
103
  - !ruby/object:Gem::Version
101
104
  version: '0'
105
+ segments:
106
+ - 0
107
+ hash: -1146691025025650591
102
108
  requirements: []
103
109
  rubyforge_project: intercom-rails
104
110
  rubygems_version: 1.8.23