Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a new Rake task to see your GitHub stats right in your Terminal. …

…Link to my Jekyll repo.
  • Loading branch information...
commit a026ff5715f76e8b180ee76d5fd2911bfca79a5f 1 parent 76e6cc6
@migreyes authored
Showing with 20 additions and 4 deletions.
  1. +2 −4 README.md
  2. +18 −0 Rakefile
View
6 README.md
@@ -9,8 +9,8 @@ If you’re a developer looking for pre-designed Jekyll themes, I’d recommend
=====
### Websites started from this template:
-[mig.io](http://mig.io), my personal site.
-[humblepied.com](http://humblepied.com), a video interview site. (View the [repo](http://github.com/migreyes/humblepied).)
+[mig.io](http://mig.io), my personal site. (View [the repo](http://github.com/migreyes/migreyes).)
+[humblepied.com](http://humblepied.com), a video interview site. (View [the repo](http://github.com/migreyes/humblepied).)
[basecamp.com](http://basecamp.com), the marketing site for Basecamp.
[basecamp.com/help](http://basecamp.com/help), the help documentation site for Basecamp.
[37signals.com/incoming-transmission](http://37signals.com/incoming-transmission/), an archive of the best of the web.
@@ -28,8 +28,6 @@ If you’re a developer looking for pre-designed Jekyll themes, I’d recommend
`rake` to watch and update your HTML, Coffee and Sass.
-`rake build` to build a clean, compressed copy of the site.
-
`rake view` builds a fresh copy of your site, then opens it locally.
`rake view:xip` generates an [xip.io](http://xip.io) friendly URL and opens it.
View
18 Rakefile
@@ -1,3 +1,5 @@
+require "json"
+
url_pow = "website"
url_live = "website.com"
@@ -96,4 +98,20 @@ namespace :view do
task :github do
system "open http://github.com/#{github_repo}"
end
+
+ desc "A quick glimpse at your GitHub repo’s watchers, stars, and forks."
+ namespace :github do
+ task :stats do
+ puts "Downloading GitHub repo data through their API…"
+ json = `curl https://api.github.com/repos/#{github_repo}`
+ repo = JSON.parse(json)
+ puts ""
+ puts "-------------------------------------------------------------------"
+ puts ""
+ puts "#{github_repo} has #{repo['subscribers_count']} watchers, #{repo['stargazers_count']} stars and #{repo['forks_count']} forks."
+ puts ""
+ puts "-------------------------------------------------------------------"
+ puts ""
+ end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.