iba 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +46 -0
- data/LICENSE +1 -3
- data/README.md +67 -0
- data/lib/iba/version.rb +1 -1
- data/lib/iba.rb +1 -1
- metadata +15 -13
- data/README.rdoc +0 -62
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdfcd93322a8c4127a2de4efcf83856c0c8a8432224ca5e202e17b6a290d9795
|
4
|
+
data.tar.gz: 78badd47ea46837d1189fb2806dcffa8d3c9a5ed957556200d32908071648a03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d66a5c8de935f7afabeadf5aa6f07da23ee6ade4ec99b2c827b46d0a70e92d162dbf08850e6163e36c408f9b90e83c97437ef96f01d24804daf00d50bbab867c
|
7
|
+
data.tar.gz: 72b770be1f2bd34e296ee3b9d7ca3a2e2c170ec3758d465c44f22092d64c2754f328b3ad431d4dd824b03c712d39c24dc818ab4221d269daa20bbe41e9cb7f13
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.0.7 / 2024-01-05
|
4
|
+
|
5
|
+
* Support Ruby 3.0 through 3.3, and JRuby 9.4 ([#63], [#64] and [#68] by [mvz])
|
6
|
+
|
7
|
+
[#63]: https://github.com/mvz/iba/pull/63
|
8
|
+
[#64]: https://github.com/mvz/iba/pull/64
|
9
|
+
[#68]: https://github.com/mvz/iba/pull/68
|
10
|
+
|
11
|
+
## 0.0.6 / 2022-01-21
|
12
|
+
|
13
|
+
* Support Ruby 2.6 and up, as well as JRuby 9.3
|
14
|
+
* Display more subexpressions ([#13] by [mvz])
|
15
|
+
* Add and use VERSION constant ([#49] by [mvz])
|
16
|
+
|
17
|
+
[#13]: https://github.com/mvz/iba/pull/13
|
18
|
+
[#49]: https://github.com/mvz/iba/pull/49
|
19
|
+
|
20
|
+
## 0.0.5 / 2018-03-25
|
21
|
+
|
22
|
+
* Target Ruby 2.2 and up
|
23
|
+
* Remove all use of eval ([#1] by [mvz])
|
24
|
+
|
25
|
+
[mvz]: https://github.com/mvz
|
26
|
+
|
27
|
+
[#1]: https://github.com/mvz/iba/pull/1
|
28
|
+
|
29
|
+
## 0.0.4 / 2017-12-15
|
30
|
+
|
31
|
+
* Target Ruby 2.1 and up
|
32
|
+
|
33
|
+
## 0.0.3 / 2014-05-09
|
34
|
+
|
35
|
+
* Make Iba work with Ruby 1.9
|
36
|
+
|
37
|
+
## 0.0.2 / 2011-02-25
|
38
|
+
|
39
|
+
* Properly analyse comparison with arrays and strings
|
40
|
+
* Allow instance variables in asserted expression
|
41
|
+
|
42
|
+
## 0.0.1 / 2011-01-02
|
43
|
+
|
44
|
+
* Initial release
|
45
|
+
|
46
|
+
No match for: Prepare version 0.0.7 for release
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2010--2011 Matijs van Zuijlen
|
1
|
+
Copyright (c) 2010--2011, 2014-2024 Matijs van Zuijlen
|
2
2
|
|
3
3
|
Iba is free software; you can redistribute it and/or modify it under the
|
4
4
|
terms of the GNU Lesser General Public License as published by the Free Software
|
@@ -12,5 +12,3 @@ more details.
|
|
12
12
|
|
13
13
|
You should have received a copy of the GNU Lesser General Public License
|
14
14
|
along with this library. If not, see <http://www.gnu.org/licenses/>.
|
15
|
-
|
16
|
-
|
data/README.md
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Iba
|
2
|
+
|
3
|
+
by Matijs van Zuijlen
|
4
|
+
|
5
|
+
## Description
|
6
|
+
|
7
|
+
Introspective Block Assertions
|
8
|
+
|
9
|
+
## Features/Problems
|
10
|
+
|
11
|
+
* Write assertions as a (one-expression) block
|
12
|
+
* Assertion message deconstructs the block's expression.
|
13
|
+
* Not done yet.
|
14
|
+
|
15
|
+
## Synopsis
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
# In your test helper:
|
19
|
+
require 'iba'
|
20
|
+
class Test::Unit::TestCase
|
21
|
+
include Iba::BlockAssertion
|
22
|
+
end
|
23
|
+
|
24
|
+
# In your test:
|
25
|
+
foo = 24
|
26
|
+
assert { foo == 23 } # => "(foo == 23) is false
|
27
|
+
# foo is 24."
|
28
|
+
```
|
29
|
+
|
30
|
+
## Details
|
31
|
+
|
32
|
+
Iba provides an assert method that takes a block. If the block returns
|
33
|
+
false, it will try to construct an insightful error message based on the
|
34
|
+
contents of the block.
|
35
|
+
|
36
|
+
Iba's functionality is inspired by [Wrong], but doesn't use an external
|
37
|
+
Ruby parser. This means it will work in contexts where Wrong does not
|
38
|
+
(generated code, on the command line). It also means there are more limits
|
39
|
+
to the contents of the block.
|
40
|
+
|
41
|
+
Current limits:
|
42
|
+
|
43
|
+
* Only single-expression blocks are supported.
|
44
|
+
* The expression must start with a method-like identifier or an instance
|
45
|
+
variable (like `foo` or `@foo`, but not `Foo` or `23`). In practice,
|
46
|
+
this produces quite natural results.
|
47
|
+
* Local and instance variables whose names start with an underscore should
|
48
|
+
not be used inside the block.
|
49
|
+
|
50
|
+
Iba's implementation is inspired by [Arlo], a generic combinator library
|
51
|
+
for Python. The implementation of Arlo is now [on github][arlo-code].
|
52
|
+
|
53
|
+
## Install
|
54
|
+
|
55
|
+
```
|
56
|
+
gem install iba
|
57
|
+
```
|
58
|
+
|
59
|
+
<!-- Links -->
|
60
|
+
|
61
|
+
[Wrong]: https://github.com/sconover/wrong
|
62
|
+
[Arlo]: https://web.archive.org/web/20081228090759/http://withoutane.com:80/rants/2008/12/arlo-generic-combinators-for-python
|
63
|
+
[arlo-code]: https://github.com/tangentstorm/workshop/blob/main/code/arlo.py
|
64
|
+
|
65
|
+
## Licence
|
66
|
+
|
67
|
+
See the LICENSE file
|
data/lib/iba/version.rb
CHANGED
data/lib/iba.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matijs van Zuijlen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -44,42 +44,42 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: '1.52'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: '1.52'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rubocop-packaging
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.5.
|
61
|
+
version: 0.5.2
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.5.
|
68
|
+
version: 0.5.2
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubocop-performance
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: '1.18'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
82
|
+
version: '1.18'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: test-unit
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,13 +102,14 @@ email:
|
|
102
102
|
executables: []
|
103
103
|
extensions: []
|
104
104
|
extra_rdoc_files:
|
105
|
-
- README.
|
105
|
+
- README.md
|
106
106
|
- LICENSE
|
107
107
|
- COPYING.LESSER
|
108
108
|
files:
|
109
|
+
- CHANGELOG.md
|
109
110
|
- COPYING.LESSER
|
110
111
|
- LICENSE
|
111
|
-
- README.
|
112
|
+
- README.md
|
112
113
|
- lib/iba.rb
|
113
114
|
- lib/iba/version.rb
|
114
115
|
homepage: http://www.github.com/mvz/iba
|
@@ -117,25 +118,26 @@ licenses:
|
|
117
118
|
metadata:
|
118
119
|
homepage_uri: http://www.github.com/mvz/iba
|
119
120
|
source_code_uri: https://github.com/mvz/iba
|
121
|
+
changelog_uri: https://github.com/mvz/iba/blob/master/CHANGELOG.md
|
120
122
|
rubygems_mfa_required: 'true'
|
121
123
|
post_install_message:
|
122
124
|
rdoc_options:
|
123
125
|
- "--main"
|
124
|
-
- README.
|
126
|
+
- README.md
|
125
127
|
require_paths:
|
126
128
|
- lib
|
127
129
|
required_ruby_version: !ruby/object:Gem::Requirement
|
128
130
|
requirements:
|
129
131
|
- - ">="
|
130
132
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
133
|
+
version: 3.0.0
|
132
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
135
|
requirements:
|
134
136
|
- - ">="
|
135
137
|
- !ruby/object:Gem::Version
|
136
138
|
version: '0'
|
137
139
|
requirements: []
|
138
|
-
rubygems_version: 3.
|
140
|
+
rubygems_version: 3.5.3
|
139
141
|
signing_key:
|
140
142
|
specification_version: 4
|
141
143
|
summary: Introspective Block Assertions
|
data/README.rdoc
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
= Iba
|
2
|
-
|
3
|
-
by Matijs van Zuijlen
|
4
|
-
|
5
|
-
== Description
|
6
|
-
|
7
|
-
Introspective Block Assertions
|
8
|
-
|
9
|
-
== Features/Problems
|
10
|
-
|
11
|
-
* Write assertions as a (one-expression) block
|
12
|
-
* Assertion message deconstructs the block's expression.
|
13
|
-
* Not done yet.
|
14
|
-
|
15
|
-
== Synopsis
|
16
|
-
|
17
|
-
# In your test helper:
|
18
|
-
require 'iba'
|
19
|
-
class Test::Unit::TestCase
|
20
|
-
include Iba::BlockAssertion
|
21
|
-
end
|
22
|
-
|
23
|
-
# In your test:
|
24
|
-
foo = 24
|
25
|
-
assert { foo == 23 } # => "(foo == 23) is false
|
26
|
-
# foo is 24."
|
27
|
-
|
28
|
-
== Details
|
29
|
-
|
30
|
-
Iba provides an assert method that takes a block. If the block returns
|
31
|
-
false, it will try to construct an insightful error message based on the
|
32
|
-
contents of the block.
|
33
|
-
|
34
|
-
Iba's functionality is inspired by Wrong[1], but doesn't use an external
|
35
|
-
Ruby parser. This means it will work in contexts where Wrong does not
|
36
|
-
(generated code, on the command line). It also means there are more limits
|
37
|
-
to the contents of the block.
|
38
|
-
|
39
|
-
Current limits:
|
40
|
-
|
41
|
-
* Only single-expression blocks are supported.
|
42
|
-
* The expression must start with a method-like identifier or an instance
|
43
|
-
variable (like 'foo' or '@foo', but not 'Foo' or '23'). In practice,
|
44
|
-
this produces quite natural results.
|
45
|
-
* Local and instance variables whose names start with an underscore should
|
46
|
-
not be used inside the block.
|
47
|
-
|
48
|
-
Iba's implementation is inspired by Arlo[2], a generic combinator library
|
49
|
-
for Python.
|
50
|
-
|
51
|
-
== Install
|
52
|
-
|
53
|
-
gem install iba
|
54
|
-
|
55
|
-
== Links
|
56
|
-
|
57
|
-
[1] https://github.com/sconover/wrong
|
58
|
-
[2] http://withoutane.com/rants/2008/12/arlo-generic-combinators-for-python
|
59
|
-
|
60
|
-
== Licence
|
61
|
-
|
62
|
-
See the LICENSE file.
|