rubocop: fix various issues
This commit is contained in:
@@ -40,7 +40,7 @@ class DeviantArtApiClient
|
|||||||
mature_content: mature_content,
|
mature_content: mature_content,
|
||||||
ext_submission: ext_submission,
|
ext_submission: ext_submission,
|
||||||
ext_camera: ext_camera,
|
ext_camera: ext_camera,
|
||||||
ext_stats: ext_stats,
|
ext_stats: ext_stats
|
||||||
}
|
}
|
||||||
|
|
||||||
request("deviation/metadata", **params)
|
request("deviation/metadata", **params)
|
||||||
|
|||||||
@@ -201,8 +201,6 @@ module Sources
|
|||||||
end.gsub(/\A[[:space:]]+|[[:space:]]+\z/, "")
|
end.gsub(/\A[[:space:]]+|[[:space:]]+\z/, "")
|
||||||
end
|
end
|
||||||
|
|
||||||
public
|
|
||||||
|
|
||||||
def self.deviation_id_from_url(url)
|
def self.deviation_id_from_url(url)
|
||||||
if url =~ ASSET
|
if url =~ ASSET
|
||||||
$~[:base36_deviation_id].try(:to_i, 36)
|
$~[:base36_deviation_id].try(:to_i, 36)
|
||||||
@@ -308,7 +306,7 @@ module Sources
|
|||||||
{
|
{
|
||||||
deviation: api_deviation,
|
deviation: api_deviation,
|
||||||
metadata: api_metadata,
|
metadata: api_metadata,
|
||||||
download: api_download,
|
download: api_download
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -40,15 +40,15 @@ module Sources
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.stash_id_from_url(url)
|
def self.stash_id_from_url(url)
|
||||||
if url =~ STASH
|
if url =~ STASH
|
||||||
$~[:post_id].downcase
|
$~[:post_id].downcase
|
||||||
else
|
else
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def stash_id
|
def stash_id
|
||||||
[url, referer_url].map{ |x| self.class.stash_id_from_url(x) }.compact.first
|
[url, referer_url].map { |x| self.class.stash_id_from_url(x) }.compact.first
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user