sys_libs 1.1.14 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb644ef42a3597e65472e07b2d794b3673ce3d3b
4
- data.tar.gz: 3ecfdfbbb787bfb3f6870684d85c36bac12c85b6
3
+ metadata.gz: 050a5f889d4f3b27b24557f638b27e7fb6856d5f
4
+ data.tar.gz: b5eb8358e5a35c0e0562f8878c8378851bb693a4
5
5
  SHA512:
6
- metadata.gz: 5f64593047193e2150320c7033af39c9f74fd3e2fabc28c407c5b5f0560badbcedd16e842bde17a4c8e2013b6035388d2c83dfa80b737dd0be665f6f35dd33f4
7
- data.tar.gz: d6d2525e29aedfbd68fafe42a41454327632092d863f2acba099b143d94bdf30d949404237c54412da38364c1a33f0eccacd9a75391c4ca9edacb3fcc732b312
6
+ metadata.gz: dde58d84a37034f916a5c4f35518b87f6ecf66fe1a31fda8ace12dfa47262bb9f43542c81be50d87aabaa6e9d3a03bff3311f7f3270e26bcf37cff8a5ab0bf7d
7
+ data.tar.gz: 023c90c655f2c789f06ce53b85c2975557b7fe998cd553bea5b622790952c453b73c7be8cef28b785824c02b4398f85bf8faae5eb6e7493adfb3f485d423d38c
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # SysLibs
2
2
 
3
- 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/sys_libs`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Write usage instructions here
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
 
@@ -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://stormy-bayou-25992.herokuapp.com/packages/search",
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
@@ -1,3 +1,3 @@
1
1
  module SysLibs
2
- VERSION = "1.1.14"
2
+ VERSION = "1.2.0"
3
3
  end
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.1.14
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-02 00:00:00.000000000 Z
11
+ date: 2017-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client