tapsoob 0.7.3 → 0.7.7

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: d5483bf6fead82a0cc2b5392b841abbf19b5bbb99d9a1137f817ede99a1012e3
4
- data.tar.gz: 0f33862c44439dffe48680e25fe0dbbdcba6a1efc0846dd961049a91512dca30
3
+ metadata.gz: 27060ba6872d5c43a5fa03f972562ecef65f762217eb51db2757a527a403a407
4
+ data.tar.gz: 05447b9cda97c5f77c52520863ba949ce780f731b66883556d2b34b6479a5ac6
5
5
  SHA512:
6
- metadata.gz: 750cc687fcc1f63f11c4e1b27c7701c5e00e40bc351dac3245df6fd428abadb91f601633b6e37780a6d83311787b7bae91713004528bbe4500e1cbefcb157c5c
7
- data.tar.gz: 1f5224ae3b8b5bdbd4df9f164932632db9201ec656639c90ba2b6519b5483d62fd66ebd3d87a0847e1e7b2b5bff647608118494e5b07da44d43a68a211ebbaec
6
+ metadata.gz: eea4a49d3484dc687776b9b108a1334bc2fa77d485ba7a8f7875f5418254c0f077592f7631c419e992e9b50f47a2a60a629cf46bb786a73681b91753f4aa6c3e
7
+ data.tar.gz: c661e5ae7eccbc18da7d7058457f55d380c80f107cac88ca7e8978e8df74f0ea92edff18a5ff92eaccb2b26d1a61b8acd8d53daa8202eea0be5b4dbef8191613
data/.gitlab-ci.yml ADDED
@@ -0,0 +1,136 @@
1
+ default:
2
+ retry:
3
+ max: 2
4
+ when:
5
+ - runner_system_failure
6
+ - stuck_or_timeout_failure
7
+ - script_failure
8
+
9
+ stages:
10
+ - build
11
+ - publish
12
+ - cleanup
13
+
14
+ build-jar:
15
+ stage: build
16
+ image: jruby:9.4.14.0
17
+ tags:
18
+ - linux
19
+ - docker
20
+ before_script:
21
+ - apt-get update && apt-get install -y git curl jq
22
+ - gem install rake
23
+ - mkdir -p config dist
24
+ - echo "$WARBLE_CONFIG" > config/warble.rb
25
+ script:
26
+ - VERSION=${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}
27
+ - |
28
+ # Find all packages with this version
29
+ echo "Checking for existing packages with version ${VERSION}..."
30
+ PACKAGES=$(curl -s --header "JOB-TOKEN: $CI_JOB_TOKEN" \
31
+ "${GITLAB_INTERNAL_API}/projects/${CI_PROJECT_ID}/packages?package_name=tapsoob&per_page=100")
32
+
33
+ # Get package IDs matching this version
34
+ MATCHING_IDS=$(echo "$PACKAGES" | jq -r --arg v "$VERSION" '.[] | select(.version == $v) | .id')
35
+ COUNT=$(echo "$MATCHING_IDS" | grep -c . || true)
36
+
37
+ echo "Found $COUNT package(s) with version ${VERSION}"
38
+
39
+ if [ "$COUNT" -gt 1 ]; then
40
+ echo "Multiple packages found, cleaning up duplicates..."
41
+ # Keep the first one, delete the rest
42
+ KEEP_ID=$(echo "$MATCHING_IDS" | head -n 1)
43
+ echo "$MATCHING_IDS" | tail -n +2 | while read -r ID; do
44
+ echo "Deleting duplicate package ID: $ID"
45
+ curl -s --request DELETE --header "JOB-TOKEN: $CI_JOB_TOKEN" \
46
+ "${GITLAB_INTERNAL_API}/projects/${CI_PROJECT_ID}/packages/${ID}"
47
+ done
48
+ echo "Kept package ID: $KEEP_ID, skipping build"
49
+ exit 0
50
+ elif [ "$COUNT" -eq 1 ]; then
51
+ echo "Package tapsoob-${VERSION}.jar already exists, skipping build"
52
+ exit 0
53
+ fi
54
+
55
+ echo "No existing package found, proceeding with build..."
56
+ - bundle install
57
+ - bundle exec rake jar
58
+ - 'curl --fail --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file dist/tapsoob.jar "${GITLAB_INTERNAL_API}/projects/${CI_PROJECT_ID}/packages/generic/tapsoob/${VERSION}/tapsoob-${VERSION}.jar"'
59
+
60
+ publish-gem:
61
+ stage: publish
62
+ image: ruby:3.3
63
+ tags:
64
+ - linux
65
+ - docker
66
+ before_script:
67
+ - apt-get update && apt-get install -y git
68
+ - mkdir -p ~/.gem
69
+ - |
70
+ cat > ~/.gem/credentials << EOF
71
+ ---
72
+ :rubygems_api_key: ${RUBYGEMS_API_KEY}
73
+ EOF
74
+ - chmod 600 ~/.gem/credentials
75
+ script:
76
+ - gem build tapsoob.gemspec
77
+ - gem push tapsoob-*.gem
78
+ rules:
79
+ - if: $CI_COMMIT_TAG
80
+
81
+ publish-gem-jruby:
82
+ stage: publish
83
+ image: jruby:9.4.14.0
84
+ tags:
85
+ - linux
86
+ - docker
87
+ before_script:
88
+ - apt-get update && apt-get install -y git
89
+ - mkdir -p ~/.gem
90
+ - |
91
+ cat > ~/.gem/credentials << EOF
92
+ ---
93
+ :rubygems_api_key: ${RUBYGEMS_API_KEY}
94
+ EOF
95
+ - chmod 600 ~/.gem/credentials
96
+ script:
97
+ - gem build tapsoob.gemspec
98
+ - gem push tapsoob-*.gem
99
+ rules:
100
+ - if: $CI_COMMIT_TAG
101
+
102
+ cleanup-packages:
103
+ stage: cleanup
104
+ image: alpine:latest
105
+ tags:
106
+ - linux
107
+ - docker
108
+ rules:
109
+ - if: $CI_PIPELINE_SOURCE == "schedule"
110
+ - when: manual
111
+ allow_failure: true
112
+ script:
113
+ - apk add --no-cache curl jq
114
+ - |
115
+ echo "Fetching packages..."
116
+ PACKAGES=$(curl -s --header "JOB-TOKEN: $CI_JOB_TOKEN" \
117
+ "${GITLAB_INTERNAL_API}/projects/${CI_PROJECT_ID}/packages?per_page=100")
118
+
119
+ # Get latest nightly (8 hex chars = commit SHA)
120
+ LATEST_NIGHTLY=$(echo "$PACKAGES" | jq -r '[.[] | select(.version | test("^[0-9a-f]{8}$"))] | sort_by(.created_at) | reverse | .[0].version // empty')
121
+ echo "Latest nightly to keep: $LATEST_NIGHTLY"
122
+
123
+ # Process each package
124
+ echo "$PACKAGES" | jq -r '.[] | "\(.id) \(.version)"' | while read -r ID VERSION; do
125
+ if echo "$VERSION" | grep -qE '^[0-9a-f]{8}$'; then
126
+ if [ "$VERSION" = "$LATEST_NIGHTLY" ]; then
127
+ echo "Keeping latest nightly: $VERSION"
128
+ else
129
+ echo "Deleting old nightly: $VERSION (ID: $ID)"
130
+ curl -s --request DELETE --header "JOB-TOKEN: $CI_JOB_TOKEN" \
131
+ "${GITLAB_INTERNAL_API}/projects/${CI_PROJECT_ID}/packages/${ID}"
132
+ fi
133
+ else
134
+ echo "Keeping tagged release: $VERSION"
135
+ fi
136
+ done
@@ -40,7 +40,7 @@ module Tapsoob
40
40
  end
41
41
 
42
42
  def pull_schema
43
- log.info "Receiving schema"
43
+ log.info "Receiving schema" if opts[:progress]
44
44
  Tapsoob::ProgressEvent.schema_start(tables.size)
45
45
 
46
46
  progress = opts[:progress] ? Tapsoob::Progress::Bar.new('Schema', tables.size) : nil
@@ -60,9 +60,9 @@ module Tapsoob
60
60
  end
61
61
 
62
62
  def pull_data
63
- log.info "Receiving data"
63
+ log.info "Receiving data" if opts[:progress]
64
64
 
65
- log.info "#{tables.size} tables, #{format_number(record_count)} records"
65
+ log.info "#{tables.size} tables, #{format_number(record_count)} records" if opts[:progress]
66
66
  Tapsoob::ProgressEvent.data_start(tables.size, record_count)
67
67
 
68
68
  if parallel?
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.7.3".freeze
3
+ VERSION = "0.7.7".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.3
4
+ version: 0.7.7
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: 2026-02-16 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: []