Remove obsolete files

The existing build system, the configuration, as well as the end-to-end
test don't work with current CouchDB master anymore.  It's easier to
remove the associated files and restart from scratch.


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

Branch: refs/heads/master
Commit: 3d4942b9826f057c7e2743219340f66918b3eddc
Parents: 6c6a10e
Author: Klaus Trainer <klaus_trai...@posteo.de>
Authored: Wed Apr 29 20:08:06 2015 +0200
Committer: Klaus Trainer <klaus_trai...@posteo.de>
Committed: Wed Apr 29 20:20:14 2015 +0200

----------------------------------------------------------------------
 Makefile                        |  22 ------
 end-to-end-test.sh              | 143 -----------------------------------
 priv/default.d/couchperuser.ini |   2 -
 rebar.config                    |   5 --
 rebar.config.script             |  27 -------
 5 files changed, 199 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-peruser/blob/3d4942b9/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 8dcaf66..0000000
--- a/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-NAME=couchperuser
-ERL=$(shell couch-config --erl-bin)
-ERLANG_VERSION=$(shell couch-config --erlang-version)
-COUCHDB_VERSION=$(shell couch-config --couch-version | sed 's/\+.*//')
-VERSION=1.0.1
-PLUGIN_DIRS=ebin priv
-PLUGIN_VERSION_SLUG=$(NAME)-$(VERSION)-$(ERLANG_VERSION)-$(COUCHDB_VERSION)
-PLUGIN_DIST=$(PLUGIN_VERSION_SLUG)
-
-all: compile
-
-compile:
-       rebar compile
-
-test:
-       ./end-to-end-test.sh
-
-plugin: compile
-       mkdir -p $(PLUGIN_DIST)
-       cp -r $(PLUGIN_DIRS) $(PLUGIN_DIST)
-       tar czf $(PLUGIN_VERSION_SLUG).tar.gz $(PLUGIN_DIST)
-       @$(ERL) -eval 'File = "$(PLUGIN_VERSION_SLUG).tar.gz", {ok, Data} = 
file:read_file(File),io:format("~s: ~s~n", [File, 
base64:encode(crypto:sha(Data))]),halt()' -noshell

http://git-wip-us.apache.org/repos/asf/couchdb-peruser/blob/3d4942b9/end-to-end-test.sh
----------------------------------------------------------------------
diff --git a/end-to-end-test.sh b/end-to-end-test.sh
deleted file mode 100755
index e752b00..0000000
--- a/end-to-end-test.sh
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/bin/bash
-set -e
-# Send SIGTERM to process group on exit, ensures background tasks die
-# if script exits
-cleanup () {
-    kill -TERM 0
-    wait
-}
-HERE=$(pwd)
-PLUGIN="couchperuser"
-COUCHDB_SRC="${HERE}/.eunit/couchdb"
-COUCHDB_VER="1.6.1"
-COUCHDB_REL="apache-couchdb-${COUCHDB_VER}"
-COUCHDB_URL="http://apache.osuosl.org/couchdb/source/${COUCHDB_VER}/${COUCHDB_REL}.tar.gz";
-COUCHDB_PREFIX="${COUCHDB_SRC}/${COUCHDB_REL}-build"
-COUCHDB_PLUGINS="${COUCHDB_PREFIX}/lib/couchdb/plugins"
-COUCHDB_DATA="${COUCHDB_PREFIX}/var/lib/couchdb"
-couch () {
-    echo "http://$1:$2@127.0.0.1:5985$3";
-}
-if [ ! -d "${COUCHDB_SRC}" ]; then
-    echo "Downloading and unpacking ${COUCHDB_PREFIX}"
-    mkdir -p "${COUCHDB_SRC}"
-    pushd "${COUCHDB_SRC}"
-    curl -f "${COUCHDB_URL}" | tar zxf -
-    popd
-fi
-if [ ! -e "${COUCHDB_PREFIX}/bin/couchdb" ]; then
-    echo "Compiling ${COUCHDB_PREFIX}"
-    pushd "${COUCHDB_SRC}/${COUCHDB_REL}"
-    ./configure --prefix="${COUCHDB_PREFIX}"
-    make
-    make install
-    popd
-fi
-if [ ! -d "${COUCHDB_PLUGINS}/${PLUGIN}" ]; then
-    echo "Symlinking plugin dir"
-    if [ ! -d "${COUCHDB_PLUGINS}" ]; then
-        mkdir -p "${COUCHDB_PLUGINS}"
-    fi
-    ln -sf "${HERE}" "${COUCHDB_PLUGINS}/${PLUGIN}"
-fi
-PATH="${COUCHDB_PREFIX}/bin:${PATH}"
-rebar compile
-if [ -d "${COUCHDB_DATA}" ]; then
-    echo "Removing existing data files"
-    rm -rf "${COUCHDB_DATA}"
-fi
-echo "Writing local.ini"
-cat <<EOF > "${COUCHDB_PREFIX}/etc/couchdb/local.ini"
-[couchdb]
-uuid = 92a5cfcd7c8ad3a05b225e2fa8aba48f
-[httpd]
-port = 5985
-bind_address = 127.0.0.1
-[couch_httpd_auth]
-secret = d8c211410a5fb33d2458aba4b7bb593c
-[admins]
-; admin : password
-admin = 
-pbkdf2-341d6b96564af2f7a1a88fada73dbcd6ab7e061e,8aa4052c63662a4bf8cf575891513595,10
-EOF
-couchdb &
-trap 'cleanup' SIGINT SIGTERM EXIT
-while ! (curl -f -s "$(couch)" 2>&1 >/dev/null); do
-    sleep 0.1
-done
-secret_json () {
-    echo "{\"secret\":\"$1\"}"
-}
-to_hex () {
-    printf "%s" "$1" | xxd -ps
-}
-userdb () {
-    echo "/userdb-$(to_hex "$1")$2"
-}
-put_json () {
-    curl -f -s \
-         -HContent-Type:application/json \
-         -XPUT "$1" \
-         --data-binary "$2"
-}
-get_json () {
-    curl -f -s "$1"
-}
-create_user () {
-    put_json \
-        "$(couch "" "" "/_users/org.couchdb.user:$1")" \
-        "{\"_id\": \"org.couchdb.user:$1\",\"name\": \"$1\",\"roles\": 
[],\"type\": \"user\",\"password\": \"password\"}" \
-        >/dev/null
-}
-fail () {
-    printf "FAIL: %s\n" "$(printf "$@")" 1>&2
-    exit 1
-}
-create_user eve
-for user in alice bob; do
-    # Create users with no authentication
-    create_user "${user}"
-    # Expect database to exist, but give it some time to trigger the change
-    for x in $(seq 10); do
-        if ! (get_json "$(couch "${user}" "password" "$(userdb "${user}")")" > 
/dev/null); then
-            if [ "$x" -ge "10" ]; then
-                fail "Expected create of user %s to create db %s" "${user}" 
"$(userdb "{user}")"
-            else
-                sleep 0.2
-            fi
-        else
-            break
-        fi
-    done
-    # Write doc with correct authentication
-    if ! (put_json \
-        "$(couch "${user}" "password" $(userdb "${user}" "/secret"))" \
-        "$(secret_json "${user}")" \
-        >/dev/null); then
-        fail "User %s could not PUT %s" "${user}" "$(userdb "${user}" 
"/secret")"
-    fi
-    # Read doc with correct authentication
-    if ! (get_json "$(couch "${user}" "password" $(userdb "${user}" 
"/secret"))" >/dev/null); then
-        fail "User %s could not GET %s" "${user}" "$(userdb "${user}" 
"/secret")"
-    fi
-    # Try to read doc without authentication
-    if (get_json "$(couch "" "" $(userdb "${user}" "/secret"))" >/dev/null); 
then
-        fail "Expected unauthenticated read for %s database %s to fail" 
"${user}" "$(userdb "${user}" "/secret")"
-    fi
-    # Try to read doc with incorrect authentication
-    if (get_json "$(couch "eve" "password" $(userdb "${user}" "/secret"))" 
>/dev/null); then
-        fail "Expected %s read for %s database %s to fail" "eve" "${user}" 
"$(userdb "${user}" "/secret")"
-    fi
-    # Try to write doc without authentication
-    if (put_json "$(couch "" "" $(userdb "${user}" "/notsecret"))" 
"{\"secret\":\"oops\"}" >/dev/null); then
-        fail "Expected unauthenticated write for %s database %s to fail" 
"${user}" $(userdb "${user}" "/notsecret")
-    fi
-    # Try to write doc with incorrect authentication
-    if (put_json "$(couch "eve" "password" $(userdb "${user}" "/notsecret"))" 
"{\"secret\":\"oops\"}" >/dev/null); then
-        fail "Expected %s write for %s database %s to fail" "eve" "${user}" 
$(userdb "${user}" "/notsecret")
-    fi
-done
-trap - SIGINT SIGTERM EXIT
-for job in $(jobs -p); do
-    kill -SIGTERM $job
-done
-wait

http://git-wip-us.apache.org/repos/asf/couchdb-peruser/blob/3d4942b9/priv/default.d/couchperuser.ini
----------------------------------------------------------------------
diff --git a/priv/default.d/couchperuser.ini b/priv/default.d/couchperuser.ini
deleted file mode 100644
index 753d725..0000000
--- a/priv/default.d/couchperuser.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[daemons]
-couchperuser={couchperuser, start_link, []}

http://git-wip-us.apache.org/repos/asf/couchdb-peruser/blob/3d4942b9/rebar.config
----------------------------------------------------------------------
diff --git a/rebar.config b/rebar.config
deleted file mode 100644
index ed84264..0000000
--- a/rebar.config
+++ /dev/null
@@ -1,5 +0,0 @@
-%% -*- mode: erlang -*-
-{erl_opts, [warnings_as_errors]}.
-{cover_enabled, true}.
-{eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]}.
-{clean_files, ["*.eunit", "ebin/*.beam"]}.

http://git-wip-us.apache.org/repos/asf/couchdb-peruser/blob/3d4942b9/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
deleted file mode 100644
index 1565588..0000000
--- a/rebar.config.script
+++ /dev/null
@@ -1,27 +0,0 @@
-%% -*- mode: erlang -*-
-%%
-%% This doesn't change CONFIG. If couch isn't accessible to the code server,
-%% it adds paths from couch-config. This is equivalent to:
-%%
-%%   ERL_LIBS=$(couch-config --erl-libs-dir):$ERL_LIBS rebar compile
-%%
-case code:which(couch) of
-    non_existing ->
-        try
-            Cfg = os:cmd("couch-config --erl-libs-dir"),
-            [LibDir] = string:tokens(Cfg, "\n"),
-            true = filelib:is_dir(LibDir),
-            code:add_pathsa(
-              filelib:wildcard(filename:join([LibDir, "*", "ebin"]))),
-            false = (code:which(couch) =:= non_existing)
-        catch _Err:_What ->
-                io:format(
-                  "CONFIG ERROR:\n"
-                  "Failed to run couch-config --erl-libs-dir\n"
-                  "Ensure that couch-config is on the PATH, or set ERL_LIBS "
-                  "appropriately\n\n")
-        end;
-    _ ->
-        ok
-end,
-CONFIG.

Reply via email to