diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 18:20:06 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 18:20:06 -0700 |
commit | 2da413fe65595e95b16e9e01afa240d5c668a03a (patch) | |
tree | aaa60ecf50befabe0c6a5444c593275e411873d5 /lib/chef/provider | |
parent | 5f45c98f1e2ae9ec7b95760a41d617a7a698cc19 (diff) | |
download | chef-2da413fe65595e95b16e9e01afa240d5c668a03a.tar.gz |
fix Style/MutableConstant
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/apt_update.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/cron.rb | 6 | ||||
-rw-r--r-- | lib/chef/provider/service/openbsd.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/service/windows.rb | 22 | ||||
-rw-r--r-- | lib/chef/provider/user/solaris.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/windows_task.rb | 8 |
6 files changed, 23 insertions, 23 deletions
diff --git a/lib/chef/provider/apt_update.rb b/lib/chef/provider/apt_update.rb index 9d794abcf0..28fc122055 100644 --- a/lib/chef/provider/apt_update.rb +++ b/lib/chef/provider/apt_update.rb @@ -25,8 +25,8 @@ class Chef class AptUpdate < Chef::Provider provides :apt_update, platform_family: "debian" - APT_CONF_DIR = "/etc/apt/apt.conf.d" - STAMP_DIR = "/var/lib/apt/periodic" + APT_CONF_DIR = "/etc/apt/apt.conf.d".freeze + STAMP_DIR = "/var/lib/apt/periodic".freeze def load_current_resource end diff --git a/lib/chef/provider/cron.rb b/lib/chef/provider/cron.rb index 70edd89636..f25a58a789 100644 --- a/lib/chef/provider/cron.rb +++ b/lib/chef/provider/cron.rb @@ -25,9 +25,9 @@ class Chef provides :cron, os: ["!aix", "!solaris2"] - SPECIAL_TIME_VALUES = [:reboot, :yearly, :annually, :monthly, :weekly, :daily, :midnight, :hourly] - CRON_ATTRIBUTES = [:minute, :hour, :day, :month, :weekday, :time, :command, :mailto, :path, :shell, :home, :environment] - WEEKDAY_SYMBOLS = [:sunday, :monday, :tuesday, :wednesday, :thursday, :friday, :saturday] + SPECIAL_TIME_VALUES = [:reboot, :yearly, :annually, :monthly, :weekly, :daily, :midnight, :hourly].freeze + CRON_ATTRIBUTES = [:minute, :hour, :day, :month, :weekday, :time, :command, :mailto, :path, :shell, :home, :environment].freeze + WEEKDAY_SYMBOLS = [:sunday, :monday, :tuesday, :wednesday, :thursday, :friday, :saturday].freeze CRON_PATTERN = /\A([-0-9*,\/]+)\s([-0-9*,\/]+)\s([-0-9*,\/]+)\s([-0-9*,\/]+|[a-zA-Z]{3})\s([-0-9*,\/]+|[a-zA-Z]{3})\s(.*)/ SPECIAL_PATTERN = /\A(@(#{SPECIAL_TIME_VALUES.join('|')}))\s(.*)/ diff --git a/lib/chef/provider/service/openbsd.rb b/lib/chef/provider/service/openbsd.rb index 126a431742..34e05df504 100644 --- a/lib/chef/provider/service/openbsd.rb +++ b/lib/chef/provider/service/openbsd.rb @@ -31,8 +31,8 @@ class Chef attr_reader :init_command, :rc_conf, :rc_conf_local, :enabled_state_found - RC_CONF_PATH = "/etc/rc.conf" - RC_CONF_LOCAL_PATH = "/etc/rc.conf.local" + RC_CONF_PATH = "/etc/rc.conf".freeze + RC_CONF_LOCAL_PATH = "/etc/rc.conf.local".freeze def initialize(new_resource, run_context) super diff --git a/lib/chef/provider/service/windows.rb b/lib/chef/provider/service/windows.rb index 325367322d..59d3fc5a29 100644 --- a/lib/chef/provider/service/windows.rb +++ b/lib/chef/provider/service/windows.rb @@ -34,22 +34,22 @@ class Chef::Provider::Service::Windows < Chef::Provider::Service include Chef::Win32ServiceConstants # Win32::Service.get_start_type - AUTO_START = "auto start" - MANUAL = "demand start" - DISABLED = "disabled" + AUTO_START = "auto start".freeze + MANUAL = "demand start".freeze + DISABLED = "disabled".freeze # Win32::Service.get_current_state - RUNNING = "running" - STOPPED = "stopped" - CONTINUE_PENDING = "continue pending" - PAUSE_PENDING = "pause pending" - PAUSED = "paused" - START_PENDING = "start pending" - STOP_PENDING = "stop pending" + RUNNING = "running".freeze + STOPPED = "stopped".freeze + CONTINUE_PENDING = "continue pending".freeze + PAUSE_PENDING = "pause pending".freeze + PAUSED = "paused".freeze + START_PENDING = "start pending".freeze + STOP_PENDING = "stop pending".freeze TIMEOUT = 60 - SERVICE_RIGHT = "SeServiceLogonRight" + SERVICE_RIGHT = "SeServiceLogonRight".freeze def load_current_resource @current_resource = Chef::Resource::WindowsService.new(new_resource.name) diff --git a/lib/chef/provider/user/solaris.rb b/lib/chef/provider/user/solaris.rb index 38e7f8cb31..2c3222534d 100644 --- a/lib/chef/provider/user/solaris.rb +++ b/lib/chef/provider/user/solaris.rb @@ -27,7 +27,7 @@ class Chef provides :solaris_user provides :user, os: %w{openindiana opensolaris illumos omnios solaris2 smartos} - PASSWORD_FILE = "/etc/shadow" + PASSWORD_FILE = "/etc/shadow".freeze def create_user shell_out!("useradd", universal_options, useradd_options, new_resource.username) diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb index f8df5dc9a8..f10e4adb70 100644 --- a/lib/chef/provider/windows_task.rb +++ b/lib/chef/provider/windows_task.rb @@ -47,7 +47,7 @@ class Chef OCT: TaskScheduler::OCTOBER, NOV: TaskScheduler::NOVEMBER, DEC: TaskScheduler::DECEMBER, - } + }.freeze DAYS_OF_WEEK = { MON: TaskScheduler::MONDAY, TUE: TaskScheduler::TUESDAY, @@ -55,14 +55,14 @@ class Chef THU: TaskScheduler::THURSDAY, FRI: TaskScheduler::FRIDAY, SAT: TaskScheduler::SATURDAY, - SUN: TaskScheduler::SUNDAY } + SUN: TaskScheduler::SUNDAY }.freeze WEEKS_OF_MONTH = { FIRST: TaskScheduler::FIRST_WEEK, SECOND: TaskScheduler::SECOND_WEEK, THIRD: TaskScheduler::THIRD_WEEK, FOURTH: TaskScheduler::FOURTH_WEEK, - } + }.freeze DAYS_OF_MONTH = { 1 => TaskScheduler::TASK_FIRST, @@ -96,7 +96,7 @@ class Chef 29 => TaskScheduler::TASK_TWENTY_NINTH, 30 => TaskScheduler::TASK_THIRTYETH, 31 => TaskScheduler::TASK_THIRTY_FIRST, - } + }.freeze def load_current_resource @current_resource = Chef::Resource::WindowsTask.new(new_resource.name) |