Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added fix_permissions rake task that enforces canonical file permissi…

…ons on

gem packaging to ensure install-independent gems.

For colszowka/simplecov#171
  • Loading branch information...
commit 54f30621a0bfdc6146380455d2d60b9a0ee4a296 1 parent 87db7fb
@colszowka authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 Rakefile
View
8 Rakefile
@@ -1,6 +1,14 @@
require 'bundler'
Bundler::GemHelper.install_tasks
+# See https://github.com/colszowka/simplecov/issues/171
+desc "Set permissions on all files so they are compatible with both user-local and system-wide installs"
+task :fix_permissions do
+ system 'bash -c "find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;"'
+end
+# Enforce proper permissions on each build
+Rake::Task[:build].prerequisites.unshift :fix_permissions
+
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
Please sign in to comment.
Something went wrong with that request. Please try again.