-
Notifications
You must be signed in to change notification settings - Fork 39
/
ftpd.gemspec
91 lines (81 loc) · 2.3 KB
/
ftpd.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# -*- encoding: utf-8 -*-
# frozen_string_literal: true
require File.join(File.dirname(__FILE__), "lib/ftpd/release")
class Readme
def description
readme = File.open(README_PATH, "r", &:read)
description = readme[/^# FTPD.*\n+((?:.*\n)+?)\n*##/i, 1]
unless description
raise "Unable to extract description from readme"
end
description = remove_badges(description)
description = remove_markdown_link(description)
description = join_lines(description)
description
end
private
README_PATH = File.expand_path("README.md", File.dirname(__FILE__))
private_constant :README_PATH
def remove_markdown_link(description)
regex = %r{
\[
([^\]]+)
\]
(
\[\d+\] |
\([^)]+\)
)
}x
description = description.gsub(regex, '\1')
end
def remove_badges(description)
description.gsub(/^\[!.*\n/, "")
end
def join_lines(description)
description.gsub(/\n/, " ").strip
end
end
Gem::Specification.new do |s|
s.name = "ftpd"
s.version = Ftpd::Release::VERSION
s.required_rubygems_version = Gem::Requirement.new(">= 0")
s.require_paths = ["lib"]
s.authors = ["Wayne Conrad"]
s.date = Ftpd::Release::DATE
s.description = Readme.new.description
s.email = "[email protected]"
s.executables = ["ftpdrb"]
s.extra_rdoc_files = [
"LICENSE.md",
"README.md"
]
s.files = [
".yardopts",
"Changelog.md",
"Gemfile",
"Gemfile.lock",
"LICENSE.md",
"README.md",
"Rakefile",
"bin/ftpdrb",
"ftpd.gemspec",
"insecure-test-cert.pem",
]
s.files += Dir["doc/**/*.md"]
s.files += Dir["examples/**/*.rb"]
s.files += Dir["lib/**/*.rb"]
s.homepage = "http://github.com/wconrad/ftpd"
s.licenses = ["MIT"]
s.required_ruby_version = ">= 1.9.3"
s.rubygems_version = "2.5.1"
s.summary = "Pure Ruby FTP server library"
s.add_runtime_dependency("memoizer", "~> 1.0")
s.add_development_dependency("cucumber", "~> 2.0")
s.add_development_dependency("double-bag-ftps", "~> 0.1", ">= 0.1.4")
s.add_development_dependency("rake", "~> 11.1")
s.add_development_dependency("redcarpet", "~> 3.1")
s.add_development_dependency("rspec", "~> 3.1")
s.add_development_dependency("rspec-its", "~> 1.0")
s.add_development_dependency("timecop", "~> 0.7")
s.add_development_dependency("yard", "~> 0.8.7")
end