couchdb-meck.git
4 years agoUpdate changelog for version 0.8.11
Adam Lindberg [Thu, 12 Jul 2018 09:36:53 +0000 (11:36 +0200)] 
Update changelog for version 0.8.11

4 years agoVersion 0.8.11 0.8.11
Adam Lindberg [Thu, 12 Jul 2018 09:35:47 +0000 (11:35 +0200)] 
Version 0.8.11

4 years agoChange publish script to cut script
Adam Lindberg [Thu, 12 Jul 2018 09:35:00 +0000 (11:35 +0200)] 
Change publish script to cut script

4 years agoUse latest OTP 20 and 21 versions
Adam Lindberg [Thu, 12 Jul 2018 09:28:50 +0000 (11:28 +0200)] 
Use latest OTP 20 and 21 versions

4 years agoUpdate outdated donation information
Adam Lindberg [Wed, 11 Jul 2018 11:14:41 +0000 (13:14 +0200)] 
Update outdated donation information

4 years agofix a buggy spec
mats cronqvist [Wed, 11 Jul 2018 09:46:58 +0000 (11:46 +0200)] 
fix a buggy spec

4 years agoun-nest the `try' constructs
mats cronqvist [Wed, 11 Jul 2018 09:46:06 +0000 (11:46 +0200)] 
un-nest the `try' constructs

4 years agodon't hide 'try' behind macro
mats cronqvist [Tue, 10 Jul 2018 13:36:00 +0000 (15:36 +0200)] 
don't hide 'try' behind macro

4 years agouse some preproc trickery to hide the OTP21 get_stacktrace change
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.

4 years agofix some whitespace
mats cronqvist [Wed, 4 Jul 2018 13:25:26 +0000 (15:25 +0200)] 
fix some whitespace

4 years agoLine about 80 char line limit was 155 chars long
mats cronqvist [Wed, 4 Jul 2018 13:22:35 +0000 (15:22 +0200)] 
Line about 80 char line limit was 155 chars long

4 years agoUpdate Changelog for version 0.8.10
Adam Lindberg [Tue, 26 Jun 2018 07:01:13 +0000 (09:01 +0200)] 
Update Changelog for version 0.8.10

4 years agoVersion 0.8.10
Adam Lindberg [Tue, 26 Jun 2018 06:59:47 +0000 (08:59 +0200)] 
Version 0.8.10

4 years agoImprove publish script
Adam Lindberg [Tue, 26 Jun 2018 06:54:01 +0000 (08:54 +0200)] 
Improve publish script

4 years agotest meck with Erlang/OTP 21.0
Michal Piotrowski [Fri, 22 Jun 2018 12:55:05 +0000 (14:55 +0200)] 
test meck with Erlang/OTP 21.0

4 years agoAdd module name to module_is_sticky error
Adam Lindberg [Thu, 3 May 2018 16:29:01 +0000 (18:29 +0200)] 
Add module name to module_is_sticky error

4 years agoDocument undefined_module error
Adam Lindberg [Thu, 3 May 2018 16:27:36 +0000 (18:27 +0200)] 
Document undefined_module error

4 years agoRaise error for passthrough without abstract code
Adam Lindberg [Thu, 3 May 2018 16:25:57 +0000 (18:25 +0200)] 
Raise error for passthrough without abstract code

4 years agoAdd meck:expects/1,2 to list mocked functions
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

4 years agoSpecify repository manually for changelog gen
Adam Lindberg [Mon, 27 Nov 2017 12:01:08 +0000 (13:01 +0100)] 
Specify repository manually for changelog gen

4 years agoUpdate Changelog for version 0.8.9
Adam Lindberg [Mon, 27 Nov 2017 12:00:49 +0000 (13:00 +0100)] 
Update Changelog for version 0.8.9

4 years agoVersion 0.8.9 0.8.9
Adam Lindberg [Mon, 27 Nov 2017 11:57:31 +0000 (12:57 +0100)] 
Version 0.8.9

4 years agoSupport running meck with modules built with '+deterministic' compile option
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

4 years agoFix for Rebar 2.x.y on secondary arches
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>
4 years agoUpdate README.md master
Adam Lindberg [Thu, 7 Sep 2017 08:23:54 +0000 (10:23 +0200)] 
Update README.md

4 years agoUpdate for latest version and Rebar 3
Adam Lindberg [Thu, 7 Sep 2017 08:21:00 +0000 (10:21 +0200)] 
Update for latest version and Rebar 3

4 years agoUpdate copyright notices
Adam Lindberg [Tue, 29 Aug 2017 12:30:30 +0000 (14:30 +0200)] 
Update copyright notices

4 years agoUpdate Changelog for version 0.8.8
Adam Lindberg [Tue, 29 Aug 2017 12:15:01 +0000 (14:15 +0200)] 
Update Changelog for version 0.8.8

4 years agoVersion 0.8.8 0.8.8
Adam Lindberg [Tue, 29 Aug 2017 12:10:10 +0000 (14:10 +0200)] 
Version 0.8.8

5 years agoAlways add debug_info to compile opts for mocks
Eric Entin [Tue, 25 Jul 2017 14:46:16 +0000 (10:46 -0400)] 
Always add debug_info to compile opts for mocks

5 years agoPublish docs to Hex when releasing
Adam Lindberg [Thu, 29 Jun 2017 13:21:34 +0000 (15:21 +0200)] 
Publish docs to Hex when releasing

5 years agoFixes to publish script
Adam Lindberg [Thu, 29 Jun 2017 13:13:58 +0000 (15:13 +0200)] 
Fixes to publish script

5 years agoUpdate Changelog for version 0.8.7
Adam Lindberg [Thu, 29 Jun 2017 13:13:13 +0000 (15:13 +0200)] 
Update Changelog for version 0.8.7

5 years agoFix syntax error in .app.src 0.8.7
Adam Lindberg [Thu, 29 Jun 2017 13:10:43 +0000 (15:10 +0200)] 
Fix syntax error in .app.src

5 years agoVersion 0.8.7
Adam Lindberg [Thu, 29 Jun 2017 13:09:00 +0000 (15:09 +0200)] 
Version 0.8.7

5 years agoUpdate publish script
Adam Lindberg [Thu, 29 Jun 2017 13:06:15 +0000 (15:06 +0200)] 
Update publish script

5 years agoAdd Changelog to Hex.pm links
Adam Lindberg [Thu, 29 Jun 2017 12:58:00 +0000 (14:58 +0200)] 
Add Changelog to Hex.pm links

5 years agoUpdate Hex package information for Rebar 3
Adam Lindberg [Thu, 29 Jun 2017 12:47:18 +0000 (14:47 +0200)] 
Update Hex package information for Rebar 3

5 years agoAdd GitHub Changelog Generator config
Adam Lindberg [Thu, 29 Jun 2017 12:38:31 +0000 (14:38 +0200)] 
Add GitHub Changelog Generator config

5 years agoCreate new CHANGELOG.md
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.

5 years agoMigrate to Rebar 3
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.

5 years agoVersion 0.8.6 0.8.6
Adam Lindberg [Wed, 28 Jun 2017 09:31:32 +0000 (11:31 +0200)] 
Version 0.8.6

5 years agoAdd to changelog
Adam Lindberg [Wed, 28 Jun 2017 09:30:20 +0000 (11:30 +0200)] 
Add to changelog

5 years agoUpdate code climate
Adam Lindberg [Wed, 28 Jun 2017 09:29:08 +0000 (11:29 +0200)] 
Update code climate

5 years agoUse latest Erlang versions on Travis
Adam Lindberg [Wed, 28 Jun 2017 09:23:01 +0000 (11:23 +0200)] 
Use latest Erlang versions on Travis

5 years agoRemove dialyzer attributes when creating mock
Adam Lindberg [Wed, 28 Jun 2017 09:21:22 +0000 (11:21 +0200)] 
Remove dialyzer attributes when creating mock

5 years agoRemove usage of -compile(export_all)
Adam Lindberg [Wed, 28 Jun 2017 09:20:54 +0000 (11:20 +0200)] 
Remove usage of -compile(export_all)

5 years agoVersion 0.8.5 0.8.5
Adam Lindberg [Wed, 28 Jun 2017 07:56:56 +0000 (09:56 +0200)] 
Version 0.8.5

5 years agoAdd #176 to CHANGELOG
Adam Lindberg [Wed, 28 Jun 2017 07:56:06 +0000 (09:56 +0200)] 
Add #176 to CHANGELOG

5 years agofix behavio(u)r attributes validation on Erlang R20
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.

5 years agoClarify additional information
Adam Lindberg [Thu, 4 May 2017 07:22:45 +0000 (09:22 +0200)] 
Clarify additional information

5 years agoMerge pull request #172 from marco-m/fix-capture-doc
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

5 years agoFix 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

5 years agoDetail edge cases of validate/1
Adam Lindberg [Fri, 7 Apr 2017 14:31:48 +0000 (16:31 +0200)] 
Detail edge cases of validate/1

5 years agoFix Rebar 3 link
Adam Lindberg [Mon, 13 Feb 2017 14:11:08 +0000 (15:11 +0100)] 
Fix Rebar 3 link

5 years agoUpdate Travis badge to user master branch
Adam Lindberg [Mon, 13 Feb 2017 14:10:11 +0000 (15:10 +0100)] 
Update Travis badge to user master branch

5 years agoAdd call to stacktrace when missing (fix #167)
Adam Lindberg [Mon, 13 Feb 2017 12:18:26 +0000 (13:18 +0100)] 
Add call to stacktrace when missing (fix #167)

5 years agoAdd TOC to README
Adam Lindberg [Thu, 2 Feb 2017 09:38:04 +0000 (10:38 +0100)] 
Add TOC to README

5 years agoRefresh README
Adam Lindberg [Thu, 2 Feb 2017 09:33:00 +0000 (10:33 +0100)] 
Refresh README

5 years agoRemove heading hyperlinks
Adam Lindberg [Thu, 2 Feb 2017 09:05:37 +0000 (10:05 +0100)] 
Remove heading hyperlinks

5 years agoAdd 19.2 to versions tested by TravisCI
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.

5 years agoAdd contribution guidelines
Adam Lindberg [Thu, 22 Dec 2016 10:15:33 +0000 (11:15 +0100)] 
Add contribution guidelines

5 years agoAdd `meck_history:result/5'
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

6 years agoAdd GitHub issue template
Adam Lindberg [Mon, 27 Jun 2016 11:23:14 +0000 (13:23 +0200)] 
Add GitHub issue template

6 years agoMerge pull request #162 from yutopp/support_passthrough_when_deleting
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

6 years agoFix #88
yutopp [Mon, 27 Jun 2016 09:03:14 +0000 (18:03 +0900)] 
Fix #88

6 years agoAdd code of conduct
Adam Lindberg [Mon, 27 Jun 2016 11:15:21 +0000 (13:15 +0200)] 
Add code of conduct

6 years agoLink to Travis branches overview
Adam Lindberg [Sun, 1 May 2016 17:19:37 +0000 (19:19 +0200)] 
Link to Travis branches overview

6 years agoTry bumping to Erlang 18.3 on Travis
Adam Lindberg [Sun, 1 May 2016 17:18:59 +0000 (19:18 +0200)] 
Try bumping to Erlang 18.3 on Travis

6 years agoExplicitly track master branch build status
Adam Lindberg [Sun, 1 May 2016 17:14:34 +0000 (19:14 +0200)] 
Explicitly track master branch build status

6 years agoMerge pull request #161 from marco-m/master
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)

6 years agoFix 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)

6 years agoClean up performance tests
Adam Lindberg [Sat, 27 Feb 2016 12:25:46 +0000 (13:25 +0100)] 
Clean up performance tests

6 years agoTime for the annual Travis Erlang version hunt
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?!

6 years agoMake Erlang versions on Travis more up to date
Adam Lindberg [Tue, 29 Dec 2015 09:46:38 +0000 (10:46 +0100)] 
Make Erlang versions on Travis more up to date

6 years agoCorrectly add version in commit message
Adam Lindberg [Tue, 29 Dec 2015 09:42:27 +0000 (10:42 +0100)] 
Correctly add version in commit message

6 years agoUse new maintainers field for Hex packages
Adam Lindberg [Tue, 29 Dec 2015 09:41:58 +0000 (10:41 +0100)] 
Use new maintainers field for Hex packages

6 years agoIgnore mix build artifacts
Adam Lindberg [Tue, 29 Dec 2015 09:37:28 +0000 (10:37 +0100)] 
Ignore mix build artifacts

6 years agoMake namespaced types the default
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

6 years agoVersion 0.8.4 0.8.4
Adam Lindberg [Tue, 29 Dec 2015 09:22:59 +0000 (10:22 +0100)] 
Version 0.8.4

6 years agoUpdate changelog
Adam Lindberg [Tue, 29 Dec 2015 09:22:07 +0000 (10:22 +0100)] 
Update changelog

6 years agoDepend on tools
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.

6 years agoReplace contributor list with link
Adam Lindberg [Mon, 9 Nov 2015 09:20:08 +0000 (10:20 +0100)] 
Replace contributor list with link

6 years agoDetail problems with mocking `timer`
Adam Lindberg [Mon, 9 Nov 2015 09:16:21 +0000 (10:16 +0100)] 
Detail problems with mocking `timer`

6 years agoMerge pull request #153 from edgurgel/add-merge-expects-option
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

6 years agoAdd merge_expects option to meck_proc
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

6 years agoAdd donations section
Adam Lindberg [Thu, 5 Nov 2015 15:01:37 +0000 (16:01 +0100)] 
Add donations section

6 years agoMerge pull request #156 from lilrooness/master
Adam Lindberg [Sat, 19 Sep 2015 10:19:07 +0000 (12:19 +0200)] 
Merge pull request #156 from lilrooness/master

Update 'problematic modules list'

6 years agoUpdate '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

6 years agoMerge pull request #151 from soranoba/fix/optional_callbacks
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

6 years agoFIX: optional_callbacks (but, it isn't the best practice)
soranoba [Mon, 7 Sep 2015 06:44:10 +0000 (15:44 +0900)] 
FIX: optional_callbacks (but, it isn't the best practice)

6 years agoMerge pull request #150 from dszoboszlay/bug/unload-race-condition
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

6 years agoFix 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

6 years agoTests for a 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

7 years agoSet correct mix file
Adam Lindberg [Tue, 30 Jun 2015 10:25:51 +0000 (12:25 +0200)] 
Set correct mix file

7 years agoMerge pull request #145 from bpuzon/feature/local-call-caveat-doc
Adam Lindberg [Sat, 27 Jun 2015 11:04:22 +0000 (13:04 +0200)] 
Merge pull request #145 from bpuzon/feature/local-call-caveat-doc

Document the caveat with mocking module-local calls.

7 years agoDocument the caveat with mocking module-local calls.
bpuzon [Sat, 27 Jun 2015 03:17:24 +0000 (20:17 -0700)] 
Document the caveat with mocking module-local calls.

Expectations set for a function do not apply to local invocations of that function.
This may not be obvious for first-time users

7 years agoRevert "Bump Erlang version to 17.5"
Adam Lindberg [Thu, 18 Jun 2015 15:20:15 +0000 (17:20 +0200)] 
Revert "Bump Erlang version to 17.5"

This reverts commit d0a3e5b64d3ee8aa0a2cc727632bda4071c8ac5b.

7 years agoUpdate README.md to specify version 0.8.3
Adam Lindberg [Thu, 18 Jun 2015 14:03:56 +0000 (16:03 +0200)] 
Update README.md to specify version 0.8.3

7 years agoBump Erlang version to 17.5
Adam Lindberg [Thu, 18 Jun 2015 13:59:11 +0000 (15:59 +0200)] 
Bump Erlang version to 17.5