Skip to content

Fingertips/jewelry_portfolio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jewelry Portfolio

Surely also lazy developers like to showcase their jewelry portfolio on their GitHub pages.

Imagine writing a template once and use rake portfolio:release to generate and push an index.html and feed.xml file to your GitHub pages repository containing all the repositories you want to. If that sounds good to you, you’re in luck. Because that’s exactly what this gem does.

Note that if you have a rake release task, then the rake portfolio:release task is automatically invoked after the original finishes. An example of a Gem which provides such a task is Jeweler.

Installation

Run the following if you haven’t done so before:

gem sources -a http://gems.github.com

Install the gem:

sudo gem install Fingertips-jewelry_portfolio

GitHub pages repository

First things first; create a GitHub pages repository if you haven’t done so already. See github.com/guides/pages for more info.

Then you can merge the code from our Fingertips pages repository as an example on how to create your index.html and feed.xml files:

$ git remote add fingertips git://github.com/Fingertips/fingertips.github.com.git
$ git fetch fingertips
$ git merge fingertips/master

Update the Rakefile to use the correct account, or none if it can be inflected from the github.user value of your local or global git config. For more info see: github.com/guides/local-github-config.

For more information on the template renderers see: JewelryPortfolio::Template::HTML and JewelryPortfolio::Template::Feed.

If you want to add repos by hand then take a look at repos.yml. When done remove it so you have a fresh state:

$ git rm repos.yml
$ git commit -a -m "Reset repos.yml state"

Now you can generate the index.html and feed.xml files with:

$ rake portfolio:generate

And generate, commit and push to the remote branch with:

$ rake portfolio:release

Whenever you update the templates you can use these tasks to preview and/or release it.

Using in a non-Gem project

In your Rakefile instantiate a JewelryPortfolio::Tasks object, and give it a block with details about your project:

begin
  require 'jewelry_portfolio/tasks'
  JewelryPortfolio::Tasks.new do |p|
    # p.account = 'Fingertips'
    p.name = 'jewelry_portfolio'
    p.version = '1.0.0'
    p.summary = 'Short summary about the project.'
    p.description = 'Long description about the project.'
  end
rescue LoadError
  puts "JewelryPortfolio not available. Install it with: sudo gem install Fingertips-jewelry_portfolio -s http://gems.github.com"
end

In this example p is a JewelryPortfolio::Repo instance. See its reference for details about the available options.

Note that the account value should only be set if it can’t be inflected from the github.user value of your local or global git config. For more info see: github.com/guides/local-github-config.

For generating and releasing the portfolio, use the aforementioned portfolio:generate and portfolio:release rake tasks.

Using in a Gem project

If your project contains a gemspec file, then not much configuration is needed because all values will be copied from it. Simply add the following to your Rakefile:

require 'jewelry_portfolio/tasks'
JewelryPortfolio::Tasks.new

You can override the attributes as described in ‘Using in a non-Gem project’.

For generating and releasing the portfolio, use the aforementioned portfolio:generate and portfolio:release rake tasks.

Copyright © 2009 Fingertips, Eloy Duran, Thijs van der Vossen. See LICENSE for details.

About

Surely also lazy developers like to showcase their jewelry portfolio (libraries) on their GitHub pages.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages