-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include a mergit-standalone in the .gem
It's practically free since it'll compress to nothing (it's all duplicate text).
- Loading branch information
Showing
3 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
*.gem | ||
*.rbc | ||
/bin/mergit-standalone | ||
/.bundle/ | ||
.config | ||
.yardoc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
require "bundler/gem_tasks" | ||
require "rspec/core/rake_task" | ||
require 'yard' | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
require 'mergit' | ||
|
||
task :default => :spec | ||
|
||
def merge_file infile, outfile | ||
mergit = Mergit.new(:search_path => ['lib']) | ||
File.open(outfile, 'w', 0755) do |f| | ||
f.write mergit.process_file(infile) | ||
end | ||
end | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
|
||
YARD::Rake::YardocTask.new do |t| | ||
t.files = ['lib/**/*.rb', '**/*.md'] | ||
end | ||
|
||
desc "Build a standalone version of mergit" | ||
task :standalone => 'bin/mergit-standalone' | ||
|
||
file 'bin/mergit-standalone' => ['bin/mergit', 'Rakefile'] + Dir['lib/**/*.rb'] do | ||
merge_file 'bin/mergit', 'bin/mergit-standalone' | ||
end | ||
|
||
task :build => :standalone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters