squcumber-postgres 0.0.13 → 0.1.0

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
  SHA256:
3
- metadata.gz: 3e828300f0cb8a7c23134fb497f7c8db77b964fd1b1ecbd624133e1f43f6e9c8
4
- data.tar.gz: 13a4b5d872b18ef71e6437cc4f73aa588054c720d36ef086822e74d6c605bde2
3
+ metadata.gz: '089d8a3f411ec32c7b5915819d3da2691b91404397c2601c0468a3bebb1eb3ec'
4
+ data.tar.gz: 9842daf920c36ea783ba5e381993972cf71d323be275f4f47fed75729af05359
5
5
  SHA512:
6
- metadata.gz: 44cb35f73d0a380e2d8ceed798c25a2f4f80b07051ff3c485cf5618df67f817d3433c037a76f3a6265362fa86db8cbf7628ee0c2e71ff8338c9657883dc37a93
7
- data.tar.gz: 87eb56e555d10ee0bd0924ea51985775583160764b025f7c8f2ba20a602724e39b06dc043bbb6274247be6f03f16ab778b038e859b8b8563027528529685accd
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.13
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-10-15 00:00:00.000000000 Z
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.0'
162
+ version: '2.5'
163
163
  required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  requirements:
165
165
  - - ">="