summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Ziegler <austin@zieglers.ca>2021-12-23 11:13:21 -0500
committerAustin Ziegler <austin@zieglers.ca>2022-07-04 20:26:10 -0400
commit927b9b3c935f08a1611059e81b411c2ee2ff9724 (patch)
tree88be680b91bc212fe2866b525de1563e3d91fd67
parent396a82c4d56bc0067c86de7cd32a4ae75f292c41 (diff)
downloaddiff-lcs-927b9b3c935f08a1611059e81b411c2ee2ff9724.tar.gz
Ignore Style/HashSyntax
-rw-r--r--Rakefile2
-rw-r--r--lib/diff/lcs.rb2
-rw-r--r--lib/diff/lcs/htmldiff.rb2
-rw-r--r--spec/issues_spec.rb2
-rw-r--r--spec/ldiff_spec.rb2
-rw-r--r--spec/spec_helper.rb2
-rw-r--r--spec/traverse_sequences_spec.rb2
7 files changed, 13 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index 9aa8d42..da1e041 100644
--- a/Rakefile
+++ b/Rakefile
@@ -91,8 +91,10 @@ end
Rake::Task["spec"].actions.uniq! { |a| a.source_location }
+# standard:disable Style/HashSyntax
task :default => :spec unless Rake::Task["default"].prereqs.include?("spec")
task :test => :spec unless Rake::Task["test"].prereqs.include?("spec")
+# standard:enable Style/HashSyntax
if RUBY_VERSION >= "2.0" && RUBY_ENGINE == "ruby"
namespace :spec do
diff --git a/lib/diff/lcs.rb b/lib/diff/lcs.rb
index 031e2d7..4461af0 100644
--- a/lib/diff/lcs.rb
+++ b/lib/diff/lcs.rb
@@ -576,10 +576,12 @@ class << Diff::LCS
end
end
+ # standard:disable Style/HashSyntax
PATCH_MAP = { # :nodoc:
:patch => { "+" => "+", "-" => "-", "!" => "!", "=" => "=" }.freeze,
:unpatch => { "+" => "-", "-" => "+", "!" => "!", "=" => "=" }.freeze
}.freeze
+ # standard:enable Style/HashSyntax
# Applies a +patchset+ to the sequence +src+ according to the +direction+
# (<tt>:patch</tt> or <tt>:unpatch</tt>), producing a new sequence.
diff --git a/lib/diff/lcs/htmldiff.rb b/lib/diff/lcs/htmldiff.rb
index 7eab41d..a57dd51 100644
--- a/lib/diff/lcs/htmldiff.rb
+++ b/lib/diff/lcs/htmldiff.rb
@@ -46,12 +46,14 @@ class Diff::LCS::HTMLDiff
end
end
+ # standard:disable Style/HashSyntax
DEFAULT_OPTIONS = {
:expand_tabs => nil,
:output => nil,
:css => nil,
:title => nil
}.freeze
+ # standard:enable Style/HashSyntax
# standard:disable Layout/HeredocIndentation
DEFAULT_CSS = <<-CSS
diff --git a/spec/issues_spec.rb b/spec/issues_spec.rb
index ec2abeb..26460d3 100644
--- a/spec/issues_spec.rb
+++ b/spec/issues_spec.rb
@@ -58,11 +58,13 @@ describe "Diff::LCS Issues" do
describe "issue #57" do
it "should fail with a correct error" do
+ # standard:disable Style/HashSyntax
expect {
actual = { :category => "app.rack.request" }
expected = { :category => "rack.middleware", :title => "Anonymous Middleware" }
expect(actual).to eq(expected)
}.to raise_error(RSpec::Expectations::ExpectationNotMetError)
+ # standard:enable Style/HashSyntax
end
end
diff --git a/spec/ldiff_spec.rb b/spec/ldiff_spec.rb
index e5df039..4a08c43 100644
--- a/spec/ldiff_spec.rb
+++ b/spec/ldiff_spec.rb
@@ -5,6 +5,7 @@ require "spec_helper"
RSpec.describe "bin/ldiff" do
include CaptureSubprocessIO
+ # standard:disable Style/HashSyntax
fixtures = [
{ :name => "output.diff", :left => "aX", :right => "bXaX" },
{ :name => "output.diff.chef", :left => "old-chef", :right => "new-chef" },
@@ -14,6 +15,7 @@ RSpec.describe "bin/ldiff" do
fixture[:flag] = flag
fixture
}
+ # standard:enable Style/HashSyntax
def self.test_ldiff(fixture)
desc = [
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 55a7773..acca2ef 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -374,5 +374,7 @@ end
RSpec.configure do |conf|
conf.include Diff::LCS::SpecHelper
conf.alias_it_should_behave_like_to :it_has_behavior, "has behavior:"
+ # standard:disable Style/HashSyntax
conf.filter_run_excluding :broken => true
+ # standard:enable Style/HashSyntax
end
diff --git a/spec/traverse_sequences_spec.rb b/spec/traverse_sequences_spec.rb
index 3bad13e..ed40100 100644
--- a/spec/traverse_sequences_spec.rb
+++ b/spec/traverse_sequences_spec.rb
@@ -55,7 +55,7 @@ describe "Diff::LCS.traverse_sequences" do
expect(@callback.matched_b).to eq(hello.split(//))
end
- it "has the correct skipped sequences with the left sequence", :only => true do
+ it "has the correct skipped sequences with the left sequence" do
expect(@callback.discards_a).to be_empty
end