Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added fix_permissions rake task that enforces canonical file permissi…

…ons on

gem packaging to ensure install-independent gems. Pertains to #171
  • Loading branch information...
commit 8203b791f7624071c1251a0e4a3b3b90f2adfaca 1 parent c3c2794
@colszowka authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 Rakefile
View
8 Rakefile
@@ -5,6 +5,14 @@ require 'bundler/setup'
require 'appraisal'
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.