Skip to content
Newer
Older
100644 262 lines (238 sloc) 14.7 KB
a67cc52 @olbrich Initial checkin
authored
1 Change Log for Ruby-units
2 =========================
71833cb @olbrich remove the Unit('1 mm'), and U('1 mm') style of instantiation
authored
3 2015-11-07 2.0.0 * remove support for ruby versions less than 2.0
4 * remove `.unit` and `.u` from String
5 * remove `.unit` from Date
6 * Fix an issue with redefining units that have already been cached
7 * remove 'U()' and 'u()' constructors
7606db4 @olbrich address some parsing issues for feet and lbs.. fixes #123
authored
8 * Fix issue #123 -- Fixes for singular unit parsing
6c33706 @olbrich update changelog
authored
9 2015-07-16 * Fix issue #129 -- doesn't handle number in the denominator
8343c28 @olbrich changelog & whitespace in rakefile
authored
10 2015-05-09 * update test harness to use rspec 3
11 2014-02-21 1.4.5 * Fix issue #98 -- add mcg as a valid unit
1f90ce5 update documentation
Kevin Olbrich authored
12 2013-07-19 1.4.4 * Fix issue #4 -- .best_prefix method
13 * Fix issue #60 -- Consider placing Unit in a module
14 * Fix issue #75 -- Siemens is kind of conductance not resistance
4b4d98c update changelog
Kevin Olbrich authored
15 * Fix issue #36 -- Don't require spaces in units
16 * Fix issue #68 -- ditto
17 * Fix issue #16 -- ditto
26b9e3e update changelog and bump version
Kevin Olbrich authored
18 2013-06-11 1.4.3 * Fix issue #70 -- Support passing Time objects to Time.at
19 * Fix issue #72 -- Remove non-existent RakeFile from gemspec
20 * Fix issue #71 -- Fix YAML test failure
21 * Fix issue #49 -- Unit instances constructed using other Unit instances are incompatible within the framework
22 * Fix issue #61 -- Fix failing case of subtraction losing Units class
23 * Fix issue #63 -- fixes an issue with to_date on 1.8.7
24 * Fix issue #64 -- Aliases aren't considered in Unit.defined? method
79c9c41 update change log and version
Kevin Olbrich authored
25 2012-09-16 1.4.2 * Fix issue #54 -- pluralization of fluid-ounces
26 * Fix issue #53, 51 -- incorrect definition for gee
27 * Fix issue #52 -- add support for degree symbol
28 * Fix issue #50 -- fix conversion to json
a05f3e0 @olbrich update changelog
authored
29 2012-05-13 1.4.1 * Fix issue #40 -- Unit parsing truncates invalid portions of the unit
30 * Fix issue #41 -- initializing with a nil gives unexpected result
8a103e4 @olbrich 'pt' is ambiguous and can represent either a point or a pint.
authored
31 2012-02-01 * Fix issue #34 -- Time.at takes more than one parameter
32 * Fix issue #35 -- 'pt' is ambiguous
47f553e @olbrich update change log
authored
33 2012-01-02 1.4.0 * Fix some definitions that were just wrong (amu, dalton)
34 * Definition uses name of unit if no aliases provided
70240c0 @olbrich update change log
authored
35 * Refactor definition process. New units are immediately available
8343c28 @olbrich changelog & whitespace in rakefile
authored
36 2011-12-31 * Define standard units in terms of base and other standard units -- more internally consistent
47f553e @olbrich update change log
authored
37 and less prone to round-off errors.
38 * add 'poundal'
39 * remove 'wtpercent'
40 2011-12-30 * Bump version
41 * Define compound units with base units for consistency
42 * distinguish between a league and a nautical league
43 * NOTE: the new unit definition DSL is not backwardly compatible with the old method
8343c28 @olbrich changelog & whitespace in rakefile
authored
44 (which is now deprecated).
f1d2713 @olbrich update change log, specify a license in the gem spec
authored
45 * Fix issue #27
46 2011-12-18 * Can define a display_name for units (fixes #26)
8c747fa @olbrich update Changelog
authored
47 2011-12-04 * Documentation improvements
48 * Add DSL for defining/redefining units
c231eba @olbrich remove extraneous files from the gem
authored
49 2011-11-24 * improve yard documentation
50 * add 'tbsp' as an alias for tablespoon
51 2011-10-17 1.3.2 * deprecate some string helper functions (make the gem compatible with rails)
52 * tighten up some time helper functions so they don't make as many assumptions
53 * time helpers no longer attempt to convert strings to time/date objects
54 2011-10-09 * Farads are not a base unit
55 * CFM added to default units
56 * multi specs run against ruby-1.9.3
57 * internally change Unit#to to Unit#convert_to, which is the preferred form
1fbafcf @olbrich ignore files created by rbi, slight tweaks to multispec runner
authored
58
de52fb7 @olbrich other minor changes
authored
59 2011-04-23 1.3.0.a * Some internal restructuring
60 * Implement specs for core behaviors
61 * fixed several bugs found by specs
62 * implemented a few new methods for completeness
63 * specs run against 1.8.7, 1.9.2-head, jruby, and rubinius(rbx) using rvm
64 1.2.0 * Release 1.2.0 series
aaa0ce9 @olbrich update changelog to reflect 1.9 compatibility
authored
65 2010-11-07 1.2.0.a * a bunch of fixes to make ruby-units ruby 1.9 compatible
66 (ruby 1.9.3dev (2010-11-07 trunk 29711) [i386-darwin9.8.0])
dbf0221 @olbrich clean up some bugs and remove pkg directory
authored
67 2010-03-16 1.1.5 * another bugfix, and update url to point to github
68 2010-03-15 1.1.4 * fixed a couple of outstanding bugs
a67cc52 @olbrich Initial checkin
authored
69 2007-12-13 1.1.3 * fixed a minor bug with string %
70 2007-12-12 1.1.2 * fixed a bug with format strings
71 * detect if ruby 1.8.6 is installed and use its' to_date function
8343c28 @olbrich changelog & whitespace in rakefile
authored
72
a67cc52 @olbrich Initial checkin
authored
73 2007-07-14 1.1.1 * fixed bug that would prevent creating '<pound-mass>' units, which
74 prevented rounding from working
75 * tests do not fail if Uncertain gem is not installed, you just get an
76 annoying warning message
8343c28 @olbrich changelog & whitespace in rakefile
authored
77
a67cc52 @olbrich Initial checkin
authored
78 2007-01-28 1.1.0 * completely revamped the temperature handling system (see README)
79 * fixed some spelling errors in some units
80 * fixed to_datetime and to_date to convert durations to datetimes and dates'
81
8343c28 @olbrich changelog & whitespace in rakefile
authored
82 2007-01-24 1.0.2 * Minor changes in the way powers are calculated to support Uncertain
a67cc52 @olbrich Initial checkin
authored
83 numbers better.
84 * Fixed parsing bug with Uncertain Numbers
85 * added resolution / typography units (pixels, points, pica)
86 Note that 'pt' means 'pints' and not 'points'
87 * added some pressure units ('inHg' & 'inH2O')
88 * changed default abbreviation of 'knots' to 'kt'
89 * Changed directory layout
90 * fixed a minor bug with Time.to_date so comparisons work properly
91
92 2007-01-17 1.0.1 * Force units are now defined correctly.
93
94 2007-01-12 1.0.0 * Improved handling of complex numbers. Now you can specify
95 '1+1i mm'.unit to get a complex unit.
96 * Taking the root of a negative unit will give you a complex unit
97 * fixed unary minus to work again
8343c28 @olbrich changelog & whitespace in rakefile
authored
98 * Math.hypot now takes units. Both parameters must be the compatible
99 units or it will assert. Units will be converted to a common base
a67cc52 @olbrich Initial checkin
authored
100 before use.
8343c28 @olbrich changelog & whitespace in rakefile
authored
101 * Can now specify units in rational numbers, i.e., '1/4 cup'.unit
a67cc52 @olbrich Initial checkin
authored
102 * Seems like a good time to move to 1.0 status
8343c28 @olbrich changelog & whitespace in rakefile
authored
103
a67cc52 @olbrich Initial checkin
authored
104 2006-12-15 0.3.9 * forgot to increment the version in the gem file..ooops.
105
8343c28 @olbrich changelog & whitespace in rakefile
authored
106 2006-12-15 0.3.8 * Any object that supports a 'to_unit' method will now be
a67cc52 @olbrich Initial checkin
authored
107 automatically coerced to a unit during math operations.
8343c28 @olbrich changelog & whitespace in rakefile
authored
108
a67cc52 @olbrich Initial checkin
authored
109 2006-12-14 0.3.7 * improved handling of percents and added a 'wt%' unit
110 equivalent to 1 g/dl.
111 * Improved handling for units with non-alphanumeric names
112 (like ' for feet, # for pound)
113 * Now you can enter durations as "HH:MM:SS, usec" or
114 "HH:MM:SS:usec"
115
116 2006-12-05 0.3.6 * Fixed bug where (unit/unit).ceil would fail
117
118 2006-11-20 0.3.5 * Minor bug fixes
119 * to_int now coerces the result to an actual Integer,
120 but only works properly for unitless Units.
121
8343c28 @olbrich changelog & whitespace in rakefile
authored
122 2006-10-27 0.3.4 * Fixed a few more parsing bugs so that it will properly
a67cc52 @olbrich Initial checkin
authored
123 complain about malformed units.
124 * Fixed a bug that prevents proper use of percents
8343c28 @olbrich changelog & whitespace in rakefile
authored
125 * several minor tweaks
a67cc52 @olbrich Initial checkin
authored
126 * some improved Date and DateTime handling
127 * can convert between Date, DateTime, and Time objects
128 * Time math will now return a DateTime if it goes out of
129 range.
130
8343c28 @olbrich changelog & whitespace in rakefile
authored
131 2006-10-03 0.3.3 * Apparently I can't do math late at night.
a67cc52 @olbrich Initial checkin
authored
132 Fixed a bug that would cause problems when adding
8343c28 @olbrich changelog & whitespace in rakefile
authored
133 or subtracting units to a unit with a zero scalar.
a67cc52 @olbrich Initial checkin
authored
134 * Date and DateTime objects can be converted to 'units'
135
8343c28 @olbrich changelog & whitespace in rakefile
authored
136 2006-10-03 0.3.2 * More minor bug fixes
a67cc52 @olbrich Initial checkin
authored
137 (now fixes a minor name collision with rails)
138
139 2006-10-02 0.3.1 * minor bug fixes
140
141 2006-10-02 0.3.0 * Performance enhanced by caching results of many
142 functions (Thanks to Kurt Stephens for pushing this.)
143 * Throws an exception if the unit is not recognized
8343c28 @olbrich changelog & whitespace in rakefile
authored
144 * units can now identify what 'kind' they are
a67cc52 @olbrich Initial checkin
authored
145 (:length, :mass, etc..)
8343c28 @olbrich changelog & whitespace in rakefile
authored
146 * New constructors:
147 Unit(1,"mm")
a67cc52 @olbrich Initial checkin
authored
148 Unit(1,"mm/s")
149 Unit(1,"mm","s")
150
151 2006-09-22 0.2.3 * added support for date/time parsing with the Chronic gem
152 parsing will use Chronic if it is loaded
153 * allows Date / Time / DateTime conversions
154 * better test coverage
155 * The 'string'.to_time returns a Time object
156 * 'string'.to_datetime returns a DateTime object
157 * 'string'.time returns a Time object or a DateTime if the
158 Time object fails
159 * 'string'.datetime returns a DateTime or a Time if the
8343c28 @olbrich changelog & whitespace in rakefile
authored
160 DateTime fails
161
a67cc52 @olbrich Initial checkin
authored
162 2006-09-19 0.2.2 * tweaked temperature handling a bit. Now enter
163 temperatures like this:
164 '0 tempC'.unit #=> 273.15 degK
165 They will always be converted to kelvin to avoid
166 problems when temperatures are used in equations.
167 * added Time.in("5 min")
168 * added Unit.to_unit to simplify some calls
8343c28 @olbrich changelog & whitespace in rakefile
authored
169
a67cc52 @olbrich Initial checkin
authored
170 2006-09-18 0.2.1 * Trig math functions (sin, cos, tan, sinh, cosh, tanh)
171 accept units that can be converted to radians
172 Math.sin("90 deg".unit) => 1.0
173 * Date and DateTime can be offset by a time unit
174 (Date.today + "1 day".unit) => 2006-09-19
175 Does not work with months since they aren't a consistent
176 size
177 * Tweaked time usage a bit
178 Time.now + "1 hr".unit => Mon Sep 18 11:51:29 EDT 2006
179 * can output time in 'hh:mm:ss' format by using
180 'unit.to_s(:time)'
8343c28 @olbrich changelog & whitespace in rakefile
authored
181 * added time helper methods
182 ago,
183 since(Time/DateTime),
184 until(Time/DateTime),
185 from(Time/DateTime),
a67cc52 @olbrich Initial checkin
authored
186 before(Time/DateTime), and
187 after(Time/DateTime)
8343c28 @olbrich changelog & whitespace in rakefile
authored
188 * Time helpers also work on strings. In this case they
a67cc52 @olbrich Initial checkin
authored
189 are first converted to units
190 '5 min'.from_now
191 '1 week'.ago
192 'min'.since(time)
193 'min'.until(time)
194 '1 day'.from()
195 * Can pass Strings to time helpers and they will be parsed
196 with ParseDate
197 * Fixed most parsing bugs (I think)
198 * Can pass a strftime format string to to_s to format time
199 output
200 * can use U'1 mm' or '1 mm'.u to specify units now
201
8343c28 @olbrich changelog & whitespace in rakefile
authored
202 2006-09-17 * can now use the '%' format specifier like
a67cc52 @olbrich Initial checkin
authored
203 '%0.2f' % '1 mm'.unit #=> '1.00 mm'
204 * works nicely with time now.
205 '1 week'.unit + Time.now => 1.159e+09 s
8343c28 @olbrich changelog & whitespace in rakefile
authored
206 Time.at('1.159e+09 s'.unit)
a67cc52 @olbrich Initial checkin
authored
207 => Sat Sep 23 04:26:40 EDT 2006
8343c28 @olbrich changelog & whitespace in rakefile
authored
208 "1.159e9 s".unit.time
a67cc52 @olbrich Initial checkin
authored
209 => Sat Sep 23 04:26:40 EDT 2006
210 * Time.now.unit => 1.159e9 s
211 * works well with 'Uncertain' numerics
212 (www.rubyforge.org/projects/uncertain)
213 * Improved parsing
8343c28 @olbrich changelog & whitespace in rakefile
authored
214
a67cc52 @olbrich Initial checkin
authored
215 2006-08-28 0.2.0 * Added 'ruby_unit.rb' file so that requires will still
216 work if the wrong name is used
217 * Added 'to' as an alias to '>>' so conversions can be
218 done as '1 m'.unit.to('1 cm')
219 * Added ability to convert temperatures to absolute values
220 using the following syntax:
221 '37 degC'.unit.to('tempF') #=> '98.6 degF'.unit
222 * Tweaked abbreviations a bit. 'ton' is now 'tn' instead
223 of 't'. It was causing parse collisions with 'atm'.
224 * fixed a bug in term elimination routine
225 * fixed a bug in parsing of powers, and added support for
226 'm**2' format
227 * Added support for taking roots of units. Just
228 exponentiate with a fraction (0.5, 1.0/3, 0.25)
229 * renamed 'quantity' to 'scalar'
230 * any type of Numeric can be used to initialize a Unit,
231 although this can't really be done with a string
232 * Units can not be forced to a float using to_f unless
233 they are unitless. This prevents some math functions
234 from forcing the conversion. To get the scalar, just
235 use 'unit.scalar'
236 * 'inspect' returns string representation
8343c28 @olbrich changelog & whitespace in rakefile
authored
237 * better edge-case detection with math functions.
a67cc52 @olbrich Initial checkin
authored
238 "0 mm".unit**-1 now throws a ZeroDivisionError exception
8343c28 @olbrich changelog & whitespace in rakefile
authored
239 * Ranges can make a series of units, so long as the end
a67cc52 @olbrich Initial checkin
authored
240 points have integer scalars.
241 * Fixed a parsing bug with feet/pounds and scientific
242 numbers
8343c28 @olbrich changelog & whitespace in rakefile
authored
243
a67cc52 @olbrich Initial checkin
authored
244 2006-08-22 0.1.1 * Added new format option "1 mm".to_unit("in") now
245 converts the result to the indicated units
246 * Fixed some naming issues so that the gem name matches
247 the require name.
248 * Added CHANGELOG
249 * Improved test coverage (100% code coverage via RCov)
250 * fixed a bug that prevented units with a prefix in the
251 denominator from converting properly
252 * can use .unit method on a string to create a new unit
253 object
254 * can now coerce or define units from arrays, strings,
255 numerics.
256 "1 mm".unit + [1, 'mm'] === "2 mm".unit
257 [1,'mm','s'].unit === "1 mm/s".unit
258 2.5.unit === "2.5".unit
259 * Added instructions on how to add custom units
8343c28 @olbrich changelog & whitespace in rakefile
authored
260
a67cc52 @olbrich Initial checkin
authored
261 2006-08-22 0.1.0 * Initial Release
Something went wrong with that request. Please try again.