public
Rubygem
Description: Deploy scripting with Thor using remote Ruby execution
Clone URL: git://github.com/wesabe/robot-army.git
robot-army / Thorfile
100644 49 lines (42 sloc) 1.352 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
require 'rubygems'
require 'rubygems/specification'
require 'thor/tasks'
 
Dir[File.join(File.dirname(__FILE__), 'examples', '*.rb')].each {|f| require f}
 
GEM = "robot-army"
GEM_VERSION = "0.1.1"
AUTHOR = "Brian Donovan"
EMAIL = "brian@wesabe.com"
HOMEPAGE = "http://github.com/wesabe/robot-army"
SUMMARY = "Deploy using Thor by executing Ruby remotely"
PROJECT = "robot-army"
 
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.markdown", "LICENSE"]
  s.summary = SUMMARY
  s.description = s.summary
  s.author = AUTHOR
  s.email = EMAIL
  s.homepage = HOMEPAGE
  s.rubyforge_project = PROJECT
  s.date = Time.now.strftime('%Y-%m-%d')
  
  s.require_path = 'lib'
  s.files = %w(LICENSE README.markdown Rakefile) + Dir.glob("{bin,lib,specs}/**/*")
  s.add_dependency("ruby2ruby", ["> 1.1.7"])
  s.add_dependency("thor", ["> 0.0.0"])
end
 
class Default < Thor
  # Set up standard Thortasks
  spec_task(Dir["spec/**/*_spec.rb"])
  spec_task(Dir["spec/**/*_spec.rb"], :name => "rcov", :rcov =>
    {:exclude => %w(spec /Library /Users task.thor lib/getopt.rb)})
  install_task SPEC
  
  desc "make_spec", "make a gemspec file"
  def make_spec
    File.open("#{GEM}.gemspec", "w") do |file|
      file.puts SPEC.to_ruby
    end
  end
end