walk_up 0.0.7 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0078c90282b982fe38aae8568570fa205503bb2d5fe69726185b6979eb15564d'
4
- data.tar.gz: bce6ede8e74c2c862e9544fe759e03340a54a6b3cc09d45711b738d22f7e4a76
3
+ metadata.gz: 1682cc294cec6c48260095c64f8cb8ce89504f568a92113f207ea449a0b4af1a
4
+ data.tar.gz: 73793b437dd3b3b076687897c040afa475a58bdbeeed5e9aa5e666fe752a96ef
5
5
  SHA512:
6
- metadata.gz: 8fff61c8c0b748aff1c34b12b8595e84698c34de41dcaa887b35b0d7402149e06dc4fb282ed67d4bbfe8ef21d8710142f3f0fe00b57f5f47e850c0eba9d7bf6f
7
- data.tar.gz: 7c87075e60a81c49f88580df10bfd9b5d8c5bd8161e56688bacdc0d9cb21367bc51993a3773ad110dde740ab7a8fe05ac81a6797ba5added69ac55eae65dbb7d
6
+ metadata.gz: 2c93ad6e45760152065346c28e2a8a8fe0495b1986a4590c65d72674a8b00a77f25658872575adf9a737259052d52a0fb0e956c683b9c8f4637e34e0a98ddbd9
7
+ data.tar.gz: 2e43b283a809c1ea3c882460f89ba0ece2c3ef450a2a2600a591a6d45c7c97a915855bc2689b32f8720fdc1658c7552eb45839ff147f14c5e4e1f336c510dec3
data/LICENSE.md CHANGED
@@ -1 +1,21 @@
1
- This work is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Jeff Hykin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/lib/walk_up.rb ADDED
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+ require "pathname"
3
+
4
+ def walk_up(file_to_find, start_path=nil)
5
+ here = start_path || Dir.pwd
6
+ # if absolute
7
+ if not Pathname.new(here).absolute?
8
+ here = File.join(Dir.pwd, here)
9
+ end
10
+ loop do
11
+ check_path = File.join(here, file_to_find)
12
+ if File.exist?(check_path)
13
+ return here
14
+ end
15
+ # reached the top
16
+ if here == File.dirname(here)
17
+ return nil
18
+ # else go up one and try again
19
+ else
20
+ here = File.dirname(here)
21
+ end
22
+ end
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: walk_up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Hykin
@@ -18,11 +18,7 @@ extra_rdoc_files: []
18
18
  files:
19
19
  - LICENSE.md
20
20
  - README.md
21
- - main/Gemfile
22
- - main/Gemfile.lock
23
- - main/LICENSE
24
- - main/code/main.rb
25
- - main/gem.gemspec
21
+ - lib/walk_up.rb
26
22
  homepage: https://github.com/jeff-hykin/walk_up.git
27
23
  licenses:
28
24
  - MIT
data/main/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "http://rubygems.org"
4
-
5
- ruby ">=2.5.0"
6
-
7
- gem "walk_up", :path => File.expand_path(__dir__)
data/main/Gemfile.lock DELETED
@@ -1,101 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- walk_up (0.0.0)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
- ast (2.4.2)
10
- backport (1.2.0)
11
- benchmark (0.1.1)
12
- deep_clone (0.0.1)
13
- diff-lcs (1.4.4)
14
- docile (1.4.0)
15
- e2mmap (0.1.0)
16
- jaro_winkler (1.5.4)
17
- kramdown (2.3.1)
18
- rexml
19
- kramdown-parser-gfm (1.1.0)
20
- kramdown (~> 2.0)
21
- little-plugger (1.1.4)
22
- logging (2.3.0)
23
- little-plugger (~> 1.1)
24
- multi_json (~> 1.14)
25
- mini_portile2 (2.6.1)
26
- minitest (5.14.4)
27
- multi_json (1.15.0)
28
- nokogiri (1.12.4)
29
- mini_portile2 (~> 2.6.1)
30
- racc (~> 1.4)
31
- parallel (1.20.1)
32
- parser (3.0.2.0)
33
- ast (~> 2.4.1)
34
- plist (3.6.0)
35
- racc (1.5.2)
36
- rainbow (3.0.0)
37
- rake (13.0.6)
38
- regexp_parser (2.1.1)
39
- reverse_markdown (2.0.0)
40
- nokogiri
41
- rexml (3.2.5)
42
- rubocop (1.20.0)
43
- parallel (~> 1.10)
44
- parser (>= 3.0.0.0)
45
- rainbow (>= 2.2.2, < 4.0)
46
- regexp_parser (>= 1.8, < 3.0)
47
- rexml
48
- rubocop-ast (>= 1.9.1, < 2.0)
49
- ruby-progressbar (~> 1.7)
50
- unicode-display_width (>= 1.4.0, < 3.0)
51
- rubocop-ast (1.11.0)
52
- parser (>= 3.0.1.1)
53
- ruby-progressbar (1.11.0)
54
- simplecov (0.21.2)
55
- docile (~> 1.1)
56
- simplecov-html (~> 0.11)
57
- simplecov_json_formatter (~> 0.1)
58
- simplecov-html (0.12.3)
59
- simplecov-lcov (0.8.0)
60
- simplecov_json_formatter (0.1.3)
61
- solargraph (0.43.0)
62
- backport (~> 1.2)
63
- benchmark
64
- bundler (>= 1.17.2)
65
- diff-lcs (~> 1.4)
66
- e2mmap
67
- jaro_winkler (~> 1.5)
68
- kramdown (~> 2.3)
69
- kramdown-parser-gfm (~> 1.1)
70
- parser (~> 3.0)
71
- reverse_markdown (>= 1.0.5, < 3)
72
- rubocop (>= 0.52)
73
- thor (~> 1.0)
74
- tilt (~> 2.0)
75
- yard (~> 0.9, >= 0.9.24)
76
- thor (1.1.0)
77
- tilt (2.0.10)
78
- unicode-display_width (2.0.0)
79
- yard (0.9.26)
80
-
81
- PLATFORMS
82
- ruby
83
-
84
- DEPENDENCIES
85
- deep_clone
86
- logging
87
- minitest
88
- plist
89
- rake
90
- rubocop
91
- simplecov
92
- simplecov-lcov
93
- solargraph
94
- walk_up!
95
- yard
96
-
97
- RUBY VERSION
98
- ruby 2.7.3p183
99
-
100
- BUNDLED WITH
101
- 2.1.4
data/main/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 Jeff Hykin
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
data/main/code/main.rb DELETED
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- puts "You found main!"
data/main/gem.gemspec DELETED
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
- require "date"
3
- require 'fileutils'
4
-
5
- if ENV["FORNIX_FOLDER"] == nil
6
- exit 1
7
- end
8
-
9
- FileUtils.cd(ENV["FORNIX_FOLDER"])
10
-
11
- Gem::Specification.new do |spec|
12
- spec.name = 'walk_up'
13
- spec.version = IO.read(ENV["FORNIX_FOLDER"]+"/gem_tools/version.txt")
14
- spec.date = Date.today.to_s
15
- spec.summary = 'A simple library to walk up a folder path'
16
- spec.authors = ["Jeff Hykin",]
17
- spec.homepage = 'https://github.com/jeff-hykin/walk_up.git'
18
- spec.license = 'MIT'
19
- spec.description = <<-desc
20
- desc
21
- spec.files = Dir["{main}/**/*", "LICENSE", "*.md"]
22
-
23
- spec.required_ruby_version = '>=2.5.0'
24
-
25
- spec.metadata = {
26
- "yard.run" => "yri",
27
- }
28
- end