From hello at timperrett.com Wed Jan 2 05:25:12 2008 From: hello at timperrett.com (Tim Perrett) Date: Wed, 2 Jan 2008 10:25:12 +0000 Subject: Loading config YAML into merb process for the life of the process In-Reply-To: <96E1C1C4-30B2-4CB8-906E-01EA8D4E7D7F@engineyard.com> References: <96E1C1C4-30B2-4CB8-906E-01EA8D4E7D7F@engineyard.com> Message-ID: <5CCE35AD-1D54-4C28-9DD1-1D0BFB1C9523@timperrett.com> Hey Ezra, Thanks, thats brilliant :) Cheers Tim On 31 Dec 2007, at 00:12, Ezra Zygmuntowicz wrote: > Hey Tim- > > There are a few ways of doing this. The best way it to use the > Merb::Plugins.config hash. If you generate a fresh plugin: > > merb -P foobar > > Then look in the plugin at the lib/foobar.rb file you will see this: > > # make sure we're running inside Merb > if defined?(Merb::Plugins) > > # Merb gives you a Merb::Plugins.config hash...feel free to put > your stuff in your piece of it > Merb::Plugins.config[:foobar] = { > :chickens => false > } > > Merb::Plugins.add_rakefiles "foobar/merbtasks" > end > > > So your best bet is to load the yaml file here and store it away in > the Merb::Plugins.config hash.. Something like this: > > > # Merb gives you a Merb::Plugins.config hash...feel free to put > your stuff in your piece of it > Merb::Plugins.config[:foobar] = Erubis.load_yaml_file(MERB_ROOT / > 'config' / 'foobar.yml' ) > > > Then you can put your foobar.yml file inside of MERB_ROOT/config/ > And now in your app when you want to refer to the hash of stuff > loaded from the yaml file you woudl access it like this: > > Merb::Plugins.config[:foobar][:somekey] > > > Doing it will Erubis.load_yaml_file will load the yaml file and > interpolate any erb tags inside of it before yaml loading it. > > Make sense? > > Cheers- > > - Ezra Zygmuntowicz From hello at timperrett.com Wed Jan 2 18:22:42 2008 From: hello at timperrett.com (Tim Perrett) Date: Wed, 2 Jan 2008 23:22:42 +0000 Subject: Deploying merb as a windows service Message-ID: <7D23AE46-8B61-46EE-BDAF-AC4FBADE1D03@timperrett.com> Hey All I was just wondering if anyone had tried deploying merb as a windows service? I am familiar with the sc.exe tool ( http://support.microsoft.com/kb/251192 ) - do you think adding the correct paths and such to the merb bin will work? I am going to try this tomorrow but wondered what peoples thoughts were? Many thanks Tim From wiseleyb at gmail.com Wed Jan 2 19:48:22 2008 From: wiseleyb at gmail.com (ben wiseley) Date: Wed, 2 Jan 2008 16:48:22 -0800 Subject: render :update do |page| Message-ID: I was wondering if anyone knew how to do the rails equivalent of render :update do |page| It looked like maybe render_inline would do. If that's it - does anyone have an example? Has anyone ported the scriptaculous helpers to a merb plugin yet? Also - is there anyway to search the mailing list archives? Sorry for the newb questions. Looks like a great framework though! -ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080102/577a7c93/attachment.html From ivey at gweezlebur.com Wed Jan 2 20:16:54 2008 From: ivey at gweezlebur.com (Michael D. Ivey) Date: Wed, 2 Jan 2008 19:16:54 -0600 Subject: render :update do |page| In-Reply-To: References: Message-ID: On Jan 2, 2008, at 6:48 PM, ben wiseley wrote: > I was wondering if anyone knew how to do the rails equivalent of > > render :update do |page| Merb doesn't have a built-in RJS mechanism like Rails does. There's not currently a way to execute JS like that. I wouldn't be surprised to eventually see a plugin for Rails-style RJS, but I would be highly surprised if it ever made it into Merb proper. Best practice in Merb land is to use more of an unobtrusive JS approach, with jQuery or UJS-style prototype. From hello at timperrett.com Thu Jan 3 14:13:59 2008 From: hello at timperrett.com (Tim Perrett) Date: Thu, 3 Jan 2008 19:13:59 +0000 Subject: Whats the merb equivilant of this? Message-ID: Hey All Quick question, what's the merb equivalent of this: ActionView::Base.new([template_root], assigns, self) in merb? Ive found Merb::Template::Erubis.transform(:file => '/path/to/file') But I've no idea if thats the correct thing to be calling? It doesn't 'feel' right, so im not sure it is? Thanks Tim From niall at 4L.ie Thu Jan 3 13:06:10 2008 From: niall at 4L.ie (Niall Mullally) Date: Thu, 03 Jan 2008 18:06:10 +0000 Subject: Can't get upload progress bar working Message-ID: <477D2412.9090500@4L.ie> Hi, Apologies if this has been asked and answered previously. I just started looking at Merb today as I'd like to use it as an upload server, especially the upload progress feature. I've installed the latest Merb gem (0.4.2) and created a new application to test out uploading. I took elements of the mr_blog application and integrated them into it. I realise this application is out of date but I updated it with some newer code posted by somebody else on this list (sorry, I forget the name) and I have uploading working. However, I can't get the upload progress bar to work. When the upload begins, 0% appears in the progress bar and it never changes, the upload finishes and redirects. I've been trying to figure this out for most of today with no luck so am hoping some kind soul here can help me out. Rather than going into further specifics, here is my application code, if somebody would be willing to download it to try and diagnose the problem, it would be much appreciated. Download here: http://www.4l.ie/merb/upload_progress.zip (100k) Here's a copy of the merb log during a typical upload of a 150 meg file on my local machine (my comments are in brackets): http://www.4l.ie/merb/merb_upload.log At this point I believe the issue lies with the @upstatus instance variable in controllers/files#progress being nil so the UploadProgress.update (javascripts/mup.js) function call in views/files/progress.js.erb is not being called, hence why nothing is happening to the progress bar. I'm working on OS X 10.4.10, ruby 1.8.4, mongrel 1.1.3 and have the various merb gem dependencies installed. Thanks in advance for any assistance. Regards, Niall Mullally From hello at timperrett.com Thu Jan 3 15:11:31 2008 From: hello at timperrett.com (Tim Perrett) Date: Thu, 3 Jan 2008 20:11:31 +0000 Subject: Whats the merb equivilant of this? In-Reply-To: <23534B3E-F301-4FE0-8897-C6B740F916D6@engineyard.com> References: <23534B3E-F301-4FE0-8897-C6B740F916D6@engineyard.com> Message-ID: <77303383-AC91-4243-907A-4EEA19729D9A@timperrett.com> Hey Ezra I am actually implementing a SMS gem for merb that i want to put onto rubyforge. But I thought that to keep the MVC structure id break out the actual message into a ERB view file. It occurred to me that ActionMailer renders things directly, so I took a look at that which is where I got the idea for rendering the template directly. Perhaps there is a 'more merb' way of handling the templates? Many thanks Tim On 3 Jan 2008, at 19:50, Ezra Zygmuntowicz wrote: > What are you trying to do exactly? Are you just trying to render a > template directly? The closest thing to what you are trying there > would be something like this: > > template = "#{MERB_VIEW_ROOT}/articles/index.html.erb" > engine = Merb::Template.engine_for(template) > body = engine.transform(:file => template, :view_context => > ViewContext.new(self)) > > The self in the ViewContext.new(self) is a controller instance so > this code would need to go in your controller somewhere. > > This article might help too: > http://www.timocracy.com/articles/2007/12/17/isolated-controller-and-view-testing-in-merb > > Cheers- > > - Ezra Zygmuntowicz From ez at engineyard.com Thu Jan 3 14:50:26 2008 From: ez at engineyard.com (Ezra Zygmuntowicz) Date: Thu, 3 Jan 2008 11:50:26 -0800 Subject: Whats the merb equivilant of this? In-Reply-To: References: Message-ID: <23534B3E-F301-4FE0-8897-C6B740F916D6@engineyard.com> Hi Tim- On Jan 3, 2008, at 11:13 AM, Tim Perrett wrote: > Hey All > > Quick question, what's the merb equivalent of this: > > ActionView::Base.new([template_root], assigns, self) > > in merb? Ive found > > Merb::Template::Erubis.transform(:file => '/path/to/file') > > But I've no idea if thats the correct thing to be calling? It doesn't > 'feel' right, so im not sure it is? > > Thanks > > Tim What are you trying to do exactly? Are you just trying to render a template directly? The closest thing to what you are trying there would be something like this: template = "#{MERB_VIEW_ROOT}/articles/index.html.erb" engine = Merb::Template.engine_for(template) body = engine.transform(:file => template, :view_context => ViewContext.new(self)) The self in the ViewContext.new(self) is a controller instance so this code would need to go in your controller somewhere. This article might help too: http://www.timocracy.com/articles/2007/12/17/isolated-controller-and-view-testing-in-merb Cheers- - Ezra Zygmuntowicz -- Founder & Software Architect -- ezra at engineyard.com -- EngineYard.com From luislavena at gmail.com Thu Jan 3 15:30:55 2008 From: luislavena at gmail.com (Luis Lavena) Date: Thu, 3 Jan 2008 18:30:55 -0200 Subject: Deploying merb as a windows service In-Reply-To: <71166b3b0801021542q56bc89a5k1aad42a8a50f00bd@mail.gmail.com> References: <7D23AE46-8B61-46EE-BDAF-AC4FBADE1D03@timperrett.com> <71166b3b0801021542q56bc89a5k1aad42a8a50f00bd@mail.gmail.com> Message-ID: <71166b3b0801031230h3394e0c0v3aa3529fd1c4fcda@mail.gmail.com> reply-to of this list need to get fixed ;-) Forward message that didn't get into the list. On Jan 2, 2008 9:22 PM, Tim Perrett wrote: > Hey All > > I was just wondering if anyone had tried deploying merb as a windows > service? I am familiar with the sc.exe tool ( http://support.microsoft.com/kb/251192 > ) - do you think adding the correct paths and such to the merb bin > will work? I am going to try this tomorrow but wondered what peoples > thoughts were? > No, it wouldn't. ruby.exe do not offer out of the box solution for this, you need win32-service gem win32utils project: gem install win32-service. 1 year ago I used that project to power mongrel_service. Found that Rails+Mongrel+Ruby don't play nice on how windows process, specially services work. I needed to move from pure/pre-compiled ruby solution to custom build solution using external executables for it. You can unpack the original code of mongrel_service 0.1 to see how it worked with Win32::Daemon class back then. gem install mongrel_service -v '0.1' gem unpack mongrel_service -v '0.1' Now, you can check the 0.3.4 code that uses ServiceFB library and FreeBASIC to build a Service-aware executable that act as connection between ruby and SCM. > Many thanks HTH, -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams From niall at 4L.ie Fri Jan 4 07:34:44 2008 From: niall at 4L.ie (Niall Mullally) Date: Fri, 04 Jan 2008 12:34:44 +0000 Subject: Can't get upload progress bar working References: 477D2412.9090500@4L.ie Message-ID: <477E27E4.1040308@4L.ie> I'm answering my own question here as I found the solution! :-) :upload_path_match in config/merb.yml had to be set to /files/upload (it was /files/\d). Thanks Ezra for a great little framework, I look forward to exploring it further. Regards, Niall Mullally From hello at timperrett.com Fri Jan 4 10:33:58 2008 From: hello at timperrett.com (Tim Perrett) Date: Fri, 4 Jan 2008 15:33:58 +0000 Subject: Whats the merb equivilant of this? In-Reply-To: <77303383-AC91-4243-907A-4EEA19729D9A@timperrett.com> References: <23534B3E-F301-4FE0-8897-C6B740F916D6@engineyard.com> <77303383-AC91-4243-907A-4EEA19729D9A@timperrett.com> Message-ID: <6E71F6B1-BBA8-4484-8CE9-A31F1CA957E9@timperrett.com> Hey all I ditched all the code I wrote yesterday and started again today implementing something totaly bespoke for merb - needless to say I had much more luck. Everything works now :) I took a look at how the merb mailers work and went from there. I did find it odd there were no generators for the mailers tho? Id be happy to put some together if that would help at all? Cheers Tim From ben at ducktyped.com Sat Jan 5 07:54:35 2008 From: ben at ducktyped.com (Ben) Date: Sat, 05 Jan 2008 13:54:35 +0100 Subject: multi-app merb Message-ID: <477F7E0B.3060505@ducktyped.com> Ezra, I love merb, especially because it's keeping the things that Rails does well and improves on things that Rails hasn't done so well. One of my biggest pain points with Rails has become multi-app integration. A lot of web sites consist of multiple apps (e.g. a core site, a forum, a blog/cms, etc.). Doing this sort of thing is very ugly and inefficient with the current Rails structure, and I would love for merb to make multi-app integration and deployments less painful. For example, integrating a rails app with beast (another rails app) is just as cumbersome as integrating a rails app with a random php forum engine. Try to add mephisto to the mix and you're in integrated hell - (css, js, model) duplication and (routing, SCM, environment) hacks galore. I wrote a post about what sucks about multi-app, what it might look like, and some potential pitfalls here: http://ducktyped.com/2008/1/4/the-great-ruby-web-framework-multi-app-challenge I also started a discussion on ruby-talk: http://www.ruby-forum.com/topic/137539 I just thought I'd put this out for consideration. Ben From wiseleyb at gmail.com Sat Jan 5 11:50:48 2008 From: wiseleyb at gmail.com (ben wiseley) Date: Sat, 5 Jan 2008 08:50:48 -0800 Subject: multi-app merb In-Reply-To: <477F7E0B.3060505@ducktyped.com> References: <477F7E0B.3060505@ducktyped.com> Message-ID: I've love to see this as well. Something like http://rails-engines.org/that's native to merb would be very helpful. -ben On Jan 5, 2008 4:54 AM, Ben wrote: > Ezra, > > I love merb, especially because it's keeping the things that Rails does > well and improves on things that Rails hasn't done so well. > > One of my biggest pain points with Rails has become multi-app > integration. A lot of web sites consist of multiple apps (e.g. a core > site, a forum, a blog/cms, etc.). Doing this sort of thing is very ugly > and inefficient with the current Rails structure, and I would love for > merb to make multi-app integration and deployments less painful. > > For example, integrating a rails app with beast (another rails app) is > just as cumbersome as integrating a rails app with a random php forum > engine. Try to add mephisto to the mix and you're in integrated hell - > (css, js, model) duplication and (routing, SCM, environment) hacks galore. > > I wrote a post about what sucks about multi-app, what it might look > like, and some potential pitfalls here: > > http://ducktyped.com/2008/1/4/the-great-ruby-web-framework-multi-app-challenge > > I also started a discussion on ruby-talk: > http://www.ruby-forum.com/topic/137539 > > I just thought I'd put this out for consideration. > > Ben > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080105/1cdd368a/attachment.html From B.Candler at pobox.com Sat Jan 5 16:46:43 2008 From: B.Candler at pobox.com (Brian Candler) Date: Sat, 5 Jan 2008 21:46:43 +0000 Subject: multi-app merb In-Reply-To: <477F7E0B.3060505@ducktyped.com> References: <477F7E0B.3060505@ducktyped.com> Message-ID: <20080105214643.GA29625@uk.tiscali.com> On Sat, Jan 05, 2008 at 01:54:35PM +0100, Ben wrote: > One of my biggest pain points with Rails has become multi-app > integration. A lot of web sites consist of multiple apps (e.g. a core > site, a forum, a blog/cms, etc.). Doing this sort of thing is very ugly > and inefficient with the current Rails structure, and I would love for > merb to make multi-app integration and deployments less painful. Have you had a look at how Camping handles this? You can just do camping blog.rb foo.rb bar.rb and the three separate apps are mounted under /blog, /foo and /bar (but equally they can be run separately if you wish). Is that the sort of thing you are looking for? It uses the same DB table name convention you mention, e.g. blog_posts, foo_users. And by default, they share the same ActiveRecord DB connection. > I wrote a post about what sucks about multi-app, what it might look > like, and some potential pitfalls here: > http://ducktyped.com/2008/1/4/the-great-ruby-web-framework-multi-app-challenge "What I want is: /app1 /model /view /controller /app2 /model /view /controller" That sounds fairly like the Camping approach, as long as you don't mind URLs of the form /app1/user/login or whatever. Actually, it's pretty easy to configure Rails to have a path prefix like that; in that case, all you need is to run your separate apps as separate pools of mongrel processes, and configure your front-end proxy correctly, e.g /app1 -> ports 1000,1001,1002 /app2 -> ports 2000,2001,2002 /app3 -> ports 3000,3001,3002 But it sounds like you want something more tightly integrated than that - e.g. each mongrel instance able to serve all three apps, and/or all three apps sharing the same connection to the backend database. You mention "memory overhead" as a problem, and also your desire to share javascript, CSS and other resources between the apps. Personally I would argue against sharing such resources between multiple apps: it removes the flexibility to upgrade one app at a different time to another, and it introduces possibilities of apps stamping on each other (e.g. when one app decides to add its own instance methods to NilClass, all other apps will get them whether it likes them or not) But there does seem to be a case for some sort of 'middle ground' where you have a collection of cooperating applications. However if you really want them to share things such as their authentication and authorisation (for single sign-in) then they would have to adhere to a strict interface for this shared service. Such shared services would end up, I think, being top-level plugins of some sort. Just my $0.02. Brian. From gilesb at gmail.com Sat Jan 5 18:49:07 2008 From: gilesb at gmail.com (Giles Bowkett) Date: Sat, 5 Jan 2008 15:49:07 -0800 Subject: multi-app merb In-Reply-To: <477F7E0B.3060505@ducktyped.com> References: <477F7E0B.3060505@ducktyped.com> Message-ID: <2d81dedb0801051549v7f1871a5o729091a4f4a62285@mail.gmail.com> > One of my biggest pain points with Rails has become multi-app > integration. Bit off-topic, but Kirk Haines says Iowa handles multi-app integration without breaking a sweat: http://twitter.com/wyhaines/statuses/560976242 -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com From ben at ducktyped.com Sat Jan 5 21:07:02 2008 From: ben at ducktyped.com (Ben) Date: Sun, 06 Jan 2008 03:07:02 +0100 Subject: multi-app merb Message-ID: <478037C6.5010200@ducktyped.com> Brian Candler wrote: > > But it sounds like you want something more tightly integrated than that - > e.g. each mongrel instance able to serve all three apps, and/or all three > apps sharing the same connection to the backend database. You mention > "memory overhead" as a problem, and also your desire to share javascript, > CSS and other resources between the apps. > > Personally I would argue against sharing such resources between multiple > apps: it removes the flexibility to upgrade one app at a different time to > another, and it introduces possibilities of apps stamping on each other > (e.g. when one app decides to add its own instance methods to NilClass, all > other apps will get them whether it likes them or not) > > But there does seem to be a case for some sort of 'middle ground' where you > have a collection of cooperating applications. However if you really want > them to share things such as their authentication and authorisation (for > single sign-in) then they would have to adhere to a strict interface for > this shared service. Such shared services would end up, I think, being > top-level plugins of some sort. > The two main fixes I'd like to see compared to doing multi-app rails are: 1. Routing should be "moved up a level" so that I can address several apps from the router, rather than using the web server and static url generation hacks to interact across apps. 2. Also, I should be able to access resources across apps, e.g. I should be able to call Blog::Post.all from any other app to use those blog posts in that context without having to duplicate the model file. I think it's fine (and perhaps advantageous) to keep most other things very loosely coupled, e.g., run separate apps in separate processes. I would still make the case that having a shared css and js infrastructure (with app specific overrides if necessary) would be helpful. JS libs and images are pretty big, and it sucks to reload them just because I'm switching apps within a site. Maybe this could be solved with a flexible asset host plugin of sorts (I haven't thought it through). Ben From hello at timperrett.com Mon Jan 7 04:32:58 2008 From: hello at timperrett.com (Tim Perrett) Date: Mon, 7 Jan 2008 09:32:58 +0000 Subject: multi-app merb In-Reply-To: References: <477F7E0B.3060505@ducktyped.com> Message-ID: Im confused why you are asking for things that are similar to rails engines? The gem plugin architecture is more than powerfull enough to do this kind of thing is it not? Cheers Tim On 5 Jan 2008, at 16:50, ben wiseley wrote: > I've love to see this as well. Something like http://rails- > engines.org/ that's native to merb would be very helpful. From thomas at mintdigital.com Mon Jan 7 12:28:57 2008 From: thomas at mintdigital.com (Thomas Pomfret) Date: Mon, 07 Jan 2008 17:28:57 +0000 Subject: rendering js Message-ID: <47826159.405@mintdigital.com> Hi all, Just been working on a new app and I've hit a problem. I am trying to render some js back to the page and have tried the following: render_js render :js => true render :js => "alert('test');" And I always seem to get my js returned as text. I have also added in: provides :js I'm sure this is very simple but any pointers would be most welcome! Thanks Thomas From ivey at gweezlebur.com Mon Jan 7 13:56:17 2008 From: ivey at gweezlebur.com (Michael D. Ivey) Date: Mon, 7 Jan 2008 12:56:17 -0600 Subject: rendering js In-Reply-To: <47826159.405@mintdigital.com> References: <47826159.405@mintdigital.com> Message-ID: <88683577-C86B-472B-B656-00388A600E51@gweezlebur.com> On Jan 7, 2008, at 11:28 AM, Thomas Pomfret wrote: > render :js => "alert('test');" > > And I always seem to get my js returned as text. Merb doesn't have an RJS mechanism. You'll need to handle processing the JS yourself. I assume someone will eventually make a merb_rjs or merb_prototype plugin to add these helpers. From ivey at gweezlebur.com Mon Jan 7 14:50:41 2008 From: ivey at gweezlebur.com (Michael D. Ivey) Date: Mon, 7 Jan 2008 13:50:41 -0600 Subject: rendering js In-Reply-To: References: <47826159.405@mintdigital.com> <88683577-C86B-472B-B656-00388A600E51@gweezlebur.com> Message-ID: <1DCABE99-75B5-4124-BF52-532CBAE3D1FE@gweezlebur.com> On Jan 7, 2008, at 1:06 PM, Se?or J. Onion wrote: > I used render :js => "alert('Hi');", :layout => :none > > With provide :js declared at the top of my class .... It's working > for me. > > (Michael - it's not RJS...) Joerg, what does your view look like? And yeah, I didn't mean RJS, I meant the "wrap it in eval" thing render :js does. From mauriciommaia at gmail.com Wed Jan 9 13:53:33 2008 From: mauriciommaia at gmail.com (=?ISO-8859-1?Q?Maur=EDcio_Maia?=) Date: Wed, 9 Jan 2008 16:53:33 -0200 Subject: Cache Content-Type Message-ID: Hello, I'm trying Merb and for now the only thing I can't figure out is how to proper serve cached javascript actions. No cached javascripts are ok, but cached ones are served as text/html. Thanks, Maur?cio From gregory.t.brown at gmail.com Wed Jan 9 22:50:59 2008 From: gregory.t.brown at gmail.com (Gregory Brown) Date: Wed, 9 Jan 2008 22:50:59 -0500 Subject: Shoes + Merb article Message-ID: Though it's pretty straightforward stuff, I figured maybe some Merb users would be interested in this article: http://www.oreillynet.com/pub/a/ruby/2008/01/14/shoes-meets-merb-interfacing-a-gtk2-front-end-and-a-rails-web-service.html Brad and I built a tiny merb pastebin app that serves up YAML, which is used by a little Shoes GUI. Anyway... enjoy... and please let me know if you've got suggestions about the article, or corrections. -greg From gregory.t.brown at gmail.com Wed Jan 9 22:52:08 2008 From: gregory.t.brown at gmail.com (Gregory Brown) Date: Wed, 9 Jan 2008 22:52:08 -0500 Subject: Shoes + Merb article In-Reply-To: References: Message-ID: On Jan 9, 2008 10:50 PM, Gregory Brown wrote: > Though it's pretty straightforward stuff, I figured maybe some Merb > users would be interested in this article: > > http://www.oreillynet.com/pub/a/ruby/2008/01/14/shoes-meets-merb-interfacing-a-gtk2-front-end-and-a-rails-web-service.html Also.. about that link... um... O'Reilly is weird. The title is correct on the article :) From chris at oxdi.eu Thu Jan 10 06:03:20 2008 From: chris at oxdi.eu (Chris Farmiloe) Date: Thu, 10 Jan 2008 11:03:20 +0000 Subject: Merb constants Message-ID: <26f68ef60801100303p313c3fe8x765da000f93f84ac@mail.gmail.com> the constants update (http://pastie.caboo.se/137630) is cleaner... but... am I right in thinking that rake tasks are now a bit buggered? Looks like a search/replace was performed, but its now impossible to set an environment for rake tasks? chrisfarms -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080110/47b0308a/attachment.html From chris at oxdi.eu Thu Jan 10 06:59:16 2008 From: chris at oxdi.eu (Chris Farmiloe) Date: Thu, 10 Jan 2008 11:59:16 +0000 Subject: local variable simulation in partials Message-ID: <26f68ef60801100359w642cf2bnba8ccb41ff8ebdec@mail.gmail.com> Hey people.. I often hit name clashes when using partials, take the following example... <%= partial :clip, :url => 'http://www.jeff.com' %> I will not be able to access my url variable, because the local variable will not override the #url method. This is contradictory to how most "local" variables work. Can I fix this, or is this behavior for some other reason? chrisfarms. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080110/0537414a/attachment.html From ivey at gweezlebur.com Thu Jan 10 11:23:26 2008 From: ivey at gweezlebur.com (Michael D. Ivey) Date: Thu, 10 Jan 2008 10:23:26 -0600 Subject: Merb constants In-Reply-To: <26f68ef60801100303p313c3fe8x765da000f93f84ac@mail.gmail.com> References: <26f68ef60801100303p313c3fe8x765da000f93f84ac@mail.gmail.com> Message-ID: <17E4749E-51B7-4AE1-895D-9CF189BEF1AD@gweezlebur.com> On Jan 10, 2008, at 5:03 AM, Chris Farmiloe wrote: > the constants update (http://pastie.caboo.se/137630) is cleaner... > but... > am I right in thinking that rake tasks are now a bit buggered? > > Looks like a search/replace was performed, but its now impossible > to set an environment for rake tasks? Yeah, the generated spec_helper is busted too. Will you open a ticket? We should fix all this stuff soon and release 0.5.1. From cvonkleist at gmail.com Sun Jan 13 14:12:32 2008 From: cvonkleist at gmail.com (Christian von Kleist) Date: Sun, 13 Jan 2008 14:12:32 -0500 Subject: How to set a controller's layout? Message-ID: I'd like a controller to use a specific layout for all its views. Right now I'm calling `render :layout => 'foo'` in each method, but there must be a better way. I tried class Users < Application layout 'foo' end And that definitely doesn't work. Then, as a test, I tried setting _layout within a method, like this: def index _layout = 'foo' render end And that changes _layout successfully, but Merb still picks the same layout ('application'). There's a line in lib/merb/mixins/render.rb that seems to pick the layout to use: 133: def render(*args,&blk) 134: opts = (Hash === args.last) ? args.pop : {} 135: 136: action = opts[:action] || params[:action] 137: opts[:layout] ||= _layout And since I didn't pass anything for args, it should use the _layout I've set, right? Yet it doesn't. So, anyone know how I can specify a controller's layout? From yann.klis at gmail.com Sun Jan 13 14:21:39 2008 From: yann.klis at gmail.com (Yann KLIS) Date: Sun, 13 Jan 2008 20:21:39 +0100 Subject: How to set a controller's layout? In-Reply-To: References: Message-ID: <36b086620801131121o6d5023a6x9f9f58e423031d15@mail.gmail.com> self._layout = "foo" seems to work. Yeah, I found it by trial and error and by reading the source of Merb... My first impression about Merb : it's a little "bare metal" for the moment, my Rails habits saves me from time to time but I'm very slow at programming something with Merb ATM. But, the future seems bright :) ++ yk 2008/1/13, Christian von Kleist : > I'd like a controller to use a specific layout for all its views. > Right now I'm calling `render :layout => 'foo'` in each method, but > there must be a better way. I tried > > class Users < Application > layout 'foo' > end > > And that definitely doesn't work. Then, as a test, I tried setting > _layout within a method, like this: > > def index > _layout = 'foo' > render > end > > And that changes _layout successfully, but Merb still picks the same > layout ('application'). There's a line in lib/merb/mixins/render.rb > that seems to pick the layout to use: > > 133: def render(*args,&blk) > 134: opts = (Hash === args.last) ? args.pop : {} > 135: > 136: action = opts[:action] || params[:action] > 137: opts[:layout] ||= _layout > > And since I didn't pass anything for args, it should use the _layout > I've set, right? Yet it doesn't. > > So, anyone know how I can specify a controller's layout? > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel > From cvonkleist at gmail.com Sun Jan 13 14:57:13 2008 From: cvonkleist at gmail.com (Christian von Kleist) Date: Sun, 13 Jan 2008 14:57:13 -0500 Subject: How to set a controller's layout? In-Reply-To: References: <36b086620801131121o6d5023a6x9f9f58e423031d15@mail.gmail.com> Message-ID: > self._layout = "foo" > seems to work. Yeah, I found it by trial and error and by reading the > source of Merb... > > My first impression about Merb : it's a little "bare metal" for the > moment, my Rails habits saves me from time to time but I'm very slow > at programming something with Merb ATM. But, the future seems bright > :) > > ++ > > yk > > 2008/1/13, Christian von Kleist : > > > I'd like a controller to use a specific layout for all its views. > > Right now I'm calling `render :layout => 'foo'` in each method, but > > there must be a better way. I tried > > > > class Users < Application > > layout 'foo' > > end > > > > And that definitely doesn't work. Then, as a test, I tried setting > > _layout within a method, like this: > > > > def index > > _layout = 'foo' > > render > > end > > > > And that changes _layout successfully, but Merb still picks the same > > layout ('application'). There's a line in lib/merb/mixins/render.rb > > that seems to pick the layout to use: > > > > 133: def render(*args,&blk) > > 134: opts = (Hash === args.last) ? args.pop : {} > > 135: > > 136: action = opts[:action] || params[:action] > > 137: opts[:layout] ||= _layout > > > > And since I didn't pass anything for args, it should use the _layout > > I've set, right? Yet it doesn't. > > > > So, anyone know how I can specify a controller's layout? > > _______________________________________________ > > Merb-devel mailing list > > Merb-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/merb-devel > > > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel > Perfect! I defined this in my Application controller: class Application < Merb::Controller def self.layout(name) self._layout = name.to_s end end So now, in any controllers I can do: class Admin::Users < Application layout :admin end I'd like to see something like that added to Merb, so I'll make a ticket and maybe others will agree. Thanks, Yann. http://merb.devjavu.com/ticket/448 From cvonkleist at gmail.com Mon Jan 14 01:34:09 2008 From: cvonkleist at gmail.com (Christian von Kleist) Date: Mon, 14 Jan 2008 01:34:09 -0500 Subject: Making failing view specs easier to troubleshoot Message-ID: I just had a problem that had me stumped for an hour. All of a sudden all of my view specs were failing, and I couldn't get good troubleshooting information from the rspec output. The output from running `rake specs` was a bunch of HTML from app/views/exceptions/internal_server_error.html.erb, but there wasn't enough info there to diagnose my problem. It just said "Internal server error" and had no stack trace. (And no, using `rake specs --trace` wouldn't help in this case.) The thing that had me absolutely stumped was that the views all worked fine when I ran `merb -e test` and checked them out with my browser. What could possibly have gone wrong? It turns out that I was using `session[]` in a before filter in my Application controller, but `session[]` is undefined when rspec runs. I finally figured out the problem by making internal_server_error.html.erb show detailed error messages, which is apparently off when running rspec. After I replaced 'if show_details' with 'if true', I finally got a stack trace in the HTML. Even then the output was hard to read, so I wrote the contents of @body to a file and opened that in my browser. That enabled me to see the small problem quickly. Maybe show_details should be set to true when running rspec, and maybe internal_server_error.html.erb could have a simple
 block with
error messages and a stack trace inside.  The latter would be
redundant, but it would aid debugging enormously when reading rspec
output in a console.

http://merb.devjavu.com/ticket/451

From ksruby at gmail.com  Wed Jan 16 10:32:18 2008
From: ksruby at gmail.com (Kent Sibilev)
Date: Wed, 16 Jan 2008 10:32:18 -0500
Subject: Application generation
Message-ID: <477eb2b30801160732x15ab5d30lc345571ca7f75572@mail.gmail.com>

Hi All,

Is anyone seeing this?

$ merb merb_paste
/usr/local/lib/ruby/gems/1.8/gems/merb-0.5.2/lib/merb/config.rb:69:in
`parse_args': uninitialized constant Merb::RELEASE (NameError)
	from /usr/local/lib/ruby/1.8/optparse.rb:785:in `initialize'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.2/lib/merb/config.rb:67:in
`new'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.2/lib/merb/config.rb:67:in
`parse_args'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.2/lib/merb/server.rb:32:in
`run'
	from /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.2/bin/merb:4
	from /usr/local/bin/merb:19:in `load'
	from /usr/local/bin/merb:19

I wonder if it is a problem with my installation. Thank you.

-- 
Kent
---
http://www.datanoise.com

From nic at nicpillinger.com  Wed Jan 16 10:44:48 2008
From: nic at nicpillinger.com (Nic Pillinger)
Date: Wed, 16 Jan 2008 15:44:48 +0000
Subject: Application generation
In-Reply-To: <477eb2b30801160732x15ab5d30lc345571ca7f75572@mail.gmail.com>
References: <477eb2b30801160732x15ab5d30lc345571ca7f75572@mail.gmail.com>
Message-ID: <4683e9df0801160744j5f8cc936u885cc178abf6a00@mail.gmail.com>

On 16/01/2008, Kent Sibilev  wrote:
> Hi All,
>
> Is anyone seeing this?
>
> $ merb merb_paste
> /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.2/lib/merb/config.rb:69:in
> `parse_args': uninitialized constant Merb::RELEASE (NameError)
>         from /usr/local/lib/ruby/1.8/optparse.rb:785:in `initialize'


yep I had the same problem - rolled merb back to 0.5.1 in the end as I
didn't have time to investigate further.

From lancecarlson at gmail.com  Wed Jan 16 10:46:14 2008
From: lancecarlson at gmail.com (Lance Carlson)
Date: Wed, 16 Jan 2008 10:46:14 -0500
Subject: Application generation
In-Reply-To: <4683e9df0801160744j5f8cc936u885cc178abf6a00@mail.gmail.com>
References: <477eb2b30801160732x15ab5d30lc345571ca7f75572@mail.gmail.com>
	<4683e9df0801160744j5f8cc936u885cc178abf6a00@mail.gmail.com>
Message-ID: <49f64a900801160746i25047034u46d8949617dc5755@mail.gmail.com>

On Jan 16, 2008 10:44 AM, Nic Pillinger  wrote:
I would suggest using trunk. If you are still having issues with
trunk, please file a ticket.

> On 16/01/2008, Kent Sibilev  wrote:
> > Hi All,
> >
> > Is anyone seeing this?
> >
> > $ merb merb_paste
> > /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.2/lib/merb/config.rb:69:in
> > `parse_args': uninitialized constant Merb::RELEASE (NameError)
> >         from /usr/local/lib/ruby/1.8/optparse.rb:785:in `initialize'
>
>
> yep I had the same problem - rolled merb back to 0.5.1 in the end as I
> didn't have time to investigate further.
>
> _______________________________________________
> Merb-devel mailing list
> Merb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/merb-devel
>

From ivey at gweezlebur.com  Wed Jan 16 13:24:56 2008
From: ivey at gweezlebur.com (Michael D. Ivey)
Date: Wed, 16 Jan 2008 12:24:56 -0600
Subject: Application generation
In-Reply-To: <49f64a900801160746i25047034u46d8949617dc5755@mail.gmail.com>
References: <477eb2b30801160732x15ab5d30lc345571ca7f75572@mail.gmail.com>
	<4683e9df0801160744j5f8cc936u885cc178abf6a00@mail.gmail.com>
	<49f64a900801160746i25047034u46d8949617dc5755@mail.gmail.com>
Message-ID: <1D0A021B-915C-4535-A2D9-B9CA7A492CAA@gweezlebur.com>

There was a bad gem for 0.5.2 on the servers for a little bit.  If  
you re-install 0.5.2 it should be fine.  If not, let me know and I'll  
see where we are on 0.5.3.

From aslak.hellesoy at gmail.com  Fri Jan 18 04:24:23 2008
From: aslak.hellesoy at gmail.com (aslak hellesoy)
Date: Fri, 18 Jan 2008 10:24:23 +0100
Subject: How do I pass form values from POST controller specs?
Message-ID: <8d961d900801180124h3f28baf3qf2df11462fa67233@mail.gmail.com>

Hi there

I just started my first Merb app and I'm running into some weird
things in Specs. When I do:

  describe "create action" do
    it "should create a new project" do
      project_params = {:name => 'bekkunin'}
      Project.should_receive(:create).with(project_params)
      controller, action = post('/projects', :project => project_params)
    end
  end

Merb::Test::FakeRequest#with (and #new) invoke
Hash#environmentize_keys! on the hash I send in as the 2nd arg to
post, and this seems very odd to me. Why is it upcasing the keys in
the hash *I* send in from my spec? In my controller action, I try to
access params[:project], but it's nil. I tried this instead to work
around it:

  describe "create action" do
    it "should create a new project" do
      project_params = {:name => 'bekkunin'}
      Project.should_receive(:create).with(project_params)
      req = fake_request
      req[:project] = project_params
      controller, action = post('/projects', :fake_request => req)
    end
  end

Now my action doesn't even get called. the value of action is
'bad_request', probably because the fake request I created doesn't
have all the right stuff.

I can't for the life of me grok how I send in "form" values to a POST
action from a spec and could use some help here. If someone can
explain to me the intended behaviour I can submit a patch. I did a
fresh checkout and ran rake specs. Then I got a lot of errors. Here is
the last one:

18)
NoMethodError in 'a merb mailer should be able to use a different sendmail path'
undefined method `body=' for #
/Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `send'
/Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `initialize'
/Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `each'
/Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `initialize'
./spec/merb/mailer_spec.rb:22:in `new'
./spec/merb/mailer_spec.rb:22:in `setup_test_mailer'
./spec/merb/mailer_spec.rb:81:

Finished in 9.677867 seconds

821 examples, 18 failures, 2 pending

My environment:

* OS X Tiger
* ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-darwin8.11.1]
Gems:
abstract (1.0.0)
actionmailer (2.0.2)
actionpack (2.0.2)
activerecord (2.0.2)
activeresource (2.0.2)
activesupport (2.0.2, 2.0.1)
archive-tar-minitar (0.5.1)
builder (2.1.2)
cgi_multipart_eof_fix (2.5.0)
coderay (0.7.4.215)
color (1.4.0)
daemons (1.0.9)
diff-lcs (1.1.2)
directory_watcher (1.1.0)
erubis (2.4.1)
eventmachine (0.10.0)
fastthread (1.0.1)
fcgi (0.8.7)
flexmock (0.8.0)
gem_plugin (0.2.3)
god (0.6.0)
GraphvizR (0.5.1)
gratr (0.4.3)
haml (1.7.2)
heckle (1.4.1)
heel (0.6.0)
highline (1.4.0)
hoe (1.4.0, 1.3.0)
hpricot (0.6)
json (1.1.2)
json_pure (1.1.2)
launchy (0.3.1)
libxml-ruby (0.5.2.0)
liquid (1.7.0)
logging (0.5.3)
markaby (0.5)
memcache-client (1.5.0)
merb (0.5.2)
merb_activerecord (0.5)
meta_project (0.4.15)
mime-types (1.15)
mocha (0.5.5)
mongrel (1.1.3, 1.1.1)
mongrel_cluster (1.0.5)
needle (1.3.0)
net-sftp (1.1.0)
net-ssh (1.1.2)
newgem (0.16.1)
oniguruma (1.1.0)
open4 (0.9.6)
ParseTree (2.1.1, 2.0.2)
pdf-storycards (0.0.1)
pdf-writer (1.1.7, 1.1.4)
piston (1.3.3)
Platform (0.4.0)
plist (3.0.0)
rack (0.2.0)
rails (2.0.2)
rake (0.8.1)
rb-appscript (0.4.0)
rcov (0.8.1.2.0)
RedCloth (3.0.4)
rspec (1.1.1)
rubigen (1.1.1)
ruby-growl (1.0.1)
ruby2ruby (1.1.8, 1.1.7)
rubyforge (0.4.4)
rubygems-update (1.0.1)
RubyInline (3.6.6, 3.6.5)
rubyworks_app (0.0.1)
safariwatir (0.2.5)
sinatra (0.1.7)
sqlite3-ruby (1.2.1)
syntax (1.0.0)
textpow (0.10.0)
thin (0.5.0)
tidy (1.1.2)
transaction-simple (1.4.0)
tzinfo (0.3.5)
ultraviolet (0.10.1)
uuidtools (1.0.2)
vlad (1.1.0)
webby (0.6.0)
ZenTest (3.6.1)

Am I doing something obviously wrong?

Cheers,
Aslak

From has.sox at gmail.com  Fri Jan 18 06:11:05 2008
From: has.sox at gmail.com (Daniel N)
Date: Fri, 18 Jan 2008 22:11:05 +1100
Subject: How do I pass form values from POST controller specs?
In-Reply-To: <8d961d900801180248x3b16ad56w92df914f749da76a@mail.gmail.com>
References: <8d961d900801180124h3f28baf3qf2df11462fa67233@mail.gmail.com>
	<2fff50390801180216h239b8530s19f5214cfabbdb6e@mail.gmail.com>
	<8d961d900801180248x3b16ad56w92df914f749da76a@mail.gmail.com>
Message-ID: <2fff50390801180311n660f5e47g26ca7c80da6838d1@mail.gmail.com>

On Jan 18, 2008 9:48 PM, aslak hellesoy  wrote:

> On Jan 18, 2008 11:16 AM, Daniel N  wrote:
> > Sorry Aslak Gmail fired before I was ready.
> >
> > There was a bug in the 0.5.2 helper that has been fixed regarding making
> the
> > parameters available.
> >
> > The parameters are given to the request in encoded form however, and
> made
> > available as a Mash, which is similar to a HashWithIndifferentAccess.
> >
> > The information here is pretty specific to Merb 0.5.3 since there is
> > significant changes to 0.9 in terms of hooking ability to allow specs to
> get
> > into the request cycle and set these things up nicely.
> >
> > I've made suggestions to your spec to get it to pass inline.
> >
>
> Thanks a lot Daniel, your advice and trunk got me a lot further.
>
> >
> > On Jan 18, 2008 8:24 PM, aslak hellesoy 
> wrote:
> >
> > > Hi there
> > >
> > > I just started my first Merb app and I'm running into some weird
> > > things in Specs. When I do:
> > >
> > >  describe "create action" do
> > >    it "should create a new project" do
> > >      project_params = {:name => 'bekkunin'}
> > >      Project.should_receive(:create).with(project_params)
> > >      controller, action = post('/projects', :project =>
> project_params)
> > >    end
> > >  end
> > >
> >
> > Once your running on 0.5.3 trunk, you can use your spec here with one
> > change.  Because the params hash is converted to a request, and then
> into a
> > Mash, you should use
> >
> >
> >   describe "create action" do
> >     it "should create a new project" do
> >       project_params = {'name' => 'bekkunin'}
> >       Project.should_receive(:create).with(project_params)
> >       controller, action = post('/projects', :project => project_params)
> >     end
> >   end
> >
>
> Cool. IIR Rails::Spec has (or at least had) the same issue where you
> need to use string keys.
>
> > >
> > > Merb::Test::FakeRequest#with (and #new) invoke
> > > Hash#environmentize_keys! on the hash I send in as the 2nd arg to
> > > post, and this seems very odd to me. Why is it upcasing the keys in
> > > the hash *I* send in from my spec? In my controller action, I try to
> > > access params[:project], but it's nil. I tried this instead to work
> > > around it:
> >
> > At the moment it is difficult to pass in the params hash directly as you
> > input it, so it is encoded into the request, and then handled as per a
> > normal request.  Again, this will probably not need to be so in 0.9
> >
>
> Cool
>
> > >
> > >
> > >  describe "create action" do
> > >    it "should create a new project" do
> > >      project_params = {:name => 'bekkunin'}
> > >      Project.should_receive(:create).with(project_params)
> > >      req = fake_request
> > >      req[:project] = project_params
> > >      controller, action = post('/projects', :fake_request => req)
> > >    end
> > >  end
> > >
> > > Now my action doesn't even get called. the value of action is
> > > 'bad_request', probably because the fake request I created doesn't
> > > have all the right stuff.
> >
> > the return on controller, action is a left over basically a legacy
> return
> > value.  the post, get, put and delete methods set the controller
> variable so
> > it is available through the controller method, so you can do things like
> >
> > post('/projects')
> > controller.params.keys.should include('name')  I don't belive the
> > :fake_request is available in the 0.5.2 gem..  It is only a new
> addition.
> >
>
> Yes, I saw that later.
>
> > >
> > >
> > > I can't for the life of me grok how I send in "form" values to a POST
> > > action from a spec and could use some help here. If someone can
> > > explain to me the intended behaviour I can submit a patch. I did a
> > > fresh checkout and ran rake specs. Then I got a lot of errors. Here is
> > > the last one:
> > >
> > > 18)
> > > NoMethodError in 'a merb mailer should be able to use a different
> sendmail
> > path'
> > > undefined method `body=' for #
> > > /Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `send'
> > > /Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `initialize'
> > > /Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `each'
> > > /Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `initialize'
> > > ./spec/merb/mailer_spec.rb:22:in `new'
> > > ./spec/merb/mailer_spec.rb:22:in `setup_test_mailer'
> > > ./spec/merb/mailer_spec.rb:81:
> > >
> > > Finished in 9.677867 seconds
> > >
> > > 821 examples, 18 failures, 2 pending
> >
> >
> > I have just downloaded a clean trunk, and I have all specs passing.  I
> don't
> > know what the issue is here.
> >
>
> All of my spec errors are mailer related. Do I need a different
> version of something or do I need to do some sort of config?


I have this in my spec helper for the mailer.  I'm not sure that it's
documented anywhere, but it should probably go in the spec helper regardless
of if your using a mailer or not.  That way ppl won't get tripped up by it.

class Merb::Mailer
  self.delivery_method = :test_send
end



>
> Also, is there a reason you didn't want to share this info with the
> list? Let me know if you want me to repost this to the list.


I've posted this one to the list as well as your address.  Sorry about that,
I had a few issues with Gmail ;)


>
>
> > Hopefully you can help us to implement awsome spec helpers in 0.9 :)
> >
>
> If I have time :-)
>
> Is there a simple way to install the Merb sources "under" my Merb app?
> I'd like to use piston to patch Merb within my team so that we can get
> work done rather than sharing patches :-)


You can freeze your version of merb by using the rake tasks

rake merb:freeze
rake merb:freeze_from_svn
rake merb:unfreeze

all this really does is put the contents of trunk/lib into the framework
directory of your app root.
(pistons a bit rusty but I think)
piston import http://svn.devjavu.com/merb/trunk/lib framework

Also if you install your gems into the gems directory of your app root, you
can lock specific gems too.

HTH
Daniel



>
>
> Cheers,
> Aslak
>
> > HTH
> > -Daniel
> >
> >
> > >
> > >
> > >
> > >
> > >
> > > My environment:
> > >
> > > * OS X Tiger
> > > * ruby 1.8.6 (2007-09-24 patchlevel 111) [ i686-darwin8.11.1]
> > > Gems:
> > > abstract (1.0.0)
> > > actionmailer (2.0.2)
> > > actionpack (2.0.2)
> > > activerecord (2.0.2)
> > > activeresource (2.0.2)
> > > activesupport (2.0.2, 2.0.1)
> > > archive-tar-minitar (0.5.1)
> > > builder (2.1.2 )
> > > cgi_multipart_eof_fix (2.5.0)
> > > coderay (0.7.4.215)
> > > color (1.4.0)
> > > daemons (1.0.9)
> > > diff-lcs (1.1.2)
> > > directory_watcher (1.1.0)
> > > erubis (2.4.1)
> > > eventmachine ( 0.10.0)
> > > fastthread (1.0.1)
> > > fcgi (0.8.7)
> > > flexmock (0.8.0)
> > > gem_plugin (0.2.3)
> > > god (0.6.0)
> > > GraphvizR (0.5.1)
> > > gratr (0.4.3)
> > > haml (1.7.2)
> > > heckle (1.4.1)
> > > heel (0.6.0)
> > > highline (1.4.0)
> > > hoe (1.4.0 , 1.3.0)
> > > hpricot (0.6)
> > > json (1.1.2)
> > > json_pure (1.1.2)
> > > launchy (0.3.1)
> > > libxml-ruby (0.5.2.0)
> > > liquid (1.7.0)
> > > logging (0.5.3)
> > > markaby (0.5)
> > > memcache-client ( 1.5.0)
> > > merb (0.5.2)
> > > merb_activerecord (0.5)
> > > meta_project (0.4.15)
> > > mime-types (1.15)
> > > mocha (0.5.5)
> > > mongrel (1.1.3, 1.1.1)
> > > mongrel_cluster (1.0.5)
> > > needle (1.3.0)
> > > net-sftp (1.1.0)
> > > net-ssh (1.1.2 )
> > > newgem (0.16.1)
> > > oniguruma (1.1.0)
> > > open4 (0.9.6)
> > > ParseTree (2.1.1, 2.0.2)
> > > pdf-storycards (0.0.1)
> > > pdf-writer (1.1.7, 1.1.4)
> > > piston (1.3.3)
> > > Platform (0.4.0)
> > > plist (3.0.0)
> > > rack (0.2.0)
> > > rails ( 2.0.2)
> > > rake (0.8.1)
> > > rb-appscript (0.4.0)
> > > rcov (0.8.1.2.0)
> > > RedCloth (3.0.4)
> > > rspec (1.1.1)
> > > rubigen (1.1.1)
> > > ruby-growl (1.0.1)
> > > ruby2ruby (1.1.8, 1.1.7)
> > > rubyforge (0.4.4)
> > > rubygems-update (1.0.1)
> > > RubyInline (3.6.6, 3.6.5)
> > > rubyworks_app (0.0.1)
> > > safariwatir (0.2.5)
> > > sinatra (0.1.7)
> > > sqlite3-ruby (1.2.1)
> > > syntax (1.0.0)
> > > textpow (0.10.0)
> > > thin (0.5.0)
> > > tidy (1.1.2)
> > > transaction-simple (1.4.0)
> > > tzinfo ( 0.3.5)
> > > ultraviolet (0.10.1)
> > > uuidtools (1.0.2)
> > > vlad (1.1.0)
> > > webby (0.6.0)
> > > ZenTest (3.6.1)
> > >
> > > Am I doing something obviously wrong?
> > >
> > > Cheers,
> > > Aslak
> > > _______________________________________________
> > >
> > > Merb-devel mailing list
> > > Merb-devel at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/merb-devel
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080118/8be7e1e4/attachment-0001.html 

From aslak.hellesoy at gmail.com  Fri Jan 18 06:55:04 2008
From: aslak.hellesoy at gmail.com (aslak hellesoy)
Date: Fri, 18 Jan 2008 12:55:04 +0100
Subject: How do I pass form values from POST controller specs?
In-Reply-To: <2fff50390801180311n660f5e47g26ca7c80da6838d1@mail.gmail.com>
References: <8d961d900801180124h3f28baf3qf2df11462fa67233@mail.gmail.com>
	<2fff50390801180216h239b8530s19f5214cfabbdb6e@mail.gmail.com>
	<8d961d900801180248x3b16ad56w92df914f749da76a@mail.gmail.com>
	<2fff50390801180311n660f5e47g26ca7c80da6838d1@mail.gmail.com>
Message-ID: <8d961d900801180355w6d70eba5t7d6f754892315591@mail.gmail.com>

On Jan 18, 2008 12:11 PM, Daniel N  wrote:
>
>
>
>
> On Jan 18, 2008 9:48 PM, aslak hellesoy  wrote:
> >
> > On Jan 18, 2008 11:16 AM, Daniel N  wrote:
> > > Sorry Aslak Gmail fired before I was ready.
> > >
> > > There was a bug in the 0.5.2 helper that has been fixed regarding making
> the
> > > parameters available.
> > >
> > > The parameters are given to the request in encoded form however, and
> made
> > > available as a Mash, which is similar to a HashWithIndifferentAccess.
> > >
> > > The information here is pretty specific to Merb 0.5.3 since there is
> > > significant changes to 0.9 in terms of hooking ability to allow specs to
> get
> > > into the request cycle and set these things up nicely.
> > >
> > > I've made suggestions to your spec to get it to pass inline.
> > >
> >
> > Thanks a lot Daniel, your advice and trunk got me a lot further.
> >
> >
> > >
> > > On Jan 18, 2008 8:24 PM, aslak hellesoy < aslak.hellesoy at gmail.com>
> wrote:
> > >
> > > > Hi there
> > > >
> > > > I just started my first Merb app and I'm running into some weird
> > > > things in Specs. When I do:
> > > >
> > > >  describe "create action" do
> > > >    it "should create a new project" do
> > > >      project_params = {:name => 'bekkunin'}
> > > >      Project.should_receive (:create).with(project_params)
> > > >      controller, action = post('/projects', :project =>
> project_params)
> > > >    end
> > > >  end
> > > >
> > >
> > > Once your running on 0.5.3 trunk, you can use your spec here with one
> > > change.  Because the params hash is converted to a request, and then
> into a
> > > Mash, you should use
> > >
> > >
> > >   describe "create action" do
> > >     it "should create a new project" do
> > >       project_params = {'name' => 'bekkunin'}
> > >       Project.should_receive(:create).with(project_params)
> > >       controller, action = post('/projects', :project => project_params)
> > >     end
> > >   end
> > >
> >
> > Cool. IIR Rails::Spec has (or at least had) the same issue where you
> > need to use string keys.
> >
> >
> > > >
> > > > Merb::Test::FakeRequest#with (and #new) invoke
> > > > Hash#environmentize_keys! on the hash I send in as the 2nd arg to
> > > > post, and this seems very odd to me. Why is it upcasing the keys in
> > > > the hash *I* send in from my spec? In my controller action, I try to
> > > > access params[:project], but it's nil. I tried this instead to work
> > > > around it:
> > >
> > > At the moment it is difficult to pass in the params hash directly as you
> > > input it, so it is encoded into the request, and then handled as per a
> > > normal request.  Again, this will probably not need to be so in 0.9
> > >
> >
> > Cool
> >
> >
> > > >
> > > >
> > > >  describe "create action" do
> > > >    it "should create a new project" do
> > > >      project_params = {:name => 'bekkunin'}
> > > >      Project.should_receive(:create).with(project_params)
> > > >      req = fake_request
> > > >      req[:project] = project_params
> > > >      controller, action = post('/projects', :fake_request => req)
> > > >    end
> > > >  end
> > > >
> > > > Now my action doesn't even get called. the value of action is
> > > > 'bad_request', probably because the fake request I created doesn't
> > > > have all the right stuff.
> > >
> > > the return on controller, action is a left over basically a legacy
> return
> > > value.  the post, get, put and delete methods set the controller
> variable so
> > > it is available through the controller method, so you can do things like
> > >
> > > post('/projects')
> > > controller.params.keys.should include('name')  I don't belive the
> > > :fake_request is available in the 0.5.2 gem..  It is only a new
> addition.
> > >
> >
> > Yes, I saw that later.
> >
> >
> > > >
> > > >
> > > > I can't for the life of me grok how I send in "form" values to a POST
> > > > action from a spec and could use some help here. If someone can
> > > > explain to me the intended behaviour I can submit a patch. I did a
> > > > fresh checkout and ran rake specs. Then I got a lot of errors. Here is
> > > > the last one:
> > > >
> > > > 18)
> > > > NoMethodError in 'a merb mailer should be able to use a different
> sendmail
> > > path'
> > > > undefined method `body=' for #
> > > > /Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `send'
> > > > /Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `initialize'
> > > > /Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `each'
> > > > /Users/aslakhellesoy/scm/merb/lib/merb/mailer.rb:82:in `initialize'
> > > > ./spec/merb/mailer_spec.rb:22:in `new'
> > > > ./spec/merb/mailer_spec.rb:22:in `setup_test_mailer'
> > > > ./spec/merb/mailer_spec.rb:81:
> > > >
> > > > Finished in 9.677867 seconds
> > > >
> > > > 821 examples, 18 failures, 2 pending
> > >
> > >
> > > I have just downloaded a clean trunk, and I have all specs passing.  I
> don't
> > > know what the issue is here.
> > >
> >
> > All of my spec errors are mailer related. Do I need a different
> > version of something or do I need to do some sort of config?
>
> I have this in my spec helper for the mailer.  I'm not sure that it's
> documented anywhere, but it should probably go in the spec helper regardless
> of if your using a mailer or not.  That way ppl won't get tripped up by it.
>
> class Merb::Mailer
>   self.delivery_method = :test_send
> end
>

I meant the specs for Merb itself, not my own app.

I found out that I had to gem install mailfactory in order to be able
to run Merb's own specs.
(This was a tiny message at the top of the output of rake spec that I
spotted by pure coincidence before the spec output flushed it upwards
in my shell).

>
>
> >
> >
> > Also, is there a reason you didn't want to share this info with the
> > list? Let me know if you want me to repost this to the list.
>
> I've posted this one to the list as well as your address.  Sorry about that,
> I had a few issues with Gmail ;)
>
> >
> >
> >
> > > Hopefully you can help us to implement awsome spec helpers in 0.9 :)
> > >
> >
> > If I have time :-)
> >
> > Is there a simple way to install the Merb sources "under" my Merb app?
> > I'd like to use piston to patch Merb within my team so that we can get
> > work done rather than sharing patches :-)
>
> You can freeze your version of merb by using the rake tasks
>
> rake merb:freeze
> rake merb:freeze_from_svn
> rake merb:unfreeze
>
> all this really does is put the contents of trunk/lib into the framework
> directory of your app root.
> (pistons a bit rusty but I think)
> piston import http://svn.devjavu.com/merb/trunk/lib framework
>

I ended up doing:
piston import http://svn.devjavu.com/merb/trunk framework
And then change the 1st line of my app's config/boot.rb line to
frozen_framework_path = File.join(File.dirname(__FILE__), "..",
"framework", "lib")

I recommend you make this the default. People are going to want to
check out the entire Merb so they can run Merb's own specs after
making tweaks to it. (People freeze a framework both to secure the app
and to fix bugs in the framwork).

Now I'm running into a new problem. I'm using a frozen Merb core and
ActiveRecord, so I need to use merb_activerecord. I cannot install
merb_activerecord as a gem, because the gem wants Merb 0.5.2 which is
not the core I want. So I don't have any global merb related gems
installed. I've tried this:

piston import http://svn.devjavu.com/merb/plugins/merb_activerecord
gems/gems/merb_activerecord
(I guess I need the trunk of this since I have the trunk of core)

However, Merb is unable to find merb_activerecord:

rake specs # from my app root
rake aborted!
no such file to load -- merb_activerecord

When I decide to use Merb core"edge", what's the best way to also get
Merb ActiveRecord "edge"?

Aslak

> Also if you install your gems into the gems directory of your app root, you
> can lock specific gems too.
>
> HTH
> Daniel
>
>
>
> >
> >
> > Cheers,
> > Aslak
> >
> >
> >
> >
> > > HTH
> > > -Daniel
> > >
> > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > My environment:
> > > >
> > > > * OS X Tiger
> > > > * ruby 1.8.6 (2007-09-24 patchlevel 111) [ i686-darwin8.11.1]
> > > > Gems:
> > > > abstract (1.0.0)
> > > > actionmailer (2.0.2)
> > > > actionpack (2.0.2)
> > > > activerecord (2.0.2)
> > > > activeresource ( 2.0.2)
> > > > activesupport (2.0.2, 2.0.1)
> > > > archive-tar-minitar (0.5.1)
> > > > builder (2.1.2 )
> > > > cgi_multipart_eof_fix (2.5.0)
> > > > coderay ( 0.7.4.215)
> > > > color (1.4.0)
> > > > daemons (1.0.9)
> > > > diff-lcs (1.1.2)
> > > > directory_watcher (1.1.0)
> > > > erubis (2.4.1)
> > > > eventmachine ( 0.10.0)
> > > > fastthread ( 1.0.1)
> > > > fcgi (0.8.7)
> > > > flexmock (0.8.0)
> > > > gem_plugin (0.2.3)
> > > > god (0.6.0)
> > > > GraphvizR (0.5.1)
> > > > gratr (0.4.3)
> > > > haml (1.7.2)
> > > > heckle ( 1.4.1)
> > > > heel (0.6.0)
> > > > highline (1.4.0)
> > > > hoe (1.4.0 , 1.3.0)
> > > > hpricot (0.6)
> > > > json (1.1.2)
> > > > json_pure (1.1.2)
> > > > launchy (0.3.1)
> > > > libxml-ruby ( 0.5.2.0)
> > > > liquid (1.7.0)
> > > > logging (0.5.3)
> > > > markaby (0.5)
> > > > memcache-client ( 1.5.0)
> > > > merb (0.5.2)
> > > > merb_activerecord ( 0.5)
> > > > meta_project (0.4.15)
> > > > mime-types (1.15)
> > > > mocha (0.5.5)
> > > > mongrel (1.1.3, 1.1.1)
> > > > mongrel_cluster (1.0.5)
> > > > needle (1.3.0)
> > > > net-sftp ( 1.1.0)
> > > > net-ssh (1.1.2 )
> > > > newgem (0.16.1)
> > > > oniguruma (1.1.0)
> > > > open4 (0.9.6)
> > > > ParseTree (2.1.1, 2.0.2)
> > > > pdf-storycards (0.0.1)
> > > > pdf-writer ( 1.1.7, 1.1.4)
> > > > piston (1.3.3)
> > > > Platform (0.4.0)
> > > > plist (3.0.0)
> > > > rack (0.2.0)
> > > > rails ( 2.0.2)
> > > > rake (0.8.1)
> > > > rb-appscript (0.4.0)
> > > > rcov ( 0.8.1.2.0)
> > > > RedCloth (3.0.4)
> > > > rspec (1.1.1)
> > > > rubigen (1.1.1)
> > > > ruby-growl (1.0.1)
> > > > ruby2ruby (1.1.8, 1.1.7)
> > > > rubyforge (0.4.4)
> > > > rubygems-update ( 1.0.1)
> > > > RubyInline (3.6.6, 3.6.5)
> > > > rubyworks_app (0.0.1)
> > > > safariwatir (0.2.5)
> > > > sinatra (0.1.7)
> > > > sqlite3-ruby (1.2.1)
> > > > syntax (1.0.0)
> > > > textpow ( 0.10.0)
> > > > thin (0.5.0)
> > > > tidy (1.1.2)
> > > > transaction-simple (1.4.0)
> > > > tzinfo ( 0.3.5)
> > > > ultraviolet (0.10.1)
> > > > uuidtools (1.0.2)
> > > > vlad (1.1.0)
> > > > webby (0.6.0)
> > > > ZenTest (3.6.1)
> > > >
> > > > Am I doing something obviously wrong?
> > > >
> > > > Cheers,
> > > > Aslak
> > > > _______________________________________________
> > > >
> > > > Merb-devel mailing list
> > > > Merb-devel at rubyforge.org
> > > > http://rubyforge.org/mailman/listinfo/merb-devel
> > > >
> > >
> > >
> >
>
>

From jon.egil.strand at gmail.com  Sat Jan 19 06:52:25 2008
From: jon.egil.strand at gmail.com (Jon Egil Stand)
Date: Sat, 19 Jan 2008 12:52:25 +0100
Subject: How do I pass form values from POST controller specs?
In-Reply-To: <30ab559b0801190349s610a1568j40f42334b467de5f@mail.gmail.com>
References: <8d961d900801180124h3f28baf3qf2df11462fa67233@mail.gmail.com>
	<2fff50390801180216h239b8530s19f5214cfabbdb6e@mail.gmail.com>
	<8d961d900801180248x3b16ad56w92df914f749da76a@mail.gmail.com>
	<2fff50390801180311n660f5e47g26ca7c80da6838d1@mail.gmail.com>
	<30ab559b0801180433o2dc417a3ve9aaa4ec3a8f3728@mail.gmail.com>
	<30ab559b0801190349s610a1568j40f42334b467de5f@mail.gmail.com>
Message-ID: <30ab559b0801190352p172066c7kd258f971c32aaaa1@mail.gmail.com>

Aslak

Welcome to merb, it's great that a rspec core-developer is interested in merb.

We've recently had some issues in spec'ing ActiveRecord models using
all of rpsec's goodies, but found that they don't only need
ActiveRecord, but also more of rails per se.

Given a more detailed explanation, are you interested in decoupling
rspec for AR from rspec from rails?

All the best
Jon Egil
irb.no

From jon.egil.strand at gmail.com  Sat Jan 19 06:56:43 2008
From: jon.egil.strand at gmail.com (Jon Egil Stand)
Date: Sat, 19 Jan 2008 12:56:43 +0100
Subject: MrBlog plan
Message-ID: <30ab559b0801190356of1e64c9red0425f168b2b38d@mail.gmail.com>

Greetings

I've recently spent some time updating MrBlog to merb 0.5.2. Thanks to
to all at #merb for helping out.

I now feel the time has come to do some more housecleaning and
refactoring to MrBlog than just updating to the recent merb-version.
I'd like to share my guidelines and hear if people think this is

  a) OK
  b) !OK

----------------------


1. What's MrBlog

  MrBlog is a simple blog-engine. It's written for two purposes, in priority:

  a) The merb beginner. MrBlog will intends to show a merb beginner how
     the merb framework can be used to write a simple web-application. MrBlog
     will show you how to
       - build a web application with the Model-Controller-View paradigm
       - utilize javascript for dynamic effects in a web-page
       - make the application accessible as a web-service
       - utilize an external webservice (akismet for checking spam in comments)

  b) The blogger with simple needs. MrBlog doesn't try to be sophisticated,
     but if your blog-engine needs aren't sophisticated either, MrBlog just
     might be the perfect match.


2. What's happening to it

  MrBlog is undergoing change with the following three goals in mind:

  a) Lean, meaning a small feature set and easy to understand.

  b) Tight, meaning production quality and secure. Specs will be written to
     test all aspects of the application.

  c) Updated, meaning MrBlog will be updated to always run on the latest
     stable release of merb.


----------------------

Please get back to me if you have opinions on the matter.

All the best
Jon Egil

From luislavena at gmail.com  Sat Jan 19 08:56:28 2008
From: luislavena at gmail.com (Luis Lavena)
Date: Sat, 19 Jan 2008 11:56:28 -0200
Subject: How do I pass form values from POST controller specs?
In-Reply-To: <8d961d900801180355w6d70eba5t7d6f754892315591@mail.gmail.com>
References: <8d961d900801180124h3f28baf3qf2df11462fa67233@mail.gmail.com>
	<2fff50390801180216h239b8530s19f5214cfabbdb6e@mail.gmail.com>
	<8d961d900801180248x3b16ad56w92df914f749da76a@mail.gmail.com>
	<2fff50390801180311n660f5e47g26ca7c80da6838d1@mail.gmail.com>
	<8d961d900801180355w6d70eba5t7d6f754892315591@mail.gmail.com>
Message-ID: <71166b3b0801190556v77b9b189le3957bb8b68c4b04@mail.gmail.com>

On Jan 18, 2008 9:55 AM, aslak hellesoy  wrote:
> [...]
>
>
> Now I'm running into a new problem. I'm using a frozen Merb core and
> ActiveRecord, so I need to use merb_activerecord. I cannot install
> merb_activerecord as a gem, because the gem wants Merb 0.5.2 which is
> not the core I want. So I don't have any global merb related gems
> installed. I've tried this:
>
> piston import http://svn.devjavu.com/merb/plugins/merb_activerecord
> gems/gems/merb_activerecord
> (I guess I need the trunk of this since I have the trunk of core)
>
> However, Merb is unable to find merb_activerecord:

Merb is expecting you have a valid gems installation inside gem/ directory.

Checkout just merb_activerecord subtree into gems/gems will not work,
since you need the merb_activerecord-version.gemspec inside
gem/specifications too.

What you can do is (with rubygems 1.0.1):

cd into your merb app folder.

gem fetch merb_activerecord
gem install merb_activerecord-0.5.gem -i gems

That will be problematic, since all the dependencies of that gem will
be installed there, and also merb dependencies too.

you will end with something like this inside gems/gems:

abstract-1.0.0
activesupport-2.0.2
cgi_multipart_eof_fix-2.5.0
erubis-2.4.1
gem_plugin-0.2.3
hoe-1.4.0
json_pure-1.1.2
merb-0.5.2
merb_activerecord-0.5
mime-types-1.15
mongrel-1.1.3-x86-mswin32
ParseTree-2.1.1-x86-mswin32
rake-0.8.1
rubigen-1.1.1
ruby2ruby-1.1.8
rubyforge-0.4.4
RubyInline-3.6.6

You can remove the merb-0.5.2 gems and also all the others, I think is
a GEM_PATH / GEM_HOME issue and not a problem of merb directly.

Please ignore the 'x86-mswin32' gems since I'm on Windows :-)

> rake specs # from my app root
> rake aborted!
> no such file to load -- merb_activerecord
>
> When I decide to use Merb core"edge", what's the best way to also get
> Merb ActiveRecord "edge"?
>

svn co http://svn.devjavu.com/merb/plugins/merb_activerecord merb_activerecord
cd merb_activerecord
rake package (to generate the .gem file)

Use as previously indicated.

HTH,
-- 
Luis Lavena
Multimedia systems
-
A common mistake that people make when trying to design
something completely foolproof is to underestimate
the ingenuity of complete fools.
Douglas Adams

From aslak.hellesoy at gmail.com  Sat Jan 19 10:16:55 2008
From: aslak.hellesoy at gmail.com (Aslak Hellesoy)
Date: Sat, 19 Jan 2008 16:16:55 +0100
Subject: How do I pass form values from POST controller specs?
In-Reply-To: <30ab559b0801190352p172066c7kd258f971c32aaaa1@mail.gmail.com>
References: <8d961d900801180124h3f28baf3qf2df11462fa67233@mail.gmail.com>
	<2fff50390801180216h239b8530s19f5214cfabbdb6e@mail.gmail.com>
	<8d961d900801180248x3b16ad56w92df914f749da76a@mail.gmail.com>
	<2fff50390801180311n660f5e47g26ca7c80da6838d1@mail.gmail.com>
	<30ab559b0801180433o2dc417a3ve9aaa4ec3a8f3728@mail.gmail.com>
	<30ab559b0801190349s610a1568j40f42334b467de5f@mail.gmail.com>
	<30ab559b0801190352p172066c7kd258f971c32aaaa1@mail.gmail.com>
Message-ID: 

Halla

I'm very interested in that. I'll let you know when I have done the  
prep work.

Aslak

Sent from my iPhone

On 19 Jan 2008, at 12:52, "Jon Egil Stand"   
wrote:

> Aslak
>
> Welcome to merb, it's great that a rspec core-developer is  
> interested in merb.
>
> We've recently had some issues in spec'ing ActiveRecord models using
> all of rpsec's goodies, but found that they don't only need
> ActiveRecord, but also more of rails per se.
>
> Given a more detailed explanation, are you interested in decoupling
> rspec for AR from rspec from rails?
>
> All the best
> Jon Egil
> irb.no
> _______________________________________________
> Merb-devel mailing list
> Merb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/merb-devel

From kevwil at gmail.com  Sat Jan 19 11:09:26 2008
From: kevwil at gmail.com (Kevin Williams)
Date: Sat, 19 Jan 2008 09:09:26 -0700
Subject: MrBlog plan
In-Reply-To: <30ab559b0801190356of1e64c9red0425f168b2b38d@mail.gmail.com>
References: <30ab559b0801190356of1e64c9red0425f168b2b38d@mail.gmail.com>
Message-ID: <683a886f0801190809i6a1d8a69sdfbf55f1817608dc@mail.gmail.com>

+1000

When Rails came on the scene, we quickly had apps like Typo and
Instiki to look at as example apps. It's great that someone will pick
this up and keep it going.

Will the 'beginner' priority include using quite a bit of the Merb
framework, to show how most Merb features can be used, or will a lot
of the framework features be left out for simplicity sake? Something
in-between, perhaps.


On Jan 19, 2008 4:56 AM, Jon Egil Stand  wrote:
> Greetings
>
> I've recently spent some time updating MrBlog to merb 0.5.2. Thanks to
> to all at #merb for helping out.
>
> I now feel the time has come to do some more housecleaning and
> refactoring to MrBlog than just updating to the recent merb-version.
> I'd like to share my guidelines and hear if people think this is
>
>   a) OK
>   b) !OK
>
> ----------------------
>
>
> 1. What's MrBlog
>
>   MrBlog is a simple blog-engine. It's written for two purposes, in priority:
>
>   a) The merb beginner. MrBlog will intends to show a merb beginner how
>      the merb framework can be used to write a simple web-application. MrBlog
>      will show you how to
>        - build a web application with the Model-Controller-View paradigm
>        - utilize javascript for dynamic effects in a web-page
>        - make the application accessible as a web-service
>        - utilize an external webservice (akismet for checking spam in comments)
>
>   b) The blogger with simple needs. MrBlog doesn't try to be sophisticated,
>      but if your blog-engine needs aren't sophisticated either, MrBlog just
>      might be the perfect match.
>
>
> 2. What's happening to it
>
>   MrBlog is undergoing change with the following three goals in mind:
>
>   a) Lean, meaning a small feature set and easy to understand.
>
>   b) Tight, meaning production quality and secure. Specs will be written to
>      test all aspects of the application.
>
>   c) Updated, meaning MrBlog will be updated to always run on the latest
>      stable release of merb.
>
>
> ----------------------
>
> Please get back to me if you have opinions on the matter.
>
> All the best
> Jon Egil
> _______________________________________________
> Merb-devel mailing list
> Merb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/merb-devel
>



-- 
Cheers,

Kevin Williams
http://www.bantamtech.com/

From luke.sutton at gmail.com  Sun Jan 20 00:43:06 2008
From: luke.sutton at gmail.com (Luke Sutton)
Date: Sun, 20 Jan 2008 16:13:06 +1030
Subject: MrBlog plan
In-Reply-To: <30ab559b0801190356of1e64c9red0425f168b2b38d@mail.gmail.com>
References: <30ab559b0801190356of1e64c9red0425f168b2b38d@mail.gmail.com>
Message-ID: 

This is an excellent idea.

Since it will serve as an example application, do you think it might  
also be a good idea to develop a tutorial explaining how it was put  
together? I was considering something like this last week.

I'd be happy to help write and format a tutorial if you think it's a  
good idea.

-- 
Luke

On 19/01/2008, at 10:26 PM, Jon Egil Stand wrote:

> Greetings
>
> I've recently spent some time updating MrBlog to merb 0.5.2. Thanks to
> to all at #merb for helping out.
>
> I now feel the time has come to do some more housecleaning and
> refactoring to MrBlog than just updating to the recent merb-version.
> I'd like to share my guidelines and hear if people think this is
>
>  a) OK
>  b) !OK
>
> ----------------------
>
>
> 1. What's MrBlog
>
>  MrBlog is a simple blog-engine. It's written for two purposes, in  
> priority:
>
>  a) The merb beginner. MrBlog will intends to show a merb beginner how
>     the merb framework can be used to write a simple web- 
> application. MrBlog
>     will show you how to
>       - build a web application with the Model-Controller-View  
> paradigm
>       - utilize javascript for dynamic effects in a web-page
>       - make the application accessible as a web-service
>       - utilize an external webservice (akismet for checking spam in  
> comments)
>
>  b) The blogger with simple needs. MrBlog doesn't try to be  
> sophisticated,
>     but if your blog-engine needs aren't sophisticated either,  
> MrBlog just
>     might be the perfect match.
>
>
> 2. What's happening to it
>
>  MrBlog is undergoing change with the following three goals in mind:
>
>  a) Lean, meaning a small feature set and easy to understand.
>
>  b) Tight, meaning production quality and secure. Specs will be  
> written to
>     test all aspects of the application.
>
>  c) Updated, meaning MrBlog will be updated to always run on the  
> latest
>     stable release of merb.
>
>
> ----------------------
>
> Please get back to me if you have opinions on the matter.
>
> All the best
> Jon Egil
> _______________________________________________
> Merb-devel mailing list
> Merb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/merb-devel


From hello at timperrett.com  Wed Jan 23 10:22:07 2008
From: hello at timperrett.com (Tim Perrett)
Date: Wed, 23 Jan 2008 15:22:07 +0000
Subject: MooTools javascript integration for Merb
Message-ID: 

Hey all,

Just to say after some discussion on the IRC the other day there  
seemed to be some support for creating a mootools plugin for Merb. So,  
I have started a merb-mootools project on rubyforge to bring mootools  
integration to Merb in the form of some nice easy helpers (think rails  
style prototype helpers). We are literally just starting this project,  
and would welcome anyone who wants to contribute.

If you want to get involved, just ping me an email and i'll add you  
onto the rubyforge project :)

All the best

Tim



From fernand.galiana at gmail.com  Wed Jan 23 10:46:41 2008
From: fernand.galiana at gmail.com (Fernand Galiana)
Date: Wed, 23 Jan 2008 08:46:41 -0700
Subject: Action caching...
Message-ID: <30ab479c0801230746p7ab9dd6dp5f4ef980b83185e6@mail.gmail.com>

All,

    I am running Merb 0.5.0. Is there a way to specify an expiration time on
an
    action cache, besides physically calling expire_action ?

    I have been looking at the code and I was not able to find support for
that

    Something like

    cache_action( :fred => 30*60, :blee => 60*60 )

    would expire fred in 30 min and blee in 1 hour...

    Any tips on how to achieve that ?

Thanks,
Fernand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080123/2786534b/attachment.html 

From merb at dusty.name  Wed Jan 30 17:52:08 2008
From: merb at dusty.name (Dusty Doris)
Date: Wed, 30 Jan 2008 17:52:08 -0500
Subject: gems usage question
Message-ID: 

I have created a simple gem for merb that will let me run annotate
models as a rake task.  Anyway, it works fine when I install the gem
to the system.  But, when I try to install it to the gems directory I
have problems.  Is there a trick to this?

Assuming I'm in Merb.root

$ gem install ~/merb_annotate_models/pkg/merb_annotate_models-0.0.2.gem
-i gems --ignore-dependencies

It puts the files in the gems dir as it should, but it says it can't
be found when I do a simple dependency on it.  I'm assuming I'm
missing something, any hints?

Thanks