Skip to content

Commit 24a22d5

Browse files
authored
fix: Missing ruby files from native gems (#51)
* fix: Missing ruby files from native gems * fix gemspec * bump version * add smoke test step to release
1 parent 8d5cb1d commit 24a22d5

File tree

6 files changed

+19
-15
lines changed

6 files changed

+19
-15
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,14 @@ jobs:
174174
--build \
175175
-- ${{ matrix._.rb-sys-dock-setup }}
176176
177+
- name: Smoke gem install
178+
if: matrix.ruby-platform == 'x86_64-linux' # GitHub actions architecture
179+
run: |
180+
gem install pkg/eppo-server-sdk-*.gem --verbose
181+
script="puts EppoClient::Core::Client.new(EppoClient::Config.new('placeholder'))"
182+
ruby -reppo_client -e "$script" | grep fetching new configuration
183+
echo "✅ Successfully installed gem"
184+
177185
- name: Set outputs
178186
id: set-outputs
179187
shell: bash

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
*.pdb
1515

1616
node_modules
17+
18+
.idea/

ruby-sdk/Gemfile.lock

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
PATH
22
remote: .
33
specs:
4-
eppo-server-sdk (3.2.1)
4+
eppo-server-sdk (3.2.2)
5+
rb_sys (~> 0.9.102)
56

67
GEM
78
remote: https://rubygems.org/

ruby-sdk/eppo-server-sdk.gemspec

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,15 @@ Gem::Specification.new do |spec|
2424
"wiki_uri" => "https://github.com/Eppo-exp/ruby-sdk/wiki"
2525
}
2626

27-
# Specify which files should be added to the gem when it is released.
28-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
29-
gemspec = File.basename(__FILE__)
30-
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
31-
ls.readlines("\x0", chomp: true).reject do |f|
32-
(f == gemspec) ||
33-
f.start_with?(*%w[bin/ test/ spec/ features/ .cargo/ .git/ .github/ appveyor Gemfile])
34-
end
35-
end
27+
spec.files = Dir["{lib,ext}/**/*", "LICENSE", "README.md", "Cargo.*"]
28+
spec.files.reject! { |f| File.directory?(f) }
29+
spec.files.reject! { |f| f =~ /\.(dll|so|dylib|lib|bundle)\Z/ }
3630
spec.bindir = "exe"
3731
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
3832
spec.require_paths = ["lib"]
39-
spec.extensions = ["ext/eppo_client/Cargo.toml"]
33+
spec.extensions = ["ext/eppo_client/extconf.rb"]
4034

41-
# Uncomment to register a new dependency of your gem
42-
# spec.add_dependency "example-gem", "~> 1.0"
35+
spec.add_dependency "rb_sys", "~> 0.9.102"
4336

4437
# For more information and examples about making a new gem, check out our
4538
# guide at: https://bundler.io/guides/creating_gem.html

ruby-sdk/ext/eppo_client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "eppo_client"
33
# TODO: this version and lib/eppo_client/version.rb should be in sync
4-
version = "3.2.2"
4+
version = "3.2.3"
55
edition = "2021"
66
license = "MIT"
77
publish = false

ruby-sdk/lib/eppo_client/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
# TODO: this version and ext/eppo_client/Cargo.toml should be in sync
44
module EppoClient
5-
VERSION = "3.2.2"
5+
VERSION = "3.2.3"
66
end

0 commit comments

Comments
 (0)