everything-piece-find 0.0.1 → 0.1.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +8 -3
- data/lib/everything/piece/find/version.rb +1 -1
- data/lib/everything/piece/find.rb +2 -6
- metadata +4 -3
- /data/{LICENSE.txt → LICENSE} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2003caf53ab8952a2576cc650969bd6a1d10560a
|
4
|
+
data.tar.gz: 037a3bdc7b12efd2d4b45dfce8abd0c547675031
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64e67d828609dab72db53fc7b6ed9dde18bc1283303b7c5c5cd86ad8c68f9fcd0d98c7132ec476e6de03b4c27af650f29d969e34550ee15eab0d018e6e1eea3f
|
7
|
+
data.tar.gz: 8ed98e18dfdab516062f812d8a2769231b433d9592087755805a651ee115a7447c1b5a55b74f8cea356e8da0c9e4c34c7bfecf7e1a7f6717081838bd3df29c9e
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,10 +1,15 @@
|
|
1
1
|
# Everything::Piece::Find
|
2
|
+
[](http://badge.fury.io/rb/everything-piece-find)
|
3
|
+
[](https://travis-ci.org/kyletolle/everything-piece-find)
|
4
|
+
[](https://codeclimate.com/github/kyletolle/everything-piece-find)
|
5
|
+
[](https://gemnasium.com/kyletolle/everything-piece-find)
|
2
6
|
|
3
7
|
You'll need [everything-core](https://github.com/kyletolle/everything-core)
|
4
8
|
before you can use this.
|
5
9
|
|
6
|
-
This adds a
|
7
|
-
within your everything repo by name.
|
10
|
+
This adds a `#find_by_name` to `Everything::Piece`. This allows you to find a
|
11
|
+
piece within your `everything` repo by name, instead of by the full path. This
|
12
|
+
only works for pieces at the root of your everything repo.
|
8
13
|
|
9
14
|
## Installation
|
10
15
|
|
@@ -28,7 +33,7 @@ Or install it yourself as:
|
|
28
33
|
require 'everything'
|
29
34
|
require 'everything-piece-find'
|
30
35
|
|
31
|
-
piece = Everything::Piece.
|
36
|
+
piece = Everything::Piece.find_by_name('name-of-your-piece')
|
32
37
|
|
33
38
|
# Now you can use the piece as you normally would.
|
34
39
|
```
|
@@ -4,14 +4,10 @@ require 'everything/piece/find/version'
|
|
4
4
|
module Everything
|
5
5
|
class Piece
|
6
6
|
module Find
|
7
|
-
def
|
8
|
-
piece_path =
|
7
|
+
def find_by_name(piece_name)
|
8
|
+
piece_path = File.join(Everything.path, piece_name)
|
9
9
|
Piece.new(piece_path)
|
10
10
|
end
|
11
|
-
|
12
|
-
def find_path_for_piece_name(piece_name)
|
13
|
-
File.join(Everything.path, piece_name)
|
14
|
-
end
|
15
11
|
end
|
16
12
|
end
|
17
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: everything-piece-find
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Tolle
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: everything-core
|
@@ -76,9 +76,10 @@ files:
|
|
76
76
|
- ".gitignore"
|
77
77
|
- ".rspec"
|
78
78
|
- ".travis.yml"
|
79
|
+
- CHANGELOG.md
|
79
80
|
- CODE_OF_CONDUCT.md
|
80
81
|
- Gemfile
|
81
|
-
- LICENSE
|
82
|
+
- LICENSE
|
82
83
|
- README.md
|
83
84
|
- Rakefile
|
84
85
|
- bin/console
|
/data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|