-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathyard-rspec.gemspec
65 lines (50 loc) · 1.83 KB
/
yard-rspec.gemspec
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
55
56
57
58
59
60
61
62
63
64
65
require 'YARD'
require File.dirname(__FILE__) + "/lib/yard-rspec"
module RSpecInTheYARD
extend self
def show_version_changes(version)
date = ""
changes = []
grab_changes = false
File.open("#{File.dirname(__FILE__)}/History.txt",'r') do |file|
while (line = file.gets) do
if line =~ /^===\s*#{version.gsub('.','\.')}\s*\/\s*(.+)\s*$/
grab_changes = true
date = $1.strip
elsif line =~ /^===\s*.+$/
grab_changes = false
elsif grab_changes
changes = changes << line
end
end
end
{ :date => date, :changes => changes }
end
end
Gem::Specification.new do |s|
s.name = 'yard-rspec'
s.version = ::RSpecInTheYARD::VERSION
s.authors = ["Franklin Webber"]
s.description = %{
YARD-Rspec is a YARD extension that processes RSpec tests and provides documentation
interface that allows you easily view and investigate the test suite. }
s.summary = "RSpec in YARD"
s.email = '[email protected]'
s.homepage = "http://github.com/burtlo/yard-rspec"
s.platform = Gem::Platform::RUBY
changes = RSpecInTheYARD.show_version_changes(::RSpecInTheYARD::VERSION)
s.post_install_message = %{
(##) (##) (##) (##) (##) (##) (##) (##) (##) (##) (##) (##) (##) (##) (##)
Thank you for installing yard-rspec #{::RSpecInTheYARD::VERSION} / #{changes[:date]}.
Changes:
#{changes[:changes].collect{|change| " #{change}"}.join("")}
(##) (##) (##) (##) (##) (##) (##) (##) (##) (##) (##) (##) (##) (##) (##)
}
s.add_dependency 'rspec', '~> 2.0'
s.add_dependency 'yard', '>= 0.6.3'
s.rubygems_version = "1.3.7"
s.files = `git ls-files`.split("\n")
s.extra_rdoc_files = ["README.md", "History.txt"]
s.rdoc_options = ["--charset=UTF-8"]
s.require_path = "lib"
end