Mon, 12 Jul 2010 21:47:00 GMT

Moving onrails.org to Typo 5.4.x, Rails 2.3.8 on Heroku

So why Heroku and why not leave my server on slicehost? I don’t have any issue with the slice but I want to upgrade the version of Typo just to stay uptodate and while at it wanted to explore a little. So of course I found an article on Getting Typo 5.4 running on Heroku So I gave it a try.

The interesting part is that onrails.org has been around since forever and I also had to migrate the database. Onrails.org was running on a version of Typo 4.

setting the blog up locally

First I’ve downloaded my older typo MySQL database and restored it locally. I’ve copied Typo from here or you can clone the Typo git repository.

$ git clone http://github.com/fdv/typo.git 

I changed the database.yml to point to my database. Did a rake gems:install, followed by a rake db:migrate and had now a local install of my blog.

creating a heroku app

The goal was to try to deploy the blog to heroku. So here you can create an empty

$ heroku create onrails
git@heroku.com:onrails.git
$ git init
$ git add .
$ git commit -m "Adding onrails.org using typo 5.4.4"

I then followed joels’ article to "heroku"fy Typo. So I basically created a few empty folders and replaced FileUtils by FileUtils::NoWrite. Note sure if that last change would cripple Typo but things seems to work fine.

Then I created a .gems files that is used by heroku instead of Bundler.

.gems
	rails = 2.3.8
	htmlentities  
	json 
	calendar_date_select 
	bluecloth  ~> 2.0.5
	coderay  ~> 0.8
	mislav-will_paginate  ~> 2.3.11 --source gems.github.com
	RedCloth  ~> 4.2.2
	panztel-actionwebservice  = 2.3.5
	addressable  ~> 2.1.0
	mini_magick  ~> 1.2.5

Finally I deployed the app with an empty database:

$ git remote add heroku git@heroku.com:onrails.git
$ git push heroku master
$ heroku rake db:migrate   # with empty db

That’s it that gets you an install of Typo on Heroku. Note, keep reading for a few gotcha’s I found in regards to Rails 2.3.8.

Rails 2.3.8 on heroku

At the time of this writing Rails 2.3.8 wasn’t the default on Heroku, but fortunately they support a different stack with Rails 2.3.8. To switch I just had to do the following:

$ heroku stack:migrate bamboo-ree-1.8.7

Migrating the local MySQL database to Heroku’s Postgres database.

It’s a rather straight forward process…just do

$ heroku db:push

This converted the database and replaced the remote database with my local data on Heroku. It converts my MySQL database to a Postgress database without having to specify anything…But there was on gotcha. The Sidebar table id column turned out as “text” instead of an “integer”. And this caused some of the admin functionality to fail, i.e. reconfiguring the sidebar. The other tables where converted correctly and I saw that the local Sidebar id column was slightly different than the other id columns. For some reasons the sidebar table id column type was a "signed int’ and that translated to a text field when doing the db:push. So I just unchecked the signed flag and the db:push went smoothly.

legacy permalinks

Somehow the articles and category links are all prefixed with “/articles” on onrails.org. I don’t know if that was due to some default setting in Typo 4 or due to the fact that I started with a way earlier version of Typo. In any case I preferred to use the new links formats that just drops the “/articles”, but that would also mean breaking a lot of incoming links. So I just configured Typo to support the legacy permalinks via these added routes

  # Legacy permalink format support
  map.connect '/articles/:year/:month', :controller => 'articles', :action => 'index', :year => /\d{4}/, :month => /\d{1,2}/
  map.connect '/articles/:year/:month/page/:page', :controller => 'articles', :action => 'index', :year => /\d{4}/, :month => /\d{1,2}/
  map.connect '/articles/:year', :controller => 'articles', :action => 'index', :year => /\d{4}/
  map.connect '/articles/:year/page/:page', :controller => 'articles', :action => 'index', :year => /\d{4}/   

 # Legacy permalink format support
  map.resources :categories, :except => [:show, :update, :destroy, :edit], :path_prefix => '/articles'
  map.resources :categories, :as => 'category', :only => [:show, :edit, :update, :destroy], :path_prefix => '/articles'

  map.connect '/articles/category/:id/page/:page', :controller => 'categories', :action => 'show'

Now the blog supports both new and old formats. Note that the url for the articles can be modified in the settings, but I didn’t find settings for the category permalinks and supporting both old and new format gives me a smooth transition forward.

Rails and Issue with Typo workaround?

I was getting the following error when doing certain actions on the blog:

ActionView::TemplateError (undefined method `interpolate_without_deprecated_syntax' for #<I18n::Backend::Simple:0x2b8d1ef90700>) on line #5 of themes/scribbish/views/articles/_comment.html.erb:

So I assumed this was some compatibility between Typo and Rails and Typo had a workaround defined in the environment.rb file file. As I use Rails 2.3.8 I disabled that workaround and everything seems to work again:

So I just removed the followed lines from the enviroment.rb file:

environment.rb
class I18n::Backend::Simple
  def interpolate(locale, string, values = {})
    interpolate_without_deprecated_syntax(locale, string, values)
  end
end

custom domain

I’m sure there are a few more details I missed and hope my readers will point them out, but let’s jump and turn the switch on.

So you need to switch on custom domains on heroku as follows:

$heroku addons:add custom_domains
$ heroku domains:add www.onrails.org
Added www.onrails.orgas a custom domain name to onrails.heroku.com 
$ heroku domains:add onrails.org
Added onrails.orgas a custom domain name to onrails.heroku.com

Then I went on to pointed my dns to Heroku.

The move is complete but the dns change to point to heroku still may take some time. So if you see the Scribbish theme you are still on the old server and if you see the Elegant Grunge theme you are right here on Heroku.

Enjoy,
Daniel

UPDATE 1: the dns updated www.onrails.org and onrails.org at different time. And all the images of the new sites where using urls of the old site and everything looked pristine. No more…So a hidden issue is that Typo let’s you upload files like images which are stored in the resources table and also copied to to the public/files folder. This is a convenient way to serve files and images for your blog entries. Well, that won’t work very well while on heroku especially since we really made the file system read only. I need to read more on how to enable page caching on Heroku and see if it is compatible with Typo. If not… I will need to revert back to my previous host. For now I’ll just add the files via git…and that’s not a solution.


Fri, 11 Jun 2010 05:30:00 GMT

RailsConf 2010 - Thank You!

Wow, RailsConf is over. It ended nicely with @garyvee giving a powerful and entertaining keynote covering many subjects but mostly his standard spiel on connecting with your customers or audience. I read his book, crush it, a while back and enjoyed it. Note since, I haven’t been the most active on my blog or website??but I’m working on changing this.

Now of course RailsConf was way more that this keynote. I must admit I really enjoyed Baltimore and having the convention center, the hotel and the port at a five minutes walking distance. It’s a great area, I understand that not the whole city is like that, but that doesn’t remove anything from the fact that I really appreciate the place right now.

The best thing at this conference is the energy that transpires and I really feel energized and want to start some new Rails venture. It’s fun to see so many enthusiasts trying to learn, share, and push the community forward.

I must admit I usually enjoy smaller conferences, like the MoutainWest RubyConf or the forthcoming Moutain.rb, better as the tracks are more specialized and geekier. RailsConf tries to have several tracks for everybody but very few are very technical. Maybe the organizers should try to have an advanced track next time. That way the conference would stay appealing for the many people that have been doing Rails/Ruby for years and still be welcoming for beginners.

As usual there are always some talks that just suck. On the tutorial day I attended in the afternoon Rails 3 Deep Dive and it wasn’t about Rails 3 nor a deep dive. Another talk that didn’t turn out the way it should have been was Scaling Rails on AppEngine with JRuby and Duby where the speakers where knowledgeable but where note prepared enough and where counting on the wifi to work??The wifi never works at conference. This said the wifi was usually working pretty well at RailsConf this time.

I don’t wanna focus too much on the talks that didn’t work out as most of the talks where great and also not all my talks in the past always worked out they way they could have ;-)

One of the tutorial I really liked was Acceptance Testing With Cucumber. David Chelimsky rocked and just knows his stuff and Aslak hanged in there pretty well. They had an application prepared with multiple branches that let the audience follow right along. That was great. They didn’t have time to access a few of the advanced Cucumber subjects??next time make that a full day tutorial.

The first talk I attended on tuesday was Building an API with Rails which was a panel discussion with guys from Twitter, 37Signals, Github, the NYT and others. I really enjoyed that there was several distinct views on several aspects like on APIs like versioning, security, performance which relates exactly with some customer work I’m currently doing.

Then I went to the Metrics Magic by Aaron Bedra from Relevance which cover tools like RCov,Flog, Flay, Roodi, Reek and how to integrate them with your continuous integration build. For example why don’t you make your build fail when it reaches a certain threshold of uncovered code (let’s say 20%)??I like that idea. We do generate these stats in our ci builds but don’t fail the builds??yet.

Another great panel on tuesday was The State of Rails e-Commerce. I’m interested in ecommerce since the first of Rails project I worked on end of 2005.

Then I went to see Ilya Grigorik talk on “No callbacks, no threads: async & cooperative web servers with Ruby 1.9”??I just wish all the task where that awesome??Ilya tries to push the current stack of Ruby technologies to the next step to try to get the same benefits than what node.js provides??and he showed us how. Wow.

I’m not gonna list all the talks I attended here, but will provide a few more comments. There where two business oriented talks I enjoyed, the Million Dollar Mongo by Obie Fernandez and Durran Jordan from Hashrocket and the Agile the Pivotal Way talk by Ian MCFarland. Ian’s presented how his teams operates and I now see why Pivotal is on such a growth path. There are many cool aspects they are enforcing, one key I believe is to have really agile team members than can switch in an out of each team while still providing continuity to the customer by having one anchor member. Another essential aspect is the culture and how they propagate it buy doing peer programing to the extreme. Obie’s talk was an interesting retrospective on a very large project (10’0000 hours) they undertook. What surprised me is that he was pretty negative on his client and also went after some members of the Rails community??Well, maybe Hashrocket should stick to smaller projects ;-)

What else was cool? Rich Kilmer gave a nice talk about Authentication in a RESTful World. Again, that’s totally relevant to a customer project of mine. One of the best talks out there was Rocket Fueled Cucumbers by Joseph Wilk, but I saw only the last quarter as I selected another talk that I decided to leave??too late.

Matthew Deiters also gave a presentation I really enjoyed about “Recommendations in Rails”??something I may have to build in one of my apps very soon. I’m less exited about the fact that he recommends a java tool (Neo4j) to manage your graph of relations??but I trust him that it’s the best of the solutions out there for now.

Besides the talks Bluebox threw a party at a local bar, besides the fact that Fernand managed to get us lost on they way and I wasn’t sure we would survive the neighborhood we ended up in??the party was great and we met one of the Bluebox software developers and her mam and had a great time. At least I think so based on the trouble I had to wake up the next day.

I had fun with the keynotes. Derek Sivers gave a talk which I enjoyed even though it was not related to Rails but it was very entertaining. I really liked Yehuda Katz talk and he his certainly the driving factor behind Rails 3 but he gave a lot of credits to specific members of the community which took on many issues that most thought where impossible to address or change and fixed them.

The Ruby Heroe Awards Ceremony is always fun to watch, and Gregg puts lots of effort into making them happen. Next time just let the winners make a thank speech??that would stress them a little.

Overall there wasn’t enough coverage of Rails 3, I guess that’s gonna for next year when everyone migrated all there projects to it.

So reflecting on these 4 past days??it was a great conference. A big thanks to the organizers and all the presenters

Now time to kick off a new Rails 3 project.

Enjoy!
Daniel


Tue, 08 Jun 2010 22:16:24 GMT

RailsConf 2010 - Baltimore

20100606_RailsConf_View.jpg

Here we go again RailsConf 2010 has started. The keynotes will be streamed online at http://railsconf.com and the slides of the presentation will also be posted there. I’ll provide more links once they become available.

This is the view from my hotel which is 5 minutes from the convention center where RailsConf is going on.

20100607_RailsConf_View_From_Hotel.jpg
20100607_RailsConf_Submarine.jpg

Acceptance Testing with Cucumber

I’m now following the Acceptance Testing with Cucumber tutorial. You can find the app we built, a kanban manager, on github.

Cucumber is executable documentation. Gurken is the DSL used to write your documentation in the form of

Scenario:
  Given
  When
  Then

The app has different git branches for each stage of the application. Checkout the move-card-passing branch for the most complete functionality. It contains great examples of feature test.


master f294f72 patch number
remotes/origin/HEAD → origin/master
remotes/origin/first-feature-failing 475eb7e words
remotes/origin/first-feature-passing e4ea67a gemfile
remotes/origin/latest eacd855 Merge
remotes/origin/master f294f72 patch number
remotes/origin/more-features-failing aa2d97b new failing features
remotes/origin/more-features-passing 03b6b44 added lane ordering
remotes/origin/move-card-failing 02fa766 add move_card feature

  • remotes/origin/move-card-passing 8c1d751 move cards from one lane to another

BUILDING AN API WITH RAILS

A great discussion on building APIs using Ruby and Rails:


Tue, 11 May 2010 04:05:19 GMT

Dashcode 3.0 - the precursor to Gianduia - A Flash Killer?

All right beside the cheesy title of this blog entry I did play a few weeks ago with Dashcode 3.0 to build an iPad app for a customer. After seeing the WWDC 2009 presentation on DashCode 3.0 I realized how much leaps and bounds DashCode made over the last two years. Checkout the quick screen cast demo here after and let me know what you think!

After looking into Dashcode 3.0 and doing some online search I found out that Jeff Watkins created several years ago coherentjs, a Cocoa inspired javascript framework, and he joined Apple to work on Dashcode. As you can see on http://coherentjs.org/ he since left Apple and revived Coherent as a multiple browser framework.

Based on the fact that WWDC 2010 is around the corner is it to be expected that the next version of Dashcode will be announced and among other things should provide an enhanced visual editor, enhanced frameworks, more components, improved datasource support, css transitions support, and iPad support. It could well be that Dashcode 4 is in fact what some refer to as Gianduia. The good thing is that we will find out soon.

Now let’s quickly look at what Dashcode currently offers, it’s pretty cool:

Dashcode 3.0 – An IDE to build HTML apps for iPad, iPhone and Safari from daniel wanja.


Wed, 28 Apr 2010 00:42:00 GMT

Making CRUD less "Cruddy", one step at a time

One of the great “new” features of Rails (as of 2.3) is accepts_nested_attributes_for, allowing you to build cross-model CRUD forms without “cruddying” your controller. There are some great examples out there about how to do this, but I’d like to walk thorough a particular use case — managing the “join” records in a has_many :through relationship.

Consider the following database schema:

class Villain < ActiveRecord::Base
  has_many :gifts
  has_many :super_powers, :through => :gifts
end

class Gift < ActiveRecord::Base
  belongs_to :villain
  belongs_to :super_power

  validates_uniqueness_of :super_power, :scope => :villain_id
end

class SuperPower < ActiveRecord::Base
  has_many :gifts
  has_many :villains, :through => :gifts
end

In our dataset, there are a relatively small number of super powers which we wish to present as a list of checkboxes on the villain management form. Checking/unchecking the boxes will manage the gift records for that villain, effectively managing the list of super powers available to the baddy.

To get started, we need to add accepts_nested_attributes_for :gifts to the Villain class — piece of cake. To complete the implementation, we need to change the params hash that our form generates. Let’s review the cases that we need to support and the associated params hash format needed to implement the correct functionality.

The first case is a super power record that is not currently associated with the villain. Here, the UI should display an unchecked checkbox. If we check it and submit the form, a gift record should be created linking the villain with the super power, making this bad guy that much badder. Here is an example of the params hash we should be sending to accomplish this:

  {
    'villain' => {
      'name' => 'Lex Luthor',
      ...
      'gifts_attributes' => {
        1 => { 'super_power_id' => 5 },
        2 => { 'super_power_id' => 7 },
        ...
      }
    }
  }

The alternate case is a super power this villain already possesses. In this instance, the UI should display a checked checkbox, and if we uncheck it, the existing gift record should be deleted, diminishing the villain’s capacity for evil. And our params hash needs to look like:

  {
    'villain' => {
      'name' => 'Two-Face',
      ...
      'gifts_attributes' => {
        1 => { 'id' => 101, '_delete' => true },
        ...
      }
    }
  }

Note that the keys for the gifts_attributes hash are arbitrary; we can use any scheme to generate unique keys for the hash.

So how can we craft a form that sends the params hash that Rails wants to see? Here’s my implementation:

  <%- SuperPower.all.each_with_index do |super_power, index| -%>
    <label>
      <%- if gift = @villain.gifts.find_by_super_power_id(super_power.id) -%>
        <%= hidden_field_tag "villain[gifts_attributes][#{ index }][id]", gift.id %>
        <%= check_box_tag "villain[gifts_attributes][#{ index }][_delete]", false, true %>
        <%= hidden_field_tag "villain[gifts_attributes][#{ index }][_delete]", true %>
      <%- else -%>
        <%= check_box_tag "villain[gifts_attributes][#{ index }][super_power_id]", super_power.id %>
      <%- end -%>

      <%= super_power.name %>
    </label><br />
  <%- end -%>

If the gift is detected, the villain has the super power, and we handle our second case from above, using the checkbox / hidden field hack Rails employs in the check_box helper method to make sure a value is sent whether or not the checkbox is checked. The else block handles the other case, setting up our params hash to create the gift if the checkbox is checked.

This works, but we probably don’t want to copy and paste that code everywhere we use this pattern. How can we reuse this in a DRY fashion? Here’s a helper method that encapsulates the logic:

  def has_join_relationship(model, join_collection_name, related_item, collection_index, options={})
    returning "" do |output|
      relationship_name = options[:relationship_name] || related_item.class.table_name.singularize + "_id"
      tag_prefix = "#{ model.class.class_name.underscore }[#{ join_collection_name }_attributes][#{ collection_index }]"

      if join_item = model.send(join_collection_name).find(:first, :conditions => { relationship_name => related_item.id })
        output << hidden_field_tag("#{ tag_prefix }[id]", related_item.id)
        output << check_box_tag("#{ tag_prefix }[_delete]", false, true)
        output << hidden_field_tag("#{ tag_prefix }[_delete]", true)
      else
        output << check_box_tag("#{ tag_prefix }[#{ relationship_name }]", related_item.id, false)
      end
    end
  end

Drop that in a helper, and then your form code becomes:

  <%- SuperPower.all.each_with_index do |super_power, index| -%>
    <label>
      <%= has_join_relationship(@villain, :gifts, super_power, index) %>
      <%= super_power.name %>
    </label><br />
  <%- end -%>

Much nicer … although I’m not sold on the name has_join_relationship. Any suggestions?


Tue, 27 Apr 2010 09:12:07 GMT

Shutting down Usage Report!

Oops, I did it again. Abandoning an idea after I invested quite some time on it even before it was released. This morning I had a good talk with my wife on where I should go with this project. It’s always hard to call it quit after spending quite some time on something but I changed once too many direction in the last two month that I don’t have a product to put on the market yet and to reach a point where I could sell something would take me a few more months (working on Mondays only) to get there…So I think I will call it a day on this project. Now that doesn’t make me feel great as I start having a track record of starting things and not finishing them…at least for project I want to commercialize. I seem to have an easier time to create stuff that I give away for free for some reasons. Having three kids and only limited time I was hoping to turn my hobby of trying to create products into some revenue generating activity so I can easier justify the time I spend on it.

Now there are several lessons I’m learning the hard way here. First I shouldn’t get stuck in having so much fun trying new stuff or solving technical issues without knowing if there is even a market for it. I’m for sure not a great business person but I should really focus on finding something people would be interested before spending too much time in one direction. Based on the fact that I work only Monday’s on this, something that can be created in three weeks full time takes month and month when working part time. I was pretty sure the UsageReport tool was a short term project but of course it ended up being more complex and more time consuming than expected. I was trying to see if there is any side product I could create from this last effort but to create something useful from my code base would still be more work than I can/I’m willing to spare at this time.

In the same vein, I’m not too troubled of spending all this time on these projects as I see it more like practice which makes me a better programmer in the long run and often helps out tremendously on my consulting gigs, and it’s fun to do. And the fact that I’m not troubled by this is an issue in it self as I could spend a fraction of the time learning the same things while working on these projects if the goal was just to learn.

The main issue is still that I never went life with any of these projects. MySpyder.net was awesome, but we never opened it up to the public or even a private beta. SiteExtractor.com was a cool concept but it was too rough to release, before I changed focus and worked WatchThatSite.com. All along the way I used ec2, s3, and Co so I’ve create a tool to visualize the pricing breakdown…and thought I could make a product from it. So over the last few years, just when I had to release something I jumped to the next thing.

Now I want to write about this publicly as it helps me think about why I ended up in the same place again, and I want to find out a way to do it differently next time….Yea, I know some people never learn ;-). So let’s see where I will go from here.

I had several consulting opportunities over the last few month I didn’t follow as I currently only have 20% of my week still available and I really thought I could nail the Usage Report project over a 6 month period and didn’t want to take on any extra work. Well I still worked on the Vault (http://vault.ncaa.com) with Cameron, and that was really fun! I’m right at 5 month with no end in view.

My wife recommends taking on new gigs as she doesn’t believe that a product can be created working part time…At least by me, and I think I’m proving her point pretty well. But I’m not ready to give up yet on creating a product. So what can I do avoid repeating history? I think I loose quickly faith in the ideas I have, or rather I’m getting quickly excited about new ideas without even proving that something works or releasing the project. So instead of tackling 15 days project (that are really 60 days) projects, I should start with some mini projects where I can create something within 3 to 5 days, then release it. At least this will force me to focus really hard on one idea and implement it, get real user feedback and go from there. If I could pull this of, I could maybe create several smaller apps and see which one takes off. Hey let me dream of that at least :-).

Gatelys had the same approach with their eCommerce store. They had a main store where selling many different type of products and based on best sellers where opening custom store for that type of item. In the same way, instead of guessing what type of application could work, I could experiment with smaller apps and see which gains more tractions.

So what are the new ideas…Well, first I need to see if I really cannot create a version of the Usage Report within 3 to 5 days based on the code base I now have. That would be a great first app to add to http://appsden.com. Another idea would be a pro version of the WebSnapshot tool http://myspyder.net/tools/websnapshot/ I wrote several years ago and which was downloaded over 5000 times and received good reviews. I have a few good ideas on that front. Another tool I would love to write is something that provides the functionality of iAwsManager but by showing a visual representation of a data center, more like a 2.5D game…Well that sounds bigger than a few days of work. I would love to create a twitter visualization tools that shows discussion threads and retweet flows. And there are many more ideas poping every days…If only I can pick one and stick with it, I wouldn’t have to write such blog entries.

If you read so far, thank you for sticking with me during this long thought process. For me at least it was useful ;-)

Cheers,
Daniel


Tue, 20 Apr 2010 10:01:00 GMT

UsageReport Downloader for Amazon Web ServicesTM. A simple tool to download all you usage reports with one click. ec2, s3, sns, sqs and more

UsageReport Downloader for Amazon Web ServicesTM is a simple tool to download all you usage reports with one click.

Install UsageReport Downloader

mainui.png

The files are download in your documents folder. You can change the default folder. You selection is kept for the next time.

Click the Download XML or Download CSV button to choose which format the report should be downloaded from and off you go…

downloading.png

All you files are download to the select download folder (here /Users/daniel/Documents/usagereport/downloads/Current\ Billing\ Period)

downloadedfiles.png

When the application start it checks if you already logged in and you will see the following message.

pleasewait.png
You can stay logged in between launching the application, we recommend that you log out once you download all you files.

If you need to login just enter your email and amazon password as usual for https://aws.amazon.com.

usernamepassword.png

If you use the authentication tokens for signing in you will be presented this additional screen:

token.png

Et voila??Happy downloading!

Please contact me at daniel@appsden.com for any bugs, issues, questions.

Enjoy!
Daniel Wanja


Wed, 07 Apr 2010 04:13:00 GMT

Cucumber, meet Routes

I’ve been loving Rails BDD with Cucumber for the past year or so — it helps me focus on the next required step to build a feature in my application, and better focus equals better development velocity. However, one thing I found tedious in starting with Cucumber was defining route matchers in paths.rb.

The stock path_to method is implemented as a case statement, allowing you to add a case for each path you want to recognize. This works, but leaves you feeling a bit un-DRY since you’re basically duplicating information in your routes.rb file.

Here’s a quick hack to paths.rb that lets you leverage your existing routes:

change

    else
      raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
        "Now, go and add a mapping in #{__FILE__}"
    end

to

    else
      begin
        page_name =~ /the (.*) page/
        path_components = $1.split(/\s+/)
        self.send(path_components.push('path').join('_').to_sym)
      rescue Object => e
        raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
          "Now, go and add a mapping in #{__FILE__}"
      end
    end

In your Cucumber steps, you can now use any named route that does not require a parameter. For example, users_path would become “the users page”, and new_product_path would become “the new product page”. As you add new resources, at least the index and new options should work out of the box — no further edits to paths.rb required!

UPDATE:

w00t!

This is now baked into cucumber-rails!


Mon, 05 Apr 2010 23:55:13 GMT

Call for help for a Amazon Web Services Usage Report visualizer tool

I’ve cross posted this call for help on the Amazon Web Service Discussion Forum.

I need your help understanding your usage reports logs for a visualization tool I’m currently developing.

I’ve been reading this forum for a while and found great information on it. The tool in question is for all Amazon services not just ec2, but I thought the ec2 forum was the most appropriate. Let me know if that’s not the case.

I’ve been working for a while on a desktop application to visualize your amazon web services usage logs, and it’s far from ready, however I should have reached out way earlier an figured out what others would like in such a tool and also I need help to make sure that I can visualize data for larger account and for accounts that use different services.

As a disclaimer, the tool will not be a free tool, but it will be very affordable but I didn’t figure the pricing out yet as I’m not exactly sure what functionality I can make work. Currently I’m having difficulties figuring out how I will make the pricing calculator work correctly after the recent announcement of the Combined AWS Data Transfer Pricing. So the first version of the tool will focus more on visualizing usage rather than calculating price.

So my call for help is to find out more information about your usage report logs. I’m looking for people that have larger accounts than my current usage. I currently have a few servers and pay a little more than $200 a month. I use ec2, sdb, sqs, rds, s3, but not cf. So I’m looking for a couple of different scenarios with people that pay $2000/month or even way larger usage would be great.

The best help would be if I can have a copy of to the monthly usage logs by hour in XML format. I would understand if you don’t want to give out that information. Please contact me if you are hesitant or need more information so I make clear what I’m trying to achieve and how I will proceed. If I don’t find anyone out there to share this information I would be able to create a tool that just extracts anonymous statistic from your logs that would help answer the different questions I have. Let me know if that would be something you are willing to share.

You can also just help by letting me know what size each of you log files is for each of the services when downloading it in XML format. And how many lines each of the files contains. That would verify some of the assumptions I’m currently making.

To access your logs you must login to your aws.amazon.com account go to the Account page and select Usage Reports from the right menu. Select one of the service from the dropdown, the list includes the following:

  • Amazon CloudFront, Amazon Elastic Compute Cloud
  • Amazon Simple Storage Service
  • Amazon RDS Service
  • Amazon SimpleDB
  • Amazon Simple Queue Service
  • Amazon Virtual Private Cloud

Then your are presented with the Download Usage Report form. For the Time Period field select “Last Month”. Then press the “Download report (XML)” button. This downloads the file my tool will analyze. Download it for each of the services.

My tool, tentatively named Usage Report for Amazon Web Services???, is a desktop application that doesn’t require any server side installation that with one click lets you download directly from Amazon website all the usage reports and give a summary of the usage and allows to view each service individually by providing usage charts and time series of what was used when.

You can find my not so interesting notes on the development progress of my tool at http://awsusageanalyzr.tumblr.com/. The tool will be made available via http://appsden.com. My other blog is http://onrails.org, I’m a Flex and Ruby on Rails developer in Denver.

Any help is appreciated.

Daniel Wanja
d@n-so.com


Thu, 18 Mar 2010 12:20:16 GMT

Sneak peek of Usage Report for Amazon Web Services???????

I have been working on a tool to visualize your Amazon Web Services usage logs for EC2, RDS, SQS, S3, SDB (and soon CF). There will be a limited free version and a full version that has the dashboard and the drill down for each of the services. This tool is still in development but my todo list is getting shorter...so you can have a sneak peek here:

Sneak peek of Usage Report for Amazon Web Services??????? from daniel wanja.