Sha256: fdabe04e97c12d2e64c4c78be76b701574dbdc0ec08b4820fe727f696fa1af12

Contents?: true

Size: 1.36 KB

Versions: 1

Compression:

Stored size: 1.36 KB

Contents

# need { 'lib/amp/extensions/ditz' }
# need { 'lib/amp/extensions/lighthouse' }

# Amp::LighthouseHook.add_hooks(:commit) do |hook|
#   hook.token   = 'e4d6af1951c240e00c216bad3c52cf269cba4a7c'
#   hook.account = 'carbonica'
#   hook.project = 'amp'
# end

Amp::Command.new("silly") do |c|
  c.workflow :hg
  c.on_run do |options, args|
    puts "You're silly!"
    puts "You're REALLLY silly!"
  end
  c.desc "tell you how silly you are"
end

# command :push do |c|
#  c.before { system "hg verify" }
# end

template :silly, <<-EOF
<%= change_node.inspect %> <%= revision %>
EOF

command "stats" do |c|
  c.workflow :hg
  c.desc "Prints how many commits each user has contributed"
  c.on_run do |opts, args|
    repo = opts[:repository]
    users = Hash.new {|h, k| h[k] = 0}
    repo.each do |changeset|
      users[changeset.user.split("@").first] += 1 #
    end
    users.to_a.sort {|a,b| b[1] <=> a[1]}.each do |u,c|
      puts "#{u}: #{c}"
    end
  end
end

# bisect_command

namespace :docs do
  
  command "gen" do |c|
    c.desc "create the docs"
    c.on_run {|o, a| `rake yard:doc`; puts 'docs made!' }
  end
  
  command "upload" do |c|
    c.desc "upload the docs"
    c.on_run {|o, a| puts "docs uploaded!!!!" }
  end
  
  namespace :search do
    
    command "methods" do |c|
      c.desc "search method names"
      c.on_run {|o, a| puts "#{a.inspect}"}
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
amp-0.5.3 ampfile.rb