├── .nvmrc ├── .eslintignore ├── .gitignore ├── dependencyci.yml ├── .travis.yml ├── test ├── fixtures │ ├── Cartfile.private │ ├── dub.sdl │ ├── exact-dependencies.json │ ├── REQUIRE │ ├── requirements.txt │ ├── paket.lock │ ├── Cargo.toml │ ├── Gemfile │ ├── gems.rb │ ├── Godeps │ ├── Cartfile.resolved │ ├── packages.config │ ├── Package.swift │ ├── setup2.py │ ├── elm_dependencies.json │ ├── glide.lock │ ├── glide.yaml │ ├── package.json │ ├── dist.ini │ ├── shard.yml │ ├── elm-package.json │ ├── shard.lock │ ├── dub.json │ ├── pubspec.yaml │ ├── ALOSRPAuth.podspec.json │ ├── project.clj │ ├── manifest │ ├── mix.lock │ ├── Cartfile │ ├── bower.json │ ├── META.yml │ ├── composer2.json │ ├── mix.exs │ ├── build.sbt │ ├── composer.json │ ├── dpkg │ ├── devise.gemspec │ ├── DESCRIPTION2 │ ├── vendor.json │ ├── example.nuspec │ ├── setup.py │ ├── versions.json │ ├── Project.json │ ├── Godeps.json │ ├── META.json │ ├── Podfile │ ├── example.podspec │ ├── ivy.xml │ ├── build.gradle │ ├── pubspec.lock │ ├── DESCRIPTION │ ├── Cargo.lock │ ├── cpanfile │ ├── Podfile.lock │ ├── composer.lock │ ├── Gemfile.lock │ └── pom.xml └── parsers_test.js ├── lib └── parsers │ ├── meteor.js │ ├── julia.js │ ├── yarn.js │ ├── elm-exact.js │ ├── elm.js │ ├── nuget.js │ ├── podspec-json.js │ ├── godeps.js │ ├── govendor.js │ ├── gb.js │ ├── nuget-lockfile.js │ ├── publock.js │ ├── cpan-meta-yml.js │ ├── paket.js │ ├── gpm.js │ ├── glidelockfile.js │ ├── pypi.js │ ├── shard-lockfile.js │ ├── cpan-meta-json.js │ ├── dub-sdl.js │ ├── podspec.js │ ├── rubygems.js │ ├── cartfile.js │ ├── gemspec.js │ ├── cocoapods.js │ ├── cartfileprivate.js │ ├── cartfileresolved.js │ ├── hex.js │ ├── bower.js │ ├── cargo.js │ ├── hex-lock.js │ ├── npm-shrinkwrap.js │ ├── cargo-lock.js │ ├── clojars.js │ ├── packagist.js │ ├── nuspec.js │ ├── cocoapods-lockfile.js │ ├── pub.js │ ├── dub.js │ ├── shard.js │ ├── glide.js │ ├── pypi-setup.js │ ├── nuget-packages.js │ ├── ivy.js │ ├── rubygems-lockfile.js │ ├── swift.js │ ├── packagist-lockfile.js │ ├── gradle.js │ ├── npm.js │ ├── maven.js │ ├── cran.js │ └── index.js ├── .codeclimate.yml ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── ISSUE_TEMPLATE.md └── CONTRIBUTING.md ├── package.json ├── Readme.md ├── CODE_OF_CONDUCT.md └── .eslintrc /.nvmrc: -------------------------------------------------------------------------------- 1 | v7.3 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | **/*{.,-}min.js 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | node_modules 3 | .env 4 | npm-debug.log 5 | /yarn.lock 6 | -------------------------------------------------------------------------------- /dependencyci.yml: -------------------------------------------------------------------------------- 1 | platforms: 2 | NuGet: 3 | tests: 4 | unlicensed: skip 5 | removed: skip 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "7.0" 4 | - "6.3" 5 | 6 | cache: 7 | directories: 8 | - node_modules 9 | -------------------------------------------------------------------------------- /test/fixtures/Cartfile.private: -------------------------------------------------------------------------------- 1 | github "Quick/Quick" ~> 0.9 2 | github "Quick/Nimble" ~> 3.1 3 | github "jspahrsummers/xcconfigs" "ec5753493605deed7358dec5f9260f503d3ed650" 4 | -------------------------------------------------------------------------------- /test/fixtures/dub.sdl: -------------------------------------------------------------------------------- 1 | name "note-app" 2 | description "A simple vibe.d server application." 3 | copyright "Copyright © 2016, Michael" 4 | authors "Michael" 5 | dependency "vibe-d" version="~>0.7.23" 6 | versions "VibeDefaultMain" 7 | -------------------------------------------------------------------------------- /test/fixtures/exact-dependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "jvoigtlaender/elm-drag-and-drop": "1.0.1", 3 | "evancz/elm-html": "2.0.0", 4 | "elm-lang/core": "1.1.1", 5 | "evancz/automaton": "1.0.0", 6 | "evancz/virtual-dom": "1.2.2" 7 | } 8 | -------------------------------------------------------------------------------- /test/fixtures/REQUIRE: -------------------------------------------------------------------------------- 1 | julia 0.3 2 | Codecs 3 | Colors 0.3.4 4 | Compat 5 | Compose 0.3.11 6 | Contour 7 | DataFrames 0.4.2 8 | DataStructures 9 | Dates 10 | Distributions 11 | Hexagons 12 | Iterators 0.1.5 13 | JSON 14 | KernelDensity 15 | Loess 16 | Showoff 0.0.3 17 | StatsBase 18 | -------------------------------------------------------------------------------- /test/fixtures/requirements.txt: -------------------------------------------------------------------------------- 1 | -r 2 | foo 3 | Flask == 0.8 # awful comment 4 | #Jinja2==2.6 5 | django-bootstrap3>=6.2,<6.3 6 | zope.component==4.2.2 7 | scikit-learn==0.16.1 8 | Beaker>=1.6.5 9 | certifi==0.0.8 10 | chardet==1.0.1 11 | distribute==0.6.24 12 | gunicorn==0.14.2 13 | requests==0.11.1 14 | -------------------------------------------------------------------------------- /test/fixtures/paket.lock: -------------------------------------------------------------------------------- 1 | FRAMEWORK: >= NET40 2 | NUGET 3 | remote: https://www.nuget.org/api/v2 4 | Argu (2.1) 5 | Mono.Cecil (0.9.6.1) 6 | Chessie (0.5.1) 7 | FSharp.Core 8 | FSharp.Core (4.0.0.1) - redirects: force 9 | Mono.Cecil (0.9.6.1) 10 | Newtonsoft.Json (9.0.1) - redirects: force 11 | -------------------------------------------------------------------------------- /test/fixtures/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | 3 | name = "update" 4 | version = "0.0.1" 5 | authors = ["Jorge Aparicio ", 6 | "Steve Klabnik "] 7 | 8 | [dependencies] 9 | 10 | rustc-serialize = "*" 11 | regex = {version = "*", features = ["feature"]} 12 | local_crate = {path = "../local_crate"} -------------------------------------------------------------------------------- /test/fixtures/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | ruby '2.2.1' 3 | 4 | gem 'oj' 5 | gem 'rails', '4.2.0' 6 | gem 'leveldb-ruby','0.15', require: 'leveldb' 7 | 8 | group :development do 9 | gem 'spring' 10 | gem 'thin' 11 | end 12 | 13 | group :production do 14 | gem 'puma' 15 | gem 'rails_12factor' 16 | gem 'bugsnag' 17 | end 18 | -------------------------------------------------------------------------------- /test/fixtures/gems.rb: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | ruby '2.2.1' 3 | 4 | gem 'oj' 5 | gem 'rails', '4.2.0' 6 | gem 'leveldb-ruby','0.15', require: 'leveldb' 7 | 8 | group :development do 9 | gem 'spring' 10 | gem 'thin' 11 | end 12 | 13 | group :production do 14 | gem 'puma' 15 | gem 'rails_12factor' 16 | gem 'bugsnag' 17 | end 18 | -------------------------------------------------------------------------------- /lib/parsers/meteor.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var meteor = function(str) { 4 | var deps = JSON.parse(str).dependencies; 5 | return deps 6 | .reduce(function(accum, dep) { 7 | accum.push({ 8 | name: dep[0], 9 | version: dep[1], 10 | type: 'runtime' 11 | }); 12 | return accum; 13 | }, []); 14 | }; 15 | 16 | module.exports = meteor; 17 | -------------------------------------------------------------------------------- /test/fixtures/Godeps: -------------------------------------------------------------------------------- 1 | # Git repos 2 | github.com/nu7hatch/gotrail v0.0.2 3 | github.com/replicon/fast-archiver v1.02 4 | 5 | # Subpackages 6 | github.com/garyburd/redigo/redis a6a0a737c00caf4d4c2bb589941ace0d688168bb 7 | 8 | # Bazaar Repo 9 | launchpad.net/gocheck r2013.03.03 #foo 10 | 11 | # Mercurial Repo 12 | code.google.com/p/go.example/hello/... ae081cd1d6cc 13 | -------------------------------------------------------------------------------- /test/fixtures/Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "thoughtbot/Argo" "v2.2.0" 2 | github "Quick/Nimble" "v3.1.0" 3 | github "jdhealy/PrettyColors" "v3.0.0" 4 | github "Quick/Quick" "v0.9.1" 5 | github "antitypical/Result" "1.0.2" 6 | github "jspahrsummers/xcconfigs" "ec5753493605deed7358dec5f9260f503d3ed650" 7 | github "Carthage/Commandant" "0.8.3" 8 | github "ReactiveCocoa/ReactiveCocoa" "v4.0.1" 9 | github "Carthage/ReactiveTask" "0.9.1" 10 | -------------------------------------------------------------------------------- /lib/parsers/julia.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | return str.split("\n").reduce(function(accum,line) { 5 | 6 | var match = line.split(/\s/); 7 | if (match[0].length > 0) { 8 | accum.push({ 9 | name: match[0], 10 | version: match[1] || '>= 0', 11 | type: 'runtime' 12 | }); 13 | } 14 | 15 | return accum; 16 | }, []); 17 | } 18 | 19 | module.exports = parser; 20 | -------------------------------------------------------------------------------- /test/fixtures/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.codeclimate.yml: -------------------------------------------------------------------------------- 1 | --- 2 | engines: 3 | duplication: 4 | enabled: true 5 | config: 6 | languages: 7 | - ruby 8 | - javascript 9 | - python 10 | - php 11 | eslint: 12 | enabled: true 13 | fixme: 14 | enabled: true 15 | ratings: 16 | paths: 17 | - "**.inc" 18 | - "**.js" 19 | - "**.jsx" 20 | - "**.module" 21 | - "**.php" 22 | - "**.py" 23 | - "**.rb" 24 | exclude_paths: 25 | - test/ 26 | -------------------------------------------------------------------------------- /lib/parsers/yarn.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | var yarn = require('yarn/lib/lockfile/wrapper.js') 3 | 4 | var yarnlock = function (str) { 5 | var dependencies = yarn.parse(str) 6 | var deps = [] 7 | Object.keys(dependencies).forEach((dep) => { 8 | deps.push({ 9 | name: dep.split('@')[0], 10 | version: dependencies[dep].version, 11 | type: 'runtime' 12 | }) 13 | }) 14 | return deps 15 | } 16 | 17 | module.exports = yarnlock 18 | -------------------------------------------------------------------------------- /test/fixtures/Package.swift: -------------------------------------------------------------------------------- 1 | import PackageDescription 2 | 3 | let package = Package( 4 | name: "swift-package-converter", 5 | dependencies: [ 6 | .Package(url: "https://github.com/qutheory/vapor.git", majorVersion: 0, minor: 12), 7 | .Package(url: "https://github.com/czechboy0/Tasks.git", majorVersion: 0, minor: 2), 8 | .Package(url: "https://github.com/czechboy0/Environment.git", majorVersion: 0, minor: 4), 9 | ] 10 | ) 11 | -------------------------------------------------------------------------------- /test/fixtures/setup2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | 5 | setup( 6 | name="vapprun", 7 | version="1.0.1", 8 | author="Yann Hodique", 9 | author_email="hodiquey@vmware.com", 10 | namespace_packages=['vmw'], 11 | packages=['vmw', 'vmw.vapprun'], 12 | package_data={'vmw.vapprun': ['templates/*']}, 13 | scripts=['bin/vapprun'], 14 | setup_requires=['setuptools'], 15 | install_requires=['setuptools', 'six'], 16 | ) 17 | -------------------------------------------------------------------------------- /lib/parsers/elm-exact.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json || {}; 11 | 12 | Object.keys(runtimeDeps).forEach( (dep) => { 13 | deps.push({ 14 | name: dep, 15 | version: runtimeDeps[dep], 16 | type: 'runtime' 17 | }); 18 | }); 19 | 20 | return deps; 21 | } 22 | 23 | module.exports = parser; 24 | -------------------------------------------------------------------------------- /test/fixtures/elm_dependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1", 3 | "summary": "concise, helpful summary of your project", 4 | "description": "full description of this project, describe your use case", 5 | "license": "BSD3", 6 | "exposed-modules": [], 7 | "elm-version": "0.12.3", 8 | "dependencies": { 9 | "johnpmayer/elm-webgl": "0.1.1", 10 | "johnpmayer/elm-linear-algebra": "1.0.1" 11 | }, 12 | "repository": "https://github.com/USER/PROJECT.git" 13 | } 14 | -------------------------------------------------------------------------------- /lib/parsers/elm.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json.dependencies || []; 11 | 12 | Object.keys(runtimeDeps).forEach( (dep) => { 13 | deps.push({ 14 | name: dep, 15 | version: runtimeDeps[dep], 16 | type: 'runtime' 17 | }); 18 | }); 19 | 20 | return deps; 21 | } 22 | 23 | module.exports = parser; 24 | -------------------------------------------------------------------------------- /lib/parsers/nuget.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json.dependencies || []; 11 | 12 | Object.keys(runtimeDeps).forEach( (dep) => { 13 | deps.push({ 14 | name: dep, 15 | version: runtimeDeps[dep], 16 | type: 'runtime' 17 | }); 18 | }); 19 | 20 | return deps; 21 | } 22 | 23 | module.exports = parser; 24 | -------------------------------------------------------------------------------- /lib/parsers/podspec-json.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json.dependencies || []; 11 | 12 | Object.keys(runtimeDeps).forEach( (dep) => { 13 | deps.push({ 14 | name: dep, 15 | version: runtimeDeps[dep][0], 16 | type: 'runtime' 17 | }); 18 | }); 19 | 20 | return deps; 21 | } 22 | 23 | module.exports = parser; 24 | -------------------------------------------------------------------------------- /lib/parsers/godeps.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json.Deps || []; 11 | 12 | Object.keys(runtimeDeps).forEach( (dep) => { 13 | deps.push({ 14 | name: runtimeDeps[dep].ImportPath, 15 | version: runtimeDeps[dep].Rev, 16 | type: 'runtime' 17 | }); 18 | }); 19 | 20 | return deps; 21 | } 22 | 23 | module.exports = parser; 24 | -------------------------------------------------------------------------------- /lib/parsers/govendor.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json.package || []; 11 | 12 | Object.keys(runtimeDeps).forEach( (dep) => { 13 | deps.push({ 14 | name: runtimeDeps[dep].path, 15 | version: runtimeDeps[dep].revision, 16 | type: 'runtime' 17 | }); 18 | }); 19 | 20 | return deps; 21 | } 22 | 23 | module.exports = parser; 24 | -------------------------------------------------------------------------------- /lib/parsers/gb.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json.dependencies || []; 11 | 12 | Object.keys(runtimeDeps).forEach( (dep) => { 13 | deps.push({ 14 | name: runtimeDeps[dep].importpath, 15 | version: runtimeDeps[dep].revision, 16 | type: 'runtime' 17 | }); 18 | }); 19 | 20 | return deps; 21 | } 22 | 23 | module.exports = parser; 24 | -------------------------------------------------------------------------------- /test/fixtures/glide.lock: -------------------------------------------------------------------------------- 1 | hash: 9057b90e0cd3fac45ad563ea3d62a6e57c845e5c07e68e87b6fc14818574eb4f 2 | updated: 2016-02-17T09:11:15.318323635-05:00 3 | imports: 4 | - name: github.com/codegangsta/cli 5 | version: c31a7975863e7810c92e2e288a9ab074f9a88f29 6 | - name: github.com/Masterminds/semver 7 | version: 513f3dcb3ecfb1248831fb5cb06a23a3cd5935dc 8 | - name: github.com/Masterminds/vcs 9 | version: 9c0db6583837118d5df7c2ae38ab1c194e434b35 10 | - name: gopkg.in/yaml.v2 11 | version: f7716cbe52baa25d2e9b0d0da546fcf909fc16b4 12 | devImports: [] 13 | -------------------------------------------------------------------------------- /test/fixtures/glide.yaml: -------------------------------------------------------------------------------- 1 | package: github.com/Masterminds/glide 2 | homepage: https://glide.sh 3 | license: MIT 4 | owners: 5 | - name: Matt Butcher 6 | email: technosophos@gmail.com 7 | homepage: http://technosophos.com/ 8 | - name: Matt Farina 9 | email: matt@mattfarina.com 10 | homepage: https://www.mattfarina.com/ 11 | import: 12 | - package: gopkg.in/yaml.v2 13 | - package: github.com/Masterminds/vcs 14 | version: ^1.4.0 15 | - package: github.com/codegangsta/cli 16 | - package: github.com/Masterminds/semver 17 | version: ^1.0.0 18 | -------------------------------------------------------------------------------- /lib/parsers/nuget-lockfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json.libraries || []; 11 | 12 | Object.keys(runtimeDeps).forEach( (dep) => { 13 | var match = dep.split('/'); 14 | 15 | deps.push({ 16 | name: match[0], 17 | version: match[1], 18 | type: 'runtime' 19 | }); 20 | }); 21 | 22 | return deps; 23 | } 24 | 25 | module.exports = parser; 26 | -------------------------------------------------------------------------------- /lib/parsers/publock.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var YAML = require('js-yaml'); 4 | 5 | function parser(str) { 6 | var yaml; 7 | 8 | try { yaml = YAML.load(str); } 9 | catch(e) { throw new Error('Invalid YAML'); } 10 | 11 | var deps = []; 12 | var runtimeDeps = yaml.packages || []; 13 | 14 | Object.keys(runtimeDeps).forEach( (dep) => { 15 | deps.push({ 16 | name: dep, 17 | version: runtimeDeps[dep].version, 18 | type: 'runtime' 19 | }); 20 | }); 21 | 22 | return deps; 23 | } 24 | 25 | module.exports = parser; 26 | -------------------------------------------------------------------------------- /lib/parsers/cpan-meta-yml.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var YAML = require('js-yaml'); 4 | 5 | function parser(str) { 6 | var yaml; 7 | 8 | try { yaml = YAML.load(str); } 9 | catch(e) { throw new Error('Invalid YAML'); } 10 | 11 | var deps = []; 12 | var runtimeDeps = yaml.requires || []; 13 | 14 | Object.keys(runtimeDeps).forEach( dep => { 15 | deps.push({ 16 | name: dep, 17 | version: `>= ${runtimeDeps[dep]}`, 18 | type: 'runtime' 19 | }); 20 | }); 21 | 22 | return deps; 23 | 24 | } 25 | 26 | module.exports = parser; 27 | -------------------------------------------------------------------------------- /lib/parsers/paket.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var REGEXP = /\s+(.+?\S+)\s\((\d+\.\d+[\.\d+[\.\d+]*]*)\)/; 4 | 5 | function parser(str) { 6 | var deps = str.split("\n").reduce( (accum, line) => { 7 | var match = line.match(REGEXP); 8 | 9 | if (!match) return accum; 10 | 11 | let name = match[1], version = match[2] 12 | 13 | accum.push({ 14 | name: name, 15 | version: version || '*', 16 | type: 'runtime' 17 | }); 18 | 19 | return accum; 20 | }, []); 21 | 22 | return deps; 23 | } 24 | 25 | module.exports = parser; 26 | -------------------------------------------------------------------------------- /lib/parsers/gpm.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var REGEXP = /^(.+)\s+(.+)$/ 4 | 5 | function parser(str) { 6 | var deps = str.replace(/(\#(.*))/g, '').split("\n").reduce( (accum, line) => { 7 | var match = line.match(REGEXP); 8 | 9 | if (!match) return accum; 10 | 11 | let name = match[1].trim(), version = match[2].trim() 12 | 13 | accum.push({ 14 | name: name, 15 | version: version || '*', 16 | type: 'runtime' 17 | }); 18 | 19 | return accum; 20 | }, []); 21 | 22 | return deps; 23 | } 24 | 25 | module.exports = parser; 26 | -------------------------------------------------------------------------------- /lib/parsers/glidelockfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var YAML = require('js-yaml'); 4 | 5 | function parser(str) { 6 | var yaml; 7 | 8 | try { yaml = YAML.load(str); } 9 | catch(e) { throw new Error('Invalid YAML'); } 10 | 11 | var deps = []; 12 | var runtimeDeps = yaml.imports || []; 13 | 14 | Object.keys(runtimeDeps).forEach( dep => { 15 | deps.push({ 16 | name: runtimeDeps[dep].name, 17 | version: runtimeDeps[dep].version, 18 | type: 'runtime' 19 | }); 20 | }); 21 | 22 | return deps; 23 | 24 | } 25 | 26 | module.exports = parser; 27 | -------------------------------------------------------------------------------- /lib/parsers/pypi.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var REGEXP = /^([a-zA-Z0-9]+[a-zA-Z0-9-_\.]+)([><=\d\.,]+)?/; 4 | 5 | function parser(str) { 6 | var deps = str.split("\n").reduce( (accum, line) => { 7 | var match = line.replace(/\s+/g, '').match(REGEXP); 8 | 9 | if (!match) return accum; 10 | 11 | let name = match[1], version = match[2] 12 | 13 | accum.push({ 14 | name: name, 15 | version: version || '*', 16 | type: 'runtime' 17 | }); 18 | 19 | return accum; 20 | }, []); 21 | 22 | return deps; 23 | } 24 | 25 | module.exports = parser; 26 | -------------------------------------------------------------------------------- /lib/parsers/shard-lockfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var YAML = require('js-yaml'); 4 | 5 | function parser(str) { 6 | var yaml; 7 | 8 | try { yaml = YAML.load(str); } 9 | catch(e) { throw new Error('Invalid YAML'); } 10 | 11 | var deps = []; 12 | var runtimeDeps = yaml.shards || []; 13 | 14 | Object.keys(runtimeDeps).forEach( dep => { 15 | deps.push({ 16 | name: dep, 17 | version: runtimeDeps[dep].version || runtimeDeps[dep].commit, 18 | type: 'runtime' 19 | }); 20 | }); 21 | 22 | return deps; 23 | 24 | } 25 | 26 | module.exports = parser; 27 | -------------------------------------------------------------------------------- /test/fixtures/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "librarian", 3 | "version": "1.0.0", 4 | "description": "Integrate GH webhooks with Libraries.io", 5 | "main": "app.js", 6 | "scripts": { 7 | "start": "nodemon app.js", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "author": "Mauro Pompilio", 11 | "license": "MIT", 12 | "dependencies": { 13 | "babel": "^4.6.6" 14 | }, 15 | "devDependencies": { 16 | "mocha": "^2.2.1" 17 | }, 18 | "optionalDependencies": { 19 | "node-sass": "*" 20 | }, 21 | "peerDependencies": { 22 | "base62": "*" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/fixtures/dist.ini: -------------------------------------------------------------------------------- 1 | name = PathFind 2 | author = Carla Cummins 3 | license = GPL_3 4 | copyright_holder = Wellcome Trust Sanger Institute 5 | copyright_year = 2013 6 | 7 | [MetaResources] 8 | homepage = http://www.sanger.ac.uk/ 9 | repository.web = https://github.com/sanger-pathogens/PathFind 10 | repository.url = https://github.com/sanger-pathogens/PathFind.git 11 | repository.type = git 12 | 13 | [RequiresExternal] 14 | requires = tar 15 | requires = ln 16 | 17 | [@Git] 18 | [@Basic] 19 | [PruneCruft] 20 | [ExtraTests] 21 | [AutoPrereqs] 22 | [AutoVersion] 23 | [PodWeaver] 24 | -------------------------------------------------------------------------------- /lib/parsers/cpan-meta-json.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json.prereqs || []; 11 | 12 | Object.keys(runtimeDeps).forEach( group => { 13 | Object.keys(runtimeDeps[group].requires).forEach( dep => { 14 | deps.push({ 15 | name: dep, 16 | version: `>= ${runtimeDeps[group].requires[dep]}`, 17 | type: group 18 | }); 19 | }); 20 | }); 21 | 22 | return deps; 23 | } 24 | 25 | module.exports = parser; 26 | -------------------------------------------------------------------------------- /test/fixtures/shard.yml: -------------------------------------------------------------------------------- 1 | name: registry 2 | version: 0.1.0 3 | description: Web registry for Crystal Shards 4 | 5 | authors: 6 | - Julien Portalier 7 | 8 | dependencies: 9 | frost: 10 | github: ysbaddaden/frost 11 | branch: master 12 | 13 | shards: 14 | github: ysbaddaden/shards 15 | 16 | common_mark: 17 | github: ysbaddaden/crystal-cmark 18 | 19 | development_dependencies: 20 | minitest: 21 | github: ysbaddaden/minitest.cr 22 | version: ">= 0.2.0" 23 | 24 | selenium-webdriver: 25 | github: ysbaddaden/selenium-webdriver-crystal 26 | 27 | license: Apache-2.0 28 | -------------------------------------------------------------------------------- /test/fixtures/elm-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0", 3 | "summary": "website for browsing packages and exploring documentation", 4 | "repository": "https://github.com/elm-lang/package.elm-lang.org.git", 5 | "license": "BSD3", 6 | "source-directories": [ 7 | "frontend" 8 | ], 9 | "exposed-modules": [], 10 | "native-modules": true, 11 | "dependencies": { 12 | "evancz/elm-markdown": "1.1.0 <= v < 2.0.0", 13 | "evancz/elm-html": "1.0.0 <= v < 2.0.0", 14 | "evancz/local-channel": "1.0.0 <= v < 2.0.0", 15 | "elm-lang/core": "1.0.0 <= v < 2.0.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/fixtures/shard.lock: -------------------------------------------------------------------------------- 1 | version: 1.0 2 | shards: 3 | common_mark: 4 | github: ysbaddaden/crystal-cmark 5 | version: 0.1.0 6 | 7 | frost: 8 | github: ysbaddaden/frost 9 | commit: 4042fc55a0865df8cbcb9a389527e9557aa8f280 10 | 11 | minitest: 12 | github: ysbaddaden/minitest.cr 13 | version: 0.3.1 14 | 15 | pg: 16 | github: will/crystal-pg 17 | version: 0.5.0 18 | 19 | pool: 20 | github: ysbaddaden/pool 21 | version: 0.2.1 22 | 23 | selenium-webdriver: 24 | github: ysbaddaden/selenium-webdriver-crystal 25 | version: 0.1.0 26 | 27 | shards: 28 | github: ysbaddaden/shards 29 | version: 0.6.0 30 | -------------------------------------------------------------------------------- /test/fixtures/dub.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ddox", 3 | "description": "Powerful alternative to DMD's DDOC engine.", 4 | "homepage": "https://github.com/rejectedsoftware/ddox", 5 | "license": "MIT", 6 | "authors": [ 7 | "Sönke Ludwig" 8 | ], 9 | "dependencies": { 10 | "vibe-d": "~>0.7.22", 11 | "libdparse": {"optional": true, "version": "~>0.2.0"} 12 | }, 13 | "versions": ["JsonLineNumbers"], 14 | "configurations": [ 15 | { 16 | "name": "application", 17 | "targetType": "executable", 18 | "versions": ["VibeCustomMain"] 19 | }, 20 | { 21 | "name": "library", 22 | "excludedSourceFiles": ["source/app.d"] 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /test/fixtures/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: angular 2 | version: '1.1.0' 3 | authors: 4 | - Misko Hevery 5 | - Pavel Jbanov 6 | - James deBoer 7 | - Chirayu Krishnappa 8 | - Matias Niemela 9 | - Paul Rohde 10 | - Victor Berchet 11 | - Rado Kirov 12 | description: Angular for dart. 13 | homepage: https://angulardart.org 14 | environment: 15 | sdk: '>=1.4.0' 16 | dependencies: 17 | analyzer: '>=0.22.0 <0.25.0' 18 | args: '>=0.12.0 <0.13.0' 19 | dev_dependencies: 20 | benchmark_harness: '>=1.0.0 <2.0.0' 21 | guinness: '>=0.1.9 <0.2.0' 22 | -------------------------------------------------------------------------------- /test/fixtures/ALOSRPAuth.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ALOSRPAuth", 3 | "version": "0.1", 4 | "license": "MIT", 5 | "summary": "ALOSRPAuth is Obj-C implementation of Secure Remote Password protocol (SRP-6a)", 6 | "homepage": "https://github.com/AddAloner/ALOSRPAuth", 7 | "authors": { 8 | "Alexey Yachmenov": "aloner.brn@gmail.com" 9 | }, 10 | "source": { 11 | "git": "https://github.com/AddAloner/ALOSRPAuth.git", 12 | "tag": "0.1" 13 | }, 14 | "platforms": { 15 | "ios": "5.0", 16 | "osx": "10.7" 17 | }, 18 | "source_files": "*.{h,m,c}", 19 | "requires_arc": true, 20 | "dependencies": { 21 | "OpenSSL": [ 22 | "~> 1.0" 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/parsers/dub-sdl.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'https://sdlparser.herokuapp.com/sdl', 8 | method : 'POST', 9 | formData: {body: str}, 10 | json: true 11 | }; 12 | 13 | return rp(options) 14 | .then( (dependencies) => { 15 | dependencies = dependencies.constructor === Array ? dependencies : []; 16 | 17 | return dependencies.reduce( (accum, dep) => { 18 | accum.push({ 19 | name: dep.name, 20 | version: dep.version, 21 | type: dep.type 22 | }); 23 | return accum; 24 | }, []); 25 | }); 26 | } 27 | 28 | module.exports = parser; 29 | -------------------------------------------------------------------------------- /lib/parsers/podspec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'https://gemparser.herokuapp.com/podspec', 8 | method : 'POST', 9 | formData: {body: str}, 10 | json: true 11 | }; 12 | 13 | return rp(options) 14 | .then( (dependencies) => { 15 | dependencies = dependencies.constructor === Array ? dependencies : []; 16 | return dependencies.reduce( (accum, dep) => { 17 | accum.push({ 18 | name: dep.name, 19 | version: dep.version, 20 | type: dep.type 21 | }); 22 | return accum; 23 | }, []); 24 | 25 | }); 26 | } 27 | 28 | module.exports = parser; 29 | -------------------------------------------------------------------------------- /lib/parsers/rubygems.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'https://gemparser.herokuapp.com/gemfile', 8 | method : 'POST', 9 | formData: {body: str}, 10 | json: true 11 | }; 12 | 13 | return rp(options) 14 | .then( (dependencies) => { 15 | dependencies = dependencies.constructor === Array ? dependencies : []; 16 | 17 | return dependencies.reduce( (accum, dep) => { 18 | accum.push({ 19 | name: dep.name, 20 | version: dep.version, 21 | type: dep.type 22 | }); 23 | return accum; 24 | }, []); 25 | }); 26 | } 27 | 28 | module.exports = parser; 29 | -------------------------------------------------------------------------------- /lib/parsers/cartfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'https://carthageparser.herokuapp.com/cartfile', 8 | method : 'POST', 9 | formData: {body: str}, 10 | json: true 11 | }; 12 | 13 | return rp(options) 14 | .then( (dependencies) => { 15 | dependencies = dependencies.constructor === Array ? dependencies : []; 16 | 17 | return dependencies.reduce( (accum, dep) => { 18 | accum.push({ 19 | name: dep.name, 20 | version: dep.version, 21 | type: dep.type 22 | }); 23 | return accum; 24 | }, []); 25 | }); 26 | } 27 | 28 | module.exports = parser; 29 | -------------------------------------------------------------------------------- /lib/parsers/gemspec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'https://gemparser.herokuapp.com/gemspec', 8 | method : 'POST', 9 | formData: {body: str}, 10 | json: true 11 | }; 12 | 13 | return rp(options) 14 | .then( (dependencies) => { 15 | dependencies = dependencies.constructor === Array ? dependencies : []; 16 | 17 | return dependencies.reduce( (accum, dep) => { 18 | accum.push({ 19 | name: dep.name, 20 | version: dep.version, 21 | type: dep.type 22 | }); 23 | return accum; 24 | }, []); 25 | }); 26 | 27 | } 28 | 29 | module.exports = parser; 30 | -------------------------------------------------------------------------------- /lib/parsers/cocoapods.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'https://gemparser.herokuapp.com/podfile', 8 | method : 'POST', 9 | formData: {body: str}, 10 | json: true 11 | }; 12 | 13 | return rp(options) 14 | .then( (dependencies) => { 15 | dependencies = dependencies.constructor === Array ? dependencies : []; 16 | 17 | return dependencies.reduce( (accum, dep) => { 18 | accum.push({ 19 | name: dep.name, 20 | version: dep.version, 21 | type: dep.type 22 | }); 23 | return accum; 24 | }, []); 25 | 26 | }); 27 | } 28 | 29 | module.exports = parser; 30 | -------------------------------------------------------------------------------- /test/fixtures/project.clj: -------------------------------------------------------------------------------- 1 | (defproject clojars-json "0.1.0" 2 | :description "FIXME: write description" 3 | :url "http://example.com/FIXME" 4 | :license {:name "Eclipse Public License" 5 | :url "http://www.eclipse.org/legal/epl-v10.html"} 6 | :dependencies [[org.clojure/clojure "1.6.0"] 7 | [cheshire "5.4.0"] 8 | [compojure "1.3.2"] 9 | [ring/ring-defaults "0.1.2"] 10 | [ring/ring-jetty-adapter "1.2.1"]] 11 | :plugins [[lein-ring "0.8.13"]] 12 | :min-lein-version "2.0.0" 13 | :ring {:handler clojars-json.core/app} 14 | :uberjar-name "clojars-json.jar" 15 | :profiles {:uberjar {:aot :all}} 16 | :main clojars-json.core 17 | ) 18 | -------------------------------------------------------------------------------- /lib/parsers/cartfileprivate.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'https://carthageparser.herokuapp.com/cartfile.private', 8 | method : 'POST', 9 | formData: {body: str}, 10 | json: true 11 | }; 12 | 13 | return rp(options) 14 | .then( (dependencies) => { 15 | dependencies = dependencies.constructor === Array ? dependencies : []; 16 | 17 | return dependencies.reduce( (accum, dep) => { 18 | accum.push({ 19 | name: dep.name, 20 | version: dep.version, 21 | type: dep.type 22 | }); 23 | return accum; 24 | }, []); 25 | }); 26 | } 27 | 28 | module.exports = parser; 29 | -------------------------------------------------------------------------------- /lib/parsers/cartfileresolved.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'https://carthageparser.herokuapp.com/cartfile.resolved', 8 | method : 'POST', 9 | formData: {body: str}, 10 | json: true 11 | }; 12 | 13 | return rp(options) 14 | .then( (dependencies) => { 15 | dependencies = dependencies.constructor === Array ? dependencies : []; 16 | 17 | return dependencies.reduce( (accum, dep) => { 18 | accum.push({ 19 | name: dep.name, 20 | version: dep.version, 21 | type: dep.type 22 | }); 23 | return accum; 24 | }, []); 25 | }); 26 | } 27 | 28 | module.exports = parser; 29 | -------------------------------------------------------------------------------- /lib/parsers/hex.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'https://mix-deps-json.herokuapp.com/', 8 | method : 'POST', 9 | body: str 10 | }; 11 | 12 | return rp(options) 13 | .then( (res) => { 14 | var dependencies; 15 | 16 | try { dependencies = JSON.parse(res); } 17 | catch(err) { return []; } 18 | 19 | return Object.keys(dependencies) 20 | .reduce(function(accum, pkg) { 21 | 22 | accum.push({ 23 | name: pkg, 24 | version: dependencies[pkg], 25 | type: 'runtime' 26 | }); 27 | 28 | return accum; 29 | }, []); 30 | }); 31 | } 32 | 33 | module.exports = parser; 34 | -------------------------------------------------------------------------------- /lib/parsers/bower.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json.dependencies || []; 11 | var devDeps = json.devDependencies || []; 12 | 13 | 14 | Object.keys(runtimeDeps).forEach( (dep) => { 15 | deps.push({ 16 | name: dep, 17 | version: runtimeDeps[dep], 18 | type: 'runtime' 19 | }); 20 | }); 21 | 22 | Object.keys(devDeps).forEach( (dep) => { 23 | deps.push({ 24 | name: dep, 25 | version: devDeps[dep], 26 | type: 'development' 27 | }); 28 | 29 | }); 30 | 31 | return deps; 32 | } 33 | 34 | module.exports = parser; 35 | -------------------------------------------------------------------------------- /lib/parsers/cargo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Toml = require("toml"); 4 | 5 | function parser(str) { 6 | var toml; 7 | 8 | try { toml = Toml.parse(str); } 9 | catch(e) { throw new Error('Invalid TOML'); } 10 | 11 | var deps = []; 12 | var runtimeDeps = toml.dependencies || []; 13 | 14 | Object.keys(runtimeDeps).forEach( (dep) => { 15 | var version = runtimeDeps[dep]; 16 | if (typeof version === 'object') { 17 | if (!('version' in version)) { 18 | return; 19 | } 20 | version = version['version']; 21 | } 22 | deps.push({ 23 | name: dep, 24 | version: version, 25 | type: 'runtime' 26 | }); 27 | }); 28 | 29 | return deps; 30 | } 31 | 32 | module.exports = parser; 33 | -------------------------------------------------------------------------------- /lib/parsers/hex-lock.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'https://mix-deps-json.herokuapp.com/lock', 8 | method : 'POST', 9 | body: str 10 | }; 11 | 12 | return rp(options) 13 | .then( (res) => { 14 | var dependencies; 15 | 16 | try { dependencies = JSON.parse(res); } 17 | catch(err) { return []; } 18 | 19 | return Object.keys(dependencies) 20 | .reduce(function(accum, pkg) { 21 | 22 | accum.push({ 23 | name: pkg, 24 | version: dependencies[pkg].version, 25 | type: 'runtime' 26 | }); 27 | 28 | return accum; 29 | }, []); 30 | }); 31 | } 32 | 33 | module.exports = parser; 34 | -------------------------------------------------------------------------------- /test/fixtures/manifest: -------------------------------------------------------------------------------- 1 | { 2 | "version": 0, 3 | "dependencies": [ 4 | { 5 | "importpath": "github.com/kr/fs", 6 | "repository": "https://github.com/kr/fs", 7 | "revision": "2788f0dbd16903de03cb8186e5c7d97b69ad387b", 8 | "branch": "master", 9 | "path": "" 10 | }, 11 | { 12 | "importpath": "golang.org/x/crypto/ssh", 13 | "repository": "https://go.googlesource.com/crypto", 14 | "revision": "c10c31b5e94b6f7a0283272dc2bb27163dcea24b", 15 | "branch": "master", 16 | "path": "/ssh" 17 | }, 18 | { 19 | "importpath": "github.com/pkg/sftp", 20 | "repository": "https://github.com/pkg/sftp", 21 | "revision": "f234c3c6540c0358b1802f7fd90c0879af9232eb", 22 | "branch": "master", 23 | "path": "" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /lib/parsers/npm-shrinkwrap.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var npm = function(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | return pushDeps(json.dependencies); 10 | }; 11 | 12 | function pushDeps(dependencies) { 13 | var deps = [] 14 | Object.keys(dependencies).forEach( (dep) => { 15 | deps.push({ 16 | name: dep, 17 | version: dependencies[dep].version, 18 | type: 'runtime' 19 | }); 20 | var nested_deps = dependencies[dep].dependencies || {} 21 | if(Object.keys(nested_deps).length > 0){ 22 | pushDeps(nested_deps).forEach(function(dep){ deps.push(dep)}) 23 | }; 24 | }); 25 | 26 | return deps; 27 | }; 28 | 29 | module.exports = npm; 30 | -------------------------------------------------------------------------------- /lib/parsers/cargo-lock.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Toml = require("toml"); 4 | 5 | function parser(str) { 6 | var toml; 7 | 8 | try { toml = Toml.parse(str); } 9 | catch(e) { throw new Error('Invalid TOML'); } 10 | 11 | var deps = []; 12 | var runtimeDeps = toml.package || []; 13 | Object.keys(runtimeDeps).forEach( (dep) => { 14 | // Only treat packages from crates.io as meaningful dependencies. 15 | if (!('source' in runtimeDeps[dep]) || !runtimeDeps[dep].source.startsWith('registry+')) { 16 | return; 17 | } 18 | deps.push({ 19 | name: runtimeDeps[dep].name, 20 | version: runtimeDeps[dep].version, 21 | type: 'runtime' 22 | }); 23 | }); 24 | 25 | return deps; 26 | } 27 | 28 | module.exports = parser; 29 | -------------------------------------------------------------------------------- /lib/parsers/clojars.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'https://clojars-json.herokuapp.com/project.clj', 8 | method : 'POST', 9 | body: str 10 | }; 11 | 12 | return rp(options) 13 | .then( (proj) => { 14 | var proj = JSON.parse(proj) 15 | var index = proj.indexOf("dependencies"); 16 | 17 | if (index < 0) return []; 18 | 19 | var dependencies = proj[index + 1]; 20 | return dependencies.reduce( (accum, dep) => { 21 | accum.push({ 22 | name: dep[0], 23 | version: dep[1], 24 | type: "runtime" 25 | }); 26 | return accum; 27 | }, []); 28 | }); 29 | } 30 | 31 | module.exports = parser; 32 | -------------------------------------------------------------------------------- /lib/parsers/packagist.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var packagist = function(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | 11 | var runtimeDeps = json.require || []; 12 | var devDeps = json['require-dev'] || []; 13 | 14 | Object.keys(runtimeDeps).forEach( (dep) => { 15 | deps.push({ 16 | name: dep, 17 | version: runtimeDeps[dep], 18 | type: 'runtime' 19 | }); 20 | }); 21 | 22 | Object.keys(devDeps).forEach( (dep) => { 23 | deps.push({ 24 | name: dep, 25 | version: devDeps[dep], 26 | type: 'development' 27 | }); 28 | 29 | }); 30 | 31 | return deps; 32 | 33 | }; 34 | 35 | module.exports = packagist; 36 | -------------------------------------------------------------------------------- /lib/parsers/nuspec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Promise = require("bluebird"); 4 | var xml2js = Promise.promisifyAll(require('xml2js')); 5 | 6 | var nuspec = function(str) { 7 | return xml2js.parseStringAsync(str).then(function(json) { 8 | var deps = json.package.metadata[0].dependencies[0].dependency[0]; 9 | 10 | if (!Array.isArray(deps)) deps = [deps]; 11 | return deps.reduce(function(accum, dep) { 12 | dep = dep['$'] 13 | if (typeof dep === "undefined") return accum; 14 | accum.push({ 15 | name: dep.id, 16 | version: dep.version, 17 | type: 'runtime' 18 | }); 19 | return accum; 20 | }, []); 21 | }).catch(function (err) { 22 | return []; 23 | }); 24 | }; 25 | 26 | module.exports = nuspec; 27 | -------------------------------------------------------------------------------- /test/fixtures/mix.lock: -------------------------------------------------------------------------------- 1 | %{"cowboy": {:hex, :cowboy, "1.0.4", "a324a8df9f2316c833a470d918aaf73ae894278b8aa6226ce7a9bf699388f878", [:rebar, :make], [{:cowlib, "~> 1.0.0", [hex: :cowlib, optional: false]}, {:ranch, "~> 1.0", [hex: :ranch, optional: false]}]}, 2 | "cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [:make], []}, 3 | "plug": {:hex, :plug, "1.1.6", "8927e4028433fcb859e000b9389ee9c37c80eb28378eeeea31b0273350bf668b", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, optional: true]}]}, 4 | "poison": {:hex, :poison, "2.1.0", "f583218ced822675e484648fa26c933d621373f01c6c76bd00005d7bd4b82e27", [:mix], []}, 5 | "ranch": {:hex, :ranch, "1.2.1", "a6fb992c10f2187b46ffd17ce398ddf8a54f691b81768f9ef5f461ea7e28c762", [:make], []}} 6 | -------------------------------------------------------------------------------- /lib/parsers/cocoapods-lockfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var YAML = require('js-yaml'); 4 | 5 | function parser(str) { 6 | var yaml; 7 | 8 | try { yaml = YAML.load(str); } 9 | catch(e) { throw new Error('Invalid YAML'); } 10 | 11 | var deps = yaml.PODS || {}; 12 | 13 | return Object.keys(deps) 14 | .reduce(function(accum, dep) { 15 | var depStr = deps[dep]; 16 | 17 | if (typeof(deps[dep]) == 'object') depStr = Object.keys(deps[dep])[0]; 18 | var match = depStr.match(/(.+?)\s\((.+?)\)/i); 19 | 20 | if (match) { 21 | accum.push({ 22 | name: match[1].split('/')[0], 23 | version: match[2], 24 | type: 'runtime' 25 | }); 26 | } 27 | 28 | return accum; 29 | }, []); 30 | } 31 | 32 | module.exports = parser; 33 | -------------------------------------------------------------------------------- /lib/parsers/pub.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var YAML = require('js-yaml'); 4 | 5 | function parser(str) { 6 | var yaml; 7 | 8 | try { yaml = YAML.load(str); } 9 | catch(e) { throw new Error('Invalid YAML'); } 10 | 11 | var deps = []; 12 | var runtimeDeps = yaml.dependencies || []; 13 | var devDeps = yaml.dev_dependencies || []; 14 | 15 | 16 | Object.keys(runtimeDeps).forEach( (dep) => { 17 | deps.push({ 18 | name: dep, 19 | version: runtimeDeps[dep], 20 | type: 'runtime' 21 | }); 22 | }); 23 | 24 | Object.keys(devDeps).forEach( (dep) => { 25 | deps.push({ 26 | name: dep, 27 | version: devDeps[dep], 28 | type: 'development' 29 | }); 30 | 31 | }); 32 | 33 | return deps; 34 | } 35 | 36 | module.exports = parser; 37 | -------------------------------------------------------------------------------- /lib/parsers/dub.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json.dependencies || []; 11 | 12 | Object.keys(runtimeDeps).forEach( (dep) => { 13 | var version, type; 14 | 15 | if (typeof runtimeDeps[dep] === 'string') { 16 | version = runtimeDeps[dep]; 17 | type = 'runtime'; 18 | } else { 19 | version = runtimeDeps[dep].version; 20 | type = runtimeDeps[dep].optional ? 'optional' : 'runtime'; 21 | } 22 | 23 | deps.push({ 24 | name: dep, 25 | version: version, 26 | type: type 27 | }); 28 | }); 29 | 30 | return deps; 31 | } 32 | 33 | module.exports = parser; 34 | -------------------------------------------------------------------------------- /test/fixtures/Cartfile: -------------------------------------------------------------------------------- 1 | # Require version 2.3.1 or later 2 | github "ReactiveCocoa/ReactiveCocoa" >= 2.3.1 3 | 4 | # Require version 1.x 5 | github "Mantle/Mantle" ~> 1.0 # (1.0 or later, but less than 2.0) 6 | 7 | # Require exactly version 0.4.1 8 | github "jspahrsummers/libextobjc" == 0.4.1 9 | 10 | # Use the latest version 11 | github "jspahrsummers/xcconfigs" 12 | 13 | # Use the branch 14 | github "jspahrsummers/xcconfigs" "branch" 15 | 16 | # Use a project from GitHub Enterprise 17 | github "https://enterprise.local/ghe/desktop/git-error-translations" 18 | 19 | # Use a project from any arbitrary server, on the "development" branch 20 | git "https://enterprise.local/desktop/git-error-translations2.git" "development" 21 | 22 | # Use a local project 23 | git "file:///directory/to/project" "branch" 24 | -------------------------------------------------------------------------------- /test/fixtures/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "keywords": [ 5 | "css", 6 | "js", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "license": "MIT", 16 | "moduleType": "globals", 17 | "main": [ 18 | "less/bootstrap.less", 19 | "dist/js/bootstrap.js" 20 | ], 21 | "ignore": [ 22 | "/.*", 23 | "_config.yml", 24 | "CNAME", 25 | "composer.json", 26 | "CONTRIBUTING.md", 27 | "docs", 28 | "js/tests", 29 | "test-infra" 30 | ], 31 | "dependencies": { 32 | "jquery": ">= 1.9.1" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/parsers/shard.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var YAML = require('js-yaml'); 4 | 5 | function parser(str) { 6 | var yaml; 7 | 8 | try { yaml = YAML.load(str); } 9 | catch(e) { throw new Error('Invalid YAML'); } 10 | 11 | var deps = []; 12 | var runtimeDeps = yaml.dependencies || []; 13 | var devDeps = yaml.development_dependencies || []; 14 | 15 | Object.keys(runtimeDeps).forEach( dep => { 16 | deps.push({ 17 | name: dep, 18 | version: runtimeDeps[dep].version || '*', 19 | type: 'runtime' 20 | }); 21 | }); 22 | 23 | Object.keys(devDeps).forEach( dep => { 24 | deps.push({ 25 | name: dep, 26 | version: devDeps[dep].version || '*', 27 | type: 'development' 28 | }); 29 | }); 30 | 31 | 32 | return deps; 33 | 34 | } 35 | 36 | module.exports = parser; 37 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Thanks taking the time to contribute. This template should help guide you through the process of creating a pull request for review. Please erase any part of this template that is not relevant to your pull request: 2 | 3 | 4 | - [ ] Have you followed the guidelines for [contributors](http://docs.libraries.io/contributorshandbook)? 5 | - [ ] Have you checked to ensure there aren't other open pull requests on the repository for a similar change? 6 | - [ ] Is there a corresponding ticket for your pull request? 7 | - [ ] Have you written new tests for your changes? 8 | - [ ] Have you successfully run the project with your changes locally? 9 | 10 | If so then please replace this section with a link to the ticket(s) it addressed, an explanation of your change and why you think we should include it. Thanks again! 11 | -------------------------------------------------------------------------------- /lib/parsers/glide.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var YAML = require('js-yaml'); 4 | 5 | function parser(str) { 6 | var yaml; 7 | 8 | try { yaml = YAML.load(str); } 9 | catch(e) { throw new Error('Invalid YAML'); } 10 | 11 | var deps = []; 12 | var runtimeDeps = yaml.import || []; 13 | var devDeps = yaml.devImports || []; 14 | 15 | Object.keys(runtimeDeps).forEach( dep => { 16 | deps.push({ 17 | name: runtimeDeps[dep].package, 18 | version: runtimeDeps[dep].version || '>= 0', 19 | type: 'runtime' 20 | }); 21 | }); 22 | 23 | Object.keys(devDeps).forEach( dep => { 24 | deps.push({ 25 | name: devDeps[dep].package, 26 | version: devDeps[dep].version || '>= 0', 27 | type: 'development' 28 | }); 29 | }); 30 | 31 | return deps; 32 | 33 | } 34 | 35 | module.exports = parser; 36 | -------------------------------------------------------------------------------- /test/fixtures/META.yml: -------------------------------------------------------------------------------- 1 | --- 2 | abstract: 'Ocs-Inventory unified Agent for UNIX, Linux and MacOSX' 3 | build_requires: 4 | ExtUtils::MakeMaker: 6.59 5 | configure_requires: 6 | ExtUtils::MakeMaker: 6.59 7 | distribution_type: module 8 | dynamic_config: 1 9 | generated_by: 'Module::Install version 1.14' 10 | license: gpl 11 | meta-spec: 12 | url: http://module-build.sourceforge.net/META-spec-v1.4.html 13 | version: 1.4 14 | name: Ocsinventory-Unix-Agent 15 | no_index: 16 | directory: 17 | - inc 18 | recommends: 19 | Compress::Zlib: 0 20 | Net::IP: 0 21 | Nvidia::ml: 0 22 | Proc::Daemon: 0 23 | Proc::PID::File: 0 24 | requires: 25 | Digest::MD5: 0 26 | File::Temp: 0 27 | LWP: 0 28 | XML::Simple: 0 29 | perl: 5.6.0 30 | resources: 31 | license: http://opensource.org/licenses/gpl-license.php 32 | version: 2.2rc1 33 | -------------------------------------------------------------------------------- /lib/parsers/pypi-setup.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var INSTALL_REGEXP = /install_requires\s*=\s*\[([\s\S]*?)\]/ 4 | var REQUIRE_REGEXP = /([a-zA-Z0-9]+[a-zA-Z0-9-_\.]+)([><=\d\.,]+)?/; 5 | 6 | function parser(str) { 7 | var match = str.match(INSTALL_REGEXP) 8 | if (!match) return []; 9 | 10 | var deps = match[1].replace(/',(\s)?'/, "\n").split("\n").reduce( (accum, line) => { 11 | var line = line.trim() 12 | 13 | if(line.match(/^#/)) return accum; 14 | 15 | var match = line.match(REQUIRE_REGEXP); 16 | 17 | if (!match) return accum; 18 | 19 | let name = match[1], version = match[2] 20 | 21 | accum.push({ 22 | name: name, 23 | version: version || '*', 24 | type: 'runtime' 25 | }); 26 | 27 | return accum; 28 | }, []); 29 | 30 | return deps; 31 | } 32 | 33 | module.exports = parser; 34 | -------------------------------------------------------------------------------- /lib/parsers/nuget-packages.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Promise = require("bluebird"); 4 | var xml2js = Promise.promisifyAll(require('xml2js')); 5 | 6 | var nuget = function(str) { 7 | return xml2js.parseStringAsync(str).then(function(json) { 8 | 9 | if(json.packages && json.packages.package){ 10 | var deps = json.packages.package[0]; 11 | } else { 12 | return [] 13 | } 14 | 15 | if (!Array.isArray(deps)) deps = [deps]; 16 | return deps.reduce(function(accum, dep) { 17 | dep = dep['$'] 18 | if (typeof dep === "undefined") return accum; 19 | accum.push({ 20 | name: dep.id, 21 | version: dep.version, 22 | type: 'runtime' 23 | }); 24 | return accum; 25 | }, []); 26 | }).catch(function (err) { 27 | return []; 28 | }); 29 | }; 30 | 31 | module.exports = nuget; 32 | -------------------------------------------------------------------------------- /lib/parsers/ivy.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Promise = require("bluebird"); 4 | var xml2js = Promise.promisifyAll(require('xml2js')); 5 | 6 | var ivy = function(str) { 7 | return xml2js.parseStringAsync(str).then(function(json) { 8 | if(json['ivy-module'] && json['ivy-module']['dependencies']){ 9 | var deps = json['ivy-module']['dependencies'][0]['dependency']; 10 | } else { 11 | return [] 12 | } 13 | 14 | if (!Array.isArray(deps)) deps = [deps]; 15 | return deps.reduce(function(accum, dep) { 16 | dep = dep['$'] 17 | if (typeof dep === "undefined") return accum; 18 | accum.push({ 19 | name: dep.org + ":" + dep.name, 20 | version: dep.rev, 21 | type: 'runtime' 22 | }); 23 | return accum; 24 | }, []); 25 | }).catch(function (err) { 26 | return []; 27 | }); 28 | }; 29 | 30 | module.exports = ivy; 31 | -------------------------------------------------------------------------------- /test/fixtures/composer2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twbs/bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "keywords": [ 5 | "css", 6 | "js", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "authors": [ 16 | { 17 | "name": "Mark Otto", 18 | "email": "markdotto@gmail.com" 19 | }, 20 | { 21 | "name": "Jacob Thornton", 22 | "email": "jacobthornton@gmail.com" 23 | } 24 | ], 25 | "support": { 26 | "issues": "https://github.com/twbs/bootstrap/issues" 27 | }, 28 | "license": "MIT", 29 | "extra": { 30 | "branch-alias": { 31 | "dev-master": "3.3.x-dev" 32 | } 33 | }, 34 | "replace": { 35 | "twitter/bootstrap": "self.version" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/parsers/rubygems-lockfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Source: https://github.com/bundler/bundler/blob/master/lib/bundler/lockfile_parser.rb#L134-L137 4 | 5 | var NAME_VERSION = '(?! )(.*?)(?: \(([^-]*)(?:-(.*))?\))?'; 6 | var NAME_VERSION_2 = new RegExp(`^ {2}${NAME_VERSION}(!)?$`); 7 | var NAME_VERSION_4 = new RegExp(`^ {4}${NAME_VERSION}$`); 8 | var NAME_VERSION_6 = new RegExp(`^ {6}${NAME_VERSION}$`); 9 | 10 | function parser(str) { 11 | if (!str) return []; 12 | 13 | var deps = str.split('\n').reduce( (accum, line) => { 14 | var match = line.match(NAME_VERSION_4); 15 | if (!match) return accum; 16 | 17 | var name = match[1]; 18 | var version = match[2].replace(/\(|\)/g,''); 19 | 20 | accum.push({ 21 | name: name, 22 | version: version, 23 | type: 'runtime' 24 | }); 25 | 26 | return accum; 27 | }, []); 28 | 29 | return deps; 30 | } 31 | 32 | module.exports = parser; 33 | -------------------------------------------------------------------------------- /lib/parsers/swift.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var rp = require('request-promise'); 4 | 5 | function parser(str) { 6 | var options = { 7 | uri : 'http://swift.libraries.io/to-json', 8 | method : 'POST', 9 | body: str 10 | }; 11 | 12 | return rp(options) 13 | .then( (res) => { 14 | var dependencies; 15 | 16 | try { dependencies = JSON.parse(res).dependencies; } 17 | catch(err) { return []; } 18 | return Object.keys(dependencies) 19 | .reduce(function(accum, pkg) { 20 | var dep = dependencies[pkg] 21 | 22 | var name = dep['url'].replace(/^https?:\/\//, '').replace(/\.git$/,'') 23 | var version = dep['version'].lowerBound + ' - ' + dep['version'].upperBound 24 | accum.push({ 25 | name: name, 26 | version: version, 27 | type: 'runtime' 28 | }); 29 | 30 | return accum; 31 | }, []); 32 | }); 33 | } 34 | 35 | module.exports = parser; 36 | -------------------------------------------------------------------------------- /test/fixtures/mix.exs: -------------------------------------------------------------------------------- 1 | defmodule Mixup.Mixfile do 2 | use Mix.Project 3 | 4 | def project do 5 | [app: :mixup, 6 | version: "0.0.1", 7 | elixir: "~> 1.0", 8 | deps: deps, 9 | default_task: "server"] 10 | end 11 | 12 | # Configuration for the OTP application 13 | # 14 | # Type `mix help compile.app` for more information 15 | def application do 16 | [applications: [:logger, :cowboy, :plug]] 17 | end 18 | 19 | # defp escript_config do 20 | # [main_module: Servelet] 21 | # end 22 | 23 | # Dependencies can be Hex packages: 24 | # 25 | # {:mydep, "~> 0.3.0"} 26 | # 27 | # Or git/path repositories: 28 | # 29 | # {:mydep, git: "https://github.com/elixir-lang/mydep.git", tag: "0.1.0"} 30 | # 31 | # Type `mix help deps` for more examples and options 32 | defp deps do 33 | [{:poison, "~> 1.3.1"}, 34 | {:plug, "~> 0.11.0"}, 35 | {:cowboy, "~> 1.0.0"}] 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /test/fixtures/build.sbt: -------------------------------------------------------------------------------- 1 | import com.typesafe.tools.mima.plugin.{MimaPlugin, MimaKeys} 2 | 3 | scalaModuleSettings 4 | 5 | name := "scala-parser-combinators" 6 | 7 | version := "1.0.5-SNAPSHOT" 8 | 9 | crossScalaVersions in ThisBuild := { 10 | val javaVersion = System.getProperty("java.version") 11 | val isJDK6Or7 = 12 | javaVersion.startsWith("1.6.") || javaVersion.startsWith("1.7.") 13 | if (isJDK6Or7) 14 | Seq("2.11.7") 15 | else 16 | Seq("2.11.7", "2.12.0-M3") 17 | } 18 | 19 | // important!! must come here (why?) 20 | scalaModuleOsgiSettings 21 | 22 | OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}") 23 | 24 | // needed to fix classloader issues (see scala-xml#20) 25 | fork in Test := true 26 | 27 | libraryDependencies += "junit" % "junit" % "4.11" % "test" 28 | 29 | libraryDependencies += "com.novocode" % "junit-interface" % "0.10" % "test" 30 | 31 | mimaPreviousVersion := Some("1.0.2") 32 | -------------------------------------------------------------------------------- /lib/parsers/packagist-lockfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var packagistLockfile = function(str) { 4 | var json; 5 | try { json = JSON.parse(str); } catch(err) { return []; } 6 | 7 | var runtimeDeps = []; 8 | var devDeps = []; 9 | 10 | var deps = json.packages; 11 | if(deps) { 12 | runtimeDeps = Object.keys(deps) 13 | .reduce(function(accum, dep) { 14 | accum.push({ 15 | name: deps[dep].name, 16 | version: deps[dep].version, 17 | type: 'runtime' 18 | }); 19 | return accum; 20 | }, []); 21 | } 22 | 23 | var deps = json['packages-dev']; 24 | if(deps) { 25 | devDeps = Object.keys(deps) 26 | .reduce(function(accum, dep) { 27 | accum.push({ 28 | name: deps[dep].name, 29 | version: deps[dep].version, 30 | type: 'development' 31 | }); 32 | return accum; 33 | }, []); 34 | } 35 | 36 | return runtimeDeps.concat(devDeps); 37 | }; 38 | 39 | module.exports = packagistLockfile; 40 | -------------------------------------------------------------------------------- /test/fixtures/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "laravel/framework": "5.0.*" 9 | }, 10 | "require-dev": { 11 | "phpunit/phpunit": "~4.0", 12 | "phpspec/phpspec": "~2.1" 13 | }, 14 | "autoload": { 15 | "classmap": [ 16 | "database" 17 | ], 18 | "psr-4": { 19 | "App\\": "app/" 20 | } 21 | }, 22 | "autoload-dev": { 23 | "classmap": [ 24 | "tests/TestCase.php" 25 | ] 26 | }, 27 | "scripts": { 28 | "post-install-cmd": [ 29 | "php artisan clear-compiled", 30 | "php artisan optimize" 31 | ], 32 | "post-update-cmd": [ 33 | "php artisan clear-compiled", 34 | "php artisan optimize" 35 | ], 36 | "post-create-project-cmd": [ 37 | "php -r \"copy('.env.example', '.env');\"", 38 | "php artisan key:generate" 39 | ] 40 | }, 41 | "config": { 42 | "preferred-install": "dist" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /test/fixtures/dpkg: -------------------------------------------------------------------------------- 1 | Desired=Unknown/Install/Remove/Purge/Hold 2 | | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend 3 | |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) 4 | ||/ Name Version Description 5 | +++-================================-=================================-========================================================================== 6 | ii accountsservice 0.6.15-2ubuntu9.6 query and manipulate user account information 7 | ii acpid 1:2.0.10-1ubuntu3 Advanced Configuration and Power Interface event daemon 8 | ii adduser 3.113ubuntu2 add and remove users and groups 9 | ii apparmor 2.7.102-0ubuntu3.9 User-space parser utility for AppArmor 10 | ii apt 0.8.16~exp12ubuntu10.12 commandline package manager 11 | -------------------------------------------------------------------------------- /lib/parsers/gradle.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var g2js = require('gradle-to-js/lib/parser'); 4 | 5 | var gradle = function(str) { 6 | return g2js.parseText(str).then(function(json) { 7 | if(json['dependencies'] && json['dependencies']['compile']){ 8 | var deps = json['dependencies']['compile']; 9 | } else { 10 | return [] 11 | } 12 | 13 | if (!Array.isArray(deps)) deps = [deps]; 14 | return deps.reduce(function(accum, dep) { 15 | if (typeof dep !== 'string' || !dep.match(/[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+(\.[A-Za-z0-9_-])?\:[A-Za-z0-9_-]+\:/)) return accum; 16 | var parts = dep.split(':') 17 | var name = parts.slice(0, -1).join(':') 18 | var version = parts[parts.length -1] 19 | accum.push({ 20 | name: name, 21 | version: version, 22 | type: 'runtime' 23 | }); 24 | return accum; 25 | }, []); 26 | }).catch(function (err) { 27 | console.log(err) 28 | return []; 29 | }); 30 | }; 31 | 32 | module.exports = gradle; 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "librarian-parsers", 3 | "version": "2.2.11", 4 | "description": "Dependency manifest parsers for Libraries.io", 5 | "main": "lib/parsers/index.js", 6 | "scripts": { 7 | "test": "mocha" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/librariesio/librarian-parsers.git" 12 | }, 13 | "keywords": [ 14 | "dependency", 15 | "manifest", 16 | "parsers", 17 | "libraries.io" 18 | ], 19 | "author": "Andrew Nesbitt", 20 | "license": "AGPL-3.0", 21 | "bugs": { 22 | "url": "https://github.com/librariesio/librarian-parsers/issues" 23 | }, 24 | "homepage": "https://github.com/librariesio/librarian-parsers", 25 | "dependencies": { 26 | "bluebird": "^3.3.4", 27 | "gradle-to-js": "^0.2.5", 28 | "js-yaml": "^3.5.5", 29 | "readcontrol": "^1.0.0", 30 | "request": "^2.73.0", 31 | "request-promise": "^4.0.0", 32 | "toml": "^2.3.0", 33 | "xml2js": "^0.4.16", 34 | "yarn": "^0.21.0" 35 | }, 36 | "devDependencies": { 37 | "mocha": "^3.0.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test/fixtures/devise.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | $:.push File.expand_path("../lib", __FILE__) 3 | require "devise/version" 4 | 5 | Gem::Specification.new do |s| 6 | s.name = "devise" 7 | s.version = Devise::VERSION.dup 8 | s.platform = Gem::Platform::RUBY 9 | s.licenses = ["MIT"] 10 | s.summary = "Flexible authentication solution for Rails with Warden" 11 | s.email = "contact@plataformatec.com.br" 12 | s.homepage = "https://github.com/plataformatec/devise" 13 | s.description = "Flexible authentication solution for Rails with Warden" 14 | s.authors = ['José Valim', 'Carlos Antônio'] 15 | 16 | s.files = `git ls-files`.split("\n") 17 | s.test_files = `git ls-files -- test/*`.split("\n") 18 | s.require_paths = ["lib"] 19 | s.required_ruby_version = '>= 1.9.3' 20 | 21 | s.add_dependency("warden", "~> 1.2.3") 22 | s.add_development_dependency("orm_adapter", "~> 0.1") 23 | s.add_dependency("bcrypt", "~> 3.0") 24 | s.add_dependency("thread_safe", "~> 0.1") 25 | s.add_dependency("railties", ">= 3.2.6", "< 5") 26 | s.add_dependency("responders") 27 | end 28 | -------------------------------------------------------------------------------- /test/fixtures/DESCRIPTION2: -------------------------------------------------------------------------------- 1 | Package: data.table 2 | Version: 1.9.6 3 | Title: Extension of Data.frame 4 | Author: M Dowle, A Srinivasan, T Short, S Lianoglou with contributions from R Saporta, E Antonyan 5 | Maintainer: Matt Dowle 6 | Depends: R (>= 2.14.1) 7 | Imports: methods, chron 8 | Suggests: ggplot2 (>= 0.9.0), plyr, reshape, reshape2, testthat (>= 9 | 0.4), hexbin, fastmatch, nlme, xts, bit64, gdata, 10 | GenomicRanges, caret, knitr, curl, zoo, plm 11 | Description: Fast aggregation of large data (e.g. 100GB in RAM), fast ordered joins, fast add/modify/delete of columns by group using no copies at all, list columns and a fast file reader (fread). Offers a natural and flexible syntax, for faster development. 12 | License: GPL (>= 2) 13 | URL: https://github.com/Rdatatable/data.table/wiki 14 | BugReports: https://github.com/Rdatatable/data.table/issues 15 | MailingList: datatable-help@lists.r-forge.r-project.org 16 | VignetteBuilder: knitr 17 | ByteCompile: TRUE 18 | NeedsCompilation: yes 19 | Packaged: 2015-09-19 04:47:43.628 UTC; mdowle 20 | Repository: CRAN 21 | Date/Publication: 2015-09-19 22:13:43 22 | -------------------------------------------------------------------------------- /lib/parsers/npm.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function parser(str) { 4 | var json; 5 | 6 | try { json = JSON.parse(str); } 7 | catch(e) { throw new Error('Invalid JSON'); } 8 | 9 | var deps = []; 10 | var runtimeDeps = json.dependencies || []; 11 | var devDeps = json.devDependencies || []; 12 | var optionalDeps = json.optionalDependencies || []; 13 | var peerDeps = json.peerDependencies || []; 14 | 15 | Object.keys(runtimeDeps).forEach( (dep) => { 16 | deps.push({ 17 | name: dep, 18 | version: runtimeDeps[dep], 19 | type: 'runtime' 20 | }); 21 | }); 22 | 23 | Object.keys(devDeps).forEach( (dep) => { 24 | deps.push({ 25 | name: dep, 26 | version: devDeps[dep], 27 | type: 'development' 28 | }); 29 | }); 30 | 31 | Object.keys(optionalDeps).forEach( (dep) => { 32 | deps.push({ 33 | name: dep, 34 | version: optionalDeps[dep], 35 | type: 'optional' 36 | }); 37 | }); 38 | 39 | Object.keys(peerDeps).forEach( (dep) => { 40 | deps.push({ 41 | name: dep, 42 | version: peerDeps[dep], 43 | type: 'peer' 44 | }); 45 | }); 46 | 47 | return deps; 48 | } 49 | 50 | module.exports = parser; 51 | -------------------------------------------------------------------------------- /test/fixtures/vendor.json: -------------------------------------------------------------------------------- 1 | { 2 | "comment": "", 3 | "ignore": "test", 4 | "package": [ 5 | { 6 | "checksumSHA1": "rcwA7Jmo3eZ4bEQb8mTI78haZfc=", 7 | "path": "github.com/Bowery/prompt", 8 | "revision": "d43c2707a6c5a152a344c64bb4fed657e2908a81", 9 | "revisionTime": "2016-08-08T16:52:56Z" 10 | }, 11 | { 12 | "checksumSHA1": "6VGFARaK8zd23IAiDf7a+gglC8k=", 13 | "path": "github.com/dchest/safefile", 14 | "revision": "855e8d98f1852d48dde521e0522408d1fe7e836a", 15 | "revisionTime": "2015-10-22T12:31:44+02:00" 16 | }, 17 | { 18 | "checksumSHA1": "3VJcSYFds0zeIO5opOs0AoKm3Mw=", 19 | "path": "github.com/google/shlex", 20 | "revision": "6f45313302b9c56850fc17f99e40caebce98c716", 21 | "revisionTime": "2015-01-27T13:39:51Z" 22 | }, 23 | { 24 | "checksumSHA1": "GcaTbmmzSGqTb2X6qnNtmDyew1Q=", 25 | "path": "github.com/pkg/errors", 26 | "revision": "a2d6902c6d2a2f194eb3fb474981ab7867c81505", 27 | "revisionTime": "2016-06-27T22:23:52Z" 28 | }, 29 | { 30 | "checksumSHA1": "uwKP1AVzd+lrTMlXVFjZXXHzB7U=", 31 | "path": "golang.org/x/tools/go/vcs", 32 | "revision": "1727758746e7a08feaaceb9366d1468498ac2ac2", 33 | "revisionTime": "2016-06-24T22:27:06Z" 34 | } 35 | ], 36 | "rootPath": "github.com/kardianos/govendor" 37 | } 38 | -------------------------------------------------------------------------------- /test/fixtures/example.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bottles 5 | 0.0.0 6 | Jeremy D. Miller, Dru Sellers, et al. 7 | Jeremy D. Miller 8 | https://github.com/DarthFubuMVC/bottles/raw/master/license.txt 9 | http://fubumvc.com 10 | https://github.com/DarthFubuMVC/bottles/raw/master/doc/logo/FubuMVC_Logo_package_icon.png 11 | false 12 | Shared libraries for runtime and deployment packaging of .Net applications 13 | packaging areas slices 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /lib/parsers/maven.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Promise = require("bluebird"); 4 | var xml2js = Promise.promisifyAll(require('xml2js')); 5 | 6 | var readProp = function(json, prop) { 7 | if(prop && String(prop).match(/^\$\{(.+)\}/)){ 8 | return json.project.properties[0][String(prop).match(/^\$\{(.+)\}/)[1]][0] 9 | } else { 10 | return prop 11 | } 12 | } 13 | 14 | var maven = function(str) { 15 | return xml2js.parseStringAsync(str).then(function(json) { 16 | if(json.project && json.project.dependencies){ 17 | var deps = json.project.dependencies[0].dependency; 18 | } else { 19 | var deps = [] 20 | } 21 | if (!Array.isArray(deps)) deps = [deps]; 22 | if(json.project.dependencyManagement && json.project.dependencyManagement.dependencies){ 23 | deps = deps.concat(json.project.dependencyManagement.dependencies[0].dependency) 24 | } 25 | return deps.reduce(function(accum, dep) { 26 | if (typeof dep === "undefined") return accum; 27 | accum.push({ 28 | name: readProp(json, dep.groupId) + ":" + readProp(json, dep.artifactId), 29 | version: readProp(json, dep.version) || '*', 30 | type: readProp(json, dep.scope) || 'runtime' 31 | }); 32 | return accum; 33 | }, []); 34 | 35 | }).catch(function (err) { 36 | return []; 37 | }); 38 | }; 39 | 40 | module.exports = maven; 41 | -------------------------------------------------------------------------------- /test/fixtures/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | setup(name='political-memory', 4 | version='0.0.1', 5 | description='OpenShift App', 6 | packages=['political_memory'], 7 | package_dir={'political_memory': '.'}, 8 | author='James Pic, Laurent Peuch, Arnaud Fabre', 9 | author_email='cortex@worlddomination.be', 10 | url='http://github.com/political-memory/political_memory/', 11 | install_requires=[ 12 | # -*- Install requires: -*- 13 | 'django-bootstrap3>=6.2,<6.3', 14 | 'lesscpy', 15 | 'unicodecsv==0.14.1', 16 | 'django-coffeescript>=0.7,<0.8', 17 | 'django-compressor>=1.6,<1.7', 18 | 'django-datetime-widget>=0.9,<1.0', 19 | 'django-filter>=0.11,<0.12', 20 | 'django-representatives-votes>=0.0.13', 21 | 'django-representatives>=0.0.14', 22 | 'django-taggit>=0.17,<0.18', 23 | 'django>=1.8,<1.9', 24 | 'djangorestframework>=3.2.0,<3.3.0', 25 | 'hamlpy>=0.82,<0.83', 26 | 'ijson>=2.2,<2.3', 27 | 'python-dateutil>=2.4,<2.5', 28 | 'pytz==2015.7', 29 | 'django-suit', 30 | ], 31 | extras_require={ 32 | 'testing': [ 33 | 'django-responsediff', 34 | 'flake8', 35 | 'pep8', 36 | 'pytest', 37 | 'pytest-django', 38 | 'pytest-cov', 39 | 'codecov', 40 | ] 41 | } 42 | ) 43 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Thanks for taking the time to raise an issue. This template should guide you through the process of submitting a bug, enhancement or feature request. Please erase any part of this template that is not relevant to your issue. 2 | 3 | ## Bugs 4 | Before submitting a bug report: 5 | 6 | - [ ] Double-check that the bug is persistent, 7 | - [ ] Double-check the bug hasn't already been reported [on our issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio), they *should* be labelled `bug` or `bugsnag`. 8 | 9 | If you have completed those steps then please replace this section with a description of the steps taken to recreate the bug, the expected behavior and the observed behavior. 10 | 11 | ## Enhancements and Features 12 | 13 | Before submitting an enhancement or feature request: 14 | 15 | - [ ] Check that the enhancement is not already [in our issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio), they should be labelled 'enhancement'., 16 | - [ ] For large feature requests, check that your request aligns with our strategy http://docs.libraries.io/strategy. 17 | 18 | If you have complete the above step then please replace this section with a description of your proposed enhancement or feature, the motivation for it, an approach and any alternative approaches considered, and whether you are willing and able to create a pull request for it. Note that we may close this issue if it's not something we're planning on working on. -------------------------------------------------------------------------------- /test/fixtures/versions.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [ 3 | [ 4 | "accounts-base", 5 | "1.1.2" 6 | ], 7 | [ 8 | "application-configuration", 9 | "1.0.3" 10 | ], 11 | [ 12 | "base64", 13 | "1.0.1" 14 | ], 15 | [ 16 | "binary-heap", 17 | "1.0.1" 18 | ], 19 | [ 20 | "callback-hook", 21 | "1.0.1" 22 | ], 23 | [ 24 | "check", 25 | "1.0.2" 26 | ], 27 | [ 28 | "ddp", 29 | "1.0.11" 30 | ], 31 | [ 32 | "ejson", 33 | "1.0.4" 34 | ], 35 | [ 36 | "follower-livedata", 37 | "1.0.2" 38 | ], 39 | [ 40 | "geojson-utils", 41 | "1.0.1" 42 | ], 43 | [ 44 | "id-map", 45 | "1.0.1" 46 | ], 47 | [ 48 | "json", 49 | "1.0.1" 50 | ], 51 | [ 52 | "localstorage", 53 | "1.0.1" 54 | ], 55 | [ 56 | "logging", 57 | "1.0.5" 58 | ], 59 | [ 60 | "meteor", 61 | "1.1.3" 62 | ], 63 | [ 64 | "minimongo", 65 | "1.0.5" 66 | ], 67 | [ 68 | "mongo", 69 | "1.0.8" 70 | ], 71 | [ 72 | "ordered-dict", 73 | "1.0.1" 74 | ], 75 | [ 76 | "random", 77 | "1.0.1" 78 | ], 79 | [ 80 | "reactive-dict", 81 | "1.0.4" 82 | ], 83 | [ 84 | "retry", 85 | "1.0.1" 86 | ], 87 | [ 88 | "service-configuration", 89 | "1.0.2" 90 | ], 91 | [ 92 | "session", 93 | "1.0.4" 94 | ], 95 | [ 96 | "tracker", 97 | "1.0.3" 98 | ], 99 | [ 100 | "underscore", 101 | "1.0.1" 102 | ] 103 | ], 104 | "pluginDependencies": [], 105 | "toolVersion": "meteor-tool@1.0.35", 106 | "format": "1.0" 107 | } 108 | -------------------------------------------------------------------------------- /test/fixtures/Project.json: -------------------------------------------------------------------------------- 1 | { 2 | "webroot": "wwwroot", 3 | "exclude": [ 4 | "wwwroot", 5 | "bower_components", 6 | "node_modules", 7 | "grunt" 8 | ], 9 | "publishExclude": [ 10 | "bower.json", 11 | "package.json", 12 | "gruntfile.js", 13 | "bower_components", 14 | "node_modules", 15 | "grunt" 16 | ], 17 | "authors": [ 18 | "Microsoft" 19 | ], 20 | "description": "Music store application on K as a SPA", 21 | "compilationOptions": { 22 | "define": [ 23 | "DEBUG" 24 | ] 25 | }, 26 | "dependencies": { 27 | "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta7", 28 | "Microsoft.AspNet.Server.IIS": "1.0.0-beta7", 29 | "Microsoft.AspNet.Mvc": "6.0.0-beta7", 30 | "Microsoft.AspNet.Server.WebListener": "1.0.0-beta7", 31 | "Microsoft.AspNet.StaticFiles": "1.0.0-beta7", 32 | "EntityFramework.InMemory": "7.0.0-beta7", 33 | "EntityFramework.SqlServer": "7.0.0-beta7", 34 | "Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta7", 35 | "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta7", 36 | "Microsoft.Framework.Configuration": "1.0.0-beta7", 37 | "Microsoft.Framework.Configuration.EnvironmentVariables": "1.0.0-beta7", 38 | "Microsoft.Framework.Configuration.Json": "1.0.0-beta7", 39 | "AutoMapper": "4.0.0-alpha1" 40 | }, 41 | "commands": { 42 | "WebListener": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5102", 43 | "Kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5104", 44 | "run": "run server.urls=http://localhost:5103" 45 | }, 46 | "frameworks": { 47 | "dnx451": {}, 48 | "dnxcore50": {} 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # [Librarian Parsers](http://libraries.io/npm/librarian-parsers) 2 | [![Build Status](https://travis-ci.org/librariesio/librarian-parsers.svg?branch=master)](https://travis-ci.org/librariesio/librarian-parsers) 3 | [![npm version](https://badge.fury.io/js/librarian-parsers.svg)](http://badge.fury.io/js/librarian-parsers) 4 | [![Dependency Status](https://david-dm.org/librariesio/librarian-parsers.svg?theme=shields.io)](https://david-dm.org/librariesio/librarian-parsers) 5 | [![devDependency Status](https://david-dm.org/librariesio/librarian-parsers/dev-status.svg?theme=shields.io)](https://david-dm.org/librariesio/librarian-parsers#info=devDependencies) 6 | [![Gitter chat](http://img.shields.io/badge/gitter-librariesio/support-brightgreen.svg)](https://gitter.im/librariesio/support) 7 | 8 | :warning: This repository has been replaced with [Bibliothecary](https://github.com/librariesio/bibliothecary) and will not be updated anymore :warning: 9 | 10 | Dependency manifest parsers for [Libraries.io](https://libraries.io) 11 | 12 | ## Install 13 | 14 | ```bash 15 | npm install librarian-parsers 16 | ``` 17 | 18 | ## Usage 19 | 20 | ```javascript 21 | var parsers = require('librarian-parsers'); 22 | parsers.parse(platform, manifestString) 23 | ``` 24 | 25 | ## Development 26 | 27 | Source hosted at [GitHub](http://github.com/librariesio/librarian-parsers). 28 | Report Issues/Feature requests on [GitHub Issues](http://github.com/librariesio/librarian-parsers/issues). 29 | 30 | ### Note on Patches/Pull Requests 31 | 32 | * Fork the project. 33 | * Make your feature addition or bug fix. 34 | * Add tests for it. This is important so I don't break it in a future version unintentionally. 35 | * Send me a pull request. Bonus points for topic branches. 36 | 37 | ## License 38 | 39 | Copyright (c) 2017 Andrew Nesbitt, Licensed under GNU Affero General Public License. See [LICENSE](https://github.com/librariesio/librarian-parsers/blob/master/LICENSE.txt) for details. 40 | -------------------------------------------------------------------------------- /test/fixtures/Godeps.json: -------------------------------------------------------------------------------- 1 | { 2 | "ImportPath": "gitlab.com/gitlab-org/gitlab-ci-multi-runner", 3 | "GoVersion": "go1.4.2", 4 | "Packages": [ 5 | "./..." 6 | ], 7 | "Deps": [ 8 | { 9 | "ImportPath": "github.com/BurntSushi/toml", 10 | "Comment": "v0.1.0-9-g3883ac1", 11 | "Rev": "3883ac1ce943878302255f538fce319d23226223" 12 | }, 13 | { 14 | "ImportPath": "github.com/Sirupsen/logrus", 15 | "Comment": "v0.8.7", 16 | "Rev": "418b41d23a1bf978c06faea5313ba194650ac088" 17 | }, 18 | { 19 | "ImportPath": "github.com/ayufan/golang-kardianos-service", 20 | "Rev": "9ce7ccf10c81705a8880170bbf506bd539bc69b2" 21 | }, 22 | { 23 | "ImportPath": "github.com/codegangsta/cli", 24 | "Comment": "1.2.0-139-g142e6cd", 25 | "Rev": "142e6cd241a4dfbf7f07a018f1f8225180018da4" 26 | }, 27 | { 28 | "ImportPath": "github.com/fsouza/go-dockerclient", 29 | "Rev": "163268693e2cf8be2920158b59ef438fc77b85e2" 30 | }, 31 | { 32 | "ImportPath": "github.com/golang/mock/gomock", 33 | "Rev": "06883d979f10cc178f2716846215c8cf90f9e363" 34 | }, 35 | { 36 | "ImportPath": "github.com/kardianos/osext", 37 | "Rev": "efacde03154693404c65e7aa7d461ac9014acd0c" 38 | }, 39 | { 40 | "ImportPath": "github.com/ramr/go-reaper", 41 | "Rev": "1a6cbc07ef2f7e248769ef4efd80aaa16f97ec12" 42 | }, 43 | { 44 | "ImportPath": "github.com/stretchr/objx", 45 | "Rev": "cbeaeb16a013161a98496fad62933b1d21786672" 46 | }, 47 | { 48 | "ImportPath": "github.com/stretchr/testify/assert", 49 | "Rev": "1297dc01ed0a819ff634c89707081a4df43baf6b" 50 | }, 51 | { 52 | "ImportPath": "github.com/stretchr/testify/mock", 53 | "Rev": "1297dc01ed0a819ff634c89707081a4df43baf6b" 54 | }, 55 | { 56 | "ImportPath": "gitlab.com/ayufan/golang-cli-helpers", 57 | "Rev": "0a14b63a7466ee44de4a90f998fad73afa8482bf" 58 | }, 59 | { 60 | "ImportPath": "golang.org/x/crypto/ssh", 61 | "Rev": "1351f936d976c60a0a48d728281922cf63eafb8d" 62 | }, 63 | { 64 | "ImportPath": "gopkg.in/yaml.v1", 65 | "Rev": "9f9df34309c04878acc86042b16630b0f696e1de" 66 | } 67 | ] 68 | } 69 | -------------------------------------------------------------------------------- /test/fixtures/META.json: -------------------------------------------------------------------------------- 1 | { 2 | "abstract" : "CPU/RAM/battery stats chart bar for tmux (and GNU screen)", 3 | "author" : [ 4 | "Stanislaw Pusep " 5 | ], 6 | "dynamic_config" : 0, 7 | "generated_by" : "Module::Build version 0.4214", 8 | "license" : [ 9 | "perl_5" 10 | ], 11 | "meta-spec" : { 12 | "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", 13 | "version" : "2" 14 | }, 15 | "name" : "App-rainbarf", 16 | "prereqs" : { 17 | "build" : { 18 | "requires" : { 19 | "English" : "1.00", 20 | "Test::More" : "0.45" 21 | } 22 | }, 23 | "configure" : { 24 | "requires" : { 25 | "Module::Build" : "0.28" 26 | } 27 | }, 28 | "runtime" : { 29 | "requires" : { 30 | "Getopt::Long" : "2.32", 31 | "List::Util" : "1.07_00", 32 | "Pod::Usage" : "1.14", 33 | "Storable" : "2.04", 34 | "Term::ANSIColor" : "1.04", 35 | "perl" : "5.008" 36 | } 37 | } 38 | }, 39 | "provides" : { 40 | "App::rainbarf" : { 41 | "file" : "lib/App/rainbarf.pm", 42 | "version" : "1.3" 43 | } 44 | }, 45 | "release_status" : "stable", 46 | "resources" : { 47 | "bugtracker" : { 48 | "web" : "https://github.com/creaktive/rainbarf/issues" 49 | }, 50 | "homepage" : "https://github.com/creaktive/rainbarf", 51 | "repository" : { 52 | "type" : "git", 53 | "url" : "git://github.com/creaktive/rainbarf.git" 54 | } 55 | }, 56 | "version" : "1.3", 57 | "x_contributors" : [ 58 | "Chris Knadler ", 59 | "Clemens Hammacher ", 60 | "H.Merijn Brand ", 61 | "Henrik Hodne ", 62 | "Joe Hassick ", 63 | "Josh Matthews ", 64 | "Sergey Romanov ", 65 | "Tom Cammann ", 66 | "Tuomas Jormola " 67 | ], 68 | "x_serialization_backend" : "JSON::PP version 2.27300" 69 | } 70 | -------------------------------------------------------------------------------- /test/fixtures/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | source 'https://github.com/artsy/Specs.git' 3 | 4 | plugin 'cocoapods-keys', { 5 | :project => 'Eidolon', 6 | :keys => [ 7 | 'ArtsyAPIClientSecret', 8 | 'ArtsyAPIClientKey', 9 | 'HockeyProductionSecret', 10 | 'HockeyBetaSecret', 11 | 'MixpanelProductionAPIClientKey', 12 | 'MixpanelStagingAPIClientKey', 13 | 'CardflightProductionAPIClientKey', 14 | 'CardflightProductionMerchantAccountToken', 15 | 'StripeProductionPublishableKey', 16 | 'CardflightStagingAPIClientKey', 17 | 'CardflightStagingMerchantAccountToken', 18 | 'StripeStagingPublishableKey' 19 | ] 20 | } 21 | 22 | platform :ios, '8.0' 23 | use_frameworks! 24 | 25 | # Yep. 26 | inhibit_all_warnings! 27 | 28 | # Artsy stuff 29 | pod 'Artsy+UIColors' 30 | pod 'Artsy+UILabels' 31 | pod 'Artsy-UIButtons' 32 | 33 | if ['orta', 'ash', 'artsy', 'Laura', 'CI', 'distiller', 'travis'].include?(ENV['USER']) 34 | pod 'Artsy+UIFonts', '~> 1.1.0' 35 | else 36 | pod 'Artsy+OSSUIFonts', '~> 1.1.0' 37 | end 38 | 39 | pod 'ORStackView' 40 | pod 'FLKAutoLayout' 41 | pod 'ISO8601DateFormatter', '0.7' 42 | pod 'ARCollectionViewMasonryLayout', '~> 2.0.0' 43 | pod 'SDWebImage', '~> 3.7' 44 | pod 'SVProgressHUD' 45 | 46 | pod 'ARAnalytics/Mixpanel' 47 | pod 'ARAnalytics/HockeyApp' 48 | 49 | pod 'CardFlight' 50 | pod 'Stripe' 51 | pod 'ECPhoneNumberFormatter' 52 | pod 'UIImageViewAligned', :git => 'https://github.com/ashfurrow/UIImageViewAligned.git' 53 | pod 'DZNWebViewController', :git => 'https://github.com/orta/DZNWebViewController.git' 54 | pod 'Reachability', :git => 'https://github.com/ashfurrow/Reachability.git', :branch => 'frameworks' 55 | 56 | pod 'UIView+BooleanAnimations' 57 | pod 'ARTiledImageView', :git => 'https://github.com/ashfurrow/ARTiledImageView.git' 58 | pod 'XNGMarkdownParser' 59 | 60 | # Swift pods 61 | pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git', :branch => 'xcode7' 62 | pod 'ReactiveCocoa', '~> 4.0.1-alpha-2' 63 | pod 'Moya/ReactiveCocoa' 64 | pod 'Swift-RAC-Macros' 65 | 66 | target 'KioskTests' do 67 | 68 | pod 'FBSnapshotTestCase' 69 | pod 'Nimble-Snapshots' 70 | pod 'Quick' 71 | pod 'Nimble', '= 2.0.0-rc.3' 72 | pod 'Forgeries' 73 | 74 | end 75 | -------------------------------------------------------------------------------- /test/fixtures/example.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | 4 | s.name = 'CocoaLumberjack' 5 | s.version = '2.2.0' 6 | s.license = 'BSD' 7 | s.summary = 'A fast & simple, yet powerful & flexible logging framework for Mac and iOS.' 8 | s.homepage = 'https://github.com/CocoaLumberjack/CocoaLumberjack' 9 | s.author = { 'Robbie Hanson' => 'robbiehanson@deusty.com' } 10 | s.source = { :git => 'https://github.com/CocoaLumberjack/CocoaLumberjack.git', 11 | :tag => "#{s.version}" } 12 | 13 | s.description = 'It is similar in concept to other popular logging frameworks such as log4j, ' \ 14 | 'yet is designed specifically for objective-c, and takes advantage of features ' \ 15 | 'such as multi-threading, grand central dispatch (if available), lockless ' \ 16 | 'atomic operations, and the dynamic nature of the objective-c runtime.' 17 | 18 | s.requires_arc = true 19 | 20 | s.preserve_paths = 'README.md', 'Classes/CocoaLumberjack.swift', 'Framework/Lumberjack/CocoaLumberjack.modulemap' 21 | s.ios.deployment_target = '5.0' 22 | s.osx.deployment_target = '10.7' 23 | s.watchos.deployment_target = '2.0' 24 | s.tvos.deployment_target = '9.0' 25 | 26 | s.public_header_files = 'Classes/*.h' 27 | 28 | s.module_map = 'Framework/Lumberjack/CocoaLumberjack.modulemap' 29 | s.default_subspecs = 'Default', 'Extensions' 30 | 31 | s.subspec 'Default' do |ss| 32 | ss.source_files = 'Classes/CocoaLumberjack.{h,m}' 33 | ss.dependency 'CocoaLumberjack/Core' 34 | end 35 | 36 | s.subspec 'Core' do |ss| 37 | ss.source_files = 'Classes/DD*.{h,m}' 38 | end 39 | 40 | s.subspec 'Extensions' do |ss| 41 | ss.source_files = 'Classes/Extensions/*.{h,m}' 42 | ss.dependency 'CocoaLumberjack/Default' 43 | end 44 | 45 | s.subspec 'CLI' do |ss| 46 | ss.osx.deployment_target = '10.7' 47 | ss.source_files = 'Classes/CLI/*.{h,m}' 48 | ss.dependency 'CocoaLumberjack/Default' 49 | end 50 | 51 | s.subspec 'Swift' do |ss| 52 | ss.ios.deployment_target = '8.0' 53 | ss.osx.deployment_target = '10.10' 54 | ss.watchos.deployment_target = '2.0' 55 | ss.tvos.deployment_target = '9.0' 56 | ss.source_files = 'Classes/CocoaLumberjack.swift' 57 | ss.dependency 'CocoaLumberjack/Extensions', '*' 58 | end 59 | 60 | end 61 | -------------------------------------------------------------------------------- /lib/parsers/cran.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var control = require("readcontrol"); 4 | 5 | var REQUIRE_REGEXP = /([a-zA-Z0-9-_\.]+)\s?\(?([><=\s\d\.,]+)?\)?/ 6 | 7 | String.prototype.replaceAll = function(search, replacement) { 8 | var target = this; 9 | return target.replace(new RegExp(search, 'g'), replacement); 10 | }; 11 | 12 | function parser(str) { 13 | var config; 14 | 15 | try { config = control.parse(str); } 16 | catch(e) { throw new Error('Invalid config'); } 17 | 18 | var deps = []; 19 | var depends = ([].concat.apply([], Array(config.depends))[0] || '').replaceAll('\n', '').split(','); 20 | var imports = ([].concat.apply([], Array(config.imports))[0] || '').replaceAll('\n', '').split(','); 21 | var suggests = ([].concat.apply([], Array(config.suggests))[0] || '').replaceAll('\n', '').split(','); 22 | var enhances = ([].concat.apply([], Array(config.enhances))[0] || '').replaceAll('\n', '').split(','); 23 | 24 | Object.keys(depends).forEach( (dep) => { 25 | var line = depends[dep].trim() 26 | 27 | var match = line.match(REQUIRE_REGEXP); 28 | 29 | if (!match) return; 30 | 31 | let name = match[1], version = match[2] 32 | 33 | deps.push({ 34 | name: name, 35 | version: version || '*', 36 | type: 'depends' 37 | }); 38 | }); 39 | 40 | Object.keys(imports).forEach( (dep) => { 41 | var line = imports[dep].trim() 42 | 43 | var match = line.match(REQUIRE_REGEXP); 44 | 45 | if (!match) return; 46 | 47 | let name = match[1], version = match[2] 48 | 49 | deps.push({ 50 | name: name, 51 | version: version || '*', 52 | type: 'imports' 53 | }); 54 | }); 55 | 56 | Object.keys(suggests).forEach( (dep) => { 57 | var line = suggests[dep].trim() 58 | 59 | var match = line.match(REQUIRE_REGEXP); 60 | 61 | if (!match) return; 62 | 63 | let name = match[1], version = match[2] 64 | 65 | deps.push({ 66 | name: name, 67 | version: version || '*', 68 | type: 'suggests' 69 | }); 70 | }); 71 | 72 | Object.keys(enhances).forEach( (dep) => { 73 | var line = suggests[dep].trim() 74 | 75 | var match = line.match(REQUIRE_REGEXP); 76 | 77 | if (!match) return; 78 | 79 | let name = match[1], version = match[2] 80 | 81 | deps.push({ 82 | name: name, 83 | version: version || '*', 84 | type: 'enhances' 85 | }); 86 | }); 87 | 88 | return deps; 89 | } 90 | 91 | module.exports = parser; 92 | -------------------------------------------------------------------------------- /test/fixtures/ivy.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 7 | 8 | The fully integrated standalone wiki and 9 | acceptance testing framework. 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at andrew@libraries.io. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at [http://contributor-covenant.org/version/1/4][version] 72 | 73 | [homepage]: http://contributor-covenant.org 74 | [version]: http://contributor-covenant.org/version/1/4/ 75 | -------------------------------------------------------------------------------- /test/fixtures/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | jcenter() 4 | maven { url 'http://download.crashlytics.com/maven' } 5 | } 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:1.0.0' 8 | classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.14.4' 9 | classpath 'com.github.ben-manes:gradle-versions-plugin:0.6' 10 | } 11 | } 12 | 13 | repositories { 14 | jcenter() 15 | maven { url 'http://download.crashlytics.com/maven' } 16 | } 17 | 18 | apply plugin: 'com.android.application' 19 | apply plugin: 'crashlytics' 20 | apply plugin: 'com.github.ben-manes.versions' 21 | 22 | android { 23 | compileSdkVersion 19 24 | buildToolsVersion '21.1.2' 25 | defaultConfig { 26 | minSdkVersion 14 27 | targetSdkVersion 19 28 | } 29 | sourceSets { 30 | androidTest.setRoot('tests') 31 | } 32 | lintOptions { 33 | abortOnError false 34 | } 35 | packagingOptions { 36 | exclude 'META-INF/NOTICE' 37 | exclude 'META-INF/LICENSE' 38 | exclude 'META-INF/DEPENDENCIES' 39 | } 40 | productFlavors { 41 | production { 42 | applicationId 'com.example' 43 | buildConfigField 'String', 'API_EXAMPLE', '"http://example.com/api/"' 44 | buildConfigField 'String', 'NEW_API_EXAMPLE', '"http://api.example.com/v1/"' 45 | } 46 | integration { 47 | applicationId 'com.example.integration' 48 | buildConfigField 'String', 'API_EXAMPLE', '"http://int.example.com/api/"' 49 | buildConfigField 'String', 'NEW_API_EXAMPLE', '"http://api.int.example.com/v1/"' 50 | } 51 | staging { 52 | applicationId 'com.example.staging' 53 | buildConfigField 'String', 'API_EXAMPLE', '"http://staging.example.com/api/"' 54 | buildConfigField 'String', 'NEW_API_EXAMPLE', '"http://api.staging.example.com/v1/"' 55 | } 56 | } 57 | if (project.hasProperty("STORE_FILE")) { 58 | signingConfigs { 59 | release { 60 | storeFile file(STORE_FILE) 61 | storePassword STORE_PASSWORD 62 | keyAlias KEY_ALIAS 63 | keyPassword KEY_PASSWORD 64 | } 65 | } 66 | buildTypes { 67 | release { 68 | signingConfig signingConfigs.release 69 | } 70 | } 71 | } 72 | } 73 | 74 | dependencies { 75 | compile project(':android_libs:Swipecards') 76 | provided 'com.squareup.dagger:dagger-compiler:1.2.2' 77 | provided 'pl.mg6.hrisey:hrisey:0.3.1' 78 | compile 'com.squareup.dagger:dagger:1.2.2' 79 | compile 'com.squareup.picasso:picasso:2.4.0' 80 | compile 'com.squareup.okhttp:okhttp:2.1.0' 81 | compile 'com.squareup.okhttp:okhttp-urlconnection:2.1.0' 82 | compile 'com.squareup.retrofit:retrofit:1.8.0' 83 | compile 'de.greenrobot:eventbus:2.4.0' 84 | compile fileTree(dir: 'libs', include: '*.jar') 85 | compile 'com.google.android.gms:play-services:5.0.89' 86 | compile 'com.androidmapsextensions:android-maps-extensions:2.2.0' 87 | compile project(':android_libs:facebook-android-sdk-3.8.0:facebook') 88 | productionCompile "com.mixpanel.android:mixpanel-android:4.3.1@aar" 89 | androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.2.1' 90 | compile 'com.crashlytics.android:crashlytics:1.1.13' 91 | compile files('android_libs/AdTechMobileSdk/ADTECHMobileSDK.jar') 92 | } 93 | 94 | configurations { 95 | all*.exclude group: 'com.android.support', module: 'support-v4' 96 | } 97 | -------------------------------------------------------------------------------- /test/fixtures/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See http://pub.dartlang.org/doc/glossary.html#lockfile 3 | packages: 4 | analyzer: 5 | description: analyzer 6 | source: hosted 7 | version: "0.24.6" 8 | args: 9 | description: args 10 | source: hosted 11 | version: "0.12.2+6" 12 | barback: 13 | description: barback 14 | source: hosted 15 | version: "0.15.2+7" 16 | benchmark_harness: 17 | description: benchmark_harness 18 | source: hosted 19 | version: "1.0.4" 20 | browser: 21 | description: browser 22 | source: hosted 23 | version: "0.10.0+2" 24 | browser_detect: 25 | description: browser_detect 26 | source: hosted 27 | version: "1.0.3" 28 | charcode: 29 | description: charcode 30 | source: hosted 31 | version: "1.1.0" 32 | cli_util: 33 | description: cli_util 34 | source: hosted 35 | version: "0.0.1+2" 36 | code_transformers: 37 | description: code_transformers 38 | source: hosted 39 | version: "0.2.9+3" 40 | collection: 41 | description: collection 42 | source: hosted 43 | version: "1.1.3" 44 | csslib: 45 | description: csslib 46 | source: hosted 47 | version: "0.12.1" 48 | dart_style: 49 | description: dart_style 50 | source: hosted 51 | version: "0.1.8+2" 52 | di: 53 | description: di 54 | source: hosted 55 | version: "3.3.4" 56 | glob: 57 | description: glob 58 | source: hosted 59 | version: "1.0.5" 60 | guinness: 61 | description: guinness 62 | source: hosted 63 | version: "0.1.17" 64 | html: 65 | description: html 66 | source: hosted 67 | version: "0.12.2" 68 | html5lib: 69 | description: html5lib 70 | source: hosted 71 | version: "0.12.1" 72 | initialize: 73 | description: initialize 74 | source: hosted 75 | version: "0.6.1+2" 76 | intl: 77 | description: intl 78 | source: hosted 79 | version: "0.8.10+4" 80 | js: 81 | description: js 82 | source: hosted 83 | version: "0.2.2" 84 | logging: 85 | description: logging 86 | source: hosted 87 | version: "0.11.2" 88 | meta: 89 | description: meta 90 | source: hosted 91 | version: "0.8.8" 92 | mock: 93 | description: mock 94 | source: hosted 95 | version: "0.11.0+4" 96 | observe: 97 | description: observe 98 | source: hosted 99 | version: "0.13.1+2" 100 | path: 101 | description: path 102 | source: hosted 103 | version: "1.3.6" 104 | perf_api: 105 | description: perf_api 106 | source: hosted 107 | version: "0.0.9" 108 | pool: 109 | description: pool 110 | source: hosted 111 | version: "1.1.0" 112 | protractor: 113 | description: protractor 114 | source: hosted 115 | version: "0.0.5" 116 | route_hierarchical: 117 | description: route_hierarchical 118 | source: hosted 119 | version: "0.6.2" 120 | smoke: 121 | description: smoke 122 | source: hosted 123 | version: "0.3.5" 124 | source_maps: 125 | description: source_maps 126 | source: hosted 127 | version: "0.10.1" 128 | source_span: 129 | description: source_span 130 | source: hosted 131 | version: "1.2.1" 132 | stack_trace: 133 | description: stack_trace 134 | source: hosted 135 | version: "1.4.2" 136 | string_scanner: 137 | description: string_scanner 138 | source: hosted 139 | version: "0.1.4" 140 | unittest: 141 | description: unittest 142 | source: hosted 143 | version: "0.11.6+1" 144 | utf: 145 | description: utf 146 | source: hosted 147 | version: "0.9.0+2" 148 | watcher: 149 | description: watcher 150 | source: hosted 151 | version: "0.9.7" 152 | web_components: 153 | description: web_components 154 | source: hosted 155 | version: "0.11.4+2" 156 | when: 157 | description: when 158 | source: hosted 159 | version: "0.2.0" 160 | which: 161 | description: which 162 | source: hosted 163 | version: "0.1.3" 164 | sdk: ">=1.13.0 <2.0.0" 165 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | ecmaFeatures: 2 | modules: true 3 | jsx: true 4 | 5 | env: 6 | amd: true 7 | browser: true 8 | es6: true 9 | jquery: true 10 | node: true 11 | 12 | # http://eslint.org/docs/rules/ 13 | rules: 14 | # Possible Errors 15 | comma-dangle: [2, never] 16 | no-cond-assign: 2 17 | no-console: 0 18 | no-constant-condition: 2 19 | no-control-regex: 2 20 | no-debugger: 2 21 | no-dupe-args: 2 22 | no-dupe-keys: 2 23 | no-duplicate-case: 2 24 | no-empty: 2 25 | no-empty-character-class: 2 26 | no-ex-assign: 2 27 | no-extra-boolean-cast: 2 28 | no-extra-parens: 0 29 | no-extra-semi: 2 30 | no-func-assign: 2 31 | no-inner-declarations: [2, functions] 32 | no-invalid-regexp: 2 33 | no-irregular-whitespace: 2 34 | no-negated-in-lhs: 2 35 | no-obj-calls: 2 36 | no-regex-spaces: 2 37 | no-sparse-arrays: 2 38 | no-unexpected-multiline: 2 39 | no-unreachable: 2 40 | use-isnan: 2 41 | valid-jsdoc: 0 42 | valid-typeof: 2 43 | 44 | # Best Practices 45 | accessor-pairs: 2 46 | block-scoped-var: 0 47 | complexity: [2, 6] 48 | consistent-return: 0 49 | curly: 0 50 | default-case: 0 51 | dot-location: 0 52 | dot-notation: 0 53 | eqeqeq: 2 54 | guard-for-in: 2 55 | no-alert: 2 56 | no-caller: 2 57 | no-case-declarations: 2 58 | no-div-regex: 2 59 | no-else-return: 0 60 | no-empty-label: 2 61 | no-empty-pattern: 2 62 | no-eq-null: 2 63 | no-eval: 2 64 | no-extend-native: 2 65 | no-extra-bind: 2 66 | no-fallthrough: 2 67 | no-floating-decimal: 0 68 | no-implicit-coercion: 0 69 | no-implied-eval: 2 70 | no-invalid-this: 0 71 | no-iterator: 2 72 | no-labels: 0 73 | no-lone-blocks: 2 74 | no-loop-func: 2 75 | no-magic-number: 0 76 | no-multi-spaces: 0 77 | no-multi-str: 0 78 | no-native-reassign: 2 79 | no-new-func: 2 80 | no-new-wrappers: 2 81 | no-new: 2 82 | no-octal-escape: 2 83 | no-octal: 2 84 | no-proto: 2 85 | no-redeclare: 2 86 | no-return-assign: 2 87 | no-script-url: 2 88 | no-self-compare: 2 89 | no-sequences: 0 90 | no-throw-literal: 0 91 | no-unused-expressions: 2 92 | no-useless-call: 2 93 | no-useless-concat: 2 94 | no-void: 2 95 | no-warning-comments: 0 96 | no-with: 2 97 | radix: 2 98 | vars-on-top: 0 99 | wrap-iife: 2 100 | yoda: 0 101 | 102 | # Strict 103 | strict: 0 104 | 105 | # Variables 106 | init-declarations: 0 107 | no-catch-shadow: 2 108 | no-delete-var: 2 109 | no-label-var: 2 110 | no-shadow-restricted-names: 2 111 | no-shadow: 0 112 | no-undef-init: 2 113 | no-undef: 0 114 | no-undefined: 0 115 | no-unused-vars: 0 116 | no-use-before-define: 0 117 | 118 | # Node.js and CommonJS 119 | callback-return: 2 120 | global-require: 2 121 | handle-callback-err: 2 122 | no-mixed-requires: 0 123 | no-new-require: 0 124 | no-path-concat: 2 125 | no-process-exit: 2 126 | no-restricted-modules: 0 127 | no-sync: 0 128 | 129 | # Stylistic Issues 130 | array-bracket-spacing: 0 131 | block-spacing: 0 132 | brace-style: 0 133 | camelcase: 0 134 | comma-spacing: 0 135 | comma-style: 0 136 | computed-property-spacing: 0 137 | consistent-this: 0 138 | eol-last: 0 139 | func-names: 0 140 | func-style: 0 141 | id-length: 0 142 | id-match: 0 143 | indent: 0 144 | jsx-quotes: 0 145 | key-spacing: 0 146 | linebreak-style: 0 147 | lines-around-comment: 0 148 | max-depth: 0 149 | max-len: 0 150 | max-nested-callbacks: 0 151 | max-params: 0 152 | max-statements: [2, 30] 153 | new-cap: 0 154 | new-parens: 0 155 | newline-after-var: 0 156 | no-array-constructor: 0 157 | no-bitwise: 0 158 | no-continue: 0 159 | no-inline-comments: 0 160 | no-lonely-if: 0 161 | no-mixed-spaces-and-tabs: 0 162 | no-multiple-empty-lines: 0 163 | no-negated-condition: 0 164 | no-nested-ternary: 0 165 | no-new-object: 0 166 | no-plusplus: 0 167 | no-restricted-syntax: 0 168 | no-spaced-func: 0 169 | no-ternary: 0 170 | no-trailing-spaces: 0 171 | no-underscore-dangle: 0 172 | no-unneeded-ternary: 0 173 | object-curly-spacing: 0 174 | one-var: 0 175 | operator-assignment: 0 176 | operator-linebreak: 0 177 | padded-blocks: 0 178 | quote-props: 0 179 | quotes: 0 180 | require-jsdoc: 0 181 | semi-spacing: 0 182 | semi: 0 183 | sort-vars: 0 184 | space-after-keywords: 0 185 | space-before-blocks: 0 186 | space-before-function-paren: 0 187 | space-before-keywords: 0 188 | space-in-parens: 0 189 | space-infix-ops: 0 190 | space-return-throw-case: 0 191 | space-unary-ops: 0 192 | spaced-comment: 0 193 | wrap-regex: 0 194 | 195 | # ECMAScript 6 196 | arrow-body-style: 0 197 | arrow-parens: 0 198 | arrow-spacing: 0 199 | constructor-super: 0 200 | generator-star-spacing: 0 201 | no-arrow-condition: 0 202 | no-class-assign: 0 203 | no-const-assign: 0 204 | no-dupe-class-members: 0 205 | no-this-before-super: 0 206 | no-var: 0 207 | object-shorthand: 0 208 | prefer-arrow-callback: 0 209 | prefer-const: 0 210 | prefer-reflect: 0 211 | prefer-spread: 0 212 | prefer-template: 0 213 | require-yield: 0 214 | -------------------------------------------------------------------------------- /test/fixtures/DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: ggplot2 2 | Version: 2.1.0 3 | Authors@R: c( 4 | person("Hadley", "Wickham", , "hadley@rstudio.com", c("aut", "cre")), 5 | person("Winston", "Chang", , "winston@rstudio.com", "aut"), 6 | person("RStudio", role = "cph") 7 | ) 8 | Title: An Implementation of the Grammar of Graphics 9 | Description: An implementation of the grammar of graphics in R. It combines the 10 | advantages of both base and lattice graphics: conditioning and shared axes 11 | are handled automatically, and you can still build up a plot step by step 12 | from multiple data sources. It also implements a sophisticated 13 | multidimensional conditioning system and a consistent interface to map 14 | data to aesthetic attributes. See http://ggplot2.org for more information, 15 | documentation and examples. 16 | Depends: 17 | R (>= 3.1) 18 | Imports: 19 | digest, 20 | grid, 21 | gtable (>= 0.1.1), 22 | MASS, 23 | plyr (>= 1.7.1), 24 | reshape2, 25 | scales (>= 0.3.0), 26 | stats 27 | Suggests: 28 | covr, 29 | ggplot2movies, 30 | hexbin, 31 | Hmisc, 32 | lattice, 33 | mapproj, 34 | maps, 35 | maptools, 36 | mgcv, 37 | multcomp, 38 | nlme, 39 | testthat (>= 0.11.0), 40 | quantreg, 41 | knitr, 42 | rpart, 43 | rmarkdown, 44 | svglite 45 | Enhances: sp 46 | License: GPL-2 47 | URL: http://ggplot2.org, https://github.com/hadley/ggplot2 48 | BugReports: https://github.com/hadley/ggplot2/issues 49 | LazyData: true 50 | Collate: 51 | 'ggproto.r' 52 | 'aaa-.r' 53 | 'aes-calculated.r' 54 | 'aes-colour-fill-alpha.r' 55 | 'aes-group-order.r' 56 | 'aes-linetype-size-shape.r' 57 | 'aes-position.r' 58 | 'utilities.r' 59 | 'aes.r' 60 | 'legend-draw.r' 61 | 'geom-.r' 62 | 'annotation-custom.r' 63 | 'annotation-logticks.r' 64 | 'geom-polygon.r' 65 | 'geom-map.r' 66 | 'annotation-map.r' 67 | 'geom-raster.r' 68 | 'annotation-raster.r' 69 | 'annotation.r' 70 | 'autoplot.r' 71 | 'bench.r' 72 | 'bin.R' 73 | 'coord-.r' 74 | 'coord-cartesian-.r' 75 | 'coord-fixed.r' 76 | 'coord-flip.r' 77 | 'coord-map.r' 78 | 'coord-munch.r' 79 | 'coord-polar.r' 80 | 'coord-quickmap.R' 81 | 'coord-transform.r' 82 | 'data.R' 83 | 'facet-.r' 84 | 'facet-grid-.r' 85 | 'facet-labels.r' 86 | 'facet-layout.r' 87 | 'facet-locate.r' 88 | 'facet-null.r' 89 | 'facet-viewports.r' 90 | 'facet-wrap.r' 91 | 'fortify-lm.r' 92 | 'fortify-map.r' 93 | 'fortify-multcomp.r' 94 | 'fortify-spatial.r' 95 | 'fortify.r' 96 | 'stat-.r' 97 | 'geom-abline.r' 98 | 'geom-rect.r' 99 | 'geom-bar.r' 100 | 'geom-bin2d.r' 101 | 'geom-blank.r' 102 | 'geom-boxplot.r' 103 | 'geom-path.r' 104 | 'geom-contour.r' 105 | 'geom-count.r' 106 | 'geom-crossbar.r' 107 | 'geom-segment.r' 108 | 'geom-curve.r' 109 | 'geom-defaults.r' 110 | 'geom-ribbon.r' 111 | 'geom-density.r' 112 | 'geom-density2d.r' 113 | 'geom-dotplot.r' 114 | 'geom-errorbar.r' 115 | 'geom-errorbarh.r' 116 | 'geom-freqpoly.r' 117 | 'geom-hex.r' 118 | 'geom-histogram.r' 119 | 'geom-hline.r' 120 | 'geom-jitter.r' 121 | 'geom-label.R' 122 | 'geom-linerange.r' 123 | 'geom-point.r' 124 | 'geom-pointrange.r' 125 | 'geom-quantile.r' 126 | 'geom-rug.r' 127 | 'geom-smooth.r' 128 | 'geom-spoke.r' 129 | 'geom-text.r' 130 | 'geom-tile.r' 131 | 'geom-violin.r' 132 | 'geom-vline.r' 133 | 'ggplot2.r' 134 | 'grob-absolute.r' 135 | 'grob-dotstack.r' 136 | 'grob-null.r' 137 | 'grouping.r' 138 | 'guide-colorbar.r' 139 | 'guide-legend.r' 140 | 'guides-.r' 141 | 'guides-axis.r' 142 | 'guides-grid.r' 143 | 'hexbin.R' 144 | 'labels.r' 145 | 'layer.r' 146 | 'limits.r' 147 | 'margins.R' 148 | 'panel.r' 149 | 'plot-build.r' 150 | 'plot-construction.r' 151 | 'plot-last.r' 152 | 'plot.r' 153 | 'position-.r' 154 | 'position-collide.r' 155 | 'position-dodge.r' 156 | 'position-fill.r' 157 | 'position-identity.r' 158 | 'position-jitter.r' 159 | 'position-jitterdodge.R' 160 | 'position-nudge.R' 161 | 'position-stack.r' 162 | 'quick-plot.r' 163 | 'range.r' 164 | 'save.r' 165 | 'scale-.r' 166 | 'scale-alpha.r' 167 | 'scale-brewer.r' 168 | 'scale-continuous.r' 169 | 'scale-date.r' 170 | 'scale-discrete-.r' 171 | 'scale-gradient.r' 172 | 'scale-grey.r' 173 | 'scale-hue.r' 174 | 'scale-identity.r' 175 | 'scale-linetype.r' 176 | 'scale-manual.r' 177 | 'scale-shape.r' 178 | 'scale-size.r' 179 | 'scale-type.R' 180 | 'scales-.r' 181 | 'stat-bin.r' 182 | 'stat-bin2d.r' 183 | 'stat-bindot.r' 184 | 'stat-binhex.r' 185 | 'stat-boxplot.r' 186 | 'stat-contour.r' 187 | 'stat-count.r' 188 | 'stat-density-2d.r' 189 | 'stat-density.r' 190 | 'stat-ecdf.r' 191 | 'stat-ellipse.R' 192 | 'stat-function.r' 193 | 'stat-identity.r' 194 | 'stat-qq.r' 195 | 'stat-quantile.r' 196 | 'stat-smooth-methods.r' 197 | 'stat-smooth.r' 198 | 'stat-sum.r' 199 | 'stat-summary-2d.r' 200 | 'stat-summary-bin.R' 201 | 'stat-summary-hex.r' 202 | 'stat-summary.r' 203 | 'stat-unique.r' 204 | 'stat-ydensity.r' 205 | 'summary.r' 206 | 'theme-defaults.r' 207 | 'theme-elements.r' 208 | 'theme.r' 209 | 'translate-qplot-ggplot.r' 210 | 'translate-qplot-lattice.r' 211 | 'utilities-break.r' 212 | 'utilities-grid.r' 213 | 'utilities-help.r' 214 | 'utilities-matrix.r' 215 | 'utilities-resolution.r' 216 | 'utilities-table.r' 217 | 'zxx.r' 218 | 'zzz.r' 219 | VignetteBuilder: knitr 220 | RoxygenNote: 5.0.1 221 | -------------------------------------------------------------------------------- /test/fixtures/Cargo.lock: -------------------------------------------------------------------------------- 1 | [root] 2 | name = "pippin" 3 | version = "0.0.0" 4 | dependencies = [ 5 | "byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 6 | "chrono 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", 7 | "docopt 0.6.78 (registry+https://github.com/rust-lang/crates.io-index)", 8 | "hashindexed 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 9 | "local_crate 0.1.0", 10 | "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", 11 | "regex 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", 12 | "rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", 13 | "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", 14 | "vec_map 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 15 | "walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 16 | ] 17 | 18 | [[package]] 19 | name = "aaa-local-crate" 20 | version = "0.1.0" 21 | dependencies = [ 22 | "aaa-local-crate-depdendency 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)", 23 | ] 24 | 25 | [[package]] 26 | name = "aaa-local-crate-dependency" 27 | version = "0.17.1" 28 | source = "registry+https://github.com/rust-lang/crates.io-index" 29 | 30 | 31 | [[package]] 32 | name = "advapi32-sys" 33 | version = "0.1.2" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | dependencies = [ 36 | "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 37 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 38 | ] 39 | 40 | [[package]] 41 | name = "aho-corasick" 42 | version = "0.4.0" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | dependencies = [ 45 | "memchr 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 46 | ] 47 | 48 | [[package]] 49 | name = "byteorder" 50 | version = "0.4.2" 51 | source = "registry+https://github.com/rust-lang/crates.io-index" 52 | 53 | [[package]] 54 | name = "chrono" 55 | version = "0.2.17" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | dependencies = [ 58 | "num 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 59 | "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", 60 | ] 61 | 62 | [[package]] 63 | name = "docopt" 64 | version = "0.6.78" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | dependencies = [ 67 | "regex 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", 68 | "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", 69 | "strsim 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 70 | ] 71 | 72 | [[package]] 73 | name = "gcc" 74 | version = "0.3.21" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | dependencies = [ 77 | "advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 78 | "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 79 | ] 80 | 81 | [[package]] 82 | name = "hashindexed" 83 | version = "0.1.0" 84 | source = "registry+https://github.com/rust-lang/crates.io-index" 85 | 86 | [[package]] 87 | name = "kernel32-sys" 88 | version = "0.2.1" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | dependencies = [ 91 | "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 92 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 93 | ] 94 | 95 | [[package]] 96 | name = "libc" 97 | version = "0.1.12" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | 100 | [[package]] 101 | name = "libc" 102 | version = "0.2.4" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | 105 | [[package]] 106 | name = "memchr" 107 | version = "0.1.7" 108 | source = "registry+https://github.com/rust-lang/crates.io-index" 109 | dependencies = [ 110 | "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 111 | ] 112 | 113 | [[package]] 114 | name = "num" 115 | version = "0.1.29" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | dependencies = [ 118 | "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", 119 | "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", 120 | ] 121 | 122 | [[package]] 123 | name = "rand" 124 | version = "0.3.12" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | dependencies = [ 127 | "advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 128 | "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 129 | "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 130 | ] 131 | 132 | [[package]] 133 | name = "regex" 134 | version = "0.1.44" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | dependencies = [ 137 | "aho-corasick 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 138 | "memchr 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 139 | "regex-syntax 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 140 | ] 141 | 142 | [[package]] 143 | name = "regex-syntax" 144 | version = "0.2.2" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | 147 | [[package]] 148 | name = "rust-crypto" 149 | version = "0.2.34" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | dependencies = [ 152 | "gcc 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)", 153 | "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 154 | "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", 155 | "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", 156 | "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", 157 | ] 158 | 159 | [[package]] 160 | name = "rustc-serialize" 161 | version = "0.3.16" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | 164 | [[package]] 165 | name = "strsim" 166 | version = "0.3.0" 167 | source = "registry+https://github.com/rust-lang/crates.io-index" 168 | 169 | [[package]] 170 | name = "time" 171 | version = "0.1.34" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | dependencies = [ 174 | "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 175 | "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 176 | "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 177 | ] 178 | 179 | [[package]] 180 | name = "vec_map" 181 | version = "0.4.0" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | 184 | [[package]] 185 | name = "walkdir" 186 | version = "0.1.5" 187 | source = "registry+https://github.com/rust-lang/crates.io-index" 188 | dependencies = [ 189 | "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 190 | "winapi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 191 | ] 192 | 193 | [[package]] 194 | name = "winapi" 195 | version = "0.2.5" 196 | source = "registry+https://github.com/rust-lang/crates.io-index" 197 | 198 | [[package]] 199 | name = "winapi-build" 200 | version = "0.1.1" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | -------------------------------------------------------------------------------- /test/fixtures/cpanfile: -------------------------------------------------------------------------------- 1 | # setenv script 2 | requires 'List::MoreUtils', '0.402'; 3 | requires 'local::lib'; 4 | requires 'Class::Unload'; 5 | 6 | # Interesting installation issues, see end of this file 7 | requires 'ExtUtils::MakeMaker', '6.72'; # [1] 8 | # requires 'MooseX::NonMoose'; # [2] 9 | 10 | # Minimum versions of dependencies to upgrade for bugfixes 11 | requires 'Guard', '1.023'; 12 | requires 'PadWalker', '2.2'; 13 | requires 'aliased', '0.34'; 14 | 15 | # Catalyst itself, and modules/plugins used 16 | requires 'Catalyst', '5.80031'; 17 | requires 'Catalyst::Action::RenderView'; 18 | requires 'Catalyst::Authentication::Store::DBIx::Class'; 19 | requires 'Catalyst::Devel'; 20 | requires 'Catalyst::Model::Adaptor'; 21 | requires 'Catalyst::Plugin::Authentication'; 22 | requires 'Catalyst::Plugin::Session::State::Cookie'; 23 | requires 'Catalyst::Plugin::Session::Store::DBIC'; 24 | requires 'Catalyst::Plugin::SmartURI'; 25 | requires 'Catalyst::Plugin::Static::Simple'; 26 | requires 'Catalyst::Plugin::Unicode::Encoding'; 27 | requires 'Catalyst::View::TT'; 28 | 29 | # Modules used by FixMyStreet 30 | requires 'Authen::SASL'; 31 | requires 'Cache::Memcached'; 32 | requires 'Carp'; 33 | requires 'CGI'; 34 | requires 'Crypt::Eksblowfish::Bcrypt'; 35 | requires 'DateTime'; 36 | requires 'DateTime::Format::HTTP'; 37 | requires 'DateTime::Format::ISO8601'; 38 | requires 'DateTime::Format::Pg'; 39 | requires 'DateTime::Format::W3CDTF'; 40 | requires 'DateTime::TimeZone'; 41 | requires 'DBD::Pg', '2.9.2'; 42 | requires 'DBI'; 43 | requires 'DBIx::Class::EncodedColumn', '0.00013'; 44 | requires 'DBIx::Class::EncodedColumn::Crypt::Eksblowfish::Bcrypt'; 45 | requires 'DBIx::Class::FilterColumn'; 46 | requires 'DBIx::Class::InflateColumn::DateTime'; 47 | requires 'DBIx::Class::ResultSet'; 48 | requires 'DBIx::Class::Schema::Loader'; 49 | requires 'Digest::MD5'; 50 | requires 'Digest::SHA'; 51 | requires 'Email::MIME'; 52 | requires 'Email::Send'; 53 | requires 'Email::Send::SMTP'; 54 | requires 'Email::Valid'; 55 | requires 'Error'; 56 | requires 'FCGI'; 57 | requires 'File::Find'; 58 | requires 'File::Path'; 59 | requires 'File::Slurp'; 60 | requires 'Geography::NationalGrid'; 61 | requires 'Getopt::Long::Descriptive'; 62 | requires 'HTML::Entities'; 63 | requires 'HTTP::Request::Common'; 64 | requires 'Image::Size'; 65 | requires 'IO::String'; 66 | requires 'JSON::MaybeXS'; 67 | requires 'Locale::gettext'; 68 | requires 'LWP::Simple'; 69 | requires 'LWP::UserAgent'; 70 | requires 'Math::Trig'; 71 | requires 'Module::Pluggable'; 72 | requires 'Moose'; 73 | requires 'MooX::Types::MooseLike'; 74 | requires 'namespace::autoclean'; 75 | requires 'Net::DNS::Resolver'; 76 | requires 'Net::Domain::TLD', '1.75'; 77 | requires 'Net::Facebook::Oauth2'; 78 | requires 'Net::OAuth'; 79 | requires 'Net::SMTP::SSL', '1.03'; 80 | requires 'Net::SMTP::TLS'; 81 | requires 'Net::Twitter::Lite::WithAPIv1_1'; 82 | requires 'Path::Class'; 83 | requires 'POSIX'; 84 | requires 'Readonly'; 85 | requires 'Regexp::Common'; 86 | requires 'Scalar::Util'; 87 | requires 'Statistics::Distributions'; 88 | requires 'Storable'; 89 | requires 'Template::Plugin::Number::Format'; 90 | requires 'Text::CSV'; 91 | requires 'URI', '1.71'; 92 | requires 'URI::Escape'; 93 | requires 'URI::QueryParam'; 94 | requires 'XML::RSS'; 95 | requires 'XML::Simple'; 96 | requires 'YAML'; 97 | 98 | feature 'uk', 'FixMyStreet.com specific requirements' => sub { 99 | # East Hampshire & Angus 100 | requires 'SOAP::Lite'; 101 | }; 102 | 103 | feature 'zurich', 'Zueri wie neu specific requirements' => sub { 104 | # Geocoder 105 | requires 'SOAP::Lite'; 106 | }; 107 | 108 | # Moderation by from_body user 109 | requires 'Algorithm::Diff'; 110 | 111 | # Modules used by CSS & watcher 112 | requires 'CSS::Sass'; 113 | requires 'File::ChangeNotify'; 114 | requires 'Path::Tiny'; 115 | requires 'File::Find::Rule'; 116 | 117 | # Modules used by the test suite 118 | requires 'Test::PostgreSQL'; 119 | requires 'CGI::Simple'; 120 | requires 'HTTP::Headers'; 121 | requires 'HTTP::Response'; 122 | requires 'LWP::Protocol::PSGI'; 123 | requires 'Sort::Key'; 124 | requires 'Sub::Override'; 125 | requires 'Test::Exception'; 126 | requires 'Test::LongString'; 127 | requires 'Test::MockTime'; 128 | requires 'Test::More', '0.88'; 129 | requires 'Test::Warn'; 130 | requires 'Test::WWW::Mechanize::Catalyst'; 131 | requires 'Web::Scraper'; 132 | requires 'Web::Simple'; 133 | 134 | ################################################################# 135 | # 136 | # [1] Many things in cpanfile.snapshot require ExtUtils::MakeMaker 6.59, and 137 | # one thing (DBIx::Class::IntrospectableM2M) requires 6.72, and so the snapshot 138 | # contains the details for ExtUtils::MakeMaker 6.72. carton itself requires 139 | # ExtUtils::MakeMaker 6.64. 140 | # 141 | # I don't understand the intracacies of carton/cpanm, but from the 142 | # build.logs, I ascertain that DBIx::Class::Schema::Loader requires 143 | # DBIx::Class::IntrospectableM2M and somehow in the process sets it up so that 144 | # DBIx::Class::IntrospectableM2M tries to install the version of 145 | # ExtUtils::MakeMaker used during the DBIx::Class::Schema::Loader installation. 146 | # 147 | # It seems as if the version of ExtUtils::MakeMaker used at any point is the 148 | # one in local if present, then the one in local-carton if present, then the 149 | # system one. Let's look at a few different installation platforms: 150 | # 151 | # On Debian wheezy, ExtUtils::MakeMaker is version 6.57. The installation of 152 | # carton installs ExtUtils::MakeMaker 7.04 in local-carton. Running carton 153 | # install installs ExtUtils::MakeMaker 6.72 in local at some point before 154 | # DBIx::Class::Schema::Loader (due to one of the 6.59 requirements), and so 155 | # DBIx::Class::IntrospectableM2M uses and tries to install 6.72, which is fine. 156 | # 157 | # On Ubuntu trusty, ExtUtils::MakeMaker is version 6.66. The installation of 158 | # carton is satisfied already. Running carton install, nothing else upgrades 159 | # ExtUtils::MakeMaker (as 6.66 > 6.59), and so when we get to 160 | # DBIx::Class::IntrospectableM2M it uses the system 6.66 and upgrades to 6.72, 161 | # which is again fine. 162 | # 163 | # On Mac OS X 10.9.5, ExtUtils::MakeMaker is version 6.63. The installation of 164 | # carton installs ExtUtils::MakeMaker 7.04 in local-carton. Running carton 165 | # install, nothing else upgrades ExtUtils::MakeMaker (as 6.63 > 6.59), and when 166 | # we get to DBIx::Class::IntrospectableM2M it therefore uses 7.04 and can't 167 | # install it (as the snapshot only contains 6.72) and fails. 168 | # 169 | # Therefore, if we make sure the ExtUtils::MakeMaker from the snapshot is 170 | # installed early in the process, it will be available when we get to 171 | # DBIx::Class::IntrospectableM2M, be used and match its own condition. 172 | # I'm sure this isn't the correct solution, but it is a working one. 173 | # 174 | # 175 | # [2] The installation of Catalyst::Model::DBIC::Schema tries to install any 176 | # module that it finds already present in an optional section. On a Mac, the 177 | # system has MooseX::NonMoose version 0.22, which is an optional component for 178 | # Catalyst::Helper support, and it finds that but then thinks it is not 179 | # installed, tries to install it but doesn't find it in the snapshot, and 180 | # fails. The easiest solution here is to include MooseX::NonMoose in 181 | # cpanfile.snapshot so it can be found, though I guess it shouldn't be trying 182 | # to install it if it's already thought that 0.22 was installed... 183 | -------------------------------------------------------------------------------- /test/fixtures/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Alamofire (2.0.1) 3 | - ARAnalytics/CoreIOS (3.8.0) 4 | - ARAnalytics/HockeyApp (3.8.0): 5 | - ARAnalytics/CoreIOS 6 | - HockeySDK-Source 7 | - ARAnalytics/Mixpanel (3.8.0): 8 | - ARAnalytics/CoreIOS 9 | - Mixpanel 10 | - ARCollectionViewMasonryLayout (2.0.0) 11 | - ARTiledImageView (1.2.0): 12 | - SDWebImage/Core 13 | - Artsy+UIColors (1.0.0): 14 | - EDColor (~> 0.4) 15 | - Artsy+UIFonts (1.1.0) 16 | - Artsy+UILabels (1.3.1): 17 | - Artsy+UIColors 18 | - Artsy-UIButtons (1.4.0): 19 | - Artsy+UIColors 20 | - UIView+BooleanAnimations 21 | - CardFlight (1.9.2): 22 | - CardFlight/AudioJack (= 1.9.2) 23 | - CardFlight/AudioJack (1.9.2) 24 | - DZNWebViewController (2.0): 25 | - NJKWebViewProgress (~> 0.2) 26 | - ECPhoneNumberFormatter (0.1.1) 27 | - EDColor (0.4.0) 28 | - FBSnapshotTestCase (1.8.1) 29 | - FLKAutoLayout (0.1.1) 30 | - fmemopen (0.0.1) 31 | - Forgeries (0.1.0) 32 | - HockeySDK-Source (3.8.1) 33 | - ISO8601DateFormatter (0.7) 34 | - Keys (1.0.0) 35 | - Mixpanel (2.8.3): 36 | - Mixpanel/Mixpanel (= 2.8.3) 37 | - Mixpanel/Mixpanel (2.8.3) 38 | - Moya/Core (2.2.2): 39 | - Alamofire (~> 2.0) 40 | - Moya/ReactiveCocoa (2.2.2): 41 | - Moya/ReactiveCore 42 | - ReactiveCocoa (~> 4.0-alpha.1) 43 | - Moya/ReactiveCore (2.2.2): 44 | - Moya/Core 45 | - Nimble (2.0.0-rc.3) 46 | - Nimble-Snapshots (1.0.0): 47 | - FBSnapshotTestCase (~> 1.7) 48 | - Nimble (~> 2.0.0-rc.2) 49 | - Quick (~> 0.5) 50 | - NJKWebViewProgress (0.2.3): 51 | - NJKWebViewProgress/Core (= 0.2.3) 52 | - NJKWebViewProgress/ProgressView (= 0.2.3) 53 | - NJKWebViewProgress/Core (0.2.3) 54 | - NJKWebViewProgress/ProgressView (0.2.3) 55 | - ORStackView (2.0.0): 56 | - FLKAutoLayout (~> 0.1) 57 | - Quick (0.6.0) 58 | - Reachability (3.1.1) 59 | - ReactiveCocoa (4.0.2-alpha-1): 60 | - ReactiveCocoa/UI (= 4.0.2-alpha-1) 61 | - Result (~> 0.6-beta.1) 62 | - ReactiveCocoa/Core (4.0.2-alpha-1): 63 | - ReactiveCocoa/no-arc 64 | - Result (~> 0.6-beta.1) 65 | - ReactiveCocoa/no-arc (4.0.2-alpha-1): 66 | - Result (~> 0.6-beta.1) 67 | - ReactiveCocoa/UI (4.0.2-alpha-1): 68 | - ReactiveCocoa/Core 69 | - Result (~> 0.6-beta.1) 70 | - Result (0.6-beta.1) 71 | - SDWebImage (3.7.1): 72 | - SDWebImage/Core (= 3.7.1) 73 | - SDWebImage/Core (3.7.1) 74 | - Stripe (3.1.0): 75 | - Stripe/Core (= 3.1.0) 76 | - Stripe/Core (3.1.0) 77 | - SVProgressHUD (1.1.3) 78 | - Swift-RAC-Macros (0.3.4): 79 | - ReactiveCocoa (= 4.0.2-alpha-1) 80 | - SwiftyJSON (2.2.1) 81 | - UIImageViewAligned (0.0.1) 82 | - UIView+BooleanAnimations (1.0.2) 83 | - XNGMarkdownParser (0.3.0): 84 | - fmemopen 85 | 86 | DEPENDENCIES: 87 | - ARAnalytics/HockeyApp 88 | - ARAnalytics/Mixpanel 89 | - ARCollectionViewMasonryLayout (~> 2.0.0) 90 | - ARTiledImageView (from `https://github.com/ashfurrow/ARTiledImageView.git`) 91 | - Artsy+UIColors 92 | - Artsy+UIFonts (~> 1.1.0) 93 | - Artsy+UILabels 94 | - Artsy-UIButtons 95 | - CardFlight 96 | - DZNWebViewController (from `https://github.com/orta/DZNWebViewController.git`) 97 | - ECPhoneNumberFormatter 98 | - FBSnapshotTestCase 99 | - FLKAutoLayout 100 | - Forgeries 101 | - ISO8601DateFormatter (= 0.7) 102 | - Keys (from `Pods/CocoaPodsKeys`) 103 | - Moya/ReactiveCocoa 104 | - Nimble (= 2.0.0-rc.3) 105 | - Nimble-Snapshots 106 | - ORStackView 107 | - Quick 108 | - Reachability (from `https://github.com/ashfurrow/Reachability.git`, branch `frameworks`) 109 | - ReactiveCocoa (~> 4.0.1-alpha-2) 110 | - SDWebImage (~> 3.7) 111 | - Stripe 112 | - SVProgressHUD 113 | - Swift-RAC-Macros 114 | - SwiftyJSON (from `https://github.com/SwiftyJSON/SwiftyJSON.git`, branch `xcode7`) 115 | - UIImageViewAligned (from `https://github.com/ashfurrow/UIImageViewAligned.git`) 116 | - UIView+BooleanAnimations 117 | - XNGMarkdownParser 118 | 119 | EXTERNAL SOURCES: 120 | ARTiledImageView: 121 | :git: https://github.com/ashfurrow/ARTiledImageView.git 122 | DZNWebViewController: 123 | :git: https://github.com/orta/DZNWebViewController.git 124 | Keys: 125 | :path: Pods/CocoaPodsKeys 126 | Reachability: 127 | :branch: frameworks 128 | :git: https://github.com/ashfurrow/Reachability.git 129 | SwiftyJSON: 130 | :branch: xcode7 131 | :git: https://github.com/SwiftyJSON/SwiftyJSON.git 132 | UIImageViewAligned: 133 | :git: https://github.com/ashfurrow/UIImageViewAligned.git 134 | 135 | CHECKOUT OPTIONS: 136 | ARTiledImageView: 137 | :commit: 2fe35ede0cb1d8cf3dc5aa4506c476c0367564b7 138 | :git: https://github.com/ashfurrow/ARTiledImageView.git 139 | DZNWebViewController: 140 | :commit: 9121386901af95072fb19eaa3df7060ca46fc337 141 | :git: https://github.com/orta/DZNWebViewController.git 142 | Reachability: 143 | :commit: 6db8c29565c319f59174dd63e4b1ac5b471d133a 144 | :git: https://github.com/ashfurrow/Reachability.git 145 | SwiftyJSON: 146 | :commit: f269523ac572979245baa99c8475eab73caf1e9b 147 | :git: https://github.com/SwiftyJSON/SwiftyJSON.git 148 | UIImageViewAligned: 149 | :commit: 6f8cb5669b219ef08c90c2e2e5a082cadfe7565b 150 | :git: https://github.com/ashfurrow/UIImageViewAligned.git 151 | 152 | SPEC CHECKSUMS: 153 | Alamofire: 1d8e208d616fbbfd2391b15eae766d07c96cdc49 154 | ARAnalytics: 5468652928cee7100dd0e6b5162631409da37106 155 | ARCollectionViewMasonryLayout: 164b82010cf8ec99bc7a38cffe59a179d7e5a116 156 | ARTiledImageView: a747cff42142ca04d1dc5cee516186f10b6c0949 157 | Artsy+UIColors: 7a4c987885a8d8da3e22672a3232761f929dd2b6 158 | Artsy+UIFonts: c51bb3b5cbf9c1a5fe198b4385d49133c5c71f5a 159 | Artsy+UILabels: 43da757ee01bce8165ec83123eccccdf1fe8843c 160 | Artsy-UIButtons: 6f67de2a5285f18acb5d0e2919d1b17188acbc27 161 | CardFlight: aac74eae9761ee2c8e3dba1c9a520e7a1aa0f17f 162 | DZNWebViewController: 54e8ee1c5bcc43e341ad77737631098d0d76db69 163 | ECPhoneNumberFormatter: 061041e7715f8d3f2e8e2a069ddf28c52f7bd314 164 | EDColor: 89d19a013279a5604d61650721c15f20fefaaf00 165 | FBSnapshotTestCase: 3dc3899168747a0319c5278f5b3445c13a6532dd 166 | FLKAutoLayout: 95b12c5cd9652100235140b68652f063f7437851 167 | fmemopen: dc31f7d3004644b33deee95e047305d23f8cfdd4 168 | Forgeries: ce03936ada2a8d33d3711d7bb7123be505b83430 169 | HockeySDK-Source: d03f7d267d78980af33fb63ddea5199f5bf84049 170 | ISO8601DateFormatter: ab926648eebe497f4d167c0fd083992f959f1274 171 | Keys: 7d2ff6ff42f6903358267ce56e9392f83c31acfe 172 | Mixpanel: fd52e097ae0d27295d0595b2261c60b94d191fda 173 | Moya: 9a98841c81a45c3cc9059cec26920122c1035839 174 | Nimble: 9dff98ee195ffe7351d3b2fb01d3a1420fd97948 175 | Nimble-Snapshots: c16dd279a4840ec06288198fafd53f3c17750ff3 176 | NJKWebViewProgress: f481fd424cb5ecc27eacae11b5397db92fba9a4d 177 | ORStackView: 5df6b1b990b0648d8ef6f69f89361ea8648e8f64 178 | Quick: 563686dbcf0ae0f9f7401ac9cd2d786ee1b7f3d7 179 | Reachability: 2fc2badcac191cd1a15044bc7fe45aa96c499ece 180 | ReactiveCocoa: 652cf90e5de65708e7e2111f77405756da21aabe 181 | Result: af24e3e57ab81005ec4221a53fd36dc1e7a52869 182 | SDWebImage: ed3095af2ff88b436426037444979b917f6c5575 183 | Stripe: 8a456332f4db97bd0b8457fc8cce1e1a69ac0cd1 184 | SVProgressHUD: 748080e4f36e603f6c02aec292664239df5279c1 185 | Swift-RAC-Macros: 712ec265e8acb2b535f3e1eac4bfa8d858041222 186 | SwiftyJSON: ae2d0a3d68025d136602a33c4ee215091ced3e33 187 | UIImageViewAligned: 5726c9651898342c19588a02e2115cace59342ee 188 | UIView+BooleanAnimations: a760be9a066036e55f298b7b7350a6cb14cfcd97 189 | XNGMarkdownParser: 562999edfa0e0913dc345f0931bdd78be59f826e 190 | 191 | COCOAPODS: 0.39.0.beta.4 192 | -------------------------------------------------------------------------------- /test/fixtures/composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "hash": "fcefc86ae453a1d29194847c1c58757a", 8 | "packages": [ 9 | { 10 | "name": "doctrine/annotations", 11 | "version": "v1.2.1", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/doctrine/annotations.git", 15 | "reference": "6a6bec0670bb6e71a263b08bc1b98ea242928633" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/doctrine/annotations/zipball/6a6bec0670bb6e71a263b08bc1b98ea242928633", 20 | "reference": "6a6bec0670bb6e71a263b08bc1b98ea242928633", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "doctrine/lexer": "1.*", 25 | "php": ">=5.3.2" 26 | }, 27 | "require-dev": { 28 | "doctrine/cache": "1.*", 29 | "phpunit/phpunit": "4.*" 30 | }, 31 | "type": "library", 32 | "extra": { 33 | "branch-alias": { 34 | "dev-master": "1.3.x-dev" 35 | } 36 | }, 37 | "autoload": { 38 | "psr-0": { 39 | "Doctrine\\Common\\Annotations\\": "lib/" 40 | } 41 | }, 42 | "notification-url": "https://packagist.org/downloads/", 43 | "license": [ 44 | "MIT" 45 | ], 46 | "authors": [ 47 | { 48 | "name": "Roman Borschel", 49 | "email": "roman@code-factory.org" 50 | }, 51 | { 52 | "name": "Benjamin Eberlei", 53 | "email": "kontakt@beberlei.de" 54 | }, 55 | { 56 | "name": "Guilherme Blanco", 57 | "email": "guilhermeblanco@gmail.com" 58 | }, 59 | { 60 | "name": "Jonathan Wage", 61 | "email": "jonwage@gmail.com" 62 | }, 63 | { 64 | "name": "Johannes Schmitt", 65 | "email": "schmittjoh@gmail.com" 66 | } 67 | ], 68 | "description": "Docblock Annotations Parser", 69 | "homepage": "http://www.doctrine-project.org", 70 | "keywords": [ 71 | "annotations", 72 | "docblock", 73 | "parser" 74 | ], 75 | "time": "2014-09-25 16:45:30" 76 | }, 77 | { 78 | "name": "doctrine/cache", 79 | "version": "v1.3.1", 80 | "source": { 81 | "type": "git", 82 | "url": "https://github.com/doctrine/cache.git", 83 | "reference": "cf483685798a72c93bf4206e3dd6358ea07d64e7" 84 | }, 85 | "dist": { 86 | "type": "zip", 87 | "url": "https://api.github.com/repos/doctrine/cache/zipball/cf483685798a72c93bf4206e3dd6358ea07d64e7", 88 | "reference": "cf483685798a72c93bf4206e3dd6358ea07d64e7", 89 | "shasum": "" 90 | }, 91 | "require": { 92 | "php": ">=5.3.2" 93 | }, 94 | "conflict": { 95 | "doctrine/common": ">2.2,<2.4" 96 | }, 97 | "require-dev": { 98 | "phpunit/phpunit": ">=3.7", 99 | "satooshi/php-coveralls": "~0.6" 100 | }, 101 | "type": "library", 102 | "extra": { 103 | "branch-alias": { 104 | "dev-master": "1.4.x-dev" 105 | } 106 | }, 107 | "autoload": { 108 | "psr-0": { 109 | "Doctrine\\Common\\Cache\\": "lib/" 110 | } 111 | }, 112 | "notification-url": "https://packagist.org/downloads/", 113 | "license": [ 114 | "MIT" 115 | ], 116 | "authors": [ 117 | { 118 | "name": "Roman Borschel", 119 | "email": "roman@code-factory.org" 120 | }, 121 | { 122 | "name": "Benjamin Eberlei", 123 | "email": "kontakt@beberlei.de" 124 | }, 125 | { 126 | "name": "Guilherme Blanco", 127 | "email": "guilhermeblanco@gmail.com" 128 | }, 129 | { 130 | "name": "Jonathan Wage", 131 | "email": "jonwage@gmail.com" 132 | }, 133 | { 134 | "name": "Johannes Schmitt", 135 | "email": "schmittjoh@gmail.com" 136 | } 137 | ], 138 | "description": "Caching library offering an object-oriented API for many cache backends", 139 | "homepage": "http://www.doctrine-project.org", 140 | "keywords": [ 141 | "cache", 142 | "caching" 143 | ], 144 | "time": "2014-09-17 14:24:04" 145 | } 146 | ], 147 | "packages-dev": [ 148 | { 149 | "name": "sensio/generator-bundle", 150 | "version": "v2.5.0", 151 | "target-dir": "Sensio/Bundle/GeneratorBundle", 152 | "source": { 153 | "type": "git", 154 | "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", 155 | "reference": "0225fcd08e94de2165ffa85de50c3c9d9592e96b" 156 | }, 157 | "dist": { 158 | "type": "zip", 159 | "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/0225fcd08e94de2165ffa85de50c3c9d9592e96b", 160 | "reference": "0225fcd08e94de2165ffa85de50c3c9d9592e96b", 161 | "shasum": "" 162 | }, 163 | "require": { 164 | "symfony/console": "~2.5", 165 | "symfony/framework-bundle": "~2.2" 166 | }, 167 | "require-dev": { 168 | "doctrine/orm": "~2.2,>=2.2.3", 169 | "symfony/doctrine-bridge": "~2.2", 170 | "twig/twig": "~1.11" 171 | }, 172 | "type": "symfony-bundle", 173 | "extra": { 174 | "branch-alias": { 175 | "dev-master": "2.5.x-dev" 176 | } 177 | }, 178 | "autoload": { 179 | "psr-0": { 180 | "Sensio\\Bundle\\GeneratorBundle": "" 181 | } 182 | }, 183 | "notification-url": "https://packagist.org/downloads/", 184 | "license": [ 185 | "MIT" 186 | ], 187 | "authors": [ 188 | { 189 | "name": "Fabien Potencier", 190 | "email": "fabien@symfony.com" 191 | } 192 | ], 193 | "description": "This bundle generates code for you", 194 | "time": "2014-12-07 18:30:52" 195 | } 196 | ], 197 | "aliases": [], 198 | "minimum-stability": "stable", 199 | "stability-flags": [], 200 | "prefer-stable": false, 201 | "platform": { 202 | "php": ">=5.3.3" 203 | }, 204 | "platform-dev": [] 205 | } 206 | -------------------------------------------------------------------------------- /lib/parsers/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Promise = require('bluebird'); 4 | 5 | var parsers = { 6 | npm: { 7 | name: 'NPM', 8 | type: 'manifest', 9 | parser: require('./npm'), 10 | filter: path => path.match(/^package\.json$/) 11 | }, 12 | cpanMetaYML: { 13 | name: 'CPAN', 14 | type: 'manifest', 15 | parser: require('./cpan-meta-yml'), 16 | filter: path => path.match(/^META\.yml$/) 17 | }, 18 | cpanMetaJSON: { 19 | name: 'CPAN', 20 | type: 'manifest', 21 | parser: require('./cpan-meta-json'), 22 | filter: path => path.match(/^META\.json$/) 23 | }, 24 | cran: { 25 | name: 'CRAN', 26 | type: 'manifest', 27 | parser: require('./cran'), 28 | filter: path => path.match(/^DESCRIPTION$/) 29 | }, 30 | npmshrinkwrap: { 31 | name: 'NPM', 32 | type: 'lockfile', 33 | parser: require('./npm-shrinkwrap'), 34 | filter: path => path.match(/^npm-shrinkwrap\.json$/) 35 | }, 36 | yarn: { 37 | name: 'NPM', 38 | type: 'lockfile', 39 | parser: require('./yarn'), 40 | filter: path => path.match(/^yarn\.lock$/) 41 | }, 42 | rubygems: { 43 | name: 'Rubygems', 44 | type: 'manifest', 45 | parser: require('./rubygems'), 46 | filter: path => path.match(/^Gemfile$|^gems\.rb$/) 47 | }, 48 | rubygemslockfile: { 49 | name: 'Rubygems', 50 | type: 'lockfile', 51 | parser: require('./rubygems-lockfile'), 52 | filter: path => path.match(/^Gemfile\.lock$|^gems\.locked$/) 53 | }, 54 | gemspec: { 55 | name: 'Rubygems', 56 | type: 'gemspec', 57 | parser: require('./gemspec'), 58 | filter: path => path.match(/^[A-Za-z0-9_-]+\.gemspec$/) 59 | }, 60 | podspec: { 61 | name: 'Cocoapods', 62 | type: 'podspec', 63 | parser: require('./podspec'), 64 | filter: path => path.match(/^[A-Za-z0-9_-]+\.podspec$/) 65 | }, 66 | podspecJson: { 67 | name: 'Cocoapods', 68 | type: 'podspec', 69 | parser: require('./podspec-json'), 70 | filter: path => path.match(/^[A-Za-z0-9_-]+\.podspec.json$/) 71 | }, 72 | packagist: { 73 | name: 'Packagist', 74 | type: 'manifest', 75 | parser: require('./packagist'), 76 | filter: path => path.match(/^composer\.json$/) 77 | }, 78 | packagistlockfile: { 79 | name: 'Packagist', 80 | type: 'lockfile', 81 | parser: require('./packagist-lockfile'), 82 | filter: path => path.match(/^composer\.lock$/) 83 | }, 84 | cargo: { 85 | name: 'Cargo', 86 | type: 'manifest', 87 | parser: require('./cargo'), 88 | filter: path => path.match(/^Cargo\.toml$/) 89 | }, 90 | cargolockfile: { 91 | name: 'Cargo', 92 | type: 'lockfile', 93 | parser: require('./cargo-lock'), 94 | filter: path => path.match(/^Cargo\.lock$/) 95 | }, 96 | elm: { 97 | name: 'Elm', 98 | type: 'manifest', 99 | parser: require('./elm'), 100 | filter: path => path.match(/^elm-package\.json$|^elm_dependencies\.json$/) 101 | }, 102 | elmExact: { 103 | name: 'Elm', 104 | type: 'lockfile', 105 | parser: require('./elm-exact'), 106 | filter: path => path.match(/^elm-stuff\/exact-dependencies\.json$/) 107 | }, 108 | bower: { 109 | name: 'Bower', 110 | type: 'manifest', 111 | parser: require('./bower'), 112 | filter: path => path.match(/^bower\.json$/) 113 | }, 114 | dub:{ 115 | name: 'Dub', 116 | type: 'manifest', 117 | parser: require('./dub'), 118 | filter: path => path.match(/^dub\.json$/) 119 | }, 120 | dubSdl:{ 121 | name: 'Dub', 122 | type: 'manifest', 123 | parser: require('./dub-sdl'), 124 | filter: path => path.match(/^dub\.sdl$/) 125 | }, 126 | pub: { 127 | name: 'Pub', 128 | type: 'manifest', 129 | parser: require('./pub'), 130 | filter: path => path.match(/^pubspec\.yaml$/) 131 | }, 132 | publock: { 133 | name: 'Pub', 134 | type: 'lockfile', 135 | parser: require('./publock'), 136 | filter: path => path.match(/^pubspec\.lock$/) 137 | }, 138 | clojars: { 139 | name: 'Clojars', 140 | type: 'manifest', 141 | parser: require('./clojars'), 142 | filter: path => path.match(/^project\.clj$/) 143 | }, 144 | hex: { 145 | name: 'Hex', 146 | type: 'manifest', 147 | parser: require('./hex'), 148 | filter: path => path.match(/^mix\.exs$/) 149 | }, 150 | hexLock: { 151 | name: 'Hex', 152 | type: 'lockfile', 153 | parser: require('./hex-lock'), 154 | filter: path => path.match(/^mix\.lock$/) 155 | }, 156 | pypi: { 157 | name: 'PyPI', 158 | type: 'manifest', 159 | parser: require('./pypi'), 160 | filter: path => 161 | path.match(/require.*\.(txt|pip)$/) && !path.match(/^node_modules/) 162 | }, 163 | pypiSetup: { 164 | name: 'PyPI', 165 | type: 'manifest', 166 | parser: require('./pypi-setup'), 167 | filter: path => path.match(/^setup\.py$/) 168 | }, 169 | cocoapods: { 170 | name: 'CocoaPods', 171 | type: 'manifest', 172 | parser: require('./cocoapods'), 173 | filter: path => path.match(/^Podfile$/) 174 | }, 175 | cocoapodsLockfile: { 176 | name: 'CocoaPods', 177 | type: 'lockfile', 178 | parser: require('./cocoapods-lockfile'), 179 | filter: path => path.match(/^Podfile\.lock$/) 180 | }, 181 | nuget: { 182 | name: 'NuGet', 183 | type: 'manifest', 184 | parser: require('./nuget'), 185 | filter: path => path.match(/Project\.json$/) 186 | }, 187 | nugetLockfile: { 188 | name: 'NuGet', 189 | type: 'lockfile', 190 | parser: require('./nuget-lockfile'), 191 | filter: path => path.match(/Project\.lock\.json$/) 192 | }, 193 | nugetPackages: { 194 | name: 'NuGet', 195 | type: 'manifest', 196 | parser: require('./nuget-packages'), 197 | filter: path => path.match(/packages\.config$/) 198 | }, 199 | nuspec: { 200 | name: 'NuGet', 201 | type: 'manifest', 202 | parser: require('./nuspec'), 203 | filter: path => path.match(/^[A-Za-z0-9_-]+\.nuspec$/) 204 | }, 205 | paket: { 206 | name: 'NuGet', 207 | type: 'lockfile', 208 | parser: require('./paket'), 209 | filter: path => path.match(/paket\.lock$/) 210 | }, 211 | julia: { 212 | parser: require('./julia'), 213 | filter: path => path.match(/^REQUIRE$/) 214 | }, 215 | meteor: { 216 | parser: require('./meteor'), 217 | filter: path => path.match(/^versions\.json$/) 218 | }, 219 | go: { 220 | name: 'Go', 221 | type: 'manifest', 222 | parser: require('./godeps'), 223 | filter: path => path.match(/^Godeps\/Godeps\.json$/) 224 | }, 225 | glide: { 226 | name: 'Go', 227 | type: 'manifest', 228 | parser: require('./glide'), 229 | filter: path => path.match(/^glide\.yaml$/) 230 | }, 231 | glidelockfile: { 232 | name: 'Go', 233 | type: 'lockfile', 234 | parser: require('./glidelockfile'), 235 | filter: path => path.match(/^glide\.lock$/) 236 | }, 237 | gb: { 238 | name: 'Go', 239 | type: 'manifest', 240 | parser: require('./gb'), 241 | filter: path => path.match(/^vendor\/manifest$/) 242 | }, 243 | gpm: { 244 | name: 'Go', 245 | type: 'manifest', 246 | parser: require('./gpm'), 247 | filter: path => path.match(/^Godeps$/) 248 | }, 249 | govendor: { 250 | name: 'Go', 251 | type: 'manifest', 252 | parser: require('./govendor'), 253 | filter: path => path.match(/^vendor\/vendor\.json$/) 254 | }, 255 | cartfile: { 256 | name: 'Carthage', 257 | type: 'manifest', 258 | parser: require('./cartfile'), 259 | filter: path => path.match(/^Cartfile$/) 260 | }, 261 | cartfileprivate: { 262 | name: 'Carthage', 263 | type: 'manifest', 264 | parser: require('./cartfileprivate'), 265 | filter: path => path.match(/^Cartfile\.private$/) 266 | }, 267 | cartfileresolved: { 268 | name: 'Carthage', 269 | type: 'lockfile', 270 | parser: require('./cartfileresolved'), 271 | filter: path => path.match(/^Cartfile\.resolved$/) 272 | }, 273 | maven: { 274 | name: 'Maven', 275 | type: 'manifest', 276 | parser: require('./maven'), 277 | filter: path => path.match(/pom\.xml$/i) 278 | }, 279 | ivy: { 280 | name: 'Maven', 281 | type: 'manifest', 282 | parser: require('./ivy'), 283 | filter: path => path.match(/ivy\.xml$/i) 284 | }, 285 | gradle: { 286 | name: 'Maven', 287 | type: 'manifest', 288 | parser: require('./gradle'), 289 | filter: path => path.match(/[A-Za-z0-9_-]+\.gradle$/i) 290 | }, 291 | shard: { 292 | name: 'Shards', 293 | type: 'manifest', 294 | parser: require('./shard'), 295 | filter: path => path.match(/shard\.yml$/i) 296 | }, 297 | shardLockfile: { 298 | name: 'Shards', 299 | type: 'lockfile', 300 | parser: require('./shard-lockfile'), 301 | filter: path => path.match(/^shard\.lock$/i) 302 | }, 303 | swiftpm: { 304 | name: 'SwiftPM', 305 | type: 'manifest', 306 | parser: require('./swift'), 307 | filter: path => path.match(/^Package\.swift$/i) 308 | } 309 | }; 310 | 311 | var parse = function(platformName, str) { 312 | var platform = parsers[platformName]; 313 | if (!platform) return Promise.reject('Invalid platform'); 314 | 315 | return Promise.resolve(platform.parser(str)); 316 | }; 317 | 318 | var findPlatform = function(filepath) { 319 | var pm; 320 | Object.keys(parsers).some( (_pm) => { 321 | pm = parsers[_pm]; 322 | pm.parserName = _pm; 323 | 324 | if (pm.filter(filepath)) { return true; } else { pm = null; } 325 | }); 326 | return pm; 327 | }; 328 | 329 | module.exports = { 330 | parse: parse, 331 | findPlatform: findPlatform, 332 | parsers: parsers 333 | }; 334 | -------------------------------------------------------------------------------- /test/fixtures/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (2.3.1) 5 | actionmailer (4.2.3) 6 | actionpack (= 4.2.3) 7 | actionview (= 4.2.3) 8 | activejob (= 4.2.3) 9 | mail (~> 2.5, >= 2.5.4) 10 | rails-dom-testing (~> 1.0, >= 1.0.5) 11 | actionpack (4.2.3) 12 | actionview (= 4.2.3) 13 | activesupport (= 4.2.3) 14 | rack (~> 1.6) 15 | rack-test (~> 0.6.2) 16 | rails-dom-testing (~> 1.0, >= 1.0.5) 17 | rails-html-sanitizer (~> 1.0, >= 1.0.2) 18 | actionview (4.2.3) 19 | activesupport (= 4.2.3) 20 | builder (~> 3.1) 21 | erubis (~> 2.7.0) 22 | rails-dom-testing (~> 1.0, >= 1.0.5) 23 | rails-html-sanitizer (~> 1.0, >= 1.0.2) 24 | activejob (4.2.3) 25 | activesupport (= 4.2.3) 26 | globalid (>= 0.3.0) 27 | activemodel (4.2.3) 28 | activesupport (= 4.2.3) 29 | builder (~> 3.1) 30 | activerecord (4.2.3) 31 | activemodel (= 4.2.3) 32 | activesupport (= 4.2.3) 33 | arel (~> 6.0) 34 | activesupport (4.2.3) 35 | i18n (~> 0.7) 36 | json (~> 1.7, >= 1.7.7) 37 | minitest (~> 5.1) 38 | thread_safe (~> 0.3, >= 0.3.4) 39 | tzinfo (~> 1.1) 40 | addressable (2.3.8) 41 | after_commit_action (1.0.0) 42 | activerecord (>= 3.0.0) 43 | activesupport (>= 3.0.0) 44 | arel (6.0.2) 45 | autoparse (0.3.3) 46 | addressable (>= 2.3.1) 47 | extlib (>= 0.9.15) 48 | multi_json (>= 1.0.0) 49 | autoprefixer-rails (5.2.1.1) 50 | execjs 51 | json 52 | bigquery (0.8.3) 53 | google-api-client (= 0.8.6) 54 | bini (0.7.0) 55 | sys-proctable 56 | bootstrap-sass (3.3.5.1) 57 | autoprefixer-rails (>= 5.0.0.1) 58 | sass (>= 3.3.0) 59 | bugsnag (2.8.11) 60 | json (~> 1.7, >= 1.7.7) 61 | builder (3.2.2) 62 | celluloid (0.16.0) 63 | timers (~> 4.0.0) 64 | coffee-rails (4.1.0) 65 | coffee-script (>= 2.2.0) 66 | railties (>= 4.0.0, < 5.0) 67 | coffee-script (2.4.1) 68 | coffee-script-source 69 | execjs 70 | coffee-script-source (1.9.1.1) 71 | connection_pool (2.2.0) 72 | counter_culture (0.1.33) 73 | activerecord (>= 3.0.0) 74 | activesupport (>= 3.0.0) 75 | after_commit_action (~> 1.0.0) 76 | css_parser (1.3.6) 77 | addressable 78 | daemons (1.2.3) 79 | dalli (2.7.4) 80 | dotenv (2.0.2) 81 | dotenv-rails (2.0.2) 82 | dotenv (= 2.0.2) 83 | railties (~> 4.0) 84 | elasticsearch (1.0.12) 85 | elasticsearch-api (= 1.0.12) 86 | elasticsearch-transport (= 1.0.12) 87 | elasticsearch-api (1.0.12) 88 | multi_json 89 | elasticsearch-model (0.1.7) 90 | activesupport (> 3) 91 | elasticsearch (> 0.4) 92 | hashie 93 | elasticsearch-rails (0.1.7) 94 | elasticsearch-transport (1.0.12) 95 | faraday 96 | multi_json 97 | erubis (2.7.0) 98 | escape_utils (1.1.0) 99 | ethon (0.7.4) 100 | ffi (>= 1.3.0) 101 | eventmachine (1.0.7) 102 | excon (0.45.4) 103 | execjs (2.5.2) 104 | extlib (0.9.16) 105 | faraday (0.9.1) 106 | multipart-post (>= 1.2, < 3) 107 | faraday-http-cache (1.1.1) 108 | faraday (~> 0.8) 109 | fast_blank (1.0.0) 110 | fast_xor (1.1.3) 111 | rake 112 | rake-compiler 113 | fast_xs (0.8.0) 114 | ffi (1.9.10) 115 | fission (0.5.0) 116 | CFPropertyList (~> 2.2) 117 | fog (1.32.0) 118 | fog-atmos 119 | fog-aws (>= 0.6.0) 120 | fog-brightbox (~> 0.4) 121 | fog-core (~> 1.32) 122 | fog-ecloud (= 0.1.1) 123 | fog-google (>= 0.0.2) 124 | fog-json 125 | fog-local 126 | fog-powerdns (>= 0.1.1) 127 | fog-profitbricks 128 | fog-radosgw (>= 0.0.2) 129 | fog-riakcs 130 | fog-sakuracloud (>= 0.0.4) 131 | fog-serverlove 132 | fog-softlayer 133 | fog-storm_on_demand 134 | fog-terremark 135 | fog-vmfusion 136 | fog-voxel 137 | fog-xml (~> 0.1.1) 138 | ipaddress (~> 0.5) 139 | nokogiri (~> 1.5, >= 1.5.11) 140 | fog-atmos (0.1.0) 141 | fog-core 142 | fog-xml 143 | fog-aws (0.7.4) 144 | fog-core (~> 1.27) 145 | fog-json (~> 1.0) 146 | fog-xml (~> 0.1) 147 | ipaddress (~> 0.8) 148 | fog-brightbox (0.8.0) 149 | fog-core (~> 1.22) 150 | fog-json 151 | inflecto (~> 0.0.2) 152 | fog-core (1.32.0) 153 | builder 154 | excon (~> 0.45) 155 | formatador (~> 0.2) 156 | mime-types 157 | net-scp (~> 1.1) 158 | net-ssh (>= 2.1.3) 159 | fog-ecloud (0.1.1) 160 | fog-core 161 | fog-xml 162 | fog-google (0.0.7) 163 | fog-core 164 | fog-json 165 | fog-xml 166 | fog-json (1.0.2) 167 | fog-core (~> 1.0) 168 | multi_json (~> 1.10) 169 | fog-local (0.2.1) 170 | fog-core (~> 1.27) 171 | fog-powerdns (0.1.1) 172 | fog-core (~> 1.27) 173 | fog-json (~> 1.0) 174 | fog-xml (~> 0.1) 175 | fog-profitbricks (0.0.5) 176 | fog-core 177 | fog-xml 178 | nokogiri 179 | fog-radosgw (0.0.4) 180 | fog-core (>= 1.21.0) 181 | fog-json 182 | fog-xml (>= 0.0.1) 183 | fog-riakcs (0.1.0) 184 | fog-core 185 | fog-json 186 | fog-xml 187 | fog-sakuracloud (1.0.1) 188 | fog-core 189 | fog-json 190 | fog-serverlove (0.1.2) 191 | fog-core 192 | fog-json 193 | fog-softlayer (0.4.7) 194 | fog-core 195 | fog-json 196 | fog-storm_on_demand (0.1.1) 197 | fog-core 198 | fog-json 199 | fog-terremark (0.1.0) 200 | fog-core 201 | fog-xml 202 | fog-vmfusion (0.1.0) 203 | fission 204 | fog-core 205 | fog-voxel (0.1.0) 206 | fog-core 207 | fog-xml 208 | fog-xml (0.1.2) 209 | fog-core 210 | nokogiri (~> 1.5, >= 1.5.11) 211 | font-awesome-rails (4.4.0.0) 212 | railties (>= 3.2, < 5.0) 213 | formatador (0.2.5) 214 | fuzzy_match (2.1.0) 215 | gemoji (2.1.0) 216 | gems (0.8.3) 217 | globalid (0.3.5) 218 | activesupport (>= 4.1.0) 219 | google-api-client (0.8.6) 220 | activesupport (>= 3.2) 221 | addressable (~> 2.3) 222 | autoparse (~> 0.3) 223 | extlib (~> 0.9) 224 | faraday (~> 0.9) 225 | googleauth (~> 0.3) 226 | launchy (~> 2.4) 227 | multi_json (~> 1.10) 228 | retriable (~> 1.4) 229 | signet (~> 0.6) 230 | googleauth (0.4.1) 231 | faraday (~> 0.9) 232 | jwt (~> 1.4) 233 | logging (~> 2.0) 234 | memoist (~> 0.12) 235 | multi_json (= 1.11) 236 | signet (~> 0.6) 237 | hashie (3.4.2) 238 | heroics (0.0.14) 239 | erubis (~> 2.7.0) 240 | excon 241 | moneta 242 | multi_json (>= 1.9.2) 243 | netrc 244 | hike (1.2.3) 245 | hiredis (0.6.0) 246 | hirefire-resource (0.3.7) 247 | hitimes (1.2.2) 248 | htmlentities (4.3.4) 249 | httparty (0.11.0) 250 | multi_json (~> 1.0) 251 | multi_xml (>= 0.5.2) 252 | i18n (0.7.0) 253 | inflecto (0.0.2) 254 | ipaddress (0.8.0) 255 | jbuilder (2.3.1) 256 | activesupport (>= 3.0.0, < 5) 257 | multi_json (~> 1.2) 258 | jquery-rails (4.0.4) 259 | rails-dom-testing (~> 1.0) 260 | railties (>= 4.2.0) 261 | thor (>= 0.14, < 2.0) 262 | js-cookie-rails (2.0.0.pre.beta.1.0) 263 | railties (>= 3.2.0, < 5.0) 264 | json (1.8.3) 265 | jwt (1.5.1) 266 | languages (1.1.11) 267 | escape_utils (~> 1.0) 268 | launchy (2.4.3) 269 | addressable (~> 2.3) 270 | little-plugger (1.1.3) 271 | logging (2.0.0) 272 | little-plugger (~> 1.1) 273 | multi_json (~> 1.10) 274 | loofah (2.0.2) 275 | nokogiri (>= 1.5.9) 276 | mail (2.6.3) 277 | mime-types (>= 1.16, < 3) 278 | memoist (0.12.0) 279 | mime-types (2.6.1) 280 | mini_portile (0.6.2) 281 | minitest (5.7.0) 282 | moneta (0.8.0) 283 | multi_json (1.11.0) 284 | multi_xml (0.5.5) 285 | multipart-post (2.0.0) 286 | net-scp (1.2.1) 287 | net-ssh (>= 2.6.5) 288 | net-ssh (2.9.2) 289 | netrc (0.10.3) 290 | newrelic_rpm (3.12.1.298) 291 | nokogiri (1.6.6.2) 292 | mini_portile (~> 0.6.0) 293 | oauth2 (1.0.0) 294 | faraday (>= 0.8, < 0.10) 295 | jwt (~> 1.0) 296 | multi_json (~> 1.3) 297 | multi_xml (~> 0.5) 298 | rack (~> 1.2) 299 | octokit (4.0.1) 300 | sawyer (~> 0.6.0, >= 0.5.3) 301 | oj (2.12.11) 302 | oj_mimic_json (1.0.1) 303 | omniauth (1.2.2) 304 | hashie (>= 1.2, < 4) 305 | rack (~> 1.0) 306 | omniauth-github (1.1.2) 307 | omniauth (~> 1.0) 308 | omniauth-oauth2 (~> 1.1) 309 | omniauth-oauth2 (1.3.1) 310 | oauth2 (~> 1.0) 311 | omniauth (~> 1.2) 312 | pg (0.18.2) 313 | pg_array_parser (0.0.9) 314 | platform-api (0.3.0) 315 | heroics (~> 0.0.10) 316 | postgres_ext (2.4.1) 317 | activerecord (>= 4.0.0) 318 | arel (>= 4.0.1) 319 | pg_array_parser (~> 0.0.9) 320 | premailer (1.8.4) 321 | css_parser (>= 1.3.6) 322 | htmlentities (>= 4.0.0) 323 | premailer-rails (1.8.2) 324 | actionmailer (>= 3, < 5) 325 | premailer (~> 1.7, >= 1.7.9) 326 | puma (2.12.3) 327 | pushover (1.0.4) 328 | bini (= 0.7.0) 329 | httparty (= 0.11.0) 330 | yajl-ruby (= 1.1.0) 331 | rack (1.6.4) 332 | rack-canonical-host (0.1.0) 333 | addressable 334 | rack (~> 1.0) 335 | rack-protection (1.5.3) 336 | rack 337 | rack-test (0.6.3) 338 | rack (>= 1.0) 339 | rails (4.2.3) 340 | actionmailer (= 4.2.3) 341 | actionpack (= 4.2.3) 342 | actionview (= 4.2.3) 343 | activejob (= 4.2.3) 344 | activemodel (= 4.2.3) 345 | activerecord (= 4.2.3) 346 | activesupport (= 4.2.3) 347 | bundler (>= 1.3.0, < 2.0) 348 | railties (= 4.2.3) 349 | sprockets-rails 350 | rails-deprecated_sanitizer (1.0.3) 351 | activesupport (>= 4.2.0.alpha) 352 | rails-dom-testing (1.0.6) 353 | activesupport (>= 4.2.0.beta, < 5.0) 354 | nokogiri (~> 1.6.0) 355 | rails-deprecated_sanitizer (>= 1.0.1) 356 | rails-html-sanitizer (1.0.2) 357 | loofah (~> 2.0) 358 | rails_12factor (0.0.3) 359 | rails_serve_static_assets 360 | rails_stdout_logging 361 | rails_safe_tasks (1.0.0) 362 | rails_serve_static_assets (0.0.4) 363 | rails_stdout_logging (0.0.3) 364 | railties (4.2.3) 365 | actionpack (= 4.2.3) 366 | activesupport (= 4.2.3) 367 | rake (>= 0.8.7) 368 | thor (>= 0.18.1, < 2.0) 369 | rake (10.4.2) 370 | rake-compiler (0.9.5) 371 | rake 372 | rb-readline (0.5.3) 373 | redis (3.2.1) 374 | redis-namespace (1.5.2) 375 | redis (~> 3.0, >= 3.0.4) 376 | retriable (1.4.1) 377 | sanitize-url (0.1.4) 378 | sass (3.4.16) 379 | sass-rails (5.0.3) 380 | railties (>= 4.0.0, < 5.0) 381 | sass (~> 3.1) 382 | sprockets (>= 2.8, < 4.0) 383 | sprockets-rails (>= 2.0, < 4.0) 384 | tilt (~> 1.1) 385 | sassc (1.6.0) 386 | bundler 387 | ffi (~> 1.9.6) 388 | sass (>= 3.3.0) 389 | sassc-rails (1.1.0) 390 | rails (>= 4.0.0) 391 | sass 392 | sassc (~> 1.6) 393 | sprockets (> 2.11) 394 | tilt 395 | sawyer (0.6.0) 396 | addressable (~> 2.3.5) 397 | faraday (~> 0.8, < 0.10) 398 | semantic (1.4.1) 399 | sidekiq (3.4.2) 400 | celluloid (~> 0.16.0) 401 | connection_pool (~> 2.2, >= 2.2.0) 402 | json (~> 1.0) 403 | redis (~> 3.2, >= 3.2.1) 404 | redis-namespace (~> 1.5, >= 1.5.2) 405 | signet (0.6.1) 406 | addressable (~> 2.3) 407 | extlib (~> 0.9) 408 | faraday (~> 0.9) 409 | jwt (~> 1.5) 410 | multi_json (~> 1.10) 411 | simple-rss (1.3.1) 412 | simple_form (3.1.0) 413 | actionpack (~> 4.0) 414 | activemodel (~> 4.0) 415 | sinatra (1.4.6) 416 | rack (~> 1.4) 417 | rack-protection (~> 1.4) 418 | tilt (>= 1.3, < 3) 419 | sitemap_generator (5.1.0) 420 | builder 421 | spdx (1.2.3) 422 | fuzzy_match (~> 2.1) 423 | spdx-licenses (~> 1.0) 424 | spdx-licenses (1.0.0) 425 | json 426 | spring (1.3.6) 427 | sprockets (2.12.4) 428 | hike (~> 1.2) 429 | multi_json (~> 1.0) 430 | rack (~> 1.0) 431 | tilt (~> 1.1, != 1.3.0) 432 | sprockets-rails (2.3.2) 433 | actionpack (>= 3.0) 434 | activesupport (>= 3.0) 435 | sprockets (>= 2.8, < 4.0) 436 | sys-proctable (0.9.8) 437 | thin (1.6.3) 438 | daemons (~> 1.0, >= 1.0.9) 439 | eventmachine (~> 1.0) 440 | rack (~> 1.0) 441 | thor (0.19.1) 442 | thread_safe (0.3.5) 443 | tilt (1.4.1) 444 | timers (4.0.1) 445 | hitimes 446 | tipsy-rails (1.0.5) 447 | railties (>= 3.0) 448 | sass-rails 449 | turbolinks (2.5.3) 450 | coffee-rails 451 | typhoeus (0.7.2) 452 | ethon (>= 0.7.4) 453 | tzinfo (1.2.2) 454 | thread_safe (~> 0.1) 455 | uglifier (2.7.1) 456 | execjs (>= 0.3.0) 457 | json (>= 1.8.0) 458 | will_paginate (3.0.7) 459 | will_paginate-bootstrap (1.0.1) 460 | will_paginate (>= 3.0.3) 461 | yajl-ruby (1.1.0) 462 | 463 | PLATFORMS 464 | ruby 465 | 466 | DEPENDENCIES 467 | bigquery 468 | bootstrap-sass 469 | bugsnag 470 | bundler 471 | coffee-rails 472 | counter_culture 473 | dalli 474 | dotenv-rails 475 | elasticsearch-model 476 | elasticsearch-rails 477 | faraday-http-cache 478 | fast_blank 479 | fast_xor 480 | fast_xs 481 | fog 482 | font-awesome-rails 483 | gemoji 484 | gems 485 | hiredis 486 | hirefire-resource 487 | jbuilder 488 | jquery-rails 489 | js-cookie-rails 490 | languages 491 | mime-types (~> 2.6.1) 492 | newrelic_rpm 493 | nokogiri 494 | octokit 495 | oj 496 | oj_mimic_json 497 | omniauth 498 | omniauth-github 499 | pg 500 | platform-api 501 | postgres_ext 502 | premailer-rails 503 | puma 504 | pushover 505 | rack-canonical-host 506 | rails (= 4.2.3) 507 | rails_12factor 508 | rails_safe_tasks 509 | rb-readline 510 | redis 511 | sanitize-url 512 | sass-rails 513 | sassc-rails 514 | semantic 515 | sidekiq 516 | simple-rss 517 | simple_form 518 | sinatra 519 | sitemap_generator 520 | spdx 521 | spring 522 | sprockets (~> 2.12) 523 | thin 524 | tipsy-rails 525 | turbolinks 526 | typhoeus 527 | uglifier 528 | will_paginate 529 | will_paginate-bootstrap 530 | 531 | BUNDLED WITH 532 | 1.10.5 533 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing to Libraries.io :heart: 2 | Thanks for considering contributing. These guidelines outline how to contribute to the [Libraries.io](http://github.com/librariesio) project. 3 | 4 | ## Table of Contents 5 | [What is Libraries.io all about?](#whats-librariesio-about) 6 | 7 | [What should I know Before I get started?](#what-should-i-know-before-i-get-started) 8 | * [Code of conduct](#code-of-conduct) 9 | * [Langauge](#langauge) 10 | * [Installation and setup](#setup) 11 | 12 | [How can I contribute?](#how-can-i-contribute) 13 | * [Reporting bugs](#reporting-bugs) 14 | * [Suggesting enhancements](#suggesting-enhancements) 15 | * [Suggesting a new feature](#suggesting-new-features) 16 | * [Your first contribution](#your-first-contribution) 17 | * [Tackling something meatier](#tackling-something-meatier) 18 | 19 | [How can I talk to other contributors?](#how-can-i-talk-to-other-contributors) 20 | * [Chat](#chat) 21 | * [Video](#video) 22 | * [Social media](#twitter) 23 | 24 | [Who Are Libraries.io's Users?](#who-are-librariesios-users) 25 | 26 | [Our workflow](#workflow) 27 | 28 | 29 | ## What's Libraries.io About? 30 | _Our goal is to raise the quality of all software._ 31 | 32 | By outlining our [mission and strategy](/strategy.md) we hope to give you more power to make decisions and determine how best to spend your time. Specifically we tackle three distinct problems: 33 | 34 | * Discovery: _Helping developers make faster, more informed decisions about the software that they use._ 35 | * Maintainability: _Helping maintainers understand more about the software they depend upon and the consumers of their software._ 36 | * Sustainability: _Supporting undervalued software by highlighting shortfalls in contribution and funneling support to them._ 37 | 38 | ## What Should I Know Before I Get Started? 39 | 40 | ### Code of Conduct 41 | Libraries.io is an open and inclusive [community of people](https://github.com/orgs/librariesio/people) working together. We expect contributors to abide by our [contributor code of conduct](CODE_OF_CONDUCT.md) which basically say 'be excellent to each other'. Please report unacceptable behavior to conduct@libraries.io 42 | 43 | ### Language 44 | We communicate predominately in English. Contributions to the project should be made with English as the first language. We are happy for members of the community to communicate in a language other than English in chat, email and video but be aware that this might be considered exclusive by other members of the community. 45 | 46 | ### Documentation 47 | Documentation for the project as a whole is available at [docs.libraries.io](https://docs.libraries.io). These pages are generated from the [documentation](https://github.com/librariesio/documentation) repo. Documentation that needs to be in every repo is replicated in [required-files](https://github.com/librariesio/required-files) (currently limited to [GitHub templates](https://github.com/blog/2111-issue-and-pull-request-templates)). Otherwise documentation will be specific to that repo. For example the main [Libraries.io](https://github.com/librariesio/libraries.io) `README.md` contains information about installing and running the main rails application. 48 | 49 | ### Setup 50 | If you wish to make contributions to Libraries.io then you'll need a local version of the site to test. You can find instructions to install the correct Ruby version, Postgres, and to set up the database in our [README](https://github.com/librariesio/libraries.io/blob/master/README.md#getting-started). 51 | 52 | ## How Can I Contribute? 53 | 54 | ### Reporting Bugs 55 | 56 | The simplest thing that you can do to help us is by filing good bug reports, so here we go: 57 | 58 | #### Before Submitting a Bug Report 59 | 60 | * Double-check that the bug is persistent. The site is still in it's infancy and sometimes artifacts may appear and disappear. 61 | * Double-check the bug hasn't already been reported [on our issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio), they *should* be labelled `bug` or `bugsnag`. 62 | 63 | If something hasn't been raised, you can go ahead and create a new issue using [the template](/issue_template.md). If you'd like to help investigate further or fix the bug just mention it in your issue and check out our [workflow](#workflow). 64 | 65 | ### Suggesting Enhancements 66 | 67 | The next simplest thing you can do to help us is by telling us how we can improve the features we already support, here we go: 68 | 69 | #### Before Submitting an Enhancement 70 | 71 | * Check that the enhancement is not already [in our issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio), they should be labelled 'enhancement'. 72 | 73 | If there isn't already an issue for feature then go ahead and create a new issue for it using the [template](/issue_template.md). If you'd like to work on the enhancement then just mention it in a comment and check out our [workflow](#workflow). 74 | 75 | ### Suggesting New Features 76 | 77 | If you're into this zone then you need to understand a little more about what we're trying to achieve: 78 | 79 | #### Before Suggesting a Feature 80 | 81 | * Check that it aligns with [our strategy](strategy.md) and is specifically not in line with something we have said we will not do (for the moment this is anything to do with ranking *people*). 82 | * Check that the feature is not already [in our issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio), they should be tagged 'feature'. 83 | * Specifically check that it is not already a [funded commitment](https://github.com/librariesio/supporters/issues). 84 | 85 | If you're still thinking about that killer feature that no one else is thinking about then *please* create an issue for it using the [template](/issue_template.md). 86 | 87 | ### Your First Contribution 88 | You're in luck! We label issues that are ideal for first time contributors with [`first-pr`](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+user%3Alibrariesio+label%3A%22first-pr%22). For someone who wants something a little more meaty you might find an issue that needs some assistance with [`help wanted`](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+user%3Alibrariesio+label%3A%22help+wanted%22). Next you'll want to read our [workflow](#workflow). 89 | 90 | ### Tackling Something Meatier 91 | 92 | Tickets are labeled by size, skills required and to indicate workflow. Details can be found in our [labelling policy](/labelling.md). 93 | 94 | To get you started you might want to check out issues concerning [documentation](https://github.com/librariesio/documentation/issues/), [user experience](https://github.com/librariesio/libraries.io/labels/ux), [visual design](https://github.com/librariesio/libraries.io/issues/labels/visual%20design) or perhaps something already [awaiting help](https://github.com/librariesio/libraries.io/labels/help%20wanted). You may find the following useful: 95 | 96 | * Our [strategy](/strategy.md) which outlines what our goals are, how we are going to achieve those goals and what we are specifically going to avoid. 97 | * A [techncial overview](/overview.md) of the components that make up the Libraries.io project and run the [https://libraries.io](https://libraries.io) site. 98 | 99 | ## How Can I Talk To Other Contributors? 100 | 101 | ### Chat 102 | We use [Slack](http://slack.io) for chat. There's an open invitation available to anyone who wishes to join the conversation at [http://slack.libraries.io](http://slack.libraries.io). 103 | 104 | We try to use the following channels accordingly: 105 | 106 | * `#general` channel is used for general, water cooler-type conversation, contributor updates and issue discussion. 107 | * `#events` is used to share and discuss events that may be of interest to or attended by members of the community 108 | * `#activity` contains notifications from the various platforms that we use to keep the Libraries.io project turning. Including notifications from GitHub, Twitter and our servers. 109 | 110 | Members are encouraged to openly discuss their work, their lives, share views and ask for help using chat. It should be considered a *safe space* in which there is *no such thing as a stupid question*. Conversely no one contributor should ever be expected to have read something said in a chat. If someone should know something then it should be written down as an issue and/or documented in an obvious place for others to find. 111 | 112 | ### Video 113 | [Google Hangouts](http://hangouts.google.com) is our preferred tool for video chat. We operate an [open hangout](http://bit.ly/2kWtYak) for anyone to jump into at any time to discuss issues face to face. 114 | 115 | ### Regular updates 116 | Contributors are encouraged to share what they're working on. We do this through daily or weekly updates in the `#general` channel on Slack. Updates should take the format 'currently working on X, expecting to move onto Y, blocked on Z' where x, y and z are issues in our [issue tracker](https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+org%3Alibrariesio). 117 | 118 | Additionally we host an [open hangout](http://bit.ly/2kWtYak) for any contributor to join at *5pm UTC on a Tuesday* to discuss their work, the next week's priorities and to ask questions of other contributors regarding any aspect of the project. Again this is considered a *safe space* in which *there is no such thing as a stupid question*. 119 | 120 | ### Mail 121 | The [core team](https://github.com/orgs/librariesio/teams/core) operate a mailing list for project updates. If you'd like to subscribe you'll find a form in the footer on [Libraries.io](http://libraries.io). 122 | 123 | ### Twitter 124 | We have an account on Twitter at [@librariesio](http://twitter.com/librariesio). This is predominately used to retweet news, events and musings by contributors rather than as a direct method of communication. Contributors are encouraged to use @librariesio in a tweet when talking about the project, so that we may retweet if appropriate. The account is moderated and protected by the [core team](https://github.com/orgs/librariesio/teams/core). 125 | 126 | ### Facebook 127 | We have a Facebook page at [@libraries.io](https://www.facebook.com/libraries.io). Again this is predominantly used to gather and reflect news, events and musings by contributors rather than as a direct method of communication. Contributors are encouraged to reference Libraries.io in a post when talking about the project, so that we may reflect this if appropriate. Again the account is moderated and protected by the [core team](https://github.com/orgs/librariesio/teams/core). 128 | 129 | ### Medium 130 | We have a Medium account at [@librariesio](https://medium.com/@librariesio) and once again it is used to reflect news, events and musings by contributors rather than a direct method of communication. Contributors are encouraged to reference @librariesio in a post when talking about the project, so that we may recommend it if appropriate. Again the account is moderated and protected by the [core team](https://github.com/orgs/librariesio/teams/core). 131 | 132 | ## Who Are Libraries.io's Users? 133 | Libraries.io focusses on the following personas: 134 | 135 | ### Google 136 | _Is hungry for linked data so she can serve you up search traffic_ 137 | 138 | ### 'Searcher' 139 | _Is a developer with a problem, she is looking for something to help solve it._ 140 | 141 | ### 'Producer' 142 | _Has a product or products that incorporates some free/open source dependencies. She needs to ensure the product(s) are well maintained, free of vulnerabilities and licence compatible._ 143 | 144 | ### 'Maintainer' 145 | _Is a developer with a successful free/open source project. She's looking to understand more about those who use her project, attract more contributors and manage their contributions well._ 146 | 147 | ### 'Extender' 148 | _Has her own ideas. She wants access to the raw data so that she can mash up her own service and offer it to the world._ 149 | 150 | ### 'Overlord' 151 | _Has a vast empire of people, products and projects. Some of which she publishes as open source, some are proprietary. She wants to ensure that her policies regarding the use of dependencies are adhered to and that her team are as efficient as possible._ 152 | 153 | ## Workflow 154 | In general we use [GitHub](https://help.github.com/) and [Git](https://git-scm.com/docs/gittutorial) to support our workflow. If you are unfamiliar with those tools then you should check them out until you feel you have a basic understanding of GitHub and a working understanding of Git. Specifically you should understand how forking, branching, committing, PRing and merging works. 155 | 156 | #### Forking 157 | We prefer that contributors fork the project in order to contribute. 158 | 159 | #### Branching 160 | We *try* to use principles of [GitHub-flow](https://lucamezzalira.com/2014/03/10/git-flow-vs-github-flow/) in our branching model. That is the `master` branch will always be deployable to the live site, and that every branch from that will be used to add a feature, fix a bug, improve something or otherwise represent an atomic unit of work. 161 | 162 | #### Ticketing 163 | We *try* to create an issue for everything. That is any bug, feature or enhancement that is worth an open, focussed and documented discussion. 164 | 165 | #### Labelling 166 | We constrain labels as they are a key part of our workflow. Tickets will be labeled according to our [labelling policy](/labelling.md). 167 | 168 | #### Templates 169 | We use templates to guide contributors toward good practice in [filing bugs, requesting enhancements and features](/issue_template.md) and in [issuing pull-requests](/pull_request_template.md). 170 | 171 | #### Commenting 172 | If it possible to comment your contribution — for instance if you are contributing code — then do so in a way that is simple, clear, concise and lowers the level of understanding necessary for others to comprehend what comes afterward does or achieves. If you are contributing code it is very likely it will be rejected if it does not contain sufficient comments. 173 | 174 | #### Committing 175 | When committing to a branch be sure to use plain, simple language that describes the incremental changes made on the branch toward the overall goal. Avoid unnecessary complexity. Simplify whenever possible. Assume a reasonable but not comprehensive knowledge of the tools, techniques and context of your work. 176 | 177 | #### Testing 178 | When adding or fixing functionality, tests should be added to help reduce future regressions and breakage. All tests are ran automatically when new commits are pushed to a branch. Pull requests with broken/missing tests are not likely to be merged. 179 | 180 | #### Submitting for Review 181 | Once a piece of work (in a branch) is complete it should be readied for review. This is your last chance to ensure that your contribution is [properly tested](#testing). If you are contributing code it is likely your contribution will be rejected if it would lower the test-coverage. Once this is done you can submit a pull-request following the [template](/pull_request_template.md). 182 | 183 | It is likely that your contributions will need to be checked by at least one member of the [core team](https://github.com/orgs/librariesio/teams/core) prior to merging. It is also incredibly likely that your contribution may need some re-work in order to be accepted. Particularly if it lacks an appropriate level of comments, tests or it is difficult to understand your commits. Please do not take offense if this is the case. We understand that contributors give their time because they want to improve the project but please understand it is another's responsibility to ensure that the project is maintainable, and good practices like these are key to ensuring that is possible. 184 | 185 | #### Reviewing a PR 186 | We appreciate that it may be difficult to offer constructive criticism, but it is a necessary part of ensuring the project is maintainable and successful. If it is difficult to understand something, request it is better commented. If you do not feel assured of the robustness of a contribution, request it is better tested. If it is unclear what the goal of the piece of work is and how it relates to the [strategy](/strategy.md), request a clarification in the corresponding issue. If a pull-request has no corresponding issue, decreases code coverage or otherwise decreases the quality of the project. Reject it. Otherwise, merge it. 187 | 188 | #### Merging 189 | As we keep the `master` branch in a permanent state of 'deployment ready' once-merged your contribution will be live on the next deployment. 190 | #### Deploying 191 | Any member of the [deployers](https://github.com/orgs/librariesio/teams/deployers) team are able to redeploy the site. If you require a deployment then you might find one of them in our `#general` [chat channel on Slack](slack.libraries.io). 192 | -------------------------------------------------------------------------------- /test/fixtures/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 4.0.0 7 | 8 | org.accidia 9 | echo 10 | jar 11 | echo 12 | 0.1.23 13 | https://github.com/accidia/echo 14 | 15 | Echo provides a simple interface to store and retrieve generic protocol buffer objects 16 | 17 | 18 | 1.8 19 | 1.8 20 | true 21 | UTF-8 22 | -Xdoclint:none 23 | 24 | 25 | 2.16 26 | 2.5.0 27 | 1.2 28 | 1.9.2 29 | 1.7.7 30 | 1.1.2 31 | 18.0 32 | 6.1.1 33 | 2.5.1 34 | 2.10.1 35 | 2.7 36 | 1.7 37 | 1.5 38 | 2.4 39 | 40 | 41 | 42 | 43 | Accidia License 44 | https://github.com/accidia/echo/raw/master/LICENSE 45 | 46 | 47 | 48 | 49 | scm:git:git@github.com:accidia/echo.git 50 | scm:git:https://github.com/accidia/echo 51 | scm:git:https://github.com/accidia/echo.git 52 | 53 | 54 | 55 | 56 | nexus 57 | https://oss.sonatype.org/service/local/staging/deploy/maven2 58 | 59 | 60 | 61 | 62 | 63 | Paymon Teyer 64 | pteyer 65 | id at accidia.org 66 | 67 | 68 | 69 | 70 | 71 | 72 | org.glassfish.jersey.core 73 | jersey-server 74 | ${jersey.version} 75 | 76 | 77 | org.glassfish.jersey.containers 78 | jersey-container-servlet 79 | ${jersey.version} 80 | 81 | 82 | org.glassfish.jersey.containers 83 | jersey-container-servlet-core 84 | ${jersey.version} 85 | 86 | 87 | org.glassfish.jersey.media 88 | jersey-media-multipart 89 | ${jersey.version} 90 | 91 | 92 | org.glassfish.jersey.core 93 | jersey-common 94 | ${jersey.version} 95 | 96 | 97 | 98 | org.glassfish.jersey.containers 99 | jersey-container-jetty-http 100 | ${jersey.version} 101 | 102 | 103 | org.glassfish.jersey.containers 104 | jersey-container-jetty-servlet 105 | ${jersey.version} 106 | 107 | 108 | 109 | org.glassfish.jersey.core 110 | jersey-client 111 | ${jersey.version} 112 | 113 | 114 | 115 | org.glassfish.jersey.media 116 | jersey-media-moxy 117 | ${jersey.version} 118 | 119 | 120 | 121 | com.google.guava 122 | guava 123 | ${guava.version} 124 | 125 | 126 | 127 | com.googlecode.protobuf-java-format 128 | protobuf-java-format 129 | ${protobuf.java.version} 130 | 131 | 132 | 133 | mysql 134 | mysql-connector-java 135 | 5.1.9 136 | 137 | 138 | 139 | org.springframework 140 | spring-jdbc 141 | 4.1.0.RELEASE 142 | 143 | 144 | 145 | com.mchange 146 | c3p0 147 | 0.9.2.1 148 | 149 | 150 | 151 | org.freemarker 152 | freemarker 153 | 2.3.21 154 | 155 | 156 | 157 | org.jasypt 158 | jasypt 159 | 1.9.2 160 | 161 | 162 | 163 | com.google.protobuf 164 | protobuf-java 165 | 2.5.0 166 | 167 | 168 | 169 | redis.clients 170 | jedis 171 | 2.6.0 172 | 173 | 174 | 175 | ch.qos.logback 176 | logback-classic 177 | 1.1.2 178 | 179 | 180 | 181 | io.dropwizard.metrics 182 | metrics-core 183 | 3.1.0 184 | 185 | 186 | 187 | net.spy 188 | spymemcached 189 | 2.11.7 190 | 191 | 192 | 193 | io.dropwizard.metrics 194 | metrics-jersey2 195 | 3.1.0 196 | 197 | 198 | 199 | io.dropwizard.metrics 200 | metrics-annotation 201 | 3.1.0 202 | 203 | 204 | 205 | com.palominolabs.metrics 206 | metrics-guice 207 | 3.1.0 208 | 209 | 210 | 211 | com.google.inject 212 | guice 213 | 3.0 214 | 215 | 216 | 217 | commons-io 218 | commons-io 219 | 2.4 220 | 221 | 222 | 223 | org.apache.commons 224 | commons-exec 225 | 1.3 226 | 227 | 228 | 229 | com.typesafe 230 | config 231 | 1.2.1 232 | 233 | 234 | 235 | org.testng 236 | testng 237 | 6.8.7 238 | test 239 | 240 | 241 | 242 | org.mockito 243 | mockito-all 244 | 1.8.4 245 | test 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | org.apache.maven.plugins 254 | maven-compiler-plugin 255 | ${mvn.plugins.compiler.version} 256 | 257 | ${source.version} 258 | ${target.version} 259 | 260 | **/*.java 261 | **/*.proto 262 | 263 | 264 | 265 | 266 | 267 | org.apache.maven.plugins 268 | maven-source-plugin 269 | ${mvn.plugins.source.version} 270 | 271 | 272 | attach-sources 273 | compile 274 | 275 | jar 276 | 277 | 278 | 279 | 280 | 281 | **/*.java 282 | **/*.proto 283 | 284 | 285 | 286 | 287 | 288 | org.apache.maven.plugins 289 | maven-javadoc-plugin 290 | ${mvn.plugins.javadoc.version} 291 | 292 | apidocs/ 293 | false 294 | public 295 | ${source.version} 296 | true 297 | echo 298 | 299 | 300 | 301 | attach-javadocs 302 | install 303 | 304 | jar 305 | 306 | 307 | 308 | 309 | 310 | org.apache.maven.plugins 311 | maven-resources-plugin 312 | ${mvn.plugins.resources.version} 313 | 314 | 315 | copy-resources 316 | validate 317 | 318 | copy-resources 319 | 320 | 321 | ${basedir}/target/generated-sources/protobuf 322 | 323 | 324 | src/main/resources/protos 325 | true 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | maven-assembly-plugin 334 | 2.5.3 335 | 336 | 337 | 338 | org.accidia.echo.EchoApplication 339 | 340 | 341 | 342 | jar-with-dependencies 343 | 344 | echo 345 | false 346 | 347 | 348 | 349 | make-assembly 350 | package 351 | 352 | single 353 | 354 | 355 | 356 | 357 | 358 | 359 | maven-antrun-plugin 360 | 361 | 362 | generate-sources 363 | generate-sources 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | target/generated-sources 374 | 375 | 376 | run 377 | 378 | 379 | 380 | 381 | 382 | 383 | org.apache.maven.plugins 384 | maven-gpg-plugin 385 | ${mvn.plugins.gpg.version} 386 | 387 | 388 | sign-artifacts 389 | install 390 | 391 | sign 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | -------------------------------------------------------------------------------- /test/parsers_test.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var fs = require('fs'); 3 | var parsers = require('../lib/parsers'); 4 | 5 | var platformTests = [ 6 | { 7 | platform: 'npm', 8 | fixture: 'package.json', 9 | expected: [ 10 | {name: 'babel', version: '^4.6.6', type: 'runtime'}, 11 | {name: 'mocha', version: '^2.2.1', type: 'development'}, 12 | {name: 'node-sass', version: '*', type: 'optional'}, 13 | {name: 'base62', version: '*', type: 'peer'} 14 | ], 15 | validManifestPaths: ['package.json'], 16 | invalidManifestPaths: ['node_modules/foo/package.json'] 17 | }, 18 | { 19 | platform: 'cpanMetaYML', 20 | fixture: 'META.yml', 21 | expected: [ 22 | {name: "Digest::MD5", version: ">= 0", type: 'runtime'} 23 | ], 24 | validManifestPaths: ['META.yml'], 25 | invalidManifestPaths: [] 26 | }, 27 | { 28 | platform: 'cpanMetaJSON', 29 | fixture: 'META.json', 30 | expected: [ 31 | {name: "English", version: ">= 1.00", type: 'build'} 32 | ], 33 | validManifestPaths: ['META.json'], 34 | invalidManifestPaths: [] 35 | }, 36 | { 37 | platform: 'cran', 38 | fixture: 'DESCRIPTION', 39 | expected: [ 40 | {name: "R", version: ">= 3.1", type: 'depends'}, 41 | {name: "digest", version: "*", type: 'imports'} 42 | ], 43 | validManifestPaths: ['DESCRIPTION'], 44 | invalidManifestPaths: [] 45 | }, 46 | { 47 | platform: 'cran', 48 | fixture: 'DESCRIPTION2', 49 | expected: [ 50 | {name: "R", version: ">= 2.14.1", type: 'depends'}, 51 | {name: "methods", version: "*", type: 'imports'} 52 | ], 53 | validManifestPaths: ['DESCRIPTION'], 54 | invalidManifestPaths: [] 55 | }, 56 | { 57 | platform: 'npmshrinkwrap', 58 | fixture: 'npm-shrinkwrap.json', 59 | expected: [ 60 | {name: 'babel', version: '4.7.16', type: 'runtime'}, 61 | {name: 'acorn-babel', version: '0.11.1-38', type: 'runtime'} 62 | ], 63 | validManifestPaths: ['npm-shrinkwrap.json'], 64 | invalidManifestPaths: ['node_modules/foo/npm-shrinkwrap.json'] 65 | }, 66 | { 67 | platform: 'rubygems', 68 | fixture: 'Gemfile', 69 | expected: [ 70 | {name: 'oj', version: '>= 0', type: 'runtime'}, 71 | {name: 'rails', version: '= 4.2.0', type: 'runtime'}, 72 | {name: 'leveldb-ruby', version: '= 0.15', type: 'runtime'}, 73 | {name: 'spring', version: '>= 0', type: 'development'} 74 | ], 75 | validManifestPaths: ['Gemfile', 'gems.rb'], 76 | invalidManifestPaths: ['bundle/foo/Gemfile'] 77 | }, 78 | { 79 | platform: 'rubygemslockfile', 80 | fixture: 'Gemfile.lock', 81 | expected: [ 82 | {name:'CFPropertyList', version: '2.3.1', type: 'runtime'}, 83 | {name:'actionmailer', version: '4.2.3', type: 'runtime'} 84 | ], 85 | validManifestPaths: ['Gemfile.lock', 'gems.locked'], 86 | invalidManifestPaths: [] 87 | }, 88 | { 89 | platform: 'rubygems', 90 | fixture: 'gems.rb', 91 | expected: [ 92 | {name: 'oj', version: '>= 0', type: 'runtime'}, 93 | {name: 'rails', version: '= 4.2.0', type: 'runtime'}, 94 | {name: 'leveldb-ruby', version: '= 0.15', type: 'runtime'}, 95 | {name: 'spring', version: '>= 0', type: 'development'} 96 | ], 97 | validManifestPaths: ['gems.rb'], 98 | invalidManifestPaths: [] 99 | }, 100 | { 101 | platform: 'gemspec', 102 | fixture: 'devise.gemspec', 103 | expected: [ 104 | {name: 'warden', version: '~> 1.2.3', type: 'runtime'}, 105 | {name: 'orm_adapter', version: '~> 0.1', type: 'development'} 106 | ], 107 | validManifestPaths: ['devise.gemspec', 'foo_meh-bar.gemspec'], 108 | invalidManifestPaths: [] 109 | }, 110 | { 111 | platform: 'podspec', 112 | fixture: 'example.podspec', 113 | expected: [ 114 | { name: 'CocoaLumberjack', version: '>= 0', type: 'runtime' } 115 | ], 116 | validManifestPaths: ['devise.podspec', 'foo_meh-bar.podspec'], 117 | invalidManifestPaths: [] 118 | }, 119 | { 120 | platform: 'podspecJson', 121 | fixture: 'ALOSRPAuth.podspec.json', 122 | expected: [ 123 | { name: 'OpenSSL', version: "~> 1.0", type: 'runtime' } 124 | ], 125 | validManifestPaths: ['ALOSRPAuth.podspec.json', 'foo_meh-bar.podspec.json'], 126 | invalidManifestPaths: [] 127 | }, 128 | { 129 | platform: 'packagist', 130 | fixture: 'composer.json', 131 | expected: [ 132 | {name: "laravel/framework", version: "5.0.*", type: 'runtime'} 133 | ], 134 | validManifestPaths: ['composer.json'], 135 | invalidManifestPaths: [] 136 | }, 137 | { 138 | platform: 'packagist', 139 | fixture: 'composer2.json', 140 | expected: [], 141 | validManifestPaths: [], 142 | invalidManifestPaths: [] 143 | }, 144 | { 145 | platform: 'nuspec', 146 | fixture: 'example.nuspec', 147 | expected: [ 148 | {name: "FubuCore", version: "3.2.0.3001", type: 'runtime'} 149 | ], 150 | validManifestPaths: ['example.nuspec'], 151 | invalidManifestPaths: [] 152 | }, 153 | { 154 | platform: 'meteor', 155 | fixture: 'versions.json', 156 | expected: [ 157 | {name: "accounts-base", version: "1.1.2", type: 'runtime'} 158 | ], 159 | validManifestPaths: ['versions.json'], 160 | invalidManifestPaths: [] 161 | }, 162 | { 163 | platform: 'packagistlockfile', 164 | fixture: 'composer.lock', 165 | expected: [ 166 | { name: 'doctrine/annotations', version: 'v1.2.1', type: 'runtime' }, 167 | { name: 'doctrine/cache', version: 'v1.3.1', type: 'runtime' }, 168 | { name: 'sensio/generator-bundle', version: 'v2.5.0', type: 'development' } 169 | ], 170 | validManifestPaths: ['composer.lock'], 171 | invalidManifestPaths: [] 172 | }, 173 | { 174 | platform: 'cargo', 175 | fixture: 'Cargo.toml', 176 | expected: [ 177 | {name: "rustc-serialize", version: "*", type: 'runtime'}, 178 | {name: "regex", version: "*", type: 'runtime'} 179 | ], 180 | unexpected: [ 181 | "local_crate" 182 | ], 183 | validManifestPaths: ['Cargo.toml'], 184 | invalidManifestPaths: [] 185 | }, 186 | { 187 | platform: 'cargolockfile', 188 | fixture: 'Cargo.lock', 189 | expected: [ 190 | {name: "aaa-local-crate-dependency", version: "0.17.1", type: 'runtime'}, 191 | {name: "advapi32-sys", version: "0.1.2", type: 'runtime'} 192 | ], 193 | unexpected: [ 194 | "aaa-local-crate" 195 | ], 196 | validManifestPaths: ['Cargo.lock'], 197 | invalidManifestPaths: [] 198 | }, 199 | { 200 | platform: 'elm', 201 | fixture: 'elm-package.json', 202 | expected: [ 203 | {name: "evancz/elm-markdown", version: "1.1.0 <= v < 2.0.0", type: 'runtime'} 204 | ], 205 | validManifestPaths: ['elm-package.json'], 206 | invalidManifestPaths: ['node_modules/foo/elm-package.json'] 207 | }, 208 | { 209 | platform: 'elm', 210 | fixture: 'elm_dependencies.json', 211 | expected: [ 212 | {name: "johnpmayer/elm-webgl", version: "0.1.1", type: 'runtime'} 213 | ], 214 | validManifestPaths: ['elm_dependencies.json'], 215 | invalidManifestPaths: ['node_modules/foo/elm_dependencies.json'] 216 | }, 217 | { 218 | platform: 'elmExact', 219 | fixture: 'exact-dependencies.json', 220 | expected: [ 221 | {name: "jvoigtlaender/elm-drag-and-drop", version: "1.0.1", type: 'runtime'}, 222 | {name: "evancz/elm-html", version: "2.0.0", type: "runtime"} 223 | ], 224 | validManifestPaths: ['elm-stuff/exact-dependencies.json'], 225 | invalidManifestPaths: ['node_modules/foo/elm-stuff/exact-dependencies.json'] 226 | }, 227 | { 228 | platform: 'bower', 229 | fixture: 'bower.json', 230 | expected: [ 231 | {name: 'jquery', version: '>= 1.9.1', type: 'runtime'} 232 | ], 233 | validManifestPaths: ['bower.json'], 234 | invalidManifestPaths: ['node_modules/foo/bower.json'] 235 | }, 236 | { 237 | platform: 'dub', 238 | fixture: 'dub.json', 239 | expected: [ 240 | {name: 'vibe-d', version: '~>0.7.22', type: 'runtime'}, 241 | {name: 'libdparse', version: "~>0.2.0", type: 'optional'} 242 | ], 243 | validManifestPaths: ['dub.json'], 244 | invalidManifestPaths: [] 245 | }, 246 | { 247 | platform: 'dubSdl', 248 | fixture: 'dub.sdl', 249 | expected: [ 250 | {name: 'vibe-d', version: '~>0.7.23', type: 'runtime'}, 251 | ], 252 | validManifestPaths: ['dub.sdl'], 253 | invalidManifestPaths: [] 254 | }, 255 | { 256 | platform: 'pub', 257 | fixture: 'pubspec.yaml', 258 | expected: [ 259 | {name: 'analyzer', version: '>=0.22.0 <0.25.0', type: 'runtime'}, 260 | {name: 'args', version: '>=0.12.0 <0.13.0', type: 'runtime'}, 261 | {name: 'benchmark_harness', version: '>=1.0.0 <2.0.0', type: 'development'}, 262 | {name: 'guinness', version: '>=0.1.9 <0.2.0', type: 'development'} 263 | ], 264 | validManifestPaths: ['pubspec.yaml'], 265 | invalidManifestPaths: [] 266 | }, 267 | { 268 | platform: 'publock', 269 | fixture: 'pubspec.lock', 270 | expected: [ 271 | {name: 'analyzer', version: '0.24.6', type: 'runtime'}, 272 | ], 273 | validManifestPaths: ['pubspec.lock'], 274 | invalidManifestPaths: [] 275 | }, 276 | { 277 | platform: 'clojars', 278 | fixture: 'project.clj', 279 | expected: [ 280 | {name: "org.clojure/clojure", version: "1.6.0", type: "runtime"}, 281 | {name: 'cheshire', version: '5.4.0', type: 'runtime'} 282 | ], 283 | validManifestPaths: ['project.clj'], 284 | invalidManifestPaths: [] 285 | }, 286 | { 287 | platform: 'hex', 288 | fixture: 'mix.exs', 289 | expected: [ 290 | {name: 'poison', version: '~> 1.3.1', type: 'runtime'} 291 | ], 292 | validManifestPaths: ['mix.exs'], 293 | invalidManifestPaths: [] 294 | }, 295 | { 296 | platform: 'hexLock', 297 | fixture: 'mix.lock', 298 | expected: [ 299 | { name: 'ranch', version: '1.2.1', type: 'runtime' }, 300 | { name: 'poison', version: '2.1.0', type: 'runtime' }, 301 | { name: 'plug', version: '1.1.6', type: 'runtime' }, 302 | { name: 'cowlib', version: '1.0.2', type: 'runtime' }, 303 | { name: 'cowboy', version: '1.0.4', type: 'runtime' } 304 | ], 305 | validManifestPaths: ['mix.lock'], 306 | invalidManifestPaths: [] 307 | }, 308 | { 309 | platform: 'pypi', 310 | fixture: 'requirements.txt', 311 | expected: [ 312 | {name: 'foo', version: '*', type: 'runtime'}, 313 | {name: 'Flask', version: '==0.8', type: 'runtime'}, 314 | {name: 'django-bootstrap3', version: '>=6.2,<6.3', type: 'runtime'}, 315 | {name: 'zope.component', version: '==4.2.2', type: 'runtime'}, 316 | {name: 'scikit-learn', version: '==0.16.1', type: 'runtime'}, 317 | {name: 'Beaker', version: '>=1.6.5', type: 'runtime'} 318 | ], 319 | validManifestPaths: ['requirements.txt', 'test/simple-requirements/requirements.txt'], 320 | invalidManifestPaths: ['node_modules/require-dir/test/duplicates/b/1.txt'] 321 | }, 322 | { 323 | platform: 'pypiSetup', 324 | fixture: 'setup.py', 325 | expected: [ 326 | {name: 'django-bootstrap3', version: '>=6.2,<6.3', type: 'runtime'}, 327 | {name: 'lesscpy', version: '*', type: 'runtime'}, 328 | ], 329 | validManifestPaths: ['setup.py'], 330 | invalidManifestPaths: [] 331 | }, 332 | { 333 | platform: 'pypiSetup', 334 | fixture: 'setup2.py', 335 | expected: [ 336 | {name: 'setuptools', version: '*', type: 'runtime'}, 337 | {name: 'six', version: '*', type: 'runtime'}, 338 | ], 339 | validManifestPaths: ['setup.py'], 340 | invalidManifestPaths: [] 341 | }, 342 | { 343 | platform: 'cocoapods', 344 | fixture: 'Podfile', 345 | expected: [ 346 | {name: 'Artsy-UIButtons', version: '>= 0', type: 'runtime'} 347 | ], 348 | validManifestPaths: ['Podfile'], 349 | invalidManifestPaths: [] 350 | }, 351 | { 352 | platform: 'cocoapodsLockfile', 353 | fixture: 'Podfile.lock', 354 | expected: [ 355 | {name: 'Alamofire', version: '2.0.1', type: 'runtime'}, 356 | {name: 'ARAnalytics', version: '3.8.0', type: 'runtime'} 357 | ], 358 | validManifestPaths: ['Podfile.lock'], 359 | invalidManifestPaths: [] 360 | }, 361 | { 362 | platform: 'nuget', 363 | fixture: 'Project.json', 364 | expected: [ 365 | {name: "Microsoft.AspNet.Server.Kestrel", version: "1.0.0-beta7", type: 'runtime'} 366 | ], 367 | validManifestPaths: ['Project.json'], 368 | invalidManifestPaths: [] 369 | }, 370 | { 371 | platform: 'nugetLockfile', 372 | fixture: 'Project.lock.json', 373 | expected: [ 374 | {name: "AutoMapper", version: "4.0.0-alpha1", type: 'runtime'} 375 | ], 376 | validManifestPaths: ['Project.lock.json'], 377 | invalidManifestPaths: [] 378 | }, 379 | { 380 | platform: 'nugetPackages', 381 | fixture: 'packages.config', 382 | expected: [ 383 | { name: 'AutoMapper', version: '2.1.267', type: 'runtime' } 384 | ], 385 | validManifestPaths: ['packages.config'], 386 | invalidManifestPaths: [] 387 | }, 388 | { 389 | platform: 'paket', 390 | fixture: 'paket.lock', 391 | expected: [ 392 | { name: 'Argu', version: '2.1', type: 'runtime' }, 393 | { name: 'Mono.Cecil', version: '0.9.6.1', type: 'runtime' } 394 | ], 395 | validManifestPaths: ['paket.lock'], 396 | invalidManifestPaths: [] 397 | }, 398 | { 399 | platform: 'julia', 400 | fixture: 'REQUIRE', 401 | expected: [ 402 | {name: "julia", version: "0.3", type: 'runtime'}, 403 | {name: "Codecs", version: ">= 0", type: 'runtime'} 404 | ], 405 | validManifestPaths: ['REQUIRE'], 406 | invalidManifestPaths: [] 407 | }, 408 | { 409 | platform: 'go', 410 | fixture: 'Godeps.json', 411 | expected: [ 412 | {name: "github.com/BurntSushi/toml", version: "3883ac1ce943878302255f538fce319d23226223", type: 'runtime'} 413 | ], 414 | validManifestPaths: ['Godeps/Godeps.json'], 415 | invalidManifestPaths: [] 416 | }, 417 | { 418 | platform: 'gpm', 419 | fixture: 'Godeps', 420 | expected: [ 421 | {name: "github.com/nu7hatch/gotrail", version: "v0.0.2", type: 'runtime'} 422 | ], 423 | validManifestPaths: ['Godeps'], 424 | invalidManifestPaths: [] 425 | }, 426 | { 427 | platform: 'gb', 428 | fixture: 'manifest', 429 | expected: [ 430 | {name: "github.com/kr/fs", version: "2788f0dbd16903de03cb8186e5c7d97b69ad387b", type: 'runtime'} 431 | ], 432 | validManifestPaths: ['vendor/manifest'], 433 | invalidManifestPaths: [] 434 | }, 435 | { 436 | platform: 'govendor', 437 | fixture: 'vendor.json', 438 | expected: [ 439 | {name: "github.com/Bowery/prompt", version: "d43c2707a6c5a152a344c64bb4fed657e2908a81", type: 'runtime'} 440 | ], 441 | validManifestPaths: ['vendor/vendor.json'], 442 | invalidManifestPaths: [] 443 | }, 444 | { 445 | platform: 'glide', 446 | fixture: 'glide.yaml', 447 | expected: [ 448 | {name: "gopkg.in/yaml.v2", version: ">= 0", type: 'runtime'}, 449 | {name: "github.com/Masterminds/vcs", version: "^1.4.0", type: 'runtime'} 450 | ], 451 | validManifestPaths: ['glide.yaml'], 452 | invalidManifestPaths: [] 453 | }, 454 | { 455 | platform: 'glidelockfile', 456 | fixture: 'glide.lock', 457 | expected: [ 458 | {name: "github.com/codegangsta/cli", version: "c31a7975863e7810c92e2e288a9ab074f9a88f29", type: 'runtime'} 459 | ], 460 | validManifestPaths: ['glide.lock'], 461 | invalidManifestPaths: [] 462 | }, 463 | { 464 | platform: 'cartfile', 465 | fixture: 'Cartfile', 466 | expected: [ 467 | { name: 'ReactiveCocoa/ReactiveCocoa', version: '>= 2.3.1', type: 'runtime' } 468 | ], 469 | validManifestPaths: ['Cartfile'], 470 | invalidManifestPaths: [] 471 | }, 472 | { 473 | platform: 'cartfileprivate', 474 | fixture: 'Cartfile.private', 475 | expected: [ 476 | { name: 'Quick/Quick', version: '~> 0.9', type: 'development' } 477 | ], 478 | validManifestPaths: ['Cartfile.private'], 479 | invalidManifestPaths: [] 480 | }, 481 | { 482 | platform: 'cartfileresolved', 483 | fixture: 'Cartfile.resolved', 484 | expected: [ 485 | {name: 'thoughtbot/Argo', version: 'v2.2.0 ', type: 'runtime'} 486 | ], 487 | validManifestPaths: ['Cartfile.resolved'], 488 | invalidManifestPaths: [] 489 | }, 490 | { 491 | platform: 'maven', 492 | fixture: 'pom.xml', 493 | expected: [ 494 | {name: 'org.glassfish.jersey.core:jersey-server', version: '2.16', type: 'runtime'} 495 | ], 496 | validManifestPaths: ['pom.xml'], 497 | invalidManifestPaths: [] 498 | }, 499 | { 500 | platform: 'ivy', 501 | fixture: 'ivy.xml', 502 | expected: [ 503 | {name: 'org.htmlparser:htmlparser', version: '2.1', type: 'runtime'} 504 | ], 505 | validManifestPaths: ['ivy.xml'], 506 | invalidManifestPaths: [] 507 | }, 508 | { 509 | platform: 'gradle', 510 | fixture: 'build.gradle', 511 | expected: [ 512 | { name: 'com.squareup.dagger:dagger', version: '1.2.2', type: 'runtime' } 513 | ], 514 | validManifestPaths: ['build.gradle', 'kork-jedis-test.gradle'], 515 | invalidManifestPaths: [] 516 | }, 517 | { 518 | platform: 'shard', 519 | fixture: 'shard.yml', 520 | expected: [ 521 | {name: 'frost', version: '*', type: 'runtime'}, 522 | {name: 'shards', version: '*', type: 'runtime'}, 523 | {name: 'common_mark', version: '*', type: 'runtime'}, 524 | {name: 'minitest', version: '>= 0.2.0', type: 'development'} 525 | ], 526 | validManifestPaths: ['shard.yml'], 527 | invalidManifestPaths: [] 528 | }, 529 | { 530 | platform: 'shardLockfile', 531 | fixture: 'shard.lock', 532 | expected: [ 533 | {name: 'common_mark', version: '0.1.0', type: 'runtime'}, 534 | {name: 'frost', version: '4042fc55a0865df8cbcb9a389527e9557aa8f280', type: 'runtime'} 535 | ], 536 | validManifestPaths: ['shard.lock'], 537 | invalidManifestPaths: [] 538 | }, 539 | { 540 | platform: 'swiftpm', 541 | fixture: 'Package.swift', 542 | expected: [ 543 | {name: 'github.com/qutheory/vapor', version: '0.12.0 - 0.12.9223372036854775807', type: 'runtime'}, 544 | {name: 'github.com/czechboy0/Tasks', version: '0.2.0 - 0.2.9223372036854775807', type: 'runtime'} 545 | ], 546 | validManifestPaths: ['Package.swift'], 547 | invalidManifestPaths: [] 548 | }, 549 | { 550 | platform: 'yarn', 551 | fixture: 'yarn.lock', 552 | expected: [ 553 | { name: 'accepts', version: '1.3.3', type: 'runtime' }, 554 | { name: 'ansi-regex', version: '2.0.0', type: 'runtime' }, 555 | { name: 'ansi-styles', version: '2.2.1', type: 'runtime' }, 556 | { name: 'argparse', version: '1.0.9', type: 'runtime' } 557 | ], 558 | validManifestPaths: ['yarn.lock'], 559 | invalidManifestPaths: [] 560 | } 561 | ]; 562 | 563 | describe('Parser', function(){ 564 | this.timeout(30000); 565 | 566 | platformTests.forEach(function(test) { 567 | it('should handle '+ test.platform +' fixtures', function(done) { 568 | var str = fs.readFileSync(__dirname +'/fixtures/'+ test.fixture).toString(); 569 | parsers.parse(test.platform, str) 570 | .then(function(packages) { 571 | test.expected.forEach(function(pkg, i) { 572 | assert.deepEqual(packages[i], pkg); 573 | }); 574 | if ('unexpected' in test) { 575 | test.unexpected.forEach(function(unexpected) { 576 | packages.forEach(function(pkg) { 577 | assert.notEqual(pkg.name, unexpected); 578 | }); 579 | }); 580 | } 581 | }) 582 | .then(done) 583 | .catch(done); 584 | }); 585 | 586 | it('should match valid '+ test.platform +' manifest paths', function() { 587 | test.validManifestPaths.forEach(function(path) { 588 | var platform = parsers.findPlatform(path); 589 | assert(platform); 590 | }); 591 | }); 592 | 593 | it('should ignore invalid '+ test.platform +' manifest paths', function() { 594 | test.invalidManifestPaths.forEach(function(path) { 595 | var platform = parsers.findPlatform(path); 596 | assert.equal(platform, null); 597 | }); 598 | }); 599 | }); 600 | 601 | }); 602 | --------------------------------------------------------------------------------