Sha256: 3a860437c2027c9ee0d3f5fbb3e00578480b00886589a65919a0f1b58d06c629

Contents?: true

Size: 672 Bytes

Versions: 9

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

9 entries across 9 versions & 1 rubygems

Version Path
fourchette-0.1.2 bin/fourchette
fourchette-0.1.1 bin/fourchette
fourchette-0.1.0 bin/fourchette
fourchette-0.0.8 bin/fourchette
fourchette-0.0.7 bin/fourchette
fourchette-0.0.6 bin/fourchette
fourchette-0.0.5 bin/fourchette
fourchette-0.0.4 bin/fourchette
fourchette-0.0.3 bin/fourchette