You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by iilyak <gi...@git.apache.org> on 2015/02/24 22:17:33 UTC

[GitHub] couchdb-couch pull request: Add couch_util:validate_callback_exist...

GitHub user iilyak opened a pull request:

    https://github.com/apache/couchdb-couch/pull/37

    Add couch_util:validate_callback_exists

    COUCHDB-2585

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/iilyak/couchdb-couch 2585-allowed_owner-hook

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-couch/pull/37.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #37
    
----
commit f54e965b139c65799ddb18cc504e1514b33ccfb1
Author: ILYA Khlopotov <ii...@ca.ibm.com>
Date:   2015-02-24T21:06:29Z

    Add couch_util:validate_callback_exists
    
    COUCHDB-2585

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Add couch_util:validate_callback_exist...

Posted by janl <gi...@git.apache.org>.
Github user janl commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/37#issuecomment-76019963
  
    how is this related to https://issues.apache.org/jira/browse/COUCHDB-2585?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Add couch_util:validate_callback_exist...

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/37#issuecomment-76261740
  
    @iilyak could you squash your commits please? I'll merge it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Add couch_util:validate_callback_exist...

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/37#discussion_r25307182
  
    --- Diff: src/couch_util.erl ---
    @@ -537,3 +538,34 @@ match_rest_of_prefix([{Pos, _Len} | Rest], Prefix, Data, PrefixLength, N) ->
             {_Pos, _Len1} ->
                 {partial, N + Pos}
         end.
    +
    +callback_exists(Module, Function, Arity) ->
    +    case ensure_loaded(Module) of
    +    true ->
    +        InfoList = Module:module_info(exports),
    +        lists:any(fun(E) -> E == {Function, Arity} end, InfoList);
    --- End diff --
    
    It looks like you really want to use `lists:member/2` here (;


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Add couch_util:validate_callback_exist...

Posted by iilyak <gi...@git.apache.org>.
Github user iilyak commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/37#issuecomment-76295122
  
    Squashed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Add couch_util:validate_callback_exist...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/couchdb-couch/pull/37


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Add couch_util:validate_callback_exist...

Posted by janl <gi...@git.apache.org>.
Github user janl commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/37#issuecomment-76020970
  
    Ah, found it, https://issues.apache.org/jira/browse/COUCHDB-2625 was probably meant as a reference.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Add couch_util:validate_callback_exist...

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/37#issuecomment-75879890
  
    Nice helper!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---