Skip to content

Commit f09201b

Browse files
committed
chore: rename gems and centralize version
1 parent 89bd5eb commit f09201b

28 files changed

+31
-36
lines changed

AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ just test
1515
The test suite executes a number of sample programs in `test/programs` under
1616
the two separate recorders/tracers:
1717

18-
* One based on a Ruby native extension in `gems/native-tracer`
19-
* Another based on pure Ruby code in `gems/pure-ruby-tracer`
18+
* One based on a Ruby native extension in `gems/codetracer-ruby-recorder`
19+
* Another based on pure Ruby code in `gems/codetracer-pure-ruby-recorder`
2020

2121
Their outputs are compared structurally to known good outputs stored
2222
in `test/fixtures`.
2323

2424
When `just test` fails, I suggest running the two tracers directly and
2525
analyzing where their outputs differs.
2626

27-
Please note that only the pure-ruby-tracer formats the output json for
27+
Please note that only the codetracer-pure-ruby-recorder formats the output json for
2828
human readability. Thus, you must use `jq -S` when comparing the outputs.
2929

3030
To run the benchmark, execute:

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
source "https://rubygems.org"
44

5-
gem "codetracer-ruby-recorder", path: "gems/native-tracer"
6-
gem "codetracer_pure_ruby_recorder", path: "gems/pure-ruby-tracer"
5+
gem "codetracer-ruby-recorder", path: "gems/codetracer-ruby-recorder"
6+
gem "codetracer-pure-ruby-recorder", path: "gems/codetracer-pure-ruby-recorder"

Justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ bench pattern="*" write_report="console":
77
ruby test/benchmarks/run_benchmarks.rb '{{pattern}}' --write-report={{write_report}}
88

99
build-extension:
10-
cargo build --release --manifest-path gems/native-tracer/ext/native_tracer/Cargo.toml
10+
cargo build --release --manifest-path gems/codetracer-ruby-recorder/ext/native_tracer/Cargo.toml

MAINTAINERS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ just build-extension
2323

2424
This compiles the extension in release mode using Cargo. The resulting
2525
shared library is placed under
26-
`ext/native_tracer/target/release/` and is loaded by `gems/native-tracer/lib/native_trace.rb`.
26+
`ext/native_tracer/target/release/` and is loaded by `gems/codetracer-ruby-recorder/lib/native_trace.rb`.
2727

2828
## Running tests
2929

@@ -59,7 +59,7 @@ Two Ruby gems are published from this repository:
5959
* **codetracer-ruby-recorder** – the tracer with the compiled native
6060
extension. Prebuilt gems are produced per target platform using
6161
[`rb_sys`](https://github.com/oxidize-rb/rb-sys).
62-
* **codetracer_pure_ruby_recorder** – a pure Ruby fallback without the
62+
* **codetracer-pure-ruby-recorder** – a pure Ruby fallback without the
6363
native extension.
6464

6565
A helper script is available to build and push all gems in one go:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The command downloads a prebuilt native extension when available and falls back
1616
to building it from source. If this fails, install the pure Ruby version:
1717

1818
```bash
19-
gem install codetracer_pure_ruby_recorder
19+
gem install codetracer-pure-ruby-recorder
2020
```
2121

2222
After installing, load the tracer:
@@ -36,7 +36,7 @@ recorder.flush_trace(Dir.pwd)
3636
you can currently use it directly with
3737

3838
```bash
39-
ruby gems/pure-ruby-tracer/lib/trace.rb [--out-dir DIR] <path to ruby file>
39+
ruby gems/codetracer-pure-ruby-recorder/lib/trace.rb [--out-dir DIR] <path to ruby file>
4040
# produces several trace json files in DIR,
4141
# or in `$CODETRACER_RUBY_RECORDER_OUT_DIR` if DIR is not provided.
4242
# Defaults to the current directory.
@@ -47,7 +47,7 @@ You can also invoke a lightweight CLI that loads the native tracer extension
4747
directly:
4848

4949
```bash
50-
ruby gems/native-tracer/lib/native_trace.rb [--out-dir DIR] <path to ruby file>
50+
ruby gems/codetracer-ruby-recorder/lib/native_trace.rb [--out-dir DIR] <path to ruby file>
5151
# Uses DIR or `$CODETRACER_RUBY_RECORDER_OUT_DIR` to choose where traces are saved.
5252
```
5353

Rakefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'rb_sys/extensiontask'
22

33
RbSys::ExtensionTask.new('codetracer_ruby_recorder') do |ext|
4-
ext.ext_dir = 'gems/native-tracer/ext/native_tracer'
5-
ext.lib_dir = 'gems/native-tracer/lib'
6-
ext.gem_spec = Gem::Specification.load('gems/native-tracer/codetracer-ruby-recorder.gemspec')
4+
ext.ext_dir = 'gems/codetracer-ruby-recorder/ext/native_tracer'
5+
ext.lib_dir = 'gems/codetracer-ruby-recorder/lib'
6+
ext.gem_spec = Gem::Specification.load('gems/codetracer-ruby-recorder/codetracer-ruby-recorder.gemspec')
77
end

examples/selective_tracing.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Load the native extension only if RubyRecorder is not already available
44
# (e.g., when running directly without the codetracer wrapper)
55
unless defined?(RubyRecorder)
6-
ext_base = File.expand_path('../gems/native-tracer/ext/native_tracer/target/release/libcodetracer_ruby_recorder', __dir__)
6+
ext_base = File.expand_path('../gems/codetracer-ruby-recorder/ext/native_tracer/target/release/libcodetracer_ruby_recorder', __dir__)
77
require ext_base
88
end
99

examples/selective_tracing_pure.rb

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

33
# Load the pure Ruby tracer library if RubyRecorder is not already defined
44
unless defined?(RubyRecorder)
5-
lib_base = File.expand_path('../gems/pure-ruby-tracer/lib/codetracer_pure_ruby_recorder', __dir__)
5+
lib_base = File.expand_path('../gems/codetracer-pure-ruby-recorder/lib/codetracer_pure_ruby_recorder', __dir__)
66
require lib_base
77
end
88

gems/pure-ruby-tracer/codetracer_pure_ruby_recorder.gemspec renamed to gems/codetracer-pure-ruby-recorder/codetracer_pure_ruby_recorder.gemspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Gem::Specification.new do |spec|
2-
spec.name = 'codetracer_pure_ruby_recorder'
3-
spec.version = '0.1.0'
2+
spec.name = 'codetracer-pure-ruby-recorder'
3+
version_file = File.expand_path('../../version.txt', __dir__)
4+
spec.version = File.read(version_file).strip
45
spec.authors = ['Metacraft Labs']
56
spec.email = ['[email protected]']
67

0 commit comments

Comments
 (0)