Sha256: 925e324b7c1325cf74c2fec89d233f9b8e3f96231a01e0c614fac05e0400ac98
Contents?: true
Size: 795 Bytes
Versions: 10
Compression:
Stored size: 795 Bytes
Contents
module Outboxer class InstallGenerator < Rails::Generators::Base include Rails::Generators::Migration source_root File.expand_path("templates", __dir__) def self.next_migration_number(dirname) next_number = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i next_number += 1 while Dir.glob("#{dirname}/#{next_number}*").any? next_number.to_s end def copy_bin_file template "bin/publisher.rb", "bin/publisher" run "chmod +x bin/publisher" end def copy_migrations migration_template( "migrations/create_outboxer_messages.rb", "db/migrate/create_outboxer_messages.rb") migration_template( "migrations/create_outboxer_exceptions.rb", "db/migrate/create_outboxer_exceptions.rb") end end end
Version data entries
10 entries across 10 versions & 1 rubygems