dependencies_collector 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb46959db30c7f28ff82d151a518d3da9e5039f7
4
- data.tar.gz: 59544be438c58e8131f2f7c51e7a819ba587a1b1
3
+ metadata.gz: 035ec0aaf0a76b7c3811ca89fa71a6f06fc2254b
4
+ data.tar.gz: 9246f82082b887dcda07f11132ee3680f78ff731
5
5
  SHA512:
6
- metadata.gz: ef67d350361c2d146ac28a2e614dfbd6a9cc41e7cdfe90ac264325d0de5f19ef47f0ba995d2c962f446a8d337e5b3f8cb9a9a6a17572fa09a288ac2466bee9fe
7
- data.tar.gz: 755806e04f4e254e3158cb314a0488290cd29a38ca61eb44fa41aa4b8c5fd628e835b776ca4a989712a77353310c0d388a6d8c17025121565d629a3dca68dd0c
6
+ metadata.gz: f8d89e2c353bc0244c47f275e220f267c8c99156235627be786d884b377367b83b384568f16b8e54b33a2e2f5e53f42569e557f12252b1bede67ba8e625aeec9
7
+ data.tar.gz: 4ec612658fec4b8846bae4a8a0017bed31fa1826ef51b495b7babb7bb0fa96c20843dddbbd65f33f92fd7af418c8d645be8627607a546dc6b67efbd23f43a174
data/README.md CHANGED
@@ -22,7 +22,7 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ $ dependencies_collector
26
26
 
27
27
  ## Development
28
28
 
@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
32
 
33
33
  ## Contributing
34
34
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/dependencies_collector. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/moazelnashar/dependencies_collector. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
36
 
37
37
  ## License
38
38
 
@@ -40,4 +40,4 @@ The gem is available as open source under the terms of the [MIT License](http://
40
40
 
41
41
  ## Code of Conduct
42
42
 
43
- Everyone interacting in the DependenciesCollector project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/dependencies_collector/blob/master/CODE_OF_CONDUCT.md).
43
+ Everyone interacting in the DependenciesCollector project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/moazelnashar/dependencies_collector/blob/master/CODE_OF_CONDUCT.md).
@@ -11,7 +11,7 @@ module DependenciesCollector
11
11
 
12
12
  def execute
13
13
  data = { packages: parsingGemfile , opreating_system: RbConfig::CONFIG["arch"]}
14
- puts = parsingDependencies(JSON.parse((requestDependencies(data).body)))
14
+ puts parsingDependencies(JSON.parse((requestDependencies(data).body)))
15
15
  end
16
16
 
17
17
  # Parsing Gemfile.lock to get gems list
@@ -23,7 +23,7 @@ module DependenciesCollector
23
23
  # Calling Api Service to get dependencies
24
24
  def requestDependencies(packages)
25
25
  # Create the HTTP objects
26
- uri = URI.parse("http://localhost:3000/api/v1/packages/dependencies")
26
+ uri = URI.parse("http://localhost:3000/api/packages/dependencies")
27
27
  http = Net::HTTP.new(uri.host, uri.port)
28
28
 
29
29
  request = Net::HTTP::Post.new(
@@ -40,8 +40,8 @@ module DependenciesCollector
40
40
  def parsingDependencies(packages)
41
41
  final_result = Array.new
42
42
  packages.each do |package|
43
- package['dependencies'].each do |library|
44
- final_result.push(library[0] + " " + library[1]) if not final_result.include?(library)
43
+ package.first['dependencies'].each do |library|
44
+ final_result.push(library['library_name']) if not final_result.include?(library)
45
45
  end
46
46
  end
47
47
  puts final_result
@@ -49,4 +49,7 @@ module DependenciesCollector
49
49
 
50
50
  end
51
51
 
52
+ x = Collector.new
53
+ x.execute
54
+
52
55
  end
@@ -1,3 +1,3 @@
1
1
  module DependenciesCollector
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependencies_collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moaz El-Nashar