Skip to content

Commit 18414eb

Browse files
committed
Bump to pg_query 2.0.0, adds Postgresql 13 support
Fixes #22
1 parent e38a7c9 commit 18414eb

File tree

5 files changed

+33
-17
lines changed

5 files changed

+33
-17
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source "https://rubygems.org"
22

3-
gem "pg_query", ">= 1.0", "< 2"
3+
gem "pg_query", ">= 1.0", "< 3"
44

55
group :development do
66
gem "rspec"

Gemfile.lock

+16-14
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
diff-lcs (1.3)
5-
pg_query (1.2.0)
6-
rspec (3.9.0)
7-
rspec-core (~> 3.9.0)
8-
rspec-expectations (~> 3.9.0)
9-
rspec-mocks (~> 3.9.0)
10-
rspec-core (3.9.1)
11-
rspec-support (~> 3.9.1)
12-
rspec-expectations (3.9.0)
4+
diff-lcs (1.4.4)
5+
google-protobuf (3.15.6)
6+
pg_query (2.0.1)
7+
google-protobuf (~> 3.15.5)
8+
rspec (3.10.0)
9+
rspec-core (~> 3.10.0)
10+
rspec-expectations (~> 3.10.0)
11+
rspec-mocks (~> 3.10.0)
12+
rspec-core (3.10.1)
13+
rspec-support (~> 3.10.0)
14+
rspec-expectations (3.10.1)
1315
diff-lcs (>= 1.2.0, < 2.0)
14-
rspec-support (~> 3.9.0)
15-
rspec-mocks (3.9.1)
16+
rspec-support (~> 3.10.0)
17+
rspec-mocks (3.10.2)
1618
diff-lcs (>= 1.2.0, < 2.0)
17-
rspec-support (~> 3.9.0)
18-
rspec-support (3.9.2)
19+
rspec-support (~> 3.10.0)
20+
rspec-support (3.10.2)
1921

2022
PLATFORMS
2123
ruby
2224

2325
DEPENDENCIES
24-
pg_query (>= 1.0, < 2)
26+
pg_query (>= 1.0, < 3)
2527
rspec
2628

2729
BUNDLED WITH

lib/sqlint/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module SQLint
2-
VERSION = "0.1.10"
2+
VERSION = "0.2.0"
33
end

spec/linter_spec.rb

+14
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ def warning(line, col, msg)
2525
end
2626
end
2727

28+
context "with valid PG 12 syntax" do
29+
let(:input) do <<-EOF
30+
CREATE TABLE things (
31+
x_in numeric,
32+
x_cm numeric GENERATED ALWAYS AS (x / 2.54) STORED
33+
);
34+
EOF
35+
end
36+
37+
it "reports no errors" do
38+
expect(results).to be_empty
39+
end
40+
end
41+
2842
describe "single errors" do
2943
context "with a single valid statement" do
3044
it "reports no errors" do

sqlint.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Gem::Specification.new do |s|
3636
s.rubygems_version = '1.8.23'
3737
s.summary = 'Simple SQL linter.'
3838

39-
s.add_runtime_dependency('pg_query', '~> 1')
39+
s.add_runtime_dependency('pg_query', '~> 2')
4040
s.add_development_dependency('rake', '~> 10.1')
4141
s.add_development_dependency('rspec', '~> 3.2')
4242
s.add_development_dependency('bundler', '~> 1.3')

0 commit comments

Comments
 (0)