Skip to content

Commit

Permalink
chore: fix rubocop styling errors (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
eshanholtz authored Nov 2, 2020
1 parent 8660a9c commit 443ac7d
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/scopes/scopes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require_relative '../../lib/sendgrid-ruby.rb'
require_relative '../../lib/sendgrid-ruby'
sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY'])

##################################################
Expand Down
1 change: 1 addition & 0 deletions lib/sendgrid/base_interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
class BaseInterface
attr_accessor :client
attr_reader :request_headers, :host, :version, :impersonate_subuser

# * *Args* :
# - +auth+ -> authorization header value
# - +host+ -> the base URL for the API
Expand Down
2 changes: 1 addition & 1 deletion lib/sendgrid/helpers/inbound/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class Main < Sinatra::Base
configure :production, :development do
enable :logging
set :config, YAML.load_file(File.dirname(__FILE__) + '/config.yml')
set :config, YAML.load_file("#{File.dirname(__FILE__)}/config.yml")
end

get '/' do
Expand Down
2 changes: 1 addition & 1 deletion lib/sendgrid/helpers/inbound/send.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
opt = OptionParser.new
opt.on('--host=HOST') { |v| OPTS[:host] = v }
argv = opt.parse!(ARGV)
config = YAML.load_file(File.dirname(__FILE__) + '/config.yml')
config = YAML.load_file("#{File.dirname(__FILE__)}/config.yml")
host = OPTS[:host] || config['host']
client = SendGrid::Client.new(host: host)
File.open(argv[0]) do |file|
Expand Down
1 change: 1 addition & 0 deletions lib/sendgrid/helpers/mail/tracking_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module SendGrid
class TrackingSettings
attr_writer :click_tracking, :open_tracking, :subscription_tracking, :ganalytics

def initialize
@click_tracking = nil
@open_tracking = nil
Expand Down
2 changes: 1 addition & 1 deletion lib/sendgrid/helpers/permissions/scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module SendGrid
class Scope
SCOPES = YAML.load_file(File.dirname(__FILE__) + '/scopes.yml').freeze
SCOPES = YAML.load_file("#{File.dirname(__FILE__)}/scopes.yml").freeze

class << self
def admin_permissions
Expand Down
4 changes: 2 additions & 2 deletions spec/fixtures/event_webhook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module EventWebhook
SIGNATURE = 'MEUCIGHQVtGj+Y3LkG9fLcxf3qfI10QysgDWmMOVmxG0u6ZUAiEAyBiXDWzM+uOe5W0JuG+luQAbPIqHh89M15TluLtEZtM='.freeze
FAILING_SIGNATURE = 'MEUCIQCtIHJeH93Y+qpYeWrySphQgpNGNr/U+UyUlBkU6n7RAwIgJTz2C+8a8xonZGi6BpSzoQsbVRamr2nlxFDWYNH3j/0='.freeze
TIMESTAMP = '1600112502'.freeze
PAYLOAD = [
PAYLOAD = "#{[
{
email: '[email protected]',
event: 'dropped',
Expand All @@ -17,6 +17,6 @@ module EventWebhook
'smtp-id': '<[email protected]>',
timestamp: 1_600_112_492
}
].to_json + "\r\n" # Be sure to include the trailing carriage return and newline!
].to_json}\r\n".freeze # Be sure to include the trailing carriage return and newline!
end
end
2 changes: 1 addition & 1 deletion spec/sendgrid/helpers/eventwebhook/eventwebhook_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
Fixtures::EventWebhook::SIGNATURE,
Fixtures::EventWebhook::TIMESTAMP
)
end .to raise_error(SendGrid::EventWebhook::NotSupportedError)
end.to raise_error(SendGrid::EventWebhook::NotSupportedError)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/sendgrid/permissions/test_scopes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TestCategory < Minitest::Test
# 4. test read only and full access scopes by loading scopes.yaml

def setup
@scopes_from_yaml = YAML.load_file(File.dirname(__FILE__) + '/../../../lib/sendgrid/helpers/permissions/scopes.yml').freeze
@scopes_from_yaml = YAML.load_file("#{File.dirname(__FILE__)}/../../../lib/sendgrid/helpers/permissions/scopes.yml").freeze
end

def test_admin_scopes
Expand Down
2 changes: 1 addition & 1 deletion test/sendgrid/test_sendgrid-ruby.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'simplecov'
SimpleCov.start
require_relative '../../lib/sendgrid-ruby.rb'
require_relative '../../lib/sendgrid-ruby'
require 'ruby_http_client'
require 'minitest/autorun'
require 'minitest/unit'
Expand Down

0 comments on commit 443ac7d

Please sign in to comment.