Module: Dependenci
- Defined in:
- lib/dependenci.rb,
lib/dependenci/client.rb,
lib/dependenci/version.rb
Defined Under Namespace
Classes: Client
Constant Summary collapse
- VERSION =
"1.0.0"
Class Method Summary collapse
- .client ⇒ Object
-
.npm(package_json) ⇒ Object
Get dependencies status for node.js project.
-
.rubygems(gemfile = nil, gemfile_lock = nil, gemspec = nil) ⇒ Object
Get dependencies status for ruby project.
Class Method Details
.client ⇒ Object
31 32 33 |
# File 'lib/dependenci.rb', line 31 def self.client Dependenci::Client.new end |
.npm(package_json) ⇒ Object
Get dependencies status for node.js project
package_json - Contents of package.json file
Returns a hash with status result
27 28 29 |
# File 'lib/dependenci.rb', line 27 def self.npm(package_json) client.npm(package: package_json) end |
.rubygems(gemfile = nil, gemfile_lock = nil, gemspec = nil) ⇒ Object
Get dependencies status for ruby project
gemfile - Contents of Gemfile gemfile_lock - Contents of Gemfile.lock (optional) gemspec - Contents of *.gemspec file (optional)
Returns a hash with status result
12 13 14 15 16 17 18 19 20 |
# File 'lib/dependenci.rb', line 12 def self.rubygems(gemfile=nil, gemfile_lock=nil, gemspec=nil) opts = { gemfile: gemfile, gemfile_lock: gemfile_lock, gemspec: gemspec } client.rubygems(opts.reject { |k,v| v.nil? }) end |