activeldap 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +17 -0
- data/README +7 -1
- data/Rakefile +2 -1
- data/benchmark/bench-al.rb +3 -3
- data/examples/al-admin/app/helpers/users_helper.rb +1 -1
- data/examples/al-admin/config/environment.rb +4 -3
- data/examples/al-admin/config/initializers/gettext.rb +1 -0
- data/examples/al-admin/config/session_secret.txt +1 -1
- data/examples/al-admin/po/al-admin.pot +344 -0
- data/examples/al-admin/public/images/active-ldap.png +0 -0
- data/examples/al-admin/vendor/locale_rails/.gitignore +6 -0
- data/examples/al-admin/vendor/locale_rails/COPYING +56 -0
- data/examples/al-admin/vendor/locale_rails/ChangeLog +35 -0
- data/examples/al-admin/vendor/locale_rails/README.rdoc +62 -0
- data/examples/al-admin/vendor/locale_rails/Rakefile +73 -0
- data/examples/al-admin/vendor/locale_rails/lib/locale_rails.rb +18 -0
- data/examples/al-admin/vendor/locale_rails/lib/locale_rails/action_controller.rb +15 -0
- data/examples/al-admin/vendor/locale_rails/lib/locale_rails/action_controller/base.rb +82 -0
- data/examples/al-admin/vendor/locale_rails/lib/locale_rails/action_controller/caching.rb +51 -0
- data/examples/al-admin/vendor/locale_rails/lib/locale_rails/action_controller/test_process.rb +44 -0
- data/examples/al-admin/vendor/locale_rails/lib/locale_rails/action_view.rb +53 -0
- data/examples/al-admin/vendor/locale_rails/lib/locale_rails/i18n.rb +67 -0
- data/examples/al-admin/vendor/locale_rails/lib/locale_rails/version.rb +4 -0
- data/examples/al-admin/vendor/locale_rails/sample/README +22 -0
- data/examples/al-admin/vendor/locale_rails/sample/Rakefile +10 -0
- data/examples/al-admin/vendor/locale_rails/sample/app/controllers/application.rb +42 -0
- data/examples/al-admin/vendor/locale_rails/sample/app/controllers/samples_controller.rb +30 -0
- data/examples/al-admin/vendor/locale_rails/sample/app/helpers/application_helper.rb +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/app/views/layouts/samples.html.erb +20 -0
- data/examples/al-admin/vendor/locale_rails/sample/app/views/samples/_part.html.erb +68 -0
- data/examples/al-admin/vendor/locale_rails/sample/app/views/samples/_part_nl.html.erb +2 -0
- data/examples/al-admin/vendor/locale_rails/sample/app/views/samples/cached_action.html.erb +6 -0
- data/examples/al-admin/vendor/locale_rails/sample/app/views/samples/index.html.erb +33 -0
- data/examples/al-admin/vendor/locale_rails/sample/app/views/samples/index.pt.html.erb +16 -0
- data/examples/al-admin/vendor/locale_rails/sample/app/views/samples/index_uz_UZ.html.erb +16 -0
- data/examples/al-admin/vendor/locale_rails/sample/config/boot.rb +109 -0
- data/examples/al-admin/vendor/locale_rails/sample/config/environment.rb +25 -0
- data/examples/al-admin/vendor/locale_rails/sample/config/environments/development.rb +17 -0
- data/examples/al-admin/vendor/locale_rails/sample/config/environments/production.rb +24 -0
- data/examples/al-admin/vendor/locale_rails/sample/config/environments/test.rb +22 -0
- data/examples/al-admin/vendor/locale_rails/sample/config/initializers/inflections.rb +10 -0
- data/examples/al-admin/vendor/locale_rails/sample/config/initializers/mime_types.rb +5 -0
- data/examples/al-admin/vendor/locale_rails/sample/config/initializers/new_rails_defaults.rb +17 -0
- data/examples/al-admin/vendor/locale_rails/sample/config/locales/en.yml +2 -0
- data/examples/al-admin/vendor/locale_rails/sample/config/locales/ja.yml +2 -0
- data/examples/al-admin/vendor/locale_rails/sample/config/routes.rb +13 -0
- data/examples/al-admin/vendor/locale_rails/sample/db/schema.rb +10 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/404.html +30 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/422.html +30 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/500.html +33 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/dispatch.cgi +10 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/dispatch.fcgi +24 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/dispatch.rb +10 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/favicon.ico +0 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/images/rails.png +0 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/javascripts/application.js +2 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/javascripts/controls.js +963 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/javascripts/dragdrop.js +972 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/javascripts/effects.js +1120 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/javascripts/prototype.js +4221 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/robots.txt +5 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/stylesheets/locale.css +81 -0
- data/examples/al-admin/vendor/locale_rails/sample/public/stylesheets/scaffold.css +74 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/about +4 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/console +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/dbconsole +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/destroy +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/generate +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/performance/benchmarker +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/performance/profiler +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/performance/request +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/plugin +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/process/inspector +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/process/reaper +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/process/spawner +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/runner +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/script/server +3 -0
- data/examples/al-admin/vendor/locale_rails/sample/test/performance/browsing_test.rb +9 -0
- data/examples/al-admin/vendor/locale_rails/sample/test/test_helper.rb +38 -0
- data/examples/al-admin/vendor/locale_rails/test/README +243 -0
- data/examples/al-admin/vendor/locale_rails/test/Rakefile +10 -0
- data/examples/al-admin/vendor/locale_rails/test/app/controllers/application_controller.rb +10 -0
- data/examples/al-admin/vendor/locale_rails/test/app/controllers/articles_controller.rb +17 -0
- data/examples/al-admin/vendor/locale_rails/test/app/helpers/application_helper.rb +3 -0
- data/examples/al-admin/vendor/locale_rails/test/app/views/articles/index.html.erb +1 -0
- data/examples/al-admin/vendor/locale_rails/test/app/views/articles/index_de.html.erb +1 -0
- data/examples/al-admin/vendor/locale_rails/test/app/views/articles/index_fr_FR.html.erb +1 -0
- data/examples/al-admin/vendor/locale_rails/test/app/views/articles/index_ja.html.erb +1 -0
- data/examples/al-admin/vendor/locale_rails/test/app/views/articles/list.html.erb +1 -0
- data/examples/al-admin/vendor/locale_rails/test/app/views/articles/show.html.erb +0 -0
- data/examples/al-admin/vendor/locale_rails/test/app/views/articles/show.js.rjs +0 -0
- data/examples/al-admin/vendor/locale_rails/test/config/boot.rb +110 -0
- data/examples/al-admin/vendor/locale_rails/test/config/environment.rb +42 -0
- data/examples/al-admin/vendor/locale_rails/test/config/environments/development.rb +17 -0
- data/examples/al-admin/vendor/locale_rails/test/config/environments/production.rb +28 -0
- data/examples/al-admin/vendor/locale_rails/test/config/environments/test.rb +35 -0
- data/examples/al-admin/vendor/locale_rails/test/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/al-admin/vendor/locale_rails/test/config/initializers/inflections.rb +10 -0
- data/examples/al-admin/vendor/locale_rails/test/config/initializers/mime_types.rb +5 -0
- data/examples/al-admin/vendor/locale_rails/test/config/initializers/new_rails_defaults.rb +19 -0
- data/examples/al-admin/vendor/locale_rails/test/config/initializers/session_store.rb +15 -0
- data/examples/al-admin/vendor/locale_rails/test/config/locales/en.yml +5 -0
- data/examples/al-admin/vendor/locale_rails/test/config/routes.rb +46 -0
- data/examples/al-admin/vendor/locale_rails/test/db/schema.rb +0 -0
- data/examples/al-admin/vendor/locale_rails/test/public/404.html +30 -0
- data/examples/al-admin/vendor/locale_rails/test/public/422.html +30 -0
- data/examples/al-admin/vendor/locale_rails/test/public/500.html +30 -0
- data/examples/al-admin/vendor/locale_rails/test/public/favicon.ico +0 -0
- data/examples/al-admin/vendor/locale_rails/test/public/images/rails.png +0 -0
- data/examples/al-admin/vendor/locale_rails/test/public/index.html +275 -0
- data/examples/al-admin/vendor/locale_rails/test/public/javascripts/application.js +2 -0
- data/examples/al-admin/vendor/locale_rails/test/public/javascripts/controls.js +963 -0
- data/examples/al-admin/vendor/locale_rails/test/public/javascripts/dragdrop.js +973 -0
- data/examples/al-admin/vendor/locale_rails/test/public/javascripts/effects.js +1128 -0
- data/examples/al-admin/vendor/locale_rails/test/public/javascripts/prototype.js +4320 -0
- data/examples/al-admin/vendor/locale_rails/test/public/robots.txt +5 -0
- data/examples/al-admin/vendor/locale_rails/test/script/about +4 -0
- data/examples/al-admin/vendor/locale_rails/test/script/console +3 -0
- data/examples/al-admin/vendor/locale_rails/test/script/dbconsole +3 -0
- data/examples/al-admin/vendor/locale_rails/test/script/destroy +3 -0
- data/examples/al-admin/vendor/locale_rails/test/script/generate +3 -0
- data/examples/al-admin/vendor/locale_rails/test/script/performance/benchmarker +3 -0
- data/examples/al-admin/vendor/locale_rails/test/script/performance/profiler +3 -0
- data/examples/al-admin/vendor/locale_rails/test/script/plugin +3 -0
- data/examples/al-admin/vendor/locale_rails/test/script/runner +3 -0
- data/examples/al-admin/vendor/locale_rails/test/script/server +3 -0
- data/examples/al-admin/vendor/locale_rails/test/test/functional/articles_controller_test.rb +161 -0
- data/examples/al-admin/vendor/locale_rails/test/test/performance/browsing_test.rb +9 -0
- data/examples/al-admin/vendor/locale_rails/test/test/test_helper.rb +38 -0
- data/lib/active_ldap.rb +9 -4
- data/lib/active_ldap/adapter/base.rb +3 -3
- data/lib/active_ldap/adapter/jndi.rb +1 -1
- data/lib/active_ldap/adapter/jndi_connection.rb +1 -3
- data/lib/active_ldap/adapter/ldap.rb +11 -11
- data/lib/active_ldap/adapter/ldap_ext.rb +25 -3
- data/lib/active_ldap/adapter/net_ldap.rb +9 -2
- data/lib/active_ldap/association/collection.rb +14 -2
- data/lib/active_ldap/base.rb +13 -5
- data/lib/active_ldap/configuration.rb +1 -0
- data/lib/active_ldap/ldap_error.rb +3 -3
- data/lib/active_ldap/ldif.rb +1 -1
- data/lib/active_ldap/operations.rb +2 -0
- data/lib/active_ldap/schema/syntaxes.rb +2 -2
- data/lib/active_ldap/validations.rb +37 -26
- data/lib/active_ldap/xml.rb +2 -0
- data/po/active-ldap.pot +38 -58
- data/test-unit/COPYING +56 -0
- data/test-unit/GPL +340 -0
- data/test-unit/History.txt +65 -3
- data/test-unit/Manifest.txt +5 -0
- data/test-unit/PSFL +271 -0
- data/test-unit/README.txt +6 -1
- data/test-unit/lib/test/unit.rb +6 -1
- data/test-unit/lib/test/unit/assertions.rb +129 -13
- data/test-unit/lib/test/unit/autorunner.rb +21 -16
- data/test-unit/lib/test/unit/collector.rb +1 -8
- data/test-unit/lib/test/unit/collector/dir.rb +1 -1
- data/test-unit/lib/test/unit/collector/load.rb +15 -7
- data/test-unit/lib/test/unit/color-scheme.rb +6 -2
- data/test-unit/lib/test/unit/diff.rb +17 -1
- data/test-unit/lib/test/unit/error.rb +4 -0
- data/test-unit/lib/test/unit/failure.rb +4 -0
- data/test-unit/lib/test/unit/notification.rb +8 -4
- data/test-unit/lib/test/unit/omission.rb +4 -0
- data/test-unit/lib/test/unit/pending.rb +4 -0
- data/test-unit/lib/test/unit/priority.rb +2 -3
- data/test-unit/lib/test/unit/testcase.rb +18 -7
- data/test-unit/lib/test/unit/ui/console/testrunner.rb +5 -3
- data/test-unit/lib/test/unit/util/backtracefilter.rb +1 -0
- data/test-unit/lib/test/unit/util/output.rb +31 -0
- data/test-unit/lib/test/unit/version.rb +1 -1
- data/test-unit/test/collector/test-descendant.rb +2 -4
- data/test-unit/test/collector/test-load.rb +121 -8
- data/test-unit/test/collector/test_objectspace.rb +7 -5
- data/test-unit/test/test-color-scheme.rb +4 -2
- data/test-unit/test/test-testcase.rb +48 -38
- data/test-unit/test/test_assertions.rb +87 -5
- data/test-unit/test/util/test-output.rb +11 -0
- data/test/al-test-utils.rb +6 -1
- data/test/fixtures/lower_case_object_class_schema.rb +802 -0
- data/test/test_associations.rb +20 -1
- data/test/test_base.rb +50 -3
- data/test/test_ldif.rb +10 -1
- data/test/test_syntax.rb +12 -0
- data/test/test_validation.rb +0 -2
- metadata +225 -56
data/test-unit/Manifest.txt
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
COPYING
|
|
2
|
+
GPL
|
|
1
3
|
History.txt
|
|
2
4
|
Manifest.txt
|
|
5
|
+
PSFL
|
|
3
6
|
README.txt
|
|
4
7
|
Rakefile
|
|
5
8
|
TODO
|
|
@@ -46,6 +49,7 @@ lib/test/unit/ui/testrunnerutilities.rb
|
|
|
46
49
|
lib/test/unit/util/backtracefilter.rb
|
|
47
50
|
lib/test/unit/util/method-owner-finder.rb
|
|
48
51
|
lib/test/unit/util/observable.rb
|
|
52
|
+
lib/test/unit/util/output.rb
|
|
49
53
|
lib/test/unit/util/procwrapper.rb
|
|
50
54
|
lib/test/unit/version.rb
|
|
51
55
|
sample/adder.rb
|
|
@@ -77,6 +81,7 @@ test/test_testsuite.rb
|
|
|
77
81
|
test/testunit-test-util.rb
|
|
78
82
|
test/ui/test_testrunmediator.rb
|
|
79
83
|
test/util/test-method-owner-finder.rb
|
|
84
|
+
test/util/test-output.rb
|
|
80
85
|
test/util/test_backtracefilter.rb
|
|
81
86
|
test/util/test_observable.rb
|
|
82
87
|
test/util/test_procwrapper.rb
|
data/test-unit/PSFL
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
This is the official license for the Python 2.5 release:
|
|
2
|
+
|
|
3
|
+
A. HISTORY OF THE SOFTWARE
|
|
4
|
+
==========================
|
|
5
|
+
|
|
6
|
+
Python was created in the early 1990s by Guido van Rossum at Stichting
|
|
7
|
+
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
|
|
8
|
+
as a successor of a language called ABC. Guido remains Python's
|
|
9
|
+
principal author, although it includes many contributions from others.
|
|
10
|
+
|
|
11
|
+
In 1995, Guido continued his work on Python at the Corporation for
|
|
12
|
+
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
|
|
13
|
+
in Reston, Virginia where he released several versions of the
|
|
14
|
+
software.
|
|
15
|
+
|
|
16
|
+
In May 2000, Guido and the Python core development team moved to
|
|
17
|
+
BeOpen.com to form the BeOpen PythonLabs team. In October of the same
|
|
18
|
+
year, the PythonLabs team moved to Digital Creations (now Zope
|
|
19
|
+
Corporation, see http://www.zope.com). In 2001, the Python Software
|
|
20
|
+
Foundation (PSF, see http://www.python.org/psf/) was formed, a
|
|
21
|
+
non-profit organization created specifically to own Python-related
|
|
22
|
+
Intellectual Property. Zope Corporation is a sponsoring member of
|
|
23
|
+
the PSF.
|
|
24
|
+
|
|
25
|
+
All Python releases are Open Source (see http://www.opensource.org for
|
|
26
|
+
the Open Source Definition). Historically, most, but not all, Python
|
|
27
|
+
releases have also been GPL-compatible; the table below summarizes
|
|
28
|
+
the various releases.
|
|
29
|
+
|
|
30
|
+
Release Derived Year Owner GPL-
|
|
31
|
+
from compatible? (1)
|
|
32
|
+
|
|
33
|
+
0.9.0 thru 1.2 1991-1995 CWI yes
|
|
34
|
+
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
|
|
35
|
+
1.6 1.5.2 2000 CNRI no
|
|
36
|
+
2.0 1.6 2000 BeOpen.com no
|
|
37
|
+
1.6.1 1.6 2001 CNRI yes (2)
|
|
38
|
+
2.1 2.0+1.6.1 2001 PSF no
|
|
39
|
+
2.0.1 2.0+1.6.1 2001 PSF yes
|
|
40
|
+
2.1.1 2.1+2.0.1 2001 PSF yes
|
|
41
|
+
2.2 2.1.1 2001 PSF yes
|
|
42
|
+
2.1.2 2.1.1 2002 PSF yes
|
|
43
|
+
2.1.3 2.1.2 2002 PSF yes
|
|
44
|
+
2.2.1 2.2 2002 PSF yes
|
|
45
|
+
2.2.2 2.2.1 2002 PSF yes
|
|
46
|
+
2.2.3 2.2.2 2003 PSF yes
|
|
47
|
+
2.3 2.2.2 2002-2003 PSF yes
|
|
48
|
+
2.3.1 2.3 2002-2003 PSF yes
|
|
49
|
+
2.3.2 2.3.1 2002-2003 PSF yes
|
|
50
|
+
2.3.3 2.3.2 2002-2003 PSF yes
|
|
51
|
+
2.3.4 2.3.3 2004 PSF yes
|
|
52
|
+
2.3.5 2.3.4 2005 PSF yes
|
|
53
|
+
2.4 2.3 2004 PSF yes
|
|
54
|
+
2.4.1 2.4 2005 PSF yes
|
|
55
|
+
2.4.2 2.4.1 2005 PSF yes
|
|
56
|
+
2.4.3 2.4.2 2006 PSF yes
|
|
57
|
+
2.5 2.4 2006 PSF yes
|
|
58
|
+
|
|
59
|
+
Footnotes:
|
|
60
|
+
|
|
61
|
+
(1) GPL-compatible doesn't mean that we're distributing Python under
|
|
62
|
+
the GPL. All Python licenses, unlike the GPL, let you distribute
|
|
63
|
+
a modified version without making your changes open source. The
|
|
64
|
+
GPL-compatible licenses make it possible to combine Python with
|
|
65
|
+
other software that is released under the GPL; the others don't.
|
|
66
|
+
|
|
67
|
+
(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
|
|
68
|
+
because its license has a choice of law clause. According to
|
|
69
|
+
CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
|
|
70
|
+
is "not incompatible" with the GPL.
|
|
71
|
+
|
|
72
|
+
Thanks to the many outside volunteers who have worked under Guido's
|
|
73
|
+
direction to make these releases possible.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
|
|
77
|
+
===============================================================
|
|
78
|
+
|
|
79
|
+
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
|
|
80
|
+
--------------------------------------------
|
|
81
|
+
|
|
82
|
+
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
|
83
|
+
("PSF"), and the Individual or Organization ("Licensee") accessing and
|
|
84
|
+
otherwise using this software ("Python") in source or binary form and
|
|
85
|
+
its associated documentation.
|
|
86
|
+
|
|
87
|
+
2. Subject to the terms and conditions of this License Agreement, PSF
|
|
88
|
+
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
|
89
|
+
license to reproduce, analyze, test, perform and/or display publicly,
|
|
90
|
+
prepare derivative works, distribute, and otherwise use Python
|
|
91
|
+
alone or in any derivative version, provided, however, that PSF's
|
|
92
|
+
License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
|
|
93
|
+
2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation; All Rights
|
|
94
|
+
Reserved" are retained in Python alone or in any derivative version
|
|
95
|
+
prepared by Licensee.
|
|
96
|
+
|
|
97
|
+
3. In the event Licensee prepares a derivative work that is based on
|
|
98
|
+
or incorporates Python or any part thereof, and wants to make
|
|
99
|
+
the derivative work available to others as provided herein, then
|
|
100
|
+
Licensee hereby agrees to include in any such work a brief summary of
|
|
101
|
+
the changes made to Python.
|
|
102
|
+
|
|
103
|
+
4. PSF is making Python available to Licensee on an "AS IS"
|
|
104
|
+
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
105
|
+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
|
106
|
+
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
107
|
+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
|
|
108
|
+
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
109
|
+
|
|
110
|
+
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
|
111
|
+
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
|
112
|
+
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
|
|
113
|
+
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
114
|
+
|
|
115
|
+
6. This License Agreement will automatically terminate upon a material
|
|
116
|
+
breach of its terms and conditions.
|
|
117
|
+
|
|
118
|
+
7. Nothing in this License Agreement shall be deemed to create any
|
|
119
|
+
relationship of agency, partnership, or joint venture between PSF and
|
|
120
|
+
Licensee. This License Agreement does not grant permission to use PSF
|
|
121
|
+
trademarks or trade name in a trademark sense to endorse or promote
|
|
122
|
+
products or services of Licensee, or any third party.
|
|
123
|
+
|
|
124
|
+
8. By copying, installing or otherwise using Python, Licensee
|
|
125
|
+
agrees to be bound by the terms and conditions of this License
|
|
126
|
+
Agreement.
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
|
|
130
|
+
-------------------------------------------
|
|
131
|
+
|
|
132
|
+
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
|
|
133
|
+
|
|
134
|
+
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
|
|
135
|
+
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
|
|
136
|
+
Individual or Organization ("Licensee") accessing and otherwise using
|
|
137
|
+
this software in source or binary form and its associated
|
|
138
|
+
documentation ("the Software").
|
|
139
|
+
|
|
140
|
+
2. Subject to the terms and conditions of this BeOpen Python License
|
|
141
|
+
Agreement, BeOpen hereby grants Licensee a non-exclusive,
|
|
142
|
+
royalty-free, world-wide license to reproduce, analyze, test, perform
|
|
143
|
+
and/or display publicly, prepare derivative works, distribute, and
|
|
144
|
+
otherwise use the Software alone or in any derivative version,
|
|
145
|
+
provided, however, that the BeOpen Python License is retained in the
|
|
146
|
+
Software, alone or in any derivative version prepared by Licensee.
|
|
147
|
+
|
|
148
|
+
3. BeOpen is making the Software available to Licensee on an "AS IS"
|
|
149
|
+
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
150
|
+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
|
|
151
|
+
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
152
|
+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
|
|
153
|
+
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
154
|
+
|
|
155
|
+
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
|
|
156
|
+
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
|
|
157
|
+
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
|
|
158
|
+
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
159
|
+
|
|
160
|
+
5. This License Agreement will automatically terminate upon a material
|
|
161
|
+
breach of its terms and conditions.
|
|
162
|
+
|
|
163
|
+
6. This License Agreement shall be governed by and interpreted in all
|
|
164
|
+
respects by the law of the State of California, excluding conflict of
|
|
165
|
+
law provisions. Nothing in this License Agreement shall be deemed to
|
|
166
|
+
create any relationship of agency, partnership, or joint venture
|
|
167
|
+
between BeOpen and Licensee. This License Agreement does not grant
|
|
168
|
+
permission to use BeOpen trademarks or trade names in a trademark
|
|
169
|
+
sense to endorse or promote products or services of Licensee, or any
|
|
170
|
+
third party. As an exception, the "BeOpen Python" logos available at
|
|
171
|
+
http://www.pythonlabs.com/logos.html may be used according to the
|
|
172
|
+
permissions granted on that web page.
|
|
173
|
+
|
|
174
|
+
7. By copying, installing or otherwise using the software, Licensee
|
|
175
|
+
agrees to be bound by the terms and conditions of this License
|
|
176
|
+
Agreement.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
|
|
180
|
+
---------------------------------------
|
|
181
|
+
|
|
182
|
+
1. This LICENSE AGREEMENT is between the Corporation for National
|
|
183
|
+
Research Initiatives, having an office at 1895 Preston White Drive,
|
|
184
|
+
Reston, VA 20191 ("CNRI"), and the Individual or Organization
|
|
185
|
+
("Licensee") accessing and otherwise using Python 1.6.1 software in
|
|
186
|
+
source or binary form and its associated documentation.
|
|
187
|
+
|
|
188
|
+
2. Subject to the terms and conditions of this License Agreement, CNRI
|
|
189
|
+
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
|
190
|
+
license to reproduce, analyze, test, perform and/or display publicly,
|
|
191
|
+
prepare derivative works, distribute, and otherwise use Python 1.6.1
|
|
192
|
+
alone or in any derivative version, provided, however, that CNRI's
|
|
193
|
+
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
|
|
194
|
+
1995-2001 Corporation for National Research Initiatives; All Rights
|
|
195
|
+
Reserved" are retained in Python 1.6.1 alone or in any derivative
|
|
196
|
+
version prepared by Licensee. Alternately, in lieu of CNRI's License
|
|
197
|
+
Agreement, Licensee may substitute the following text (omitting the
|
|
198
|
+
quotes): "Python 1.6.1 is made available subject to the terms and
|
|
199
|
+
conditions in CNRI's License Agreement. This Agreement together with
|
|
200
|
+
Python 1.6.1 may be located on the Internet using the following
|
|
201
|
+
unique, persistent identifier (known as a handle): 1895.22/1013. This
|
|
202
|
+
Agreement may also be obtained from a proxy server on the Internet
|
|
203
|
+
using the following URL: http://hdl.handle.net/1895.22/1013".
|
|
204
|
+
|
|
205
|
+
3. In the event Licensee prepares a derivative work that is based on
|
|
206
|
+
or incorporates Python 1.6.1 or any part thereof, and wants to make
|
|
207
|
+
the derivative work available to others as provided herein, then
|
|
208
|
+
Licensee hereby agrees to include in any such work a brief summary of
|
|
209
|
+
the changes made to Python 1.6.1.
|
|
210
|
+
|
|
211
|
+
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
|
|
212
|
+
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
213
|
+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
|
|
214
|
+
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
215
|
+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
|
|
216
|
+
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
217
|
+
|
|
218
|
+
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
|
219
|
+
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
|
220
|
+
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
|
|
221
|
+
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
222
|
+
|
|
223
|
+
6. This License Agreement will automatically terminate upon a material
|
|
224
|
+
breach of its terms and conditions.
|
|
225
|
+
|
|
226
|
+
7. This License Agreement shall be governed by the federal
|
|
227
|
+
intellectual property law of the United States, including without
|
|
228
|
+
limitation the federal copyright law, and, to the extent such
|
|
229
|
+
U.S. federal law does not apply, by the law of the Commonwealth of
|
|
230
|
+
Virginia, excluding Virginia's conflict of law provisions.
|
|
231
|
+
Notwithstanding the foregoing, with regard to derivative works based
|
|
232
|
+
on Python 1.6.1 that incorporate non-separable material that was
|
|
233
|
+
previously distributed under the GNU General Public License (GPL), the
|
|
234
|
+
law of the Commonwealth of Virginia shall govern this License
|
|
235
|
+
Agreement only as to issues arising under or with respect to
|
|
236
|
+
Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
|
|
237
|
+
License Agreement shall be deemed to create any relationship of
|
|
238
|
+
agency, partnership, or joint venture between CNRI and Licensee. This
|
|
239
|
+
License Agreement does not grant permission to use CNRI trademarks or
|
|
240
|
+
trade name in a trademark sense to endorse or promote products or
|
|
241
|
+
services of Licensee, or any third party.
|
|
242
|
+
|
|
243
|
+
8. By clicking on the "ACCEPT" button where indicated, or by copying,
|
|
244
|
+
installing or otherwise using Python 1.6.1, Licensee agrees to be
|
|
245
|
+
bound by the terms and conditions of this License Agreement.
|
|
246
|
+
|
|
247
|
+
ACCEPT
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
|
|
251
|
+
--------------------------------------------------
|
|
252
|
+
|
|
253
|
+
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
|
|
254
|
+
The Netherlands. All rights reserved.
|
|
255
|
+
|
|
256
|
+
Permission to use, copy, modify, and distribute this software and its
|
|
257
|
+
documentation for any purpose and without fee is hereby granted,
|
|
258
|
+
provided that the above copyright notice appear in all copies and that
|
|
259
|
+
both that copyright notice and this permission notice appear in
|
|
260
|
+
supporting documentation, and that the name of Stichting Mathematisch
|
|
261
|
+
Centrum or CWI not be used in advertising or publicity pertaining to
|
|
262
|
+
distribution of the software without specific, written prior
|
|
263
|
+
permission.
|
|
264
|
+
|
|
265
|
+
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
|
266
|
+
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
267
|
+
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
|
|
268
|
+
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
269
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
270
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
|
271
|
+
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
data/test-unit/README.txt
CHANGED
|
@@ -42,6 +42,9 @@ If you want to use full Test::Unit features:
|
|
|
42
42
|
|
|
43
43
|
This software is distributed under the same terms as ruby.
|
|
44
44
|
|
|
45
|
+
Exception: lib/test/unit/diff.rb is a dual license of the
|
|
46
|
+
Ruby license and PSF license.
|
|
47
|
+
|
|
45
48
|
== Thanks
|
|
46
49
|
|
|
47
50
|
* Daniel Berger: Suggestions and bug reports.
|
|
@@ -51,5 +54,7 @@ This software is distributed under the same terms as ruby.
|
|
|
51
54
|
* Diego Pettenò: A bug report.
|
|
52
55
|
* Angelo Lakra: A bug report.
|
|
53
56
|
* Mike Pomraning: A bug report.
|
|
54
|
-
* David MARCHALAND:
|
|
57
|
+
* David MARCHALAND: Suggestions and bug reports.
|
|
55
58
|
* Andrew Grimm: A bug report.
|
|
59
|
+
* Champak Ch: A bug report.
|
|
60
|
+
* Florian Frank: A bug report.
|
data/test-unit/lib/test/unit.rb
CHANGED
|
@@ -90,8 +90,13 @@ module Test # :nodoc:
|
|
|
90
90
|
#
|
|
91
91
|
# Test::Unit is copyright (c) 2000-2003 Nathaniel Talbott. It is free
|
|
92
92
|
# software, and is distributed under the Ruby license. See the COPYING
|
|
93
|
-
# file
|
|
93
|
+
# file.
|
|
94
94
|
#
|
|
95
|
+
# Exception: lib/test/unit/diff.rb is copyright (c)
|
|
96
|
+
# 2008-2010 Kouhei Sutou and 2001-2008 Python Software
|
|
97
|
+
# Foundation. It is free software, and is distributed
|
|
98
|
+
# under the Ruby license and/or the PSF license. See the
|
|
99
|
+
# COPYING file and PSFL file.
|
|
95
100
|
#
|
|
96
101
|
# == Warranty
|
|
97
102
|
#
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Author:: Nathaniel Talbott.
|
|
2
2
|
# Copyright:: Copyright (c) 2000-2003 Nathaniel Talbott. All rights reserved.
|
|
3
|
-
# Copyright (c) 2009 Kouhei Sutou.
|
|
3
|
+
# Copyright (c) 2009-2010 Kouhei Sutou. All rights reserved.
|
|
4
4
|
# License:: Ruby license.
|
|
5
5
|
|
|
6
6
|
require 'test/unit/assertionfailederror'
|
|
@@ -80,10 +80,23 @@ module Test
|
|
|
80
80
|
public
|
|
81
81
|
def assert_equal(expected, actual, message=nil)
|
|
82
82
|
diff = AssertionMessage.delayed_diff(expected, actual)
|
|
83
|
-
|
|
83
|
+
if expected.respond_to?(:encoding) and
|
|
84
|
+
actual.respond_to?(:encoding) and
|
|
85
|
+
expected.encoding != actual.encoding
|
|
86
|
+
format = <<EOT
|
|
87
|
+
<?>(?) expected but was
|
|
88
|
+
<?>(?).?
|
|
89
|
+
EOT
|
|
90
|
+
full_message = build_message(message, format,
|
|
91
|
+
expected, expected.encoding.name,
|
|
92
|
+
actual, actual.encoding.name,
|
|
93
|
+
diff)
|
|
94
|
+
else
|
|
95
|
+
full_message = build_message(message, <<EOT, expected, actual, diff)
|
|
84
96
|
<?> expected but was
|
|
85
97
|
<?>.?
|
|
86
98
|
EOT
|
|
99
|
+
end
|
|
87
100
|
begin
|
|
88
101
|
assert_block(full_message) { expected == actual }
|
|
89
102
|
rescue AssertionFailedError => failure
|
|
@@ -539,18 +552,73 @@ EOT
|
|
|
539
552
|
public
|
|
540
553
|
def assert_in_delta(expected_float, actual_float, delta, message="")
|
|
541
554
|
_wrap_assertion do
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
555
|
+
_assert_in_delta_validate_arguments(expected_float,
|
|
556
|
+
actual_float,
|
|
557
|
+
delta)
|
|
558
|
+
full_message = _assert_in_delta_message(expected_float,
|
|
559
|
+
actual_float,
|
|
560
|
+
delta,
|
|
561
|
+
message)
|
|
562
|
+
assert_block(full_message) do
|
|
563
|
+
(expected_float.to_f - actual_float.to_f).abs <= delta.to_f
|
|
564
|
+
end
|
|
565
|
+
end
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
# :stopdoc:
|
|
569
|
+
private
|
|
570
|
+
def _assert_in_delta_validate_arguments(expected_float,
|
|
571
|
+
actual_float,
|
|
572
|
+
delta)
|
|
573
|
+
{
|
|
574
|
+
expected_float => "first float",
|
|
575
|
+
actual_float => "second float",
|
|
576
|
+
delta => "delta"
|
|
577
|
+
}.each do |float, name|
|
|
578
|
+
assert_respond_to(float, :to_f,
|
|
579
|
+
"The arguments must respond to to_f; " +
|
|
580
|
+
"the #{name} did not")
|
|
581
|
+
end
|
|
582
|
+
assert_operator(delta, :>=, 0.0, "The delta should not be negative")
|
|
583
|
+
end
|
|
584
|
+
|
|
585
|
+
def _assert_in_delta_message(expected_float, actual_float, delta,
|
|
586
|
+
message)
|
|
587
|
+
format = <<-EOT
|
|
588
|
+
<?> expected but was
|
|
589
|
+
<?> (tolerance <?>).
|
|
590
|
+
EOT
|
|
591
|
+
arguments = [expected_float, actual_float, delta]
|
|
592
|
+
normalized_expected = expected_float.to_f
|
|
593
|
+
normalized_actual = actual_float.to_f
|
|
594
|
+
normalized_delta = delta.to_f
|
|
595
|
+
relation_format = nil
|
|
596
|
+
relation_arguments = nil
|
|
597
|
+
if normalized_actual < normalized_expected - normalized_delta
|
|
598
|
+
relation_format = "<<?> < <?>-<?>(?) <= <?>+<?>(?)>"
|
|
599
|
+
relation_arguments = [actual_float,
|
|
600
|
+
expected_float, delta, expected_float - delta,
|
|
601
|
+
expected_float, delta, expected_float + delta]
|
|
602
|
+
elsif normalized_expected - normalized_delta < normalized_actual
|
|
603
|
+
relation_format = "<<?>-<?>(?) <= <?>+<?>(?) < <?>>"
|
|
604
|
+
relation_arguments = [expected_float, delta, expected_float - delta,
|
|
605
|
+
expected_float, delta, expected_float + delta,
|
|
606
|
+
actual_float]
|
|
607
|
+
end
|
|
608
|
+
|
|
609
|
+
if relation_format
|
|
610
|
+
format << <<-EOT
|
|
611
|
+
|
|
612
|
+
Relation:
|
|
613
|
+
#{relation_format}
|
|
550
614
|
EOT
|
|
551
|
-
|
|
615
|
+
arguments.concat(relation_arguments)
|
|
552
616
|
end
|
|
617
|
+
|
|
618
|
+
build_message(message, format, *arguments)
|
|
553
619
|
end
|
|
620
|
+
public
|
|
621
|
+
# :startdoc:
|
|
554
622
|
|
|
555
623
|
##
|
|
556
624
|
# Passes if the method send returns a true value.
|
|
@@ -846,6 +914,42 @@ EOT
|
|
|
846
914
|
end
|
|
847
915
|
end
|
|
848
916
|
|
|
917
|
+
##
|
|
918
|
+
# Passes if +path+ exists.
|
|
919
|
+
#
|
|
920
|
+
# Example:
|
|
921
|
+
# assert_path_exist("/tmp") # -> pass
|
|
922
|
+
# assert_path_exist("/bin/sh") # -> pass
|
|
923
|
+
# assert_path_exist("/nonexistent") # -> fail
|
|
924
|
+
def assert_path_exist(path, message=nil)
|
|
925
|
+
_wrap_assertion do
|
|
926
|
+
failure_message = build_message(message,
|
|
927
|
+
"<?> expected to exist",
|
|
928
|
+
path)
|
|
929
|
+
assert_block(failure_message) do
|
|
930
|
+
File.exist?(path)
|
|
931
|
+
end
|
|
932
|
+
end
|
|
933
|
+
end
|
|
934
|
+
|
|
935
|
+
##
|
|
936
|
+
# Passes if +path+ doesn't exist.
|
|
937
|
+
#
|
|
938
|
+
# Example:
|
|
939
|
+
# assert_path_not_exist("/nonexistent") # -> pass
|
|
940
|
+
# assert_path_not_exist("/tmp") # -> fail
|
|
941
|
+
# assert_path_not_exist("/bin/sh") # -> fail
|
|
942
|
+
def assert_path_not_exist(path, message=nil)
|
|
943
|
+
_wrap_assertion do
|
|
944
|
+
failure_message = build_message(message,
|
|
945
|
+
"<?> expected to not exist",
|
|
946
|
+
path)
|
|
947
|
+
assert_block(failure_message) do
|
|
948
|
+
not File.exist?(path)
|
|
949
|
+
end
|
|
950
|
+
end
|
|
951
|
+
end
|
|
952
|
+
|
|
849
953
|
##
|
|
850
954
|
# Builds a failure message. +head+ is added before the +template+ and
|
|
851
955
|
# +arguments+ replaces the '?'s positionally in the template.
|
|
@@ -938,11 +1042,23 @@ EOT
|
|
|
938
1042
|
end
|
|
939
1043
|
|
|
940
1044
|
MAX_DIFF_TARGET_STRING_SIZE = 1000
|
|
1045
|
+
def max_diff_target_string_size
|
|
1046
|
+
size = ENV["TEST_UNIT_MAX_DIFF_TARGET_STRING_SIZE"]
|
|
1047
|
+
if size
|
|
1048
|
+
begin
|
|
1049
|
+
size = Integer(size)
|
|
1050
|
+
rescue ArgumentError
|
|
1051
|
+
size = nil
|
|
1052
|
+
end
|
|
1053
|
+
end
|
|
1054
|
+
size || MAX_DIFF_TARGET_STRING_SIZE
|
|
1055
|
+
end
|
|
1056
|
+
|
|
941
1057
|
def diff_target_string?(string)
|
|
942
1058
|
if string.respond_to?(:bytesize)
|
|
943
|
-
string.bytesize <
|
|
1059
|
+
string.bytesize < max_diff_target_string_size
|
|
944
1060
|
else
|
|
945
|
-
string.size <
|
|
1061
|
+
string.size < max_diff_target_string_size
|
|
946
1062
|
end
|
|
947
1063
|
end
|
|
948
1064
|
|