pact-support 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/pact/helpers.rb +4 -0
- data/lib/pact/reification.rb +1 -1
- data/lib/pact/support/version.rb +1 -1
- data/spec/lib/pact/helpers_spec.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65b471492f7129b35b4d6c22ea34734b4236a064
|
4
|
+
data.tar.gz: 731b9b98c849c17d19fae3efd98eec69bc953a0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a12e8a8345b77b732d66b356ff84d3ccb459011d40dbea405783b0c8aded30757615db3259fa97c226e44e58ce4a5402df8529d02abbbf92cae647b575bbd58
|
7
|
+
data.tar.gz: a92b1568e2e590d163967b103617483d7510ec4cab06c033aa79ec5694bb906cca02441ed71d68b877bf28aea76a7d9e0a9a627f7916f630dd249d1eb704b0af
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@ Do this to generate your change history
|
|
2
2
|
|
3
3
|
git log --pretty=format:' * %h - %s (%an, %ad)'
|
4
4
|
|
5
|
+
### 0.5.4 (4 November 2015)
|
6
|
+
|
7
|
+
* 2791b72 - [+AM] Add like_datetime_with_milisecods helper method (David Sevcik, Wed Nov 4 17:40:53 2015 +0100)
|
8
|
+
|
5
9
|
### 0.5.3 (8 September 2015)
|
6
10
|
|
7
11
|
* c7b1454 - Apply reification to ArrayLike flexible matcher. (Matt Fellows, Tue Sep 8 11:35:32 2015 +1000)
|
data/lib/pact/helpers.rb
CHANGED
@@ -37,6 +37,10 @@ module Pact
|
|
37
37
|
Pact::Term.new(generate: datetime, matcher: /^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)$/)
|
38
38
|
end
|
39
39
|
|
40
|
+
def like_datetime_with_miliseconds datetime
|
41
|
+
Pact::Term.new(generate: datetime, matcher: /^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d{3}([+-][0-2]\d:[0-5]\d|Z)$/)
|
42
|
+
end
|
43
|
+
|
40
44
|
def like_date date
|
41
45
|
Pact::Term.new(generate: date, matcher: /^\d{4}-[01]\d-[0-3]\d$/)
|
42
46
|
end
|
data/lib/pact/reification.rb
CHANGED
data/lib/pact/support/version.rb
CHANGED
@@ -67,6 +67,17 @@ module Pact
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
describe "#like_datetime_with_miliseconds" do
|
71
|
+
let(:datetime) { '2015-08-06T16:53:10.123+01:00' }
|
72
|
+
|
73
|
+
it "creates a Pact::Term with UUID matcher" do
|
74
|
+
expect(like_datetime_with_miliseconds(datetime)).to eq Pact::Term.new(
|
75
|
+
generate: datetime,
|
76
|
+
matcher: /^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d{3}([+-][0-2]\d:[0-5]\d|Z)$/
|
77
|
+
)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
70
81
|
describe "#like_date" do
|
71
82
|
let(:date) { '2015-08-06' }
|
72
83
|
|
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: 0.5.
|
4
|
+
version: 0.5.4
|
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: 2015-09
|
15
|
+
date: 2015-11-09 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: randexp
|