diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d1fdb02..f748d8d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -21,15 +21,6 @@ Gemspec/RequiredRubyVersion: Exclude: - 'trollolo.gemspec' -# Offense count: 8 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: leading, trailing -Layout/DotPosition: - Exclude: - - 'spec/integration/create_burndown_spec.rb' - - 'spec/unit/trello_wrapper_spec.rb' - # Offense count: 1 # Cop supports --auto-correct. Layout/EmptyLineAfterMagicComment: diff --git a/spec/integration/create_burndown_spec.rb b/spec/integration/create_burndown_spec.rb index edc4e3c..ecf5835 100644 --- a/spec/integration/create_burndown_spec.rb +++ b/spec/integration/create_burndown_spec.rb @@ -22,8 +22,8 @@ def compare_images_for_sprint(sprint_number, extra_args = []) result = run_helper(@working_dir, sprint_number, extra_args) expect(result).to exit_with_success('') - expect(File.join(@working_dir, "burndown-#{sprint_number}.png")). - to be_same_image_as("create_burndown_helper/burndown-#{sprint_number}.png") + expect(File.join(@working_dir, "burndown-#{sprint_number}.png")) + .to be_same_image_as("create_burndown_helper/burndown-#{sprint_number}.png") end describe 'create_burndown.py' do diff --git a/spec/unit/trello_wrapper_spec.rb b/spec/unit/trello_wrapper_spec.rb index 6bda3d7..e134fd3 100644 --- a/spec/unit/trello_wrapper_spec.rb +++ b/spec/unit/trello_wrapper_spec.rb @@ -8,8 +8,8 @@ subject { described_class.new(settings) } before do - stub_request(:get, 'https://api.trello.com/1/boards/myboard?cards=open&key=mykey&lists=open&token=mytoken'). - to_return(status: 200, body: load_test_file('board.json'), headers: {}) + stub_request(:get, 'https://api.trello.com/1/boards/myboard?cards=open&key=mykey&lists=open&token=mytoken') + .to_return(status: 200, body: load_test_file('board.json'), headers: {}) full_board_mock end @@ -80,9 +80,9 @@ } EOT - stub_request(:get, 'https://api.trello.com/1/cards/123?key=mykey&token=mytoken'). - with(headers: {'Accept' => '*/*; q=0.5, application/xml', 'Accept-Encoding' => 'gzip, deflate', 'User-Agent' => 'Ruby'}). - to_return(status: 200, body: card_body, headers: {}) + stub_request(:get, 'https://api.trello.com/1/cards/123?key=mykey&token=mytoken') + .with(headers: {'Accept' => '*/*; q=0.5, application/xml', 'Accept-Encoding' => 'gzip, deflate', 'User-Agent' => 'Ruby'}) + .to_return(status: 200, body: card_body, headers: {}) headers = {'Accept' => '*/*; q=0.5, application/xml', 'Accept-Encoding' => 'gzip, deflate', @@ -90,8 +90,8 @@ 'Content-Type' => 'multipart/form-data; boundary=470924', 'User-Agent' => 'Ruby'} - stub_request(:post, 'https://api.trello.com/1/cards/123/attachments?key=mykey&token=mytoken'). - with(headers: headers).to_return(status: 200, body: '', headers: {}) + stub_request(:post, 'https://api.trello.com/1/cards/123/attachments?key=mykey&token=mytoken') + .with(headers: headers).to_return(status: 200, body: '', headers: {}) path = given_file('attachment-data') @@ -119,17 +119,17 @@ end before(:each) do - stub_request(:get, "https://api.trello.com/1/cards/#{card_id}/attachments?fields=name&key=mykey&token=mytoken"). - with(headers: {'Accept' => '*/*; q=0.5, application/xml', 'Accept-Encoding' => 'gzip, deflate', 'User-Agent' => 'Ruby'}). - to_return(status: 200, body: card_attachments_body, headers: {}) + stub_request(:get, "https://api.trello.com/1/cards/#{card_id}/attachments?fields=name&key=mykey&token=mytoken") + .with(headers: {'Accept' => '*/*; q=0.5, application/xml', 'Accept-Encoding' => 'gzip, deflate', 'User-Agent' => 'Ruby'}) + .to_return(status: 200, body: card_attachments_body, headers: {}) headers = {'Accept' => '*/*; q=0.5, application/xml', 'Accept-Encoding' => 'gzip, deflate', 'Content-Length' => '0', 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => 'Ruby'} - stub_request(:put, "https://api.trello.com/1/cards/#{card_id}/idAttachmentCover?key=mykey&token=mytoken&value=#{image_id}"). - with(headers: headers) + stub_request(:put, "https://api.trello.com/1/cards/#{card_id}/idAttachmentCover?key=mykey&token=mytoken&value=#{image_id}") + .with(headers: headers) end it 'make the attachment with the file name passed.jpg the cover' do