Last active
May 16, 2021 18:03
-
-
Save MaksimenkoPG/5ed8bbdc4f40c4dbcbbc4834d6a1156e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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