pact-support 1.1.8 → 1.2.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0063a9727fd3e913fe4aab45e7574f4ded7eb1b
|
4
|
+
data.tar.gz: 9913bc0345264724e39f62d15cb146f9cde98a6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15e54d2e99e2918cc6eec3104217d18af9652ad1fbc75bceb63f169cb6a0d842cbae5da866a220d5bbbca01c13191ffb521e4efb7b359547ef368faa54c7d9ab
|
7
|
+
data.tar.gz: 658fc9a19522eb0283ec0e4c42190bf75904c5bbf302a729c75e41f0cfafa627d3daeb616c3e1ab446db3d3836fc44a1fabf6051fc0cb7e148847ba3eeb5dcd6
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,9 @@ Do this to generate your change history
|
|
2
2
|
|
3
3
|
git log --pretty=format:' * %h - %s (%an, %ad)'
|
4
4
|
|
5
|
+
### 1.2.0 (2017-09-28)
|
6
|
+
* 4489d96 - feat(pact file name): allow unique pact file names to be generated (Beth Skurrie, Thu Sep 28 11:05:33 2017 +1000)
|
7
|
+
|
5
8
|
### 1.1.8 (2017-09-25)
|
6
9
|
* d4029ab - fix: use reified value when creating diff message for arrays (Beth Skurrie, Fri Sep 22 10:57:01 2017 +1000)
|
7
10
|
|
@@ -1,19 +1,18 @@
|
|
1
1
|
module Pact
|
2
|
-
|
3
2
|
module FileName
|
4
|
-
|
5
3
|
extend self
|
6
4
|
|
7
|
-
def file_name consumer_name, provider_name
|
8
|
-
"
|
5
|
+
def file_name consumer_name, provider_name, options = {}
|
6
|
+
pid = options[:unique] ? "-#{Process.pid}" : ''
|
7
|
+
"#{filenamify(consumer_name)}-#{filenamify(provider_name)}#{pid}.json"
|
9
8
|
end
|
10
9
|
|
11
|
-
def file_path consumer_name, provider_name, pact_dir = Pact.configuration.pact_dir
|
12
|
-
File.join(pact_dir, file_name(consumer_name, provider_name))
|
10
|
+
def file_path consumer_name, provider_name, pact_dir = Pact.configuration.pact_dir, options = {}
|
11
|
+
File.join(pact_dir, file_name(consumer_name, provider_name, options))
|
13
12
|
end
|
14
13
|
|
15
14
|
def filenamify name
|
16
15
|
name.downcase.gsub(/\s/, '_')
|
17
16
|
end
|
18
17
|
end
|
19
|
-
end
|
18
|
+
end
|
data/lib/pact/support/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'pact/consumer_contract/file_name'
|
2
|
+
|
3
|
+
module Pact
|
4
|
+
describe FileName do
|
5
|
+
describe "file_path" do
|
6
|
+
let(:subject) { FileName.file_path 'foo', 'bar', 'tmp/pacts' }
|
7
|
+
it { is_expected.to eq 'tmp/pacts/foo-bar.json' }
|
8
|
+
|
9
|
+
context "when unique is true" do
|
10
|
+
let(:subject) { FileName.file_path 'foo', 'bar', 'tmp/pacts', unique: true }
|
11
|
+
it { is_expected.to match %r{tmp/pacts/foo-bar-\d+.json} }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact-support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Fraser
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2017-09-
|
15
|
+
date: 2017-09-28 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: randexp
|
@@ -314,6 +314,7 @@ files:
|
|
314
314
|
- spec/lib/pact/consumer/request_spec.rb
|
315
315
|
- spec/lib/pact/consumer_contract/active_support_support_spec.rb
|
316
316
|
- spec/lib/pact/consumer_contract/consumer_contract_spec.rb
|
317
|
+
- spec/lib/pact/consumer_contract/file_name_spec.rb
|
317
318
|
- spec/lib/pact/consumer_contract/headers_spec.rb
|
318
319
|
- spec/lib/pact/consumer_contract/interaction_spec.rb
|
319
320
|
- spec/lib/pact/consumer_contract/pact_file_spec.rb
|
@@ -408,6 +409,7 @@ test_files:
|
|
408
409
|
- spec/lib/pact/consumer/request_spec.rb
|
409
410
|
- spec/lib/pact/consumer_contract/active_support_support_spec.rb
|
410
411
|
- spec/lib/pact/consumer_contract/consumer_contract_spec.rb
|
412
|
+
- spec/lib/pact/consumer_contract/file_name_spec.rb
|
411
413
|
- spec/lib/pact/consumer_contract/headers_spec.rb
|
412
414
|
- spec/lib/pact/consumer_contract/interaction_spec.rb
|
413
415
|
- spec/lib/pact/consumer_contract/pact_file_spec.rb
|