dynamics_crm 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/dynamics_crm/client.rb +2 -3
- data/lib/dynamics_crm/metadata/entity_metadata.rb +1 -1
- data/lib/dynamics_crm/version.rb +1 -1
- data/spec/lib/client_spec.rb +17 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b67f666b6fb6d9e6d937d9a2ebee90935cd77022
|
4
|
+
data.tar.gz: 5c54961c7aa8f176835aac44853b8fa44a4655cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c7e0258eba97124a54800775ae07f33e8937603936ccfa57ba4c789a611fba4d93925fba7d777904de70c941fe9085e10998a1cf072c8180c292b874683df6e
|
7
|
+
data.tar.gz: 210a75546889f71518940d2a7dac133e285783d296e572f60f84ee52734921414ac0cd0edea9301b1b4021292b0c80ba14c5e84090ada68cc0df2f60a5c9adcf
|
data/CHANGELOG.md
CHANGED
data/lib/dynamics_crm/client.rb
CHANGED
@@ -13,7 +13,6 @@ require 'openssl'
|
|
13
13
|
require 'open-uri'
|
14
14
|
|
15
15
|
module DynamicsCRM
|
16
|
-
|
17
16
|
class Client
|
18
17
|
extend Forwardable
|
19
18
|
include XML::MessageBuilder
|
@@ -25,10 +24,12 @@ module DynamicsCRM
|
|
25
24
|
|
26
25
|
REGION = {
|
27
26
|
"crm9.dynamics.com" => "urn:crmgcc:dynamics.com",
|
27
|
+
"crm8.dynamics.com" => "urn:crmind:dynamics.com",
|
28
28
|
"crm7.dynamics.com" => "urn:crmjpn:dynamics.com",
|
29
29
|
"crm6.dynamics.com" => "urn:crmoce:dynamics.com",
|
30
30
|
"crm5.dynamics.com" => "urn:crmapac:dynamics.com",
|
31
31
|
"crm4.dynamics.com" => "urn:crmemea:dynamics.com",
|
32
|
+
"crm3.dynamics.com" => "urn:crmcan:dynamics.com",
|
32
33
|
"crm2.dynamics.com" => "urn:crmsam:dynamics.com",
|
33
34
|
"crm.dynamics.com" => "urn:crmna:dynamics.com",
|
34
35
|
}
|
@@ -358,7 +359,5 @@ module DynamicsCRM
|
|
358
359
|
end
|
359
360
|
@formatter
|
360
361
|
end
|
361
|
-
|
362
362
|
end
|
363
|
-
|
364
363
|
end
|
@@ -12,7 +12,7 @@ module DynamicsCRM
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def attributes
|
15
|
-
return if @attributes.is_a?(Array)
|
15
|
+
return @attributes if @attributes.is_a?(Array)
|
16
16
|
|
17
17
|
@attributes = document.get_elements("d:Attributes/d:AttributeMetadata").collect do |attr_metadata|
|
18
18
|
AttributeMetadata.new(attr_metadata)
|
data/lib/dynamics_crm/version.rb
CHANGED
data/spec/lib/client_spec.rb
CHANGED
@@ -434,19 +434,30 @@ describe DynamicsCRM::Client do
|
|
434
434
|
end
|
435
435
|
end
|
436
436
|
|
437
|
-
describe
|
438
|
-
context
|
439
|
-
it
|
437
|
+
describe '#determine_region' do
|
438
|
+
context 'Client receives only hostname' do
|
439
|
+
it 'North America region' do
|
440
|
+
client = DynamicsCRM::Client.new(hostname: 'xunda.crm.dynamics.com')
|
441
|
+
expect(client.region).to eq('urn:crmna:dynamics.com')
|
442
|
+
end
|
443
|
+
it 'South America region' do
|
440
444
|
client = DynamicsCRM::Client.new(hostname: 'xunda.api.crm2.dynamics.com')
|
441
445
|
expect(client.region).to eq('urn:crmsam:dynamics.com')
|
442
446
|
end
|
447
|
+
it 'Canada region' do
|
448
|
+
client = DynamicsCRM::Client.new(organization_name: 'xunda.crm3.dynamics.com')
|
449
|
+
expect(client.region).to eq('urn:crmcan:dynamics.com')
|
450
|
+
end
|
451
|
+
it 'India region' do
|
452
|
+
client = DynamicsCRM::Client.new(organization_name: 'xunda.crm8.dynamics.com')
|
453
|
+
expect(client.region).to eq('urn:crmind:dynamics.com')
|
454
|
+
end
|
443
455
|
end
|
444
|
-
context
|
445
|
-
it
|
456
|
+
context 'Client receives only organization_name' do
|
457
|
+
it 'return the correct region' do
|
446
458
|
client = DynamicsCRM::Client.new(organization_name: 'xunda')
|
447
459
|
expect(client.region).to eq('urn:crmna:dynamics.com')
|
448
460
|
end
|
449
461
|
end
|
450
462
|
end
|
451
|
-
|
452
463
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamics_crm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Heth
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mimemagic
|
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
268
|
version: '0'
|
269
269
|
requirements: []
|
270
270
|
rubyforge_project:
|
271
|
-
rubygems_version: 2.
|
271
|
+
rubygems_version: 2.6.11
|
272
272
|
signing_key:
|
273
273
|
specification_version: 4
|
274
274
|
summary: Ruby gem for integrating with MS Dynamics SOAP API
|