Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add binaries and all files in gem

  • Loading branch information...
commit 3ba56a8da83974aaf2840b5706ba3bc60d0942e2 1 parent 5a14bab
@richkilmer authored
Showing with 37 additions and 3 deletions.
  1. +31 −0 bin/hotcocoa
  2. +6 −3 hotcocoa.gemspec
View
31 bin/hotcocoa
@@ -0,0 +1,31 @@
+#!/usr/bin/env macruby
+
+project_name = ARGV.shift
+
+if project_name.nil? or project_name == "--help" or project_name =="-h"
+ puts "Usage: hotcocoa <project name>"
+ exit
+end
+
+if File.exist?(project_name)
+ if File.extname(project_name) == ".rb"
+ file_to_copy = project_name
+ project_name = project_name[0..-4]
+ else
+ puts %{Error: "#{project_name}" already exists in this directory.}
+ exit
+ end
+else
+ file_to_copy = nil
+end
+
+require 'hotcocoa/template'
+HotCocoa::Template.copy_to(project_name, project_name.split("_").collect(&:capitalize).join(" "))
+
+if file_to_copy
+ lib_dir = File.join(project_name, "lib")
+ File.open(File.join(lib_dir, "application.rb"), "w") do |file|
+ file.write File.read(file_to_copy)
+ end
+end
+
View
9 hotcocoa.gemspec
@@ -3,12 +3,15 @@ require 'rubygems'
spec = Gem::Specification.new do |s|
s.name = 'hotcocoa'
- s.version = "0.0.5"
+ s.version = "0.5"
s.platform = Gem::Platform::RUBY
s.summary = "Cococa mapping library for MacRuby"
- s.files = Dir.glob("lib/**/*.rb")
+ s.description = "HotCocoa is a Cococa mapping library for MacRuby. It simplifies the use of complex Cocoa classes using DSL techniques."
+ s.files = Dir.glob("{lib,template,test,bin}/**/*") + ['History.txt']
s.require_path = 'lib'
-
+ s.bindir = 'bin'
+ s.default_executable = 'hotcocoa'
+ s.executables = ['hotcocoa']
s.author = "Richard Kilmer"
s.email = "rich@infoether.com"
s.rubyforge_project = "hotcocoa"
Please sign in to comment.
Something went wrong with that request. Please try again.