<  February 2012   >
Su Mo Tu We Th Fr Sa
          1  2  3  4
 5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29
00:32 waxjar joined
00:56 lanceball joined
02:04 kaliya joined
02:16 tian2992_ joined
02:49 ph^ joined
02:51 rstacruz joined
03:02 ph^_ joined
03:03 kschiess joined
03:22 banseljaj joined
03:36 <Mathetes> [00rss] <alie...@gmail.com (Lorenzo Giuliani)> Re: WYSIWYG - http://z.pist0s.ca/112t
03:45 Stalkr_ joined
03:59 ph^_ joined
04:02 banseljaj joined
04:07 peterhellberg joined
04:10 rstacruz joined
04:15 zmack joined
04:31 vmoravec joined
05:37 postmodern joined
05:58 erpuds joined
05:59 etehtsea joined
06:25 tian2992_ joined
06:32 amithkk joined
06:32 banyan_ joined
06:36 d2s joined
06:48 erpuds joined
07:11 fbernier joined
07:13 eka joined
07:44 Defusal joined
07:59 jrgifford joined
08:28 wasy joined
08:34 rsinger joined
08:36 lanceball joined
08:41 iamjarvo joined
08:45 waxjar joined
08:50 fbernier joined
08:54 rsinger joined
08:54 rob_ left
09:04 banyan joined
09:23 hukl joined
09:27 erpuds joined
09:28 mattonrails joined
09:41 banseljaj joined
09:41 tla joined
09:41 CannedCorn joined
09:46 rsinger joined
09:49 oilpastels_ joined
09:52 <oilpastels_> guys, quick question
09:52 <oilpastels_> http://pastie.org/3472199
09:53 <oilpastels_> is this not enough to pass params over to '/preview'?
09:54 <oilpastels_> what am i missing?
09:56 Austin__ joined
09:57 nwest joined
10:01 thoradam joined
10:04 <peterhellberg> oilpastels_: What do you expect to happen? Just a redirect to /preview?
10:05 <oilpastels_> i want to be able to view the @text content on preview
10:05 <oilpastels_> peterhellberg: ^ sorry
10:06 <peterhellberg> @text will only be available on "POST /"
10:07 <peterhellberg> You could add the text to a query parameter like: redirect "/preview?text=#{@text}" or just render the preview directly
10:07 <oilpastels_> peterhellberg: thanks, let me see
10:08 <peterhellberg> I hope you know that you don’t magically have sessions in Sinatra, you need to enable them if you for some reason need to persist data between pages
10:10 <oilpastels_> peterhellberg: i forgot about that
10:15 shellox joined
10:15 <oilpastels_> peterhellberg: jesus, i was totally confused as to how sinatra worked. i got it working now and i feel properly stupid.
10:16 <oilpastels_> peterhellberg: thanks!
10:16 <shellox> khaase: are you around?
10:16 <khaase> shellox: yes
10:16 <shellox> I have some weird issues with a modular sinatra application :/
10:16 <shellox> Could not find gem 'sinatra (= 1.3.2) ruby' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)
10:17 <shellox> moment, i create a gist
10:19 <peterhellberg> oilpastels_: Something like this: https://gist.github.com/1924504 (I would write a modular Sinatra application instead)
10:20 <shellox> khaase: http://pastie.org/3472434
10:21 <oilpastels_> peterhellberg: wow, that's very thorough, thanks a lot :)
10:25 <shellox> and bundle install returns: Could not install to path `Gemfile` because of an invalid symlink. Remove the symlink so the directory can be created.
10:26 <khaase> shellox: no idea, maybe ask in bundler channel?
10:26 <shellox> k
10:31 <peterhellberg> khaase: Thanks for Travis CI btw :) (Is there any reasonable way to save VCR data between runs?)
10:32 <khaase> peterhellberg: we plan to add a artifacts feature that would allow this
10:33 <shellox> khaase: haha got it, a hidden .bundle file ;)
10:33 <peterhellberg> khaase: Oh, cool. (My test suite take ~1-2 mins because it need to download some data over the net)
11:05 banseljaj joined
11:06 tbuehlmann joined
11:09 oilpastels_ joined
11:11 fbernier joined
11:13 chson joined
11:15 waxjar joined
11:18 pendlepants joined
11:24 v0n joined
11:28 banyan joined
11:28 QaDeS joined
11:47 delinquentme joined
11:49 <delinquentme> When making API calls ... specifically in sinatra .. I've seen the instances where args are simply placed in the URL ... what happens when they're packaged up with something like curl? I'm guessing those args go into the header?
11:54 ewdafa joined
11:57 banseljaj joined
12:18 edzhelyov joined
12:25 erpuds joined
12:26 erpuds joined
12:33 savage- joined
12:33 <Defusal> delinquentme, HTTP requests have GET args which go in the URL and certain HTTP methods such as POST has a body of data
12:34 <Defusal> headers are reasonably rearly used for APIs
12:38 <delinquentme> headers aren't used for APIs?
12:58 achiu joined
13:03 <khaase> delinquentme: they are, but url params are no headers
13:03 <khaase> delinquentme: in curl, set headers with -H
13:04 <delinquentme> yeah i've got a nice example of that ...now how does sinatra dissect those headers for use in the app.rb routes file?
13:11 zmack joined
13:12 erpuds joined
13:17 ph^ joined
13:21 kenichi joined
13:23 <delinquentme> I need a Rails.root type operation in sinatra
13:23 <delinquentme> WAIT .:/ should work as the current dir right?
13:28 tayy joined
13:41 hukl joined
13:45 danishkhan joined
13:52 nerdy joined
13:52 MacDiva joined
14:06 banseljaj joined
14:07 CannedCorn joined
14:13 erpuds joined
14:16 sbeam_ joined
14:19 apucacao joined
14:48 hukl joined
15:04 fbernier joined
15:09 banseljaj joined
15:41 lupisak joined
15:54 edzhelyov joined
16:00 shtirlic joined
16:17 kenichi joined
16:24 tayy joined
16:32 chrxn joined
16:33 Stalkr_ joined
16:57 Hydroxide joined
16:59 <Hydroxide> hi. I have two modular apps which share enough logic that I made them inherit from a shared class which inherits from Sinatra::Base. the shared superclass lives in a subdirectory but needs to know the top-level settings.root dir for file access purposes. how can I do this?
16:59 <Hydroxide> i.e., every way I've tried seems to result in no settings.root value being passed to the superclass. I could add an argument to the superclass constructor and pass it via initialize, but that's ugly.
17:01 chrxn joined
17:13 <Hydroxide> actually, initialize probably wouldn't work
17:13 <Hydroxide> since it's a class method-based DSL
17:23 <tla> Hydroxide: passing information from subclass to its superclass seems odd :)
17:24 <Hydroxide> tla: I'd be fine doing it in a cleaner way
17:24 <tbuehlmann> do you want to share that between the classes?
17:24 <Hydroxide> tla: it's just hard to figure out what the answer is. maybe I need to make it an extension and use two lines, one to register and one to call a DSL/class macro to pass the info
17:24 <Hydroxide> but I"m already doing that too much
17:25 <Hydroxide> tbuehlmann: it's a mixture of settings that all the modular apps should share, plus some config info they should load from disk
17:25 <Hydroxide> tbuehlmann: the config info is relative to where the top-level apps live
17:26 <Hydroxide> but the subclass or extension or whatever is trying to access the config info relative to itself
17:26 <Hydroxide> if that makes sense
17:26 <tla> I think I ended up with adding a function on the superclass returning a variable set on the subclass
17:26 <tbuehlmann> if you just have a shared state, you could use a class variable
17:27 <Hydroxide> tla: hm, that's interesting
17:27 <Hydroxide> tbuehlmann: class variable where?
17:27 <Hydroxide> in the children?
17:27 <tla> Hydroxide: it was a looong time ago in some PHP :)
17:27 <Hydroxide> haha :)
17:28 <tbuehlmann> in the parent
17:29 <Hydroxide> hm, I think I might do the register + call a class macro option after all. that will give max flexibility if I want to have different modular apps use different config files with the same shared logic
17:30 <tbuehlmann> yea
18:12 <Hydroxide> tla, tbuehlmann: works nicely. thanks for listening and discussing :)
18:12 <* Hydroxide> waves
18:12 Hydroxide left
18:14 WillMarshall joined
18:29 CannedCorn joined
18:33 iamjarvo joined
18:36 banyan joined
18:38 chrxn joined
18:57 Jarred joined
18:57 <Jarred> I have three apps. Two talk to a backend, which stores data and maintains state. One of those two is sending back and forth sensor data (it's state). The third is a way of representing state. Is Sinatra a good backend for this situation?
19:04 oilpastels_ joined
19:05 iamjarvo1 joined
19:23 banyan joined
19:23 mattonrails joined
19:27 CannedCorn joined
19:51 postmodern joined
19:53 tian2992 joined
19:55 gnarg joined
19:56 <gnarg> hey khaase: this is Jon from New Relic, we met when you were in Portland at EY
19:56 <gnarg> If you're around I have a couple questions
19:57 <gnarg> I'm trying to fix up our instrumentation of 1.3.x, which is kind of broken right now
20:00 banyan_ joined
20:01 chson joined
20:21 rtyler_ joined
20:22 Jarred joined
20:22 drfreeze joined
20:35 QaDeS joined
20:39 QaDeS_ joined
20:42 iamjarvo joined
20:45 nwest joined
20:49 mattonrails joined
20:51 CannedCorn joined
20:56 danishkh_ joined
21:03 achiu1 joined
21:05 shtirlic joined
21:20 achiu joined
21:28 CannedCorn joined
21:30 esmerino joined
21:34 danishkhan joined
21:38 danishkhan joined
21:41 achiu joined
21:51 danishkhan joined
22:00 banyan__ joined
22:14 chrxn joined
22:44 shtirlic joined
22:53 savage- joined
22:56 AriT93Mac joined
23:00 hadees joined
23:09 banyan_ joined
23:10 l1x joined
23:10 <l1x> hey
23:10 <l1x> can i use in configure block a cache control header for static files?
23:16 sts joined
23:42 erpuds joined
23:59 v0n joined