Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #165 from linc01n/fix-rubocop-octal
Browse files Browse the repository at this point in the history
Fix rubocop offenses
  • Loading branch information
linc01n authored Jul 1, 2016
2 parents 8e59bf1 + c93ad79 commit 92e946f
Show file tree
Hide file tree
Showing 38 changed files with 40 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ LineLength:
Enabled: false
MethodLength:
Max: 30
Style/NumericLiteralPrefix:
Enabled: false
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ bundler_args: --without integration
cache: bundler
sudo: false
rvm:
- 2.3.0
- 2.3.1
before_script:
- bundle exec berks install
script:
Expand Down
1 change: 1 addition & 0 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
source 'https://supermarket.chef.io'

metadata
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
source 'https://rubygems.org'

gem 'rake'
Expand All @@ -9,7 +10,7 @@ end
group :test do
gem 'chefspec', '~> 4.0'
gem 'foodcritic', '~> 4.0'
gem 'rubocop', '~> 0.23'
gem 'rubocop', '~> 0.41'
end

group :integration do
Expand Down
1 change: 1 addition & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# A sample Guardfile
# More info at https://github.com/guard/guard#readme

Expand Down
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env rake
# frozen_string_literal: true

# Style tests. Rubocop and Foodcritic
namespace :style do
Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
set['build-essential']['compile_time'] = true

default['stash']['version'] = '4.6.2'
Expand Down
1 change: 1 addition & 0 deletions libraries/helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# Cookbook module
module Stash
# Helper module
Expand Down
1 change: 1 addition & 0 deletions libraries/stash.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Stash
# Stash::Library module
module Library
Expand Down
1 change: 1 addition & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
name 'stash'
maintainer 'Brian Flad'
maintainer_email '[email protected]'
Expand Down
1 change: 1 addition & 0 deletions providers/deploy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
action :deploy do
g = git new_resource.destination do
repository "ssh://git@#{node['stash']['ssh']['hostname']}:#{node['stash']['ssh']['port']}/#{new_resource.project}/#{new_resource.repository}.git"
Expand Down
1 change: 1 addition & 0 deletions providers/deploy_key.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
action :create do
key_path = "#{node['stash']['install_path']}/#{new_resource.alias}_ssh_key.pem"
wrapper_path = "#{node['stash']['install_path']}/#{new_resource.alias}_ssh_wrapper.sh"
Expand Down
1 change: 1 addition & 0 deletions providers/hook.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
include Stash::Helper

def whyrun_supported?
Expand Down
1 change: 1 addition & 0 deletions providers/repo.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
include Stash::Helper

def whyrun_supported?
Expand Down
1 change: 1 addition & 0 deletions recipes/apache2.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
begin
node.set['apache']['listen_ports'] = node['apache']['listen_ports'] + [node['stash']['apache2']['port']] unless node['apache']['listen_ports'].include?(node['stash']['apache2']['port'])
node.set['apache']['listen_ports'] = node['apache']['listen_ports'] + [node['stash']['apache2']['ssl']['port']] unless node['apache']['listen_ports'].include?(node['stash']['apache2']['ssl']['port'])
Expand Down
1 change: 1 addition & 0 deletions recipes/backup_client.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
handle_old_stash_attributes!

settings = merge_stash_settings
Expand Down
1 change: 1 addition & 0 deletions recipes/backup_client_cron.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
handle_old_stash_attributes!

Chef::Log.warn <<-EOH
Expand Down
1 change: 1 addition & 0 deletions recipes/backup_diy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
handle_old_stash_attributes!

settings = merge_stash_settings
Expand Down
1 change: 1 addition & 0 deletions recipes/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
settings = merge_stash_settings
stash_version = Chef::Version.new(node['stash']['version'])

Expand Down
1 change: 1 addition & 0 deletions recipes/database.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
settings = merge_stash_settings

database_connection = {
Expand Down
1 change: 1 addition & 0 deletions recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
platform = 'windows' if node['platform_family'] == 'windows'
platform ||= 'linux'
settings = merge_stash_settings
Expand Down
1 change: 1 addition & 0 deletions recipes/linux_standalone.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
settings = merge_stash_settings

directory File.dirname(node['stash']['home_path']) do
Expand Down
1 change: 1 addition & 0 deletions recipes/service_init.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
template "/etc/init.d/#{node['stash']['product']}" do
if node['stash']['product'] == 'stash'
source 'stash.init.erb'
Expand Down
1 change: 1 addition & 0 deletions recipes/tomcat_configuration.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
stash_version = Chef::Version.new(node['stash']['version'])
server_xml_path = "#{node['stash']['install_path']}/stash/conf/server.xml"

Expand Down
1 change: 1 addition & 0 deletions resources/deploy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
actions :deploy

attribute :destination, :kind_of => String, :name_attribute => true
Expand Down
1 change: 1 addition & 0 deletions resources/deploy_key.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
actions :create

attribute :alias, :kind_of => String, :name_attribute => true
Expand Down
1 change: 1 addition & 0 deletions resources/hook.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
actions :enable, :configure, :disable
default_action :configure

Expand Down
1 change: 1 addition & 0 deletions resources/repo.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
actions :create, :delete
default_action :create

Expand Down
1 change: 1 addition & 0 deletions spec/apache2_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'

describe 'stash::apache2' do
Expand Down
1 change: 1 addition & 0 deletions spec/backup_client_cron_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'

describe 'stash::backup_client_cron' do
Expand Down
1 change: 1 addition & 0 deletions spec/backup_client_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'

describe 'stash::backup_client' do
Expand Down
1 change: 1 addition & 0 deletions spec/configuration_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'

describe 'stash::configuration' do
Expand Down
1 change: 1 addition & 0 deletions spec/database_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'

describe 'stash::database' do
Expand Down
1 change: 1 addition & 0 deletions spec/default_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'

describe 'stash::default' do
Expand Down
1 change: 1 addition & 0 deletions spec/linux_standalone_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'

describe 'stash::linux_standalone' do
Expand Down
1 change: 1 addition & 0 deletions spec/service_init_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'

describe 'stash::service_init' do
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'chefspec'
require 'chefspec/berkshelf'

Expand Down
1 change: 1 addition & 0 deletions spec/tomcat_configuration_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'

describe 'stash::tomcat_configuration' do
Expand Down

0 comments on commit 92e946f

Please sign in to comment.