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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9b5b7d4367ee302f2a1e925b08b24f946c5c778
4
- data.tar.gz: 105acef89d7636ed35fefecbf5e775f1d81f42d6
3
+ metadata.gz: b67f666b6fb6d9e6d937d9a2ebee90935cd77022
4
+ data.tar.gz: 5c54961c7aa8f176835aac44853b8fa44a4655cf
5
5
  SHA512:
6
- metadata.gz: 21555819445cc0def2c009775539fa497f927d81f635d57aa1b0a3f40a38cd344ca1b81fcbfb930e758d08689455c9f16b8ed4c58c200bbbebbac636ebd5de98
7
- data.tar.gz: a7f4ed37563e4eae82536c63e4770820621d91bc520b8bbbddf3381db3cac92303a99b20ba2c4ed4208e14f9a0e6dfcc781dbca5fd6d7da33bca97ac0b117366
6
+ metadata.gz: 5c7e0258eba97124a54800775ae07f33e8937603936ccfa57ba4c789a611fba4d93925fba7d777904de70c941fe9085e10998a1cf072c8180c292b874683df6e
7
+ data.tar.gz: 210a75546889f71518940d2a7dac133e285783d296e572f60f84ee52734921414ac0cd0edea9301b1b4021292b0c80ba14c5e84090ada68cc0df2f60a5c9adcf
@@ -1,3 +1,7 @@
1
+ ## 0.9.1 (April 24, 2017)
2
+ * Entity metadata should return actual attributes if present #61
3
+ * Support for crm3 and crm8 regions. #62
4
+
1
5
  ## 0.9.0 (March 13, 2017)
2
6
  * Adds Filters support to Query Criteria #60
3
7
  * Improve GUID attribute regex.
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module DynamicsCRM
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
@@ -434,19 +434,30 @@ describe DynamicsCRM::Client do
434
434
  end
435
435
  end
436
436
 
437
- describe "#determine_region" do
438
- context "Client receives only hostname" do
439
- it "return the correct region" do
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 "Client receives only organization_name" do
445
- it "return the correct region" do
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.0
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-03-13 00:00:00.000000000 Z
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.5.1
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