Sha256: cfcb5ab38ec58937945e4961838e6822791c12d3f09797252db183a66f101450

Contents?: true

Size: 517 Bytes

Versions: 1

Compression:

Stored size: 517 Bytes

Contents

require 'rails/generators/base'

module BinInstall
  module Generators
    class InstallGenerator < ::Rails::Generators::Base
      source_root File.expand_path('templates', __dir__)

      desc 'Copies scripts to your bin directory.'
      def copy_scripts
        copy_bin_file 'install'
        copy_bin_file 'update'
        copy_bin_file 'kill'
      end

      private

      def copy_bin_file(file)
        copy_file file, "bin/#{file}"
        FileUtils.chmod(0744, "bin/#{file}")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bin_install-0.0.4 lib/generators/bin_install/install_generator.rb