activeforce 2.1.0 → 2.1.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: 40cd43287bcdfaaef4fa50df102138f130a89e67
4
- data.tar.gz: 594cfa254c3de46a59d6147f54766fb2f15c545a
3
+ metadata.gz: e5be44027a755de63755da1855edef9cccbebf72
4
+ data.tar.gz: e398c3a9ca3121b9d643e6f87f7af917c2daeb4e
5
5
  SHA512:
6
- metadata.gz: '0746368d8c596ab1bcb2d8027eb34397f056ff9561fe2cc53122eb5e0157a8e0f0b1fdeb75783979559fd4ade832eb3046f03278a6149a223b63424071b524b3'
7
- data.tar.gz: be7fb8570ce67de4c0ef4a47e62b490ab91b3aa97d3ed9aaa2c98b08e4f35b0b4d5883ce09fc00d89df129e45d35c10fc2f2bc1aab115404827a7250dd319944
6
+ metadata.gz: 787dd1eb72b321b27fc03eae2e0983b4c1f7b4d647ae1cf49830478d23e460b91095d3f5be4dae97a3862927b7a3d1ceae64c71c01b969b6b3b34c8db36fd2d3
7
+ data.tar.gz: 3202443653176e1f775b1a0d7251a39ef590bc2e54e2c6e5c491eb55b9e9039c60acbd9e01db18f1e86110e97d8ae49a2392e1129940e77fc0617242193e76f5
@@ -1,3 +1,3 @@
1
1
  module Activeforce
2
- VERSION = '2.1.0'.freeze
2
+ VERSION = '2.1.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: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tushar Ranka