Skip to content

Commit

Permalink
Resolve new RuboCop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
hartmantis committed Feb 9, 2016
1 parent dc34121 commit 2d2fe18
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion libraries/helpers.rb
Expand Up @@ -73,7 +73,7 @@ def vlc_site_body
# @return [TrueClass, FalseClass] whether the string is valid
#
def self.valid_version?(arg)
arg.match(/^[0-9]+\.[0-9]+\.[0-9]+$/) ? true : false
arg =~ /^[0-9]+\.[0-9]+\.[0-9]+$/ ? true : false
end
end
end
6 changes: 4 additions & 2 deletions libraries/resource_vlc_app.rb
Expand Up @@ -38,8 +38,10 @@ class VlcApp < Resource

%i(install remove).each do |a|
action a do
fail(NotImplementedError,
"Action `#{a}` must be implemented for `#{self.class}` resource")
raise(
NotImplementedError,
"Action `#{a}` must be implemented for `#{self.class}` resource"
)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion libraries/resource_vlc_app_mac_os_x.rb
Expand Up @@ -29,7 +29,7 @@ class Resource
class VlcAppMacOsX < VlcApp
include Vlc::Helpers

PATH ||= '/Applications/VLC.app'
PATH ||= '/Applications/VLC.app'.freeze

provides :vlc_app, platform_family: 'mac_os_x'

Expand Down
4 changes: 1 addition & 3 deletions metadata.rb
@@ -1,6 +1,5 @@
# Encoding: UTF-8
#
# rubocop:disable SingleSpaceBeforeFirstArg

name 'vlc'
maintainer 'Jonathan Hartman'
maintainer_email 'j@p4nt5.com'
Expand All @@ -24,4 +23,3 @@
supports 'centos'
supports 'scientific'
supports 'freebsd'
# rubocop:enable SingleSpaceBeforeFirstArg
4 changes: 1 addition & 3 deletions spec/support/cookbooks/vlc_app_test/metadata.rb
@@ -1,6 +1,5 @@
# Encoding: UTF-8
#
# rubocop:disable SingleSpaceBeforeFirstArg

name 'vlc_app_test'
maintainer 'Jonathan Hartman'
maintainer_email 'j@p4nt5.com'
Expand All @@ -19,4 +18,3 @@
supports 'centos'
supports 'scientific'
supports 'freebsd'
# rubocop:enable SingleSpaceBeforeFirstArg
4 changes: 1 addition & 3 deletions test/fixtures/cookbooks/vlc_test/metadata.rb
@@ -1,6 +1,5 @@
# Encoding: UTF-8
#
# rubocop:disable SingleSpaceBeforeFirstArg

name 'vlc_test'
maintainer 'Jonathan Hartman'
maintainer_email 'j@p4nt5.com'
Expand All @@ -19,4 +18,3 @@
supports 'centos'
supports 'scientific'
supports 'freebsd'
# rubocop:enable SingleSpaceBeforeFirstArg
2 changes: 1 addition & 1 deletion test/integration/default/serverspec/spec_helper.rb
Expand Up @@ -2,7 +2,7 @@

require 'serverspec'

if RUBY_PLATFORM.match(/mswin|mingw32|windows/)
if RUBY_PLATFORM =~ /mswin|mingw32|windows/
set :os, family: 'windows'
set :backend, :cmd
else
Expand Down
2 changes: 1 addition & 1 deletion test/integration/uninstall/serverspec/spec_helper.rb
Expand Up @@ -2,7 +2,7 @@

require 'serverspec'

if RUBY_PLATFORM.match(/mswin|mingw32|windows/)
if RUBY_PLATFORM =~ /mswin|mingw32|windows/
set :os, family: 'windows'
set :backend, :cmd
else
Expand Down

0 comments on commit 2d2fe18

Please sign in to comment.