From Reid.Thompson at ateb.com Mon Jun 4 14:52:00 2007 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Mon, 04 Jun 2007 14:52:00 -0400 Subject: [Nitro] Request for Transaction example Message-ID: <1180983120.20824.15.camel@jhereg> For a simple example's sake, assume i have a file in which space delimited data correlates to an Og table. The file has +2 Million rows. How do I setup a transaction to handle the entire file? I tried something like below, but I think it is committing on every line, rather all as a transaction... ( Postgresql ). .... db = Og.setup(og_psql) store = db.get_store store.start myfile = File.open("/home/rthompso/reid") myfile.each_line {|line| date, ts, type, telno,t2, location, calltype, fa, fn, result = line.split(' ') tbl = Loadtbl.new tbl.date = date tbl.ts = ts tbl.type = type tbl.telno = telno + t2 tbl.location = location tbl.calltype = calltype tbl.fa = fa tbl.fn = fn tbl.result = result tbl.save } store.commit .... Thanks, reid From john at oxyliquit.de Mon Jun 4 16:22:07 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 04 Jun 2007 23:22:07 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: <1180983120.20824.15.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> Message-ID: Hi, Loadtbl.transaction do |store| > myfile.each_line {|line| > tbl = Loadtbl.new > tbl.save > } end Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Mon Jun 4 16:23:49 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 04 Jun 2007 23:23:49 +0300 Subject: [Nitro] George: annotation :text_key Message-ID: Hi George, sorry for destroying your text keys last time. :P def load(pk) if (key = ann(:self, :text_key)) && pk.to_i == 0 && (pk !~ /\S{22}/) I think however that there might be potential problems which could confuse unknowing users. * any pk with more than 22 consecutive non witespace chars + text key (that regex should really be /\A\S{22}$\z/ if at all) * Tag['1.41'] meaning the to_i is potentionally shadowing some values and will raise a not meaningful DB error (string not applicapable for integer column) and at seemingly 'random' values. * OgKlass[request['oid']] meaning a string could be passed from someone who doesn't know, which all satisfies that, but still is wrong because the primary key of OgKlass is a text key itself, maybe containing "0 Cool". This is the three ways I think this method could go wrong (besides it using 'unnecessary' annotations). But then, this is only theoretically, as this is is a toally undocumented feature which only can be found by RTFS'ing and is solely used in Taggable (and even there undocumented). So I guess this has its point, as it's only used by a single person who knows what he's doing. ;) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From Reid.Thompson at ateb.com Mon Jun 4 16:34:57 2007 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Mon, 04 Jun 2007 16:34:57 -0400 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> Message-ID: <1180989297.32064.4.camel@jhereg> On Mon, 2007-06-04 at 23:22 +0300, Jonathan Buch wrote: > Hi, > > Loadtbl.transaction do |store| > > > myfile.each_line {|line| > > tbl = Loadtbl.new > > tbl.save > > } > > end > > Jo > Ok mod'ed to... db = Og.setup(og_psql) store = db.get_store myfile = File.open("/home/rthompso/reid") Loadtbl.transaction do |store| myfile.each_line {|line| date, ts, type, telno,t2, location, calltype, fa, fn, result = line.split(' ') tbl = Loadtbl.new tbl.date = date tbl.ts = ts tbl.type = type tbl.telno = telno + t2 tbl.location = location tbl.calltype = calltype tbl.fa = fa tbl.fn = fn tbl.result = result tbl.save } end It still appears to be committing on each save -- if all records were in a single transaction, no rows should be present until the final commit -- correct???? yet... rthompso at jhereg:~$ psql -U rthompso -c "select count(*) from tbl4" test count ------- 31692 (1 row) rthompso at jhereg:~$ psql -U rthompso -c "select count(*) from tbl4" test count ------- 32055 (1 row) rthompso at jhereg:~$ psql -U rthompso -c "select count(*) from tbl4" test count ------- 32293 (1 row) rthompso at jhereg:~$ psql -U rthompso -c "select count(*) from tbl4" test count ------- 32611 (1 row) rthompso at jhereg:~$ psql -U rthompso -c "select count(*) from tbl4" test count ------- 32985 (1 row) rthompso at jhereg:~$ psql -U rthompso -c "select count(*) from tbl4" test count ------- 33431 (1 row) rthompso at jhereg:~$ psql -U rthompso -c "select count(*) from tbl4" test count ------- 33883 (1 row) From john at oxyliquit.de Tue Jun 5 01:26:38 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 05 Jun 2007 08:26:38 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: <1180989297.32064.4.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> Message-ID: Hi, > It still appears to be committing on each save -- if all records were in > a single transaction, no rows should be present until the final commit > -- correct???? > > yet... that I don't know, have you watched the sql output? That's the best way to make sure everything's alright. `$DBG = true` somewhere above Og.start will do. With 32k entries it'll be a little messy, but you can redirect your output to a file I guess. :) So, the first sql statement (after starting up Og) should be a begin transaction. There's all kinds of transaction 'levels', read http://www.postgresql.org/docs/8.0/static/transaction-iso.html for more information. It says 'read committed' is the standard level, but it might be uncommitted for you, if you can select stuff while transaction is still in progress. But, if there's no TRANSACTION at the beginning, then there's something wrong within Og. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From janm-nitro at transactionware.com Tue Jun 5 02:43:55 2007 From: janm-nitro at transactionware.com (Jan Mikkelsen) Date: Tue, 05 Jun 2007 16:43:55 +1000 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> Message-ID: <4665062B.9010104@transactionware.com> Jonathan Buch wrote: >> > > It still appears to be committing on each save -- if all > > records were in >> > > a single transaction, no rows should be present until the > > final commit >> > > -- correct???? >> > > >> > > yet... Yes, that is correct. > > [ ... ] > > There's all kinds of transaction 'levels', read > > http://www.postgresql.org/docs/8.0/static/transaction-iso.html > > for more information. It says 'read committed' is the > > standard level, > > but it might be uncommitted for you, if you can select stuff > > while > > transaction is still in progress. Postgresql doesn't have dirty reads: read uncommitted is turned into read committed. Regards, Jan. From john at oxyliquit.de Tue Jun 5 02:56:22 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 05 Jun 2007 09:56:22 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: <4665062B.9010104@transactionware.com> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <4665062B.9010104@transactionware.com> Message-ID: Hi, > Postgresql doesn't have dirty reads: read uncommitted is turned into > read committed. yes, thank you, I read that too after sending that mail. ^^; Sorry for spreading false information. :P Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Tue Jun 5 03:49:26 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jun 2007 10:49:26 +0300 Subject: [Nitro] George: annotation :text_key In-Reply-To: References: Message-ID: Hello Jonathan, thanks for pointing out these problems. Can you suggest a better solution or do you suggest that I remove this feature from the public version of Og altogether? -g. On 6/4/07, Jonathan Buch wrote: > > Hi George, > > sorry for destroying your text keys last time. :P > > > def load(pk) > if (key = ann(:self, :text_key)) && pk.to_i == 0 && (pk !~ /\S{22}/) > > I think however that there might be potential problems which could > confuse unknowing users. > > * any pk with more than 22 consecutive non witespace chars + text key > (that regex should really be /\A\S{22}$\z/ if at all) > * Tag['1.41'] > meaning the to_i is potentionally shadowing some values and will raise > a not meaningful DB error (string not applicapable for integer column) > and at seemingly 'random' values. > * OgKlass[request['oid']] > meaning a string could be passed from someone who doesn't know, which > all satisfies that, but still is wrong because the primary key of > OgKlass is a text key itself, maybe containing "0 Cool". > > This is the three ways I think this method could go wrong (besides it > using 'unnecessary' annotations). > > But then, this is only theoretically, as this is is a toally undocumented > feature which only can be found by RTFS'ing and is solely used in > Taggable (and even there undocumented). > > So I guess this has its point, as it's only used by a single person > who knows what he's doing. ;) > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070605/d4633e7c/attachment.html From john at oxyliquit.de Tue Jun 5 04:16:19 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 05 Jun 2007 11:16:19 +0300 Subject: [Nitro] George: annotation :text_key In-Reply-To: References: Message-ID: Hi, > thanks for pointing out these problems. Can you suggest a better > solution or do you suggest that I remove this feature from the > public version of Og altogether? I'm actually not sure, I just wanted to bring this to attention before a greater audience. :) I know not many will care either way, but I love to be proven wrong and greater exposure is always good. :P I pondered this, and see no better solution, I guess this is as good as it gets. I myself always use 'adapted' Og repos, so either way is good for me, but other people aren't as source crawling as I am and might actually like that :key feature, or would love to have that extra little bit of speed by removing the ann call. So, anyone care enough to jump in and say something? Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Tue Jun 5 05:26:13 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jun 2007 12:26:13 +0300 Subject: [Nitro] George: annotation :text_key In-Reply-To: References: Message-ID: I too think there is no easy solution, and I really like this feature. It allows code like Category[1] and Category["News"] to work at the same time... but as you mentioned you have to be a little careful... -g. On 6/5/07, Jonathan Buch wrote: > > Hi, > > > thanks for pointing out these problems. Can you suggest a better > > solution or do you suggest that I remove this feature from the > > public version of Og altogether? > > I'm actually not sure, I just wanted to bring this to attention > before a greater audience. :) > I know not many will care either way, but I love to be proven wrong > and greater exposure is always good. :P > > I pondered this, and see no better solution, I guess this is as > good as it gets. > > I myself always use 'adapted' Og repos, so either way is good for > me, but other people aren't as source crawling as I am and might > actually like that :key feature, or would love to have that extra > little bit of speed by removing the ann call. > So, anyone care enough to jump in and say something? > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070605/cfd32380/attachment-0001.html From Reid.Thompson at ateb.com Tue Jun 5 09:08:21 2007 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Tue, 05 Jun 2007 09:08:21 -0400 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> Message-ID: <1181048901.2613.27.camel@jhereg> On Tue, 2007-06-05 at 08:26 +0300, Jonathan Buch wrote: > Hi, > > > It still appears to be committing on each save -- if all records were in > > a single transaction, no rows should be present until the final commit > > -- correct???? > > > > yet... > > that I don't know, have you watched the sql output? That's the best > way to make sure everything's alright. `$DBG = true` somewhere above > Og.start will do. With 32k entries it'll be a little messy, but you > can redirect your output to a file I guess. :) > So, the first sql statement (after starting up Og) should be a begin > transaction. > > There's all kinds of transaction 'levels', read > http://www.postgresql.org/docs/8.0/static/transaction-iso.html > for more information. It says 'read committed' is the standard level, > but it might be uncommitted for you, if you can select stuff while > transaction is still in progress. > > But, if there's no TRANSACTION at the beginning, then there's something > wrong within Og. > > Jo > Ok - looks to me like something is broken then. Can anyone confirm the following...( more notes inline ) One thing that I note is that the postgresql log shows all the sql statements from the psql test ending with a ';' but none of the Og statements end with ';' in the postgresql log. I believe the BEGIN TRANSACTION is failing because it is not terminated with a ';'? Turning $DBG=true and logging to file... snippet of scripts log file...let it run for a bit, then CTRL-C'd the script INFO: Og uses the Postgresql store. INFO: Created table 'tbltest'. DEBUG: BEGIN TRANSACTION DEBUG: SELECT nextval('tbltest_oid_seq') DEBUG: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:53', 'BUSY', '[123456789]', '[SE]', '[566]', 1, '[01]', '2007/01/02', '[62]') DEBUG: SELECT nextval('tbltest_oid_seq') DEBUG: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:53', 'SITTONE', '[123456789]', '[SE]', '[569]', 2, '[01]', '2007/01/02', '[48]') DEBUG: SELECT nextval('tbltest_oid_seq') DEBUG: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:54', 'BUSY', '[123456789]', '[SE]', '[566]', 3, '[01]', '2007/01/02', '[62]') DEBUG: SELECT nextval('tbltest_oid_seq') DEBUG: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:57', 'BUSY', '[123456789]', '[SE]', '[566]', 4, '[01]', '2007/01/02', '[62]') DEBUG: SELECT nextval('tbltest_oid_seq') .... .... DEBUG: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '09:00:21', 'ANSM_LEFTMSG', '[123456789]', '[X2]', '[CPE]', 2056, '[01]', '2007/01/02', '[22]') DEBUG: SELECT nextval('tbltest_oid_seq') DEBUG: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '09:00:23', 'NOANSWER', '[123456789]', '[X2]', '[CPE]', 2057, '[01]', '2007/01/02', '[61]') DEBUG: SELECT nextval('tbltest_oid_seq') ERROR: DB error , [SELECT nextval('tbltest_oid_seq')] ERROR: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/adapter/postgresql.rb:125:in `query_statement' /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/store/sql.rb:556:in `query' /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/adapter/postgresql.rb:156:in `insert' /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/store/sql.rb:102:in `og_insert' /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/store.rb:94:in `save' /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/model.rb:22:in `save' /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/manager.rb:113:in `with_store' /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/model.rb:21:in `save' tbl.rb:50 tbl.rb:36:in `each_line' tbl.rb:36 /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/store.rb:205:in `transaction' /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/model.rb:490:in `transaction' /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/manager.rb:113:in `with_store' /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/model.rb:489:in `transaction' tbl.rb:35 DEBUG: ROLLBACK DEBUG: Og::StoreException: Og::StoreException DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/store/sql.rb:595:in `handle_sql_exception' DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/store/sql.rb:559:in `query' DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/adapter/postgresql.rb:156:in `insert' DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/store/sql.rb:102:in `og_insert' DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/store.rb:94:in `save' DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/model.rb:22:in `save' DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/manager.rb:113:in `with_store' DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/model.rb:21:in `save' DEBUG: tbl.rb:50 DEBUG: tbl.rb:36:in `each_line' DEBUG: tbl.rb:36 DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/store.rb:205:in `transaction' DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/model.rb:490:in `transaction' DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/manager.rb:113:in `with_store' DEBUG: /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/model.rb:489:in `transaction' DEBUG: tbl.rb:35 So according to DBG, we started a transaction, did some inserts, I CTRL-C'd the script, we did a ROLLBACK. Per documentation, I should not have been able to read any of the data prior to the commit,, yet selects show data as it is being entered. Also, after the ROLLBACK, all data is still in the table. postgresql log shows... 2007-06-05 08:27:12 EDT LOG: statement: BEGIN TRANSACTION 2007-06-05 08:27:12 EDT LOG: statement: SELECT nextval('tbltest_oid_seq') 2007-06-05 08:27:12 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:53', 'BUSY', '[9544250950]', '[SE]', '[566]', 1, '[01]', '2007/01/02', '[62]') 2007-06-05 08:27:12 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:53', 'SITTONE', '[123456789]', '[SE]', '[569]', 2, '[01]', '2007/01/02', '[48]') 2007-06-05 08:27:12 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:54', 'BUSY', '[123456789]', '[SE]', '[566]', 3, '[01]', '2007/01/02', '[62]') 2007-06-05 08:27:12 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:57', 'BUSY', '[123456789]', '[SE]', '[566]', 4, '[01]', '2007/01/02', '[62]') 2007-06-05 08:27:12 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:57', 'SITTONE', '[123456789]', '[SE]', '[566]', 5, '[01]', '2007/01/02', '[48]') 2007-06-05 08:27:12 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:58', 'BUSY', '[123456789]', '[SF]', '[566]', 6, '[01]', '2007/01/02', '[62]') 2007-06-05 08:27:12 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:58', 'BUSY', '[123456789]', '[SE]', '[566]', 7, '[01]', '2007/01/02', '[62]') 2007-06-05 08:27:12 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:01:05', 'SITTONE', '[123456789]', '[SF]', '[566]', 8, '[01]', '2007/01/02', '[48]') 2007-06-05 08:27:12 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:01:06', 'SITTONE', '[123456789]', '[SE]', '[566]', 9, '[01]', '2007/01/02', '[48]') 2007-06-05 08:27:12 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:01:07', 'SITTONE', '[123456789]', '[SE]', '[566]', 10, '[01]', '2007/01/02', '[48]') ... ... 2007-06-05 08:27:26 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '09:00:21', 'ANSM_LEFTMSG', '[123456789]', '[X2]', '[CPE]', 2056, '[01]', '2007/01/02', '[22]') 2007-06-05 08:27:26 EDT LOG: statement: SELECT nextval('tbltest_oid_seq') 2007-06-05 08:27:26 EDT LOG: statement: INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '09:00:23', 'NOANSWER', '[123456789]', '[X2]', '[CPE]', 2057, '[01]', '2007/01/02', '[61]') 2007-06-05 08:27:26 EDT LOG: statement: SELECT nextval('tbltest_oid_seq') 2007-06-05 08:27:26 EDT LOG: statement: ROLLBACK If I take the postgresql log output and remove the extraneous log info, and feed it to psql ala psql -U rthompso -f /tmp/test tbl, then selects return empty while it is loading, and the rollback leaves the table empty -- I.E. it works as expected... test file.... BEGIN TRANSACTION; INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:53', 'BUSY', '[123456789]', '[SE]', '[566]', 1, '[01]', '2007/01/02', '[62]'); INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:53', 'SITTONE', '[123456789]', '[SE]', '[569]', 2, '[01]', '2007/01/02', '[48]'); INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:54', 'BUSY', '[123456789]', '[SE]', '[566]', 3, '[01]', '2007/01/02', '[62]'); INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:57', 'BUSY', '[123456789]', '[SE]', '[566]', 4, '[01]', '2007/01/02', '[62]'); INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:57', 'SITTONE', '[123456789]', '[SE]', '[566]', 5, '[01]', '2007/01/02', '[48]'); INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:58', 'BUSY', '[123456789]', '[SF]', '[566]', 6, '[01]', '2007/01/02', '[62]'); INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:00:58', 'BUSY', '[123456789]', '[SE]', '[566]', 7, '[01]', '2007/01/02', '[62]'); INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:01:05', 'SITTONE', '[123456789]', '[SF]', '[566]', 8, '[01]', '2007/01/02', '[48]'); INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:01:06', 'SITTONE', '[123456789]', '[SE]', '[566]', 9, '[01]', '2007/01/02', '[48]'); INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '08:01:07', 'SITTONE', '[123456789]', '[SE]', '[566]', 10, '[01]', '2007/01/02', '[48]'); ... ... INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '09:00:20', 'ANSM_LEFTMSG', '[123456789]', '[X2]', '[CPE]', 2055, '[01]', '2007/01/02', '[22]'); INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '09:00:21', 'ANSM_LEFTMSG', '[123456789]', '[X2]', '[CPE]', 2056, '[01]', '2007/01/02', '[22]'); INSERT INTO tbltest ("type", "ts", "result", "telno", "location", "calltype", "oid", "fa", "date", "fn") VALUES ('CALL:TN', '09:00:23', 'NOANSWER', '[123456789]', '[X2]', '[CPE]', 2057, '[01]', '2007/01/02', '[61]'); ROLLBACK; From Reid.Thompson at ateb.com Tue Jun 5 09:13:45 2007 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Tue, 05 Jun 2007 09:13:45 -0400 Subject: [Nitro] Request for Transaction example In-Reply-To: <1181048901.2613.27.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> Message-ID: <1181049225.2613.29.camel@jhereg> On Tue, 2007-06-05 at 09:08 -0400, Reid Thompson wrote: > On Tue, 2007-06-05 at 08:26 +0300, Jonathan Buch wrote: > > Hi, > > > > > It still appears to be committing on each save -- if all records were in > > > a single transaction, no rows should be present until the final commit > > > -- correct???? > > > > > > yet... > > > > that I don't know, have you watched the sql output? That's the best > > way to make sure everything's alright. `$DBG = true` somewhere above > > Og.start will do. With 32k entries it'll be a little messy, but you > > can redirect your output to a file I guess. :) > > So, the first sql statement (after starting up Og) should be a begin > > transaction. > > > > There's all kinds of transaction 'levels', read > > http://www.postgresql.org/docs/8.0/static/transaction-iso.html > > for more information. It says 'read committed' is the standard level, > > but it might be uncommitted for you, if you can select stuff while > > transaction is still in progress. > > > > But, if there's no TRANSACTION at the beginning, then there's something > > wrong within Og. > > > > Jo > > > Ok - looks to me like something is broken then. Can anyone confirm the > following...( more notes inline ) > > One thing that I note is that the postgresql log shows all the sql > statements from the psql test ending with a > ';' but none of the Og statements end with ';' in the postgresql log. I > believe the BEGIN TRANSACTION is failing because it is not terminated > with a ';'? > Adding a ';' after BEGIN TRANSACTION and ROLLBACK does not fix it. From john at oxyliquit.de Tue Jun 5 11:22:01 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 05 Jun 2007 18:22:01 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: <1181048901.2613.27.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> Message-ID: Hi, > If I take the postgresql log output and remove the extraneous log info, > and feed it to psql ala psql -U rthompso -f /tmp/test tbl, then selects > return empty while it is loading, and the rollback leaves the table > empty -- I.E. it works as expected... That is slightly discomforting... In fact, until now I always relied on that working! O.O; ... Downright disturbing.. I just did a small test and see that you're right, it in fact does not work like expected! irb(main):012:0> begin irb(main):013:1* store.start irb(main):014:1> a = User.new; a.name = 'asdf4'; a.save irb(main):023:0* store.conn.transaction_status => 2 # this means inside a transaction, normal status irb(main):015:1> store.exec "select foo blah" irb(main):016:1> rescue Object irb(main):017:1> end irb(main):019:0* store.conn.transaction_status => 3 # This means idle inside a failed transaction irb(main):021:0* store.rollback irb(main):023:0* store.conn.transaction_status => 0 # this means not in a transaction where conn = store.conn conn.exec "BEGIN" conn.exec %{INSERT INTO oguser ("name") VALUES ('asdf4')} conn.exec "ROLLBACK" This works! I'll have to investigate that further.... Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Tue Jun 5 11:33:54 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 05 Jun 2007 18:33:54 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> Message-ID: Hi, store = $og.store conn = store.conn begin store.start a = User.new; a.name = 'asdf5'; a.save conn.exec %{INSERT INTO oguser ("real_name", "password", "update_time", "email", "name", "access_time", "time_deleted", "revision", "phone", "create_time", "phone2", "customer_oid") VALUES (NULL, NULL, NULL, NULL, 'asdf555', NULL, NULL, NULL, NULL, NULL, NULL, NULL)} rescue Object end store.rollback It turned out, that the a.save did end up in the store, while the second one didn't. What does that tell us? We're FUCKED! I didn't take into account that there are 5 stores to choose from, each having his own connection and own transaction. Yes, disturbing. If you will excuse me, I think I'm gonna cry. ;/ Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From Reid.Thompson at ateb.com Tue Jun 5 12:50:46 2007 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Tue, 05 Jun 2007 12:50:46 -0400 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> Message-ID: <1181062246.29703.20.camel@jhereg> On Tue, 2007-06-05 at 18:33 +0300, Jonathan Buch wrote: > Hi, > > store = $og.store > conn = store.conn > > begin > store.start > a = User.new; a.name = 'asdf5'; a.save > conn.exec %{INSERT INTO oguser ("real_name", "password", "update_time", > "email", "name", "access_time", "time_deleted", "revision", "phone", > "create_time", "phone2", "customer_oid") VALUES (NULL, NULL, NULL, NULL, > 'asdf555', NULL, NULL, NULL, NULL, NULL, NULL, NULL)} > rescue Object > end > > store.rollback > > It turned out, that the a.save did end up in the store, while > the second one didn't. What does that tell us? We're FUCKED! > > I didn't take into account that there are 5 stores to choose from, > each having his own connection and own transaction. > so the default initialization starts 5 connections to the database? and we're utilizing 'more than one' in our scenario? > Yes, disturbing. If you will excuse me, I think I'm gonna cry. ;/ > > Jo > From Reid.Thompson at ateb.com Tue Jun 5 12:53:26 2007 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Tue, 05 Jun 2007 12:53:26 -0400 Subject: [Nitro] Request for Transaction example In-Reply-To: <1181062246.29703.20.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> Message-ID: <1181062406.29703.22.camel@jhereg> On Tue, 2007-06-05 at 12:50 -0400, Reid Thompson wrote: > On Tue, 2007-06-05 at 18:33 +0300, Jonathan Buch wrote: > > Hi, > > > > store = $og.store > > conn = store.conn > > > > begin > > store.start > > a = User.new; a.name = 'asdf5'; a.save > > conn.exec %{INSERT INTO oguser ("real_name", "password", "update_time", > > "email", "name", "access_time", "time_deleted", "revision", "phone", > > "create_time", "phone2", "customer_oid") VALUES (NULL, NULL, NULL, NULL, > > 'asdf555', NULL, NULL, NULL, NULL, NULL, NULL, NULL)} > > rescue Object > > end > > > > store.rollback > > > > It turned out, that the a.save did end up in the store, while > > the second one didn't. What does that tell us? We're FUCKED! > > > > I didn't take into account that there are 5 stores to choose from, > > each having his own connection and own transaction. > > > > so the default initialization starts 5 connections to the database? > and we're utilizing 'more than one' in our scenario? OK -- I think I see... ./lib/og/manager.rb 66: (options[:connection_count] || 5).times do > > > Yes, disturbing. If you will excuse me, I think I'm gonna cry. ;/ > > > > Jo > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From Reid.Thompson at ateb.com Tue Jun 5 13:09:57 2007 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Tue, 05 Jun 2007 13:09:57 -0400 Subject: [Nitro] Request for Transaction example In-Reply-To: <1181062406.29703.22.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> Message-ID: <1181063397.29703.27.camel@jhereg> On Tue, 2007-06-05 at 12:53 -0400, Reid Thompson wrote: > > > > > > > so the default initialization starts 5 connections to the database? > > and we're utilizing 'more than one' in our scenario? > > OK -- I think I see... > ./lib/og/manager.rb > 66: (options[:connection_count] || 5).times do explicitly setting :connection_count => doesn't yield what I expected either.... had thought that setting only one connection would force all transactions through that 1 and only connection... From george.moschovitis at gmail.com Tue Jun 5 14:00:58 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 5 Jun 2007 21:00:58 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: <1181063397.29703.27.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> Message-ID: Argh... this is very annoying indeed... unless anyone beats me and provides a patch (hint, hint) I will resolve this tomorrow. -g. On 6/5/07, Reid Thompson wrote: > > On Tue, 2007-06-05 at 12:53 -0400, Reid Thompson wrote: > > > > > > > > > > > so the default initialization starts 5 connections to the database? > > > and we're utilizing 'more than one' in our scenario? > > > > OK -- I think I see... > > ./lib/og/manager.rb > > 66: (options[:connection_count] || 5).times do > > explicitly setting :connection_count => doesn't yield what I expected > either.... had thought that setting only one connection would force all > transactions through that 1 and only connection... > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070605/0293c702/attachment.html From john at oxyliquit.de Tue Jun 5 14:21:28 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 05 Jun 2007 21:21:28 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: <1181063397.29703.27.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> Message-ID: Hi, > explicitly setting :connection_count => doesn't yield what I expected > either.... had thought that setting only one connection would force all > transactions through that 1 and only connection... in fact (in theory anyway) using a transaction while having :c_count on 1 would block the whole Thread (and so all Nitro/etc). This is because the transaction gets one store from the pool, and when the User.create wants its pool, it will block because there's no more stores in the pool, waiting for stores to appear. But, one iteration before this Manager, the manager leaked stores, just creating new stores when there were no more stores in the pool, great fun... I haven't looked in that area for quite some time now, maybe I should do that more often... So, this still could be happening, if the transaction/.create does not block, there's something seriously wrong (nice for test case btw). So, we need somehow a way to a) specify the store when using .save or alternatively b) (using some very clever method I can't think of) use the same store from transaction for database interactions within a transaction. idea: def transaction oldcrit = Thread.critical Thread.critical = true start Thread.current[:transaction_store] = self yield self rescue Object => ex rollback Logger.debug "#{ex.class}: #{ex.message}" ex.backtrace.each {|line| Logger.debug line} Thread.current[:transaction_store] = nil Thread.critical = oldcrit else commit Thread.current[:transaction_store] = nil Thread.critical = oldcrit end So, creating a critical section, and saving the store. This store could then be used within store-consuming methods (like in the manager handing out stores would always first try to get from Thread.current[:transaction_store] instead of the pool. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Tue Jun 5 14:37:28 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 05 Jun 2007 21:37:28 +0300 Subject: [Nitro] George: First Class Swiftiply Support? Message-ID: Hi, this is just a reminder, please decide on this matter. :) [21:22] swiftiply is easy. The Mongrel support already exists. The only real issue is that when one uses Nitro's builtin support for spawning multiple processes, it's behavior needs to change slightly when using it with Swiftiply. It has to spawn them all against the same port, instead of different port numbers. [21:24] I can write the patches. No big deal. But do you want me to give them to you, to include it directly in Nitro, or do you want it to be an add-on. A swiftiply_nitro executable that requires the patches? [21:25] wyhaines, this is defined in nitro/bin/nitro [21:25] http://pastie.caboo.se/68011 [21:25] exec_application(f, i + 1) here (second argument) increments the port [21:26] so, this being a bin which gets installed... I dunno how that can be 'patched' [21:27] argh... this uses kill -9 in there [21:28] I'd include a swiftiply_nitro executable. It'd basically just load the regular nitro executable, then require the patch. [21:29] that sounds ok :) [21:29] thank you for caring enough about Nitro to do this ^_^ [21:30] But it'd be nicer if there could just be a flag or an environment variable aware bit of code right in Nitro that gives it first class swiftiply support. I just need George to let me know which way he wants it to go. So, basically we could create a `if $SWIFTIPLY` and require the swiftiplied mongrel version from swiftiply and on the same we could disable the port incrementing I mentioned there above. This would be the 'first class support', second class would be Haines creating his own binary for us and installing that when one installs swiftiply. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From Reid.Thompson at ateb.com Tue Jun 5 15:30:08 2007 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Tue, 05 Jun 2007 15:30:08 -0400 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> Message-ID: <1181071808.29703.36.camel@jhereg> On Tue, 2007-06-05 at 21:21 +0300, Jonathan Buch wrote: > Hi, > > > explicitly setting :connection_count => doesn't yield what I expected > > either.... had thought that setting only one connection would force all > > transactions through that 1 and only connection... > > in fact (in theory anyway) using a transaction while having :c_count on > 1 would block the whole Thread (and so all Nitro/etc). This is because > the transaction gets one store from the pool, and when the User.create > wants its pool, it will block because there's no more stores in the > pool, waiting for stores to appear. It does, at least I assume that's what the below error means.... rthompso at jhereg:~$ ruby tbl4.rb INFO: Og uses the Postgresql store. DEBUG: Og manageable classes: [Loadtbl] DEBUG: CREATE TABLE tbl4test ("date" text, "ts" text, "type" text, "telno" text, "location" text, "calltype" text, "fa" text, "fn" text, "result" text, "oid" serial PRIMARY KEY) WITHOUT OIDS INFO: Created table 'tbl4test'. DEBUG: SELECT * FROM tbl4test LIMIT 1 DEBUG: SELECT * FROM tbl4test LIMIT 1 /usr/lib/ruby/1.8/monitor.rb:102:in `stop': stopping only thread (ThreadError) note: use sleep to stop forever from /usr/lib/ruby/1.8/monitor.rb:102:in `wait' from /usr/lib/ruby/1.8/monitor.rb:123:in `wait_while' from /usr/lib/ruby/gems/1.8/gems/facets-1.8.54/lib/facets/more/pool.rb:56:in `pop' from /usr/lib/ruby/1.8/monitor.rb:238:in `synchronize' from /usr/lib/ruby/gems/1.8/gems/facets-1.8.54/lib/facets/more/pool.rb:55:in `pop' from /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/manager.rb:94:in `get_store' from /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/manager.rb:112:in `with_store' from /home/rthompso/src/repo.nitroproject.org/script/../og/lib/og/model.rb:489:in `transaction' from tbl4.rb:36 From john at oxyliquit.de Tue Jun 5 15:34:35 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 05 Jun 2007 22:34:35 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: <1181071808.29703.36.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> <1181071808.29703.36.camel@jhereg> Message-ID: Hi, >> wants its pool, it will block because there's no more stores in the >> pool, waiting for stores to appear. > > It does, at least I assume that's what the below error means.... > /usr/lib/ruby/1.8/monitor.rb:102:in `stop': stopping only thread that I actually regard as a good sign. :P G promised to work on this *glare* so I very much hope that this can be gotten over with without me changing too much in my current project which is kinda huge-ish... (and the first in which I really needed transactions..) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From Reid.Thompson at ateb.com Tue Jun 5 15:45:50 2007 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Tue, 05 Jun 2007 15:45:50 -0400 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> <1181071808.29703.36.camel@jhereg> Message-ID: <1181072750.29703.44.camel@jhereg> On Tue, 2007-06-05 at 22:34 +0300, Jonathan Buch wrote: > Hi, > > >> wants its pool, it will block because there's no more stores in the > >> pool, waiting for stores to appear. > > > > It does, at least I assume that's what the below error means.... > > > /usr/lib/ruby/1.8/monitor.rb:102:in `stop': stopping only thread > > that I actually regard as a good sign. :P > > G promised to work on this *glare* so I very much hope that this can > be gotten over with without me changing too much in my current project > which is kinda huge-ish... (and the first in which I really needed > transactions..) > > Jo > So... my timing was perfect From john at oxyliquit.de Tue Jun 5 15:56:50 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 05 Jun 2007 22:56:50 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: <1181072750.29703.44.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> <1181071808.29703.36.camel@jhereg> <1181072750.29703.44.camel@jhereg> Message-ID: Hi, > So... my timing was perfect yes it was, and I thank you very much for that. :) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From dan at tastapod.com Tue Jun 5 18:56:58 2007 From: dan at tastapod.com (Dan North) Date: Tue, 05 Jun 2007 23:56:58 +0100 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> Message-ID: <4665EA3A.1060605@tastapod.com> You could steal a Java trick and associate a connection with the current thread when you begin a transaction. Then each call to $og.store.conn checks to see whether the current thread is in a transaction, and if so which connection is servicing it (basically a hash lookup of thread.__id__ to connection, defaulting to anything-from-the-pool). When the connection is committed or rolled back, the association is broken so any further calls to $og.store.conn go back to the pool again. But then I'm coming in halfway through this, so I might be way off :) Cheers, Dan George Moschovitis wrote: > Argh... this is very annoying indeed... > > unless anyone beats me and provides a patch (hint, hint) I will > resolve this tomorrow. > > -g. > > On 6/5/07, * Reid Thompson* > wrote: > > On Tue, 2007-06-05 at 12:53 -0400, Reid Thompson wrote: > > > > > > > > > > > so the default initialization starts 5 connections to the > database? > > > and we're utilizing 'more than one' in our scenario? > > > > OK -- I think I see... > > ./lib/og/manager.rb > > 66: (options[:connection_count] || 5).times do > > explicitly setting :connection_count => doesn't yield what I expected > either.... had thought that setting only one connection would > force all > transactions through that 1 and only connection... > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > -- > http://georgeandstella.com > http://blog.gmosx.com > http://cull.gr > http://www.joy.gr > http://nitroproject.org > ------------------------------------------------------------------------ > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070605/ca533664/attachment-0001.html From john at oxyliquit.de Wed Jun 6 02:05:16 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 06 Jun 2007 09:05:16 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: <4665EA3A.1060605@tastapod.com> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> <4665EA3A.1060605@tastapod.com> Message-ID: Hi, > You could steal a Java trick and associate a connection with the current > thread when you begin a transaction. Then each call to $og.store.conn > checks to see whether the current thread is in a transaction, and if so > which connection is servicing it (basically a hash lookup of > thread.__id__ to connection, defaulting to anything-from-the-pool). > > When the connection is committed or rolled back, the association is > broken so any further calls to $og.store.conn go back to the pool again. this is exactly the idea which I had and already posted, good, that means we're on the right track if others are doing that successfully already! > But then I'm coming in halfway through this, so I might be way off :) Nope, you're helping, really good to see that this approach works. :P Would be good to know if there are any race conditions though and if my Thread.critical was necessary there... Anyway, thank you very much, Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Wed Jun 6 02:35:28 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 06 Jun 2007 09:35:28 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: <1181072750.29703.44.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> <1181071808.29703.36.camel@jhereg> <1181072750.29703.44.camel@jhereg> Message-ID: Hi, this apparently fixes the transaction (for postgresql only), please report back. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ -------------- next part -------------- A non-text attachment was scrubbed... Name: transact.bndl Type: application/octet-stream Size: 40385 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070606/cf627c48/attachment-0001.obj From george.moschovitis at gmail.com Wed Jun 6 02:53:18 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 6 Jun 2007 09:53:18 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> <1181071808.29703.36.camel@jhereg> <1181072750.29703.44.camel@jhereg> Message-ID: thanks! -g. On 6/6/07, Jonathan Buch wrote: > > Hi, > > this apparently fixes the transaction (for postgresql only), > please report back. > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://georgeandstella.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070606/c34f6519/attachment.html From john at oxyliquit.de Wed Jun 6 09:59:20 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 06 Jun 2007 16:59:20 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> <1181071808.29703.36.camel@jhereg> <1181072750.29703.44.camel@jhereg> Message-ID: Hi, > thanks! yeh, and I think I know why that didn't really bite anyone else. The implementation before did some tricks with Thread[] as well, so the same thread always got the current store. Now, George, could still make that promised 'Og day' this week even with this resolved? /me reminds of the test cases and maybe a mysql/ sqlite translation of the transaction stuff. Thank you very much! Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Wed Jun 6 10:11:38 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 6 Jun 2007 17:11:38 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> <1181071808.29703.36.camel@jhereg> <1181072750.29703.44.camel@jhereg> Message-ID: > > and maybe a mysql/ > sqlite translation of the transaction stuff. > I just did the translation, will push to the repo ASAP. -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070606/7c602bc6/attachment.html From Reid.Thompson at ateb.com Fri Jun 8 10:24:56 2007 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Fri, 08 Jun 2007 10:24:56 -0400 Subject: [Nitro] Request for Transaction example In-Reply-To: References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> <1181071808.29703.36.camel@jhereg> <1181072750.29703.44.camel@jhereg> Message-ID: <1181312696.13965.10.camel@jhereg> On Wed, 2007-06-06 at 09:35 +0300, Jonathan Buch wrote: > Hi, > > this apparently fixes the transaction (for postgresql only), > please report back. > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ Sorry for the late reply -- got pulled off on something else. This does now appear to be working correctly for me. Inserts/saves are not visible until end of transaction/committed and 'ing to force a rollback leaves no data in the table. Thanks, reid From john at oxyliquit.de Fri Jun 8 11:06:48 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Fri, 08 Jun 2007 18:06:48 +0300 Subject: [Nitro] Request for Transaction example In-Reply-To: <1181312696.13965.10.camel@jhereg> References: <1180983120.20824.15.camel@jhereg> <1180989297.32064.4.camel@jhereg> <1181048901.2613.27.camel@jhereg> <1181062246.29703.20.camel@jhereg> <1181062406.29703.22.camel@jhereg> <1181063397.29703.27.camel@jhereg> <1181071808.29703.36.camel@jhereg> <1181072750.29703.44.camel@jhereg> <1181312696.13965.10.camel@jhereg> Message-ID: Hi, >> this apparently fixes the transaction (for postgresql only), >> please report back. > Sorry for the late reply -- got pulled off on something else. > This does now appear to be working correctly for me. Inserts/saves are > not visible until end of transaction/committed and 'ing to force > a rollback leaves no data in the table. > > Thanks you're welcome, glad to be of help. :) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From arne at arnebrasseur.net Sat Jun 9 11:22:39 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sat, 09 Jun 2007 17:22:39 +0200 Subject: [Nitro] scaffold and helper dropped? Message-ID: <466AC5BF.3060403@arnebrasseur.net> Hi, It appears a number of things have been dropped between 0.4.2 and repo (to become 0.5.0). Things I've noticed (unless I've overseen) are the helper method for Controller, and the scaffold/scaffolding code. Are they planned to return or not? Just curious. regards (ab) -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 From john at oxyliquit.de Sat Jun 9 11:50:39 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 09 Jun 2007 18:50:39 +0300 Subject: [Nitro] scaffold and helper dropped? In-Reply-To: <466AC5BF.3060403@arnebrasseur.net> References: <466AC5BF.3060403@arnebrasseur.net> Message-ID: HI, > It appears a number of things have been dropped between 0.4.2 and repo > (to become 0.5.0). > > Things I've noticed (unless I've overseen) are the helper method for > Controller, and the scaffold/scaffolding code. > > Are they planned to return or not? Just curious. not sure about scaffolding, but helper has been dropped by George for sure. He wants to use less 'non standard' tags. I happen to like the helper method though, but that's just me. :P (I never used scaffolding, so can't say anything about that.) Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Sat Jun 9 13:10:01 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 9 Jun 2007 20:10:01 +0300 Subject: [Nitro] scaffold and helper dropped? In-Reply-To: References: <466AC5BF.3060403@arnebrasseur.net> Message-ID: please use include PagerHelper include Karma include SEOname etc, instead of helper :pager helper :karma helper :seoname likewise the new version uses standard modules for scaffolding. class MyModel include Enchant end there is an option that automatically enchants all models. or for controller level scaffolding: class MyModel::Controller include REST end adds some standard REST methods. I think I have not commited rest.rb to the repo, will do soon. regards, George On 6/9/07, Jonathan Buch wrote: > > HI, > > > It appears a number of things have been dropped between 0.4.2 and repo > > (to become 0.5.0). > > > > Things I've noticed (unless I've overseen) are the helper method for > > Controller, and the scaffold/scaffolding code. > > > > Are they planned to return or not? Just curious. > > not sure about scaffolding, but helper has been dropped by George for > sure. He wants to use less 'non standard' tags. I happen to like the > helper method though, but that's just me. :P > (I never used scaffolding, so can't say anything about that.) > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070609/9de267d8/attachment.html From john at oxyliquit.de Sat Jun 9 14:13:50 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 09 Jun 2007 21:13:50 +0300 Subject: [Nitro] scaffold and helper dropped? In-Reply-To: References: <466AC5BF.3060403@arnebrasseur.net> Message-ID: Hi, you have used a slightly 'wrong' comparison: :P > include PagerHelper > include KarmaHelper > include SeonameHelper > etc, instead of helper :pager, :karma, :seoname Which means, it's a very clean non-disturbing way to specify standard named modules which fit one a single line. :P But I'm not really arguing here, don't mind me. :P Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Sat Jun 9 16:02:04 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 9 Jun 2007 23:02:04 +0300 Subject: [Nitro] scaffold and helper dropped? In-Reply-To: References: <466AC5BF.3060403@arnebrasseur.net> Message-ID: On 6/9/07, Jonathan Buch wrote: > > Hi, > > you have used a slightly 'wrong' comparison: :P > > > include PagerHelper > > include KarmaHelper > > include SeonameHelper > > > etc, instead of > > helper :pager, :karma, :seoname no... I meant include PagerHelper, Karma, SEOname I dont use the Helper prefix in my modules... (just in the PagerHelper module) so it looks exactly the same and is standard ruby... -g. Which means, it's a very clean non-disturbing way to specify > standard named modules which fit one a single line. :P > > But I'm not really arguing here, don't mind me. :P > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070609/f2762504/attachment-0001.html From george.moschovitis at gmail.com Sat Jun 9 16:02:28 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 9 Jun 2007 23:02:28 +0300 Subject: [Nitro] scaffold and helper dropped? In-Reply-To: References: <466AC5BF.3060403@arnebrasseur.net> Message-ID: > > I dont use the Helper prefix in my modules... (just in the PagerHelper > module) > make that postfix ;-) -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070609/a822dca4/attachment.html From arne at arnebrasseur.net Sun Jun 10 03:43:43 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sun, 10 Jun 2007 09:43:43 +0200 Subject: [Nitro] scaffold and helper dropped? In-Reply-To: References: <466AC5BF.3060403@arnebrasseur.net> Message-ID: <466BABAF.5070904@arnebrasseur.net> George Moschovitis schreef: > please use > > include PagerHelper > include Karma > include SEOname > > etc, instead of > > helper :pager > helper :karma > helper :seoname Ok, that's what I needed to know. > class MyModel::Controller > include REST > end > > adds some standard REST methods. Cool > I think I have not commited rest.rb to the repo, will do soon. Please do, I was about to write something like that myself. (ab) -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 From rob at robmela.com Mon Jun 11 08:16:03 2007 From: rob at robmela.com (Robert Mela) Date: Mon, 11 Jun 2007 08:16:03 -0400 Subject: [Nitro] Nitro/Rails interoperability In-Reply-To: <466BABAF.5070904@arnebrasseur.net> References: <466AC5BF.3060403@arnebrasseur.net> <466BABAF.5070904@arnebrasseur.net> Message-ID: <466D3D03.8070302@robmela.com> It's occurred to me that Nitro could have a role as release valve for overworked Nitro applications. I'm considering taking on an assignment where that's one of the first options I'd try -- offloading a very simple but time consuming piece from Rails onto a separate Nitro server. Jonathan answered the first of my questions in that area by showing me how Og can be used with legacy tables. Other pieces I imagine would be some adapters that let Nitro read and write to Rails' session and request objects, and generate URIs that work well with Rails back-ends. I think most people would see it as a low-risk experiment to offload certain simple tasks from Rails to Nitro. In the context of a situation where scalability issues are a significant time drain, there is strong incentive for applying a Nitro solution. Rails folk are already talking about Scala and Lift. Nitro offers the advantage of leveraging existing Ruby skills and infrastructure. Example: Assume a Typo blog with growing traffic requiring multiple Typo processes. Nitro could be used to read Typo's schema and display most pages. This is considerably easier to do than reimplementing *all* of the Typo functionality. Since blog administration is low traffic, a single Typo process could handle all the admin, and all or most of the remaining typo processes could be replaced by a single Nitro process. There are other cases where the offloaded tasks are even simpler -- e.g., a page that gathers a number of resources from elsewhere (e.g., retrieving several dozen images from a database ). Rails could continue to generate the overall page, but pass image retrieval URLs to a Nitro server Thoughts? -------------- next part -------------- A non-text attachment was scrubbed... Name: rob.vcf Type: text/x-vcard Size: 116 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070611/59dcef33/attachment.vcf From john at oxyliquit.de Tue Jun 12 11:46:26 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 12 Jun 2007 18:46:26 +0300 Subject: [Nitro] Newbie Impressions Message-ID: Hi, [18:10] Is there some kind of "getting started" guide for nitro [18:10] the documentation seems to be very sparse [18:11] yes, docs are sparse and often outdated, which is sad ;/ [18:11] have you seen http://oxyliquit.de/ ? [18:11] are you just suppoed to "Know" [18:11] Yeah [18:11] But it doesnt help me [18:11] where do I start ? [18:11] ok, have you seen the screencasts? [18:11] Yeah... [18:11] But it still doesnt explain anything [18:11] its just a guy recording himself typing [18:12] well, it's "just like that" [18:12] look at Nitro how you look at ruby [18:12] I know... :( [18:12] Im a ruby noob too [18:35] Do you have any idea when the new nitro site is gonna be done [18:35] allright, so, now, do you get to see the /input page? [18:36] new nitro site? I haven't heard anything about that [18:36] No I mean when is he gonna finish the current one [18:37] everything on it is a dummy link Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Tue Jun 12 17:01:36 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 13 Jun 2007 00:01:36 +0300 Subject: [Nitro] Nitro/Rails interoperability In-Reply-To: <466D3D03.8070302@robmela.com> References: <466AC5BF.3060403@arnebrasseur.net> <466BABAF.5070904@arnebrasseur.net> <466D3D03.8070302@robmela.com> Message-ID: Hi, will get back to you on this one, need more time to think. From arne at arnebrasseur.net Tue Jun 12 17:14:33 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Tue, 12 Jun 2007 23:14:33 +0200 Subject: [Nitro] Part.require Message-ID: <466F0CB9.40900@arnebrasseur.net> Hi, I was looking at nitro/part.rb. The rdoc says that part/name/run.rb is an optional standalone example app. This make sense to me. Later on there is a method Part.require that requires that run.rb. Is this the intended behaviour? Should it be used within a Nitro app or not? Personally I'd say it would make more sense to let Part.require 'users' issue require 'part/users' It's a trivial change but I could send a patch if you prefer. regards (ab) -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 From arne at arnebrasseur.net Tue Jun 12 17:31:09 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Tue, 12 Jun 2007 23:31:09 +0200 Subject: [Nitro] Newbie Impressions In-Reply-To: References: Message-ID: <466F109D.60601@arnebrasseur.net> Jonathan Buch schreef: > Hi, > > [18:10] Is there some kind of "getting started" guide for nitro > [18:10] the documentation seems to be very sparse > [18:11] yes, docs are sparse and often outdated, which is sad > ;/ > [18:11] have you seen http://oxyliquit.de/ ? > [18:11] are you just suppoed to "Know" > This is definitely a sore point for Nitro. I would like to help to create some sort of manual by the time 0.5.0 is released (which probably won't be tomorrow anyway). I'm still quite new to Nitro but I try to regularly read some source and try to make some notes as I go along. Jo and I talked about it a bit on IRC and he pointed out the Django docs (http://www.djangoproject.com/documentation/). We could follow a similar structure with a step-by-step guide for newbies followed by a complete reference section. I'm thinking a wiki-like system for the editors, but freeze the text when it is released after which only comments can be made (like with postgresql/php docs). Ideally each section would contain it's own unit tests to see if the examples are still valid with new versions, altough I think at this point it is more important to focus on actually getting some docs together. Other opinions on this? Any source diggers willing to contribute? thank you (ab) -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 From mattrose at folkwolf.net Tue Jun 12 17:35:03 2007 From: mattrose at folkwolf.net (Matt Rose) Date: Tue, 12 Jun 2007 17:35:03 -0400 Subject: [Nitro] Newbie Impressions In-Reply-To: <466F109D.60601@arnebrasseur.net> References: <466F109D.60601@arnebrasseur.net> Message-ID: <68F513E3-1706-4DE7-9022-B6E26D8B2845@folkwolf.net> I'd be in on that. I've done some diving in the code, but I've actually pretty much given up on nitro because of the lack of documentation, so I'm a little rusty. Matt On 12-Jun-07, at 5:31 PM, Arne Brasseur wrote: > Jonathan Buch schreef: >> Hi, >> >> [18:10] Is there some kind of "getting started" guide for >> nitro >> [18:10] the documentation seems to be very sparse >> [18:11] yes, docs are sparse and often outdated, which >> is sad >> ;/ >> [18:11] have you seen http://oxyliquit.de/ ? >> [18:11] are you just suppoed to "Know" >> > This is definitely a sore point for Nitro. I would like to help to > create some sort of manual by the time 0.5.0 is released (which > probably > won't be tomorrow anyway). I'm still quite new to Nitro but I try to > regularly read some source and try to make some notes as I go along. > > Jo and I talked about it a bit on IRC and he pointed out the Django > docs > (http://www.djangoproject.com/documentation/). We could follow a > similar > structure with a step-by-step guide for newbies followed by a complete > reference section. I'm thinking a wiki-like system for the editors, > but > freeze the text when it is released after which only comments can be > made (like with postgresql/php docs). > > Ideally each section would contain it's own unit tests to see if the > examples are still valid with new versions, altough I think at this > point it is more important to focus on actually getting some docs > together. > > Other opinions on this? Any source diggers willing to contribute? > > > thank you > (ab) > > -- > Arne Brasseur @ your service > http://www.arnebrasseur.net > arne at arnebrasseur.net > +32/496/94.55.63 > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From transfire at gmail.com Tue Jun 12 20:16:08 2007 From: transfire at gmail.com (TRANS) Date: Tue, 12 Jun 2007 20:16:08 -0400 Subject: [Nitro] Helping to polish the nitroproject web page Message-ID: <4b6f054f0706121716u55adf6bdjbd1b9f0b29764c74@mail.gmail.com> I resized the image to fit the small box above the "what's new" image on the nitroproject.org web page. Could we get it added with a link. Thanks, T. -- o trans. Never face facts; if you do, you'll never get up in the ^^ transfire at gmail.com morning. - Marlo Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: oxy2.png Type: image/png Size: 27369 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070612/7cc7602b/attachment-0001.png From william.full.moon at gmail.com Wed Jun 13 01:41:31 2007 From: william.full.moon at gmail.com (* William) Date: Wed, 13 Jun 2007 15:41:31 +1000 Subject: [Nitro] Newbie Impressions In-Reply-To: <466F109D.60601@arnebrasseur.net> References: <466F109D.60601@arnebrasseur.net> Message-ID: <9e03c3c60706122241i30e0bf22se483ac2db9b38649@mail.gmail.com> Hey that's cool. Everytime something for "start here" gets done, the product upgrades and things become out of place. Or we loose the wiki and can't update material to keep "close to -works-as-coded- descriptions" :-D I like the proposal -- there are sites like this that provide on-line document management, etc. There needs to be a documentation review process with checks and balances, and stable location/support -- *At least* for starter material. I responded mostly because the key here is that for a fancy product like NITRO, the "get started" body of work should be very simple. There are old articles on getting a start with Ruby on Rails about. The most 'famous' is probably the one on O'Reily -- it has only been updated once, in a big way. I feel that people get too excited by the cool stuff and forget about the new person who know nothing. That person only needs the basics -- Just like Georges video -- What has happened to the replacement video?? It is all good work -- please continue. For something really cool what about a Nitro 3-D plastic models module ... See here: * http://www.marksman.com.au/ The coolest thing so far (apart from Nitro). ... Will. On 13/06/07, Arne Brasseur wrote: > > Jonathan Buch schreef: > > Hi, > > > > [18:10] Is there some kind of "getting started" guide for nitro > > [18:10] the documentation seems to be very sparse > > [18:11] yes, docs are sparse and often outdated, which is > sad > > ;/ > > [18:11] have you seen http://oxyliquit.de/ ? > > [18:11] are you just suppoed to "Know" > > > This is definitely a sore point for Nitro. I would like to help to > create some sort of manual by the time 0.5.0 is released (which probably > won't be tomorrow anyway). I'm still quite new to Nitro but I try to > regularly read some source and try to make some notes as I go along. > > Jo and I talked about it a bit on IRC and he pointed out the Django docs > (http://www.djangoproject.com/documentation/). We could follow a similar > structure with a step-by-step guide for newbies followed by a complete > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070613/da757a70/attachment.html From george.moschovitis at gmail.com Wed Jun 13 03:39:42 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 13 Jun 2007 10:39:42 +0300 Subject: [Nitro] Part.require In-Reply-To: <466F0CB9.40900@arnebrasseur.net> References: <466F0CB9.40900@arnebrasseur.net> Message-ID: You are right, please send me the patch. -g. On 6/13/07, Arne Brasseur wrote: > > Hi, > > I was looking at nitro/part.rb. The rdoc says that part/name/run.rb is > an optional standalone example app. This make sense to me. Later on > there is a method Part.require that requires that run.rb. Is this the > intended behaviour? Should it be used within a Nitro app or not? > > Personally I'd say it would make more sense to let > Part.require 'users' > issue > require 'part/users' > > It's a trivial change but I could send a patch if you prefer. > > regards > (ab) > > > -- > Arne Brasseur @ your service > http://www.arnebrasseur.net > arne at arnebrasseur.net > +32/496/94.55.63 > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070613/a5af4f99/attachment.html From arne at arnebrasseur.net Wed Jun 13 04:07:17 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Wed, 13 Jun 2007 01:07:17 -0700 (PDT) Subject: [Nitro] Newbie Impressions In-Reply-To: <9e03c3c60706122241i30e0bf22se483ac2db9b38649@mail.gmail.com> References: <466F109D.60601@arnebrasseur.net> <9e03c3c60706122241i30e0bf22se483ac2db9b38649@mail.gmail.com> Message-ID: <2936.81.246.186.164.1181722037.squirrel@webmail.arnebrasseur.net> > Hey that's cool. > > Everytime something for "start here" gets done, the product upgrades and > things become out of place. Or we loose the wiki and can't update > material > to keep "close to -works-as-coded- descriptions" :-D This seems to be a problem. Many Nitro links found across the web no longer work. I heard someone was going to set up a 'reaally cool site' for documentation stuff, but then vanished. Apparently (if I'm not mistaken) there used to be a Nitro wiki, wich I personally think would be fantastic. Oxywtf is great to have, but there's something organic about wikis that just can't be found elsewhere. > I like the proposal -- there are sites like this that provide on-line > document management, etc. Do you know of any? Pointers please! > There needs to be a documentation review process agreed, preferably by developer(s) (hint) > a Nitro 3-D plastic models module ... I don't see how this is related. So as not to reinvent the wheel I've been looking at how others organize their docs. Django, PHP and PostgreSQL all use version controlled plain text files. Django uses the ReST (Restructured Text) format, PHP and postgres use DocBook. Any other FOSS projects with superb docs that should be included in the comparison? (ab) From george.moschovitis at gmail.com Wed Jun 13 04:13:52 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 13 Jun 2007 11:13:52 +0300 Subject: [Nitro] Newbie Impressions In-Reply-To: <2936.81.246.186.164.1181722037.squirrel@webmail.arnebrasseur.net> References: <466F109D.60601@arnebrasseur.net> <9e03c3c60706122241i30e0bf22se483ac2db9b38649@mail.gmail.com> <2936.81.246.186.164.1181722037.squirrel@webmail.arnebrasseur.net> Message-ID: > > there used to be a Nitro wiki, wich I personally think would be fantastic. > Oxywtf is great to have, but there's something organic about wikis that > just can't be found elsewhere. > I will bring back the wiki. I am not sure though, should I make the wiki writeable by everyone? or give write access only to selected members of the community. Moreover, we would need some guidelines, ie how to organize this wiki. Can anyone in this ml suggest a good set of guidelines? -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070613/4fe3d5b7/attachment.html From arne at arnebrasseur.net Wed Jun 13 04:20:00 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Wed, 13 Jun 2007 01:20:00 -0700 (PDT) Subject: [Nitro] Part.require In-Reply-To: References: <466F0CB9.40900@arnebrasseur.net> Message-ID: <2969.81.246.186.164.1181722800.squirrel@webmail.arnebrasseur.net> I hope I've done this right (ab) > You are right, please send me the patch. > > -g. > > On 6/13/07, Arne Brasseur wrote: >> >> Hi, >> >> I was looking at nitro/part.rb. The rdoc says that part/name/run.rb is >> an optional standalone example app. This make sense to me. Later on >> there is a method Part.require that requires that run.rb. Is this the >> intended behaviour? Should it be used within a Nitro app or not? >> >> Personally I'd say it would make more sense to let >> Part.require 'users' >> issue >> require 'part/users' >> >> It's a trivial change but I could send a patch if you prefer. >> >> regards >> (ab) >> >> >> -- >> Arne Brasseur @ your service >> http://www.arnebrasseur.net >> arne at arnebrasseur.net >> +32/496/94.55.63 >> _______________________________________________ >> Nitro-general mailing list >> Nitro-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/nitro-general >> > > > > -- > http://phidz.com > http://blog.gmosx.com > http://cull.gr > http://www.joy.gr > http://nitroproject.org > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -------------- next part -------------- A non-text attachment was scrubbed... Name: fixed_part_require.patch.tar.gz Type: application/gzip Size: 12336 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070613/57dcb7d2/attachment-0001.bin From arne at arnebrasseur.net Wed Jun 13 04:48:25 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Wed, 13 Jun 2007 01:48:25 -0700 (PDT) Subject: [Nitro] Newbie Impressions In-Reply-To: References: <466F109D.60601@arnebrasseur.net> <9e03c3c60706122241i30e0bf22se483ac2db9b38649@mail.gmail.com> <2936.81.246.186.164.1181722037.squirrel@webmail.arnebrasseur.net> Message-ID: <2982.81.246.186.164.1181724505.squirrel@webmail.arnebrasseur.net> > > I will bring back the wiki. I am not sure though, should I make the wiki > writeable by everyone? or give write access only to selected members of > the > community. My very personal opion is that a wiki should be public, but make sure you have decent spam protection. A wiki is a real community tool, and especially great for cookbook style recipes, tutorials, howtos. For real docs/manuals (again IMHO) a more structured and controlled approach would be better, but we could start out on the wiki. A good thing with text files+markup is that they are output agnostic. You can bundle them with the source, generate a web site, a pdf, a CHM (windows help file), etc. (ab) From eeklund at gmail.com Wed Jun 13 05:34:24 2007 From: eeklund at gmail.com (Eivind Eklund) Date: Wed, 13 Jun 2007 11:34:24 +0200 Subject: [Nitro] Newbie Impressions In-Reply-To: <466F109D.60601@arnebrasseur.net> References: <466F109D.60601@arnebrasseur.net> Message-ID: On 6/12/07, Arne Brasseur wrote: > Ideally each section would contain it's own unit tests to see if the > examples are still valid with new versions, altough I think at this > point it is more important to focus on actually getting some docs together. Hearing that there have been docs that are now outdated/removed, it seems like unit tests to keep the docs working might be more important than the actual docs. It would at least be a very large plus, as it force the docs to keep working... Eivind. From arne at arnebrasseur.net Wed Jun 13 06:16:52 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Wed, 13 Jun 2007 03:16:52 -0700 (PDT) Subject: [Nitro] Newbie Impressions In-Reply-To: References: <466F109D.60601@arnebrasseur.net> Message-ID: <3100.81.246.186.164.1181729812.squirrel@webmail.arnebrasseur.net> > Hearing that there have been docs that are now outdated/removed, it > seems like unit tests to keep the docs working might be more important > than the actual docs. It would at least be a very large plus, as it > force the docs to keep working... You may be right, I don't have much experience with unit-testing web stuff, but I'll look at the existing tests to get some inspiration. I'm starting to see some duplicate effort here. The docs would partially overlap with the rDoc, and included tests/specs would overlap with the tests already in Nitro. Since converting tests to specs is on the to-do list perhaps this could be looked at together with documenting stuff. Tests are after all a form of executable documentation. I think we need some more brainstorming on how -formal docs, possibly with tests -rDoc -tests/specs should relate to each other. I believe all three have their place, but some coordination would be required. For example: first write rSpec and contribute, then write doc and refer to the spec with filename and revision number. Other thoughts? (ab) From george.moschovitis at gmail.com Thu Jun 14 05:31:35 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 14 Jun 2007 12:31:35 +0300 Subject: [Nitro] Part.require In-Reply-To: <2969.81.246.186.164.1181722800.squirrel@webmail.arnebrasseur.net> References: <466F0CB9.40900@arnebrasseur.net> <2969.81.246.186.164.1181722800.squirrel@webmail.arnebrasseur.net> Message-ID: applied. On 6/13/07, arne at arnebrasseur.net wrote: > > I hope I've done this right > > (ab) > > > You are right, please send me the patch. > > > > -g. > > > > On 6/13/07, Arne Brasseur wrote: > >> > >> Hi, > >> > >> I was looking at nitro/part.rb. The rdoc says that part/name/run.rb is > >> an optional standalone example app. This make sense to me. Later on > >> there is a method Part.require that requires that run.rb. Is this the > >> intended behaviour? Should it be used within a Nitro app or not? > >> > >> Personally I'd say it would make more sense to let > >> Part.require 'users' > >> issue > >> require 'part/users' > >> > >> It's a trivial change but I could send a patch if you prefer. > >> > >> regards > >> (ab) > >> > >> > >> -- > >> Arne Brasseur @ your service > >> http://www.arnebrasseur.net > >> arne at arnebrasseur.net > >> +32/496/94.55.63 > >> _______________________________________________ > >> Nitro-general mailing list > >> Nitro-general at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/nitro-general > >> > > > > > > > > -- > > http://phidz.com > > http://blog.gmosx.com > > http://cull.gr > > http://www.joy.gr > > http://nitroproject.org > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070614/e2c9af18/attachment.html From dan at tastapod.com Thu Jun 14 18:06:15 2007 From: dan at tastapod.com (Dan North) Date: Thu, 14 Jun 2007 23:06:15 +0100 Subject: [Nitro] Newbie Impressions In-Reply-To: References: <466F109D.60601@arnebrasseur.net> <9e03c3c60706122241i30e0bf22se483ac2db9b38649@mail.gmail.com> <2936.81.246.186.164.1181722037.squirrel@webmail.arnebrasseur.net> Message-ID: <4671BBD7.2070307@tastapod.com> Hi George. I would suggest keeping the wiki public, and then think about locking it down if it gets abused (which is unlikely). DHH did a very smart thing in the run-up to Rails 1.0, which was that he committed to "not break the book". In other words, the RoR book - which was published to coincide with the 1.0 release - would be the reference point and the development team would not break compatibility with anything in it. After 1.0 he was free to move things forwards again, but it made the statement that he was fairly happy with the shape of the framework. I think you would gain a lot of momentum with Nitro if you (and some of the more enthusiastic writers!) were to start documenting how you think Nitro should be used, and then committing to "not break the wiki", sort of thing. Cheers, Dan ps. You will also find that some people will self-select as "wiki gnomes", keeping the place tidy and making sure the content is reasonably consistent. I don't know where they come from, but I have eternal respect for them. George Moschovitis wrote: > > there used to be a Nitro wiki, wich I personally think would be > fantastic. > Oxywtf is great to have, but there's something organic about wikis > that > just can't be found elsewhere. > > > I will bring back the wiki. I am not sure though, should I make the > wiki writeable by everyone? or give write access only to selected > members of the community. Moreover, we would need some guidelines, ie > how to organize this wiki. Can anyone in this ml suggest a good set of > guidelines? > > -g. > > -- > http://phidz.com > http://blog.gmosx.com > http://cull.gr > http://www.joy.gr > http://nitroproject.org > ------------------------------------------------------------------------ > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070614/cdd31e4d/attachment.html From arne at arnebrasseur.net Fri Jun 15 03:49:28 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Fri, 15 Jun 2007 00:49:28 -0700 (PDT) Subject: [Nitro] Newbie Impressions In-Reply-To: <4671BBD7.2070307@tastapod.com> References: <466F109D.60601@arnebrasseur.net> <9e03c3c60706122241i30e0bf22se483ac2db9b38649@mail.gmail.com> <2936.81.246.186.164.1181722037.squirrel@webmail.arnebrasseur.net> <4671BBD7.2070307@tastapod.com> Message-ID: <3350.81.245.188.157.1181893768.squirrel@webmail.arnebrasseur.net> Hi Dan, Manveru, Jonathan, George and I had a discussion on IRC yesterday about the state and future of Nitro. George has put an awful lot of work in it, and a lot has been done since 0.42, but he seems to have the feeling he's a bit on his own getting little outside help. It's all a bit of a sad situation. The repo version looks really good but needs polish and specs. The gem version is getting outdated so we really should work on getting 0.50 out. That would give us a solid base to move forward from. I have committed myself to write the specs (rspec), Jonathan will review them. George will finish the examples, and if we pull this off and release a decent 0.50 he has said to release some other nifty stuff related to Nitro. That said I personally also feel docs would be very important. I believe this community would've been a lot bigger and more vibrant if the barrier to entry would have been lower thanks to decent documentation. But I'm gonna work on the specs first, since they should form a good starting point for anyone writing docs. If G could bring back the wiki it would still be a valuable tool, for both developers and users, but I'm very fond of wikis so I'm biased :). To anyone listening : please give the repo version a shot (darcs get http://repo.nitroproject.org). The API will probably not change much till 0.50. (That is correct, is it George?) So now is the time to hunt for those bugs, however small. Let us know what problems you encounter. If some people don't have darcs access I will try to set up a daily snapshot of sorts. Just make yourself known on the list. Thank you for listening. (ab) > Hi George. > > I would suggest keeping the wiki public, and then think about locking it > down if it gets abused (which is unlikely). > > DHH did a very smart thing in the run-up to Rails 1.0, which was that he > committed to "not break the book". In other words, the RoR book - which > was published to coincide with the 1.0 release - would be the reference > point and the development team would not break compatibility with > anything in it. After 1.0 he was free to move things forwards again, but > it made the statement that he was fairly happy with the shape of the > framework. > > I think you would gain a lot of momentum with Nitro if you (and some of > the more enthusiastic writers!) were to start documenting how you think > Nitro should be used, and then committing to "not break the wiki", sort > of thing. > > Cheers, > Dan > > ps. You will also find that some people will self-select as "wiki > gnomes", keeping the place tidy and making sure the content is > reasonably consistent. I don't know where they come from, but I have > eternal respect for them. > > > George Moschovitis wrote: >> >> there used to be a Nitro wiki, wich I personally think would be >> fantastic. >> Oxywtf is great to have, but there's something organic about wikis >> that >> just can't be found elsewhere. >> >> >> I will bring back the wiki. I am not sure though, should I make the >> wiki writeable by everyone? or give write access only to selected >> members of the community. Moreover, we would need some guidelines, ie >> how to organize this wiki. Can anyone in this ml suggest a good set of >> guidelines? >> >> -g. >> >> -- >> http://phidz.com >> http://blog.gmosx.com >> http://cull.gr >> http://www.joy.gr >> http://nitroproject.org >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Nitro-general mailing list >> Nitro-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/nitro-general > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From arne at arnebrasseur.net Fri Jun 15 08:48:54 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Fri, 15 Jun 2007 05:48:54 -0700 (PDT) Subject: [Nitro] [PATCH] beginning of a rake file Message-ID: <4636.81.245.188.157.1181911734.squirrel@webmail.arnebrasseur.net> From arne at arnebrasseur.net Fri Jun 15 08:56:40 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Fri, 15 Jun 2007 05:56:40 -0700 (PDT) Subject: [Nitro] [PATCH] beginning of a rake file Message-ID: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> I'm looking at the best way to organise the test/spec infrastructure, but something with a rakefile seems the way to go. To that end I created a rakefile and a rake_tasks directory, and moved the most obvious stuff from script/ to rake_tasks/ So issuing rake -T now gives you rake cleanup:all # Perform all cleanup tasks rake cleanup:cache # Cleanup caches rake cleanup:dist # Cleanup distribution dirs rake cleanup:misc # cleanup miscelanious files rake cleanup:rdoc # Cleanup rDoc directories rake darcs:apply # Apply a patch bundle to the darcs repository rake dist # Create gem and zip distributions rake tabs # Convert tabs to spaces and \r\n to \n script/cleanup.rb script/build.rb script/ctabs.rb script/apply.rb have been replaced with rake_tasks/cleanup.rake rake_tasks/dist.rake rake_tasks/tabs.rake rake_tasks/apply.rake The only thing is that with rake it's not so easy to pass additional command line arguments to your tasks, AFAIK. So for apply i resorted to using environment variables : BUNDLE=some_bundle rake darcs:apply As said a rake_tasks/spec.rake is coming, I'm looking at the rspec rake tasks, and at how Ramaze does it since they don't use the rSpec task. Sorry for the empty mail. (ab) -------------- next part -------------- A non-text attachment was scrubbed... Name: rake_init.patch.tar.gz Type: application/gzip Size: 13640 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070615/14cc791d/attachment.bin From john at oxyliquit.de Fri Jun 15 11:01:39 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Fri, 15 Jun 2007 18:01:39 +0300 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: Hi, only short notice, I like it. I think too that Rake is the way to go here, and love you seeing giving the overal structure some lovin' ! Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Fri Jun 15 11:36:19 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Fri, 15 Jun 2007 18:36:19 +0300 Subject: [Nitro] Newbie Impressions In-Reply-To: <3350.81.245.188.157.1181893768.squirrel@webmail.arnebrasseur.net> References: <466F109D.60601@arnebrasseur.net> <9e03c3c60706122241i30e0bf22se483ac2db9b38649@mail.gmail.com> <2936.81.246.186.164.1181722037.squirrel@webmail.arnebrasseur.net> <4671BBD7.2070307@tastapod.com> <3350.81.245.188.157.1181893768.squirrel@webmail.arnebrasseur.net> Message-ID: Hi, thank you very much for that comprehensive post and summarizing the gist of the irc discussion. I'm going to work on Og specs, which hopefully goes smoother this time now that you have made some 'pre work' by creating a Rakefile. Where I can predict problems, is 'store problems' introduced by the new store pool. Other than that, there could also be problems in the relation deletion. The rest (I hope) consists mostly of smaller problems. So, anyone willing to induce some _life_ into Og again, I already agreed to review any patches you want me to. Even if you feel like being too new too help or just too shy. :P The best way to get better in touch with me: IRC: #nitro on irc.freenode.net I also do live help, I can help you get started with Nitro, walk you through the basic Nitro app generation and give extensive Og help. So, if you feel like stuck, or unsure on how you start, want to 'sidestep' non-existant documenation, come see me. ;) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Fri Jun 15 11:57:14 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 15 Jun 2007 18:57:14 +0300 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: This looks nice :) I am glad you are taking the specs thing seriously! -g. On 6/15/07, arne at arnebrasseur.net wrote: > > I'm looking at the best way to organise the test/spec infrastructure, but > something with a rakefile seems the way to go. To that end I created a > rakefile and a rake_tasks directory, and moved the most obvious stuff from > script/ to rake_tasks/ > > So issuing rake -T now gives you > rake cleanup:all # Perform all cleanup tasks > rake cleanup:cache # Cleanup caches > rake cleanup:dist # Cleanup distribution dirs > rake cleanup:misc # cleanup miscelanious files > rake cleanup:rdoc # Cleanup rDoc directories > rake darcs:apply # Apply a patch bundle to the darcs repository > rake dist # Create gem and zip distributions > rake tabs # Convert tabs to spaces and \r\n to \n > > script/cleanup.rb > script/build.rb > script/ctabs.rb > script/apply.rb > > have been replaced with > > rake_tasks/cleanup.rake > rake_tasks/dist.rake > rake_tasks/tabs.rake > rake_tasks/apply.rake > > The only thing is that with rake it's not so easy to pass additional > command line arguments to your tasks, AFAIK. So for apply i resorted to > using environment variables : > > BUNDLE=some_bundle rake darcs:apply > > As said a rake_tasks/spec.rake is coming, I'm looking at the rspec rake > tasks, and at how Ramaze does it since they don't use the rSpec task. > > Sorry for the empty mail. > > (ab) > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070615/466ed562/attachment-0001.html From george.moschovitis at gmail.com Fri Jun 15 12:01:36 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 15 Jun 2007 19:01:36 +0300 Subject: [Nitro] Newbie Impressions In-Reply-To: <3350.81.245.188.157.1181893768.squirrel@webmail.arnebrasseur.net> References: <466F109D.60601@arnebrasseur.net> <9e03c3c60706122241i30e0bf22se483ac2db9b38649@mail.gmail.com> <2936.81.246.186.164.1181722037.squirrel@webmail.arnebrasseur.net> <4671BBD7.2070307@tastapod.com> <3350.81.245.188.157.1181893768.squirrel@webmail.arnebrasseur.net> Message-ID: > > http://repo.nitroproject.org). The API will probably not change much till > 0.50. (That is correct, is it George?) So now is the time to hunt for > That is *correct*. -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070615/74b8759b/attachment.html From george.moschovitis at gmail.com Fri Jun 15 12:02:47 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 15 Jun 2007 19:02:47 +0300 Subject: [Nitro] Newbie Impressions In-Reply-To: References: <466F109D.60601@arnebrasseur.net> <9e03c3c60706122241i30e0bf22se483ac2db9b38649@mail.gmail.com> <2936.81.246.186.164.1181722037.squirrel@webmail.arnebrasseur.net> <4671BBD7.2070307@tastapod.com> <3350.81.245.188.157.1181893768.squirrel@webmail.arnebrasseur.net> Message-ID: I will work on the blog example over the weekend and make sure it runs and demonstrates most of the latest changes. -g. On 6/15/07, George Moschovitis wrote: > > http://repo.nitroproject.org). The API will probably not change much till > > 0.50. (That is correct, is it George?) So now is the time to hunt for > > > > That is *correct*. > > -g. > > -- > http://phidz.com > http://blog.gmosx.com > http://cull.gr > http://www.joy.gr > http://nitroproject.org > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070615/480bdfb3/attachment.html From john at oxyliquit.de Sat Jun 16 02:44:44 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 16 Jun 2007 09:44:44 +0300 Subject: [Nitro] Helping to polish the nitroproject web page In-Reply-To: <4b6f054f0706121716u55adf6bdjbd1b9f0b29764c74@mail.gmail.com> References: <4b6f054f0706121716u55adf6bdjbd1b9f0b29764c74@mail.gmail.com> Message-ID: Hi Trans, > I resized the image to fit the small box above the "what's new" image > on the nitroproject.org web page. Could we get it added with a link. thanks for caring for Oxyliquit ^_^ Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Sat Jun 16 07:08:28 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 16 Jun 2007 14:08:28 +0300 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: Hi, I have started converting test cases. Progress can be monitored here: http://oxywtf.de/~john/darcs_repos/glycerin There's also the patch from Arne included. He's actively working on a better infrastructure atm. I use the following 'transition approach' I `darcs mv` tc_* files to the respective directory in the spec/ folder and from there start modifying (crudely for now, fixing comes later). Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Sat Jun 16 08:46:21 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 16 Jun 2007 15:46:21 +0300 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: Ok, I applied the patch. One suggestion, I would like that you change 'rake_tasks' to simply 'rake'. what do you think? -g. On 6/15/07, arne at arnebrasseur.net wrote: > > I'm looking at the best way to organise the test/spec infrastructure, but > something with a rakefile seems the way to go. To that end I created a > rakefile and a rake_tasks directory, and moved the most obvious stuff from > script/ to rake_tasks/ > > So issuing rake -T now gives you > rake cleanup:all # Perform all cleanup tasks > rake cleanup:cache # Cleanup caches > rake cleanup:dist # Cleanup distribution dirs > rake cleanup:misc # cleanup miscelanious files > rake cleanup:rdoc # Cleanup rDoc directories > rake darcs:apply # Apply a patch bundle to the darcs repository > rake dist # Create gem and zip distributions > rake tabs # Convert tabs to spaces and \r\n to \n > > script/cleanup.rb > script/build.rb > script/ctabs.rb > script/apply.rb > > have been replaced with > > rake_tasks/cleanup.rake > rake_tasks/dist.rake > rake_tasks/tabs.rake > rake_tasks/apply.rake > > The only thing is that with rake it's not so easy to pass additional > command line arguments to your tasks, AFAIK. So for apply i resorted to > using environment variables : > > BUNDLE=some_bundle rake darcs:apply > > As said a rake_tasks/spec.rake is coming, I'm looking at the rspec rake > tasks, and at how Ramaze does it since they don't use the rSpec task. > > Sorry for the empty mail. > > (ab) > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070616/7fbc896a/attachment.html From john at oxyliquit.de Sat Jun 16 09:10:24 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 16 Jun 2007 16:10:24 +0300 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: Hi, > Ok, I applied the patch. One suggestion, I would like that you change > 'rake_tasks' to simply 'rake'. > what do you think? I would leave them as rake_tasks, as it's just clearer (from outside) what the folder contains. Besides that, Arne and I have discovered a potential conflict with RSpec: The Nitro Aspects implementation overrides `before` for any Module, but RSpec depends on its own `before`. Could that have any side effects using those two together? I'm just in the middle of translating more tcs, one thing that doesn't work is Cacheable. The `after_enchant` callback doesn't seem to get called, but I didn't investigate further. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Sat Jun 16 10:36:05 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 16 Jun 2007 17:36:05 +0300 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: Hi, more patches out. One thing to note here is: I'm only testing via PostgreSQL. So I need one or two guys to test Sqlite and Mysql. Volunteers? Atm every second spec fails, and many specs to go, but my head hurts for the day, so.. but, anyone having patches reviewed, I'm still here. George, I need you help on the join.rb spec, I assume you have written the original test, and I can't see what it tries to do. It fails (for me) on the first test. I'd love you to have a look if I translated it correctly from the TC (I'm not that good with specs yet) or if there's indeed a problem within Og. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From transfire at gmail.com Sat Jun 16 16:00:32 2007 From: transfire at gmail.com (Trans) Date: Sat, 16 Jun 2007 20:00:32 -0000 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: <1182024032.399085.79990@p77g2000hsh.googlegroups.com> On Jun 15, 8:56 am, a... at arnebrasseur.net wrote: > I'm looking at the best way to organise the test/spec infrastructure, but > something with a rakefile seems the way to go. To that end I created a > rakefile and a rake_tasks directory, and moved the most obvious stuff from > script/ to rake_tasks/ > > So issuing rake -T now gives you > rake cleanup:all # Perform all cleanup tasks > rake cleanup:cache # Cleanup caches > rake cleanup:dist # Cleanup distribution dirs > rake cleanup:misc # cleanup miscelanious files > rake cleanup:rdoc # Cleanup rDoc directories > rake darcs:apply # Apply a patch bundle to the darcs repository > rake dist # Create gem and zip distributions > rake tabs # Convert tabs to spaces and \r\n to \n > > script/cleanup.rb > script/build.rb > script/ctabs.rb > script/apply.rb > > have been replaced with > > rake_tasks/cleanup.rake > rake_tasks/dist.rake > rake_tasks/tabs.rake > rake_tasks/apply.rake > > The only thing is that with rake it's not so easy to pass additional > command line arguments to your tasks, AFAIK. So for apply i resorted to > using environment variables : > > BUNDLE=some_bundle rake darcs:apply > > As said a rake_tasks/spec.rake is coming, I'm looking at the rspec rake > tasks, and at how Ramaze does it since they don't use the rSpec task. > > Sorry for the empty mail. I'll probably be the lone dissenter here, but I prefer script/. I realize that Rake provides some useful features in the construction of project tasks, but Rakefiles also have a tendency to get pretty ugly. Scripts remain clean, and can require common behavior from a shared script-lib. Also, I have been working on some utilities which make working with scripts more fruitful, such a 'ludo' (lookup and do) and Scriptable. In any case, Rake's a fine choice, of course. It's just not my preference. Perhaps when my script tools are polished enough we can revisit this. I'm sure the Rakefile will be quite obese by then ;-) T. From john at oxyliquit.de Sat Jun 16 16:12:51 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 16 Jun 2007 23:12:51 +0300 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: <1182024032.399085.79990@p77g2000hsh.googlegroups.com> References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> <1182024032.399085.79990@p77g2000hsh.googlegroups.com> Message-ID: Hi, > I'll probably be the lone dissenter here, but I prefer script/. I > realize that Rake provides some useful features in the construction of > project tasks, but Rakefiles also have a tendency to get pretty ugly. > Scripts remain clean, and can require common behavior from a shared > script-lib. Also, I have been working on some utilities which make > working with scripts more fruitful, such a 'ludo' (lookup and do) and > Scriptable. > > In any case, Rake's a fine choice, of course. It's just not my > preference. Perhaps when my script tools are polished enough we can > revisit this. I'm sure the Rakefile will be quite obese by then ;-) we just need a working system which plays nice for now and does what we want: stable running of some task, testing being the premier one. We've got help from Manveru here where we got a structure from, where single scripts get loaded from a subdirectory. This makes for a cleaner structure than a huge Rakefile at least. All I care about really is: easy running, easy working with errors, easy spotting of errors, being able to run single specs by hand. So for what I care it could've stayed with script, but those weren't working, so whatever system is fine by me, just gotta work. :P Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From reid.thompson at ateb.com Sat Jun 16 23:27:28 2007 From: reid.thompson at ateb.com (Reid Thompson) Date: Sat, 16 Jun 2007 23:27:28 -0400 Subject: [Nitro] [Fwd: Re: [GENERAL] INSERT ... RETURNING in v8.2] Message-ID: <4674AA20.3010704@ateb.com> of interest... -------- Original Message -------- Subject: Re: [GENERAL] INSERT ... RETURNING in v8.2 Date: Sat, 16 Jun 2007 08:02:41 -0400 From: Tom Allison To: Vincenzo Romano CC: pgsql-general at postgresql.org References: <200706121618.32613.vincenzo.romano at gmail.com> On Jun 12, 2007, at 10:18 AM, Vincenzo Romano wrote: > > Hi all. > I'm trying to use this wonderful feature (thanks to anyone who > suggested/committed/implemented it). > > According to the documentation: > (http://www.postgresql.org/docs/8.2/interactive/sql-insert.html) > > "The optional RETURNING clause causes INSERT to compute and return > value(s) based on each row actually inserted. This is primarily > useful for obtaining values that were supplied by defaults, such > as a serial sequence number. However, any expression using the > table's columns is allowed. The syntax of the RETURNING list is > identical to that of the output list of SELECT." Holy Crud! you mean to tell me I can replace: insert into table(string) values(('one'),('two'),('three')); select idx from table where string in ('one','two','three'); with insert into table(string) values(('one'),('two'),('three')) returning idx; ????? I realize that this is an extension to standard SQL but it sure would save me a lot. I'm wondering just how many other things I'm missing.... (I am really starting to like this database more every week) ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend From reid.thompson at ateb.com Sat Jun 16 23:28:45 2007 From: reid.thompson at ateb.com (Reid Thompson) Date: Sat, 16 Jun 2007 23:28:45 -0400 Subject: [Nitro] [Fwd: Re: [GENERAL] INSERT ... RETURNING in v8.2] Message-ID: <4674AA6D.8050109@ateb.com> of interest, cont. -------- Original Message -------- Subject: Re: [GENERAL] INSERT ... RETURNING in v8.2 Date: Sat, 16 Jun 2007 18:04:08 +0200 From: PFC To: Tom Allison , Vincenzo Romano CC: pgsql-general at postgresql.org References: <200706121618.32613.vincenzo.romano at gmail.com> <8E77CF32-BFEF-4254-999B-5104A574D0E7 at tacocat.net> > Holy Crud! > you mean to tell me I can replace: > > insert into table(string) values(('one'),('two'),('three')); > select idx from table where string in ('one','two','three'); Yes. A smart ORM library should, when you create a new database object from form values, use INSERT RETURNING to grab all the default values (SERIALs, DEFAULTs, trigger-generated stuff etc). This is much more elegant than digging to find the sequence name to currval() it ! I think this feature is priceless (but it would be even better if I could do INSERT INTO archive (DELETE FROM active WHERE blah RETURNING *) ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings From john at oxyliquit.de Sun Jun 17 05:15:52 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 17 Jun 2007 12:15:52 +0300 Subject: [Nitro] [Fwd: Re: [GENERAL] INSERT ... RETURNING in v8.2] In-Reply-To: <4674AA6D.8050109@ateb.com> References: <4674AA6D.8050109@ateb.com> Message-ID: Hi, > of interest, cont. yes, very much of interest! :D >> Holy Crud! >> you mean to tell me I can replace: >> >> insert into table(string) values(('one'),('two'),('three')); >> select idx from table where string in ('one','two','three'); But actually Og doesn't do that (because it's crap), it'd only be very nice as it removes some complexity around the insertion. But, being a nice ORM, Og will have to support older databases, meaning 7.4 will still be floating around, so it'll take 10 years until we can remove that complexity. -_- Ah well, still, _very_ nice feature, thank you for reporting! Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From arne at arnebrasseur.net Sun Jun 17 06:40:53 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sun, 17 Jun 2007 12:40:53 +0200 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: <46750FB5.9080006@arnebrasseur.net> >> Ok, I applied the patch. One suggestion, I would like that you change >> 'rake_tasks' to simply 'rake'. >> what do you think? >> > > I would leave them as rake_tasks, as it's just clearer (from outside) > what the folder contains. > I'm fine either way. (ab) -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070617/d77e0615/attachment.html From arne at arnebrasseur.net Sun Jun 17 06:51:52 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sun, 17 Jun 2007 12:51:52 +0200 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: <1182024032.399085.79990@p77g2000hsh.googlegroups.com> References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> <1182024032.399085.79990@p77g2000hsh.googlegroups.com> Message-ID: <46751248.609@arnebrasseur.net> Trans schreef: > In any case, Rake's a fine choice, of course. It's just not my > preference. Perhaps when my script tools are polished enough we can > revisit this. I'm sure the Rakefile will be quite obese by then ;-) > Actually the rakefile contains only one line of code : Dir["rake_tasks/*.rake"].each &method(:load) so I wouldn't go as far as to call it obese :p The *.rake files are essentially the files from script/ with a desc/task wrapped around. I'd be glad to revisit this later if you propose a solid alternative. Two things about rake appeal to me : rake -T one instant overview of what tasks are available, so nicely self-documenting, and second the dependency system. (ab) -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 From george.moschovitis at gmail.com Sun Jun 17 07:03:33 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 17 Jun 2007 14:03:33 +0300 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: <46750FB5.9080006@arnebrasseur.net> References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> <46750FB5.9080006@arnebrasseur.net> Message-ID: > > I'm fine either way. > ok, lets leave it as 'rake_tasks' for the moment... -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070617/2f880872/attachment.html From arne at arnebrasseur.net Sun Jun 17 07:16:17 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sun, 17 Jun 2007 13:16:17 +0200 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> <46750FB5.9080006@arnebrasseur.net> Message-ID: <46751801.4040807@arnebrasseur.net> George Moschovitis schreef: > ok, lets leave it as 'rake_tasks' for the moment... I've given it some more thought, and I think 'rake' is too generic, one might get the impression we're bundling our own version of rake. Especially since it sits next to raw/og/nitro. So rake_tasks +1 (ab) -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 From john at oxyliquit.de Sun Jun 17 07:56:26 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 17 Jun 2007 14:56:26 +0300 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: Hi, > George, I need you help on the join.rb spec, I assume you have don't worry about this, I found a bug in postgresql which caused my problems. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Sun Jun 17 08:03:09 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 17 Jun 2007 15:03:09 +0300 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: great ;-) I love problems that resolve themselves ;-) -g. On 6/17/07, Jonathan Buch wrote: > > Hi, > > > George, I need you help on the join.rb spec, I assume you have > > don't worry about this, I found a bug in postgresql which caused > my problems. > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070617/e7933f61/attachment.html From arne at arnebrasseur.net Sun Jun 17 08:40:00 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sun, 17 Jun 2007 14:40:00 +0200 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: <46752BA0.5090009@arnebrasseur.net> George Moschovitis schreef: > great ;-) > > I love problems that resolve themselves ;-) > > -g. Not sure if this is one of those: it "can be dynamically wrapped" do AnotherTest.send(:define_method, :dyna, proc { false }) AnotherTest.new.dyna.should == "ok" end 'Advices can be dynamically wrapped' FAILED expected "ok", got false (using ==) bug in the code or bug in the spec? (ab) -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 From arne at arnebrasseur.net Sun Jun 17 08:56:36 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sun, 17 Jun 2007 14:56:36 +0200 Subject: [Nitro] [PATCH] beginning of a rake file In-Reply-To: References: <4640.81.245.188.157.1181912200.squirrel@webmail.arnebrasseur.net> Message-ID: <46752F84.602@arnebrasseur.net> Jonathan Buch schreef: > Besides that, Arne and I have discovered a potential conflict with RSpec: > The Nitro Aspects implementation overrides `before` for any Module, but > RSpec depends on its own `before`. Could that have any side effects > using those two together? I did some tests and apparently it does the right thing. I don't have a good explanation why, and it might break when rspec changes its internals, but for the moment it's not a problem. (ab) -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 From john at oxyliquit.de Sun Jun 17 11:54:45 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 17 Jun 2007 18:54:45 +0300 Subject: [Nitro] Og spec status: Message-ID: Hi, status: These failed: model/optimistic_locking, model/timestamped, polymorphic, multiple, model/orderable, multi_validations, has_one_create_on_insert, validation, model/taggable, reldelete, reverse, cacheable All other specs run just fine. George, your turn, I've done a share, I wanna see some action. :P Pull from here: it contains mine and Arne's changes. http://oxywtf.de/~john/darcs_repos/glycerin Arne's changes are also available from: http://darcs.arnebrasseur.net/glycerin Please run your tests in MySQL (or sqlite), any failing specs which are not in the list above are adapter specific. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Sun Jun 17 11:56:03 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 17 Jun 2007 18:56:03 +0300 Subject: [Nitro] Og spec status: In-Reply-To: References: Message-ID: Hi (George), from IRC to keep you up to date: [18:43] when all tests are converted we should do code coverage testing [18:43] IMHO, of course [18:46] code coverage? we could run that, but that won't go into 0.50 :P [18:47] how do you mean? [18:47] well, I just want to push that release as soon as possible, even when not every spot is tested :) [18:48] I agree we need to push it ASAP, but I'm sure there are still plenty of minor bugs in there, not nice for a major-number release [18:49] mh, yes.. [18:50] I'd rather push a release candidate and encourage people to give it a try [18:50] create some anticipation :) [18:51] yes, that is a good idea :) [18:51] let's make it 0.49 then :) [18:51] or 0.50rc1 [18:51] but 0.49 is also fine Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From arne at arnebrasseur.net Sun Jun 17 12:03:12 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sun, 17 Jun 2007 18:03:12 +0200 Subject: [Nitro] Og spec status: In-Reply-To: References: Message-ID: <46755B40.4090008@arnebrasseur.net> All existing nitro specs pass with the exception of the aspects dyna-wrap thing. I tried to understand what's supposed to happen but I think George better look at it. All existing raw tests pass. Next up : the tc_ tests... (ab) Jonathan Buch schreef: > Hi, > > status: > > These failed: model/optimistic_locking, model/timestamped, polymorphic, multiple, model/orderable, multi_validations, has_one_create_on_insert, validation, model/taggable, reldelete, reverse, cacheable > > All other specs run just fine. > > George, your turn, I've done a share, I wanna see some action. :P > > Pull from here: it contains mine and Arne's changes. > > http://oxywtf.de/~john/darcs_repos/glycerin > > Arne's changes are also available from: > > http://darcs.arnebrasseur.net/glycerin > > Please run your tests in MySQL (or sqlite), any failing specs which are > not in the list above are adapter specific. > > Jo > > -- Arne Brasseur @ your service http://www.arnebrasseur.net http://www.mandarijns.net arne at arnebrasseur.net +32/496/94.55.63 From george.moschovitis at gmail.com Sun Jun 17 17:53:19 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jun 2007 00:53:19 +0300 Subject: [Nitro] Og spec status: In-Reply-To: References: Message-ID: Will a simple: darcs pull work? Is it possible to create a patch against my repo? -g. On 6/17/07, Jonathan Buch wrote: > > Hi, > > status: > > These failed: model/optimistic_locking, model/timestamped, polymorphic, > multiple, model/orderable, multi_validations, has_one_create_on_insert, > validation, model/taggable, reldelete, reverse, cacheable > > All other specs run just fine. > > George, your turn, I've done a share, I wanna see some action. :P > > Pull from here: it contains mine and Arne's changes. > > http://oxywtf.de/~john/darcs_repos/glycerin > > Arne's changes are also available from: > > http://darcs.arnebrasseur.net/glycerin > > Please run your tests in MySQL (or sqlite), any failing specs which are > not in the list above are adapter specific. > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070618/ce2ac41b/attachment.html From john at oxyliquit.de Mon Jun 18 00:58:25 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 18 Jun 2007 07:58:25 +0300 Subject: [Nitro] Og spec status: In-Reply-To: References: Message-ID: Hi, > Is it possible to create a patch against my repo? Just pull from my repo: darcs pull http://oxywtf.de/~john/darcs_repos/glycerin Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Mon Jun 18 03:25:35 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jun 2007 10:25:35 +0300 Subject: [Nitro] Og spec status: In-Reply-To: References: Message-ID: ok. -g. On 6/18/07, Jonathan Buch wrote: > > Hi, > > > Is it possible to create a patch against my repo? > > Just pull from my repo: > > darcs pull http://oxywtf.de/~john/darcs_repos/glycerin > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070618/ab5fda47/attachment.html From george.moschovitis at gmail.com Mon Jun 18 11:07:05 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jun 2007 18:07:05 +0300 Subject: [Nitro] Og spec status: In-Reply-To: References: Message-ID: I had some problems, but I think I resolved them. I would suggest that you pull my repo again before doing further changes. I don't want to see repo corruption again. I will recode the blog example now. -g. On 6/18/07, George Moschovitis wrote: > > ok. > > -g. > > On 6/18/07, Jonathan Buch wrote: > > > > Hi, > > > > > Is it possible to create a patch against my repo? > > > > Just pull from my repo: > > > > darcs pull http://oxywtf.de/~john/darcs_repos/glycerin > > > > Jo > > > > -- > > Feel the love > > http://pinkjuice.com/pics/ruby.png > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > -- > http://phidz.com > http://blog.gmosx.com > http://cull.gr > http://www.joy.gr > http://nitroproject.org > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070618/61eff42c/attachment.html From john at oxyliquit.de Mon Jun 18 15:28:47 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 18 Jun 2007 22:28:47 +0300 Subject: [Nitro] Og spec status: In-Reply-To: References: Message-ID: Hi, > I had some problems, but I think I resolved them. I would suggest that > you pull my repo again before doing further changes. I don't want to > see repo corruption again. always. :P > I will recode the blog example now. Please also think of Og, there's some problems which need attention as well from someone better than me.... `rake test:og` to see what I mean. Anyway, glad to see things are rolling. :) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Mon Jun 18 15:46:04 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 18 Jun 2007 22:46:04 +0300 Subject: [Nitro] Og spec status: In-Reply-To: References: Message-ID: > > Please also think of Og, there's some problems which need attention as > well from someone better than me.... `rake test:og` to see what I mean. > > Anyway, glad to see things are rolling. :) > I will *try*. There are a lot of things that I must take care of this moment in my life. Let me finish with the blog example. One thing at a time. -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070618/b6511357/attachment-0001.html From arne at arnebrasseur.net Mon Jun 18 17:02:11 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 18 Jun 2007 23:02:11 +0200 Subject: [Nitro] Og spec status: In-Reply-To: References: Message-ID: <4676F2D3.4010306@arnebrasseur.net> George Moschovitis schreef: > I will *try*. There are a lot of things that I must take care of this > moment in my life. Let me finish with the blog example. One thing at a > time. > > -g. Absolutely. Although we all would like the next release to be finished, the truth is it will be done when it's done. It seems I've stirred things up a bit, which made things move after falling silent a bit, and that's good. But this stuff develops at the pace that it does. If people want it faster they can either start coding themselves (or help out in other ways) or just have patience. I started converting the tests to specs, but that probably won't be done in a week, since I do it after hours and I don't want to be behind the screen 24/7 also. The good news is I plan to stick around for a while, I'm liking it here. So if you're busy or it's just not a good time, just say so (as you did) so we know what to expect. Anyway, great to see you're finishing the blog example. (ab) -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 From george.moschovitis at gmail.com Mon Jun 18 17:55:27 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 19 Jun 2007 00:55:27 +0300 Subject: [Nitro] Og spec status: In-Reply-To: <4676F2D3.4010306@arnebrasseur.net> References: <4676F2D3.4010306@arnebrasseur.net> Message-ID: > > So if you're busy or it's just not a good time, just say so (as you did) > so we know what to expect. > Anyway, great to see you're finishing the blog example. > Thanks for understanding :) -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070619/92ca2448/attachment.html From john at oxyliquit.de Tue Jun 19 01:14:12 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 19 Jun 2007 08:14:12 +0300 Subject: [Nitro] Og spec status: In-Reply-To: References: <4676F2D3.4010306@arnebrasseur.net> Message-ID: Hi, >>> I will *try*. There are a lot of things that I must take care of this >>> moment in my life. Let me finish with the blog example. One thing at a >>> time. of course. :) >> So if you're busy or it's just not a good time, just say so (as you did) >> so we know what to expect. >> Anyway, great to see you're finishing the blog example. >> > > Thanks for understanding :) Won't stop me from trying though. ;) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Wed Jun 20 03:41:13 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 20 Jun 2007 10:41:13 +0300 Subject: [Nitro] blog example Message-ID: Dear devs, I just pushed the updated examples dir. Have a look at the blog example. I plan to work a bit more on this, but it already demonstrates some nice nitro/og practices. If you have any questions or suggestions regarding this example, please let me know. The next thing I plan to work on over the following days is the RELEASES doc file where I will document the extensive changes of 0.50. I will also try to have a look at the specs and help where I can. regards, George. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070620/9b7bfa40/attachment.html From arne at arnebrasseur.net Wed Jun 20 07:46:58 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Wed, 20 Jun 2007 04:46:58 -0700 (PDT) Subject: [Nitro] blog example In-Reply-To: References: Message-ID: <40788.217.136.252.52.1182340018.squirrel@webmail.arnebrasseur.net> > Dear devs, > > I just pushed the updated examples dir. Have a look at the blog example. Very nice, will have a look. > have a look at the specs and help where I can. I've pushed a cgi spec based on tc_cgi to http://darcs.arnebrasseur.net/glycerin. It contains 19 specs of which 6 fail atm. I'm working on the cookie spec. (ab) From george.moschovitis at gmail.com Wed Jun 20 08:51:33 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 20 Jun 2007 15:51:33 +0300 Subject: [Nitro] blog example In-Reply-To: <40788.217.136.252.52.1182340018.squirrel@webmail.arnebrasseur.net> References: <40788.217.136.252.52.1182340018.squirrel@webmail.arnebrasseur.net> Message-ID: can you please send me a patch against my repo? I am worried that pulling from different repositories will corrup the main repository (something like this happened before) -g. On 6/20/07, arne at arnebrasseur.net wrote: > > > Dear devs, > > > > I just pushed the updated examples dir. Have a look at the blog example. > > Very nice, will have a look. > > > have a look at the specs and help where I can. > > I've pushed a cgi spec based on tc_cgi to > http://darcs.arnebrasseur.net/glycerin. It contains 19 specs of which 6 > fail atm. > > I'm working on the cookie spec. > > (ab) > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070620/7f67c031/attachment.html From john at oxyliquit.de Wed Jun 20 08:55:54 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 20 Jun 2007 15:55:54 +0300 Subject: [Nitro] blog example In-Reply-To: References: <40788.217.136.252.52.1182340018.squirrel@webmail.arnebrasseur.net> Message-ID: Hi, > can you please send me a patch against my repo? > > I am worried that pulling from different repositories will corrup the > main repository (something like this happened before) pulling doesn't hurt your repo, it's the same as if you `apply` patches. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Wed Jun 20 16:02:57 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 20 Jun 2007 23:02:57 +0300 Subject: [Nitro] blog example In-Reply-To: References: Message-ID: Hi, as requested I had a look at your patches (also reviewed arne's). Regarding cgi spec: Wed Jun 20 22:56:01 EEST 2007 Jonathan Buch * Fix cgi spec + fix cgi This also enables name[foo] style get/post parameters again. George, I know this will break some stuff from you, but removing support for that will break some existing apps of other people. Regarding George's patches: skimming over them, they look good, I couldn't spot any problems. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Wed Jun 20 16:28:43 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 20 Jun 2007 23:28:43 +0300 Subject: [Nitro] blog example In-Reply-To: References: Message-ID: Hi, Arne: Wed Jun 20 23:25:59 EEST 2007 Jonathan Buch * Fix rest of Raw specs, all specs green So, meaning: don't worry about reds, I'll handle those so you can concentrate on converting instead of handling those nitty details of the implementation. :) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Wed Jun 20 16:44:46 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 20 Jun 2007 23:44:46 +0300 Subject: [Nitro] blog example In-Reply-To: References: Message-ID: Hi, George: Wed Jun 20 23:42:58 EEST 2007 Jonathan Buch * Make nitro aspects spec pass, George please recheck I made it 'pass', by modeling the spec like the internals, is that intended to be that way? Please review (it's small). Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Wed Jun 20 18:12:59 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 21 Jun 2007 01:12:59 +0300 Subject: [Nitro] blog example In-Reply-To: References: Message-ID: I will allocate some time to check and review the specs tomorrow. -g. On 6/20/07, Jonathan Buch wrote: > > Hi, > > George: > > Wed Jun 20 23:42:58 EEST 2007 Jonathan Buch > * Make nitro aspects spec pass, George please recheck > > I made it 'pass', by modeling the spec like the internals, is that > intended to be that way? Please review (it's small). > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070621/ce89f069/attachment-0001.html From james.britt at gmail.com Wed Jun 20 19:50:22 2007 From: james.britt at gmail.com (James Britt) Date: Wed, 20 Jun 2007 16:50:22 -0700 Subject: [Nitro] Maybe I'm cranky ... (Re: blog example) In-Reply-To: References: Message-ID: <4679BD3E.9030803@gmail.com> George Moschovitis wrote: > Dear devs, > > I just pushed the updated examples dir. Have a look at the blog example. I > plan to work a bit more on this, but it already demonstrates some nice > nitro/og practices. If you have any questions or suggestions regarding this > example, please let me know. I pulled the darcs repo and went to try out the blog example. I depends on assorted 3rd-party libs that are not part of the darcs tree. Since I wanted to run the example against the repo, and not my Nitro gem installation, I skipped calling 'rubygems'. However, that means none of the assorted dependencies get loaded. My workaround is to explicitly unshift the various gems lib paths into the load path so that the needed files get found. I'm wondering, though, if it would make sense to just bundle these dependencies (xmlsimple, RedCloth, facets ) in a subdir of the examples, and have the example code load them from there. This means more stuff to download when doing the initial darcs pull, but it might be worth it if it makes running the examples easier for lazy bastards like myself. It also ensures the right versions are used, and that any errors or quirks are due to the darcs code, not external libs. -- James Britt "Design depends largely on constraints." - Charles Eames From reid.thompson at ateb.com Wed Jun 20 19:34:24 2007 From: reid.thompson at ateb.com (Reid Thompson) Date: Wed, 20 Jun 2007 19:34:24 -0400 Subject: [Nitro] Maybe I'm cranky ... (Re: blog example) In-Reply-To: <4679BD3E.9030803@gmail.com> References: <4679BD3E.9030803@gmail.com> Message-ID: <4679B980.2000001@ateb.com> James Britt wrote: > George Moschovitis wrote: > >> Dear devs, >> >> I just pushed the updated examples dir. Have a look at the blog example. I >> plan to work a bit more on this, but it already demonstrates some nice >> nitro/og practices. If you have any questions or suggestions regarding this >> example, please let me know. >> > > I pulled the darcs repo and went to try out the blog example. > > I depends on assorted 3rd-party libs that are not part of the darcs tree. > > Since I wanted to run the example against the repo, and not my Nitro gem > installation, I skipped calling 'rubygems'. However, that means none of > the assorted dependencies get loaded. > > My workaround is to explicitly unshift the various gems lib paths into > the load path so that the needed files get found. > > I'm wondering, though, if it would make sense to just bundle these > dependencies (xmlsimple, RedCloth, facets ) in a subdir of the examples, > and have the example code load them from there. > > This means more stuff to download when doing the initial darcs pull, but > it might be worth it if it makes running the examples easier for lazy > bastards like myself. It also ensures the right versions are used, and > that any errors or quirks are due to the darcs code, not external libs. > > > > I second this. I was in the process of writing up an email describing the initial failures that I ran into re getting the blog example running. A repo/*/example/blog/README noting the 'extra' files that would 'normally' be expected to part of the production environment's runtime but that were included for 'conveniences' sake would be great too. From john at oxyliquit.de Thu Jun 21 01:13:27 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 21 Jun 2007 08:13:27 +0300 Subject: [Nitro] Maybe I'm cranky ... (Re: blog example) In-Reply-To: <4679BD3E.9030803@gmail.com> References: <4679BD3E.9030803@gmail.com> Message-ID: Hi, > Since I wanted to run the example against the repo, and not my Nitro gem > installation, I skipped calling 'rubygems'. However, that means none of > the assorted dependencies get loaded. here's how you do that: require "path/to/nitro/script/glycerin.rb" # this will set up nitro paths. require "rubygems" require "nitro" This will load nitro from the repo, and the rest from Rubygems. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From john at oxyliquit.de Thu Jun 21 01:15:01 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 21 Jun 2007 08:15:01 +0300 Subject: [Nitro] blog example In-Reply-To: References: Message-ID: Hi, > I will allocate some time to check and review the specs tomorrow. thanks! Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Thu Jun 21 01:52:14 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 21 Jun 2007 08:52:14 +0300 Subject: [Nitro] Maybe I'm cranky ... (Re: blog example) In-Reply-To: References: <4679BD3E.9030803@gmail.com> Message-ID: Can someone veryify that this works? If so, Jonathan can you adjust the blog example to make this work? thanks, -g. here's how you do that: > > require "path/to/nitro/script/glycerin.rb" # this will set up nitro paths. > require "rubygems" > require "nitro" > > This will load nitro from the repo, and the rest from Rubygems. > > > Jo > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070621/e2a8055b/attachment.html From john at oxyliquit.de Thu Jun 21 01:58:17 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 21 Jun 2007 08:58:17 +0300 Subject: [Nitro] Maybe I'm cranky ... (Re: blog example) In-Reply-To: References: <4679BD3E.9030803@gmail.com> Message-ID: Hi, > Can someone veryify that this works? > If so, Jonathan can you adjust the blog example to make this work? nope, not so interested in those examples, never where. A small thing to keep in mind though: if we do the glycerin.rb trick in the examples, they have to 'fall back' to the rubygems or each release you'd have to remove that require (for .gem releases) or they'll break. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From george.moschovitis at gmail.com Thu Jun 21 03:14:13 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 21 Jun 2007 10:14:13 +0300 Subject: [Nitro] blog example In-Reply-To: References: Message-ID: > > > This also enables name[foo] style get/post parameters again. George, > I know this will break some stuff from you, but removing support for > that will break some existing apps of other people. > I changed this. I only allow name[foo] strucutred params, not name.foo as this has problems with some libraries (for example the openid library) -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070621/d464dec7/attachment.html From george.moschovitis at gmail.com Thu Jun 21 03:14:32 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 21 Jun 2007 10:14:32 +0300 Subject: [Nitro] blog example In-Reply-To: References: Message-ID: > > I changed this. I only allow > > name[foo] > > strucutred params, not > > name.foo > > as this has problems with some libraries (for example the openid library) > > -g. all other patches applied. -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070621/22d3d417/attachment.html From john at oxyliquit.de Thu Jun 21 04:13:15 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 21 Jun 2007 11:13:15 +0300 Subject: [Nitro] blog example In-Reply-To: References: Message-ID: Hi, >> I changed this. I only allow >> >> name[foo] >> >> strucutred params, not >> as this has problems with some libraries (for example the openid >> library) > all other patches applied. ok, but if you do this, please always correct the specs. :) Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From arne at arnebrasseur.net Thu Jun 21 14:53:34 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Thu, 21 Jun 2007 20:53:34 +0200 Subject: [Nitro] script/ vs helper/ vs script/helper Message-ID: <467AC92E.2000302@arnebrasseur.net> Dear devs, It's been a bit busy over here but I see Jo and G have been doing nice stuff, way to go! I would like to propose some more source tree layout changes, let me elaborate: the script/ dir currently looks like this script/repl.rb script/glycerin.rb script/helper/spec.rb script/helper/layout.rb script/helper/wrap.rb script/repl.rb is meant to replace one token with another in one part of the source tree. This functionality is already in place in darcs itself (darcs replace). It also seems the better way to do it, since it better records the semantics of the operation in the darcs history. Are there specific reasons to use a home made script for this, or can we consider this redundant? Now for me a script is something that runs autonomous, where a helper is included elsewhere to help. If repl.rb would go, then there are only helpers left in the script/ dir. So I would like to propose to move helper/ to the top level : helper/glycerin.rb helper/spec.rb helper/layout.rb helper/wrap.rb Layout and wrap are used for the specs, and I can imagine other spec helpers appearing. So why not move layout and wrap to a spec subdir, helper/glycerin.rb helper/spec.rb helper/spec/layout.rb helper/spec/wrap.rb Additional rspec helper stuff could go in there, e.g. I wrote a custom Rspec::Matcher to be able to write day.should be_in(1..31) in stead of (1..31).should include day That would go in helper/spec/in.rb, and be included from helper/spec.rb. Nice and clean :) I can imagine people feeling strong about this so shoot! regards, (ab) who does some more test2spec in the meantime -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 From john at oxyliquit.de Thu Jun 21 15:09:37 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Thu, 21 Jun 2007 22:09:37 +0300 Subject: [Nitro] script/ vs helper/ vs script/helper In-Reply-To: <467AC92E.2000302@arnebrasseur.net> References: <467AC92E.2000302@arnebrasseur.net> Message-ID: Hi, > It's been a bit busy over here but I see Jo and G have been doing nice > stuff, way to go! > > I would like to propose some more source tree layout changes, let me > elaborate: I like your ideas, you have green light from me to do whatever structural enhancement in that area. > Additional rspec helper stuff could go in there, e.g. I wrote a custom > Rspec::Matcher Speaking of custom RSpec stuff. I once made this _huge_ tc_params.rb, (which I hope you will convert ;) ), and used special assert_..() functions for that to minimize the work. Are such 'custom' things possible in RSpect too? > I can imagine people feeling strong about this so shoot! Not all too strong, as my sense for overall structure is sometimes a little 'skewed'. ;) But like I said, I like how you think. :) > who does some more test2spec in the meantime good! :P Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Fri Jun 22 05:50:48 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 22 Jun 2007 12:50:48 +0300 Subject: [Nitro] script/ vs helper/ vs script/helper In-Reply-To: <467AC92E.2000302@arnebrasseur.net> References: <467AC92E.2000302@arnebrasseur.net> Message-ID: > > specific reasons to use a home made script for this, or can we consider > this redundant? if you think that darcs replace does the same then lets get rid of this. helper/glycerin.rb > helper/spec.rb > helper/layout.rb > helper/wrap.rb > > Layout and wrap are used for the specs, and I can imagine other spec > helpers appearing. So why not move layout and wrap to a spec subdir, > > helper/glycerin.rb > helper/spec.rb > helper/spec/layout.rb > helper/spec/wrap.rb > > Additional rspec helper stuff could go in there, e.g. I wrote a custom > Rspec::Matcher to be able to write > day.should be_in(1..31) > in stead of > (1..31).should include day > > That would go in helper/spec/in.rb, and be included from helper/spec.rb. > Nice and clean :) i don't like the name helper... btw, will the script directory dissapear? -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070622/910003c2/attachment.html From arne at arnebrasseur.net Fri Jun 22 06:12:39 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Fri, 22 Jun 2007 03:12:39 -0700 (PDT) Subject: [Nitro] script/ vs helper/ vs script/helper In-Reply-To: References: <467AC92E.2000302@arnebrasseur.net> Message-ID: <2165.81.246.181.166.1182507159.squirrel@webmail.arnebrasseur.net> > > i don't like the name helper... btw, will the script directory dissapear? > That would depend, right now I don't see compelling reasons to keep a script dir, since all script functionality has moved to rake. But it's just a name, we could keep script/ and put what's now in script/helper into script/ or script/spec. I think you're to decide, I'm just proposing stuff based on my observations. I think it would be an improvement, but I can live with the current situation or a compromise. What is it exactly you dislike about 'helper'? it seems to be in common usage for this kind of stuff. (ab) From george.moschovitis at gmail.com Fri Jun 22 06:59:22 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 22 Jun 2007 13:59:22 +0300 Subject: [Nitro] script/ vs helper/ vs script/helper In-Reply-To: <2165.81.246.181.166.1182507159.squirrel@webmail.arnebrasseur.net> References: <467AC92E.2000302@arnebrasseur.net> <2165.81.246.181.166.1182507159.squirrel@webmail.arnebrasseur.net> Message-ID: > > just a name, we could keep script/ and put what's now in script/helper > into script/ or script/spec. > I like this, but not 100%. Lets keep helper for the moment. -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070622/3fcfcbdc/attachment.html From arne at arnebrasseur.net Fri Jun 22 07:07:22 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Fri, 22 Jun 2007 04:07:22 -0700 (PDT) Subject: [Nitro] script/ vs helper/ vs script/helper In-Reply-To: References: <467AC92E.2000302@arnebrasseur.net> <2165.81.246.181.166.1182507159.squirrel@webmail.arnebrasseur.net> Message-ID: <2242.81.246.181.166.1182510442.squirrel@webmail.arnebrasseur.net> > I like this, but not 100%. Lets keep helper for the moment. We'll stick to the current layout then, with script/ and script/helper. Spec related helpers all go in script/helper (for now), we'll see how this evolves. I'll be back when I gather stronger arguments ;) (ab) From transfire at gmail.com Fri Jun 22 19:11:20 2007 From: transfire at gmail.com (Trans) Date: Fri, 22 Jun 2007 23:11:20 -0000 Subject: [Nitro] script/ vs helper/ vs script/helper In-Reply-To: <467AC92E.2000302@arnebrasseur.net> References: <467AC92E.2000302@arnebrasseur.net> Message-ID: <1182553880.630866.10390@z28g2000prd.googlegroups.com> On Jun 21, 2:53 pm, Arne Brasseur wrote: > Dear devs, > > It's been a bit busy over here but I see Jo and G have been doing nice > stuff, way to go! > > I would like to propose some more source tree layout changes, let me > elaborate: > > the script/ dir currently looks like this > > script/repl.rb > script/glycerin.rb > script/helper/spec.rb > script/helper/layout.rb > script/helper/wrap.rb Hmm... I would think script/lib would be a better name, since that's what they are --reusable libraries for build scripts. script/lib/spec.rb script/lib/layout.rb script/lib/wrap.rb [snip] > Layout and wrap are used for the specs, and I can imagine other spec > helpers appearing. So why not move layout and wrap to a spec subdir, > > helper/glycerin.rb > helper/spec.rb > helper/spec/layout.rb > helper/spec/wrap.rb Nothing wrong with script/lib/spec/layout.rb script/lib/spec/wrap.rb if you really feel it necessary to have another striation. But I wouldn't bother unless you have 3 or 4+ spec helpers. my 2c. T. From george.moschovitis at gmail.com Sat Jun 23 02:44:23 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 23 Jun 2007 09:44:23 +0300 Subject: [Nitro] script/ vs helper/ vs script/helper In-Reply-To: <1182553880.630866.10390@z28g2000prd.googlegroups.com> References: <467AC92E.2000302@arnebrasseur.net> <1182553880.630866.10390@z28g2000prd.googlegroups.com> Message-ID: arne, I like Tom's proposal! script/lib sounds great to me. What do you think? -g. On 6/23/07, Trans wrote: > > > > On Jun 21, 2:53 pm, Arne Brasseur wrote: > > Dear devs, > > > > It's been a bit busy over here but I see Jo and G have been doing nice > > stuff, way to go! > > > > I would like to propose some more source tree layout changes, let me > > elaborate: > > > > the script/ dir currently looks like this > > > > script/repl.rb > > script/glycerin.rb > > script/helper/spec.rb > > script/helper/layout.rb > > script/helper/wrap.rb > > Hmm... I would think script/lib would be a better name, since that's > what they are --reusable libraries for build scripts. > > script/lib/spec.rb > script/lib/layout.rb > script/lib/wrap.rb > > [snip] > > Layout and wrap are used for the specs, and I can imagine other spec > > helpers appearing. So why not move layout and wrap to a spec subdir, > > > > helper/glycerin.rb > > helper/spec.rb > > helper/spec/layout.rb > > helper/spec/wrap.rb > > Nothing wrong with > > script/lib/spec/layout.rb > script/lib/spec/wrap.rb > > if you really feel it necessary to have another striation. But I > wouldn't bother unless you have 3 or 4+ spec helpers. > > my 2c. > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070623/6b334176/attachment.html From john at oxyliquit.de Sat Jun 23 03:37:31 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 23 Jun 2007 10:37:31 +0300 Subject: [Nitro] script/ vs helper/ vs script/helper In-Reply-To: References: <467AC92E.2000302@arnebrasseur.net> <1182553880.630866.10390@z28g2000prd.googlegroups.com> Message-ID: Hi, > arne, I like Tom's proposal! script/lib sounds great to me. What do you > think? script -> lib it's shorter... "helpers for building/testing", "libaries for building/ testing". The former sounds more true to me, as those aren't really libs, they're just little thingies. So, I disagree, but don't really care about that, do whatever you want there. :P Jo PS: George, you fixed the CGI, but not the specs, so here's cleanup: Sat Jun 23 10:10:53 EEST 2007 Jonathan Buch * Bring specs up to date with cgi.rb changes Sat Jun 23 10:03:06 EEST 2007 Jonathan Buch * Fill uuid_polymorphic with a non-implemented spec Please pull those two (should be the only new ones). -- Feel the love http://pinkjuice.com/pics/ruby.png From arne at arnebrasseur.net Sat Jun 23 05:05:37 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sat, 23 Jun 2007 11:05:37 +0200 Subject: [Nitro] script/ vs helper/ vs script/helper In-Reply-To: References: <467AC92E.2000302@arnebrasseur.net> <1182553880.630866.10390@z28g2000prd.googlegroups.com> Message-ID: <467CE261.9010009@arnebrasseur.net> George Moschovitis schreef: > arne, I like Tom's proposal! script/lib sounds great to me. What do > you think? > > -g. Sounds good, only that script/ won't contain much, if anything. > > > script/lib/spec/layout.rb > script/lib/spec/wrap.rb > > if you really feel it necessary to have another striation. But I > wouldn't bother unless you have 3 or 4+ spec helpers. > Well currently we have 2, I wrote one for the cookie spec which I'm waiting to send until this is resolved, and Jo mentioned some custom asserts that should be converted to spec helpers soon, so that makes 4. I like lib/ in that it makes clear these are no stand-alone scripts. I don't like that it adds another directory, I like to keep things as simple as practical. The main 'problem' I think is that we share testing infrastructure over 4 in theory separate projects (Nitro, Raw, Og, Glue). Normally the most logical thing is to put these spec helpers somewhere under spec. But since these 4 projects are maintained under one tree, it makes sense not to duplicate this, so it has to go somewhere under the top level directory. Still I think it's a good compromise, standalone scripts go under script, general infrastructural helpers go under script/lib, and once script/lib gets crowded we start moving stuff to script/lib/something. I will create patches for this. I will keep the replace script for the moment, until I have more confidence that darcs can be used equally well in all situations. I noticed some difficulty in using darcs replace with a custom regexp for denoting tokens. (ab) -- Arne Brasseur @ your service http://www.arnebrasseur.net arne at arnebrasseur.net +32/496/94.55.63 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070623/b8e276d3/attachment-0001.html From arne at arnebrasseur.net Sat Jun 23 06:23:19 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sat, 23 Jun 2007 12:23:19 +0200 Subject: [Nitro] [PATCH] Re: script/ vs helper/ vs script/helper In-Reply-To: <467CE261.9010009@arnebrasseur.net> References: <467AC92E.2000302@arnebrasseur.net> <1182553880.630866.10390@z28g2000prd.googlegroups.com> <467CE261.9010009@arnebrasseur.net> Message-ID: <467CF497.2030803@arnebrasseur.net> Sat Jun 23 12:07:27 CEST 2007 Arne Brasseur * Put helpers in script/lib Sat Jun 23 12:09:13 CEST 2007 Arne Brasseur * Converted from test to spec, adapted to new script/lib/spec location cookie; controller; context converted Sat Jun 23 12:16:51 CEST 2007 Arne Brasseur * Updated aspects spec to new lib/spec location -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ab_20070623.patch Url: http://rubyforge.org/pipermail/nitro-general/attachments/20070623/21aa2bb7/attachment-0001.pl From john at oxyliquit.de Sat Jun 23 08:42:03 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 23 Jun 2007 15:42:03 +0300 Subject: [Nitro] Current test status Message-ID: Hi, Nitro: Running aspects... [ 5 specs - all passed ] 5 examples, 0 failures Raw: Running cgi... [ 13 specs - all passed ] Running cgi/cookie... [ 3 specs - all passed ] Running context... [ 1 specs - all passed ] Running controller... [ 3 specs - all passed ] Running controller/caching... [ 2 specs - all passed ] Running controller/call... [ 2 specs - all passed ] Running controller/publishable... [ 1 specs - all passed ] Running dispatcher/router... [ 1 specs - all passed ] Running helper/string/random... [ 2 specs - all passed ] Running util/attr... [ 1 specs - all passed ] Running util/encode_uri... [ 5 specs - all passed ] Running util/markup... [ 2 specs - all passed ] 36 examples, 0 failures Og: Running accumulator... [ 1 specs - all passed ] Running adapter_quoted_column... [ 3 specs - all passed ] Running aggregations_calculations... [ 1 specs - all passed ] Running build... [ 1 specs - all passed ] Running cacheable... [ 8 specs - 4 failed ] Running camel_case_join... [ 1 specs - all passed ] Running custom_pk... [ 2 specs - all passed ] Running delete_all... [ 1 specs - all passed ] Running ez... [ 3 specs - all passed ] Running finder... [ 1 specs - all passed ] Running has_many... [ 6 specs - all passed ] Running has_one_create_on_insert... [ 2 specs - 1 failed ] Running inheritance... [ 2 specs - all passed ] Running join... [ 6 specs - all passed ] Running joins_many... [ 12 specs - all passed ] Running model... [ 1 specs - all passed ] Running model/hierarchical... [ 1 specs - all passed ] Running model/optimistic_locking... [ 2 specs - 1 failed ] Running model/orderable... [ 6 specs - 3 failed ] Running model/revisable... [ 1 specs - all passed ] Running model/taggable... [ 4 specs - 2 failed ] Running model/timestamped... [ 2 specs - 1 failed ] Running multi_validations... [ 2 specs - 1 failed ] Running multiple... [ 2 specs - 1 failed ] Running override... [ 2 specs - all passed ] Running polymorphic... [ 7 specs - 2 failed ] Running relation... [ 2 specs - all passed ] Running reldelete... [ 8 specs - 1 failed ] Running resolve... [ 1 specs - all passed ] Running reverse... [ 0 specs - 0 failed ] Running scoped... [ 1 specs - all passed ] Running select... [ 1 specs - all passed ] Running setup... [ 5 specs - all passed ] Running sti... [ 6 specs - all passed ] Running sti_reference... [ 3 specs - all passed ] Running store... [ 15 specs - all passed ] Running store2... [ 3 specs - all passed ] Running taggable... [ 2 specs - all passed ] Running types... [ 1 specs - all passed ] Running uuid... [ 1 specs - all passed ] Running uuid_polymorphic... [ 1 specs - all passed ] Running validation... [ 14 specs - 3 failed ] 144 examples, 20 failures lookin' good (do it yourself, the green-ness is teh awesome). :P Jo PS: Arne: Sat Jun 23 15:38:10 EEST 2007 Jonathan Buch * move glycerin.rb back to script/ or else it breaks whole Og testsuite Either pull this or fix all Og specs. :) -- Feel the love http://pinkjuice.com/pics/ruby.png From arne at arnebrasseur.net Sat Jun 23 10:29:25 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sat, 23 Jun 2007 16:29:25 +0200 Subject: [Nitro] Current test status In-Reply-To: References: Message-ID: <467D2E45.1070006@arnebrasseur.net> Jonathan Buch schreef: > Jo > PS: Arne: > > Sat Jun 23 15:38:10 EEST 2007 Jonathan Buch > * move glycerin.rb back to script/ or else it breaks whole Og testsuite > > Either pull this or fix all Og specs. :) > > I'd rather fix Og, it's a one-liner :) - require "#{File.dirname(__FILE__)}/../../script/glycerin" + require "#{File.dirname(__FILE__)}/../../script/lib/glycerin" and a tc to spec : raw/model/webfile It fails here on requiring rmagick, will look closer later. (ab) Sat Jun 23 13:57:19 CEST 2007 Arne Brasseur * Changed og/spec/helper to work with script/lib/ Sat Jun 23 14:41:19 CEST 2007 Arne Brasseur * Converted webfile test -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: og_fix.patch Url: http://rubyforge.org/pipermail/nitro-general/attachments/20070623/7d95dd2f/attachment-0001.pl From john at oxyliquit.de Sat Jun 23 11:17:43 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 23 Jun 2007 18:17:43 +0300 Subject: [Nitro] Current test status In-Reply-To: <467D2E45.1070006@arnebrasseur.net> References: <467D2E45.1070006@arnebrasseur.net> Message-ID: Hi, > I'd rather fix Og, it's a one-liner :) I'm ok with that, eradicated my patch (so, it's safe to pull from me :P). Regarding the Webfile spec: Sat Jun 23 18:13:11 EEST 2007 Jonathan Buch * Make webfile spec runnable, prepare for better tests I like the concept of 'unimplemented specs', now we'd need to show those (at the end perhaps..). Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From arne at arnebrasseur.net Sat Jun 23 11:32:03 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sat, 23 Jun 2007 17:32:03 +0200 Subject: [Nitro] Current test status In-Reply-To: References: <467D2E45.1070006@arnebrasseur.net> Message-ID: <467D3CF3.9030009@arnebrasseur.net> Jonathan Buch schreef: > I like the concept of 'unimplemented specs', now we'd need to show > those (at the end perhaps..). > > Jo > Something like this: describe "Some thing" do unfinished it "...." do ... end and then $ rake test:something Running test... [ unfinished ] ? (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From john at oxyliquit.de Sat Jun 23 11:59:12 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 23 Jun 2007 18:59:12 +0300 Subject: [Nitro] Current test status In-Reply-To: <467D3CF3.9030009@arnebrasseur.net> References: <467D2E45.1070006@arnebrasseur.net> <467D3CF3.9030009@arnebrasseur.net> Message-ID: Hi, >> I like the concept of 'unimplemented specs', now we'd need to show >> those (at the end perhaps..). No, like: describe "Some thing" do it "...." end $ rake test:something Running test... [ 13 specs, all passed ] 13 examples, 0 failures, 3 not implemented Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Sat Jun 23 12:17:35 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 23 Jun 2007 19:17:35 +0300 Subject: [Nitro] Current test status In-Reply-To: References: Message-ID: excellent progress... -g. On 6/23/07, Jonathan Buch wrote: > > Hi, > > Nitro: > > Running aspects... [ 5 specs - all passed ] > 5 examples, 0 failures > > > Raw: > > Running cgi... [ 13 specs - all passed ] > Running cgi/cookie... [ 3 specs - all passed ] > Running context... [ 1 specs - all passed ] > Running controller... [ 3 specs - all passed ] > Running controller/caching... [ 2 specs - all passed ] > Running controller/call... [ 2 specs - all passed ] > Running controller/publishable... [ 1 specs - all passed ] > Running dispatcher/router... [ 1 specs - all passed ] > Running helper/string/random... [ 2 specs - all passed ] > Running util/attr... [ 1 specs - all passed ] > Running util/encode_uri... [ 5 specs - all passed ] > Running util/markup... [ 2 specs - all passed ] > 36 examples, 0 failures > > > Og: > > Running accumulator... [ 1 specs - all passed ] > Running adapter_quoted_column... [ 3 specs - all passed ] > Running aggregations_calculations... [ 1 specs - all passed ] > Running build... [ 1 specs - all passed ] > Running cacheable... [ 8 specs - 4 failed ] > Running camel_case_join... [ 1 specs - all passed ] > Running custom_pk... [ 2 specs - all passed ] > Running delete_all... [ 1 specs - all passed ] > Running ez... [ 3 specs - all passed ] > Running finder... [ 1 specs - all passed ] > Running has_many... [ 6 specs - all passed ] > Running has_one_create_on_insert... [ 2 specs - 1 failed ] > Running inheritance... [ 2 specs - all passed ] > Running join... [ 6 specs - all passed ] > Running joins_many... [ 12 specs - all passed ] > Running model... [ 1 specs - all passed ] > Running model/hierarchical... [ 1 specs - all passed ] > Running model/optimistic_locking... [ 2 specs - 1 failed ] > Running model/orderable... [ 6 specs - 3 failed ] > Running model/revisable... [ 1 specs - all passed ] > Running model/taggable... [ 4 specs - 2 failed ] > Running model/timestamped... [ 2 specs - 1 failed ] > Running multi_validations... [ 2 specs - 1 failed ] > Running multiple... [ 2 specs - 1 failed ] > Running override... [ 2 specs - all passed ] > Running polymorphic... [ 7 specs - 2 failed ] > Running relation... [ 2 specs - all passed ] > Running reldelete... [ 8 specs - 1 failed ] > Running resolve... [ 1 specs - all passed ] > Running reverse... [ 0 specs - 0 failed ] > Running scoped... [ 1 specs - all passed ] > Running select... [ 1 specs - all passed ] > Running setup... [ 5 specs - all passed ] > Running sti... [ 6 specs - all passed ] > Running sti_reference... [ 3 specs - all passed ] > Running store... [ 15 specs - all passed ] > Running store2... [ 3 specs - all passed ] > Running taggable... [ 2 specs - all passed ] > Running types... [ 1 specs - all passed ] > Running uuid... [ 1 specs - all passed ] > Running uuid_polymorphic... [ 1 specs - all passed ] > Running validation... [ 14 specs - 3 failed ] > 144 examples, 20 failures > > lookin' good (do it yourself, the green-ness is teh awesome). :P > > Jo > PS: Arne: > > Sat Jun 23 15:38:10 EEST 2007 Jonathan Buch > * move glycerin.rb back to script/ or else it breaks whole Og testsuite > > Either pull this or fix all Og specs. :) > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070623/593879f8/attachment.html From james.britt at gmail.com Sat Jun 23 19:01:12 2007 From: james.britt at gmail.com (James Britt) Date: Sat, 23 Jun 2007 16:01:12 -0700 Subject: [Nitro] Maybe I'm cranky ... (Re: blog example) In-Reply-To: References: <4679BD3E.9030803@gmail.com> Message-ID: <467DA638.60504@gmail.com> Jonathan Buch wrote: > Hi, > >> Since I wanted to run the example against the repo, and not my Nitro gem >> installation, I skipped calling 'rubygems'. However, that means none of >> the assorted dependencies get loaded. > > here's how you do that: > > require "path/to/nitro/script/glycerin.rb" # this will set up nitro paths. > require "rubygems" > require "nitro" > > This will load nitro from the repo, and the rest from Rubygems. Thank you; that seems to work. I say "seems" because I get the same error running the blog example as I did with my own path and lib hacks. DEBUG: Compiling 'index' super-method ERROR: Error while handling '/' ERROR: undefined local variable or method `ogmanager' for Post:Class I changed the code to use sqlite3 instead of mysql; don't think that would cause this error though. -- James Britt "Every object obscures another object." - Luis Bunuel From james.britt at gmail.com Sat Jun 23 19:59:39 2007 From: james.britt at gmail.com (James Britt) Date: Sat, 23 Jun 2007 16:59:39 -0700 Subject: [Nitro] Bug in nitro's application.rb Message-ID: <467DB3EB.8070100@gmail.com> The blog example in the darcs repo is failing on me. I had to make assorted small changes in order to get it to load the right versions of files. The glycerin script hack only partly worked; there were complaints about a wrong version of facets getting loaded (which, I think, is a reason to include all the needed libs with the example and ensure that the exact files get loaded. Or else stop referring to an explicit version of facets in some of the code, when the code cannot guarantee the load order of gems in the numerous files referring to facets) Anyway, the real issue is that application.rb is checking to see if Og.manager is defined before using it. When I run the blog example, Og.manager is defined, but it's defined as nil, so the code fails when trying to enumerate the models. if defined? :Og and defined? Og.manager require "raw/model/enchant" for m in Og.manager.models m.send(:include, Enchant) end end So, "defined? Og.manager" is insufficient. -- James Britt From john at oxyliquit.de Sun Jun 24 02:59:45 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 24 Jun 2007 09:59:45 +0300 Subject: [Nitro] Bug in nitro's application.rb In-Reply-To: <467DB3EB.8070100@gmail.com> References: <467DB3EB.8070100@gmail.com> Message-ID: Hi, > The blog example in the darcs repo is failing on me. INFO: Starting Webrick adapter on 0.0.0.0:9000 INFO: Press Ctrl-C to shutdown; Run with --help for options. DEBUG: Compiling 'index' super-method DEBUG: SELECT * FROM ogpost ORDER BY create_time DESC DEBUG: Compiling 'index' view sub-method [format: html] DEBUG: Cannot respond to '/favicon.ico' using the 'ico' format representation. So, it seems to me that it'd kinda work, but I only get a WSOD (white screen of death, how a nitro newbie on irc called it once). George, could you have a look at this? If the rendering/ compiling is broken, it might've been due to my recent 'adventures' into the innards of Nitro (at the place we talked about on irc). > So, "defined? Og.manager" is insufficient. I made a patch (blind, because I can't seem to get it to run), it is available on: http://oxywtf.de/~john/darcs_repos/glycerin Relevant patches: Sun Jun 24 09:54:30 EEST 2007 Jonathan Buch * Fix glycerin.rb, remove gen from load path, add load path for part/admin Sun Jun 24 09:39:40 EEST 2007 Jonathan Buch * Og.manager must be non-nil in nitro/application.rb I hope that works, Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Sun Jun 24 05:22:04 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 24 Jun 2007 12:22:04 +0300 Subject: [Nitro] Bug in nitro's application.rb In-Reply-To: References: <467DB3EB.8070100@gmail.com> Message-ID: > > George, could you have a look at this? If the rendering/ > compiling is broken, it might've been due to my recent > 'adventures' into the innards of Nitro (at the place we > talked about on irc). > It works for me. But then again I am not using glycerin.rb. Perhaps there is a gem dependency missing and Nitro does not report this :( Let me investigate this a bit. -g. PS: thnx for the patches. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070624/0a89b8c8/attachment.html From john at oxyliquit.de Sun Jun 24 05:40:15 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sun, 24 Jun 2007 12:40:15 +0300 Subject: [Nitro] Bug in nitro's application.rb In-Reply-To: References: <467DB3EB.8070100@gmail.com> Message-ID: Hi, > It works for me. But then again I am not using glycerin.rb. Perhaps there is > a gem dependency missing and Nitro does not report this :( Let me > investigate this a bit. please uninstall all your nitro gems, that really helps. :P > PS: thnx for the patches. sure thing. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From james.britt at gmail.com Sun Jun 24 10:33:25 2007 From: james.britt at gmail.com (James Britt) Date: Sun, 24 Jun 2007 07:33:25 -0700 Subject: [Nitro] Bug in nitro's application.rb In-Reply-To: References: <467DB3EB.8070100@gmail.com> Message-ID: <467E80B5.50508@gmail.com> George Moschovitis wrote: > George, could you have a look at this? If the rendering/ > compiling is broken, it might've been due to my recent > 'adventures' into the innards of Nitro (at the place we > talked about on irc). > > > It works for me. But then again I am not using glycerin.rb. Perhaps > there is a gem dependency missing and Nitro does not report this :( Let > me investigate this a bit. I think that setup(app) (e.g. defined in conf/debug.rb) is not getting called, or not called when it should. With a bit of explicit loading debug.rb, and explicit invocation of setup(app), Og finds the models and prepares them (I was getting method missing errors on 'ogmanager' when trying to manipulate them). Also, I had to mod/add these lines in app.rb: require "nitro/part/admin" # was 'part/admin' require "nitro/mailer" # wasn't being loaded at all (I would have made patches, but I've been hacking about with semi-random code changes while waiting for the caffeine to kick in. The patches would have been evil.) James From george.moschovitis at gmail.com Sun Jun 24 13:07:50 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 24 Jun 2007 20:07:50 +0300 Subject: [Nitro] Bug in nitro's application.rb In-Reply-To: <467E80B5.50508@gmail.com> References: <467DB3EB.8070100@gmail.com> <467E80B5.50508@gmail.com> Message-ID: > > > require "nitro/part/admin" # was 'part/admin' > require "nitro/mailer" # wasn't being loaded at all > > Aaah, you are running on windows, so the link part/admin->nitro/part/admin does not work. Thanks for catching this! -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070624/c39cfffd/attachment.html From james.britt at gmail.com Sun Jun 24 15:24:31 2007 From: james.britt at gmail.com (James Britt) Date: Sun, 24 Jun 2007 12:24:31 -0700 Subject: [Nitro] Bug in nitro's application.rb In-Reply-To: References: <467DB3EB.8070100@gmail.com> <467E80B5.50508@gmail.com> Message-ID: <467EC4EF.9010903@gmail.com> George Moschovitis wrote: > > require "nitro/part/admin" # was 'part/admin' > require "nitro/mailer" # wasn't being loaded at all > > > Aaah, you are running on windows, ?? No. Ubuntu. The darcs tree has nitro/part/admin. Not part/admin. No links. > so the link > part/admin->nitro/part/admin does not work. Thanks for catching this! -- James Britt "Hackers will be expelled" - The Breakfast Club (1985) From george.moschovitis at gmail.com Sun Jun 24 18:13:12 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 25 Jun 2007 01:13:12 +0300 Subject: [Nitro] Bug in nitro's application.rb In-Reply-To: <467EC4EF.9010903@gmail.com> References: <467DB3EB.8070100@gmail.com> <467E80B5.50508@gmail.com> <467EC4EF.9010903@gmail.com> Message-ID: > > No. Ubuntu. The darcs tree has nitro/part/admin. Not part/admin. No > links. Ok I will fix this. -g. > so the link > > part/admin->nitro/part/admin does not work. Thanks for catching this! > > > > -- > James Britt > > "Hackers will be expelled" > - The Breakfast Club (1985) > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070625/41bc416c/attachment.html From james.britt at gmail.com Mon Jun 25 00:48:56 2007 From: james.britt at gmail.com (James Britt) Date: Sun, 24 Jun 2007 21:48:56 -0700 Subject: [Nitro] blog example - template rendering issues In-Reply-To: References: Message-ID: <467F4938.6020202@gmail.com> George Moschovitis wrote: > Dear devs, > > I just pushed the updated examples dir. Have a look at the blog example. > I plan to work a bit more on this, but it already demonstrates some nice > nitro/og practices. If you have any questions or suggestions regarding > this example, please let me know. > I've made suitable adjustments to get the correct libs loaded and the models Ogified. Now I can start the blog example, but it never renders any pages other than the admin sections. I tried to build a small app to see if I could figure out the template rendering, but never got any template to display. The only way I can get output using 0.50 is by calling 'print' in a controller method. -- James Britt "A language that doesn't affect the way you think about programming is not worth knowing." - A. Perlis From george.moschovitis at gmail.com Mon Jun 25 02:55:09 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 25 Jun 2007 09:55:09 +0300 Subject: [Nitro] blog example - template rendering issues In-Reply-To: <467F4938.6020202@gmail.com> References: <467F4938.6020202@gmail.com> Message-ID: > > rendering, but never got any template to display. > > The only way I can get output using 0.50 is by calling 'print' in a > controller method. > this is very strange indeed, it works for me. Has anyone on this list managed to run the blog example? -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070625/99b7f7b5/attachment.html From arne at arnebrasseur.net Mon Jun 25 14:30:47 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 25 Jun 2007 20:30:47 +0200 Subject: [Nitro] blog example - template rendering issues In-Reply-To: References: <467F4938.6020202@gmail.com> Message-ID: <468009D7.5010801@arnebrasseur.net> George Moschovitis schreef: > > rendering, but never got any template to display. > > The only way I can get output using 0.50 is by calling 'print' in a > controller method. > > > this is very strange indeed, it works for me. Has anyone on this list > managed to run the blog example? > > -g. > I have the same thing. I did this - set RUBYLIB to facets, raw, og, nitro, glue repo - changed part/admin to nitro/part/admin - changed the password setting for mysql (shouldn't this example use sqlite?) then started it with the nitro script. All I get is 'white screen of death'. (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070625/15dc93e2/attachment-0001.html From arne at arnebrasseur.net Mon Jun 25 14:43:25 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 25 Jun 2007 20:43:25 +0200 Subject: [Nitro] blog example - template rendering issues In-Reply-To: <468009D7.5010801@arnebrasseur.net> References: <467F4938.6020202@gmail.com> <468009D7.5010801@arnebrasseur.net> Message-ID: <46800CCD.10008@arnebrasseur.net> Arne Brasseur schreef: > > then started it with the nitro script. All I get is 'white screen of > death'. > > (ab) Actually I get an error, didn't see it first ERROR: Error while handling '/' ERROR: undefined local variable or method `ogmanager' for Post:Class /home/plexus/work/nitro/og/lib/og/model.rb:664:in `method_missing' /home/plexus/work/nitro/og/lib/og/model.rb:315:in `all' ./app/controller/post.rb:7:in `index' (eval):4:in `index' (eval):3:in `index' /home/plexus/work/nitro/raw/lib/raw/compiler.rb:65:in `index___super' /home/plexus/work/nitro/raw/lib/raw/controller/publishable.rb:36:in `method_missing' /home/plexus/work/nitro/raw/lib/raw/adapter.rb:69:in `handle_context' /home/plexus/work/nitro/raw/lib/raw/adapter/webrick.rb:134:in `do_GET' /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' /home/plexus/work/nitro/raw/lib/raw/adapter/webrick.rb:57:in `start' /home/plexus/work/nitro/nitro/lib/nitro/application.rb:131:in `start' app.rb:22 LOGGED FROM: /home/plexus/work/nitro/raw/lib/raw/adapter.rb:83:in `handle_context' (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070625/6ec90639/attachment.html From james.britt at gmail.com Mon Jun 25 15:00:06 2007 From: james.britt at gmail.com (James Britt) Date: Mon, 25 Jun 2007 12:00:06 -0700 Subject: [Nitro] blog example - template rendering issues In-Reply-To: <46800CCD.10008@arnebrasseur.net> References: <467F4938.6020202@gmail.com> <468009D7.5010801@arnebrasseur.net> <46800CCD.10008@arnebrasseur.net> Message-ID: <468010B6.3050305@gmail.com> Arne Brasseur wrote: > Arne Brasseur schreef: >> >> then started it with the nitro script. All I get is 'white screen of >> death'. >> >> (ab) > Actually I get an error, didn't see it first > > ERROR: Error while handling '/' > ERROR: undefined local variable or method `ogmanager' for Post:Class > /home/plexus/work/nitro/og/lib/og/model.rb:664:in `method_missing' > /home/plexus/work/nitro/og/lib/og/model.rb:315:in `all' Same error I initially had, until I explicitly called 'require "conf/debug"' after all the other 'require' calls in app.rb James From john at oxyliquit.de Mon Jun 25 15:15:29 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 25 Jun 2007 22:15:29 +0300 Subject: [Nitro] Blog post of the month! Message-ID: Hi, http://www.arnebrasseur.net/2007/06/25/nitro-update/en/ ain't it nice. :P Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From arne at arnebrasseur.net Mon Jun 25 15:18:09 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 25 Jun 2007 21:18:09 +0200 Subject: [Nitro] Blog post of the month! In-Reply-To: References: Message-ID: <468014F1.4070202@arnebrasseur.net> Jonathan Buch schreef: > Hi, > > http://www.arnebrasseur.net/2007/06/25/nitro-update/en/ > > ain't it nice. :P > > Jo > > This really isn't necessary :) (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From john at oxyliquit.de Mon Jun 25 15:18:21 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 25 Jun 2007 22:18:21 +0300 Subject: [Nitro] blog example - template rendering issues In-Reply-To: <46800CCD.10008@arnebrasseur.net> References: <467F4938.6020202@gmail.com> <468009D7.5010801@arnebrasseur.net> <46800CCD.10008@arnebrasseur.net> Message-ID: Hi, INFO: Starting Webrick adapter on 0.0.0.0:9000 INFO: Press Ctrl-C to shutdown; Run with --help for options. DEBUG: Compiling 'index' super-method DEBUG: SELECT * FROM ogpost ORDER BY create_time DESC DEBUG: Compiling 'index' view sub-method [format: html] DEBUG: Cannot respond to '/favicon.ico' using the 'ico' format representation. [22:13] DEBUG: Og manageable classes: [Category, Comment, Tag, Post] [22:13] anyway, that's what I'm getting, you should too [22:14] yeah now I get a whole bunch of debug output [22:14] and no errors , but still WSOD so, still WSOD, and there are no 'errors' (except that weird respond to). George, anything special you're doing? Are you using the `nitro` command, any special gems installed, are you using the same repo as we do, anything else you can think of which could be different? Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From arne at arnebrasseur.net Mon Jun 25 15:20:22 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 25 Jun 2007 21:20:22 +0200 Subject: [Nitro] blog example - template rendering issues In-Reply-To: <468010B6.3050305@gmail.com> References: <467F4938.6020202@gmail.com> <468009D7.5010801@arnebrasseur.net> <46800CCD.10008@arnebrasseur.net> <468010B6.3050305@gmail.com> Message-ID: <46801576.8030306@arnebrasseur.net> James Britt schreef: > Same error I initially had, until I explicitly called 'require > "conf/debug"' after all the other 'require' calls in app.rb > That didn't help for me, but adding that and calling setup_og explicitly did. Now I get no errors, only the whiteness. (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From john at oxyliquit.de Mon Jun 25 15:25:41 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Mon, 25 Jun 2007 22:25:41 +0300 Subject: [Nitro] Blog post of the month! In-Reply-To: <468014F1.4070202@arnebrasseur.net> References: <468014F1.4070202@arnebrasseur.net> Message-ID: Hi, >> http://www.arnebrasseur.net/2007/06/25/nitro-update/en/ >> >> ain't it nice. :P >> >> > This really isn't necessary :) George, can you add that to your nitro planet? And how about my idea of making it feed enabled. :) Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From arne at arnebrasseur.net Mon Jun 25 15:36:18 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 25 Jun 2007 21:36:18 +0200 Subject: [Nitro] Blog post of the month! In-Reply-To: References: <468014F1.4070202@arnebrasseur.net> Message-ID: <46801932.2050200@arnebrasseur.net> Jonathan Buch schreef: > Hi, > > >>> http://www.arnebrasseur.net/2007/06/25/nitro-update/en/ >>> >>> ain't it nice. :P >>> >>> >>> >> This really isn't necessary :) >> > > George, can you add that to your nitro planet? And how about > my idea of making it feed enabled. :) > > Jo > > George, as you asked these are the relevant feeds http://www.arnebrasseur.net/category/nitro/feed/en/ http://www.arnebrasseur.net/category/ruby/feed/en/ but if you could make phidz feed-enabled that would be greatly appreciated. I hold the view that a blog without a feed doesn't count as a blog, I believe the same should go for blog planets. thanks, (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070625/cbfba143/attachment.html From george.moschovitis at gmail.com Mon Jun 25 17:21:32 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 26 Jun 2007 00:21:32 +0300 Subject: [Nitro] Blog post of the month! In-Reply-To: References: <468014F1.4070202@arnebrasseur.net> Message-ID: > > > George, can you add that to your nitro planet? And how about > my idea of making it feed enabled. :) Just added this to the planet. -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070626/a9630820/attachment.html From george.moschovitis at gmail.com Mon Jun 25 17:23:04 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 26 Jun 2007 00:23:04 +0300 Subject: [Nitro] Blog post of the month! In-Reply-To: <46801932.2050200@arnebrasseur.net> References: <468014F1.4070202@arnebrasseur.net> <46801932.2050200@arnebrasseur.net> Message-ID: > > but if you could make phidz feed-enabled that would be greatly > appreciated. I hold the view that a blog without a feed doesn't count as a > blog, I believe the same should go for blog planets. > Ok. You post motivated me to work on Nitro tomorrow. We expect 46 degrees celsious tomorrow (!!!) I hope I will be able to actually work ;-) -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070626/b0e0c09d/attachment-0001.html From george.moschovitis at gmail.com Mon Jun 25 17:28:44 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 26 Jun 2007 00:28:44 +0300 Subject: [Nitro] blog example - template rendering issues In-Reply-To: References: <467F4938.6020202@gmail.com> <468009D7.5010801@arnebrasseur.net> <46800CCD.10008@arnebrasseur.net> Message-ID: > > so, still WSOD, and there are no 'errors' (except that weird respond to). > George, anything special you're doing? Are you using the `nitro` > command, any special gems installed, are you using the same repo as we > do, anything else you can think of which could be different? > i am using the standard nitro command. I even dropped the databased (it gets auto populated if it doesnt exist) and it works (well, you have to add some articles using the admin interface). I am using ubuntu. Here are some gems that I use: facets-1.8.54 RedCloth-3.0.4 mysql-2.7 ruby-openid-1.1.4 ruby-yadis-0 .3.4 mongrel-1.0.1 gem_plugin-0.2.2 hpricot-0.5 xml-simple-1.0.11 uuidtools-1.0. 0 do you have hpricor/xml-simple installed? -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070626/22547833/attachment.html From tjackiw at gmail.com Mon Jun 25 18:04:20 2007 From: tjackiw at gmail.com (Thiago Jackiw) Date: Mon, 25 Jun 2007 15:04:20 -0700 Subject: [Nitro] Plugins in Nitro Message-ID: <206d03720706251504y45f0c49aq5becbfb29477e2ab@mail.gmail.com> First of all, kudos to George and his contributors for creating such an amazing project. I have been with ruby on rails for almost 2 years now, have published a few plugins and deployed a few sites on my own. I've started playing with Nitro a few weeks ago and was impressed by its features and easiness of use. I'm the current developer of the acts_as_solr plugin for rails (http://acts-as-solr.railsfreaks.com) and was wondering if there's any interest in possibly having a nitro version of my plugin(s), even though I couldn't find plugin support for nitro yet. Cheers, -- Thiago Jackiw acts_as_solr => http://acts-as-solr.railsfreaks.com From john at oxyliquit.de Tue Jun 26 01:19:20 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 26 Jun 2007 08:19:20 +0300 Subject: [Nitro] blog example - template rendering issues In-Reply-To: References: <467F4938.6020202@gmail.com> <468009D7.5010801@arnebrasseur.net> <46800CCD.10008@arnebrasseur.net> Message-ID: Hi, > i am using the standard nitro command. I even dropped the databased (it gets > auto populated if it doesnt exist) and it works (well, you have to add some > articles using the admin interface). I am using ubuntu. ah hum... the admin interface gets shown, why doesn't the blog? O.o > do you have hpricor/xml-simple installed? I didn't have xml-simple installed, after installing it was the same though. .. Really not sure what's going on here... Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From george.moschovitis at gmail.com Tue Jun 26 03:14:40 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 26 Jun 2007 10:14:40 +0300 Subject: [Nitro] Plugins in Nitro In-Reply-To: <206d03720706251504y45f0c49aq5becbfb29477e2ab@mail.gmail.com> References: <206d03720706251504y45f0c49aq5becbfb29477e2ab@mail.gmail.com> Message-ID: Hello Thiago, thanks for your interest in Nitro. IMHO Nitro offers a much more elegant way for plugins. Instead of code like: class MyClass acts_as_hierarchical end you do class MyClass include Hierarchical # the ruby way end or class MyClass is Hierarchical # alias end Nitro tries to follow the standard way as much as possible. If you are ready with your extension (organized in the standard Nitro dir structure) just package it as a gem and distribute it. Presto, you got your plugin ;-) Bigger modules of functionality are called parts, have a look at the admin part. Btw, I would suggest that you have a look at the vastly updated repository 0.50.0 version. regards, George. On 6/26/07, Thiago Jackiw wrote: > > First of all, kudos to George and his contributors for creating such > an amazing project. > > I have been with ruby on rails for almost 2 years now, have published > a few plugins and deployed a few sites on my own. I've started playing > with Nitro a few weeks ago and was impressed by its features and > easiness of use. > > I'm the current developer of the acts_as_solr plugin for rails > (http://acts-as-solr.railsfreaks.com) and was wondering if there's any > interest in possibly having a nitro version of my plugin(s), even > though I couldn't find plugin support for nitro yet. > > Cheers, > > -- > Thiago Jackiw > acts_as_solr => http://acts-as-solr.railsfreaks.com > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070626/32ceb112/attachment.html From george.moschovitis at gmail.com Tue Jun 26 06:37:37 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 26 Jun 2007 13:37:37 +0300 Subject: [Nitro] Blog example problem Message-ID: Ok, I have found the problem. For this example to work you have to add the following link: template -> app/template in the example directory. Darcs is ignoring soft links. In any case, I will make nitro look in template and app/template (as it was supposed to do). please verify that you can now run the example. Please notice, you have to add a post through the admin interface. an updated version of the example will be available later today. -g. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070626/ee8557f2/attachment.html From george.moschovitis at gmail.com Tue Jun 26 07:24:23 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 26 Jun 2007 14:24:23 +0300 Subject: [Nitro] Updated blog example Message-ID: Dear devs, I think I have fixed the WSOD problem in the blog example. Please pull and verify. Moreover I improved the example, to demonstrate Nitro's new multiple (representation) format rendering. Have a look at the syndication/export to json options in the sidebar. don't forget to drop the blog database before running the new version. regards, George. -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070626/8c314dd8/attachment.html From Jimmy.Jazz at gmx.net Tue Jun 26 11:20:02 2007 From: Jimmy.Jazz at gmx.net (Jimmy Jazz) Date: Tue, 26 Jun 2007 17:20:02 +0200 Subject: [Nitro] Nitro: cannot control the current path of a controller when skins are called Message-ID: <46812EA2.8070108@gmx.net> Hello list, I'm new to nitro and ruby :) I'm trying to build a little site with nitro, but i'm unable to control the current path of a controller. There is something wrong when skins are called. The following example is certainly not the best way to use nitro, but it describes the issue pretty well. I don't use part because the skins and the models/controllers are too interdependent from each other. The idea was to group files by family and to avoid them to be all placed in src or in templates directory. More generic and sharable files will stay in /. Like an example, i will integrate a blog or whatever in a site. Also, the directories are organised like that, src/ for generic controllers, skin modules, etc. src/controllers/blog.rb src/models/blog.rb src/helpers/blog.rb src/skins/blog.rb templates/blog/ (blog.rb files are of course different) in run.rb i have declared, require 'src/controller' require 'src/controllers/blog' the blog controller src/controllers/blog.rb, contains, require 'src/models/blog #require 'src/skins/blog <---------- that's is what will blow the site ;) and run.rb, require 'src/controller' require 'src/controllers/blog' #require 'src/skins/blog <---------- the same appends if declared in run.rb :( Server.map = { '/' => SiteController, '/blog' => blogController, } As far as i understood, if a controller is relative to /path it will be the same for the models ( for example, def to_href "article/#@oid" end) it depends on. But that is not always true, for example, if i simply add "require 'src/skins/blog' in run.rb or in src/controllers/blog.rb, the relative pathname for blog.rb family are then mapped to / and not to the current directory /blog according to the "Server.map" mapping. Thanks for your help, Jj -- |\ _,,,---,,_ ZZZzz /,`.-'`' -. ;-;;,_ |,4- ) )-,_. ,\ ( `'-' '---''(_/--' `-'\_) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070626/f94961b0/attachment.html From john at oxyliquit.de Tue Jun 26 12:36:25 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 26 Jun 2007 19:36:25 +0300 Subject: [Nitro] Nitro: cannot control the current path of a controller when skins are called In-Reply-To: <46812EA2.8070108@gmx.net> References: <46812EA2.8070108@gmx.net> Message-ID: Hi, > I'm new to nitro and ruby :) just on short notice (I hope I read your post correct, I was slightly in a hurry): cwd = File.dirname(__FILE__) require "#{cwd}/deed/email" require "#{cwd}/deed/sms" This is what I do in 'subprojects'. It doesn't look that nice, but it works for me and doesn't clutter the load path. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From james.britt at gmail.com Tue Jun 26 13:24:39 2007 From: james.britt at gmail.com (James Britt) Date: Tue, 26 Jun 2007 10:24:39 -0700 Subject: [Nitro] Updated blog example In-Reply-To: References: Message-ID: <46814BD7.2050607@gmail.com> George Moschovitis wrote: > Dear devs, > > I think I have fixed the WSOD problem in the blog example. Please pull and > verify. > What's the simplest way to re-fetch a clean copy of code from the repo? I've hacked around on the blog example, and would like to delete it and re-pull that code to start over with the current version. (I did this once before after Googling for some darcs help, and I can find that again, but I'm wondering if there is not some common idiom for this. I'm more accustomed to svn. :) ) > Moreover I improved the example, to demonstrate Nitro's new multiple > (representation) format rendering. Have a look at the syndication/export to > json options in the sidebar. Will do. I did re-try the example after adjusting the template location, and got further; the main page appeared. I think the new bad behavior I saw (the absence of any blog posts rendering; admin pages not offering to manage posts or comments) are because I dicked around with the code. Thanks, James From james.britt at gmail.com Tue Jun 26 13:46:22 2007 From: james.britt at gmail.com (James Britt) Date: Tue, 26 Jun 2007 10:46:22 -0700 Subject: [Nitro] Updated blog example In-Reply-To: References: Message-ID: <468150EE.1080704@gmail.com> George Moschovitis wrote: > Dear devs, > > I think I have fixed the WSOD problem in the blog example. Please pull and > verify. Here's what I tried: I deleted the files under examples/blog I did darcs revert, which seemed to pull down the fresh blog code I had to edit app.rb so that it would load glycerin.rb (I see this file is now in a slightly different location) I also added a call to require 'rubygems' right after that. I then executed 'nitro' from the command line. When I try to browse to the site, though, I'm getting: ERROR: Error while handling '/' ERROR: undefined local variable or method `ogmanager' for Post:Class It seems that no set-up code (in ether conf/debug.rb or conf/live.rb) gets executed. When I explicitly load debug.rb and invoke setup(app) in app.rb, I get an (expected) error: MySQL is not happy. If I change to using sqlite, I get further: mailer cannot be found. When I add this to app.rb require "nitro/mailer" I can then load the default page. There are no posts, though, and browsing to /admin or /admin/og does not give me anything useful. (Nor does it ask for any admin name & password; should it?) I also see this in the terminal: ERROR: undefined method `to_link' for # (eval):32:in `index___html___view' (eval):31:in `each' (eval):31:in `index___html___view' when I view the default blog page. Thanks, James From george.moschovitis at gmail.com Tue Jun 26 13:51:10 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 26 Jun 2007 20:51:10 +0300 Subject: [Nitro] Updated blog example In-Reply-To: <468150EE.1080704@gmail.com> References: <468150EE.1080704@gmail.com> Message-ID: Please, use darcs get http://repo.nitroproject.org on a fresh directory. I think you are using an old version. In any case, I will further investigate this. thanks for helping me with this one. -g. PS: if anyone else sucessfully manages to run the example, let me know. On 6/26/07, James Britt wrote: > > George Moschovitis wrote: > > Dear devs, > > > > I think I have fixed the WSOD problem in the blog example. Please pull > and > > verify. > > > Here's what I tried: > > > I deleted the files under examples/blog > > I did darcs revert, which seemed to pull down the fresh blog code > > I had to edit app.rb so that it would load glycerin.rb (I see this file > is now in a slightly different location) > > I also added a call to require 'rubygems' right after that. > > > I then executed 'nitro' from the command line. When I try to browse to > the site, though, I'm getting: > > > ERROR: Error while handling '/' > ERROR: undefined local variable or method `ogmanager' for Post:Class > > > It seems that no set-up code (in ether conf/debug.rb or conf/live.rb) > gets executed. When I explicitly load debug.rb and invoke setup(app) in > app.rb, I get an (expected) error: MySQL is not happy. > > If I change to using sqlite, I get further: mailer cannot be found. > > When I add this to app.rb > > require "nitro/mailer" > > I can then load the default page. > > > There are no posts, though, and browsing to /admin or /admin/og does not > give me anything useful. (Nor does it ask for any admin name & > password; should it?) > > > I also see this in the terminal: > > ERROR: undefined method `to_link' for # > (eval):32:in `index___html___view' > (eval):31:in `each' > (eval):31:in `index___html___view' > > when I view the default blog page. > > > Thanks, > > James > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070626/0c697578/attachment.html From john at oxyliquit.de Tue Jun 26 14:01:35 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 26 Jun 2007 21:01:35 +0300 Subject: [Nitro] Updated blog example In-Reply-To: <46814BD7.2050607@gmail.com> References: <46814BD7.2050607@gmail.com> Message-ID: Hi, > What's the simplest way to re-fetch a clean copy of code from the repo? simplest way (if you didn't `darcs record` anything): darcs revert You don't need to delete the files for that to work. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From arne at arnebrasseur.net Tue Jun 26 14:09:17 2007 From: arne at arnebrasseur.net (arne at arnebrasseur.net) Date: Tue, 26 Jun 2007 11:09:17 -0700 (PDT) Subject: [Nitro] Updated blog example In-Reply-To: References: <46814BD7.2050607@gmail.com> Message-ID: <49329.217.136.252.52.1182881357.squirrel@webmail.arnebrasseur.net> > Hi, > >> What's the simplest way to re-fetch a clean copy of code from the repo? > > simplest way (if you didn't `darcs record` anything): darcs revert > You don't need to delete the files for that to work. This will bring your repo back to the latest pulled/recorded version, of which a copy is kept in _darcs/pristine. Just to say : pull and revert or vice versa to get the latest version. (ab) From james.britt at gmail.com Tue Jun 26 14:10:31 2007 From: james.britt at gmail.com (James Britt) Date: Tue, 26 Jun 2007 11:10:31 -0700 Subject: [Nitro] Updated blog example In-Reply-To: References: <46814BD7.2050607@gmail.com> Message-ID: <46815697.7000002@gmail.com> Jonathan Buch wrote: > Hi, > >> What's the simplest way to re-fetch a clean copy of code from the repo? > > simplest way (if you didn't `darcs record` anything): darcs revert > You don't need to delete the files for that to work. Thanks. I did use revert, but after I rm'ed the files. James From arne at arnebrasseur.net Tue Jun 26 16:49:20 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Tue, 26 Jun 2007 22:49:20 +0200 Subject: [Nitro] Updated blog example In-Reply-To: References: Message-ID: <46817BD0.6010300@arnebrasseur.net> George Moschovitis schreef: > Dear devs, > > I think I have fixed the WSOD problem in the blog example. Please pull > and verify. I did this : did a fresh darcs get http://repo.nitroproject.org added require "../../script/lib/glycerin" to the beginning of app.rb in conf/debug.rb switched :mysql to :sqlite switched :mongrel to :webrick cd'ed to examples/blog and issued ruby ../../nitro/bin/nitro And lo and behold, it's working! Great job, George, very nice. I would like to suggest to make sqlite and webrick the defaults, it'll work much more often out of the box. One little thing : in the admin part after saving a post, I was greated with another white screen (although it looked a bit more lively somehow). Maybe a redirect after the save would be nice. besides that, absolutely great! (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From Jimmy.Jazz at gmx.net Tue Jun 26 17:02:41 2007 From: Jimmy.Jazz at gmx.net (Jimmy Jazz) Date: Tue, 26 Jun 2007 23:02:41 +0200 Subject: [Nitro] Nitro: cannot control the current path of a controller when skins are called In-Reply-To: References: <46812EA2.8070108@gmx.net> Message-ID: <46817EF1.3050207@gmx.net> Jonathan Buch a ?crit : > Hi, > >> I'm new to nitro and ruby :) > > just on short notice (I hope I read your post correct, I was slightly > in a hurry): > > cwd = File.dirname(__FILE__) > > require "#{cwd}/deed/email" > require "#{cwd}/deed/sms" > > This is what I do in 'subprojects'. It doesn't look that nice, but > it works for me and doesn't clutter the load path. > > Jo > Thanks for your fast reply, and sorry if i didn't make myself clear :) Actually nitro find all the files it needs but when you call a "skin" except for the 'src/skin', the program will stop to be consistent with Server.map For instance, if you have an object like: def to_href "category/#@oid" end in src/models/blog.rb and in the meantime have called (required) a skin in src/controllers/blog.rb or in run.rb, you will get a wrong path for to_href: http://yourserver:9000/category/1 Also, if you remove every lines "require 'somepathto/skin'" in 'src/controllers/blog.rb' and in run.rb (ex: require 'src/skins/blog" ) the "default" path for the controller will then be restored to the right value: http://yourserver:9000/blog/category/1 A simple call to a skin will modify the "home" directory of the controller and default it to '/' despite what is declared in Server.map. Jj -- |\ _,,,---,,_ ZZZzz /,`.-'`' -. ;-;;,_ |,4- ) )-,_. ,\ ( `'-' '---''(_/--' `-'\_) From arne at arnebrasseur.net Tue Jun 26 17:04:49 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Tue, 26 Jun 2007 23:04:49 +0200 Subject: [Nitro] Nitro: cannot control the current path of a controller when skins are called In-Reply-To: <46812EA2.8070108@gmx.net> References: <46812EA2.8070108@gmx.net> Message-ID: <46817F71.9080602@arnebrasseur.net> Jimmy Jazz schreef: > As far as i understood, if a controller is relative to /path it will > be the same for the models ( for example, def to_href "article/#@oid" > end) it depends on. But that is not always true, for example, if i > simply add "require 'src/skins/blog' in run.rb or in > src/controllers/blog.rb, the relative pathname for blog.rb family are > then mapped to / and not to the current directory /blog according to > the "Server.map" mapping. Jimmy, I'm not sure if I understand your difficulties. If I understand you correctly, you have a blog model and a related controller. You expect a blog model object's to_href method to return a link that is mapped to the blog controller, and it's not working. Is that where your problem is? Source tree layout can be pretty much any way you like in Nitro, that doesn't matter very much. On the other hand you didn't say much about how your classes are laid out. More information could be helpful. Welcome to Nitro! (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From george.moschovitis at gmail.com Tue Jun 26 17:15:34 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 27 Jun 2007 00:15:34 +0300 Subject: [Nitro] Updated blog example In-Reply-To: <46817BD0.6010300@arnebrasseur.net> References: <46817BD0.6010300@arnebrasseur.net> Message-ID: At last ;-) Thanks for the changes, I will include them in the next update. -g. On 6/26/07, Arne Brasseur wrote: > > George Moschovitis schreef: > > Dear devs, > > > > I think I have fixed the WSOD problem in the blog example. Please pull > > and verify. > I did this : > > did a fresh > darcs get http://repo.nitroproject.org > > added > require "../../script/lib/glycerin" > to the beginning of app.rb > > in conf/debug.rb > switched :mysql to :sqlite > switched :mongrel to :webrick > > cd'ed to examples/blog and issued > ruby ../../nitro/bin/nitro > > And lo and behold, it's working! > Great job, George, very nice. > > I would like to suggest to make sqlite and webrick the defaults, it'll > work much more often out of the box. > > One little thing : in the admin part after saving a post, I was greated > with another white screen (although it looked a bit more lively > somehow). Maybe a redirect after the save would be nice. > > besides that, absolutely great! > > (ab) > > -- > Arne Brasseur > http://www.arnebrasseur.net > arne at arnebrasseur.net > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://phidz.com http://blog.gmosx.com http://cull.gr http://www.joy.gr http://nitroproject.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070627/287770b8/attachment-0001.html From arne at arnebrasseur.net Tue Jun 26 17:26:55 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Tue, 26 Jun 2007 23:26:55 +0200 Subject: [Nitro] Updated blog example In-Reply-To: References: <46817BD0.6010300@arnebrasseur.net> Message-ID: <4681849F.3090201@arnebrasseur.net> > One little thing : in the admin part after saving a post, I was > greated > with another white screen (although it looked a bit more lively > somehow). Maybe a redirect after the save would be nice. > Less lively than I thought : This from simply creating a new post. ERROR: Error while handling '/admin/og/save' ERROR: undefined method `unsaved?' for nil:NilClass /home/plexus/tmp/repo.nitroproject.org/script/lib/../../og/lib/og/collection.rb:155:in `remove' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../og/lib/og/collection.rb:155:in `remove' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../og/lib/og/collection.rb:134:in `<<' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../raw/lib/raw/util/attr.rb:108:in `populate_object' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../raw/lib/raw/util/attr.rb:105:in `populate_object' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../raw/lib/raw/util/attr.rb:85:in `populate_object' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../og/lib/og/model.rb:152:in `assign' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../nitro/lib/nitro/part/admin/og/controller.rb:98:in `save' (eval):4:in `save' (eval):4:in `save' (eval):3:in `save' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../raw/lib/raw/compiler.rb:65:in `save___super' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../raw/lib/raw/controller/publishable.rb:36:in `method_missing' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../raw/lib/raw/adapter.rb:69:in `handle_context' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../raw/lib/raw/adapter/webrick.rb:134:in `do_POST' /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../raw/lib/raw/adapter/webrick.rb:57:in `start' /home/plexus/tmp/repo.nitroproject.org/script/lib/../../nitro/lib/nitro/application.rb:122:in `start' app.rb:24 LOGGED FROM: /home/plexus/tmp/repo.nitroproject.org/script/lib/../../raw/lib/raw/adapter.rb:83:in `handle_context' -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070626/a2afd92c/attachment.html From john at oxyliquit.de Wed Jun 27 03:20:43 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Wed, 27 Jun 2007 10:20:43 +0300 Subject: [Nitro] Nitro: cannot control the current path of a controller when skins are called In-Reply-To: <46817EF1.3050207@gmx.net> References: <46812EA2.8070108@gmx.net> <46817EF1.3050207@gmx.net> Message-ID: Hi, > Thanks for your fast reply, and sorry if i didn't make myself clear :) > > Actually nitro find all the files it needs but when you call a "skin" > except for the 'src/skin', the program will stop to be consistent with > Server.map Just to get the definitions right here, tell me if we have the same concept of Skins here. In Nitro, the word 'skin' is most often used for Elements. Elements are used in the templates (.htmlx) by writing when your Element class has been called `Page`. > For instance, if you have an object like: > class SomeOgModel > def to_href > "category/#@oid" > end end Not trying to nitpick here, but trying to get the definitions correct. `to_href` is a method, not really an object in this case, unless you mean the string inside, in which case 'string' would be the better term. (class added for my own clarification purposes) > in src/models/blog.rb and in the meantime have called (required) a skin > in src/controllers/blog.rb or in run.rb, you will get a wrong path > for to_href: http://yourserver:9000/category/1 > Also, if you remove every lines "require 'somepathto/skin'" in > 'src/controllers/blog.rb' and in run.rb (ex: require 'src/skins/blog" ) > > the "default" path for the controller will then be restored to the right > value: > > http://yourserver:9000/blog/category/1 > > A simple call to a skin will modify the "home" > directory of the controller and default it to '/' despite what is > declared in Server.map. I'm really not sure if I'm following here. I'll try to paraphrase to myself, and you tell me if I got closer this time. So, you have a few Controllers in src/controllers, a few Models in src/models and (I think) a few Elements in src/skins. So... require'ing an Element can not influence the path on which the Controller is mounted. Since you're using a (relative) to_href on your Models, I'm assuming you use those hrefs somewhere in your Elements. Are you saying, that inserting the relative URIs in inside the Elements are not relative, but always point to the root '/' at one point? How can not require'ing the Element (which would effectively remove all content from your page, since the content is rendered inside), make your paths be right? If require'ing Elements can destroy the original Server.map, that is a major problem. But I somehow think that is not the case, since Controllers really have nothing to do with Elements, only templates do. I really think this is just a problem with relative URLs, but please tell me if I'm wrong. > A simple call to a skin For clarification purposes again: How do you 'call' a Skin? By writing in your template? If it's ok, I could have a look at the source, just bundle it up and send to me. Because I'm not sure I can help you like this, my thinking might just be too different. Jo -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From Jimmy.Jazz at gmx.net Tue Jun 26 19:41:17 2007 From: Jimmy.Jazz at gmx.net (Jimmy Jazz) Date: Wed, 27 Jun 2007 01:41:17 +0200 Subject: [Nitro] Nitro: cannot control the current path of a controller when skins are called In-Reply-To: <46817F71.9080602@arnebrasseur.net> References: <46812EA2.8070108@gmx.net> <46817F71.9080602@arnebrasseur.net> Message-ID: <4681A41D.6010503@gmx.net> Arne Brasseur a ?crit : > If I understand you correctly, you have a blog model and a related > controller. You expect a blog model object's to_href method to return a > link that is mapped to the blog controller, and it's not working. Is > that where your problem is? Yes, that's it. The problem will be the same with templates associated with the blog controller. doesn't return http://yourserver:9000/blog/index.html as it should (/blog/ is lost). It returns http://yourserver:9000/index.html instead. > Source tree layout can be pretty much any way you like in Nitro, that > doesn't matter very much. On the other hand you didn't say much about > how your classes are laid out. More information could be helpful. Also, i didn't get too far. For the moment, i'm just concentrate to understand how skins are working with controllers. The most of the code i'm using as learning aid comes from Flare, Spark and other examples that i could gather from nitro sites. To simplify, i will just describe how i organised the blog page :) in run.rb i have declared, require 'src/controller' require 'src/controllers/blog' ... Server.map = { '/' => SiteController, '/blog' => BlogController, ... } A generic class Page < Nitro::Element that is shared between pages is defined in src/skin.rb. The other classes render a portion of a page. Example: class Page < Nitro::Element include GenericPage def header %~