Using hoe and jeweler for rubyforge and github

24.06.2009 – 18:54

I asked myself how to get started using github as a development platform but still support rubyforge as the main server for stable gem versions?

First I tried to use only hoe but did not get a gemspec file out of it. So I added jeweler to get a gemspec via the rake target gemspec but did not want to configure hoe and jeweler separate. So I used the hoe generated gemspec object to initialize jeweler and thought that it was a good solution.

But then I stumbled upon the best solution, hoe supports the generation of gemspecs only the target name is a bit akward. Just call rake with the command rake debug_gem as recommended on github.

The previous solution combining hoe and jeweler

The rake file:

require 'rubygems'
require 'hoe'
require 'yourgem'

hoe = Hoe.spec 'yourgem' do |p|
  # self.rubyforge_name = 'yourgemx' # if different than 'yourgem'
  p.developer('Yourname', 'yourmail@example.com')
  p.remote_rdoc_dir = '' # Release to root only one project
  p.extra_deps << yourdeps
  File.open(File.join(File.dirname(__FILE__), 'VERSION'), 'w') do |file|
    file.puts Yourgem::VERSION
  end
end

begin
  require 'jeweler'
  Jeweler::Tasks.new(hoe.spec)
rescue LoadError
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end

Ruby RDoc ressources

12.06.2009 – 10:02

I quite often search for infos about RDoc, so here are some useful links.

How to write RDoc comments

How to browse RDoc for installed gems

  • bdoc very nice browsing for documentation should be used with the better hanna rdoc template
  • sinatra-rubygems reimplementation of gem server to use apache not webrick
  • Gembox sinatra based application to browse the locally installed gems
  • docs.github.com for github based projects that use rdoc.info

New release of BruteFIR Room Correction for SC7.4 (1.1.0)

28.02.2009 – 11:24

Checkout the plugins sourceforge page to download the new release 1.1.0! It is compatible with the upcoming version of SqueezeCenter 7.4, because of the PCM support it does not work with any other version.

Important after installation: Delete the old custom-convert.conf or delete all BrutefirDRC specific lines from it. The Plugin now writes a custom-convert.conf in it’s home directory. The old file is no longer used!

Features:

  • Support to stream in PCM (raw format, former WAV), FLAC or MP3
  • Plugin can be enabled or disabled for any player without restarting SqueezeCenter
  • Conversion Type can be changed for any player without restarting SqueezeCenter
  • custom-convert.conf is written to the plugin home directory
  • brutefirwrapper now in Plugins Bin directory: helps to identify the plugin conversions in WebGUI file types dialog all plugin related conversions are displayed as “[format]/brutefirwrapper”
  • sox is used from SqueezeCenter installation no need to install it manually in Version 14.x

If you have any problems with a file format not working try to disable all other conversion for the file type. I needed to disable other conversion options for ogg to work properly.

If you have any problems drop me a note.

New release of BruteFIR Room Correction (1.0.1)

24.01.2009 – 14:06

Checkout the plugins sourceforge page to download the new release 1.0.1! It is the first 1.x release thought that the plugin is stable enough for this, after no significant changes have been commited in over a half year :)

Notes:

  • needed to remove the support for sampling rates in non MP3 files different to “44100″ because of a bug/feature within the new transcoding framework. See the thread Significant changes to transcoding framework and the corresponding bug report for more information about the issue.
  • SOX 1.14.x is needed because of changes in the command line interface
  • SqueezeCenter 7.3.2 is needed because of the new transcoding framework
  • small changes that have been in the SVN for a long time are out now
  • tested with: flac, mp3 and ogg

If you have any problems with a file format not working try to disable all other conversion for the file type. I needed to disable other conversion options for ogg to work properly.

If you have problems with other file formats drop me a note.

JRuby access to C libraries using FFI

02.09.2008 – 10:59

With the new release of JRuby 1.1.4 it is possible to use the rubinius FFI API. With FFI you can access C libraries via plain ruby code. To get started with FFI the only documentation I have found is provided by Free Minds blog entry. Additional info may be posted to the discussion using jruby-ff. Hopefully gem authors start to implement extensions with FFI besides their native extensions to make it possible to use the gem with Rubinius and JRuby.

One problem is to provide ruby callback functions for the C library. I am trying to figure out how to extend sqlite3-ruby to work with jruby. Sqlite3-ruby uses swig to create a native binding to the sqlite3 library. Within driver.rb some callbacks are registered for the C code like:

API.sqlite3_busy_handler( db, API::Sqlite3_ruby_busy_handler, cb )

API::Sqlite3_ruby_busy_handler is a callback implemented in the native extension. FFI does not provide any support for callbacks. To support C APIs that use callbacks a workaround must be found.

BrutefirDrc 0.93 released

19.05.2008 – 20:12

Checkout the plugins sourceforge page to download the new release 0.93!

Features:

  • Blind testing: fast switching of tested filters via holding the “1-button” on the remote control while in “Now Playing”
  • Full Support for audio files with non 44100 sampling rates.
  • automatic rewriting of custom-convert.conf on startup of plugin to make update easier

Release 0.92 for BrutefirDrc is out

04.05.2008 – 14:25

Checkout the plugins sourceforge page to download the new release 0.92!

Features:

  • Blind testing support for filters
  • Support for audio files with non 44100 sampling rates. MP3 are automatically converted via SOX
  • better default directories
  • Manual for all features on web page

BrutefirDRC page splited

28.04.2008 – 12:53

The page is splited into different parts. An overview for the plugin, an installation guide and the manual explaining all features. Hopefully this helps…

BrutefirDrc goes “sourceforge”

20.04.2008 – 20:33

To share the BrutefirDrc plugin development as good as possible the plugin is now a sourceforge project. The releases will be download able via sourceforge in the next days. You can take a first look at https://sourceforge.net/projects/brutefirdrc/

SVN is up and running and the first release is uploaded. The homepage for BrutefirDrc will remain at this site though.

Gapless playback available

14.04.2008 – 13:40

Thanks to Toby Dickenson gap less playback is now available while using brutefir! He wrote a wrapper script in python that handles all the messy stuff and it works great!

There is a new Version 0.91 including this new python script and a couple of other features:

  • gap less playback
  • filters may be organized in directories and more directories
  • direct menu link to attenuation to prevent clipping due to filter amplification (I need 3dB of attenuation)
  • the menu now browses as it should be (the animations have been messed up previously)
  • some bug fixes and beautifications

To install it you have to follow some steps:

  1. remove the old “BrutefirDrc” Plugin directory and replace it with the one from you can download at the BrutefirDrc sourceforge page.
  2. restart SqueeceCenter
  3. use the remote control and enable the plugin again for all clients that should use it (yeah it states that it is enabled, but the custom-convert.conf file must be rewritten to include the wrapper)
  4. make sure that you have “/tmp” dir that is writeable by the brutefir user (the wrapper stores the reverberation tail here)
  5. restart SqueeceCenter another time
  6. everything should work again