Skip to content

Commit

Permalink
rubocop linting
Browse files Browse the repository at this point in the history
  • Loading branch information
abrophy committed Sep 6, 2017
1 parent f045a47 commit 4b82b15
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions app/services/calendar_uploader.rb
Expand Up @@ -16,14 +16,15 @@ def initialize(summary:, date:, access_token:, email:)
end

def upload_event
parsed_date = Chronic.parse(date, endian_precedence: %i[little median]).to_time.iso8601
parsed_date = Chronic.parse(date, endian_precedence: %i[little median])
.to_time.iso8601

event = {
summary: summary,
start: { date_time: parsed_date },
end: { date_time: parsed_date }
}

event = @calendar_service.insert_event('primary', event, send_notifications: true)
@calendar_service.insert_event('primary', event, send_notifications: true)
end
end
2 changes: 2 additions & 0 deletions lib/access_token.rb
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class AccessToken
attr_reader :token
def initialize(token)
Expand Down
8 changes: 5 additions & 3 deletions spec/helpers/access_token_spec.rb
@@ -1,8 +1,10 @@
# frozen_string_literal: true

RSpec.describe AccessToken, type: :helper do
describe "#apply!" do
describe '#apply!' do
it 'applies the access token to bearer' do
foo = AccessToken.new("testToken")
bar = {'Authorization' => ''}
foo = AccessToken.new('testToken')
bar = { 'Authorization' => '' }
foo.apply!(bar)

expect(bar['Authorization']).to eq('Bearer testToken')
Expand Down

0 comments on commit 4b82b15

Please sign in to comment.