Sha256: c325fe19b149a063a9040c02625d9172193a77a3da33bbe0aa127624542212f5

Contents?: true

Size: 518 Bytes

Versions: 27

Compression:

Stored size: 518 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(0o744, "bin/#{file}")
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
bin_install-0.0.13 lib/generators/bin_install/install_generator.rb
bin_install-0.0.12 lib/generators/bin_install/install_generator.rb
bin_install-0.0.11 lib/generators/bin_install/install_generator.rb
bin_install-0.0.10 lib/generators/bin_install/install_generator.rb
bin_install-0.0.9 lib/generators/bin_install/install_generator.rb
bin_install-0.0.6 lib/generators/bin_install/install_generator.rb
bin_install-0.0.5 lib/generators/bin_install/install_generator.rb