-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathforeman_virt_who_configure.gemspec
33 lines (29 loc) · 1.41 KB
/
foreman_virt_who_configure.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
require_relative 'lib/foreman_virt_who_configure/version'
require 'date'
begin
Dir["locale/**/*.po"].each do |po|
mo = po.sub(/foreman_virt_who_configure\.po$/, "LC_MESSAGES/foreman_virt_who_configure.mo")
STDERR.puts "WARNING: File #{mo} does not exist, generate with 'make all-mo'!" unless File.exist?(mo)
STDERR.puts "WARNING: File #{mo} outdated, regenerate with 'make all-mo'" if File.mtime(po) > File.mtime(mo)
# Adding this so you can actually build the gem and the warnings come out, without this
# we get an error when making the gem and it fails as well as a ruby error if the mo files don't exist
rescue => e
puts "#{e} not found"
end
end
Gem::Specification.new do |s|
s.name = 'foreman_virt_who_configure'
s.version = ForemanVirtWhoConfigure::VERSION
s.date = Date.today.to_s
s.authors = ['Foreman virt-who-configure team']
s.email = ['foreman-dev@googlegroups.com']
s.homepage = 'https://github.com/theforeman/foreman_virt_who_configure'
s.summary = 'A plugin to make virt-who configuration easy'
s.description = 'A plugin to make virt-who configuration easy'
s.license = 'GPLv3'
s.files = Dir['{app,config,db,lib,locale}/**/*'] + ['LICENSE', 'Rakefile', 'README.md']
s.test_files = Dir['test/**/*']
s.add_dependency 'katello'
s.add_development_dependency('theforeman-rubocop', '~> 0.0.6')
s.add_development_dependency 'rdoc'
end