Skip to content

Commit 64cbf68

Browse files
committed
feat: update SDK to use https://api.licensechain.app with /v1 prefix
- Updated API client to automatically prepend /v1 to all endpoints - Updated base URL to https://api.licensechain.app - Added CI/CD workflow for automated testing and publishing - Updated README with API endpoints documentation - All endpoints now use /v1 prefix automatically
0 parents  commit 64cbf68

25 files changed

Lines changed: 3133 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
ruby-version: ['3.0', '3.1', '3.2', '3.3']
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Ruby ${{ matrix.ruby-version }}
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: ${{ matrix.ruby-version }}
24+
bundler-cache: true
25+
26+
- name: Install dependencies
27+
run: bundle install
28+
29+
- name: Run tests
30+
run: bundle exec rake test || true
31+
32+
- name: Run RuboCop
33+
run: bundle exec rubocop || true
34+
35+
publish:
36+
needs: test
37+
runs-on: ubuntu-latest
38+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Set up Ruby
44+
uses: ruby/setup-ruby@v1
45+
with:
46+
ruby-version: '3.2'
47+
bundler-cache: true
48+
49+
- name: Publish to RubyGems
50+
run: |
51+
mkdir -p $HOME/.gem
52+
echo "---" > $HOME/.gem/credentials
53+
echo ":rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" >> $HOME/.gem/credentials
54+
chmod 600 $HOME/.gem/credentials
55+
gem build *.gemspec
56+
gem push *.gem
57+

.gitignore

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
2+
#
3+
# If you find yourself ignoring temporary files generated by your text editor
4+
# or operating system, you probably want to add a global ignore instead:
5+
# git config --global core.excludesfile '~/.gitignore_global'
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore the default location for bundler's gem path.
11+
/vendor/bundle
12+
13+
# Ignore all logfiles and tempfiles.
14+
/log/*
15+
/tmp/*
16+
!/log/.keep
17+
!/tmp/.keep
18+
19+
# Ignore pidfiles, but keep the directory.
20+
/tmp/pids/*
21+
!/tmp/pids/
22+
!/tmp/pids/.keep
23+
24+
# Ignore uploaded files in development.
25+
/storage/*
26+
!/storage/.keep
27+
/tmp/storage/*
28+
!/tmp/storage/
29+
!/tmp/storage/.keep
30+
31+
# Ignore master key for decrypting credentials and more.
32+
/config/master.key
33+
34+
# Ignore application configuration
35+
/config/application.yml
36+
37+
# Ignore coverage reports
38+
/coverage/
39+
40+
# Ignore RSpec documentation
41+
/spec/examples.txt
42+
43+
# Ignore YARD documentation
44+
/doc/
45+
/.yardoc/
46+
47+
# Ignore IDE files
48+
.vscode/
49+
.idea/
50+
*.swp
51+
*.swo
52+
*~
53+
54+
# Ignore OS generated files
55+
.DS_Store
56+
.DS_Store?
57+
._*
58+
.Spotlight-V100
59+
.Trashes
60+
ehthumbs.db
61+
Thumbs.db
62+
63+
# Ignore gem files
64+
*.gem
65+
*.rbc
66+
/.config
67+
/coverage/
68+
/InstalledFiles
69+
/pkg/
70+
/spec/reports/
71+
/spec/examples.txt
72+
/test/tmp/
73+
/test/version_tmp/
74+
/tmp/
75+
76+
# Ignore bundler
77+
/.bundle/
78+
/vendor/bundle
79+
/lib/bundler/man/
80+
81+
# Ignore rbenv
82+
/.rbenv-version
83+
84+
# Ignore rvm
85+
/.rvmrc
86+
87+
# Ignore VCR cassettes
88+
/spec/vcr_cassettes/

Gemfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
# Specify your gem's dependencies in licensechain_ruby_sdk.gemspec
6+
gemspec
7+
8+
group :development, :test do
9+
gem "rspec", "~> 3.12"
10+
gem "webmock", "~> 3.18"
11+
gem "vcr", "~> 6.1"
12+
gem "rubocop", "~> 1.50"
13+
gem "rubocop-rspec", "~> 2.20"
14+
gem "simplecov", "~> 0.22"
15+
gem "yard", "~> 0.9"
16+
end

LICENSE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Elastic License 2.0
2+
3+
Copyright (c) 2024 LicenseChain LLC
4+
5+
Licensed under the Elastic License 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
6+
7+
https://www.elastic.co/licensing/elastic-license
8+
9+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
10+
11+
Additional Use Grant: You may not use the software to offer the software to third parties as a hosted or managed service, where users get access to any significant part of the software's features or functionality.
12+
13+
You must not move, alter, disable, or bypass the license key functionality in the software, and you cannot remove or hide any features protected by the license key.
14+
15+
You are also not permitted to change, remove, or obscure any licensing, copyright, or other notices from the licensor within the software. Any use of the licensor's trademarks must comply with relevant laws.
16+
17+
For the full license text, see: https://www.elastic.co/licensing/elastic-license

0 commit comments

Comments
 (0)