Commit graph

115 commits

Author SHA1 Message Date
Eric Merritt
558185b9b9 add a command line programming module to the system
This is a general module that helps output from command line
applications written in erlang.
2013-10-14 09:26:54 -07:00
Eric Merritt
79c5436c85 add utility type conversions to erlware commons 2013-10-14 09:26:47 -07:00
Jordan Wilberding
615d788cab Merge pull request #43 from choptastic/vim-patch
Add vi modelines to files. Ignore vim backup files
2013-09-17 05:12:02 -07:00
Jesse Gumm
8bc27f62fd Add vi modelines to files. Ignore vim backup files 2013-08-30 06:56:06 -05:00
Jordan Wilberding
0fbd4576ce Merge pull request #42 from ericbmerritt/next
minor bugfixes and cleanup
2013-04-24 11:12:01 -07:00
Eric B Merritt
417a4c3229 minor enhancements and cleanup to the makefile 2013-04-24 09:55:01 -07:00
Eric B Merritt
7e2c37e2f5 fix bug in rebuild introduced by new makefile changes 2013-04-24 09:54:59 -07:00
Eric B Merritt
8870c422ca minor updates from a new version of neotoma 2013-04-24 09:54:55 -07:00
Eric B Merritt
652fcc1e23 remove ec_file:consult/1 as it provides very little value Fixes #1 2013-04-24 09:54:34 -07:00
Jordan Wilberding
f36f333374 Merge pull request #40 from choptastic/fix-12pm
Fix Formatting AM/PM for 12PM ({Date,{12,0,0}})
2013-04-23 19:02:01 -07:00
Eric Merritt
a5b713c9bb Merge pull request #39 from seth/sf/soft-dep-neotoma
Make proper and neotoma development-time only dependencies
2013-04-23 17:40:05 -07:00
Jesse Gumm
e984618c3e Fix Formatting AM/PM for 12PM ({Date,{12,0,0}}) 2013-04-23 17:07:52 -05:00
Seth Falcon
d9c6ec1d28 Make proper and neotoma dev-only dependencies
This patch makes erlware_commons easier to include as a dependency by
removing depedencies that are not needed at run time.

The top-level Makefile creates a .DEV_MODE marker file which is
detected by rebar.config.script. When the marker file is present, the
development only dependencies proper and neotoma are included and a
macro 'DEV_ONLY' is defined. The macro is used to only enable the
proper tests for development mode.

The ec_semver_parser.peg is now located in priv/ and is moved into
src/ by the Makefile. The generated ec_semver_parser.erl is now under
version control; it need not be rebuilt by all projects wishing to
include erlware_commons. It will be rebuilt, as before this change, on
every make invocation.
2013-04-22 14:48:08 -07:00
Seth Falcon
38cd7a4d62 Use deps directory to trigger get-deps
A `make distclean` now removes the deps directory and all of its
contents. The default target now looks for the presence of the deps
directory to determine if `rebar get-deps compile` should be run. The
main benefit being that one can now do: `make distclean && make`
without a call to `make get-deps`. The get-deps target is left in
place for convenince and back compat.

The get-deps target was updated slightly to run get-deps and compile
as part of a single command. This should be slightly more efficient.
2013-04-22 12:58:47 -07:00
Seth Falcon
38141c5c24 Fix typo in typer target in Makefile
The typer target now works.
2013-04-22 12:44:59 -07:00
Tristan Sloughter
d806fbd119 Merge pull request #38 from ericbmerritt/next
Add contributing document
2013-04-09 15:52:14 -07:00
Eric B Merritt
a1fc04f2b7 Add contributing document 2013-04-09 15:40:31 -07:00
Eric B Merritt
1906888a05 Merge remote-tracking branch 'canonical/next' 2013-04-09 15:32:14 -07:00
Tristan Sloughter
d78358af0b Merge pull request #37 from ericbmerritt/next
make ec_file a bit more friendly to binary file names
2013-04-09 15:00:48 -07:00
Eric B Merritt
58e6b0476d support testing on r16 2013-04-09 10:51:13 -07:00
Eric B Merritt
17e08c04a2 make ec_file a bit more friendly to binary file names 2013-04-09 10:51:11 -07:00
Eric Merritt
fd505767e5 Merge remote-tracking branch 'canonical/next' 2013-03-15 08:43:27 -07:00
Jordan Wilberding
1cd615ef58 Merge pull request #35 from ericbmerritt/next
add file type discovery and resolution to ec_file
2013-03-14 20:46:01 -07:00
Eric Merritt
e1e30f4a75 add file type discovery and resolution to ec_file 2013-03-14 11:50:49 -07:00
Jesse Gumm
4ba12ec4ad Add disambig tests, add disambig parsing date-only
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2013-02-26 18:03:30 -05:00
Jesse Gumm
a2fac85ff6 Disambiguate parsing "Aug 12" and "12 Aug".
This started with just trying to parse the date format:

December 21st, 2013 7:00pm, which was failing with a bad_date error.

The solution involved setting up "Hinted Months", which was just a term
I used to indicate that a month was specified by name (ie "December"),
rather than by number (ie, "12"). Previously, named months were simply
replaced by their respective numbers in the parser.  This tags those
named months so that the parser will unambiguously parse them correctly.

A tagged "Hinted Month" is simply a tuple with the tag `?MONTH_TAG`. For
example: "December" gets converted to `{?MONTH_TAG, 12}`

For example: "Aug 12" and "12 Aug". It's clear to the *reader* what is
meant, but when converted to simply 8 and 12, the parser has no way of
knowing which is which.

Doing this was aided with the addition of some macros to help it
along, since doing just straight comparisons with the hinted months was
yielding unexpected results. For example: `{mon, 1} > 31`  returns
true, so changing that comparison to an ?is_year/1 macro that does:
`is_integer(Y) andalso Y > 31`.

It might not be a bad idea to help the parser be *very* unambiguous by
putting these macros on all comparisons.

Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2013-02-26 18:03:21 -05:00
Ben Kearns
97d39ec8db Added support for ISO8601 Zulu and TZ time zone support. Remove hard coded version string in rebar.config.script for unit test pass. Remove dializer and edoc from default target to enable tests to run on Travis-ci
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2013-02-26 17:58:08 -05:00
Ben Kearns
320813e56e Fixed type-o in .travis.yml
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2013-02-26 17:50:05 -05:00
Ben Kearns
4558635813 Fix broken tests.
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2013-02-26 17:49:38 -05:00
Ben Kearns
122af09cb1 Added more tests and fixed format string to be 24 hour vs 12 hour.
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2013-02-26 17:49:27 -05:00
Ben Kearns
5b23329d3a Added tests and validated parse->format->parse and nparse->format->nparse
Conflicts:

	src/ec_date.erl
2013-02-26 17:48:51 -05:00
Ben Kearns
5beeb3ff1b Fix for dializer error.
Conflicts:

	src/ec_date.erl
2013-02-26 17:44:31 -05:00
Ben Kearns
3437fc8c1c Another fix for spec messages.
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2013-02-26 17:43:03 -05:00
Ben Kearns
5c6af5c7f5 Added dializer fix for new date format.
Conflicts:

	src/ec_date.erl
2013-02-26 17:42:32 -05:00
Ben Kearns
e28130d9f3 Added parsing of ISO formats i.e. "2012-12-19T12:12:12.00001"
Conflicts:

	src/ec_date.erl
2013-02-26 17:40:13 -05:00
Eric Merritt
4811393957 Merge remote-tracking branch 'canonical/next' 2013-01-21 10:55:52 -08:00
Ben Kearns
5429ec2d14 Point rebar to fix of proper library for eunit.
Signed-off-by: Eric Merritt <ericbmerritt@gmail.com>
2013-01-21 10:51:11 -08:00
Ben Kearns
21c5f9fc74 Added parsing of ISO formats i.e. "2012-12-19T12:12:12.00001"
Signed-off-by: Eric Merritt <ericbmerritt@gmail.com>
2013-01-21 10:51:10 -08:00
Jordan Wilberding
0f409c0bf3 Merge pull request #32 from ericbmerritt/next
Next
2013-01-17 14:44:14 -08:00
Eric Merritt
74b0d7318d support parsing a version with a leading 'v'
This *should* make version parsing much, much simpler.
2013-01-17 14:31:45 -08:00
Eric Merritt
407ccf886f support printing erl_syntax meta calls in the same way as erl source
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2012-12-07 05:53:25 -07:00
Eric Merritt
95f723e1e0 make erlware_commons work on pre-R15 releases
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2012-12-07 05:53:21 -07:00
Eric Merritt
1a39438f3c Merge remote-tracking branch 'canonical/next'
* canonical/next:
  massively expand the documentation in the README
  bring ec_plists up to erlware standards
  replace ec_plists with Stephan's plists
  add Stephen Marsh's plists to the system
  reorder default tasks so dialyzer is run after compile
  add a clean and rebuild task to makefile
  add fullpath to the makefile
  enable the rebar semver plugin on erlware_commons
  cleanup the rebar config
  support non-numeric versions in major/minor/patch/minor-patch
  support reasonable versioning for erlware_commons
  add exists to ec_file
  fix bug in ec_file:copy/3 spec
  export mkdir_p (this should have been done already)
  support four primary version numbers of in parsing
  minor whitespace cleanup for ec_semver
  provide the ability to format a version into a string as well as parse a version
  make sure the docs get run as part of a bare make
  fixes for edoc compilation
  compilation utilities for the implementors
2012-10-30 13:03:29 -05:00
Eric Merritt
8d300f5d02 massively expand the documentation in the README
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2012-10-30 11:45:21 -06:00
Eric Merritt
c7717743ed bring ec_plists up to erlware standards
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2012-10-30 11:45:21 -06:00
Eric Merritt
31ebca114a replace ec_plists with Stephan's plists
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2012-10-30 11:45:21 -06:00
Eric Merritt
0e10d59b3a add Stephen Marsh's plists to the system
origin: http://code.google.com/p/plists/
detail: http://plists.wordpress.com/2007/09/20/introducing-plists-an-erlang-module-for-doing-list-operations-in-parallel/
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2012-10-30 11:45:21 -06:00
Eric Merritt
dda4c85586 reorder default tasks so dialyzer is run after compile
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2012-10-30 11:45:21 -06:00
Eric Merritt
1a1b87bf53 add a clean and rebuild task to makefile
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2012-10-30 11:45:21 -06:00
Eric Merritt
b5371974d1 add fullpath to the makefile
Signed-off-by: Jordan Wilberding <diginux@gmail.com>
2012-10-30 11:45:21 -06:00