From william.full.moon at gmail.com Sat Sep 1 02:32:56 2007 From: william.full.moon at gmail.com (* William) Date: Sat, 1 Sep 2007 16:32:56 +1000 Subject: [Nitro] check this [bitrock] out Message-ID: <9e03c3c60708312332p203933c0n2cb8133bee64d4f7@mail.gmail.com> Hey hey! I see the nice bitrock people have a Ruby stack for the web. It includes Rails. I believe it would be really really useful to put an effort into drawing a line under features for Nitro so that it is a viable candidate for a packaged stack. As a first step, what do you reckon by making a "Bitrock Nitro" add-on, that people can fit into a Bitrock stack for themselves? Some thoughts from a Saturday on the web. Aloha, Will. --------------------------------------------------------------------------------------- - http://bitrock.com/products_ruby_overview.html Integrated Open Source Ruby Distribution RubyStack is a freely available, ready to run distribution of Ruby on Rails?. Packaged with a very user-friendly installer, RubyStack makes it easy to have an enterprise-ready Rails environment up and running in just minutes. It allows you to take advantage of the stability, low cost and high performance of Ruby on Rails without the hassle of integrating, configuring, and supporting your own build. RubyStack is currently available for Linux and Mac OS X, with support for Windows and Solaris coming soon. As with all of our Web Stacks, RubyStack is free to downloadand use under the terms of the Apache 2.0 license. As the stack contains several open source tools and libraries, it is important that you read and comply with the licenses for each stack component. RubyStack offers two installation profiles to make it easy to set up Ruby in both development and production environments. Both profiles install the following open source software, along with several other tools and libraries . - Ruby - Subversion - SQLite - MySQL - ImageMagick - Several Ruby Gems, including: Rails, Mongrel, mongrel_cluster and RMagick The Production installation profile also installs Apache 2.2 with rewrite and proxy support, so you have everything you need to deploy your Ruby on Rails applications. You can learn more about the benefitsof using BitRock Web Stacks or go directly to the download page to get a copy. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070901/f938bcd4/attachment-0001.html From mvyver at gmail.com Sat Sep 1 02:33:17 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Sat, 1 Sep 2007 16:33:17 +1000 Subject: [Nitro] OG and DBI: Oxyliquit draft tip In-Reply-To: <389c43e40708310050o2adfb056s75ab532208934166@mail.gmail.com> References: <389c43e40708310050o2adfb056s75ab532208934166@mail.gmail.com> Message-ID: <389c43e40708312333x2d4a23bdvaf4064bcf2b18d60@mail.gmail.com> Correction: > #-- start-bash ---------------------------- > su > DBNAME=mysql > ODBCVER=0.9995 > DBIVER=0.1.1 > pushd /tmp > wget http://ch-werner.de/rubyodbc/ruby-odbc-${ODBCVER}.tar.gz > tar -xvf ruby-odbc-${ODBCVER}.tar.gz > pushd ruby-odbc-${ODBCVER} > ruby extconf.rb --enable-dlopen > make > make install > #Installation of utf8 version: > ruby -Cutf8 extconf.rb --enable-dlopen > make -C utf8 > make -C utf8 install > popd > - gem install ${DBNAME} sqlite + gem install ${DBDNAME} sqlite-ruby sqlite3-ruby > wget http://rubyforge.org/frs/download.php/12368/dbi-${DBIVER}.tar.gz > tar -xvf dbi-${DBIVER}.tar.gz > pushd ruby-dbi > ruby setup.rb config --with=dbi,dbd_sqlite,dbd_odbc,dbd_${DBNAME} > ruby setup.rb install > popd > popd > #-- end-bash ---------------------------- > From mvyver at gmail.com Sat Sep 1 02:48:16 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Sat, 1 Sep 2007 16:48:16 +1000 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) Message-ID: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> Hi, I think I found some unexpected behaviors from OG - the first can be a show stopper from some. This may be specific to the MySQL and sqlite adapters? The two ruby scripts show the behaviors described below. I use the MySQL and the Sqlite adapters, could any one confirm they see the same behavior described below with another adapter - just in case. **SHOW STOPPER** 1) The Og::SqlStore#exec_statement seems to rearrange the data submitted in an sql string, and example of the original SQL statement data and the SQL statement submitted to the MySQL store follows. insert into ogmember ( address1,city,email,first_name,state,last_name ) values ( '123 High St.','Reykjavik','fred at flintstone.com','Fred','Michigan','Flintstone' ) DEBUG: INSERT INTO `ogmember` (`address1`, `city`, `oid`, `email`, `first_name`, `state`, `last_name`) VALUES ('fred at flintstone.com', 'Fred', NULL, 'Flintstone', '123 High St.', 'Michigan', 'Reykjavik') **Normal** 2) In script og_create_unexpected2b.rb the DEBUG statements do not print out when running the single method in the 'Benchmark.bmbm do ..end' loop. In script og_create_unexpected2.rb I observe that the addition of another method in the benchmark loop results in the Debug code being printed. The same behavior occurs if 5 or 5000 rows are inserted, so I don't think it is some output buffering issue - or maybe it is? The only difference in these two files is in the benchmark loop where "'create' => :create_fixture," is present or absent. **trivial** 3) Og#connect seems to make two selects from a table that has just been created. I haven't dug in to see why, but thought I give a 'heads-up' in case they shouldn't be there. The queries I refer to are issued from within OG#connect, the attached files should print out: INFO: Og uses the Mysql store. DEBUG: Og manageable classes: [Member] DEBUG: CREATE TABLE `ogmember` (`first_name` text, `last_name` text, `address1` text, `city` text, `state` text, `email` text, `oid` integer AUTO_INCREMENT PRIMARY KEY) DEBUG: SELECT * FROM `ogmember` LIMIT 1 DEBUG: SELECT * FROM `ogmember` LIMIT 1 Using the Sqlite adapter I see something slightly different, but still the duplicate `'SELECT': INFO: Og uses the Sqlite store. DEBUG: Og manageable classes: [Member] DEBUG: CREATE TABLE ogmember (first_name text, last_name text, address1 text, city text, state text, email text, oid integer PRIMARY KEY) INFO: Created table ogmember. DEBUG: SELECT * FROM ogmember LIMIT 1 DEBUG: SELECT * FROM ogmember LIMIT 1 HTH Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: og_create_unexpected2.rb Type: application/x-ruby Size: 2876 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070901/0673ff4b/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: og_create_unexpected2b.rb Type: application/x-ruby Size: 2839 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070901/0673ff4b/attachment-0001.bin From mvyver at gmail.com Sat Sep 1 04:01:38 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Sat, 1 Sep 2007 18:01:38 +1000 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> Message-ID: <389c43e40709010101l4f680dacpf69bba9df6ab5085@mail.gmail.com> Hmm, I think I've worked out what the problem is and may have a solution that should also improve performance - I hope. Mark On 9/1/07, Mark Van De Vyver wrote: > Hi, > > I think I found some unexpected behaviors from OG - the first can be a > show stopper from some. > This may be specific to the MySQL and sqlite adapters? > The two ruby scripts show the behaviors described below. > I use the MySQL and the Sqlite adapters, could any one confirm they > see the same behavior described below with another adapter - just in > case. > > **SHOW STOPPER** > 1) The Og::SqlStore#exec_statement seems to rearrange the data > submitted in an sql string, and example of the original SQL statement > data and the SQL statement submitted to the MySQL store follows. > > insert into ogmember ( address1,city,email,first_name,state,last_name > ) values ( '123 High > St.','Reykjavik','fred at flintstone.com','Fred','Michigan','Flintstone' > ) > > DEBUG: INSERT INTO `ogmember` (`address1`, `city`, `oid`, `email`, > `first_name`, `state`, `last_name`) VALUES ('fred at flintstone.com', > 'Fred', NULL, 'Flintstone', '123 High St.', 'Michigan', 'Reykjavik') > > **Normal** > 2) In script og_create_unexpected2b.rb the DEBUG statements do not > print out when running the single method in the 'Benchmark.bmbm do > ..end' loop. > In script og_create_unexpected2.rb I observe that the addition of > another method in the benchmark loop results in the Debug code being > printed. The same behavior occurs if 5 or 5000 rows are inserted, so > I don't think it is some output buffering issue - or maybe it is? > The only difference in these two files is in the benchmark loop > where "'create' => :create_fixture," is present or absent. > > **trivial** > 3) Og#connect seems to make two selects from a table that has just > been created. I haven't dug in to see why, but thought I give a > 'heads-up' in case they shouldn't be there. The queries I refer to > are issued from within OG#connect, the attached files should print > out: > > INFO: Og uses the Mysql store. > DEBUG: Og manageable classes: [Member] > DEBUG: CREATE TABLE `ogmember` (`first_name` text, `last_name` text, > `address1` text, `city` text, `state` text, `email` text, `oid` > integer AUTO_INCREMENT PRIMARY KEY) > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > > Using the Sqlite adapter I see something slightly different, but still > the duplicate `'SELECT': > > INFO: Og uses the Sqlite store. > DEBUG: Og manageable classes: [Member] > DEBUG: CREATE TABLE ogmember (first_name text, last_name text, > address1 text, city text, state text, email text, oid integer PRIMARY > KEY) > INFO: Created table ogmember. > DEBUG: SELECT * FROM ogmember LIMIT 1 > DEBUG: SELECT * FROM ogmember LIMIT 1 > > > HTH > Mark > > From george.moschovitis at gmail.com Sat Sep 1 04:42:09 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 1 Sep 2007 11:42:09 +0300 Subject: [Nitro] advice.rb In-Reply-To: <4b6f054f0708311724n35b8ba91r42323cc630d86aa7@mail.gmail.com> References: <4b6f054f0708311724n35b8ba91r42323cc630d86aa7@mail.gmail.com> Message-ID: Quick question... does the SVN contain everything contained in the older version of facets ( 1.8.54) ? Would it make sense to start converting Nitro to use the svn version? What is the 'dev' directory? thanks, -g. On 9/1/07, TRANS wrote: > > It's called it advice.rb (though maybe it should be renamed > advisable.rb) and you can find it in the current SVN repo. > > I changed the name from aspects.rb b/c a) the Aspect/Aspects classes > are no longer needed and b) the name clashes with the class now in > aop.rb --which is a full-blown heavy-wieght cuts-based AOP solution > (work in progress). > > For advice.rb to work you also need 1stclassmethod.rb and > unboundmethod/arguments. I've attached them, but it may be easier just > to pull down the SVN repo. > > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://www.me.gr 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/20070901/2a2c82df/attachment.html From george.moschovitis at gmail.com Sat Sep 1 04:51:08 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 1 Sep 2007 11:51:08 +0300 Subject: [Nitro] check this [bitrock] out In-Reply-To: <9e03c3c60708312332p203933c0n2cb8133bee64d4f7@mail.gmail.com> References: <9e03c3c60708312332p203933c0n2cb8133bee64d4f7@mail.gmail.com> Message-ID: I didn't knwo about bitrock. Is this some kind of a vm image? like amazon AMI's ? -g. On 9/1/07, * William wrote: > > Hey hey! > > I see the nice bitrock people have a Ruby stack for the web. It includes Rails. > > I believe it would be really really useful to put an effort into drawing a > line under features for Nitro so that it is a viable candidate for a > packaged stack. > > As a first step, what do you reckon by making a "Bitrock Nitro" add-on, > that people can fit into a Bitrock stack for themselves? > > Some thoughts from a Saturday on the web. > > Aloha, > Will. > > > --------------------------------------------------------------------------------------- > > - http://bitrock.com/products_ruby_overview.html > > Integrated Open Source Ruby Distribution > > RubyStack is a freely available, ready to run distribution of Ruby on > Rails?. Packaged with a very user-friendly installer, RubyStack makes it > easy to have an enterprise-ready Rails environment up and running in just > minutes. It allows you to take advantage of the stability, low cost and high > performance of Ruby on Rails without the hassle of integrating, configuring, > and supporting your own build. > > RubyStack is currently available for Linux and Mac OS X, with support for > Windows and Solaris coming soon. As with all of our Web Stacks, > RubyStack is free to downloadand use under the terms of the Apache > 2.0 license. As the stack contains several open source tools and > libraries, it is important that you read and comply with the licenses for > each stack component. > > RubyStack offers two installation profiles to make it easy to set up Ruby > in both development and production environments. Both profiles install the > following open source software, along with several other tools and > libraries . > > - Ruby > - Subversion > - SQLite > - MySQL > - ImageMagick > - Several Ruby Gems, including: Rails, Mongrel, mongrel_cluster and > RMagick > > The Production installation profile also installs Apache 2.2 with rewrite > and proxy support, so you have everything you need to deploy your Ruby on > Rails applications. You can learn more about the benefitsof using BitRock Web Stacks or go directly to the > download page to get a > copy. > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.me.gr 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/20070901/5daefea5/attachment-0001.html From mvyver at gmail.com Sat Sep 1 04:57:11 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Sat, 1 Sep 2007 18:57:11 +1000 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: <389c43e40709010101l4f680dacpf69bba9df6ab5085@mail.gmail.com> References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> <389c43e40709010101l4f680dacpf69bba9df6ab5085@mail.gmail.com> Message-ID: <389c43e40709010157q3e086a36qa36f76f54f0ff6a1@mail.gmail.com> On 9/1/07, Mark Van De Vyver wrote: > Hmm, > I think I've worked out what the problem is and may have a solution > that should also improve performance - I hope. No joy. I'm stumped..... :( Mark > Mark > > On 9/1/07, Mark Van De Vyver wrote: > > Hi, > > > > I think I found some unexpected behaviors from OG - the first can be a > > show stopper from some. > > This may be specific to the MySQL and sqlite adapters? > > The two ruby scripts show the behaviors described below. > > I use the MySQL and the Sqlite adapters, could any one confirm they > > see the same behavior described below with another adapter - just in > > case. > > > > **SHOW STOPPER** > > 1) The Og::SqlStore#exec_statement seems to rearrange the data > > submitted in an sql string, and example of the original SQL statement > > data and the SQL statement submitted to the MySQL store follows. > > > > insert into ogmember ( address1,city,email,first_name,state,last_name > > ) values ( '123 High > > St.','Reykjavik','fred at flintstone.com','Fred','Michigan','Flintstone' > > ) > > > > DEBUG: INSERT INTO `ogmember` (`address1`, `city`, `oid`, `email`, > > `first_name`, `state`, `last_name`) VALUES ('fred at flintstone.com', > > 'Fred', NULL, 'Flintstone', '123 High St.', 'Michigan', 'Reykjavik') > > > > **Normal** > > 2) In script og_create_unexpected2b.rb the DEBUG statements do not > > print out when running the single method in the 'Benchmark.bmbm do > > ..end' loop. > > In script og_create_unexpected2.rb I observe that the addition of > > another method in the benchmark loop results in the Debug code being > > printed. The same behavior occurs if 5 or 5000 rows are inserted, so > > I don't think it is some output buffering issue - or maybe it is? > > The only difference in these two files is in the benchmark loop > > where "'create' => :create_fixture," is present or absent. > > > > **trivial** > > 3) Og#connect seems to make two selects from a table that has just > > been created. I haven't dug in to see why, but thought I give a > > 'heads-up' in case they shouldn't be there. The queries I refer to > > are issued from within OG#connect, the attached files should print > > out: > > > > INFO: Og uses the Mysql store. > > DEBUG: Og manageable classes: [Member] > > DEBUG: CREATE TABLE `ogmember` (`first_name` text, `last_name` text, > > `address1` text, `city` text, `state` text, `email` text, `oid` > > integer AUTO_INCREMENT PRIMARY KEY) > > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > > > > Using the Sqlite adapter I see something slightly different, but still > > the duplicate `'SELECT': > > > > INFO: Og uses the Sqlite store. > > DEBUG: Og manageable classes: [Member] > > DEBUG: CREATE TABLE ogmember (first_name text, last_name text, > > address1 text, city text, state text, email text, oid integer PRIMARY > > KEY) > > INFO: Created table ogmember. > > DEBUG: SELECT * FROM ogmember LIMIT 1 > > DEBUG: SELECT * FROM ogmember LIMIT 1 > > > > > > HTH > > Mark > > > > > From george.moschovitis at gmail.com Sat Sep 1 05:08:55 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 1 Sep 2007 12:08:55 +0300 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: <389c43e40709010157q3e086a36qa36f76f54f0ff6a1@mail.gmail.com> References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> <389c43e40709010101l4f680dacpf69bba9df6ab5085@mail.gmail.com> <389c43e40709010157q3e086a36qa36f76f54f0ff6a1@mail.gmail.com> Message-ID: Let me have a look at your scripts. -g. On 9/1/07, Mark Van De Vyver wrote: > > On 9/1/07, Mark Van De Vyver wrote: > > Hmm, > > I think I've worked out what the problem is and may have a solution > > that should also improve performance - I hope. > > No joy. I'm stumped..... :( > > Mark > > > Mark > > > > On 9/1/07, Mark Van De Vyver wrote: > > > Hi, > > > > > > I think I found some unexpected behaviors from OG - the first can be a > > > show stopper from some. > > > This may be specific to the MySQL and sqlite adapters? > > > The two ruby scripts show the behaviors described below. > > > I use the MySQL and the Sqlite adapters, could any one confirm they > > > see the same behavior described below with another adapter - just in > > > case. > > > > > > **SHOW STOPPER** > > > 1) The Og::SqlStore#exec_statement seems to rearrange the data > > > submitted in an sql string, and example of the original SQL statement > > > data and the SQL statement submitted to the MySQL store follows. > > > > > > insert into ogmember ( address1,city,email,first_name,state,last_name > > > ) values ( '123 High > > > St.','Reykjavik','fred at flintstone.com','Fred','Michigan','Flintstone' > > > ) > > > > > > DEBUG: INSERT INTO `ogmember` (`address1`, `city`, `oid`, `email`, > > > `first_name`, `state`, `last_name`) VALUES ('fred at flintstone.com', > > > 'Fred', NULL, 'Flintstone', '123 High St.', 'Michigan', 'Reykjavik') > > > > > > **Normal** > > > 2) In script og_create_unexpected2b.rb the DEBUG statements do not > > > print out when running the single method in the 'Benchmark.bmbm do > > > ..end' loop. > > > In script og_create_unexpected2.rb I observe that the addition of > > > another method in the benchmark loop results in the Debug code being > > > printed. The same behavior occurs if 5 or 5000 rows are inserted, so > > > I don't think it is some output buffering issue - or maybe it is? > > > The only difference in these two files is in the benchmark loop > > > where "'create' => :create_fixture," is present or absent. > > > > > > **trivial** > > > 3) Og#connect seems to make two selects from a table that has just > > > been created. I haven't dug in to see why, but thought I give a > > > 'heads-up' in case they shouldn't be there. The queries I refer to > > > are issued from within OG#connect, the attached files should print > > > out: > > > > > > INFO: Og uses the Mysql store. > > > DEBUG: Og manageable classes: [Member] > > > DEBUG: CREATE TABLE `ogmember` (`first_name` text, `last_name` text, > > > `address1` text, `city` text, `state` text, `email` text, `oid` > > > integer AUTO_INCREMENT PRIMARY KEY) > > > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > > > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > > > > > > Using the Sqlite adapter I see something slightly different, but still > > > the duplicate `'SELECT': > > > > > > INFO: Og uses the Sqlite store. > > > DEBUG: Og manageable classes: [Member] > > > DEBUG: CREATE TABLE ogmember (first_name text, last_name text, > > > address1 text, city text, state text, email text, oid integer PRIMARY > > > KEY) > > > INFO: Created table ogmember. > > > DEBUG: SELECT * FROM ogmember LIMIT 1 > > > DEBUG: SELECT * FROM ogmember LIMIT 1 > > > > > > > > > HTH > > > Mark > > > > > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.me.gr 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/20070901/604c2ce8/attachment.html From george.moschovitis at gmail.com Sat Sep 1 05:18:53 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 1 Sep 2007 12:18:53 +0300 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> Message-ID: > > 3) Og#connect seems to make two selects from a table that has just > been created. I haven't dug in to see why, but thought I give a > 'heads-up' in case they shouldn't be there. The queries I refer to > are issued from within OG#connect, the attached files should print > out: > I have seen this one, can't find where the second select comes from. Will have to investigate further. -g. -- http://www.me.gr 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/20070901/916f5823/attachment.html From george.moschovitis at gmail.com Sat Sep 1 05:22:26 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 1 Sep 2007 12:22:26 +0300 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: <389c43e40709010101l4f680dacpf69bba9df6ab5085@mail.gmail.com> References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> <389c43e40709010101l4f680dacpf69bba9df6ab5085@mail.gmail.com> Message-ID: > > Hmm, > I think I've worked out what the problem is and may have a solution > that should also improve performance - I hope. What do you think is the problem? -g. Mark > > On 9/1/07, Mark Van De Vyver wrote: > > Hi, > > > > I think I found some unexpected behaviors from OG - the first can be a > > show stopper from some. > > This may be specific to the MySQL and sqlite adapters? > > The two ruby scripts show the behaviors described below. > > I use the MySQL and the Sqlite adapters, could any one confirm they > > see the same behavior described below with another adapter - just in > > case. > > > > **SHOW STOPPER** > > 1) The Og::SqlStore#exec_statement seems to rearrange the data > > submitted in an sql string, and example of the original SQL statement > > data and the SQL statement submitted to the MySQL store follows. > > > > insert into ogmember ( address1,city,email,first_name,state,last_name > > ) values ( '123 High > > St.','Reykjavik','fred at flintstone.com','Fred','Michigan','Flintstone' > > ) > > > > DEBUG: INSERT INTO `ogmember` (`address1`, `city`, `oid`, `email`, > > `first_name`, `state`, `last_name`) VALUES ('fred at flintstone.com', > > 'Fred', NULL, 'Flintstone', '123 High St.', 'Michigan', 'Reykjavik') > > > > **Normal** > > 2) In script og_create_unexpected2b.rb the DEBUG statements do not > > print out when running the single method in the 'Benchmark.bmbm do > > ..end' loop. > > In script og_create_unexpected2.rb I observe that the addition of > > another method in the benchmark loop results in the Debug code being > > printed. The same behavior occurs if 5 or 5000 rows are inserted, so > > I don't think it is some output buffering issue - or maybe it is? > > The only difference in these two files is in the benchmark loop > > where "'create' => :create_fixture," is present or absent. > > > > **trivial** > > 3) Og#connect seems to make two selects from a table that has just > > been created. I haven't dug in to see why, but thought I give a > > 'heads-up' in case they shouldn't be there. The queries I refer to > > are issued from within OG#connect, the attached files should print > > out: > > > > INFO: Og uses the Mysql store. > > DEBUG: Og manageable classes: [Member] > > DEBUG: CREATE TABLE `ogmember` (`first_name` text, `last_name` text, > > `address1` text, `city` text, `state` text, `email` text, `oid` > > integer AUTO_INCREMENT PRIMARY KEY) > > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > > > > Using the Sqlite adapter I see something slightly different, but still > > the duplicate `'SELECT': > > > > INFO: Og uses the Sqlite store. > > DEBUG: Og manageable classes: [Member] > > DEBUG: CREATE TABLE ogmember (first_name text, last_name text, > > address1 text, city text, state text, email text, oid integer PRIMARY > > KEY) > > INFO: Created table ogmember. > > DEBUG: SELECT * FROM ogmember LIMIT 1 > > DEBUG: SELECT * FROM ogmember LIMIT 1 > > > > > > HTH > > Mark > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.me.gr 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/20070901/0486ee67/attachment.html From william.full.moon at gmail.com Sat Sep 1 05:30:23 2007 From: william.full.moon at gmail.com (* William) Date: Sat, 1 Sep 2007 19:30:23 +1000 Subject: [Nitro] check this [bitrock] out In-Reply-To: References: <9e03c3c60708312332p203933c0n2cb8133bee64d4f7@mail.gmail.com> Message-ID: <9e03c3c60709010230x12ce9418gcb979226b37418ed@mail.gmail.com> Hi ... It is an installer -- OpneSource configurations like pre-configured LAMP, WAMP, etc. This news story will complete most of the picture... - http://bitrock.com/about_news_rubystack.html w. On 01/09/2007, George Moschovitis wrote: > > I didn't knwo about bitrock. Is this some kind of a vm image? like amazon > AMI's ? > > -g. > > > > On 9/1/07, * William < william.full.moon at gmail.com> wrote: > > > Hey hey! > > > > I see the nice bitrock people have a Ruby stack for the web. It includes Rails. > > > > I believe it would be really really useful to put an effort into drawing > > a line under features for Nitro so that it is a viable candidate for a > > packaged stack. > > > > As a first step, what do you reckon by making a "Bitrock Nitro" add-on, > > that people can fit into a Bitrock stack for themselves? > > > > Some thoughts from a Saturday on the web. > > > > Aloha, > > Will. > > > > > > --------------------------------------------------------------------------------------- > > > > - http://bitrock.com/products_ruby_overview.html > > > > Integrated Open Source Ruby Distribution > > > > RubyStack is a freely available, ready to run distribution of Ruby on > > Rails?. Packaged with a very user-friendly installer, RubyStack makes it > > easy to have an enterprise-ready Rails environment up and running in just > > minutes. It allows you to take advantage of the stability, low cost and high > > performance of Ruby on Rails without the hassle of integrating, configuring, > > and supporting your own build. > > > > RubyStack is currently available for Linux and Mac OS X, with support > > for Windows and Solaris coming soon. As with all of our Web Stacks, > > RubyStack is free to downloadand use under the terms of the Apache > > 2.0 license. As the stack contains several open source tools and > > libraries, it is important that you read and comply with the licenses for > > each stack component. > > > > RubyStack offers two installation profiles to make it easy to set up > > Ruby in both development and production environments. Both profiles install > > the following open source software, along with several other tools and > > libraries . > > > > - Ruby > > - Subversion > > - SQLite > > - MySQL > > - ImageMagick > > - Several Ruby Gems, including: Rails, Mongrel, mongrel_cluster > > and RMagick > > > > The Production installation profile also installs Apache 2.2 with > > rewrite and proxy support, so you have everything you need to deploy your > > Ruby on Rails applications. You can learn more about the benefitsof using BitRock Web Stacks or go directly to the > > download page to get a > > copy. > > > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > -- > http://www.me.gr > 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/20070901/10c87e33/attachment-0001.html From john at oxyliquit.de Sat Sep 1 05:47:28 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 01 Sep 2007 11:47:28 +0200 Subject: [Nitro] Testing the whole website with GET/POST In-Reply-To: References: <367301c7eacc$df9b18a0$6442a8c0@musicbox> Message-ID: Hi, > Very good idea! I will try this as well. This would be a greate candidate > for an oxyliquid tip. http://www.oxyliquit.de/tip/38 thanks for that, I don't like that it's a little short and not comprehensive, but anyway, more 'data'. :P Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Sat Sep 1 05:47:38 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Sat, 01 Sep 2007 11:47:38 +0200 Subject: [Nitro] OG and DBI: Oxyliquit draft tip In-Reply-To: <389c43e40708310050o2adfb056s75ab532208934166@mail.gmail.com> References: <389c43e40708310050o2adfb056s75ab532208934166@mail.gmail.com> Message-ID: Hi, > To use DBI there is some work that needs to be done to install the > drivers. I thought to make a Oxyliquit tip about this - I'd > appreciate feedback on the script below. that sounds nice. ^_^ > The draft below prepares for sqlite, mysql and odbc. > It'd be useful to know if it is possible to change DBNAME (used twice) > to install postgres , Oracle, any other drivers? See at end of script, that would be my idea. > Before placing anything on Oxyliquit it would be useful to confirm > which distributions the following 'script' succeeds on - the location > of the odbc library might be an issue if it is not in /usr/lib.... > other issues? > I've tested the following on openSUSE 10.2 That looks like it'd work everywhere where ruby is installed (and that stuff compiles that is). I'm surprised though that it's so hard to install that stuff... Arent there gems for dbi? > My understanding is that DBI and ruby-ODBC are packaged in windows > one-click installer - can some one confirm that? > #-- start-bash ---------------------------- > su > ODBCVER=0.9995 > DBIVER=0.1.1 > pushd /tmp > wget http://ch-werner.de/rubyodbc/ruby-odbc-${ODBCVER}.tar.gz > tar -xvf ruby-odbc-${ODBCVER}.tar.gz > pushd ruby-odbc-${ODBCVER} > ruby extconf.rb --enable-dlopen > make > make install > #Installation of utf8 version: > ruby -Cutf8 extconf.rb --enable-dlopen > make -C utf8 > make -C utf8 install > popd > gem install "$@" sqlite wget http://rubyforge.org/frs/download.php/12368/dbi-${DBIVER}.tar.gz tar -xvf dbi-${DBIVER}.tar.gz pushd ruby-dbi str='dbi,dbd_sqlite,dbd_odbc' for db in $@; do str="$str,dbd_$db"; done echo $str ruby setup.rb config --with="$str" ruby setup.rb install popd popd > #-- end-bash ---------------------------- ./bash-script psql oracle ------- Just lumped together, but that might just work. :) Where of course the 'gem install' for postgres would be ruby-postgres, and that would not compatible with the "--with="... maybe you have a better idea looking at this. Make people install the gems manually? Or.. make the script ruby which then could be better adapted, my bash scripting foo is like non-existant. ;) Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From transfire at gmail.com Sat Sep 1 10:54:35 2007 From: transfire at gmail.com (Trans) Date: Sat, 01 Sep 2007 14:54:35 -0000 Subject: [Nitro] advice.rb In-Reply-To: References: <4b6f054f0708311724n35b8ba91r42323cc630d86aa7@mail.gmail.com> Message-ID: <1188658475.138118.179200@22g2000hsm.googlegroups.com> On Sep 1, 1:42 am, "George Moschovitis" wrote: > Quick question... > > does the SVN contain everything contained in the older version of facets ( > 1.8.54) ? Not under trunk. The old version is currently in branches/series-1.8. Actually I need to tag that. In trunk/, everything should be there except for what was moved to Blow, English and Stick. I still have to create the Nemo project but unfortunately I can't pry the damn Rubyforge project by that name from it's dead beat owner (he's no where to be found). I'll make one last try today, otherwise we need a new name. > Would it make sense to start converting Nitro to use the svn > version? Yes. That would be good. But do it this way: require 'facets' That will load ALL core code. Then you can load "more" libs as needed (just facets/, not facets/more/). This is the preferred usage for any application that uses a significant proportion of Facets' core functionality --such as Nitro/Og. The idea is to have a strong core lib that everyone can depend upon. (The new core, btw, is smaller, more refined and much tighter than before.) Let's keep close communications for the initial change over, it shouldn't be too hard, but it will, no doubt, flush out some things that need to be fixed/improved. I'll get a beta release ready over the next few days, so once the Nitro/Og conversion is complete others can hack on it too. SHould I just go ahead an make the release to Rubyforge? > What is the 'dev' directory? Stands for "development" it's just a play/scrap code area. T. From mvyver at gmail.com Sat Sep 1 20:29:11 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Sun, 2 Sep 2007 10:29:11 +1000 Subject: [Nitro] Nitro/OG spec convention/organization questions Message-ID: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> Hi, I've questions about spec best practice and organization of specs in nitro/og. Please don't consider any of this critical - I'm just talking about superficial issues, not the content of the current written spec files. I'd appreciate any thoughts on what is considered best practice in the RSpec/spec world. My understanding is that specs _can_ be a form of documentation and a source of 'howto' hints for users - maybe even point them to convenience/performance ways of doing things (if not best practice) - this is probably more important while these projects are being developed and before all the books are written ;) This makes me think we should maybe consider a directory structure: ./spec ./spec/developer A 'spec' of classes and methods a user is 'expected' to encounter should be in the first level, others should be in the second. In some sense a split that is a hassel, but maybe the user level specs will be quite stable relative to the developer specs, so One would still be spending most time in one folder? Next, should spec files correspond to the file name containing the code they spec, or the class/module name? If you think the file name, then what should be done with directory structures? Or should there be no such ties that bind? The issue here is how do the unitiated/stale work out from the spec just where the code resides (the ideal solution will also permit one to work out from the code where the spec is/should be) Related to the last issue: should file naming be <...>_spec.rb, or without the _spec extension? Finally, if anyone specs an example or a benchmark should these be in separate directories? A directory structure might look like: ./spec ./spec/benchmarks ./spec/developer ./spec/examples ./spec/fixtures ./spec/models The fixtures and models dir's could be sub dir's of ./spec/support/ Or, should we 'just do it' and merge/cull/re-organize later? I think can hear some people groaning :) Cheers Mark From mvyver at gmail.com Sat Sep 1 21:21:47 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Sun, 2 Sep 2007 11:21:47 +1000 Subject: [Nitro] Nitro/OG spec convention/organization questions In-Reply-To: <46DA0B28.5040701@arnebrasseur.net> References: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> <46DA0B28.5040701@arnebrasseur.net> Message-ID: <389c43e40709011821u1dabd847ic476d2c61fc95562@mail.gmail.com> Hi Arne, On 9/2/07, Arne Brasseur wrote: > Mark Van De Vyver schreef: > > Hi, > > I've questions about spec best practice and organization of specs in > > nitro/og. Please don't consider any of this critical - I'm just > > talking about superficial issues, not the content of the current > > written spec files. > > > Both structure and content can (IMHO) be improved upon. Before recently > Nitro/Og used Test::Unit. There was decided (before I came here) to > convert everything to RSpec. This conversion had been slacking for a > long time. I implemented the rake tasks to run the specs, with the > actual test runners taken from Ramaze. It was by no means perfect, but > Good Enough to get things going again and put a bit more emphasis on the > tests. > > I did most of the syntax-level conversion from Test::Unit to RSpec, with > Jo making sure the tests pass. The last time I checked there were still > several incomplete or failing tests. Thanks for effort you guys put in and the background is good to know. > > ... > > > > > Next, should spec files correspond to the file name containing the > > code they spec, or the class/module name? If you think the file name, > > then what should be done with directory structures? Or should there be > > no such ties that bind? > > > ... > > A directory structure might look like: > > > > ./spec > > ./spec/benchmarks > > ./spec/developer > > ./spec/examples > > ./spec/fixtures > > ./spec/models > > > > The fixtures and models dir's could be sub dir's of > > ./spec/support/ > > > > Or, should we 'just do it' and merge/cull/re-organize later? I think > > can hear some people groaning :) > > > Actually I'm glad you bring this up. The rule of thumb I applied was to > largely mirror the lib/ dir in spec, so one spec file with the > same name and relative location for every source file. This was not > considered stringent. This leaves the question open where to put support > files. Ok, sound like there is some flux and some things are settled. > My idea was to > - convert everything > - make tests go green > - improve on content and structure > > However George seems to have some great plans with the specs, with the > hidden directories and all of that, so I'm waiting to see what happens. > He told me three weeks ago the tests would be moved back ASAP. I also > moved to the other side of the world this week, so I haven't really > looked at it much lately. > > I hope this answers some of your questions. George, could you please let > us in on what you have in mind regarding the tests/specs? Thanks, you definitely answered some questions. I'll wait to hear from George on hwo to structure things, if they are to be structured now. Cheers Mark > regards > (ab) > > -- > Arne Brasseur > http://www.arnebrasseur.net > arne at arnebrasseur.net > > From arne at arnebrasseur.net Sat Sep 1 21:00:24 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Sun, 02 Sep 2007 09:00:24 +0800 Subject: [Nitro] Nitro/OG spec convention/organization questions In-Reply-To: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> References: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> Message-ID: <46DA0B28.5040701@arnebrasseur.net> Mark Van De Vyver schreef: > Hi, > I've questions about spec best practice and organization of specs in > nitro/og. Please don't consider any of this critical - I'm just > talking about superficial issues, not the content of the current > written spec files. > Both structure and content can (IMHO) be improved upon. Before recently Nitro/Og used Test::Unit. There was decided (before I came here) to convert everything to RSpec. This conversion had been slacking for a long time. I implemented the rake tasks to run the specs, with the actual test runners taken from Ramaze. It was by no means perfect, but Good Enough to get things going again and put a bit more emphasis on the tests. I did most of the syntax-level conversion from Test::Unit to RSpec, with Jo making sure the tests pass. The last time I checked there were still several incomplete or failing tests. > ... > > Next, should spec files correspond to the file name containing the > code they spec, or the class/module name? If you think the file name, > then what should be done with directory structures? Or should there be > no such ties that bind? > ... > A directory structure might look like: > > ./spec > ./spec/benchmarks > ./spec/developer > ./spec/examples > ./spec/fixtures > ./spec/models > > The fixtures and models dir's could be sub dir's of > ./spec/support/ > > Or, should we 'just do it' and merge/cull/re-organize later? I think > can hear some people groaning :) > Actually I'm glad you bring this up. The rule of thumb I applied was to largely mirror the lib/ dir in spec, so one spec file with the same name and relative location for every source file. This was not considered stringent. This leaves the question open where to put support files. My idea was to - convert everything - make tests go green - improve on content and structure However George seems to have some great plans with the specs, with the hidden directories and all of that, so I'm waiting to see what happens. He told me three weeks ago the tests would be moved back ASAP. I also moved to the other side of the world this week, so I haven't really looked at it much lately. I hope this answers some of your questions. George, could you please let us in on what you have in mind regarding the tests/specs? regards (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From work at ashleymoran.me.uk Sun Sep 2 18:15:37 2007 From: work at ashleymoran.me.uk (Ashley Moran) Date: Sun, 2 Sep 2007 23:15:37 +0100 Subject: [Nitro] Questions to help me evaluate Nitro Message-ID: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> Hi I have a few n00b questions regarding Nitro that I thought might be answered quicker by people who know the framework than me playing around. Basically my situation is I have been employed for the last 3 years doing sysadmin, DBA and Rails work, but I've recently handed my notice in, and by December I will need some real work. That give me 3 months (clock already ticking!) to create a little side-project, either as a money-spinner or just something for my CV to help me get some contract or permanent work. I was about to dive in with Rails but I thought I'd take another look at Nitro because it's a while since I read anything about it. I'm drawn to it because from what I've seen, it seems to have a sense of beauty that Rails lacks. (Rails is very clever, but it sure can be ugly at times.) However I have a few concerns I was hoping someone could address. (Ok actually quite a lot, now I've written them all out.) - Og - I have a very database-centric view of web apps: I see the data as the core of any project and the application just a means to do something useful with it. This seem at odds with the Og philosophy that the object model is key, and the database is used to support it. With Rails, I am constantly doing database-level changes, like renaming columns, moving columns from one table to another, inserting or deleting static data, setting arbitrary constraints (eg CHECK). The blog example makes it look like everything must be done with Og black magic. Will I need to build my own migration system to get the level of database control I'm used to? (Or I could hijack ActiveRecord Migrations for this, I guess.) - Testing - I see Nitro uses RSpec for it's own unit tests now. This I like :) RSpec is possibly my favourite piece of software ever. The rspec_on_rails plugin is pretty cool too, and by and large, the only problems I run into are due to Rails ugliness. Neither of the example apps have any testing. How easy is it to do unit tests with RSpec for each of the MVC layers? How about integration tests - are there any best practices for integrating, say Watir into a Nitro app's development cycle? - Plugins / Third-party code - One nice thing about Rails due to its popularity relative maturity is that if you've thought about it, at least three other people have too, and one has certainly written a plugin for it. What's the situation in Nitro? Is there a lot of wheel-reinvention needed for things Rails people take for granted? I'm sure this is very much dependent on the exact problem you are trying to solve. - Documentation - Ok, so Rails hardly gets 5* here, seeing as learning Rails involves scouring the web for answers. But it does have an excellent printed book and a pretty helpful wiki. The Nitro site has a lot of dangling links (also true of most of the sub-projects and related projects) and I can't find much in the way of tutorial/how-to stuff. If I start building a Nitro app tomorrow, will I find myself spending the first month just trying to figure out basic things? - JavaScript - I've been a bit spoilt by RJS. Will I be forced to (finally, grudgingly) learn JavaScript? Does Nitro have an equivalent means of sending multiple updates to a page? With RJS, I can pretty much reconfigure a whole page with a few lines of Ruby. It's often not perfect, but it's a real time saver. - Real World Use - Are there any lists of Nitro-powered sites so I can see what people have achieved? I don't doubt you can build large, robust apps with Nitro (I still work with people who question if you can do that with Rails), I'd just like to know what they are. I hope I'm not rehashing any old subjects here, but I can't seem my questions answered in the last few months on this list (admittedly, I've only skimmed the subjects). Also please don't take any of this as criticism, I am just curious about the Nitro world. Finally, is there any really cool stuff about Nitro will make me say "I wish Rails could do that/did it that way"? I'm much more impressed by elegant solutions to problems than I am put off by things not working out of the box. Thanks in advance for any advice Ashley From george.moschovitis at gmail.com Mon Sep 3 00:50:01 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 3 Sep 2007 07:50:01 +0300 Subject: [Nitro] advice.rb In-Reply-To: <1188658475.138118.179200@22g2000hsm.googlegroups.com> References: <4b6f054f0708311724n35b8ba91r42323cc630d86aa7@mail.gmail.com> <1188658475.138118.179200@22g2000hsm.googlegroups.com> Message-ID: > > Blow, English and Stick. I still have to create the Nemo project but hmm, nitro needs stuff from these projects too, can you remind me their svn repositories urls? try today, otherwise we need a new name. how about: memo, mnemo (from mnemonic = memory in greek), nah, memo is better. > require 'facets' Ok. > Let's keep close communications for the initial change over, it > shouldn't be too hard, but it will, no doubt, flush out some things > that need to be fixed/improved. I will attempt the conversion from tomorrow (tuesday). I'll get a beta release ready over the next few days, so once the > Nitro/Og conversion is complete others can hack on it too. SHould I > just go ahead an make the release to Rubyforge? Not before we verify that it works 100% with Nitro. -g. -- http://www.me.gr 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/20070903/a90e213b/attachment-0001.html From george.moschovitis at gmail.com Mon Sep 3 00:58:33 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 3 Sep 2007 07:58:33 +0300 Subject: [Nitro] Nitro/OG spec convention/organization questions In-Reply-To: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> References: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> Message-ID: > > My understanding is that specs _can_ be a form of documentation and a > source of 'howto' hints for users - maybe even point them to > convenience/performance ways of doing things (if not best practice) - this is a great goal ;-) > nk we should maybe consider a directory structure: > ./spec > ./spec/developer This is not the directory structure currently used. At the moment the specs are residing in the 'test' direrectory. The test directory closely matches the contents of the lib directory. One example will make things cleae: lib/og.rb lib/og/model.rb lib/og/model/timestamped.rb .. and test/og.rb test/og/model.rb test/og/model/timestamped.rb Next, should spec files correspond to the file name containing the > code they spec, or the class/module name? If you think the file name, > then what should be done with directory structures? Or should there be > no such ties that bind? see the above example. > Related to the last issue: should file naming be <...>_spec.rb, or > without the _spec extension? no _spec extension. Finally, if anyone specs an example or a benchmark should these be in > separate directories? examples/blog/* -> examples/blog/test/* dunno why you would like to test a benchmark. -g. -- http://www.me.gr 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/20070903/2185673c/attachment.html From george.moschovitis at gmail.com Mon Sep 3 01:01:59 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 3 Sep 2007 08:01:59 +0300 Subject: [Nitro] Nitro/OG spec convention/organization questions In-Reply-To: <46DA0B28.5040701@arnebrasseur.net> References: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> <46DA0B28.5040701@arnebrasseur.net> Message-ID: > > I hope this answers some of your questions. George, could you please let > us in on what you have in mind regarding the tests/specs? > I have improved slightly the directory structure of tests. I plan to cleanup up and move tests from the hidden directory to the new test directory on a file-by-file basis. I will also remove some tests for deprecated functionality. I want to first convert nitro with the latest version of facets 2 though. -g. -- http://www.me.gr 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/20070903/cf5c508d/attachment.html From george.moschovitis at gmail.com Mon Sep 3 01:15:00 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 3 Sep 2007 08:15:00 +0300 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> Message-ID: > > Basically my situation is I have been employed for the last 3 years > doing sysadmin, DBA and Rails work, but I've recently handed my > ...since I read anything about it. I'm drawn to it because from what > I've seen, it seems to have a sense of beauty that Rails lacks. > (Rails is very clever, but it sure can be ugly at times.) I am glad you appreciate Nitro's aesthetics ;-) - Og - > > I have a very database-centric view of web apps: I see the data as > the core of any project and the application just a means to do > something useful with it. This seem at odds with the Og philosophy > that the object model is key, and the database is used to support it. > > With Rails, I am constantly doing database-level changes, like > renaming columns, moving columns from one table to another, inserting > or deleting static data, setting arbitrary constraints (eg CHECK). > The blog example makes it look like everything must be done with Og > black magic. > > Will I need to build my own migration system to get the level of > database control I'm used to? (Or I could hijack ActiveRecord > Migrations for this, I guess.) Og works both as an object-to-relational mapper (default mode) and as a relational to object mapper. Ie, you can manually change your schema (as you do in AR) and just add your attributes to your classes. If you follow some simple conventions with your schema changes everything will work. I am doing this all the time. Please note that Og also provides an *automatic* evolution schema. For example if you add or remove or rename attributes in your model classes, Og automatically detects theses changes and automatically changes the relational schema accordingly. > RSpec for each of the MVC layers? How about integration tests - are > there any best practices for integrating, say Watir into a Nitro > app's development cycle? Older versions of Nitro offered support for unit/integration testing. This code is currently out-of-date in the repository version :( I plan to actively work on this, this month though. I *need* testing infrastructure for my current project so you can be sure that testing support will be back sooner rather than later. One nice thing about Rails due to its popularity relative maturity is > that if you've thought about it, at least three other people have > too, and one has certainly written a plugin for it. What's the > situation in Nitro? Is there a lot of wheel-reinvention needed for > things Rails people take for granted? I'm sure this is very much > dependent on the exact problem you are trying to solve. Nitro is quite compatible with Rails. I find it *extremely* easy to 'convert' most Rails plugins for my own usage. > If I > start building a Nitro app tomorrow, will I find myself spending the > first month just trying to figure out basic things? The lack of proper documentation is the biggest problem in Nitro. But the mailing list is pretty helpful. I would say go for it, and we will help you as much as possible. I've been a bit spoilt by RJS. Will I be forced to (finally, > grudgingly) learn JavaScript? Does Nitro have an equivalent means of > sending multiple updates to a page? With RJS, I can pretty much > reconfigure a whole page with a few lines of Ruby. It's often not > perfect, but it's a real time saver. The latest versions of Nitro promote the usage of JQuery. JQuery renders a system like RJS obsolete. You can do everythinthing just as consize and be more flexible with JQuery. Now that you mention it, I will keep in mind to provide some example about how I am using JQuery with nitro for some cool and extremely easy to implement ajax effects. JQuery is so powerfull that I decided to remove all the old javascript helpers. You just don't need helpers with JQuery. - Real World Use - > > Are there any lists of Nitro-powered sites so I can see what people > have achieved? I don't doubt you can build large, robust apps with > Nitro (I still work with people who question if you can do that with > Rails), I'd just like to know what they are. > I am about to use Nitro on a *really big project*. Some earlier public exaples are: - www.cull.gr - www.joyerz.com - www.phidz.com - www.ruby-doc.org I hope this helps, -g. -- http://www.me.gr 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/20070903/4d8cea2d/attachment.html From arne at arnebrasseur.net Mon Sep 3 02:23:41 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 03 Sep 2007 14:23:41 +0800 Subject: [Nitro] Nitro/OG spec convention/organization questions In-Reply-To: References: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> Message-ID: <46DBA86D.1030509@arnebrasseur.net> George Moschovitis schreef: > dunno why you would like to test a benchmark. > Performance characteristics _can_ be part of a specification. The hard part is choosing good benchmark boundaries, since this greatly depends on the environment the tests run in. It wouldn't really count as a unit test, since it's not always reproducable. I would see it more as a sort of sanity check. (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From mvyver at gmail.com Mon Sep 3 02:50:35 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Mon, 3 Sep 2007 16:50:35 +1000 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> Message-ID: <389c43e40709022350q40e49d87qa5403a9949253391@mail.gmail.com> ... > > I have a very database-centric view of web apps: I see the data as > > the core of any project and the application just a means to do > > something useful with it. This seem at odds with the Og philosophy > > that the object model is key, and the database is used to support it. I'm new to OG but I had formed the view that OG tries to make the data(base) and the OG model indistiguishable - as much as that can be done. So it seems to me that your db-centric view and OGs' approach match? > > With Rails, I am constantly doing database-level changes, like > > renaming columns, moving columns from one table to another, inserting > > or deleting static data, setting arbitrary constraints (eg CHECK). I'm using OG because my understanding - confirmed in an earlier email was that this duplication of effort is eliminated if you use OG in its default mode (a data mapper). If control of the db/table structure is outside of your control (fortunately not my situation), or you manually want to make some db changes, then it seems you can still use OG as a data wrapper. > > The blog example makes it look like everything must be done with Og > > black magic. Maybe that should be Ruby black magic? OG implements some neat ideas but seems to do it in a very 'Ruby-way'. Lots of Meta programming (all very new to me, but _very_ interesting.) Another reason I chose OG is because it seems to be more ruby like. This impression I formed from some emails - I've not used Rails/AR so I could be off the mark here. My 2c :) Mark > > Will I need to build my own migration system to get the level of > > database control I'm used to? (Or I could hijack ActiveRecord > > Migrations for this, I guess.) > > Og works both as an object-to-relational mapper (default mode) and as a > relational to object mapper. Ie, > you can manually change your schema (as you do in AR) and just add your > attributes to your classes. If you follow > some simple conventions with your schema changes everything will work. I am > doing this all the time. > > Please note that Og also provides an *automatic* evolution schema. For > example if you add or remove or rename attributes > in your model classes, Og automatically detects theses changes and > automatically changes the relational schema > accordingly. > > > RSpec for each of the MVC layers? How about integration tests - are > > there any best practices for integrating, say Watir into a Nitro > > app's development cycle? > > Older versions of Nitro offered support for unit/integration testing. This > code is currently out-of-date in the repository > version :( I plan to actively work on this, this month though. I *need* > testing infrastructure for my current project so you can be sure that > testing support will be back sooner rather than later. > > > One nice thing about Rails due to its popularity relative maturity is > > that if you've thought about it, at least three other people have > > too, and one has certainly written a plugin for it. What's the > > situation in Nitro? Is there a lot of wheel-reinvention needed for > > things Rails people take for granted? I'm sure this is very much > > dependent on the exact problem you are trying to solve. > > Nitro is quite compatible with Rails. I find it *extremely* easy to > 'convert' most Rails plugins for my own usage. > > > If I > > start building a Nitro app tomorrow, will I find myself spending the > > first month just trying to figure out basic things? > > The lack of proper documentation is the biggest problem in Nitro. But the > mailing list is pretty helpful. I would say go for it, and we will help you > as much as possible. > > > I've been a bit spoilt by RJS. Will I be forced to (finally, > > grudgingly) learn JavaScript? Does Nitro have an equivalent means of > > sending multiple updates to a page? With RJS, I can pretty much > > reconfigure a whole page with a few lines of Ruby. It's often not > > perfect, but it's a real time saver. > > The latest versions of Nitro promote the usage of JQuery. JQuery renders a > system like RJS obsolete. You can do everythinthing just as consize and be > more flexible with JQuery. Now that you mention it, I will keep in mind to > provide some example about how I am using JQuery with nitro for some cool > and extremely easy to implement ajax effects. JQuery is so powerfull that I > decided to remove all the old javascript helpers. You just don't need > helpers with JQuery. > > > - Real World Use - > > > > Are there any lists of Nitro-powered sites so I can see what people > > have achieved? I don't doubt you can build large, robust apps with > > Nitro (I still work with people who question if you can do that with > > Rails), I'd just like to know what they are. > > > > I am about to use Nitro on a *really big project*. Some earlier public > exaples are: > > - www.cull.gr > - www.joyerz.com > - www.phidz.com > - www.ruby-doc.org > > > > I hope this helps, > > -g. > > -- > http://www.me.gr > 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 > From mvyver at gmail.com Mon Sep 3 02:57:29 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Mon, 3 Sep 2007 16:57:29 +1000 Subject: [Nitro] Nitro/OG spec convention/organization questions In-Reply-To: References: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> Message-ID: <389c43e40709022357n4253a75chb6fe38607524deb8@mail.gmail.com> > > > nk we should maybe consider a directory structure: > > ./spec > > ./spec/developer > > This is not the directory structure currently used. At the moment the specs > are residing in the 'test' direrectory. The > test directory closely matches the contents of the lib directory. One > example will make things cleae: > > lib/og.rb > lib/og/model.rb > lib/og/model/timestamped.rb ... > and > > test/og.rb > test/og/model.rb > test/og/model/timestamped.rb ... OK I think this is the layout Arne mentioned. He thought it was out of favor. It seems not? I'll replicate the source tree location for any test/spec I submit - unless I hear other wise. mv > > > Next, should spec files correspond to the file name containing the > > code they spec, or the class/module name? If you think the file name, > > then what should be done with directory structures? Or should there be > > no such ties that bind? > > see the above example. > > > Related to the last issue: should file naming be <...>_spec.rb, or > > without the _spec extension? > > no _spec extension. > > > Finally, if anyone specs an example or a benchmark should these be in > > separate directories? > > > examples/blog/* > -> > examples/blog/test/* > > dunno why you would like to test a benchmark. > > > -g. > > > -- > http://www.me.gr > http://phidz.com > http://blog.gmosx.com > http://cull.gr > http://www.joy.gr > http://nitroproject.org From mvyver at gmail.com Mon Sep 3 03:05:44 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Mon, 3 Sep 2007 17:05:44 +1000 Subject: [Nitro] Nitro/OG spec convention/organization questions In-Reply-To: <46DBA86D.1030509@arnebrasseur.net> References: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> <46DBA86D.1030509@arnebrasseur.net> Message-ID: <389c43e40709030005x44194ceej51732216343d63c6@mail.gmail.com> On 9/3/07, Arne Brasseur wrote: > George Moschovitis schreef: > > dunno why you would like to test a benchmark. > > > Performance characteristics _can_ be part of a specification. The hard > part is choosing good benchmark boundaries, since this greatly depends > on the environment the tests run in. > > It wouldn't really count as a unit test, since it's not always > reproducable. I would see it more as a sort of sanity check. Yep, that's possible. My thought was more for in the development cycle, maybe use fixture(s) to have a quick way of testing if a change improves or harms performance, and to get RSpecs' verification/signal that all is well in that part of the code. Haven't fully worked this out. MV From arne at arnebrasseur.net Mon Sep 3 03:32:32 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 03 Sep 2007 15:32:32 +0800 Subject: [Nitro] Nitro/OG spec convention/organization questions In-Reply-To: <389c43e40709022357n4253a75chb6fe38607524deb8@mail.gmail.com> References: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> <389c43e40709022357n4253a75chb6fe38607524deb8@mail.gmail.com> Message-ID: <46DBB890.5020600@arnebrasseur.net> Mark Van De Vyver schreef: > OK I think this is the layout Arne mentioned. He thought it was out > of favor. It seems not? > What I meant to say was that it is/was possible to deviate from this pattern if it seems/seemed practical, although I can't at the moment recall why it was felt necessary. Sorry if I wasn't being clear. I'm not a native speaker. I still feel there should be a place to put spec "helpers" like special models, controllers, rspec matchers, etc. (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From george.moschovitis at gmail.com Mon Sep 3 03:42:41 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 3 Sep 2007 10:42:41 +0300 Subject: [Nitro] Nitro/OG spec convention/organization questions In-Reply-To: <46DBB890.5020600@arnebrasseur.net> References: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> <389c43e40709022357n4253a75chb6fe38607524deb8@mail.gmail.com> <46DBB890.5020600@arnebrasseur.net> Message-ID: > > I still feel there should be a place to put spec "helpers" like special > models, controllers, rspec matchers, etc. > test/raw/... helpers in: test/helper.rb test/helper/... -g. -- http://www.me.gr 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/20070903/c64ee8f6/attachment.html From arne at arnebrasseur.net Mon Sep 3 03:47:38 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 03 Sep 2007 15:47:38 +0800 Subject: [Nitro] Nitro/OG spec convention/organization questions In-Reply-To: References: <389c43e40709011729u5ada0339m981c97995747f2bb@mail.gmail.com> <389c43e40709022357n4253a75chb6fe38607524deb8@mail.gmail.com> <46DBB890.5020600@arnebrasseur.net> Message-ID: <46DBBC1A.5050107@arnebrasseur.net> George Moschovitis schreef: > helpers in: > > test/helper.rb > test/helper/... > Perfect! Thank you (ab) > -g. > > > -- > http://www.me.gr > 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 -- 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/20070903/a79ebc72/attachment.html From mvyver at gmail.com Mon Sep 3 04:24:45 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Mon, 3 Sep 2007 18:24:45 +1000 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> Message-ID: <389c43e40709030124k3172e2cbtc56deb469212fff8@mail.gmail.com> > **SHOW STOPPER** ... Ignore that - my stale Ruby at fault of this one. .... > **trivial** > 3) Og#connect seems to make two selects from a table that has just > been created. I haven't dug in to see why, but thought I give a > 'heads-up' in case they shouldn't be there. The queries I refer to > are issued from within OG#connect, the attached files should print > out: > > INFO: Og uses the Mysql store. > DEBUG: Og manageable classes: [Member] > DEBUG: CREATE TABLE `ogmember` (`first_name` text, `last_name` text, > `address1` text, `city` text, `state` text, `email` text, `oid` > integer AUTO_INCREMENT PRIMARY KEY) > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > DEBUG: SELECT * FROM `ogmember` LIMIT 1 This I've tracked down to: [./og/lib/sql.rb] Line 290 Line 291 In line sql.rb:290 SQLEnchantMixin#og_create_scheme is called, which in turn calls SQLStore#create_field_map. In line sql.rb:290 SQLStore#create_field_map is called again. Hence the duplicated queries to the database whenever a table is created. I'm not sure how to fix this, but hope this helps someone. I'm happy to help test if needed. Mark > Using the Sqlite adapter I see something slightly different, but still > the duplicate `'SELECT': > > INFO: Og uses the Sqlite store. > DEBUG: Og manageable classes: [Member] > DEBUG: CREATE TABLE ogmember (first_name text, last_name text, > address1 text, city text, state text, email text, oid integer PRIMARY > KEY) > INFO: Created table ogmember. > DEBUG: SELECT * FROM ogmember LIMIT 1 > DEBUG: SELECT * FROM ogmember LIMIT 1 > > > HTH > Mark > > From george.moschovitis at gmail.com Mon Sep 3 04:39:47 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 3 Sep 2007 11:39:47 +0300 Subject: [Nitro] Og tests helper Message-ID: Dear devs, I have a little problem with the rspec infrastructure 'borrowed' from Ramaze. when I run the (few) og tests with rake test:og I get: (in /home/gmosx/code/public) Running og... [ 1 specs - 0 failed ] Running og/store/sql... [ 1 specs - 0 failed ] Running og/validation... [ 1 specs - all passed ] -------------------------------------[ og ]------------------------------------- ExitStatus: # StdOut: Database "test" dropped . Finished in 0.136994 seconds 1 example, 0 failures The problem seems to be that the system command used to drop the database before each test. It seems to trigger the error code in script/lib/wrap.rb... If you run the tests one by one they work. Michael, Jonathan, Arne, do you have any idea? -g. -- http://www.me.gr 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/20070903/2def5b21/attachment.html From arne at arnebrasseur.net Mon Sep 3 04:59:00 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 03 Sep 2007 16:59:00 +0800 Subject: [Nitro] Og tests helper In-Reply-To: References: Message-ID: <46DBCCD4.3070901@arnebrasseur.net> I'm trying to reproduce this here so I can better understand the issue. Is there a preferred way to tell the og tests about my MySql configuration? (ab) George Moschovitis schreef: > Dear devs, > > I have a little problem with the rspec infrastructure 'borrowed' from > Ramaze. > > when I run the (few) og tests with > > rake test:og > > I get: > > (in /home/gmosx/code/public) > Running og... [ 1 specs - 0 failed ] > Running og/store/sql... [ 1 specs - 0 failed ] > Running og/validation... [ 1 specs - all passed ] > -------------------------------------[ og > ]------------------------------------- > ExitStatus: > # > StdOut: > Database "test" dropped > . > > Finished in 0.136994 seconds > > 1 example, 0 failures > > The problem seems to be that the system command used to drop the > database before each test. It seems to trigger the error code in > script/lib/wrap.rb... > > If you run the tests one by one they work. > > Michael, Jonathan, Arne, do you have any idea? > > -g. > > > -- > http://www.me.gr > 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 -- 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/20070903/5ca8bba9/attachment-0001.html From george.moschovitis at gmail.com Mon Sep 3 05:00:54 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 3 Sep 2007 12:00:54 +0300 Subject: [Nitro] Og tests helper In-Reply-To: <46DBCCD4.3070901@arnebrasseur.net> References: <46DBCCD4.3070901@arnebrasseur.net> Message-ID: I use $ export DB_PASSWORD=",sql51e' you can also change the settings in og/test/helper.rb -g. On 9/3/07, Arne Brasseur wrote: > > I'm trying to reproduce this here so I can better understand the issue. > Is there a preferred way to tell the og tests about my MySql configuration? > > (ab) > > George Moschovitis schreef: > > Dear devs, > > I have a little problem with the rspec infrastructure 'borrowed' from > Ramaze. > > when I run the (few) og tests with > > rake test:og > > I get: > > (in /home/gmosx/code/public) > Running og... [ 1 specs - 0 failed ] > Running og/store/sql... [ 1 specs - 0 failed ] > Running og/validation... [ 1 specs - all passed ] > -------------------------------------[ og > ]------------------------------------- > ExitStatus: > # > StdOut: > Database "test" dropped > . > > Finished in 0.136994 seconds > > 1 example, 0 failures > > The problem seems to be that the system command used to drop the database > before each test. It seems to trigger the error code in > script/lib/wrap.rb... > > If you run the tests one by one they work. > > Michael, Jonathan, Arne, do you have any idea? > > -g. > > > -- > http://www.me.gr > 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.orghttp://rubyforge.org/mailman/listinfo/nitro-general > > > > -- > Arne Brasseur > http://www.arnebrasseur.netarne at arnebrasseur.net > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.me.gr 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/20070903/06f43bad/attachment.html From arne at arnebrasseur.net Mon Sep 3 05:31:34 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 03 Sep 2007 17:31:34 +0800 Subject: [Nitro] Og tests helper In-Reply-To: References: Message-ID: <46DBD476.7060207@arnebrasseur.net> George Moschovitis schreef: > (in /home/gmosx/code/public) > Running og... [ 1 specs - 0 failed ] > Running og/store/sql... [ 1 specs - 0 failed ] > Running og/validation... [ 1 specs - all passed ] > -------------------------------------[ og > ]------------------------------------- > ExitStatus: > # > StdOut: > Database "test" dropped > . > > Finished in 0.136994 seconds > > 1 example, 0 failures > > The problem seems to be that the system command used to drop the > database before each test. It seems to trigger the error code in > script/lib/wrap.rb... Actually the problem seems to be that some ANSI control codes (or something that looks like it) are sent to StdErr. Because the test outputs on StdErr it is shown in red and the details are given. If you change line 159 in script/lib/wrap.rb from puts "StdOut:".yellow, @stdout, "StdErr:".yellow, @stderr to puts "StdOut:".yellow, @stdout, "StdErr:".yellow, @stderr.inspect you will see this: -------------------------------------[ og ]------------------------------------- ExitStatus: # StdOut: . Finished in 0.418628 seconds 1 example, 0 failures StdErr: "\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m" nil --------------------------------[ og/store/sql ]-------------------------------- ExitStatus: # StdOut: . Finished in 0.359741 seconds 1 example, 0 failures StdErr: "\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m" (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From work at ashleymoran.me.uk Mon Sep 3 05:43:34 2007 From: work at ashleymoran.me.uk (Ashley Moran) Date: Mon, 3 Sep 2007 10:43:34 +0100 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> Message-ID: <798AE3CB-5470-4E49-8119-24C3BCBACEBD@ashleymoran.me.uk> On 3 Sep 2007, at 06:15, George Moschovitis wrote: > Og works both as an object-to-relational mapper (default mode) and > as a relational to object mapper. Ie, > you can manually change your schema (as you do in AR) and just add > your attributes to your classes. If you follow > some simple conventions with your schema changes everything will > work. I am doing this all the time. Ok cool - I could not see any structure to help Og handle manual schema changes. As long as I can > Please note that Og also provides an *automatic* evolution schema. > For example if you add or remove or rename attributes > in your model classes, Og automatically detects theses changes and > automatically changes the relational schema > accordingly. I noticed this. I'll have to take your word for it for now, sounds like black magic to me :) > Older versions of Nitro offered support for unit/integration > testing. This code is currently out-of-date in the repository > version :( I plan to actively work on this, this month though. I > *need* testing infrastructure for my current project so you can be > sure that testing support will be back sooner rather than later. Can I be any help with this? I won't start working on any web apps until I have the tools to work BDD, so I'm happy to help get RSpec working. > Nitro is quite compatible with Rails. I find it *extremely* easy to > 'convert' most Rails plugins for my own usage. I was hoping this might be the case, but without actually trying anything I had no idea. > The lack of proper documentation is the biggest problem in Nitro. > But the mailing list is pretty helpful. I would say go for it, and > we will help you as much as possible. Thanks - I think one of the best thing about programming in Ruby is the helpfulness of other developers. > The latest versions of Nitro promote the usage of JQuery. JQuery > renders a system like RJS obsolete. You can do everythinthing just > as consize and be more flexible with JQuery. Now that you mention > it, I will keep in mind to provide some example about how I am > using JQuery with nitro for some cool and extremely easy to > implement ajax effects. JQuery is so powerfull that I decided to > remove all the old javascript helpers. You just don't need helpers > with JQuery. When you say JQuery, do you mean ? If so, it looks pretty cool. I watched some of the examples here: . Can you sum up in a few words how JQuery replaces RJS? It looks all client-side to me. Is it possible to use JQuery when the exact data and effects are determined by the database? Whatever, it looks like I will have to learn JavaScript. Don't supppose you can recommend a good book? > I am about to use Nitro on a *really big project*. Some earlier > public exaples are: > > - www.cull.gr > - www.joyerz.com > - www.phidz.com > - www.ruby-doc.org I don't speak any greek - could you explain what's going on in this pic? > I hope this helps, Yes it does - I'm sold :) I have a few other things to get out of the way but hopefully I will be able to make a test Nitro app this week. It sounds like the leap from Rails will not be that big, and it looks like I won't lose anything important (apart from testing for the time being). Thanks! Ashley From arne at arnebrasseur.net Mon Sep 3 05:53:54 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 03 Sep 2007 17:53:54 +0800 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> Message-ID: <46DBD9B2.3030407@arnebrasseur.net> Ashley Moran schreef: > Finally, is there any really cool stuff about Nitro will make me say > "I wish Rails could do that/did it that way"? I'm much more > impressed by elegant solutions to problems than I am put off by > things not working out of the box. > One of the things that impressed me was the Nitro 'compiler pipeline'. Basically a page in Nitro is rendered in two steps, in the first 'compilation' step the template is converted into code which is then evaluated every time the template is rendered. This compilation happens through a configurable pipeline of transformation steps. The transformations could be XML based or just working on the plain text. One of the IMHO coolest available out of the box is the 'Morpher', e.g.
...
  • #{item}
  • The nice thing is that everything that can be done at compilation is a one time overhead, so afterwards pages render ultra-fast. You could for instance turn the CSSDryer plugin from Rails into a compiler step, so you can write 'nested' CSS like this: #content { p { a {...} a:hover {} ... } } #sidebar { a {...} } (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From work at ashleymoran.me.uk Mon Sep 3 06:03:05 2007 From: work at ashleymoran.me.uk (Ashley Moran) Date: Mon, 3 Sep 2007 11:03:05 +0100 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: <389c43e40709022350q40e49d87qa5403a9949253391@mail.gmail.com> References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> <389c43e40709022350q40e49d87qa5403a9949253391@mail.gmail.com> Message-ID: On 3 Sep 2007, at 07:50, Mark Van De Vyver wrote: > I'm new to OG but I had formed the view that OG tries to make the > data(base) and the OG model indistiguishable - as much as that can be > done. So it seems to me that your db-centric view and OGs' approach > match? From George's response it sounds like Og is pretty flexible with regards to migrating the schema. I'll have to play around with it now and see how it works. I don't think *any* ORM layer perfectly maps objects to and from the database, but the code I've seen does look pretty smart. > I'm using OG because my understanding - confirmed in an earlier email > was that this > duplication of effort is eliminated if you use OG in its default mode > (a data mapper). > If control of the db/table structure is outside of your control > (fortunately not my situation), or you manually want to make some db > changes, then it seems you can still use OG as a data wrapper. When you say data mapper, do you mean in the Martin Fowler sense? () At first glance, Og looks like it also follows the Active Record pattern. The automatic schema migrations sound clever, and I don't have any legacy schemas to worry about, but I will certainly need the ability to run custom SQL. For example, to create a partial index on a column, or update static data. > Maybe that should be Ruby black magic? OG implements some neat ideas > but seems to do it in a very 'Ruby-way'. Lots of Meta programming > (all very new to me, but _very_ interesting.) > Another reason I chose OG is because it seems to be more ruby like. > This impression I formed from some emails - I've not used Rails/AR so > I could be off the mark here. When I said Og black magic, I was thinking more of the automatic schema generation. I'm sure there's plenty of cool metaprogramming in there - it wouldn't be Ruby otherwise! In Rails, there's plenty of stuff that looks clever (and IS clever), but makes testing your app a real pain. Anyway George has convinced me that Nitro is worth a look so I will start experimenting very soon. Ashley From mvyver at gmail.com Mon Sep 3 06:03:50 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Mon, 3 Sep 2007 20:03:50 +1000 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: <389c43e40709030124k3172e2cbtc56deb469212fff8@mail.gmail.com> References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> <389c43e40709030124k3172e2cbtc56deb469212fff8@mail.gmail.com> Message-ID: <389c43e40709030303l379e4cf5q6ef8f754905dc096@mail.gmail.com> > > INFO: Og uses the Mysql store. > > DEBUG: Og manageable classes: [Member] > > DEBUG: CREATE TABLE `ogmember` (`first_name` text, `last_name` text, > > `address1` text, `city` text, `state` text, `email` text, `oid` > > integer AUTO_INCREMENT PRIMARY KEY) > > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > > This I've tracked down to: > [./og/lib/sql.rb] > Line 290 > Line 291 > > In line sql.rb:290 SQLEnchantMixin#og_create_scheme is called, which > in turn calls SQLStore#create_field_map. The full route to the first call of SQLStore#create_field_map is: sql.rb:290 og_create_scheme sql.rb:79 evolve_schema evolution.rb:59 create_field_map The second call of SQLStore#create_field_map is: sql.rb:291 create_field_map > > Hence the duplicated queries to the database whenever a table is created. > > I'm not sure how to fix this, but hope this helps someone. > I'm happy to help test if needed. > > Mark > > > Using the Sqlite adapter I see something slightly different, but still > > the duplicate `'SELECT': > > > > INFO: Og uses the Sqlite store. > > DEBUG: Og manageable classes: [Member] > > DEBUG: CREATE TABLE ogmember (first_name text, last_name text, > > address1 text, city text, state text, email text, oid integer PRIMARY > > KEY) > > INFO: Created table ogmember. > > DEBUG: SELECT * FROM ogmember LIMIT 1 > > DEBUG: SELECT * FROM ogmember LIMIT 1 > > > > > > HTH > > Mark > > > > > From arne at arnebrasseur.net Mon Sep 3 06:12:40 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Mon, 03 Sep 2007 18:12:40 +0800 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: <798AE3CB-5470-4E49-8119-24C3BCBACEBD@ashleymoran.me.uk> References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> <798AE3CB-5470-4E49-8119-24C3BCBACEBD@ashleymoran.me.uk> Message-ID: <46DBDE18.8030708@arnebrasseur.net> Ashley Moran schreef: > I don't speak any greek - could you explain what's going on in this > pic? > Interesting :) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From work at ashleymoran.me.uk Mon Sep 3 06:28:35 2007 From: work at ashleymoran.me.uk (Ashley Moran) Date: Mon, 3 Sep 2007 11:28:35 +0100 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: <46DBD9B2.3030407@arnebrasseur.net> References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> <46DBD9B2.3030407@arnebrasseur.net> Message-ID: On 3 Sep 2007, at 10:53, Arne Brasseur wrote: > One of the things that impressed me was the Nitro 'compiler pipeline'. > Basically a page in Nitro is rendered in two steps, in the first > 'compilation' step the template is converted into code which is then > evaluated every time the template is rendered. This compilation > happens > through a configurable pipeline of transformation steps. The > transformations could be XML based or just working on the plain text. I noticed something clever was going on in the views :) I have to say, I won't miss ERb. Am I right that Nitro templates are all valid XML? > One of the IMHO coolest available out of the box is the 'Morpher', > e.g. > >
    ...
    > >
  • #{item}
  • Snazzy! This clearly needs more investigation. It reminds me of Yurii Rashkovski's Lilu () which I'm pretty sure he is using for his new issuesdone.com project. Lilu is cool because you can preview the templates in a browser. Looks like the "Morpher" has a similar idea but embeds the code as XML attributes. > The nice thing is that everything that can be done at compilation is a > one time overhead, so afterwards pages render ultra-fast. I saw the example "hello" app has compiled and dynamic includes, but my Webrick started going weird when I was running it last night, and stopped responding to requests, so I gave up. > You could for instance turn the CSSDryer plugin from Rails into a > compiler step, so you can write 'nested' CSS like this: > > #content { > p { > a {...} > a:hover {} > ... > } > } > > #sidebar { > a {...} > } Now I'm getting excited :) For my current Rails project at work I built a dynamic CSS renderer, so can I write things like html, body { font-family: Arial, Helvetica, sans-serif; font-size: 12px; background: <%= @colours[:background] %> url(../images/bg.gif) repeat-y top center; } I'll have to see how I can do this in Nitro, I may well need it for my own work. Ashley From work at ashleymoran.me.uk Mon Sep 3 06:29:47 2007 From: work at ashleymoran.me.uk (Ashley Moran) Date: Mon, 3 Sep 2007 11:29:47 +0100 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: <46DBDE18.8030708@arnebrasseur.net> References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> <798AE3CB-5470-4E49-8119-24C3BCBACEBD@ashleymoran.me.uk> <46DBDE18.8030708@arnebrasseur.net> Message-ID: <35D2AD40-AE00-4A75-95BA-14A758E81203@ashleymoran.me.uk> On 3 Sep 2007, at 11:12, Arne Brasseur wrote: > Ashley Moran schreef: >> I don't speak any greek - could you explain what's going on in this >> pic? >> > Interesting :) I'm not sure it's the strangest thing on cull.gr either! From mvyver at gmail.com Mon Sep 3 07:32:59 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Mon, 3 Sep 2007 21:32:59 +1000 Subject: [Nitro] OG draft patch: Eliminate the duplicate query seen in calls to og_create_schema Message-ID: <389c43e40709030432y41371b53l92ad2a0de009de4e@mail.gmail.com> Hi Devs, Attached is a draft patch that should eliminate the duplicate query when og_create_schema is run. I guess this is likely only to have hurt your performace if you have to create lots of tables (my use case), have a very slow connection, or a DB that is under heavy load? Anyway it was an interesting exercise to try and come to grips with some of the OG code - I don't fully understand the different roles of the different SQLEnchant* modules.... This is my first open source patch so don't expect too much :) Seriously, _when_ the guts of this change is OK, then I'll dump all the commented code and submit a cleaner patch. I've tested with the Sqlite and Mysql stores/adapters. Hopefully a more constructive email than some of the noise I've been sending lately - steep learning curve :) Mark From mvyver at gmail.com Mon Sep 3 07:34:15 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Mon, 3 Sep 2007 21:34:15 +1000 Subject: [Nitro] OG draft patch: Eliminate the duplicate query seen in calls to og_create_schema In-Reply-To: <389c43e40709030432y41371b53l92ad2a0de009de4e@mail.gmail.com> References: <389c43e40709030432y41371b53l92ad2a0de009de4e@mail.gmail.com> Message-ID: <389c43e40709030434o467f8d9ah4c47df835a27f7d0@mail.gmail.com> This time with the patch... been a long day :) On 9/3/07, Mark Van De Vyver wrote: > Hi Devs, > > Attached is a draft patch that should eliminate the duplicate query > when og_create_schema is run. I guess this is likely only to have > hurt your performace if you have to create lots of tables (my use > case), have a very slow connection, or a DB that is under heavy load? > > Anyway it was an interesting exercise to try and come to grips with > some of the OG code - I don't fully understand the different roles of > the different SQLEnchant* modules.... > > This is my first open source patch so don't expect too much :) > > Seriously, _when_ the guts of this change is OK, then I'll dump all > the commented code and submit a cleaner patch. > I've tested with the Sqlite and Mysql stores/adapters. > > Hopefully a more constructive email than some of the noise I've been > sending lately - steep learning curve :) > > Mark > -------------- next part -------------- A non-text attachment was scrubbed... Name: mvdv-20070803-1-1-draft Type: application/octet-stream Size: 61254 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070903/08ca118e/attachment-0001.obj From george.moschovitis at gmail.com Mon Sep 3 09:08:07 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 3 Sep 2007 16:08:07 +0300 Subject: [Nitro] Og tests helper In-Reply-To: <46DBD476.7060207@arnebrasseur.net> References: <46DBD476.7060207@arnebrasseur.net> Message-ID: shouldn't it say: x/all passed instead of 0 failed ? -g. On 9/3/07, Arne Brasseur wrote: > > George Moschovitis schreef: > > (in /home/gmosx/code/public) > > Running og... [ 1 specs - 0 failed ] > > Running og/store/sql... [ 1 specs - 0 failed ] > > Running og/validation... [ 1 specs - all passed ] > > -------------------------------------[ og > > ]------------------------------------- > > ExitStatus: > > # > > StdOut: > > Database "test" dropped > > . > > > > Finished in 0.136994 seconds > > > > 1 example, 0 failures > > > > The problem seems to be that the system command used to drop the > > database before each test. It seems to trigger the error code in > > script/lib/wrap.rb... > Actually the problem seems to be that some ANSI control codes (or > something that looks like it) are sent to StdErr. Because the test > outputs on StdErr it is shown in red and the details are given. If you > change line 159 in script/lib/wrap.rb from > puts "StdOut:".yellow, @stdout, "StdErr:".yellow, @stderr > to > puts "StdOut:".yellow, @stdout, "StdErr:".yellow, @stderr.inspect > > you will see this: > -------------------------------------[ og > ]------------------------------------- > ExitStatus: > # > StdOut: > . > > Finished in 0.418628 seconds > > 1 example, 0 failures > StdErr: > "\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m" > nil > --------------------------------[ og/store/sql > ]-------------------------------- > ExitStatus: > # > StdOut: > . > > Finished in 0.359741 seconds > > 1 example, 0 failures > StdErr: > "\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m" > > > > (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://www.me.gr 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/20070903/d6fd91ee/attachment.html From aurelianocalvo at yahoo.com.ar Mon Sep 3 09:21:11 2007 From: aurelianocalvo at yahoo.com.ar (Aureliano Calvo) Date: Mon, 3 Sep 2007 10:21:11 -0300 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: <46DBDE18.8030708@arnebrasseur.net> References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> <798AE3CB-5470-4E49-8119-24C3BCBACEBD@ashleymoran.me.uk> <46DBDE18.8030708@arnebrasseur.net> Message-ID: <1340963a0709030621l100eb600w2fb8ae80d29daa9f@mail.gmail.com> > > I don't speak any greek - could you explain what's going on in this > > pic? > > > Interesting :) I know no greek, but this was in the news here in Argentina. It seems that in some part of Australia (I don't know where) because of the climate change (or something) a river changed its volume and when this water mixed with the salty sea water, generated lots and lots of foam. These pictures show the generated foam. From george.moschovitis at gmail.com Mon Sep 3 09:40:40 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 3 Sep 2007 16:40:40 +0300 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: <389c43e40709030303l379e4cf5q6ef8f754905dc096@mail.gmail.com> References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> <389c43e40709030124k3172e2cbtc56deb469212fff8@mail.gmail.com> <389c43e40709030303l379e4cf5q6ef8f754905dc096@mail.gmail.com> Message-ID: Nice, I guess we can remove line 291 then? -g. On 9/3/07, Mark Van De Vyver wrote: > > > > INFO: Og uses the Mysql store. > > > DEBUG: Og manageable classes: [Member] > > > DEBUG: CREATE TABLE `ogmember` (`first_name` text, `last_name` text, > > > `address1` text, `city` text, `state` text, `email` text, `oid` > > > integer AUTO_INCREMENT PRIMARY KEY) > > > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > > > DEBUG: SELECT * FROM `ogmember` LIMIT 1 > > > > This I've tracked down to: > > [./og/lib/sql.rb] > > Line 290 > > Line 291 > > > > In line sql.rb:290 SQLEnchantMixin#og_create_scheme is called, which > > in turn calls SQLStore#create_field_map. > > The full route to the first call of SQLStore#create_field_map is: > sql.rb:290 og_create_scheme > sql.rb:79 evolve_schema > evolution.rb:59 create_field_map > > The second call of SQLStore#create_field_map is: > sql.rb:291 create_field_map > > > > > > Hence the duplicated queries to the database whenever a table is > created. > > > > I'm not sure how to fix this, but hope this helps someone. > > I'm happy to help test if needed. > > > > Mark > > > > > Using the Sqlite adapter I see something slightly different, but still > > > the duplicate `'SELECT': > > > > > > INFO: Og uses the Sqlite store. > > > DEBUG: Og manageable classes: [Member] > > > DEBUG: CREATE TABLE ogmember (first_name text, last_name text, > > > address1 text, city text, state text, email text, oid integer PRIMARY > > > KEY) > > > INFO: Created table ogmember. > > > DEBUG: SELECT * FROM ogmember LIMIT 1 > > > DEBUG: SELECT * FROM ogmember LIMIT 1 > > > > > > > > > HTH > > > Mark > > > > > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.me.gr 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/20070903/b389eb61/attachment.html From george.moschovitis at gmail.com Mon Sep 3 09:43:33 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 3 Sep 2007 16:43:33 +0300 Subject: [Nitro] OG draft patch: Eliminate the duplicate query seen in calls to og_create_schema In-Reply-To: <389c43e40709030434o467f8d9ah4c47df835a27f7d0@mail.gmail.com> References: <389c43e40709030432y41371b53l92ad2a0de009de4e@mail.gmail.com> <389c43e40709030434o467f8d9ah4c47df835a27f7d0@mail.gmail.com> Message-ID: Thanks for the patch, I will see if I can further cleanup the code. -g. On 9/3/07, Mark Van De Vyver wrote: > > This time with the patch... been a long day :) > > On 9/3/07, Mark Van De Vyver wrote: > > Hi Devs, > > > > Attached is a draft patch that should eliminate the duplicate query > > when og_create_schema is run. I guess this is likely only to have > > hurt your performace if you have to create lots of tables (my use > > case), have a very slow connection, or a DB that is under heavy load? > > > > Anyway it was an interesting exercise to try and come to grips with > > some of the OG code - I don't fully understand the different roles of > > the different SQLEnchant* modules.... > > > > This is my first open source patch so don't expect too much :) > > > > Seriously, _when_ the guts of this change is OK, then I'll dump all > > the commented code and submit a cleaner patch. > > I've tested with the Sqlite and Mysql stores/adapters. > > > > Hopefully a more constructive email than some of the noise I've been > > sending lately - steep learning curve :) > > > > Mark > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > -- http://www.me.gr 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/20070903/420e4923/attachment.html From george.moschovitis at gmail.com Mon Sep 3 11:33:18 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 3 Sep 2007 18:33:18 +0300 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: <798AE3CB-5470-4E49-8119-24C3BCBACEBD@ashleymoran.me.uk> References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> <798AE3CB-5470-4E49-8119-24C3BCBACEBD@ashleymoran.me.uk> Message-ID: > > I noticed this. I'll have to take your word for it for now, sounds > like black magic to me :) it is relatively easy to implement, nothing magic. But it is certainly nice to have in practice. Can I be any help with this? I won't start working on any web apps > until I have the tools to work BDD, so I'm happy to help get RSpec > working. I would suggest that you have a look at the two examples and the tests for the following days. Then as you get more experienced, you can help me with the testing infrastructure. I was hoping this might be the case, but without actually trying > anything I had no idea. trust me, it is quite easy. When you say JQuery, do you mean ? If so, it > looks pretty cool. yeap. I watched some of the examples here: docs.jquery.com/Tutorials:Live_Examples_of_jQuery>. Can you sum up > in a few words how JQuery replaces RJS? It looks all client-side to > me. Is it possible to use JQuery when the exact data and effects are > determined by the database? I will post some examples over the next days. Whatever, it looks like I will have to learn JavaScript. Don't > supppose you can recommend a good book? there is a jquery book, have a look at their site. > > I don't speak any greek - could you explain what's going on in this > pic? it is just a fuuny pic. Yes it does - I'm sold :) I have a few other things to get out of > the way but hopefully I will be able to make a test Nitro app this > week. It sounds like the leap from Rails will not be that big, and > it looks like I won't lose anything important (apart from testing for > the time being). that's great, if you need help just ask! -g. -- http://www.me.gr 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/20070903/717c577c/attachment-0001.html From arne at arnebrasseur.net Mon Sep 3 13:30:59 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Tue, 04 Sep 2007 01:30:59 +0800 Subject: [Nitro] Og tests helper In-Reply-To: References: <46DBD476.7060207@arnebrasseur.net> Message-ID: <46DC44D3.1070000@arnebrasseur.net> George Moschovitis schreef: > shouldn't it say: x/all passed instead of 0 failed ? > I suppose it only says that when StdErr is empty, but I'll look in to it and get back to you tomorrow. If I ever want to get accustomed to the Taiwanese time zone I should go to sleep now. (ab) > -g. > > On 9/3/07, *Arne Brasseur* > wrote: > > George Moschovitis schreef: > > (in /home/gmosx/code/public) > > Running og... [ 1 specs - 0 failed ] > > Running og/store/sql... [ 1 specs - 0 failed ] > > Running og/validation... [ 1 specs - all passed ] > > -------------------------------------[ og > > ]------------------------------------- > > ExitStatus: > > # > > StdOut: > > Database "test" dropped > > . > > > > Finished in 0.136994 seconds > > > > 1 example, 0 failures > > > > The problem seems to be that the system command used to drop the > > database before each test. It seems to trigger the error code in > > script/lib/wrap.rb... > Actually the problem seems to be that some ANSI control codes (or > something that looks like it) are sent to StdErr. Because the test > outputs on StdErr it is shown in red and the details are given. If you > change line 159 in script/lib/wrap.rb from > puts "StdOut:".yellow, @stdout, "StdErr:".yellow, @stderr > to > puts "StdOut:".yellow, @stdout, "StdErr:".yellow, @stderr.inspect > > you will see this: > -------------------------------------[ og > ]------------------------------------- > ExitStatus: > # > StdOut: > . > > Finished in 0.418628 seconds > > 1 example, 0 failures > StdErr: > "\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m" > nil > --------------------------------[ og/store/sql > ]-------------------------------- > ExitStatus: > # > StdOut: > . > > Finished in 0.359741 seconds > > 1 example, 0 failures > StdErr: > "\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m\e[32m\e[0m" > > > > (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://www.me.gr > 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 -- 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/20070904/de5334ae/attachment.html From john at oxyliquit.de Mon Sep 3 19:18:33 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 04 Sep 2007 01:18:33 +0200 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> Message-ID: Hi, > I have seen this one, can't find where the second select comes from. Will > have to investigate further. just as a general debugging Og tip (even if it involves your own app): Put a `pp caller` in exec_statement(), it generates a lot of line-noise but is very helpful if there just doesn't seem to be a reason for an unexpected query. Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From john at oxyliquit.de Mon Sep 3 19:18:35 2007 From: john at oxyliquit.de (Jonathan Buch) Date: Tue, 04 Sep 2007 01:18:35 +0200 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> Message-ID: Hi, > **SHOW STOPPER** > 1) The Og::SqlStore#exec_statement seems to rearrange the data > submitted in an sql string, and example of the original SQL statement > data and the SQL statement submitted to the MySQL store follows. >insert into ogmember ( address1,city,email,first_name,state,last_name > ) values ( '123 High > St.','Reykjavik','fred at flintstone.com','Fred','Michigan','Flintstone' > ) >DEBUG: INSERT INTO `ogmember` (`address1`, `city`, `oid`, `email`, > `first_name`, `state`, `last_name`) VALUES ('fred at flintstone.com', > 'Fred', NULL, 'Flintstone', '123 High St.', 'Michigan', 'Reykjavik') a few questions: * where does the original come from? * which method are you using to generate that query? (.save?) I haven't had a problem yet where Og would 'rearrange' something, this would be quite a bug to have, as essentially nothing would work. exec_statement itself does nothing to the query (at least last I had a look at it, it'd make no sense anyway, as it would have to parse SQL since it only gets SQL). Where that could only happen (depending on the method you used for inserting): sql.rb: def insert_sql(..) That'd be the first place where I would make a few puts to find out if Og is the culprit or if the original object was populated wrong in the first place. Hope that leads to Og working better for you, Jo -- Feel the love http://pinkjuice.com/pics/ruby.png From work at ashleymoran.me.uk Mon Sep 3 19:23:54 2007 From: work at ashleymoran.me.uk (Ashley Moran) Date: Tue, 4 Sep 2007 00:23:54 +0100 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> <798AE3CB-5470-4E49-8119-24C3BCBACEBD@ashleymoran.me.uk> Message-ID: <8F47E8E6-E65D-469E-A9C1-56C266DEB3C9@ashleymoran.me.uk> On Sep 03, 2007, at 4:33 pm, George Moschovitis wrote: > I would suggest that you have a look at the two examples and the > tests for the following days. Then as you get more experienced, you > can help me with the testing infrastructure. I'll do just that. I might try and write tests for the sample apps, and see how far I get. > I will post some examples over the next days. Cool - I think Nitro needs a few more examples. I'm sure you are busy working on Nitro though, and don't get much time to do stuff like that. > there is a jquery book, have a look at their site. I've ordered Learning jQuery and the jQuery Reference Guide - should keep me good for a while! > that's great, if you need help just ask! I'm sure I will be back :) The list has been great so far, thanks for everyone's help Ashley From mvyver at gmail.com Mon Sep 3 19:43:39 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Tue, 4 Sep 2007 09:43:39 +1000 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> Message-ID: <389c43e40709031643i765d0117x76b91599f299d73e@mail.gmail.com> Hi Jo > a few questions: You can ignore that report - a bug in my code :( Apologies. Mark > * where does the original come from? > * which method are you using to generate that query? (.save?) > > I haven't had a problem yet where Og would 'rearrange' something, > this would be quite a bug to have, as essentially nothing would work. > > exec_statement itself does nothing to the query (at least last I > had a look at it, it'd make no sense anyway, as it would have to > parse SQL since it only gets SQL). > > Where that could only happen (depending on the method you used for > inserting): sql.rb: def insert_sql(..) > > That'd be the first place where I would make a few puts to find > out if Og is the culprit or if the original object was populated > wrong in the first place. > > Hope that leads to Og working better for you, > > Jo > > -- > Feel the love > http://pinkjuice.com/pics/ruby.png > From mvyver at gmail.com Mon Sep 3 19:46:39 2007 From: mvyver at gmail.com (Mark Van De Vyver) Date: Tue, 4 Sep 2007 09:46:39 +1000 Subject: [Nitro] OG connect and exec_statement: unexpected behaviors (Critical -> Trivial) In-Reply-To: References: <389c43e40708312348g6ccb7ab2k6f930332cd752696@mail.gmail.com> Message-ID: <389c43e40709031646i27f46773tcde5f4ca55105180@mail.gmail.com> Hi Jonathon > > I have seen this one, can't find where the second select comes from. Will > > have to investigate further. > > just as a general debugging Og tip (even if it involves your own app): > > Put a `pp caller` in exec_statement(), it generates a lot of line-noise > but is very helpful if there just doesn't seem to be a reason for an > unexpected query. Thanks for the `pp caller` tip. Re: the double select on `og_create_schema`, I've posted a patch of what works for me - I'm sure it could be improved :) Regards Mark > 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 > From george.moschovitis at gmail.com Tue Sep 4 01:14:37 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 4 Sep 2007 08:14:37 +0300 Subject: [Nitro] Questions to help me evaluate Nitro In-Reply-To: <8F47E8E6-E65D-469E-A9C1-56C266DEB3C9@ashleymoran.me.uk> References: <79BF73B4-9FB3-4ABA-B10D-918A1BAD916A@ashleymoran.me.uk> <798AE3CB-5470-4E49-8119-24C3BCBACEBD@ashleymoran.me.uk> <8F47E8E6-E65D-469E-A9C1-56C266DEB3C9@ashleymoran.me.uk> Message-ID: > > Cool - I think Nitro needs a few more examples. I'm sure you are > busy working on Nitro though, and don't get much time to do stuff > like that. > I will probably convert the wiki example from older versions, stay tuned. -g. -- http://www.me.gr 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/20070904/53783d5d/attachment.html From arne at arnebrasseur.net Tue Sep 4 07:20:08 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Tue, 04 Sep 2007 19:20:08 +0800 Subject: [Nitro] Og tests helper In-Reply-To: References: Message-ID: <46DD3F68.2090001@arnebrasseur.net> I found the problem, although it took some Sherlock Holmes style investigation. Turns out the butler... uh I mean the logger did it. What's wrong with this code? def info(str) @@global_logger << Console::ANSICode.green @@global_logger.info(str) @@global_logger << Console::ANSICode.clear end def error(str) @@global_logger << Console::ANSICode.red @@global_logger.error(str) @@global_logger << Console::ANSICode.clear end The solution can be found in/pulled from my repo : http://darcs.arnebrasseur.net/glycerin (in /home/plexus/work/nitro_repo) Running og... [ 1 specs - all passed ] Running og/store/sql... [ 1 specs - all passed ] Running og/validation... [ 1 specs - all passed ] 3 examples, 0 failures No failing examples, let's add some tests! (ab) George Moschovitis schreef: > Dear devs, > > I have a little problem with the rspec infrastructure 'borrowed' from > Ramaze. > > when I run the (few) og tests with > > rake test:og > > I get: > > (in /home/gmosx/code/public) > Running og... [ 1 specs - 0 failed ] > Running og/store/sql... [ 1 specs - 0 failed ] > Running og/validation... [ 1 specs - all passed ] > -------------------------------------[ og > ]------------------------------------- > ExitStatus: > # > StdOut: > Database "test" dropped > . > > Finished in 0.136994 seconds > > 1 example, 0 failures > > The problem seems to be that the system command used to drop the > database before each test. It seems to trigger the error code in > script/lib/wrap.rb... > > If you run the tests one by one they work. > > Michael, Jonathan, Arne, do you have any idea? > > -g. > > > -- > http://www.me.gr > 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 -- 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/20070904/210c5a07/attachment-0001.html From arne at arnebrasseur.net Tue Sep 4 11:00:20 2007 From: arne at arnebrasseur.net (Arne Brasseur) Date: Tue, 04 Sep 2007 23:00:20 +0800 Subject: [Nitro] [PATCH] proto template path now includes "app" Message-ID: <46DD7304.8010303@arnebrasseur.net> Pushed another one, seems like the proto application template path moved. hunk ./raw/lib/raw/controller/publishable.rb 151 - stack << File.join(Nitro.proto_path, "template", path).gsub(/\/$/, "") + stack << File.join(Nitro.proto_path, "app", "template", path).gsub(/\/$/, "") George, could you remind me : will Nitro 0.50 allow to have controller actions without template files, and if so, should this work by simply returning a string, or by using an explicit output function? (ab) -- Arne Brasseur http://www.arnebrasseur.net arne at arnebrasseur.net From george.moschovitis at gmail.com Wed Sep 5 00:34:34 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 5 Sep 2007 07:34:34 +0300 Subject: [Nitro] [PATCH] proto template path now includes "app" In-Reply-To: <46DD7304.8010303@arnebrasseur.net> References: <46DD7304.8010303@arnebrasseur.net> Message-ID: At the moment you have to call print "my output" -g. On 9/4/07, Arne Brasseur wrote: > > Pushed another one, seems like the proto application template path moved. > > hunk ./raw/lib/raw/controller/publishable.rb 151 > - stack << File.join(Nitro.proto_path, "template", > path).gsub(/\/$/, "") > + stack << File.join(Nitro.proto_path, "app", "template", > path).gsub(/\/$/, "") > > > George, could you remind me : will Nitro 0.50 allow to have controller > actions without template files, and if so, should this work by simply > returning a string, or by using an explicit output function? > > (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://www.me.gr 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/20070905/e13710f2/attachment.html From george.moschovitis at gmail.com Wed Sep 5 04:58:31 2007 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 5 Sep 2007 11:58:31 +0300 Subject: [Nitro] [PATCH] proto template path now includes "app" In-Reply-To: <46DD7304.8010303@arnebrasseur.net> References: <46DD7304.8010303@arnebrasseur.net> Message-ID: please send me patch bundles, makes things a lot easier for me. -g. On 9/4/07, Arne Brasseur wrote: > > Pushed another one, seems like the proto application template path moved. > > hunk ./raw/lib/raw/controller/publishable.rb 151 > - stack << File.join(Nitro.proto_path, "template", > path).gsub(/\/$/, "") > + stack << File.join(Nitro.proto_path, "app", "template", > path).gsub(/\/$/, "") > > > George, could you remind me : will Nitro 0.50 allow to have controller > actions without template files, and if so, should this work by simply > returning a string, or by using an explicit output function? > > (ab) > > -- > Arne Brasseur > http://www.arnebrasseur.net > arne at arnebrasseur.net > ______________________________