17 April 2014

The Ruby Reflector

Topic

Game engine

  Source Favicon
By Satish Talim of RubyLearning Blog 4 months ago.
Email

Using Rack Middleware

You can read through the RubyLearning FAQ .

Some Fun Apps

Here are some of the fun apps created by the previous batch participants and deployed to Heroku:

A static webpage .

Finding Photos on Flickr

String Reversal Service .

Stock Exchange Quote Service .

A Sinatra app to access GEO Info via GeoCoder

Sinatra Street View

Using Sinatra to access the Google+ API . …

rubylearning.com Read
  Source Favicon
By Satish Talim of RubyLearning Blog 4 months ago.
Email

Optional: Rack Middleware with Saral

Rendering Views

Exercise 8 - Street View modified

Exercise 9 - Saral Web Service: Sorter

How to upload your Framework Gem to RubyGems.org

How to upload your app to Heroku

Exercise 10 - Handling Exceptions

Exercise 11 - Upload Gem and App

The course contents are subject to change.

Mentors

Satish Talim and Victor Goff III from the RubyLearning team.

Some Highlights

RubyLearning's IRC Channel …

rubylearning.com Read
  Source Favicon
Email

Middleware to re-route requests based on their port number: class PortMap def initialize(default_app, mappings) @default_app = default_app @ mappings = mappings end

def call(env) request = Rack::Request.new(env) port = request.port app = @ mappings[port] || @default_app app.call(env) end end

We can now use this in a Capybara + Rack::Test suite: original_app = Capybara.app

Capybara.app = PortMap.new( original_app, 1234 => MyFakeCreditCardGateway, …

robots.thoughtbot.com Read
  Source Favicon
Email

Middleware to the Rescue

Fortunately, it's easy to write custom middleware that rescue s the errors thrown when JSON can't be parsed. To wit, the version for rails 3.2: # in app/middleware/catch_json_parse_errors.rb class CatchJsonParseErrors def initialize(app) @app = app end

def call(env) begin @app.call(env) rescue MultiJson::LoadError => error if env['HTTP_ACCEPT'] =~ /application\/json/ error_output = "There was a problem …

robots.thoughtbot.com Read
  Source Favicon
By pat of Freelancing Gods 9 months ago.
Email

If you subclass from ThinkingSphinx:: Middlewares:: Middleware you'll get the first for free. contexts is an array of search context objects, which provide access to each search object along with the raw search results and other pieces of information to note between middleware objects. Middleware are written to handle multiple search requests, hence why contexts is an array.

If you're looking for inspiration on how to write your own middleware, have a look through the source …

freelancing-gods.com Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup 12 months ago.
Email

Open Source - Memcache Top - Figure out which are your hot keys.

Instant Firebug Starter - A full book on using Firebug effectively.

Future of Firebug Lite - The project is looking for folks to work on it.

Brainrubyck - A Brainfuck interpreter written in Ruby.

Turkee - Mechanical Turk integration for Rails projects.

Rack::Attack - Middleware for throttling requests from abusive clients.

afreshcup.com Read
  Source Favicon
By Tom Fakes of CRAZ8 over 1 year ago.
Email

Just by building your application with Ruby on Rails 3.1+, there are a number of performance features that you get just by following the Rails conventions. These are features that make your application faster to your users, and faster applications have been shown to have happier users.

And you get them all for Free!

ETags for All Content

Rails adds Rack Middleware for ETag ( Rack:: ETag) and ConditionalGet ( Rack: ConditionalGet) that, together, help to reduce the amount …

blog.craz8.com Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup over 1 year ago.
Email

Today: Girl Scouts. Tomorrow: 12-mile hike. Somewhere in there: code.

Zapier - Integrations for various online services with a drag-and-drop trigger/action builder.

Cachex : tag based fragment caching on steroids - Another cache invalidation strategy for Rails apps with nested partials.

rack-attack - Middleware to handle whitelisting, blacklisting, and throttling.

Git Landscaping - How to clean up old remote feature branches.

afreshcup.com Read
  Source Favicon
By Peter Cooper of Ruby Inside almost 2 years ago.
Email

Rack-Policy: Middleware for Complying With the EU ePrivacy Directive

If you're not based in the EU, you can ignore this idiotic piece of legislation but otherwise Rack-Policy helps your Ruby webapps comply with getting implied consent before any cookies can be stored on your visitors' machines.

Image Sorcery: A Ruby ImageMagick Library 'That Doesn't Suck'

Image Sorcery leverages all three of ImageMagick's command line tools, …

rubyinside.com Read
  Source Favicon
By Peter Cooper of Ruby Inside almost 2 years ago.
Email

Rack Canonical Host: Middleware for Defining A Canonical Host Name

Rack middleware for defining a single hostname as the canonical host for your app. Requests for other hostnames will get redirected to the canonical host.

Aspector: Aspect Oriented Programming ( AOP) for Ruby

SoundCord: Perform Comparisons for Phonetically Similar Terms

A phonetic algorithm matches two different words with similar pronunciation to the same code, which allows phonetic …

rubyinside.com Read