gds_zendesk 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3e1c0d5d1ad1d3b842e4860e3170f3021286f23
4
- data.tar.gz: dd688c5003dd08a185acf92136a3bc236a819b48
3
+ metadata.gz: e953b3046d16eb42757c645c2d39aa161dee2cd1
4
+ data.tar.gz: e9cfdb28cdd23c1417716eb171b04b9ebff7170e
5
5
  SHA512:
6
- metadata.gz: 46bb8868425b2d79923f84b5b85fdd3461e506fce6f66c6118cc2c64b03fdd266260ffa1c4fc140477c4aad5abf10cd5f620958adb46b633eafc14eb0b6c2290
7
- data.tar.gz: 1edb6939c913bd673e5cdc0a959e244c9b9316a36d06f4fd46cd6f45ee543e516e086a5bd5e48a68044fa87e5f4d3796cd46f7672bdb82f20519ae75bff4a1df
6
+ metadata.gz: 46bad7c7e91d7890c37967dd1c13ce84591de97f2a353b380814eca29cd75ceca21bd5bacb16a84bec652d95356488192a202567f2bc394c51db6cd7bbcee8b4
7
+ data.tar.gz: 784efe7c47b57437dbb36223b61ce5ac2d53664b6c466f6d805fd9498b76b5a34378b49d342ef53c9cd1efd62931e95536e620589e96dc2e4b481bc5463c2056
@@ -1,3 +1,7 @@
1
+ # 2.2.0
2
+
3
+ * Allow the zendesk URL to be specified in the configuration
4
+
1
5
  # 2.1.0
2
6
 
3
7
  * Add test helper to stub Zendesk returning a 409
@@ -24,7 +24,7 @@ module GDSZendesk
24
24
  check_that_username_and_password_are_provided
25
25
 
26
26
  ZendeskAPI::Client.new { |config|
27
- config.url = "https://govuk.zendesk.com/api/v2/"
27
+ config.url = url
28
28
  config.username = username
29
29
  config.password = password
30
30
  config.logger = logger
@@ -49,8 +49,15 @@ module GDSZendesk
49
49
  @config_options[:password] || @config_options["password"]
50
50
  end
51
51
 
52
+ def url
53
+ @config_options[:url] || @config_options["url"]
54
+ end
55
+
52
56
  def defaults
53
- { logger: NullLogger.instance }
57
+ {
58
+ logger: NullLogger.instance,
59
+ url: "https://govuk.zendesk.com/api/v2/"
60
+ }
54
61
  end
55
62
  end
56
63
  end
@@ -1,3 +1,3 @@
1
1
  module GDSZendesk
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
@@ -35,6 +35,14 @@ module GDSZendesk
35
35
  expect(client(logger: custom_logger).config_options[:logger]).to eq(custom_logger)
36
36
  end
37
37
 
38
+ it "should use the default url if no url is provided" do
39
+ expect(client.config_options[:url]).to eq "https://govuk.zendesk.com/api/v2/"
40
+ end
41
+
42
+ it "should use the configured url if provided" do
43
+ expect(Client.new(username: "test_user", password: "test_pass", url: "https://example.com").config_options[:url]).to eq "https://example.com"
44
+ end
45
+
38
46
  it "should raise tickets in Zendesk" do
39
47
  self.valid_zendesk_credentials = valid_credentials
40
48
  post_stub = stub_zendesk_ticket_creation(some: "data")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds_zendesk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Benilov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-14 00:00:00.000000000 Z
11
+ date: 2016-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: null_logger