Correct output bug in the NOTICE-ruby generator
This commit is contained in:
parent
578779ee90
commit
34a7282742
2 changed files with 5973 additions and 3 deletions
5971
NOTICE-ruby
5971
NOTICE-ruby
File diff suppressed because one or more lines are too long
|
@ -19,18 +19,19 @@ namespace :notice do
|
||||||
:timeout => 120
|
:timeout => 120
|
||||||
}
|
}
|
||||||
result = HTTParty.post("https://api.clearlydefined.io/notices", @options.merge(body:JSON::generate({coordinates: result})))
|
result = HTTParty.post("https://api.clearlydefined.io/notices", @options.merge(body:JSON::generate({coordinates: result})))
|
||||||
|
JSON::parse(result.body)['content']
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "generating NOTICE-ruby from ClearlyDefined.io"
|
desc "generating NOTICE-ruby from ClearlyDefined.io"
|
||||||
task :update do
|
task :update do
|
||||||
result = get_notice_ruby
|
result = get_notice_ruby
|
||||||
File.write('NOTICE-ruby', result.body)
|
File.write('NOTICE-ruby', result)
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "checking whether NOTICE-ruby matches the one on ClearlyDefined.io"
|
desc "checking whether NOTICE-ruby matches the one on ClearlyDefined.io"
|
||||||
task :verify do
|
task :verify do
|
||||||
result = get_notice_ruby
|
result = get_notice_ruby
|
||||||
raise "NOTICE-ruby is not up to date. Run bin/rails notice:ruby:update to update the file." if result.body != File.read('NOTICE-ruby')
|
raise "NOTICE-ruby is not up to date. Run bin/rails notice:ruby:update to update the file." if result != File.read('NOTICE-ruby')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue