RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

RyanScottLewis — 26 posts

morris-rails adds morris.js to the Rails 3 asset pipeline. Check it out!
Use mruby from within lua with lua-mruby!

Note: This is a very early release. You can run and evaluate MRuby code from within Lua, but that is about it... for now.
Service encapsulates an object which executes a bit of code in a loop that can be started or stopped (optionally in a new Thread) and query whether it is running or not.
While learning Treetop, I decided that a Brainfuck interpreter would be a nice place to start. So, I made treetop_bootstrap, which is a scaffold for Treetop projects, and then Brainfucktt, a fully featured Brainfuck interpreter.

Use it for learning Treetop, learning how Brainfuck works, for parsing Brainfuck code into an AST, or actually running Brainfuck code!
Glib-Eventable  ruby-gnome2.sourceforge.jp
glib-eventable is a helper gem for ruby-gnome2 applications.

Instead of writing:


class Window def initialize
super
signal_connect('destroy') { Gtk.main_quit }
end
end


This allows you to write:


class Window event destroy: :on_destroy

def on_destroy
Gtk.main_quit
end
end


This allows you to create subclasses of Gtk objects in a more OOP style.
gosu-keyboard - A DSL for easily handling keyboard events within a Gosu::Window.

Small example:
Gosu::Keyboard.handle_keys(@gosu_window) do
down?(escape) { close }
down?(left && !shift) { @player.walk(:left) }
down?(right && !shift) { @player.walk(:right) }
down?(left && shift) { @player.run(:left) }
down?(right && shift) { @player.run(:right) }
down?(!left && !right) { @player.stand }
end
It has almost been 3 years since the system gem has last seen a git commit, but the project is now back in development!

System is a cross-platform and cross-implementation interface to gather system information from the current host including; OS, CPU, Filesystem, etc.

Check it out!
rmagick-sprite allows you to easily slice up a spritesheet into Magick::Images.

The thought is that a spreadsheet contains many of a character's actions (standing, walking, jumping, etc..) which consist of many frames. This provides a DSL for defining those actions and where on the spritesheet each action's frames are located. Then, you are free to use these images in your favorite game library, save each frame as separate images, or even save each action as an animated GIF. Check it out!
I published cacheable_attr about two months ago and finally found time to post up here.

Simply declare an attribute as cacheable with a TTL and define a method with that attribute name with "_uncached" at the end of the method name. This allows you to bypass caching at anytime by calling the "uncached" method, if needed.
I just created jqtree-rails which allows you to use jqTree within your Rails 3 applications.

jqTree is an awesome jQuery plugin for creating treeviews.

The script optionally depends on jquery.cookie.js, so I wrapped that up in a gem (jquery-cookie-rails) to make jquery-cookie available to the asset pipeline as well.
I just launched inflection-js-rails which allows you to use inflection-js within your Rails 3 applications.

ActiveSupport inflections for the client-side, anyone?
Easily split URIs  stevenlevithan.com
UniformResourceIdentifier splits your full URIs without the hassle of validation. Sticks to RFC 3986 as closely as possible. (client-side counter part)
Recursively Setting Deep Hash Value  ilovemetaprogramming.tumblr.com
I’ve always wanted to be able to do something like:
my_hash = {}
my_hash["Cloud"]["Stats"]["Strength"] = 100
p my_hash # => {"Cloud"=>{"Stats"=>{"Strength"=>100}}}

So I whipped up this small code and now I can! Metaprogramming wins again!
inline_testing  ilovemetaprogramming.tumblr.com
I've released inline_testing, a gem which does just that. Be sure to check out this article explaining what it is and how it works and you can see the Gem or the GitHub repo.
Meta Tools Gem Released  ilovemetaprogramming.tumblr.com
I've created the gem "meta_tools". Blog post: Link, Gem: Link, Git: Link
Recursively Setting Deep Hash Value  ilovemetaprogramming.tumblr.com
Ever want to set a Hash like below? Check out my short blog post.
my_hash["Cloud"]["Stats"]["Strength"] = 100
p my_hash # => {"Cloud"=>{"Stats"=>{"Strength"=>100}}}
Ruby CRUD Methods  ilovemetaprogramming.tumblr.com
If you love metaprogramming as much as I do, I just posted a great post on how to setup CRUD-like method definitions in your classes.
I'm looking for a new maintainer for my DSL gem. I've just got too much to handle right now and I feel like the gem is a great example of metaprogramming so I do not want to just let it die. If anybody is interested, contact me at c00lryguy@gmail.com.
I've just updated dsl, a gem to easily create domain specific languages within blocks, to v0.1.3
I've just released dsl, a friendly way to create DSLs within blocks and objects.
I just released the latest version of RuleBook, a gem that lets you define instance and class methods of an object using regexp. All the info you need is right on the GitHub page.
RuleBook 0.3.2 Released - 10x Faster!  ryguysrubynotes.tumblr.com
Read the blog post, check the code.
RuleBook 0.3 is out and I've written a short blog post about the basics of RuleBook. The syntax is now backwards compatible with 0.1 and 0.2! I encourage you to fork and implement your ideas to help build the code.
I just updated rulebook to version 0.2.1 and it now has a new format for defining rules and has support for class methods! Check it out!
I just launched rulebook which allows you to define 'rules' or dynamic methods to your classes.
I just launched a project to help you install a Chrome extension that lets you view a customized set of SDocs downloaded from railsapi.com Here is the blog post and here is the GitHub page