pact-support 1.2.4 → 1.2.5

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: 505c457138066d974c671baaa1c6bb2acb392f4f
4
- data.tar.gz: 954b045db5f5a74159575f19e1637284e9004fbb
3
+ metadata.gz: ceba97bd72023027c4e7580355cb8466ef517803
4
+ data.tar.gz: 1e795b9e00a0f8e8a434c11fcb0da831cf34c691
5
5
  SHA512:
6
- metadata.gz: 7f83d1ccac577363d7d3d7d2cb9ed486fb8fd948f7579832d9b231835a2b1bb2a3b7c735a773575c1ba7447de1b91f26b5dc1a67fffb3b29835169bc8ea04f39
7
- data.tar.gz: f5e089a3ba2268fd29fceca862559f375fcea55e4d5f332a751f039a3e1c8b83964f4bbcff167973b3f74ef03a8b384711099a6ba587895ed1d5a98a0894fc10
6
+ metadata.gz: c55960e2c5ccc2855f832d9d7fb9fb1d8cba364a528a9677531a58886cac598c8fdb49ae3a214b0ddc78d40dc825e7145939a30ebb148258202f0a59fd7ea939
7
+ data.tar.gz: 968254cef4d186916334e42f0bed7e1b80d4d25f9ad65688e9c06b5b96f1eb4d1bc215038874af77211aeaf1ff809ee5cb0b373c07fc30c4cf2613f4fb1cf733
@@ -1,6 +1,9 @@
1
- Do this to generate your change history
1
+ <a name="v1.2.5"></a>
2
+ ### v1.2.5 (2018-02-16)
2
3
 
3
- git log --pretty=format:' * %h - %s (%an, %ad)'
4
+ #### Bug Fixes
5
+
6
+ * replace backslashes in pact dir path with forward slashes ([a1b5013](/../../commit/a1b5013))
4
7
 
5
8
  ### 1.2.4 (2017-10-30)
6
9
  * 80bbdcc - fix: remove unused dependency on rack-test (Beth Skurrie, Mon Oct 30 09:52:22 2017 +1100)
@@ -1,15 +1,5 @@
1
1
  # Releasing
2
2
 
3
- 1. Increment the version in `lib/pact/support/version.rb`
4
- 2. Update the `CHANGELOG.md` using:
3
+ Run
5
4
 
6
- $ git log --pretty=format:' * %h - %s (%an, %ad)' vX.Y.Z..HEAD
7
-
8
- 3. Add files to git
9
-
10
- $ git add CHANGELOG.md lib/pact/support/version.rb
11
- $ git commit -m "chore(release): version $(ruby -r ./lib/pact/support/version.rb -e "puts Pact::Support::VERSION")"
12
-
13
- 3. Release:
14
-
15
- $ bundle exec rake release
5
+ script/release.sh [major|minor|patch] # default is minor
@@ -8,11 +8,15 @@ module Pact
8
8
  end
9
9
 
10
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))
11
+ File.join(windows_safe(pact_dir), file_name(consumer_name, provider_name, options))
12
12
  end
13
13
 
14
14
  def filenamify name
15
15
  name.downcase.gsub(/\s/, '_')
16
16
  end
17
+
18
+ def windows_safe(pact_dir)
19
+ pact_dir.gsub("\\", "/")
20
+ end
17
21
  end
18
22
  end
@@ -5,7 +5,7 @@ module Pact
5
5
 
6
6
  extend Matchers
7
7
 
8
- # Delegates to https://github.com/bethesque/pact-support/blob/master/lib/pact/matchers/matchers.rb#L25
8
+ # Delegates to https://github.com/pact-foundation/pact-support/blob/master/lib/pact/matchers/matchers.rb#L25
9
9
  def self.call expected, actual, options = {}
10
10
  diff expected, actual, options
11
11
  end
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Support
3
- VERSION = "1.2.4"
3
+ VERSION = "1.2.5"
4
4
  end
5
5
  end
@@ -34,4 +34,6 @@ Gem::Specification.new do |gem|
34
34
  gem.add_development_dependency 'hashie', '~> 2.0'
35
35
  gem.add_development_dependency 'activesupport'
36
36
  gem.add_development_dependency 'appraisal'
37
+ gem.add_development_dependency 'conventional-changelog', '~>1.3'
38
+ gem.add_development_dependency 'bump', '~> 0.5'
37
39
  end
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+ set -e
3
+
4
+ git checkout -- lib/pact/support/version.rb
5
+ bundle exec bump ${1:-minor} --no-commit
6
+ bundle exec rake generate_changelog
7
+ git add CHANGELOG.md lib/pact/support/version.rb
8
+ git commit -m "Releasing version $(ruby -r ./lib/pact/support/version.rb -e "puts Pact::Support::VERSION")"
9
+ bundle exec rake release
@@ -3,13 +3,22 @@ require 'pact/consumer_contract/file_name'
3
3
  module Pact
4
4
  describe FileName do
5
5
  describe "file_path" do
6
- let(:subject) { FileName.file_path 'foo', 'bar', 'tmp/pacts' }
6
+
7
+ subject { FileName.file_path 'foo', 'bar', 'tmp/pacts' }
7
8
  it { is_expected.to eq 'tmp/pacts/foo-bar.json' }
8
9
 
9
10
  context "when unique is true" do
10
- let(:subject) { FileName.file_path 'foo', 'bar', 'tmp/pacts', unique: true }
11
+ subject { FileName.file_path 'foo', 'bar', 'tmp/pacts', unique: true }
11
12
  it { is_expected.to match %r{tmp/pacts/foo-bar-\d+.json} }
12
13
  end
14
+
15
+ context "when the path includes backslashes" do
16
+ subject { FileName.file_path 'foo', 'bar', 'c:\tmp\pacts' }
17
+
18
+ it "changes them to forward slashes" do
19
+ expect(subject).to eq "c:/tmp/pacts/foo-bar.json"
20
+ end
21
+ end
13
22
  end
14
23
  end
15
24
  end
@@ -0,0 +1,5 @@
1
+ task :generate_changelog do
2
+ require 'pact/support/version'
3
+ require 'conventional_changelog'
4
+ ConventionalChangelog::Generator.new.generate! version: "v#{Pact::Support::VERSION}"
5
+ 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.2.4
4
+ version: 1.2.5
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-10-29 00:00:00.000000000 Z
15
+ date: 2018-02-16 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: randexp
@@ -210,6 +210,34 @@ dependencies:
210
210
  - - ">="
211
211
  - !ruby/object:Gem::Version
212
212
  version: '0'
213
+ - !ruby/object:Gem::Dependency
214
+ name: conventional-changelog
215
+ requirement: !ruby/object:Gem::Requirement
216
+ requirements:
217
+ - - "~>"
218
+ - !ruby/object:Gem::Version
219
+ version: '1.3'
220
+ type: :development
221
+ prerelease: false
222
+ version_requirements: !ruby/object:Gem::Requirement
223
+ requirements:
224
+ - - "~>"
225
+ - !ruby/object:Gem::Version
226
+ version: '1.3'
227
+ - !ruby/object:Gem::Dependency
228
+ name: bump
229
+ requirement: !ruby/object:Gem::Requirement
230
+ requirements:
231
+ - - "~>"
232
+ - !ruby/object:Gem::Version
233
+ version: '0.5'
234
+ type: :development
235
+ prerelease: false
236
+ version_requirements: !ruby/object:Gem::Requirement
237
+ requirements:
238
+ - - "~>"
239
+ - !ruby/object:Gem::Version
240
+ version: '0.5'
213
241
  description:
214
242
  email:
215
243
  - james.fraser@alumni.swinburne.edu
@@ -292,6 +320,7 @@ files:
292
320
  - lib/pact/term.rb
293
321
  - lib/tasks/pact.rake
294
322
  - pact-support.gemspec
323
+ - script/release.sh
295
324
  - script/update-pact-specification-v2
296
325
  - spec/fixtures/interaction-with-matching-rules.json
297
326
  - spec/integration/matching_rules_extract_and_merge_spec.rb
@@ -362,6 +391,7 @@ files:
362
391
  - spec/support/test_app_fail.json
363
392
  - spec/support/test_app_pass.json
364
393
  - spec/support/test_app_with_right_content_type_differ.json
394
+ - tasks/release.rake
365
395
  - tasks/spec.rake
366
396
  homepage: https://github.com/bethesque/pact-support
367
397
  licenses:
@@ -383,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
383
413
  version: '0'
384
414
  requirements: []
385
415
  rubyforge_project:
386
- rubygems_version: 2.6.12
416
+ rubygems_version: 2.4.5.2
387
417
  signing_key:
388
418
  specification_version: 4
389
419
  summary: Shared code for Pact gems