fack 0.0.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.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/bin/fack +8 -0
  3. data/lib/fack.rb +14 -0
  4. metadata +46 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: deca53614fff3d5479dd4e0a4590f3448bf934c3
4
+ data.tar.gz: adabaaff53271212390950da1a5a9f32e0a9463e
5
+ SHA512:
6
+ metadata.gz: f6f9cfa9d89ce5ece6ddaaff48ecfb37d9d48dfe1967706d173d4fd6eb6513484859263e0779e0a95eaffd5bf3d05ca8c1e4cacec4fd502282bd7098333a7475
7
+ data.tar.gz: b4f236c9a0e288cc14893fc16aca6324c4f147521522ba15db1336db51e87afe466b3c00d73edafc15653f59b5bc4b6e45ad96a2717490ca2a208bad83673efe
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ require 'fack'
3
+ fack = Fack.new
4
+ if (ARGV.size < 1)
5
+ fack.help
6
+ else
7
+ fack.find_file("./", ARGV[0])
8
+ end
@@ -0,0 +1,14 @@
1
+ require 'find'
2
+
3
+ class Fack
4
+ def help
5
+ puts "to use fack path"
6
+ end
7
+
8
+ def find_file(start, file)
9
+ Dir.entries(start)[2..-1].each do |d|
10
+ puts d if d.include?(file)
11
+ find_file(d, file) if File.directory?(d)
12
+ end
13
+ end
14
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fack
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Ben Harrington
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-22 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Fack is a simple gem for finding files within a path.
14
+ email: ben@harringtonweb.com
15
+ executables:
16
+ - fack
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/fack.rb
21
+ - bin/fack
22
+ homepage: https://github.com/blh0021/fack
23
+ licenses:
24
+ - MIT
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirements: []
41
+ rubyforge_project:
42
+ rubygems_version: 2.0.3
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: Fack
46
+ test_files: []