File: Rakefile

package info (click to toggle)
ruby-hoe 4.6.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 464 kB
  • sloc: ruby: 2,245; makefile: 5
file content (54 lines) | stat: -rw-r--r-- 1,238 bytes parent folder | download
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
50
51
52
53
54
# -*- ruby -*-

$:.unshift "lib"
require "./lib/hoe.rb"

Hoe.plugin :seattlerb
Hoe.plugin :isolate
Hoe.plugin :rdoc
Hoe.plugin :cov

Hoe.spec "hoe" do
  developer "Ryan Davis", "ryand-ruby@zenspider.com"

  self.group_name = "seattlerb"

  blog_categories << "Seattle.rb" << "Ruby"

  license "MIT"

  pluggable!
  require_rubygems_version ">= 3.0"
  require_ruby_version ">= 3.2"

  dependency "rake", "~> 13.0" # FIX: to force it to exist pre-isolate
end

task :plugins do
  puts `find lib/hoe -name \*.rb | xargs grep -h module.Hoe::`.
    gsub(/module/, "*")
end

task :known_plugins do
  dep         = Gem::Dependency.new(/^hoe-/, Gem::Requirement.default)
  fetcher     = Gem::SpecFetcher.fetcher
  spec_tuples = fetcher.search_for_dependency(dep).flatten(1)

  max = spec_tuples.map { |(tuple, _source)| tuple.name.size }.max

  spec_tuples.sort_by { |(tuple, _source)| tuple.name }.each do |(tuple, source)|
    spec = source.fetch_spec(tuple)
    summary = spec
                .summary
                .gsub(/\[([^\]]+)\](?:[\[\(].*?[\]\)])?/, '\1')

    puts "* %-#{max}s - %s (%s)" % [spec.name, summary, spec.authors.first]
  end
end

task :docs do
  cp "Hoe.pdf", "doc"
  sh "chmod ug+w doc/Hoe.pdf"
end

# vim: syntax=ruby