assay 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/.ruby +46 -41
  2. data/COPYING.rdoc +38 -0
  3. data/HISTORY.rdoc +18 -1
  4. data/QED.rdoc +1100 -0
  5. data/README.rdoc +139 -16
  6. data/lib/assay.rb +82 -29
  7. data/lib/assay.yml +46 -41
  8. data/lib/assay/{adapters → adapter}/minitest.rb +0 -0
  9. data/lib/assay/{adapters → adapter}/testunit.rb +0 -0
  10. data/lib/assay/assertable.rb +174 -0
  11. data/lib/assay/assertion.rb +98 -124
  12. data/lib/assay/assertor.rb +187 -0
  13. data/lib/assay/boolean_assay.rb +15 -0
  14. data/lib/assay/case_assay.rb +17 -0
  15. data/lib/assay/compare_assay.rb +38 -0
  16. data/lib/assay/core_ext/kernel.rb +52 -0
  17. data/lib/assay/core_ext/na.rb +9 -0
  18. data/lib/assay/directory_assay.rb +20 -0
  19. data/lib/assay/empty_assay.rb +17 -0
  20. data/lib/assay/equal_assay.rb +35 -0
  21. data/lib/assay/equality_assay.rb +18 -0
  22. data/lib/assay/execution_assay.rb +59 -0
  23. data/lib/assay/false_assay.rb +17 -0
  24. data/lib/assay/file_assay.rb +17 -0
  25. data/lib/assay/identity_assay.rb +49 -0
  26. data/lib/assay/include_assay.rb +17 -0
  27. data/lib/assay/instance_assay.rb +17 -0
  28. data/lib/assay/kind_assay.rb +18 -0
  29. data/lib/assay/less_assay.rb +18 -0
  30. data/lib/assay/less_equal_assay.rb +25 -0
  31. data/lib/assay/like_assay.rb +17 -0
  32. data/lib/assay/match_assay.rb +17 -0
  33. data/lib/assay/more_assay.rb +18 -0
  34. data/lib/assay/more_equal_assay.rb +25 -0
  35. data/lib/assay/nil_assay.rb +15 -0
  36. data/lib/assay/nomatch_assay.rb +17 -0
  37. data/lib/assay/output_assay.rb +35 -0
  38. data/lib/assay/path_assay.rb +17 -0
  39. data/lib/assay/raise_assay.rb +109 -0
  40. data/lib/assay/rescue_assay.rb +55 -0
  41. data/lib/assay/respond_assay.rb +17 -0
  42. data/lib/assay/return_assay.rb +46 -0
  43. data/lib/assay/silent_assay.rb +59 -0
  44. data/lib/assay/stderr_assay.rb +30 -0
  45. data/lib/assay/stdout_assay.rb +30 -0
  46. data/lib/assay/throw_assay.rb +89 -0
  47. data/lib/assay/true_assay.rb +20 -0
  48. data/lib/assay/unequal_assay.rb +37 -0
  49. data/lib/assay/within_assay.rb +39 -0
  50. data/test/case_compare_assay.rb +59 -0
  51. data/test/case_empty_assay.rb +51 -0
  52. data/test/case_equal_assay.rb +53 -0
  53. data/test/case_equality_assay.rb +55 -0
  54. data/test/case_false_assay.rb +48 -0
  55. data/test/case_identity_assay.rb +51 -0
  56. data/test/case_include_assay.rb +51 -0
  57. data/test/case_instance_assay.rb +51 -0
  58. data/test/case_kind_assay.rb +51 -0
  59. data/test/case_less_assay.rb +53 -0
  60. data/test/case_less_equal_assay.rb +53 -0
  61. data/test/case_like_assay.rb +57 -0
  62. data/test/case_match_assay.rb +45 -0
  63. data/test/case_more_assay.rb +53 -0
  64. data/test/case_more_equal_assay.rb +53 -0
  65. data/test/case_nil_assay.rb +48 -0
  66. data/test/case_nomatch_assay.rb +47 -0
  67. data/test/case_raise_assay.rb +51 -0
  68. data/test/case_respond_assay.rb +51 -0
  69. data/test/case_throw_assay.rb +51 -0
  70. data/test/case_true_assay.rb +48 -0
  71. data/test/case_unequal_assay.rb +55 -0
  72. data/test/case_within_assay.rb +61 -0
  73. data/test/helper.rb +36 -0
  74. metadata +135 -108
  75. data/APACHE2.txt +0 -205
  76. data/NOTICE.rdoc +0 -18
  77. data/lib/assay/assertions/compare_failure.rb +0 -61
  78. data/lib/assay/assertions/delta_failure.rb +0 -80
  79. data/lib/assay/assertions/empty_failure.rb +0 -76
  80. data/lib/assay/assertions/equality_failure.rb +0 -100
  81. data/lib/assay/assertions/execution_failure.rb +0 -90
  82. data/lib/assay/assertions/false_failure.rb +0 -72
  83. data/lib/assay/assertions/identity_failure.rb +0 -85
  84. data/lib/assay/assertions/instance_failure.rb +0 -76
  85. data/lib/assay/assertions/kind_failure.rb +0 -80
  86. data/lib/assay/assertions/match_failure.rb +0 -85
  87. data/lib/assay/assertions/nil_failure.rb +0 -75
  88. data/lib/assay/assertions/raise_failure.rb +0 -134
  89. data/lib/assay/assertions/response_failure.rb +0 -86
  90. data/lib/assay/assertions/same_failure.rb +0 -82
  91. data/lib/assay/assertions/throw_failure.rb +0 -122
  92. data/lib/assay/assertions/true_failure.rb +0 -79
  93. data/lib/assay/matcher.rb +0 -48
  94. data/qed/01_failure_classes.rdoc +0 -75
  95. data/qed/02_assertives.rdoc +0 -118
  96. data/qed/03_matchers.rdoc +0 -118
  97. data/qed/04_lookup.rdoc +0 -10
@@ -0,0 +1,61 @@
1
+ covers 'assay/within_assay'
2
+
3
+ testcase WithinAssay do
4
+
5
+ class_method :pass? do
6
+
7
+ test do
8
+ assert WithinAssay.pass?(1, 1, 0)
9
+ assert WithinAssay.pass?(1, 1.1, 0.1)
10
+ assert WithinAssay.pass?(1.0, 1.2, 0.2)
11
+
12
+ refute WithinAssay.pass?(1, 2, 0.5)
13
+ refute WithinAssay.pass?(1.0, 2, 0.5)
14
+ refute WithinAssay.pass?(1.0, 2.0, 0.5)
15
+ end
16
+
17
+ end
18
+
19
+ class_method :fail? do
20
+
21
+ test do
22
+ refute WithinAssay.fail?(1, 1, 0)
23
+ refute WithinAssay.fail?(1, 1.1, 0.1)
24
+ refute WithinAssay.fail?(1.0, 1.2, 0.2)
25
+
26
+ assert WithinAssay.fail?(1, 2, 0.5)
27
+ assert WithinAssay.fail?(1.0, 2, 0.5)
28
+ assert WithinAssay.fail?(1.0, 2.0, 0.5)
29
+ end
30
+
31
+ end
32
+
33
+ class_method :assert! do
34
+
35
+ test do
36
+ WithinAssay.assert!(1, 1.1, 0.1)
37
+ end
38
+
39
+ test do
40
+ expect WithinAssay do
41
+ WithinAssay.assert!(1, 1.2, 0.1)
42
+ end
43
+ end
44
+
45
+ end
46
+
47
+ class_method :refute! do
48
+
49
+ test do
50
+ WithinAssay.refute!(1, 2, 0.1)
51
+ end
52
+
53
+ test do
54
+ expect WithinAssay do
55
+ WithinAssay.refute!(1, 1.1, 0.1)
56
+ end
57
+ end
58
+
59
+ end
60
+
61
+ end
@@ -0,0 +1,36 @@
1
+ require 'lemon'
2
+
3
+ # Simple helper assertion method.
4
+ def assert(truth, msg=nil, trace=nil)
5
+ if truth
6
+ increment_counts(:pass)
7
+ else
8
+ increment_counts(:fail)
9
+ raise Assertion, msg || "assert failed", trace || caller
10
+ end
11
+ end
12
+
13
+ def refute(truth)
14
+ assert(!truth, "refute failed", caller)
15
+ end
16
+
17
+ def expect(error)
18
+ begin
19
+ yield
20
+ increment_counts(:fail)
21
+ raise Assertion, "#{error} not raised.", caller
22
+ rescue error
23
+ increment_counts(:pass)
24
+ end
25
+ end
26
+
27
+ def increment_counts(which)
28
+ case which
29
+ when :pass
30
+ $ASSERTION_COUNTS[:pass] += 1
31
+ when :fail
32
+ $ASSERTION_COUNTS[:fail] += 1
33
+ end
34
+ $ASSERTION_COUNTS[:total] += 1
35
+ end
36
+
metadata CHANGED
@@ -1,143 +1,170 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: assay
3
- version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 3
9
- - 0
10
- version: 0.3.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.0
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Thomas Sawyer
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-05-07 00:00:00 -04:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-01-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: ansi
16
+ requirement: &18939580 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
23
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
24
+ version_requirements: *18939580
25
+ - !ruby/object:Gem::Dependency
26
+ name: brass
27
+ requirement: &18936100 !ruby/object:Gem::Requirement
25
28
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 21
30
- segments:
31
- - 1
32
- - 2
33
- - 5
34
- version: 1.2.5
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
35
33
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: redline
39
34
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
35
+ version_requirements: *18936100
36
+ - !ruby/object:Gem::Dependency
37
+ name: detroit
38
+ requirement: &19011100 !ruby/object:Gem::Requirement
41
39
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 0
48
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
49
44
  type: :development
50
- version_requirements: *id002
51
- - !ruby/object:Gem::Dependency
52
- name: qed
53
45
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
46
+ version_requirements: *19011100
47
+ - !ruby/object:Gem::Dependency
48
+ name: qed
49
+ requirement: &19008540 !ruby/object:Gem::Requirement
55
50
  none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
63
55
  type: :development
64
- version_requirements: *id003
65
- description: The Assay project defines Assertions in the same way that Ruby defines Exceptions. An asserition then simply becomes an extension to an Exception class.
66
- email: transfire@gmail.com
67
- executables: []
56
+ prerelease: false
57
+ version_requirements: *19008540
58
+ description: ! 'The Assay project defines Assertions in the same way that Ruby defines
59
+ Exceptions.
68
60
 
61
+ An asserition then simply becomes an extension to an Exception class.'
62
+ email:
63
+ - transfire@gmail.com
64
+ executables: []
69
65
  extensions: []
70
-
71
- extra_rdoc_files:
66
+ extra_rdoc_files:
67
+ - HISTORY.rdoc
72
68
  - README.rdoc
73
- files:
69
+ - QED.rdoc
70
+ - COPYING.rdoc
71
+ files:
74
72
  - .ruby
75
- - qed/01_failure_classes.rdoc
76
- - qed/02_assertives.rdoc
77
- - qed/03_matchers.rdoc
78
- - qed/04_lookup.rdoc
79
- - lib/assay/adapters/minitest.rb
80
- - lib/assay/adapters/testunit.rb
73
+ - lib/assay/adapter/minitest.rb
74
+ - lib/assay/adapter/testunit.rb
75
+ - lib/assay/assertable.rb
81
76
  - lib/assay/assertion.rb
82
- - lib/assay/assertions/compare_failure.rb
83
- - lib/assay/assertions/delta_failure.rb
84
- - lib/assay/assertions/empty_failure.rb
85
- - lib/assay/assertions/equality_failure.rb
86
- - lib/assay/assertions/execution_failure.rb
87
- - lib/assay/assertions/false_failure.rb
88
- - lib/assay/assertions/identity_failure.rb
89
- - lib/assay/assertions/instance_failure.rb
90
- - lib/assay/assertions/kind_failure.rb
91
- - lib/assay/assertions/match_failure.rb
92
- - lib/assay/assertions/nil_failure.rb
93
- - lib/assay/assertions/raise_failure.rb
94
- - lib/assay/assertions/response_failure.rb
95
- - lib/assay/assertions/same_failure.rb
96
- - lib/assay/assertions/throw_failure.rb
97
- - lib/assay/assertions/true_failure.rb
98
- - lib/assay/matcher.rb
77
+ - lib/assay/assertor.rb
78
+ - lib/assay/boolean_assay.rb
79
+ - lib/assay/case_assay.rb
80
+ - lib/assay/compare_assay.rb
81
+ - lib/assay/core_ext/kernel.rb
82
+ - lib/assay/core_ext/na.rb
83
+ - lib/assay/directory_assay.rb
84
+ - lib/assay/empty_assay.rb
85
+ - lib/assay/equal_assay.rb
86
+ - lib/assay/equality_assay.rb
87
+ - lib/assay/execution_assay.rb
88
+ - lib/assay/false_assay.rb
89
+ - lib/assay/file_assay.rb
90
+ - lib/assay/identity_assay.rb
91
+ - lib/assay/include_assay.rb
92
+ - lib/assay/instance_assay.rb
93
+ - lib/assay/kind_assay.rb
94
+ - lib/assay/less_assay.rb
95
+ - lib/assay/less_equal_assay.rb
96
+ - lib/assay/like_assay.rb
97
+ - lib/assay/match_assay.rb
98
+ - lib/assay/more_assay.rb
99
+ - lib/assay/more_equal_assay.rb
100
+ - lib/assay/nil_assay.rb
101
+ - lib/assay/nomatch_assay.rb
102
+ - lib/assay/output_assay.rb
103
+ - lib/assay/path_assay.rb
104
+ - lib/assay/raise_assay.rb
105
+ - lib/assay/rescue_assay.rb
106
+ - lib/assay/respond_assay.rb
107
+ - lib/assay/return_assay.rb
108
+ - lib/assay/silent_assay.rb
109
+ - lib/assay/stderr_assay.rb
110
+ - lib/assay/stdout_assay.rb
111
+ - lib/assay/throw_assay.rb
112
+ - lib/assay/true_assay.rb
113
+ - lib/assay/unequal_assay.rb
114
+ - lib/assay/within_assay.rb
99
115
  - lib/assay.rb
100
116
  - lib/assay.yml
117
+ - test/case_compare_assay.rb
118
+ - test/case_empty_assay.rb
119
+ - test/case_equal_assay.rb
120
+ - test/case_equality_assay.rb
121
+ - test/case_false_assay.rb
122
+ - test/case_identity_assay.rb
123
+ - test/case_include_assay.rb
124
+ - test/case_instance_assay.rb
125
+ - test/case_kind_assay.rb
126
+ - test/case_less_assay.rb
127
+ - test/case_less_equal_assay.rb
128
+ - test/case_like_assay.rb
129
+ - test/case_match_assay.rb
130
+ - test/case_more_assay.rb
131
+ - test/case_more_equal_assay.rb
132
+ - test/case_nil_assay.rb
133
+ - test/case_nomatch_assay.rb
134
+ - test/case_raise_assay.rb
135
+ - test/case_respond_assay.rb
136
+ - test/case_throw_assay.rb
137
+ - test/case_true_assay.rb
138
+ - test/case_unequal_assay.rb
139
+ - test/case_within_assay.rb
140
+ - test/helper.rb
101
141
  - HISTORY.rdoc
102
- - APACHE2.txt
103
142
  - README.rdoc
104
- - NOTICE.rdoc
105
- has_rdoc: true
143
+ - QED.rdoc
144
+ - COPYING.rdoc
106
145
  homepage: http://rubydoc.info/gems/assay
107
- licenses:
108
- - Apache 2.0
146
+ licenses:
147
+ - BSD-2-Clause
109
148
  post_install_message:
110
- rdoc_options:
111
- - --title
112
- - Assay API
113
- - --main
114
- - README.rdoc
115
- require_paths:
149
+ rdoc_options: []
150
+ require_paths:
116
151
  - lib
117
- required_ruby_version: !ruby/object:Gem::Requirement
152
+ required_ruby_version: !ruby/object:Gem::Requirement
118
153
  none: false
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- hash: 3
123
- segments:
124
- - 0
125
- version: "0"
126
- required_rubygems_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
127
159
  none: false
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- hash: 3
132
- segments:
133
- - 0
134
- version: "0"
160
+ requirements:
161
+ - - ! '>='
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
135
164
  requirements: []
136
-
137
- rubyforge_project: assay
138
- rubygems_version: 1.3.7
165
+ rubyforge_project:
166
+ rubygems_version: 1.8.10
139
167
  signing_key:
140
168
  specification_version: 3
141
169
  summary: Class-based Assertions Framework
142
170
  test_files: []
143
-
@@ -1,205 +0,0 @@
1
- .
2
-
3
- Apache License
4
- Version 2.0, January 2004
5
- http://www.apache.org/licenses/
6
-
7
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
-
9
- 1. Definitions.
10
-
11
- "License" shall mean the terms and conditions for use, reproduction,
12
- and distribution as defined by Sections 1 through 9 of this document.
13
-
14
- "Licensor" shall mean the copyright owner or entity authorized by
15
- the copyright owner that is granting the License.
16
-
17
- "Legal Entity" shall mean the union of the acting entity and all
18
- other entities that control, are controlled by, or are under common
19
- control with that entity. For the purposes of this definition,
20
- "control" means (i) the power, direct or indirect, to cause the
21
- direction or management of such entity, whether by contract or
22
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
- outstanding shares, or (iii) beneficial ownership of such entity.
24
-
25
- "You" (or "Your") shall mean an individual or Legal Entity
26
- exercising permissions granted by this License.
27
-
28
- "Source" form shall mean the preferred form for making modifications,
29
- including but not limited to software source code, documentation
30
- source, and configuration files.
31
-
32
- "Object" form shall mean any form resulting from mechanical
33
- transformation or translation of a Source form, including but
34
- not limited to compiled object code, generated documentation,
35
- and conversions to other media types.
36
-
37
- "Work" shall mean the work of authorship, whether in Source or
38
- Object form, made available under the License, as indicated by a
39
- copyright notice that is included in or attached to the work
40
- (an example is provided in the Appendix below).
41
-
42
- "Derivative Works" shall mean any work, whether in Source or Object
43
- form, that is based on (or derived from) the Work and for which the
44
- editorial revisions, annotations, elaborations, or other modifications
45
- represent, as a whole, an original work of authorship. For the purposes
46
- of this License, Derivative Works shall not include works that remain
47
- separable from, or merely link (or bind by name) to the interfaces of,
48
- the Work and Derivative Works thereof.
49
-
50
- "Contribution" shall mean any work of authorship, including
51
- the original version of the Work and any modifications or additions
52
- to that Work or Derivative Works thereof, that is intentionally
53
- submitted to Licensor for inclusion in the Work by the copyright owner
54
- or by an individual or Legal Entity authorized to submit on behalf of
55
- the copyright owner. For the purposes of this definition, "submitted"
56
- means any form of electronic, verbal, or written communication sent
57
- to the Licensor or its representatives, including but not limited to
58
- communication on electronic mailing lists, source code control systems,
59
- and issue tracking systems that are managed by, or on behalf of, the
60
- Licensor for the purpose of discussing and improving the Work, but
61
- excluding communication that is conspicuously marked or otherwise
62
- designated in writing by the copyright owner as "Not a Contribution."
63
-
64
- "Contributor" shall mean Licensor and any individual or Legal Entity
65
- on behalf of whom a Contribution has been received by Licensor and
66
- subsequently incorporated within the Work.
67
-
68
- 2. Grant of Copyright License. Subject to the terms and conditions of
69
- this License, each Contributor hereby grants to You a perpetual,
70
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
- copyright license to reproduce, prepare Derivative Works of,
72
- publicly display, publicly perform, sublicense, and distribute the
73
- Work and such Derivative Works in Source or Object form.
74
-
75
- 3. Grant of Patent License. Subject to the terms and conditions of
76
- this License, each Contributor hereby grants to You a perpetual,
77
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
- (except as stated in this section) patent license to make, have made,
79
- use, offer to sell, sell, import, and otherwise transfer the Work,
80
- where such license applies only to those patent claims licensable
81
- by such Contributor that are necessarily infringed by their
82
- Contribution(s) alone or by combination of their Contribution(s)
83
- with the Work to which such Contribution(s) was submitted. If You
84
- institute patent litigation against any entity (including a
85
- cross-claim or counterclaim in a lawsuit) alleging that the Work
86
- or a Contribution incorporated within the Work constitutes direct
87
- or contributory patent infringement, then any patent licenses
88
- granted to You under this License for that Work shall terminate
89
- as of the date such litigation is filed.
90
-
91
- 4. Redistribution. You may reproduce and distribute copies of the
92
- Work or Derivative Works thereof in any medium, with or without
93
- modifications, and in Source or Object form, provided that You
94
- meet the following conditions:
95
-
96
- (a) You must give any other recipients of the Work or
97
- Derivative Works a copy of this License; and
98
-
99
- (b) You must cause any modified files to carry prominent notices
100
- stating that You changed the files; and
101
-
102
- (c) You must retain, in the Source form of any Derivative Works
103
- that You distribute, all copyright, patent, trademark, and
104
- attribution notices from the Source form of the Work,
105
- excluding those notices that do not pertain to any part of
106
- the Derivative Works; and
107
-
108
- (d) If the Work includes a "NOTICE" text file as part of its
109
- distribution, then any Derivative Works that You distribute must
110
- include a readable copy of the attribution notices contained
111
- within such NOTICE file, excluding those notices that do not
112
- pertain to any part of the Derivative Works, in at least one
113
- of the following places: within a NOTICE text file distributed
114
- as part of the Derivative Works; within the Source form or
115
- documentation, if provided along with the Derivative Works; or,
116
- within a display generated by the Derivative Works, if and
117
- wherever such third-party notices normally appear. The contents
118
- of the NOTICE file are for informational purposes only and
119
- do not modify the License. You may add Your own attribution
120
- notices within Derivative Works that You distribute, alongside
121
- or as an addendum to the NOTICE text from the Work, provided
122
- that such additional attribution notices cannot be construed
123
- as modifying the License.
124
-
125
- You may add Your own copyright statement to Your modifications and
126
- may provide additional or different license terms and conditions
127
- for use, reproduction, or distribution of Your modifications, or
128
- for any such Derivative Works as a whole, provided Your use,
129
- reproduction, and distribution of the Work otherwise complies with
130
- the conditions stated in this License.
131
-
132
- 5. Submission of Contributions. Unless You explicitly state otherwise,
133
- any Contribution intentionally submitted for inclusion in the Work
134
- by You to the Licensor shall be under the terms and conditions of
135
- this License, without any additional terms or conditions.
136
- Notwithstanding the above, nothing herein shall supersede or modify
137
- the terms of any separate license agreement you may have executed
138
- with Licensor regarding such Contributions.
139
-
140
- 6. Trademarks. This License does not grant permission to use the trade
141
- names, trademarks, service marks, or product names of the Licensor,
142
- except as required for reasonable and customary use in describing the
143
- origin of the Work and reproducing the content of the NOTICE file.
144
-
145
- 7. Disclaimer of Warranty. Unless required by applicable law or
146
- agreed to in writing, Licensor provides the Work (and each
147
- Contributor provides its Contributions) on an "AS IS" BASIS,
148
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
- implied, including, without limitation, any warranties or conditions
150
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
- PARTICULAR PURPOSE. You are solely responsible for determining the
152
- appropriateness of using or redistributing the Work and assume any
153
- risks associated with Your exercise of permissions under this License.
154
-
155
- 8. Limitation of Liability. In no event and under no legal theory,
156
- whether in tort (including negligence), contract, or otherwise,
157
- unless required by applicable law (such as deliberate and grossly
158
- negligent acts) or agreed to in writing, shall any Contributor be
159
- liable to You for damages, including any direct, indirect, special,
160
- incidental, or consequential damages of any character arising as a
161
- result of this License or out of the use or inability to use the
162
- Work (including but not limited to damages for loss of goodwill,
163
- work stoppage, computer failure or malfunction, or any and all
164
- other commercial damages or losses), even if such Contributor
165
- has been advised of the possibility of such damages.
166
-
167
- 9. Accepting Warranty or Additional Liability. While redistributing
168
- the Work or Derivative Works thereof, You may choose to offer,
169
- and charge a fee for, acceptance of support, warranty, indemnity,
170
- or other liability obligations and/or rights consistent with this
171
- License. However, in accepting such obligations, You may act only
172
- on Your own behalf and on Your sole responsibility, not on behalf
173
- of any other Contributor, and only if You agree to indemnify,
174
- defend, and hold each Contributor harmless for any liability
175
- incurred by, or claims asserted against, such Contributor by reason
176
- of your accepting any such warranty or additional liability.
177
-
178
- END OF TERMS AND CONDITIONS
179
-
180
- APPENDIX: How to apply the Apache License to your work.
181
-
182
- To apply the Apache License to your work, attach the following
183
- boilerplate notice, with the fields enclosed by brackets "[]"
184
- replaced with your own identifying information. (Don't include
185
- the brackets!) The text should be enclosed in the appropriate
186
- comment syntax for the file format. We also recommend that a
187
- file or class name and description of purpose be included on the
188
- same "printed page" as the copyright notice for easier
189
- identification within third-party archives.
190
-
191
- Copyright [yyyy] [name of copyright owner]
192
-
193
- Licensed under the Apache License, Version 2.0 (the "License");
194
- you may not use this file except in compliance with the License.
195
- You may obtain a copy of the License at
196
-
197
- http://www.apache.org/licenses/LICENSE-2.0
198
-
199
- Unless required by applicable law or agreed to in writing, software
200
- distributed under the License is distributed on an "AS IS" BASIS,
201
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
- See the License for the specific language governing permissions and
203
- limitations under the License.
204
-
205
- .