Sha256: a762f230c0b203dd0a06436db8c5e4e5e31d16dd0452e57ad8e5fa0387ea94d6

Contents?: true

Size: 607 Bytes

Versions: 6

Compression:

Stored size: 607 Bytes

Contents

module Integrity
  class Notifier
    class Textfile < Notifier::Base
      def self.to_haml
        <<-haml
%p.normal
  %label{ :for => "textfile_notifier_file" } File
  %input.text#textfile_notifier_file{ :name => "notifiers[Textfile][file]", :type => "text", :value => config["file"] }
        haml
      end
      
      def initialize(build, config={})
        super
        @file = @config["file"]
      end
      
      def deliver!
        File.open(@file, "a") do |f|
          f.puts "=== #{short_message} ==="
          f.puts
          f.puts full_message
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 4 rubygems

Version Path
brycethornton-integrity-0.1.7.1 test/helpers/acceptance/textfile_notifier.rb
foca-integrity-0.1.6 test/helpers/acceptance/textfile_notifier.rb
foca-integrity-0.1.7 test/helpers/acceptance/textfile_notifier.rb
foca-integrity-0.1.8 test/helpers/acceptance/textfile_notifier.rb
myronmarston-integrity-0.1.7.1 test/helpers/acceptance/textfile_notifier.rb
integrity-0.1.8 test/helpers/acceptance/textfile_notifier.rb