lib/tasks/spectifly.rake in spectifly-0.0.3 vs lib/tasks/spectifly.rake in spectifly-0.0.4

- old
+ new

@@ -28,18 +28,17 @@ File.open(File.join(args[:destination_path], "extended.xsd"), 'w') do |f| f.write Spectifly::Xsd::Types.build_extended end end - Spectifly::Task.new('ensure_presenter_validity', [:destination_path]) do |spectifly, args| - # just copy all the xsds over into each presenter directory, for easy zipping and whatnot + Spectifly::Task.new('package_presenter_schemas', [:destination_path]) do |spectifly, args| + # just copy all the xsds over into each directory (naively assuming all directories are presenters), for easy zipping and whatnot schema = Dir.glob(File.join(args[:destination_path], '*.xsd')) - directories = (Dir.glob(File.join(args[:destination_path], "*")) - schema) - directories.each do |path| + Dir.glob(File.join(args[:destination_path], '*/')).each do |path| FileUtils.cp schema, path end end desc 'Generate all XSDs for the configured entity directory, including extended type definitions' - task :generate_all, [:destination_path] => [:generate_from_entities, :generate_extended_types, :ensure_presenter_validity] + task :generate_all, [:destination_path] => [:generate_from_entities, :generate_extended_types, :package_presenter_schemas] end end