Sha256: df341c00932742b0ae650b10feaadb56134f398b7654fcad67bafa00405baccc

Contents?: true

Size: 1.08 KB

Versions: 22

Compression:

Stored size: 1.08 KB

Contents

require 'config/requirements'
require 'config/hoe' # setup Hoe + all gem configuration

Dir['tasks/**/*.rake'].each { |rake| load rake }

desc %{Update ".manifest" with the latest list of project filenames. Respect\
.gitignore by excluding everything that git ignores. Update `files` and\
`test_files` arrays in "*.gemspec" file if it's present.}
task :manifest do
  list = Dir['**/*'].sort
  spec_file = Dir['*.gemspec'].first
  list -= [spec_file] if spec_file
  
  File.read('.gitignore').each_line do |glob|
    glob = glob.chomp.sub(/^\//, '')
    list -= Dir[glob]
    list -= Dir["#{glob}/**/*"] if File.directory?(glob) and !File.symlink?(glob)
    puts "excluding #{glob}"
  end
 
  if spec_file
    spec = File.read spec_file
    spec.gsub! /^(\s* s.(test_)?files \s* = \s* )( \[ [^\]]* \] | %w\( [^)]* \) )/mx do
      assignment = $1
      bunch = $2 ? list.grep(/^test\//) : list
      '%s%%w(%s)' % [assignment, bunch.join(' ')]
    end
      
    File.open(spec_file, 'w') {|f| f << spec }
  end
  File.open('.manifest', 'w') {|f| f << list.join("\n") }
end

Version data entries

22 entries across 22 versions & 10 rubygems

Version Path
dbgrandi-googlecharts-1.3.2 Rakefile
ghazel-ghazel-googlecharts-1.4.0.4 Rakefile
ghazel-googlecharts-1.4.0.1 Rakefile
ghazel-googlecharts-1.4.0.2 Rakefile
ghazel-googlecharts-1.4.0.3 Rakefile
ghazel-googlecharts-1.4.0.4 Rakefile
ghazel-googlecharts-1.4.0 Rakefile
laszpio-googlecharts-1.3.6 Rakefile
laszpio-laszpio-googlecharts-1.3.6 Rakefile
matta-googlecharts-1.3.2 Rakefile
mattetti-googlecharts-1.3.3 Rakefile
mattetti-googlecharts-1.3.4 Rakefile
mattetti-googlecharts-1.3.5 Rakefile
mattetti-googlecharts-1.3.6 Rakefile
mattetti-googlecharts-1.3.7 Rakefile
mattetti-googlecharts-1.4.0 Rakefile
mokolabs-googlecharts-1.3.3 Rakefile
mokolabs-googlecharts-1.3.4 Rakefile
ghazel-googlecharts-1.4.0.5 Rakefile
betelgeuse-googlecharts-1.4.1 Rakefile