tty-which 0.2.0 → 0.2.1
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/.travis.yml +8 -8
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -0
- data/README.md +3 -1
- data/appveyor.yml +23 -0
- data/lib/tty/which.rb +1 -1
- data/lib/tty/which/version.rb +1 -1
- data/spec/unit/search_paths_spec.rb +8 -6
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 151c7873c6f30a3dea98dce52cb8ad99263fe09b
|
|
4
|
+
data.tar.gz: 4d5f8aec64c53390ace2011ff4e4803330d291f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 63c52e82342d6457a5beeab9cbae39ab9c9cce17142145d2a7556fd5152bbfe16a4b6134be86cdc726533c81b0376f97efec2f68e8350844b805744aea29cbe3
|
|
7
|
+
data.tar.gz: 7dd39ec6fbbc137903fbbf45c5e4d4ada8c70a3e32210a4f27eef77c6a1992bd71b71d6a7a30006a0afb42dd43a8c5ea8ffeb4923454ef105b6ae3ea46cce759
|
data/.travis.yml
CHANGED
|
@@ -4,20 +4,20 @@ sudo: false
|
|
|
4
4
|
cache: bundler
|
|
5
5
|
script: "bundle exec rake ci"
|
|
6
6
|
rvm:
|
|
7
|
-
- 1.9
|
|
8
|
-
- 2.0
|
|
9
|
-
- 2.1
|
|
10
|
-
- 2.2
|
|
11
|
-
- 2.3.
|
|
7
|
+
- 1.9.3
|
|
8
|
+
- 2.0.0
|
|
9
|
+
- 2.1.10
|
|
10
|
+
- 2.2.5
|
|
11
|
+
- 2.3.1
|
|
12
12
|
- ruby-head
|
|
13
|
+
- jruby-9000
|
|
14
|
+
- jruby-head
|
|
13
15
|
- rbx-2
|
|
14
|
-
- jruby-19mode
|
|
15
16
|
matrix:
|
|
16
|
-
include:
|
|
17
|
-
- rvm: jruby-head
|
|
18
17
|
allow_failures:
|
|
19
18
|
- rvm: ruby-head
|
|
20
19
|
- rvm: jruby-head
|
|
20
|
+
- rvm: rbx-2
|
|
21
21
|
fast_finish: true
|
|
22
22
|
branches:
|
|
23
23
|
only: master
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Change log
|
|
2
2
|
|
|
3
|
+
## [v0.2.1] - 2015-12-26
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
* Change to stop shadowing path var in Which#search_paths
|
|
7
|
+
|
|
3
8
|
## [v0.2.0] - 2016-07-01
|
|
4
9
|
|
|
5
10
|
### Added
|
|
@@ -17,5 +22,6 @@
|
|
|
17
22
|
|
|
18
23
|
* Initial implementation and release
|
|
19
24
|
|
|
25
|
+
[v0.2.1]: https://github.com/piotrmurach/tty-which/compare/v0.2.0...v0.2.1
|
|
20
26
|
[v0.2.0]: https://github.com/piotrmurach/tty-which/compare/v0.1.0...v0.2.0
|
|
21
27
|
[v0.1.0]: https://github.com/piotrmurach/tty-which/compare/v0.1.0
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# TTY::Which [][gitter]
|
|
2
2
|
[][gem]
|
|
3
3
|
[][travis]
|
|
4
|
+
[][appveyor]
|
|
4
5
|
[][codeclimate]
|
|
5
6
|
[][coveralls]
|
|
6
7
|
[][inchpages]
|
|
@@ -8,6 +9,7 @@
|
|
|
8
9
|
[gitter]: https://gitter.im/piotrmurach/tty
|
|
9
10
|
[gem]: http://badge.fury.io/rb/tty-which
|
|
10
11
|
[travis]: http://travis-ci.org/piotrmurach/tty-which
|
|
12
|
+
[appveyor]: https://ci.appveyor.com/project/piotrmurach/tty-which
|
|
11
13
|
[codeclimate]: https://codeclimate.com/github/piotrmurach/tty-which
|
|
12
14
|
[coveralls]: https://coveralls.io/github/piotrmurach/tty-which
|
|
13
15
|
[inchpages]: http://inch-ci.org/github/piotrmurach/tty-which
|
|
@@ -52,7 +54,7 @@ TTY::Which.which('/usr/bin/ruby') # => '/usr/bin/ruby'
|
|
|
52
54
|
The `exist?` returns `true` if the executable exists in the path and `false` otherwise:
|
|
53
55
|
|
|
54
56
|
```ruby
|
|
55
|
-
TTY::Which.exist?('ruby') # =>
|
|
57
|
+
TTY::Which.exist?('ruby') # => true
|
|
56
58
|
```
|
|
57
59
|
|
|
58
60
|
## Contributing
|
data/appveyor.yml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
install:
|
|
3
|
+
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
|
4
|
+
- ruby --version
|
|
5
|
+
- gem --version
|
|
6
|
+
- bundle install
|
|
7
|
+
build: off
|
|
8
|
+
test_script:
|
|
9
|
+
- bundle exec rake ci
|
|
10
|
+
environment:
|
|
11
|
+
matrix:
|
|
12
|
+
- ruby_version: "193"
|
|
13
|
+
- ruby_version: "200"
|
|
14
|
+
- ruby_version: "200-x64"
|
|
15
|
+
- ruby_version: "21"
|
|
16
|
+
- ruby_version: "21-x64"
|
|
17
|
+
- ruby_version: "22"
|
|
18
|
+
- ruby_version: "22-x64"
|
|
19
|
+
- ruby_version: "23"
|
|
20
|
+
- ruby_version: "23-x64"
|
|
21
|
+
matrix:
|
|
22
|
+
allow_failures:
|
|
23
|
+
- ruby_version: "193"
|
data/lib/tty/which.rb
CHANGED
data/lib/tty/which/version.rb
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
RSpec.describe TTY::Which, '#search_paths' do
|
|
4
|
+
let(:path_sep) { File::PATH_SEPARATOR }
|
|
5
|
+
|
|
4
6
|
it "defauls search paths" do
|
|
5
7
|
allow(ENV).to receive(:[]).with('PATH').and_return([])
|
|
6
8
|
allow(Dir).to receive(:exist?).and_return(true)
|
|
@@ -10,19 +12,19 @@ RSpec.describe TTY::Which, '#search_paths' do
|
|
|
10
12
|
end
|
|
11
13
|
|
|
12
14
|
it "finds paths in path environment" do
|
|
13
|
-
|
|
15
|
+
paths = ['/bin', '/usr/bin', '/usr/local/bin', '/opt/local/bin']
|
|
16
|
+
path = paths.join(File::PATH_SEPARATOR)
|
|
14
17
|
allow(ENV).to receive(:[]).with('PATH').and_return(path)
|
|
15
18
|
allow(Dir).to receive(:exist?).and_return(true)
|
|
16
19
|
|
|
17
|
-
expect(TTY::Which.search_paths).to eq(
|
|
18
|
-
'/bin', '/usr/bin', '/usr/local/bin', '/opt/local/bin'])
|
|
20
|
+
expect(TTY::Which.search_paths).to eq(paths)
|
|
19
21
|
end
|
|
20
22
|
|
|
21
23
|
it "accepts paths to search as an argument" do
|
|
22
|
-
|
|
24
|
+
paths = ['/bin', '/usr/bin', '/usr/local/bin', '/opt/local/bin']
|
|
25
|
+
path = paths.join(File::PATH_SEPARATOR)
|
|
23
26
|
allow(Dir).to receive(:exist?).and_return(true)
|
|
24
27
|
|
|
25
|
-
expect(TTY::Which.search_paths(path)).to eq(
|
|
26
|
-
'/bin', '/usr/bin', '/usr/local/bin', '/opt/local/bin'])
|
|
28
|
+
expect(TTY::Which.search_paths(path)).to eq(paths)
|
|
27
29
|
end
|
|
28
30
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tty-which
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Piotr Murach
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-12-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -59,6 +59,7 @@ files:
|
|
|
59
59
|
- LICENSE.txt
|
|
60
60
|
- README.md
|
|
61
61
|
- Rakefile
|
|
62
|
+
- appveyor.yml
|
|
62
63
|
- lib/tty-which.rb
|
|
63
64
|
- lib/tty/which.rb
|
|
64
65
|
- lib/tty/which/version.rb
|