diff --git a/lib/hound/default_linter.rb b/lib/hound/default_linter.rb deleted file mode 100644 index a51e948..0000000 --- a/lib/hound/default_linter.rb +++ /dev/null @@ -1,11 +0,0 @@ -module Hound - class DefaultLinter < SimpleDelegator - def status - "Enabled by default" - end - - def default? - true - end - end -end diff --git a/lib/hound/default_linter_config.rb b/lib/hound/default_linter_config.rb deleted file mode 100644 index 89fb2df..0000000 --- a/lib/hound/default_linter_config.rb +++ /dev/null @@ -1,9 +0,0 @@ -module Hound - class DefaultLinterConfig < SimpleDelegator - STATUS = "Using default config" - - def status - STATUS - end - end -end diff --git a/lib/hound/linter_config.rb b/lib/hound/linter_config.rb deleted file mode 100644 index 8fe0a6b..0000000 --- a/lib/hound/linter_config.rb +++ /dev/null @@ -1,17 +0,0 @@ -module Hound - class LinterConfig - attr_reader :filepath - - def initialize(filepath) - @filepath = filepath - end - - def status - YAML.load(File.read(filepath)) - - "Using #{filepath}" - rescue Psych::SyntaxError - "#{filepath} is not valid Yaml" - end - end -end diff --git a/lib/hound/missing_linter_config.rb b/lib/hound/missing_linter_config.rb deleted file mode 100644 index 7b7bf11..0000000 --- a/lib/hound/missing_linter_config.rb +++ /dev/null @@ -1,7 +0,0 @@ -module Hound - class MissingLinterConfig < SimpleDelegator - def status - "#{filepath} does not exist" - end - end -end diff --git a/spec/hound/linter_config_spec.rb b/spec/hound/linter_config_spec.rb deleted file mode 100644 index 8518437..0000000 --- a/spec/hound/linter_config_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require "hound/linter_config" - -describe Hound::LinterConfig do - describe "#status" do - context "when file is valid Yaml" do - it "returns message with filepath" do - filepath = ".ruby-style.yml" - linter_config = Hound::LinterConfig.new(filepath) - stub_file(filepath, "foo:\n bar") - - expect(linter_config.status).to eq "Using .ruby-style.yml" - end - end - - context "when file is invalid Yaml" do - it "returns error message" do - filepath = ".ruby-style.yml" - linter_config = Hound::LinterConfig.new(filepath) - stub_file(filepath, "foo:\nbar") - - expect(linter_config.status).to include "not valid" - end - end - end -end