Skip to content

Commit

Permalink
Fixed rubocop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
edowney271 committed Mar 22, 2022
1 parent 1743805 commit 5e3d103
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

source 'https://rubygems.org'

gem "rubocop", ">= 1.18.4"
gem 'rubocop', '>= 1.18.4'

gem "root-ruby-style", :git => "https://github.com/Root-App/root-ruby-style.git", :ref => "393b968dbf59567977a812489d8da807ba3248ec"
gem 'root-ruby-style', git: 'https://github.com/Root-App/root-ruby-style.git', ref: '393b968dbf59567977a812489d8da807ba3248ec'

gemspec
1 change: 1 addition & 0 deletions app_store_connect.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
end

spec.require_paths = ['lib']
spec.required_ruby_version = '>= 3.0.2'

spec.add_runtime_dependency 'activesupport', '>= 6.0.3.1'
spec.add_runtime_dependency 'jwt', '>= 1.4', '<= 2.2.1'
Expand Down
7 changes: 3 additions & 4 deletions lib/app_store_connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ module AppStoreConnect
class << self
attr_accessor :config

def rel(id, type, array = false)
def rel(id, type, array: false)
if array
return {data: [{id: id, type: type}]}.freeze
{ data: [{ id: id, type: type }] }.freeze
else
return {data: {id: id, type: type}}.freeze
{ data: { id: id, type: type } }.freeze
end
end

end
end
2 changes: 1 addition & 1 deletion lib/app_store_connect/client/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Options < SimpleDelegator
}.freeze
private_constant :DEFAULTS

ENV_REGEXP = /APP_STORE_CONNECT_(?<suffix>[A-Z_]+)/.freeze
ENV_REGEXP = /APP_STORE_CONNECT_(?<suffix>[A-Z_]+)/
private_constant :ENV_REGEXP

def initialize(kwargs = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/app_store_connect/client/registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Registry < SimpleDelegator
OPTIONS = %i[schema].freeze

def initialize(options = {})
super(options .fetch(:schema).web_service_endpoints.map { |s| [s.alias, s] }.to_h)
super(options.fetch(:schema).web_service_endpoints.map { |s| [s.alias, s] }.to_h)
end
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/app_store_connect/create_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module AppStoreConnect
class CreateRequest
def self.inherited(klass)
super(klass)
klass.include(Object::Data)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/app_store_connect/object/attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def attributes(&block)

def to_h
{}.tap do |hash|
self.class.properties.keys.each do |name|
self.class.properties.each_key do |name|
value = instance_variable_get("@#{name}")

hash[name] = value unless value.nil?
Expand Down
8 changes: 4 additions & 4 deletions spec/app_store_connect/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

subject(:client) do
described_class.new(**{
issuer_id: issuer_id,
key_id: key_id,
private_key: private_key
})
issuer_id: issuer_id,
key_id: key_id,
private_key: private_key
})
end

describe '#users' do
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

require 'app_store_connect'

Dir[File.dirname(__FILE__) + '/support/**/*.rb'].each { |f| require f }
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

RSpec.configure do |config|
config.example_status_persistence_file_path = '.rspec_status'
Expand Down
10 changes: 5 additions & 5 deletions spec/support/factories/bundle_id_create_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

initialize_with do
AppStoreConnect::BundleIdCreateRequest.new(**{
identifier: identifier,
seed_id: seed_id,
platform: platform,
name: name
})
identifier: identifier,
seed_id: seed_id,
platform: platform,
name: name
})
end
end
end

0 comments on commit 5e3d103

Please sign in to comment.