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.33 lib/generators/bin_install/install_generator.rb
bin_install-0.0.32 lib/generators/bin_install/install_generator.rb
bin_install-0.0.31 lib/generators/bin_install/install_generator.rb
bin_install-0.0.30 lib/generators/bin_install/install_generator.rb
bin_install-0.0.29 lib/generators/bin_install/install_generator.rb
bin_install-0.0.28 lib/generators/bin_install/install_generator.rb
bin_install-0.0.27 lib/generators/bin_install/install_generator.rb
bin_install-0.0.26 lib/generators/bin_install/install_generator.rb
bin_install-0.0.25 lib/generators/bin_install/install_generator.rb
bin_install-0.0.24 lib/generators/bin_install/install_generator.rb
bin_install-0.0.23 lib/generators/bin_install/install_generator.rb
bin_install-0.0.22 lib/generators/bin_install/install_generator.rb
bin_install-0.0.21 lib/generators/bin_install/install_generator.rb
bin_install-0.0.20 lib/generators/bin_install/install_generator.rb
bin_install-0.0.19 lib/generators/bin_install/install_generator.rb
bin_install-0.0.18 lib/generators/bin_install/install_generator.rb
bin_install-0.0.17 lib/generators/bin_install/install_generator.rb
bin_install-0.0.16 lib/generators/bin_install/install_generator.rb
bin_install-0.0.15 lib/generators/bin_install/install_generator.rb
bin_install-0.0.14 lib/generators/bin_install/install_generator.rb