license_finder 2.0.0.rc2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/CHANGELOG.rdoc +16 -9
- data/CONTRIBUTING.md +3 -3
- data/README.md +4 -1
- data/TODO.md +6 -19
- data/bin/license_finder_pip.py +2 -2
- data/features/features/cli_spec.rb +18 -18
- data/features/features/configure/add_dependencies_spec.rb +16 -16
- data/features/features/configure/approve_dependencies_spec.rb +10 -9
- data/features/features/configure/assign_licenses_spec.rb +8 -8
- data/features/features/configure/ignore_dependencies_spec.rb +15 -15
- data/features/features/configure/ignore_groups_spec.rb +15 -15
- data/features/features/configure/name_project_spec.rb +15 -14
- data/features/features/configure/whitelist_licenses_spec.rb +21 -21
- data/features/features/package_managers/bower_spec.rb +3 -3
- data/features/features/package_managers/cocoapods_spec.rb +4 -4
- data/features/features/package_managers/gradle_spec.rb +3 -3
- data/features/features/package_managers/maven_spec.rb +3 -3
- data/features/features/package_managers/npm_spec.rb +3 -3
- data/features/features/package_managers/pip_spec.rb +3 -3
- data/features/features/report/csv_spec.rb +9 -8
- data/features/features/report/html_spec.rb +13 -12
- data/features/support/testing_dsl.rb +1 -1
- data/lib/license_finder.rb +1 -16
- data/lib/license_finder/cli/approvals.rb +3 -4
- data/lib/license_finder/cli/base.rb +40 -3
- data/lib/license_finder/cli/dependencies.rb +3 -3
- data/lib/license_finder/cli/main.rb +7 -25
- data/lib/license_finder/cli/makes_decisions.rb +2 -20
- data/lib/license_finder/cli/patched_thor.rb +0 -2
- data/lib/license_finder/cli/whitelist.rb +6 -8
- data/lib/license_finder/configuration.rb +1 -1
- data/lib/license_finder/core.rb +68 -0
- data/lib/license_finder/decision_applier.rb +10 -7
- data/lib/license_finder/license.rb +10 -10
- data/lib/license_finder/license/template.rb +3 -2
- data/lib/license_finder/logger.rb +2 -6
- data/lib/license_finder/package.rb +25 -44
- data/lib/license_finder/package_manager.rb +11 -13
- data/lib/license_finder/package_managers/bower.rb +1 -1
- data/lib/license_finder/package_managers/bundler.rb +1 -1
- data/lib/license_finder/package_managers/cocoa_pods.rb +3 -3
- data/lib/license_finder/package_managers/cocoa_pods_package.rb +3 -3
- data/lib/license_finder/package_managers/gradle.rb +2 -2
- data/lib/license_finder/package_managers/maven.rb +2 -2
- data/lib/license_finder/package_managers/npm.rb +1 -1
- data/lib/license_finder/package_managers/pip.rb +1 -1
- data/lib/license_finder/package_managers/pip_package.rb +6 -4
- data/lib/license_finder/packages/activation.rb +54 -0
- data/lib/license_finder/{possible_license_files.rb → packages/license_files.rb} +9 -7
- data/lib/license_finder/packages/licensing.rb +43 -0
- data/lib/license_finder/{package_managers → packages}/manual_package.rb +0 -0
- data/lib/license_finder/{possible_license_file.rb → packages/possible_license_file.rb} +0 -2
- data/lib/license_finder/version.rb +1 -1
- data/spec/fixtures/{license_directory/LICENSE/Apache.txt → all_pms/Gemfile} +0 -0
- data/spec/fixtures/all_pms/Podfile +0 -0
- data/spec/fixtures/all_pms/bower.json +0 -0
- data/spec/fixtures/all_pms/build.gradle +0 -0
- data/spec/fixtures/all_pms/package.json +0 -0
- data/spec/fixtures/all_pms/pom.xml +0 -0
- data/spec/fixtures/all_pms/requirements.txt +0 -0
- data/spec/fixtures/license_directory/COPYING +1 -0
- data/spec/fixtures/license_directory/LICENSE/MIT.txt +1 -0
- data/spec/fixtures/license_names/COPYING.txt +1 -0
- data/spec/fixtures/license_names/LICENSE +1 -0
- data/spec/fixtures/license_names/Licence.rdoc +1 -0
- data/spec/fixtures/license_names/Mit-License +1 -0
- data/spec/fixtures/license_names/README.rdoc +1 -0
- data/spec/fixtures/nested_gem/vendor/LICENSE +1 -0
- data/spec/lib/license_finder/cli/approvals_spec.rb +9 -3
- data/spec/lib/license_finder/cli/dependencies_spec.rb +5 -2
- data/spec/lib/license_finder/cli/main_spec.rb +20 -27
- data/spec/lib/license_finder/configuration_spec.rb +1 -3
- data/spec/lib/license_finder/decision_applier_spec.rb +15 -15
- data/spec/lib/license_finder/decisions_spec.rb +94 -95
- data/spec/lib/license_finder/license_spec.rb +5 -5
- data/spec/lib/license_finder/package_managers/bower_package_spec.rb +0 -4
- data/spec/lib/license_finder/package_managers/bower_spec.rb +6 -27
- data/spec/lib/license_finder/package_managers/bundler_package_spec.rb +0 -2
- data/spec/lib/license_finder/package_managers/bundler_spec.rb +0 -15
- data/spec/lib/license_finder/package_managers/cocoa_pods_package_spec.rb +5 -2
- data/spec/lib/license_finder/package_managers/cocoa_pods_spec.rb +13 -31
- data/spec/lib/license_finder/package_managers/gradle_package_spec.rb +0 -2
- data/spec/lib/license_finder/package_managers/gradle_spec.rb +11 -35
- data/spec/lib/license_finder/package_managers/maven_package_spec.rb +0 -2
- data/spec/lib/license_finder/package_managers/maven_spec.rb +18 -56
- data/spec/lib/license_finder/package_managers/npm_package_spec.rb +0 -2
- data/spec/lib/license_finder/package_managers/npm_spec.rb +0 -17
- data/spec/lib/license_finder/package_managers/pip_package_spec.rb +0 -2
- data/spec/lib/license_finder/package_managers/pip_spec.rb +8 -25
- data/spec/lib/license_finder/package_spec.rb +2 -4
- data/spec/lib/license_finder/packages/activation_spec.rb +47 -0
- data/spec/lib/license_finder/{possible_license_files_spec.rb → packages/license_files_spec.rb} +2 -6
- data/spec/lib/license_finder/packages/licensing_spec.rb +1 -0
- data/spec/lib/license_finder/{possible_license_file_spec.rb → packages/possible_license_file_spec.rb} +0 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/support/shared_examples_for_package_manager.rb +14 -1
- data/spec/support/test_fixtures.rb +7 -0
- metadata +117 -12
- data/spec/support/shared_examples_for_package.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfcc32451073719f18ccbd51a98c62a8a741500f
|
4
|
+
data.tar.gz: 5d51cb13de5f31a9b994ec5259850432b7ad5b6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bf9e97e40975279f6e3a8b7920093be14084b7ac3cfb668e54ee1429b03e825a8d5120877959df8e626e82a5882a84c5f7109c599919fcf1af4cf159b1ea647
|
7
|
+
data.tar.gz: bea4e4ad49d7567e2650bac22d018f3361868a7d8eaf4e2d6f35d4c7958db902c9e18aa007221ad59395a058bcff3fdaf6410178fac96d696c3e7fe1c6e988e4
|
data/.travis.yml
CHANGED
@@ -23,10 +23,12 @@ notifications:
|
|
23
23
|
on_start: true
|
24
24
|
|
25
25
|
before_install:
|
26
|
+
- python --version
|
27
|
+
- pip --version
|
26
28
|
- cd /tmp
|
27
29
|
- wget http://services.gradle.org/distributions/gradle-1.11-all.zip
|
28
30
|
- unzip -q gradle*
|
29
31
|
- rm gradle*.zip
|
30
32
|
- mv gradle* ~/gradle
|
31
33
|
- npm install -g bower
|
32
|
-
- cd -
|
34
|
+
- cd -
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,19 +1,26 @@
|
|
1
|
-
=== 2.0.0 /
|
1
|
+
=== 2.0.0 / 2015-03-02
|
2
2
|
|
3
3
|
* Features
|
4
4
|
|
5
|
-
* Stores
|
6
|
-
|
7
|
-
|
5
|
+
* Stores every decision that has been made about a project's dependencies,
|
6
|
+
even if a decision was later reverted. These decisions are kept in an
|
7
|
+
append-only YAML file which can be considered an audit log.
|
8
|
+
* Stores timestamps and other optional transactional metadata (who, why)
|
9
|
+
about every kind of decision.
|
8
10
|
* When needed, applies those decisions to the list of packages currently
|
9
11
|
reported by the package managers.
|
12
|
+
* Removed dependencies on sqlite and sequel.
|
10
13
|
* The CLI never writes HTML or CSV reports to the file system, only to
|
11
14
|
STDOUT. So, users have more choice over which reports to generate, when to
|
12
|
-
generate them, and where to put them. See `license_finder report`.
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
generate them, and where to put them. See `license_finder report`. If you
|
16
|
+
would like to update reports automatically (e.g., in a rake task or git
|
17
|
+
hook) see this gist: https://gist.github.com/mainej/1a4d61a92234c5cebeab.
|
18
|
+
* The configuration YAML file is no longer required, though it can still be
|
19
|
+
useful. Most of its functionality has been moved into the decisions
|
20
|
+
infrastructure, and the remaining bits can be passed as arguments to the
|
21
|
+
CLI. Most users will not need these arguments. If the file is present, the
|
22
|
+
CLI arguments can be omitted. The CLI no longer updates this file.
|
23
|
+
* Requires pip >= 6.0
|
17
24
|
|
18
25
|
* Bugfixes
|
19
26
|
|
data/CONTRIBUTING.md
CHANGED
@@ -11,9 +11,9 @@
|
|
11
11
|
|
12
12
|
## Development Dependencies
|
13
13
|
|
14
|
-
To successfully run the test suite, you will need
|
15
|
-
|
16
|
-
|
14
|
+
To successfully run the test suite, you will need npm, maven, pip, gradle and
|
15
|
+
bower installed. If you run `rake check_dependencies`, you'll see exactly what
|
16
|
+
you're missing.
|
17
17
|
|
18
18
|
### Python
|
19
19
|
|
data/README.md
CHANGED
@@ -306,8 +306,11 @@ downloadLicenses {
|
|
306
306
|
|
307
307
|
## Upgrading
|
308
308
|
|
309
|
-
To upgrade from `license_finder` version
|
309
|
+
To upgrade from `license_finder` version 1.2 to 2.0, see
|
310
310
|
[`license_finder_upgrade`](https://github.com/mainej/license_finder_upgrade).
|
311
|
+
To upgrade to 2.0 from a version lower than 1.2, first upgrade to 1.2, and run
|
312
|
+
`license_finder` at least once. This will ensure that the `license_finder`
|
313
|
+
database is in a state which `license_finder_upgrade` understands.
|
311
314
|
|
312
315
|
|
313
316
|
## A Plea to Package Authors and Maintainers
|
data/TODO.md
CHANGED
@@ -1,28 +1,15 @@
|
|
1
|
-
|
2
1
|
# immediate
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
- [x] then remove `#licenses_from_files` from `{maven,gradle}_package.rb`
|
7
|
-
- [x] update docs in package.rb to reflect what our expectations are.
|
8
|
-
- [x] commit the rest of the WIP
|
9
|
-
|
2
|
+
- Packages should log which licenses came from decisions. Maybe have
|
3
|
+
Activations, which store a license and a source, which can be logged or
|
4
|
+
otherwise manipulated.
|
10
5
|
|
11
6
|
# architecture
|
12
7
|
|
13
|
-
- [x] package managers should use instance methods so we can inject things like loggers
|
14
|
-
- [ ] are we sprinkling database logic around too much? see 23f4cae for related work.
|
15
|
-
|
16
|
-
|
17
8
|
# renamings, etc.
|
18
9
|
|
19
|
-
-
|
20
|
-
-
|
21
|
-
- [ ] classes under `package_managers` should be in a PackageManagers module
|
22
|
-
- [ ] `license_names_from_standard_spec` should be the default instance method
|
23
|
-
- [ ] #groups in some Packages, #included_groups etc. in others
|
24
|
-
|
10
|
+
- classes under `package_managers` should be in a PackageManagers module
|
11
|
+
- `license_names_from_standard_spec` should be the default instance method
|
25
12
|
|
26
13
|
# docs
|
27
14
|
|
28
|
-
-
|
15
|
+
- specify gradle version >= 1.8
|
data/bin/license_finder_pip.py
CHANGED
@@ -5,39 +5,39 @@ describe "License Finder command line executable" do
|
|
5
5
|
# I want a command-line interface
|
6
6
|
# So that I can manage my application's dependencies and licenses
|
7
7
|
|
8
|
-
let(:
|
8
|
+
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
9
|
|
10
10
|
specify "reports unapproved dependencies" do
|
11
|
-
|
12
|
-
|
11
|
+
developer.create_empty_project
|
12
|
+
developer.execute_command("license_finder dependencies add unapproved_gem Whatever")
|
13
13
|
|
14
|
-
|
15
|
-
expect(
|
16
|
-
expect(
|
14
|
+
developer.run_license_finder
|
15
|
+
expect(developer).to be_receiving_exit_code(1)
|
16
|
+
expect(developer).to be_seeing 'unapproved_gem'
|
17
17
|
end
|
18
18
|
|
19
19
|
specify "reports that all dependencies are approved" do
|
20
|
-
|
20
|
+
developer.create_empty_project
|
21
21
|
|
22
|
-
|
23
|
-
expect(
|
24
|
-
expect(
|
22
|
+
developer.run_license_finder
|
23
|
+
expect(developer).to be_receiving_exit_code(0)
|
24
|
+
expect(developer).to be_seeing 'All dependencies are approved for use'
|
25
25
|
end
|
26
26
|
|
27
27
|
specify "shows usage and subcommand help" do
|
28
|
-
|
28
|
+
developer.create_empty_project
|
29
29
|
|
30
|
-
|
31
|
-
expect(
|
30
|
+
developer.execute_command "license_finder help"
|
31
|
+
expect(developer).to be_seeing 'license_finder help [COMMAND]'
|
32
32
|
|
33
|
-
|
34
|
-
expect(
|
33
|
+
developer.execute_command "license_finder ignored_groups help add"
|
34
|
+
expect(developer).to be_seeing 'license_finder ignored_groups add GROUP'
|
35
35
|
end
|
36
36
|
|
37
37
|
it "reports `license_finder`'s license is MIT" do
|
38
|
-
|
38
|
+
developer.create_ruby_app # has license_finder as a dependency
|
39
39
|
|
40
|
-
|
41
|
-
expect(
|
40
|
+
developer.run_license_finder
|
41
|
+
expect(developer).to be_seeing_something_like /license_finder.*MIT/
|
42
42
|
end
|
43
43
|
end
|
@@ -3,35 +3,35 @@ require 'feature_helper'
|
|
3
3
|
describe "Manually Added Dependencies" do
|
4
4
|
# As a developer
|
5
5
|
# I want to be able to manually add dependencies
|
6
|
-
# So that I can track dependencies not managed by
|
6
|
+
# So that I can track dependencies not managed by any official package manager
|
7
7
|
|
8
|
-
let(:
|
8
|
+
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
9
|
|
10
|
-
before {
|
10
|
+
before { developer.create_empty_project }
|
11
11
|
|
12
12
|
specify "appear in reports" do
|
13
|
-
|
13
|
+
developer.execute_command 'license_finder dependencies add manual_dep MIT 1.2.3'
|
14
14
|
|
15
|
-
|
16
|
-
expect(
|
15
|
+
developer.run_license_finder
|
16
|
+
expect(developer).to be_seeing 'manual_dep, 1.2.3, MIT'
|
17
17
|
end
|
18
18
|
|
19
19
|
specify "can be simultaneously approved" do
|
20
|
-
|
20
|
+
developer.execute_command 'license_finder dependencies add --approve manual Whatever'
|
21
21
|
|
22
|
-
|
23
|
-
expect(
|
22
|
+
developer.run_license_finder
|
23
|
+
expect(developer).not_to be_seeing 'manual_dep'
|
24
24
|
end
|
25
25
|
|
26
26
|
specify "appear in the CLI" do
|
27
|
-
|
28
|
-
expect(
|
27
|
+
developer.execute_command 'license_finder dependencies add manual_dep Whatever'
|
28
|
+
expect(developer).to be_seeing 'manual_dep'
|
29
29
|
|
30
|
-
|
31
|
-
expect(
|
30
|
+
developer.execute_command 'license_finder dependencies list'
|
31
|
+
expect(developer).to be_seeing 'manual_dep'
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
expect(
|
33
|
+
developer.execute_command 'license_finder dependencies remove manual_dep'
|
34
|
+
developer.execute_command 'license_finder dependencies list'
|
35
|
+
expect(developer).to_not be_seeing 'manual_dep'
|
36
36
|
end
|
37
37
|
end
|
@@ -2,24 +2,25 @@ require 'feature_helper'
|
|
2
2
|
|
3
3
|
describe "Manually Approved Dependencies" do
|
4
4
|
# As a developer
|
5
|
-
# I want to approve dependencies
|
6
|
-
# So that
|
5
|
+
# I want to approve dependencies without whitelisting their licenses
|
6
|
+
# So that my business can track individual dependencies which it has approved
|
7
7
|
|
8
|
-
let(:
|
8
|
+
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
|
+
let(:product_owner) { LicenseFinder::TestingDSL::User.new }
|
9
10
|
|
10
11
|
before do
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
developer.create_empty_project
|
13
|
+
developer.execute_command 'license_finder dependencies add manual_dep MIT 1.2.3'
|
14
|
+
developer.execute_command "license_finder approval add manual_dep --who 'Julian' --why 'We really need this'"
|
14
15
|
end
|
15
16
|
|
16
17
|
specify "do not appear in action items" do
|
17
|
-
|
18
|
-
expect(
|
18
|
+
developer.run_license_finder
|
19
|
+
expect(developer).to_not be_seeing "manual_dep"
|
19
20
|
end
|
20
21
|
|
21
22
|
specify "include approval detail in reports" do
|
22
|
-
html =
|
23
|
+
html = product_owner.view_html
|
23
24
|
expect(html).to be_approved 'manual_dep'
|
24
25
|
|
25
26
|
html.in_dep("manual_dep") do |section|
|
@@ -2,19 +2,19 @@ require 'feature_helper'
|
|
2
2
|
|
3
3
|
describe "Manually Assigned Licenses" do
|
4
4
|
# As a developer
|
5
|
-
# I want to be able to override the licenses license_finder finds
|
5
|
+
# I want to be able to override the licenses which license_finder finds
|
6
6
|
# So that my dependencies all have the correct licenses
|
7
7
|
|
8
|
-
let(:
|
8
|
+
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
9
|
|
10
10
|
specify "are shown in reports" do
|
11
|
-
project =
|
12
|
-
gem =
|
11
|
+
project = developer.create_ruby_app
|
12
|
+
gem = developer.create_gem 'mislicensed_dep', license: 'Unknown'
|
13
13
|
project.depend_on gem
|
14
|
-
|
14
|
+
developer.execute_command 'license_finder licenses add mislicensed_dep Known'
|
15
15
|
|
16
|
-
|
17
|
-
expect(
|
18
|
-
expect(
|
16
|
+
developer.run_license_finder
|
17
|
+
expect(developer).not_to be_seeing_something_like /mislicensed_dep.*Unknown/
|
18
|
+
expect(developer).to be_seeing_something_like /mislicensed_dep.*Known/
|
19
19
|
end
|
20
20
|
end
|
@@ -5,31 +5,31 @@ describe "Ignored Dependencies" do
|
|
5
5
|
# I want to ignore certain dependencies
|
6
6
|
# To avoid frequently changing reports about dependencies I know will always be approved
|
7
7
|
|
8
|
-
let(:
|
8
|
+
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
9
|
|
10
10
|
before do
|
11
|
-
|
12
|
-
|
11
|
+
developer.create_empty_project
|
12
|
+
developer.execute_command 'license_finder dependencies add ignored_dep Whatever'
|
13
13
|
end
|
14
14
|
|
15
15
|
specify "are excluded from reports" do
|
16
|
-
|
16
|
+
developer.execute_command 'license_finder ignored_dependencies add ignored_dep'
|
17
17
|
|
18
|
-
|
19
|
-
expect(
|
20
|
-
|
21
|
-
expect(
|
18
|
+
developer.run_license_finder
|
19
|
+
expect(developer).to_not be_seeing 'ignored_dep'
|
20
|
+
developer.execute_command('license_finder report')
|
21
|
+
expect(developer).to_not be_seeing 'ignored_dep'
|
22
22
|
end
|
23
23
|
|
24
24
|
specify "appear in the CLI" do
|
25
|
-
|
26
|
-
expect(
|
25
|
+
developer.execute_command 'license_finder ignored_dependencies add ignored_dep'
|
26
|
+
expect(developer).to be_seeing 'ignored_dep'
|
27
27
|
|
28
|
-
|
29
|
-
expect(
|
28
|
+
developer.execute_command 'license_finder ignored_dependencies list'
|
29
|
+
expect(developer).to be_seeing 'ignored_dep'
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
expect(
|
31
|
+
developer.execute_command 'license_finder ignored_dependencies remove ignored_dep'
|
32
|
+
developer.execute_command 'license_finder ignored_dependencies list'
|
33
|
+
expect(developer).to_not be_seeing 'ignored_dep'
|
34
34
|
end
|
35
35
|
end
|
@@ -3,29 +3,29 @@ require 'feature_helper'
|
|
3
3
|
describe "Ignored Groups" do
|
4
4
|
# As a developer
|
5
5
|
# I want to ignore certain groups
|
6
|
-
# So that any gems I use in development, or for testing
|
6
|
+
# So that license_finder skips any gems I use in development, or for testing
|
7
7
|
|
8
|
-
let(:
|
8
|
+
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
9
|
|
10
10
|
specify "are excluded from reports" do
|
11
|
-
project =
|
12
|
-
gem =
|
11
|
+
project = developer.create_ruby_app
|
12
|
+
gem = developer.create_gem 'dev_gem', license: 'GPL'
|
13
13
|
project.depend_on gem, groups: ['dev']
|
14
|
-
|
14
|
+
developer.execute_command 'license_finder ignored_group add dev'
|
15
15
|
|
16
|
-
|
17
|
-
expect(
|
16
|
+
developer.run_license_finder
|
17
|
+
expect(developer).to_not be_seeing 'dev_gem'
|
18
18
|
end
|
19
19
|
|
20
20
|
specify "appear in the CLI" do
|
21
|
-
|
22
|
-
|
23
|
-
expect(
|
24
|
-
|
25
|
-
expect(
|
21
|
+
developer.create_empty_project
|
22
|
+
developer.execute_command 'license_finder ignored_group add dev'
|
23
|
+
expect(developer).to be_seeing 'dev'
|
24
|
+
developer.execute_command 'license_finder ignored_group list'
|
25
|
+
expect(developer).to be_seeing 'dev'
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
expect(
|
27
|
+
developer.execute_command 'license_finder ignored_group remove dev'
|
28
|
+
developer.execute_command 'license_finder ignored_group list'
|
29
|
+
expect(developer).to_not be_seeing 'dev'
|
30
30
|
end
|
31
31
|
end
|
@@ -3,30 +3,31 @@ require 'feature_helper'
|
|
3
3
|
describe "Project name" do
|
4
4
|
# As a developer
|
5
5
|
# I want to assign a name for my project
|
6
|
-
# So that
|
6
|
+
# So that product owners see it in the reports
|
7
7
|
|
8
|
-
let(:
|
8
|
+
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
|
+
let(:product_owner) { LicenseFinder::TestingDSL::User.new }
|
9
10
|
|
10
|
-
before {
|
11
|
+
before { developer.create_empty_project }
|
11
12
|
|
12
13
|
specify "appears in the HTML report" do
|
13
|
-
|
14
|
+
developer.execute_command 'license_finder project_name add changed_name'
|
14
15
|
|
15
|
-
expect(
|
16
|
+
expect(product_owner.view_html).to be_titled 'changed_name'
|
16
17
|
end
|
17
18
|
|
18
19
|
specify "defaults to the directory name" do
|
19
|
-
expect(
|
20
|
+
expect(product_owner.view_html).to be_titled 'my_app'
|
20
21
|
end
|
21
22
|
|
22
23
|
specify "appears in the CLI" do
|
23
|
-
|
24
|
-
expect(
|
25
|
-
|
26
|
-
expect(
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
expect(
|
24
|
+
developer.execute_command 'license_finder project_name add my_proj'
|
25
|
+
expect(developer).to be_seeing 'my_proj'
|
26
|
+
developer.execute_command 'license_finder project_name show'
|
27
|
+
expect(developer).to be_seeing 'my_proj'
|
28
|
+
|
29
|
+
developer.execute_command 'license_finder project_name remove'
|
30
|
+
developer.execute_command 'license_finder project_name show'
|
31
|
+
expect(developer).to_not be_seeing 'my_proj'
|
31
32
|
end
|
32
33
|
end
|