Version 4.11.0
grizzled.util.withResource
is now implemented in terms ofscala.util.Using.resource
in 2.13 and in terms of a pared-down, backported version in 2.12 and 2.11. Similarly,grizzled.util.tryWithResource
is implemented in terms ofUsing.apply
. Both are marked@inline final
.- From this version forward, this library is released under the Apache Software License, version 2. Prior versions are still under the 3-Clause BSD license. See LICENSE.md for details.
Version 4.10.0
- Now requires Java 1.8 or better. (Upgrade, already.)
grizzled.file.util.makeTemporaryDirectory()
is deprecated. Usejava.nio.file.Path.createTempDirectory()
, instead.- Added
grizzled.file.util.tryWithTemporaryDirectory()
, which works likewithTemporaryDirectory
, except that it returns aTry
instead of throwing or propagating exceptions. - Added a version of
grizzled.file.util.copyTree
that takesjava.nio.file.Path
arguments. - Added a version of
grizzled.file.util.deleteTree
that takes ajava.nio.file.Path
argument. - Added a version of
grizzled.file.util.normalizePath
that takes ajava.nio.file.Path
argument.
Version 4.9.3:
- Upgraded to ScalaTest 3.0.8.
- Now cross-compiles against Scala 2.13.0.
Version 4.9.2:
- Merged in changes from @Philippus:
- Updated Scala 2.13 to 2.13.0-RC1
- Updaed various dependencies, including
sbt-wartremover
- Changed
Long
constants to use upper-caseL
, instead of deprecated lower-casel
. - Replaced deprecated symbol literals.
- Used explicit string conversion in some spots, to get past a wart-remover issue with interpolating non-string values.
Version 4.9.1:
- Added
grizzled.ScalaCompat.math.Ordering.Double.IeeeOrdering
,grizzled.ScalaCompat.math.Ordering.Double.TotalOrdering
,grizzled.ScalaCompat.math.Ordering.Float.IeeeOrdering
, andgrizzled.ScalaCompat.math.Ordering.Float.TotalOrdering
, which map to their appropriatescala.math.Ordering
counterparts for both 2.12 (and earlier) and 2.13 (and greater). This compatibility layer eliminates warnings in tester compilation.
Version 4.9.0:
- Implemented a better way to handle compatibility between Scala 2.13 and
earlier versions, one that requires less duplicate code, by providing
appropriate type aliases in a new, conditionally-compiled
grizzled.ScalaCompat
package. Functions that useStream
in 2.12 and earlier still useLazyList
in 2.13, but the implementation is better. Bumped the minor version, rather than the patch version, even though there aren't major API changes, because of the possible impact on compilation.
Version 4.8.0:
grizzled.file.util.listRecursively()
andgrizzled.file.Implicits.GrizzledFile.listRecursively()
now returnLazyList
for Scala 2.13. They still returnStream
for Scala 2.12 and earlier.- Various internal functions that used
Stream
have been tweaked to useLazyList
for 2.13.
These changes necessitated some refactoring, as well as the introduction
of src/main/pre-scala-2.13
and src/main/scala-2.13
directories to the
source code, to contain parallel implementations.
Version 4.7.1:
- Got rid of some of the 2.13.0 compiler deprecation warnings.
Version 4.7.0:
- Removed support for Scala 2.10.
- Updated to support Scala 2.13.0-M5 (with much help from @xuwei-k).
- Updated ScalaTest dependency, to support Scala 2.13.0.
- Updated various SBT plugins.
Version 4.6.0:
- This release doesn't change anything, but marks the release of a 4.6.x branch for Scala 2.10-only. The 4.7.x series (and greater) will not support Scala 2.10. This branching is necessary because of changes in the Scala collections library in 2.13; the collections compatibility library isn't available for 2.10.
Version 4.5.1:
- Change
/:
tofoldLeft
, since/:
is deprecated in Scala 2.13. (Thanks to @xuwei-k for the patch.)
Version 4.5.0:
- Merged PR #12, with fixes
and performance improvements for
grizzled.security.MessageDigest
, courtesy of @lespea. - Updated SBT to version 1.1.6.
- Enabled Wart Remover and many, but not all, of its errors. Cleaned up offending code.
- Various functions in
grizzled.math
andgrizzled.math.stats
(max()
,min()
,geometricMean()
, etc.) now take one fixed parameter and a variable argument list, instead of just a variable argument list, to ensure that they are always called with at least one parameter. grizzled.file.util
functions no longer throw exceptions.
Version 4.4.2:
- Fixed bug in
grizzled.file.util.glob()
that caused it to match non-existent files. - Added
coursier
to SBT.
Version 4.4.1:
- Changed
grizzled.datetime.EnhancedDuration
togrizzled.datetime.EnrichedDuration
, for consistency.
Version 4.4.0:
- Added
grizzled.datetime.EnhancedDuration
class, with ahumanize
method that provides more human-readable string representations forDuration
objects. grizzled.net.UDPDatagramSocket
now extendsAutoCloseable
.
Version 4.3.0:
- Added
replaceFirstChar()
toGrizzledString
. - Added
grizzled.file.util.longestCommonPathPrefix()
- Updated version of Lightbend Activator.
- Updated version of Scalatest.
- Updated version of SBT.
- Removed copyrights from some more source files, as they're hard to maintain.
Version 4.2.0:
- Added
RandomUtil.randomLongBetween()
.
Version 4.1.0:
- Added
grizzled.random.RandomUtil
, containing some random number helper functions. - Changed
grizzled.file.Includer
to use aList
, internally, rather than aStack
. - Added
grizzled.datetime.DateTimeUtil
, with a couple useful datetime-related functions. - Added
grizzled.datetime.Implicits
to provide enrichment classes forjava.util.Date
,java.util.Calendar
andjava.sql.Timestamp
. - Removed custom matchers trait and
scala.util.Try
custom matcher in testers, in favor of ScalaTest'sshouldBe 'success
andshouldBe 'failure
.
Version 4.0.0:
Contains breaking API changes.
- Moved implicit evidence objects for
CanReleaseResource
into a sub-object (Implicits
) within theCanReleaseResource
companion, to alleviate confusion in Scala 2.12.0. They should be imported explicitly, not with a wildcard import, e.g.,import grizzled.util.CanReleaseResource.Implicits.CanReleaseCloseable
. - Added a
CanReleaseResource
evidence parameter forjava.lang.AutoCloseable
.
Version 3.1.0:
- Built for Scala 2.12.0.
- Fixed
grizzled.net.URLUtil
so that downloads don't bail with ajava.nio.file.FileSystemNotFoundException
for non-file URLs.
Version 3.0.0:
Contains breaking API changes.
- Bumped cross-compiled build from Scala 2.12.0-M5 to 2.12.0-RC1.
- Removed
grizzled.either.Implicits.RichEither
. The methods it contains are part ofEither
in Scala 2.12 (though are implemented somewhat differently). - The
sub()
method ingrizzled.string.template.StringTemplate
now returns aTry
, instead of anEither
. grizzled.parsing.Pushback.pushback(List[T])
is now calledpushbackMany()
.- Removed the following classes, which have been deprecated for some time:
grizzled.io.RichInputStream
grizzled.io.RichReader
grizzled.parsing.IteratorStream
grizzled.collection.MultiIterator
- Removed the following methods/functions, which have deprecated for some time:
grizzled.parsing.Pushback.totalRead
grizzled.parsing.SafeIterator.totalRead
.grizzled.file.Implicits.GrizzledFile.walk
grizzled.sys.systemProperties
Version 2.8.0:
- Added
grizzled.file.util.joinAndNormalizePath
, which combines the functionality ofjoinPath
with that ofnormalizePath
. - Fixed
grizzed.file.util.deleteTree()
to return successfully if the directory doesn't exist, instead of failing.
Version 2.7.0:
- Added
tryWithResource
, a version ofgrizzled.util.withResource
that returns aTry
. - Upgraded to ScalaTest 3.0.0, release version.
Version 2.6.0:
- Added an implicit
mapWhile()
function for use with collection types. - Un-deprecated
grizzled.config.Configuration
. It's still used by tools like AVSL - Corrected a bug in
grizzled.file.Includer
that prevented the final read from completing in certain circumstances.
Version 2.5.0:
- Added
grizzled.string.util.longestCommonPrefix()
. - Bumped cross-compiled build from Scala 2.12.0-M4 to 2.12.0-M5.
- Upgraded ScalaTest to 3.0.0-RC4.
Version 2.4.2:
- Fixed
grizzled.zip.Zipper
so that flattened zips don't end up with a spurious "." directory.
Version 2.4.1:
- Deprecated
grizzled.config.Configuration
. If you need a good configuration file format, use YAML or HOCON. - Various fixes for Windows, including:
- Changed various classes to use use the
line.separator
property, rather than a hard-coded "\n", when adding line terminators. - Changed how
grizzled.net.URLUtil
resolves parent directories.
- Changed various classes to use use the
- Removed
BrainDeadHTTPServer
(used during testing) as it overly complicates testing.file:
URLs are now used instead.
Version 2.4.0:
- Removed use of
asInstanceOf
ingrizzled.io.Implicits.RichReader
andgrizzled.io.Implicits.RichInputStream
. - Deprecated
grizzled.collection.MultiIterator
. It's not necessary: Use the ScalaIterator
class's++
operator to combine multiple iterators lazily. - Added tester for
grizzled.io.MultiSource
. - Reimplemented
grizzled.math.max()
andgrizzled.math.min()
to work with any type for which there is anOrdering
. Added a unit tester for them. - Fleshed out
grizzled.io.SourceReader
implementation and added unit test. - Converted
grizzled.string.WordWrapper
to be more functional (i.e., got rid of allvar
usages). - Renamed
IteratorStream
(ingrizzled.parsing
) toSafeIterator
, to avoid confusion with Scala streams.IteratorStream
is now a deprecated alias. - Deprecated
IteratorStream.count()
, as its functionality is better handled by callers that care. - Converted uses of
var
ingrizzled.string.template
classes toval
. - Added some unit tests for the classes in
grizzled.parsing
. - DOCS: Added package description for
grizzled.zip
.
Version 2.3.1:
- Fixed bug in
Zipper (incorrect comparison between
Stringand
Char`). - Cleaned up various unused imports.
Version 2.3.0:
- Added
grizzled.zip.Zipper
class, which makes creating zip files and jar files easier than using the JDK classes or the Apache Commons Compress classes. In particular,Zipper
simplifies the handling and creation of the intermediate directories that contain zip entries. See the docs for details. grizzled.io.RichReader
andgrizzled.io.RichInputStream
havecopyTo()
methods that previously returned Unit and threw exceptions on error. They now returnTry
objects.grizzled.file.GrizzledFile
(an enrichment ofjava.io.File
) now supports apathExists
method that returns aTry
.
Version 2.2.2:
- Miscellaneous cleanup of unit tests.
Version 2.2.1:
- Rearranged some code to fix a compilation bug (JDK 1.7, Scala 2.11, on Ubuntu) that appears to be related to SI-2905.
- Fixed
GrizzledString.translateMetachars
so that it compiles in the Travis CI environment. The pattern match was too complicated for that environment, which means it might have failed elsewhere, too.
Version 2.2.0:
- Implemented a simpler, more elegant version of
GrizzledString.translateMetachars()
. grizzled.config.Configuration
changes:- Restored ability of
grizzled.config.Configuration
to expand metacharacters in non-raw values. - Deprecated the
grizzled.config.Configuration.apply()
functions, in favor ofread()
functions that returnTry
(instead ofEither
). - Changed
grizzled.config.ValueConverter
to require overriding aTry
-based function, rather than anEither
-based function. - Added implicit value converters for
Double
andFloat
. - Restored (broken) ability to specify a "not found" function.
- Restored ability of
Version 2.1.0:
- Removed unused
lib
directory and its containedjar
files. grizzled.string.WordWrapper
is now a case class.- Fixed wrapping in
grizzled.string.WordWrapper
to handle specified "ignore" characters in the prefix, not just in the wrapped text. - Deprecated the implicit conversions in
grizzled.io.RichReader
andgrizzled.io.RichInputStream
. Importgrizzled.io.Implicits._
to get the same conversions. - Refactored some of the test classes.
- Added a
tryGet()
method togrizzled.config.Configuration
, as a move toward getting rid ofEither
.
Version 2.0.1:
- Fixed
GrizzledString.translateMetachars
. It was not properly parsing Unicode escapes that are embedded in other strings. It would fail on "Here\u0160123", for instance. - Added a
CanReleaseResource
object forscala.io.Source
, which doesn't extendjava.io.Closeable
. This allowswithResource()
to work withscala.io.Source
objects, without the user having to write a customCanReleaseResource[Source]
object. (Pull request from Adam Lesperance.)
Version 2.0.0 (Incompatible API changes):
- Added
grizzled.net.URI
andgrizzled.net.URL
front-end case class wrappers for the Java equivalents. - Renamed
grizzled.net.url
togrizzled.net.URLUtil
. Modified the variousdownload()
methods to returnFuture
, and added versions that takegrizzled.net.URL
. - Modified the synchronous
grizzled.net.URLUtil.withDownloadedFile()
to take atimeout
parameter. Added a version that takesgrizzled.net.URL
. - Added unit tests for
grizzled.net.URLUtil
download functions. - Added
grizzled.util.Implicits.RichTry
enrichment class. - Fixes to
grizzled.file.Includer
:- Fixed some problems with URI parsing.
- Fixed uses of
scala.io.Source
andjava.net.URI
, to correct problems with detecting the parent location for a relative include. - Added comments indicating that doing an
include
from ascala.io.Source
can make it difficult to infer the location of a relative include, depending on the underlying resource theSource
is reading. - Changed
Includer
companion object constructors to returnscala.util.Try
, instead of throwing an exception. - Added constructors that take
java.io.File
. - Made class constructor private. Use the
Includer.apply()
functions. - Added unit tester.
- Removed deprecated
grizzled.readline
package. Use JLine 2, instead. - Removed
grizzled.cmd
. It was a nice idea (based on the concepts in the Python cmd module), but it's not being used, really. - Deprecated
grizzled.sys.systemProperties
. Use scala.sys.SystemProperties or scala.util.Properties, instead. - Removed deprecated versions of
withCloseable
. Usegrizzled.util.withResource
, instead. - Remove the following deprecated objects. The corresponding implicit classes
remain, but they're enabled by importing from a corresponding
Implicits
object (for consistency).grizzled.collection.GrizzledIterable
grizzled.collection.GrizzledLinearSeq
grizzled.collection.CollectionIterator
grizzled.file.GrizzledFile
grizzled.io.GrizzledSource
grizzled.string.GrizzledChar
grizzled.string.GrizzledString
- Fixed implementation of
grizzled.math.stats.mode
to be purely immutable (i.e., not to use a mutableMap
under the covers) and to use theCollection
API'smax
method, instead of rolling its own.
Version 1.6.1
- Added an explicit conversion from
grizzled.net.IPAddress
tojava.net.InetAddress
. An explicit conversion already exists for the other direction, and implicit conversions already exist in both directions. - Built against Scala 2.12-M4, instead of -M1.
Version 1.6.0:
- Now compiles against Scala 2.12, as well as 2.11 and 2.10.
- Added
activator
, for a self-bootstrapping build. - Removed unused dependency on
scala-async
andscala-actors
. - Added a better message when a
CanReleaseResource
implicit evidence parameter cannot be found forgrizzled.util.withCloseable()
. - Added
GrizzledString.escapeNonPrintables
andGrizzledChar.isPrintable
methods. - Added
toTry
method to the richEither
class, to convert anEither
to aTry
.
Version 1.5.1:
- Cleaned up some warnings identified by IntelliJ.
- Deprecated
grizzled.util.withCloseable()
andgrizzled.io.util.withCloseable()
in favor ofgrizzled.util.withResource()
. - Added some unit tests for the
grizzled.file.util.eglob()
andgrizzled.file.util.glob()
functions. - Converted remaining unit tests from ScalaTest's
FunSuite
toFlatSpec
. - Deprecated enrichment classes that aren't inside objects called
Implicits
, and addedImplicits
objects where appropriate, for consistency.
Version 1.5.0:
- Modified
grizzled.string.WordWrapper
to allow specification of characters that should be ignored when calculating wrapping. - Removed some deprecated methods and classes that have been around for awhile.
- Added
+
,++
,-
and--
methods togrizzled.config.Configuration
, to allow addition to and removal from aConfiguration
in an immutable way. - Updated ScalaTest to 2.2.6 and scala-async to 0.9.5.
Version 1.4.0:
- Added
grizzled.net.IPAddress
functions and methods to handle converting IP addresses to and from numeric values. - Added a version of
IPAddress.apply()
that takes ajava.net.InetAddress
. - Added
grizzled.net.IPAddress.parseAddress()
, to parse a non-hostname IP address without incurring a DNS lookup penalty. - Cleaned up code in
grizzled.net.IPAddress
. - Converted various functions to return
Try
instead ofEither
. - Removed use of deprecated Scala
IterableProxy
trait. - Deprecated the
grizzled.readline
package. Use JLine2, instead. - Build cleanups: Removed SBT "ls" plugin and removed stray repos.
- Cleaned up Scaladoc warnings.
Version 1.3:
grizzled.config.Configuration
wasn't properly handling custom regular expressions for parsing section names and comments. Fixed by Stefan Schlott (@Skyr).
Version 1.2:
grizzled.config.Configuration
is now completely immutable. Specifically, the following changes have been made:- Explicit conversion methods (e.g.,
getInt()
,getBoolean()
) have been removed, in favor of newasOpt[T]()
andasEither[T]()
methods. These new methods take an implicitValueConverter
object, allowing callers to specify their own type conversions. Some predefined converters are available in thegrizzled.config.Configuration.Implicits
package. - It is now possible to specify a "not found" handler, when constructing
a
Configuration
object, to handle cases where an option was not found. - The
Configuration
class is now final, because the constructor is now private. - All
Configuration
objects must be instantiated through the companionConfiguration
object. - All methods throwing exceptions have either been deprecated or removed.
Implication: Non-safe configuration objects (i.e., those that throw
exceptions for variables that cannot be substituted) are not supported.
However,
asEither()
will properly handle that situation. - Most exceptions have been removed, except those still thrown by deprecated methods.
- Explicit conversion methods (e.g.,
grizzled.string.util.stringToBoolean()
is deprecated, as it throws an exception. Use the newstr2Boolean()
instead; it returns anEither
.- Removed exceptions from
grizzled.string.StringTemplate
. Thesubstitute()
method is now deprecated (because it throws exceptions) in favor of thesub()
method (which returns anEither
). grizzled.url.download()
now returns anEither
, instead of throwing an exception on error.- The functions in
grizzled.file.util
and the methods ingrizzled.file.GrizzledFile
now returnEither
, instead of throwing exceptions. - Implicits in the
grizzled.net.inet
class are now in a specialImplicits
object.
Version 1.1.6:
- Removed the
grizzled.generator
package, as it relies on the unsupported and unmaintained Scala continuations plugin. - Changed
grizzled.file.util.listRecursively()
to use ScalaStream
objects, which permit lazy evaluation. It's a better, and simpler, solution than continuation passing. - Now cross-compiled for Scala 2.11.
- Published to Bintray.
- Updated to SBT 0.13.2
Version 1.1.5:
- Added
grizzled.either
, which contains enrichments for theEither
class, includingmap()
andflatMap()
methods that map when the value isRight
(and permits easier use ofEither
objects infor
comprehensions). - Increased file copying speed in
grizzled.io.RichInputStream
by adding buffering. (Fix supplied by Jim Fulton grizzled.math.stats.range()
of a single value now returns 0, as it should. Addresses Issue #4- Upgraded to latest version of ScalaTest.
Version 1.1.4:
- Added
grizzled.string.util.bytesToHexString
. - Added
grizzled.security.MessageDigest
, a simplified interface to the JavaMessageDigest
capability.
Version 1.1.3:
- API documentation changes.
- Built for Scala 2.10 release.
- Removed a bunch of deprecated methods.
- Updated ScalaTest version.
- Addressed Issue #4:
stats.range()
broken when passed a single value.
Version 1.1.2:
- Cross-compiled and published for Scala 2.10.0-RC1.
- Converted to use ScalaTest 2.0, which changes
expect
toexpectResult
.
Version 1.1.1:
- Re-integrated Doug Tangren's (outstanding) ls SBT plugin.
Version 1.1.0:
- Built for the Scala 2.10.0 series only (2.10.0-M7, initially). This version, and later versions, are 2.10-only. 2.9.x and earlier will be supported via the 1.0.x release branch. This is due to changes in the Scala library between 2.9 and 2.10.
- Converted code to use 2.10 reflection API.
- Added
-feature
toscalac
options, and removed all feature warnings. In many cases, this simply necessitating importing variousscala.language
packages, such asscala.language.reflectiveCalls
andscala.language.implicitConversions
. - Removed use of
val
infor
comprehensions, as it's now deprecated. - Upgraded build to SBT 0.12.
- Moved
GrizzledFile.listRecursively()
functionality fromGrizzledFile
(which is intended to enhancejava.io.File
implicitly) togrizzled.file.util
package, where it is more easily invoked directly. ReplacedGrizzledFile.listRecursively()
with a simple wrapper that invokesgrizzled.file.util.listRecursively()
. - Converted use of
scala.collection.JavaConversions.IterableWrapper
(which is deprecated in 2.10) toscala.collection.convert.JIterableWrapper
.
Version 1.0.14:
- Addressed Issue #4:
stats.range()
broken when passed a single value.
Version 1.0.13:
- Cross-compiled for Scala 2.9.2.
Version 1.0.12:
- Readline implementation now uses Jline 2.
- Cross-compiled for Scala 2.9.1-1.
Version 1.0.11.1:
- Cross-compiled for Scala 2.8.2.
Version 1.0.11:
- Fixed cross-compilation issues. Grizzled-Scala is, once again, cross- compiled and cross-published for 2.8.0, 2.8.1, 2.9.0, 2.9.0-1 and 2.9.1.
Version 1.0.10:
- Fixed
grizzled.sys.makeNativePath
and related functions to treat the Mac platform the same as Posix, instead of throwing an exception. - Updated to use SBT 0.11.2.
- Now publishes artifacts to
oss.sonatype.org
. Artifacts are signed with GPG key, as a result.
Version 1.0.9:
- Fixed
grizzled.readline
so that a newline in the prompt doesn't returnNone
(for EOF). - Based on pull request #3, by Dan Sully, added the following
features to
grizzled.config
:- Section name regular expression can now be specified to
Configuration
objects, thus allowing alternate section name forms. - Comment regular expression can now be specified to
Configuration
, allowing alternate comment syntaxes. Configuration
now supports atgetAsList()
method, which returns a value split into a string list. Delimiters may be specified. The value returned is of typeOption[List[String]]
.
- Section name regular expression can now be specified to
Version 1.0.8:
- Fixed an off-by-one error in
grizzled.collection.ListIterator
- Cleaned up Scaladocs considerably.
- Converted code to confirm with standard Scala coding style.
- Now builds for Scala 2.9.1, as well as 2.9.0-1, 2.9.0, 2.8.1 and 2.8.0.
Version 1.0.7:
- Now builds against Scala 2.9.0.1, as well as Scala 2.9.0, 2.8.1 and 2.8.0.
- Converted to build with SBT 0.10.1
Version 1.0.6:
- Now builds against Scala 2.9.0, as well as Scala 2.8.0 and 2.8.1.
- Updated to version 1.4.1 of ScalaTest for Scala 2.9.0. (Still uses ScalaTest 1.3, for Scala 2.8).
- Updated to use SBT 0.7.7.
- Removed various deprecated methods.
- Corrected implementation of
grizzled.reflect.isOfType
for non-primitives.
Version 1.0.5:
- Miscellaneous internal cleanup of
Configuration
andgrizzled.readline
code. - Updated to version 1.3 of ScalaTest.
Version 1.0.4:
- Fixed some error messages in the
Configuration
class, per an email from brian.ewins /at/ gmail.com.
Version 1.0.3:
- Now builds against Scala 2.8.1 and 2.8.0.
- Added
range()
function to thegrizzled.math.stats
module. - Enhanced
grizzled.readline
module to permit the caller-suppliedCompleter
object to specify the delimiters to use when tokenizing an input line for tab completion. - Enhanced
grizzled.cmd
module to allow the caller to instantiate theCommandInterpreter
class with the set of delimiters to use when tokenizing an input line for tab completion.
Version 1.0.2:
- Added the
grizzled.math.stats
module, which contains some common statistics functions. - Scaladoc documentation is now generated with a proper title.
- Fixed problem where
grizzled.cmd
failed to find a Readline library, because of an inadvertent change of a constant from adef
to aval
. - Now compiles against Scala 2.8.1 RC2, as well as 2.8.0.
Version 1.0.1:
- Now compiles against Scala 2.8.1 RC1, as well as 2.8.0
Version 1.0:
- Now published to the Scala Tools Nexus repository, so it's no longer necessary to specify a custom repository to find this artifact.
Version 0.7.4:
-
Added
grizzled.reflect
module andgrizzled.reflect.isOfType()
method, which usesscala.reflect.Manifest
to simplify erasure-proof type tests. e.g.:def test(v: Any) = { import grizzled.reflect._ if (isOfType[List[Int]](v)) ... else if (isOfType[List[Char]](v)) ... ... }
-
Moved
grizzled.parsing.markup
to the new, separate MarkWrap library. Among other things, this move keeps the Grizzled Scala library more focused and reduces transitive dependencies. -
Removed most explicit matches against
Some
andNone
, making better use of the Scala API. -
Updated to released 1.2 version of ScalaTest.
-
Changed dependency on ScalaTest to be a test-only dependency.
Version 0.7.3:
- Updated to build with Scala 2.8.0.final only.
Version 0.7.2:
- Updated to Knockoff version 0.7.2-13, which corrects some Markdown translation bugs.
- Updated to Scala 2.8.0.RC5. Now builds against RC3 and RC5 only.
Version 0.7.1:
- Bumped to SBT version 0.7.4.
- Added
relativePath
method toGrizzledFile
. - Added ability to "parse" (i.e., emit) plain text and HTML/XHTML to the
grizzled.parsing.markup
package. - Updated to Knockoff version 0.7.1-12, which corrects some Markdown translation bugs.
- Fixed
grizzled-scala
artifact publishing bug (issue #1). - Removed support for Scala 2.8.0.RC2.
- Changed SBT publishing to use an SSH key file, to eliminate the Ivy Swing prompt.
Version 0.7:
- Added
grizzled.io.GrizzledSource
, which extendsscala.io.Source
with mixin methods. - Deprecated
grizzled.string.implicits
andgrizzled.file.implicits
modules, in favor of more granular imports. See thegrizzled.file.GrizzledFile
,grizzled.string.GrizzledString
andgrizzled.string.GrizzledChar
companion objects for details. - Deprecated the string-to-boolean implicit function, in favor of the
more explicit
grizzled.string.util.stringToBoolean()
method. - Changed
GrizzledFile.listRecursively
to take an optionaltopdown
flag, indicating whether directory traversal should be top-down or bottom-up. - Deprecated
grizzled.parsing.Markdown
in favor of newgrizzled.parsing.markup
module. - Add Textile support to
grizzled.parsing.markup
, via the Eclipse WikiText library. - Changed
grizzled.parsing.markup
to use Tristan Juricek's Knockoff library for Markdown, rather than invoking the Showdown JavaScript parser via Rhino. - Now compiles under Scala 2.8.0.RC3 and RC2. Dropped support for RC1.
Version 0.6:
- Added
findReadline()
convenience method togrizzled.readline.Readline
. This method attempts to find and load a suitable Readline library. - Cleaned up
grizzled.file.util.deleteTree
method. - Added versions of
grizzled.file.util.copyFile
,grizzled.file.util.copyTree
, andgrizzled.file.util.deleteTree
that takejava.io.File
objects. - Replaced
grizzled.io.useThenClose
with the more flexiblegrizzled.io.withCloseable
. (useThenClose
is still present, but it's deprecated.) - Added
copyTo()
method togrizzled.file.GrizzledFile
, which can be implicitly mixed intojava.io.File
. - Ensured that various supposedly tail-recursive methods are marked with
@tailrec
, to be sure. - Maven artifact now includes Scala version (e.g.,
grizzled-scala_2.8.0.RC2
, instead ofgrizzled-scala
). - Updated to build against Scala 2.8.0.RC2, as well as Scala 2.8.0.RC1.
Version 0.5.1:
- Updated to
posterous-sbt
plugin version 0.1.5. - Removed CHANGELOG, because it can now be generated by
posterous-sbt
. - Added
grizzled.generator
, which can be used to create Python-style generators. (It borrows shamelessly from Rich Dougherty's Stack Overflow post.) - Added
listRecursively()
generator function togrizzled.file.GrizzledFile
. Via implicits,GrizzledFile
can be used to extendjava.io.File
. - The
grizzled.readline.Readline
trait now contains acleanup
method, and thegrizzled.cmd.CommandInterpreter
class now calls it on exit. This change ensures that the terminal isn't left in a weird state.
Version 0.5:
- Updated to Scala 2.8.0.RC1.
- Replaced uses of now-deprecated
Math
functions with corresponding functions fromscala.math
. - Enhanced
grizzled.config.Configuration
:- A
forMatchingSections()
method allows simple looping over sections that match a regular expression. - A
matchingSections()
methods returns a sequence of sections that match a regular expression. - The
options()
method now returns an empty map if the section doesn't exist, instead of throwing an exception. - A new
setOption()
method overwrites an option value, if it exists already, instead of throwing aDuplicateOptionException
, asaddOption()
does. ConfigurationReader
is deprecated, and the logic to read a configuration file has been moved into theConfiguration
class, to permit easier subclassing.- Now supports a "safe load" mode, where exceptions aren't thrown.
- Added unit tests for the
Configuration
class. - Added ability to retrieve converted integer and boolean option values.
- The
option()
methods are now deprecated, in favor of newget()
andgetOrElse()
methods that are modeled after theirMap
counterparts. - Added a new
getSection()
method that returns anOption[Section]
.
- A
Version 0.4.2:
- Updated to SBT version 0.7.3.
- Added
withDownloadedFile()
togrizzled.net.url
, to execute a block on a downloaded URL. - The
grizzled.io.implicits
module has been replaced by individual modules, for more granular scope control (e.g.,grizzled.io.RichInputStream
,grizzled.io.RichReader
) - The
grizzled.io
package has been split into individual source files. - Added new
grizzled.io.SourceReader
class that wraps ascala.io.Source
inside ajava.io.Reader
.
Version 0.4.1:
- Fixed inadvertent bug in
grizzled.cmd
command handling, when commands span multiple lines.
Version 0.4:
- Added
grizzled.collection.GrizzledLinearSeq
and related implicits, as a place to put additional methods for sequences. - Added
grizzled.collection.GrizzledLinearSeq.columnarize()
, which takes a sequence (e.g., a list), converts its contents to strings, and returns a single string with the sequence's contents arranged in columns. - Rearranged the locations of various implicit functions, so callers can have finer-grained control over which ones are in scope.
grizzled.editline.EditLine
now shows its completions in columnar format.- Added
BlockCommandHandler
togrizzled
.cmd, to handle commands consisting of blocks of lines between a start and end line. - Added
HiddenCommandHandler
togrizzled.cmd
, allowing special commands that are not displayed in the help. - Changed EOF handling in
grizzled.cmd
slightly. - Added
createTemporaryDirectory()
andwithTemporaryDirectory()
togrizzled.file.util
module. - Added
isEmpty
togrizzled.file.GrizzledFile
(which can be implicitly converted to and fromjava.io.File
). - Fixed problem with prefix handling in
grizzled.string.WordWrapper
. - Now uses SBT 0.7.2 to build from source.
Version 0.3.1:
grizzled.cmd
changes:
-
"history" command now uses the syntax
history [-n] [regex]
where n is the maximum number of entries to show, and regex is a regular expression to filter history entries. -
Some commands starting with "." were being incorrectly limited to a single character (e.g., ".r", but not ".read").
-
General clean-up and bug fixing in the "redo command" handler.
-
CommandHandler
classes can now exempt themselves from the history. -
The
RedoCommandHandler
(which handles the "r" and "!" commands) now exempts itself from the history.
Version 0.3:
- Converted to Scala 2.8.0
- Now must be compiled with SBT version 0.7.0 or better.
- Fixed tail call optimization problem in
grizzled.io.RichInputStream
. Thanks to Claudio Bley (cbley /at/ av-test.de) - Added grizzled.parsing.MarkdownParser, for parsing Markdown documents. (Currently uses the Showdown Javascript library, via Mozilla Rhino.)
grizzled.cmd.HelpHandler
now supports a ".help" alias.- Added
grizzled.util.withCloseable
control structure. - The grizzled.readline API now uses the Java EditLine wrapper for the Unix EditLine library, instead of the one in Java-Readline. implementation, instead of the one in Java-Readline. Completion handling is more reliable with the Java Editline implementation.
- grizzled.cmd now tries to load EditLine first.
Version 0.2:
- In
grizzled.cmd
, the default handler for the "help" command now does tab completion on the existing commands. - Changed the way
grizzled.readline
exposes completion context. Instead of exposing a cursor, it exposes a tokenized list, with a specialCursor
token. This approach fits better with Scala's pattern matching. grizzled.collection.MultiIterator
is now covariant, not invariant.- Miscellaneous internal changes where
yield
is used. - Changed license to New BSD License.
Version 0.1:
- Initial release.
- Fixed an off-by-one error in
grizzled.collection.ListIterator
- Cleaned up Scaladocs considerably.
- Converted code to confirm with standard Scala coding style.
- Now builds for Scala 2.9.1, as well as 2.9.0-1, 2.9.0, 2.8.1 and 2.8.0.