Skip to content

Commit

Permalink
[api] move webui as into api engine
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Oct 18, 2013
1 parent b7648e9 commit 8073fb2
Show file tree
Hide file tree
Showing 758 changed files with 2,110 additions and 3,932 deletions.
19 changes: 7 additions & 12 deletions .travis.yml
Expand Up @@ -12,21 +12,16 @@ env:
#- SUBTEST=webui:functional/users_test.rb:test_add_and_edit_package_people
#- SUBTEST=api:functional/public_controller_test.rb:test_binaries
# full api test suite
- SUBTEST=api
# full webrat test suite
- SUBTEST=webui1
- SUBTEST=webui2
- SUBTEST=webui:functional/spider_test.rb:test_spider_as_admin RUN_SPIDER=1
- SUBTEST=webui:functional/spider_test.rb:test_spider_anonymously RUN_SPIDER=1
- SUBTEST=rake:test:units
- SUBTEST=rake:test:webui
- SUBTEST=rake:test:api
- SUBTEST=api:functional/webui/spider_test.rb:test_spider_as_admin RUN_SPIDER=1
- SUBTEST=api:functional/webui/spider_test.rb:test_spider_anonymously RUN_SPIDER=1
# api and webui webrat with latest gems
#- SUBTEST=api REMOVEGEMLOCK=true
#- SUBTEST=webui1 REMOVEGEMLOCK=true
#- SUBTEST=webui2 REMOVEGEMLOCK=true
- SUBTEST=rake:test REMOVEGEMLOCK=true
matrix:
allow_failures:
- env: SUBTEST=api REMOVEGEMLOCK=true
- env: SUBTEST=webui1 REMOVEGEMLOCK=true
- env: SUBTEST=webui2 REMOVEGEMLOCK=true
- env: SUBTEST=rake:test REMOVEGEMLOCK=true
notifications:
email:
on_success: change
Expand Down
22 changes: 2 additions & 20 deletions dist/ci/obs_testsuite_common.sh
Expand Up @@ -36,32 +36,15 @@ setup_api() {
cp config/options.yml.example config/options.yml
cp config/thinking_sphinx.yml.example config/thinking_sphinx.yml
chmod a+x script/start_test_backend
chmod a+x script/start_test_api

echo "Initialize test database, load seed data"
bundle exec rake db:drop db:create db:setup --trace
cd ../..
}

setup_webui() {
echo "Enter Webui rails root"
cd src/webui

echo "Setup database configuration"
cp config/database.yml.example config/database.yml

echo "Setup additional configuration"
cp config/options.yml.example config/options.yml

chmod +x script/start_test_api

echo "Initialize test database, load seed data"
bundle exec rake db:drop db:create db:setup --trace

cd ../..
cd docs/api
make
cd ../..

}

cleanup() {
Expand All @@ -76,6 +59,5 @@ cleanup() {
fi

echo "Remove log/tmp files to save disc space"
rm -rf src/api/{log,tmp}/* \
src/webui/{log,tmp}/* || true
rm -rf src/api/{log,tmp}/* || true
}
33 changes: 4 additions & 29 deletions dist/ci/obs_testsuite_travis.sh
Expand Up @@ -19,43 +19,18 @@ export OBS_REPORT_DIR=results/
export HEADLESS=forsure

case $SUBTEST in
api)
rake:*)
echo "Enter API rails root and running rcov"
cd src/api
bundle exec rake test --trace || ret=1
;;
webui1|webui2)
echo "Enter WebUI rails root and running rcov"
cd src/webui
if test "$SUBTEST" = "webui2"; then
rm -v test/functional/[a-m]*_test.rb
else
rm -v test/functional/[n-z]*_test.rb
fi
bundle exec rake test --trace || ret=1
;;
webui:*)
echo "Enter WebUI rails root"
cd src/webui
SUBTEST=${SUBTEST/webui:/}
thetest=${SUBTEST/:*/}
thename=${SUBTEST/*:/}
if test "$thename" != "$thetest"; then
thename="--name=$thename"
else
thename=
fi
if ! bundle exec ruby test/$thetest $thename ; then
ret=1
tail -n 6000 log/test.log
fi
SUBTEST=${SUBTEST/rake:/}
bundle exec rake $SUBTEST --trace || ret=1
;;
api:*)
cd src/api
SUBTEST=${SUBTEST/api:/}
thetest=${SUBTEST/:*/}
thename=${SUBTEST/*:/}
bundle exec ruby test/$thetest --name=$thename || ret=1
bundle exec ruby -Itest test/$thetest --name=$thename || ret=1
tail -n 6000 log/test.log
;;
esac
Expand Down
74 changes: 0 additions & 74 deletions dist/ci/obs_testsuite_webui.sh

This file was deleted.

24 changes: 24 additions & 0 deletions src/api/Gemfile
Expand Up @@ -34,12 +34,20 @@ gem 'thinking-sphinx', '= 3.0.4'
# don't rely on cron+rake
gem 'clockwork'

# for now used in webui routes
gem 'mobileesp_converted'

# used to paginate search results
gem 'kaminari'

group :production do
# if you have an account, it can be configured by
# placing a config/newrelic.yml
gem 'newrelic_rpm'
end

gem 'webui', path: 'webui'

group :test do
gem 'database_cleaner', '>= 1.0.1'
gem 'ci_reporter'
Expand All @@ -55,10 +63,24 @@ group :test do
gem 'webmock', '>= 1.9.0'
# for code quality checks
gem 'flog', '> 4.1.0'

gem 'capybara_minitest_spec'

# See test/test_helper.rb for details:
gem 'capybara', '~>2.0.1'
gem 'capybara-webkit', '< 1.0'

# for save_and_open_page to debug
gem 'launchy'
gem 'headless'

gem 'mocha', '> 0.13.0', require: false

end

group :development do
gem 'pry', '>= 0.9.12'
gem 'unicorn-rails' # webrick won't work
end

# Gems used only for assets and not required in production environments by default.
Expand All @@ -73,5 +95,7 @@ group :assets do
gem 'chunky_png'

gem "bootstrap-sass"
gem 'jquery-rails'
gem 'jquery-ui-rails'
end

0 comments on commit 8073fb2

Please sign in to comment.