lib/inspec/profile.rb in inspec-1.13.0 vs lib/inspec/profile.rb in inspec-1.14.0
- old
+ new
@@ -55,11 +55,11 @@
# copy embedded dependecies into global cache
copy_deps_into_cache(rp, opts) unless opts[:cache].nil?
reader = Inspec::SourceReader.resolve(rp)
if reader.nil?
- fail("Don't understand inspec profile in #{path}, it " \
+ raise("Don't understand inspec profile in #{path}, it " \
"doesn't look like a supported profile structure.")
end
new(reader, opts)
end
@@ -106,11 +106,11 @@
def version
metadata.params[:version]
end
- def writable? # rubocop:disable Style/TrivialAccessors
+ def writable?
@writable
end
#
# Is this profile is supported on the current platform of the
@@ -395,13 +395,13 @@
if (name = opts[:output])
return Pathname.new(name)
end
name = params[:name] ||
- fail('Cannot create an archive without a profile name! Please '\
+ raise('Cannot create an archive without a profile name! Please '\
'specify the name in metadata or use --output to create the archive.')
version = params[:version] ||
- fail('Cannot create an archive without a profile version! Please '\
+ raise('Cannot create an archive without a profile version! Please '\
'specify the version in metadata or use --output to create the archive.')
ext = opts[:zip] ? 'zip' : 'tar.gz'
slug = name.downcase.strip.tr(' ', '-').gsub(/[^\w-]/, '_')
Pathname.new(Dir.pwd).join("#{slug}-#{version}.#{ext}")
end