license-acceptance 1.0.5 → 2.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +17 -1
  3. data/config/product_info.toml +23 -1
  4. data/lib/license_acceptance/acceptor.rb +54 -37
  5. data/lib/license_acceptance/cli_flags/mixlib_cli.rb +2 -2
  6. data/lib/license_acceptance/cli_flags/thor.rb +3 -3
  7. data/lib/license_acceptance/config.rb +6 -4
  8. data/lib/license_acceptance/logger.rb +1 -1
  9. data/lib/license_acceptance/product.rb +8 -6
  10. data/lib/license_acceptance/product_reader.rb +11 -7
  11. data/lib/license_acceptance/strategy/argument.rb +17 -16
  12. data/lib/license_acceptance/strategy/environment.rb +11 -10
  13. data/lib/license_acceptance/strategy/file.rb +10 -12
  14. data/lib/license_acceptance/strategy/prompt.rb +26 -26
  15. data/lib/license_acceptance/strategy/provided_value.rb +8 -5
  16. data/lib/license_acceptance/version.rb +1 -1
  17. metadata +14 -134
  18. data/Gemfile.lock +0 -94
  19. data/Rakefile +0 -6
  20. data/spec/license_acceptance/acceptor_spec.rb +0 -293
  21. data/spec/license_acceptance/cli_flags/mixlib_cli_spec.rb +0 -14
  22. data/spec/license_acceptance/cli_flags/thor_spec.rb +0 -14
  23. data/spec/license_acceptance/config_spec.rb +0 -111
  24. data/spec/license_acceptance/product_reader_spec.rb +0 -155
  25. data/spec/license_acceptance/product_spec.rb +0 -15
  26. data/spec/license_acceptance/strategy/argument_spec.rb +0 -82
  27. data/spec/license_acceptance/strategy/environment_spec.rb +0 -76
  28. data/spec/license_acceptance/strategy/file_spec.rb +0 -127
  29. data/spec/license_acceptance/strategy/prompt_spec.rb +0 -100
  30. data/spec/license_acceptance/strategy/provided_value_spec.rb +0 -55
  31. data/spec/spec_helper.rb +0 -25
@@ -1,55 +0,0 @@
1
- require "spec_helper"
2
- require "license_acceptance/strategy/provided_value"
3
-
4
- RSpec.describe LicenseAcceptance::Strategy::ProvidedValue do
5
- let(:acc) { LicenseAcceptance::Strategy::ProvidedValue.new(value) }
6
-
7
- describe "#accepted?" do
8
- describe "when the value is correct" do
9
- let(:value) { "accept" }
10
- it "returns true" do
11
- expect(acc.accepted?).to eq(true)
12
- end
13
- end
14
-
15
- describe "when the value is incorrect" do
16
- let(:value) { nil }
17
- it "returns false" do
18
- expect(acc.accepted?).to eq(false)
19
- end
20
- end
21
- end
22
-
23
- describe "#silent?" do
24
- describe "when the value is correct" do
25
- let(:value) { "accept-silent" }
26
- it "returns true" do
27
- expect(acc.silent?).to eq(true)
28
- end
29
- end
30
-
31
- describe "when the value is incorrect" do
32
- let(:value) { "accept" }
33
- it "returns false" do
34
- expect(acc.silent?).to eq(false)
35
- end
36
- end
37
- end
38
-
39
- describe "#no_persist?" do
40
- describe "when the value is correct" do
41
- let(:value) { "accept-no-persist" }
42
- it "returns true" do
43
- expect(acc.no_persist?).to eq(true)
44
- end
45
- end
46
-
47
- describe "when the value is incorrect" do
48
- let(:value) { "accept-silent" }
49
- it "returns false" do
50
- expect(acc.no_persist?).to eq(false)
51
- end
52
- end
53
- end
54
-
55
- end
data/spec/spec_helper.rb DELETED
@@ -1,25 +0,0 @@
1
- require "bundler/setup"
2
- require "license_acceptance/logger"
3
- require "logger"
4
-
5
- RSpec.configure do |config|
6
- # Enable flags like --only-failures and --next-failure
7
- config.example_status_persistence_file_path = ".rspec_status"
8
-
9
- # Disable RSpec exposing methods globally on `Module` and `main`
10
- config.disable_monkey_patching!
11
-
12
- config.filter_run :focus => true
13
- config.run_all_when_everything_filtered = true
14
- config.mock_with :rspec do |mocks|
15
- mocks.verify_partial_doubles = true
16
- end
17
-
18
- config.expect_with :rspec do |c|
19
- c.syntax = :expect
20
- end
21
-
22
- config.before(:all) do
23
- LicenseAcceptance::Logger.initialize(::Logger.new(IO::NULL))
24
- end
25
- end