Skip to content
This repository was archived by the owner on Dec 30, 2020. It is now read-only.

Commit

Permalink
Rubocop cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
will-in-wi committed Apr 18, 2020
1 parent 833dbff commit 2f0c56e
Show file tree
Hide file tree
Showing 29 changed files with 59 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'

# Specify your gem's dependencies in test_gem.gemspec
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
Expand Down
1 change: 1 addition & 0 deletions exe/letsencrypt_webfaction
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'letsencrypt_webfaction/application'
require 'letsencrypt_webfaction/errors'
Expand Down
2 changes: 2 additions & 0 deletions letsencrypt_webfaction.gemspec
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
4 changes: 3 additions & 1 deletion lib/letsencrypt_webfaction.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module LetsencryptWebfaction
VERSION = '4.0.0'.freeze
VERSION = '4.0.0'
end
2 changes: 2 additions & 0 deletions lib/letsencrypt_webfaction/application.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction/application/init'
require 'letsencrypt_webfaction/application/run'
require 'letsencrypt_webfaction/application/version'
Expand Down
2 changes: 2 additions & 0 deletions lib/letsencrypt_webfaction/application/init.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction/options'

require 'pathname'
Expand Down
2 changes: 2 additions & 0 deletions lib/letsencrypt_webfaction/application/run.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction/options'
require 'letsencrypt_webfaction/errors'
require 'letsencrypt_webfaction/webfaction_api_credentials'
Expand Down
2 changes: 2 additions & 0 deletions lib/letsencrypt_webfaction/application/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction'

module LetsencryptWebfaction
Expand Down
2 changes: 2 additions & 0 deletions lib/letsencrypt_webfaction/certificate_installer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'xmlrpc/client'

module LetsencryptWebfaction
Expand Down
2 changes: 2 additions & 0 deletions lib/letsencrypt_webfaction/certificate_issuer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'acme-client'
require 'letsencrypt_webfaction/domain_validator'
require 'letsencrypt_webfaction/certificate_installer'
Expand Down
2 changes: 2 additions & 0 deletions lib/letsencrypt_webfaction/domain_validator.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'fileutils'

module LetsencryptWebfaction
Expand Down
2 changes: 2 additions & 0 deletions lib/letsencrypt_webfaction/errors.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module LetsencryptWebfaction
class Error < StandardError; end
class InvalidConfigValueError < Error; end
Expand Down
2 changes: 2 additions & 0 deletions lib/letsencrypt_webfaction/logger_output.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module LetsencryptWebfaction
class LoggerOutput
attr_accessor :quiet
Expand Down
4 changes: 3 additions & 1 deletion lib/letsencrypt_webfaction/options.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'toml-rb'
require 'socket'

Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions lib/letsencrypt_webfaction/options/certificate.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module LetsencryptWebfaction
class Options
class Certificate
Expand Down
2 changes: 2 additions & 0 deletions lib/letsencrypt_webfaction/webfaction_api_credentials.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'xmlrpc/client'

module LetsencryptWebfaction
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/letsencrypt_webfaction/application/init_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction/application/init'

RSpec.describe LetsencryptWebfaction::Application::Init, :uses_tmp_dir do
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/letsencrypt_webfaction/application/run_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'acme-client'
require 'xmlrpc/client'
require 'letsencrypt_webfaction/application/run'
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/letsencrypt_webfaction/application/version_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction/application/version'

RSpec.describe LetsencryptWebfaction::Application::Version do
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/letsencrypt_webfaction/application_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction/application'

RSpec.describe LetsencryptWebfaction::Application do
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/letsencrypt_webfaction/certificate_installer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction/certificate_installer'
require 'letsencrypt_webfaction/webfaction_api_credentials'

Expand Down
2 changes: 2 additions & 0 deletions spec/lib/letsencrypt_webfaction/certificate_issuer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction/certificate_issuer'
require 'letsencrypt_webfaction/webfaction_api_credentials'
require 'letsencrypt_webfaction/options/certificate'
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/letsencrypt_webfaction/domain_validator_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'acme/client'
require 'letsencrypt_webfaction/domain_validator'

Expand Down
2 changes: 2 additions & 0 deletions spec/lib/letsencrypt_webfaction/options/certificate_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction/options/certificate'
require 'letsencrypt_webfaction/errors'

Expand Down
2 changes: 2 additions & 0 deletions spec/lib/letsencrypt_webfaction/options_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction/options'

RSpec.describe LetsencryptWebfaction::Options do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'letsencrypt_webfaction/webfaction_api_credentials'

RSpec.describe LetsencryptWebfaction::WebfactionApiCredentials do
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Add lib to the require dir.
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')

Expand Down
2 changes: 2 additions & 0 deletions spec/support/fixtures.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

def fixture(filename)
FIXTURE_DIR.join(filename).read
end

0 comments on commit 2f0c56e

Please sign in to comment.