Created
April 29, 2015 19:30
-
-
Save tenderlove/1a4609a6cf9e306e5b81 to your computer and use it in GitHub Desktop.
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
diff --git a/Rakefile b/Rakefile | |
index 15c7b7c..5a622e7 100644 | |
--- a/Rakefile | |
+++ b/Rakefile | |
@@ -64,7 +64,24 @@ $hoe = Hoe.spec 'psych' do | |
end | |
end | |
end | |
-$hoe.spec.files << 'lib/psych.jar' | |
+ | |
+def gem_build_path | |
+ File.join 'pkg', $hoe.spec.full_name | |
+end | |
+ | |
+def add_file_to_gem relative_path | |
+ target_path = File.join gem_build_path, relative_path | |
+ target_dir = File.dirname(target_path) | |
+ mkdir_p target_dir unless File.directory?(target_dir) | |
+ rm_f target_path | |
+ safe_ln relative_path, target_path | |
+ p "HI MOM" => relative_path | |
+ $hoe.spec.files.concat [relative_path] | |
+end | |
+ | |
+if java? | |
+ add_file_to_gem 'lib/psych.jar' | |
+end | |
Hoe.add_include_dirs('.:lib/psych') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment