Sha256: 9e9c70e288e24003068cc2744ad73ad3ebac7648dfdc1e9136aafc70c8de87e1

Contents?: true

Size: 1.17 KB

Versions: 9

Compression:

Stored size: 1.17 KB

Contents

# -*- ruby -*-

$LOAD_PATH << 'lib'

require 'rubygems'
require 'hoe'

Hoe.add_include_dirs("../../minitest/dev/lib")

Hoe.plugin :seattlerb

Hoe.spec "ZenTest" do
  developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
  developer 'Eric Hodel', 'drbrain@segment7.net'

  require_rubygems_version [">= 1.8", "< 3.0"]
end

desc "run autotest on itself"
task :autotest do
  ruby "-Ilib -w ./bin/autotest"
end

desc "update example_dot_autotest.rb with all possible constants"
task :update do
  system "p4 edit example_dot_autotest.rb"
  File.open "example_dot_autotest.rb", "w" do |f|
    f.puts "# -*- ruby -*-"
    f.puts
    Dir.chdir "lib" do
      Dir["autotest/*.rb"].sort.each do |s|
        next if s =~ /rails|discover/
        f.puts "# require '#{s[0..-4]}'"
      end
    end

    f.puts

    Dir["lib/autotest/*.rb"].sort.each do |file|
      file = File.read(file)
      m = file[/module.*/].split(/ /).last rescue nil
      next unless m

      file.grep(/def[^(]+=/).each do |setter|
        setter = setter.sub(/^ *def self\./, '').sub(/\s*=\s*/, ' = ')
        f.puts "# #{m}.#{setter}"
      end
    end
  end
  system "p4 diff -du example_dot_autotest.rb"
end

# vim:syntax=ruby

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
cloudsmith-api-0.30.7 vendor/bundle/ruby/2.3.0/gems/ZenTest-4.11.1/Rakefile
color_me_shop-1.0.0 vendor/bundle/ruby/2.5.0/gems/ZenTest-4.11.1/Rakefile
cloudsmith-api-0.21.4 vendor/bundle/ruby/2.3.0/gems/ZenTest-4.11.1/Rakefile
ZenTest-4.11.1 Rakefile
dwolla_swagger-1.0.6 vendor/bundle/ruby/2.2.0/gems/ZenTest-4.11.0/Rakefile
ZenTest-4.11.0 Rakefile
ZenTest-4.10.1 Rakefile
ZenTest-4.10.0 Rakefile
ZenTest-4.9.5 Rakefile