Files
@ 31f510a88584
Branch filter:
Location: kallithea/rhodecode/tests/models/test_repos.py - annotation
31f510a88584
2.5 KiB
text/x-python
Update minified YUI to version 2.9 built from Source.
yui.2.9.js used to be a minified version of YUI 2.9 until 5143b8df576c updated
it to something else and applied more aggresive minification. We stick to a
clean but minified version 2.9.
The license of YUI is BSD 3-clause, as described on
http://yuilibrary.com/license/ .
Since the minified version combines with GPLv3'd Javascript, it is only GPLv3'd
compliant to distribute this Object Code version with the Corresponding Source
(or offer therefor).
This yui.2.9.js is built from Source this way:
git clone https://github.com/yui/builder
git clone https://github.com/yui/yui2
cd yui2/
git checkout hudson-yui2-2800
ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing
rm -f tmp.js
for m in yahoo event dom connection animation dragdrop element datasource autocomplete container event-delegate json datatable paginator; do
rm -f build/$m/$m.js; ( cd src/$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/$m/$m.js >> tmp.js
done
java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js
The source is mirrored and available on https://kallithea-scm.org/repos/mirror .
yui.2.9.js used to be a minified version of YUI 2.9 until 5143b8df576c updated
it to something else and applied more aggresive minification. We stick to a
clean but minified version 2.9.
The license of YUI is BSD 3-clause, as described on
http://yuilibrary.com/license/ .
Since the minified version combines with GPLv3'd Javascript, it is only GPLv3'd
compliant to distribute this Object Code version with the Corresponding Source
(or offer therefor).
This yui.2.9.js is built from Source this way:
git clone https://github.com/yui/builder
git clone https://github.com/yui/yui2
cd yui2/
git checkout hudson-yui2-2800
ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing
rm -f tmp.js
for m in yahoo event dom connection animation dragdrop element datasource autocomplete container event-delegate json datatable paginator; do
rm -f build/$m/$m.js; ( cd src/$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/$m/$m.js >> tmp.js
done
java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js
The source is mirrored and available on https://kallithea-scm.org/repos/mirror .
749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 5067d6e826a5 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 749dfd6b6e95 | from rhodecode.tests import *
from rhodecode.model.meta import Session
from rhodecode.tests.fixture import Fixture
from rhodecode.model.repo import RepoModel
from rhodecode.model.db import Repository
from rhodecode.lib.exceptions import AttachedForksError
fixture = Fixture()
class TestRepos(BaseTestCase):
def setUp(self):
pass
def tearDown(self):
Session.remove()
def test_remove_repo(self):
repo = fixture.create_repo(name='test-repo-1')
Session().commit()
RepoModel().delete(repo=repo)
Session().commit()
self.assertEqual(None, Repository.get_by_repo_name(repo_name='test-repo-1'))
def test_remove_repo_repo_raises_exc_when_attached_forks(self):
repo = fixture.create_repo(name='test-repo-1')
Session().commit()
fixture.create_fork(repo.repo_name, 'test-repo-fork-1')
Session().commit()
self.assertRaises(AttachedForksError, lambda: RepoModel().delete(repo=repo))
def test_remove_repo_delete_forks(self):
repo = fixture.create_repo(name='test-repo-1')
Session().commit()
fork = fixture.create_fork(repo.repo_name, 'test-repo-fork-1')
Session().commit()
#fork of fork
fixture.create_fork(fork.repo_name, 'test-repo-fork-fork-1')
Session().commit()
RepoModel().delete(repo=repo, forks='delete')
Session().commit()
self.assertEqual(None, Repository.get_by_repo_name(repo_name='test-repo-1'))
self.assertEqual(None, Repository.get_by_repo_name(repo_name='test-repo-fork-1'))
self.assertEqual(None, Repository.get_by_repo_name(repo_name='test-repo-fork-fork-1'))
def test_remove_repo_detach_forks(self):
repo = fixture.create_repo(name='test-repo-1')
Session().commit()
fork = fixture.create_fork(repo.repo_name, 'test-repo-fork-1')
Session().commit()
#fork of fork
fixture.create_fork(fork.repo_name, 'test-repo-fork-fork-1')
Session().commit()
RepoModel().delete(repo=repo, forks='detach')
Session().commit()
try:
self.assertEqual(None, Repository.get_by_repo_name(repo_name='test-repo-1'))
self.assertNotEqual(None, Repository.get_by_repo_name(repo_name='test-repo-fork-1'))
self.assertNotEqual(None, Repository.get_by_repo_name(repo_name='test-repo-fork-fork-1'))
finally:
RepoModel().delete(repo='test-repo-fork-fork-1')
RepoModel().delete(repo='test-repo-fork-1')
Session().commit()
|