Skip to content

Instantly share code, notes, and snippets.

@MaksimenkoPG
Last active May 16, 2021 18:03
Show Gist options
  • Save MaksimenkoPG/5ed8bbdc4f40c4dbcbbc4834d6a1156e to your computer and use it in GitHub Desktop.
Save MaksimenkoPG/5ed8bbdc4f40c4dbcbbc4834d6a1156e to your computer and use it in GitHub Desktop.
# lib/tasks/print_repository_info.rake
require 'faraday'
desc 'Print repo info, usage: rake print_repository_info repository_url=repository_url'
task :print_repository_info do
default_url = 'https://api.github.com/repos/MaksimenkoPG/ruby_app_boilerplate'
url = ENV['repository_url'] || default_url
response = Faraday.get(url)
puts response.status
puts response.body
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment