Sha256: 4a9fd1071d38219f605de95c02650cba405dece6c97be5ccf449e246974501af

Contents?: true

Size: 953 Bytes

Versions: 1

Compression:

Stored size: 953 Bytes

Contents

#!/usr/bin/env ruby

dirname   = ARGV[0]
classname = ARGV[0].gsub(/(^.|_.)/) { |s| s[-1..-1].upcase }

puts ""
exit unless system(
  "git clone https://github.com/winton/gem_template.git #{dirname}"
)

Dir.chdir(dirname) do
  puts "\nFetching..."
  system("git fetch")

  puts "\nWriting .ruby-gemset..."
  system("echo #{dirname} > .ruby-gemset")

  puts "\nWriting .ruby-version..."
  system("echo #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} > .ruby-version")

  puts "\nInstalling namer..."
  system("gem install namer")

  puts "\nGemTemplate -> #{classname}..."
  system("namer gem_template:#{dirname} GemTemplate:#{classname}")

  puts "\nMerging branches..."
  ARGV[1..-1].each do |branch|
    system("git merge origin/#{branch}")
  end
end

puts ""
puts "\e[32mTo finish setting up your project:\e[0m"
puts "    cd #{dirname}"
puts "    bundle"
puts ""

# -- replace
# #!/usr/bin/env ruby
#
# require File.expand_path("../../lib/gem_template", __FILE__)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gem_template-0.0.4 bin/gem_template