Sha256: d7e2a00b9fbc8d1722800af511a97d37268b755c3c42ff37520229d5e3e58dc2

Contents?: true

Size: 672 Bytes

Versions: 2

Compression:

Stored size: 672 Bytes

Contents

#!/usr/bin/env ruby

require 'thor'

module Fourchette
  class CLI < Thor
    include Thor::Actions

    desc 'new APP_NAME', 'This will create a fourchette app for you under APP_NAME directory.'
    def new(name)
      # Create directory
      empty_directory(name)

      # Copy template files
      ['Gemfile', 'config.ru', 'Procfile', 'Rakefile', 'config/puma.rb', 'callbacks.rb'].each do |file_name|
        copy_file(file_name, "#{name}/#{file_name}")
      end

      # Run bundle install
      run("bundle install --gemfile #{name}/Gemfile")
    end
  end
end

Fourchette::CLI.source_root(File.expand_path('../../templates', __FILE__))
Fourchette::CLI.start(ARGV)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fourchette-0.1.4 bin/fourchette
fourchette-0.1.3 bin/fourchette