bibliothecary 5.0.0 → 5.0.1

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: 53e9c753a8a7dffebc8e949b4b2321f2bb498fd1
4
- data.tar.gz: 88859609b2c6e9a4c2507a6d4fe9e881b585247b
3
+ metadata.gz: 61ed3368f5f307a5256c24b57a7bcfddaa833a41
4
+ data.tar.gz: 0fa900c8b7b74c7f30ba98c3fd54820d6b50ecdd
5
5
  SHA512:
6
- metadata.gz: dd0dd8f901b9743f05c207aa7ed8b504d4bbcf8fd23e166b84035420398bbd19b4e89afd0e02a74934c443956bf2344bf9b3d3e31054951c26cd4793791a2817
7
- data.tar.gz: 16a3620ce75233a158067b053387877699d33f0c759231e5825888ba3c253dda2144f05dbb11ce9ef453005c416133ffc501fd7c4cfc0ac3085b21e04836c82e
6
+ metadata.gz: ce6240a075a03278d30d6b4ff9800a60ce0f6188dd890a464b15e0c9ef065aef35c00c8ca2d8716fd0e85fcea655fd3e225f354935856af3799ef8d7ff8d5e4d
7
+ data.tar.gz: 8fc043edc61327d02ca0e7caeccec6ef1a81ad595160a9e7c9c67a1660b8e4c4cdf1ee477c4c21dcb54c3e7212fa8429e8e96918249fb49f92da97e5933cb01a
data/README.md CHANGED
@@ -26,7 +26,104 @@ Or install it yourself as:
26
26
 
27
27
  ## Usage
28
28
 
29
- TODO: Write usage instructions here
29
+ Identify package manager manifests from a list of files:
30
+
31
+ ```ruby
32
+ Bibliothecary.identify_manifests(['package.json', 'README.md', 'index.js']) #=> 'package.json'
33
+ ```
34
+
35
+ Parse a manifest file for it's dependencies:
36
+
37
+ ```ruby
38
+ Bibliothecary.analyse_file 'bower.json', File.open('bower.json').read
39
+ ```
40
+
41
+ Search a directory for manifest files and parse the contents:
42
+
43
+ ```ruby
44
+ Bibliothecary.analyse('./')
45
+ ```
46
+
47
+ ## Supported package manager file formats
48
+
49
+ - npm
50
+ - package.json
51
+ - npm-shrinkwrap.json
52
+ - yarn.lock
53
+ - Maven
54
+ - pom.xml
55
+ - ivy.xml
56
+ - build.gradle
57
+ - RubyGems
58
+ - Gemfile
59
+ - Gemfile.lock
60
+ - gems.rb
61
+ - gems.locked
62
+ - *.gemspec
63
+ - Packagist
64
+ - composer.json
65
+ - composer.lock
66
+ - PyPi
67
+ - setup.py
68
+ - req*.txt
69
+ - req*.pip
70
+ - requirements/*.txt
71
+ - requirements/*.pip
72
+ - Nuget
73
+ - packages.config
74
+ - Project.json
75
+ - Project.lock.json
76
+ - *.nuspec
77
+ - paket.lock
78
+ - Bower
79
+ - bower.json
80
+ - CPAN
81
+ - META.json
82
+ - META.yml
83
+ - CocoaPods
84
+ - Podfile
85
+ - Podfile.lock
86
+ - *.podspec
87
+ - Clojars
88
+ - project.clj
89
+ - Meteor
90
+ - versions.json
91
+ - CRAN
92
+ - DESCRIPTION
93
+ - Cargo
94
+ - Cargo.toml
95
+ - Cargo.lock
96
+ - Hex
97
+ - mix.exs
98
+ - mix.lock
99
+ - Swift
100
+ - Package.swift
101
+ - Pub
102
+ - pubspec.yaml
103
+ - pubspec.lock
104
+ - Carthage
105
+ - Cartfile
106
+ - Cartfile.private
107
+ - Cartfile.resolved
108
+ - Dub
109
+ - dub.json
110
+ - dub.sdl
111
+ - Julia
112
+ - REQUIRE
113
+ - Shards
114
+ - shard.yml
115
+ - shard.lock
116
+ - Go
117
+ - glide.yaml
118
+ - glide.lock
119
+ - Godeps
120
+ - Godeps/Godeps.json
121
+ - vendor/manifest
122
+ - vendor/vendor.json
123
+ - Elm
124
+ - elm-package.json
125
+ - elm_dependencies.json
126
+ - elm-stuff/exact-dependencies.json
30
127
 
31
128
  ## Development
32
129
 
@@ -32,6 +32,7 @@ module Bibliothecary
32
32
 
33
33
  def self.parse_yarn_lock(file_contents)
34
34
  response = Typhoeus.post("https://yarn-parser.herokuapp.com/parse", body: file_contents)
35
+ return [] unless response.response_code == 200
35
36
  JSON.parse(response.body)
36
37
  end
37
38
 
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "5.0.0"
2
+ VERSION = "5.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bibliothecary
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt