tapsoob 0.7.2 → 0.7.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bda483668081f0108706a5d895ae9e582840831f2f9e45cc75914bda7ad3649c
4
- data.tar.gz: decfcf30f8cba0fc5cca485557d3403ef04fdb50227a65ba13d522c8edbd07b3
3
+ metadata.gz: '025843acb6117da8a287d8045d29ee44acd503294df67d994df3340922d64202'
4
+ data.tar.gz: 3633cee55115b8c561f858e430d58296ac98fd549ceaba7027d71cd1b6fcb9fc
5
5
  SHA512:
6
- metadata.gz: 53a4b04abadc23ad7aae8818d15deef8491fd7b58ae7e314bf69de3f8dd19bc181ae819937559b9b710a51d4aff6006657d0a60b2ac14e87db7342c5a5606b78
7
- data.tar.gz: a95e9a2ba2a35265f9eb32258c63ebe0a2f9be684f68b31f34364645bc79ceb240d8452380cc43df7c433903859eb09b80f87f7d5005e05976f0adc2a07dfb2f
6
+ metadata.gz: 1a9e68a0faf27687651a60df90e7eeccdc4235df1a4854ac1d8a2d01acdc3270a6fed3aa296c5c07cc3f292dc5754a4619cf2299f44b6f4b708a2941f2e7548c
7
+ data.tar.gz: f7824a83d062c93bd339ae92c47fa74f666cb53e2e6bd77791d35a24d73438f7e48bdc73813030b2cf3dbc95fe0aafd0e26e7a5f12c57d4321cff1c4e08ed7f9
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
- return row if columns.size == 0
110
+ # Encode columns known to be blobs
113
111
  columns.each do |c|
114
- row[c] = base64encode(row[c]) unless row[c].nil?
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
 
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.7.2".freeze
3
+ VERSION = "0.7.6".freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapsoob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Félix Bellanger
8
8
  - Michael Chrisco
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 1980-01-02 00:00:00.000000000 Z
12
+ date: 2025-12-07 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: sequel
@@ -89,6 +90,7 @@ extensions: []
89
90
  extra_rdoc_files: []
90
91
  files:
91
92
  - ".gitignore"
93
+ - ".gitlab-ci.yml"
92
94
  - ".rspec"
93
95
  - Gemfile
94
96
  - README.md
@@ -131,6 +133,7 @@ homepage: https://github.com/Keeguon/tapsoob
131
133
  licenses:
132
134
  - MIT
133
135
  metadata: {}
136
+ post_install_message:
134
137
  rdoc_options: []
135
138
  require_paths:
136
139
  - lib
@@ -145,10 +148,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
148
  - !ruby/object:Gem::Version
146
149
  version: '0'
147
150
  requirements: []
148
- rubygems_version: 3.6.9
151
+ rubygems_version: 3.5.22
152
+ signing_key:
149
153
  specification_version: 4
150
154
  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
155
+ test_files: []