summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorAdam Jacob <adam@hjksolutions.com>2009-03-12 17:40:24 -0700
committerAdam Jacob <adam@hjksolutions.com>2009-03-12 17:40:24 -0700
commite5fdd8ab3aa158c9264ebc3fb5e61df1e99bc874 (patch)
tree74123d029657c25edfc2fa41412f34218913e04b /Rakefile
downloadmixlib-cli-e5fdd8ab3aa158c9264ebc3fb5e61df1e99bc874.tar.gz
Initial commit
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile60
1 files changed, 60 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..058ed05
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,60 @@
+require 'rubygems'
+require 'rake/gempackagetask'
+require 'rubygems/specification'
+require 'date'
+require 'spec/rake/spectask'
+require 'cucumber/rake/task'
+
+GEM = "mixlib-cli"
+GEM_VERSION = "1.0.0"
+AUTHOR = "Opscode, Inc."
+EMAIL = "info@opscode.com"
+HOMEPAGE = "http://www.opscode.com"
+SUMMARY = "A simple mixin for CLI interfaces, including option parsing"
+
+spec = Gem::Specification.new do |s|
+ s.name = GEM
+ s.version = GEM_VERSION
+ s.platform = Gem::Platform::RUBY
+ s.has_rdoc = true
+ s.extra_rdoc_files = ["README.rdoc", "LICENSE", "NOTIFY" ]
+ s.summary = SUMMARY
+ s.description = s.summary
+ s.author = AUTHOR
+ s.email = EMAIL
+ s.homepage = HOMEPAGE
+
+ # Uncomment this to add a dependency
+ # s.add_dependency "foo"
+
+ s.require_path = 'lib'
+ s.autorequire = GEM
+ s.files = %w(LICENSE README.rdoc Rakefile NOTIFY) + Dir.glob("{lib,spec}/**/*")
+end
+
+task :default => :test
+
+desc "Run specs"
+Spec::Rake::SpecTask.new do |t|
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ t.spec_opts = %w(-fs --color)
+end
+
+desc "Run the spec"
+task :test => [ :spec ]
+
+Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.gem_spec = spec
+end
+
+desc "install the gem locally"
+task :install => [:package] do
+ sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}}
+end
+
+desc "create a gemspec file"
+task :make_spec do
+ File.open("#{GEM}.gemspec", "w") do |file|
+ file.puts spec.to_ruby
+ end
+end \ No newline at end of file