Sha256: 9382a3c0627ab438973fafadbdb4c8786e1727c77204ffd26ebb322b3d0cafe7
Contents?: true
Size: 625 Bytes
Versions: 4
Compression:
Stored size: 625 Bytes
Contents
require 'rails/generators/base' module Danthes module Generators class Base < Rails::Generators::Base def self.source_root File.dirname(__FILE__) + '/templates' end def self.banner "rails generate danthes:#{generator_name}" end private def add_gem(name, options = {}) gemfile_path = File.join(destination_root, 'Gemfile') gemfile_content = File.read(gemfile_path) File.open(gemfile_path, 'a') { |f| f.write("\n") } unless gemfile_content =~ /\n\Z/ gem name, options unless gemfile_content.include? name end end end end
Version data entries
4 entries across 4 versions & 2 rubygems