As you may have heard, Gemcutter is now the official Gem repository for the ruby community and requests to gems.rubyforge.org are being handled by gemcutter.org.
With this change, we’re glad to announce that Webbynode customers enjoy a full Gemcutter mirror, available through internal network. This means you can download and install your favorite, up to date gems faster and without consuming your local bandwidth!
For that to work, you should maintain
http://repo.webbynode.com/gems/ as your first source (before gemcutter).
If you already used Gemcutter’s
gem tumble, it’s just a matter of running it again and then adding gemcutter.org to your
Here’s how your
~/.gemrc file should look like:
Recently here at Webbynode we had a demand for validating HTML without going as far as driving a browser. We have an internal library that generates HTML after compiling HAML templates. To fulfill our BDD needs, we wanted a simple, straightforward way to validate HTML tags without the need of a full blown browser driving engine, since we don’t have an HTTP server running while testing this library.
We found out that Webrat’s Matchers and HaveTagMatcher classes was all we needed. Combined to a couple of custom Cucumber steps, here’s how simple it became to validate our HTML tags:
In order to make those steps work, here’s what we needed. First, requiring Webrat and including its matchers into our Cucumber world:
Note that we have added a new method as well, called response_body. That’s where Webrat will expect your HTML body to be, so in our HTML generating component we just assign the @body variable:
And, finally we created a couple of custom steps to make dead simple to match HTML tags:
This way, you have matchers for any tag, just using things like “I should see a div with id: content, name: content, class: bordered, content: Your profile have been saved”. Note that content is a special key within Webrat matchers, and it will imply the following HTML chunk:
<div id="content" name="content" class="bordered">
Your profile have been saved
Do you know any other interesting custom steps for Cucumber? Share them in the comments!
Update: I have narrowed the former two cucumber steps to only one. I had an “a vs. an” issue with regexp but Jim provided some feedback on his comment and I applied it. Thanks, Jim!
We just unveiled a new feature for Webbies that allows you to save your deploy settings for future installations or for replicating the very same stack into other Webbies.
When you get to the final deployment screen for a ReadyStack deployment, you’ll notice a new button that reads “Save this Deploy”.
By clicking the button, a window will pop up , and you’ll be prompted to give the current deploy settings a name to save it for later.
By saving it, you can deploy a ReadyStack with the exact same attributes, and all you have to do is click one of the saved deploys, right on the Redeploy page:
It happens a lot quicker now: you just have to click the link and confirm. This way you can keep a collection of 1-Click Quick Redeploys around, ready to be used.
The latest buzz in terms of database in the Rails and Ruby world is MongoDB. It’s not only the hype, though: it’s a solid document-oriented (or schema-free) database which is very fast and scalable.
We’re going to use MongoDB for a couple of new features we’re unleashing in the near future. After doing some research we decided to user John Nunemaker’s stellar (reusing the word he used to describe MongoDB itself) MongoMapper (GitHub).
The DSL MongoMapper provides is really nice. You define your models (or your documents definitions) in a very nice way. Basically each model can be either a Document or an EmbeddedDocument. While the first generates a new document, the former will generate a document that can only be used within another document (or, in other words, as a relation). It’s a nice way to describe a problem domain, without having too much nesting on your logical models. Let me try to explain this with code.
Imagine we have our app domain described by the following code:
See how you can save a Customer instance, but not an Address instance? That’s because an Address doesn’t imply a document per se, it only exists in other documents.
While implementing the feature I tried to create a model inheritance structure, so I could interop between them. Even though this would be achievable without former polymorphic associations, I decided to give it a shot.
After a night of coding, here’s what you can now do with MongoMapper:
I love when I find a library like MongoMapper, but I like it even more when I can give back.
And if you like this addition, you should recommend me here.
- => MongoDB Homepage
- => John Nunemaker’s Blog Post about MongoMapper
- => jnunemaker/mongomapper on GitHub
- => fcoury/mongomapper on GitHub (my fork with polymorphic associations)
Until next time,
Hey there folks. We just pushed out the door a new Webby Manager release. Here is a summary of the goodness this brings:
DNS records order
Records are now sorted by type and name.
Gmail DNS Integration
Due to popular demand we added a button to DNS zone page, so once you sign up for Gmail for Apps (in the Google for Apps website), all you have to do is click this button and follow Gmail instructions for activating your account.
We added this amazing open source CRM product called Fat Free CRM: to ReadyApps.
Feedback & Bug Reporting
We’ve added UserVoice to the Webby Manager so users can request and vote on Features.
More to come, so stay tuned!
We noticed many of our users aren’t aware that our Webby Manager has nice keyboard shortcuts to manage repetitive tasks.
All you have to do is press ‘h’ from anywhere within the manager and then a context-sensitive dialog will popup with all the available shortcuts.
Here’s an example:
I am thrilled to announce we just released the first version of our Webbynode API. This first version includes basic Client information, Webby actions and DNS (Zones and Records) management.
If you go to your account section, you’ll notice that besides the usual information there is a new API Token entry:
To understand what you can currently do with the API, download the Webbynode API Guide:
And don’t forget to give your feedback, so we can tailor the next versions based on your wishes. Here’s a forum post on this subject:
Go give us your feedback!