Class: JsonSchemaSpec::Tasks
- Inherits:
-
Object
- Object
- JsonSchemaSpec::Tasks
- Includes:
- Rake::DSL
- Defined in:
- lib/json_schema_spec/tasks.rb
Instance Method Summary collapse
-
#initialize(url) ⇒ Tasks
constructor
A new instance of Tasks.
Constructor Details
#initialize(url) ⇒ Tasks
Returns a new instance of Tasks.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/json_schema_spec/tasks.rb', line 6 def initialize(url) return unless defined?(Rake) namespace :spec do desc "Download JSON schema to `spec/fixtures`" task :schema do puts "\nDownloading JSON schema to `spec/fixtures`..." path = "#{Rake.original_dir}/spec/fixtures/schema.yml" JsonSchemaSpec.download(path, url) puts "Finished!\n\n" end end end |