inspec-core 4.24.8 → 4.24.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -12
  3. data/inspec-core.gemspec +8 -8
  4. data/lib/bundles/inspec-supermarket/api.rb +2 -2
  5. data/lib/bundles/inspec-supermarket/target.rb +1 -1
  6. data/lib/inspec/archive/tar.rb +1 -1
  7. data/lib/inspec/archive/zip.rb +3 -3
  8. data/lib/inspec/base_cli.rb +1 -1
  9. data/lib/inspec/cached_fetcher.rb +1 -1
  10. data/lib/inspec/cli.rb +1 -1
  11. data/lib/inspec/config.rb +5 -5
  12. data/lib/inspec/dependencies/cache.rb +1 -1
  13. data/lib/inspec/env_printer.rb +2 -2
  14. data/lib/inspec/fetcher/git.rb +3 -3
  15. data/lib/inspec/fetcher/local.rb +1 -1
  16. data/lib/inspec/fetcher/url.rb +4 -4
  17. data/lib/inspec/file_provider.rb +4 -4
  18. data/lib/inspec/input.rb +3 -0
  19. data/lib/inspec/input_registry.rb +5 -3
  20. data/lib/inspec/metadata.rb +1 -1
  21. data/lib/inspec/plugin/v1/plugins.rb +2 -2
  22. data/lib/inspec/plugin/v2.rb +5 -0
  23. data/lib/inspec/plugin/v2/config_file.rb +1 -1
  24. data/lib/inspec/plugin/v2/filter.rb +2 -2
  25. data/lib/inspec/plugin/v2/installer.rb +5 -5
  26. data/lib/inspec/plugin/v2/loader.rb +1 -1
  27. data/lib/inspec/plugin/v2/registry.rb +2 -2
  28. data/lib/inspec/profile.rb +3 -3
  29. data/lib/inspec/profile_context.rb +1 -1
  30. data/lib/inspec/reporters/automate.rb +2 -2
  31. data/lib/inspec/reporters/json.rb +1 -1
  32. data/lib/inspec/reporters/json_automate.rb +1 -1
  33. data/lib/inspec/resources.rb +5 -5
  34. data/lib/inspec/resources/apt.rb +1 -1
  35. data/lib/inspec/resources/auditd.rb +1 -1
  36. data/lib/inspec/resources/csv.rb +1 -1
  37. data/lib/inspec/resources/dh_params.rb +1 -1
  38. data/lib/inspec/resources/file.rb +1 -1
  39. data/lib/inspec/resources/http.rb +1 -1
  40. data/lib/inspec/resources/iis_website.rb +1 -1
  41. data/lib/inspec/resources/interfaces.rb +1 -1
  42. data/lib/inspec/resources/json.rb +2 -2
  43. data/lib/inspec/resources/key_rsa.rb +1 -1
  44. data/lib/inspec/resources/mssql_session.rb +5 -1
  45. data/lib/inspec/resources/mysql_session.rb +1 -1
  46. data/lib/inspec/resources/nginx.rb +1 -1
  47. data/lib/inspec/resources/nginx_conf.rb +1 -1
  48. data/lib/inspec/resources/npm.rb +1 -1
  49. data/lib/inspec/resources/oracledb_session.rb +1 -1
  50. data/lib/inspec/resources/parse_config.rb +5 -2
  51. data/lib/inspec/resources/port.rb +1 -1
  52. data/lib/inspec/resources/postgres_session.rb +1 -1
  53. data/lib/inspec/resources/ppa.rb +1 -1
  54. data/lib/inspec/resources/processes.rb +1 -1
  55. data/lib/inspec/resources/rabbitmq_conf.rb +1 -1
  56. data/lib/inspec/resources/registry_key.rb +1 -1
  57. data/lib/inspec/resources/sshd_config.rb +1 -1
  58. data/lib/inspec/resources/ssl.rb +2 -2
  59. data/lib/inspec/resources/toml.rb +1 -1
  60. data/lib/inspec/resources/vbscript.rb +1 -1
  61. data/lib/inspec/resources/windows_registry_key.rb +1 -1
  62. data/lib/inspec/resources/wmi.rb +1 -1
  63. data/lib/inspec/resources/x509_certificate.rb +1 -1
  64. data/lib/inspec/resources/xml.rb +1 -1
  65. data/lib/inspec/runner.rb +2 -2
  66. data/lib/inspec/schema.rb +1 -1
  67. data/lib/inspec/schema/output_schema.rb +1 -1
  68. data/lib/inspec/schema/primitives.rb +1 -1
  69. data/lib/inspec/shell_detector.rb +2 -2
  70. data/lib/inspec/utils/command_wrapper.rb +1 -1
  71. data/lib/inspec/utils/deprecation/config_file.rb +2 -2
  72. data/lib/inspec/utils/json_log.rb +1 -1
  73. data/lib/inspec/utils/telemetry/collector.rb +1 -1
  74. data/lib/inspec/utils/telemetry/data_series.rb +1 -1
  75. data/lib/inspec/version.rb +1 -1
  76. data/lib/plugins/inspec-artifact/lib/inspec-artifact/base.rb +5 -5
  77. data/lib/plugins/inspec-compliance/README.md +1 -1
  78. data/lib/plugins/inspec-compliance/lib/inspec-compliance/api.rb +3 -3
  79. data/lib/plugins/inspec-compliance/lib/inspec-compliance/http.rb +2 -2
  80. data/lib/plugins/inspec-compliance/lib/inspec-compliance/target.rb +2 -2
  81. data/lib/plugins/inspec-habitat/lib/inspec-habitat/profile.rb +3 -3
  82. data/lib/plugins/inspec-init/lib/inspec-init/cli.rb +1 -1
  83. data/lib/plugins/inspec-init/lib/inspec-init/cli_profile.rb +1 -1
  84. data/lib/plugins/inspec-init/lib/inspec-init/renderer.rb +2 -2
  85. data/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb +3 -3
  86. data/lib/plugins/inspec-reporter-html2/lib/inspec-reporter-html2/reporter.rb +1 -1
  87. data/lib/plugins/inspec-reporter-json-min/lib/inspec-reporter-json-min/reporter.rb +1 -1
  88. data/lib/plugins/inspec-reporter-junit/lib/inspec-reporter-junit/reporter.rb +1 -1
  89. data/lib/plugins/shared/core_plugin_test_helper.rb +6 -6
  90. metadata +40 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40b226d810bf523c7b914a00d3e3e0556d23eb78b944f12fe7af7fac35a279f4
4
- data.tar.gz: ff6cafe82a9e7234814575a3723098ccb1238fb88754cb4891288547e9c3a47b
3
+ metadata.gz: bfed5976ebd618d37b1fbf0058fbd9389b243dbd5070444fda7558cf309392c3
4
+ data.tar.gz: 3b894051f2f56e249af59acf0de10c50d8a826d3af1755eaf60100a7a4934dab
5
5
  SHA512:
6
- metadata.gz: c663121d4e9dba5764ba321d391b4779f3b9236b827fc7dca58aa2a6a3b9d76a5749205635c38ca6a28f614364f19fef1c7c790321067fef2ae1e1eb9a1dbd74
7
- data.tar.gz: da255c1b0637e48aa1f83ea42607829767450bd03fd5f970e527afa81898ba215b7ac4ec66c508d23ef2de74ebb9e3dc26893427c76ab4176e67ffaf5df42c54
6
+ metadata.gz: c1d9b3598a4bc81085d95b5a4b254ac57001aa301e4371394b8b8b307b54ed26644784ccf9dafd2e52d4e2553e5c1ff77ae821691ef738e542f13d892f692f81
7
+ data.tar.gz: 54f9be8adc1870127be3e825e809499270717d395fa26d11408f186a66fdb61ca7db0ac78fd73143652893bd482acf2d1009c3343609e8b34bcd3ff3eb0aaa0c
data/Gemfile CHANGED
@@ -24,7 +24,7 @@ group :omnibus do
24
24
  end
25
25
 
26
26
  group :test do
27
- gem "chefstyle", "~> 1.2.1"
27
+ gem "chefstyle", "~> 1.5.7"
28
28
  gem "concurrent-ruby", "~> 1.0"
29
29
  gem "html-proofer", platforms: :ruby # do not attempt to run proofer on windows
30
30
  gem "json_schemer", ">= 0.2.1", "< 0.2.12"
@@ -37,19 +37,10 @@ group :test do
37
37
  gem "pry", "~> 0.10"
38
38
  gem "rake", ">= 10"
39
39
  gem "ruby-progressbar", "~> 1.8"
40
- gem "simplecov", ["~> 0.10", "<=0.18.2"]
40
+ gem "simplecov", "~> 0.18"
41
41
  gem "webmock", "~> 3.0"
42
42
  end
43
43
 
44
- group :integration do
45
- gem "berkshelf"
46
- gem "test-kitchen", ">= 2.8"
47
- gem "kitchen-vagrant", ">= 1.7"
48
- gem "kitchen-inspec", ">= 2.0"
49
- gem "kitchen-dokken", ">= 2.11"
50
- gem "git"
51
- end
52
-
53
44
  group :deploy do
54
45
  gem "inquirer"
55
- end
46
+ end
@@ -1,4 +1,4 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require "inspec/version"
4
4
 
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.license = "Apache-2.0"
14
14
  spec.require_paths = ["lib"]
15
15
 
16
- spec.required_ruby_version = "~> 2.4"
16
+ spec.required_ruby_version = ">= 2.5"
17
17
 
18
18
  # the gemfile and gemspec are necessary for appbundler so don't remove it
19
19
  spec.files =
@@ -27,20 +27,20 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "license-acceptance", ">= 0.2.13", "< 3.0"
28
28
  spec.add_dependency "thor", ">= 0.20", "< 2.0"
29
29
  spec.add_dependency "method_source", ">= 0.8", "< 2.0"
30
- spec.add_dependency "rubyzip", "~> 1.2", ">= 1.2.2"
31
- spec.add_dependency "rspec", "~> 3.9.0"
30
+ spec.add_dependency "rubyzip", ">= 1.2.2", "< 3.0"
31
+ spec.add_dependency "rspec", "~> 3.10"
32
32
  spec.add_dependency "rspec-its", "~> 1.2"
33
33
  spec.add_dependency "pry", "~> 0.13"
34
- spec.add_dependency "hashie", "~> 3.4"
34
+ spec.add_dependency "hashie", ">= 3.4", "< 5.0"
35
35
  spec.add_dependency "mixlib-log", "~> 3.0"
36
36
  spec.add_dependency "sslshake", "~> 1.2"
37
37
  spec.add_dependency "parallel", "~> 1.9"
38
- spec.add_dependency "faraday", ">= 0.9.0", "< 1.1"
38
+ spec.add_dependency "faraday", ">= 0.9.0", "< 1.2"
39
39
  spec.add_dependency "tty-table", "~> 0.10"
40
40
  spec.add_dependency "tty-prompt", "~> 0.17"
41
- spec.add_dependency "tomlrb", "~> 1.2.0"
41
+ spec.add_dependency "tomlrb", ">= 1.2", "< 2.1"
42
42
  spec.add_dependency "addressable", "~> 2.4"
43
- spec.add_dependency "parslet", "~> 1.5"
43
+ spec.add_dependency "parslet", ">= 1.5", "< 3.0"
44
44
  spec.add_dependency "semverse", "~> 3.0"
45
45
  spec.add_dependency "multipart-post", "~> 2.0"
46
46
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "net/http"
4
- require "addressable/uri"
3
+ require "net/http" unless defined?(Net::HTTP)
4
+ require "addressable/uri" unless defined?(Addressable::URI)
5
5
 
6
6
  module Supermarket
7
7
  class API
@@ -1,4 +1,4 @@
1
- require "uri"
1
+ require "uri" unless defined?(URI)
2
2
  require "inspec/fetcher"
3
3
  require "inspec/fetcher/url"
4
4
 
@@ -1,4 +1,4 @@
1
- require "rubygems/package"
1
+ require "rubygems/package" unless defined?(Gem::Package)
2
2
 
3
3
  module Inspec::Archive
4
4
  class TarArchiveGenerator
@@ -1,6 +1,6 @@
1
- require "rubygems"
2
- require "zip"
3
- require "pathname"
1
+ require "rubygems" unless defined?(Gem)
2
+ require "zip" unless defined?(Zip)
3
+ require "pathname" unless defined?(Pathname)
4
4
 
5
5
  module Inspec::Archive
6
6
  class ZipArchiveGenerator
@@ -1,4 +1,4 @@
1
- require "thor"
1
+ require "thor" unless defined?(Thor)
2
2
  require "inspec/log"
3
3
  require "inspec/ui"
4
4
  require "inspec/config"
@@ -1,5 +1,5 @@
1
1
  require "inspec/fetcher"
2
- require "forwardable"
2
+ require "forwardable" unless defined?(Forwardable)
3
3
 
4
4
  module Inspec
5
5
  class CachedFetcher
@@ -67,7 +67,7 @@ class Inspec::InspecCLI < Inspec::BaseCLI
67
67
  desc: "A list of controls to include. Ignore all other tests."
68
68
  profile_options
69
69
  def json(target)
70
- require "json"
70
+ require "json" unless defined?(JSON)
71
71
 
72
72
  o = config
73
73
  diagnose(o)
@@ -1,11 +1,11 @@
1
1
  # Represents InSpec configuration. Merges defaults, config file options,
2
2
  # and CLI arguments.
3
3
 
4
- require "pp"
5
- require "stringio"
6
- require "forwardable"
7
- require "thor"
8
- require "base64"
4
+ require "pp" unless defined?(PP)
5
+ require "stringio" unless defined?(StringIO)
6
+ require "forwardable" unless defined?(Forwardable)
7
+ require "thor" unless defined?(Thor)
8
+ require "base64" unless defined?(Base64)
9
9
  require "inspec/plugin/v2/filter"
10
10
 
11
11
  module Inspec
@@ -1,4 +1,4 @@
1
- require "fileutils"
1
+ require "fileutils" unless defined?(FileUtils)
2
2
 
3
3
  module Inspec
4
4
  #
@@ -1,6 +1,6 @@
1
1
  require "inspec/shell_detector"
2
- require "erb"
3
- require "shellwords"
2
+ require "erb" unless defined?(Erb)
3
+ require "shellwords" unless defined?(Shellwords)
4
4
 
5
5
  module Inspec
6
6
  class EnvPrinter
@@ -1,6 +1,6 @@
1
- require "tmpdir"
2
- require "fileutils"
3
- require "mixlib/shellout"
1
+ require "tmpdir" unless defined?(Dir.mktmpdir)
2
+ require "fileutils" unless defined?(FileUtils)
3
+ require "mixlib/shellout" unless defined?(Mixlib::ShellOut)
4
4
  require "inspec/log"
5
5
 
6
6
  module Inspec::Fetcher
@@ -1,4 +1,4 @@
1
- require "openssl"
1
+ require "openssl" unless defined?(OpenSSL)
2
2
 
3
3
  module Inspec::Fetcher
4
4
  class Local < Inspec.fetcher(1)
@@ -1,7 +1,7 @@
1
- require "uri"
2
- require "openssl"
3
- require "tempfile"
4
- require "open-uri"
1
+ require "uri" unless defined?(URI)
2
+ require "openssl" unless defined?(OpenSSL)
3
+ require "tempfile" unless defined?(Tempfile)
4
+ require "open-uri" unless defined?(OpenURI)
5
5
 
6
6
  module Inspec::Fetcher
7
7
  class Url < Inspec.fetcher(1)
@@ -1,7 +1,7 @@
1
- require "rubygems/package"
2
- require "pathname"
3
- require "zlib"
4
- require "zip"
1
+ require "rubygems/package" unless defined?(Gem::Package)
2
+ require "pathname" unless defined?(Pathname)
3
+ require "zlib" unless defined?(Zlib)
4
+ require "zip" unless defined?(Zip)
5
5
 
6
6
  module Inspec
7
7
  class FileProvider
@@ -14,14 +14,17 @@ module Inspec
14
14
  class Input
15
15
 
16
16
  class Error < Inspec::Error; end
17
+
17
18
  class ValidationError < Error
18
19
  attr_accessor :input_name
19
20
  attr_accessor :input_value
20
21
  attr_accessor :input_type
21
22
  end
23
+
22
24
  class TypeError < Error
23
25
  attr_accessor :input_type
24
26
  end
27
+
25
28
  class RequiredError < Error
26
29
  attr_accessor :input_name
27
30
  end
@@ -1,5 +1,5 @@
1
- require "forwardable"
2
- require "singleton"
1
+ require "forwardable" unless defined?(Forwardable)
2
+ require "singleton" unless defined?(Singleton)
3
3
  require "inspec/input"
4
4
  require "inspec/secrets"
5
5
  require "inspec/exceptions"
@@ -14,9 +14,11 @@ module Inspec
14
14
  extend Forwardable
15
15
 
16
16
  class Error < Inspec::Error; end
17
+
17
18
  class ProfileLookupError < Error
18
19
  attr_accessor :profile_name
19
20
  end
21
+
20
22
  class InputLookupError < Error
21
23
  attr_accessor :profile_name
22
24
  attr_accessor :input_name
@@ -199,7 +201,7 @@ module Inspec
199
201
  value = YAML.load(value)
200
202
  rescue Psych::SyntaxError => yaml_error
201
203
  # It could be that we just tried to run JSON through the YAML parser.
202
- require "json"
204
+ require "json" unless defined?(JSON)
203
205
  begin
204
206
  value = JSON.parse(value)
205
207
  rescue JSON::ParserError => json_error
@@ -216,7 +216,7 @@ module Inspec
216
216
  end
217
217
 
218
218
  def self.from_yaml(ref, content, profile_id, logger = nil)
219
- require "erb"
219
+ require "erb" unless defined?(Erb)
220
220
  res = Metadata.new(ref, logger)
221
221
  res.params = YAML.load(ERB.new(content).result)
222
222
  res.content = content
@@ -1,4 +1,4 @@
1
- require "forwardable"
1
+ require "forwardable" unless defined?(Forwardable)
2
2
 
3
3
  module Inspec
4
4
  # Resource Plugins
@@ -36,7 +36,7 @@ module Inspec
36
36
  .flatten
37
37
 
38
38
  # load bundled plugins
39
- bundled_dir = File.expand_path(File.dirname(__FILE__))
39
+ bundled_dir = __dir__
40
40
  @paths += Dir[File.join(bundled_dir, "..", "bundles", "inspec-*.rb")].flatten
41
41
 
42
42
  # map paths to names
@@ -6,17 +6,22 @@ module Inspec
6
6
  class Exception < Inspec::Error; end
7
7
  class ConfigError < Inspec::Plugin::V2::Exception; end
8
8
  class LoadError < Inspec::Plugin::V2::Exception; end
9
+
9
10
  class GemActionError < Inspec::Plugin::V2::Exception
10
11
  attr_accessor :plugin_name
11
12
  attr_accessor :version
12
13
  end
14
+
13
15
  class InstallError < Inspec::Plugin::V2::GemActionError; end
16
+
14
17
  class PluginExcludedError < Inspec::Plugin::V2::InstallError
15
18
  attr_accessor :details
16
19
  end
20
+
17
21
  class UpdateError < Inspec::Plugin::V2::GemActionError
18
22
  attr_accessor :from_version, :to_version
19
23
  end
24
+
20
25
  class UnInstallError < Inspec::Plugin::V2::GemActionError; end
21
26
  class SearchError < Inspec::Plugin::V2::GemActionError; end
22
27
  end
@@ -1,4 +1,4 @@
1
- require "json"
1
+ require "json" unless defined?(JSON)
2
2
 
3
3
  module Inspec::Plugin::V2
4
4
  # Represents the plugin config file on disk.
@@ -1,5 +1,5 @@
1
- require "singleton"
2
- require "json"
1
+ require "singleton" unless defined?(Singleton)
2
+ require "json" unless defined?(JSON)
3
3
  require "inspec/globals"
4
4
 
5
5
  module Inspec::Plugin; end
@@ -1,12 +1,12 @@
1
1
  # This file is not required by default.
2
2
 
3
- require "singleton"
4
- require "forwardable"
5
- require "fileutils"
6
- require "uri"
3
+ require "singleton" unless defined?(Singleton)
4
+ require "forwardable" unless defined?(Forwardable)
5
+ require "fileutils" unless defined?(FileUtils)
6
+ require "uri" unless defined?(URI)
7
7
 
8
8
  # Gem extensions for doing unusual things - not loaded by Gem default
9
- require "rubygems/package"
9
+ require "rubygems/package" unless defined?(Gem::Package)
10
10
  require "rubygems/name_tuple"
11
11
  require "rubygems/uninstaller"
12
12
  require "rubygems/remote_fetcher"
@@ -130,7 +130,7 @@ module Inspec::Plugin::V2
130
130
  end
131
131
 
132
132
  def self.plugin_gem_path
133
- require "rbconfig"
133
+ require "rbconfig" unless defined?(RbConfig)
134
134
  ruby_abi_version = RbConfig::CONFIG["ruby_version"]
135
135
  # TODO: why are we installing under the api directory for plugins?
136
136
  base_dir = Inspec.config_dir
@@ -1,5 +1,5 @@
1
- require "forwardable"
2
- require "singleton"
1
+ require "forwardable" unless defined?(Forwardable)
2
+ require "singleton" unless defined?(Singleton)
3
3
  require "train"
4
4
 
5
5
  require_relative "status"
@@ -1,8 +1,8 @@
1
1
  # Copyright 2015 Dominik Richter
2
2
 
3
- require "forwardable"
4
- require "openssl"
5
- require "pathname"
3
+ require "forwardable" unless defined?(Forwardable)
4
+ require "openssl" unless defined?(OpenSSL)
5
+ require "pathname" unless defined?(Pathname)
6
6
  require "inspec/input_registry"
7
7
  require "inspec/cached_fetcher" # TODO: split or rename
8
8
  require "inspec/source_reader"
@@ -4,7 +4,7 @@ require "inspec/resource"
4
4
  require "inspec/library_eval_context"
5
5
  require "inspec/control_eval_context"
6
6
  require "inspec/require_loader"
7
- require "securerandom"
7
+ require "securerandom" unless defined?(SecureRandom)
8
8
  require "inspec/input_registry"
9
9
 
10
10
  module Inspec
@@ -1,5 +1,5 @@
1
- require "json"
2
- require "net/http"
1
+ require "json" unless defined?(JSON)
2
+ require "net/http" unless defined?(Net::HTTP)
3
3
 
4
4
  module Inspec::Reporters
5
5
  class Automate < JsonAutomate
@@ -1,4 +1,4 @@
1
- require "json"
1
+ require "json" unless defined?(JSON)
2
2
 
3
3
  module Inspec::Reporters
4
4
  # rubocop:disable Layout/AlignHash, Style/BlockDelimiters
@@ -1,4 +1,4 @@
1
- require "json"
1
+ require "json" unless defined?(JSON)
2
2
 
3
3
  module Inspec::Reporters
4
4
  class JsonAutomate < Json
@@ -16,11 +16,11 @@ inspec_core_only = ENV["NO_AWS"] || !File.exist?(File.join(File.dirname(__FILE__
16
16
  # Do not attempt to load cloud resources if we are in inspec-core mode
17
17
  unless inspec_core_only
18
18
  require "resource_support/aws"
19
- require "resources/azure/azure_backend.rb"
20
- require "resources/azure/azure_generic_resource.rb"
21
- require "resources/azure/azure_resource_group.rb"
22
- require "resources/azure/azure_virtual_machine.rb"
23
- require "resources/azure/azure_virtual_machine_data_disk.rb"
19
+ require "resources/azure/azure_backend"
20
+ require "resources/azure/azure_generic_resource"
21
+ require "resources/azure/azure_resource_group"
22
+ require "resources/azure/azure_virtual_machine"
23
+ require "resources/azure/azure_virtual_machine_data_disk"
24
24
  end
25
25
 
26
26
  require "inspec/resources/aide_conf"
@@ -24,7 +24,7 @@ require "inspec/resources/command"
24
24
  # apt-get install software-properties-common
25
25
  # add-apt-repository ppa:ubuntu-wine/ppa
26
26
 
27
- require "uri"
27
+ require "uri" unless defined?(URI)
28
28
 
29
29
  module Inspec::Resources
30
30
  class AptRepository < Inspec.resource(1)