squcumber-postgres 0.0.13 → 0.1.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '089d8a3f411ec32c7b5915819d3da2691b91404397c2601c0468a3bebb1eb3ec'
|
4
|
+
data.tar.gz: 9842daf920c36ea783ba5e381993972cf71d323be275f4f47fed75729af05359
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 698c9109d441bed70308522ed173a458ab78644127a56d610f1283bce68fe574a31a974873d1b303f97e01b5bc131e7d60c08b8e5be7fd6683302a5f473f66ea
|
7
|
+
data.tar.gz: 30cf3e31073c6fdf1fdc8d3051f19fde1c65545d75ad8b835d2535fe0332f3a2a92e59be22da5c72c1724a1e72d11ad287f7fe8986273016275139700d33de77
|
@@ -85,6 +85,12 @@ module MatcherHelpers
|
|
85
85
|
Date.today.prev_year
|
86
86
|
when /next year/
|
87
87
|
Date.today.next_year
|
88
|
+
when /\s*\d+\s+minute(s)?\s+ago\s*?/
|
89
|
+
number_of_minutes = value.match(/\d+/)[0].to_i
|
90
|
+
DateTime.now - (number_of_minutes/24.0/60.0)
|
91
|
+
when /\s*\d+\s+hours(s)?\s+ago\s*?/
|
92
|
+
number_of_hours = value.match(/\d+/)[0].to_i
|
93
|
+
DateTime.now - (number_of_hours/24.0)
|
88
94
|
when /\s*\d+\s+month(s)?\s+ago\s*?/
|
89
95
|
number_of_months = value.match(/\d+/)[0].to_i
|
90
96
|
Date.today.prev_month(number_of_months)
|
@@ -94,6 +100,12 @@ module MatcherHelpers
|
|
94
100
|
when /\s*\d+\s+year(s)?\s+ago\s*/
|
95
101
|
number_of_years = value.match(/\d+/)[0].to_i
|
96
102
|
Date.today.prev_year(number_of_years)
|
103
|
+
when /\s*\d+\s+minute(s)?\s+from now\s*?/
|
104
|
+
number_of_minutes = value.match(/\d+/)[0].to_i
|
105
|
+
DateTime.now + (number_of_minutes/24.0/60.0)
|
106
|
+
when /\s*\d+\s+hours(s)?\s+from now\s*?/
|
107
|
+
number_of_hours = value.match(/\d+/)[0].to_i
|
108
|
+
DateTime.now + (number_of_hours/24.0)
|
97
109
|
when /\s*\d+\s+month(s)?\s+from now\s*?/
|
98
110
|
number_of_months = value.match(/\d+/)[0].to_i
|
99
111
|
Date.today.next_month(number_of_months)
|
@@ -182,7 +182,7 @@ module Squcumber::Postgres::Mock
|
|
182
182
|
end
|
183
183
|
|
184
184
|
it 'asks the testing database for currently existing tables in production schemas' do
|
185
|
-
expect(testing_database).to have_received(:exec).with(/^\s*select\s+schemaname\s+\|\|\s+'\.'\s+\|\|\s+tablename\s+as schema\_and\_table\s+from\s+pg_tables\s+where\s+tableowner\s*=\s*'some_user'\s*;?\s*$/)
|
185
|
+
expect(testing_database).to have_received(:exec).with(/^\s*select\s+schemaname\s+\|\|\s+'\.'\s+\|\|\s+tablename\s+as schema\_and\_table\s+from\s+pg_tables\s+where\s+tableowner\s*=\s*'some_user'\s+and\s+schemaname\s+not\s+in\s+\('pg_catalog',\s+'information_schema'\s*\)\s*;?\s*$/)
|
186
186
|
end
|
187
187
|
|
188
188
|
it 'truncates the returned tables in the testing database' do
|
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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefanie Grunwald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -159,7 +159,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
159
159
|
requirements:
|
160
160
|
- - ">="
|
161
161
|
- !ruby/object:Gem::Version
|
162
|
-
version: '2.
|
162
|
+
version: '2.5'
|
163
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
165
|
- - ">="
|