lib/lolcommits/plugin/yammer.rb in lolcommits-yammer-0.2.0 vs lib/lolcommits/plugin/yammer.rb in lolcommits-yammer-0.3.0

- old
+ new

@@ -28,12 +28,12 @@ end ## # Prompts the user to configure the plugin. # - # If the enabled option is set we attempt to fetch an Oauth token via - # Yammers' Oauth 2 Server Side flow. + # If the enabled option is set we attempt to fetch an Oauth token + # via Yammers' Oauth 2 Server Side flow. # # https://developer.yammer.com/docs/oauth-2#server-side-flow # # @return [Hash] the configured plugin options # @@ -50,20 +50,20 @@ end options end ## - # Post-capture hook, runs after lolcommits captures a snapshot. Posts the - # lolcommit image file to Yammer with a commit message postfixed by a - # #lolcommits topic/hashtag. + # Post-capture hook, runs after lolcommits captures a snapshot. + # Posts the lolcommit file to Yammer with a commit message + # postfixed by a #lolcommits topic/hashtag. # # @return [Boolean] true/false indicating posting was successful # def run_capture_ready print "Posting to Yammer ... " response = RestClient.post( "https://www.yammer.com/api/v1/messages", - { body: yammer_message, attachment1: File.new(runner.main_image) }, + { body: yammer_message, attachment1: File.new(runner.lolcommit_path) }, { 'Authorization' => "Bearer #{configuration[:access_token]}" } ) if response.code != 201 debug response.body.inspect