Every Second Counts with a Piston in your Trunk
27 comments Latest by whole house fm transmitter Tue, 31 Aug 2010 02:33:56 GMT
Recently, I wrote about using RSpec and autotest (...which I think should be called autospec) together to help boost productivity while working on Rails projects. It seems that a few members of the PLANET ARGON team have picked up on using it, which I’m happy to hear about. :-)
It’s not the only thing that I’m happy about though.
I recently came across another gem. Several of my comrades in #caboose are using piston to manage external plugins for Ruby on Rails. Wait! Isn’t this what Subversion externals is meant for? Well, yes… but externals also eat away at productivity. For example, each day, we may have anywhere from 4-6 designers and developers working on one client project. When we’re in crunch mode, this could account for quite a few subversion commits throughout the day. We all know that we should run svn up on a regular basis to make sure that we’re keeping things in sync… especially when designers and developers are working really closely and fine tuning something specific in the application. Well, the one downside to this process is that each svn up not only checks our repository, but it also checks external repositories.
“But wait! Can’t you just ignore externals on an update?”
Of course, but who wants to type out --ignore-externals each time they run an update? ...or perhaps you could make an alias for this in your shell. In any event, everyone on the team is then left to be responsible for doing this… and an extra 30-60 seconds (if not longer) per svn update times x number of people on project… well… time wasted if you’re closely watching the svn updates. Also, TextMate doesn’t have an option currently (that I could find) to ignore externals, so for those who manage subversion through it… they’re waiting on externals within their primary workspace.
Another issue with svn externals is that when a repository goes down, it really starts to slow stuff down your updates. This is always fun when you go to deploy your application with Capistrano and realize that you can’t finish the update because it can’t connect it to http://svn.lazyatom.com/public/plugins/acts_as_hasselhoff/ to make sure that your application has the latest version of the best plugins available for Rails.
Then there is the whole issue of wanting to make changes to the plugin that you’re including as an external. How does that fit into the whole mix?
There is Hope!
Piston encourages you to keep your external plugins in your local repository. Don’t worry, it remembers where it retrieved the code from so that you can update from the external repository at any time.
Installing Piston
Again, this is really simple like most gems.
$ sudo gem install -y piston
Password:
...
Successfully installed piston-1.2.1
Great, that’s all that you have to do to get started with Piston. Now, let’s get on with the show.
If you don’t have any existing Subversion externals, feel free to skip this section.
Converting existing externals
Okay, so let’s say that you’re working on a Ruby on Rails project and are relying on several external repsitories. For example, a project that I’m working on… currently looks like this.
$ svn proplist --verbose vendor/plugins/
Properties on 'vendor/plugins':
svn:externals :
authorization http://svn.writertopia.com/svn/plugins/authorization
svn_tools http://svn.planetargon.org/rails/plugins/svn_tools
simply_helpful http://dev.rubyonrails.com/svn/rails/plugins/simply_helpful
exception_notification http://dev.rubyonrails.com/svn/rails/plugins/exception_notification
asset_field http://svn.planetargon.org/rails/plugins/asset_field
rspec_on_rails svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_5/rspec_on_rails/vendor/plugins/rspec_on_rails
rspec_autotest http://svn.caldersphere.net/svn/main/plugins/rspec_autotest
Piston is smart enough to know how to convert these Subversion externals into Piston-friendly plugins. This can be done by passing the piston command the convert option from within your Rails application directory.
Go ahead and run the following.
$ piston convert
Importing 'http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-0_RC1' to vendor/rails (-r 5619)
Exported r5619 from 'http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-0_RC1' to 'vendor/rails'
Importing 'http://svn.writertopia.com/svn/plugins/authorization' to vendor/plugins/authorization (-r 83)
Exported r83 from 'http://svn.writertopia.com/svn/plugins/authorization' to 'vendor/plugins/authorization'
Importing 'http://svn.planetargon.org/rails/plugins/svn_tools' to vendor/plugins/svn_tools (-r 119)
Exported r119 from 'http://svn.planetargon.org/rails/plugins/svn_tools' to 'vendor/plugins/svn_tools'
Importing 'http://dev.rubyonrails.com/svn/rails/plugins/simply_helpful' to vendor/plugins/simply_helpful (-r 5700)
Exported r5700 from 'http://dev.rubyonrails.com/svn/rails/plugins/simply_helpful' to 'vendor/plugins/simply_helpful'
Importing 'http://dev.rubyonrails.com/svn/rails/plugins/exception_notification' to vendor/plugins/exception_notification (-r 3900)
Exported r3900 from 'http://dev.rubyonrails.com/svn/rails/plugins/exception_notification' to 'vendor/plugins/exception_notification'
Importing 'http://svn.planetargon.org/rails/plugins/asset_field' to vendor/plugins/asset_field (-r 50)
Exported r50 from 'http://svn.planetargon.org/rails/plugins/asset_field' to 'vendor/plugins/asset_field'
Importing 'svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_5/rspec_on_rails/vendor/plugins/rspec_on_rails' to vendor/plugins/rspec_on_rails (-r 1330)
Exported r1330 from 'svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_5/rspec_on_rails/vendor/plugins/rspec_on_rails' to 'vendor/plugins/rspec_on_rails'
Importing 'http://svn.caldersphere.net/svn/main/plugins/rspec_autotest' to vendor/plugins/rspec_autotest (-r 48)
Exported r48 from 'http://svn.caldersphere.net/svn/main/plugins/rspec_autotest' to 'vendor/plugins/rspec_autotest'
Done converting existing svn:externals to Piston
All we have to do now is checkin our changes to subversion and we’re golden.
svn ci -m "updating repository to use piston instead of those lame-o externals..."
If you find this interesting and want to learn more, be sure to check out this post on Ruby Inside for a detailed introduction to Piston.
update
the following morning I saw this come across our development team channel…
< argonbot> svn.commit( project_name, { :author => 'brian.ford', :rev => 83, :log => 'converted svn:externals to piston for product, cus I can.' }
:-)
Enjoying the content? Be sure to subscribe to my RSS feed.







But… why would you ever want to change acts_as_hasselhoff? It’s Freaking Perfect!! :)
Piston does seem like the way forward, combining the best of SVN:Externals with the ability to really be in control of your application’s dependencies. Nice.
In my latest web 2.0 application, I am using a different picture of hasselhoff for all of my links than the one that was chosen by the original of author aah. It’s a difference of opinion and I’m an opinionated developer. Piston allows me to be even more opinionated now and that’s just my opinion.
How are you dealing with switching urls later? for example, above you’ve piston’d vendor/rails to 1.2.0RC1; how did you go about changing it to 1.2.1 once that released?
The path of least resistance that I could find was to nuke vendor/rails, commit then piston import the new version. The commit is required because svn throws its dummy out of the pram when moving one thing over another thing; in fact, once something is being ‘A’dded it can’t be moved until it’s committed.
And the day after I ask, piston 1.3.0 is released containing a switch command. woo!
@iain: “in fact, once something is being ‘A’dded it can’t be moved until it’s committed.”
Just revert it. Seems weird to revert something that’s not in the repository yet, but there you go.
wonderful
Well, the one downside to this process is that each svn up not only checks our repository, but it also checks external repositories.
Your article was wonderful, and I have share it with my friends! chi flat irons, chi straightener,
uk Tiffany accused eBay of false advertising because its website touted Tiffany rings , but many of them were actually counterfeit. He ruled in July 2008 that eBay was not liable for trademark infringement by allowing Tiffany earrings to be sold on the website by individuals. Tiffany necklaces then appealed to the higher court. These effective lida daidaihua do not have any harmful side-effects. You get great discounts on your box of daidaihua , the entire details and instructions to take these effective lida slimming is clearly mentioned on the site, slimming capsule that are easily available on the online stores. slimming capsules are mostly safe and able but several affected and abortive articles actualize a bad name for all slimming capsule .
Demonstrate a unique new conceptjordan shoesAwA518
ok
five fingers vibram,
Thanks a lot for a bunch of good tips. I look forward to reading more on the topic in the future. Keep up the good work! This blog is going to be great resource. Love reading it.
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.
sure that we’re keeping things in sync… especially when designers and developers are working really closely and fine tuning something specific in the application. Well, the o
Air jordan Fusion 4.5,Air jordan Fusion 4.5
Nike Air Jordan b’loyal,Nike Air Jordan b’loyal
Nike Air jordan dube zero,Nike Air jordan dube zero
Paul series,Paul series
Louis Vuitton,Louis Vuitton
Air Yeezy,Air Yeezy
Air Jordan 1,Air Jordan 1
Air Jordan 3,Air Jordan 3
Air Jordan 4,Air Jordan 4
http://www.bestchisale.comThank you for this post, really interesting. Feel free to comment on my blog, I was solving similar problem.chi hair straighteners chi flat irons chi hair tools
Christian shoes for gorgeous women’s is not as general in the States as his Christian Sandals shoes, but also for his distinctively styled handbags. God forgive me, I interviewed Christian Louboutin while wearing a pair of trainers. What remains most identifiably hiphoppish about it is the beat-in-the-body that serves as ground for Classic Christian Louboutin growing-and contradictory-repertoire of lyrical lambaste it leverages.Some of the dressiest elegant Christian Louboutin pumps also feature sparkling rhinestone bands layered along the raised sole and Christian Louboutin heels.
Louis Vuitton Shoes Louis Vuitton Sneakers LV Shoes
Air Yeezy[/url] Flat Irons[/url] Shoes[/url]
Thanks for posting this. Saints JerseysVery nice recap of some of the key points in my talk. I hope you and your readers find it useful! Thanks again http://www.nflsaintsshop.com/saints-jerseys/drew-brees-jerseys Drew Brees Jerseys
ED Hardy LingerieED Hardy Women’s SleevesED Hardy SandalsED Hardy Women’s SandalsED Hardy Women’s T-shirtsED Hardy SwimwearED Hardy BikiniED Hardy TanksED Hardy Women’s TanksED Hardy Knits TopsC A WomenC A Man
skype phone skype phonedell laptop battery dell laptop batterylaptop battery laptop batterylaptop batterieslaptop batteriesgateway laptop battery gateway laptop batterysony vaio laptop batterysony vaio laptop battery ac adapter ac adapterdell ac adapter dell ac adapter hp ac adapter hp ac adaptertoshiba laptop battery toshiba laptop battery, leather handbags and fashion handbags and many good aluminum briefcase, aluminum cosmetic case aluminum tool case, aluminum train case.hp laptop battery hp laptop batteryibm thinkpad battery ibm thinkpad batteryacer laptop battery acer laptop battery
This is a really quality post.I find this information through Google. Great job. ugg boots outlet new uggs ugg adirondack boots
I am love this blog very much, i will continue to read! uggs boots on sale discount uggs ugg classic boots
Caricature Artworks ,christian louboutin Only include links you think people who have
read your article would like to see. Avoid miscellaneous information that doesn’t really help the user at this point like recent
comments. Manolo Blahnik uses the standard 6 125×125 ads as well as a bigger one on top. They are clearly labeled as sponsors and
before you even see the ads you see their tagline, which shows how much they prioritize their content over their ads.I have a
pompom in seen so long and I loved really the fun and flirty taking on the different high school-esque item. But this is just an
element; this bag is so much more. After I exceeded moved my pompom intrigue, I found fixated on the Blue shiny Python material. This material embraced so perfectly
that it seems as they were literally made for any other form of the small shoulder bag. I’ve mentioned it before, but I’m a little careful
always of great bags formed from Python skin I never want the Python it too fuzzy or how was beaten on the bag.Caricaturing is the
art of illustrating the human face and figure in a way that exaggerates their prominent features. Most caricatures are satirical in
nature,2010 christian louboutin discount New Style, making fun of the people
being characterized. They are often used in newspaper editorial cartoons and other similar media, although they are made just as
often simply for their entertainment value.
The following caricature design examples characterize a variety of personalities, from past icons to
href=”http://www.usachristianlouboutin.com”>christian Louboutin
superstars,christian louboutin, from famous fictionalcharacters to everyday real ones.It is uncertain whether the use of the word “club” originated in its meaning of a knot of people, or
from the fact that the members “clubbed” together to pay the expenses of their meetings. The oldest English clubs were merely
informal periodic gatherings of friends for the purpose of dining or drinking together. Thomas Occleve (in the time of Henry IV)
mentions such a club called La Court de Bonne Compagnie (the Court of Good Company), of which he was a member. In 1659
John Aubrey wrote, “We now use the word clubbe for a sodality [a society, association, or fraternity of any kind] in a tavern.” If you’
ve been looking for caricature inspiration for a while,Christian Louboutin News, we hope this post gives you that spark – and maybe
even a smirk or two to christian louboutin sale!
I agree with the post. It takes a great mind to bring such thoughts to the public, and make it so simple to read and process. Thank you for placing a lot of effort into your article. I stumbled upon a place that ya’ll might want to visit. It’s kinda strange, but seems to be really cool. What’s better than an cool surprise? Beats me, but what I do know is that over at mystery best you can score some awesome prizes in every box. Yep, every box holds something amazing. You can win money,vacations,cars and more! It’s easy to win. Just go over and enter your email for a chance to win the huge mystery box. That was the jist of the text on the site. Not too bad.