Skip to content
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
1 change: 1 addition & 0 deletions lib/unitsdb/quantity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Quantity < Lutaml::Model::Serializable
attribute :quantity_type, :string
attribute :names, LocalizedString, collection: true
attribute :short, :string
attribute :equivalence_class, :string
attribute :unit_references, UnitReference, collection: true
attribute :dimension_reference, DimensionReference
attribute :references, ExternalReference, collection: true
Expand Down
1 change: 1 addition & 0 deletions lib/unitsdb/quantity_reference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Unitsdb
class QuantityReference < Identifier
attribute :id, :string
attribute :type, :string
attribute :primary, :boolean
end

Config.register_model(QuantityReference, id: :quantity_reference)
Expand Down
4 changes: 2 additions & 2 deletions lib/unitsdb/version.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module Unitsdb
VERSION = "2.2.12"
VERSION = "2.2.13"

# The version of the bundled UnitsDB data (from the data/ submodule).
# This version corresponds to a tag/commit in https://github.com/unitsml/unitsdb.
UNITS_DATA_VERSION = "2.1.1"
UNITS_DATA_VERSION = "2.2.0"
end
4 changes: 2 additions & 2 deletions spec/unitsdb/bundled_data_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
db = described_class.database

expect(db).to be_a(Unitsdb::Database)
expect(db.schema_version).to eq("2.1.0")
expect(db.schema_version).to eq("2.2.0")
expect(described_class.database).to equal(db)
end

Expand All @@ -70,7 +70,7 @@
%w[prefixes dimensions units quantities unit_systems].each do |entity|
file_path = File.join(data_dir, "#{entity}.yaml")
hash = YAML.safe_load_file(file_path)
expect(hash["schema_version"]).to eq("2.1.0"),
expect(hash["schema_version"]).to eq("2.2.0"),
"Expected #{entity}.yaml to have schema_version 2.0.0, got #{hash['schema_version']}"
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/unitsdb/database/loader_currencies_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
it "loads a directory without currencies.yaml with an empty collection" do
database = described_class.load(legacy_dir)

expect(database["schema_version"]).to eq("2.1.0")
expect(database["schema_version"]).to eq("2.2.0")
expect(database["currencies"]).to eq([])
end

Expand All @@ -44,7 +44,7 @@
it "accepts a present currencies.yaml at the supported version" do
File.write(File.join(legacy_dir, "currencies.yaml"),
<<~YAML)
schema_version: "2.1.0"
schema_version: "2.2.0"
currencies: []
YAML

Expand Down
2 changes: 1 addition & 1 deletion spec/unitsdb/database_currency_finders_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end
let(:fixture_currencies) do
<<~YAML
schema_version: "2.1.0"
schema_version: "2.2.0"
currencies:
- identifiers:
- type: iso4217
Expand Down
Loading