github-widget, a client-side, complete Github Widget.

Overview

a widget provides your repositores, activities, .. current only repositores part is implemented. for activities, see github-timelime-widget

Live Demo github-widget.heroku.com

screenshot

Dependency

  • Rails3.1
  • SproutCore 2.0
  • HTML5
  • Coffescript
  • Sass

INSTALL & USAGE

(optional) use a HTML5 boilerplate

rails new foo --template https://github.com/russfrisch/h5bp-rails/raw/master/h5bp.rb

in Gemfile

gem 'sproutcore-rails', :git => 'git://github.com/GutenYe/sproutcore-rails.git'
gem 'github-api-rails', :git => 'git://github.com/GutenYe/github-api.git', :branch => 'rails'
gem 'github-widget'

in app/assets/javascripts/application.js

//= require github-api
//= require sproutcore
//= require github-widget/projects

in app/assets/stylesheets/application.css

*= require github-widget/projects

in app/views/layouts/applictions.html.erb

<script>
    window.github_username = 'gutenye';
</script>
<script type='text/html'>
    <%= render 'github-widget/projects.hbs' %>
</script>
...
<%= javascript_include_tag 'appliction' %>

Custom

rails g github_widget

this will create a list of source code.

app/assets/javascripts/github-widget/projects.js.coffee
app/assets/stylesheets/github-widget/projects.css.sass.erb
...

Contributing

Set up development environment

cp develop-example develop
cd develop # is a rails3.1 application
# develop and test

# it's import to symlink the outside file into rails project.
cd develop/app/assets/javascripts/github-widget
ln -s ../../../../../app/assets/javascripts/github-widget/projects.js.coffee 

Resources