remove query and permission
This commit is contained in:
parent
cf20650d39
commit
2d00e16962
|
@ -1,9 +0,0 @@
|
|||
require 'travis/api/v3/permissions/generic'
|
||||
|
||||
module Travis::API::V3
|
||||
class Permissions::Lint < Permissions::Generic
|
||||
def lint?
|
||||
write?
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
require 'travis/yaml'
|
||||
|
||||
module Travis::API::V3
|
||||
class Queries::Lint < Query
|
||||
def lint
|
||||
request.body.rewind
|
||||
content = params[:content] || request.body.read
|
||||
parsed = Travis::Yaml.parse(content)
|
||||
warnings = parsed.nested_warnings.map { |k, m| { key: k, message: m } }
|
||||
payload = { lint: { warnings: warnings } }.to_json
|
||||
payload
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,7 +1,12 @@
|
|||
module Travis::API::V3
|
||||
class Services::Lint::Lint < Service
|
||||
def run!
|
||||
lint
|
||||
request.body.rewind
|
||||
content = params[:content] || request.body.read
|
||||
parsed = Travis::Yaml.parse(content)
|
||||
warnings = parsed.nested_warnings.map { |k, m| { key: k, message: m } }
|
||||
payload = { lint: { warnings: warnings } }.to_json
|
||||
payload
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user