Skip to content

Commit

Permalink
Bump to pg_query 2.0.0, adds Postgresql 13 support
Browse files Browse the repository at this point in the history
Fixes #22
  • Loading branch information
purcell committed Mar 18, 2021
1 parent e38a7c9 commit 18414eb
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"

gem "pg_query", ">= 1.0", "< 2"
gem "pg_query", ">= 1.0", "< 3"

group :development do
gem "rspec"
Expand Down
30 changes: 16 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.3)
pg_query (1.2.0)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.0)
diff-lcs (1.4.4)
google-protobuf (3.15.6)
pg_query (2.0.1)
google-protobuf (~> 3.15.5)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
rspec-support (~> 3.10.0)
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.2)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)

PLATFORMS
ruby

DEPENDENCIES
pg_query (>= 1.0, < 2)
pg_query (>= 1.0, < 3)
rspec

BUNDLED WITH
Expand Down
2 changes: 1 addition & 1 deletion lib/sqlint/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module SQLint
VERSION = "0.1.10"
VERSION = "0.2.0"
end
14 changes: 14 additions & 0 deletions spec/linter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ def warning(line, col, msg)
end
end

context "with valid PG 12 syntax" do
let(:input) do <<-EOF
CREATE TABLE things (
x_in numeric,
x_cm numeric GENERATED ALWAYS AS (x / 2.54) STORED
);
EOF
end

it "reports no errors" do
expect(results).to be_empty
end
end

describe "single errors" do
context "with a single valid statement" do
it "reports no errors" do
Expand Down
2 changes: 1 addition & 1 deletion sqlint.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |s|
s.rubygems_version = '1.8.23'
s.summary = 'Simple SQL linter.'

s.add_runtime_dependency('pg_query', '~> 1')
s.add_runtime_dependency('pg_query', '~> 2')
s.add_development_dependency('rake', '~> 10.1')
s.add_development_dependency('rspec', '~> 3.2')
s.add_development_dependency('bundler', '~> 1.3')
Expand Down

0 comments on commit 18414eb

Please sign in to comment.