activeforce 1.10.0 → 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69123682a6ac617075d98685ea650011159ccd3c
4
- data.tar.gz: c9e794312166984a669adb8751e02d24f372b952
3
+ metadata.gz: 5f21729ed39bc14842ed2ca9dd4f76e30d0457a2
4
+ data.tar.gz: c1529d65db793a5db03f15ae73d153e3cbb3d0bc
5
5
  SHA512:
6
- metadata.gz: a6ef3998eb4a67f84adf2c430b2e2e7885547360d21946b302021c8c966f9f76fc631079a71aecfefd08251966c87ac66e62ea2ca8facf20340a9085b408e708
7
- data.tar.gz: 57b871a7e9294e09710b09c29f24e3ab4d1ff9e6a33e4825d23007f4fcba0f73defc8b12a0e5257ed3f175e8363ad7689441a5bb47a3fdd220768f009e6c58c2
6
+ metadata.gz: ed40a4f4066b5aa97ba1509d56941814a0e2c4482d3bdefef281630c96ef1268cae58923e4c69bd836646d9d084704539544b008a9cbea4f52f17b5960445e05
7
+ data.tar.gz: a8703e1454c00b61618276035877637690a4830744cd98b270c7a2fb511ac23e87baa0eb71d6ded9cb40abb8701815c2b12837393568d1642958a98dabd6280a
@@ -1,3 +1,3 @@
1
1
  module Activeforce
2
- VERSION = '1.10.0'.freeze
2
+ VERSION = '1.10.1'.freeze
3
3
  end
@@ -14,7 +14,7 @@ module Salesforce
14
14
  Config.instance.session_id result[:session_id]
15
15
 
16
16
  host = URI.parse(result[:server_url]).host
17
- host_match = host.match(/(?<instance>[a-z0-9\-]+)\.(?<domain>(?:my\.)?salesforce\.com)/)
17
+ host_match = host.match(/(?<instance>[a-z0-9\-]+(?:\.[a-z]+\d+)?)\.(?<domain>(?:my\.)?salesforce\.com)/)
18
18
 
19
19
  Config.instance.server_instance host_match[:instance]
20
20
  Config.instance.server_domain host_match[:domain]
@@ -66,5 +66,22 @@ class Salesforce::AuthenticationTest < ActiveSupport::TestCase
66
66
  assert_equal "my.salesforce.com", Salesforce::Config.server_domain
67
67
  assert_equal "user_id", Salesforce::Config.user_id
68
68
  end
69
+
70
+ def test_generate_new_session_id__calls_connection_login__my_domain__sandbox
71
+ result = {
72
+ :session_id => "session_id",
73
+ :server_url => "https://awesome-2000--some-sandbox.na2001.my.salesforce.com/services/Soap/c/22.0/00DQ00000001LRX",
74
+ :user_id => "user_id"
75
+ }
76
+
77
+ Salesforce.connection.expects(:login).returns(result)
78
+
79
+ assert_equal "session_id", Salesforce::Authentication.generate_new_session_id
80
+ assert_equal "https://awesome-2000--some-sandbox.na2001.my.salesforce.com/services/Soap/c/22.0/00DQ00000001LRX", Salesforce::Config.soap_endpoint_url
81
+ assert_equal "session_id", Salesforce::Config.session_id
82
+ assert_equal "awesome-2000--some-sandbox.na2001", Salesforce::Config.server_instance
83
+ assert_equal "my.salesforce.com", Salesforce::Config.server_domain
84
+ assert_equal "user_id", Salesforce::Config.user_id
85
+ end
69
86
 
70
87
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeforce
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tushar Ranka