everything-piece-find 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +21 -4
- data/lib/everything/piece/find/core_ext.rb +1 -1
- data/lib/everything/piece/find/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: 7dcb7c56558c6f6009079dd21f3252e6f2aa1ccf
|
4
|
+
data.tar.gz: 2287b5a8527b4aa461087145aa6c2b6e37579781
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65d87209dc1fe294759f95f0412fc9092316ef75fe11a09dc4044910293dd0c7933b14d41ab7162a2829e4763521884962827bf960ad307915f0235fcd5f7f31
|
7
|
+
data.tar.gz: 316df3a2b4d0090887508900cc0ab6834c4cfdb479dcd81bf15c7fbc57dfe3c3b8a1d7eff4c81a0a9995aa74c32d167722f61fc65e5d0a90d09a7a6ed000affc
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.5.0
|
4
|
+
|
5
|
+
- Make #find_by_name and #find_by_name_recursive class methods on
|
6
|
+
Everything::Piece, as was intended, instead of them being instance methods.
|
7
|
+
- Update changelog with new usage examples
|
8
|
+
|
3
9
|
## 0.4.0
|
4
10
|
|
5
11
|
- Use more descriptive error messages in #find_by_name
|
data/README.md
CHANGED
@@ -7,9 +7,9 @@
|
|
7
7
|
You'll need [everything-core](https://github.com/kyletolle/everything-core)
|
8
8
|
before you can use this.
|
9
9
|
|
10
|
-
This adds
|
11
|
-
|
12
|
-
|
10
|
+
This adds finder methods to `Everything::Piece`. This allows you to find pieces
|
11
|
+
within your `everything` repo by name, instead of by the full path. Check the
|
12
|
+
Usage section below for details.
|
13
13
|
|
14
14
|
## Installation
|
15
15
|
|
@@ -32,10 +32,27 @@ Or install it yourself as:
|
|
32
32
|
```
|
33
33
|
require 'everything'
|
34
34
|
require 'everything-piece-find'
|
35
|
+
```
|
36
|
+
|
37
|
+
Now you have access to `Everything::Piece.find_by_name` and
|
38
|
+
`Everything::Piece.find_by_name_recursive`. Once you've found the piece, you can
|
39
|
+
use it like normal.
|
35
40
|
|
41
|
+
### #find_by_name
|
42
|
+
|
43
|
+
```
|
36
44
|
piece = Everything::Piece.find_by_name('name-of-your-piece')
|
45
|
+
piece.full_path
|
46
|
+
# => /your/everything/repo/name-of-your-piece
|
47
|
+
```
|
48
|
+
|
49
|
+
### #find_by_name_recursive
|
37
50
|
|
38
|
-
|
51
|
+
```
|
52
|
+
piece_in_nested_sub_folder =
|
53
|
+
Everything::Piece.find_by_name_recursive('another-piece-of-yours')
|
54
|
+
piece_in_nested_sub_folder.full_path
|
55
|
+
# => /your/everything/repo/and/some/sub/folders/another-piece-of-yours
|
39
56
|
```
|
40
57
|
|
41
58
|
## Development
|