Sha256: 2cebf724fb07d52c8b45f891c46c41f34bde2594d9aaa6e70f6026fd09c912c6

Contents?: true

Size: 539 Bytes

Versions: 3

Compression:

Stored size: 539 Bytes

Contents

require 'generators/ixtlan/base'
module Ixtlan
  module Generators
    class AuditBase < Base

      def create
        args = []
        if name
          args << ARGV.shift
        else
          args << "audit"
        end

        args += ['login:string', 'message:string']
        args += ARGV
        
        args += ["--read-only", "--timestamps"]

        generate generator_name, *args
      end

      def add_gem
        gem 'ixtlan-audit' unless File.read('Gemfile') =~ /gem\s['"]ixtlan-audit['"]/
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ixtlan-generators-0.1.7 lib/generators/ixtlan/audit_base.rb
ixtlan-generators-0.1.5 lib/generators/ixtlan/audit_base.rb
ixtlan-generators-0.1.4 lib/generators/ixtlan/audit_base.rb