Skip to content

Commit

Permalink
rubocop 0.41.1 (was 0.40.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredbeck committed Jun 27, 2016
1 parent 595bb43 commit fc071b2
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Metrics/AbcSize:
Max: 30 # Goal: 15

Metrics/ClassLength:
Max: 400
Max: 327
Exclude:
- test/**/*

Metrics/CyclomaticComplexity:
Max: 13 # Goal: 6
Max: 8 # Goal: 6

Metrics/ModuleLength:
Max: 317

Metrics/PerceivedComplexity:
Max: 16 # Goal: 7
Max: 10 # Goal: 7
2 changes: 1 addition & 1 deletion paper_trail.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "generator_spec", "~> 0.9.3"
s.add_development_dependency "database_cleaner", "~> 1.2"
s.add_development_dependency "pry-nav", "~> 0.2.4"
s.add_development_dependency "rubocop", "~> 0.40.0"
s.add_development_dependency "rubocop", "~> 0.41.1"
s.add_development_dependency "timecop", "~> 0.8.0"

if defined?(JRUBY_VERSION)
Expand Down
2 changes: 1 addition & 1 deletion spec/models/gadget_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
describe "Methods" do
describe "Instance", versioning: true do
describe "private" do
describe '#changed_notably?' do
describe "#changed_notably?" do
subject { Gadget.new(created_at: Time.now) }

context "create events" do
Expand Down
8 changes: 4 additions & 4 deletions spec/models/joined_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
describe "VersionConcern::ClassMethods" do
before { widget } # persist a widget

describe '#subsequent' do
describe "#subsequent" do
it "shouldn't error out when there is a default_scope that joins" do
JoinedVersion.subsequent(version).first
end
end

describe '#preceding' do
describe "#preceding" do
it "shouldn't error out when there is a default scope that joins" do
JoinedVersion.preceding(version).first
end
end

describe '#between' do
describe "#between" do
it "shouldn't error out when there is a default scope that joins" do
JoinedVersion.between(Time.now, 1.minute.from_now).first
end
Expand All @@ -35,7 +35,7 @@
end

describe "Methods" do
describe '#index' do
describe "#index" do
it { is_expected.to respond_to(:index) }

it "shouldn't error out when there is a default scope that joins" do
Expand Down
4 changes: 2 additions & 2 deletions spec/models/json_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

describe "Methods" do
describe "Class" do
describe '#where_object' do
describe "#where_object" do
it { expect(JsonVersion).to respond_to(:where_object) }

it "escapes values" do
Expand Down Expand Up @@ -50,7 +50,7 @@
end
end

describe '#where_object_changes' do
describe "#where_object_changes" do
it { expect(JsonVersion).to respond_to(:where_object_changes) }

it "escapes values" do
Expand Down
2 changes: 1 addition & 1 deletion spec/models/kitchen/banana_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Kitchen
describe Banana, type: :model do
it { is_expected.to be_versioned }

describe '#versions' do
describe "#versions" do
it "returns instances of Kitchen::BananaVersion", versioning: true do
banana = described_class.create!
expect(banana.versions.first).to be_a(Kitchen::BananaVersion)
Expand Down
10 changes: 5 additions & 5 deletions spec/models/version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
describe "Instance" do
subject { PaperTrail::Version.new }

describe '#paper_trail_originator' do
describe "#paper_trail_originator" do
it { is_expected.to respond_to(:paper_trail_originator) }

context "No previous versions" do
Expand Down Expand Up @@ -89,7 +89,7 @@
end
end

describe '#terminator' do
describe "#terminator" do
let(:attributes) { { whodunnit: FFaker::Name.first_name } }
subject { PaperTrail::Version.new attributes }

Expand All @@ -100,7 +100,7 @@
end
end

describe '#version_author' do
describe "#version_author" do
it { is_expected.to respond_to(:version_author) }

it "should be an alias for the `terminator` method" do
Expand Down Expand Up @@ -140,7 +140,7 @@
end
end

describe '#where_object' do
describe "#where_object" do
it { expect(PaperTrail::Version).to respond_to(:where_object) }

context "invalid arguments" do
Expand Down Expand Up @@ -205,7 +205,7 @@
end
end

describe '#where_object_changes' do
describe "#where_object_changes" do
context "invalid arguments" do
it "should raise an error" do
expect {
Expand Down
8 changes: 4 additions & 4 deletions spec/models/widget_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@

describe "Methods" do
describe "Instance", versioning: true do
describe '#paper_trail.originator' do
describe "#paper_trail.originator" do
describe "return value" do
let(:orig_name) { FFaker::Name.name }
let(:new_name) { FFaker::Name.name }
Expand Down Expand Up @@ -192,7 +192,7 @@
end
end

describe '#version_at' do
describe "#version_at" do
context "Timestamp argument is AFTER object has been destroyed" do
it "should return `nil`" do
widget.update_attribute(:name, "foobar")
Expand All @@ -202,7 +202,7 @@
end
end

describe '#whodunnit' do
describe "#whodunnit" do
it { is_expected.to respond_to(:whodunnit) }

context "no block given" do
Expand Down Expand Up @@ -250,7 +250,7 @@
end
end

describe '#touch_with_version' do
describe "#touch_with_version" do
it "creates a version" do
count = widget.versions.size
# Travel 1 second because MySQL lacks sub-second resolution
Expand Down
4 changes: 2 additions & 2 deletions spec/modules/paper_trail_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "rails_helper"

describe PaperTrail, type: :module, versioning: true do
describe '#config' do
describe "#config" do
it { is_expected.to respond_to(:config) }

it "should allow for config values to be set" do
Expand All @@ -17,7 +17,7 @@
end
end

describe '#configure' do
describe "#configure" do
it { is_expected.to respond_to(:configure) }

it "should be an alias for the `config` method" do
Expand Down
2 changes: 1 addition & 1 deletion spec/modules/version_number_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
end

describe PaperTrail do
describe '#version' do
describe "#version" do
it { is_expected.to respond_to(:version) }
it { expect(subject.version).to eq(PaperTrail::VERSION::STRING) }
end
Expand Down
6 changes: 3 additions & 3 deletions test/unit/model_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase
context "A reified item" do
setup do
widget = Widget.create name: "Bob"
%w( Tom Dick Jane ).each { |name| widget.update_attributes name: name }
%w(Tom Dick Jane).each { |name| widget.update_attributes name: name }
@version = widget.versions.last
@widget = @version.reify
end
Expand Down Expand Up @@ -972,7 +972,7 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase
context "with versions" do
setup do
@widget.save
%w( Tom Dick Jane ).each { |name| @widget.update_attributes name: name }
%w(Tom Dick Jane).each { |name| @widget.update_attributes name: name }
end

should "have a previous version" do
Expand Down Expand Up @@ -1405,7 +1405,7 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase
context "A reified item with a column -version- and custom version_method" do
setup do
widget = LegacyWidget.create(name: "foo", version: 2)
%w( bar baz ).each { |name| widget.update_attributes name: name }
%w(bar baz).each { |name| widget.update_attributes name: name }
@version = widget.versions.last
@widget = @version.reify
end
Expand Down

0 comments on commit fc071b2

Please sign in to comment.