Adam Lindberg [Mon, 8 Oct 2018 08:18:11 +0000 (10:18 +0200)]
Remove compatibility for R15 and R16
Closes #198.
Adam Lindberg [Wed, 8 Aug 2018 07:58:54 +0000 (09:58 +0200)]
Update changelog for version 0.8.12
Adam Lindberg [Wed, 8 Aug 2018 07:58:19 +0000 (09:58 +0200)]
Version 0.8.12
Adam Lindberg [Wed, 8 Aug 2018 07:38:24 +0000 (09:38 +0200)]
Check path and push release with Chandler
Adam Lindberg [Wed, 8 Aug 2018 07:36:36 +0000 (09:36 +0200)]
Keep storing history when reloading a mock
Fixes #194.
Adam Lindberg [Thu, 12 Jul 2018 09:55:06 +0000 (11:55 +0200)]
Minor markdown improvements
Adam Lindberg [Thu, 12 Jul 2018 09:36:53 +0000 (11:36 +0200)]
Update changelog for version 0.8.11
Adam Lindberg [Thu, 12 Jul 2018 09:35:47 +0000 (11:35 +0200)]
Version 0.8.11
Adam Lindberg [Thu, 12 Jul 2018 09:35:00 +0000 (11:35 +0200)]
Change publish script to cut script
Adam Lindberg [Thu, 12 Jul 2018 09:28:50 +0000 (11:28 +0200)]
Use latest OTP 20 and 21 versions
Adam Lindberg [Wed, 11 Jul 2018 11:14:41 +0000 (13:14 +0200)]
Update outdated donation information
mats cronqvist [Wed, 11 Jul 2018 09:46:58 +0000 (11:46 +0200)]
fix a buggy spec
mats cronqvist [Wed, 11 Jul 2018 09:46:06 +0000 (11:46 +0200)]
un-nest the `try' constructs
mats cronqvist [Tue, 10 Jul 2018 13:36:00 +0000 (15:36 +0200)]
don't hide 'try' behind macro
mats cronqvist [Wed, 4 Jul 2018 13:26:40 +0000 (15:26 +0200)]
use some preproc trickery to hide the OTP21 get_stacktrace change
There is no good solution if you want BOTH
a) be able to compile with both pre- and post-21 compilers
b) no warning (e.g. if you use warnings_as_errors)
This is, hopefully, one of the less bad hacks.
We introduce the macro 'try_with_stack/1' which runs it's argument inside a
try. It returns either {ok, Result} or {Class, Reason, Stacktrace}.
The macro has two different implementations; post-21 (try catch C:R:S) and
pre-21 (get_stacktrace/0).
We use the 'OTP_RELEASE' directive, which was introduced in 21, to decide
between post- and pre-21.
mats cronqvist [Wed, 4 Jul 2018 13:25:26 +0000 (15:25 +0200)]
fix some whitespace
mats cronqvist [Wed, 4 Jul 2018 13:22:35 +0000 (15:22 +0200)]
Line about 80 char line limit was 155 chars long
Adam Lindberg [Tue, 26 Jun 2018 07:01:13 +0000 (09:01 +0200)]
Update Changelog for version 0.8.10
Adam Lindberg [Tue, 26 Jun 2018 06:59:47 +0000 (08:59 +0200)]
Version 0.8.10
Adam Lindberg [Tue, 26 Jun 2018 06:54:01 +0000 (08:54 +0200)]
Improve publish script
Michal Piotrowski [Fri, 22 Jun 2018 12:55:05 +0000 (14:55 +0200)]
test meck with Erlang/OTP 21.0
Adam Lindberg [Thu, 3 May 2018 16:29:01 +0000 (18:29 +0200)]
Add module name to module_is_sticky error
Adam Lindberg [Thu, 3 May 2018 16:27:36 +0000 (18:27 +0200)]
Document undefined_module error
Adam Lindberg [Thu, 3 May 2018 16:25:57 +0000 (18:25 +0200)]
Raise error for passthrough without abstract code
Brujo Benavides [Mon, 22 Jan 2018 15:30:45 +0000 (12:30 -0300)]
Add meck:expects/1,2 to list mocked functions
PR #187 thanks to @elbrujohalcon and @miriampena
Adam Lindberg [Mon, 27 Nov 2017 12:01:08 +0000 (13:01 +0100)]
Specify repository manually for changelog gen
Adam Lindberg [Mon, 27 Nov 2017 12:00:49 +0000 (13:00 +0100)]
Update Changelog for version 0.8.9
Adam Lindberg [Mon, 27 Nov 2017 11:57:31 +0000 (12:57 +0100)]
Version 0.8.9
Miika-Petteri Matikainen [Tue, 21 Nov 2017 06:56:46 +0000 (08:56 +0200)]
Support running meck with modules built with '+deterministic' compile option
When modules are built with '+deterministic' option, the BEAM files
don't have compile options available in the module_info/1:
$ cat foo.erl
-module(foo).
$ erlc foo.erl
$ erl -noshell -eval 'io:format("~p~n", [foo:module_info(compile)])' -run init stop
[{options,[]},
{version,"7.1.1"},
{source,"/home/foobar/foo.erl"}]
$ rm foo.beam
$ erlc +deterministic foo.erl
$ erl -noshell -eval 'io:format("~p~n", [foo:module_info(compile)])' -run init stop
[{version,"7.1.1"}]
Running meck against these modules fail:
::{function_clause,[{lists,'-filter/2-lc$^0/1-0-',
[undefined],
[{file,"lists.erl"},{line,1286}]},
{meck_proc,backup_original,3,
[{file,"/home/foobar/meck/_build/default/lib/meck/src/meck_proc.erl"},
{line,361}]},
{meck_proc,init,1,
[{file,"/home/foobar/meck/_build/default/lib/meck/src/meck_proc.erl"},
{line,206}]},
{gen_server,init_it,2,
[{file,"gen_server.erl"},{line,365}]},
{gen_server,init_it,6,[{file,[...]},{line,...}]},
{proc_lib,init_p_do_apply,3,[{file,...},{...}]}]}
This commit fixes the problem.
Fixes https://github.com/eproxus/meck/issues/184
Peter Lemenkov [Wed, 27 Sep 2017 14:04:42 +0000 (14:04 +0000)]
Fix for Rebar 2.x.y on secondary arches
Erlang + Eunit + Rebar2 behaves differently on secondary arches (mips,
sh4, powerpc, and likely other BigEndian ones). Apparently we need to
specify setup and teardown procedures explicitly instead of copying
meck:new(...) followed by meck:unload() in every test of a suite. Don't
know why, but doing this won't hurt.
I cannot reproduce this issue with Rebar3.
Fixes #105.
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Adam Lindberg [Thu, 7 Sep 2017 08:23:54 +0000 (10:23 +0200)]
Update README.md
Adam Lindberg [Thu, 7 Sep 2017 08:21:00 +0000 (10:21 +0200)]
Update for latest version and Rebar 3
Adam Lindberg [Tue, 29 Aug 2017 12:30:30 +0000 (14:30 +0200)]
Update copyright notices
Adam Lindberg [Tue, 29 Aug 2017 12:15:01 +0000 (14:15 +0200)]
Update Changelog for version 0.8.8
Adam Lindberg [Tue, 29 Aug 2017 12:10:10 +0000 (14:10 +0200)]
Version 0.8.8
Eric Entin [Tue, 25 Jul 2017 14:46:16 +0000 (10:46 -0400)]
Always add debug_info to compile opts for mocks
Adam Lindberg [Thu, 29 Jun 2017 13:21:34 +0000 (15:21 +0200)]
Publish docs to Hex when releasing
Adam Lindberg [Thu, 29 Jun 2017 13:13:58 +0000 (15:13 +0200)]
Fixes to publish script
Adam Lindberg [Thu, 29 Jun 2017 13:13:13 +0000 (15:13 +0200)]
Update Changelog for version 0.8.7
Adam Lindberg [Thu, 29 Jun 2017 13:10:43 +0000 (15:10 +0200)]
Fix syntax error in .app.src
Adam Lindberg [Thu, 29 Jun 2017 13:09:00 +0000 (15:09 +0200)]
Version 0.8.7
Adam Lindberg [Thu, 29 Jun 2017 13:06:15 +0000 (15:06 +0200)]
Update publish script
Adam Lindberg [Thu, 29 Jun 2017 12:58:00 +0000 (14:58 +0200)]
Add Changelog to Hex.pm links
Adam Lindberg [Thu, 29 Jun 2017 12:47:18 +0000 (14:47 +0200)]
Update Hex package information for Rebar 3
Adam Lindberg [Thu, 29 Jun 2017 12:38:31 +0000 (14:38 +0200)]
Add GitHub Changelog Generator config
Adam Lindberg [Thu, 29 Jun 2017 10:08:16 +0000 (12:08 +0200)]
Create new CHANGELOG.md
This is using the github_changelog_generator available at
https://github.com/skywinder/github-changelog-generator.
Adam Lindberg [Thu, 2 Feb 2017 09:02:32 +0000 (10:02 +0100)]
Migrate to Rebar 3
This change expects Meck to be built with Rebar 3 from now on. Due to it
not being compatible with Rebar 3, the optional dependency on Hamcrest
has been removed. Meck still supports matchers so it should still be
compatible, but it is no longer tested.
Adam Lindberg [Wed, 28 Jun 2017 09:31:32 +0000 (11:31 +0200)]
Version 0.8.6
Adam Lindberg [Wed, 28 Jun 2017 09:30:20 +0000 (11:30 +0200)]
Add to changelog
Adam Lindberg [Wed, 28 Jun 2017 09:29:08 +0000 (11:29 +0200)]
Update code climate
Adam Lindberg [Wed, 28 Jun 2017 09:23:01 +0000 (11:23 +0200)]
Use latest Erlang versions on Travis
Adam Lindberg [Wed, 28 Jun 2017 09:21:22 +0000 (11:21 +0200)]
Remove dialyzer attributes when creating mock
Adam Lindberg [Wed, 28 Jun 2017 09:20:54 +0000 (11:20 +0200)]
Remove usage of -compile(export_all)
Adam Lindberg [Wed, 28 Jun 2017 07:56:56 +0000 (09:56 +0200)]
Version 0.8.5
Adam Lindberg [Wed, 28 Jun 2017 07:56:06 +0000 (09:56 +0200)]
Add #176 to CHANGELOG
Andreas Schultz [Thu, 22 Jun 2017 15:37:49 +0000 (17:37 +0200)]
fix behavio(u)r attributes validation on Erlang R20
R20 now checks whether behavio(u)r attribute contains a
valid module name. The attributes content was simply take
from module_info/0. However, module_info/0 contains a list
of behavior and the attribute should only contain as single
module name.
Expand the list of behavio(u)rs into a list of attrbiutes
to make erl_lint happy.
Adam Lindberg [Thu, 4 May 2017 07:22:45 +0000 (09:22 +0200)]
Clarify additional information
Adam Lindberg [Thu, 4 May 2017 07:14:28 +0000 (09:14 +0200)]
Merge pull request #172 from marco-m/fix-capture-doc
Fix errors in capture/5, capture/6 documentation
Marco Molteni [Sat, 15 Apr 2017 16:37:14 +0000 (18:37 +0200)]
Fix errors in capture/5, capture/6 documentation
Adam Lindberg [Fri, 7 Apr 2017 14:31:48 +0000 (16:31 +0200)]
Detail edge cases of validate/1
Adam Lindberg [Mon, 13 Feb 2017 14:11:08 +0000 (15:11 +0100)]
Fix Rebar 3 link
Adam Lindberg [Mon, 13 Feb 2017 14:10:11 +0000 (15:10 +0100)]
Update Travis badge to user master branch
Adam Lindberg [Mon, 13 Feb 2017 12:18:26 +0000 (13:18 +0100)]
Add call to stacktrace when missing (fix #167)
Adam Lindberg [Thu, 2 Feb 2017 09:38:04 +0000 (10:38 +0100)]
Add TOC to README
Adam Lindberg [Thu, 2 Feb 2017 09:33:00 +0000 (10:33 +0100)]
Refresh README
Adam Lindberg [Thu, 2 Feb 2017 09:05:37 +0000 (10:05 +0100)]
Remove heading hyperlinks
John Madrid [Fri, 20 Jan 2017 18:40:21 +0000 (12:40 -0600)]
Add 19.2 to versions tested by TravisCI
Erlang 19 is the latest. Want to make sure this works for the latest OTP release.
Adam Lindberg [Thu, 22 Dec 2016 10:15:33 +0000 (11:15 +0100)]
Add contribution guidelines
amutake [Wed, 29 Jun 2016 09:13:57 +0000 (18:13 +0900)]
Add `meck_history:result/5'
`meck_history:result/5' returns the result value of a particular function
Adam Lindberg [Mon, 27 Jun 2016 11:23:14 +0000 (13:23 +0200)]
Add GitHub issue template
Adam Lindberg [Tue, 28 Jun 2016 11:39:31 +0000 (13:39 +0200)]
Merge pull request #162 from yutopp/support_passthrough_when_deleting
Fix #88
yutopp [Mon, 27 Jun 2016 09:03:14 +0000 (18:03 +0900)]
Fix #88
Adam Lindberg [Mon, 27 Jun 2016 11:15:21 +0000 (13:15 +0200)]
Add code of conduct
Adam Lindberg [Sun, 1 May 2016 17:19:37 +0000 (19:19 +0200)]
Link to Travis branches overview
Adam Lindberg [Sun, 1 May 2016 17:18:59 +0000 (19:18 +0200)]
Try bumping to Erlang 18.3 on Travis
Adam Lindberg [Sun, 1 May 2016 17:14:34 +0000 (19:14 +0200)]
Explicitly track master branch build status
Adam Lindberg [Sat, 30 Apr 2016 14:08:06 +0000 (16:08 +0200)]
Merge pull request #161 from marco-m/master
Fix eunit compile failure on Erlang 17+ (hamcrest)
Marco Molteni [Sat, 30 Apr 2016 12:32:35 +0000 (14:32 +0200)]
Fix eunit compile failure on Erlang 17+ (hamcrest)
Adam Lindberg [Sat, 27 Feb 2016 12:25:46 +0000 (13:25 +0100)]
Clean up performance tests
Adam Lindberg [Tue, 29 Dec 2015 09:54:02 +0000 (10:54 +0100)]
Time for the annual Travis Erlang version hunt
Why is there no list of supported Erlang versions on Travis?!
Adam Lindberg [Tue, 29 Dec 2015 09:46:38 +0000 (10:46 +0100)]
Make Erlang versions on Travis more up to date
Adam Lindberg [Tue, 29 Dec 2015 09:42:27 +0000 (10:42 +0100)]
Correctly add version in commit message
Adam Lindberg [Tue, 29 Dec 2015 09:41:58 +0000 (10:41 +0100)]
Use new maintainers field for Hex packages
Adam Lindberg [Tue, 29 Dec 2015 09:37:28 +0000 (10:37 +0100)]
Ignore mix build artifacts
Adam Lindberg [Tue, 29 Dec 2015 09:36:04 +0000 (10:36 +0100)]
Make namespaced types the default
This will avoid dependencies on the macro for newer Erlang versions, and
only use it for legacy compilations
Adam Lindberg [Tue, 29 Dec 2015 09:22:59 +0000 (10:22 +0100)]
Version 0.8.4
Adam Lindberg [Tue, 29 Dec 2015 09:22:07 +0000 (10:22 +0100)]
Update changelog
Adam Lindberg [Tue, 29 Dec 2015 09:18:55 +0000 (10:18 +0100)]
Depend on tools
This includes cover, which Meck assumes exists on the path.
Adam Lindberg [Mon, 9 Nov 2015 09:20:08 +0000 (10:20 +0100)]
Replace contributor list with link
Adam Lindberg [Mon, 9 Nov 2015 09:16:21 +0000 (10:16 +0100)]
Detail problems with mocking `timer`
Adam Lindberg [Mon, 9 Nov 2015 09:14:59 +0000 (10:14 +0100)]
Merge pull request #153 from edgurgel/add-merge-expects-option
Add merge_expects option
Eduardo Gurgel [Tue, 8 Sep 2015 10:14:14 +0000 (22:14 +1200)]
Add merge_expects option to meck_proc
The expectations are merged for the function/arity instead of replacing
the existing one
Adam Lindberg [Thu, 5 Nov 2015 15:01:37 +0000 (16:01 +0100)]
Add donations section
Adam Lindberg [Sat, 19 Sep 2015 10:19:07 +0000 (12:19 +0200)]
Merge pull request #156 from lilrooness/master
Update 'problematic modules list'
Joe [Thu, 17 Sep 2015 14:49:08 +0000 (15:49 +0100)]
Update 'problematic modules list'
'Problematic modules' list now includes global
Adam Lindberg [Mon, 7 Sep 2015 08:04:25 +0000 (10:04 +0200)]
Merge pull request #151 from soranoba/fix/optional_callbacks
Filter out optional_callbacks attributes
soranoba [Mon, 7 Sep 2015 06:44:10 +0000 (15:44 +0900)]
FIX: optional_callbacks (but, it isn't the best practice)
Adam Lindberg [Sat, 22 Aug 2015 12:07:29 +0000 (14:07 +0200)]
Merge pull request #150 from dszoboszlay/bug/unload-race-condition
Fix race condition between meck:unload/1 and calls to the mocked module
Dániel Szoboszlay [Thu, 20 Aug 2015 15:49:34 +0000 (17:49 +0200)]
Fix race condition between meck:unload/1 and calls to the mocked module
Dániel Szoboszlay [Wed, 19 Aug 2015 15:34:32 +0000 (17:34 +0200)]
Tests for a race condition between meck:unload/1 and calls to the mocked module