diff --git a/Gemfile b/Gemfile index 2511623..32e19bb 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source 'https://rubygems.org' # Specify your gem's dependencies in test_gem.gemspec diff --git a/Rakefile b/Rakefile index cb60140..7eb6825 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'bundler/gem_tasks' require 'rspec/core/rake_task' require 'rubocop/rake_task' diff --git a/exe/letsencrypt_webfaction b/exe/letsencrypt_webfaction index 484a7fc..1e9cce0 100755 --- a/exe/letsencrypt_webfaction +++ b/exe/letsencrypt_webfaction @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true require 'letsencrypt_webfaction/application' require 'letsencrypt_webfaction/errors' diff --git a/letsencrypt_webfaction.gemspec b/letsencrypt_webfaction.gemspec index a90b448..54834ee 100644 --- a/letsencrypt_webfaction.gemspec +++ b/letsencrypt_webfaction.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'letsencrypt_webfaction' diff --git a/lib/letsencrypt_webfaction.rb b/lib/letsencrypt_webfaction.rb index ba47b70..34dc748 100644 --- a/lib/letsencrypt_webfaction.rb +++ b/lib/letsencrypt_webfaction.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module LetsencryptWebfaction - VERSION = '4.0.0'.freeze + VERSION = '4.0.0' end diff --git a/lib/letsencrypt_webfaction/application.rb b/lib/letsencrypt_webfaction/application.rb index ed689a8..0fb715e 100644 --- a/lib/letsencrypt_webfaction/application.rb +++ b/lib/letsencrypt_webfaction/application.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction/application/init' require 'letsencrypt_webfaction/application/run' require 'letsencrypt_webfaction/application/version' diff --git a/lib/letsencrypt_webfaction/application/init.rb b/lib/letsencrypt_webfaction/application/init.rb index e1cab97..4fcefce 100644 --- a/lib/letsencrypt_webfaction/application/init.rb +++ b/lib/letsencrypt_webfaction/application/init.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction/options' require 'pathname' diff --git a/lib/letsencrypt_webfaction/application/run.rb b/lib/letsencrypt_webfaction/application/run.rb index 055c164..55f8e80 100644 --- a/lib/letsencrypt_webfaction/application/run.rb +++ b/lib/letsencrypt_webfaction/application/run.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction/options' require 'letsencrypt_webfaction/errors' require 'letsencrypt_webfaction/webfaction_api_credentials' diff --git a/lib/letsencrypt_webfaction/application/version.rb b/lib/letsencrypt_webfaction/application/version.rb index 596d91c..8624cd4 100644 --- a/lib/letsencrypt_webfaction/application/version.rb +++ b/lib/letsencrypt_webfaction/application/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction' module LetsencryptWebfaction diff --git a/lib/letsencrypt_webfaction/certificate_installer.rb b/lib/letsencrypt_webfaction/certificate_installer.rb index 9bfb4bd..fe50f2e 100644 --- a/lib/letsencrypt_webfaction/certificate_installer.rb +++ b/lib/letsencrypt_webfaction/certificate_installer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'xmlrpc/client' module LetsencryptWebfaction diff --git a/lib/letsencrypt_webfaction/certificate_issuer.rb b/lib/letsencrypt_webfaction/certificate_issuer.rb index 912e172..6dfa37f 100644 --- a/lib/letsencrypt_webfaction/certificate_issuer.rb +++ b/lib/letsencrypt_webfaction/certificate_issuer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'acme-client' require 'letsencrypt_webfaction/domain_validator' require 'letsencrypt_webfaction/certificate_installer' diff --git a/lib/letsencrypt_webfaction/domain_validator.rb b/lib/letsencrypt_webfaction/domain_validator.rb index 3b2ab5f..3c98108 100644 --- a/lib/letsencrypt_webfaction/domain_validator.rb +++ b/lib/letsencrypt_webfaction/domain_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'fileutils' module LetsencryptWebfaction diff --git a/lib/letsencrypt_webfaction/errors.rb b/lib/letsencrypt_webfaction/errors.rb index 9853bfa..28c2524 100644 --- a/lib/letsencrypt_webfaction/errors.rb +++ b/lib/letsencrypt_webfaction/errors.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module LetsencryptWebfaction class Error < StandardError; end class InvalidConfigValueError < Error; end diff --git a/lib/letsencrypt_webfaction/logger_output.rb b/lib/letsencrypt_webfaction/logger_output.rb index 6ef479e..d3e4ee3 100644 --- a/lib/letsencrypt_webfaction/logger_output.rb +++ b/lib/letsencrypt_webfaction/logger_output.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module LetsencryptWebfaction class LoggerOutput attr_accessor :quiet diff --git a/lib/letsencrypt_webfaction/options.rb b/lib/letsencrypt_webfaction/options.rb index a66ada8..810dc8b 100644 --- a/lib/letsencrypt_webfaction/options.rb +++ b/lib/letsencrypt_webfaction/options.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'toml-rb' require 'socket' @@ -7,7 +9,7 @@ module LetsencryptWebfaction class Options NON_BLANK_FIELDS = %i[username password letsencrypt_account_email directory api_url servername].freeze - WEBFACTION_API_URL = 'https://api.webfaction.com/'.freeze + WEBFACTION_API_URL = 'https://api.webfaction.com/' def initialize(args) @config = args diff --git a/lib/letsencrypt_webfaction/options/certificate.rb b/lib/letsencrypt_webfaction/options/certificate.rb index 2eb0ac1..ad1d62a 100644 --- a/lib/letsencrypt_webfaction/options/certificate.rb +++ b/lib/letsencrypt_webfaction/options/certificate.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module LetsencryptWebfaction class Options class Certificate diff --git a/lib/letsencrypt_webfaction/webfaction_api_credentials.rb b/lib/letsencrypt_webfaction/webfaction_api_credentials.rb index 78aad5f..ee4292b 100644 --- a/lib/letsencrypt_webfaction/webfaction_api_credentials.rb +++ b/lib/letsencrypt_webfaction/webfaction_api_credentials.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'xmlrpc/client' module LetsencryptWebfaction diff --git a/spec/lib/letsencrypt_webfaction/application/init_spec.rb b/spec/lib/letsencrypt_webfaction/application/init_spec.rb index 2d9bfbc..1d7f383 100644 --- a/spec/lib/letsencrypt_webfaction/application/init_spec.rb +++ b/spec/lib/letsencrypt_webfaction/application/init_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction/application/init' RSpec.describe LetsencryptWebfaction::Application::Init, :uses_tmp_dir do diff --git a/spec/lib/letsencrypt_webfaction/application/run_spec.rb b/spec/lib/letsencrypt_webfaction/application/run_spec.rb index baa3e99..0f2eb36 100644 --- a/spec/lib/letsencrypt_webfaction/application/run_spec.rb +++ b/spec/lib/letsencrypt_webfaction/application/run_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'acme-client' require 'xmlrpc/client' require 'letsencrypt_webfaction/application/run' diff --git a/spec/lib/letsencrypt_webfaction/application/version_spec.rb b/spec/lib/letsencrypt_webfaction/application/version_spec.rb index 4270ef8..ec77af9 100644 --- a/spec/lib/letsencrypt_webfaction/application/version_spec.rb +++ b/spec/lib/letsencrypt_webfaction/application/version_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction/application/version' RSpec.describe LetsencryptWebfaction::Application::Version do diff --git a/spec/lib/letsencrypt_webfaction/application_spec.rb b/spec/lib/letsencrypt_webfaction/application_spec.rb index 698002d..c46feee 100644 --- a/spec/lib/letsencrypt_webfaction/application_spec.rb +++ b/spec/lib/letsencrypt_webfaction/application_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction/application' RSpec.describe LetsencryptWebfaction::Application do diff --git a/spec/lib/letsencrypt_webfaction/certificate_installer_spec.rb b/spec/lib/letsencrypt_webfaction/certificate_installer_spec.rb index cfc39e4..3e34613 100644 --- a/spec/lib/letsencrypt_webfaction/certificate_installer_spec.rb +++ b/spec/lib/letsencrypt_webfaction/certificate_installer_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction/certificate_installer' require 'letsencrypt_webfaction/webfaction_api_credentials' diff --git a/spec/lib/letsencrypt_webfaction/certificate_issuer_spec.rb b/spec/lib/letsencrypt_webfaction/certificate_issuer_spec.rb index 2f7ff90..45364ac 100644 --- a/spec/lib/letsencrypt_webfaction/certificate_issuer_spec.rb +++ b/spec/lib/letsencrypt_webfaction/certificate_issuer_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction/certificate_issuer' require 'letsencrypt_webfaction/webfaction_api_credentials' require 'letsencrypt_webfaction/options/certificate' diff --git a/spec/lib/letsencrypt_webfaction/domain_validator_spec.rb b/spec/lib/letsencrypt_webfaction/domain_validator_spec.rb index 72ed36b..07b1d67 100644 --- a/spec/lib/letsencrypt_webfaction/domain_validator_spec.rb +++ b/spec/lib/letsencrypt_webfaction/domain_validator_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'acme/client' require 'letsencrypt_webfaction/domain_validator' diff --git a/spec/lib/letsencrypt_webfaction/options/certificate_spec.rb b/spec/lib/letsencrypt_webfaction/options/certificate_spec.rb index 0e45110..263c5ba 100644 --- a/spec/lib/letsencrypt_webfaction/options/certificate_spec.rb +++ b/spec/lib/letsencrypt_webfaction/options/certificate_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction/options/certificate' require 'letsencrypt_webfaction/errors' diff --git a/spec/lib/letsencrypt_webfaction/options_spec.rb b/spec/lib/letsencrypt_webfaction/options_spec.rb index 70646e6..c02c89d 100644 --- a/spec/lib/letsencrypt_webfaction/options_spec.rb +++ b/spec/lib/letsencrypt_webfaction/options_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction/options' RSpec.describe LetsencryptWebfaction::Options do diff --git a/spec/lib/letsencrypt_webfaction/webfaction_api_credentials_spec.rb b/spec/lib/letsencrypt_webfaction/webfaction_api_credentials_spec.rb index b0f2775..55cb3f3 100644 --- a/spec/lib/letsencrypt_webfaction/webfaction_api_credentials_spec.rb +++ b/spec/lib/letsencrypt_webfaction/webfaction_api_credentials_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'letsencrypt_webfaction/webfaction_api_credentials' RSpec.describe LetsencryptWebfaction::WebfactionApiCredentials do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 21b5a43..898baa6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Add lib to the require dir. $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib') diff --git a/spec/support/fixtures.rb b/spec/support/fixtures.rb index a132ba1..a786ed3 100644 --- a/spec/support/fixtures.rb +++ b/spec/support/fixtures.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + def fixture(filename) FIXTURE_DIR.join(filename).read end