Skip to content

Commit

Permalink
Fix formatting issues from standardrb
Browse files Browse the repository at this point in the history
  • Loading branch information
Acconut committed Jan 9, 2024
1 parent 9f8e888 commit 627636f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
18 changes: 9 additions & 9 deletions lib/transloadit/assembly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def create!(*ios, **params)
# keeping this method for backward compatibility
#
def submit!(*ios)
warn "#{caller(1..1).first}: warning: Transloadit::Assembly#submit!"\
warn "#{caller(1..1).first}: warning: Transloadit::Assembly#submit!" \
" is deprecated. use Transloadit::Assembly#create! instead"
create!(*ios)
end
Expand Down Expand Up @@ -140,14 +140,14 @@ def to_hash
#
def _wrap_steps_in_hash(steps)
case steps
when nil then steps
when Hash then steps
when Transloadit::Step then steps.to_hash
else
if steps.uniq(&:name) != steps
raise ArgumentError, "There are different Assembly steps using the same name"
end
steps.inject({}) { |h, s| h.update s }
when nil then steps
when Hash then steps
when Transloadit::Step then steps.to_hash
else
if steps.uniq(&:name) != steps
raise ArgumentError, "There are different Assembly steps using the same name"
end
steps.inject({}) { |h, s| h.update s }
end
end

Expand Down
4 changes: 2 additions & 2 deletions lib/transloadit/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def self._hmac(key, message)
#
def api(options = {})
@api ||= case url.host
when String then RestClient::Resource.new(url.host, options)
else RestClient::Resource.new(API_ENDPOINT.host, options)
when String then RestClient::Resource.new(url.host, options)
else RestClient::Resource.new(API_ENDPOINT.host, options)
end
end

Expand Down
6 changes: 3 additions & 3 deletions lib/transloadit/step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def use(input)
options.delete(:use) && return if input.nil?

options[:use] = case input
when Symbol then input.inspect
when Array then input.map { |i| i.name }
else [input.name]
when Symbol then input.inspect
when Array then input.map { |i| i.name }
else [input.name]
end
end

Expand Down
1 change: 0 additions & 1 deletion transloadit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Gem::Specification.new do |gem|
gem.required_ruby_version = ">= 2.1.0"

gem.files = `git ls-files`.split("\n")
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
gem.require_paths = %w[lib]

gem.add_dependency "rest-client"
Expand Down

0 comments on commit 627636f

Please sign in to comment.