license_finder 3.0.2 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77916ef7c2face0470fd2f9b4b137e16d4cb43cf
4
- data.tar.gz: 2488fffc58af2331e7e5b9e4befc3f46bfa878fa
3
+ metadata.gz: df518f591c669fe1a648f5513797ba99701be14b
4
+ data.tar.gz: e19c932c315fe285f147adc7c99f5ab982be13f2
5
5
  SHA512:
6
- metadata.gz: 137f091f16a6658bd979491ef9c7eb68faa9cba32f864d648d88bde41f2025e20f15e434d3bdead5d70e1b9bc64c2f2bff5603378feac295c75f83baa25321d8
7
- data.tar.gz: a5a444fe8914c62309d21420af06d72cab5f9aabb5491e9c72e2acdba653a7cb1885ccd4d9ac707b4c664f3f4148af173cd509035d3b2d3a59519e6c36fa3927
6
+ metadata.gz: 4ed3e1a000a8838c366b9773bcf7fffd508e7a61398e72173d2b38e1ea6538c944a13eb1d5bb176c61f994ce2bcf2b46e7a2c8507ee02c383d20d95f2e23040c
7
+ data.tar.gz: 0f575f901938b93b9acde6dd461a7ed57ed99224862ec0fb3e1f68f128ec4a9685836f64b9852522af6d96326a76681549a67cde1f736590edb67e17699513ba
data/CHANGELOG.md CHANGED
@@ -1,22 +1,34 @@
1
- # 3.0.2 / 2017-07-27:
2
-
3
- Features:
1
+ # [3.0.4] / 2017-09-11
4
2
 
3
+ ### Added
4
+ * Added concourse pipeline file for Docker image process (#335, #337)
5
5
  * Add status checks to pull requests
6
+ * Allow Custom Pip Requirements File Path (#328, thanks @sam-10e)
6
7
 
7
- Bugfixes:
8
+ ### Fixed
9
+ * Fixed NPM stack too deep issue (#327, #329)
8
10
 
9
- * Support NPM packages providing a string for the licenses key
10
- * Use different env-var to indicate ruby version for tests
11
- * Resolve NPM circular dependencies
11
+ # [3.0.3] / Skipped because of accidentally yanking gem
12
12
 
13
- # 3.0.1 / 2017-07-12:
13
+ # [3.0.2] / 2017-07-27:
14
14
 
15
- Features:
15
+ ### Added
16
+
17
+ * Add CI status checks to pull requests (#321)
18
+
19
+ ### Fixed
20
+
21
+ * Support NPM packages providing a string for the licenses key (#317)
22
+ * Use different env-var to indicate ruby version for tests (#303)
23
+ * Resolve NPM circular dependencies (#306, #307, #311, #313, #314, #319, #322)
24
+
25
+ # [3.0.1] / 2017-07-12:
26
+
27
+ ### Added
16
28
 
17
29
  * Add --maven-options to allow options for maven scans (#305, thanks @jgielstra!)
18
30
 
19
- Bugfixes:
31
+ ### Fixed:
20
32
 
21
33
  * Restore the original GOPATH after modifying it (#287, thanks @sschuberth!)
22
34
  * LF doesn't recognize .NET projects using 'packages' directory (#290, #292, thanks @bspeck!)
@@ -27,9 +39,9 @@ Bugfixes:
27
39
  * Fix dockerfile by explicitly using rvm stable (#303)
28
40
  * Report multiple versions of the same NPM dependency (#310)
29
41
 
30
- # 3.0.0 / 2016-03-02
42
+ # [3.0.0] / 2016-03-02
31
43
 
32
- Features:
44
+ ### Added
33
45
 
34
46
  * Changed dependencies to be unique based on name _and_ version (#241)
35
47
  * Enable '--columns' option with text reports (#244, thanks @raimon49!)
@@ -41,7 +53,7 @@ Features:
41
53
  * Added a Dockerfile for [licensefinder/license_finder](https://hub.docker.com/r/licensefinder/license_finder/)
42
54
  * Switched from Travis to Concourse
43
55
 
44
- Bugfixes:
56
+ ### Fixed
45
57
 
46
58
  * Gradle works in CI containers where TERM is not set (revert and fix of c15bdb7, which broke older versions of gradle)
47
59
  * Check for the correct Ruby Bundler command: `bundle` (#233. Thanks, @raimon49!)
@@ -447,3 +459,9 @@ Bugfixes:
447
459
  * Bugfixes
448
460
 
449
461
  * Fix blow up if there's not `ignore_groups` setting in the config file.
462
+
463
+
464
+ [Unreleased]: https://github.com/pivotal/LicenseFinder/compare/v3.0.2...HEAD
465
+ [3.0.2]: https://github.com/pivotal/LicenseFinder/compare/v3.0.1...v3.0.2
466
+ [3.0.1]: https://github.com/pivotal/LicenseFinder/compare/v3.0.0...v3.0.1
467
+ [3.0.0]: https://github.com/pivotal/LicenseFinder/compare/v2.1.2...v3.0.0
data/Dockerfile CHANGED
@@ -34,22 +34,22 @@ RUN apt-get install -y python-pip && \
34
34
  pip install --upgrade pip
35
35
 
36
36
  # install maven
37
- RUN curl -O http://www-us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz && \
38
- tar -xf apache-maven-3.3.9-bin.tar.gz; rm -rf apache-maven-3.3.9-bin.tar.gz && \
39
- mv apache-maven-3.3.9 /usr/local/lib/maven && \
37
+ RUN curl -O http://www-us.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz && \
38
+ tar -xf apache-maven-3.5.0-bin.tar.gz; rm -rf apache-maven-3.5.0-bin.tar.gz && \
39
+ mv apache-maven-3.5.0 /usr/local/lib/maven && \
40
40
  ln -s /usr/local/lib/maven/bin/mvn /usr/local/bin/mvn
41
41
 
42
42
  # install gradle
43
43
  WORKDIR /tmp
44
- RUN curl -L -o gradle.zip http://services.gradle.org/distributions/gradle-2.4-bin.zip && \
44
+ RUN curl -L -o gradle.zip http://services.gradle.org/distributions/gradle-2.9-bin.zip && \
45
45
  unzip -q gradle.zip && \
46
46
  rm gradle.zip && \
47
- mv gradle-2.4 /root/gradle
47
+ mv gradle-2.9 /root/gradle
48
48
  ENV PATH=/root/gradle/bin:$PATH
49
49
 
50
50
  #install go
51
51
  WORKDIR /go
52
- RUN wget https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz -O go.tar.gz && tar --strip-components=1 -xf go.tar.gz
52
+ RUN wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz -O go.tar.gz && tar --strip-components=1 -xf go.tar.gz
53
53
  ENV GOROOT /go
54
54
  ENV PATH=$PATH:/go/bin
55
55
 
@@ -76,4 +76,4 @@ RUN bash -lc "rvm install 2.4.1 --default && gem install bundler"
76
76
  # install license_finder
77
77
  RUN bash -lc "git clone https://github.com/pivotal/LicenseFinder /LicenseFinder && cd /LicenseFinder && bundle install -j4 && rake install"
78
78
 
79
- WORKDIR /
79
+ WORKDIR /
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2012 Pivotal Labs
3
+ Copyright (c) 2012-2017 Pivotal Software, Inc. All Rights Reserved.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -22,20 +22,22 @@ report.
22
22
  * support:
23
23
  * license-finder@googlegroups.com
24
24
  * https://groups.google.com/forum/#!forum/license-finder
25
- * backlog: https://www.pivotaltracker.com/s/projects/234851
25
+ * backlog: https://www.pivotaltracker.com/n/projects/234851
26
26
 
27
27
  ### Supported project types
28
28
 
29
- * Ruby Gems (via `bundler`)
30
- * Python Eggs (via `pip`)
31
- * Node.js (via `npm`)
32
- * Bower
33
- * Nuget (without license discovery)
34
- * Godep
35
- * Go workspace (via a `.envrc` file)
36
- * Go submodules
37
- * Java (via `maven`)
38
- * Java (via `gradle`)
29
+ | Project Type | Package Manager | Tested on Version |
30
+ | ------------ | --------------- | -------:|
31
+ | Ruby Gems | bundler | 1.15.4 |
32
+ | Python Eggs | pip | 9.0.1 |
33
+ | Node.js | npm | 5.3.0 |
34
+ | Bower | bower | 1.8.0 |
35
+ | Nuget (without license discovery) | nuget | N/A |
36
+ | Godep | Godep | 79 |
37
+ | Go workspace (via a `.envrc` file) | Go lang | 1.8.3 |
38
+ | Go submodules | Go lang | 1.8.3 |
39
+ | Java | maven | 3.5.0 |
40
+ | Java | gradle | 2.9 |
39
41
 
40
42
  ### Experimental project types
41
43
 
@@ -111,6 +113,30 @@ Run `license_finder help` to see other available commands, and
111
113
  `license_finder help [COMMAND]` for detailed help on a specific
112
114
  command.
113
115
 
116
+ ### Docker
117
+
118
+ If you have docker installed, try using the included `dlf` script (potentially
119
+ symlinked to be in your path via `ln -s LicenseFinder/dlf /usr/local/bin` or
120
+ whatever method you prefer). This will run any commmands passed to it inside a
121
+ pre-provisioned Docker container to maintain consistent versions of all the
122
+ package managers. For example,
123
+
124
+ ```
125
+ $ dlf npm --version
126
+ 5.3.0
127
+
128
+ $ dlf license_finder --help
129
+
130
+ Dependencies that need approval:
131
+ ...
132
+ license_finder, 3.0.3, MIT
133
+
134
+ $ dlf "bundle install && license_finder"
135
+ ```
136
+
137
+ You can better understand the way this script works by looking at its source, but for
138
+ reference it will mount your current directory at the path `/scan` and run any commands
139
+ passed to it from that directory.
114
140
 
115
141
  ### Activation
116
142
 
@@ -343,7 +369,7 @@ Android projects will sometimes specify their meaningful dependencies in the
343
369
  "compile" group), you can specify it in your project's `build.gradle`:
344
370
 
345
371
  ```
346
- // Must come *after* the 'apply plugin: license' line
372
+ // Must come *after* applying the appropriate plugin from [https://github.com/hierynomus/license-gradle-plugin](https://github.com/hierynomus/license-gradle-plugin)
347
373
 
348
374
  downloadLicenses {
349
375
  dependencyConfiguration "compile"
@@ -390,7 +416,7 @@ And save a `LICENSE` file which contains your license text in your repo.
390
416
  ## Support
391
417
 
392
418
  * Send an email to the list: [license-finder@googlegroups.com](license-finder@googlegroups.com)
393
- * View the project backlog at Pivotal Tracker: [https://www.pivotaltracker.com/s/projects/234851](https://www.pivotaltracker.com/s/projects/234851)
419
+ * View the project backlog at Pivotal Tracker: [https://www.pivotaltracker.com/n/projects/234851](https://www.pivotaltracker.com/n/projects/234851)
394
420
 
395
421
 
396
422
  ## Contributing
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env python
2
2
 
3
3
  import json
4
+ import sys
4
5
  from pip.req import parse_requirements
5
6
  from pip.download import PipSession
6
7
  from pip._vendor import pkg_resources
7
8
  from pip._vendor.six import print_
8
9
 
9
10
  requirements = [pkg_resources.Requirement.parse(str(req.req)) for req
10
- in parse_requirements('requirements.txt', session=PipSession())]
11
+ in parse_requirements(sys.argv[1], session=PipSession()) if req.req != None]
11
12
 
12
13
  transform = lambda dist: {
13
14
  'name': dist.project_name,
@@ -35,7 +35,7 @@ resources:
35
35
  <% end %>
36
36
 
37
37
  jobs:
38
- <% ['2.4.1', '2.3.0', '2.2.0', '2.1.5', 'jruby-9.0.4.0'].each do |ruby_version| %>
38
+ <% %w(2.4.1 2.3.0 2.2.0 2.1.5 jruby-9.0.4.0).each do |ruby_version| %>
39
39
  - name: ruby-<%= ruby_version %>
40
40
  public: true
41
41
  plan:
@@ -55,7 +55,7 @@ jobs:
55
55
  <% end %>
56
56
  <% end %>
57
57
 
58
- <% ['2.4.1', '2.3.0', '2.2.0', '2.1.5', 'jruby-9.0.4.0'].each do |ruby_version| %>
58
+ <% %w(2.4.1 2.3.0 2.2.0 2.1.5 jruby-9.0.4.0).each do |ruby_version| %>
59
59
  - name: PR-ruby-<%= ruby_version %>
60
60
  public: true
61
61
  plan:
@@ -67,6 +67,18 @@ jobs:
67
67
  params:
68
68
  RUBY_VERSION_UNDER_TEST: <%= ruby_version %>
69
69
  input_mapping: { LicenseFinder: pull-request }
70
+ on_success:
71
+ put: pull-request
72
+ params:
73
+ path: pull-request
74
+ status: success
75
+ context: ruby-<%= ruby_version %>
76
+ on_failure:
77
+ put: pull-request
78
+ params:
79
+ path: pull-request
80
+ status: failure
81
+ context: ruby-<%= ruby_version %>
70
82
  <% if setup_slack %>
71
83
  on_failure:
72
84
  put: slack-alert
@@ -0,0 +1,60 @@
1
+ resources:
2
+ - name: lf-git
3
+ type: git
4
+ source:
5
+ uri: git@github.com:pivotal/LicenseFinder.git
6
+ private_key: ((CfOslBotPrivateKey))
7
+ branch: master
8
+
9
+ - name: lf-image
10
+ type: docker-image
11
+ source:
12
+ repository: licensefinder/license_finder
13
+ email: ((LicenseFinderDockerEmail))
14
+ username: ((LicenseFinderDockerUserName))
15
+ password: ((LicenseFinderDockerPassword))
16
+
17
+ - name: lf-release
18
+ type: github-release
19
+ source:
20
+ owner: pivotal
21
+ repository: LicenseFinder
22
+ access_token: ((GithubApiTokenProduction))
23
+
24
+ jobs:
25
+ - name: docker
26
+ plan:
27
+ - get: lf-git
28
+ - put: lf-image
29
+ params:
30
+ build: lf-git
31
+
32
+ - name: release
33
+ plan:
34
+ - get: lf-git
35
+ - get: lf-image
36
+ params:
37
+ save: true
38
+ - task: get-version-and-tag
39
+ image: lf-image
40
+ file: lf-git/ci/tasks/get-version-and-tag.yml
41
+ - task: build-and-push-gem
42
+ image: lf-image
43
+ params:
44
+ GEM_API_KEY: ((LicenseFinderGemApiKey))
45
+ file: lf-git/ci/tasks/build-and-push-gem.yml
46
+ - task: create-source-archives
47
+ file: lf-git/ci/tasks/create-source-archives.yml
48
+ - put: lf-git
49
+ params:
50
+ repository: lf-git
51
+ tag: version/tag.txt
52
+ - put: lf-image
53
+ params:
54
+ load: lf-image
55
+ tag: version/version.txt
56
+ - put: lf-release
57
+ params:
58
+ name: version/tag.txt
59
+ tag: version/tag.txt
60
+ globs: ["archives/*.zip", "archives/*.tar.gz"]
@@ -0,0 +1,15 @@
1
+ #!/bin/bash
2
+
3
+ echo -e "---\n:rubygems_api_key: $GEM_API_KEY" > ~/.gem/credentials
4
+ chmod 0600 ~/.gem/credentials
5
+
6
+ cd lf-git
7
+ build_version=$(ruby -r ./lib/license_finder/version.rb -e "puts LicenseFinder::VERSION")
8
+ built_gem="pkg/license_finder-$build_version.gem"
9
+
10
+ if [ -z "$(gem fetch license_finder -v $build_version 2>&1 | grep ERROR)" ]; then
11
+ exit 0
12
+ fi
13
+
14
+ rake build
15
+ gem push ${built_gem}
@@ -0,0 +1,9 @@
1
+ ---
2
+ platform: linux
3
+ inputs:
4
+ - name: lf-git
5
+ run:
6
+ path: bash
7
+ args:
8
+ - "-lc"
9
+ - lf-git/ci/scripts/pushscript.sh
@@ -0,0 +1,23 @@
1
+ ---
2
+ image_resource:
3
+ type: docker-image
4
+ source:
5
+ repository: kramos/alpine-zip
6
+ tag: latest
7
+ platform: linux
8
+ inputs:
9
+ - name: lf-git
10
+ - name: version
11
+ outputs:
12
+ - name: archives
13
+ run:
14
+ path: sh
15
+ args:
16
+ - -ec
17
+ - |
18
+ version=`cat version/version.txt`
19
+ tmp_dir_name=tmp/LicenseFinder-$version
20
+ mkdir -p $tmp_dir_name
21
+ cp -r lf-git $tmp_dir_name
22
+ zip -r archives/LicenseFinder-$version.zip tmp
23
+ tar -cz $tmp_dir_name > archives/LicenseFinder-$version.tar.gz
@@ -0,0 +1,20 @@
1
+ ---
2
+ image_resource:
3
+ type: docker-image
4
+ source:
5
+ repository: licensefinder/license_finder
6
+ tag: latest
7
+ platform: linux
8
+ inputs:
9
+ - name: lf-git
10
+ outputs:
11
+ - name: version
12
+ run:
13
+ path: bash
14
+ args:
15
+ - -elc
16
+ - |
17
+ version=$(ruby -r ./lf-git/lib/license_finder/version.rb -e "puts LicenseFinder::VERSION")
18
+ echo "v$version" > version/tag.txt
19
+ echo "$version" > version/version.txt
20
+
data/dlf ADDED
@@ -0,0 +1,8 @@
1
+ #!/bin/bash
2
+ if `which docker > /dev/null`; then
3
+ docker run -v $PWD:/scan -it licensefinder/license_finder /bin/bash -lc "cd /scan && `echo $@`"
4
+ else
5
+ echo "You do not have docker installed. Please install it:"
6
+ echo " https://docs.docker.com/engine/installation/"
7
+ exit 1
8
+ fi
@@ -33,6 +33,7 @@ module LicenseFinder
33
33
  :gradle_include_groups,
34
34
  :maven_include_groups,
35
35
  :maven_options,
36
+ :pip_requirements_path,
36
37
  :rebar_command,
37
38
  :rebar_deps_dir,
38
39
  :save
@@ -25,6 +25,7 @@ module LicenseFinder
25
25
  class_option :gradle_command, desc: "Command to use when fetching gradle packages. Only meaningful if used with a Java/gradle project. Defaults to 'gradlew' / 'gradlew.bat' if the wrapper is present, otherwise to 'gradle'."
26
26
  class_option :maven_include_groups, desc: "Whether dependency name should include group id. Only meaningful if used with a Java/maven project. Defaults to false."
27
27
  class_option :maven_options, desc: "Maven options to append to command. Defaults to empty."
28
+ class_option :pip_requirements_path, desc: "Path to python requirements file. Defaults to requirements.txt."
28
29
  class_option :rebar_command, desc: "Command to use when fetching rebar packages. Only meaningful if used with a Erlang/rebar project. Defaults to 'rebar'."
29
30
  class_option :rebar_deps_dir, desc: "Path to rebar dependencies directory. Only meaningful if used with a Erlang/rebar project. Defaults to 'deps'."
30
31
  class_option :subprojects, type: :array, desc: "Generate a single report for multiple sub-projects. Ex: --subprojects='path/to/project1', 'path/to/project2'"
@@ -41,6 +41,10 @@ module LicenseFinder
41
41
  get(:maven_options)
42
42
  end
43
43
 
44
+ def pip_requirements_path
45
+ get(:pip_requirements_path)
46
+ end
47
+
44
48
  def rebar_command
45
49
  get(:rebar_command)
46
50
  end
@@ -69,6 +69,7 @@ module LicenseFinder
69
69
  gradle_include_groups: config.gradle_include_groups,
70
70
  maven_include_groups: config.maven_include_groups,
71
71
  maven_options: config.maven_options,
72
+ pip_requirements_path: config.pip_requirements_path,
72
73
  rebar_command: config.rebar_command,
73
74
  rebar_deps_dir: config.rebar_deps_dir,
74
75
  )