Wednesday, August 31, 2011

defunkt/jquery-pjax - GitHub

what is it?

pjax loads HTML from your server into the current page without a full reload. It's ajax with real permalinks, page titles, and a working back button that fully degrades.
pjax enhances the browsing experience - nothing more.
You can find a demo on http://pjax.heroku.com/

browser support

pjax only works with browsers that support the history.pushState API.
For a table of supported browsers see: http://caniuse.com/#search=pushstate
To check if pjax is supported, use the $.support.pjax boolean.
When pjax is not supported, $('a').pjax() calls will do nothing (aka links work normally) and $.pjax({url:url}) calls will redirect to the given URL.

Wednesday, August 24, 2011

SAP Labs. Ruby on Rails Meetup

Monday, August 22, 2011, 6:00 PM


Sessions :
  • REST with Inherited Resources
    (1 hour) by Vitaly Kushner
    • in-depth look at inherited_resources (IR) gem.
    • using IR to build simple restful controllers
    • nested resources with IR
    • using namespaces and controller-wide authorization with IR
    • using scopes for filtering
    • using search_logic gem with IR
  • Break
  • Test Automation with Ruby for dummies
    (30 min) by  Eran Nelinger (SAP)
    • Very short introduction for Test automation
    • Some links to other and a few words on other frameworks out there (WebDriver / Selenium, Watin, Watij, QTP)
    • Automate your web application testing with WATIR
  • Guard & Spork
    (15 min) by  Arik Fraimovich
    • speed up specs (or TestUnit) runs
    • streamlining the TDD process.
  • scoped_search plugin
    (15 min) by Amos Benari
This meetup was focused on advanced rails, test practices and improving the development and test environment. It was very awesome, a lot of people came and shared their experiences.

http://www.meetup.com/IsraelRubyUnderground/events/24126891/

Saturday, August 20, 2011

ruby-prof

ruby-prof is a fast code profiler for Ruby. Its features include:
  • Speed - it is a C extension and therefore many times faster than the standard Ruby profiler.
  • Modes - Ruby prof can measure a number of different parameters, including call times, memory usage and object allocations.
  • Reports - can generate text and cross-referenced html reports
    • Flat Profiles - similar to the reports generated by the standard Ruby profiler
    • Graph profiles - similar to GProf, these show how long a method runs, which methods call it and which methods it calls.
    • Call tree profiles - outputs results in the calltree format suitable for the KCacheGrind profiling tool.
  • Threads - supports profiling multiple threads simultaneously
https://github.com/wycats/ruby-prof
http://rubylearning.com/blog/2011/08/14/performance-testing-rails-applications-how-to/
http://ruby-prof.rubyforge.org/

Saturday, August 13, 2011

Headius: JRuby and Java 7: What to Expect

Java 7 has landed, with a modest set of new features and a few major improvements as well. What can you expect from JRuby running on Java 7?

Headius: JRuby and Java 7: What to Expect

Rails 3.0.10.rc1 has been released!

Hi everyone,

Rails 3.0.10.rc1 has been released. As usual, please try out this release candidate and report any issues to the ruby on rails core mailing list. If no issues are found, we'll release 3.0.10 on August 8th (around 5pm PDT).

If you do find issues, please send them to the rails core mailing list. If the release candidate is found to not be backwards compatible with the previous release, we'll do another release candidate and postpone the final release date.

Remember that this is your chance to veto / postpone the rails release. Please take this opportunity to test!

CHANGES

You can find an exhaustive list of changes on github. Here are some notable excerpts:

From ActionPack:

  • Fixes an issue where cache sweepers with only after filters would have no controller object, it would raise undefined method controller_name for nil [jeroenj]

  • Ensure status codes are logged when exceptions are raised.

  • Subclasses of OutputBuffer are respected.

  • Fixed ActionView::FormOptionsHelper#select with :multiple => false

  • Avoid extra call to Cache#read in case of a fragment cache hit

From ActiveRecord:

  • Magic encoding comment added to schema.rb files

  • schema.rb is written as UTF-8 by default.

  • Ensuring an established connection when running rake db:schema:dump

  • Association conditions will not clobber join conditions.

  • Destroying a record will destroy the HABTM record before destroying itself. GH #402.

  • Make ActiveRecord::Batches#find_each to not return self.

  • Update table_exists? in PG to to always use currentsearch_path or schema if explictly set.

THE END

Riding Rails: [ANN] Rails 3.0.10.rc1 has been released!

Tuesday, August 2, 2011

Constructable

Provides a powerful class macro for defining and configuring constructable attributes of a class.

https://github.com/mkorfmann/constructable

FirePHRuby

  1. rails-firephp gem
    Homepage: http://rubyforge.org/projects/rails-firephp/
    Rails plugin to go along with it: http://github.com/smith/firephp_rails/tree/master
  2. FirePHRuby
    Homepage: http://firephruby.rubyforge.org/
    Project Site: http://rubyforge.org/projects/firephruby/
Quick Reference
  • Install FirePHRuby with
    $ gem install firephruby

  • For Ruby on Rails put require 'firephruby' in your app/controllers/application.rb
  • In a Rails controller action do:
    fire_log 'Log message'
    fire_info 'Info message'
    fire_warn 'Warn message'
    fire_error 'Error message'
  • In an erb-template:
    <% fire_log 'Log message' %>
    <% fire_info 'Info message' %>
    <% fire_warn 'Warn message' %>
    <% fire_error 'Error message' %>
  • In CGI require 'firephruby'
    console = Fireruby::CGI.new
    console.log('Log message')
    console.info('Info message')
    console.warn('Warn message')
    console.error('Error message')
    or with plain WEBrick (similiar for Mongrel):
    require 'firephruby'
    # then within do_GET or a mounted Proc:
    response.fire_log 'Log message'
    response.fire_info 'Info message'
    response.fire_warn "Warn message"
    response.fire_error "Error message"
These examples all display the familiar