license_finder 5.6.2 → 5.7.0

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
  SHA256:
3
- metadata.gz: 207c10de05ccd3be7e79a413b670029c2d2ee07f8e15bb8f86a51de1fe057bde
4
- data.tar.gz: a465c01f2cd694a43179285ffbcbf9f5e61fea86e955775f8af1dd9808517bd9
3
+ metadata.gz: e496efa9426b10270897d6a7b1748f35eb93368c39834b25e1453e3cf5215c97
4
+ data.tar.gz: 51cae7c9a62e9d8ff00ab31180b6ead86fedd0b5429517a578271159ea0d99fd
5
5
  SHA512:
6
- metadata.gz: 35ba648956584307bae58fb6d068935011d5e69de3b684d7665248b70687da9012a7b556659356f3e2fb24470a24e69d835a7dc93a68a679edbe48fcf10065fc
7
- data.tar.gz: 28af64e2785ea33efc10f8b90df2f2c72087d6a70d737979ac0c6077dff981b17e7a648e81bf5ed7e4bfa2121b0af02c7444c763d588e86fc255ab71fa90ac0a
6
+ metadata.gz: e3267cde35f16a8ebd7fd9bdad404b47d447850fc0a9171c9153f9532b4c6425b0725890ce8dc506c3d35449a4550f64da4e21152df570a26a67e26427d90844
7
+ data.tar.gz: 38dfb72920070d6fd39a215447b33d7e2773de92b99c116dee3428195b5fb6b91a8f8aef2263f9d9b470c6c8224539af7692bd934394a3dc79230ce409178845
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # [5.7.0] / 2019-03-01
2
+
3
+ ### Added
4
+ * Ruby 2.6.1 support - [8d60ed1](https://github.com/pivotal-legacy/LicenseFinder/commit/8d60ed13f99b830cc1352900f90e2b298105f518)
5
+
6
+ ### Changed
7
+ * Conan version is locked to 1.11.2 to avoid breaking changes - [72b766a](https://github.com/pivotal-legacy/LicenseFinder/commit/72b766a948be5b0f8eade75e716796f50ea9ebf3)
8
+
1
9
  # [5.6.2] / 2019-01-28
2
10
 
3
11
  # [5.6.1] / 2019-01-25
@@ -688,3 +696,4 @@ Bugfixes:
688
696
  [5.6.0]: https://github.com/pivotal-legacy/LicenseFinder/compare/v5.5.2...v5.6.0
689
697
  [5.6.1]: https://github.com/pivotal-legacy/LicenseFinder/compare/v5.6.0...v5.6.1
690
698
  [5.6.2]: https://github.com/pivotal-legacy/LicenseFinder/compare/v5.6.1...v5.6.2
699
+ [5.7.0]: https://github.com/pivotal-legacy/LicenseFinder/compare/v5.6.2...v5.7.0
data/CONTRIBUTING.md CHANGED
@@ -118,19 +118,3 @@ JAVA_OPTS='-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1' JRUBY_OPTS='-
118
118
  ### Gradle
119
119
 
120
120
  You'll need a gradle version >= 1.8.
121
-
122
- ### CocoaPods
123
- LicenseFinder supports CocoaPods 0.39 and below. If you are using a later version of CocoaPods, you will need to downgrade CocoaPods/Specs repository in order to use LicenseFinder. [This article](http://blog.cocoapods.org/Sharding/) describes the breaking change between CocoaPods 0.39 and 1.0. You will need to use an older, archived CocoaPods/Specs repo.
124
-
125
- If you see the following error, try switching to the archived repo.
126
-
127
- ```bash
128
- [!] The `master` repo requires CocoaPods 1.0.0 - (currently using 0.34.0)
129
- ```
130
-
131
- Example of how to switch to the archived repo:
132
-
133
- ```bash
134
- mv ~/.cocoapods/repos/master ~/.cocoapods/repos/master.bak
135
- git clone https://github.com/CocoaPods/Old-Specs.git ~/.cocoapods/repos/master
136
- ```
data/Dockerfile CHANGED
@@ -1,12 +1,12 @@
1
1
  FROM ubuntu:xenial
2
2
 
3
3
  # Versioning
4
- ENV PIP_INSTALL_VERSION 10.0.1
5
- ENV GO_LANG_VERSION 1.11.4
6
- ENV MAVEN_VERSION 3.5.3
4
+ ENV PIP_INSTALL_VERSION 19.0.2
5
+ ENV GO_LANG_VERSION 1.11.5
6
+ ENV MAVEN_VERSION 3.6.0
7
7
  ENV SBT_VERSION 1.1.1
8
- ENV GRADLE_VERSION 4.10
9
- ENV RUBY_VERSION 2.5.1
8
+ ENV GRADLE_VERSION 4.10.3
9
+ ENV RUBY_VERSION 2.6.1
10
10
  ENV MIX_VERSION 1.0
11
11
 
12
12
  # programs needed for building
@@ -125,7 +125,7 @@ RUN bash -lc "gem update --system && gem install bundler"
125
125
  # install conan
126
126
  RUN apt-get install -y python-dev && \
127
127
  pip install --ignore-installed six --ignore-installed colorama --ignore-installed requests --ignore-installed chardet --ignore-installed urllib3 --upgrade setuptools && \
128
- pip install conan
128
+ pip install -Iv conan==1.11.2
129
129
 
130
130
  # install Cargo
131
131
  RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
data/README.md CHANGED
@@ -3,11 +3,12 @@
3
3
  [![Code Climate](https://codeclimate.com/github/pivotal-legacy/LicenseFinder.png)](https://codeclimate.com/github/pivotal-legacy/LicenseFinder)
4
4
 
5
5
  Build status
6
- * Ruby 2.3.3 [![Ruby 2.3.3 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.3.3/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
7
- * Ruby 2.4.4 [![Ruby 2.4.4 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.4.4/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
8
- * Ruby 2.5.1 [![Ruby 2.5.1 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.5.1/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
6
+ * Ruby 2.3.8 [![Ruby 2.3.8 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.3.8/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
7
+ * Ruby 2.4.5 [![Ruby 2.4.5 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.4.5/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
8
+ * Ruby 2.5.3 [![Ruby 2.5.3 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.5.3/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
9
+ * Ruby 2.6.1 [![Ruby 2.6.1 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-2.6.1/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
9
10
  * JRuby 9.1.17.0 [![JRuby 9.1.17.0 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-jruby-9.1.17.0/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
10
- * JRuby 9.2.0.0 [![JRuby 9.2.0.0 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-jruby-9.2.0.0/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
11
+ * JRuby 9.2.6.0 [![JRuby 9.2.6.0 build status](https://norsk.cf-app.com/api/v1/teams/main/pipelines/LicenseFinder/jobs/ruby-jruby-9.2.6.0/badge)](https://norsk.cf-app.com/teams/main/pipelines/LicenseFinder)
11
12
 
12
13
 
13
14
  LicenseFinder works with your package managers to find dependencies,
@@ -29,15 +30,15 @@ report.
29
30
  | Project Type | Package Manager | Tested on Version |
30
31
  | ------------ | --------------- | -------:|
31
32
  | Ruby Gems | bundler | 1.16.6 |
32
- | Python Eggs | pip | 10.0.1 |
33
+ | Python Eggs | pip | 19.0.2 |
33
34
  | Node.js | npm | 6.4.1 |
34
35
  | Bower | bower | 1.8.4 |
35
36
  | Nuget (without license discovery) | nuget | 4.7.1.5393 |
36
37
  | Godep | Godep | 80 |
37
- | Go workspace (via a `.envrc` file) | Go lang | 1.11 |
38
- | Go submodules | Go lang | 1.11 |
39
- | Java | maven | 3.5.3 |
40
- | Java | gradle | 4.2 |
38
+ | Go workspace (via a `.envrc` file) | Go lang | 1.11.5 |
39
+ | Go submodules | Go lang | 1.11.5 |
40
+ | Java | maven | 3.6.0 |
41
+ | Java | gradle | 4.10.3 |
41
42
 
42
43
  ### Experimental project types
43
44
 
data/Rakefile CHANGED
@@ -63,7 +63,7 @@ task :update_pipeline, [:slack_url, :slack_channel] do |_, args|
63
63
  puts 'Warning: You should provide slack channel and url to receive slack notifications on build failures'
64
64
  end
65
65
 
66
- ruby_versions = %w[2.5.1 2.4.4 2.3.3 jruby-9.1.17.0 jruby-9.2.0.0]
66
+ ruby_versions = %w[2.6.1 2.5.3 2.4.5 2.3.8 jruby-9.1.17.0 jruby-9.2.6.0]
67
67
 
68
68
  params = []
69
69
  params << "ruby_versions=#{ruby_versions.join(',')}"
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 5.7.0
@@ -5,7 +5,7 @@ resource_types:
5
5
  - name: pull-request
6
6
  type: docker-image
7
7
  source:
8
- repository: jtarchie/pr
8
+ repository: teliaoss/github-pr-resource
9
9
 
10
10
  <% if setup_slack %>
11
11
  - name: slack-notification
@@ -16,11 +16,12 @@ resource_types:
16
16
  <% end %>
17
17
 
18
18
  resources:
19
- - name: pull-request
19
+ - name: github-pull-request
20
20
  type: pull-request
21
+ check_every: 24h
22
+ webhook_token: ((GithubPullRequestWebhookToken))
21
23
  source:
22
- repo: pivotal-legacy/LicenseFinder
23
- base: master
24
+ repository: pivotal-legacy/LicenseFinder
24
25
  access_token: ((GithubApiPullRequestToken))
25
26
 
26
27
  - name: dockerhub-pr
@@ -43,17 +44,29 @@ jobs:
43
44
  - name: build-docker-image
44
45
  public: true
45
46
  plan:
46
- - get: pull-request
47
+ - get: github-pull-request
47
48
  version: every
48
49
  trigger: true
49
50
  - put: dockerhub-pr
50
51
  params:
51
- build: pull-request
52
+ build: github-pull-request
53
+ on_success:
54
+ put: github-pull-request
55
+ params:
56
+ path: github-pull-request
57
+ status: success
58
+ context: build-docker-image
59
+ on_failure:
60
+ put: github-pull-request
61
+ params:
62
+ path: github-pull-request
63
+ status: failure
64
+ context: build-docker-image
52
65
  <% ruby_versions.each do |ruby_version| %>
53
66
  - name: PR-ruby-<%= ruby_version %>-linux
54
67
  public: true
55
68
  plan:
56
- - get: pull-request
69
+ - get: github-pull-request
57
70
  passed: [build-docker-image]
58
71
  version: every
59
72
  - get: dockerhub-pr
@@ -62,20 +75,20 @@ jobs:
62
75
  - task: ruby-<%= ruby_version %>
63
76
  privileged: true
64
77
  image: dockerhub-pr
65
- file: pull-request/ci/tasks/run-tests.yml
78
+ file: github-pull-request/ci/tasks/run-tests.yml
66
79
  params:
67
80
  RUBY_VERSION_UNDER_TEST: <%= ruby_version %>
68
- input_mapping: { LicenseFinder: pull-request }
81
+ input_mapping: { LicenseFinder: github-pull-request }
69
82
  on_success:
70
- put: pull-request
83
+ put: github-pull-request
71
84
  params:
72
- path: pull-request
85
+ path: github-pull-request
73
86
  status: success
74
87
  context: ruby-<%= ruby_version %>
75
88
  on_failure:
76
- put: pull-request
89
+ put: github-pull-request
77
90
  params:
78
- path: pull-request
91
+ path: github-pull-request
79
92
  status: failure
80
93
  context: ruby-<%= ruby_version %>
81
94
  <% if setup_slack %>
@@ -91,22 +104,22 @@ jobs:
91
104
  - name: PR-rubocop
92
105
  public: true
93
106
  plan:
94
- - get: pull-request
107
+ - get: github-pull-request
95
108
  trigger: true
96
109
  version: every
97
110
  - task: run-rubocop
98
111
  privileged: true
99
- file: pull-request/ci/tasks/rubocop.yml
100
- input_mapping: { LicenseFinder: pull-request }
112
+ file: github-pull-request/ci/tasks/rubocop.yml
113
+ input_mapping: { LicenseFinder: github-pull-request }
101
114
  on_success:
102
- put: pull-request
115
+ put: github-pull-request
103
116
  params:
104
- path: pull-request
117
+ path: github-pull-request
105
118
  status: success
106
119
  context: run-rubocop
107
120
  on_failure:
108
- put: pull-request
121
+ put: github-pull-request
109
122
  params:
110
- path: pull-request
123
+ path: github-pull-request
111
124
  status: failure
112
125
  context: run-rubocop
@@ -17,6 +17,7 @@ resources:
17
17
  uri: git@github.com:pivotal-legacy/LicenseFinder.git
18
18
  private_key: ((CfOslBot.private_key))
19
19
  branch: master
20
+ ignore_paths: [VERSION]
20
21
 
21
22
  - name: git-master-dockerfile
22
23
  type: git
@@ -26,6 +27,16 @@ resources:
26
27
  branch: master
27
28
  paths: [Dockerfile]
28
29
 
30
+ - name: semver-version
31
+ type: semver
32
+ source:
33
+ driver: git
34
+ uri: git@github.com:pivotal-legacy/LicenseFinder.git
35
+ branch: master
36
+ file: VERSION
37
+ private_key: ((CfOslBot.private_key))
38
+ commit_message: "Updates version to: %version%"
39
+
29
40
  - name: dockerhub-edge
30
41
  type: docker-image
31
42
  source:
@@ -58,96 +69,6 @@ resources:
58
69
  <% end %>
59
70
 
60
71
  jobs:
61
-
62
- - name: patch-version
63
- plan:
64
- - get: lf-git
65
- passed: [<%= ruby_versions.map{ |version| "ruby-#{version}"}.join(', ') %>]
66
- - get: dockerhub
67
- params:
68
- save: true
69
- - task: bump-version
70
- image: dockerhub
71
- params:
72
- GIT_USERNAME: ((GithubApiUser))
73
- GIT_EMAIL: ((GithubApiEmail))
74
- file: lf-git/ci/tasks/bump-patch-version.yml
75
- - put: lf-git
76
- params:
77
- repository: lf-git-changed
78
-
79
- - name: release
80
- plan:
81
- - get: lf-git
82
- trigger: true
83
- passed: [ patch-version ]
84
- - get: dockerhub
85
- params:
86
- save: true
87
- - get: lf-release
88
- - task: update-changelog
89
- image: dockerhub
90
- params:
91
- GIT_USERNAME: ((GithubApiUser))
92
- GIT_EMAIL: ((GithubApiEmail))
93
- file: lf-git/ci/tasks/update-changelog.yml
94
- - put: dockerhub
95
- params:
96
- build: lf-git
97
- tag: version/version.txt
98
- tag_as_latest: true
99
- - put: lf-git
100
- params:
101
- repository: lf-git-changed
102
- - task: build-and-push-gem
103
- image: dockerhub
104
- params:
105
- GIT_USERNAME: ((GithubApiUser))
106
- GIT_EMAIL: ((GithubApiEmail))
107
- GIT_PRIVATE_KEY: ((CfOslBot.private_key))
108
- GEM_API_KEY: ((LicenseFinderGemApiKey))
109
- file: lf-git/ci/tasks/build-and-push-gem.yml
110
- - put: lf-release
111
- params:
112
- name: version/tag.txt
113
- tag: version/tag.txt
114
- body: version/changelog.txt
115
-
116
- - name: manual-release
117
- plan:
118
- - get: lf-git
119
- passed: [<%= ruby_versions.map{ |version| "ruby-#{version}"}.join(', ') %>]
120
- - get: dockerhub
121
- params:
122
- save: true
123
- - get: lf-release
124
- - task: update-changelog
125
- image: dockerhub
126
- params:
127
- GIT_USERNAME: ((GithubApiUser))
128
- GIT_EMAIL: ((GithubApiEmail))
129
- file: lf-git/ci/tasks/update-changelog.yml
130
- - put: dockerhub
131
- params:
132
- build: lf-git
133
- tag_file: version/version.txt
134
- tag_as_latest: true
135
- - task: build-and-push-gem
136
- image: dockerhub
137
- params:
138
- GIT_USERNAME: ((GithubApiUser))
139
- GIT_EMAIL: ((GithubApiEmail))
140
- GIT_PRIVATE_KEY: ((CfOslBot.private_key))
141
- GEM_API_KEY: ((LicenseFinderGemApiKey))
142
- file: lf-git/ci/tasks/build-and-push-gem.yml
143
- - put: lf-git
144
- params:
145
- repository: lf-git-changed
146
- - put: lf-release
147
- params:
148
- name: version/tag.txt
149
- tag: version/tag.txt
150
- body: version/changelog.txt
151
72
  - name: build-docker-image
152
73
  public: true
153
74
  plan:
@@ -156,6 +77,7 @@ jobs:
156
77
  - put: dockerhub-edge
157
78
  params:
158
79
  build: git-master-dockerfile
80
+
159
81
  <% ruby_versions.each do |ruby_version| %>
160
82
  - name: ruby-<%= ruby_version %>
161
83
  public: true
@@ -197,3 +119,62 @@ jobs:
197
119
  privileged: true
198
120
  file: LicenseFinder/ci/tasks/rubocop.yml
199
121
  input_mapping: { LicenseFinder: LicenseFinder }
122
+
123
+ - name: bump-major
124
+ plan:
125
+ - get: lf-git
126
+ passed: [<%= ruby_versions.map{ |version| "ruby-#{version}"}.join(', ') %>]
127
+ - put: semver-version
128
+ params: {bump: major}
129
+
130
+ - name: bump-minor
131
+ plan:
132
+ - get: lf-git
133
+ passed: [<%= ruby_versions.map{ |version| "ruby-#{version}"}.join(', ') %>]
134
+ - put: semver-version
135
+ params: {bump: minor}
136
+
137
+ - name: bump-patch
138
+ plan:
139
+ - get: lf-git
140
+ passed: [<%= ruby_versions.map{ |version| "ruby-#{version}"}.join(', ') %>]
141
+ - put: semver-version
142
+ params: {bump: patch}
143
+
144
+ - name: release
145
+ plan:
146
+ - get: lf-git
147
+ - get: semver-version
148
+ trigger: true
149
+ passed: [bump-major, bump-minor, bump-patch]
150
+ - get: dockerhub
151
+ params:
152
+ save: true
153
+ - get: lf-release
154
+ - task: update-changelog
155
+ image: dockerhub
156
+ params:
157
+ GIT_USERNAME: ((GithubApiUser))
158
+ GIT_EMAIL: ((GithubApiEmail))
159
+ file: lf-git/ci/tasks/update-changelog.yml
160
+ - put: dockerhub
161
+ params:
162
+ build: lf-git
163
+ tag: version/version.txt
164
+ tag_as_latest: true
165
+ - put: lf-git
166
+ params:
167
+ repository: lf-git-changed
168
+ - task: build-and-push-gem
169
+ image: dockerhub
170
+ params:
171
+ GIT_USERNAME: ((GithubApiUser))
172
+ GIT_EMAIL: ((GithubApiEmail))
173
+ GIT_PRIVATE_KEY: ((CfOslBot.private_key))
174
+ GEM_API_KEY: ((LicenseFinderGemApiKey))
175
+ file: lf-git/ci/tasks/build-and-push-gem.yml
176
+ - put: lf-release
177
+ params:
178
+ name: version/tag.txt
179
+ tag: version/tag.txt
180
+ body: version/changelog.txt
@@ -4,7 +4,7 @@ echo -e "---\n:rubygems_api_key: $GEM_API_KEY" > ~/.gem/credentials
4
4
  chmod 0600 ~/.gem/credentials
5
5
 
6
6
  cd lf-git
7
- build_version=$(ruby -r ./lib/license_finder/version.rb -e "puts LicenseFinder::VERSION")
7
+ build_version="$(cat semver-version/version)"
8
8
  built_gem="pkg/license_finder-$build_version.gem"
9
9
 
10
10
  git config --global user.email $GIT_EMAIL
@@ -1,8 +1,11 @@
1
1
  #!/bin/bash -e
2
2
 
3
3
  cd LicenseFinder
4
- gem install rubocop --version 0.59.2
5
4
 
5
+ bundle install --without runtime default
6
+
7
+ version=`cat Gemfile.lock | grep ' rubocop' | awk -F'[\(*\)]' '{print $2}'`
8
+ gem install rubocop --version $version
6
9
 
7
10
  echo "Running Rubocop ..."
8
11
  /usr/local/bundle/bin/rubocop
@@ -11,7 +11,7 @@ TAGS=( "Added" "ADDED" "Fixed" "FIXED" "Changed" "CHANGED" "Deprecated" "DEPRECA
11
11
  CONTRIBUTORS=( "Shane Lattanzio" "Li Tai" "Vikram Yadav" "Mark Fiorvanti" "Serafima Ostrovskaya" "Yoon Jean Kim" "Tony Wong" "Parv Mital" )
12
12
 
13
13
  OLD="v$(cat ./lf-release/version)"
14
- VERSION="$(ruby -r ./lf-git-changed/lib/license_finder/version.rb -e "puts LicenseFinder::VERSION")"
14
+ VERSION="$(cat semver-version/version)"
15
15
  VERSION_TAG="v$VERSION"
16
16
 
17
17
  # Add version title information
@@ -60,7 +60,7 @@ echo "New version: $VERSION"
60
60
  echo "Current version: $OLD"
61
61
 
62
62
  if [ "$VERSION" == "$OLD" ]; then
63
- echo "Error: Version in version.rb is identical to latest release on github"
63
+ echo "Error: Version in VERSION file is identical to latest release on github"
64
64
  exit 1
65
65
  fi
66
66
 
@@ -2,6 +2,7 @@
2
2
  platform: linux
3
3
  inputs:
4
4
  - name: lf-git
5
+ - name: semver-version
5
6
  run:
6
7
  path: bash
7
8
  args:
@@ -2,14 +2,15 @@
2
2
  image_resource:
3
3
  type: docker-image
4
4
  source:
5
- repository: licensefinder/license_finder
5
+ repository: brenix/alpine-bash-git-ssh
6
6
  tag: latest
7
7
  platform: linux
8
8
  inputs:
9
9
  - name: lf-git
10
10
  - name: lf-release
11
+ - name: semver-version
11
12
  outputs:
12
- - name: version
13
13
  - name: lf-git-changed
14
+ - name: version
14
15
  run:
15
- path: lf-git/ci/scripts/updateChangelog.sh
16
+ path: lf-git/ci/scripts/updateChangelog.sh
@@ -35,7 +35,7 @@ module LicenseFinder
35
35
 
36
36
  def apache2
37
37
  License.new(
38
- short_name: 'Apache2',
38
+ short_name: 'Apache2',
39
39
  pretty_name: 'Apache 2.0',
40
40
  other_names: [
41
41
  'Apache-2.0',
@@ -48,55 +48,55 @@ module LicenseFinder
48
48
  'Apache License',
49
49
  'Apache License, Version 2.0'
50
50
  ],
51
- url: 'http://www.apache.org/licenses/LICENSE-2.0.txt'
51
+ url: 'http://www.apache.org/licenses/LICENSE-2.0.txt'
52
52
  )
53
53
  end
54
54
 
55
55
  def bsd
56
56
  License.new(
57
- short_name: 'BSD',
57
+ short_name: 'BSD',
58
58
  other_names: ['BSD4', 'bsd-old', '4-clause BSD', 'BSD-4-Clause', 'BSD License'],
59
- url: 'http://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_.28original_.22BSD_License.22.29'
59
+ url: 'http://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_.28original_.22BSD_License.22.29'
60
60
  )
61
61
  end
62
62
 
63
63
  def cc01
64
64
  License.new(
65
- short_name: 'CC01',
65
+ short_name: 'CC01',
66
66
  pretty_name: 'CC0 1.0 Universal',
67
67
  other_names: ['CC0 1.0'],
68
- url: 'http://creativecommons.org/publicdomain/zero/1.0'
68
+ url: 'http://creativecommons.org/publicdomain/zero/1.0'
69
69
  )
70
70
  end
71
71
 
72
72
  def gplv2
73
73
  License.new(
74
- short_name: 'GPLv2',
74
+ short_name: 'GPLv2',
75
75
  other_names: ['GPL V2', 'gpl-v2', 'GNU GENERAL PUBLIC LICENSE Version 2'],
76
- url: 'http://www.gnu.org/licenses/gpl-2.0.txt'
76
+ url: 'http://www.gnu.org/licenses/gpl-2.0.txt'
77
77
  )
78
78
  end
79
79
 
80
80
  def gplv3
81
81
  License.new(
82
- short_name: 'GPLv3',
82
+ short_name: 'GPLv3',
83
83
  other_names: ['GPL V3', 'gpl-v3', 'GNU GENERAL PUBLIC LICENSE Version 3'],
84
- url: 'http://www.gnu.org/licenses/gpl-3.0.txt'
84
+ url: 'http://www.gnu.org/licenses/gpl-3.0.txt'
85
85
  )
86
86
  end
87
87
 
88
88
  def isc
89
89
  License.new(
90
90
  short_name: 'ISC',
91
- url: 'http://en.wikipedia.org/wiki/ISC_license'
91
+ url: 'http://en.wikipedia.org/wiki/ISC_license'
92
92
  )
93
93
  end
94
94
 
95
95
  def lgpl
96
96
  License.new(
97
- short_name: 'LGPL',
97
+ short_name: 'LGPL',
98
98
  other_names: ['LGPL-3', 'LGPLv3', 'LGPL-3.0'],
99
- url: 'http://www.gnu.org/licenses/lgpl.txt'
99
+ url: 'http://www.gnu.org/licenses/lgpl.txt'
100
100
  )
101
101
  end
102
102
 
@@ -113,10 +113,10 @@ module LicenseFinder
113
113
  )
114
114
 
115
115
  License.new(
116
- short_name: 'MIT',
116
+ short_name: 'MIT',
117
117
  other_names: ['Expat', 'MIT license', 'MIT License'],
118
- url: 'http://opensource.org/licenses/mit-license',
119
- matcher: matcher
118
+ url: 'http://opensource.org/licenses/mit-license',
119
+ matcher: matcher
120
120
  )
121
121
  end
122
122
 
@@ -129,14 +129,14 @@ module LicenseFinder
129
129
  )
130
130
 
131
131
  License.new(
132
- short_name: 'MPL2',
132
+ short_name: 'MPL2',
133
133
  pretty_name: 'Mozilla Public License 2.0',
134
134
  other_names: [
135
135
  'MPL-2.0',
136
136
  'Mozilla Public License, Version 2.0'
137
137
  ],
138
- url: 'https://www.mozilla.org/media/MPL/2.0/index.815ca599c9df.txt',
139
- matcher: matcher
138
+ url: 'https://www.mozilla.org/media/MPL/2.0/index.815ca599c9df.txt',
139
+ matcher: matcher
140
140
  )
141
141
  end
142
142
 
@@ -153,20 +153,20 @@ module LicenseFinder
153
153
  )
154
154
 
155
155
  License.new(
156
- short_name: 'NewBSD',
156
+ short_name: 'NewBSD',
157
157
  pretty_name: 'New BSD',
158
158
  other_names: ['Modified BSD', 'BSD3', 'BSD-3', '3-clause BSD', 'BSD-3-Clause'],
159
- url: 'http://opensource.org/licenses/BSD-3-Clause',
160
- matcher: matcher
159
+ url: 'http://opensource.org/licenses/BSD-3-Clause',
160
+ matcher: matcher
161
161
  )
162
162
  end
163
163
 
164
164
  def python
165
165
  License.new(
166
- short_name: 'Python',
166
+ short_name: 'Python',
167
167
  pretty_name: 'Python Software Foundation License',
168
168
  other_names: ['PSF'],
169
- url: 'http://hg.python.org/cpython/raw-file/89ce323357db/LICENSE'
169
+ url: 'http://hg.python.org/cpython/raw-file/89ce323357db/LICENSE'
170
170
  )
171
171
  end
172
172
 
@@ -179,19 +179,19 @@ module LicenseFinder
179
179
  )
180
180
 
181
181
  License.new(
182
- short_name: 'Ruby',
182
+ short_name: 'Ruby',
183
183
  pretty_name: 'ruby',
184
- url: url,
185
- matcher: matcher
184
+ url: url,
185
+ matcher: matcher
186
186
  )
187
187
  end
188
188
 
189
189
  def simplifiedbsd
190
190
  License.new(
191
- short_name: 'SimplifiedBSD',
191
+ short_name: 'SimplifiedBSD',
192
192
  pretty_name: 'Simplified BSD',
193
193
  other_names: ['FreeBSD', '2-clause BSD', 'BSD-2-Clause', 'BSD 2-Clause'],
194
- url: 'http://opensource.org/licenses/bsd-license'
194
+ url: 'http://opensource.org/licenses/bsd-license'
195
195
  )
196
196
  end
197
197
  end
@@ -3,9 +3,9 @@
3
3
  module LicenseFinder
4
4
  class License
5
5
  module Text
6
- SPACES = /\s+/
7
- QUOTES = /['`"]{1,2}/
8
- PLACEHOLDERS = /<[^<>]+>/
6
+ SPACES = /\s+/.freeze
7
+ QUOTES = /['`"]{1,2}/.freeze
8
+ PLACEHOLDERS = /<[^<>]+>/.freeze
9
9
 
10
10
  def self.normalize_punctuation(text)
11
11
  text.gsub(SPACES, ' ')
@@ -46,7 +46,10 @@ module LicenseFinder
46
46
  'Pods/Target Support Files/Pods/Pods-acknowledgements.plist',
47
47
  'Pods/Target Support Files/Pods-*/Pods-*-acknowledgements.plist']
48
48
 
49
- Dir[*search_paths.map { |path| File.join(project_path, path) }].first
49
+ result = Dir[*search_paths.map { |path| File.join(project_path, path) }].first
50
+ raise "Found a Podfile but no Pods directory in #{project_path}. Try running pod install before running license_finder." if result.nil?
51
+
52
+ result
50
53
  end
51
54
 
52
55
  def read_plist(pathname)
@@ -7,7 +7,7 @@ module LicenseFinder
7
7
 
8
8
  class GoWorkspace < PackageManager
9
9
  Submodule = Struct.new :install_path, :revision
10
- ENVRC_REGEXP = /GOPATH|GO15VENDOREXPERIMENT/
10
+ ENVRC_REGEXP = /GOPATH|GO15VENDOREXPERIMENT/.freeze
11
11
 
12
12
  def initialize(options = {})
13
13
  super
@@ -14,11 +14,25 @@ module LicenseFinder
14
14
  name,
15
15
  version,
16
16
  install_path: @deps_path.join(name),
17
- logger: logger
17
+ logger: logger,
18
+ spec_licenses: licenses(name)
18
19
  )
19
20
  end
20
21
  end
21
22
 
23
+ # Adapted from licenser: https://github.com/unnawut/licensir/blob/71f96f8734adc73c0651050bd9f0e20ff52c61a8/lib/licensir/scanner.ex#L61
24
+ def licenses(name)
25
+ config_path = @deps_path.join(name).join('hex_metadata.config')
26
+ # rubocop:disable Metrics/LineLength
27
+ args = "\\\"#{config_path}\\\" |> :file.consult() |> case do {:ok, metadata} -> metadata; {:error, _} -> [] end |> List.keyfind(\\\"licenses\\\", 0) |> case do {_, licenses} -> licenses; _ -> [] end |> Enum.join(\\\"\\t\\\") |> IO.puts()"
28
+ # rubocop:enable Metrics/LineLength
29
+ command = "#{@command} run --no-start --no-compile -e \"#{args}\""
30
+ stdout, stderr, status = Dir.chdir(project_path) { Cmd.run(command) }
31
+ raise "Command '#{command}' failed to execute: #{stderr}" unless status.success?
32
+
33
+ stdout.strip.split("\t")
34
+ end
35
+
22
36
  def self.package_management_command
23
37
  'mix'
24
38
  end
@@ -4,7 +4,7 @@ require 'set'
4
4
 
5
5
  module LicenseFinder
6
6
  class PipPackage < Package
7
- LICENSE_FORMAT = /^License.*::\s*(.*)$/
7
+ LICENSE_FORMAT = /^License.*::\s*(.*)$/.freeze
8
8
  INVALID_LICENSES = ['', 'UNKNOWN'].to_set
9
9
 
10
10
  def self.license_names_from_spec(spec)
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LicenseFinder
4
- VERSION = '5.6.2'
4
+ root = File.expand_path('../..', __dir__)
5
+ VERSION = File.read("#{root}/VERSION").strip
5
6
  end
@@ -1,15 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__)
4
- $LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
5
-
6
- require 'license_finder/platform'
7
- require 'license_finder/version'
3
+ version = File.read(File.expand_path('VERSION', __dir__)).strip
8
4
 
9
5
  Gem::Specification.new do |s|
10
6
  s.required_ruby_version = '>= 2.3.3'
11
7
  s.name = 'license_finder'
12
- s.version = LicenseFinder::VERSION
8
+ s.version = version
13
9
 
14
10
  s.authors = [
15
11
  'Ryan Collins',
@@ -55,15 +51,15 @@ Gem::Specification.new do |s|
55
51
  s.add_dependency 'xml-simple'
56
52
 
57
53
  s.add_development_dependency 'addressable', '2.5.2'
58
- s.add_development_dependency 'capybara', '~> 2.0.0'
59
- s.add_development_dependency 'cocoapods', '0.34.0' if LicenseFinder::Platform.darwin?
60
- s.add_development_dependency 'fakefs', '~> 0.11.3'
54
+ s.add_development_dependency 'capybara', '~> 3.14.0'
55
+ s.add_development_dependency 'cocoapods', '>= 1.0.0' if RUBY_PLATFORM =~ /darwin/
56
+ s.add_development_dependency 'fakefs', '~> 0.19.2'
61
57
  s.add_development_dependency 'mime-types', '3.1'
62
58
  s.add_development_dependency 'pry'
63
59
  s.add_development_dependency 'rake'
64
60
  s.add_development_dependency 'rspec', '~> 3'
65
61
  s.add_development_dependency 'rspec-its'
66
- s.add_development_dependency 'rubocop', '~> 0.59.2'
62
+ s.add_development_dependency 'rubocop', '~> 0.65.0'
67
63
  s.add_development_dependency 'webmock', '~> 1.13'
68
64
 
69
65
  # to preserve ruby < 2.2.2 support.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: license_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.2
4
+ version: 5.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Collins
@@ -27,7 +27,7 @@ authors:
27
27
  autorequire:
28
28
  bindir: bin
29
29
  cert_chain: []
30
- date: 2019-01-28 00:00:00.000000000 Z
30
+ date: 2019-03-01 00:00:00.000000000 Z
31
31
  dependencies:
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: bundler
@@ -133,28 +133,28 @@ dependencies:
133
133
  requirements:
134
134
  - - "~>"
135
135
  - !ruby/object:Gem::Version
136
- version: 2.0.0
136
+ version: 3.14.0
137
137
  type: :development
138
138
  prerelease: false
139
139
  version_requirements: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - "~>"
142
142
  - !ruby/object:Gem::Version
143
- version: 2.0.0
143
+ version: 3.14.0
144
144
  - !ruby/object:Gem::Dependency
145
145
  name: fakefs
146
146
  requirement: !ruby/object:Gem::Requirement
147
147
  requirements:
148
148
  - - "~>"
149
149
  - !ruby/object:Gem::Version
150
- version: 0.11.3
150
+ version: 0.19.2
151
151
  type: :development
152
152
  prerelease: false
153
153
  version_requirements: !ruby/object:Gem::Requirement
154
154
  requirements:
155
155
  - - "~>"
156
156
  - !ruby/object:Gem::Version
157
- version: 0.11.3
157
+ version: 0.19.2
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: mime-types
160
160
  requirement: !ruby/object:Gem::Requirement
@@ -231,14 +231,14 @@ dependencies:
231
231
  requirements:
232
232
  - - "~>"
233
233
  - !ruby/object:Gem::Version
234
- version: 0.59.2
234
+ version: 0.65.0
235
235
  type: :development
236
236
  prerelease: false
237
237
  version_requirements: !ruby/object:Gem::Requirement
238
238
  requirements:
239
239
  - - "~>"
240
240
  - !ruby/object:Gem::Version
241
- version: 0.59.2
241
+ version: 0.65.0
242
242
  - !ruby/object:Gem::Dependency
243
243
  name: webmock
244
244
  requirement: !ruby/object:Gem::Requirement
@@ -306,12 +306,12 @@ files:
306
306
  - README.md
307
307
  - Rakefile
308
308
  - TODO.md
309
+ - VERSION
309
310
  - appveyor.yml
310
311
  - bin/license_finder
311
312
  - bin/license_finder_pip.py
312
313
  - ci/pipelines/pull-request.yml.erb
313
314
  - ci/pipelines/release.yml.erb
314
- - ci/scripts/bump-patch-version.sh
315
315
  - ci/scripts/containerize-tests.sh
316
316
  - ci/scripts/pushscript.sh
317
317
  - ci/scripts/run-rubocop.sh
@@ -321,7 +321,6 @@ files:
321
321
  - ci/tasks/build-and-push-gem.yml
322
322
  - ci/tasks/build-windows.yml
323
323
  - ci/tasks/build.yml
324
- - ci/tasks/bump-patch-version.yml
325
324
  - ci/tasks/rubocop.yml
326
325
  - ci/tasks/run-tests.yml
327
326
  - ci/tasks/update-changelog.yml
@@ -1,26 +0,0 @@
1
- #!/bin/bash --login
2
-
3
- set -e
4
-
5
- git clone lf-git lf-git-changed
6
-
7
- VERSION_FILE="./lf-git-changed/lib/license_finder/version.rb"
8
-
9
- VERSION="$(ruby -r "$VERSION_FILE" -e "puts LicenseFinder::VERSION")"
10
-
11
- OLD_PATCH=$(cut -d'.' -f3 <<<"$VERSION")
12
-
13
- NEW_PATCH=$(echo $((++OLD_PATCH)))
14
-
15
- NEW_VERSION="$(cut -d'.' -f1,2 <<<"$VERSION").$NEW_PATCH"
16
-
17
- sed -i.bak "s/$VERSION/$NEW_VERSION/g" "$VERSION_FILE"
18
-
19
- cd lf-git-changed
20
- git config --global user.email $GIT_EMAIL
21
- git config --global user.name $GIT_USERNAME
22
-
23
- git add "lib/license_finder/version.rb"
24
- git commit -m "Update patch version to: $NEW_VERSION"
25
-
26
- exit 0
@@ -1,13 +0,0 @@
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: lf-git-changed
12
- run:
13
- path: lf-git/ci/scripts/bump-patch-version.sh