For the first time ever, ragan crystallized why he didn’t like the original #andand implementation, or my own "implementation"http://blog.teksol.info/2007/11/23/a-little-smalltalk-in-ruby-if_nil-and-if_not_nil, #if_not and #if_not_nil and other implementations.

His point is that if you are writing a library, and you want to use the andand gem, you, the author of the library, will pollute the Object namespace of the application that’s using our library.

In effect, the library’s author dependencies will become dependencies of the application that’s using it, even though they don’t want or need the extensions.

The same problem happens with Mongrel and Thin : all the libraries these servers use are loaded in the application that’s running on top of them.

Thank you Reginald for clearing this up for me. I now fully understand the need for the Ruby.rewrite project.

Have you ever wished you could access your Amazon Simple Queue Service from the command line ? Now you can:


1 $ AWS_ACCESS_KEY_ID=<your access key>
2 $ AWS_SECRET_ACCESS_KEY="<the secret access key>"
3
4 $ clisqs create my-queue
5 Queue my-queue was created.
6
7 $ clisqs list
8 my-queue
9
10 $ clisqs push —data "this is the message" my-queue
11 Pushed 19 bytes to queue my-queue
12
13 $ cat README.txt | clisqs push my-queue
14 Pushed 2687 bytes to queue my-queue
15
16 $ clisqs push my-queue README.txt
17 Pushed 2687 bytes to queue my-queue
18
19 $ clisqs size my-queue
20 3
21
22 $ clisqs pop my-queue
23 this is the message
24
25 $ clisqs delete —force my-queue
26 Queue my-queue was deleted.

Installation


1 $ sudo gem install cliaws

Direct-code access


1 require "rubygems"
2 require "cliaws"
3
4 Cliaws.sqs.push("my-queue", "the data")
5 the_size = Cliaws.sqs.size("my-queue")
6 the_message = Cliaws.sqs.pop("my-queue")

S3 ?

This gem also works with S3. See my prior release announcement: Cliaws: command-line access to S3

I just released a new gem on RubyForge: cliaws. Using it, you have access to nice command line shortcuts:


1 $ AWS_ACCESS_KEY_ID=<your access key>
2 $ AWS_SECRET_ACCESS_KEY="<the secret access key>"
3 $ clis3 list BUCKET/PATH-PREFIX
4 $ clis3 put BUCKET/FULL/PATH/NAME /path/to/local/file
5 $ clis3 get BUCKET/FULL/PATH/NAME /path/to/local/file
6 $ clis3 cat BUCKET/FULL/PATH/NAME

This is not rocket science, but with the kind of work I’m doing at the moment, having quick command-line access to S3 is a boon.

Installation


1 $ gem install cliaws

Direct-code access


1 require "rubygems"
2 require "cliaws"
3
4 # Retrieve and store in a variable
5 value = Cliaws.s3.get("BUCKET/FULL/PATH/NAME")
6
7 # Retrieve and stream to specified file
8 File.open("/path/to/local/file", "w") do |f|
9 Cliaws.s3.get("BUCKET/FULL/PATH/NAME", f)
10 end
11
12 # Returns an Array of full names
13 contents = Cliaws.s3.list("BUCKET")

Repository

The repository is hosted on GitHub, with a mirror on RubyForge.

The repository’s URLs are:

Go forth and fork !

Search

Your Host

A picture of me

I am François Beausoleil, a Ruby on Rails and Scala developer. During the day, I work on Seevibes, a platform to measure social interactions related to TV shows. At night, I am interested many things. Read my biography.

Top Tags

Books I read and recommend

Links

Projects I work on

Projects I worked on