sys_libs 1.1.14 → 1.2.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/README.md +4 -4
- data/lib/sys_libs.rb +14 -1
- data/lib/sys_libs/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 050a5f889d4f3b27b24557f638b27e7fb6856d5f
|
4
|
+
data.tar.gz: b5eb8358e5a35c0e0562f8878c8378851bb693a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dde58d84a37034f916a5c4f35518b87f6ecf66fe1a31fda8ace12dfa47262bb9f43542c81be50d87aabaa6e9d3a03bff3311f7f3270e26bcf37cff8a5ab0bf7d
|
7
|
+
data.tar.gz: 023c90c655f2c789f06ce53b85c2975557b7fe998cd553bea5b622790952c453b73c7be8cef28b785824c02b4398f85bf8faae5eb6e7493adfb3f485d423d38c
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# SysLibs
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
SysLibs is a gem that collects all project's gems and retrieves the required system libraries for each in order to work. Thsi would prevent getting stuck with unknown errors when installing gems since we would now know the missing ones in advance.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,7 +20,9 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
$ bundle exec sys_libs
|
24
|
+
|
25
|
+
The gem will now collect all project's gems, send them to the server and retrieve the list of required system libraries for each gem.
|
26
26
|
|
27
27
|
## Development
|
28
28
|
|
data/lib/sys_libs.rb
CHANGED
@@ -42,7 +42,7 @@ module SysLibs
|
|
42
42
|
|
43
43
|
#Send a post request to the server to retrieve the required sys libs
|
44
44
|
def getMissingLibs(packagesArray, os)
|
45
|
-
response = RestClient.post "https://
|
45
|
+
response = RestClient.post "https://eventtus-task.herokuapp.com/packages/search",
|
46
46
|
{ :packages => packagesArray, :os => os }
|
47
47
|
body = JSON.parse(response.body)
|
48
48
|
body.each do |key, value|
|
@@ -50,6 +50,19 @@ module SysLibs
|
|
50
50
|
key["dependencies"].each do |d|
|
51
51
|
puts d["name"]
|
52
52
|
end
|
53
|
+
puts "Trying to download the required libs..."
|
54
|
+
key["dependencies"].each do |d|
|
55
|
+
case key["os"]
|
56
|
+
when "mac"
|
57
|
+
system("brew install "+ d["name"])
|
58
|
+
when "linux"
|
59
|
+
system("apt-get install "+ d["name"])
|
60
|
+
when "unix"
|
61
|
+
system("apt-get install "+ d["name"])
|
62
|
+
else
|
63
|
+
puts "It is recommended you download those libs before proceeding."
|
64
|
+
end
|
65
|
+
end
|
53
66
|
end
|
54
67
|
end
|
55
68
|
end
|
data/lib/sys_libs/version.rb
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.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Omar Safwany
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|