- ARCHIVE / PackR
- Announcing Bluff, plus a few other project updates
I put out a few new software releases over the last few days, and thought I’d gather them into one post rather than lots of little ones. Let’s start with the biggest.
Update: for those wishing to contribute bug reports (as failing test cases) and patches, Bluff is hosted on Github.
In what can only be described [...] - PackR won’t touch your $supers
Another quick update: PackR received an update today that means that when you use its :shrink_vars mode, it won’t minify any variables called $super. In Prototype, $super is used to implement inheritance and your class definitions will break if you change its name.
I didn’t really want to make PackR inconsistent with Dean’s original, but without [...] - PackR gem now available
Update: the gem seems to be up on RubyForge now, so just gem install packr and you’re all set.
At the request of Aman Gupta (again!) PackR is now available as a gem. I’ve not got myself all set up on RubyForge yet, but in the meantime you can download the gem from my subversion repository. [...] - PackR, now with class methods
Quick note: at the suggestion of Aman Gupta, PackR now supports Packr.pack, Packr.minify and Packr.pack_file as class methods, so you don’t need to create an instance of PackR before doing anything. Originally, I wanted PackR’s design to mirror the JavaScript version to make maintainance easier, but these methods are a tiny addition so I’m happy [...]
- Emulating JavaScript’s String#replace in Ruby
Update: turns out this is a lot easier than the method presented below: see Christoffer Sawicki’s implementation. Consider my method an example of what happens when you’re trying to port features from one language to another and end up looking in all the wrong places for a solution.
I know what you’re thinking: we already have [...] - Announcing PackR
I’ve no idea who may have done this already, but I certainly coundn’t find anyone who had in five minutes of searching. I’ve written a Ruby port of Dean Edwards’ Packer, and released it as a Rails plugin. It includes a rake task for batch-processing the scripts in your application. Install like so:
ruby script/plugin install
[...]