Skip to content

Commit

Permalink
Merge ed6256a into d16e45c
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlewis committed Apr 28, 2017
2 parents d16e45c + ed6256a commit 58b8078
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 28 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Unitwise uses semantic versioning.
- `Unitwise.register` is a new method that allows user defined units
- Support for MRI 2.3 and 2.4

### Changed

- SUnit data refreshed from latest UCUM spec. Most notably, some metric atoms
names have seen case changes.

## 2.0.0 - 2015-09-13

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions data/base_unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
:secondary_code: RAD
:property: plane angle
:dim: A
- :names: Kelvin
- :names: kelvin
:symbol: K
:primary_code: K
:secondary_code: K
:property: temperature
:dim: C
- :names: Coulomb
- :names: coulomb
:symbol: C
:primary_code: C
:secondary_code: C
Expand Down
82 changes: 60 additions & 22 deletions data/derived_unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
:special: false
:arbitrary: false
- :names: the number pi
:symbol: "π"
:symbol: π
:primary_code: "[pi]"
:secondary_code: "[PI]"
:scale:
Expand Down Expand Up @@ -119,7 +119,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Hertz
- :names: hertz
:symbol: Hz
:primary_code: Hz
:secondary_code: HZ
Expand All @@ -131,7 +131,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Newton
- :names: newton
:symbol: N
:primary_code: N
:secondary_code: N
Expand All @@ -143,7 +143,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Pascal
- :names: pascal
:symbol: Pa
:primary_code: Pa
:secondary_code: PAL
Expand All @@ -155,7 +155,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Joule
- :names: joule
:symbol: J
:primary_code: J
:secondary_code: J
Expand All @@ -167,7 +167,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Watt
- :names: watt
:symbol: W
:primary_code: W
:secondary_code: W
Expand All @@ -179,7 +179,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Ampère
- :names: ampère
:symbol: A
:primary_code: A
:secondary_code: A
Expand All @@ -191,7 +191,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Volt
- :names: volt
:symbol: V
:primary_code: V
:secondary_code: V
Expand All @@ -203,7 +203,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Farad
- :names: farad
:symbol: F
:primary_code: F
:secondary_code: F
Expand All @@ -215,8 +215,8 @@
:metric: true
:special: false
:arbitrary: false
- :names: Ohm
:symbol: "Ω"
- :names: ohm
:symbol: Ω
:primary_code: Ohm
:secondary_code: OHM
:scale:
Expand All @@ -227,7 +227,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Siemens
- :names: siemens
:symbol: S
:primary_code: S
:secondary_code: SIE
Expand All @@ -239,7 +239,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Weber
- :names: weber
:symbol: Wb
:primary_code: Wb
:secondary_code: WB
Expand All @@ -264,7 +264,7 @@
:metric: true
:special: true
:arbitrary: false
- :names: Tesla
- :names: tesla
:symbol: T
:primary_code: T
:secondary_code: T
Expand All @@ -276,7 +276,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Henry
- :names: henry
:symbol: H
:primary_code: H
:secondary_code: H
Expand Down Expand Up @@ -312,7 +312,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Becquerel
- :names: becquerel
:symbol: Bq
:primary_code: Bq
:secondary_code: BQ
Expand All @@ -324,7 +324,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Gray
- :names: gray
:symbol: Gy
:primary_code: Gy
:secondary_code: GY
Expand All @@ -336,7 +336,7 @@
:metric: true
:special: false
:arbitrary: false
- :names: Sievert
- :names: sievert
:symbol: Sv
:primary_code: Sv
:secondary_code: SV
Expand Down Expand Up @@ -666,7 +666,7 @@
:primary_code: "[h]"
:secondary_code: "[H]"
:scale:
:value: 6.6260755e-24
:value: 6.6260755e-34
:unit_code: J.s
:classification: const
:property: action
Expand Down Expand Up @@ -1069,7 +1069,7 @@
:metric: false
:special: false
:arbitrary: false
- :names: statute mile
- :names: mile
:symbol: mi
:primary_code: "[mi_i]"
:secondary_code: "[MI_I]"
Expand Down Expand Up @@ -2244,6 +2244,19 @@
:metric: false
:special: false
:arbitrary: false
- :names: degree Réaumur
:symbol: "°Ré"
:primary_code: "[degRe]"
:secondary_code: "[degRe]"
:scale:
:function_code: degre
:value: 5.0
:unit_code: K/4
:classification: heat
:property: temperature
:metric: false
:special: true
:arbitrary: false
- :names: calorie at 15 °C
:symbol: cal<sub>15°C</sub>
:primary_code: cal_[15]
Expand Down Expand Up @@ -3138,6 +3151,19 @@
:metric: false
:special: false
:arbitrary: true
- :names: index of reactivity
:symbol: IR
:primary_code: "[IR]"
:secondary_code: "[IR]"
:scale:
:value: 1.0
:unit_code: '1'
:classification: chemical
:property: amount of an allergen callibrated through in-vivo testing using the Stallergenes®
method.
:metric: false
:special: false
:arbitrary: true
- :names: bioequivalent allergen unit
:symbol: BAU
:primary_code: "[BAU]"
Expand Down Expand Up @@ -3372,8 +3398,8 @@
:metric: true
:special: false
:arbitrary: false
- :names: "Ångström"
:symbol: "Å"
- :names: Ångström
:symbol: Å
:primary_code: Ao
:secondary_code: AO
:scale:
Expand Down Expand Up @@ -3491,6 +3517,18 @@
:metric: false
:special: false
:arbitrary: false
- :names: meter per square seconds per square root of hertz
:primary_code: "[m/s2/Hz^(1/2)]"
:secondary_code: "[M/S2/HZ^(1/2)]"
:scale:
:function_code: sqrt
:value: 1.0
:unit_code: m2/s4/Hz
:classification: misc
:property: amplitude spectral density
:metric: false
:special: true
:arbitrary: false
- :names: bit
:symbol: bit<sub>s</sub>
:primary_code: bit_s
Expand Down
2 changes: 1 addition & 1 deletion data/prefix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
:secondary_code: M
:scalar: 1e-3
- :names: micro
:symbol: "μ"
:symbol: μ
:primary_code: u
:secondary_code: U
:scalar: 1e-6
Expand Down
6 changes: 3 additions & 3 deletions test/unitwise/expression/matcher_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
it "must be an Alternative list of names" do
subject.must_be_instance_of Parslet::Atoms::Alternative
end
it "must parse 'Joule'" do
subject.parse('Joule').must_equal('Joule')
it "must parse 'joule'" do
subject.parse('joule').must_equal('joule')
end
end

Expand All @@ -39,4 +39,4 @@
subject.parse('h').must_equal('h')
end
end
end
end

0 comments on commit 58b8078

Please sign in to comment.