squcumber-postgres 0.0.9 → 0.0.10
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 +4 -4
- data/lib/squcumber-postgres/support/matchers.rb +12 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0038fa696e028950ec11458f8ed21529e54447eccfe61b299f0746554104877d'
|
4
|
+
data.tar.gz: f000dee57c42d995b90a55fc42a140421eb002222afb811cb9ab2a45bfc91cb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 327f4629ce093e6e96251720d00d8154ef57e39d1a6a73b53ab0fd1c3bfef6d8ac5100687c2bb47b3b27ea4441b4bd8c3c35c1154c021d3ce784a38050217790
|
7
|
+
data.tar.gz: b81e3a0f5cb8cc102d6d94ec4a93a44eddcb4500bef3ea4de7c2e12abf292f3b6a4153b53a17e46a9ed68305e598f8fa133271621905329e2e23622701fba7dd
|
@@ -18,8 +18,6 @@ module MatcherHelpers
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
def timetravel(date, i, method); i > 0 ? timetravel(date.send(method.to_sym), i - 1, method) : date; end
|
22
|
-
|
23
21
|
def convert_mock_values(mock_data)
|
24
22
|
mock_data.map do |entry|
|
25
23
|
entry.each do |key, value|
|
@@ -61,35 +59,35 @@ module MatcherHelpers
|
|
61
59
|
when /today/
|
62
60
|
Date.today
|
63
61
|
when /yesterday/
|
64
|
-
|
62
|
+
Date.today.prev_day
|
65
63
|
when /tomorrow/
|
66
|
-
|
64
|
+
Date.today.next_day
|
67
65
|
when /last month/
|
68
|
-
|
66
|
+
Date.today.prev_month
|
69
67
|
when /next month/
|
70
|
-
|
68
|
+
Date.today.next_month
|
71
69
|
when /last year/
|
72
|
-
|
70
|
+
Date.today.prev_year
|
73
71
|
when /next year/
|
74
|
-
|
72
|
+
Date.today.next_year
|
75
73
|
when /\s*\d+\s+month(s)?\s+ago\s*?/
|
76
74
|
number_of_months = value.match(/\d+/)[0].to_i
|
77
|
-
|
75
|
+
Date.today.prev_month(number_of_months)
|
78
76
|
when /\s*\d+\s+day(s)?\s+ago\s*/
|
79
77
|
number_of_days = value.match(/\d+/)[0].to_i
|
80
|
-
|
78
|
+
Date.today.prev_day(number_of_days)
|
81
79
|
when /\s*\d+\s+year(s)?\s+ago\s*/
|
82
80
|
number_of_years = value.match(/\d+/)[0].to_i
|
83
|
-
|
81
|
+
Date.today.prev_year(number_of_years)
|
84
82
|
when /\s*\d+\s+month(s)?\s+from now\s*?/
|
85
83
|
number_of_months = value.match(/\d+/)[0].to_i
|
86
|
-
|
84
|
+
Date.today.next_month(number_of_months)
|
87
85
|
when /\s*\d+\s+day(s)?\s+from now\s*/
|
88
86
|
number_of_days = value.match(/\d+/)[0].to_i
|
89
|
-
|
87
|
+
Date.today.next_day(number_of_days)
|
90
88
|
when /\s*\d+\s+year(s)?\s+from now\s*/
|
91
89
|
number_of_years = value.match(/\d+/)[0].to_i
|
92
|
-
|
90
|
+
Date.today.next_year(number_of_years)
|
93
91
|
else
|
94
92
|
placeholder
|
95
93
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: squcumber-postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefanie Grunwald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|