Skip to content

Commit

Permalink
Merge pull request #1 from HarlemSquirrel/magnus
Browse files Browse the repository at this point in the history
Migrate to using magnus
  • Loading branch information
HarlemSquirrel authored Feb 22, 2023
2 parents 91bb3c5 + e37e061 commit 90589d7
Show file tree
Hide file tree
Showing 19 changed files with 1,463 additions and 58 deletions.
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
/spec/reports/
/tmp/

*.bundle
*.so
*.o
*.a
mkmf.log

# rspec failure tracking
.rspec_status


# Added by cargo

/target

# Build gems
# Built gems
*.gem
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## [Unreleased]

## [0.2.0] - 2023-02-22

- Migrate to [magnus](https://github.com/matsadler/magnus)

## [0.1.0] - 2023-02-21

- Initial release
Expand Down
164 changes: 164 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 6 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
[package]
name = "tzf"
version = "0.1.0"
edition = "2021"
# This Cargo.toml is here to let externals tools (IDEs, etc.) know that this is
# a Rust project. Your extensions dependencies should be added to the Cargo.toml
# in the ext/ directory.

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib"]

[dependencies]
lazy_static = "1.4.0"
tzf-rs = "0.3.0"
[workspace]
members = ["./ext/tzf"]
resolver = "2"
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ source "https://rubygems.org"
gemspec

gem "rake", "~> 13.0"
gem "rake-compiler"
gem "rb_sys"

gem "rspec", "~> 3.0"

Expand Down
9 changes: 6 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
PATH
remote: .
specs:
tzf (0.2.0.pre.pre)
ffi (~> 1.0)
tzf (0.2.0)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
diff-lcs (1.5.0)
ffi (1.15.5)
json (2.6.3)
parallel (1.22.1)
parser (3.2.0.0)
ast (~> 2.4.1)
rainbow (3.1.1)
rake (13.0.6)
rake-compiler (1.2.1)
rake
rb_sys (0.9.65)
regexp_parser (2.6.1)
rexml (3.2.5)
rspec (3.12.0)
Expand Down Expand Up @@ -58,6 +59,8 @@ PLATFORMS

DEPENDENCIES
rake (~> 13.0)
rake-compiler
rb_sys
rspec (~> 3.0)
rubocop (~> 1.21)
rubocop-rake (~> 0.6)
Expand Down
17 changes: 7 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ require "rubocop/rake_task"

RuboCop::RakeTask.new

desc "Build rust dependencies"
task :rust_build do
`cargo rustc --release`
`cp ./target/release/libtzf.so ./lib/tzf/`
end
require "rake/extensiontask"

desc "Build extension"
task build: :compile

desc "Clean rust dependencies"
task :rust_clean do
`cargo clean`
`rm -f ./lib/tzf/libtzf.so`
Rake::ExtensionTask.new("tzf") do |ext|
ext.lib_dir = "lib/tzf"
end

task default: %i[rust_build spec rubocop]
task default: %i[compile spec rubocop]
Loading

0 comments on commit 90589d7

Please sign in to comment.