Sha256: c60b96beb7792bc1d03a40f36c545e3a456188d247f6258ed4b2377e0e202c49
Contents?: true
Size: 1.3 KB
Versions: 6
Compression:
Stored size: 1.3 KB
Contents
require "bundler/gem_tasks" require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:spec) do |t| t.rspec_opts = "--exclude-pattern \'spec/**/*suite_spec.rb\'" end task default: :spec desc "Update Library Files" task :libraries do # puts "Updating Library Files" require "fileutils" libs = ["topolys", "osut", "oslg", "tbd"] files = {} $:.each do |path| libs.each do |l| next unless path.include?(l) files[l] = Dir.glob(File.join(path, "#{l}/*.rb")) files[l].delete_if { |f| f.include?("version.rb") } unless l == "topolys" # puts "#{l} lib files:" # files[l].each { |lf| puts "... #{lf}" } # puts end end dirs = Dir.glob(File.join(__dir__, "lib/measures/*")) dirs.each do |dir| files.values.each do |items| items.each { |file| FileUtils.cp(file, "#{dir}/resources/.") } end end end desc "Update Measure" task measure: [:libraries] do # puts "Updating Measure" require "openstudio" require "open3" cli = OpenStudio.getOpenStudioCLI command = "#{cli} measure -t './lib/measures'" out, err, ps = Open3.capture3({ "BUNDLE_GEMFILE" => nil }, command) raise "Failed to update measures\n\n#{out}\n\n#{err}" unless ps.success? end task spec: [:measure] # default spec test depends on updating measure, lib files
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
tbd-3.4.1 | Rakefile |
tbd-3.4.0 | Rakefile |
tbd-3.3.0 | Rakefile |
tbd-3.2.3 | Rakefile |
tbd-3.2.2 | Rakefile |
tbd-3.2.1 | Rakefile |