mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-22 18:55:29 +03:00
34 lines
1,017 B
Diff
34 lines
1,017 B
Diff
--- a/Rakefile
|
|
+++ b/Rakefile
|
|
@@ -1,8 +1,6 @@
|
|
-require 'bundler/gem_tasks'
|
|
require 'rake/clean'
|
|
require 'rake/extensiontask'
|
|
require 'rspec/core/rake_task'
|
|
-require 'rubocop/rake_task'
|
|
require 'open-uri'
|
|
|
|
LIB_PG_QUERY_TAG = '13-2.0.4'.freeze
|
|
@@ -13,7 +11,6 @@
|
|
end
|
|
|
|
RSpec::Core::RakeTask.new
|
|
-RuboCop::RakeTask.new
|
|
|
|
task spec: :compile
|
|
|
|
@@ -86,11 +86,13 @@
|
|
system("cp -a #{libdir}/testdata/* #{testfilesdir}")
|
|
# Copy back the custom ext files
|
|
system("cp -a #{extbakdir}/pg_query_ruby.{c,sym} #{extbakdir}/extconf.rb #{extdir}")
|
|
+end
|
|
|
|
+task :update_json_field_names do
|
|
# Generate JSON field name helper (workaround until https://github.com/protocolbuffers/protobuf/pull/8356 is merged)
|
|
str = "module PgQuery\n INTERNAL_PROTO_FIELD_NAME_TO_JSON_NAME = {\n"
|
|
cur_type = nil
|
|
- File.read(File.join(libdir, 'protobuf/pg_query.proto')).each_line do |line|
|
|
+ File.read('/usr/include/pg_query/pg_query.proto').each_line do |line|
|
|
if line[/^message (\w+)/]
|
|
cur_type = $1
|
|
next
|