gitlab-pg_query 1.3.0 → 1.3.1

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: 63b274aaefc1eec6e7ad15ad500eefa3b9a164c9cee968a7d2934e195fc6dfd0
4
- data.tar.gz: '01179c42bbfd0f7895fd23540e270585f92157fb8bf22849fa48bf40c81f1c44'
3
+ metadata.gz: 8f5b1ba6fea600138780253bc96ffc2999f89b41b43d5f39d9ccffd828a6f27f
4
+ data.tar.gz: 17bb246ab97a9aaf14ba07f20d1c0b26de82dd441c7f655ba6c52e33b74b3cb4
5
5
  SHA512:
6
- metadata.gz: 98940ca0598bd2f7ebc1b1e33bfbb9d84a0bdb6aeb26ed69d15f1d365f9e2b8ab710162a621998e24156c200cf59a1043c5ee4098fdfaca572f9ac64fa82f886
7
- data.tar.gz: bc2a7193cd0021e56abba21e6e78eb209852cd9aa0ebff3971c26e15d4cbfdcd78dce44333580a03b39a9aa3e56034af4a3e8233131f05e3a5b43b17a2296fa9
6
+ metadata.gz: 79221a1a6b0225a117f4d8e28842d23dc29b12fd8b840ace54719f73df4171f44c4b812c915718e095a12800c724c87b40e1ea2def9c84d51af9abdc516c2275
7
+ data.tar.gz: a14a92ce40943668ab4599d3ff5b967fac2292b20b9776813cbe9647aa29d6f03ef4e0d0c28cd43d6446c7cac6f4ddd19d9cbd36c7306bd8c1b80d4764633a4b
@@ -1,25 +1,35 @@
1
1
  # rubocop:disable Style/GlobalVars
2
2
 
3
+ require 'digest'
3
4
  require 'mkmf'
4
5
  require 'open-uri'
5
6
 
6
- LIB_PG_QUERY_TAG = 'gitlab-10-1.0.3'.freeze
7
+ LIB_PG_QUERY_TAG = '10-1.0.3'.freeze
7
8
 
8
9
  workdir = Dir.pwd
9
10
  libdir = File.join(workdir, 'libpg_query-' + LIB_PG_QUERY_TAG)
10
11
  gemdir = File.join(__dir__, '../..')
11
12
  libfile = libdir + '/libpg_query.a'
12
13
 
13
- unless File.exist?("#{workdir}/libpg_query.tar.gz")
14
- File.open("#{workdir}/libpg_query.tar.gz", 'wb') do |target_file|
15
- open("https://gitlab.com/gitlab-org/libpg_query/-/archive/#{LIB_PG_QUERY_TAG}/libpg_query-#{LIB_PG_QUERY_TAG}.tar.gz", 'rb') do |read_file|
14
+ expected_sha256 = '1332761f31c198cb9825e6ccccda0b6a0e57daeb824870e8524df77f1592d149'
15
+ filename = "#{workdir}/libpg_query.tar.gz"
16
+
17
+ unless File.exist?(filename)
18
+ File.open(filename, 'wb') do |target_file|
19
+ URI.open('https://codeload.github.com/lfittl/libpg_query/tar.gz/' + LIB_PG_QUERY_TAG, 'rb') do |read_file|
16
20
  target_file.write(read_file.read)
17
21
  end
18
22
  end
23
+
24
+ checksum = Digest::SHA256.hexdigest(File.read(filename))
25
+
26
+ if checksum != expected_sha256
27
+ raise "SHA256 of #{filename} does not match: got #{checksum}, expected #{expected_sha256}"
28
+ end
19
29
  end
20
30
 
21
31
  unless Dir.exist?(libdir)
22
- system("tar -xzf #{workdir}/libpg_query.tar.gz") || raise('ERROR')
32
+ system("tar -xzf #{filename}") || raise('ERROR')
23
33
  end
24
34
 
25
35
  unless Dir.exist?(libfile)
@@ -1,3 +1,3 @@
1
1
  class PgQuery
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '1.3.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-pg_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Fittl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-23 00:00:00.000000000 Z
11
+ date: 2020-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.0.3
126
+ rubygems_version: 3.1.4
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: PostgreSQL query parsing and normalization library