tapsoob 0.7.2-java → 0.7.6-java
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 +4 -4
- data/.gitlab-ci.yml +65 -0
- data/lib/tapsoob/utils.rb +15 -4
- data/lib/tapsoob/version.rb +1 -1
- metadata +4 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e3298ce33acccdc45646022c74937516698d5b860130e372f3e88c654f15d7c7
|
|
4
|
+
data.tar.gz: f6ad2d24ba9e33ff20c8144ac923561976a163793833dc01dbdd3a9088f2c70f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 60fab1e7b45440be4afdaa7dbbe136a12bea01acc175ea316d8056e5875534f87b940c35695fd8e12266c7c208af62fafb7ef71228c5e5c2ff1f281f811787f0
|
|
7
|
+
data.tar.gz: 01ef4b99df2741953c459719ba85c45e95c6d9541826187f1e71b7668b970ab7c455561687880949ec5ade74c4f5d7e6ffc81a7fe6cc50c5b9a61336faacb7f7
|
data/.gitlab-ci.yml
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
stages:
|
|
2
|
+
- build
|
|
3
|
+
- publish
|
|
4
|
+
|
|
5
|
+
build-jar:
|
|
6
|
+
stage: build
|
|
7
|
+
image: jruby:9.4.14.0
|
|
8
|
+
tags:
|
|
9
|
+
- linux
|
|
10
|
+
- docker
|
|
11
|
+
before_script:
|
|
12
|
+
- apt-get update && apt-get install -y git ca-certificates
|
|
13
|
+
- update-ca-certificates
|
|
14
|
+
- gem install rake
|
|
15
|
+
- mkdir -p config dist
|
|
16
|
+
- echo "$WARBLE_CONFIG" > config/warble.rb
|
|
17
|
+
script:
|
|
18
|
+
- bundle install
|
|
19
|
+
- bundle exec rake jar
|
|
20
|
+
- VERSION=${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}
|
|
21
|
+
- 'curl --fail --verbose --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file dist/tapsoob.jar "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/tapsoob/${VERSION}/tapsoob-${VERSION}.jar"'
|
|
22
|
+
|
|
23
|
+
publish-gem:
|
|
24
|
+
stage: publish
|
|
25
|
+
image: ruby:3.3
|
|
26
|
+
tags:
|
|
27
|
+
- linux
|
|
28
|
+
- docker
|
|
29
|
+
before_script:
|
|
30
|
+
- apt-get update && apt-get install -y git ca-certificates
|
|
31
|
+
- update-ca-certificates
|
|
32
|
+
- mkdir -p ~/.gem
|
|
33
|
+
- |
|
|
34
|
+
cat > ~/.gem/credentials << EOF
|
|
35
|
+
---
|
|
36
|
+
:rubygems_api_key: ${RUBYGEMS_API_KEY}
|
|
37
|
+
EOF
|
|
38
|
+
- chmod 600 ~/.gem/credentials
|
|
39
|
+
script:
|
|
40
|
+
- gem build tapsoob.gemspec
|
|
41
|
+
- gem push tapsoob-*.gem
|
|
42
|
+
rules:
|
|
43
|
+
- if: $CI_COMMIT_TAG
|
|
44
|
+
|
|
45
|
+
publish-gem-jruby:
|
|
46
|
+
stage: publish
|
|
47
|
+
image: jruby:9.4.14.0
|
|
48
|
+
tags:
|
|
49
|
+
- linux
|
|
50
|
+
- docker
|
|
51
|
+
before_script:
|
|
52
|
+
- apt-get update && apt-get install -y git ca-certificates
|
|
53
|
+
- update-ca-certificates
|
|
54
|
+
- mkdir -p ~/.gem
|
|
55
|
+
- |
|
|
56
|
+
cat > ~/.gem/credentials << EOF
|
|
57
|
+
---
|
|
58
|
+
:rubygems_api_key: ${RUBYGEMS_API_KEY}
|
|
59
|
+
EOF
|
|
60
|
+
- chmod 600 ~/.gem/credentials
|
|
61
|
+
script:
|
|
62
|
+
- gem build tapsoob.gemspec
|
|
63
|
+
- gem push tapsoob-*.gem
|
|
64
|
+
rules:
|
|
65
|
+
- if: $CI_COMMIT_TAG
|
data/lib/tapsoob/utils.rb
CHANGED
|
@@ -98,8 +98,6 @@ Data : #{data}
|
|
|
98
98
|
# this is not true for other databases so we must check if the field is
|
|
99
99
|
# actually text and manually convert it back to a string
|
|
100
100
|
def incorrect_blobs(db, table)
|
|
101
|
-
return [] if (db.url =~ /(mysql|mysql2):\/\//).nil?
|
|
102
|
-
|
|
103
101
|
columns = []
|
|
104
102
|
db.schema(table).each do |data|
|
|
105
103
|
column, cdata = data
|
|
@@ -109,10 +107,23 @@ Data : #{data}
|
|
|
109
107
|
end
|
|
110
108
|
|
|
111
109
|
def encode_blobs(row, columns)
|
|
112
|
-
|
|
110
|
+
# Encode columns known to be blobs
|
|
113
111
|
columns.each do |c|
|
|
114
|
-
|
|
112
|
+
if row[c].is_a?(Sequel::SQL::Blob)
|
|
113
|
+
row[c] = base64encode(row[c]) unless row[c].nil?
|
|
114
|
+
elsif !row[c].nil? && row[c].encoding == Encoding::ASCII_8BIT
|
|
115
|
+
# Handle binary data that might not be wrapped in Sequel::SQL::Blob
|
|
116
|
+
row[c] = base64encode(row[c])
|
|
117
|
+
end
|
|
118
|
+
end unless columns.size == 0
|
|
119
|
+
|
|
120
|
+
# Also check all values for Sequel::SQL::Blob objects that might not be in the columns list
|
|
121
|
+
row.each do |key, value|
|
|
122
|
+
if value.is_a?(Sequel::SQL::Blob) && !columns.include?(key)
|
|
123
|
+
row[key] = base64encode(value)
|
|
124
|
+
end
|
|
115
125
|
end
|
|
126
|
+
|
|
116
127
|
row
|
|
117
128
|
end
|
|
118
129
|
|
data/lib/tapsoob/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tapsoob
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.6
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Félix Bellanger
|
|
8
8
|
- Michael Chrisco
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sequel
|
|
@@ -89,6 +89,7 @@ extensions: []
|
|
|
89
89
|
extra_rdoc_files: []
|
|
90
90
|
files:
|
|
91
91
|
- ".gitignore"
|
|
92
|
+
- ".gitlab-ci.yml"
|
|
92
93
|
- ".rspec"
|
|
93
94
|
- Gemfile
|
|
94
95
|
- README.md
|
|
@@ -148,7 +149,4 @@ requirements: []
|
|
|
148
149
|
rubygems_version: 3.6.3
|
|
149
150
|
specification_version: 4
|
|
150
151
|
summary: Simple tool to import/export databases.
|
|
151
|
-
test_files:
|
|
152
|
-
- spec/lib/tapsoob/chunksize_spec.rb
|
|
153
|
-
- spec/lib/tapsoob/version_spec.rb
|
|
154
|
-
- spec/spec_helper.rb
|
|
152
|
+
test_files: []
|