Adjusts Run Post Install

This commit is contained in:
Dlani Mendes 2015-10-02 18:14:19 -03:00
parent 4c73f4bc68
commit 12f3b76348
4 changed files with 18 additions and 14 deletions

View File

@ -6,7 +6,7 @@ before_install:
rvm: rvm:
- 2.1.0 - 2.1.0
script: script:
- bundle exec rake - bundle exec rake checks
notifications: notifications:
email: email:
recipients: recipients:

View File

@ -1,7 +1,21 @@
require "bundler/gem_tasks"
require "rubocop/rake_task" require "rubocop/rake_task"
require "rspec/core/rake_task" require "rspec/core/rake_task"
require "pathname"
require "fileutils"
RuboCop::RakeTask.new RuboCop::RakeTask.new
RSpec::Core::RakeTask.new(:rspec) RSpec::Core::RakeTask.new(:rspec)
task default: [:rubocop, :rspec] task :create_man do |_t|
os_prefix = "/usr/local"
man_prefix = Pathname("#{os_prefix}/share/man/man1")
man_pages = "man/git-*"
Pathname.glob(man_pages) do |path|
FileUtils.cp(path, man_prefix + path.basename)
end
end
task checks: [:rubocop, :rspec]
task default: [:checks, :create_man]

View File

@ -1,10 +0,0 @@
PREFIX = "/usr/local"
MANPREFIX = "#{PREFIX}/share/man/man1"
MAN_PAGES = "man/git-*"
require "fileutils"
Dir.glob(MAN_PAGES).each do |f|
filename = File.basename(f)
FileUtils.cp(f, "#{MANPREFIX}/#{filename}")
end

View File

@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
spec.description = "Changelog generation has never been so easy. Fully automate changelog generation - this gem generate change log file based on tags, issues and merged pull requests from Github issue tracker." spec.description = "Changelog generation has never been so easy. Fully automate changelog generation - this gem generate change log file based on tags, issues and merged pull requests from Github issue tracker."
spec.homepage = "https://github.com/skywinder/Github-Changelog-Generator" spec.homepage = "https://github.com/skywinder/Github-Changelog-Generator"
spec.license = "MIT" spec.license = "MIT"
spec.extensions = "ext/mkrf_conf.rb" spec.extensions = ["Rakefile"]
spec.files = `git ls-files -z`.split("\x0") spec.files = `git ls-files -z`.split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }