Skip to content

Commit

Permalink
Merge pull request #5 from socrata-cookbooks/jdh-resolve-rubocop-offe…
Browse files Browse the repository at this point in the history
…nses

Resolve new RuboCop offenses
  • Loading branch information
hartmantis committed Feb 20, 2016
2 parents ea74518 + 6a2c8a5 commit dbd3dba
Show file tree
Hide file tree
Showing 24 changed files with 38 additions and 49 deletions.
9 changes: 4 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ group :test do
gem 'rake'
gem 'rubocop'
gem 'foodcritic'
gem 'rspec', '>= 3'
gem 'chefspec', '>= 4'
gem 'rspec'
gem 'chefspec'
gem 'simplecov'
gem 'simplecov-console'
gem 'coveralls'
Expand All @@ -28,8 +28,7 @@ group :test do
end

group :integration do
gem 'serverspec', '>= 2'
gem 'cucumber'
gem 'serverspec'
end

group :deploy do
Expand All @@ -38,5 +37,5 @@ end

group :production do
gem 'chef', '>= 11'
gem 'berkshelf', '>= 3'
gem 'berkshelf'
end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ License & Authors
=================
- Author: Jonathan Hartman <jonathan.hartman@socrata.com>

Copyright 2015 Socrata, Inc.
Copyright 2015-2016, Socrata, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Attributes:: default
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Library:: matchers
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_x2go_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Library:: provider_x2go_client
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
14 changes: 9 additions & 5 deletions libraries/provider_x2go_client_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Library:: provider_x2go_client_app
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -65,8 +65,10 @@ def whyrun_supported?
# @raise [NotImplementedError] if not defined for this provider
#
def install!
fail(NotImplementedError,
"`install!` method must be implemented for #{self.class} provider")
raise(
NotImplementedError,
"`install!` method must be implemented for #{self.class} provider"
)
end

#
Expand All @@ -75,8 +77,10 @@ def install!
# @raise [NotImplementedError] if not defined for this provider
#
def remove!
fail(NotImplementedError,
"`remove!` method must be implemented for #{self.class} provider")
raise(
NotImplementedError,
"`remove!` method must be implemented for #{self.class} provider"
)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_x2go_client_app_debian.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Library:: provider_x2go_client_app_debian
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_x2go_client_app_fedora.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Library:: provider_x2go_client_app_fedora
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions libraries/provider_x2go_client_app_mac_os_x.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Library:: provider_x2go_client_app_mac_os_x
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -29,7 +29,7 @@ class X2goClientApp < LWRPBase
#
# @author Jonathan Hartman <jonathan.hartman@socrata.com>
class MacOsX < X2goClientApp
PATH ||= '/Applications/x2goclient.app'
PATH ||= '/Applications/x2goclient.app'.freeze

include Chef::DSL::IncludeRecipe

Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_x2go_client_app_rhel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Library:: provider_x2go_client_app_rhel
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/provider_x2go_client_app_ubuntu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Library:: provider_x2go_client_app_ubuntu
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions libraries/provider_x2go_client_app_windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Library:: provider_x2go_client_app_windows
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -28,9 +28,9 @@ class X2goClientApp < LWRPBase
#
# @author Jonathan Hartman <jonathan.hartman@socrata.com>
class Windows < X2goClientApp
PATH ||= ::File.expand_path('/Program Files (x86)/x2goclient')
PATH ||= ::File.expand_path('/Program Files (x86)/x2goclient').freeze
URL ||= 'http://code.x2go.org/releases/' \
'X2GoClient_latest_mswin32-setup.exe'
'X2GoClient_latest_mswin32-setup.exe'.freeze

provides :x2go_client_app, platform_family: 'windows'

Expand Down
2 changes: 1 addition & 1 deletion libraries/resource_x2go_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Library:: resource_x2go_client
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion libraries/resource_x2go_client_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Library:: resource_x2go_client_app
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 1 addition & 3 deletions metadata.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Encoding: UTF-8
#
# rubocop:disable SingleSpaceBeforeFirstArg

name 'x2go-client'
maintainer 'Jonathan Hartman'
maintainer_email 'jonathan.hartman@socrata.com'
Expand All @@ -23,4 +22,3 @@
supports 'centos'
supports 'scientific'
supports 'fedora'
# rubocop:enable SingleSpaceBeforeFirstArg
2 changes: 1 addition & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: x2go-client
# Recipe:: default
#
# Copyright 2015 Socrata, Inc.
# Copyright 2015-2016, Socrata, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 1 addition & 3 deletions spec/support/cookbooks/apt/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Encoding: UTF-8
#
# rubocop:disable SingleSpaceBeforeFirstArg

name 'apt'
maintainer 'test'
maintainer_email 'example@example.com'
license 'apache2'
description 'apt'
long_description 'apt'
version '0.0.1'
# rubocop:enable SingleSpaceBeforeFirstArg
4 changes: 1 addition & 3 deletions spec/support/cookbooks/dmg/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Encoding: UTF-8
#
# rubocop:disable SingleSpaceBeforeFirstArg

name 'dmg'
maintainer 'test'
maintainer_email 'example@example.com'
license 'apache2'
description 'dmg'
long_description 'dmg'
version '0.0.1'
# rubocop:enable SingleSpaceBeforeFirstArg
4 changes: 1 addition & 3 deletions spec/support/cookbooks/windows/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Encoding: UTF-8
#
# rubocop:disable SingleSpaceBeforeFirstArg

name 'windows'
maintainer 'test'
maintainer_email 'example@example.com'
license 'apache2'
description 'windows'
long_description 'windows'
version '0.0.1'
# rubocop:enable SingleSpaceBeforeFirstArg
4 changes: 1 addition & 3 deletions spec/support/cookbooks/xquartz/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Encoding: UTF-8
#
# rubocop:disable SingleSpaceBeforeFirstArg

name 'xquartz'
maintainer 'test'
maintainer_email 'example@example.com'
license 'apache2'
description 'xquartz'
long_description 'xquartz'
version '0.0.1'
# rubocop:enable SingleSpaceBeforeFirstArg
4 changes: 1 addition & 3 deletions spec/support/cookbooks/yum-epel/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Encoding: UTF-8
#
# rubocop:disable SingleSpaceBeforeFirstArg

name 'yum-epel'
maintainer 'test'
maintainer_email 'example@example.com'
license 'apache2'
description 'yum-epel'
long_description 'yum-epel'
version '0.0.1'
# rubocop:enable SingleSpaceBeforeFirstArg
4 changes: 1 addition & 3 deletions test/fixtures/cookbooks/x2go-client_test/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Encoding: UTF-8
#
# rubocop:disable SingleSpaceBeforeFirstArg

name 'x2go-client_test'
maintainer 'Jonathan Hartman'
maintainer_email 'jonathan.hartman@socrata.com'
Expand All @@ -19,4 +18,3 @@
supports 'centos'
supports 'scientific'
supports 'fedora'
# rubocop:enable SingleSpaceBeforeFirstArg
2 changes: 1 addition & 1 deletion test/integration/default/serverspec/spec_helper.rb
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 dbd3dba

Please sign in to comment.