mirror of
https://gitea.invidious.io/iv-org/shard-radix.git
synced 2024-08-15 00:43:21 +00:00
Add VERSION constant for runtime usage
Introduce `Radix::VERSION` to be used at runtime by users of the library for any purpose this will help them (expose them, use conditional blocks or similar). Also add spec that checks that defined versions in both `shard.yml` and `Radix::VERSION` matches to avoid messing up releases.
This commit is contained in:
parent
54d3b627a2
commit
77789be285
4 changed files with 20 additions and 0 deletions
14
spec/radix/version_spec.cr
Normal file
14
spec/radix/version_spec.cr
Normal file
|
@ -0,0 +1,14 @@
|
|||
require "../spec_helper"
|
||||
require "yaml"
|
||||
|
||||
module Radix
|
||||
describe VERSION do
|
||||
it "matches version defined in shard.yml" do
|
||||
contents = File.read(File.expand_path("../../../shard.yml", __FILE__))
|
||||
meta = YAML.parse(contents)
|
||||
|
||||
meta["version"]?.should_not be_falsey
|
||||
Radix::VERSION.should eq(meta["version"].as_s)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue