Skip to content

Commit

Permalink
fix: Missing ruby files from native gems (#51)
Browse files Browse the repository at this point in the history
* fix: Missing ruby files from native gems

* fix gemspec

* bump version

* add smoke test step to release
  • Loading branch information
felipecsl authored Oct 21, 2024
1 parent 8d5cb1d commit 24a22d5
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
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"
- 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

0 comments on commit 24a22d5

Please sign in to comment.