File macros.webyast of Package rubygem-webyast-rake-tasks
#--
# Webyast Webservice framework
#
# Copyright (C) 2009, 2010 Novell, Inc.
# This library is free software; you can redistribute it and/or modify
# it only under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#++
#
# common RPM macro definitions used by WebYaST
#
# macros %webyast_ws_* are for webyast-*-ws packages,
# macros %webyast_ui_* are for webyast-*-ui packages,
# macros %webyast_ are generic for both webservice and client
#
# target directories
%webyast_ws_dir /srv/www/yastws
%webyast_ui_dir /srv/www/yast
# variable directories
%webyast_ws_vardir /var/lib/yastws/
# users who run the services
%webyast_ws_user yastws
%webyast_ui_user nginx
# service names (init script names in /etc/init.d)
%webyast_ws_service yastws
%webyast_ui_service yastwc
# run the testsuite
%webyast_check \
export TEST_DB_PATH=/tmp/webyast_test.sqlite3 \
rm -rf $TEST_DB_PATH \
RAILS_ENV=test rake db:create \
RAILS_ENV=test rake db:schema:load \
RAILS_ENV=test ADD_BUILD_PATH=1 rake test
%webyast_ws_check \
export RAILS_PARENT=%{webyast_ws_dir} \
%webyast_check
%webyast_ui_check \
export RAILS_PARENT=%{webyast_ui_dir} \
%webyast_check
# build REST documentation
%webyast_ws_restdoc \
export RAILS_PARENT=%{webyast_ws_dir} \
env LANG=en rake restdoc