pact 1.8.0 → 1.8.1

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.
@@ -2,6 +2,11 @@ Do this to generate your change history
2
2
 
3
3
  git log --pretty=format:' * %h - %s (%an, %ad)' vX.Y.Z..HEAD
4
4
 
5
+ ### 1.8.1 (15 June 2015)
6
+
7
+ * 207a33d - Escape HTML characters in description when generating 'a' tag IDs. https://github.com/bethesque/pact_broker/issues/28 (Beth, Mon Jun 15 17:39:02 2015 +1000)
8
+ * 2441e25 - hide the password in the pact uri to_s (lifei zhou, Mon May 4 19:21:40 2015 +1000)
9
+ * 60ba514 - added to_s method on PactUri for printing out the uri when running the test (lifei zhou, Sun May 3 17:20:28 2015 +1000)
5
10
 
6
11
  ### 1.8.0 (27 April 2015)
7
12
 
@@ -1,5 +1,6 @@
1
1
  require 'pact/shared/active_support_support'
2
2
  require 'pact/reification'
3
+ require 'cgi'
3
4
 
4
5
  module Pact
5
6
  module Doc
@@ -14,11 +15,12 @@ module Pact
14
15
 
15
16
  def id
16
17
  @id ||= begin
17
- if has_provider_state?
18
+ full_desc = if has_provider_state?
18
19
  "#{description} given #{interaction.provider_state}"
19
20
  else
20
21
  description
21
- end.gsub(/\s+/,'_')
22
+ end
23
+ CGI.escapeHTML(full_desc.gsub(/\s+/,'_'))
22
24
  end
23
25
  end
24
26
 
@@ -13,6 +13,15 @@ module Pact
13
13
  uri == other.uri &&
14
14
  options == other.options
15
15
  end
16
+
17
+ def to_s
18
+ if(options[:username])
19
+ URI(@uri).tap { |x| x.userinfo="#{options[:username]}:*****"}.to_s
20
+ else
21
+ @uri
22
+ end
23
+
24
+ end
16
25
  end
17
26
  end
18
27
  end
@@ -20,7 +20,7 @@ module Pact
20
20
 
21
21
  def honour_pactfile pact_uri, pact_json, options
22
22
  #TODO change puts to use output stream
23
- puts "Reading pact at #{pact_uri.uri}"
23
+ puts "Reading pact at #{pact_uri}"
24
24
  puts "Filtering interactions by: #{options[:criteria]}" if options[:criteria] && options[:criteria].any?
25
25
  consumer_contract = Pact::ConsumerContract.from_json(pact_json)
26
26
  ::RSpec.describe "Verifying a pact between #{consumer_contract.consumer.name} and #{consumer_contract.provider.name}", :pactfile_uri => pact_uri do
@@ -1,3 +1,3 @@
1
1
  module Pact
2
- VERSION = "1.8.0"
2
+ VERSION = "1.8.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2015-04-26 00:00:00.000000000 Z
16
+ date: 2015-06-15 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: randexp
@@ -423,7 +423,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
423
423
  version: '0'
424
424
  segments:
425
425
  - 0
426
- hash: -1768248205938494947
426
+ hash: -3727160494816609368
427
427
  required_rubygems_version: !ruby/object:Gem::Requirement
428
428
  none: false
429
429
  requirements:
@@ -432,7 +432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
432
432
  version: '0'
433
433
  segments:
434
434
  - 0
435
- hash: -1768248205938494947
435
+ hash: -3727160494816609368
436
436
  requirements: []
437
437
  rubyforge_project:
438
438
  rubygems_version: 1.8.23