db_meta 0.12.0 → 0.13.1

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: 72b8b2a1d2345a78bad679153e910c7a092ff004495f03bc9f8fc14518080208
4
- data.tar.gz: 9a097fa844e9694e3282cc3ad6e5d05318e6e87bae9194e3a479f66f6c60df5b
3
+ metadata.gz: 8adeed469464ae77a3a9c1a4bf97232a5ac8dee25ec05099de171ffa198e97ef
4
+ data.tar.gz: f9c80bd97da0777df4435de3ac662683e4962c493c227d75a0a8874bf2be4bf0
5
5
  SHA512:
6
- metadata.gz: a1ca4509ecf3583ec46fd1c69ed0edcf17bbe4cceddf8675abf38e7818f00dcc0ecfd99793bf65b2d6ecff13387d27b256491d28cefbd115f2400a5429999ffc
7
- data.tar.gz: 6633e673c2deb5079879a21efd98569728ae8811b4525d8bfd75fff9e39d6f52811a68830eb55e09a26f439a6cde3b5227031ee4628a594bc8c86fa3cfa2547d
6
+ metadata.gz: 2c2216ce758aaa1788d34b02691c9fdbbe6406f23b4a261e4bebf0971def0b939878cea61d93852e78c3c81cf9291174ca171cb8455943f1c6c5d00385ed8b56
7
+ data.tar.gz: 1c45fc8c844195b9aa099fc008bd8f10ad7f6d8da1f22261b724d9aaa14c92bf6d118974b9d1ce8da80dcd0a7bcffe5ffd83056632cb46be2d85193deaae40e3
@@ -0,0 +1,67 @@
1
+ name: 01 - Test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - "*"
7
+
8
+ pull_request:
9
+ branches:
10
+ - "*"
11
+
12
+ schedule:
13
+ - cron: 0 2 * * 3,6
14
+
15
+ # Allows you to run this workflow manually from the Actions tab
16
+ workflow_dispatch:
17
+
18
+ jobs:
19
+ build:
20
+ runs-on: ubuntu-latest
21
+ env:
22
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
23
+ ORACLE_HOME: /opt/instantclient_23_7
24
+ LD_LIBRARY_PATH: /opt/instantclient_23_7
25
+ OCI_DIR: /opt/instantclient_23_7
26
+ NLS_LANG: AMERICAN_AMERICA.AL32UTF8
27
+
28
+ strategy:
29
+ fail-fast: false
30
+ matrix:
31
+ ruby: [ '3.4', '3.3', '3.2']
32
+
33
+ name: Ruby ${{ matrix.ruby }}
34
+ steps:
35
+ - uses: actions/checkout@v5
36
+
37
+ - name: Install Oracle instant client
38
+ run: |
39
+ mkdir -p /opt && cd /opt
40
+ curl https://download.oracle.com/otn_software/linux/instantclient/2370000/instantclient-basiclite-linux.x64-23.7.0.25.01.zip --output instantclient.zip
41
+ curl https://download.oracle.com/otn_software/linux/instantclient/2370000/instantclient-sdk-linux.x64-23.7.0.25.01.zip --output instantclient_sdk.zip
42
+ curl https://download.oracle.com/otn_software/linux/instantclient/2370000/instantclient-sqlplus-linux.x64-23.7.0.25.01.zip --output instantclient_sqlplus.zip
43
+ unzip -o instantclient.zip
44
+ unzip -o instantclient_sdk.zip
45
+ unzip -o instantclient_sqlplus.zip
46
+
47
+ - name: libaio.so.1 fix with symbolic link
48
+ run: |
49
+ TARGET="/lib/x86_64-linux-gnu/libaio.so.1"
50
+ SOURCE="/lib/x86_64-linux-gnu/libaio.so.1t64"
51
+
52
+ # Check if the symbolic link already exists
53
+ if [ ! -e "$TARGET" ]; then
54
+ sudo ln -s "$SOURCE" "$TARGET"
55
+ fi
56
+
57
+ - name: Set up Ruby
58
+ uses: ruby/setup-ruby@v1
59
+ with:
60
+ ruby-version: ${{ matrix.ruby }}
61
+ bundler: latest
62
+ bundler-cache: true
63
+ cache-version: 3
64
+
65
+ - name: Run default task
66
+ run: |
67
+ bundle exec rake
@@ -0,0 +1,57 @@
1
+ name: 02 - Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ id-token: write
14
+ contents: write
15
+ env:
16
+ ORACLE_HOME: /opt/instantclient_23_7
17
+ LD_LIBRARY_PATH: /opt/instantclient_23_7
18
+ OCI_DIR: /opt/instantclient_23_7
19
+ NLS_LANG: AMERICAN_AMERICA.AL32UTF8
20
+
21
+ steps:
22
+ - name: Checkout current code
23
+ uses: actions/checkout@v5
24
+
25
+ - name: Install Oracle instant client
26
+ run: |
27
+ mkdir -p /opt && cd /opt
28
+ curl https://download.oracle.com/otn_software/linux/instantclient/2370000/instantclient-basiclite-linux.x64-23.7.0.25.01.zip --output instantclient.zip
29
+ curl https://download.oracle.com/otn_software/linux/instantclient/2370000/instantclient-sdk-linux.x64-23.7.0.25.01.zip --output instantclient_sdk.zip
30
+ curl https://download.oracle.com/otn_software/linux/instantclient/2370000/instantclient-sqlplus-linux.x64-23.7.0.25.01.zip --output instantclient_sqlplus.zip
31
+ unzip -o instantclient.zip
32
+ unzip -o instantclient_sdk.zip
33
+ unzip -o instantclient_sqlplus.zip
34
+
35
+ - name: libaio.so.1 fix with symbolic link
36
+ run: |
37
+ TARGET="/lib/x86_64-linux-gnu/libaio.so.1"
38
+ SOURCE="/lib/x86_64-linux-gnu/libaio.so.1t64"
39
+
40
+ # Check if the symbolic link already exists
41
+ if [ ! -e "$TARGET" ]; then
42
+ sudo ln -s "$SOURCE" "$TARGET"
43
+ fi
44
+
45
+ - name: Set up Ruby
46
+ uses: ruby/setup-ruby@v1
47
+ with:
48
+ ruby-version: '3.4'
49
+ bundler: latest
50
+ bundler-cache: true
51
+ cache-version: 1
52
+
53
+ - name: Build gem
54
+ run: gem build *.gemspec
55
+
56
+ - name: Push to Rubygems
57
+ uses: rubygems/release-gem@v1
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.3.6
1
+ 3.4.7
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 3.3.6
1
+ ruby 3.4.7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [0.13.1] - 2025-11-09
2
+
3
+ ### Added
4
+ - Trusted Publisher
5
+
6
+ ### Changed
7
+ - Updated development dependencies
8
+
9
+ ## [0.13.0] - 2024-12-25
10
+
11
+ ### Changed
12
+ - Support for Ruy 3.4
13
+
1
14
  ## [0.12.0] - 2024-06-15
2
15
 
3
16
  ### Changed
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/db_meta.svg)](https://badge.fury.io/rb/db_meta)
2
- [![Maintainability](https://api.codeclimate.com/v1/badges/ffd17b164da909c5c172/maintainability)](https://codeclimate.com/github/thomis/db_meta/maintainability)
3
- [![Test Coverage](https://api.codeclimate.com/v1/badges/ffd17b164da909c5c172/test_coverage)](https://codeclimate.com/github/thomis/db_meta/test_coverage)
4
- [![ci](https://github.com/thomis/db_meta/actions/workflows/ci.yml/badge.svg)](https://github.com/thomis/db_meta/actions/workflows/ci.yml)
2
+ [![01 - Test](https://github.com/thomis/db_meta/actions/workflows/01_test.yml/badge.svg)](https://github.com/thomis/db_meta/actions/workflows/01_test.yml)
3
+ [![02 - Release](https://github.com/thomis/db_meta/actions/workflows/02_release.yml/badge.svg)](https://github.com/thomis/db_meta/actions/workflows/02_release.yml)
5
4
 
6
5
  # Welcome to db_meta
7
6
  Database meta and core data extraction.
@@ -50,9 +49,13 @@ meta.extract
50
49
 
51
50
  Currently supported and tested ruby versions are:
52
51
 
53
- - 3.3
54
- - 3.2
55
- - 3.1
52
+ - 3.4 (EOL 31 Mar 2028)
53
+ - 3.3 (EOL 31 Mar 2027)
54
+ - 3.2 (EOL 31 Mar 2026)
55
+
56
+ Ruby versions not tested anymore:
57
+
58
+ - 3.1 (EOL 31 Mar 2025)
56
59
  - 3.0 (EOL 31 Mar 2024)
57
60
  - 2.7 (EOL 31 Mar 2023)
58
61
  - 2.6 (EOL 31 Mar 2022)
@@ -60,8 +63,51 @@ Currently supported and tested ruby versions are:
60
63
  ## Planned Features
61
64
  - Storage and tablespace clause
62
65
 
66
+ ## Publishing
67
+
68
+ This project uses [Trusted Publishing](https://guides.rubygems.org/trusted-publishing/) to securely publish gems to RubyGems.org. Trusted Publishing eliminates the need for long-lived API tokens by using OpenID Connect (OIDC) to establish a trusted relationship between GitHub Actions and RubyGems.org.
69
+
70
+ With Trusted Publishing configured, gem releases are automatically published to RubyGems when the release workflow runs, providing a more secure and streamlined publishing process.
71
+
63
72
  ## Contributing
64
- ...
73
+
74
+ We welcome contributions to db_meta! Here's how you can help:
75
+
76
+ 1. **Fork the repository** - Create your own fork of the code
77
+ 2. **Create a feature branch** - Make your changes in a new git branch:
78
+ ```
79
+ git checkout -b my-new-feature
80
+ ```
81
+ 3. **Make your changes** - Write your code and tests
82
+ 4. **Run the tests** - Ensure all tests pass:
83
+ ```
84
+ bundle exec rake
85
+ ```
86
+ 5. **Commit your changes** - Write clear and meaningful commit messages:
87
+ ```
88
+ git commit -am 'Add some feature'
89
+ ```
90
+ 6. **Push to your branch** - Push your changes to GitHub:
91
+ ```
92
+ git push origin my-new-feature
93
+ ```
94
+ 7. **Create a Pull Request** - Open a PR from your fork to the main repository
95
+
96
+ ### Guidelines
97
+
98
+ - Write tests for any new functionality
99
+ - Follow the existing code style and conventions
100
+ - Update documentation as needed
101
+ - Keep commits focused and atomic
102
+ - Write clear commit messages
103
+
104
+ ### Reporting Issues
105
+
106
+ Found a bug or have a feature request? Please open an issue on GitHub with:
107
+ - A clear title and description
108
+ - Steps to reproduce (for bugs)
109
+ - Expected vs actual behavior
110
+ - Ruby version and environment details
65
111
 
66
112
  ## License
67
113
  db_meta is released under [Apache License, Version 2.0](https://opensource.org/licenses/Apache-2.0)
data/db_meta.gemspec CHANGED
@@ -25,4 +25,5 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "simplecov", "~> 0.21"
26
26
 
27
27
  spec.add_dependency "ruby-oci8", "~> 2.2"
28
+ spec.add_dependency "logger", "~> 1.6"
28
29
  end
@@ -20,7 +20,7 @@ module DbMeta
20
20
  @include = args[:include]
21
21
 
22
22
  @objects = []
23
- @invalid_objects = Hash.new([])
23
+ @invalid_objects = Hash.new { |h, key| h[key] = [] }
24
24
 
25
25
  @base_folder = args[:base_folder] || File.expand_path(File.join(Dir.pwd, "/#{@username}@#{@instance}"))
26
26
 
@@ -43,7 +43,7 @@ module DbMeta
43
43
  end
44
44
 
45
45
  def extract(args = {})
46
- "CREATE#{(@uniqueness == "UNIQUE") ? " UNIQUE" : nil} INDEX #{@name} ON #{@table_name}(#{@columns.join(", ")});"
46
+ "CREATE#{" UNIQUE" if @uniqueness == "UNIQUE"} INDEX #{@name} ON #{@table_name}(#{@columns.join(", ")});"
47
47
  end
48
48
  end
49
49
  end
@@ -1,3 +1,3 @@
1
1
  module DbMeta
2
- VERSION = "0.12.0"
2
+ VERSION = "0.13.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db_meta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomi
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-11-22 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -94,6 +93,20 @@ dependencies:
94
93
  - - "~>"
95
94
  - !ruby/object:Gem::Version
96
95
  version: '2.2'
96
+ - !ruby/object:Gem::Dependency
97
+ name: logger
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '1.6'
103
+ type: :runtime
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.6'
97
110
  description: Database meta and core data extraction.
98
111
  email:
99
112
  - thomas.steiner@ikey.ch
@@ -102,8 +115,8 @@ extensions: []
102
115
  extra_rdoc_files: []
103
116
  files:
104
117
  - ".github/dependabot.yml"
105
- - ".github/workflows/cd.yml"
106
- - ".github/workflows/ci.yml"
118
+ - ".github/workflows/01_test.yml"
119
+ - ".github/workflows/02_release.yml"
107
120
  - ".gitignore"
108
121
  - ".rspec"
109
122
  - ".ruby-version"
@@ -158,7 +171,6 @@ homepage: https://github.com/thomis/db_meta
158
171
  licenses:
159
172
  - Apache-2.0
160
173
  metadata: {}
161
- post_install_message:
162
174
  rdoc_options: []
163
175
  require_paths:
164
176
  - lib
@@ -173,8 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
185
  - !ruby/object:Gem::Version
174
186
  version: '0'
175
187
  requirements: []
176
- rubygems_version: 3.5.22
177
- signing_key:
188
+ rubygems_version: 3.6.9
178
189
  specification_version: 4
179
190
  summary: Database meta and core data extraction
180
191
  test_files: []
@@ -1,46 +0,0 @@
1
- name: cd
2
-
3
- on:
4
- workflow_dispatch:
5
-
6
- jobs:
7
-
8
- build:
9
- runs-on: ubuntu-latest
10
- env:
11
- ORACLE_HOME: /opt/instantclient_21_12
12
- LD_LIBRARY_PATH: /opt/instantclient_21_12
13
- OCI_DIR: /opt/instantclient_21_12
14
- NLS_LANG: AMERICAN_AMERICA.AL32UTF8
15
-
16
- steps:
17
- - name: Checkout current code
18
- uses: actions/checkout@v4
19
-
20
- - name: Install Oracle instant client
21
- run: |
22
- mkdir -p /opt && cd /opt
23
- curl https://download.oracle.com/otn_software/linux/instantclient/2112000/instantclient-basic-linux.x64-21.12.0.0.0dbru.zip --output instantclient.zip
24
- curl https://download.oracle.com/otn_software/linux/instantclient/2112000/instantclient-sdk-linux.x64-21.12.0.0.0dbru.zip --output instantclient_sdk.zip
25
- unzip instantclient.zip
26
- unzip instantclient_sdk.zip
27
-
28
- - name: Set up Ruby
29
- uses: ruby/setup-ruby@v1
30
- with:
31
- ruby-version: '3.3'
32
- bundler: latest
33
- bundler-cache: true
34
- cache-version: 1
35
-
36
- - name: Push to Rubygems
37
- env:
38
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39
- run: |
40
- git config --global user.email "thomas.steiner@ikey.ch"
41
- git config --global user.name "thomis"
42
- mkdir ~/.gem
43
- echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials
44
- chmod 600 ~/.gem/credentials
45
- bundle exec rake release
46
- rm ~/.gem/credentials
@@ -1,65 +0,0 @@
1
- name: ci
2
-
3
- on:
4
- push:
5
- branches:
6
- - "*"
7
-
8
- pull_request:
9
- branches:
10
- - "*"
11
-
12
- schedule:
13
- - cron: 0 2 * * 3,6
14
-
15
- # Allows you to run this workflow manually from the Actions tab
16
- workflow_dispatch:
17
-
18
- jobs:
19
- build:
20
- runs-on: ubuntu-latest
21
- env:
22
- CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
23
- ORACLE_HOME: /opt/instantclient_21_12
24
- LD_LIBRARY_PATH: /opt/instantclient_21_12
25
- OCI_DIR: /opt/instantclient_21_12
26
- NLS_LANG: AMERICAN_AMERICA.AL32UTF8
27
-
28
- strategy:
29
- fail-fast: false
30
- matrix:
31
- ruby: [ '3.3', '3.2', '3.1', '3.0']
32
-
33
- name: Ruby ${{ matrix.ruby }}
34
- steps:
35
- - uses: actions/checkout@v4
36
-
37
- - name: Install Oracle instant client
38
- run: |
39
- mkdir -p /opt && cd /opt
40
- curl https://download.oracle.com/otn_software/linux/instantclient/2112000/instantclient-basic-linux.x64-21.12.0.0.0dbru.zip --output instantclient.zip
41
- curl https://download.oracle.com/otn_software/linux/instantclient/2112000/instantclient-sdk-linux.x64-21.12.0.0.0dbru.zip --output instantclient_sdk.zip
42
- unzip instantclient.zip
43
- unzip instantclient_sdk.zip
44
-
45
- - name: Set up Ruby
46
- uses: ruby/setup-ruby@v1
47
- with:
48
- ruby-version: ${{ matrix.ruby }}
49
- bundler: latest
50
- bundler-cache: true
51
- cache-version: 3
52
-
53
- - name: Code Climate setup test reporter
54
- run: |
55
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
56
- chmod +x ./cc-test-reporter
57
- ./cc-test-reporter before-build
58
-
59
- - name: Run default task
60
- run: |
61
- bundle exec rake
62
-
63
- - name: Code Climate publish test coverage
64
- run: |
65
- ./cc-test-reporter after-build