lib/travis/client/methods.rb in travis-1.6.14.travis.539.6 vs lib/travis/client/methods.rb in travis-1.6.14.travis.543.6
- old
+ new
@@ -1,6 +1,7 @@
require 'travis/client'
+require 'yaml'
module Travis
module Client
module Methods
def access_token
@@ -85,9 +86,15 @@
def listen(*entities, &block)
listener = Listener.new(session)
listener.subscribe(*entities, &block)
listener.listen
+ end
+
+ def lint(body)
+ body = body.to_yaml unless body.is_a? String
+ result = session.post_raw('/lint', 'content' => body)
+ LintResult.new(result)
end
def hooks
session.get('hooks')['hooks']
end