Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix rubocop styling errors #447

Merged
merged 1 commit into from
Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: 'hello@world.com',
event: 'dropped',
Expand All @@ -17,6 +17,6 @@ module EventWebhook
'smtp-id': '<LRzXl_NHStOGhQ4kofSm_A@ismtpd0039p1iad1.sendgrid.net>',
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