sys_libs 1.0.6 → 1.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 +4 -4
- data/Gemfile +1 -1
- data/lib/sys_libs/version.rb +1 -1
- data/lib/sys_libs.rb +15 -11
- data/sys_libs.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fe923e004439fb3b294174a0eabca67393f2b6f
|
4
|
+
data.tar.gz: 251274a0fc53d66291f39c0b465c6ec40f581d6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bafb2f4918f2b2c28066ccc2a7b6a396d49aee0171733707524aaace09e23c26a732225a3c7454ccf5cbe8851b951654ba6b48fc1cbd26259bfc878a083ffb87
|
7
|
+
data.tar.gz: 5fb3c5cbbc14d278f41e6cf88430eba606dc2dc5c1ee82baf74826972d733ef7b1a1356b585c46b8d9a5cc29fd3651be6e89baa419d3b2cae45d2d6f2ceb3645
|
data/Gemfile
CHANGED
data/lib/sys_libs/version.rb
CHANGED
data/lib/sys_libs.rb
CHANGED
@@ -1,19 +1,22 @@
|
|
1
1
|
require "sys_libs/version"
|
2
|
-
|
2
|
+
require "unirest"
|
3
3
|
|
4
4
|
module SysLibs
|
5
|
+
#Read the project's Gemfile, fetch all uncommented gems and add to array
|
5
6
|
@packagesArray = []
|
6
7
|
f = File.open("Gemfile", "r")
|
7
8
|
f.each_line do |line|
|
8
|
-
|
9
|
-
name = line.split(" ")
|
10
|
-
|
11
|
-
|
9
|
+
if !line.include?"#" and line.include? "gem" and !line.include?"rubygems.org" and !line.include? "gemspec"
|
10
|
+
name = line.split(" ")[1].slice(1..-2)
|
11
|
+
if name[-1].chr == "'"
|
12
|
+
name = name.slice(0..-2)
|
12
13
|
end
|
14
|
+
@packagesArray << (name)
|
15
|
+
end
|
13
16
|
end
|
14
17
|
f.close
|
15
|
-
@packagesArray.each { |x| puts x }
|
16
18
|
|
19
|
+
#Get the current os
|
17
20
|
@os ||= (
|
18
21
|
host_os = RbConfig::CONFIG['host_os']
|
19
22
|
case host_os
|
@@ -30,13 +33,14 @@ module SysLibs
|
|
30
33
|
end
|
31
34
|
)
|
32
35
|
|
36
|
+
#Send a post request to the server to retrieve the required sys libs
|
33
37
|
response = RestClient.post "http://localhost:3000/packages/search",
|
34
38
|
{ :packages => @packagesArray, :os => @os }
|
35
|
-
response.body
|
36
|
-
|
37
|
-
puts
|
38
|
-
|
39
|
-
puts
|
39
|
+
body = JSON.parse(response.body)
|
40
|
+
body.each do |key, value|
|
41
|
+
puts key["name"] + " needs the following sys libs to be installed:"
|
42
|
+
key["dependencies"].each do |d|
|
43
|
+
puts d["name"]
|
40
44
|
end
|
41
45
|
end
|
42
46
|
end
|
data/sys_libs.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sys_libs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Omar Safwany
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: unirest
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
41
|
description: A gem that lists the missing system libraries by project's gems to install
|
56
42
|
and avoid getting errors.
|
57
43
|
email:
|