my_recursive_search 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bce6564260bbb97d0dc9a358fda1cd82d72593d2c09f7eb886e01c59a7a42ab3
4
+ data.tar.gz: da16ec09eb567587968febeaf5c8abc78fbd5239b24aa1b9edab911d08f43e0e
5
+ SHA512:
6
+ metadata.gz: a953847c28214ec57031eb5d889476ed3a78cc39b6afd04df89d4fdc8c8e73a71058555b16adf29e0052a63b2ca889bc0be3a3c467dec30be2ce79cf4a9a8f90
7
+ data.tar.gz: 2376f8f552eb968e14eea8b8cb4f04fdeea8bfd1000a5825802d394196262f5bbb5bc3d92d59ddeb2c67845b3ee5a06114bb8b9d8ca12fe5cfc7a4ee7a981b11
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # MyRecursiveSearch
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/my_recursive_search`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
27
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/my_recursive_search.
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MyRecursiveSearch
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,16 @@
1
+ # lib/my_recursive_search.rb
2
+ require 'find'
3
+
4
+ module MyRecursiveSearch
5
+ def self.search(directory, file_name)
6
+ found_files = []
7
+
8
+ Find.find(directory) do |path|
9
+ if File.file?(path) && File.basename(path) == file_name
10
+ found_files << path
11
+ end
12
+ end
13
+
14
+ found_files
15
+ end
16
+ end
@@ -0,0 +1,4 @@
1
+ module MyRecursiveSearch
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: my_recursive_search
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - p3nc
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-10-20 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: This gem provides a simple method for searching files recursively in
14
+ a directory and its subdirectories.
15
+ email:
16
+ - zlyvko.of@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - README.md
22
+ - Rakefile
23
+ - lib/my_recursive_search.rb
24
+ - lib/my_recursive_search/version.rb
25
+ - sig/my_recursive_search.rbs
26
+ homepage: https://github.com/your-username/my_recursive_search
27
+ licenses: []
28
+ metadata:
29
+ allowed_push_host: https://rubygems.org
30
+ homepage_uri: https://github.com/your-username/my_recursive_search
31
+ source_code_uri: https://github.com/your-username/my_recursive_search
32
+ changelog_uri: https://github.com/your-username/my_recursive_search/CHANGELOG.md
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 3.0.0
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubygems_version: 3.5.11
49
+ signing_key:
50
+ specification_version: 4
51
+ summary: A simple gem for recursive file search
52
+ test_files: []