You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2017/09/28 21:02:09 UTC

[01/50] meck commit: updated refs/heads/master to 3544aca [Forced Update!]

Repository: couchdb-meck
Updated Branches:
  refs/heads/master e3ad73d1c -> 3544aca8b (forced update)


Time for the annual Travis Erlang version hunt

Why is there no list of supported Erlang versions on Travis?!


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/ccc817ee
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/ccc817ee
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/ccc817ee

Branch: refs/heads/master
Commit: ccc817ee45a8ee1f2ba244ab3e8f1ddc178df685
Parents: 51e5d9d
Author: Adam Lindberg <he...@alind.io>
Authored: Tue Dec 29 10:54:02 2015 +0100
Committer: Adam Lindberg <he...@alind.io>
Committed: Tue Dec 29 10:54:02 2015 +0100

----------------------------------------------------------------------
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/ccc817ee/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index ba68c7e..3cbdba2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,10 +3,10 @@ notifications:
   email:
     - hello@alind.io
 otp_release:
-  - 18.2.1
+  - 18.2
   - 17.5
   - R16B03-1
-  - R15B03-1
+  - R15B03
 before_script: "make get-deps"
 script: "make test"
 


[44/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Publish docs to Hex when releasing


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/0878f97e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/0878f97e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/0878f97e

Branch: refs/heads/master
Commit: 0878f97ecacf7a12168064f4c94bfdf1793346f4
Parents: 9a24a11
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Jun 29 15:21:34 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Jun 29 15:21:34 2017 +0200

----------------------------------------------------------------------
 .scripts/meck-publish.sh | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0878f97e/.scripts/meck-publish.sh
----------------------------------------------------------------------
diff --git a/.scripts/meck-publish.sh b/.scripts/meck-publish.sh
index 7173009..bbbb666 100755
--- a/.scripts/meck-publish.sh
+++ b/.scripts/meck-publish.sh
@@ -30,6 +30,7 @@ git tag -s "$VSN" -m "Version $VSN"
 
 git push && git push --tags
 rebar3 hex publish
+rebar3 hex docs
 
 github_changelog_generator
 git add CHANGELOG.md


[45/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Always add debug_info to compile opts for mocks


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/fcc551e3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/fcc551e3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/fcc551e3

Branch: refs/heads/master
Commit: fcc551e3feaadf0e1f06451adcd7a2928d7bd66d
Parents: 0878f97
Author: Eric Entin <er...@ericent.in>
Authored: Tue Jul 25 10:46:16 2017 -0400
Committer: Adam Lindberg <he...@alind.io>
Committed: Mon Aug 7 13:39:48 2017 +0200

----------------------------------------------------------------------
 src/meck_proc.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/fcc551e3/src/meck_proc.erl
----------------------------------------------------------------------
diff --git a/src/meck_proc.erl b/src/meck_proc.erl
index 2bd8169..e750f96 100644
--- a/src/meck_proc.erl
+++ b/src/meck_proc.erl
@@ -358,7 +358,7 @@ backup_original(Mod, NoPassCover, EnableOnLoad) ->
         Forms0 = meck_code:abstract_code(meck_code:beam_file(Mod)),
         Forms = meck_code:enable_on_load(Forms0, EnableOnLoad),
         NewName = meck_util:original_name(Mod),
-        CompileOpts = meck_code:compile_options(meck_code:beam_file(Mod)),
+        CompileOpts = [debug_info | meck_code:compile_options(meck_code:beam_file(Mod))],
         Renamed = meck_code:rename_module(Forms, NewName),
         Binary = meck_code:compile_and_load_forms(Renamed, CompileOpts),
 


[28/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Remove usage of -compile(export_all)


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/a32733d5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/a32733d5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/a32733d5

Branch: refs/heads/master
Commit: a32733d5e8326f974a976be406cd385d1c7cec93
Parents: ada6b4e
Author: Adam Lindberg <he...@alind.io>
Authored: Wed Jun 28 11:20:54 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Wed Jun 28 11:20:54 2017 +0200

----------------------------------------------------------------------
 test/meck_tests.erl | 182 +++++++++++++++++++++++------------------------
 1 file changed, 89 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/a32733d5/test/meck_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_tests.erl b/test/meck_tests.erl
index 5e8dda4..a3be47d 100644
--- a/test/meck_tests.erl
+++ b/test/meck_tests.erl
@@ -16,12 +16,9 @@
 
 -module(meck_tests).
 
--compile(export_all).
-
 -include_lib("eunit/include/eunit.hrl").
 -include_lib("hamcrest/include/hamcrest.hrl").
 
-
 -define(assertTerminated(MonitorRef, Reason, Timeout),
         (fun() ->
                 receive
@@ -37,85 +34,85 @@
 
 meck_test_() ->
     {foreach, fun setup/0, fun teardown/1,
-     [{with, [T]} || T <- [fun ?MODULE:new_/1,
-                           fun ?MODULE:unload_/1,
-                           fun ?MODULE:double_new_/1,
-                           fun ?MODULE:validate_/1,
-                           fun ?MODULE:expect_/1,
-                           fun ?MODULE:exports_/1,
-                           fun ?MODULE:call_return_value_/1,
-                           fun ?MODULE:call_return_value_improper_list_/1,
-                           fun ?MODULE:call_argument_/1,
-                           fun ?MODULE:call_undef_/1,
-                           fun ?MODULE:call_function_clause_/1,
-                           fun ?MODULE:validate_unexpected_error_/1,
-                           fun ?MODULE:validate_expected_error_/1,
-                           fun ?MODULE:validate_chained_/1,
-                           fun ?MODULE:stacktrace_/1,
-                           fun ?MODULE:stacktrace_function_clause_/1,
-                           fun ?MODULE:change_func_/1,
-                           fun ?MODULE:caller_does_not_crash_on_reload_/1,
-                           fun ?MODULE:call_original_undef_/1,
-                           fun ?MODULE:history_empty_/1,
-                           fun ?MODULE:history_call_/1,
-                           fun ?MODULE:history_throw_/1,
-                           fun ?MODULE:history_throw_fun_/1,
-                           fun ?MODULE:history_exit_/1,
-                           fun ?MODULE:history_error_/1,
-                           fun ?MODULE:history_error_args_/1,
-                           fun ?MODULE:history_meck_throw_/1,
-                           fun ?MODULE:history_meck_throw_fun_/1,
-                           fun ?MODULE:history_meck_exit_/1,
-                           fun ?MODULE:history_meck_error_/1,
-                           fun ?MODULE:history_by_pid_/1,
-                           fun ?MODULE:reset_/1,
-                           fun ?MODULE:shortcut_expect_/1,
-                           fun ?MODULE:shortcut_expect_negative_arity_/1,
-                           fun ?MODULE:shortcut_call_return_value_/1,
-                           fun ?MODULE:shortcut_call_argument_/1,
-                           fun ?MODULE:shortcut_re_add_/1,
-                           fun ?MODULE:shortcut_opaque_/1,
-                           fun ?MODULE:shortcut_stacktrace_/1,
-                           fun ?MODULE:delete_/1,
-                           fun ?MODULE:called_false_no_args_/1,
-                           fun ?MODULE:called_true_no_args_/1,
-                           fun ?MODULE:called_true_two_functions_/1,
-                           fun ?MODULE:called_false_one_arg_/1,
-                           fun ?MODULE:called_true_one_arg_/1,
-                           fun ?MODULE:called_false_few_args_/1,
-                           fun ?MODULE:called_true_few_args_/1,
-                           fun ?MODULE:called_few_args_matchers_/1,
-                           fun ?MODULE:called_false_error_/1,
-                           fun ?MODULE:called_true_error_/1,
-                           fun ?MODULE:called_with_pid_no_args_/1,
-                           fun ?MODULE:num_calls_/1,
-                           fun ?MODULE:num_calls_error_/1,
-                           fun ?MODULE:num_calls_with_pid_no_args_/1,
-                           fun ?MODULE:called_wildcard_/1,
-                           fun ?MODULE:sequence_/1,
-                           fun ?MODULE:expect_args_sequence_/1,
-                           fun ?MODULE:expect_arity_sequence_/1,
-                           fun ?MODULE:expect_complex_sequence_/1,
-                           fun ?MODULE:sequence_multi_/1,
-                           fun ?MODULE:loop_/1,
-                           fun ?MODULE:expect_empty_clause_list_/1,
-                           fun ?MODULE:expect_args_value_/1,
-                           fun ?MODULE:expect_args_invalid_call_/1,
-                           fun ?MODULE:expect_arity_value_/1,
-                           fun ?MODULE:expect_args_loop_/1,
-                           fun ?MODULE:expect_arity_loop_/1,
-                           fun ?MODULE:expect_complex_loop_/1,
-                           fun ?MODULE:expect_loop_in_seq_/1,
-                           fun ?MODULE:expect_args_exception_/1,
-                           fun ?MODULE:expect_arity_exception_/1,
-                           fun ?MODULE:expect_arity_clause_/1,
-                           fun ?MODULE:loop_multi_/1,
-                           fun ?MODULE:expect_args_pattern_override_/1,
-                           fun ?MODULE:expect_args_pattern_shadow_/1,
-                           fun ?MODULE:expect_args_pattern_missing_/1,
-                           fun ?MODULE:expect_args_pattern_invalid_/1,
-                           fun ?MODULE:expect_args_matchers_/1,
-                           fun ?MODULE:expect_ret_specs_/1
+     [{with, [T]} || T <- [fun new_/1,
+                           fun unload_/1,
+                           fun double_new_/1,
+                           fun validate_/1,
+                           fun expect_/1,
+                           fun exports_/1,
+                           fun call_return_value_/1,
+                           fun call_return_value_improper_list_/1,
+                           fun call_argument_/1,
+                           fun call_undef_/1,
+                           fun call_function_clause_/1,
+                           fun validate_unexpected_error_/1,
+                           fun validate_expected_error_/1,
+                           fun validate_chained_/1,
+                           fun stacktrace_/1,
+                           fun stacktrace_function_clause_/1,
+                           fun change_func_/1,
+                           fun caller_does_not_crash_on_reload_/1,
+                           fun call_original_undef_/1,
+                           fun history_empty_/1,
+                           fun history_call_/1,
+                           fun history_throw_/1,
+                           fun history_throw_fun_/1,
+                           fun history_exit_/1,
+                           fun history_error_/1,
+                           fun history_error_args_/1,
+                           fun history_meck_throw_/1,
+                           fun history_meck_throw_fun_/1,
+                           fun history_meck_exit_/1,
+                           fun history_meck_error_/1,
+                           fun history_by_pid_/1,
+                           fun reset_/1,
+                           fun shortcut_expect_/1,
+                           fun shortcut_expect_negative_arity_/1,
+                           fun shortcut_call_return_value_/1,
+                           fun shortcut_call_argument_/1,
+                           fun shortcut_re_add_/1,
+                           fun shortcut_opaque_/1,
+                           fun shortcut_stacktrace_/1,
+                           fun delete_/1,
+                           fun called_false_no_args_/1,
+                           fun called_true_no_args_/1,
+                           fun called_true_two_functions_/1,
+                           fun called_false_one_arg_/1,
+                           fun called_true_one_arg_/1,
+                           fun called_false_few_args_/1,
+                           fun called_true_few_args_/1,
+                           fun called_few_args_matchers_/1,
+                           fun called_false_error_/1,
+                           fun called_true_error_/1,
+                           fun called_with_pid_no_args_/1,
+                           fun num_calls_/1,
+                           fun num_calls_error_/1,
+                           fun num_calls_with_pid_no_args_/1,
+                           fun called_wildcard_/1,
+                           fun sequence_/1,
+                           fun expect_args_sequence_/1,
+                           fun expect_arity_sequence_/1,
+                           fun expect_complex_sequence_/1,
+                           fun sequence_multi_/1,
+                           fun loop_/1,
+                           fun expect_empty_clause_list_/1,
+                           fun expect_args_value_/1,
+                           fun expect_args_invalid_call_/1,
+                           fun expect_arity_value_/1,
+                           fun expect_args_loop_/1,
+                           fun expect_arity_loop_/1,
+                           fun expect_complex_loop_/1,
+                           fun expect_loop_in_seq_/1,
+                           fun expect_args_exception_/1,
+                           fun expect_arity_exception_/1,
+                           fun expect_arity_clause_/1,
+                           fun loop_multi_/1,
+                           fun expect_args_pattern_override_/1,
+                           fun expect_args_pattern_shadow_/1,
+                           fun expect_args_pattern_missing_/1,
+                           fun expect_args_pattern_invalid_/1,
+                           fun expect_args_matchers_/1,
+                           fun expect_ret_specs_/1
                           ]]}.
 
 setup() ->
@@ -525,10 +522,6 @@ num_calls_with_pid_no_args_(Mod) ->
     ?assertEqual(meck:num_calls(Mod, test, Args, '_'),
                  meck:num_calls(Mod, test, Args)).
 
-expect_apply(Mod, Func, Args) ->
-    ok = meck:expect(Mod, Func, length(Args), ok),
-    ok = apply(Mod, Func, Args).
-
 expect_catch_apply(Mod, Func, Args) ->
     TestFun = fun (_, _, _) -> meck:exception(error, my_error) end,
     ok = meck:expect(Mod, Func, TestFun),
@@ -991,8 +984,8 @@ cover_test() ->
 
 cover_options_test_() ->
     {foreach, fun compile_options_setup/0, fun compile_options_teardown/1,
-     [{with, [T]} || T <- [fun ?MODULE:cover_options_/1,
-                           fun ?MODULE:cover_options_fail_/1
+     [{with, [T]} || T <- [fun cover_options_/1,
+                           fun cover_options_fail_/1
                           ]]}.
 
 compile_options_setup() ->
@@ -1044,7 +1037,10 @@ cover_options_fail_({_OldPath, Src, Module}) ->
     CompilerOptions = [{i, "../test/include"}, {d, 'TEST', true},
                        {outdir, "../test"}, debug_info],
     {ok, _} = compile:file(Src, CompilerOptions),
-    ?assertEqual(CompilerOptions, meck_code:compile_options(Module)),
+    ?assertEqual(
+        proplists:delete(outdir, lists:sort(CompilerOptions)),
+        proplists:delete(outdir, lists:sort(meck_code:compile_options(Module)))
+    ),
     {ok, _} = cover:compile_beam(Module),
     ?assertEqual(?compile_options, meck_code:compile_options(Module)),
     a      = Module:a(),
@@ -1284,8 +1280,8 @@ can_mock_sticky_modules_test() ->
 sticky_directory_test_() ->
     {foreach, fun sticky_setup/0, fun sticky_teardown/1,
      [{with, [T]}
-      || T <- [fun ?MODULE:can_mock_sticky_module_not_yet_loaded_/1,
-               fun ?MODULE:cannot_mock_sticky_module_without_unstick_/1]]}.
+      || T <- [fun can_mock_sticky_module_not_yet_loaded_/1,
+               fun cannot_mock_sticky_module_without_unstick_/1]]}.
 
 sticky_setup() ->
     % Find out where the beam file is (purge because it is cover compiled)
@@ -1500,8 +1496,8 @@ wait_purge_expired_tracker_test() ->
 meck_passthrough_test_() ->
     {foreach, fun setup_passthrough/0, fun teardown/1,
      [{with, [T]} || T <- [
-                           fun ?MODULE:delete_passthrough_/1,
-                           fun ?MODULE:delete_passthrough_force_/1
+                           fun delete_passthrough_/1,
+                           fun delete_passthrough_force_/1
                           ]]}.
 
 setup_passthrough() ->


[08/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Add code of conduct

Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/70ef5a40
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/70ef5a40
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/70ef5a40

Branch: refs/heads/master
Commit: 70ef5a402d2f5aeca879da704535bef93ed44c0b
Parents: f6f885c
Author: Adam Lindberg <he...@alind.io>
Authored: Mon Jun 27 13:15:21 2016 +0200
Committer: GitHub <no...@github.com>
Committed: Mon Jun 27 13:15:21 2016 +0200

----------------------------------------------------------------------
 CODE_OF_CONDUCT.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/70ef5a40/CODE_OF_CONDUCT.md
----------------------------------------------------------------------
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..ea42312
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,74 @@
+# Meck Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, gender identity and expression, level of experience,
+nationality, personal appearance, race, religion, or sexual identity and
+orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+  address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+  professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team at [meck at alind dot io]. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/


[06/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Try bumping to Erlang 18.3 on Travis


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/158b26d1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/158b26d1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/158b26d1

Branch: refs/heads/master
Commit: 158b26d175f79618d8983965f43ef7d65ca259f7
Parents: 82e8406
Author: Adam Lindberg <he...@alind.io>
Authored: Sun May 1 19:18:59 2016 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Sun May 1 19:18:59 2016 +0200

----------------------------------------------------------------------
 .travis.yml | 2 +-
 README.md   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/158b26d1/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 3cbdba2..ff58ec2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,7 @@ notifications:
   email:
     - hello@alind.io
 otp_release:
-  - 18.2
+  - 18.3
   - 17.5
   - R16B03-1
   - R15B03

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/158b26d1/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index d45ff2f..c4122fd 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 [![Release](http://img.shields.io/github/release/eproxus/meck.svg?style=flat-square)](https://github.com/eproxus/meck/releases/latest)
 [![Build Status](https://img.shields.io/travis/eproxus/meck/master.svg?style=flat-square)](http://travis-ci.org/eproxus/meck)
-[![Code Climate](http://img.shields.io/badge/code_climate-Erlang_17.4-brightgreen.svg?style=flat-square)](https://travis-ci.org/eproxus/meck)
+[![Code Climate](http://img.shields.io/badge/code_climate-Erlang_18.3-brightgreen.svg?style=flat-square)](https://travis-ci.org/eproxus/meck)
 
 Meck
 ====


[15/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Remove heading hyperlinks


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/6f1281d9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/6f1281d9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/6f1281d9

Branch: refs/heads/master
Commit: 6f1281d91e4e1b612a86fb34619acb32e2d9ae6d
Parents: b49cffd
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Feb 2 10:05:37 2017 +0100
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Feb 2 10:05:37 2017 +0100

----------------------------------------------------------------------
 README.md | 12 ------------
 1 file changed, 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/6f1281d9/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 96995fe..15548e1 100644
--- a/README.md
+++ b/README.md
@@ -7,8 +7,6 @@ Meck
 
 A mocking library for Erlang.
 
-<a name='features'>
-
 Features
 --------
 
@@ -28,9 +26,6 @@ See what's new in [0.8 Release Notes][1].
     when a crash occurs (disable with option `no_link`)
   * Mocking of sticky modules (using the option `unstick`)
 
-
-<a name='examples'>
-
 Examples
 --------
 Here's an example of using Meck in the Erlang shell:
@@ -142,8 +137,6 @@ ok
 "test"
 ```
 
-<a name='build'>
-
 Build
 -----
 
@@ -175,8 +168,6 @@ Documentation can be generated through the use of the following command:
 make doc
 ```
 
-<a name='install'>
-
 Install
 -------
 
@@ -195,9 +186,6 @@ directory to your Erlang code path or move the Meck folder into your
 release folder and make sure that folder is in your `ERL_LIBS`
 environment variable.
 
-
-<a name='contribute'>
-
 Caveats
 -------
 


[20/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Fix Rebar 3 link

Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/f0904dcd
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/f0904dcd
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/f0904dcd

Branch: refs/heads/master
Commit: f0904dcdace405b03ae711a8e3f30dc284996bc6
Parents: 20e6cd5
Author: Adam Lindberg <he...@alind.io>
Authored: Mon Feb 13 15:11:08 2017 +0100
Committer: GitHub <no...@github.com>
Committed: Mon Feb 13 15:11:08 2017 +0100

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/f0904dcd/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index af01346..dca2417 100644
--- a/README.md
+++ b/README.md
@@ -147,7 +147,7 @@ ok
 Use
 ---
 
-Meck is best used via [Rebar 3]. Add the following dependency to your
+Meck is best used via [Rebar 3][rebar_3]. Add the following dependency to your
 `rebar.config` in your project root:
 
 ```erlang


[34/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
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.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/0e6c040d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/0e6c040d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/0e6c040d

Branch: refs/heads/master
Commit: 0e6c040dcee99b39769828377c073c3b67a1794d
Parents: 36b208e
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Feb 2 10:02:32 2017 +0100
Committer: Adam Lindberg <he...@alind.io>
Committed: Wed Jun 28 14:43:06 2017 +0200

----------------------------------------------------------------------
 .gitignore                       |  36 +++++++++---------
 .travis.yml                      |  21 ++++++++---
 Makefile                         |  63 --------------------------------
 rebar                            | Bin 196913 -> 0 bytes
 rebar.config                     |  38 ++++++++++++-------
 rebar.lock                       |   1 +
 test.config                      |  21 -----------
 test/meck_args_matcher_tests.erl |   2 +-
 test/meck_expect_tests.erl       |   6 +--
 test/meck_history_tests.erl      |   4 +-
 test/meck_matcher_tests.erl      |   4 +-
 test/meck_tests.erl              |  67 ++++++++++++++++++++++------------
 12 files changed, 109 insertions(+), 154 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 238d8e2..b333f4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,23 +1,21 @@
+.rebar3
+_*
+.eunit
+*.o
 *.beam
-*.log
-*.dump
-*.coverdata
-doc/*.html
-doc/*.css
-doc/*.png
-doc/edoc-info
+*.plt
+*.swp
+*.swo
+.erlang.cookie
 ebin
-.eunit
-.DS_Store
-tags
-.*.swp
-.settings
-.project
-*.sublime-workspace
-*.sublime-project
-deps/*
+log
+erl_crash.dump
 .rebar
-.deps.plt
-
-# Elixir/Hex.pm
+logs
 _build
+.idea
+rebar3.crashdump
+doc/*.html
+doc/edoc-info
+doc/erlang.png
+doc/stylesheet.css

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index bad449c..9bb19bf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
 language: erlang
-notifications:
-  email:
-    - hello@alind.io
+
+sudo: false
+os: linux
 otp_release:
   - 20.0
   - 19.3
@@ -9,6 +9,17 @@ otp_release:
   - 17.5
   - R16B03-1
   - R15B03
-before_script: "make get-deps"
-script: "make test"
 
+script: rebar3 eunit
+install:
+  - wget https://s3.amazonaws.com/rebar3/rebar3 && chmod +x rebar3
+script:
+  - ./rebar3 as prod compile
+  # - ./rebar3 as check xref
+  # - ./rebar3 as check dialyzer
+  - ./rebar3 eunit
+  - ./rebar3 edoc
+
+notifications:
+  recipients:
+    - hello@alind.io

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 8ec5837..0000000
--- a/Makefile
+++ /dev/null
@@ -1,63 +0,0 @@
-PLTFILE=$(CURDIR)/.deps.plt
-APP_DEPS=kernel stdlib eunit tools compiler erts
-ERLFLAGS= -pa $(CURDIR)/.eunit -pa $(CURDIR)/ebin -pa $(CURDIR)/deps/*/ebin
-
-REBAR="./rebar"
-ifeq ($(REBAR),)
-$(error "Rebar not available on this system")
-endif
-
-ERL = $(shell which erl)
-ifeq ($(ERL),)
-$(error "Erlang must be available on this system")
-endif
-
-BUILD_PLT_INC=$(shell test -d deps && echo '-r deps')
-DIALYZER_INC=$(shell test -d include && echo '-I include') $(shell test -d deps && echo '-I deps')
-
-.PHONY: all rebuild compile doc clean test dialyzer typer get-deps clean-deps \
-	shell clean-plt clean-doc distclean
-
-all: get-deps compile
-
-rebuild: distclean get-deps all
-
-get-deps:
-	@$(REBAR) -C test.config get-deps
-
-compile:
-	@$(REBAR) -C rebar.config skip_deps=true compile
-
-doc:
-	@$(REBAR) -C test.config skip_deps=true doc
-
-clean:
-	@$(REBAR) -C test.config skip_deps=true clean
-
-test: get-deps compile
-	@$(REBAR) -C test.config compile
-	@$(REBAR) -C test.config skip_deps=true eunit
-
-$(PLTFILE):
-	- dialyzer --build_plt --apps $(APP_DEPS) $(BUILD_PLT_INC) --output_plt $(PLTFILE)
-
-dialyzer: compile $(PLTFILE)
-	@dialyzer --fullpath --plt $(PLTFILE) $(DIALYZER_INC) -pa $(CURDIR)/ebin -c src --src | \
-	fgrep -v -f ./dialyzer.ignore-warnings
-
-typer:
-	typer --plt $(PLTFILE) $(DIALYZER_INC) -r src
-
-shell:
-	@$(ERL) $(ERLFLAGS)
-
-clean-plt:
-	@rm -rf $(PLTFILE)
-
-clean-doc:
-	@cd doc; ls * | grep -v overview.edoc | xargs rm -f
-
-clean-deps:
-	@rm -rvf $(CURDIR)/deps/*
-
-distclean: clean clean-plt clean-doc clean-deps

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/rebar
----------------------------------------------------------------------
diff --git a/rebar b/rebar
deleted file mode 100755
index e1bddea..0000000
Binary files a/rebar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/rebar.config
----------------------------------------------------------------------
diff --git a/rebar.config b/rebar.config
index 694cc01..80582f2 100644
--- a/rebar.config
+++ b/rebar.config
@@ -1,16 +1,28 @@
-%% Compiler Options ===========================================================
 {erl_opts, [
-    %% Erlang releases after 17 don't put R in front of their name, and also require dict() to be written like dict:dict()
-    {platform_define, "^R", non_namespaced_types},  % used by meck
-    {platform_define, "^[0-9]+", namespaced_types}, % used by hamcrest
-    warn_export_all,
-    warn_export_vars,
-    warn_shadow_vars,
-    warn_obsolete_guard,
-    warn_unused_import,
-    warnings_as_errors,
-    debug_info
+    % Erlang releases after 17 don't put R in front of their name, and also
+    % require dict() to be written like dict:dict()
+    {platform_define, "^R", non_namespaced_types}, % used by meck
+    {platform_define, "^[0-9]+", namespaced_types} % used by hamcrest
 ]}.
 
-%% Misc =======================================================================
-{clean_files, [".eunit", "ebin/*.beam", "test/*.beam"]}.
+{profiles, [
+    {test, [
+        {erl_opts, [
+            debug_info,
+            {platform_define, "^R(?!16B03)", cover_empty_compile_opts}
+        ]},
+        {cover_enabled, true},
+        {cover_opts, [verbose]}
+    ]},
+    {compile, [
+        {erl_opts, [
+            debug_info,
+            warnings_as_errors,
+            warn_export_all,
+            warn_export_vars,
+            warn_shadow_vars,
+            warn_obsolete_guard,
+            warn_unused_import
+        ]}
+    ]}
+]}.

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/rebar.lock
----------------------------------------------------------------------
diff --git a/rebar.lock b/rebar.lock
new file mode 100644
index 0000000..57afcca
--- /dev/null
+++ b/rebar.lock
@@ -0,0 +1 @@
+[].

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test.config
----------------------------------------------------------------------
diff --git a/test.config b/test.config
deleted file mode 100644
index ade907f..0000000
--- a/test.config
+++ /dev/null
@@ -1,21 +0,0 @@
-%% Dependencies ===============================================================
-{deps,
- [{hamcrest, ".*", {git, "https://github.com/hyperthunk/hamcrest-erlang.git",
-                    {branch, "master"}}}]}.
-
-%% Compiler Options ===========================================================
-{erl_opts, [
-    %% Erlang releases after 17 don't put R in front of their name, and also require dict() to be written like dict:dict()
-    {platform_define, "^R", non_namespaced_types},  % used by meck
-    {platform_define, "^[0-9]+", namespaced_types}, % used by hamcrest
-    {platform_define, "^R(?!16B03)", cover_empty_compile_opts},
-    warnings_as_errors,
-    debug_info
-]}.
-
-%% Eunit Options ==============================================================
-{cover_enabled, true}.
-{cover_print_enabled, true}.
-
-%% Misc =======================================================================
-{clean_files, [".eunit", "ebin/*.beam", "test/*.beam"]}.

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test/meck_args_matcher_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_args_matcher_tests.erl b/test/meck_args_matcher_tests.erl
index 0b943c9..44f3860 100644
--- a/test/meck_args_matcher_tests.erl
+++ b/test/meck_args_matcher_tests.erl
@@ -44,7 +44,7 @@ from_empty_args_test() ->
     ?assertMatch(false, meck_args_matcher:match([1, 2, 3], ArgsMatcher)).
 
 matcher_featured_test() ->
-    ArgsSpec = [meck:is(hamcrest_matchers:equal_to(1)),
+    ArgsSpec = [meck:is(fun(X) -> X == 1 end),
                 2,
                 meck:is(fun(X) -> X == 3 end),
                 {4, [5, '_'], <<"7">>}],

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test/meck_expect_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_expect_tests.erl b/test/meck_expect_tests.erl
index a18bf39..08b17f3 100644
--- a/test/meck_expect_tests.erl
+++ b/test/meck_expect_tests.erl
@@ -56,7 +56,7 @@ expect_wildcard_test() ->
 expect_matchers_test() ->
     %% Given
     Is1003 = meck_matcher:new(fun(X) -> X == 1003 end),
-    LessThen1004 = meck_matcher:new(hamcrest_matchers:less_than(1004)),
+    LessThen1004 = meck_matcher:new(fun(X) -> X < 1004 end),
     %% When
     E = meck_expect:new(blah, [Is1003, LessThen1004], 2001),
     %% Then
@@ -69,7 +69,7 @@ expect_matchers_test() ->
 expect_with_matchers_multiclause_test() ->
     %% Given
     Is1003 = meck_matcher:new(fun(X) -> X == 1003 end),
-    LessThen1004 = meck_matcher:new(hamcrest_matchers:less_than(1004)),
+    LessThen1004 = meck_matcher:new(fun(X) -> X < 1004 end),
     %% When
     E = meck_expect:new(blah, [{['_', Is1003, 1004],         2001},
                                {['_', Is1003, LessThen1004], 2002},
@@ -90,7 +90,7 @@ expect_with_matchers_multiclause_test() ->
 expect_with_matchers_masked_clause_test() ->
     %% Given
     Is1003 = meck_matcher:new(fun(X) -> X == 1003 end),
-    LessThen1004 = meck_matcher:new(hamcrest_matchers:less_than(1004)),
+    LessThen1004 = meck_matcher:new(fun(X) -> X < 1004 end),
     %% When
     E = meck_expect:new(blah, [{[Is1003, LessThen1004], 2001},
                                {[Is1003, Is1003], 2002}]),

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test/meck_history_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_history_tests.erl b/test/meck_history_tests.erl
index 7da0419..d8d6a98 100644
--- a/test/meck_history_tests.erl
+++ b/test/meck_history_tests.erl
@@ -78,7 +78,7 @@ capture_different_args_specs_test() ->
     ?assertMatch(2003, meck:capture(first, test, foo, 3, 2)),
     ?assertMatch(2005, meck:capture(first, test, foo, ['_', '_'], 2)),
     ?assertMatch(2006, meck:capture(first, test, foo, [1006, '_', '_'], 2)),
-    ?assertMatch(2008, meck:capture(first, test, foo, ['_', '_', meck:is(hamcrest_matchers:greater_than(3006))], 2)),
+    ?assertMatch(2008, meck:capture(first, test, foo, ['_', '_', meck:is(fun(X) -> X > 3006 end)], 2)),
     %% Clean
     meck:unload().
 
@@ -126,7 +126,7 @@ result_different_args_specs_test() ->
     ?assertMatch(2003, meck_history:result(first, '_', test, foo, 3)),
     ?assertMatch(2005, meck_history:result(first, '_', test, foo, ['_', '_'])),
     ?assertMatch(2006, meck_history:result(first, '_', test, foo, [1006, '_', '_'])),
-    Matcher = meck:is(hamcrest_matchers:greater_than(3006)),
+    Matcher = meck:is(fun(X) -> X > 3006 end),
     ?assertMatch(2008, meck_history:result(first, '_', test, foo, ['_', '_', Matcher])),
     %% Clean
     meck:unload().

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test/meck_matcher_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_matcher_tests.erl b/test/meck_matcher_tests.erl
index 543aee9..013903c 100644
--- a/test/meck_matcher_tests.erl
+++ b/test/meck_matcher_tests.erl
@@ -28,7 +28,7 @@ match_predicate_not_bool_test() ->
     ?assertMatch(false, meck_matcher:match_ignore(1001, Matcher)).
 
 match_hamcrest_test() ->
-    Matcher = meck_matcher:new(hamcrest_matchers:equal_to(1000)),
+    Matcher = meck_matcher:new(fun(X) -> X == 1000 end),
     ?assertMatch(true, meck_matcher:match_ignore(1000, Matcher)),
     ?assertMatch(false, meck_matcher:match_ignore(1001, Matcher)).
 
@@ -43,6 +43,4 @@ predicate_wrong_arity_test() ->
 is_matcher_test() ->
     ?assertMatch(true, meck_matcher:is_matcher(meck_matcher:new(fun(X) -> X == 1000 end))),
     ?assertMatch(false, meck_matcher:is_matcher(fun(X) -> X == 1000 end)),
-    ?assertMatch(true, meck_matcher:is_matcher(meck_matcher:new(hamcrest_matchers:equal_to(1000)))),
-    ?assertMatch(false, meck_matcher:is_matcher(hamcrest_matchers:equal_to(1000))),
     ?assertMatch(false, meck_matcher:is_matcher(blah)).

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/0e6c040d/test/meck_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_tests.erl b/test/meck_tests.erl
index a3be47d..1801a1b 100644
--- a/test/meck_tests.erl
+++ b/test/meck_tests.erl
@@ -17,7 +17,6 @@
 -module(meck_tests).
 
 -include_lib("eunit/include/eunit.hrl").
--include_lib("hamcrest/include/hamcrest.hrl").
 
 -define(assertTerminated(MonitorRef, Reason, Timeout),
         (fun() ->
@@ -459,8 +458,8 @@ called_few_args_matchers_(Mod) ->
     Args = [one, 2, {three, 3}, "four"],
     ok = meck:expect(Mod, test, length(Args), ok),
     ok = apply(Mod, test, Args),
-    assert_called(Mod, test, ['_', meck:is(equal_to(2)), {'_', 3}, "four"], true),
-    assert_called(Mod, test, ['_', meck:is(equal_to(3)), {'_', 3}, "four"], false),
+    assert_called(Mod, test, ['_', meck:is(fun(X) -> X == 2 end), {'_', 3}, "four"], true),
+    assert_called(Mod, test, ['_', meck:is(fun(X) -> X == 3 end), {'_', 3}, "four"], false),
     ok.
 
 called_false_error_(Mod) ->
@@ -777,7 +776,7 @@ expect_args_pattern_invalid_(Mod) ->
 expect_args_matchers_(Mod) ->
     %% When
     meck:expect(Mod, f, [{[1, meck:is(fun(X) -> X == 1 end)], a},
-                         {[1, meck:is(less_than(3))],         b},
+                         {[1, meck:is(fun(X) -> X < 3 end)],  b},
                          {['_', '_'],                         c}]),
     %% Then
     ?assertEqual(a, Mod:f(1, 1)),
@@ -951,7 +950,7 @@ stub_all_overridden_by_passthrough_test() ->
 
 mock_file_existing_test() ->
     %% Given
-    ExistingFile = atom_to_list(?MODULE) ++ ".erl",
+    ExistingFile = test_file(?MODULE, ".erl"),
     {ok, ExistsInfo} = file:read_file_info(ExistingFile),
     meck:new(file, [unstick, passthrough]),
     %% When
@@ -974,7 +973,7 @@ mock_file_missing_test() ->
     meck:unload(file).
 
 cover_test() ->
-    {ok, _} = cover:compile("../test/meck_test_module.erl"),
+    {ok, _} = cover:compile(test_file(meck_test_module, ".erl")),
     a = meck_test_module:a(),
     b = meck_test_module:b(),
     {1, 2} = meck_test_module:c(1, 2),
@@ -992,14 +991,14 @@ compile_options_setup() ->
     Module = cover_test_module,
     % Our test module won't compile without compiler options that
     % rebar won't give it, thus the rename dance.
-    Src = join("../test/", Module, ".erl"),
-    ok = file:rename(join("../test/", Module, ".dontcompile"), Src),
+    Src = test_file(Module, ".erl"),
+    ok = file:rename(test_file(Module, ".dontcompile"), Src),
     OldPath = code:get_path(),
-    code:add_path("../test"),
+    code:add_path(test_dir()),
     {OldPath, Src, Module}.
 
 compile_options_teardown({OldPath, Src, Module}) ->
-    file:rename(Src, join("../test/", Module, ".dontcompile")),
+    file:rename(Src, test_file(Module, ".dontcompile")),
     code:purge(Module),
     code:delete(Module),
     code:set_path(OldPath).
@@ -1008,10 +1007,10 @@ cover_options_({_OldPath, Src, Module}) ->
     % Test that compilation options (include paths and preprocessor
     % definitions) are used when un-mecking previously cover compiled
     % modules.
-    CompilerOptions = [{i, "../test/include"}, {d, 'TEST', true}],
+    CompilerOptions = [{i, test_include()}, {d, 'TEST', true}],
     % The option recover feature depends on having the BEAM file
     % available.
-    {ok, _} = compile:file(Src, [{outdir, "../test"}|CompilerOptions]),
+    {ok, _} = compile:file(Src, [{outdir, test_dir()}|CompilerOptions]),
     {ok, _} = cover:compile(Src, CompilerOptions),
     a      = Module:a(),
     b      = Module:b(),
@@ -1026,7 +1025,10 @@ cover_options_({_OldPath, Src, Module}) ->
 -ifdef(cover_empty_compile_opts).
 -define(compile_options, []).
 -else.
--define(compile_options, [{i,"../test/include"},{d,'TEST',true}]).
+-define(compile_options, [
+    {i, test_include()},
+    {d, 'TEST', true}
+]).
 -endif.
 cover_options_fail_({_OldPath, Src, Module}) ->
     %% This may look like the test above but there is a subtle
@@ -1034,8 +1036,12 @@ cover_options_fail_({_OldPath, Src, Module}) ->
     %% compile options.  This test verifies that function `b/0', which
     %% relies on the `TEST' directive being set can still be called
     %% after the module is meck'ed.
-    CompilerOptions = [{i, "../test/include"}, {d, 'TEST', true},
-                       {outdir, "../test"}, debug_info],
+    CompilerOptions = [
+        debug_info,
+        {i, test_include()},
+        {outdir, test_dir()},
+        {d, 'TEST', true}
+    ],
     {ok, _} = compile:file(Src, CompilerOptions),
     ?assertEqual(
         proplists:delete(outdir, lists:sort(CompilerOptions)),
@@ -1056,7 +1062,12 @@ cover_options_fail_({_OldPath, Src, Module}) ->
     %% Verify passthru calls went to cover
     ?assertEqual({ok, {Module, 4}}, cover:analyze(Module, calls, module)).
 
-join(Path, Module, Ext) -> filename:join(Path, atom_to_list(Module) ++ Ext).
+test_file(Module, Ext) ->
+    filename:join(test_dir(), atom_to_list(Module) ++ Ext).
+
+test_dir() -> filename:dirname(?FILE).
+
+test_include() -> filename:join(test_dir(), "include").
 
 run_mock_no_cover_file(Module) ->
     ok = meck:new(Module),
@@ -1068,14 +1079,14 @@ run_mock_no_cover_file(Module) ->
 %% @doc Verify that passthrough calls _don't_ appear in cover
 %% analysis.
 no_cover_passthrough_test() ->
-    {ok, _} = cover:compile("../test/meck_test_module.erl"),
+    {ok, _} = cover:compile("test/meck_test_module.erl"),
     {ok, {meck_test_module, {0,3}}} = cover:analyze(meck_test_module, module),
     passthrough_test([no_passthrough_cover]),
     {ok, {meck_test_module, {0,3}}} = cover:analyze(meck_test_module, module).
 
 %% @doc Verify that passthrough calls appear in cover analysis.
 cover_passthrough_test() ->
-    {ok, _} = cover:compile("../test/meck_test_module.erl"),
+    {ok, _} = cover:compile("test/meck_test_module.erl"),
     ?assertEqual({ok, {meck_test_module, {0,3}}},
                  cover:analyze(meck_test_module, module)),
     passthrough_test([]),
@@ -1083,7 +1094,7 @@ cover_passthrough_test() ->
                  cover:analyze(meck_test_module, module)).
 
 cover_path_test() ->
-    {ok, _} = cover:compile("../test/meck_test_module.erl"),
+    {ok, _} = cover:compile("test/meck_test_module.erl"),
     ?assertEqual({ok, {meck_test_module, {0,3}}},
                  cover:analyze(meck_test_module, module)),
     ok = meck:new(meck_test_module, [passthrough]),
@@ -1109,8 +1120,10 @@ unload_when_crashed_test() ->
     Pid = whereis(SaltedName),
     ?assertEqual(true, is_pid(Pid)),
     unlink(Pid),
+    error_logger:tty(false),
     exit(Pid, expected_test_exit),
     timer:sleep(100),
+    error_logger:tty(true),
     ?assertEqual(undefined, whereis(SaltedName)),
     ?assertEqual(false, code:is_loaded(mymod)).
 
@@ -1246,7 +1259,7 @@ remote_setup() ->
     Myself = list_to_atom("meck_eunit_test@" ++ Hostname),
     net_kernel:start([Myself, shortnames]),
     {ok, Node} = slave:start_link(list_to_atom(Hostname), meck_remote_test,
-                                  "-pa test"),
+                                  "-pa \"" ++ test_dir() ++ "\""),
     {Mod, Bin, File} = code:get_object_code(meck),
     true = rpc:call(Node, code, add_path, [filename:dirname(File)]),
     {module, Mod} = rpc:call(Node, code, load_binary, [Mod, File, Bin]),
@@ -1264,7 +1277,7 @@ remote_meck_({Node, Mod}) ->
     ?assertEqual(true, rpc:call(Node, Mod, test, [])).
 
 remote_meck_cover_({Node, Mod}) ->
-    {ok, Mod} = cover:compile(Mod),
+    {ok, Mod} = cover:compile(test_file(Mod, ".erl")),
     {ok, _Nodes} = cover:start([Node]),
     ?assertEqual(ok, rpc:call(Node, meck, new, [Mod])).
 
@@ -1320,7 +1333,9 @@ can_mock_sticky_module_not_yet_loaded_({Mod, _}) ->
     ?assert(code:is_sticky(Mod)).
 
 cannot_mock_sticky_module_without_unstick_({Mod, _}) ->
-    ?assertError(module_is_sticky, meck:new(Mod, [no_link])).
+    error_logger:tty(false),
+    ?assertError(module_is_sticky, meck:new(Mod, [no_link])),
+    error_logger:tty(true).
 
 can_mock_non_sticky_module_test() ->
     ?assertNot(code:is_sticky(meck_test_module)),
@@ -1424,6 +1439,7 @@ wait_timeout_test() ->
     meck:unload().
 
 wait_for_the_same_pattern_on_different_processes_test() ->
+    error_logger:tty(false),
     %% Given
     meck:new(test, [non_strict]),
     meck:expect(test, foo, 2, ok),
@@ -1447,9 +1463,11 @@ wait_for_the_same_pattern_on_different_processes_test() ->
     ?assertTerminated(MonitorRef1, normal, 300),
     ?assertTerminated(MonitorRef2, {timeout, _}, 300),
     %% Clean
-    meck:unload().
+    meck:unload(),
+    error_logger:tty(true).
 
 wait_for_different_patterns_on_different_processes_test() ->
+    error_logger:tty(false),
     %% Given
     meck:new(test, [non_strict]),
     meck:expect(test, foo, 1, ok),
@@ -1476,7 +1494,8 @@ wait_for_different_patterns_on_different_processes_test() ->
     ?assertTerminated(MonitorRef1, {timeout, _}, 300),
     ?assertTerminated(MonitorRef2, normal, 300),
     %% Clean
-    meck:unload().
+    meck:unload(),
+    error_logger:tty(true).
 
 wait_purge_expired_tracker_test() ->
     %% Given


[22/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Fix errors in capture/5, capture/6 documentation


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/138cfb7b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/138cfb7b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/138cfb7b

Branch: refs/heads/master
Commit: 138cfb7b73e5acf2791cedb7288c5509e554b968
Parents: 10c5063
Author: Marco Molteni <ma...@laposte.net>
Authored: Sat Apr 15 18:37:14 2017 +0200
Committer: Marco Molteni <ma...@laposte.net>
Committed: Sat Apr 15 18:37:14 2017 +0200

----------------------------------------------------------------------
 src/meck.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/138cfb7b/src/meck.erl
----------------------------------------------------------------------
diff --git a/src/meck.erl b/src/meck.erl
index adb09e8..7206f7c 100644
--- a/src/meck.erl
+++ b/src/meck.erl
@@ -643,7 +643,7 @@ is(MatcherImpl) ->
 %%
 %% If an occurrence of a function call irrespective of the calling process needs
 %% to be captured then `_' might be passed as `OptCallerPid', but it is better
-%% to use {@link capture/3} instead.
+%% to use {@link capture/5} instead.
 -spec capture(Occur, Mod, Func, OptArgsSpec, ArgNum, OptCallerPid) -> ArgValue when
       Occur :: first | last | pos_integer(),
       Mod :: atom(),
@@ -667,7 +667,7 @@ capture(Occur, Mod, Func, OptArgsSpec, ArgNum, OptCallerPid) ->
 %% retrieve the argument value passed when the function was called the first
 %% or the last time respectively.
 %%
-%% @equiv capture(Occur, '_', Mod, Func, OptArgsSpec, ArgNum)
+%% @equiv capture(Occur, Mod, Func, OptArgsSpec, ArgNum, '_')
 -spec capture(Occur, Mod, Func, OptArgsSpec, ArgNum) -> ArgValue when
       Occur :: first | last | pos_integer(),
       Mod::atom(),


[40/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Version 0.8.7


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/5ea90ad5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/5ea90ad5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/5ea90ad5

Branch: refs/heads/master
Commit: 5ea90ad5910e323f0860fd4ce81eb7a54cf782f1
Parents: acd90c2
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Jun 29 15:09:00 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Jun 29 15:09:00 2017 +0200

----------------------------------------------------------------------
 doc/overview.edoc | 2 +-
 src/meck.app.src  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/5ea90ad5/doc/overview.edoc
----------------------------------------------------------------------
diff --git a/doc/overview.edoc b/doc/overview.edoc
index 1263571..0c4a5d9 100644
--- a/doc/overview.edoc
+++ b/doc/overview.edoc
@@ -16,7 +16,7 @@
 
 @author Adam Lindberg <ep...@gmail.com>
 @copyright 2011, Adam Lindberg & Erlang Solutions Ltd
-@version 0.8.6
+@version 0.8.7
 @title meck, a Mocking Library for Erlang
 
 @doc

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/5ea90ad5/src/meck.app.src
----------------------------------------------------------------------
diff --git a/src/meck.app.src b/src/meck.app.src
index b159f0f..2a4db46 100644
--- a/src/meck.app.src
+++ b/src/meck.app.src
@@ -1,6 +1,6 @@
 {application, meck, [
     {description, "A mocking framework for Erlang"},
-    {vsn, "0.8.6"},
+    {vsn, "0.8.7"},
     {modules, []},
     {registered, []},
     {applications, [kernel, stdlib, tools]},


[36/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Add GitHub Changelog Generator config


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/28df8192
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/28df8192
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/28df8192

Branch: refs/heads/master
Commit: 28df8192a55876e2f3407171b36db0d5a00accad
Parents: e8035f7
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Jun 29 14:38:31 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Jun 29 14:38:31 2017 +0200

----------------------------------------------------------------------
 .github_changelog_generator | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/28df8192/.github_changelog_generator
----------------------------------------------------------------------
diff --git a/.github_changelog_generator b/.github_changelog_generator
new file mode 100644
index 0000000..9f44b1f
--- /dev/null
+++ b/.github_changelog_generator
@@ -0,0 +1,3 @@
+issues-wo-labels=false
+pr-wo-labels=false
+unreleased=false


[05/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Explicitly track master branch build status

Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/82e84063
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/82e84063
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/82e84063

Branch: refs/heads/master
Commit: 82e84063fe30889047e3d500df86b705221ae999
Parents: 1265700
Author: Adam Lindberg <he...@alind.io>
Authored: Sun May 1 19:14:34 2016 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Sun May 1 19:14:34 2016 +0200

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/82e84063/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 4d4fd9e..d45ff2f 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
 [![Release](http://img.shields.io/github/release/eproxus/meck.svg?style=flat-square)](https://github.com/eproxus/meck/releases/latest)
-[![Build Status](http://img.shields.io/travis/eproxus/meck.svg?style=flat-square)](http://travis-ci.org/eproxus/meck)
+[![Build Status](https://img.shields.io/travis/eproxus/meck/master.svg?style=flat-square)](http://travis-ci.org/eproxus/meck)
 [![Code Climate](http://img.shields.io/badge/code_climate-Erlang_17.4-brightgreen.svg?style=flat-square)](https://travis-ci.org/eproxus/meck)
 
 Meck


[48/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Update copyright notices


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/cb155caf
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/cb155caf
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/cb155caf

Branch: refs/heads/master
Commit: cb155caf49b370cc72c6600f773c8cdab10e67d6
Parents: 2dbccc1
Author: Adam Lindberg <he...@alind.io>
Authored: Tue Aug 29 14:30:30 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Tue Aug 29 14:30:30 2017 +0200

----------------------------------------------------------------------
 NOTICE                       | 3 ++-
 doc/overview.edoc            | 4 ++--
 src/meck.erl                 | 4 ++--
 src/meck_code.erl            | 4 ++--
 test/meck_expect_tests.erl   | 2 +-
 test/meck_ret_spec_tests.erl | 2 +-
 test/meck_tests.erl          | 2 +-
 7 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/cb155caf/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
index 18ce5a7..ad6b6e6 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,6 @@
 Copyright 2011 Adam Lindberg
+Copyright 2010-2017 Adam Lindberg
 
-Copyright 2011 Erlang Solutions
+Copyright 2010-2011 Erlang Solutions Ltd
 This product contains code developed at Erlang Solutions.
 (http://www.erlang-solutions.com/)

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/cb155caf/doc/overview.edoc
----------------------------------------------------------------------
diff --git a/doc/overview.edoc b/doc/overview.edoc
index a924652..9611f32 100644
--- a/doc/overview.edoc
+++ b/doc/overview.edoc
@@ -1,5 +1,5 @@
 %%==============================================================================
-%% Copyright 2010 Erlang Solutions Ltd.
+%% Copyright 2010-2017 Adam Lindberg, 2010-2011 Erlang Solutions Ltd
 %%
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
 %%==============================================================================
 
 @author Adam Lindberg <ep...@gmail.com>
-@copyright 2011, Adam Lindberg & Erlang Solutions Ltd
+@copyright 2010-2017 Adam Lindberg, 2010-2011 Erlang Solutions Ltd
 @version 0.8.8
 @title meck, a Mocking Library for Erlang
 

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/cb155caf/src/meck.erl
----------------------------------------------------------------------
diff --git a/src/meck.erl b/src/meck.erl
index 7206f7c..6e2b324 100644
--- a/src/meck.erl
+++ b/src/meck.erl
@@ -1,5 +1,5 @@
 %%%============================================================================
-%%% Copyright 2011 Adam Lindberg & Erlang Solutions Ltd.
+%%% Copyright 2010-2017 Adam Lindberg, 2010-2011 Erlang Solutions Ltd
 %%%
 %%% Licensed under the Apache License, Version 2.0 (the "License");
 %%% you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
 %%%============================================================================
 
 %%% @author Adam Lindberg <ep...@gmail.com>
-%%% @copyright 2011, Adam Lindberg & Erlang Solutions Ltd
+%%% @copyright 2010-2017 Adam Lindberg, 2010-2011 Erlang Solutions Ltd
 %%% @doc Module mocking library for Erlang.
 
 -module(meck).

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/cb155caf/src/meck_code.erl
----------------------------------------------------------------------
diff --git a/src/meck_code.erl b/src/meck_code.erl
index 806a721..4801e19 100644
--- a/src/meck_code.erl
+++ b/src/meck_code.erl
@@ -1,5 +1,5 @@
 %%=============================================================================
-%% Copyright 2011 Adam Lindberg & Erlang Solutions Ltd.
+%% Copyright 2010-2017 Adam Lindberg, 2010-2011 Erlang Solutions Ltd
 %%
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
 
 %% @hidden
 %% @author Adam Lindberg <ep...@gmail.com>
-%% @copyright 2011, Adam Lindberg & Erlang Solutions Ltd
+%% @copyright 2010-2017 Adam Lindberg, 2010-2011 Erlang Solutions Ltd
 %% @doc Module wrangling helper functions.
 
 -module(meck_code).

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/cb155caf/test/meck_expect_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_expect_tests.erl b/test/meck_expect_tests.erl
index 08b17f3..574536e 100644
--- a/test/meck_expect_tests.erl
+++ b/test/meck_expect_tests.erl
@@ -1,5 +1,5 @@
 %%%============================================================================
-%%% Copyright 2010 Erlang Solutions Ltd.
+%%% Copyright 2010-2017 Adam Lindberg, 2010-2011 Erlang Solutions Ltd
 %%%
 %%% Licensed under the Apache License, Version 2.0 (the "License");
 %%% you may not use this file except in compliance with the License.

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/cb155caf/test/meck_ret_spec_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_ret_spec_tests.erl b/test/meck_ret_spec_tests.erl
index 485f99d..0d3398e 100644
--- a/test/meck_ret_spec_tests.erl
+++ b/test/meck_ret_spec_tests.erl
@@ -1,5 +1,5 @@
 %%%============================================================================
-%%% Copyright 2010 Erlang Solutions Ltd.
+%%% Copyright 2010-2017 Adam Lindberg, 2010-2011 Erlang Solutions Ltd
 %%%
 %%% Licensed under the Apache License, Version 2.0 (the "License");
 %%% you may not use this file except in compliance with the License.

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/cb155caf/test/meck_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_tests.erl b/test/meck_tests.erl
index 1801a1b..bd3d3eb 100644
--- a/test/meck_tests.erl
+++ b/test/meck_tests.erl
@@ -1,5 +1,5 @@
 %%=============================================================================
-%% Copyright 2010 Erlang Solutions Ltd.
+%% Copyright 2010-2017 Adam Lindberg, 2010-2011 Erlang Solutions Ltd
 %%
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.


[23/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Merge pull request #172 from marco-m/fix-capture-doc

Fix errors in capture/5, capture/6 documentation

Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/f52fd7b1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/f52fd7b1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/f52fd7b1

Branch: refs/heads/master
Commit: f52fd7b19ade8b3cb3c7e78fd85879a6cfdf2da7
Parents: 10c5063 138cfb7
Author: Adam Lindberg <he...@alind.io>
Authored: Thu May 4 09:14:28 2017 +0200
Committer: GitHub <no...@github.com>
Committed: Thu May 4 09:14:28 2017 +0200

----------------------------------------------------------------------
 src/meck.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[35/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Create new CHANGELOG.md

This is using the github_changelog_generator available at
https://github.com/skywinder/github-changelog-generator.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/e8035f70
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/e8035f70
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/e8035f70

Branch: refs/heads/master
Commit: e8035f70bda5b53bf41d6dc14c5eba8a543a9fb0
Parents: 0e6c040
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Jun 29 12:08:16 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Jun 29 12:08:16 2017 +0200

----------------------------------------------------------------------
 CHANGELOG    |   1 -
 CHANGELOG.md | 235 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 235 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/e8035f70/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
deleted file mode 100644
index 8b13789..0000000
--- a/CHANGELOG
+++ /dev/null
@@ -1 +0,0 @@
-

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/e8035f70/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..03caeb5
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,235 @@
+# Change Log
+
+## [0.8.6](https://github.com/eproxus/meck/tree/0.8.6) (2017-06-28)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.8.5...0.8.6)
+
+## [0.8.5](https://github.com/eproxus/meck/tree/0.8.5) (2017-06-28)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.8.4...0.8.5)
+
+**Implemented enhancements:**
+
+- Add meck:get\_state/0, meck:reset\_state/0 [\#125](https://github.com/eproxus/meck/issues/125)
+- Deprecate history and provide history digging functions instead  [\#85](https://github.com/eproxus/meck/issues/85)
+- Mock a module only from the perspective of a specific module [\#34](https://github.com/eproxus/meck/issues/34)
+- meck:app [\#16](https://github.com/eproxus/meck/issues/16)
+- Mock a module only from the perspective of a specific caller \(calling process\) [\#3](https://github.com/eproxus/meck/issues/3)
+- Add 19.2 to versions tested by TravisCI [\#168](https://github.com/eproxus/meck/pull/168) ([RackerJohnMadrid](https://github.com/RackerJohnMadrid))
+- Add `meck:result/4-5' that returns the result value of a particular function [\#163](https://github.com/eproxus/meck/pull/163) ([amutake](https://github.com/amutake))
+- fix \#88 [\#162](https://github.com/eproxus/meck/pull/162) ([yutopp](https://github.com/yutopp))
+
+**Fixed bugs:**
+
+- breaks on R20 [\#175](https://github.com/eproxus/meck/issues/175)
+- Mocked module will return empty function clause error [\#167](https://github.com/eproxus/meck/issues/167)
+- Deleting an expectation in passthrough mode does not restore original function [\#88](https://github.com/eproxus/meck/issues/88)
+- Passthrough crashes without +debug\_info [\#14](https://github.com/eproxus/meck/issues/14)
+- fix behavio\(u\)r attributes validation on Erlang R20 [\#176](https://github.com/eproxus/meck/pull/176) ([RoadRunnr](https://github.com/RoadRunnr))
+- Fix errors in capture/5, capture/6 documentation [\#172](https://github.com/eproxus/meck/pull/172) ([marco-m](https://github.com/marco-m))
+- Fix eunit compile failure on Erlang 17+ \(hamcrest\) [\#161](https://github.com/eproxus/meck/pull/161) ([marco-m](https://github.com/marco-m))
+
+## [0.8.4](https://github.com/eproxus/meck/tree/0.8.4) (2015-12-29)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.8.3...0.8.4)
+
+**Implemented enhancements:**
+
+- Add merge\_expects option to meck\_proc [\#153](https://github.com/eproxus/meck/pull/153) ([edgurgel](https://github.com/edgurgel))
+
+**Fixed bugs:**
+
+- FIX: optional\_callbacks [\#151](https://github.com/eproxus/meck/pull/151) ([soranoba](https://github.com/soranoba))
+- Fix race condition between meck:unload/1 and calls to the mocked module [\#150](https://github.com/eproxus/meck/pull/150) ([dszoboszlay](https://github.com/dszoboszlay))
+
+**Merged pull requests:**
+
+- Update 'problematic modules list' [\#156](https://github.com/eproxus/meck/pull/156) ([lilrooness](https://github.com/lilrooness))
+- Document the caveat with mocking module-local calls. [\#145](https://github.com/eproxus/meck/pull/145) ([bpuzon](https://github.com/bpuzon))
+
+## [0.8.3](https://github.com/eproxus/meck/tree/0.8.3) (2015-06-09)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.8.2...0.8.3)
+
+**Implemented enhancements:**
+
+- Update meck for OTP 18.0 [\#139](https://github.com/eproxus/meck/pull/139) ([gomoripeti](https://github.com/gomoripeti))
+- Allow hiding 'on\_load' attribute. [\#131](https://github.com/eproxus/meck/pull/131) ([rlipscombe](https://github.com/rlipscombe))
+
+**Fixed bugs:**
+
+- Please document that modules can be not meck'able [\#135](https://github.com/eproxus/meck/issues/135)
+- crypto module [\#59](https://github.com/eproxus/meck/issues/59)
+- Removed test and doc from target all in Makefile [\#126](https://github.com/eproxus/meck/pull/126) ([jfacorro](https://github.com/jfacorro))
+
+**Merged pull requests:**
+
+- Fix typo [\#143](https://github.com/eproxus/meck/pull/143) ([derek121](https://github.com/derek121))
+- Run tests in travis [\#138](https://github.com/eproxus/meck/pull/138) ([gomoripeti](https://github.com/gomoripeti))
+- Fix variable exported from case [\#128](https://github.com/eproxus/meck/pull/128) ([hazardfn](https://github.com/hazardfn))
+
+## [0.8.2](https://github.com/eproxus/meck/tree/0.8.2) (2014-05-05)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.8.1...0.8.2)
+
+**Implemented enhancements:**
+
+- Implicit new [\#80](https://github.com/eproxus/meck/issues/80)
+- Should return compilation errors [\#33](https://github.com/eproxus/meck/issues/33)
+- Allow meck to build under Erlang 17.0-rc2 and Erlang R16B03-1 [\#118](https://github.com/eproxus/meck/pull/118) ([myers](https://github.com/myers))
+
+**Fixed bugs:**
+
+- Put non-strict option in the README.md [\#117](https://github.com/eproxus/meck/issues/117)
+- With a bogus test instantiator, meck fails with {error, enoent} in meck\_cover:read\_cover\_file/1 [\#114](https://github.com/eproxus/meck/issues/114)
+- Unable to mock lists module [\#87](https://github.com/eproxus/meck/issues/87)
+- Do not consider a 3-tuple return value as an exception [\#113](https://github.com/eproxus/meck/pull/113) ([lucafavatella](https://github.com/lucafavatella))
+
+**Closed issues:**
+
+- Split tests into several test suites [\#83](https://github.com/eproxus/meck/issues/83)
+- Better documentation [\#79](https://github.com/eproxus/meck/issues/79)
+- Use right function in exceptions [\#26](https://github.com/eproxus/meck/issues/26)
+
+**Merged pull requests:**
+
+- Add Erlang 17.0 to the test matrix [\#122](https://github.com/eproxus/meck/pull/122) ([myers](https://github.com/myers))
+
+## [0.8.1](https://github.com/eproxus/meck/tree/0.8.1) (2013-08-29)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.8...0.8.1)
+
+**Fixed bugs:**
+
+- Attribute errors [\#110](https://github.com/eproxus/meck/pull/110) ([twonds](https://github.com/twonds))
+
+## [0.8](https://github.com/eproxus/meck/tree/0.8) (2013-08-17)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.7.2...0.8)
+
+**Implemented enhancements:**
+
+- Warning from reltool on unexpected item `build\_dependencies` [\#92](https://github.com/eproxus/meck/issues/92)
+- Capture argument [\#86](https://github.com/eproxus/meck/issues/86)
+- Wait for a number of function calls [\#81](https://github.com/eproxus/meck/issues/81)
+- Mocking of parameterized modules [\#4](https://github.com/eproxus/meck/issues/4)
+- Allow calling original function from within expect fun [\#2](https://github.com/eproxus/meck/issues/2)
+- Make remote\_setup more robust [\#109](https://github.com/eproxus/meck/pull/109) ([i11](https://github.com/i11))
+- Implement 'implicit new' feature \#80 [\#104](https://github.com/eproxus/meck/pull/104) ([horkhe](https://github.com/horkhe))
+- Fix warning in R16B [\#100](https://github.com/eproxus/meck/pull/100) ([rufrozen](https://github.com/rufrozen))
+- Wait for a number of calls feature \(\#81\) [\#99](https://github.com/eproxus/meck/pull/99) ([horkhe](https://github.com/horkhe))
+- Feature/capture [\#97](https://github.com/eproxus/meck/pull/97) ([horkhe](https://github.com/horkhe))
+- Make `undefined\_module` error contain module name [\#96](https://github.com/eproxus/meck/pull/96) ([horkhe](https://github.com/horkhe))
+- \(Cont.\) Make `passthrough/1' and `func/1` into a `ret\_spec`and func [\#91](https://github.com/eproxus/meck/pull/91) ([horkhe](https://github.com/horkhe))
+- Introduce support for matchers: [\#89](https://github.com/eproxus/meck/pull/89) ([horkhe](https://github.com/horkhe))
+- Feature/file bif passthrough [\#84](https://github.com/eproxus/meck/pull/84) ([horkhe](https://github.com/horkhe))
+- Refactor meck into smaller functional modules [\#82](https://github.com/eproxus/meck/pull/82) ([horkhe](https://github.com/horkhe))
+- Two new options for meck [\#77](https://github.com/eproxus/meck/pull/77) ([norton](https://github.com/norton))
+- Feature/honest mocks [\#75](https://github.com/eproxus/meck/pull/75) ([horkhe](https://github.com/horkhe))
+- Feature/new exception syntax [\#74](https://github.com/eproxus/meck/pull/74) ([horkhe](https://github.com/horkhe))
+- Extended expect syntax and more [\#73](https://github.com/eproxus/meck/pull/73) ([horkhe](https://github.com/horkhe))
+- Introduce 'stub\_all' option [\#78](https://github.com/eproxus/meck/pull/78) ([horkhe](https://github.com/horkhe))
+- Support for location included in stack traces in Erlang R15 [\#52](https://github.com/eproxus/meck/pull/52) ([bjnortier](https://github.com/bjnortier))
+
+**Fixed bugs:**
+
+- http://eproxus.github.io/meck 404 [\#103](https://github.com/eproxus/meck/issues/103)
+- R16A preview - parameterized modules are no longer supported [\#94](https://github.com/eproxus/meck/issues/94)
+- meck eunit tests fail on R15B [\#51](https://github.com/eproxus/meck/issues/51)
+- meck:new fails if running in embedded mode and module not loaded [\#35](https://github.com/eproxus/meck/issues/35)
+- Support meck:expect with improper list mock data [\#102](https://github.com/eproxus/meck/pull/102) ([adbl](https://github.com/adbl))
+- Remove unsupported option from the app.src file [\#101](https://github.com/eproxus/meck/pull/101) ([amiramix](https://github.com/amiramix))
+- Remove parametrized module test [\#95](https://github.com/eproxus/meck/pull/95) ([norton](https://github.com/norton))
+
+**Closed issues:**
+
+- Add helper function to mock modules [\#53](https://github.com/eproxus/meck/issues/53)
+- Move examples to wiki [\#10](https://github.com/eproxus/meck/issues/10)
+- Write tutorial [\#9](https://github.com/eproxus/meck/issues/9)
+
+**Merged pull requests:**
+
+- Fix failing build. [\#98](https://github.com/eproxus/meck/pull/98) ([cmeiklejohn](https://github.com/cmeiklejohn))
+- fix path of rebar [\#69](https://github.com/eproxus/meck/pull/69) ([yamt](https://github.com/yamt))
+
+## [0.7.2](https://github.com/eproxus/meck/tree/0.7.2) (2012-05-06)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.7.1...0.7.2)
+
+**Implemented enhancements:**
+
+- Mocking of sticky modules [\#7](https://github.com/eproxus/meck/issues/7)
+- Rz passthrough cover [\#56](https://github.com/eproxus/meck/pull/56) ([rzezeski](https://github.com/rzezeski))
+- Mock parametrized modules [\#55](https://github.com/eproxus/meck/pull/55) ([shino](https://github.com/shino))
+- Clean test directory [\#50](https://github.com/eproxus/meck/pull/50) ([norton](https://github.com/norton))
+- New features - pid in history and count\_calls and wildcard\_count\_calls functions [\#40](https://github.com/eproxus/meck/pull/40) ([daha](https://github.com/daha))
+- Include meck:new/2 arguments in errors [\#39](https://github.com/eproxus/meck/pull/39) ([legoscia](https://github.com/legoscia))
+- .travis.yml config without rebar [\#38](https://github.com/eproxus/meck/pull/38) ([wardbekker](https://github.com/wardbekker))
+- Filter out parse\_transforms from compilation options [\#32](https://github.com/eproxus/meck/pull/32) ([djnym](https://github.com/djnym))
+
+**Fixed bugs:**
+
+- dialyzer warnings with meck \(73c0b3e\) [\#58](https://github.com/eproxus/meck/issues/58)
+- Inconsistency in documentation [\#49](https://github.com/eproxus/meck/issues/49)
+- meck:unload/0 sometimes crashes [\#48](https://github.com/eproxus/meck/issues/48)
+- Add test/cover\_test\_module.beam to rebar.config's clean files [\#47](https://github.com/eproxus/meck/issues/47)
+- Fix typo in no\_passthrough\_cover atom [\#62](https://github.com/eproxus/meck/pull/62) ([garret-smith](https://github.com/garret-smith))
+
+**Merged pull requests:**
+
+- remove repetition; typo [\#57](https://github.com/eproxus/meck/pull/57) ([Erkan-Yilmaz](https://github.com/Erkan-Yilmaz))
+- Update list of OTP releases in .travis.yml  [\#54](https://github.com/eproxus/meck/pull/54) ([michaelklishin](https://github.com/michaelklishin))
+- Remove IDE project artifacts [\#46](https://github.com/eproxus/meck/pull/46) ([xenolinguist](https://github.com/xenolinguist))
+- Making all the test funs in the foreach in meck\_test\_/0 fully qualified funs [\#44](https://github.com/eproxus/meck/pull/44) ([daha](https://github.com/daha))
+- Improved tests: Added an ok in the end of the tests that use a helper function with asserts [\#43](https://github.com/eproxus/meck/pull/43) ([daha](https://github.com/daha))
+- Verify history/2 returns events in the correct order & fix to flaky history\_by\_pid\_/1 test [\#42](https://github.com/eproxus/meck/pull/42) ([daha](https://github.com/daha))
+
+## [0.7.1](https://github.com/eproxus/meck/tree/0.7.1) (2011-07-18)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.7...0.7.1)
+
+**Fixed bugs:**
+
+- Can I call original function with different arguments? [\#30](https://github.com/eproxus/meck/issues/30)
+
+## [0.7](https://github.com/eproxus/meck/tree/0.7) (2011-07-13)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.6.3...0.7)
+
+**Implemented enhancements:**
+
+- Enable mocking of sticky modules \(not used by code\_server\) [\#29](https://github.com/eproxus/meck/pull/29) ([xenolinguist](https://github.com/xenolinguist))
+
+## [0.6.3](https://github.com/eproxus/meck/tree/0.6.3) (2011-06-30)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.6.2...0.6.3)
+
+**Implemented enhancements:**
+
+- Interface inconsistency [\#8](https://github.com/eproxus/meck/issues/8)
+
+**Fixed bugs:**
+
+- Interface inconsistency [\#8](https://github.com/eproxus/meck/issues/8)
+
+## [0.6.2](https://github.com/eproxus/meck/tree/0.6.2) (2011-06-09)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.6.1...0.6.2)
+
+## [0.6.1](https://github.com/eproxus/meck/tree/0.6.1) (2011-06-08)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.6...0.6.1)
+
+**Implemented enhancements:**
+
+- use localhost for remote test rather than hostname [\#27](https://github.com/eproxus/meck/pull/27) ([joewilliams](https://github.com/joewilliams))
+
+**Fixed bugs:**
+
+- Makefile requires local rebar and documentation says rebar on path [\#28](https://github.com/eproxus/meck/issues/28)
+
+## [0.6](https://github.com/eproxus/meck/tree/0.6) (2011-05-25)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.5.1...0.6)
+
+## [0.5.1](https://github.com/eproxus/meck/tree/0.5.1) (2011-05-23)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.5...0.5.1)
+
+## [0.5](https://github.com/eproxus/meck/tree/0.5) (2011-04-12)
+**Implemented enhancements:**
+
+- Add meck:received/3 API for easier history checking [\#23](https://github.com/eproxus/meck/pull/23) ([mbbx6spp](https://github.com/mbbx6spp))
+
+**Closed issues:**
+
+- dialyzer unmatched return errors [\#24](https://github.com/eproxus/meck/issues/24)
+
+
+
+\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\ No newline at end of file


[21/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Detail edge cases of validate/1


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/10c50634
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/10c50634
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/10c50634

Branch: refs/heads/master
Commit: 10c50634b57d1f7ce5205e2fae56e700c4da3397
Parents: f0904dc
Author: Adam Lindberg <he...@alind.io>
Authored: Fri Apr 7 16:31:48 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Fri Apr 7 16:31:48 2017 +0200

----------------------------------------------------------------------
 src/meck.erl | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/10c50634/src/meck.erl
----------------------------------------------------------------------
diff --git a/src/meck.erl b/src/meck.erl
index 0ed87ec..adb09e8 100644
--- a/src/meck.erl
+++ b/src/meck.erl
@@ -349,6 +349,31 @@ passthrough(Args) when is_list(Args) ->
 %% arguments or non-existing function (undef), wrong arguments
 %% (function clause) or unexpected exceptions.
 %%
+%% Validation can detect:
+%%
+%% <ul>
+%%   <li>When a function was called with the wrong argument types
+%%       (`function_clause')</li>
+%%   <li>When an exception was thrown</li>
+%%   <li>When an exception was thrown and expected (via meck:exception/2),
+%%       which still results in `true' being returned</li>
+%% </ul>
+%%
+%% Validation cannot detect:
+%%
+%% <ul>
+%%   <li>When you didn't call a function</li>
+%%   <li>When you called a function with the wrong number of arguments
+%%       (`undef')</li>
+%%   <li>When you called an undefined function (`undef')</li>
+%% </ul>
+%%
+%% The reason Meck cannot detect these cases is because of how it is implemented.
+%% Meck replaces the module with a mock and a process that maintains the mock.
+%% Everything Meck get goes through that mock module. Meck does not insert
+%% itself at the caller level (i.e. in your module or in your test case), so it
+%% cannot know that you failed to call a module.
+%%
 %% Use the {@link history/1} or {@link history/2} function to analyze errors.
 -spec validate(Mods) -> boolean() when
       Mods :: Mod | [Mod],


[29/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Remove dialyzer attributes when creating mock


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/3b772d0a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/3b772d0a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/3b772d0a

Branch: refs/heads/master
Commit: 3b772d0afc7dd3e7fcae4f256f7728e9975fb412
Parents: a32733d
Author: Adam Lindberg <he...@alind.io>
Authored: Wed Jun 28 11:21:22 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Wed Jun 28 11:21:22 2017 +0200

----------------------------------------------------------------------
 src/meck_code_gen.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/3b772d0a/src/meck_code_gen.erl
----------------------------------------------------------------------
diff --git a/src/meck_code_gen.erl b/src/meck_code_gen.erl
index e6bb9f3..b7ef322 100644
--- a/src/meck_code_gen.erl
+++ b/src/meck_code_gen.erl
@@ -62,7 +62,8 @@ get_current_call() ->
 attribute({Key, _Value}, Attrs)
     when Key =:= vsn;
 	 Key =:= deprecated;
-	 Key =:= optional_callbacks ->
+	 Key =:= optional_callbacks;
+     Key =:= dialyzer ->
     Attrs;
 attribute({Key, Value}, Attrs)
   when (Key =:= behaviour orelse Key =:= behavior)


[16/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Refresh README


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/2fcbfb1f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/2fcbfb1f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/2fcbfb1f

Branch: refs/heads/master
Commit: 2fcbfb1f6c70d2e4affeb4b1a887899c1c3379d3
Parents: 6f1281d
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Feb 2 10:33:00 2017 +0100
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Feb 2 10:33:00 2017 +0100

----------------------------------------------------------------------
 README.md | 150 +++++++++++++++++++++++++++++++--------------------------
 1 file changed, 81 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/2fcbfb1f/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 15548e1..528bd63 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
-[![Release](http://img.shields.io/github/release/eproxus/meck.svg?style=flat-square)](https://github.com/eproxus/meck/releases/latest)
-[![Build Status](https://img.shields.io/travis/eproxus/meck/master.svg?style=flat-square)](http://travis-ci.org/eproxus/meck)
-[![Code Climate](http://img.shields.io/badge/code_climate-Erlang_18.3-brightgreen.svg?style=flat-square)](https://travis-ci.org/eproxus/meck/branches)
+[![Travis][travis badge]][travis]
+[![Hex.pm Version][hex version badge]][hex]
+[![Hex.pm License][hex license badge]][hex]
+[![Erlang Versions][erlang version badge]][travis]
+[![Build Tool][build tool]][hex]
 
 Meck
 ====
@@ -10,7 +12,7 @@ A mocking library for Erlang.
 Features
 --------
 
-See what's new in [0.8 Release Notes][1].
+See what's new in [0.8 Release Notes][release_notes_0.8].
 
   * Dynamic return values using sequences and loops of static values
   * Compact definition of mock arguments, clauses and return values
@@ -20,7 +22,7 @@ See what's new in [0.8 Release Notes][1].
   * Throwing of expected exceptions that keeps the module valid
   * Throws an error when mocking a module that doesn't exist or has been
     renamed (disable with option `non_strict`)
-  * Support for [Hamcrest][2] matchers
+  * Support for [Hamcrest][hamcrest] matchers
   * Automatic backup and restore of cover data
   * Mock is linked to the creating process and will unload automatically
     when a crash occurs (disable with option `no_link`)
@@ -46,9 +48,9 @@ ok
 ** exception error: undefined function dog:bark/0
 ```
 
-Exceptions can be anticipated by Meck (resulting in validation still
-passing). This is intended to be used to test code that can and should
-handle certain exceptions indeed does take care of them:
+Exceptions can be anticipated by Meck (resulting in validation still passing).
+This is intended to be used to test code that can and should handle certain
+exceptions indeed does take care of them:
 
 ```erl
 5> meck:expect(dog, meow, fun() -> meck:exception(error, not_a_cat) end).
@@ -66,10 +68,10 @@ ok
 true
 ```
 
-Normal Erlang exceptions result in a failed validation. The following
-example is just to demonstrate the behavior, in real test code the
-exception would normally come from the code under test (which should,
-if not expected, invalidate the mocked module):
+Normal Erlang exceptions result in a failed validation. The following example is
+just to demonstrate the behavior, in real test code the exception would normally
+come from the code under test (which should, if not expected, invalidate the
+mocked module):
 
 ```erl
 8> meck:expect(dog, jump, fun(Height) when Height > 3 ->
@@ -103,11 +105,10 @@ my_test() ->
     meck:unload(my_library_module).
 ```
 
-Pass-through is used when the original functionality of a module
-should be kept. When the option `passthrough` is used when calling
-`new/2` all functions in the original module will be kept in the
-mock. These can later be overridden by calling `expect/3` or
-`expect/4`.
+Pass-through is used when the original functionality of a module should be kept.
+When the option `passthrough` is used when calling `new/2` all functions in the
+original module will be kept in the mock. These can later be overridden by
+calling `expect/3` or `expect/4`.
 
 ```erl
 Eshell V5.8.4  (abort with ^G)
@@ -117,11 +118,10 @@ ok
 "test"
 ```
 
-It's also possible to pass calls to the original function allowing us
-to override only a certain behavior of a function (this usage is
-compatible with the `passthrough` option). `passthrough/1` will always
-call the original function with the same name as the expect is 
-defined in):
+It's also possible to pass calls to the original function allowing us to
+override only a certain behavior of a function (this usage is compatible with
+the `passthrough` option). `passthrough/1` will always call the original
+function with the same name as the expect is defined in):
 
 ```erl
 Eshell V5.8.4  (abort with ^G)
@@ -137,17 +137,31 @@ ok
 "test"
 ```
 
+Use
+---
+
+Meck is best used via [Rebar 3]. Add the following dependency to your
+`rebar.config` in your project root:
+
+```erlang
+{deps, [
+    {meck, "0.8.4"}
+]}.
+```
+
 Build
 -----
 
-Meck requires `make` and [rebar][1] to build. To build Meck go to the Meck directory
+Meck requires `make` and [Rebar 2][rebar_2] to build (included in the
+repository, to be upgraded to Rebar 3). To build Meck go to the Meck directory
 and simply type:
 
 ```sh
 make
 ```
 
-In order to run all tests for Meck type the following command from the same directory:
+In order to run all tests for Meck type the following command from the same
+directory:
 
 ```sh
 make test
@@ -158,9 +172,9 @@ Two things might seem alarming when running the tests:
   1. Warnings emitted by cover
   2. An exception printed by SASL
 
-Both are expected due to the way Erlang currently prints errors. The
-important line you should look for is `All XX tests passed`, if that
-appears all is correct.
+Both are expected due to the way Erlang currently prints errors. The important
+line you should look for is `All XX tests passed`, if that appears all is
+correct.
 
 Documentation can be generated through the use of the following command:
 
@@ -168,43 +182,26 @@ Documentation can be generated through the use of the following command:
 make doc
 ```
 
-Install
--------
-
-Meck is best used via [rebar][3]. Add the following dependency t
-your `rebar.config` in your project root:
-
-```erlang
-{deps, [
- {meck, ".*",
-  {git, "https://github.com/eproxus/meck.git", {tag, "0.8.3"}}}
- ]}.
-```
-
-If you want to install your own built version of Meck add the ebin
-directory to your Erlang code path or move the Meck folder into your
-release folder and make sure that folder is in your `ERL_LIBS`
-environment variable.
-
 Caveats
 -------
 
-Meck will have trouble mocking certain modules since Meck works by
-recompiling and reloading modules. Since Erlang have a flat module
-namespace, replacing a module has to be done globally in the
-Erlang VM. This means certain modules cannot be mocked. The
-following is a non-exhaustive list of modules that can either be
-problematic to mock or not possible at all:
+Meck will have trouble mocking certain modules since Meck works by recompiling
+and reloading modules. Since Erlang have a flat module namespace, replacing a
+module has to be done globally in the Erlang VM. This means certain modules
+cannot be mocked. The following is a non-exhaustive list of modules that can
+either be problematic to mock or not possible at all:
 
 * `erlang`
 * `os`
 * `crypto`
 * `compile`
 * `global`
-* `timer` (possible to mock, but used by some test frameworks, like Elixir's ExUnit)
+* `timer` (possible to mock, but used by some test frameworks, like Elixir's
+  ExUnit)
+
+Also, a meck expectation set up for a function _f_ does not apply to the module-
+local invocation of _f_ within the mocked module. Consider the following module:
 
-Also, a meck expectation set up for a function _f_ does not apply to the module-local invocation of _f_ within the mocked module.
-Consider the following module:
 ```
 -module(test).
 -export([a/0, b/0, c/0]).
@@ -218,7 +215,9 @@ b() ->
 c() ->
   original.
 ```
-Note how the module-local call to `c/0` in `a/0` stays unchanged even though the expectation changes the externally visible behaviour of `c/0`:
+
+Note how the module-local call to `c/0` in `a/0` stays unchanged even though the
+expectation changes the externally visible behaviour of `c/0`:
 
 ```
 3> meck:new(test, [passthrough]).
@@ -236,24 +235,37 @@ changed
 Contribute
 ----------
 
-Patches are greatly appreciated! For a much nicer history, please
-[write good commit messages][5]. Use a branch name prefixed by
-`feature/` (e.g. `feature/my_example_branch`) for easier integration
-when developing new features or fixes for meck.
+Patches are greatly appreciated! For a much nicer history, please [write good
+commit messages][commit_messages]. Use a branch name prefixed by `feature/`
+(e.g. `feature/my_example_branch`) for easier integration when developing new
+features or fixes for meck.
 
-Should you find yourself using Meck and have issues, comments or
-feedback please [create an issue here on GitHub][4].
+Should you find yourself using Meck and have issues, comments or feedback please
+[create an issue here on GitHub][issues].
 
 Meck has been greatly improved by [many contributors]
 (https://github.com/eproxus/meck/graphs/contributors)!
 
 ### Donations
 
-If you or your company use Meck and find it useful, Bitcoin donations to the address `1M7pLbBpjkwxffT7kZPKhxiPGKf4eHDqtz` are greatly appreciated!
-
-  [1]: https://github.com/eproxus/meck/wiki/0.8-Release-Notes
-       "0.8 Release Notes"
-  [2]: https://github.com/hyperthunk/hamcrest-erlang "Hamcrest for Erlang"
-  [3]: https://github.com/basho/rebar "Rebar - A build tool for Erlang"
-  [4]: http://github.com/eproxus/meck/issues "Meck issues"
-
+If you or your company use Meck and find it useful, [Bitcoin
+donations][coinbase] are greatly appreciated!
+
+
+<!-- Badges -->
+[travis]: https://travis-ci.org/eproxus/meck
+[travis badge]: https://img.shields.io/travis/eproxus/meck.svg?style=flat-square
+[hex]: https://hex.pm/packages/meck
+[hex version badge]: https://img.shields.io/hexpm/v/meck.svg?style=flat-square
+[hex license badge]: https://img.shields.io/hexpm/l/meck.svg?style=flat-square
+[erlang version badge]: https://img.shields.io/badge/erlang-R15B03%20to%2019.2-blue.svg?style=flat-square
+[build tool]: https://img.shields.io/badge/build%20tool-rebar3-orange.svg?style=flat-square
+
+<!-- Links -->
+[release_notes_0.8]: https://github.com/eproxus/meck/wiki/0.8-Release-Notes
+[hamcrest]: https://github.com/hyperthunk/hamcrest-erlang
+[rebar_2]: https://github.com/rebar/rebar
+[rebar_3]: https://github.com/erlang/rebar3
+[issues]: http://github.com/eproxus/meck/issues
+[commit_messages]: http://chris.beams.io/posts/git-commit/
+[coinbase]: https://www.coinbase.com/alind


[43/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Fixes to publish script


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/9a24a110
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/9a24a110
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/9a24a110

Branch: refs/heads/master
Commit: 9a24a1109a75732634504ec0410a804a9bc11d48
Parents: 6554de5
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Jun 29 15:13:58 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Jun 29 15:13:58 2017 +0200

----------------------------------------------------------------------
 .scripts/meck-publish.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/9a24a110/.scripts/meck-publish.sh
----------------------------------------------------------------------
diff --git a/.scripts/meck-publish.sh b/.scripts/meck-publish.sh
index 4e9d972..7173009 100755
--- a/.scripts/meck-publish.sh
+++ b/.scripts/meck-publish.sh
@@ -26,7 +26,7 @@ git add doc/overview.edoc
 
 # Commit, tag and push
 git commit -m "Version $VSN"
-git tag -s $1 -m "Version $VSN"
+git tag -s "$VSN" -m "Version $VSN"
 
 git push && git push --tags
 rebar3 hex publish
@@ -34,3 +34,4 @@ rebar3 hex publish
 github_changelog_generator
 git add CHANGELOG.md
 git commit -m "Update Changelog for version $VSN"
+git push


[31/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Update code climate


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/d18d6aa7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/d18d6aa7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/d18d6aa7

Branch: refs/heads/master
Commit: d18d6aa70825a782a11fbe68b358339bf6eccc45
Parents: c7f6cdd
Author: Adam Lindberg <he...@alind.io>
Authored: Wed Jun 28 11:29:08 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Wed Jun 28 11:29:08 2017 +0200

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/d18d6aa7/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index dca2417..ccce8c8 100644
--- a/README.md
+++ b/README.md
@@ -265,7 +265,7 @@ donations][coinbase] are greatly appreciated!
 [hex]: https://hex.pm/packages/meck
 [hex version badge]: https://img.shields.io/hexpm/v/meck.svg?style=flat-square
 [hex license badge]: https://img.shields.io/hexpm/l/meck.svg?style=flat-square
-[erlang version badge]: https://img.shields.io/badge/erlang-R15B03%20to%2019.2-blue.svg?style=flat-square
+[erlang version badge]: https://img.shields.io/badge/erlang-R15B03%20to%2020.0-blue.svg?style=flat-square
 [build tool]: https://img.shields.io/badge/build%20tool-rebar3-orange.svg?style=flat-square
 
 <!-- Links -->


[42/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Update Changelog for version 0.8.7


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/6554de52
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/6554de52
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/6554de52

Branch: refs/heads/master
Commit: 6554de52bfebe86e50b91c9443e1c71619f74668
Parents: f32efa5
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Jun 29 15:13:13 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Jun 29 15:13:13 2017 +0200

----------------------------------------------------------------------
 CHANGELOG.md | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/6554de52/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 03caeb5..0315cd3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
 # Change Log
 
+## [0.8.7](https://github.com/eproxus/meck/tree/0.8.7) (2017-06-29)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.8.6...0.8.7)
+
+**Closed issues:**
+
+- Remove dialyzer attributes when creating mock \(Erlang 20.0\) [\#178](https://github.com/eproxus/meck/issues/178)
+
 ## [0.8.6](https://github.com/eproxus/meck/tree/0.8.6) (2017-06-28)
 [Full Changelog](https://github.com/eproxus/meck/compare/0.8.5...0.8.6)
 


[32/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Add to changelog


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/85358504
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/85358504
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/85358504

Branch: refs/heads/master
Commit: 8535850411dee13236dca94e9782e5fe408eb6c4
Parents: d18d6aa
Author: Adam Lindberg <he...@alind.io>
Authored: Wed Jun 28 11:30:20 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Wed Jun 28 11:30:20 2017 +0200

----------------------------------------------------------------------
 CHANGELOG | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/85358504/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 8b13789..175eb9e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1 +1 @@
-
+* Compatibility fixes for Erlang 20.0


[13/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Add contribution guidelines


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/f05a82d0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/f05a82d0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/f05a82d0

Branch: refs/heads/master
Commit: f05a82d0ff8e8d82a3c5a7c19bc07950756e8431
Parents: e5bdc72
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Dec 22 11:15:33 2016 +0100
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Dec 22 11:15:33 2016 +0100

----------------------------------------------------------------------
 CONTRIBUTING.md | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/f05a82d0/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..97a62f9
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,93 @@
+# Contributing to Meck
+
+:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
+
+The following is a set of guidelines for contributing to Meck. These are just
+guidelines, not rules, use your best judgment and feel free to propose changes
+to this document in a pull request.
+
+## What should I know before I get started?
+
+### Code of Conduct
+
+This project adheres to the Contributor Covenant
+[code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to
+uphold this code. Please report unacceptable behavior to
+[meck at alind dot io].
+
+## How Can I Contribute?
+
+You can:
+
+* Submit an issue (see [Reporting Bugs](#reporting-bugs))
+* Suggest an enhancement (see [Suggesting Enhancements](#suggesting-enhancements))
+* Submit a pull request (see [Pull Requests](#pull-requests))
+
+### Your First Contribution
+
+If you want to contribute with documentation, wiki pages, examples, code or
+tests and are unsure of how to start, just open an issue to start a discussion.
+It could be a proposal, a question for support or further direction or any
+other feedback you might have.
+
+### Reporting Bugs
+
+Submitting a good bug report will help identifying, debugging and solving an
+issue.
+
+Please check first if any similar issues have already been reported. If so,
+add to the discussion by commenting on one of those instead.
+
+When you're ready to submit a bug report you can use the
+[bug report template](.github/ISSUE_TEMPLATE.md) defined in the project (it's
+automatically used whenever you create a new issue on GitHub). Make sure to
+fill in which versions you are using and instructions of how to reproduce the
+problem.
+
+### Suggesting Enhancements
+
+Suggesting enhancements doesn't have to be as structured as a bug report, but
+should still contain the motivation for the enhancement, an example use case
+and some reasoning why this enhancement should go into Meck itself (reasons it
+should not might include that it works as an external library, that it is more
+test framework related than mocking related etc.)
+
+### Pull Requests
+
+Pull requests really appreciated. To increase the chance of getting your code
+merged, make sure the pull request is small and well structured. You should
+prepare your pull request to try to meet the following guidelines where it
+makes sense:
+
+1. Squash all changes into one commit. If you have many independent changes,
+   submit each in its own pull request.
+2. Document any external API functions changed or added via EDoc.
+3. Run the existing tests to make sure you didn't break anything.
+3. Add working tests that illustrate and cover the changes, or detects an issue
+   to be fixed. A good example is to create a failing test case that exposes the issue you are trying to fix, before fixing it.
+4. Make sure the code and commit follow the [style guides](#styleguides).
+5. (Optional) Add type specifications and run Dialyzer where it makes sense.
+
+## Styleguides
+
+### Commit Messages
+
+Commit messages should be limited to 50 characters without a period on the
+subject line and be written in imperative mood.
+
+Longer explanations should be in the body, two lines below the message, wrapped at 72 characters.
+
+See [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/).
+
+### Code
+
+* Lines should be no longer than 80 characters. This is isn't some arbitrary
+  length based on nostalgia, it's just a choice of fitting limit if you want to have several files open at once next to each other on a modern wide screen
+  monitor.
+* Functions should be exported one by one in their own export statement. This
+  is so that one export can easily be rearranged or removed without messing
+  with commas and Erlang attributes.
+
+If you are unsure, try to find some similar code already in the repository and
+mimic that. Otherwise just submit the pull request to get some stylistic
+feedback if necessary.


[38/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Add Changelog to Hex.pm links


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/5d8ff857
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/5d8ff857
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/5d8ff857

Branch: refs/heads/master
Commit: 5d8ff857bccab905fc0a046a22a035a5e53a3545
Parents: 13f0a6f
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Jun 29 14:58:00 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Jun 29 14:58:00 2017 +0200

----------------------------------------------------------------------
 src/meck.app.src | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/5d8ff857/src/meck.app.src
----------------------------------------------------------------------
diff --git a/src/meck.app.src b/src/meck.app.src
index 5794610..b159f0f 100644
--- a/src/meck.app.src
+++ b/src/meck.app.src
@@ -9,5 +9,8 @@
     % Hex.pm
     {maintainers, ["Adam Lindberg"]},
     {licenses, ["Apache 2.0"]},
-    {links, [{"GitHub", "https://github.com/eproxus/meck"}]}
+    {links, [
+        {"Changelog", "https://github.com/eproxus/meck/blob/master/CHANGELOG.md"},
+        {"GitHub", "https://github.com/eproxus/meck"},
+    ]}
 ]}.


[49/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Update for latest version and Rebar 3

Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/2754b5c9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/2754b5c9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/2754b5c9

Branch: refs/heads/master
Commit: 2754b5c9bca8e7d5803654d675c15852a5b876db
Parents: cb155ca
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Sep 7 10:21:00 2017 +0200
Committer: GitHub <no...@github.com>
Committed: Thu Sep 7 10:21:00 2017 +0200

----------------------------------------------------------------------
 README.md | 44 +++++++++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/2754b5c9/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index ccce8c8..bba133c 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ A mocking library for Erlang.
   * [Features](#features)
   * [Examples](#examples)
   * [Use](#use)
-  * [Build](#build)
+  * [Manual Build](#manual-build)
   * [Caveats](#caveats)
   * [Contribute](#contribute)
 
@@ -147,34 +147,46 @@ ok
 Use
 ---
 
-Meck is best used via [Rebar 3][rebar_3]. Add the following dependency to your
-`rebar.config` in your project root:
+Meck is best used via [Rebar 3][rebar_3]. Add Meck to the test dependencies
+in your `rebar.config` for your project:
 
 ```erlang
-{deps, [
-    {meck, "0.8.4"}
+{profiles, [
+    {test, [
+        {deps, [
+            {meck, "0.8.8"}
+        ]}
+    ]}
 ]}.
 ```
 
-Build
------
+Manual Build
+------------
 
-Meck requires `make` and [Rebar 2][rebar_2] to build (included in the
-repository, to be upgraded to Rebar 3). To build Meck go to the Meck directory
+Meck uses [Rebar 3][rebar_3]. To build Meck go to the Meck directory
 and simply type:
 
 ```sh
-make
+rebar3 compile
 ```
 
 In order to run all tests for Meck type the following command from the same
 directory:
 
 ```sh
-make test
+rebar3 eunit
 ```
 
-Two things might seem alarming when running the tests:
+Documentation can be generated through the use of the following command:
+
+```sh
+rebar3 edoc
+```
+
+### Test Output
+
+Normally the test output is hidden using [Unite][unite]. If EUnit is run
+directly, two things might seem alarming when running the tests:
 
   1. Warnings emitted by cover
   2. An exception printed by SASL
@@ -183,12 +195,6 @@ Both are expected due to the way Erlang currently prints errors. The important
 line you should look for is `All XX tests passed`, if that appears all is
 correct.
 
-Documentation can be generated through the use of the following command:
-
-```sh
-make doc
-```
-
 Caveats
 -------
 
@@ -271,8 +277,8 @@ donations][coinbase] are greatly appreciated!
 <!-- Links -->
 [release_notes_0.8]: https://github.com/eproxus/meck/wiki/0.8-Release-Notes
 [hamcrest]: https://github.com/hyperthunk/hamcrest-erlang
-[rebar_2]: https://github.com/rebar/rebar
 [rebar_3]: https://github.com/erlang/rebar3
+[unite]: https://github.com/eproxus/unite
 [issues]: http://github.com/eproxus/meck/issues
 [commit_messages]: http://chris.beams.io/posts/git-commit/
 [coinbase]: https://www.coinbase.com/alind


[50/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Update README.md

Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/3544aca8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/3544aca8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/3544aca8

Branch: refs/heads/master
Commit: 3544aca8b90344832bfefe65469408c1fd1174fd
Parents: 2754b5c
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Sep 7 10:23:54 2017 +0200
Committer: GitHub <no...@github.com>
Committed: Thu Sep 7 10:23:54 2017 +0200

----------------------------------------------------------------------
 README.md | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/3544aca8/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index bba133c..e7ae91d 100644
--- a/README.md
+++ b/README.md
@@ -185,7 +185,7 @@ rebar3 edoc
 
 ### Test Output
 
-Normally the test output is hidden using [Unite][unite]. If EUnit is run
+Normally the test output is hidden, but if EUnit is run
 directly, two things might seem alarming when running the tests:
 
   1. Warnings emitted by cover
@@ -278,7 +278,6 @@ donations][coinbase] are greatly appreciated!
 [release_notes_0.8]: https://github.com/eproxus/meck/wiki/0.8-Release-Notes
 [hamcrest]: https://github.com/hyperthunk/hamcrest-erlang
 [rebar_3]: https://github.com/erlang/rebar3
-[unite]: https://github.com/eproxus/unite
 [issues]: http://github.com/eproxus/meck/issues
 [commit_messages]: http://chris.beams.io/posts/git-commit/
 [coinbase]: https://www.coinbase.com/alind


[33/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Version 0.8.6


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/36b208e2
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/36b208e2
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/36b208e2

Branch: refs/heads/master
Commit: 36b208e2d4d7d09ef7ef7f7aa7979da79fa97ef3
Parents: 8535850
Author: Adam Lindberg <he...@alind.io>
Authored: Wed Jun 28 11:31:32 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Wed Jun 28 11:31:32 2017 +0200

----------------------------------------------------------------------
 CHANGELOG         | 2 +-
 doc/overview.edoc | 2 +-
 package.exs       | 2 +-
 src/meck.app.src  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/36b208e2/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 175eb9e..8b13789 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1 +1 @@
-* Compatibility fixes for Erlang 20.0
+

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/36b208e2/doc/overview.edoc
----------------------------------------------------------------------
diff --git a/doc/overview.edoc b/doc/overview.edoc
index c39d815..1263571 100644
--- a/doc/overview.edoc
+++ b/doc/overview.edoc
@@ -16,7 +16,7 @@
 
 @author Adam Lindberg <ep...@gmail.com>
 @copyright 2011, Adam Lindberg & Erlang Solutions Ltd
-@version 0.8.5
+@version 0.8.6
 @title meck, a Mocking Library for Erlang
 
 @doc

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/36b208e2/package.exs
----------------------------------------------------------------------
diff --git a/package.exs b/package.exs
index b8d1c7c..83711c3 100644
--- a/package.exs
+++ b/package.exs
@@ -4,7 +4,7 @@ defmodule Meck.Mixfile do
   def project do
     [
       app: :meck,
-      version: "0.8.5",
+      version: "0.8.6",
       description: description,
       package: package,
       deps: [],

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/36b208e2/src/meck.app.src
----------------------------------------------------------------------
diff --git a/src/meck.app.src b/src/meck.app.src
index feb8495..38647c2 100644
--- a/src/meck.app.src
+++ b/src/meck.app.src
@@ -1,7 +1,7 @@
 %% -*- mode: erlang; -*-
 {application, meck,
  [{description, "A mocking framework for Erlang"},
-  {vsn, "0.8.5"},
+  {vsn, "0.8.6"},
   {modules, []},
   {registered, []},
   {applications, [kernel, stdlib, tools]},


[14/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Add 19.2 to versions tested by TravisCI

Erlang 19 is the latest.  Want to make sure this works for the latest OTP release.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/b49cffd8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/b49cffd8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/b49cffd8

Branch: refs/heads/master
Commit: b49cffd85021aa439f71c187a70c151ac1ef3539
Parents: f05a82d
Author: John Madrid <jo...@rackspace.com>
Authored: Fri Jan 20 12:40:21 2017 -0600
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Feb 2 09:32:31 2017 +0100

----------------------------------------------------------------------
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/b49cffd8/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index ff58ec2..ca3cc20 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,6 +3,7 @@ notifications:
   email:
     - hello@alind.io
 otp_release:
+  - 19.2
   - 18.3
   - 17.5
   - R16B03-1


[03/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Fix eunit compile failure on Erlang 17+ (hamcrest)


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/8de54323
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/8de54323
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/8de54323

Branch: refs/heads/master
Commit: 8de5432311ed89e7f7fcdb99c4a577239d225cd9
Parents: 86a099f
Author: Marco Molteni <ma...@laposte.net>
Authored: Sat Apr 30 14:32:35 2016 +0200
Committer: Marco Molteni <ma...@laposte.net>
Committed: Sat Apr 30 14:46:20 2016 +0200

----------------------------------------------------------------------
 rebar.config | 3 ++-
 test.config  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/8de54323/rebar.config
----------------------------------------------------------------------
diff --git a/rebar.config b/rebar.config
index f63df70..694cc01 100644
--- a/rebar.config
+++ b/rebar.config
@@ -1,7 +1,8 @@
 %% Compiler Options ===========================================================
 {erl_opts, [
     %% Erlang releases after 17 don't put R in front of their name, and also require dict() to be written like dict:dict()
-    {platform_define, "^R", non_namespaced_types},
+    {platform_define, "^R", non_namespaced_types},  % used by meck
+    {platform_define, "^[0-9]+", namespaced_types}, % used by hamcrest
     warn_export_all,
     warn_export_vars,
     warn_shadow_vars,

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/8de54323/test.config
----------------------------------------------------------------------
diff --git a/test.config b/test.config
index 69ed470..ade907f 100644
--- a/test.config
+++ b/test.config
@@ -6,7 +6,8 @@
 %% Compiler Options ===========================================================
 {erl_opts, [
     %% Erlang releases after 17 don't put R in front of their name, and also require dict() to be written like dict:dict()
-    {platform_define, "^R", non_namespaced_types},
+    {platform_define, "^R", non_namespaced_types},  % used by meck
+    {platform_define, "^[0-9]+", namespaced_types}, % used by hamcrest
     {platform_define, "^R(?!16B03)", cover_empty_compile_opts},
     warnings_as_errors,
     debug_info


[47/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Update Changelog for version 0.8.8


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/2dbccc14
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/2dbccc14
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/2dbccc14

Branch: refs/heads/master
Commit: 2dbccc142b608e5519b1eb1a6b800b22d9a5ad23
Parents: 1dd41ae
Author: Adam Lindberg <he...@alind.io>
Authored: Tue Aug 29 14:15:01 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Tue Aug 29 14:15:01 2017 +0200

----------------------------------------------------------------------
 CHANGELOG.md | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/2dbccc14/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0315cd3..68959f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,16 @@
 # Change Log
 
+## [0.8.8](https://github.com/eproxus/meck/tree/0.8.8) (2017-08-29)
+[Full Changelog](https://github.com/eproxus/meck/compare/0.8.7...0.8.8)
+
+**Closed issues:**
+
+- `{:error, {:no\_abstract\_code, ...}}` with Elixir 1.5.0-rc.0 and Erlang 20.0 [\#179](https://github.com/eproxus/meck/issues/179)
+
+**Merged pull requests:**
+
+- Always add debug\_info to compile opts for mocks [\#180](https://github.com/eproxus/meck/pull/180) ([antipax](https://github.com/antipax))
+
 ## [0.8.7](https://github.com/eproxus/meck/tree/0.8.7) (2017-06-29)
 [Full Changelog](https://github.com/eproxus/meck/compare/0.8.6...0.8.7)
 


[37/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Update Hex package information for Rebar 3


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/13f0a6fb
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/13f0a6fb
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/13f0a6fb

Branch: refs/heads/master
Commit: 13f0a6fb5d65c6410f1db69fe28d1fe56978a89f
Parents: 28df819
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Jun 29 14:47:18 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Jun 29 14:47:18 2017 +0200

----------------------------------------------------------------------
 package.exs      | 45 ---------------------------------------------
 src/meck.app.src | 21 +++++++++++++--------
 2 files changed, 13 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/13f0a6fb/package.exs
----------------------------------------------------------------------
diff --git a/package.exs b/package.exs
deleted file mode 100644
index 83711c3..0000000
--- a/package.exs
+++ /dev/null
@@ -1,45 +0,0 @@
-defmodule Meck.Mixfile do
-  use Mix.Project
-
-  def project do
-    [
-      app: :meck,
-      version: "0.8.6",
-      description: description,
-      package: package,
-      deps: [],
-    ]
-  end
-
-  defp description do
-    """
-    A mocking framework for Erlang
-    """
-  end
-
-  defp package do
-    [
-      files: [
-        "Makefile",
-        "rebar.config",
-        "test.config",
-        "src",
-        "test/*.erl",
-        "test/cover_test_module.dontcompile",
-        "test/include",
-        "README.md",
-        "LICENSE",
-        "CHANGELOG",
-      ],
-      maintainers: [
-        "Adam Lindberg",
-      ],
-      licenses: [
-        "Apache 2.0",
-      ],
-      links: %{
-        "GitHub" => "https://github.com/eproxus/meck",
-      },
-    ]
-  end
-end

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/13f0a6fb/src/meck.app.src
----------------------------------------------------------------------
diff --git a/src/meck.app.src b/src/meck.app.src
index 38647c2..5794610 100644
--- a/src/meck.app.src
+++ b/src/meck.app.src
@@ -1,8 +1,13 @@
-%% -*- mode: erlang; -*-
-{application, meck,
- [{description, "A mocking framework for Erlang"},
-  {vsn, "0.8.6"},
-  {modules, []},
-  {registered, []},
-  {applications, [kernel, stdlib, tools]},
-  {env, []}]}.
+{application, meck, [
+    {description, "A mocking framework for Erlang"},
+    {vsn, "0.8.6"},
+    {modules, []},
+    {registered, []},
+    {applications, [kernel, stdlib, tools]},
+    {env, []},
+
+    % Hex.pm
+    {maintainers, ["Adam Lindberg"]},
+    {licenses, ["Apache 2.0"]},
+    {links, [{"GitHub", "https://github.com/eproxus/meck"}]}
+]}.


[04/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Merge pull request #161 from marco-m/master

Fix eunit compile failure on Erlang 17+ (hamcrest)

Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/12657009
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/12657009
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/12657009

Branch: refs/heads/master
Commit: 12657009da160ecb3437c214bcc0a1e5eb1d7640
Parents: 86a099f 8de5432
Author: Adam Lindberg <he...@alind.io>
Authored: Sat Apr 30 16:08:06 2016 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Sat Apr 30 16:08:06 2016 +0200

----------------------------------------------------------------------
 rebar.config | 3 ++-
 test.config  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[02/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Clean up performance tests


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/86a099f6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/86a099f6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/86a099f6

Branch: refs/heads/master
Commit: 86a099f6f48382db0891c9ae468013c1a0c7c20d
Parents: ccc817e
Author: Adam Lindberg <he...@alind.io>
Authored: Sat Feb 27 13:25:46 2016 +0100
Committer: Adam Lindberg <he...@alind.io>
Committed: Sat Feb 27 13:25:46 2016 +0100

----------------------------------------------------------------------
 test/meck_performance_test.erl | 71 ++++++++++++++++++++-----------------
 1 file changed, 39 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/86a099f6/test/meck_performance_test.erl
----------------------------------------------------------------------
diff --git a/test/meck_performance_test.erl b/test/meck_performance_test.erl
index f49aac4..41597d7 100644
--- a/test/meck_performance_test.erl
+++ b/test/meck_performance_test.erl
@@ -2,53 +2,60 @@
 -module(meck_performance_test).
 
 %% Interface exports
+-export([run/0]).
 -export([run/1]).
+-export([run/2]).
+-export([new_unload/3]).
 
 %%=============================================================================
 %% Interface exports
 %%=============================================================================
 
-run(N) ->
-    meck:new(test, [non_strict]),
-    io:format("\t\tMin\tMax\tMed\tAvg~n"),
-    io:format("expect/3\t~p\t~p\t~p\t~p~n",
-              test_avg(meck, expect, [test, normal, fun() -> ok end], N)),
-    io:format("expect/3+args\t~p\t~p\t~p\t~p~n",
-              test_avg(meck, expect, [test, normal_args,
-                                      fun(_, _) -> ok end], N)),
-    io:format("expect/4\t~p\t~p\t~p\t~p~n",
-              test_avg(meck, expect, [test, shortcut, 0, ok], N)),
-    io:format("expect/4+args\t~p\t~p\t~p\t~p~n",
-              test_avg(meck, expect, [test, shortcut_args, 2, ok], N)),
+run() -> run(meck, 100).
+run(N) -> run(meck, N).
+run(Mod, N) ->
+    header(Mod),
+    run("new+unload", ?MODULE, new_unload, [Mod, test, [non_strict]], N),
+    Mod:new(test, [non_strict]),
+    run("expect/3", Mod, expect, [test, normal, fun() -> ok end], N),
+    run("expect/3+args", Mod, expect, [test, normal_args,
+      fun(_, _) -> ok end], N),
+    run("expect/4", Mod, expect, [test, shortcut, 0, ok], N),
+    run("expect/4+args", Mod, expect, [test, shortcut_args, 2, ok], N),
 
-    meck:expect(test, shortcut_opaque, 0, self()),
+    header("calls"),
+    Mod:expect(test, shortcut_opaque, 0, self()),
+    run("normal", test, normal, [], N),
+    run("normal_args", test, normal_args, [a, b], N),
+    run("shortcut", test, shortcut, [], N),
+    run("shortcut_args", test, shortcut_args, [a, b], N),
+    run("shortcut_opaque", test, shortcut_opaque, [], N),
+    Mod:unload(test),
 
-    io:format("~n\t\tMin\tMax\tMed\tAvg~n"),
-    io:format("normal\t\t~p\t~p\t~p\t~p~n",
-              test_avg(test, normal, [], N)),
-    io:format("normal_args\t~p\t~p\t~p\t~p~n",
-              test_avg(test, normal_args, [a, b], N)),
-    io:format("shortcut\t~p\t~p\t~p\t~p~n",
-              test_avg(test, shortcut, [], N)),
-    io:format("shortcut_args\t~p\t~p\t~p\t~p~n",
-              test_avg(test, shortcut_args, [a, b], N)),
-    io:format("shortcut_opaque\t~p\t~p\t~p\t~p~n",
-              test_avg(test, shortcut_opaque, [], N)),
-    meck:unload(test),
-
-    meck:new(test, [non_strict]),
-    meck:expect(test, func, 1, ok),
+    header("history"),
+    Mod:new(test, [non_strict]),
+    Mod:expect(test, func, 1, ok),
     [test:func(I) || I <- lists:seq(1, 100)],
-    io:format("~n\t\tMin\tMax\tMed\tAvg~n"),
-    io:format("called\t\t~p\t~p\t~p\t~p~n",
-              test_avg(meck, called, [test, func, 50], N)),
-    meck:unload(test),
+    run("called", Mod, called, [test, func, 50], N),
+    Mod:unload(test),
     ok.
 
+new_unload(Mod, Mock, Opts) ->
+    Mod:new(Mock, Opts),
+    Mod:unload(Mock).
+
 %%=============================================================================
 %% Internal functions
 %%=============================================================================
 
+header(Name) ->
+    io:format("~n~s\t\tMin\tMax\tMed\tAvg~n", [Name]),
+    io:format("------------------------------------------------~n").
+
+run(Name, M, F, A, N) ->
+    io:fwrite("~-16s", [Name]),
+    io:format("~p\t~p\t~p\t~p~n", test_avg(M, F, A, N)).
+
 test_avg(M, F, A, N) when N > 0 ->
     L = test_loop(M, F, A, N, []),
     Length = length(L),


[18/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Add call to stacktrace when missing (fix #167)


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/e182a999
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/e182a999
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/e182a999

Branch: refs/heads/master
Commit: e182a999ad238ae8ac21bfd885e85dc9c82c6976
Parents: 44e4d4a
Author: Adam Lindberg <he...@alind.io>
Authored: Mon Feb 13 13:18:26 2017 +0100
Committer: Adam Lindberg <he...@alind.io>
Committed: Mon Feb 13 13:18:26 2017 +0100

----------------------------------------------------------------------
 src/meck_code_gen.erl | 4 ++--
 test/meck_tests.erl   | 8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/e182a999/src/meck_code_gen.erl
----------------------------------------------------------------------
diff --git a/src/meck_code_gen.erl b/src/meck_code_gen.erl
index e7e6736..918161b 100644
--- a/src/meck_code_gen.erl
+++ b/src/meck_code_gen.erl
@@ -190,8 +190,8 @@ raise(Pid, Mod, Func, Args, Class, Reason) ->
 -spec inject(Mod::atom(), Func::atom(), Args::[any()],
              meck_history:stack_trace()) ->
         NewStackTrace::meck_history:stack_trace().
-inject(_Mod, _Func, _Args, []) ->
-    [];
+inject(Mod, Func, Args, []) ->
+    [{Mod, Func, Args}];
 inject(Mod, Func, Args, [{?MODULE, exec, _AriOrArgs, _Loc}|Stack]) ->
     [{Mod, Func, Args} | Stack];
 inject(Mod, Func, Args, [{?MODULE, exec, _AriOrArgs}|Stack]) ->

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/e182a999/test/meck_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_tests.erl b/test/meck_tests.erl
index 3ea4de2..5e8dda4 100644
--- a/test/meck_tests.erl
+++ b/test/meck_tests.erl
@@ -75,6 +75,7 @@ meck_test_() ->
                            fun ?MODULE:shortcut_call_argument_/1,
                            fun ?MODULE:shortcut_re_add_/1,
                            fun ?MODULE:shortcut_opaque_/1,
+                           fun ?MODULE:shortcut_stacktrace_/1,
                            fun ?MODULE:delete_/1,
                            fun ?MODULE:called_false_no_args_/1,
                            fun ?MODULE:called_true_no_args_/1,
@@ -396,6 +397,13 @@ shortcut_opaque_(Mod) ->
     ok = meck:expect(Mod, test, 0, {test, [a, self()], Ref}),
     ?assertMatch({test, [a, P], Ref} when P == self(), Mod:test()).
 
+shortcut_stacktrace_(Mod) ->
+    ok = meck:expect(Mod, test, [true], ok),
+    ?assertEqual(
+        {'EXIT', {function_clause, [{mymod, test, [false], []}]}},
+        catch(Mod:test(false))
+    ).
+
 delete_(Mod) ->
     ok = meck:expect(Mod, test, 2, ok),
     ?assertEqual(ok, meck:delete(Mod, test, 2)),


[25/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
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.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/7c5548e1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/7c5548e1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/7c5548e1

Branch: refs/heads/master
Commit: 7c5548e1a971790f9c8990cc4767df0619b7587b
Parents: ad8374c
Author: Andreas Schultz <as...@tpip.net>
Authored: Thu Jun 22 17:37:49 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Jun 22 18:07:58 2017 +0200

----------------------------------------------------------------------
 src/meck_code_gen.erl | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/7c5548e1/src/meck_code_gen.erl
----------------------------------------------------------------------
diff --git a/src/meck_code_gen.erl b/src/meck_code_gen.erl
index 918161b..e6bb9f3 100644
--- a/src/meck_code_gen.erl
+++ b/src/meck_code_gen.erl
@@ -59,11 +59,23 @@ get_current_call() ->
 %%% Internal functions
 %%%============================================================================
 
+attribute({Key, _Value}, Attrs)
+    when Key =:= vsn;
+	 Key =:= deprecated;
+	 Key =:= optional_callbacks ->
+    Attrs;
+attribute({Key, Value}, Attrs)
+  when (Key =:= behaviour orelse Key =:= behavior)
+       andalso is_list(Value) ->
+    lists:foldl(fun(Behavior, Acc) -> [?attribute(Key, Behavior) | Acc] end,
+		Attrs, Value);
+attribute({Key, Value}, Attrs) ->
+    [?attribute(Key, Value) | Attrs].
+
 attributes(Mod) ->
     try
-        [?attribute(Key, Val) || {Key, Val} <-
-            proplists:get_value(attributes, Mod:module_info(), []),
-            Key =/= vsn, Key =/= deprecated, Key =/= optional_callbacks]
+	lists:foldl(fun attribute/2, [],
+		    proplists:get_value(attributes, Mod:module_info(), []))
     catch
         error:undef -> []
     end.


[41/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Fix syntax error in .app.src


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/f32efa5d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/f32efa5d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/f32efa5d

Branch: refs/heads/master
Commit: f32efa5d12d602215729f4961ad1dadb6ebadcca
Parents: 5ea90ad
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Jun 29 15:10:43 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Jun 29 15:10:43 2017 +0200

----------------------------------------------------------------------
 src/meck.app.src | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/f32efa5d/src/meck.app.src
----------------------------------------------------------------------
diff --git a/src/meck.app.src b/src/meck.app.src
index 2a4db46..c0b729c 100644
--- a/src/meck.app.src
+++ b/src/meck.app.src
@@ -11,6 +11,6 @@
     {licenses, ["Apache 2.0"]},
     {links, [
         {"Changelog", "https://github.com/eproxus/meck/blob/master/CHANGELOG.md"},
-        {"GitHub", "https://github.com/eproxus/meck"},
+        {"GitHub", "https://github.com/eproxus/meck"}
     ]}
 ]}.


[24/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Clarify additional information

Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/ad8374ce
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/ad8374ce
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/ad8374ce

Branch: refs/heads/master
Commit: ad8374ce5bdb0bb05d9f5a75d989157361902c3c
Parents: f52fd7b
Author: Adam Lindberg <he...@alind.io>
Authored: Thu May 4 09:22:45 2017 +0200
Committer: GitHub <no...@github.com>
Committed: Thu May 4 09:22:45 2017 +0200

----------------------------------------------------------------------
 .github/ISSUE_TEMPLATE.md | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/ad8374ce/.github/ISSUE_TEMPLATE.md
----------------------------------------------------------------------
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 84442ee..feb60df 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -16,7 +16,8 @@
 
 ## Versions
 
-**Meck version:** [Enter Meck version here]
-**Erlang version:** [Enter Erlang version here]
+* **Meck version:** [Enter Meck version here]
+* **Erlang version:** [Enter Erlang version here]
 
-[Add any other environment or test framework related information here]
+[Add any other environment or test framework related information here, such as
+what OS you are using and how Erlang is installed]


[39/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Update publish script


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/acd90c25
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/acd90c25
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/acd90c25

Branch: refs/heads/master
Commit: acd90c258ab0a0962f54a62c5ef25c7fa8143957
Parents: 5d8ff85
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Jun 29 15:06:15 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Thu Jun 29 15:08:42 2017 +0200

----------------------------------------------------------------------
 .scripts/meck-publish.sh       | 36 +++++++++++++++++++++++++++++
 .scripts/tag_with_changelog.sh | 45 -------------------------------------
 2 files changed, 36 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/acd90c25/.scripts/meck-publish.sh
----------------------------------------------------------------------
diff --git a/.scripts/meck-publish.sh b/.scripts/meck-publish.sh
new file mode 100755
index 0000000..4e9d972
--- /dev/null
+++ b/.scripts/meck-publish.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# Install for Git with alias 'meck-publish':
+#   git config alias.meck-publish '!.scripts/meck-publish.sh'
+
+set -e # Abort on first failure, so we don't mess something up
+
+if [ -z "$1" ]; then
+    # Missing tag name
+    echo "usage: meck-publish <version>" >&2
+    exit 129
+fi
+if [ ! -z "$(git status --short)" ]; then
+    # Sanity check
+    echo "fatal: dirty repository" >&2
+    exit 128
+fi
+
+VSN="$1"
+
+# Update version in .app file
+sed -i "" -e "s/{vsn, .*}/{vsn, \"$VSN\"}/g" src/meck.app.src
+sed -i "" -e "s/@version .*/@version $VSN/g" doc/overview.edoc
+git add src/meck.app.src
+git add doc/overview.edoc
+
+# Commit, tag and push
+git commit -m "Version $VSN"
+git tag -s $1 -m "Version $VSN"
+
+git push && git push --tags
+rebar3 hex publish
+
+github_changelog_generator
+git add CHANGELOG.md
+git commit -m "Update Changelog for version $VSN"

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/acd90c25/.scripts/tag_with_changelog.sh
----------------------------------------------------------------------
diff --git a/.scripts/tag_with_changelog.sh b/.scripts/tag_with_changelog.sh
deleted file mode 100755
index 6c53908..0000000
--- a/.scripts/tag_with_changelog.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-# Install for alias 'tag-cl' with:
-#   git config alias.tag-cl '!.scripts/tag_with_changelog.sh'
-
-set -e # Abort on first failure, so we don't mess something up
-
-if [ -z "$1" ]; then
-    # Missing tag name
-    echo "usage: git tag-cl <tag>" >&2
-    exit 129
-fi
-if [ ! -f CHANGELOG ]; then
-    # No changelog to be used
-    echo "fatal: CHANGELOG missing" >&2
-    exit 128
-fi
-if [ ! -z "$(git status --short)" ]; then
-    # Sanity check
-    echo "fatal: dirty repository" >&2
-    exit 128
-fi
-
-CHANGELOG=$(cat CHANGELOG)
-
-# Clean up changelog
-echo "" > CHANGELOG
-git add CHANGELOG
-
-# Update version in .app file
-sed -i "" -e "s/{vsn, .*}/{vsn, \"$1\"}/g" src/meck.app.src
-sed -i "" -e "s/@version .*/@version $1/g" doc/overview.edoc
-sed -i "" -e "s/version: \".*\"/version: \"$1\"/g" package.exs
-git add src/meck.app.src
-git add doc/overview.edoc
-git add package.exs
-
-# Commit, tag and push
-git commit -m "Version $1"
-git tag -s $1 -m "Version $1
-
-$CHANGELOG"
-git push && git push --tags
-MIX_EXS=package.exs mix hex.publish
-


[19/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Update Travis badge to user master branch

Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/20e6cd53
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/20e6cd53
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/20e6cd53

Branch: refs/heads/master
Commit: 20e6cd538ab12b2f3560f7d01f2757bbd1ec18af
Parents: e182a99
Author: Adam Lindberg <he...@alind.io>
Authored: Mon Feb 13 15:10:11 2017 +0100
Committer: GitHub <no...@github.com>
Committed: Mon Feb 13 15:10:11 2017 +0100

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/20e6cd53/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 884ae18..af01346 100644
--- a/README.md
+++ b/README.md
@@ -261,7 +261,7 @@ donations][coinbase] are greatly appreciated!
 
 <!-- Badges -->
 [travis]: https://travis-ci.org/eproxus/meck
-[travis badge]: https://img.shields.io/travis/eproxus/meck.svg?style=flat-square
+[travis badge]: https://img.shields.io/travis/eproxus/meck/master.svg?style=flat-square
 [hex]: https://hex.pm/packages/meck
 [hex version badge]: https://img.shields.io/hexpm/v/meck.svg?style=flat-square
 [hex license badge]: https://img.shields.io/hexpm/l/meck.svg?style=flat-square


[12/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Add `meck_history:result/5'

`meck_history:result/5' returns the result value of a particular function


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/e5bdc727
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/e5bdc727
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/e5bdc727

Branch: refs/heads/master
Commit: e5bdc72728ffc7101e725ebf777c1c72d3ebec76
Parents: c772db1
Author: amutake <am...@gmail.com>
Authored: Wed Jun 29 18:13:57 2016 +0900
Committer: Adam Lindberg <he...@alind.io>
Committed: Mon Dec 19 11:31:41 2016 +0100

----------------------------------------------------------------------
 src/meck_history.erl        | 16 ++++++++
 test/meck_history_tests.erl | 86 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 102 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/e5bdc727/src/meck_history.erl
----------------------------------------------------------------------
diff --git a/src/meck_history.erl b/src/meck_history.erl
index e8c22d2..c73db00 100644
--- a/src/meck_history.erl
+++ b/src/meck_history.erl
@@ -30,6 +30,7 @@
 -export([get_history/2]).
 -export([num_calls/4]).
 -export([capture/6]).
+-export([result/5]).
 -export([new_filter/3]).
 
 %%%============================================================================
@@ -95,6 +96,21 @@ capture(Occur, OptCallerPid, Mod, Func, OptArgsSpec, ArgNum) ->
             lists:nth(ArgNum, Args)
     end.
 
+-spec result(Occur::pos_integer(), opt_pid(), Mod::atom(), Func::atom(),
+             meck_args_matcher:opt_args_spec()) -> ResultValue::any().
+result(Occur, OptCallerPid, Mod, Func, OptArgsSpec) ->
+    ArgsMatcher = meck_args_matcher:new(OptArgsSpec),
+    Filter = new_filter(OptCallerPid, Func, ArgsMatcher),
+    Filtered = lists:filter(Filter, meck_proc:get_history(Mod)),
+    case nth_record(Occur, Filtered) of
+        not_found ->
+            erlang:error(not_found);
+        {_CallerPid, _MFA, Result} ->
+            Result;
+        {_CallerPid, _MFA, Class, Reason, Trace} ->
+            erlang:raise(Class, Reason, Trace)
+    end.
+
 -spec new_filter(opt_pid(), opt_func(), meck_args_matcher:args_matcher()) ->
         fun((history_record()) -> boolean()).
 new_filter(TheCallerPid, TheFunc, ArgsMatcher) ->

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/e5bdc727/test/meck_history_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_history_tests.erl b/test/meck_history_tests.erl
index 104a642..7da0419 100644
--- a/test/meck_history_tests.erl
+++ b/test/meck_history_tests.erl
@@ -81,3 +81,89 @@ capture_different_args_specs_test() ->
     ?assertMatch(2008, meck:capture(first, test, foo, ['_', '_', meck:is(hamcrest_matchers:greater_than(3006))], 2)),
     %% Clean
     meck:unload().
+
+result_different_positions_test() ->
+    %% Given
+    meck:new(test, [non_strict]),
+    meck:expect(test, foo, fun(_, A, _) -> A end),
+    meck:expect(test, foo, 4, ok),
+    meck:expect(test, bar, 3, ok),
+    %% When
+    test:foo(1001, 2001, 3001, 4001),
+    test:bar(1002, 2002, 3002),
+    test:foo(1003, 2003, 3003),
+    test:bar(1004, 2004, 3004),
+    test:foo(1005, 2005, 3005),
+    test:foo(1006, 2006, 3006),
+    test:bar(1007, 2007, 3007),
+    test:foo(1008, 2008, 3008),
+    %% Then
+    ?assertMatch(2003, meck_history:result(first, '_', test, foo, ['_', '_', '_'])),
+    ?assertMatch(2008, meck_history:result(last, '_', test, foo, ['_', '_', '_'])),
+    ?assertMatch(2006, meck_history:result(3, '_', test, foo, ['_', '_', '_'])),
+    ?assertError(not_found, meck_history:result(5, '_', test, foo, ['_', '_', '_'])),
+    %% Clean
+    meck:unload().
+
+result_different_args_specs_test() ->
+    %% Given
+    meck:new(test, [non_strict]),
+    meck:expect(test, foo, fun(_, A) -> A end),
+    meck:expect(test, foo, fun(_, A, _) -> A end),
+    meck:expect(test, foo, fun(_, A, _, _) -> A end),
+    meck:expect(test, bar, 3, ok),
+    %% When
+    test:foo(1001, 2001, 3001, 4001),
+    test:bar(1002, 2002, 3002),
+    test:foo(1003, 2003, 3003),
+    test:bar(1004, 2004, 3004),
+    test:foo(1005, 2005),
+    test:foo(1006, 2006, 3006),
+    test:bar(1007, 2007, 3007),
+    test:foo(1008, 2008, 3008),
+    %% Then
+    ?assertMatch(2001, meck_history:result(first, '_', test, foo, '_')),
+    ?assertMatch(2003, meck_history:result(first, '_', test, foo, 3)),
+    ?assertMatch(2005, meck_history:result(first, '_', test, foo, ['_', '_'])),
+    ?assertMatch(2006, meck_history:result(first, '_', test, foo, [1006, '_', '_'])),
+    Matcher = meck:is(hamcrest_matchers:greater_than(3006)),
+    ?assertMatch(2008, meck_history:result(first, '_', test, foo, ['_', '_', Matcher])),
+    %% Clean
+    meck:unload().
+
+result_exception_test() ->
+    %% Given
+    meck:new(test, [non_strict]),
+    meck:expect(test, error, fun(R) -> erlang:error(R) end),
+    meck:expect(test, throw, fun(R) -> throw(R) end),
+    meck:expect(test, exit, fun(R) -> exit(R) end),
+    %% When
+    catch test:error(foo),
+    catch test:throw(bar),
+    catch test:exit(baz),
+    %% Then
+    ?assertException(error, foo, meck_history:result(first, '_', test, error, 1)),
+    ?assertException(throw, bar, meck_history:result(first, '_', test, throw, 1)),
+    ?assertException(exit, baz, meck_history:result(first, '_', test, exit, 1)),
+    ?assertError(not_found, meck_history:result(first, '_', test, foo, 0)),
+    %% Clean
+    meck:unload().
+
+result_different_caller_test() ->
+    %% Given
+    meck:new(test, [non_strict]),
+    meck:expect(test, foo, fun(_, A, _) -> A end),
+    %% When
+    test:foo(1001, 2001, 3001),
+    Self = self(),
+    Pid = spawn(fun() ->
+                        test:foo(1002, 2002, 3002),
+                        Self ! {self(), done}
+                end),
+    test:foo(1003, 2003, 3003),
+    receive {Pid, done} -> ok end,
+    %% Then
+    ?assertMatch(2003, meck_history:result(2, self(), test, foo, 3)),
+    ?assertMatch(2002, meck_history:result(last, Pid, test, foo, 3)),
+    %% Clean
+    meck:unload().


[46/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Version 0.8.8


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/1dd41ae9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/1dd41ae9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/1dd41ae9

Branch: refs/heads/master
Commit: 1dd41ae9e6364c802cbc0b7fd75f27492ae76d80
Parents: fcc551e
Author: Adam Lindberg <he...@alind.io>
Authored: Tue Aug 29 14:10:10 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Tue Aug 29 14:10:10 2017 +0200

----------------------------------------------------------------------
 doc/overview.edoc | 2 +-
 src/meck.app.src  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/1dd41ae9/doc/overview.edoc
----------------------------------------------------------------------
diff --git a/doc/overview.edoc b/doc/overview.edoc
index 0c4a5d9..a924652 100644
--- a/doc/overview.edoc
+++ b/doc/overview.edoc
@@ -16,7 +16,7 @@
 
 @author Adam Lindberg <ep...@gmail.com>
 @copyright 2011, Adam Lindberg & Erlang Solutions Ltd
-@version 0.8.7
+@version 0.8.8
 @title meck, a Mocking Library for Erlang
 
 @doc

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/1dd41ae9/src/meck.app.src
----------------------------------------------------------------------
diff --git a/src/meck.app.src b/src/meck.app.src
index c0b729c..f52acb6 100644
--- a/src/meck.app.src
+++ b/src/meck.app.src
@@ -1,6 +1,6 @@
 {application, meck, [
     {description, "A mocking framework for Erlang"},
-    {vsn, "0.8.7"},
+    {vsn, "0.8.8"},
     {modules, []},
     {registered, []},
     {applications, [kernel, stdlib, tools]},


[30/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Use latest Erlang versions on Travis


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/c7f6cddf
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/c7f6cddf
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/c7f6cddf

Branch: refs/heads/master
Commit: c7f6cddf53c12a9cad7068b6cb586e920a21ac42
Parents: 3b772d0
Author: Adam Lindberg <he...@alind.io>
Authored: Wed Jun 28 11:23:01 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Wed Jun 28 11:23:01 2017 +0200

----------------------------------------------------------------------
 .travis.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/c7f6cddf/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index ca3cc20..bad449c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,8 @@ notifications:
   email:
     - hello@alind.io
 otp_release:
-  - 19.2
+  - 20.0
+  - 19.3
   - 18.3
   - 17.5
   - R16B03-1


[11/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Add GitHub issue template


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/c772db17
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/c772db17
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/c772db17

Branch: refs/heads/master
Commit: c772db17a7c94e75d20688197f61538d63fe2ae9
Parents: 3cf10b5
Author: Adam Lindberg <he...@alind.io>
Authored: Mon Jun 27 13:23:14 2016 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Wed Jul 6 19:14:22 2016 +0200

----------------------------------------------------------------------
 .github/ISSUE_TEMPLATE.md | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/c772db17/.github/ISSUE_TEMPLATE.md
----------------------------------------------------------------------
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..84442ee
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,22 @@
+[Short description of problem here]
+
+## Reproduction Steps
+
+1. [First Step]
+2. [Second Step]
+3. [Other Steps...]
+
+## Expected behavior
+
+[Describe expected behavior here]
+
+## Observed behavior
+
+[Describe observed behavior here]
+
+## Versions
+
+**Meck version:** [Enter Meck version here]
+**Erlang version:** [Enter Erlang version here]
+
+[Add any other environment or test framework related information here]


[07/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Link to Travis branches overview


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/f6f885c4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/f6f885c4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/f6f885c4

Branch: refs/heads/master
Commit: f6f885c484702b0c43ef13adbb9067106a5b39ff
Parents: 158b26d
Author: Adam Lindberg <he...@alind.io>
Authored: Sun May 1 19:19:37 2016 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Sun May 1 19:19:37 2016 +0200

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/f6f885c4/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index c4122fd..96995fe 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 [![Release](http://img.shields.io/github/release/eproxus/meck.svg?style=flat-square)](https://github.com/eproxus/meck/releases/latest)
 [![Build Status](https://img.shields.io/travis/eproxus/meck/master.svg?style=flat-square)](http://travis-ci.org/eproxus/meck)
-[![Code Climate](http://img.shields.io/badge/code_climate-Erlang_18.3-brightgreen.svg?style=flat-square)](https://travis-ci.org/eproxus/meck)
+[![Code Climate](http://img.shields.io/badge/code_climate-Erlang_18.3-brightgreen.svg?style=flat-square)](https://travis-ci.org/eproxus/meck/branches)
 
 Meck
 ====


[26/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Add #176 to CHANGELOG


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/12bb75d4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/12bb75d4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/12bb75d4

Branch: refs/heads/master
Commit: 12bb75d4d818f575c246d6916e1d0018893914fa
Parents: 7c5548e
Author: Adam Lindberg <he...@alind.io>
Authored: Wed Jun 28 09:56:06 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Wed Jun 28 09:56:06 2017 +0200

----------------------------------------------------------------------
 CHANGELOG | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/12bb75d4/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 8b13789..731c110 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1 +1 @@
-
+* Compatibility with Erlang 20.0


[17/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Add TOC to README

Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/44e4d4aa
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/44e4d4aa
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/44e4d4aa

Branch: refs/heads/master
Commit: 44e4d4aa05d5796c9f6bd635ad1ad3cf63bd741b
Parents: 2fcbfb1
Author: Adam Lindberg <he...@alind.io>
Authored: Thu Feb 2 10:38:04 2017 +0100
Committer: GitHub <no...@github.com>
Committed: Thu Feb 2 10:38:04 2017 +0100

----------------------------------------------------------------------
 README.md | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/44e4d4aa/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 528bd63..884ae18 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,13 @@ Meck
 
 A mocking library for Erlang.
 
+  * [Features](#features)
+  * [Examples](#examples)
+  * [Use](#use)
+  * [Build](#build)
+  * [Caveats](#caveats)
+  * [Contribute](#contribute)
+
 Features
 --------
 


[09/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Fix #88


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/77f63dac
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/77f63dac
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/77f63dac

Branch: refs/heads/master
Commit: 77f63dac7b8de1de995beff1cb6605935312e5f5
Parents: f6f885c
Author: yutopp <yu...@gmail.com>
Authored: Mon Jun 27 18:03:14 2016 +0900
Committer: yutopp <yu...@gmail.com>
Committed: Mon Jun 27 20:49:54 2016 +0900

----------------------------------------------------------------------
 src/meck.erl        | 29 +++++++++++++++++++++++------
 src/meck_proc.erl   | 34 ++++++++++++++++++++++++----------
 test/meck_tests.erl | 29 +++++++++++++++++++++++++++++
 3 files changed, 76 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/77f63dac/src/meck.erl
----------------------------------------------------------------------
diff --git a/src/meck.erl b/src/meck.erl
index 2d70315..0ed87ec 100644
--- a/src/meck.erl
+++ b/src/meck.erl
@@ -34,6 +34,7 @@
 -export([sequence/4]).
 -export([loop/4]).
 -export([delete/3]).
+-export([delete/4]).
 -export([exception/2]).
 -export([passthrough/1]).
 -export([history/1]).
@@ -289,18 +290,34 @@ loop(Mod, Func, Ari, Loop) when is_list(Mod) ->
 %%
 %% Deletes the expectation for the function `Func' with the matching
 %% arity `Arity'.
--spec delete(Mods, Func, Ari) -> ok when
+%% `Force' is a flag to delete the function even if it is passthrough.
+-spec delete(Mods, Func, Ari, Force) -> ok when
       Mods :: Mod | [Mod],
       Mod :: atom(),
       Func :: atom(),
-      Ari :: byte().
-delete(Mod, Func, Ari)
+      Ari :: byte(),
+      Force :: boolean().
+delete(Mod, Func, Ari, Force)
   when is_atom(Mod), is_atom(Func), Ari >= 0 ->
-    meck_proc:delete_expect(Mod, Func, Ari);
-delete(Mod, Func, Ari) when is_list(Mod) ->
-    lists:foreach(fun(M) -> delete(M, Func, Ari) end, Mod),
+    meck_proc:delete_expect(Mod, Func, Ari, Force);
+delete(Mod, Func, Ari, Force) when is_list(Mod) ->
+    lists:foreach(fun(M) -> delete(M, Func, Ari, Force) end, Mod),
     ok.
 
+%% @doc Deletes an expectation.
+%%
+%% Deletes the expectation for the function `Func' with the matching
+%% arity `Arity'.
+%% If the mock has passthrough enabled, this function restores the
+%% expectation to the original function. See {@link delete/4}.
+-spec delete(Mods, Func, Ari) -> ok when
+      Mods :: Mod | [Mod],
+      Mod :: atom(),
+      Func :: atom(),
+      Ari :: byte().
+delete(Mod, Func, Ari) ->
+    delete(Mod, Func, Ari, false).
+
 %% @doc Throws an expected exception inside an expect fun.
 %%
 %% This exception will get thrown without invalidating the mocked

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/77f63dac/src/meck_proc.erl
----------------------------------------------------------------------
diff --git a/src/meck_proc.erl b/src/meck_proc.erl
index cfb3050..2bd8169 100644
--- a/src/meck_proc.erl
+++ b/src/meck_proc.erl
@@ -22,7 +22,7 @@
 %% API
 -export([start/2]).
 -export([set_expect/2]).
--export([delete_expect/3]).
+-export([delete_expect/4]).
 -export([get_history/1]).
 -export([wait/6]).
 -export([reset/1]).
@@ -61,6 +61,7 @@
                 original :: term(),
                 was_sticky = false :: boolean(),
                 merge_expects = false :: boolean(),
+                passthrough = false :: boolean(),
                 reload :: {Compiler::pid(), {From::pid(), Tag::any()}} |
                           undefined,
                 trackers = [] :: [tracker()]}).
@@ -119,9 +120,9 @@ set_expect(Mod, Expect) ->
             end
     end.
 
--spec delete_expect(Mod::atom(), Func::atom(), Ari::byte()) -> ok.
-delete_expect(Mod, Func, Ari) ->
-    gen_server(call, Mod, {delete_expect, Func, Ari}).
+-spec delete_expect(Mod::atom(), Func::atom(), Ari::byte(), Force::boolean()) -> ok.
+delete_expect(Mod, Func, Ari, Force) ->
+    gen_server(call, Mod, {delete_expect, Func, Ari, Force}).
 
 -spec add_history_exception(
         Mod::atom(), CallerPid::pid(), Func::atom(), Args::[any()],
@@ -201,6 +202,7 @@ init([Mod, Options]) ->
     NoPassCover = proplists:get_bool(no_passthrough_cover, Options),
     MergeExpects = proplists:get_bool(merge_expects, Options),
     EnableOnLoad = proplists:get_bool(enable_on_load, Options),
+    Passthrough = proplists:get_bool(passthrough, Options),
     Original = backup_original(Mod, NoPassCover, EnableOnLoad),
     NoHistory = proplists:get_bool(no_history, Options),
     History = if NoHistory -> undefined; true -> [] end,
@@ -216,6 +218,7 @@ init([Mod, Options]) ->
                     original = Original,
                     was_sticky = WasSticky,
                     merge_expects = MergeExpects,
+                    passthrough = Passthrough,
                     history = History}}
     catch
         exit:{error_loading_module, Mod, sticky_directory} ->
@@ -239,10 +242,13 @@ handle_call({set_expect, Expect}, From,
         {error, Reason} ->
             {reply, {error, Reason}, S}
     end;
-handle_call({delete_expect, Func, Ari}, From,
-            S = #state{mod = Mod, expects = Expects}) ->
+handle_call({delete_expect, Func, Ari, Force}, From,
+            S = #state{mod = Mod, expects = Expects,
+                       passthrough = PassThrough}) ->
     check_if_being_reloaded(S),
-    {NewExpects, CompilerPid} = do_delete_expect(Mod, {Func, Ari}, Expects),
+    ErasePassThrough = Force orelse (not PassThrough),
+    {NewExpects, CompilerPid} =
+        do_delete_expect(Mod, {Func, Ari}, Expects, ErasePassThrough),
     {noreply, S#state{expects = NewExpects,
                       reload = {CompilerPid, From}}};
 handle_call(get_history, _From, S = #state{history = undefined}) ->
@@ -503,10 +509,18 @@ store_expect(Mod, FuncAri, Expect, Expects, false) ->
     NewExpects =  dict:store(FuncAri, Expect, Expects),
     compile_expects(Mod, NewExpects).
 
--spec do_delete_expect(Mod::atom(), meck_expect:func_ari(), Expects::meck_dict()) ->
+-spec do_delete_expect(Mod::atom(), meck_expect:func_ari(),
+                       Expects::meck_dict(), ErasePassThrough::boolean()) ->
         {NewExpects::meck_dict(), CompilerPid::pid()}.
-do_delete_expect(Mod, FuncAri, Expects) ->
-    NewExpects = dict:erase(FuncAri, Expects),
+do_delete_expect(Mod, FuncAri, Expects, ErasePassThrough) ->
+    NewExpects = case ErasePassThrough of
+                     true  ->
+                         dict:erase(FuncAri, Expects);
+                     false ->
+                         dict:store(FuncAri,
+                                    meck_expect:new_passthrough(FuncAri),
+                                    Expects)
+                 end,
     compile_expects(Mod, NewExpects).
 
 -spec compile_expects(Mod::atom(), Expects::meck_dict()) ->

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/77f63dac/test/meck_tests.erl
----------------------------------------------------------------------
diff --git a/test/meck_tests.erl b/test/meck_tests.erl
index bbf2d75..3ea4de2 100644
--- a/test/meck_tests.erl
+++ b/test/meck_tests.erl
@@ -1488,6 +1488,35 @@ wait_purge_expired_tracker_test() ->
     %% Clean
     meck:unload().
 
+
+meck_passthrough_test_() ->
+    {foreach, fun setup_passthrough/0, fun teardown/1,
+     [{with, [T]} || T <- [
+                           fun ?MODULE:delete_passthrough_/1,
+                           fun ?MODULE:delete_passthrough_force_/1
+                          ]]}.
+
+setup_passthrough() ->
+    % Uncomment to run tests with dbg:
+    % dbg:tracer(),
+    % dbg:p(all, call),
+    % dbg:tpl(meck, []),
+    ok = meck:new(meck_test_module, [passthrough, non_strict]),
+    meck_test_module.
+
+delete_passthrough_(Mod) ->
+    ok = meck:expect(Mod, c, 2, {c, d}),
+    ?assertMatch({c, d}, Mod:c(a, b)),
+    ?assertEqual(ok, meck:delete(Mod, c, 2)),
+    ?assertMatch({a, b}, Mod:c(a, b)),
+    ?assert(meck:validate(Mod)).
+
+delete_passthrough_force_(Mod) ->
+    ok = meck:expect(Mod, c, 2, ok),
+    ?assertEqual(ok, meck:delete(Mod, c, 2, true)),
+    ?assertError(undef, Mod:test(a, b)),
+    ?assert(meck:validate(Mod)).
+
 %%=============================================================================
 %% Internal Functions
 %%=============================================================================


[27/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Version 0.8.5


Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/ada6b4ec
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/ada6b4ec
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/ada6b4ec

Branch: refs/heads/master
Commit: ada6b4ec31153a936f639cf152e8f9b4070b7b9d
Parents: 12bb75d
Author: Adam Lindberg <he...@alind.io>
Authored: Wed Jun 28 09:56:56 2017 +0200
Committer: Adam Lindberg <he...@alind.io>
Committed: Wed Jun 28 09:56:56 2017 +0200

----------------------------------------------------------------------
 CHANGELOG         | 2 +-
 doc/overview.edoc | 2 +-
 package.exs       | 2 +-
 src/meck.app.src  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/ada6b4ec/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 731c110..8b13789 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1 +1 @@
-* Compatibility with Erlang 20.0
+

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/ada6b4ec/doc/overview.edoc
----------------------------------------------------------------------
diff --git a/doc/overview.edoc b/doc/overview.edoc
index 40fccdd..c39d815 100644
--- a/doc/overview.edoc
+++ b/doc/overview.edoc
@@ -16,7 +16,7 @@
 
 @author Adam Lindberg <ep...@gmail.com>
 @copyright 2011, Adam Lindberg & Erlang Solutions Ltd
-@version 0.8.4
+@version 0.8.5
 @title meck, a Mocking Library for Erlang
 
 @doc

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/ada6b4ec/package.exs
----------------------------------------------------------------------
diff --git a/package.exs b/package.exs
index 416de4a..b8d1c7c 100644
--- a/package.exs
+++ b/package.exs
@@ -4,7 +4,7 @@ defmodule Meck.Mixfile do
   def project do
     [
       app: :meck,
-      version: "0.8.4",
+      version: "0.8.5",
       description: description,
       package: package,
       deps: [],

http://git-wip-us.apache.org/repos/asf/couchdb-meck/blob/ada6b4ec/src/meck.app.src
----------------------------------------------------------------------
diff --git a/src/meck.app.src b/src/meck.app.src
index cd74948..feb8495 100644
--- a/src/meck.app.src
+++ b/src/meck.app.src
@@ -1,7 +1,7 @@
 %% -*- mode: erlang; -*-
 {application, meck,
  [{description, "A mocking framework for Erlang"},
-  {vsn, "0.8.4"},
+  {vsn, "0.8.5"},
   {modules, []},
   {registered, []},
   {applications, [kernel, stdlib, tools]},


[10/50] meck commit: updated refs/heads/master to 3544aca

Posted by va...@apache.org.
Merge pull request #162 from yutopp/support_passthrough_when_deleting

Fix #88

Project: http://git-wip-us.apache.org/repos/asf/couchdb-meck/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-meck/commit/3cf10b5c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-meck/tree/3cf10b5c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-meck/diff/3cf10b5c

Branch: refs/heads/master
Commit: 3cf10b5c9fad6f1791b2ae512161878e77053201
Parents: 70ef5a4 77f63da
Author: Adam Lindberg <he...@alind.io>
Authored: Tue Jun 28 13:39:31 2016 +0200
Committer: GitHub <no...@github.com>
Committed: Tue Jun 28 13:39:31 2016 +0200

----------------------------------------------------------------------
 src/meck.erl        | 29 +++++++++++++++++++++++------
 src/meck_proc.erl   | 34 ++++++++++++++++++++++++----------
 test/meck_tests.erl | 29 +++++++++++++++++++++++++++++
 3 files changed, 76 insertions(+), 16 deletions(-)
----------------------------------------------------------------------