-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrley.gemspec
78 lines (66 loc) · 2.03 KB
/
rley.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
# frozen_string_literal: true
# File: rley.gemspec
# Gem specification file for the Rley project.
require 'rubygems'
# The next line generates an error with Bundler
require_relative './lib/rley/constants'
def pkg_description(aPackage)
aPackage.name = 'rley'
aPackage.version = Rley::Version
aPackage.author = 'Dimitri Geshef'
aPackage.email = '[email protected]'
aPackage.homepage = 'https://github.com/famished-tiger/Rley'
aPackage.platform = Gem::Platform::RUBY
aPackage.summary = Rley::Description
aPackage.description = 'A general parser using the Earley algorithm.'
aPackage.post_install_message = <<EOSTRING
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thank you for installing Rley...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EOSTRING
end
def pkg_files(aPackage)
file_list = Dir[
'.rubocop.yml',
'.rspec',
'.ruby-gemset',
'.ruby-version',
'.travis.yml',
'.yardopts',
'appveyor.yml',
'Gemfile',
'Rakefile',
'CHANGELOG.md',
'LICENSE.txt',
'README.md',
'examples/**/*.*',
'lib/*.*',
'lib/**/*.rb',
'spec/**/*.rb'
]
aPackage.files = file_list
aPackage.test_files = Dir['spec/**/*_spec.rb']
aPackage.require_path = 'lib'
end
def pkg_documentation(aPackage)
aPackage.rdoc_options << '--charset=UTF-8 --exclude="examples|features|spec"'
aPackage.extra_rdoc_files = ['README.md']
end
RLEY_GEMSPEC = Gem::Specification.new do |pkg|
pkg_description(pkg)
pkg_files(pkg)
pkg_documentation(pkg)
# Here we have the runtime external dependency (prime library has been demoted to a bundled gem)
pkg.add_runtime_dependency('prime', '~> 0.1.0')
# Here we have the development external dependencies
pkg.add_development_dependency 'rake', '~> 13.0', '>= 13.0.0'
pkg.add_development_dependency 'rspec', '~> 3.5', '>= 3.5.0'
pkg.add_development_dependency 'rubygems', '~> 2.0', '>= 2.0.0'
pkg.license = 'MIT'
pkg.required_ruby_version = '>= 2.6.0'
end
if $PROGRAM_NAME == __FILE__
require 'rubygems/package'
Gem::Package.build(RLEY_GEMSPEC)
end
# End of file