libFinder 0.1.3 → 0.1.4
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/exe/libFinder +1 -1
- data/lib/libFinder/version.rb +1 -1
- data/lib/libFinder.rb +18 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fffc8dedd42b4562011bf451bcca3979aa13a2e1
|
4
|
+
data.tar.gz: 1c28f5aead9c805ddd1947e5bc1c0c305d47218d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7460d770830363b24cdf7b3a43249cee87c2fa37e874af8e858585dfdc3994d068d06daad5039e21c88f461c92169c8e714eb7fc1cdc44dfaddaaac7fb342cd
|
7
|
+
data.tar.gz: 6a6d26265f7f1e90b98980ef52052f35871e2c4753cd0ade0243597bd3c607e0b64f13bd693092cfdb3f91d67c4e317f56f742d83c916d2228a4e03ce8ccd27e
|
data/exe/libFinder
CHANGED
data/lib/libFinder/version.rb
CHANGED
data/lib/libFinder.rb
CHANGED
@@ -4,23 +4,37 @@ module LibFinder
|
|
4
4
|
|
5
5
|
class LibWorker
|
6
6
|
include HTTParty
|
7
|
+
|
8
|
+
def self.sniff
|
9
|
+
# a function to start the gem working used sniff cause i saw my dog doing so when searching for something :D
|
10
|
+
if(self.is_rails)
|
11
|
+
self.parse_gem_file
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
7
15
|
def self.is_rails
|
8
16
|
base_path = Dir.pwd
|
9
17
|
controllers = File.exist?(base_path+"/app/controllers")
|
10
|
-
puts base_path+"/controllers"
|
11
18
|
#check if the file has a controllers folder or not
|
12
19
|
models = File.exist?(base_path+"/app/models")
|
13
|
-
puts base_path+"/models"
|
14
20
|
#check if the file has a models folder or not
|
15
|
-
|
16
|
-
|
17
21
|
if controllers && models
|
18
22
|
#if both are true then it is a rails app
|
19
23
|
return true
|
20
24
|
else
|
25
|
+
puts "this is not a rails application file please change directory to a rails application file"
|
21
26
|
return false
|
22
27
|
end
|
23
28
|
end
|
29
|
+
|
30
|
+
def self.parse_gem_file
|
31
|
+
File.readlines(Dir.pwd+"/app/Gemfile").each do |line|
|
32
|
+
puts line
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
|
24
38
|
end
|
25
39
|
|
26
40
|
end
|