Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Missing ruby files from native gems #51

Merged
merged 4 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,14 @@ jobs:
--build \
-- ${{ matrix._.rb-sys-dock-setup }}

- name: Smoke gem install
if: matrix.ruby-platform == 'x86_64-linux' # GitHub actions architecture
run: |
gem install pkg/eppo-server-sdk-*.gem --verbose
script="puts EppoClient::Core::Client.new(EppoClient::Config.new('placeholder'))"
ruby -reppo_client -e "$script" | grep fetching new configuration
echo "✅ Successfully installed gem"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should prevent us from running into this issue again.
Shamelessly stolen from wasmtime https://github.com/bytecodealliance/wasmtime-rb/blob/main/.github/workflows/release.yml#L57-L63


- name: Set outputs
id: set-outputs
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
*.pdb

node_modules

.idea/
3 changes: 2 additions & 1 deletion ruby-sdk/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
PATH
remote: .
specs:
eppo-server-sdk (3.2.1)
eppo-server-sdk (3.2.2)
rb_sys (~> 0.9.102)

GEM
remote: https://rubygems.org/
Expand Down
17 changes: 5 additions & 12 deletions ruby-sdk/eppo-server-sdk.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,15 @@ Gem::Specification.new do |spec|
"wiki_uri" => "https://github.com/Eppo-exp/ruby-sdk/wiki"
}

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

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

# For more information and examples about making a new gem, check out our
# guide at: https://bundler.io/guides/creating_gem.html
Expand Down
2 changes: 1 addition & 1 deletion ruby-sdk/ext/eppo_client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "eppo_client"
# TODO: this version and lib/eppo_client/version.rb should be in sync
version = "3.2.2"
version = "3.2.3"
edition = "2021"
license = "MIT"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion ruby-sdk/lib/eppo_client/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

# TODO: this version and ext/eppo_client/Cargo.toml should be in sync
module EppoClient
VERSION = "3.2.2"
VERSION = "3.2.3"
end
Loading