Hi!

I'm Jeremy Green, from Norman, OK.


http://www.octolabs.com/

Gemlou.pe & Easymarklet

(And a mention of SimpleDB)

Gemlou.pe


What is it?


A way to judge the relative "weight" of a gem before adding it to your Gemfile.


Uses a bookmarklet to add new information to pages on RubyGems.org and Ruby-Toolbox.com.

bookmark + applet = bookmarklet


Javascript from your site that is injected (at user request) into a remote site.


XSS for fun and profit?

Use your power for good.

:)

Easymarklet


easy + bookmarklet = Easymarklet


A gem to help you create bookmarklets for your Rails app.

gem 'easymarklet'

Extracted from a project that uses a bookmarklet.


Packages boilerplate code for setting up RPC channels.

Definitions



Consumer

Loaded into the remote page.


Producder

Loaded on a page in your app.

DLux Bookmarklet

rails g easymarklet:dlux gemloupe

  1. Inject a "buffer" iframe into the remote page. Keeps the RPC channel open.

  2. Put an iframe in that iframe. This is a navigable iframe that displays pages in your app.

Communication


Consumer -> Buffer -> Producer


Producer -> Buffer -> Consumer

Easymarklet Structure

Takes advantage of the asset pipeline.

Single "bookmarklet" JS file contains logic for both consumer and producer.

var RemoteLoupeBookmarklet = {
  visible : true,
  protocol : 'https',
  consumer : {
    css : ['/assets/remote_loupe_bookmarklet.css'], // could be an array or a string
    methods : { ... }, // The methods that the producer can call
    init : function(url,producer){ ... }
  },
  producer : {
    buffer : "/remote_loupe_producer/buffer",
    path : "", // Avoid a flash before the correct page is set by the client
    methods : { ... }, // The methods that the consumer can call
    init : function(){ ... }
  }
}
window.RemoteLoupeBookmarklet = RemoteLoupeBookmarklet;

SimpleDB

NoSQL style key value store.


AWS::Record::Model

ActiveModel style ORM.

gem 'aws-sdk'
class Loupe < AWS::Record::Model

  string_attr :name
  string_attr :version
  string_attr :state, :default_value => 'new'
  integer_attr :runtime_weight
  integer_attr :development_weight
  timestamps

end

And Finally


Completely unrelated to anyting....


StarLogs.net


Make your commit history epic!


Thanks to my new friend, Leon, for allowing me to subject him to an early version of this lightning talk.


I am Jeremy Green.
jeremy@octolabs.com
http://www.octolabs.com/
http://octo-labs.github.io/gemloupe-easymarklet

Thanks For Watching!