tableware 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semver +1 -1
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/README.md +15 -1
- data/lib/tableware/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe2cc6c82f8fe22be2e4b99022b4940740da1004
|
4
|
+
data.tar.gz: 53f0ea321bd8189cfc871c55667cd4e345bf6534
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a839b16f79e601270986c600dd7c65a061fb416844856169bb394ac0943a0a31ecb203b83db5c4feab041d2810a94475d462e779842ae8b753e21b095dbdd8a
|
7
|
+
data.tar.gz: e21c5a9eedc2342e7bfc23336becb26224816bb8ab806660dbd76e86ace18bb43472a8bf24510b5f3ad5b857dbce0c5e9bf3f816154cfd0b71cebfeead72f47f
|
data/.semver
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
== v0.2.1 (06 November 2016)
|
2
|
+
|
3
|
+
* Improve examples in the README
|
4
|
+
|
1
5
|
== v0.2.0 (06 November 2016)
|
2
6
|
|
3
|
-
* Allow a single
|
7
|
+
* Allow a single row to be processed by prepending it with a `>` character
|
4
8
|
|
5
9
|
== v0.1.3 (16 August 2016)
|
6
10
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -35,7 +35,9 @@ The downside is that everything is treated as a string, so you may need to do so
|
|
35
35
|
|
36
36
|
This isn't always going to be better than defining your data in another format, but it is another option. Or perhaps you just like Cucumber scenario outlines and want something similar in rspec!
|
37
37
|
|
38
|
-
|
38
|
+
### Focus a single row
|
39
|
+
|
40
|
+
You can focus a single row, to help with debugging, by prepending a line with `>`.
|
39
41
|
For example:
|
40
42
|
|
41
43
|
```ruby
|
@@ -47,6 +49,18 @@ Tableware.arrays(words)
|
|
47
49
|
#=> [ ['Yay', 'Woo'] ]
|
48
50
|
```
|
49
51
|
|
52
|
+
### Focus multiple rows
|
53
|
+
|
54
|
+
Running multiple rows cannot be achieved with prepending `>`. Instead, use [Enum#select](https://ruby-doc.org/core-2.3.1/Enumerable.html#method-i-select) (or `reject`) to decide which lines to process. For the the previous example, you could achieve the same result using select as follows:
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
words = ' Foo | Bar
|
58
|
+
Yay | Woo
|
59
|
+
Zip | Zap '
|
60
|
+
|
61
|
+
Tableware.arrays(words).select{ |row| row.first == 'Yay' }
|
62
|
+
#=> [ ['Yay', 'Woo'] ]
|
63
|
+
```
|
50
64
|
|
51
65
|
This gem has been created as a quick experiment to see if or how often this feature could be useful.
|
52
66
|
If you find it useful, please like it or better yet, extend it!
|
data/lib/tableware/version.rb
CHANGED