Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
bundler hoe
Jeweler
Has the most unecessary baggage of all the
tools
Bundler
Uses gemspec for conguration Gemle references the gemspec keeps to convention of module layout/
cong
Hoe
Similar to jeweler, congures via Rakele provides templating functionality setup your own templates in
~/.hoe_template
gem name, :git => git://... gem name, :path => ../my_gem
Convention
Naming: try to pick a google friendly and not already
taken name for the gem
use snake_case for gem names only use dashes for extending existing gems e.g.
rack-cache, capistrano-ext
Tests
Framework doesnt matter (test unit,
rspec, mini test), just having them present is the important part providing a ci server that will run your tests on multiple ruby implementations contribute and you to accept patches
travis-ci is a nice distributed build server no tests makes it hard for others to
Versioning
Dening the version as a namespaced
runtime dependencies major.minor.patch) constant is nice (e.g. MyGem::VERSION)
remember to specify your development & Use Semantic Versioning (X.Y.Z ->
Semantic Versioning
format: major.minor.patch use alpha characters after for pre releases (1.4.3.beta3) Increment patch level for bug xes, optimisation and other small changes. minor level for backwards compatible features (this one is used more uidly in practice) major level for non backwards compatible tag versions in your source (git tag v1.3.4 && git push --tags) allows for use of pessimistic versioning for your users ~> 2.1 implies < 3.X
run yard locally with yard server take the time to explain your project (goals, tradeoffs, and importantly how to get started using it)
OSS on Github
README should contain all the basics when submitting a bug report, be thorough and polite submit a patch:
fork, use a branch per bug/feature git remote add otherguy git://..... git pull otherguy feature_x
accepting patches:
Resources
http://incitecode.com (my blog) http://guides.rubygems.org/ https://github.com/zenspider/ruby-cexample